@ultraviolet/ui 1.51.0 → 1.51.2
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/ActionBar/index.d.ts +20 -0
- package/dist/components/ActionBar/index.js +40 -0
- package/dist/components/Alert/index.d.ts +27 -0
- package/dist/components/Alert/index.js +126 -0
- package/dist/components/Avatar/index.d.ts +43 -0
- package/dist/components/Avatar/index.js +54 -0
- package/dist/components/Badge/index.d.ts +31 -0
- package/dist/components/Badge/index.js +115 -0
- package/dist/components/Banner/assets/default-image-small.svg.js +4 -0
- package/dist/components/Banner/assets/default-image.svg.js +4 -0
- package/dist/components/Banner/index.d.ts +24 -0
- package/dist/components/Banner/index.js +191 -0
- package/dist/components/BarChart/Tooltip.d.ts +9 -0
- package/dist/components/BarChart/Tooltip.js +36 -0
- package/dist/components/BarChart/index.d.ts +27 -0
- package/dist/components/BarChart/index.js +82 -0
- package/dist/components/BarStack/index.d.ts +36 -0
- package/dist/components/BarStack/index.js +188 -0
- package/dist/components/Breadcrumbs/index.d.ts +30 -0
- package/dist/components/Breadcrumbs/index.js +76 -0
- package/dist/components/Bullet/index.d.ts +39 -0
- package/dist/components/Bullet/index.js +88 -0
- package/dist/components/Button/index.d.ts +120 -0
- package/dist/components/Button/index.js +291 -0
- package/dist/components/Card/index.d.ts +20 -0
- package/dist/components/Card/index.js +59 -0
- package/dist/components/Carousel/index.d.ts +19 -0
- package/dist/components/Carousel/index.js +147 -0
- package/dist/components/Checkbox/index.d.ts +36 -0
- package/dist/components/Checkbox/index.js +359 -0
- package/dist/components/CheckboxGroup/index.d.ts +24 -0
- package/dist/components/CheckboxGroup/index.js +112 -0
- package/dist/components/CopyButton/index.d.ts +19 -0
- package/dist/components/CopyButton/index.js +37 -0
- package/dist/components/DateInput/datepicker.css.js +4 -0
- package/dist/components/DateInput/index.d.ts +38 -0
- package/dist/components/DateInput/index.js +301 -0
- package/dist/components/Dialog/Context.d.ts +7 -0
- package/dist/components/Dialog/Context.js +15 -0
- package/dist/components/Dialog/constants.d.ts +2 -0
- package/dist/components/Dialog/index.d.ts +87 -0
- package/dist/components/Dialog/index.js +87 -0
- package/dist/components/Dialog/subComponents/Button.d.ts +7 -0
- package/dist/components/Dialog/subComponents/Button.js +24 -0
- package/dist/components/Dialog/subComponents/Buttons.d.ts +7 -0
- package/dist/components/Dialog/subComponents/Buttons.js +12 -0
- package/dist/components/Dialog/subComponents/CancelButton.d.ts +8 -0
- package/dist/components/Dialog/subComponents/CancelButton.js +9 -0
- package/dist/components/Dialog/subComponents/Stack.d.ts +6 -0
- package/dist/components/Dialog/subComponents/Stack.js +6 -0
- package/dist/components/Dialog/subComponents/Text.d.ts +6 -0
- package/dist/components/Dialog/subComponents/Text.js +6 -0
- package/dist/components/EmptyState/index.d.ts +38 -0
- package/dist/components/EmptyState/index.js +82 -0
- package/dist/components/Expandable/index.d.ts +33 -0
- package/dist/components/Expandable/index.js +79 -0
- package/dist/components/GlobalAlert/GlobalAlertLink.d.ts +3 -0
- package/dist/components/GlobalAlert/GlobalAlertLink.js +39 -0
- package/dist/components/GlobalAlert/index.d.ts +40 -0
- package/dist/components/GlobalAlert/index.js +112 -0
- package/dist/components/LineChart/CustomLegend.d.ts +13 -0
- package/dist/components/LineChart/CustomLegend.js +109 -0
- package/dist/components/LineChart/Tooltip.d.ts +6 -0
- package/dist/components/LineChart/Tooltip.js +46 -0
- package/dist/components/LineChart/helpers.d.ts +8 -0
- package/dist/components/LineChart/helpers.js +50 -0
- package/dist/components/LineChart/index.d.ts +25 -0
- package/dist/components/LineChart/index.js +118 -0
- package/dist/components/Link/index.d.ts +33 -0
- package/dist/components/Link/index.js +167 -0
- package/dist/components/List/Body.d.ts +6 -0
- package/dist/components/List/Body.js +11 -0
- package/dist/components/List/Cell.d.ts +12 -0
- package/dist/components/List/Cell.js +38 -0
- package/dist/components/List/HeaderCell.d.ts +11 -0
- package/dist/components/List/HeaderCell.js +96 -0
- package/dist/components/List/HeaderRow.d.ts +7 -0
- package/dist/components/List/HeaderRow.js +38 -0
- package/dist/components/List/ListContext.d.ts +34 -0
- package/dist/components/List/ListContext.js +155 -0
- package/dist/components/List/Row.d.ts +23 -0
- package/dist/components/List/Row.js +194 -0
- package/dist/components/List/SelectBar.d.ts +15 -0
- package/dist/components/List/SelectBar.js +35 -0
- package/dist/components/List/SkeletonRows.d.ts +7 -0
- package/dist/components/List/SkeletonRows.js +36 -0
- package/dist/components/List/constants.d.ts +2 -0
- package/dist/{src/components → components}/List/constants.js +4 -2
- package/dist/components/List/index.d.ts +68 -0
- package/dist/components/List/index.js +80 -0
- package/dist/components/Loader/index.d.ts +22 -0
- package/dist/components/Loader/index.js +98 -0
- package/dist/components/Menu/Item.d.ts +15 -0
- package/dist/components/Menu/Item.js +101 -0
- package/dist/components/Menu/index.d.ts +49 -0
- package/dist/components/Menu/index.js +182 -0
- package/dist/components/MenuV2/Group.d.ts +7 -0
- package/dist/components/MenuV2/Group.js +23 -0
- package/dist/components/MenuV2/Item.d.ts +16 -0
- package/dist/components/MenuV2/Item.js +120 -0
- package/dist/components/MenuV2/index.d.ts +90 -0
- package/dist/components/MenuV2/index.js +124 -0
- package/dist/components/Meter/index.d.ts +26 -0
- package/dist/components/Meter/index.js +76 -0
- package/dist/components/Modal/Dialog.d.ts +3 -0
- package/dist/components/Modal/Dialog.js +197 -0
- package/dist/components/Modal/Disclosure.d.ts +3 -0
- package/dist/{src/components → components}/Modal/Disclosure.js +12 -12
- package/dist/components/Modal/constants.d.ts +3 -0
- package/dist/{src/components → components}/Modal/constants.js +8 -6
- package/dist/components/Modal/index.d.ts +42 -0
- package/dist/components/Modal/index.js +114 -0
- package/dist/components/Modal/types.d.ts +48 -0
- package/dist/components/Notice/index.d.ts +11 -0
- package/dist/components/Notice/index.js +39 -0
- package/dist/components/Notification/index.d.ts +36 -0
- package/dist/components/Notification/index.js +88 -0
- package/dist/components/Notification/react-toastify.css.js +4 -0
- package/dist/components/NumberInput/helpers.d.ts +4 -0
- package/dist/{src/components → components}/NumberInput/helpers.js +6 -2
- package/dist/components/NumberInput/index.d.ts +41 -0
- package/dist/components/NumberInput/index.js +349 -0
- package/dist/components/NumberInputV2/index.d.ts +27 -0
- package/dist/components/NumberInputV2/index.js +370 -0
- package/dist/components/Pagination/getPageNumbers.d.ts +8 -0
- package/dist/{src/components → components}/Pagination/getPageNumbers.js +4 -12
- package/dist/components/Pagination/index.d.ts +30 -0
- package/dist/components/Pagination/index.js +124 -0
- package/dist/components/PasswordCheck/index.d.ts +20 -0
- package/dist/components/PasswordCheck/index.js +29 -0
- package/dist/components/PasswordStrengthMeter/index.d.ts +39 -0
- package/dist/components/PasswordStrengthMeter/index.js +98 -0
- package/dist/components/PieChart/Legends.d.ts +9 -0
- package/dist/components/PieChart/Legends.js +120 -0
- package/dist/components/PieChart/Tooltip.d.ts +12 -0
- package/dist/components/PieChart/Tooltip.js +29 -0
- package/dist/components/PieChart/index.d.ts +20 -0
- package/dist/components/PieChart/index.js +120 -0
- package/dist/components/PieChart/types.d.ts +7 -0
- package/dist/components/Popover/index.d.ts +55 -0
- package/dist/components/Popover/index.js +149 -0
- package/dist/components/Popup/animations.d.ts +11 -0
- package/dist/{src/components → components}/Popup/animations.js +7 -6
- package/dist/components/Popup/helpers.d.ts +31 -0
- package/dist/components/Popup/helpers.js +204 -0
- package/dist/components/Popup/index.d.ts +72 -0
- package/dist/components/Popup/index.js +385 -0
- package/dist/components/ProgressBar/index.d.ts +14 -0
- package/dist/components/ProgressBar/index.js +71 -0
- package/dist/components/Radio/index.d.ts +21 -0
- package/dist/components/Radio/index.js +202 -0
- package/dist/components/RadioGroup/index.d.ts +25 -0
- package/dist/components/RadioGroup/index.js +104 -0
- package/dist/components/Row/index.d.ts +22 -0
- package/dist/components/Row/index.js +43 -0
- package/dist/components/SelectInput/index.d.ts +75 -0
- package/dist/components/SelectInput/index.js +563 -0
- package/dist/components/SelectInputV2/Dropdown.d.ts +23 -0
- package/dist/components/SelectInputV2/Dropdown.js +669 -0
- package/dist/components/SelectInputV2/DropdownOption.d.ts +8 -0
- package/dist/components/SelectInputV2/DropdownOption.js +133 -0
- package/dist/components/SelectInputV2/SearchBarDropdown.d.ts +9 -0
- package/dist/components/SelectInputV2/SearchBarDropdown.js +123 -0
- package/dist/components/SelectInputV2/SelectBar.d.ts +14 -0
- package/dist/components/SelectInputV2/SelectBar.js +327 -0
- package/dist/components/SelectInputV2/SelectInputProvider.d.ts +41 -0
- package/dist/components/SelectInputV2/SelectInputProvider.js +203 -0
- package/dist/components/SelectInputV2/findOptionInOptions.d.ts +2 -0
- package/dist/components/SelectInputV2/findOptionInOptions.js +12 -0
- package/dist/components/SelectInputV2/index.d.ts +115 -0
- package/dist/components/SelectInputV2/index.js +146 -0
- package/dist/components/SelectInputV2/types.d.ts +38 -0
- package/dist/{src/components → components}/SelectInputV2/types.js +4 -2
- package/dist/components/SelectableCard/index.d.ts +25 -0
- package/dist/components/SelectableCard/index.js +193 -0
- package/dist/components/SelectableCardGroup/index.d.ts +23 -0
- package/dist/components/SelectableCardGroup/index.js +112 -0
- package/dist/components/Separator/index.d.ts +17 -0
- package/dist/components/Separator/index.js +76 -0
- package/dist/components/Skeleton/Block.d.ts +3 -0
- package/dist/components/Skeleton/Block.js +30 -0
- package/dist/components/Skeleton/Blocks.d.ts +4 -0
- package/dist/components/Skeleton/Blocks.js +28 -0
- package/dist/components/Skeleton/BoxWithIcon.d.ts +4 -0
- package/dist/components/Skeleton/BoxWithIcon.js +29 -0
- package/dist/components/Skeleton/Donut.d.ts +1 -0
- package/dist/components/Skeleton/Donut.js +36 -0
- package/dist/components/Skeleton/IconSkeleton.d.ts +5 -0
- package/dist/components/Skeleton/IconSkeleton.js +12 -0
- package/dist/components/Skeleton/Line.d.ts +5 -0
- package/dist/components/Skeleton/Line.js +13 -0
- package/dist/components/Skeleton/List.d.ts +4 -0
- package/dist/components/Skeleton/List.js +29 -0
- package/dist/components/Skeleton/Slider.d.ts +3 -0
- package/dist/components/Skeleton/Slider.js +26 -0
- package/dist/components/Skeleton/Square.d.ts +5 -0
- package/dist/components/Skeleton/Square.js +10 -0
- package/dist/components/Skeleton/index.d.ts +47 -0
- package/dist/components/Skeleton/index.js +86 -0
- package/dist/components/Snippet/index.d.ts +23 -0
- package/dist/components/Snippet/index.js +171 -0
- package/dist/components/Stack/index.d.ts +23 -0
- package/dist/components/Stack/index.js +36 -0
- package/dist/components/Status/index.d.ts +32 -0
- package/dist/components/Status/index.js +57 -0
- package/dist/components/StepList/index.d.ts +33 -0
- package/dist/components/StepList/index.js +69 -0
- package/dist/components/Stepper/index.d.ts +15 -0
- package/dist/components/Stepper/index.js +153 -0
- package/dist/components/SwitchButton/FocusOverlay.d.ts +8 -0
- package/dist/components/SwitchButton/FocusOverlay.js +47 -0
- package/dist/components/SwitchButton/index.d.ts +26 -0
- package/dist/components/SwitchButton/index.js +140 -0
- package/dist/components/Table/Body.d.ts +6 -0
- package/dist/components/Table/Body.js +5 -0
- package/dist/components/Table/Cell.d.ts +9 -0
- package/dist/components/Table/Cell.js +10 -0
- package/dist/components/Table/Header.d.ts +6 -0
- package/dist/components/Table/Header.js +9 -0
- package/dist/components/Table/HeaderCell.d.ts +14 -0
- package/dist/components/Table/HeaderCell.js +123 -0
- package/dist/components/Table/HeaderRow.d.ts +7 -0
- package/dist/components/Table/HeaderRow.js +25 -0
- package/dist/components/Table/Row.d.ts +14 -0
- package/dist/components/Table/Row.js +85 -0
- package/dist/components/Table/SelectBar.d.ts +15 -0
- package/dist/components/Table/SelectBar.js +35 -0
- package/dist/components/Table/SkeletonRows.d.ts +7 -0
- package/dist/components/Table/SkeletonRows.js +22 -0
- package/dist/components/Table/TableContext.d.ts +27 -0
- package/dist/components/Table/TableContext.js +103 -0
- package/dist/components/Table/index.d.ts +60 -0
- package/dist/components/Table/index.js +81 -0
- package/dist/components/Tabs/Tab.d.ts +20 -0
- package/dist/components/Tabs/Tab.js +170 -0
- package/dist/components/Tabs/TabMenu.d.ts +8 -0
- package/dist/components/Tabs/TabMenu.js +63 -0
- package/dist/components/Tabs/TabMenuItem.d.ts +20 -0
- package/dist/components/Tabs/TabMenuItem.js +39 -0
- package/dist/components/Tabs/TabsContext.d.ts +8 -0
- package/dist/components/Tabs/TabsContext.js +9 -0
- package/dist/components/Tabs/index.d.ts +50 -0
- package/dist/components/Tabs/index.js +137 -0
- package/dist/components/Tag/index.d.ts +26 -0
- package/dist/components/Tag/index.js +153 -0
- package/dist/components/TagInput/index.d.ts +55 -0
- package/dist/components/TagInput/index.js +316 -0
- package/dist/components/TagList/index.d.ts +37 -0
- package/dist/components/TagList/index.js +103 -0
- package/dist/components/Text/index.d.ts +40 -0
- package/dist/components/Text/index.js +107 -0
- package/dist/components/TextArea/index.d.ts +50 -0
- package/dist/components/TextArea/index.js +226 -0
- package/dist/components/TextInput/index.d.ts +75 -0
- package/dist/components/TextInput/index.js +472 -0
- package/dist/components/TextInputV2/index.d.ts +30 -0
- package/dist/components/TextInputV2/index.js +314 -0
- package/dist/components/TimeInput/index.d.ts +25 -0
- package/dist/components/TimeInput/index.js +199 -0
- package/dist/components/Toaster/index.d.ts +46 -0
- package/dist/components/Toaster/index.js +131 -0
- package/dist/components/Toaster/react-toastify.css.js +4 -0
- package/dist/components/Toggle/index.d.ts +34 -0
- package/dist/components/Toggle/index.js +196 -0
- package/dist/components/ToggleGroup/index.d.ts +24 -0
- package/dist/components/ToggleGroup/index.js +87 -0
- package/dist/components/Tooltip/index.d.ts +9 -0
- package/dist/components/Tooltip/index.js +47 -0
- package/dist/components/VerificationCode/index.d.ts +36 -0
- package/dist/components/VerificationCode/index.js +222 -0
- package/dist/components/index.d.ts +75 -0
- package/dist/helpers/isJSON.d.ts +2 -0
- package/dist/{src/helpers → helpers}/isJSON.js +4 -3
- package/dist/helpers/jestMockMatchMedia.d.ts +6 -0
- package/dist/helpers/keycode.d.ts +3 -0
- package/dist/helpers/legend.d.ts +2 -0
- package/dist/helpers/legend.js +14 -0
- package/dist/helpers/numbers.d.ts +2 -0
- package/dist/helpers/recursivelyGetChildrenString.d.ts +3 -0
- package/dist/helpers/recursivelyGetChildrenString.js +15 -0
- package/dist/hooks/useIsOverflowing.d.ts +5 -0
- package/dist/hooks/useIsOverflowing.js +23 -0
- package/dist/index.d.ts +4 -3693
- package/dist/index.js +187 -0
- package/dist/mocks/list.d.ts +12 -0
- package/dist/theme/index.d.ts +1573 -0
- package/dist/theme/index.js +30 -0
- package/dist/types.d.ts +6 -0
- package/dist/utils/animations.d.ts +27 -0
- package/dist/{src/utils → utils}/animations.js +30 -4
- package/dist/utils/capitalize.d.ts +2 -0
- package/dist/utils/capitalize.js +4 -0
- package/dist/utils/ids.d.ts +1 -0
- package/dist/utils/ids.js +6 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/normalize.d.ts +2 -0
- package/dist/{src/utils → utils}/normalize.js +4 -3
- package/dist/utils/orderBy.d.ts +2 -0
- package/dist/utils/responsive/Breakpoint.d.ts +9 -0
- package/dist/utils/responsive/Breakpoint.js +13 -0
- package/dist/utils/responsive/index.d.ts +2 -0
- package/dist/utils/responsive/utilities.d.ts +3 -0
- package/dist/{src/utils → utils}/responsive/utilities.js +9 -6
- package/package.json +23 -13
- package/dist/react-datepicker/dist/react-datepicker.min.css.js +0 -3
- package/dist/react-toastify/dist/ReactToastify.min.css.js +0 -3
- package/dist/src/components/ActionBar/index.js +0 -40
- package/dist/src/components/Alert/index.js +0 -133
- package/dist/src/components/Avatar/index.js +0 -74
- package/dist/src/components/Badge/index.js +0 -116
- package/dist/src/components/Banner/assets/default-image-small.svg.js +0 -5
- package/dist/src/components/Banner/assets/default-image.svg.js +0 -5
- package/dist/src/components/Banner/index.js +0 -159
- package/dist/src/components/BarChart/Tooltip.js +0 -48
- package/dist/src/components/BarChart/index.js +0 -95
- package/dist/src/components/BarStack/index.js +0 -136
- package/dist/src/components/Breadcrumbs/index.js +0 -82
- package/dist/src/components/Bullet/index.js +0 -98
- package/dist/src/components/Button/index.js +0 -311
- package/dist/src/components/Card/index.js +0 -67
- package/dist/src/components/Carousel/index.js +0 -128
- package/dist/src/components/Checkbox/index.js +0 -316
- package/dist/src/components/CheckboxGroup/index.js +0 -143
- package/dist/src/components/CopyButton/index.js +0 -37
- package/dist/src/components/DateInput/index.js +0 -242
- package/dist/src/components/Dialog/Context.js +0 -12
- package/dist/src/components/Dialog/index.js +0 -88
- package/dist/src/components/Dialog/subComponents/Button.js +0 -21
- package/dist/src/components/Dialog/subComponents/Buttons.js +0 -14
- package/dist/src/components/Dialog/subComponents/CancelButton.js +0 -14
- package/dist/src/components/Dialog/subComponents/Stack.js +0 -11
- package/dist/src/components/Dialog/subComponents/Text.js +0 -12
- package/dist/src/components/EmptyState/index.js +0 -112
- package/dist/src/components/Expandable/index.js +0 -96
- package/dist/src/components/GlobalAlert/GlobalAlertLink.js +0 -38
- package/dist/src/components/GlobalAlert/index.js +0 -82
- package/dist/src/components/LineChart/CustomLegend.js +0 -138
- package/dist/src/components/LineChart/Tooltip.js +0 -43
- package/dist/src/components/LineChart/helpers.js +0 -40
- package/dist/src/components/LineChart/index.js +0 -131
- package/dist/src/components/Link/index.js +0 -147
- package/dist/src/components/List/Body.js +0 -16
- package/dist/src/components/List/Cell.js +0 -43
- package/dist/src/components/List/HeaderCell.js +0 -90
- package/dist/src/components/List/HeaderRow.js +0 -43
- package/dist/src/components/List/ListContext.js +0 -138
- package/dist/src/components/List/Row.js +0 -185
- package/dist/src/components/List/SelectBar.js +0 -48
- package/dist/src/components/List/SkeletonRows.js +0 -53
- package/dist/src/components/List/index.js +0 -75
- package/dist/src/components/Loader/index.js +0 -100
- package/dist/src/components/Menu/Item.js +0 -112
- package/dist/src/components/Menu/index.js +0 -129
- package/dist/src/components/MenuV2/Group.js +0 -25
- package/dist/src/components/MenuV2/Item.js +0 -139
- package/dist/src/components/MenuV2/index.js +0 -116
- package/dist/src/components/Meter/index.js +0 -76
- package/dist/src/components/Modal/Dialog.js +0 -182
- package/dist/src/components/Modal/index.js +0 -113
- package/dist/src/components/Notice/index.js +0 -34
- package/dist/src/components/Notification/index.js +0 -77
- package/dist/src/components/NumberInput/index.js +0 -299
- package/dist/src/components/NumberInputV2/index.js +0 -284
- package/dist/src/components/Pagination/index.js +0 -117
- package/dist/src/components/PasswordCheck/index.js +0 -41
- package/dist/src/components/PasswordStrengthMeter/index.js +0 -102
- package/dist/src/components/PieChart/Legends.js +0 -138
- package/dist/src/components/PieChart/Tooltip.js +0 -61
- package/dist/src/components/PieChart/index.js +0 -125
- package/dist/src/components/Popover/index.js +0 -144
- package/dist/src/components/Popup/helpers.js +0 -252
- package/dist/src/components/Popup/index.js +0 -363
- package/dist/src/components/ProgressBar/index.js +0 -57
- package/dist/src/components/Radio/index.js +0 -157
- package/dist/src/components/RadioGroup/index.js +0 -131
- package/dist/src/components/Row/index.js +0 -41
- package/dist/src/components/SelectInput/index.js +0 -610
- package/dist/src/components/SelectInputV2/Dropdown.js +0 -594
- package/dist/src/components/SelectInputV2/DropdownOption.js +0 -130
- package/dist/src/components/SelectInputV2/SearchBarDropdown.js +0 -128
- package/dist/src/components/SelectInputV2/SelectBar.js +0 -282
- package/dist/src/components/SelectInputV2/SelectInputProvider.js +0 -169
- package/dist/src/components/SelectInputV2/findOptionInOptions.js +0 -11
- package/dist/src/components/SelectInputV2/index.js +0 -137
- package/dist/src/components/SelectableCard/index.js +0 -175
- package/dist/src/components/SelectableCardGroup/index.js +0 -141
- package/dist/src/components/Separator/index.js +0 -73
- package/dist/src/components/Skeleton/Block.js +0 -35
- package/dist/src/components/Skeleton/Blocks.js +0 -34
- package/dist/src/components/Skeleton/BoxWithIcon.js +0 -32
- package/dist/src/components/Skeleton/Donut.js +0 -55
- package/dist/src/components/Skeleton/IconSkeleton.js +0 -19
- package/dist/src/components/Skeleton/Line.js +0 -13
- package/dist/src/components/Skeleton/List.js +0 -51
- package/dist/src/components/Skeleton/Slider.js +0 -36
- package/dist/src/components/Skeleton/Square.js +0 -9
- package/dist/src/components/Skeleton/index.js +0 -82
- package/dist/src/components/Snippet/index.js +0 -200
- package/dist/src/components/Stack/index.js +0 -29
- package/dist/src/components/Status/index.js +0 -74
- package/dist/src/components/StepList/index.js +0 -69
- package/dist/src/components/Stepper/index.js +0 -150
- package/dist/src/components/SwitchButton/FocusOverlay.js +0 -37
- package/dist/src/components/SwitchButton/index.js +0 -108
- package/dist/src/components/Table/Body.js +0 -9
- package/dist/src/components/Table/Cell.js +0 -21
- package/dist/src/components/Table/Header.js +0 -15
- package/dist/src/components/Table/HeaderCell.js +0 -103
- package/dist/src/components/Table/HeaderRow.js +0 -32
- package/dist/src/components/Table/Row.js +0 -89
- package/dist/src/components/Table/SelectBar.js +0 -48
- package/dist/src/components/Table/SkeletonRows.js +0 -51
- package/dist/src/components/Table/TableContext.js +0 -90
- package/dist/src/components/Table/index.js +0 -82
- package/dist/src/components/Tabs/Tab.js +0 -138
- package/dist/src/components/Tabs/TabMenu.js +0 -59
- package/dist/src/components/Tabs/TabMenuItem.js +0 -36
- package/dist/src/components/Tabs/TabsContext.js +0 -6
- package/dist/src/components/Tabs/index.js +0 -117
- package/dist/src/components/Tag/index.js +0 -169
- package/dist/src/components/TagInput/index.js +0 -309
- package/dist/src/components/TagList/index.js +0 -106
- package/dist/src/components/Text/index.js +0 -107
- package/dist/src/components/TextArea/index.js +0 -210
- package/dist/src/components/TextInput/index.js +0 -451
- package/dist/src/components/TextInputV2/index.js +0 -289
- package/dist/src/components/TimeInput/index.js +0 -37
- package/dist/src/components/Toaster/index.js +0 -131
- package/dist/src/components/Toggle/index.js +0 -160
- package/dist/src/components/ToggleGroup/index.js +0 -122
- package/dist/src/components/Tooltip/index.js +0 -55
- package/dist/src/components/VerificationCode/index.js +0 -222
- package/dist/src/helpers/legend.js +0 -13
- package/dist/src/helpers/recursivelyGetChildrenString.js +0 -11
- package/dist/src/hooks/useIsOverflowing.js +0 -34
- package/dist/src/index.js +0 -77
- package/dist/src/theme/index.js +0 -29
- package/dist/src/utils/capitalize.js +0 -3
- package/dist/src/utils/ids.js +0 -7
- package/dist/src/utils/responsive/Breakpoint.js +0 -12
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Icon } from '@ultraviolet/icons';
|
|
3
|
-
import { Stack } from '../Stack/index.js';
|
|
4
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
5
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
const ArrowDownIcon = /*#__PURE__*/_styled(Icon, {
|
|
8
|
-
target: "e1q5cnom3"
|
|
9
|
-
})();
|
|
10
|
-
const ArrowUpIcon = /*#__PURE__*/_styled(Icon, {
|
|
11
|
-
target: "e1q5cnom2"
|
|
12
|
-
})();
|
|
13
|
-
const StyledIconContainer = /*#__PURE__*/_styled(Stack, {
|
|
14
|
-
target: "e1q5cnom1"
|
|
15
|
-
})("color:", ({
|
|
16
|
-
theme
|
|
17
|
-
}) => theme.colors.neutral.text, ";&[aria-disabled='true']{cursor:not-allowed;}");
|
|
18
|
-
const SortIcon = () => jsxs(StyledIconContainer, {
|
|
19
|
-
children: [jsx(ArrowUpIcon, {
|
|
20
|
-
name: "arrow-up",
|
|
21
|
-
size: 10
|
|
22
|
-
}), jsx(ArrowDownIcon, {
|
|
23
|
-
name: "arrow-down",
|
|
24
|
-
size: 10
|
|
25
|
-
})]
|
|
26
|
-
});
|
|
27
|
-
const StyledHeaderCell = /*#__PURE__*/_styled("div", {
|
|
28
|
-
target: "e1q5cnom0"
|
|
29
|
-
})("display:flex;text-align:left;flex-direction:row;align-items:center;font-size:", ({
|
|
30
|
-
theme
|
|
31
|
-
}) => theme.typography.bodySmall.fontSize, ";font-weight:", ({
|
|
32
|
-
theme
|
|
33
|
-
}) => theme.typography.bodySmall.weight, ";font-family:", ({
|
|
34
|
-
theme
|
|
35
|
-
}) => theme.typography.bodySmall.fontFamily, ";color:", ({
|
|
36
|
-
theme
|
|
37
|
-
}) => theme.colors.neutral.text, ";gap:", ({
|
|
38
|
-
theme
|
|
39
|
-
}) => theme.space['1'], ";&[role*='button']{cursor:pointer;user-select:none;}&[aria-sort]{color:", ({
|
|
40
|
-
theme
|
|
41
|
-
}) => theme.colors.primary.text, ";}&[aria-sort='ascending'] ", ArrowUpIcon, "{color:", ({
|
|
42
|
-
theme
|
|
43
|
-
}) => theme.colors.primary.text, ";}&[aria-sort='descending'] ", ArrowDownIcon, "{color:", ({
|
|
44
|
-
theme
|
|
45
|
-
}) => theme.colors.primary.text, ";}");
|
|
46
|
-
const HeaderCell = ({
|
|
47
|
-
children,
|
|
48
|
-
isOrdered,
|
|
49
|
-
orderDirection,
|
|
50
|
-
onOrder,
|
|
51
|
-
className,
|
|
52
|
-
info
|
|
53
|
-
}) => {
|
|
54
|
-
let order;
|
|
55
|
-
if (isOrdered && orderDirection === 'asc') {
|
|
56
|
-
order = 'ascending';
|
|
57
|
-
} else if (isOrdered && orderDirection === 'desc') {
|
|
58
|
-
order = 'descending';
|
|
59
|
-
}
|
|
60
|
-
const handleOrder = onOrder ? () => onOrder(order === 'ascending' ? 'desc' : 'asc') : undefined;
|
|
61
|
-
return jsxs(StyledHeaderCell, {
|
|
62
|
-
"aria-sort": order,
|
|
63
|
-
className: className,
|
|
64
|
-
onClick: handleOrder,
|
|
65
|
-
onKeyDown: handleOrder ? event => {
|
|
66
|
-
if (event.key === ' ' || event.key === 'Enter') {
|
|
67
|
-
handleOrder();
|
|
68
|
-
if (event.key === ' ') {
|
|
69
|
-
// @note: it avoid scroll when pressing Space
|
|
70
|
-
event.preventDefault();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
} : undefined,
|
|
74
|
-
role: onOrder ? 'button columnheader' : undefined,
|
|
75
|
-
tabIndex: handleOrder ? 0 : -1,
|
|
76
|
-
children: [children, info ? jsx(Tooltip, {
|
|
77
|
-
text: info,
|
|
78
|
-
children: jsx(Icon, {
|
|
79
|
-
name: "information-outline",
|
|
80
|
-
size: 20,
|
|
81
|
-
prominence: "weak",
|
|
82
|
-
color: "neutral"
|
|
83
|
-
})
|
|
84
|
-
}) : null, orderDirection !== undefined && isOrdered !== undefined ? jsx(SortIcon, {
|
|
85
|
-
"data-sorted": order !== undefined
|
|
86
|
-
}) : null]
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export { HeaderCell };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Checkbox } from '../Checkbox/index.js';
|
|
3
|
-
import { HeaderCell } from './HeaderCell.js';
|
|
4
|
-
import { useListContext } from './ListContext.js';
|
|
5
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
const StyledHeaderRow = /*#__PURE__*/_styled("div", {
|
|
8
|
-
target: "epvvdb70"
|
|
9
|
-
})("column-gap:", ({
|
|
10
|
-
theme
|
|
11
|
-
}) => theme.space['2'], ";padding:0 ", ({
|
|
12
|
-
theme
|
|
13
|
-
}) => theme.space['2'], ";");
|
|
14
|
-
const HeaderRow = ({
|
|
15
|
-
children,
|
|
16
|
-
hasSelectAllColumn
|
|
17
|
-
}) => {
|
|
18
|
-
const {
|
|
19
|
-
allRowSelectValue,
|
|
20
|
-
selectAll,
|
|
21
|
-
unselectAll,
|
|
22
|
-
selectedRowIds,
|
|
23
|
-
expandButton
|
|
24
|
-
} = useListContext();
|
|
25
|
-
const selectableRowCount = Object.keys(selectedRowIds).length;
|
|
26
|
-
return jsxs(StyledHeaderRow, {
|
|
27
|
-
role: "row",
|
|
28
|
-
children: [hasSelectAllColumn ? jsx(HeaderCell, {
|
|
29
|
-
children: jsx(Checkbox, {
|
|
30
|
-
name: "list-select-checkbox",
|
|
31
|
-
value: "all",
|
|
32
|
-
"aria-label": "select all",
|
|
33
|
-
checked: allRowSelectValue,
|
|
34
|
-
onChange: allRowSelectValue === false ? selectAll : unselectAll,
|
|
35
|
-
disabled: selectableRowCount === 0
|
|
36
|
-
})
|
|
37
|
-
}) : null, expandButton ? jsx(HeaderCell, {
|
|
38
|
-
children: null
|
|
39
|
-
}) : null, children]
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export { HeaderRow };
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { useContext, createContext, useState, useCallback, useMemo } from 'react';
|
|
2
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
const ListContext = /*#__PURE__*/createContext(undefined);
|
|
5
|
-
const ListProvider = ({
|
|
6
|
-
children,
|
|
7
|
-
autoCollapse,
|
|
8
|
-
selectable,
|
|
9
|
-
expandButton,
|
|
10
|
-
onSelectedChange
|
|
11
|
-
}) => {
|
|
12
|
-
const [expandedRowIds, setExpandedRowIds] = useState({});
|
|
13
|
-
const [selectedRowIds, setSelectedRowIds] = useState({});
|
|
14
|
-
const registerExpandableRow = useCallback(rowId => {
|
|
15
|
-
setExpandedRowIds(current => ({
|
|
16
|
-
...current,
|
|
17
|
-
[rowId]: false
|
|
18
|
-
}));
|
|
19
|
-
return () => {
|
|
20
|
-
setExpandedRowIds(current => {
|
|
21
|
-
const {
|
|
22
|
-
[rowId]: relatedId,
|
|
23
|
-
...otherIds
|
|
24
|
-
} = current;
|
|
25
|
-
return otherIds;
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
}, []);
|
|
29
|
-
const registerSelectableRow = useCallback(rowId => {
|
|
30
|
-
setSelectedRowIds(current => ({
|
|
31
|
-
...current,
|
|
32
|
-
[rowId]: false
|
|
33
|
-
}));
|
|
34
|
-
return () => {
|
|
35
|
-
setSelectedRowIds(current => {
|
|
36
|
-
const {
|
|
37
|
-
[rowId]: relatedId,
|
|
38
|
-
...otherIds
|
|
39
|
-
} = current;
|
|
40
|
-
return otherIds;
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
}, []);
|
|
44
|
-
const expandRow = useCallback(rowId => {
|
|
45
|
-
setExpandedRowIds(current => ({
|
|
46
|
-
...(autoCollapse ? {} : current),
|
|
47
|
-
[rowId]: true
|
|
48
|
-
}));
|
|
49
|
-
}, [autoCollapse]);
|
|
50
|
-
const collapseRow = useCallback(rowId => {
|
|
51
|
-
setExpandedRowIds(current => ({
|
|
52
|
-
...current,
|
|
53
|
-
[rowId]: false
|
|
54
|
-
}));
|
|
55
|
-
}, []);
|
|
56
|
-
const allRowSelectValue = useMemo(() => {
|
|
57
|
-
const selectableRowCount = Object.keys(selectedRowIds).length;
|
|
58
|
-
if (!selectableRowCount) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
const selectedRowCount = Object.values(selectedRowIds).reduce((acc, isSelected) => acc + (isSelected ? 1 : 0), 0);
|
|
62
|
-
if (selectedRowCount === 0) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
if (selectableRowCount === selectedRowCount) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
return 'indeterminate';
|
|
69
|
-
}, [selectedRowIds]);
|
|
70
|
-
const selectAll = useCallback(() => {
|
|
71
|
-
const newSelectedRowIds = Object.keys(selectedRowIds).reduce((acc, rowId) => ({
|
|
72
|
-
...acc,
|
|
73
|
-
[rowId]: true
|
|
74
|
-
}), {});
|
|
75
|
-
setSelectedRowIds(newSelectedRowIds);
|
|
76
|
-
if (onSelectedChange) {
|
|
77
|
-
onSelectedChange(Object.keys(newSelectedRowIds).filter(row => newSelectedRowIds[row]));
|
|
78
|
-
}
|
|
79
|
-
}, [onSelectedChange, selectedRowIds]);
|
|
80
|
-
const unselectAll = useCallback(() => {
|
|
81
|
-
const newSelectedRowIds = Object.keys(selectedRowIds).reduce((acc, rowId) => ({
|
|
82
|
-
...acc,
|
|
83
|
-
[rowId]: false
|
|
84
|
-
}), {});
|
|
85
|
-
setSelectedRowIds(newSelectedRowIds);
|
|
86
|
-
if (onSelectedChange) {
|
|
87
|
-
onSelectedChange(Object.keys(newSelectedRowIds).filter(row => newSelectedRowIds[row]));
|
|
88
|
-
}
|
|
89
|
-
}, [onSelectedChange, selectedRowIds]);
|
|
90
|
-
const selectRow = useCallback(rowId => {
|
|
91
|
-
const newSelectedRowIds = {
|
|
92
|
-
...selectedRowIds,
|
|
93
|
-
[rowId]: true
|
|
94
|
-
};
|
|
95
|
-
setSelectedRowIds(newSelectedRowIds);
|
|
96
|
-
if (onSelectedChange) {
|
|
97
|
-
onSelectedChange(Object.keys(newSelectedRowIds).filter(row => newSelectedRowIds[row]));
|
|
98
|
-
}
|
|
99
|
-
}, [onSelectedChange, selectedRowIds]);
|
|
100
|
-
const unselectRow = useCallback(rowId => {
|
|
101
|
-
const newSelectedRowIds = {
|
|
102
|
-
...selectedRowIds,
|
|
103
|
-
[rowId]: false
|
|
104
|
-
};
|
|
105
|
-
setSelectedRowIds(newSelectedRowIds);
|
|
106
|
-
if (onSelectedChange) {
|
|
107
|
-
onSelectedChange(Object.keys(newSelectedRowIds).filter(row => newSelectedRowIds[row]));
|
|
108
|
-
}
|
|
109
|
-
}, [onSelectedChange, selectedRowIds]);
|
|
110
|
-
const value = useMemo(() => ({
|
|
111
|
-
registerExpandableRow,
|
|
112
|
-
expandedRowIds,
|
|
113
|
-
expandRow,
|
|
114
|
-
collapseRow,
|
|
115
|
-
registerSelectableRow,
|
|
116
|
-
selectedRowIds,
|
|
117
|
-
selectRow,
|
|
118
|
-
unselectRow,
|
|
119
|
-
selectable,
|
|
120
|
-
selectAll,
|
|
121
|
-
unselectAll,
|
|
122
|
-
allRowSelectValue,
|
|
123
|
-
expandButton
|
|
124
|
-
}), [registerExpandableRow, expandedRowIds, expandRow, collapseRow, registerSelectableRow, selectedRowIds, selectRow, unselectRow, selectable, selectAll, unselectAll, allRowSelectValue, expandButton]);
|
|
125
|
-
return jsx(ListContext.Provider, {
|
|
126
|
-
value: value,
|
|
127
|
-
children: children
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
const useListContext = () => {
|
|
131
|
-
const context = useContext(ListContext);
|
|
132
|
-
if (!context) {
|
|
133
|
-
throw new Error('useListContext should be used inside a List component');
|
|
134
|
-
}
|
|
135
|
-
return context;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
export { ListProvider, useListContext };
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { forwardRef, useEffect } from 'react';
|
|
3
|
-
import { Button } from '../Button/index.js';
|
|
4
|
-
import { Checkbox } from '../Checkbox/index.js';
|
|
5
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
6
|
-
import { Cell } from './Cell.js';
|
|
7
|
-
import { useListContext } from './ListContext.js';
|
|
8
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
9
|
-
|
|
10
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { 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)."; }
|
|
11
|
-
const ExpandableWrapper = /*#__PURE__*/_styled("div", {
|
|
12
|
-
target: "ei4uyz12"
|
|
13
|
-
})("grid-column:1/-1;grid-column-start:1;border-top:1px solid ", ({
|
|
14
|
-
theme
|
|
15
|
-
}) => theme.colors.neutral.border, ";margin:0 -", ({
|
|
16
|
-
theme
|
|
17
|
-
}) => theme.space['2'], ";padding:", ({
|
|
18
|
-
theme
|
|
19
|
-
}) => theme.space['2'], ";cursor:auto;background:", ({
|
|
20
|
-
theme
|
|
21
|
-
}) => theme.colors.neutral.backgroundWeak, ";border-radius:0 0 ", ({
|
|
22
|
-
theme
|
|
23
|
-
}) => theme.radii.default, " ", ({
|
|
24
|
-
theme
|
|
25
|
-
}) => theme.radii.default, ";");
|
|
26
|
-
const StyledRow = /*#__PURE__*/_styled('div', {
|
|
27
|
-
shouldForwardProp: prop => !['sentiment'].includes(prop),
|
|
28
|
-
target: "ei4uyz11"
|
|
29
|
-
})("position:relative;border:1px solid ", ({
|
|
30
|
-
theme
|
|
31
|
-
}) => theme.colors.neutral.border, ";border-radius:", ({
|
|
32
|
-
theme
|
|
33
|
-
}) => theme.radii.default, ";transition:box-shadow 200ms ease,border-color 200ms ease;box-shadow:none;background-color:", ({
|
|
34
|
-
theme
|
|
35
|
-
}) => theme.colors.neutral.background, ";font-size:", ({
|
|
36
|
-
theme
|
|
37
|
-
}) => theme.typography.bodySmall.fontSize, ";column-gap:", ({
|
|
38
|
-
theme
|
|
39
|
-
}) => theme.space['2'], ";padding:0 ", ({
|
|
40
|
-
theme
|
|
41
|
-
}) => theme.space['2'], ";&[role='button row']{cursor:pointer;}", ({
|
|
42
|
-
theme,
|
|
43
|
-
sentiment
|
|
44
|
-
}) => `
|
|
45
|
-
color: ${theme.colors[sentiment].text};
|
|
46
|
-
border-color: ${theme.colors[sentiment].border};
|
|
47
|
-
background-color: ${theme.colors[sentiment].background};
|
|
48
|
-
& [data-expandable-content] {
|
|
49
|
-
border-color: ${theme.colors[sentiment].border};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
${sentiment === 'neutral' ? `&:hover {
|
|
53
|
-
border-color: ${theme.colors.primary.border};
|
|
54
|
-
box-shadow: ${theme.shadows.hoverPrimary};
|
|
55
|
-
}
|
|
56
|
-
` : ''}
|
|
57
|
-
`, " &[data-highlight='true']{border-color:", ({
|
|
58
|
-
theme
|
|
59
|
-
}) => theme.colors.primary.border, ";box-shadow:", ({
|
|
60
|
-
theme
|
|
61
|
-
}) => theme.shadows.hoverPrimary, ";}&[aria-disabled='true']{border:1px solid ", ({
|
|
62
|
-
theme
|
|
63
|
-
}) => theme.colors.neutral.borderDisabled, ";background-color:", ({
|
|
64
|
-
theme
|
|
65
|
-
}) => theme.colors.neutral.backgroundDisabled, ";color:", ({
|
|
66
|
-
theme
|
|
67
|
-
}) => theme.colors.neutral.textDisabled, ";cursor:not-allowed;}");
|
|
68
|
-
const StyledCheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
69
|
-
target: "ei4uyz10"
|
|
70
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
71
|
-
name: "zjik7",
|
|
72
|
-
styles: "display:flex"
|
|
73
|
-
} : {
|
|
74
|
-
name: "zjik7",
|
|
75
|
-
styles: "display:flex",
|
|
76
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
77
|
-
});
|
|
78
|
-
const Row = /*#__PURE__*/forwardRef(({
|
|
79
|
-
children,
|
|
80
|
-
id,
|
|
81
|
-
expandable,
|
|
82
|
-
disabled,
|
|
83
|
-
selectDisabled,
|
|
84
|
-
sentiment = 'neutral',
|
|
85
|
-
className,
|
|
86
|
-
'data-testid': dataTestid
|
|
87
|
-
}, ref) => {
|
|
88
|
-
const {
|
|
89
|
-
selectable,
|
|
90
|
-
registerExpandableRow,
|
|
91
|
-
expandedRowIds,
|
|
92
|
-
expandRow,
|
|
93
|
-
collapseRow,
|
|
94
|
-
registerSelectableRow,
|
|
95
|
-
selectedRowIds,
|
|
96
|
-
selectRow,
|
|
97
|
-
unselectRow,
|
|
98
|
-
expandButton
|
|
99
|
-
} = useListContext();
|
|
100
|
-
const isSelectDisabled = disabled || selectDisabled !== undefined && selectDisabled !== false;
|
|
101
|
-
const hasExpandable = !!expandable;
|
|
102
|
-
useEffect(() => {
|
|
103
|
-
if (hasExpandable) {
|
|
104
|
-
const unregisterCallback = registerExpandableRow(id);
|
|
105
|
-
return unregisterCallback;
|
|
106
|
-
}
|
|
107
|
-
return undefined;
|
|
108
|
-
}, [id, hasExpandable, registerExpandableRow]);
|
|
109
|
-
useEffect(() => {
|
|
110
|
-
if (!isSelectDisabled) {
|
|
111
|
-
const unregisterCallback = registerSelectableRow(id);
|
|
112
|
-
return unregisterCallback;
|
|
113
|
-
}
|
|
114
|
-
return undefined;
|
|
115
|
-
}, [id, registerSelectableRow, isSelectDisabled]);
|
|
116
|
-
const toggleRowExpand = () => {
|
|
117
|
-
if (expandedRowIds[id]) {
|
|
118
|
-
collapseRow(id);
|
|
119
|
-
} else {
|
|
120
|
-
expandRow(id);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
const canClickRowToExpand = !disabled && !!expandable && !expandButton;
|
|
124
|
-
return jsxs(StyledRow, {
|
|
125
|
-
className: className,
|
|
126
|
-
ref: ref,
|
|
127
|
-
role: canClickRowToExpand ? 'button row' : 'row',
|
|
128
|
-
onClick: canClickRowToExpand ? toggleRowExpand : undefined,
|
|
129
|
-
onKeyDown: canClickRowToExpand ? event => {
|
|
130
|
-
if (event.key === ' ') {
|
|
131
|
-
toggleRowExpand();
|
|
132
|
-
event.preventDefault();
|
|
133
|
-
}
|
|
134
|
-
} : undefined,
|
|
135
|
-
tabIndex: canClickRowToExpand ? 0 : -1,
|
|
136
|
-
sentiment: sentiment,
|
|
137
|
-
"aria-disabled": disabled,
|
|
138
|
-
"aria-expanded": expandable ? expandedRowIds[id] : undefined,
|
|
139
|
-
"data-highlight": !!selectedRowIds[id],
|
|
140
|
-
"data-testid": dataTestid,
|
|
141
|
-
children: [selectable ? jsx(Cell, {
|
|
142
|
-
preventClick: canClickRowToExpand,
|
|
143
|
-
children: jsx(StyledCheckboxContainer, {
|
|
144
|
-
children: jsx(Tooltip, {
|
|
145
|
-
text: typeof selectDisabled === 'string' ? selectDisabled : undefined,
|
|
146
|
-
children: jsx(Checkbox, {
|
|
147
|
-
name: "list-select-checkbox",
|
|
148
|
-
"aria-label": "select",
|
|
149
|
-
checked: selectedRowIds[id],
|
|
150
|
-
value: id,
|
|
151
|
-
onChange: () => {
|
|
152
|
-
if (selectedRowIds[id]) {
|
|
153
|
-
unselectRow(id);
|
|
154
|
-
} else {
|
|
155
|
-
selectRow(id);
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
disabled: isSelectDisabled
|
|
159
|
-
})
|
|
160
|
-
})
|
|
161
|
-
})
|
|
162
|
-
}) : null, expandButton ? jsx(Cell, {
|
|
163
|
-
preventClick: true,
|
|
164
|
-
children: jsx(Button, {
|
|
165
|
-
disabled: disabled || !expandable,
|
|
166
|
-
icon: expandedRowIds[id] ? 'arrow-up' : 'arrow-down',
|
|
167
|
-
onClick: toggleRowExpand,
|
|
168
|
-
size: "small",
|
|
169
|
-
sentiment: "neutral",
|
|
170
|
-
variant: "ghost"
|
|
171
|
-
})
|
|
172
|
-
}) : null, children, expandable && expandedRowIds[id] ? jsx(ExpandableWrapper, {
|
|
173
|
-
"data-expandable-content": true,
|
|
174
|
-
onClick: canClickRowToExpand ? e => {
|
|
175
|
-
e.stopPropagation();
|
|
176
|
-
} : undefined,
|
|
177
|
-
onKeyDown: canClickRowToExpand ? e => {
|
|
178
|
-
e.stopPropagation();
|
|
179
|
-
} : undefined,
|
|
180
|
-
children: expandable
|
|
181
|
-
}) : null]
|
|
182
|
-
});
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
export { Row, StyledRow };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { ActionBar } from '../ActionBar/index.js';
|
|
4
|
-
import { useListContext } from './ListContext.js';
|
|
5
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { 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)."; }
|
|
8
|
-
const StyledActionBar = /*#__PURE__*/_styled(ActionBar, {
|
|
9
|
-
target: "eo69e461"
|
|
10
|
-
})("display:flex;align-items:center;padding:0 ", ({
|
|
11
|
-
theme
|
|
12
|
-
}) => theme.space['1'], ";");
|
|
13
|
-
const FlexDiv = /*#__PURE__*/_styled("div", {
|
|
14
|
-
target: "eo69e460"
|
|
15
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
16
|
-
name: "82a6rk",
|
|
17
|
-
styles: "flex:1"
|
|
18
|
-
} : {
|
|
19
|
-
name: "82a6rk",
|
|
20
|
-
styles: "flex:1",
|
|
21
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
22
|
-
});
|
|
23
|
-
function SelectBar({
|
|
24
|
-
children,
|
|
25
|
-
data,
|
|
26
|
-
idKey,
|
|
27
|
-
className
|
|
28
|
-
}) {
|
|
29
|
-
const {
|
|
30
|
-
selectedRowIds,
|
|
31
|
-
unselectAll
|
|
32
|
-
} = useListContext();
|
|
33
|
-
const selectedItems = useMemo(() => data.filter(item => selectedRowIds[item[idKey]]), [data, idKey, selectedRowIds]);
|
|
34
|
-
if (selectedItems.length === 0) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
return jsx(StyledActionBar, {
|
|
38
|
-
className: className,
|
|
39
|
-
children: jsx(FlexDiv, {
|
|
40
|
-
children: children({
|
|
41
|
-
selectedItems,
|
|
42
|
-
unselectAll
|
|
43
|
-
})
|
|
44
|
-
})
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { SelectBar };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Skeleton } from '../Skeleton/index.js';
|
|
3
|
-
import { Cell } from './Cell.js';
|
|
4
|
-
import { StyledRow } from './Row.js';
|
|
5
|
-
import { jsx, Fragment, jsxs } from '@emotion/react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { 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)."; }
|
|
8
|
-
const StyledLoadingRow = /*#__PURE__*/_styled(StyledRow, {
|
|
9
|
-
target: "efawmbb1"
|
|
10
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
11
|
-
name: "g8zzui",
|
|
12
|
-
styles: "cursor:progress"
|
|
13
|
-
} : {
|
|
14
|
-
name: "g8zzui",
|
|
15
|
-
styles: "cursor:progress",
|
|
16
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
17
|
-
});
|
|
18
|
-
const StyledSkeleton = /*#__PURE__*/_styled(Skeleton, {
|
|
19
|
-
target: "efawmbb0"
|
|
20
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
21
|
-
name: "bet25o",
|
|
22
|
-
styles: "width:80%;max-width:100%"
|
|
23
|
-
} : {
|
|
24
|
-
name: "bet25o",
|
|
25
|
-
styles: "width:80%;max-width:100%",
|
|
26
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
|
-
});
|
|
28
|
-
const SkeletonRows = ({
|
|
29
|
-
selectable,
|
|
30
|
-
rows,
|
|
31
|
-
cols
|
|
32
|
-
}) => {
|
|
33
|
-
const rowArray = Array.from({
|
|
34
|
-
length: rows
|
|
35
|
-
}, (_, index) => index);
|
|
36
|
-
const colArray = Array.from({
|
|
37
|
-
length: cols
|
|
38
|
-
}, (_, index) => index);
|
|
39
|
-
return jsx(Fragment, {
|
|
40
|
-
children: rowArray.map(index => jsxs(StyledLoadingRow, {
|
|
41
|
-
sentiment: "neutral",
|
|
42
|
-
role: "row",
|
|
43
|
-
id: `skeleton-${index}`,
|
|
44
|
-
children: [selectable ? jsx("div", {}) : null, colArray.map(columnIndex => jsx(Cell, {
|
|
45
|
-
children: jsx(StyledSkeleton, {
|
|
46
|
-
variant: "line"
|
|
47
|
-
})
|
|
48
|
-
}, columnIndex))]
|
|
49
|
-
}, index))
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export { SkeletonRows };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { Body } from './Body.js';
|
|
4
|
-
import { Cell } from './Cell.js';
|
|
5
|
-
import { HeaderCell } from './HeaderCell.js';
|
|
6
|
-
import { HeaderRow } from './HeaderRow.js';
|
|
7
|
-
import { useListContext, ListProvider } from './ListContext.js';
|
|
8
|
-
import { Row } from './Row.js';
|
|
9
|
-
import { SelectBar } from './SelectBar.js';
|
|
10
|
-
import { SkeletonRows } from './SkeletonRows.js';
|
|
11
|
-
import { SELECTABLE_CHECKBOX_SIZE, EXPANDABLE_COLUMN_SIZE } from './constants.js';
|
|
12
|
-
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
const StyledList = /*#__PURE__*/_styled('div', {
|
|
15
|
-
shouldForwardProp: prop => !['template'].includes(prop),
|
|
16
|
-
target: "ef5qi0"
|
|
17
|
-
})("display:flex;flex-flow:column nowrap;width:100%;gap:", ({
|
|
18
|
-
theme
|
|
19
|
-
}) => theme.space['1'], ";[role='row'],[role='button row']{display:grid;width:100%;grid-template-columns:", ({
|
|
20
|
-
template
|
|
21
|
-
}) => template, ";align-items:center;}");
|
|
22
|
-
const BaseList = /*#__PURE__*/forwardRef(({
|
|
23
|
-
expandable = false,
|
|
24
|
-
selectable = false,
|
|
25
|
-
columns,
|
|
26
|
-
children,
|
|
27
|
-
loading,
|
|
28
|
-
autoCollapse = false,
|
|
29
|
-
onSelectedChange
|
|
30
|
-
}, ref) => {
|
|
31
|
-
const computeTemplate = `${selectable ? `${SELECTABLE_CHECKBOX_SIZE}px ` : ''}${expandable ? `${EXPANDABLE_COLUMN_SIZE}px ` : ''}${columns.map(({
|
|
32
|
-
width
|
|
33
|
-
}) => width ?? 'minmax(0, 1fr)').join(' ')}`;
|
|
34
|
-
return jsx(ListProvider, {
|
|
35
|
-
selectable: selectable,
|
|
36
|
-
expandButton: expandable,
|
|
37
|
-
autoCollapse: autoCollapse,
|
|
38
|
-
onSelectedChange: onSelectedChange,
|
|
39
|
-
children: jsxs(StyledList, {
|
|
40
|
-
ref: ref,
|
|
41
|
-
role: "grid",
|
|
42
|
-
template: computeTemplate,
|
|
43
|
-
children: [jsx(HeaderRow, {
|
|
44
|
-
hasSelectAllColumn: selectable,
|
|
45
|
-
children: columns.map((column, index) => jsx(HeaderCell
|
|
46
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
47
|
-
, {
|
|
48
|
-
isOrdered: column.isOrdered,
|
|
49
|
-
orderDirection: column.orderDirection,
|
|
50
|
-
onOrder: column.onOrder,
|
|
51
|
-
info: column.info,
|
|
52
|
-
children: column.label
|
|
53
|
-
}, `header-column-${index}`))
|
|
54
|
-
}), jsx(Body, {
|
|
55
|
-
children: loading ? jsx(SkeletonRows, {
|
|
56
|
-
selectable: selectable,
|
|
57
|
-
rows: 5,
|
|
58
|
-
cols: columns.length
|
|
59
|
-
}) : children
|
|
60
|
-
})]
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* List is a component that displays a list of items based on the columns you provide and the data you pass.
|
|
67
|
-
*/
|
|
68
|
-
const List = /*#__PURE__*/Object.assign(BaseList, {
|
|
69
|
-
Row,
|
|
70
|
-
Cell,
|
|
71
|
-
SelectBar,
|
|
72
|
-
useListContext
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
export { List };
|