@dfds-ui/experiences 1.1.0-alpha.87c33e60 → 1.1.0-alpha.dc590a44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/dynamic-table/Body/TableCell.js +6 -4
- package/cjs/dynamic-table/Body/TableCell.styles.d.ts +3 -9
- package/cjs/dynamic-table/Body/TableCell.styles.js +11 -26
- package/cjs/dynamic-table/Body/TableRow.js +8 -4
- package/cjs/dynamic-table/Body/TableRow.styles.d.ts +2 -5
- package/cjs/dynamic-table/Body/TableRow.styles.js +14 -22
- package/cjs/dynamic-table/DynamicTable.js +9 -4
- package/cjs/dynamic-table/DynamicTable.styles.d.ts +2 -8
- package/cjs/dynamic-table/DynamicTable.styles.js +11 -22
- package/cjs/dynamic-table/Head/TableHead.js +24 -11
- package/cjs/dynamic-table/Head/TableHead.styles.d.ts +4 -24
- package/cjs/dynamic-table/Head/TableHead.styles.js +46 -69
- package/cjs/dynamic-table/Head/TableHead.types.d.ts +3 -4
- package/cjs/dynamic-table/Skeleton/SkeletonTable.styles.d.ts +1 -4
- package/cjs/dynamic-table/Skeleton/SkeletonTable.styles.js +8 -15
- package/dynamic-table/Body/TableCell.js +7 -5
- package/dynamic-table/Body/TableCell.styles.d.ts +3 -9
- package/dynamic-table/Body/TableCell.styles.js +7 -24
- package/dynamic-table/Body/TableRow.js +10 -6
- package/dynamic-table/Body/TableRow.styles.d.ts +2 -5
- package/dynamic-table/Body/TableRow.styles.js +6 -15
- package/dynamic-table/DynamicTable.js +11 -6
- package/dynamic-table/DynamicTable.styles.d.ts +2 -8
- package/dynamic-table/DynamicTable.styles.js +5 -15
- package/dynamic-table/Head/TableHead.js +23 -12
- package/dynamic-table/Head/TableHead.styles.d.ts +4 -24
- package/dynamic-table/Head/TableHead.styles.js +33 -63
- package/dynamic-table/Head/TableHead.types.d.ts +3 -4
- package/dynamic-table/Skeleton/SkeletonTable.styles.d.ts +1 -4
- package/dynamic-table/Skeleton/SkeletonTable.styles.js +6 -12
- package/package.json +10 -10
|
@@ -16,10 +16,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
const TableCell = /*#__PURE__*/_react.default.memo(({
|
|
17
17
|
children,
|
|
18
18
|
headerCell
|
|
19
|
-
}) => (0, _react2.jsx)(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
}) => (0, _react2.jsx)("td", {
|
|
20
|
+
css: (0, _TableCell.tableCellStyles)({
|
|
21
|
+
align: headerCell === null || headerCell === void 0 ? void 0 : headerCell.textAlign,
|
|
22
|
+
customWidth: headerCell === null || headerCell === void 0 ? void 0 : headerCell.width
|
|
23
|
+
}),
|
|
24
|
+
"data-cy": `dynamic-table-cell-${headerCell === null || headerCell === void 0 ? void 0 : headerCell.key}`
|
|
23
25
|
}, children));
|
|
24
26
|
|
|
25
27
|
var _default = TableCell;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const genericTableCellStyles: import("@emotion/react").SerializedStyles;
|
|
2
2
|
declare type TableCellProps = {
|
|
3
3
|
align?: 'center' | 'left' | 'right';
|
|
4
4
|
customWidth?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
} & TableCellProps, import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {}>;
|
|
10
|
-
export declare const TableCellCheckboxStyled: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {}>;
|
|
6
|
+
export declare const tableCellStyles: ({ align, customWidth }: TableCellProps) => import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const tableCellCheckboxStyles: import("@emotion/react").SerializedStyles;
|
|
14
8
|
export {};
|
|
@@ -3,41 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
6
|
+
exports.tableCellCheckboxStyles = exports.tableCellStyles = exports.genericTableCellStyles = void 0;
|
|
9
7
|
|
|
10
8
|
var _theme = require("@dfds-ui/theme");
|
|
11
9
|
|
|
12
10
|
var _react = require("@emotion/react");
|
|
13
11
|
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
13
|
|
|
18
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
15
|
|
|
20
16
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
17
|
|
|
22
|
-
const
|
|
23
|
-
exports.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
target: "e1uuobsr1",
|
|
28
|
-
label: "TableCellStyled"
|
|
29
|
-
})(_objectSpread({}, genericTableCellStyle), " min-width:", ({
|
|
30
|
-
customWidth
|
|
31
|
-
}) => customWidth || 'auto', ";text-align:", ({
|
|
32
|
-
align
|
|
33
|
-
}) => align || 'left', ";width:", ({
|
|
18
|
+
const genericTableCellStyles = /*#__PURE__*/(0, _react.css)("padding:0 ", _theme.theme.spacing.xs, ";&:first-of-type{padding-left:", _theme.theme.spacing.s, ";}&:last-of-type{padding-right:", _theme.theme.spacing.s, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:genericTableCellStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9keW5hbWljLXRhYmxlL0JvZHkvVGFibGVDZWxsLnN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR3lDIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9keW5hbWljLXRhYmxlL0JvZHkvVGFibGVDZWxsLnN0eWxlcy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB0aGVtZSB9IGZyb20gJ0BkZmRzLXVpL3RoZW1lJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmV4cG9ydCBjb25zdCBnZW5lcmljVGFibGVDZWxsU3R5bGVzID0gY3NzYFxuICBwYWRkaW5nOiAwICR7dGhlbWUuc3BhY2luZy54c307XG5cbiAgJjpmaXJzdC1vZi10eXBlIHtcbiAgICBwYWRkaW5nLWxlZnQ6ICR7dGhlbWUuc3BhY2luZy5zfTtcbiAgfVxuXG4gICY6bGFzdC1vZi10eXBlIHtcbiAgICBwYWRkaW5nLXJpZ2h0OiAke3RoZW1lLnNwYWNpbmcuc307XG4gIH1cbmBcblxudHlwZSBUYWJsZUNlbGxQcm9wcyA9IHtcbiAgYWxpZ24/OiAnY2VudGVyJyB8ICdsZWZ0JyB8ICdyaWdodCdcbiAgY3VzdG9tV2lkdGg/OiBzdHJpbmdcbn1cblxuZXhwb3J0IGNvbnN0IHRhYmxlQ2VsbFN0eWxlcyA9ICh7IGFsaWduLCBjdXN0b21XaWR0aCB9OiBUYWJsZUNlbGxQcm9wcykgPT4gY3NzYFxuICAke3sgLi4uZ2VuZXJpY1RhYmxlQ2VsbFN0eWxlcyB9fVxuXG4gIG1pbi13aWR0aDogJHtjdXN0b21XaWR0aCB8fCAnYXV0byd9O1xuICB0ZXh0LWFsaWduOiAke2FsaWduIHx8ICdsZWZ0J307XG4gIHdpZHRoOiAke2N1c3RvbVdpZHRoIHx8ICdhdXRvJ307XG5gXG5cbmV4cG9ydCBjb25zdCB0YWJsZUNlbGxDaGVja2JveFN0eWxlcyA9IGNzc2BcbiAgJHt7IC4uLmdlbmVyaWNUYWJsZUNlbGxTdHlsZXMgfX1cblxuICBtYXgtd2lkdGg6IDQwcHg7XG4gIHdpZHRoOiA0MHB4O1xuYFxuIl19 */");
|
|
19
|
+
exports.genericTableCellStyles = genericTableCellStyles;
|
|
20
|
+
|
|
21
|
+
const tableCellStyles = ({
|
|
22
|
+
align,
|
|
34
23
|
customWidth
|
|
35
|
-
}) => customWidth || 'auto', ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
target: "e1uuobsr0",
|
|
41
|
-
label: "TableCellCheckboxStyled"
|
|
42
|
-
})(_objectSpread({}, genericTableCellStyle), " max-width:40px;width:40px;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9keW5hbWljLXRhYmxlL0JvZHkvVGFibGVDZWxsLnN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkJnRCIsImZpbGUiO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veFN0eWxlZCA9IHN0eWxlZC50ZGBcbiAgJHt7IC4uLmdlbmVyaWNUYWJsZUNlbGxTdHlsZSB9fVxuXG4gIG1heC13aWR0aDogNDBweDtcbiAgd2lkdGg6IDQwcHg7XG5gXG4iXX0= */"));
|
|
43
|
-
exports.TableCellCheckboxStyled = TableCellCheckboxStyled;
|
|
24
|
+
}) => /*#__PURE__*/(0, _react.css)(_objectSpread({}, genericTableCellStyles), " min-width:", customWidth || 'auto', ";text-align:", align || 'left', ";width:", customWidth || 'auto', ";" + (process.env.NODE_ENV === "production" ? "" : ";label:tableCellStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9keW5hbWljLXRhYmxlL0JvZHkvVGFibGVDZWxsLnN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0I4RSIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMvZHluYW1pYy10YWJsZS9Cb2R5L1RhYmxlQ2VsbC5zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdGhlbWUgfSBmcm9tICdAZGZkcy11aS90aGVtZSdcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5leHBvcnQgY29uc3QgZ2VuZXJpY1RhYmxlQ2VsbFN0eWxlcyA9IGNzc2BcbiAgcGFkZGluZzogMCAke3RoZW1lLnNwYWNpbmcueHN9O1xuXG4gICY6Zmlyc3Qtb2YtdHlwZSB7XG4gICAgcGFkZGluZy1sZWZ0OiAke3RoZW1lLnNwYWNpbmcuc307XG4gIH1cblxuICAmOmxhc3Qtb2YtdHlwZSB7XG4gICAgcGFkZGluZy1yaWdodDogJHt0aGVtZS5zcGFjaW5nLnN9O1xuICB9XG5gXG5cbnR5cGUgVGFibGVDZWxsUHJvcHMgPSB7XG4gIGFsaWduPzogJ2NlbnRlcicgfCAnbGVmdCcgfCAncmlnaHQnXG4gIGN1c3RvbVdpZHRoPzogc3RyaW5nXG59XG5cbmV4cG9ydCBjb25zdCB0YWJsZUNlbGxTdHlsZXMgPSAoeyBhbGlnbiwgY3VzdG9tV2lkdGggfTogVGFibGVDZWxsUHJvcHMpID0+IGNzc2BcbiAgJHt7IC4uLmdlbmVyaWNUYWJsZUNlbGxTdHlsZXMgfX1cblxuICBtaW4td2lkdGg6ICR7Y3VzdG9tV2lkdGggfHwgJ2F1dG8nfTtcbiAgdGV4dC1hbGlnbjogJHthbGlnbiB8fCAnbGVmdCd9O1xuICB3aWR0aDogJHtjdXN0b21XaWR0aCB8fCAnYXV0byd9O1xuYFxuXG5leHBvcnQgY29uc3QgdGFibGVDZWxsQ2hlY2tib3hTdHlsZXMgPSBjc3NgXG4gICR7eyAuLi5nZW5lcmljVGFibGVDZWxsU3R5bGVzIH19XG5cbiAgbWF4LXdpZHRoOiA0MHB4O1xuICB3aWR0aDogNDBweDtcbmBcbiJdfQ== */");
|
|
25
|
+
|
|
26
|
+
exports.tableCellStyles = tableCellStyles;
|
|
27
|
+
const tableCellCheckboxStyles = /*#__PURE__*/(0, _react.css)(_objectSpread({}, genericTableCellStyles), " max-width:40px;width:40px;" + (process.env.NODE_ENV === "production" ? "" : ";label:tableCellCheckboxStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9keW5hbWljLXRhYmxlL0JvZHkvVGFibGVDZWxsLnN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEIwQyIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMvZHluYW1pYy10YWJsZS9Cb2R5L1RhYmxlQ2VsbC5zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgd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react.default.memo(({
|
|
|
27
27
|
row,
|
|
28
28
|
selectableRows,
|
|
29
29
|
selectedRows
|
|
30
|
-
}) => (0, _react2.jsx)(
|
|
31
|
-
|
|
30
|
+
}) => (0, _react2.jsx)("tr", {
|
|
31
|
+
css: (0, _TableRow.tableRowStyles)({
|
|
32
|
+
active: isActive,
|
|
33
|
+
hoverColor: !!onClickRow
|
|
34
|
+
}),
|
|
32
35
|
className: row.className,
|
|
33
|
-
hoverColor: !!onClickRow,
|
|
34
36
|
onClick: () => onClickRow && onClickRow(row.id ? String(row.id) : '')
|
|
35
|
-
}, selectableRows && row.id && (0, _react2.jsx)(
|
|
37
|
+
}, selectableRows && row.id && (0, _react2.jsx)("td", {
|
|
38
|
+
css: _TableCell2.tableCellCheckboxStyles
|
|
39
|
+
}, (0, _react2.jsx)(_forms.Checkbox, {
|
|
36
40
|
checked: selectedRows.includes(row.id),
|
|
37
41
|
name: row.id,
|
|
38
42
|
onChange: () => {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const genericTableRowStyles: import("@emotion/react").SerializedStyles;
|
|
2
2
|
declare type TableRowProps = {
|
|
3
3
|
active?: boolean;
|
|
4
4
|
hoverColor: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare const
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
} & TableRowProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
|
|
6
|
+
export declare const tableRowStyles: ({ active, hoverColor }: TableRowProps) => import("@emotion/react").SerializedStyles;
|
|
10
7
|
export {};
|
|
@@ -3,37 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
6
|
+
exports.tableRowStyles = exports.genericTableRowStyles = void 0;
|
|
9
7
|
|
|
10
8
|
var _theme = require("@dfds-ui/theme");
|
|
11
9
|
|
|
12
10
|
var _react = require("@emotion/react");
|
|
13
11
|
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
13
|
|
|
18
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
15
|
|
|
20
16
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
17
|
|
|
22
|
-
const
|
|
23
|
-
exports.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
target: "e1ozhs4m0",
|
|
28
|
-
label: "TableRowStyled"
|
|
29
|
-
})(_objectSpread({}, genericTableRowStyle), " &:hover{", ({
|
|
18
|
+
const genericTableRowStyles = /*#__PURE__*/(0, _react.css)("border-bottom:1px solid ", _theme.theme.colors.surface.secondary, ";border-collapse:collapse;height:48px;" + (process.env.NODE_ENV === "production" ? "" : ";label:genericTableRowStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLC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hlbWUuY29sb3JzLmRpdmlkZXIuZGFya307XG4gIGB9O1xuYFxuIl19 */");
|
|
19
|
+
exports.genericTableRowStyles = genericTableRowStyles;
|
|
20
|
+
|
|
21
|
+
const tableRowStyles = ({
|
|
22
|
+
active,
|
|
30
23
|
hoverColor
|
|
31
|
-
}) => hoverColor && `
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
exports.TableRowStyled = TableRowStyled;
|
|
24
|
+
}) => /*#__PURE__*/(0, _react.css)(_objectSpread({}, genericTableRowStyles), " &:hover{", hoverColor && `
|
|
25
|
+
background-color: ${_theme.theme.colors.surface.secondary};
|
|
26
|
+
cursor: ${hoverColor && 'pointer'};
|
|
27
|
+
`, ";}", active && `
|
|
28
|
+
background-color: ${_theme.theme.colors.divider.dark};
|
|
29
|
+
`, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:tableRowStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9keW5hbWljLXRhYmxlL0JvZHkvVGFibGVSb3cuc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjNEUiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjL2R5bmFtaWMtdGFibGUvQm9keS9UYWJsZVJvdy5zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdGhlbWUgfSBmcm9tICdAZGZkcy11aS90aGVtZSdcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5leHBvcnQgY29uc3QgZ2VuZXJpY1RhYmxlUm93U3R5bGVzID0gY3NzYFxuICBib3JkZXItYm90dG9tOiAxcHggc29saWQgJHt0aGVtZS5jb2xvcnMuc3VyZmFjZS5zZWNvbmRhcnl9O1xuICBib3JkZXItY29sbGFwc2U6IGNvbGxhcHNlO1xuICBoZWlnaHQ6IDQ4cHg7XG5gXG5cbnR5cGUgVGFibGVSb3dQcm9wcyA9IHtcbiAgYWN0aXZlPzogYm9vbGVhblxuICBob3ZlckNvbG9yOiBib29sZWFuXG59XG5cbmV4cG9ydCBjb25zdCB0YWJsZVJvd1N0eWxlcyA9ICh7IGFjdGl2ZSwgaG92ZXJDb2xvciB9OiBUYWJsZVJvd1Byb3BzKSA9PiBjc3NgXG4gICR7eyAuLi5nZW5lcmljVGFibGVSb3dTdHlsZXMgfX1cblxuICAmOmhvdmVyIHtcbiAgICAke2hvdmVyQ29sb3IgJiZcbiAgICBgXG4gICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAke3RoZW1lLmNvbG9ycy5zdXJmYWNlLnNlY29uZGFyeX07XG4gICAgICBjdXJzb3I6ICR7aG92ZXJDb2xvciAmJiAncG9pbnRlcid9O1xuICAgIGB9O1xuICB9XG5cbiAgJHthY3RpdmUgJiZcbiAgYFxuICAgIGJhY2tncm91bmQtY29sb3I6ICR7dGhlbWUuY29sb3JzLmRpdmlkZXIuZGFya307XG4gIGB9O1xuYFxuIl19 */");
|
|
30
|
+
|
|
31
|
+
exports.tableRowStyles = tableRowStyles;
|
|
@@ -69,9 +69,12 @@ const DynamicTable = ({
|
|
|
69
69
|
onSort(sortByKeyValue, sortDescending);
|
|
70
70
|
}
|
|
71
71
|
}, [sortDescending, onSort, sortByKeyValue]);
|
|
72
|
-
return (0, _react2.jsx)(
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
return (0, _react2.jsx)("div", {
|
|
73
|
+
css: (0, _DynamicTable.tableWrapperStyles)({
|
|
74
|
+
height
|
|
75
|
+
})
|
|
76
|
+
}, (0, _react2.jsx)("table", {
|
|
77
|
+
css: _DynamicTable.tableStyles,
|
|
75
78
|
"data-cy": !isLoading ? `dynamic-table-isLoaded` : ''
|
|
76
79
|
}, headerRow && (0, _react2.jsx)(_TableHead.default, {
|
|
77
80
|
headerRow: headerRow,
|
|
@@ -93,7 +96,9 @@ const DynamicTable = ({
|
|
|
93
96
|
rows: !isLoading ? rows : skeletonRows,
|
|
94
97
|
selectableRows: selectableRows,
|
|
95
98
|
selectedRows: selectedRows
|
|
96
|
-
})), isLoading && (0, _react2.jsx)(
|
|
99
|
+
})), isLoading && (0, _react2.jsx)("div", {
|
|
100
|
+
css: _SkeletonTable.fadeStyles
|
|
101
|
+
}));
|
|
97
102
|
};
|
|
98
103
|
|
|
99
104
|
var _default = /*#__PURE__*/_react.default.memo(DynamicTable);
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
declare type TableWrapperProps = {
|
|
2
2
|
height?: string;
|
|
3
3
|
};
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
6
|
-
as?: import("react").ElementType<any> | undefined;
|
|
7
|
-
} & TableWrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
-
export declare const TableStyled: import("@emotion/styled").StyledComponent<{
|
|
9
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
as?: import("react").ElementType<any> | undefined;
|
|
11
|
-
}, import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
|
|
4
|
+
export declare const tableWrapperStyles: ({ height }: TableWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const tableStyles: import("@emotion/react").SerializedStyles;
|
|
12
6
|
export {};
|
|
@@ -3,30 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
6
|
+
exports.tableStyles = exports.tableWrapperStyles = void 0;
|
|
9
7
|
|
|
10
8
|
var _theme = require("@dfds-ui/theme");
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
var _react = require("@emotion/react");
|
|
13
11
|
|
|
14
|
-
const
|
|
15
|
-
target: "e1dds0xk1"
|
|
16
|
-
} : {
|
|
17
|
-
target: "e1dds0xk1",
|
|
18
|
-
label: "TableWrapperStyled"
|
|
19
|
-
})("color:", _theme.theme.colors.text.primary, ";display:flex;flex-direction:column;overflow-x:auto;width:100%;", ({
|
|
12
|
+
const tableWrapperStyles = ({
|
|
20
13
|
height
|
|
21
|
-
}) => height && `
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
target: "e1dds0xk0",
|
|
30
|
-
label: "TableStyled"
|
|
31
|
-
})("background-color:", _theme.theme.colors.surface.primary, ";font-family:Verdana,sans-serif;font-size:12px;line-height:16px;width:100%;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9keW5hbWljLXRhYmxlL0R5bmFtaWNUYWJsZS5zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNCdUMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2R5bmFtaWMtdGFibGUvRHluYW1pY1RhYmxlLnN0eWxlcy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB0aGVtZSB9IGZyb20gJ0BkZmRzLXVpL3RoZW1lJ1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5cbnR5cGUgVGFibGVXcmFwcGVyUHJvcHMgPSB7XG4gIGhlaWdodD86IHN0cmluZ1xufVxuXG5leHBvcnQgY29uc3QgVGFibGVXcmFwcGVyU3R5bGVkID0gc3R5bGVkLmRpdjxUYWJsZVdyYXBwZXJQcm9wcz5gXG4gIGNvbG9yOiAke3RoZW1lLmNvbG9ycy50ZXh0LnByaW1hcnl9O1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICBvdmVyZmxvdy14OiBhdXRvO1xuICB3aWR0aDogMTAwJTtcblxuICAkeyh7IGhlaWdodCB9KSA9PlxuICAgIGhlaWdodCAmJlxuICAgIGBcbiAgICAgIGhlaWdodDogJHtoZWlnaHR9O1xuICAgICAgb3ZlcmZsb3cteTogJHtoZWlnaHQgJiYgJ2F1dG8nfTtcbiAgICBgfTtcbmBcblxuZXhwb3J0IGNvbnN0IFRhYmxlU3R5bGVkID0gc3R5bGVkLnRhYmxlYFxuICBiYWNrZ3JvdW5kLWNvbG9yOiAke3RoZW1lLmNvbG9ycy5zdXJmYWNlLnByaW1hcnl9O1xuICBmb250LWZhbWlseTogVmVyZGFuYSwgc2Fucy1zZXJpZjtcbiAgZm9udC1zaXplOiAxMnB4O1xuICBsaW5lLWhlaWdodDogMTZweDtcbiAgd2lkdGg6IDEwMCU7XG5gXG4iXX0= */"));
|
|
32
|
-
exports.TableStyled = TableStyled;
|
|
14
|
+
}) => /*#__PURE__*/(0, _react.css)("color:", _theme.theme.colors.text.primary, ";display:flex;flex-direction:column;overflow-x:auto;width:100%;", height && `
|
|
15
|
+
height: ${height};
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
`, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:tableWrapperStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9keW5hbWljLXRhYmxlL0R5bmFtaWNUYWJsZS5zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU93RSIsImZpbGUiOiIuLi8uLi8uLi9zcmMvZHluYW1pYy10YWJsZS9EeW5hbWljVGFibGUuc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHRoZW1lIH0gZnJvbSAnQGRmZHMtdWkvdGhlbWUnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxudHlwZSBUYWJsZVdyYXBwZXJQcm9wcyA9IHtcbiAgaGVpZ2h0Pzogc3RyaW5nXG59XG5cbmV4cG9ydCBjb25zdCB0YWJsZVdyYXBwZXJTdHlsZXMgPSAoeyBoZWlnaHQgfTogVGFibGVXcmFwcGVyUHJvcHMpID0+IGNzc2BcbiAgY29sb3I6ICR7dGhlbWUuY29sb3JzLnRleHQucHJpbWFyeX07XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gIG92ZXJmbG93LXg6IGF1dG87XG4gIHdpZHRoOiAxMDAlO1xuXG4gICR7aGVpZ2h0ICYmXG4gIGBcbiAgICBoZWlnaHQ6ICR7aGVpZ2h0fTtcbiAgICBvdmVyZmxvdy15OiBhdXRvO1xuICBgfTtcbmBcblxuZXhwb3J0IGNvbnN0IHRhYmxlU3R5bGVzID0gY3NzYFxuICBiYWNrZ3JvdW5kLWNvbG9yOiAke3RoZW1lLmNvbG9ycy5zdXJmYWNlLnByaW1hcnl9O1xuICBmb250LWZhbWlseTogVmVyZGFuYSwgc2Fucy1zZXJpZjtcbiAgZm9udC1zaXplOiAxMnB4O1xuICBsaW5lLWhlaWdodDogMTZweDtcbiAgd2lkdGg6IDEwMCU7XG5gXG4iXX0= */");
|
|
18
|
+
|
|
19
|
+
exports.tableWrapperStyles = tableWrapperStyles;
|
|
20
|
+
const tableStyles = /*#__PURE__*/(0, _react.css)("background-color:", _theme.theme.colors.surface.primary, ";font-family:Verdana,sans-serif;font-size:12px;line-height:16px;width:100%;" + (process.env.NODE_ENV === "production" ? "" : ";label:tableStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9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|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
+
var _system = require("@dfds-ui/icons/system");
|
|
11
|
+
|
|
10
12
|
var _reactComponents = require("@dfds-ui/react-components");
|
|
11
13
|
|
|
12
14
|
var _TableHead = require("./TableHead.styles");
|
|
13
15
|
|
|
16
|
+
var _TableRow = require("../Body/TableRow.styles");
|
|
17
|
+
|
|
14
18
|
var _react2 = require("@emotion/react");
|
|
15
19
|
|
|
16
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -52,8 +56,12 @@ const TableHead = /*#__PURE__*/_react.default.memo(({
|
|
|
52
56
|
setSortDescending(!sortDescending);
|
|
53
57
|
}
|
|
54
58
|
}, [onSort, setSortDescending, setSortByKeyValue, sortDescending]);
|
|
55
|
-
return (0, _react2.jsx)("thead", null, (0, _react2.jsx)(
|
|
56
|
-
|
|
59
|
+
return (0, _react2.jsx)("thead", null, (0, _react2.jsx)("tr", {
|
|
60
|
+
css: _TableRow.genericTableRowStyles
|
|
61
|
+
}, selectableRows && (0, _react2.jsx)("th", {
|
|
62
|
+
css: (0, _TableHead.tableHeadCellCheckboxStyles)({
|
|
63
|
+
stickyHeader
|
|
64
|
+
})
|
|
57
65
|
}, (0, _react2.jsx)(_reactComponents.Checkbox, {
|
|
58
66
|
checked: selectedRows.length > 0,
|
|
59
67
|
indeterminate: true,
|
|
@@ -66,17 +74,22 @@ const TableHead = /*#__PURE__*/_react.default.memo(({
|
|
|
66
74
|
const clickHandler = () => headerCell.sortable && sort(sortByKeyValue, sortKey);
|
|
67
75
|
|
|
68
76
|
const showChevron = String(sortByKeyValue === sortKey);
|
|
69
|
-
return (0, _react2.jsx)(
|
|
77
|
+
return (0, _react2.jsx)("th", {
|
|
70
78
|
align: headerCell.textAlign,
|
|
79
|
+
css: (0, _TableHead.tableHeadCellStyles)({
|
|
80
|
+
align: headerCell.textAlign,
|
|
81
|
+
customWidth: headerCell.width,
|
|
82
|
+
sortByKey: onSort,
|
|
83
|
+
sortable: headerCell.sortable,
|
|
84
|
+
stickyHeader: stickyHeader
|
|
85
|
+
}),
|
|
71
86
|
key: i,
|
|
72
|
-
onClick: clickHandler
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
descending: String(sortDescending),
|
|
79
|
-
show: showChevron
|
|
87
|
+
onClick: clickHandler
|
|
88
|
+
}, (0, _react2.jsx)("div", null, (0, _react2.jsx)("span", null, headerCell.displayName), headerCell.sortable && onSort && (0, _react2.jsx)(_system.ChevronDown, {
|
|
89
|
+
css: (0, _TableHead.chevronStyles)({
|
|
90
|
+
descending: String(sortDescending),
|
|
91
|
+
show: showChevron
|
|
92
|
+
})
|
|
80
93
|
})));
|
|
81
94
|
})));
|
|
82
95
|
});
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
import { ChevronProps,
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
|
|
6
|
-
export declare const TableHeadCellStyled: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
} & GenericTableHeadCellProps & import("react").ClassAttributes<HTMLTableHeaderCellElement> & import("react").ThHTMLAttributes<HTMLTableHeaderCellElement> & {
|
|
10
|
-
children?: import("react").ReactNode;
|
|
11
|
-
} & {
|
|
12
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
-
} & TableHeadCellProps, {}, {}>;
|
|
14
|
-
export declare const TableHeadCellCheckboxStyled: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
} & GenericTableHeadCellProps & import("react").ClassAttributes<HTMLTableHeaderCellElement> & import("react").ThHTMLAttributes<HTMLTableHeaderCellElement> & {
|
|
18
|
-
children?: import("react").ReactNode;
|
|
19
|
-
} & {
|
|
20
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
-
} & TableHeadCellCheckboxProps, {}, {}>;
|
|
22
|
-
export declare const ChevronStyled: import("@emotion/styled").StyledComponent<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "filter" | "values" | "fill" | "max" | "type" | "accumulate" | "offset" | "key" | "id" | "media" | "origin" | "height" | "width" | "end" | "name" | "alignmentBaseline" | "baselineShift" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolation" | "colorInterpolationFilters" | "cursor" | "direction" | "display" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "opacity" | "order" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "textDecoration" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "style" | "path" | "method" | "target" | "lang" | "className" | "children" | "tabIndex" | "orientation" | "local" | "x" | "y" | "mathematical" | "azimuth" | "colorRendering" | "glyphOrientationVertical" | "vectorEffect" | "additive" | "unicodeRange" | "crossOrigin" | "href" | "min" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accentHeight" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css"> & import("react").RefAttributes<SVGSVGElement> & {
|
|
23
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
-
} & ChevronProps, {}, {}>;
|
|
1
|
+
import { ChevronProps, TableHeadCellCheckboxProps, TableHeadCellProps } from './TableHead.types';
|
|
2
|
+
export declare const tableHeadCellStyles: ({ align, customWidth, sortable, sortByKey, stickyHeader, }: TableHeadCellProps) => import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const tableHeadCellCheckboxStyles: ({ stickyHeader }: TableHeadCellCheckboxProps) => import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const chevronStyles: ({ descending, show }: ChevronProps) => import("@emotion/react").SerializedStyles;
|