@ultraviolet/ui 3.0.0-beta.26 → 3.0.0-beta.27
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/Avatar/constants.d.ts +5 -5
- package/dist/components/Avatar/constants.js +1 -1
- package/dist/components/Avatar/styles.css.d.ts +24 -24
- package/dist/components/BarChart/Tooltip.d.ts +3 -3
- package/dist/components/BarChart/Tooltip.js +2 -2
- package/dist/components/BarChart/index.d.ts +1 -1
- package/dist/components/BarChart/index.js +2 -2
- package/dist/components/Button/constants.d.ts +1 -0
- package/dist/components/Button/index.d.ts +0 -4
- package/dist/components/ExpandableCard/constants.d.ts +1 -0
- package/dist/components/ExpandableCard/index.d.ts +1 -1
- package/dist/components/ExpandableCard/styles.css.d.ts +1 -1
- package/dist/components/ExpandableCard/styles.css.js +2 -2
- package/dist/components/Key/constants.d.ts +8 -0
- package/dist/components/Key/constants.js +11 -0
- package/dist/components/Key/index.d.ts +0 -8
- package/dist/components/Key/index.js +1 -9
- package/dist/components/LineChart/helpers.js +2 -2
- package/dist/components/List/Row.js +1 -1
- package/dist/components/Loader/constants.d.ts +8 -0
- package/dist/components/Loader/constants.js +11 -0
- package/dist/components/Loader/index.d.ts +1 -8
- package/dist/components/Loader/index.js +5 -24
- package/dist/components/Loader/styles.css.d.ts +1 -0
- package/dist/components/Loader/styles.css.js +3 -1
- package/dist/components/Menu/MenuContent.js +7 -1
- package/dist/components/Menu/components/Item.d.ts +2 -2
- package/dist/components/Menu/components/Item.js +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Notification/Notification.d.ts +10 -0
- package/dist/components/Notification/{index.js → Notification.js} +2 -14
- package/dist/components/Notification/NotificationContainer.d.ts +30 -0
- package/dist/components/Notification/NotificationContainer.js +17 -0
- package/dist/components/Notification/index.d.ts +2 -37
- package/dist/components/PieChart/Legends.d.ts +2 -2
- package/dist/components/PieChart/Legends.js +2 -2
- package/dist/components/PieChart/Tooltip.d.ts +2 -2
- package/dist/components/PieChart/Tooltip.js +1 -1
- package/dist/components/PieChart/index.js +1 -1
- package/dist/components/Popup/styles.css.js +1 -0
- package/dist/components/Popup/variables.css.js +0 -1
- package/dist/components/ProgressBar/styles.css.js +0 -1
- package/dist/components/ProgressBar/variables.css.js +1 -0
- package/dist/components/SelectInput/components/SearchBarDropdown.d.ts +1 -3
- package/dist/components/SelectInput/components/SearchBarDropdown.js +7 -4
- package/dist/components/SelectableCard/styles.css.js +0 -1
- package/dist/components/SelectableCard/variables.css.js +1 -0
- package/dist/components/Stepper/index.js +1 -1
- package/dist/components/TagList/index.js +1 -1
- package/dist/components/Text/constants.d.ts +9 -0
- package/dist/components/Text/index.d.ts +1 -4
- package/dist/components/Text/style.css.js +1 -0
- package/dist/components/Text/variables.css.js +0 -1
- package/dist/components/Toaster/Toaster.d.ts +7 -0
- package/dist/components/Toaster/Toaster.js +25 -0
- package/dist/components/Toaster/ToasterContainer.d.ts +38 -0
- package/dist/components/Toaster/ToasterContainer.js +18 -0
- package/dist/components/Toaster/components/CloseButton.d.ts +8 -0
- package/dist/components/Toaster/components/CloseButton.js +12 -0
- package/dist/components/Toaster/components/Content.d.ts +6 -0
- package/dist/components/Toaster/components/Content.js +10 -0
- package/dist/components/Toaster/constants.d.ts +1 -0
- package/dist/components/Toaster/constants.js +4 -0
- package/dist/components/Toaster/index.d.ts +3 -45
- package/dist/components/TreeMapChart/Tooltip.d.ts +6 -0
- package/dist/components/TreeMapChart/Tooltip.js +15 -0
- package/dist/components/TreeMapChart/index.d.ts +18 -0
- package/dist/components/TreeMapChart/index.js +68 -0
- package/dist/components/TreeMapChart/styles.css.d.ts +2 -0
- package/dist/components/TreeMapChart/styles.css.js +7 -0
- package/dist/components/TreeMapChart/types.d.ts +7 -0
- package/dist/components/VerificationCode/constants.d.ts +1 -0
- package/dist/components/VerificationCode/index.d.ts +0 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/helpers/legend.d.ts +2 -2
- package/dist/helpers/legend.js +1 -1
- package/dist/helpers/nivoTheme.d.ts +1 -1
- package/dist/helpers/treeMap.d.ts +90 -0
- package/dist/helpers/treeMap.js +42 -0
- package/dist/hooks/useIsOverflowing.js +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +37 -9
- package/dist/ui.css +1 -1
- package/dist/utils/animations/animations.d.ts +27 -0
- package/dist/utils/animations/animations.js +271 -0
- package/dist/utils/animations/animationsVE.css.d.ts +27 -0
- package/dist/utils/animations/animationsVE.css.js +57 -0
- package/dist/utils/index.d.ts +2 -2
- package/package.json +5 -4
- package/dist/components/ActionBar/index.cjs +0 -22
- package/dist/components/ActionBar/styles.css.cjs +0 -11
- package/dist/components/Alert/index.cjs +0 -55
- package/dist/components/Alert/styles.css.cjs +0 -14
- package/dist/components/Avatar/constants.cjs +0 -19
- package/dist/components/Avatar/index.cjs +0 -66
- package/dist/components/Avatar/styles.css.cjs +0 -17
- package/dist/components/Avatar/variables.css.cjs +0 -8
- package/dist/components/Badge/constant.cjs +0 -8
- package/dist/components/Badge/index.cjs +0 -27
- package/dist/components/Badge/styles.css.cjs +0 -6
- package/dist/components/Banner/assets/default-image-small.svg.cjs +0 -3
- package/dist/components/Banner/assets/default-image.svg.cjs +0 -3
- package/dist/components/Banner/index.cjs +0 -74
- package/dist/components/Banner/styles.css.cjs +0 -10
- package/dist/components/BarChart/Tooltip.cjs +0 -22
- package/dist/components/BarChart/index.cjs +0 -60
- package/dist/components/BarChart/styles.css.cjs +0 -9
- package/dist/components/BarStack/index.cjs +0 -35
- package/dist/components/BarStack/styles.css.cjs +0 -11
- package/dist/components/Breadcrumbs/components/Item.cjs +0 -41
- package/dist/components/Breadcrumbs/components/styles.css.cjs +0 -18
- package/dist/components/Breadcrumbs/index.cjs +0 -14
- package/dist/components/Breadcrumbs/styles.css.cjs +0 -5
- package/dist/components/Bullet/index.cjs +0 -24
- package/dist/components/Bullet/styles.css.cjs +0 -6
- package/dist/components/Button/constants.cjs +0 -6
- package/dist/components/Button/index.cjs +0 -84
- package/dist/components/Button/styles.css.cjs +0 -6
- package/dist/components/Card/index.cjs +0 -28
- package/dist/components/Card/styles.css.cjs +0 -7
- package/dist/components/Carousel/index.cjs +0 -74
- package/dist/components/Carousel/styles.css.cjs +0 -15
- package/dist/components/Checkbox/index.cjs +0 -58
- package/dist/components/Checkbox/styles.css.cjs +0 -17
- package/dist/components/CheckboxGroup/index.cjs +0 -78
- package/dist/components/CheckboxGroup/styles.css.cjs +0 -7
- package/dist/components/Chip/ChipContext.cjs +0 -6
- package/dist/components/Chip/ChipIcon.cjs +0 -52
- package/dist/components/Chip/index.cjs +0 -60
- package/dist/components/Chip/styles.css.cjs +0 -7
- package/dist/components/CopyButton/index.cjs +0 -35
- package/dist/components/DateInput/Context.cjs +0 -23
- package/dist/components/DateInput/components/CalendarContent.cjs +0 -61
- package/dist/components/DateInput/components/CalendarDaily.cjs +0 -169
- package/dist/components/DateInput/components/CalendarMonthly.cjs +0 -105
- package/dist/components/DateInput/components/Popup.cjs +0 -28
- package/dist/components/DateInput/components/styles.css.cjs +0 -12
- package/dist/components/DateInput/constants.cjs +0 -6
- package/dist/components/DateInput/helpers.cjs +0 -69
- package/dist/components/DateInput/helpersLocale.cjs +0 -64
- package/dist/components/DateInput/index.cjs +0 -192
- package/dist/components/DateInput/styles.css.cjs +0 -8
- package/dist/components/Dialog/Context.cjs +0 -14
- package/dist/components/Dialog/components/Button.cjs +0 -17
- package/dist/components/Dialog/components/Buttons.cjs +0 -13
- package/dist/components/Dialog/components/CancelButton.cjs +0 -12
- package/dist/components/Dialog/components/Stack.cjs +0 -10
- package/dist/components/Dialog/components/Text.cjs +0 -10
- package/dist/components/Dialog/index.cjs +0 -60
- package/dist/components/Dialog/styles.css.cjs +0 -7
- package/dist/components/Drawer/index.cjs +0 -56
- package/dist/components/Drawer/styles.css.cjs +0 -17
- package/dist/components/EmptyState/index.cjs +0 -42
- package/dist/components/EmptyState/styles.css.cjs +0 -10
- package/dist/components/Expandable/index.cjs +0 -108
- package/dist/components/Expandable/styles.css.cjs +0 -7
- package/dist/components/ExpandableCard/components/Title.cjs +0 -13
- package/dist/components/ExpandableCard/index.cjs +0 -114
- package/dist/components/ExpandableCard/styles.css.cjs +0 -17
- package/dist/components/GlobalAlert/GlobalAlertLink.cjs +0 -25
- package/dist/components/GlobalAlert/index.cjs +0 -39
- package/dist/components/GlobalAlert/styles.css.cjs +0 -7
- package/dist/components/InfiniteScroll/index.cjs +0 -91
- package/dist/components/Key/index.cjs +0 -45
- package/dist/components/Key/styles.css.cjs +0 -6
- package/dist/components/Label/index.cjs +0 -52
- package/dist/components/Label/styles.css.cjs +0 -5
- package/dist/components/LineChart/CustomLegend.cjs +0 -64
- package/dist/components/LineChart/Tooltip.cjs +0 -19
- package/dist/components/LineChart/helpers.cjs +0 -57
- package/dist/components/LineChart/index.cjs +0 -92
- package/dist/components/LineChart/styles.css.cjs +0 -27
- package/dist/components/Link/index.cjs +0 -69
- package/dist/components/Link/styles.css.cjs +0 -14
- package/dist/components/List/Cell.cjs +0 -31
- package/dist/components/List/ColumnProvider.cjs +0 -28
- package/dist/components/List/HeaderCell.cjs +0 -49
- package/dist/components/List/HeaderRow.cjs +0 -26
- package/dist/components/List/ListContext.cjs +0 -210
- package/dist/components/List/Row.cjs +0 -107
- package/dist/components/List/SelectBar.cjs +0 -28
- package/dist/components/List/SkeletonRows.cjs +0 -31
- package/dist/components/List/index.cjs +0 -49
- package/dist/components/List/styles.css.cjs +0 -35
- package/dist/components/List/variables.css.cjs +0 -16
- package/dist/components/Loader/index.cjs +0 -66
- package/dist/components/Loader/styles.css.cjs +0 -7
- package/dist/components/Menu/MenuContent.cjs +0 -177
- package/dist/components/Menu/MenuProvider.cjs +0 -44
- package/dist/components/Menu/components/Group.cjs +0 -25
- package/dist/components/Menu/components/Item.cjs +0 -97
- package/dist/components/Menu/helpers.cjs +0 -48
- package/dist/components/Menu/index.cjs +0 -20
- package/dist/components/Menu/styles.css.cjs +0 -24
- package/dist/components/Meter/index.cjs +0 -34
- package/dist/components/Meter/styles.css.cjs +0 -11
- package/dist/components/Modal/ModalContent.cjs +0 -39
- package/dist/components/Modal/ModalProvider.cjs +0 -41
- package/dist/components/Modal/components/Dialog.cjs +0 -148
- package/dist/components/Modal/components/Disclosure.cjs +0 -42
- package/dist/components/Modal/index.cjs +0 -58
- package/dist/components/Modal/styles.css.cjs +0 -21
- package/dist/components/Notice/index.cjs +0 -17
- package/dist/components/Notice/styles.css.cjs +0 -5
- package/dist/components/Notification/index.cjs +0 -35
- package/dist/components/Notification/styles.css.cjs +0 -5
- package/dist/components/NumberInput/index.cjs +0 -145
- package/dist/components/NumberInput/styles.css.cjs +0 -14
- package/dist/components/Pagination/PaginationButtons.cjs +0 -49
- package/dist/components/Pagination/PerPage.cjs +0 -49
- package/dist/components/Pagination/getPageNumbers.cjs +0 -23
- package/dist/components/Pagination/index.cjs +0 -43
- package/dist/components/Pagination/styles.css.cjs +0 -9
- package/dist/components/PasswordCheck/index.cjs +0 -18
- package/dist/components/PasswordCheck/styles.css.cjs +0 -5
- package/dist/components/PieChart/Legends.cjs +0 -36
- package/dist/components/PieChart/Tooltip.cjs +0 -18
- package/dist/components/PieChart/index.cjs +0 -71
- package/dist/components/PieChart/styles.css.cjs +0 -36
- package/dist/components/Popover/index.cjs +0 -67
- package/dist/components/Popover/styles.css.cjs +0 -8
- package/dist/components/Popup/helpers.cjs +0 -264
- package/dist/components/Popup/index.cjs +0 -291
- package/dist/components/Popup/styles.css.cjs +0 -12
- package/dist/components/Popup/variables.css.cjs +0 -19
- package/dist/components/ProgressBar/index.cjs +0 -46
- package/dist/components/ProgressBar/styles.css.cjs +0 -12
- package/dist/components/ProgressBar/variables.css.cjs +0 -4
- package/dist/components/Radio/index.cjs +0 -69
- package/dist/components/Radio/styles.css.cjs +0 -21
- package/dist/components/RadioGroup/index.cjs +0 -73
- package/dist/components/RadioGroup/styles.css.cjs +0 -5
- package/dist/components/Row/index.cjs +0 -46
- package/dist/components/Row/styles.css.cjs +0 -17
- package/dist/components/Row/variables.css.cjs +0 -7
- package/dist/components/SearchInput/KeyGroup.cjs +0 -13
- package/dist/components/SearchInput/index.cjs +0 -186
- package/dist/components/SearchInput/styles.css.cjs +0 -10
- package/dist/components/SelectInput/SelectInputProvider.cjs +0 -203
- package/dist/components/SelectInput/components/Dropdown.cjs +0 -341
- package/dist/components/SelectInput/components/DropdownOption.cjs +0 -47
- package/dist/components/SelectInput/components/SearchBarDropdown.cjs +0 -117
- package/dist/components/SelectInput/components/SelectBar.cjs +0 -237
- package/dist/components/SelectInput/components/dropdown.css.cjs +0 -34
- package/dist/components/SelectInput/components/selectBar.css.cjs +0 -22
- package/dist/components/SelectInput/findOptionInOptions.cjs +0 -12
- package/dist/components/SelectInput/index.cjs +0 -68
- package/dist/components/SelectInput/styles.css.cjs +0 -7
- package/dist/components/SelectInput/types.cjs +0 -9
- package/dist/components/SelectableCard/index.cjs +0 -149
- package/dist/components/SelectableCard/styles.css.cjs +0 -21
- package/dist/components/SelectableCard/variables.css.cjs +0 -8
- package/dist/components/SelectableCardGroup/index.cjs +0 -75
- package/dist/components/SelectableCardGroup/styles.css.cjs +0 -5
- package/dist/components/SelectableCardOptionGroup/Provider.cjs +0 -24
- package/dist/components/SelectableCardOptionGroup/components/Image.cjs +0 -17
- package/dist/components/SelectableCardOptionGroup/components/Option.cjs +0 -60
- package/dist/components/SelectableCardOptionGroup/index.cjs +0 -51
- package/dist/components/SelectableCardOptionGroup/styles.css.cjs +0 -21
- package/dist/components/Separator/index.cjs +0 -40
- package/dist/components/Separator/styles.css.cjs +0 -10
- package/dist/components/Skeleton/Block.cjs +0 -17
- package/dist/components/Skeleton/Blocks.cjs +0 -20
- package/dist/components/Skeleton/BoxWithIcon.cjs +0 -20
- package/dist/components/Skeleton/Donut.cjs +0 -16
- package/dist/components/Skeleton/IconSkeleton.cjs +0 -7
- package/dist/components/Skeleton/Line.cjs +0 -12
- package/dist/components/Skeleton/List.cjs +0 -18
- package/dist/components/Skeleton/Slider.cjs +0 -14
- package/dist/components/Skeleton/Square.cjs +0 -7
- package/dist/components/Skeleton/index.cjs +0 -39
- package/dist/components/Skeleton/styles.css.cjs +0 -7
- package/dist/components/Skeleton/stylesVariants.css.cjs +0 -47
- package/dist/components/Slider/components/DoubleSlider.cjs +0 -236
- package/dist/components/Slider/components/Options.cjs +0 -35
- package/dist/components/Slider/components/SingleSlider.cjs +0 -153
- package/dist/components/Slider/constant.cjs +0 -4
- package/dist/components/Slider/index.cjs +0 -61
- package/dist/components/Slider/styles.css.cjs +0 -36
- package/dist/components/Snippet/index.cjs +0 -64
- package/dist/components/Snippet/styles.css.cjs +0 -26
- package/dist/components/Stack/index.cjs +0 -85
- package/dist/components/Stack/styles.css.cjs +0 -19
- package/dist/components/Stack/variables.css.cjs +0 -11
- package/dist/components/Status/index.cjs +0 -25
- package/dist/components/Status/styles.css.cjs +0 -11
- package/dist/components/StepList/index.cjs +0 -32
- package/dist/components/StepList/styles.css.cjs +0 -10
- package/dist/components/Stepper/Step.cjs +0 -72
- package/dist/components/Stepper/StepperProvider.cjs +0 -41
- package/dist/components/Stepper/index.cjs +0 -49
- package/dist/components/Stepper/styles.css.cjs +0 -20
- package/dist/components/SwitchButton/FocusOverlay.cjs +0 -16
- package/dist/components/SwitchButton/Option.cjs +0 -40
- package/dist/components/SwitchButton/SwitchButtonContext.cjs +0 -13
- package/dist/components/SwitchButton/constant.cjs +0 -4
- package/dist/components/SwitchButton/index.cjs +0 -110
- package/dist/components/SwitchButton/styles.css.cjs +0 -9
- package/dist/components/Table/Body.cjs +0 -8
- package/dist/components/Table/Cell.cjs +0 -35
- package/dist/components/Table/Header.cjs +0 -9
- package/dist/components/Table/HeaderCell.cjs +0 -55
- package/dist/components/Table/HeaderRow.cjs +0 -28
- package/dist/components/Table/Row.cjs +0 -88
- package/dist/components/Table/SelectBar.cjs +0 -28
- package/dist/components/Table/SkeletonRows.cjs +0 -24
- package/dist/components/Table/TableContext.cjs +0 -43
- package/dist/components/Table/constants.cjs +0 -4
- package/dist/components/Table/index.cjs +0 -56
- package/dist/components/Table/styles.css.cjs +0 -29
- package/dist/components/Table/variables.css.cjs +0 -14
- package/dist/components/Tabs/Tab.cjs +0 -52
- package/dist/components/Tabs/TabMenu.cjs +0 -32
- package/dist/components/Tabs/TabMenuItem.cjs +0 -27
- package/dist/components/Tabs/TabsContext.cjs +0 -7
- package/dist/components/Tabs/index.cjs +0 -74
- package/dist/components/Tabs/styles.css.cjs +0 -21
- package/dist/components/Tag/index.cjs +0 -63
- package/dist/components/Tag/styles.css.cjs +0 -10
- package/dist/components/TagInput/index.cjs +0 -163
- package/dist/components/TagInput/styles.css.cjs +0 -12
- package/dist/components/TagList/constant.cjs +0 -5
- package/dist/components/TagList/index.cjs +0 -163
- package/dist/components/TagList/styles.css.cjs +0 -14
- package/dist/components/Text/constant.d.ts +0 -6
- package/dist/components/Text/index.cjs +0 -53
- package/dist/components/Text/style.css.cjs +0 -6
- package/dist/components/Text/variables.css.cjs +0 -7
- package/dist/components/TextArea/index.cjs +0 -123
- package/dist/components/TextArea/styles.css.cjs +0 -12
- package/dist/components/TextInput/index.cjs +0 -119
- package/dist/components/TextInput/styles.css.cjs +0 -17
- package/dist/components/TimeInput/constants.cjs +0 -13
- package/dist/components/TimeInput/helpers.cjs +0 -66
- package/dist/components/TimeInput/index.cjs +0 -273
- package/dist/components/TimeInput/styles.css.cjs +0 -10
- package/dist/components/Toaster/index.cjs +0 -47
- package/dist/components/Toaster/index.js +0 -47
- package/dist/components/Toaster/styles.css.cjs +0 -7
- package/dist/components/Toggle/index.cjs +0 -50
- package/dist/components/Toggle/styles.css.cjs +0 -10
- package/dist/components/ToggleGroup/index.cjs +0 -72
- package/dist/components/ToggleGroup/styles.css.cjs +0 -5
- package/dist/components/Tooltip/index.cjs +0 -26
- package/dist/components/Tooltip/styles.css.cjs +0 -5
- package/dist/components/UnitInput/index.cjs +0 -111
- package/dist/components/UnitInput/styles.css.cjs +0 -18
- package/dist/components/VerificationCode/index.cjs +0 -148
- package/dist/components/VerificationCode/styles.css.cjs +0 -9
- package/dist/helpers/isClientSide.cjs +0 -4
- package/dist/helpers/legend.cjs +0 -14
- package/dist/helpers/nivoTheme.cjs +0 -22
- package/dist/helpers/recursivelyGetChildrenString.cjs +0 -17
- package/dist/hooks/useIsOverflowing.cjs +0 -23
- package/dist/index.cjs +0 -214
- package/dist/theme/ThemeProvider.cjs +0 -16
- package/dist/theme/index.cjs +0 -38
- package/dist/utils/animationVanillaExtract.css.cjs +0 -11
- package/dist/utils/animationVanillaExtract.css.d.ts +0 -4
- package/dist/utils/animationVanillaExtract.css.js +0 -11
- package/dist/utils/animations.cjs +0 -276
- package/dist/utils/animations.d.ts +0 -162
- package/dist/utils/animations.js +0 -276
- package/dist/utils/ids.cjs +0 -8
- package/dist/utils/normalize.cjs +0 -35
- package/dist/utils/responsive/Breakpoint.cjs +0 -15
- package/dist/utils/responsive/utilities.cjs +0 -17
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const index = require("../Checkbox/index.cjs");
|
|
6
|
-
const HeaderCell = require("./HeaderCell.cjs");
|
|
7
|
-
const ListContext = require("./ListContext.cjs");
|
|
8
|
-
const styles_css = require("./styles.css.cjs");
|
|
9
|
-
const HeaderRow = ({
|
|
10
|
-
children,
|
|
11
|
-
hasSelectAllColumn
|
|
12
|
-
}) => {
|
|
13
|
-
const {
|
|
14
|
-
allRowSelectValue,
|
|
15
|
-
selectAllHandler,
|
|
16
|
-
selectedRowIds,
|
|
17
|
-
expandButton
|
|
18
|
-
} = ListContext.useListContext();
|
|
19
|
-
const selectableRowCount = Object.keys(selectedRowIds).length;
|
|
20
|
-
return /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: styles_css.listHeaderRow, children: [
|
|
21
|
-
hasSelectAllColumn ? /* @__PURE__ */ jsxRuntime.jsx(HeaderCell.HeaderCell, { className: styles_css.listNoPaddingHeaderCell, children: /* @__PURE__ */ jsxRuntime.jsx(index.Checkbox, { "aria-label": "select all", checked: allRowSelectValue, disabled: selectableRowCount === 0, name: "list-select-checkbox", onChange: selectAllHandler, value: "all" }) }) : null,
|
|
22
|
-
expandButton ? /* @__PURE__ */ jsxRuntime.jsx(HeaderCell.HeaderCell, { className: styles_css.listNoPaddingHeaderCell, children: null }) : null,
|
|
23
|
-
children
|
|
24
|
-
] }) });
|
|
25
|
-
};
|
|
26
|
-
exports.HeaderRow = HeaderRow;
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const react = require("react");
|
|
6
|
-
const ListContext = react.createContext(void 0);
|
|
7
|
-
const checkStateOfCheckboxs = (ids) => {
|
|
8
|
-
const selectableRowCount = Object.keys(ids).length;
|
|
9
|
-
const selectableValuesCount = new Set(Object.values(ids));
|
|
10
|
-
if (!selectableRowCount) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
if (selectableValuesCount.size === 1) {
|
|
14
|
-
return [...selectableValuesCount][0];
|
|
15
|
-
}
|
|
16
|
-
return "indeterminate";
|
|
17
|
-
};
|
|
18
|
-
const ListProvider = ({
|
|
19
|
-
children,
|
|
20
|
-
autoCollapse,
|
|
21
|
-
selectable,
|
|
22
|
-
expandButton,
|
|
23
|
-
onSelectedChange,
|
|
24
|
-
columns
|
|
25
|
-
}) => {
|
|
26
|
-
const [expandedRowIds, setExpandedRowIds] = react.useState({});
|
|
27
|
-
const [selectedRowIds, setSelectedRowIds] = react.useState({});
|
|
28
|
-
const [lastCheckedCheckbox, setLastCheckedCheckbox] = react.useState();
|
|
29
|
-
const [inRange, setInRange] = react.useState([]);
|
|
30
|
-
const [refList, setRefList] = react.useState([]);
|
|
31
|
-
const registerExpandableRow = react.useCallback((rowId, expanded = false) => {
|
|
32
|
-
setExpandedRowIds((current) => ({
|
|
33
|
-
...current,
|
|
34
|
-
[rowId]: expanded
|
|
35
|
-
}));
|
|
36
|
-
return () => {
|
|
37
|
-
setExpandedRowIds((current) => {
|
|
38
|
-
const {
|
|
39
|
-
[rowId]: relatedId,
|
|
40
|
-
...otherIds
|
|
41
|
-
} = current;
|
|
42
|
-
return otherIds;
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
}, []);
|
|
46
|
-
const registerSelectableRow = react.useCallback((rowId) => {
|
|
47
|
-
setSelectedRowIds((current) => ({
|
|
48
|
-
...current,
|
|
49
|
-
[rowId]: false
|
|
50
|
-
}));
|
|
51
|
-
return () => {
|
|
52
|
-
setSelectedRowIds((current) => {
|
|
53
|
-
const {
|
|
54
|
-
[rowId]: relatedId,
|
|
55
|
-
...otherIds
|
|
56
|
-
} = current;
|
|
57
|
-
return otherIds;
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
}, []);
|
|
61
|
-
const expandRow = react.useCallback((rowId) => {
|
|
62
|
-
setExpandedRowIds((current) => ({
|
|
63
|
-
...autoCollapse ? {} : current,
|
|
64
|
-
[rowId]: true
|
|
65
|
-
}));
|
|
66
|
-
}, [autoCollapse]);
|
|
67
|
-
const collapseRow = react.useCallback((rowId) => {
|
|
68
|
-
setExpandedRowIds((current) => ({
|
|
69
|
-
...current,
|
|
70
|
-
[rowId]: false
|
|
71
|
-
}));
|
|
72
|
-
}, []);
|
|
73
|
-
const allRowSelectValue = react.useMemo(() => checkStateOfCheckboxs(selectedRowIds), [selectedRowIds]);
|
|
74
|
-
const selectRows = react.useCallback((rowIds, state) => {
|
|
75
|
-
const newSelectedRowIds = rowIds.reduce((acc, rowId) => ({
|
|
76
|
-
...acc,
|
|
77
|
-
[rowId]: state
|
|
78
|
-
}), selectedRowIds);
|
|
79
|
-
setSelectedRowIds(newSelectedRowIds);
|
|
80
|
-
if (onSelectedChange) {
|
|
81
|
-
onSelectedChange(Object.keys(newSelectedRowIds).filter((row) => newSelectedRowIds[row]));
|
|
82
|
-
}
|
|
83
|
-
}, [onSelectedChange, selectedRowIds]);
|
|
84
|
-
const selectAll = react.useCallback(() => {
|
|
85
|
-
selectRows(Object.keys(selectedRowIds), true);
|
|
86
|
-
}, [selectRows, selectedRowIds]);
|
|
87
|
-
const unselectAll = react.useCallback(() => {
|
|
88
|
-
selectRows(Object.keys(selectedRowIds), false);
|
|
89
|
-
}, [selectRows, selectedRowIds]);
|
|
90
|
-
const selectRow = react.useCallback((rowId) => {
|
|
91
|
-
selectRows([rowId], true);
|
|
92
|
-
}, [selectRows]);
|
|
93
|
-
const unselectRow = react.useCallback((rowId) => {
|
|
94
|
-
selectRows([rowId], false);
|
|
95
|
-
}, [selectRows]);
|
|
96
|
-
const selectAllHandler = react.useCallback(() => {
|
|
97
|
-
if (allRowSelectValue && [true, "indeterminate"].includes(allRowSelectValue)) {
|
|
98
|
-
unselectAll();
|
|
99
|
-
}
|
|
100
|
-
if (allRowSelectValue === false) {
|
|
101
|
-
selectAll();
|
|
102
|
-
}
|
|
103
|
-
setLastCheckedCheckbox(void 0);
|
|
104
|
-
}, [allRowSelectValue, unselectAll, selectAll]);
|
|
105
|
-
const subscribeHandler = react.useCallback(() => {
|
|
106
|
-
const handlers = [];
|
|
107
|
-
const updatedRefList = [...new Set(refList.filter((checkbox) => document.contains(checkbox.current) && checkbox.current))];
|
|
108
|
-
setRefList(updatedRefList);
|
|
109
|
-
const handleHover = (index, isShiftPressed, leaving) => {
|
|
110
|
-
const newRange = [];
|
|
111
|
-
if (lastCheckedCheckbox) {
|
|
112
|
-
const targetCheckbox = updatedRefList.find((checkbox) => checkbox.current?.value === lastCheckedCheckbox);
|
|
113
|
-
if (isShiftPressed && targetCheckbox && !leaving) {
|
|
114
|
-
const lastCheckedIndex = updatedRefList.indexOf(targetCheckbox);
|
|
115
|
-
const start = Math.min(lastCheckedIndex, index) - (Math.min(lastCheckedIndex, index) === index ? 1 : 0);
|
|
116
|
-
const end = Math.max(lastCheckedIndex, index);
|
|
117
|
-
updatedRefList.forEach((checkbox, i) => {
|
|
118
|
-
if (!checkbox.current?.disabled && i > start && i < end) {
|
|
119
|
-
newRange.push(checkbox.current?.value);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
setInRange(newRange);
|
|
125
|
-
};
|
|
126
|
-
const handleClickRange = (currentCheckbox, index, isShiftPressed) => {
|
|
127
|
-
if (isShiftPressed) {
|
|
128
|
-
const checkboxesInRange = [];
|
|
129
|
-
const targetCheckbox = updatedRefList.find((checkbox) => checkbox.current?.value === lastCheckedCheckbox);
|
|
130
|
-
const lastCheckedIndex = targetCheckbox ? updatedRefList.indexOf(targetCheckbox) : void 0;
|
|
131
|
-
if (lastCheckedIndex !== void 0) {
|
|
132
|
-
const start = Math.min(lastCheckedIndex, index) - (Math.min(lastCheckedIndex, index) === index ? 1 : 0);
|
|
133
|
-
const end = Math.max(lastCheckedIndex, index);
|
|
134
|
-
updatedRefList.forEach((checkbox, key) => {
|
|
135
|
-
if (start < key && key <= end && !checkbox.current?.disabled) {
|
|
136
|
-
checkboxesInRange.push(checkbox.current?.value);
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
selectRows(checkboxesInRange, currentCheckbox.checked);
|
|
140
|
-
setLastCheckedCheckbox(currentCheckbox.value);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
setTimeout(() => {
|
|
144
|
-
setInRange([]);
|
|
145
|
-
setLastCheckedCheckbox(currentCheckbox.value);
|
|
146
|
-
}, 1);
|
|
147
|
-
};
|
|
148
|
-
refList.forEach((checkbox, index) => {
|
|
149
|
-
const clickHandler = function clickHandler2(event) {
|
|
150
|
-
handleClickRange(this, index, event.shiftKey);
|
|
151
|
-
};
|
|
152
|
-
const hoverEnteringHandler = (event) => handleHover(index, event.shiftKey, false);
|
|
153
|
-
const hoverLeavingHandler = (event) => handleHover(index, event.shiftKey, true);
|
|
154
|
-
if (checkbox.current) {
|
|
155
|
-
checkbox.current.addEventListener("click", clickHandler);
|
|
156
|
-
checkbox.current.addEventListener("mousemove", hoverEnteringHandler);
|
|
157
|
-
checkbox.current.addEventListener("mouseout", hoverLeavingHandler);
|
|
158
|
-
handlers.push(() => {
|
|
159
|
-
if (checkbox.current) {
|
|
160
|
-
checkbox.current.removeEventListener("click", clickHandler);
|
|
161
|
-
checkbox.current.removeEventListener("mouseout", hoverEnteringHandler);
|
|
162
|
-
checkbox.current.removeEventListener("mousemove", hoverLeavingHandler);
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
return () => {
|
|
168
|
-
handlers.forEach((cleanup) => cleanup());
|
|
169
|
-
};
|
|
170
|
-
}, [lastCheckedCheckbox, selectRows]);
|
|
171
|
-
react.useEffect(() => {
|
|
172
|
-
subscribeHandler();
|
|
173
|
-
}, [subscribeHandler]);
|
|
174
|
-
const handleOnChange = react.useCallback((value2, checked) => {
|
|
175
|
-
selectRows([value2], !checked);
|
|
176
|
-
setLastCheckedCheckbox(value2);
|
|
177
|
-
}, [selectRows]);
|
|
178
|
-
const value = react.useMemo(() => ({
|
|
179
|
-
allRowSelectValue,
|
|
180
|
-
collapseRow,
|
|
181
|
-
columns,
|
|
182
|
-
expandButton,
|
|
183
|
-
expandedRowIds,
|
|
184
|
-
expandRow,
|
|
185
|
-
handleOnChange,
|
|
186
|
-
inRange,
|
|
187
|
-
refList,
|
|
188
|
-
registerExpandableRow,
|
|
189
|
-
registerSelectableRow,
|
|
190
|
-
selectAll,
|
|
191
|
-
selectAllHandler,
|
|
192
|
-
selectable,
|
|
193
|
-
selectedRowIds,
|
|
194
|
-
selectRow,
|
|
195
|
-
setRefList,
|
|
196
|
-
subscribeHandler,
|
|
197
|
-
unselectAll,
|
|
198
|
-
unselectRow
|
|
199
|
-
}), [allRowSelectValue, selectAllHandler, subscribeHandler, collapseRow, columns, expandButton, expandedRowIds, expandRow, inRange, refList, registerExpandableRow, registerSelectableRow, selectable, selectAll, selectedRowIds, selectRow, unselectAll, unselectRow, handleOnChange]);
|
|
200
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ListContext.Provider, { value, children });
|
|
201
|
-
};
|
|
202
|
-
const useListContext = () => {
|
|
203
|
-
const context = react.useContext(ListContext);
|
|
204
|
-
if (!context) {
|
|
205
|
-
throw new Error("useListContext should be used inside a List component");
|
|
206
|
-
}
|
|
207
|
-
return context;
|
|
208
|
-
};
|
|
209
|
-
exports.ListProvider = ListProvider;
|
|
210
|
-
exports.useListContext = useListContext;
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const Icon = require("@ultraviolet/icons");
|
|
6
|
-
const themes = require("@ultraviolet/themes");
|
|
7
|
-
const dynamic = require("@vanilla-extract/dynamic");
|
|
8
|
-
const react = require("react");
|
|
9
|
-
const index$2 = require("../Button/index.cjs");
|
|
10
|
-
const index$1 = require("../Checkbox/index.cjs");
|
|
11
|
-
const index = require("../Tooltip/index.cjs");
|
|
12
|
-
const Cell = require("./Cell.cjs");
|
|
13
|
-
const ColumnProvider = require("./ColumnProvider.cjs");
|
|
14
|
-
const ListContext = require("./ListContext.cjs");
|
|
15
|
-
const styles_css = require("./styles.css.cjs");
|
|
16
|
-
const variables_css = require("./variables.css.cjs");
|
|
17
|
-
const Row = react.forwardRef(({
|
|
18
|
-
children,
|
|
19
|
-
id,
|
|
20
|
-
expandable,
|
|
21
|
-
disabled,
|
|
22
|
-
selectDisabled,
|
|
23
|
-
sentiment = "neutral",
|
|
24
|
-
highlightAnimation,
|
|
25
|
-
expanded,
|
|
26
|
-
className,
|
|
27
|
-
expandablePadding,
|
|
28
|
-
"data-testid": dataTestid,
|
|
29
|
-
style,
|
|
30
|
-
"data-dragging": dataDragging,
|
|
31
|
-
onMouseEnter,
|
|
32
|
-
onMouseLeave
|
|
33
|
-
}, forwardedRef) => {
|
|
34
|
-
const {
|
|
35
|
-
selectable,
|
|
36
|
-
registerExpandableRow,
|
|
37
|
-
expandedRowIds,
|
|
38
|
-
expandRow,
|
|
39
|
-
collapseRow,
|
|
40
|
-
registerSelectableRow,
|
|
41
|
-
selectedRowIds,
|
|
42
|
-
expandButton,
|
|
43
|
-
columns,
|
|
44
|
-
inRange,
|
|
45
|
-
refList,
|
|
46
|
-
setRefList,
|
|
47
|
-
handleOnChange
|
|
48
|
-
} = ListContext.useListContext();
|
|
49
|
-
const expandedRowId = react.useId();
|
|
50
|
-
const checkboxRef = react.useRef(null);
|
|
51
|
-
const isSelectDisabled = disabled || selectDisabled !== void 0 && selectDisabled !== false;
|
|
52
|
-
const hasExpandable = !!expandable;
|
|
53
|
-
react.useEffect(() => {
|
|
54
|
-
if (hasExpandable) {
|
|
55
|
-
const unregisterCallback = registerExpandableRow(id, expanded);
|
|
56
|
-
return unregisterCallback;
|
|
57
|
-
}
|
|
58
|
-
return void 0;
|
|
59
|
-
}, [id, hasExpandable, registerExpandableRow, expanded, expandRow]);
|
|
60
|
-
react.useEffect(() => {
|
|
61
|
-
if (!isSelectDisabled) {
|
|
62
|
-
const unregisterCallback = registerSelectableRow(id);
|
|
63
|
-
return unregisterCallback;
|
|
64
|
-
}
|
|
65
|
-
return void 0;
|
|
66
|
-
}, [id, registerSelectableRow, isSelectDisabled]);
|
|
67
|
-
const toggleRowExpand = react.useCallback(() => {
|
|
68
|
-
if (expandedRowIds[id]) {
|
|
69
|
-
collapseRow(id);
|
|
70
|
-
} else {
|
|
71
|
-
expandRow(id);
|
|
72
|
-
}
|
|
73
|
-
}, [collapseRow, expandRow, expandedRowIds, id]);
|
|
74
|
-
const canClickRowToExpand = !disabled && !!expandable && !expandButton;
|
|
75
|
-
react.useEffect(() => {
|
|
76
|
-
if (checkboxRef.current !== null && !refList.includes(checkboxRef)) {
|
|
77
|
-
setRefList([...refList, checkboxRef]);
|
|
78
|
-
}
|
|
79
|
-
}, [refList, setRefList]);
|
|
80
|
-
const childrenLength = react.Children.count(children) + (selectable ? 1 : 0) + (expandButton ? 1 : 0);
|
|
81
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
82
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tr", { "aria-controls": expandable && expandedRowIds[id] ? expandedRowId : void 0, "aria-disabled": disabled, "aria-expanded": expandable ? expandedRowIds[id] : void 0, className: `${className ? `${className} ` : ""}${styles_css.listRow({
|
|
83
|
-
highlightAnimation,
|
|
84
|
-
sentiment
|
|
85
|
-
})}`, "data-dragging": dataDragging, "data-highlight": selectable && !!selectedRowIds[id], "data-testid": dataTestid, onClick: canClickRowToExpand ? toggleRowExpand : void 0, onKeyDown: canClickRowToExpand ? (event) => {
|
|
86
|
-
if (event.key === " ") {
|
|
87
|
-
toggleRowExpand();
|
|
88
|
-
event.preventDefault();
|
|
89
|
-
}
|
|
90
|
-
} : void 0, onMouseEnter, onMouseLeave, ref: forwardedRef, role: canClickRowToExpand ? "button row" : void 0, style, tabIndex: canClickRowToExpand ? 0 : -1, children: [
|
|
91
|
-
selectable ? /* @__PURE__ */ jsxRuntime.jsx(ColumnProvider.ColumnProvider, { width: themes.theme.sizing[300], children: /* @__PURE__ */ jsxRuntime.jsx(Cell.Cell, { className: styles_css.listNoPaddingCell, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.listCheckboxContainer, children: /* @__PURE__ */ jsxRuntime.jsx(index.Tooltip, { text: typeof selectDisabled === "string" ? selectDisabled : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(index$1.Checkbox, { "aria-label": "select", checked: selectedRowIds[id], className: inRange?.includes(id) ? styles_css.listCheckboxInRange : "", disabled: isSelectDisabled, name: "list-select-checkbox", onChange: () => handleOnChange(id, selectedRowIds[id]), ref: checkboxRef, value: id }) }) }) }) }) : null,
|
|
92
|
-
expandButton ? /* @__PURE__ */ jsxRuntime.jsx(ColumnProvider.ColumnProvider, { width: themes.theme.sizing[300], children: /* @__PURE__ */ jsxRuntime.jsx(Cell.Cell, { className: styles_css.listNoPaddingCell, children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Button, { "aria-label": "expand", "data-testid": "list-expand-button", disabled: disabled || !expandable, onClick: toggleRowExpand, sentiment, size: "small", variant: "ghost", children: expandedRowIds[id] ? /* @__PURE__ */ jsxRuntime.jsx(Icon.ArrowUpIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(Icon.ArrowDownIcon, {}) }) }) }) : null,
|
|
93
|
-
react.Children.map(children, (child, index2) => {
|
|
94
|
-
const column = columns[index2];
|
|
95
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ColumnProvider.ColumnProvider, { maxWidth: column?.maxWidth, minWidth: column?.minWidth, width: column?.width, children: child });
|
|
96
|
-
})
|
|
97
|
-
] }),
|
|
98
|
-
expandable && expandedRowIds[id] ? /* @__PURE__ */ jsxRuntime.jsx("tr", { className: styles_css.listExpandableWrapper, "data-expandable-content": true, "data-highlight": selectable && !!selectedRowIds[id], id: expandedRowId, onClick: canClickRowToExpand ? (e) => {
|
|
99
|
-
e.stopPropagation();
|
|
100
|
-
} : void 0, onKeyDown: canClickRowToExpand ? (e) => {
|
|
101
|
-
e.stopPropagation();
|
|
102
|
-
} : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(Cell.Cell, { className: styles_css.listExpandableCell, colSpan: childrenLength, style: dynamic.assignInlineVars({
|
|
103
|
-
[variables_css.paddingExpandableCell]: themes.theme.space[expandablePadding ?? "2"]
|
|
104
|
-
}), children: expandable }) }) : null
|
|
105
|
-
] });
|
|
106
|
-
});
|
|
107
|
-
exports.Row = Row;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const react = require("react");
|
|
6
|
-
const index = require("../ActionBar/index.cjs");
|
|
7
|
-
const index$1 = require("../Stack/index.cjs");
|
|
8
|
-
const ListContext = require("./ListContext.cjs");
|
|
9
|
-
const SelectBar = ({
|
|
10
|
-
children,
|
|
11
|
-
data,
|
|
12
|
-
idKey,
|
|
13
|
-
className
|
|
14
|
-
}) => {
|
|
15
|
-
const {
|
|
16
|
-
selectedRowIds,
|
|
17
|
-
unselectAll
|
|
18
|
-
} = ListContext.useListContext();
|
|
19
|
-
const selectedItems = react.useMemo(() => data.filter((item) => selectedRowIds[item[idKey]]), [data, idKey, selectedRowIds]);
|
|
20
|
-
if (selectedItems.length === 0) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
return /* @__PURE__ */ jsxRuntime.jsx(index.ActionBar, { className, children: /* @__PURE__ */ jsxRuntime.jsx(index$1.Stack, { alignItems: "center", direction: "row", flex: "1 1 auto", justifyContent: "space-between", width: "100%", children: children({
|
|
24
|
-
selectedItems,
|
|
25
|
-
unselectAll
|
|
26
|
-
}) }) });
|
|
27
|
-
};
|
|
28
|
-
exports.SelectBar = SelectBar;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const index = require("../Skeleton/index.cjs");
|
|
6
|
-
const Cell = require("./Cell.cjs");
|
|
7
|
-
const ColumnProvider = require("./ColumnProvider.cjs");
|
|
8
|
-
const ListContext = require("./ListContext.cjs");
|
|
9
|
-
const styles_css = require("./styles.css.cjs");
|
|
10
|
-
const SkeletonRows = ({
|
|
11
|
-
selectable,
|
|
12
|
-
rows,
|
|
13
|
-
cols
|
|
14
|
-
}) => {
|
|
15
|
-
const rowArray = Array.from({
|
|
16
|
-
length: rows
|
|
17
|
-
}, (_, index2) => index2);
|
|
18
|
-
const colArray = Array.from({
|
|
19
|
-
length: cols
|
|
20
|
-
}, (_, index2) => index2);
|
|
21
|
-
const {
|
|
22
|
-
columns
|
|
23
|
-
} = ListContext.useListContext();
|
|
24
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: rowArray.map((index$1) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: `${styles_css.listRow({
|
|
25
|
-
sentiment: "neutral"
|
|
26
|
-
})} ${styles_css.listLoadingRow}`, id: `skeleton-${index$1}`, role: "row", children: [
|
|
27
|
-
selectable ? /* @__PURE__ */ jsxRuntime.jsx("td", {}) : null,
|
|
28
|
-
colArray.map((columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(ColumnProvider.ColumnProvider, { maxWidth: columns[columnIndex].maxWidth, minWidth: columns[columnIndex].minWidth, width: columns[columnIndex].width, children: /* @__PURE__ */ jsxRuntime.jsx(Cell.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(index.Skeleton, { className: styles_css.listSkeleton, variant: "line" }) }) }, columnIndex))
|
|
29
|
-
] }, index$1)) });
|
|
30
|
-
};
|
|
31
|
-
exports.SkeletonRows = SkeletonRows;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const react = require("react");
|
|
6
|
-
const Cell = require("./Cell.cjs");
|
|
7
|
-
const HeaderCell = require("./HeaderCell.cjs");
|
|
8
|
-
const HeaderRow = require("./HeaderRow.cjs");
|
|
9
|
-
const ListContext = require("./ListContext.cjs");
|
|
10
|
-
const Row = require("./Row.cjs");
|
|
11
|
-
const SelectBar = require("./SelectBar.cjs");
|
|
12
|
-
const SkeletonRows = require("./SkeletonRows.cjs");
|
|
13
|
-
const styles_css = require("./styles.css.cjs");
|
|
14
|
-
const TableContainer = ({
|
|
15
|
-
children
|
|
16
|
-
}) => {
|
|
17
|
-
const [childrenMemory, setChildrenMemory] = react.useState(react.Children.toArray(children));
|
|
18
|
-
const {
|
|
19
|
-
setRefList
|
|
20
|
-
} = ListContext.useListContext();
|
|
21
|
-
react.useEffect(() => {
|
|
22
|
-
if (react.Children.toArray(children) !== childrenMemory) {
|
|
23
|
-
setRefList([]);
|
|
24
|
-
setChildrenMemory(react.Children.toArray(children));
|
|
25
|
-
}
|
|
26
|
-
}, [children, setRefList]);
|
|
27
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.listContainer, children });
|
|
28
|
-
};
|
|
29
|
-
const BaseList = react.forwardRef(({
|
|
30
|
-
expandable = false,
|
|
31
|
-
selectable = false,
|
|
32
|
-
columns,
|
|
33
|
-
children,
|
|
34
|
-
loading,
|
|
35
|
-
autoCollapse = false,
|
|
36
|
-
onSelectedChange,
|
|
37
|
-
className,
|
|
38
|
-
style
|
|
39
|
-
}, ref) => /* @__PURE__ */ jsxRuntime.jsx(ListContext.ListProvider, { autoCollapse, columns, expandButton: expandable, onSelectedChange, selectable, children: /* @__PURE__ */ jsxRuntime.jsx(TableContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: `${className ? `${className} ` : ""}${styles_css.list}`, ref, style, children: [
|
|
40
|
-
/* @__PURE__ */ jsxRuntime.jsx(HeaderRow.HeaderRow, { hasSelectAllColumn: selectable, children: columns.map((column, index) => /* @__PURE__ */ jsxRuntime.jsx(HeaderCell.HeaderCell, { info: column.info, isOrdered: column.isOrdered, maxWidth: column.maxWidth, minWidth: column.minWidth, onOrder: column.onOrder, orderDirection: column.orderDirection, width: column.width, children: column.label }, `header-column-${index}`)) }),
|
|
41
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: loading ? /* @__PURE__ */ jsxRuntime.jsx(SkeletonRows.SkeletonRows, { cols: columns.length, rows: 5, selectable }) : children })
|
|
42
|
-
] }) }) }));
|
|
43
|
-
const List = Object.assign(BaseList, {
|
|
44
|
-
Cell: Cell.Cell,
|
|
45
|
-
Row: Row.Row,
|
|
46
|
-
SelectBar: SelectBar.SelectBar,
|
|
47
|
-
useListContext: ListContext.useListContext
|
|
48
|
-
});
|
|
49
|
-
exports.List = List;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
;/* empty css */
|
|
4
|
-
;/* empty css */
|
|
5
|
-
const createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
6
|
-
var listContainer = "uv_inoh541";
|
|
7
|
-
var list = "uv_inoh542";
|
|
8
|
-
var listSortIcon = { ascending: "uv_inoh543", descending: "uv_inoh544" };
|
|
9
|
-
var listHeaderCell = "uv_inoh545";
|
|
10
|
-
var listHeaderRow = "uv_inoh546";
|
|
11
|
-
var listNoPaddingHeaderCell = "uv_inoh547";
|
|
12
|
-
var listExpandableWrapper = "uv_inoh548";
|
|
13
|
-
var listCheckboxInRange = "uv_inoh549";
|
|
14
|
-
var listRow = createRuntimeFn.createRuntimeFn({ defaultClassName: "uv_inoh54b uv_inoh54a", variantClassNames: { sentiment: { primary: "uv_inoh54c", secondary: "uv_inoh54d", neutral: "uv_inoh54e", success: "uv_inoh54f", danger: "uv_inoh54g", warning: "uv_inoh54h", info: "uv_inoh54i" }, highlightAnimation: { true: "uv_inoh54j" } }, defaultVariants: { sentiment: "neutral", highlightAnimation: false }, compoundVariants: [] });
|
|
15
|
-
var listCell = "uv_inoh54k";
|
|
16
|
-
var listCheckboxContainer = "uv_inoh54l";
|
|
17
|
-
var listNoPaddingCell = "uv_inoh54m";
|
|
18
|
-
var listExpandableCell = "uv_inoh54n";
|
|
19
|
-
var listLoadingRow = "uv_inoh54o";
|
|
20
|
-
var listSkeleton = "uv_inoh54p";
|
|
21
|
-
exports.list = list;
|
|
22
|
-
exports.listCell = listCell;
|
|
23
|
-
exports.listCheckboxContainer = listCheckboxContainer;
|
|
24
|
-
exports.listCheckboxInRange = listCheckboxInRange;
|
|
25
|
-
exports.listContainer = listContainer;
|
|
26
|
-
exports.listExpandableCell = listExpandableCell;
|
|
27
|
-
exports.listExpandableWrapper = listExpandableWrapper;
|
|
28
|
-
exports.listHeaderCell = listHeaderCell;
|
|
29
|
-
exports.listHeaderRow = listHeaderRow;
|
|
30
|
-
exports.listLoadingRow = listLoadingRow;
|
|
31
|
-
exports.listNoPaddingCell = listNoPaddingCell;
|
|
32
|
-
exports.listNoPaddingHeaderCell = listNoPaddingHeaderCell;
|
|
33
|
-
exports.listRow = listRow;
|
|
34
|
-
exports.listSkeleton = listSkeleton;
|
|
35
|
-
exports.listSortIcon = listSortIcon;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
var widthHeaderCell = "var(--uv_1431nf60)";
|
|
4
|
-
var maxWidthHeaderCell = "var(--uv_1431nf61)";
|
|
5
|
-
var minWidthHeaderCell = "var(--uv_1431nf62)";
|
|
6
|
-
var paddingExpandableCell = "var(--uv_1431nf63)";
|
|
7
|
-
var widthCell = "var(--uv_1431nf64)";
|
|
8
|
-
var maxWidthCell = "var(--uv_1431nf65)";
|
|
9
|
-
var minWidthCell = "var(--uv_1431nf66)";
|
|
10
|
-
exports.maxWidthCell = maxWidthCell;
|
|
11
|
-
exports.maxWidthHeaderCell = maxWidthHeaderCell;
|
|
12
|
-
exports.minWidthCell = minWidthCell;
|
|
13
|
-
exports.minWidthHeaderCell = minWidthHeaderCell;
|
|
14
|
-
exports.paddingExpandableCell = paddingExpandableCell;
|
|
15
|
-
exports.widthCell = widthCell;
|
|
16
|
-
exports.widthHeaderCell = widthHeaderCell;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const react = require("@emotion/react");
|
|
6
|
-
const styles_css = require("./styles.css.cjs");
|
|
7
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() {
|
|
8
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
9
|
-
}
|
|
10
|
-
const VIEWBOX_WIDTH = 100;
|
|
11
|
-
const VIEWBOX_HEIGHT = 100;
|
|
12
|
-
const HALF_VIEWBOX_WIDTH = VIEWBOX_WIDTH / 2;
|
|
13
|
-
const HALF_VIEWBOX_HEIGHT = VIEWBOX_HEIGHT / 2;
|
|
14
|
-
const SIZES = {
|
|
15
|
-
large: "300",
|
|
16
|
-
medium: "250",
|
|
17
|
-
small: "200",
|
|
18
|
-
xlarge: "400",
|
|
19
|
-
xsmall: "150",
|
|
20
|
-
xxlarge: "700"
|
|
21
|
-
};
|
|
22
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
23
|
-
name: "si0mpz",
|
|
24
|
-
styles: "transition:stroke-dashoffset 0.5s ease 0s"
|
|
25
|
-
} : {
|
|
26
|
-
name: "11f05l0-Loader",
|
|
27
|
-
styles: "transition:stroke-dashoffset 0.5s ease 0s;label:Loader;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3VsdHJhdmlvbGV0L3VsdHJhdmlvbGV0L3BhY2thZ2VzL3VpL3NyYy9jb21wb25lbnRzL0xvYWRlci9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEVnQiIsImZpbGUiOiIvaG9tZS9ydW5uZXIv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dcbiAgICAgICAgfVxuICAgICAgICBzdHJva2VEYXNoYXJyYXk9e2NpcmNsZURpYW1ldGVyfVxuICAgICAgICBzdHJva2VEYXNob2Zmc2V0PXsoMSAtIGJvdW5kZWRQZXJjZW50YWdlKSAqIGNpcmNsZURpYW1ldGVyfVxuICAgICAgICBzdHJva2VMaW5lY2FwPVwicm91bmRcIlxuICAgICAgICBzdHJva2VXaWR0aD17MTZ9XG4gICAgICAvPlxuICAgIDwvc3ZnPlxuICApXG59XG4iXX0= */",
|
|
28
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
-
};
|
|
30
|
-
const Loader = ({
|
|
31
|
-
percentage = 20,
|
|
32
|
-
size = "xlarge",
|
|
33
|
-
sentiment = "primary",
|
|
34
|
-
active = false,
|
|
35
|
-
label = "Loading",
|
|
36
|
-
style
|
|
37
|
-
}) => {
|
|
38
|
-
const theme = react.useTheme();
|
|
39
|
-
const circleRadius = HALF_VIEWBOX_HEIGHT - 8;
|
|
40
|
-
const boundedPercentage = Math.min(Math.max(percentage, 0), 100) / 100;
|
|
41
|
-
const circleDiameter = Math.PI * 2 * circleRadius;
|
|
42
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { "aria-label": label, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": percentage, "aria-valuetext": `${percentage}%`, className: active ? styles_css.loader : void 0, role: "progressbar", style: {
|
|
43
|
-
height: theme.sizing[SIZES[size]],
|
|
44
|
-
width: theme.sizing[SIZES[size]],
|
|
45
|
-
...style
|
|
46
|
-
}, viewBox: `0 0 ${VIEWBOX_WIDTH} ${VIEWBOX_HEIGHT}`, children: [
|
|
47
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: styles_css.circle, cx: HALF_VIEWBOX_WIDTH, cy: HALF_VIEWBOX_HEIGHT, fill: "none", r: circleRadius, strokeWidth: 16 }),
|
|
48
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
49
|
-
"circle",
|
|
50
|
-
{
|
|
51
|
-
css: _ref,
|
|
52
|
-
cx: HALF_VIEWBOX_WIDTH,
|
|
53
|
-
cy: HALF_VIEWBOX_HEIGHT,
|
|
54
|
-
fill: "none",
|
|
55
|
-
r: circleRadius,
|
|
56
|
-
stroke: sentiment === "black" || sentiment === "white" ? theme.colors.other.monochrome[sentiment].background : theme.colors[sentiment]?.backgroundStrong,
|
|
57
|
-
strokeDasharray: circleDiameter,
|
|
58
|
-
strokeDashoffset: (1 - boundedPercentage) * circleDiameter,
|
|
59
|
-
strokeLinecap: "round",
|
|
60
|
-
strokeWidth: 16
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
] });
|
|
64
|
-
};
|
|
65
|
-
exports.Loader = Loader;
|
|
66
|
-
exports.SIZES = SIZES;
|