@veeqo/ui 14.11.0-beta-4 → 14.11.0
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/dist/components/Action/styles/button.module.scss.cjs +2 -2
- package/dist/components/Action/styles/button.module.scss.cjs.map +1 -1
- package/dist/components/Action/styles/button.module.scss.js +2 -2
- package/dist/components/Action/styles/button.module.scss.js.map +1 -1
- package/dist/components/Action/styles/link.module.scss.cjs +2 -2
- package/dist/components/Action/styles/link.module.scss.cjs.map +1 -1
- package/dist/components/Action/styles/link.module.scss.js +2 -2
- package/dist/components/Action/styles/link.module.scss.js.map +1 -1
- package/dist/components/Action/utils.cjs +13 -18
- package/dist/components/Action/utils.cjs.map +1 -1
- package/dist/components/Action/utils.js +13 -18
- package/dist/components/Action/utils.js.map +1 -1
- package/dist/components/Button/Button.cjs +39 -35
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +15 -7
- package/dist/components/Button/Button.js +39 -35
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.module.scss.cjs +9 -0
- package/dist/components/Button/Button.module.scss.cjs.map +1 -0
- package/dist/components/Button/Button.module.scss.js +7 -0
- package/dist/components/Button/Button.module.scss.js.map +1 -0
- package/dist/components/Button/types.d.ts +16 -7
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/DodecadeCalendar.cjs +2 -2
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/DodecadeCalendar.cjs.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/DodecadeCalendar.js +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/YearCalendar.cjs +2 -2
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/YearCalendar.cjs.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarGrid/subCalendars/YearCalendar.js +1 -1
- package/dist/components/DataTable/DataTable.cjs +3 -3
- package/dist/components/DataTable/DataTable.cjs.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +4 -4
- package/dist/components/DataTable/DataTable.js +3 -3
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/components/ActionBar.cjs +3 -8
- package/dist/components/DataTable/components/ActionBar.cjs.map +1 -1
- package/dist/components/DataTable/components/ActionBar.js +3 -7
- package/dist/components/DataTable/components/ActionBar.js.map +1 -1
- package/dist/components/DataTable/components/Cell.cjs +15 -4
- package/dist/components/DataTable/components/Cell.cjs.map +1 -1
- package/dist/components/DataTable/components/Cell.d.ts +6 -2
- package/dist/components/DataTable/components/Cell.js +15 -4
- package/dist/components/DataTable/components/Cell.js.map +1 -1
- package/dist/components/DataTable/components/ColumnDivider.cjs +4 -6
- package/dist/components/DataTable/components/ColumnDivider.cjs.map +1 -1
- package/dist/components/DataTable/components/ColumnDivider.d.ts +0 -1
- package/dist/components/DataTable/components/ColumnDivider.js +5 -5
- package/dist/components/DataTable/components/ColumnDivider.js.map +1 -1
- package/dist/components/DataTable/components/ColumnHeader.cjs +8 -9
- package/dist/components/DataTable/components/ColumnHeader.cjs.map +1 -1
- package/dist/components/DataTable/components/ColumnHeader.d.ts +16 -6
- package/dist/components/DataTable/components/ColumnHeader.js +7 -8
- package/dist/components/DataTable/components/ColumnHeader.js.map +1 -1
- package/dist/components/DataTable/components/DataTable.module.scss.cjs +9 -0
- package/dist/components/DataTable/components/DataTable.module.scss.cjs.map +1 -0
- package/dist/components/DataTable/components/DataTable.module.scss.js +7 -0
- package/dist/components/DataTable/components/DataTable.module.scss.js.map +1 -0
- package/dist/components/DataTable/components/EmptyBodyContent.cjs +13 -5
- package/dist/components/DataTable/components/EmptyBodyContent.cjs.map +1 -1
- package/dist/components/DataTable/components/EmptyBodyContent.d.ts +10 -3
- package/dist/components/DataTable/components/EmptyBodyContent.js +12 -4
- package/dist/components/DataTable/components/EmptyBodyContent.js.map +1 -1
- package/dist/components/DataTable/components/Header.cjs +16 -4
- package/dist/components/DataTable/components/Header.cjs.map +1 -1
- package/dist/components/DataTable/components/Header.d.ts +2 -1
- package/dist/components/DataTable/components/Header.js +16 -4
- package/dist/components/DataTable/components/Header.js.map +1 -1
- package/dist/components/DataTable/components/LoadingCellContent.cjs +7 -7
- package/dist/components/DataTable/components/LoadingCellContent.cjs.map +1 -1
- package/dist/components/DataTable/components/LoadingCellContent.d.ts +5 -1
- package/dist/components/DataTable/components/LoadingCellContent.js +6 -6
- package/dist/components/DataTable/components/LoadingCellContent.js.map +1 -1
- package/dist/components/DataTable/components/NoWrap.cjs +7 -3
- package/dist/components/DataTable/components/NoWrap.cjs.map +1 -1
- package/dist/components/DataTable/components/NoWrap.d.ts +6 -1
- package/dist/components/DataTable/components/NoWrap.js +6 -2
- package/dist/components/DataTable/components/NoWrap.js.map +1 -1
- package/dist/components/DataTable/components/Row.cjs +21 -24
- package/dist/components/DataTable/components/Row.cjs.map +1 -1
- package/dist/components/DataTable/components/Row.d.ts +5 -2
- package/dist/components/DataTable/components/Row.js +20 -23
- package/dist/components/DataTable/components/Row.js.map +1 -1
- package/dist/components/DataTable/components/ScrollContainer.cjs +7 -3
- package/dist/components/DataTable/components/ScrollContainer.cjs.map +1 -1
- package/dist/components/DataTable/components/ScrollContainer.d.ts +6 -1
- package/dist/components/DataTable/components/ScrollContainer.js +6 -2
- package/dist/components/DataTable/components/ScrollContainer.js.map +1 -1
- package/dist/components/DataTable/components/StickyHead.cjs +3 -11
- package/dist/components/DataTable/components/StickyHead.cjs.map +1 -1
- package/dist/components/DataTable/components/StickyHead.d.ts +2 -1
- package/dist/components/DataTable/components/StickyHead.js +3 -11
- package/dist/components/DataTable/components/StickyHead.js.map +1 -1
- package/dist/components/DataTable/components/TableGrid.cjs +47 -5
- package/dist/components/DataTable/components/TableGrid.cjs.map +1 -1
- package/dist/components/DataTable/components/TableGrid.d.ts +10 -3
- package/dist/components/DataTable/components/TableGrid.js +46 -4
- package/dist/components/DataTable/components/TableGrid.js.map +1 -1
- package/dist/components/DataTable/components/Truncate.cjs +7 -3
- package/dist/components/DataTable/components/Truncate.cjs.map +1 -1
- package/dist/components/DataTable/components/Truncate.d.ts +6 -1
- package/dist/components/DataTable/components/Truncate.js +6 -2
- package/dist/components/DataTable/components/Truncate.js.map +1 -1
- package/dist/components/DataTable/components/Wrapper.cjs +11 -8
- package/dist/components/DataTable/components/Wrapper.cjs.map +1 -1
- package/dist/components/DataTable/components/Wrapper.d.ts +5 -2
- package/dist/components/DataTable/components/Wrapper.js +10 -7
- package/dist/components/DataTable/components/Wrapper.js.map +1 -1
- package/dist/components/DataTable/constants.cjs +0 -2
- package/dist/components/DataTable/constants.cjs.map +1 -1
- package/dist/components/DataTable/constants.js +1 -2
- package/dist/components/DataTable/constants.js.map +1 -1
- package/dist/components/DataTable/hooks/useTableId.cjs +23 -0
- package/dist/components/DataTable/hooks/useTableId.cjs.map +1 -0
- package/dist/components/DataTable/hooks/useTableId.d.ts +13 -0
- package/dist/components/DataTable/hooks/useTableId.js +21 -0
- package/dist/components/DataTable/hooks/useTableId.js.map +1 -0
- package/dist/components/DataTable/utils/generateTableCss.cjs +44 -80
- package/dist/components/DataTable/utils/generateTableCss.cjs.map +1 -1
- package/dist/components/DataTable/utils/generateTableCss.d.ts +7 -1
- package/dist/components/DataTable/utils/generateTableCss.js +44 -80
- package/dist/components/DataTable/utils/generateTableCss.js.map +1 -1
- package/dist/components/DateInputField/DateInputField.cjs +1 -1
- package/dist/components/DateInputField/DateInputField.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/Grid/Grid.cjs +27 -0
- package/dist/components/Grid/Grid.cjs.map +1 -0
- package/dist/components/Grid/Grid.d.ts +3 -0
- package/dist/components/Grid/Grid.js +21 -0
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Grid/Grid.module.scss.cjs +9 -0
- package/dist/components/Grid/Grid.module.scss.cjs.map +1 -0
- package/dist/components/Grid/Grid.module.scss.js +7 -0
- package/dist/components/Grid/Grid.module.scss.js.map +1 -0
- package/dist/components/Grid/index.d.ts +2 -3
- package/dist/components/LegacyDataTable/LegacyDataTable.d.ts +1 -1
- package/dist/components/LegacyDataTable/LegacyDataTable.module.scss.cjs +9 -0
- package/dist/components/LegacyDataTable/LegacyDataTable.module.scss.cjs.map +1 -0
- package/dist/components/LegacyDataTable/LegacyDataTable.module.scss.js +7 -0
- package/dist/components/LegacyDataTable/LegacyDataTable.module.scss.js.map +1 -0
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.cjs +8 -8
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.cjs.map +1 -1
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.js +8 -7
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.js.map +1 -1
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.module.scss.cjs +9 -0
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.module.scss.cjs.map +1 -0
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.module.scss.js +7 -0
- package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.module.scss.js.map +1 -0
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.cjs +8 -5
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.cjs.map +1 -1
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.js +8 -5
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.js.map +1 -1
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.module.scss.cjs +9 -0
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.module.scss.cjs.map +1 -0
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.module.scss.js +7 -0
- package/dist/components/LegacyDataTable/SpecificState/SpecificState.module.scss.js.map +1 -0
- package/dist/components/LegacyDataTable/StickyHeader.cjs.map +1 -1
- package/dist/components/LegacyDataTable/StickyHeader.js.map +1 -1
- package/dist/components/LegacyDataTable/cells/ClickableCell.cjs +6 -8
- package/dist/components/LegacyDataTable/cells/ClickableCell.cjs.map +1 -1
- package/dist/components/LegacyDataTable/cells/ClickableCell.d.ts +1 -1
- package/dist/components/LegacyDataTable/cells/ClickableCell.js +4 -5
- package/dist/components/LegacyDataTable/cells/ClickableCell.js.map +1 -1
- package/dist/components/LegacyDataTable/cells/EditableCell.cjs +5 -8
- package/dist/components/LegacyDataTable/cells/EditableCell.cjs.map +1 -1
- package/dist/components/LegacyDataTable/cells/EditableCell.d.ts +1 -1
- package/dist/components/LegacyDataTable/cells/EditableCell.js +3 -5
- package/dist/components/LegacyDataTable/cells/EditableCell.js.map +1 -1
- package/dist/components/LegacyDataTable/cells/cells.module.scss.cjs +9 -0
- package/dist/components/LegacyDataTable/cells/cells.module.scss.cjs.map +1 -0
- package/dist/components/LegacyDataTable/cells/cells.module.scss.js +7 -0
- package/dist/components/LegacyDataTable/cells/cells.module.scss.js.map +1 -0
- package/dist/components/LegacyDataTable/styled.cjs +145 -104
- package/dist/components/LegacyDataTable/styled.cjs.map +1 -1
- package/dist/components/LegacyDataTable/styled.d.ts +40 -28
- package/dist/components/LegacyDataTable/styled.js +144 -103
- package/dist/components/LegacyDataTable/styled.js.map +1 -1
- package/dist/components/LegacyDataTable/utils/index.cjs +12 -8
- package/dist/components/LegacyDataTable/utils/index.cjs.map +1 -1
- package/dist/components/LegacyDataTable/utils/index.d.ts +5 -0
- package/dist/components/LegacyDataTable/utils/index.js +12 -8
- package/dist/components/LegacyDataTable/utils/index.js.map +1 -1
- package/dist/components/Pagination/styled.d.ts +6 -1
- package/dist/components/VideoModal/styled.d.ts +6 -1
- package/dist/index.cjs +10 -10
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/components/Grid/index.cjs +0 -20
- package/dist/components/Grid/index.cjs.map +0 -1
- package/dist/components/Grid/index.js +0 -14
- package/dist/components/Grid/index.js.map +0 -1
- package/dist/components/LegacyDataTable/SpecificState/styled.cjs +0 -21
- package/dist/components/LegacyDataTable/SpecificState/styled.cjs.map +0 -1
- package/dist/components/LegacyDataTable/SpecificState/styled.d.ts +0 -17
- package/dist/components/LegacyDataTable/SpecificState/styled.js +0 -12
- package/dist/components/LegacyDataTable/SpecificState/styled.js.map +0 -1
- package/dist/components/LegacyDataTable/cells/styled.cjs +0 -14
- package/dist/components/LegacyDataTable/cells/styled.cjs.map +0 -1
- package/dist/components/LegacyDataTable/cells/styled.d.ts +0 -1
- package/dist/components/LegacyDataTable/cells/styled.js +0 -8
- package/dist/components/LegacyDataTable/cells/styled.js.map +0 -1
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { buildClassnames } from '../../../utils/buildClassnames.js';
|
|
3
|
+
import 'uid/secure';
|
|
4
|
+
import { assignCssVars } from '../../../utils/assignCssVars.js';
|
|
2
5
|
import { theme } from '../../../theme/index.js';
|
|
3
6
|
import { alignmentToFlex } from '../utils/alignmentToFlex.js';
|
|
4
7
|
import '../types.js';
|
|
5
|
-
import 'react';
|
|
6
8
|
import '../../../theme/modules/sizes.js';
|
|
7
|
-
import {
|
|
9
|
+
import { defaultCellSpacing } from '../constants.js';
|
|
10
|
+
import styles from './DataTable.module.scss.js';
|
|
8
11
|
|
|
9
|
-
const Header =
|
|
12
|
+
const Header = React__default.forwardRef(({ align = 'left', spacing = defaultCellSpacing, span = 1, zIndex = 0, className, children, style, ...rest }, ref) => (React__default.createElement("th", { ref: ref, className: buildClassnames([styles.header, className]), style: {
|
|
13
|
+
...assignCssVars({
|
|
14
|
+
cellAlign: alignmentToFlex(align),
|
|
15
|
+
cellSpacing: theme.sizes[spacing],
|
|
16
|
+
cellSpan: span,
|
|
17
|
+
'header-z-index': zIndex,
|
|
18
|
+
}),
|
|
19
|
+
...style,
|
|
20
|
+
}, ...rest }, children)));
|
|
21
|
+
Header.displayName = 'Header';
|
|
10
22
|
|
|
11
23
|
export { Header };
|
|
12
24
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../../../src/components/DataTable/components/Header.
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../../src/components/DataTable/components/Header.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames, assignCssVars } from '../../../utils';\nimport { theme } from '../../../theme';\nimport { HeaderProps } from '../types';\nimport { alignmentToFlex } from '../utils';\nimport { defaultCellSpacing } from '../constants';\nimport styles from './DataTable.module.scss';\n\nexport const Header = React.forwardRef<HTMLTableCellElement, HeaderProps>(\n ({ align = 'left', spacing = defaultCellSpacing, span = 1, zIndex = 0, className, children, style, ...rest }, ref) => (\n <th\n ref={ref}\n className={buildClassnames([styles.header, className])}\n style={{\n ...assignCssVars({\n cellAlign: alignmentToFlex(align),\n cellSpacing: theme.sizes[spacing],\n cellSpan: span,\n 'header-z-index': zIndex,\n }),\n ...style,\n }}\n {...rest}\n >\n {children}\n </th>\n ),\n);\n\nHeader.displayName = 'Header';\n"],"names":["React"],"mappings":";;;;;;;;;;;AAQO,MAAM,MAAM,GAAGA,cAAK,CAAC,UAAU,CACpC,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,OAAO,GAAG,kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,MAC/GA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,EACtD,KAAK,EAAE;AACL,QAAA,GAAG,aAAa,CAAC;AACf,YAAA,SAAS,EAAE,eAAe,CAAC,KAAK,CAAC;AACjC,YAAA,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;AACjC,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,gBAAgB,EAAE,MAAM;SACzB,CAAC;AACF,QAAA,GAAG,KAAK;AACT,KAAA,EAAA,GACG,IAAI,EAAA,EAEP,QAAQ,CACN,CACN;AAGH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var buildClassnames = require('../../../utils/buildClassnames.cjs');
|
|
5
|
+
require('uid/secure');
|
|
6
|
+
var DataTable_module = require('./DataTable.module.scss.cjs');
|
|
5
7
|
|
|
6
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
7
9
|
|
|
8
|
-
var
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const shimmerDark = index.theme.colors.neutral.grey.dark;
|
|
13
|
-
const LoadingCellContent = styled__default.default.div.withConfig({ displayName: "vui--LoadingCellContent", componentId: "vui--1mf4ayh" }) `height:20px;width:75%;border-radius:${index.theme.radius.base};background:${shimmerLight};background-image:linear-gradient(\n to right,\n ${shimmerLight} 0%,\n ${shimmerDark} 20%,\n ${shimmerLight} 40%,\n ${shimmerLight} 100%\n );background-repeat:no-repeat;background-size:800px 104px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:placeholderShimmer;animation-timing-function:linear;@keyframes placeholderShimmer{0%{background-position:-468px 0;}100%{background-position:468px 0;}}`;
|
|
12
|
+
const LoadingCellContent = React__default.default.forwardRef(({ className, ...rest }, ref) => (React__default.default.createElement("div", { ref: ref, className: buildClassnames.buildClassnames([DataTable_module.loadingCellContent, className]), ...rest })));
|
|
13
|
+
LoadingCellContent.displayName = 'LoadingCellContent';
|
|
14
14
|
|
|
15
15
|
exports.LoadingCellContent = LoadingCellContent;
|
|
16
16
|
//# sourceMappingURL=LoadingCellContent.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingCellContent.cjs","sources":["../../../../src/components/DataTable/components/LoadingCellContent.
|
|
1
|
+
{"version":3,"file":"LoadingCellContent.cjs","sources":["../../../../src/components/DataTable/components/LoadingCellContent.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames } from '../../../utils';\nimport styles from './DataTable.module.scss';\n\nexport interface LoadingCellContentProps extends React.HTMLAttributes<HTMLDivElement> {\n className?: string;\n}\n\nexport const LoadingCellContent = React.forwardRef<HTMLDivElement, LoadingCellContentProps>(\n ({ className, ...rest }, ref) => (\n <div ref={ref} className={buildClassnames([styles.loadingCellContent, className])} {...rest} />\n ),\n);\n\nLoadingCellContent.displayName = 'LoadingCellContent';\n"],"names":["React","buildClassnames","styles"],"mappings":";;;;;;;;;;;AAQO,MAAM,kBAAkB,GAAGA,sBAAK,CAAC,UAAU,CAChD,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,MAC1BA,8CAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAEC,+BAAe,CAAC,CAACC,gBAAM,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC,EAAA,GAAM,IAAI,EAAA,CAAI,CAChG;AAGH,kBAAkB,CAAC,WAAW,GAAG,oBAAoB;;;;"}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LoadingCellContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const LoadingCellContent: React.ForwardRefExoticComponent<LoadingCellContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { buildClassnames } from '../../../utils/buildClassnames.js';
|
|
3
|
+
import 'uid/secure';
|
|
4
|
+
import styles from './DataTable.module.scss.js';
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const shimmerDark = theme.colors.neutral.grey.dark;
|
|
7
|
-
const LoadingCellContent = styled.div.withConfig({ displayName: "vui--LoadingCellContent", componentId: "vui--1mf4ayh" }) `height:20px;width:75%;border-radius:${theme.radius.base};background:${shimmerLight};background-image:linear-gradient(\n to right,\n ${shimmerLight} 0%,\n ${shimmerDark} 20%,\n ${shimmerLight} 40%,\n ${shimmerLight} 100%\n );background-repeat:no-repeat;background-size:800px 104px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:placeholderShimmer;animation-timing-function:linear;@keyframes placeholderShimmer{0%{background-position:-468px 0;}100%{background-position:468px 0;}}`;
|
|
6
|
+
const LoadingCellContent = React__default.forwardRef(({ className, ...rest }, ref) => (React__default.createElement("div", { ref: ref, className: buildClassnames([styles.loadingCellContent, className]), ...rest })));
|
|
7
|
+
LoadingCellContent.displayName = 'LoadingCellContent';
|
|
8
8
|
|
|
9
9
|
export { LoadingCellContent };
|
|
10
10
|
//# sourceMappingURL=LoadingCellContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingCellContent.js","sources":["../../../../src/components/DataTable/components/LoadingCellContent.
|
|
1
|
+
{"version":3,"file":"LoadingCellContent.js","sources":["../../../../src/components/DataTable/components/LoadingCellContent.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames } from '../../../utils';\nimport styles from './DataTable.module.scss';\n\nexport interface LoadingCellContentProps extends React.HTMLAttributes<HTMLDivElement> {\n className?: string;\n}\n\nexport const LoadingCellContent = React.forwardRef<HTMLDivElement, LoadingCellContentProps>(\n ({ className, ...rest }, ref) => (\n <div ref={ref} className={buildClassnames([styles.loadingCellContent, className])} {...rest} />\n ),\n);\n\nLoadingCellContent.displayName = 'LoadingCellContent';\n"],"names":["React"],"mappings":";;;;;AAQO,MAAM,kBAAkB,GAAGA,cAAK,CAAC,UAAU,CAChD,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,MAC1BA,sCAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC,EAAA,GAAM,IAAI,EAAA,CAAI,CAChG;AAGH,kBAAkB,CAAC,WAAW,GAAG,oBAAoB;;;;"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var buildClassnames = require('../../../utils/buildClassnames.cjs');
|
|
5
|
+
require('uid/secure');
|
|
6
|
+
var DataTable_module = require('./DataTable.module.scss.cjs');
|
|
4
7
|
|
|
5
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
6
9
|
|
|
7
|
-
var
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
8
11
|
|
|
9
|
-
const NoWrap =
|
|
12
|
+
const NoWrap = React__default.default.forwardRef(({ className, children, ...rest }, ref) => (React__default.default.createElement("div", { ref: ref, className: buildClassnames.buildClassnames([DataTable_module.noWrap, className]), ...rest }, children)));
|
|
13
|
+
NoWrap.displayName = 'NoWrap';
|
|
10
14
|
|
|
11
15
|
exports.NoWrap = NoWrap;
|
|
12
16
|
//# sourceMappingURL=NoWrap.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoWrap.cjs","sources":["../../../../src/components/DataTable/components/NoWrap.
|
|
1
|
+
{"version":3,"file":"NoWrap.cjs","sources":["../../../../src/components/DataTable/components/NoWrap.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames } from '../../../utils';\nimport styles from './DataTable.module.scss';\n\nexport interface NoWrapProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nexport const NoWrap = React.forwardRef<HTMLDivElement, NoWrapProps>(\n ({ className, children, ...rest }, ref) => (\n <div ref={ref} className={buildClassnames([styles.noWrap, className])} {...rest}>\n {children}\n </div>\n ),\n);\n\nNoWrap.displayName = 'NoWrap';\n"],"names":["React","buildClassnames","styles"],"mappings":";;;;;;;;;;;MASa,MAAM,GAAGA,sBAAK,CAAC,UAAU,CACpC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,MACpCA,8CAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAEC,+BAAe,CAAC,CAACC,gBAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,EAAA,GAAM,IAAI,IAC5E,QAAQ,CACL,CACP;AAGH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface NoWrapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const NoWrap: React.ForwardRefExoticComponent<NoWrapProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { buildClassnames } from '../../../utils/buildClassnames.js';
|
|
3
|
+
import 'uid/secure';
|
|
4
|
+
import styles from './DataTable.module.scss.js';
|
|
2
5
|
|
|
3
|
-
const NoWrap =
|
|
6
|
+
const NoWrap = React__default.forwardRef(({ className, children, ...rest }, ref) => (React__default.createElement("div", { ref: ref, className: buildClassnames([styles.noWrap, className]), ...rest }, children)));
|
|
7
|
+
NoWrap.displayName = 'NoWrap';
|
|
4
8
|
|
|
5
9
|
export { NoWrap };
|
|
6
10
|
//# sourceMappingURL=NoWrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoWrap.js","sources":["../../../../src/components/DataTable/components/NoWrap.
|
|
1
|
+
{"version":3,"file":"NoWrap.js","sources":["../../../../src/components/DataTable/components/NoWrap.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames } from '../../../utils';\nimport styles from './DataTable.module.scss';\n\nexport interface NoWrapProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nexport const NoWrap = React.forwardRef<HTMLDivElement, NoWrapProps>(\n ({ className, children, ...rest }, ref) => (\n <div ref={ref} className={buildClassnames([styles.noWrap, className])} {...rest}>\n {children}\n </div>\n ),\n);\n\nNoWrap.displayName = 'NoWrap';\n"],"names":["React"],"mappings":";;;;;MASa,MAAM,GAAGA,cAAK,CAAC,UAAU,CACpC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,MACpCA,sCAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,EAAA,GAAM,IAAI,IAC5E,QAAQ,CACL,CACP;AAGH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var buildClassnames = require('../../../utils/buildClassnames.cjs');
|
|
5
|
+
require('uid/secure');
|
|
6
|
+
var assignCssVars = require('../../../utils/assignCssVars.cjs');
|
|
7
|
+
var DataTable_module = require('./DataTable.module.scss.cjs');
|
|
5
8
|
|
|
6
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
7
10
|
|
|
8
|
-
var
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
9
12
|
|
|
10
|
-
const Row =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
left: 0;
|
|
26
|
-
bottom: 0;
|
|
27
|
-
width: 4px;
|
|
28
|
-
background-color: ${accentColor};
|
|
29
|
-
}
|
|
30
|
-
`}`;
|
|
13
|
+
const Row = React__default.default.forwardRef(
|
|
14
|
+
// expanded and disabled are destructured to prevent them leaking to the DOM via ...rest.
|
|
15
|
+
// They are used by parent components for state tracking.
|
|
16
|
+
({ accentColor, selected, expanded: _expanded, disabled: _disabled, className, children, style, ...rest }, ref) => (React__default.default.createElement("tr", { ref: ref, className: buildClassnames.buildClassnames([
|
|
17
|
+
DataTable_module.row,
|
|
18
|
+
selected && DataTable_module.rowSelected,
|
|
19
|
+
accentColor && DataTable_module.rowAccentColor,
|
|
20
|
+
className,
|
|
21
|
+
]), style: {
|
|
22
|
+
...assignCssVars.assignCssVars({
|
|
23
|
+
rowAccentColor: accentColor,
|
|
24
|
+
}),
|
|
25
|
+
...style,
|
|
26
|
+
}, ...rest }, children)));
|
|
27
|
+
Row.displayName = 'Row';
|
|
31
28
|
|
|
32
29
|
exports.Row = Row;
|
|
33
30
|
//# sourceMappingURL=Row.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Row.cjs","sources":["../../../../src/components/DataTable/components/Row.
|
|
1
|
+
{"version":3,"file":"Row.cjs","sources":["../../../../src/components/DataTable/components/Row.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames, assignCssVars } from '../../../utils';\nimport styles from './DataTable.module.scss';\n\nexport interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {\n accentColor?: string;\n selected?: boolean;\n expanded?: boolean;\n disabled?: boolean;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport const Row = React.forwardRef<HTMLTableRowElement, RowProps>(\n // expanded and disabled are destructured to prevent them leaking to the DOM via ...rest.\n // They are used by parent components for state tracking.\n ({ accentColor, selected, expanded: _expanded, disabled: _disabled, className, children, style, ...rest }, ref) => (\n <tr\n ref={ref}\n className={buildClassnames([\n styles.row,\n selected && styles.rowSelected,\n accentColor && styles.rowAccentColor,\n className,\n ])}\n style={{\n ...assignCssVars({\n rowAccentColor: accentColor,\n }),\n ...style,\n }}\n {...rest}\n >\n {children}\n </tr>\n ),\n);\n\nRow.displayName = 'Row';\n"],"names":["React","buildClassnames","styles","assignCssVars"],"mappings":";;;;;;;;;;;;AAaO,MAAM,GAAG,GAAGA,sBAAK,CAAC,UAAU;AACjC;AACA;AACA,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,MAC5GA,sBAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAEC,+BAAe,CAAC;AACzB,QAAAC,gBAAM,CAAC,GAAG;QACV,QAAQ,IAAIA,gBAAM,CAAC,WAAW;QAC9B,WAAW,IAAIA,gBAAM,CAAC,cAAc;QACpC,SAAS;KACV,CAAC,EACF,KAAK,EAAE;AACL,QAAA,GAAGC,2BAAa,CAAC;AACf,YAAA,cAAc,EAAE,WAAW;SAC5B,CAAC;AACF,QAAA,GAAG,KAAK;AACT,KAAA,EAAA,GACG,IAAI,EAAA,EAEP,QAAQ,CACN,CACN;AAGH,GAAG,CAAC,WAAW,GAAG,KAAK;;;;"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
2
3
|
accentColor?: string;
|
|
3
4
|
selected?: boolean;
|
|
4
5
|
expanded?: boolean;
|
|
5
6
|
disabled?: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
6
9
|
}
|
|
7
|
-
export declare const Row:
|
|
10
|
+
export declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttributes<HTMLTableRowElement>>;
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { buildClassnames } from '../../../utils/buildClassnames.js';
|
|
3
|
+
import 'uid/secure';
|
|
4
|
+
import { assignCssVars } from '../../../utils/assignCssVars.js';
|
|
5
|
+
import styles from './DataTable.module.scss.js';
|
|
3
6
|
|
|
4
|
-
const Row =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
left: 0;
|
|
20
|
-
bottom: 0;
|
|
21
|
-
width: 4px;
|
|
22
|
-
background-color: ${accentColor};
|
|
23
|
-
}
|
|
24
|
-
`}`;
|
|
7
|
+
const Row = React__default.forwardRef(
|
|
8
|
+
// expanded and disabled are destructured to prevent them leaking to the DOM via ...rest.
|
|
9
|
+
// They are used by parent components for state tracking.
|
|
10
|
+
({ accentColor, selected, expanded: _expanded, disabled: _disabled, className, children, style, ...rest }, ref) => (React__default.createElement("tr", { ref: ref, className: buildClassnames([
|
|
11
|
+
styles.row,
|
|
12
|
+
selected && styles.rowSelected,
|
|
13
|
+
accentColor && styles.rowAccentColor,
|
|
14
|
+
className,
|
|
15
|
+
]), style: {
|
|
16
|
+
...assignCssVars({
|
|
17
|
+
rowAccentColor: accentColor,
|
|
18
|
+
}),
|
|
19
|
+
...style,
|
|
20
|
+
}, ...rest }, children)));
|
|
21
|
+
Row.displayName = 'Row';
|
|
25
22
|
|
|
26
23
|
export { Row };
|
|
27
24
|
//# sourceMappingURL=Row.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Row.js","sources":["../../../../src/components/DataTable/components/Row.
|
|
1
|
+
{"version":3,"file":"Row.js","sources":["../../../../src/components/DataTable/components/Row.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames, assignCssVars } from '../../../utils';\nimport styles from './DataTable.module.scss';\n\nexport interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {\n accentColor?: string;\n selected?: boolean;\n expanded?: boolean;\n disabled?: boolean;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport const Row = React.forwardRef<HTMLTableRowElement, RowProps>(\n // expanded and disabled are destructured to prevent them leaking to the DOM via ...rest.\n // They are used by parent components for state tracking.\n ({ accentColor, selected, expanded: _expanded, disabled: _disabled, className, children, style, ...rest }, ref) => (\n <tr\n ref={ref}\n className={buildClassnames([\n styles.row,\n selected && styles.rowSelected,\n accentColor && styles.rowAccentColor,\n className,\n ])}\n style={{\n ...assignCssVars({\n rowAccentColor: accentColor,\n }),\n ...style,\n }}\n {...rest}\n >\n {children}\n </tr>\n ),\n);\n\nRow.displayName = 'Row';\n"],"names":["React"],"mappings":";;;;;;AAaO,MAAM,GAAG,GAAGA,cAAK,CAAC,UAAU;AACjC;AACA;AACA,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,MAC5GA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,eAAe,CAAC;AACzB,QAAA,MAAM,CAAC,GAAG;QACV,QAAQ,IAAI,MAAM,CAAC,WAAW;QAC9B,WAAW,IAAI,MAAM,CAAC,cAAc;QACpC,SAAS;KACV,CAAC,EACF,KAAK,EAAE;AACL,QAAA,GAAG,aAAa,CAAC;AACf,YAAA,cAAc,EAAE,WAAW;SAC5B,CAAC;AACF,QAAA,GAAG,KAAK;AACT,KAAA,EAAA,GACG,IAAI,EAAA,EAEP,QAAQ,CACN,CACN;AAGH,GAAG,CAAC,WAAW,GAAG,KAAK;;;;"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var buildClassnames = require('../../../utils/buildClassnames.cjs');
|
|
5
|
+
require('uid/secure');
|
|
6
|
+
var DataTable_module = require('./DataTable.module.scss.cjs');
|
|
4
7
|
|
|
5
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
6
9
|
|
|
7
|
-
var
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
8
11
|
|
|
9
|
-
const ScrollContainer =
|
|
12
|
+
const ScrollContainer = React__default.default.forwardRef(({ className, children, ...rest }, ref) => (React__default.default.createElement("div", { ref: ref, className: buildClassnames.buildClassnames([DataTable_module.scrollContainer, className]), ...rest }, children)));
|
|
13
|
+
ScrollContainer.displayName = 'ScrollContainer';
|
|
10
14
|
|
|
11
15
|
exports.ScrollContainer = ScrollContainer;
|
|
12
16
|
//# sourceMappingURL=ScrollContainer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollContainer.cjs","sources":["../../../../src/components/DataTable/components/ScrollContainer.
|
|
1
|
+
{"version":3,"file":"ScrollContainer.cjs","sources":["../../../../src/components/DataTable/components/ScrollContainer.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames } from '../../../utils';\nimport styles from './DataTable.module.scss';\n\nexport interface ScrollContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nexport const ScrollContainer = React.forwardRef<HTMLDivElement, ScrollContainerProps>(\n ({ className, children, ...rest }, ref) => (\n <div ref={ref} className={buildClassnames([styles.scrollContainer, className])} {...rest}>\n {children}\n </div>\n ),\n);\n\nScrollContainer.displayName = 'ScrollContainer';\n"],"names":["React","buildClassnames","styles"],"mappings":";;;;;;;;;;;MASa,eAAe,GAAGA,sBAAK,CAAC,UAAU,CAC7C,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,MACpCA,8CAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAEC,+BAAe,CAAC,CAACC,gBAAM,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,EAAA,GAAM,IAAI,IACrF,QAAQ,CACL,CACP;AAGH,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ScrollContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const ScrollContainer: React.ForwardRefExoticComponent<ScrollContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { buildClassnames } from '../../../utils/buildClassnames.js';
|
|
3
|
+
import 'uid/secure';
|
|
4
|
+
import styles from './DataTable.module.scss.js';
|
|
2
5
|
|
|
3
|
-
const ScrollContainer =
|
|
6
|
+
const ScrollContainer = React__default.forwardRef(({ className, children, ...rest }, ref) => (React__default.createElement("div", { ref: ref, className: buildClassnames([styles.scrollContainer, className]), ...rest }, children)));
|
|
7
|
+
ScrollContainer.displayName = 'ScrollContainer';
|
|
4
8
|
|
|
5
9
|
export { ScrollContainer };
|
|
6
10
|
//# sourceMappingURL=ScrollContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollContainer.js","sources":["../../../../src/components/DataTable/components/ScrollContainer.
|
|
1
|
+
{"version":3,"file":"ScrollContainer.js","sources":["../../../../src/components/DataTable/components/ScrollContainer.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames } from '../../../utils';\nimport styles from './DataTable.module.scss';\n\nexport interface ScrollContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n className?: string;\n}\n\nexport const ScrollContainer = React.forwardRef<HTMLDivElement, ScrollContainerProps>(\n ({ className, children, ...rest }, ref) => (\n <div ref={ref} className={buildClassnames([styles.scrollContainer, className])} {...rest}>\n {children}\n </div>\n ),\n);\n\nScrollContainer.displayName = 'ScrollContainer';\n"],"names":["React"],"mappings":";;;;;MASa,eAAe,GAAGA,cAAK,CAAC,UAAU,CAC7C,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,MACpCA,sCAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,EAAA,GAAM,IAAI,IACrF,QAAQ,CACL,CACP;AAGH,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -113,6 +113,8 @@ function StickyHead({ children, intersectionTargetRef, containerRef, cellWidths,
|
|
|
113
113
|
// Render sticky header
|
|
114
114
|
if (!isVisible)
|
|
115
115
|
return null;
|
|
116
|
+
// Generate rules to sync sticky columns with "real" columns
|
|
117
|
+
const columnRules = cellWidths.map((width, index) => `th:nth-child(${index + 1}) { width: ${width}px; }`);
|
|
116
118
|
const containerStyle = {
|
|
117
119
|
...containerRect,
|
|
118
120
|
height: constants.headerCellHeight,
|
|
@@ -125,18 +127,8 @@ function StickyHead({ children, intersectionTargetRef, containerRef, cellWidths,
|
|
|
125
127
|
boxShadow: shadows.Shadows.base,
|
|
126
128
|
top: `${stickyHeaderTop}px` || '0px',
|
|
127
129
|
};
|
|
128
|
-
// Generate styles to sync sticky columns with "real" columns
|
|
129
|
-
const columnsCss = cellWidths
|
|
130
|
-
.map((width, index) => `
|
|
131
|
-
& th:nth-child(${index + 1}) {
|
|
132
|
-
width: ${width}px;
|
|
133
|
-
}
|
|
134
|
-
`)
|
|
135
|
-
.join('');
|
|
136
|
-
// Append to generated table styles
|
|
137
|
-
const allCss = tableCss + columnsCss;
|
|
138
130
|
return (React__default.default.createElement("div", { style: containerStyle, ref: stickyContainerRef },
|
|
139
|
-
React__default.default.createElement(TableGrid.TableGrid, {
|
|
131
|
+
React__default.default.createElement(TableGrid.TableGrid, { tableCss: tableCss, extraRules: columnRules },
|
|
140
132
|
React__default.default.createElement("thead", null, children))));
|
|
141
133
|
}
|
|
142
134
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickyHead.cjs","sources":["../../../../src/components/DataTable/components/StickyHead.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { CSSProperties, ReactNode, RefObject, useEffect, useRef, useState } from 'react';\nimport throttle from 'lodash.throttle';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { theme } from '../../../theme';\n\nimport { headerCellHeight } from '../constants';\nimport { TableGrid } from './TableGrid';\nimport { Shadows } from '../../../theme/modules/shadows';\n\nexport interface StickyHeadProps {\n tableCss:
|
|
1
|
+
{"version":3,"file":"StickyHead.cjs","sources":["../../../../src/components/DataTable/components/StickyHead.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { CSSProperties, ReactNode, RefObject, useEffect, useRef, useState } from 'react';\nimport throttle from 'lodash.throttle';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { theme } from '../../../theme';\n\nimport { headerCellHeight } from '../constants';\nimport { TableGrid } from './TableGrid';\nimport { TableCssOutput } from '../utils/generateTableCss';\nimport { Shadows } from '../../../theme/modules/shadows';\n\nexport interface StickyHeadProps {\n tableCss: TableCssOutput;\n children?: ReactNode;\n intersectionTargetRef: RefObject<HTMLElement>;\n containerRef: RefObject<HTMLElement>;\n cellWidths: number[];\n stickyHeaderTop?: number;\n}\n\nexport function StickyHead({\n children,\n intersectionTargetRef,\n containerRef,\n cellWidths,\n tableCss,\n stickyHeaderTop = 0,\n}: StickyHeadProps) {\n const stickyContainerRef = useRef<HTMLDivElement>(null);\n const [isVisible, setIsVisible] = useState(false);\n const [containerRect, setContainerRect] = useState({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n });\n\n const lastLeftValue = useRef<null | number>(null);\n const THROTTE_TIME_MS = 30;\n\n const updateContainerDimensions = () => {\n const targetRect = containerRef.current?.getBoundingClientRect();\n const newRect = {\n left: targetRect?.left || 0,\n width: targetRect?.width || 0,\n top: 0,\n height: 48,\n };\n setContainerRect(newRect);\n };\n\n const updateContainerScrollPosition = () => {\n if (!containerRef.current) return;\n const xScrollOffset = containerRef.current.scrollLeft;\n stickyContainerRef.current?.scrollTo(xScrollOffset, 0);\n };\n\n // Configure intersection observer to toggle sticky header on/off\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const options = {\n rootMargin: `-${stickyHeaderTop}px 100% 0px 100%`,\n threshold: 1.0,\n };\n const intersectionCallback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsVisible(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(intersectionCallback, options);\n intersectionObserver.observe(intersectionTargetRef.current);\n return () => intersectionObserver.disconnect(); // eslint-disable-line consistent-return\n }, [intersectionTargetRef.current]);\n\n // Calculate sticky header position and size to match table container\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n updateContainerDimensions();\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when container element is resized\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const resizeObserverCallback = throttle(updateContainerDimensions, THROTTE_TIME_MS); // Throttle events\n const resizeObserver = new ResizeObserver(resizeObserverCallback);\n resizeObserver.observe(containerRef.current);\n return () => resizeObserver.disconnect(); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when document scrolls\n // will only call updateContainerDimensions on horizontal scroll\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const scrollCallback = throttle(() => {\n const { left } = containerRef.current?.getBoundingClientRect() || {};\n if (left && lastLeftValue.current !== left) {\n updateContainerDimensions();\n lastLeftValue.current = left;\n }\n }, THROTTE_TIME_MS); // Throttle events\n document.addEventListener('scroll', scrollCallback);\n return () => document.removeEventListener('scroll', scrollCallback); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Sync container scrolling\n\n useEffect(() => {\n updateContainerScrollPosition();\n }, [isVisible]);\n\n useEffect(() => {\n containerRef.current?.addEventListener('scroll', updateContainerScrollPosition);\n return () => {\n containerRef.current?.removeEventListener('scroll', updateContainerScrollPosition);\n };\n }, [containerRef.current]);\n\n // Render sticky header\n\n if (!isVisible) return null;\n\n // Generate rules to sync sticky columns with \"real\" columns\n const columnRules = cellWidths.map(\n (width, index) => `th:nth-child(${index + 1}) { width: ${width}px; }`,\n );\n\n const containerStyle: CSSProperties = {\n ...containerRect,\n height: headerCellHeight,\n position: 'fixed',\n zIndex: 5,\n overflowX: 'hidden',\n overflowY: 'hidden',\n borderBottom: `1px solid ${theme.colors.neutral.grey.base}`,\n borderTop: `1px solid ${theme.colors.neutral.grey.base}`,\n boxShadow: Shadows.base,\n top: `${stickyHeaderTop}px` || '0px',\n };\n\n return (\n <div style={containerStyle} ref={stickyContainerRef}>\n <TableGrid tableCss={tableCss} extraRules={columnRules}>\n <thead>{children}</thead>\n </TableGrid>\n </div>\n );\n}\n"],"names":["useRef","useState","useEffect","throttle","ResizeObserver","headerCellHeight","theme","Shadows","React","TableGrid"],"mappings":";;;;;;;;;;;;;;;;AAAA;SAoBgB,UAAU,CAAC,EACzB,QAAQ,EACR,qBAAqB,EACrB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,eAAe,GAAG,CAAC,GACH,EAAA;AAChB,IAAA,MAAM,kBAAkB,GAAGA,YAAM,CAAiB,IAAI,CAAC;IACvD,MAAM,CAAC,SAAS,EAAE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IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,IAAI;;IAG3B,MAAM,WAAW,GAAG,UAAU,CAAC,GAAG,CAChC,CAAC,KAAK,EAAE,KAAK,KAAK,gBAAgB,KAAK,GAAG,CAAC,CAAA,WAAA,EAAc,KAAK,CAAA,KAAA,CAAO,CACtE;AAED,IAAA,MAAM,cAAc,GAAkB;AACpC,QAAA,GAAG,aAAa;AAChB,QAAA,MAAM,EAAEG,0BAAgB;AACxB,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,MAAM,EAAE,CAAC;AACT,QAAA,SAAS,EAAE,QAAQ;AACnB,QAAA,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,CAAA,UAAA,EAAaC,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,CAAE;QAC3D,SAAS,EAAE,CAAA,UAAA,EAAaA,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,CAAE;QACxD,SAAS,EAAEC,eAAO,CAAC,IAAI;AACvB,QAAA,GAAG,EAAE,CAAA,EAAG,eAAe,CAAA,EAAA,CAAI,IAAI,KAAK;KACrC;IAED,QACEC,8CAAK,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,kBAAkB,EAAA;QACjDA,sBAAA,CAAA,aAAA,CAACC,mBAAS,IAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAA;AACpD,YAAAD,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,EAAQ,QAAQ,CAAS,CACf,CACR;AAEV;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { TableCssOutput } from '../utils/generateTableCss';
|
|
2
3
|
export interface StickyHeadProps {
|
|
3
|
-
tableCss:
|
|
4
|
+
tableCss: TableCssOutput;
|
|
4
5
|
children?: ReactNode;
|
|
5
6
|
intersectionTargetRef: RefObject<HTMLElement>;
|
|
6
7
|
containerRef: RefObject<HTMLElement>;
|
|
@@ -105,6 +105,8 @@ function StickyHead({ children, intersectionTargetRef, containerRef, cellWidths,
|
|
|
105
105
|
// Render sticky header
|
|
106
106
|
if (!isVisible)
|
|
107
107
|
return null;
|
|
108
|
+
// Generate rules to sync sticky columns with "real" columns
|
|
109
|
+
const columnRules = cellWidths.map((width, index) => `th:nth-child(${index + 1}) { width: ${width}px; }`);
|
|
108
110
|
const containerStyle = {
|
|
109
111
|
...containerRect,
|
|
110
112
|
height: headerCellHeight,
|
|
@@ -117,18 +119,8 @@ function StickyHead({ children, intersectionTargetRef, containerRef, cellWidths,
|
|
|
117
119
|
boxShadow: Shadows.base,
|
|
118
120
|
top: `${stickyHeaderTop}px` || '0px',
|
|
119
121
|
};
|
|
120
|
-
// Generate styles to sync sticky columns with "real" columns
|
|
121
|
-
const columnsCss = cellWidths
|
|
122
|
-
.map((width, index) => `
|
|
123
|
-
& th:nth-child(${index + 1}) {
|
|
124
|
-
width: ${width}px;
|
|
125
|
-
}
|
|
126
|
-
`)
|
|
127
|
-
.join('');
|
|
128
|
-
// Append to generated table styles
|
|
129
|
-
const allCss = tableCss + columnsCss;
|
|
130
122
|
return (React__default.createElement("div", { style: containerStyle, ref: stickyContainerRef },
|
|
131
|
-
React__default.createElement(TableGrid, {
|
|
123
|
+
React__default.createElement(TableGrid, { tableCss: tableCss, extraRules: columnRules },
|
|
132
124
|
React__default.createElement("thead", null, children))));
|
|
133
125
|
}
|
|
134
126
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickyHead.js","sources":["../../../../src/components/DataTable/components/StickyHead.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { CSSProperties, ReactNode, RefObject, useEffect, useRef, useState } from 'react';\nimport throttle from 'lodash.throttle';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { theme } from '../../../theme';\n\nimport { headerCellHeight } from '../constants';\nimport { TableGrid } from './TableGrid';\nimport { Shadows } from '../../../theme/modules/shadows';\n\nexport interface StickyHeadProps {\n tableCss:
|
|
1
|
+
{"version":3,"file":"StickyHead.js","sources":["../../../../src/components/DataTable/components/StickyHead.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { CSSProperties, ReactNode, RefObject, useEffect, useRef, useState } from 'react';\nimport throttle from 'lodash.throttle';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { theme } from '../../../theme';\n\nimport { headerCellHeight } from '../constants';\nimport { TableGrid } from './TableGrid';\nimport { TableCssOutput } from '../utils/generateTableCss';\nimport { Shadows } from '../../../theme/modules/shadows';\n\nexport interface StickyHeadProps {\n tableCss: TableCssOutput;\n children?: ReactNode;\n intersectionTargetRef: RefObject<HTMLElement>;\n containerRef: RefObject<HTMLElement>;\n cellWidths: number[];\n stickyHeaderTop?: number;\n}\n\nexport function StickyHead({\n children,\n intersectionTargetRef,\n containerRef,\n cellWidths,\n tableCss,\n stickyHeaderTop = 0,\n}: StickyHeadProps) {\n const stickyContainerRef = useRef<HTMLDivElement>(null);\n const [isVisible, setIsVisible] = useState(false);\n const [containerRect, setContainerRect] = useState({\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n });\n\n const lastLeftValue = useRef<null | number>(null);\n const THROTTE_TIME_MS = 30;\n\n const updateContainerDimensions = () => {\n const targetRect = containerRef.current?.getBoundingClientRect();\n const newRect = {\n left: targetRect?.left || 0,\n width: targetRect?.width || 0,\n top: 0,\n height: 48,\n };\n setContainerRect(newRect);\n };\n\n const updateContainerScrollPosition = () => {\n if (!containerRef.current) return;\n const xScrollOffset = containerRef.current.scrollLeft;\n stickyContainerRef.current?.scrollTo(xScrollOffset, 0);\n };\n\n // Configure intersection observer to toggle sticky header on/off\n\n useEffect(() => {\n if (!intersectionTargetRef.current) return;\n const options = {\n rootMargin: `-${stickyHeaderTop}px 100% 0px 100%`,\n threshold: 1.0,\n };\n const intersectionCallback: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n setIsVisible(!entry.isIntersecting);\n });\n };\n const intersectionObserver = new IntersectionObserver(intersectionCallback, options);\n intersectionObserver.observe(intersectionTargetRef.current);\n return () => intersectionObserver.disconnect(); // eslint-disable-line consistent-return\n }, [intersectionTargetRef.current]);\n\n // Calculate sticky header position and size to match table container\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n updateContainerDimensions();\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when container element is resized\n\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const resizeObserverCallback = throttle(updateContainerDimensions, THROTTE_TIME_MS); // Throttle events\n const resizeObserver = new ResizeObserver(resizeObserverCallback);\n resizeObserver.observe(containerRef.current);\n return () => resizeObserver.disconnect(); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Update dimensions when document scrolls\n // will only call updateContainerDimensions on horizontal scroll\n useEffect(() => {\n if (!isVisible) return;\n if (!containerRef.current) return;\n const scrollCallback = throttle(() => {\n const { left } = containerRef.current?.getBoundingClientRect() || {};\n if (left && lastLeftValue.current !== left) {\n updateContainerDimensions();\n lastLeftValue.current = left;\n }\n }, THROTTE_TIME_MS); // Throttle events\n document.addEventListener('scroll', scrollCallback);\n return () => document.removeEventListener('scroll', scrollCallback); // eslint-disable-line consistent-return\n }, [containerRef.current, isVisible]);\n\n // Sync container scrolling\n\n useEffect(() => {\n updateContainerScrollPosition();\n }, [isVisible]);\n\n useEffect(() => {\n containerRef.current?.addEventListener('scroll', updateContainerScrollPosition);\n return () => {\n containerRef.current?.removeEventListener('scroll', updateContainerScrollPosition);\n };\n }, [containerRef.current]);\n\n // Render sticky header\n\n if (!isVisible) return null;\n\n // Generate rules to sync sticky columns with \"real\" columns\n const columnRules = cellWidths.map(\n (width, index) => `th:nth-child(${index + 1}) { width: ${width}px; }`,\n );\n\n const containerStyle: CSSProperties = {\n ...containerRect,\n height: headerCellHeight,\n position: 'fixed',\n zIndex: 5,\n overflowX: 'hidden',\n overflowY: 'hidden',\n borderBottom: `1px solid ${theme.colors.neutral.grey.base}`,\n borderTop: `1px solid ${theme.colors.neutral.grey.base}`,\n boxShadow: Shadows.base,\n top: `${stickyHeaderTop}px` || '0px',\n };\n\n return (\n <div style={containerStyle} ref={stickyContainerRef}>\n <TableGrid tableCss={tableCss} extraRules={columnRules}>\n <thead>{children}</thead>\n </TableGrid>\n </div>\n );\n}\n"],"names":["React"],"mappings":";;;;;;;;AAAA;SAoBgB,UAAU,CAAC,EACzB,QAAQ,EACR,qBAAqB,EACrB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,eAAe,GAAG,CAAC,GACH,EAAA;AAChB,IAAA,MAAM,kBAAkB,GAAG,MAAM,CAAiB,IAAI,CAAC;IACvD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AACjD,IAAA,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC;AACjD,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,MAAM,EAAE,CAAC;AACV,KAAA,CAAC;AAEF,IAAA,MAAM,aAAa,GAAG,MAAM,CAAgB,IAAI,CAAC;IACjD,MAAM,eAAe,GAAG,EAAE;IAE1B,MAAM,yBAAyB,GAAG,MAAK;;QACrC,MAAM,UAAU,GAAG,CAAA,EAAA,GAAA,YAAY,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,qBAAqB,EAAE;AAChE,QAAA,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,CAAA,UAAU,KAAA,IAAA,IAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,KAAI,CAAC;YAC3B,KAAK,EAAE,CAAA,UAAU,KAAA,IAAA,IAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,KAAI,CAAC;AA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