UNPKG

@atlaskit/dynamic-table

Version:

A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.

46 lines (45 loc) 3.03 kB
/* table.tsx generated by @compiled/babel-plugin v3.0.2 */ "use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.Table = void 0; require("./table.compiled.css"); var _react = _interopRequireWildcard(require("react")); var React = _react; var _runtime = require("@compiled/react/runtime"); var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); var _excluded = ["isFixedSize", "hasDataRow", "children", "testId", "isLoading"]; /* eslint-disable @repo/internal/react/require-jsdoc */ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } var fixedSizeTableStyles = null; var tableStyles = null; var bodyBorder = null; var Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) { var isFixedSize = _ref.isFixedSize, hasDataRow = _ref.hasDataRow, children = _ref.children, testId = _ref.testId, isLoading = _ref.isLoading, rest = (0, _objectWithoutProperties2.default)(_ref, _excluded); return /*#__PURE__*/React.createElement("table", (0, _extends2.default)({ inert: isLoading ? '' : undefined, style: { // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 '--local-dynamic-table-hover-bg': "var(--ds-background-neutral-subtle-hovered, #0515240F)", // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 '--local-dynamic-table-highlighted-bg': "var(--ds-background-selected, #E9F2FE)", // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 '--local-dynamic-table-hover-highlighted-bg': "var(--ds-background-selected-hovered, #CFE1FD)", // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 '--local-dynamic-table-row-focus-outline': "var(--ds-border-focused, #4688EC)" }, ref: ref }, rest, { "data-testid": testId && "".concat(testId, "--table"), className: (0, _runtime.ax)(["_1bsb1osq _yq5hus1c _btyzidpf _ect4ttxp", isFixedSize && "_1kqm1n9t", hasDataRow && "_179r1uh4"]) }), children); });