@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,69 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Bullet } from '../Bullet/index.js';
|
|
3
|
-
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const Steps = /*#__PURE__*/_styled("ul", {
|
|
6
|
-
target: "ewuati22"
|
|
7
|
-
})("list-style:none;padding-left:0;text-align:left;display:flex;flex-direction:column;gap:", ({
|
|
8
|
-
theme
|
|
9
|
-
}) => theme.space['3'], ";font-size:16px;");
|
|
10
|
-
const Step = /*#__PURE__*/_styled('li', {
|
|
11
|
-
shouldForwardProp: prop => !['disabled'].includes(prop),
|
|
12
|
-
target: "ewuati21"
|
|
13
|
-
})("display:flex;align-items:flex-start;gap:1rem;justify-content:center;color:", ({
|
|
14
|
-
theme,
|
|
15
|
-
disabled
|
|
16
|
-
}) => disabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.textStrong, ";");
|
|
17
|
-
const StyledDiv = /*#__PURE__*/_styled('div', {
|
|
18
|
-
shouldForwardProp: prop => !['size'].includes(prop),
|
|
19
|
-
target: "ewuati20"
|
|
20
|
-
})("flex:1;margin:auto;line-height:", ({
|
|
21
|
-
size
|
|
22
|
-
}) => size === 'medium' ? '32px' : '24px', ";font-size:", ({
|
|
23
|
-
size
|
|
24
|
-
}) => size === 'medium' ? '24px' : '16px', ";");
|
|
25
|
-
const Item = ({
|
|
26
|
-
bulletText,
|
|
27
|
-
bulletIcon,
|
|
28
|
-
sentiment,
|
|
29
|
-
prominence,
|
|
30
|
-
children,
|
|
31
|
-
onClick,
|
|
32
|
-
size = 'medium',
|
|
33
|
-
disabled = false,
|
|
34
|
-
className
|
|
35
|
-
}) => jsxs(Step, {
|
|
36
|
-
disabled: disabled,
|
|
37
|
-
className: className,
|
|
38
|
-
onClick: onClick,
|
|
39
|
-
children: [bulletIcon ? jsx(Bullet, {
|
|
40
|
-
icon: bulletIcon,
|
|
41
|
-
size: size,
|
|
42
|
-
sentiment: disabled ? 'disabled' : sentiment,
|
|
43
|
-
prominence: prominence
|
|
44
|
-
}) : null, bulletText ? jsx(Bullet, {
|
|
45
|
-
text: bulletText,
|
|
46
|
-
size: size,
|
|
47
|
-
sentiment: disabled ? 'disabled' : sentiment,
|
|
48
|
-
prominence: prominence
|
|
49
|
-
}) : null, jsx(StyledDiv, {
|
|
50
|
-
size: size,
|
|
51
|
-
children: children
|
|
52
|
-
})]
|
|
53
|
-
});
|
|
54
|
-
/**
|
|
55
|
-
* StepList component is used to display a list of steps.
|
|
56
|
-
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
57
|
-
*/
|
|
58
|
-
const StepList = ({
|
|
59
|
-
children,
|
|
60
|
-
className,
|
|
61
|
-
'data-testid': dataTestId
|
|
62
|
-
}) => jsx(Steps, {
|
|
63
|
-
className: className,
|
|
64
|
-
"data-testid": dataTestId,
|
|
65
|
-
children: children
|
|
66
|
-
});
|
|
67
|
-
StepList.Item = Item;
|
|
68
|
-
|
|
69
|
-
export { StepList };
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { keyframes, css } from '@emotion/react';
|
|
3
|
-
import { Children, Fragment } from 'react';
|
|
4
|
-
import { Bullet } from '../Bullet/index.js';
|
|
5
|
-
import { Text } from '../Text/index.js';
|
|
6
|
-
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
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)."; }
|
|
9
|
-
const LINE_HEIGHT_SIZES = {
|
|
10
|
-
small: 2,
|
|
11
|
-
medium: 4
|
|
12
|
-
};
|
|
13
|
-
const loadingAnimation = keyframes`
|
|
14
|
-
from {
|
|
15
|
-
width: 0;
|
|
16
|
-
}
|
|
17
|
-
to {
|
|
18
|
-
width: 100%;
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
21
|
-
const StyledStepContainer = /*#__PURE__*/_styled("div", {
|
|
22
|
-
target: "e19ft7rb4"
|
|
23
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
24
|
-
name: "b8wmnj",
|
|
25
|
-
styles: "display:flex;flex-direction:column;align-items:center;justify-content:flex-start"
|
|
26
|
-
} : {
|
|
27
|
-
name: "b8wmnj",
|
|
28
|
-
styles: "display:flex;flex-direction:column;align-items:center;justify-content:flex-start",
|
|
29
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
|
-
});
|
|
31
|
-
const StyledText = /*#__PURE__*/_styled(Text, {
|
|
32
|
-
target: "e19ft7rb3"
|
|
33
|
-
})("margin-top:", ({
|
|
34
|
-
theme
|
|
35
|
-
}) => theme.space['1'], ";");
|
|
36
|
-
const StyledBullet = /*#__PURE__*/_styled(Bullet, {
|
|
37
|
-
target: "e19ft7rb2"
|
|
38
|
-
})("margin-top:", ({
|
|
39
|
-
theme,
|
|
40
|
-
size
|
|
41
|
-
}) => size === 'small' ? theme.space['0.5'] : 0, ";");
|
|
42
|
-
const loadingStyle = /*#__PURE__*/css("animation:", loadingAnimation, " 1s linear infinite;");
|
|
43
|
-
const StyledLine = /*#__PURE__*/_styled("div", {
|
|
44
|
-
target: "e19ft7rb1"
|
|
45
|
-
})("border-radius:", ({
|
|
46
|
-
theme
|
|
47
|
-
}) => theme.radii.default, ";flex-grow:1;border-radius:", ({
|
|
48
|
-
theme
|
|
49
|
-
}) => theme.radii.default, ";background-color:", ({
|
|
50
|
-
theme
|
|
51
|
-
}) => theme.colors.neutral.backgroundStrong, ";position:relative;::after{content:'';position:absolute;left:0;top:0;height:100%;border-radius:", ({
|
|
52
|
-
theme
|
|
53
|
-
}) => theme.radii.default, ";background-color:", ({
|
|
54
|
-
theme
|
|
55
|
-
}) => theme.colors.primary.backgroundStrong, ";", ({
|
|
56
|
-
temporal
|
|
57
|
-
}) => temporal === 'previous' && `width: 100%;`, " ", ({
|
|
58
|
-
temporal,
|
|
59
|
-
animated
|
|
60
|
-
}) => temporal === 'current' && animated && loadingStyle, ";}");
|
|
61
|
-
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
62
|
-
target: "e19ft7rb0"
|
|
63
|
-
})("display:flex;flex-direction:row;justify-content:center;align-items:flex-start;gap:0 ", ({
|
|
64
|
-
theme
|
|
65
|
-
}) => theme.space['1'], ";gap:", ({
|
|
66
|
-
theme,
|
|
67
|
-
labelPosition,
|
|
68
|
-
size
|
|
69
|
-
}) => size === 'medium' && labelPosition === 'bottom' ? theme.space['0'] : theme.space['1'], ";", StyledStepContainer, "{display:flex;flex-direction:", ({
|
|
70
|
-
labelPosition
|
|
71
|
-
}) => labelPosition === 'bottom' ? 'column' : 'row', ";align-items:", ({
|
|
72
|
-
labelPosition
|
|
73
|
-
}) => labelPosition === 'bottom' ? 'center' : 'baseline', ";gap:", ({
|
|
74
|
-
theme,
|
|
75
|
-
labelPosition
|
|
76
|
-
}) => labelPosition === 'bottom' ? theme.space['0.5'] : theme.space['1'], ";white-space:nowrap;}", StyledLine, "{height:", ({
|
|
77
|
-
size
|
|
78
|
-
}) => LINE_HEIGHT_SIZES[size], "px;margin-top:", ({
|
|
79
|
-
theme
|
|
80
|
-
}) => theme.space['2'], ";margin-bottom:", ({
|
|
81
|
-
theme
|
|
82
|
-
}) => theme.space['2'], ";}");
|
|
83
|
-
const StepperNumbers = ({
|
|
84
|
-
temporal,
|
|
85
|
-
children,
|
|
86
|
-
CurrentStep,
|
|
87
|
-
size = 'medium'
|
|
88
|
-
}) => jsxs(StyledStepContainer, {
|
|
89
|
-
children: [jsx(StyledBullet, {
|
|
90
|
-
sentiment: temporal === 'next' ? 'neutral' : 'primary',
|
|
91
|
-
...(temporal === 'previous' ? {
|
|
92
|
-
icon: 'check'
|
|
93
|
-
} : {
|
|
94
|
-
text: CurrentStep.toString()
|
|
95
|
-
}),
|
|
96
|
-
prominence: temporal !== 'current' ? 'default' : 'strong',
|
|
97
|
-
size: size
|
|
98
|
-
}), jsx(StyledText, {
|
|
99
|
-
as: "span",
|
|
100
|
-
variant: size === 'medium' ? 'body' : 'bodySmall',
|
|
101
|
-
prominence: temporal === 'next' ? 'weak' : 'default',
|
|
102
|
-
children: children
|
|
103
|
-
})]
|
|
104
|
-
});
|
|
105
|
-
/**
|
|
106
|
-
* Stepper component to show the progress of a process in a linear way.
|
|
107
|
-
*/
|
|
108
|
-
const Stepper = ({
|
|
109
|
-
children,
|
|
110
|
-
selected = 0,
|
|
111
|
-
animated = false,
|
|
112
|
-
className,
|
|
113
|
-
labelPosition = 'bottom',
|
|
114
|
-
size = 'medium',
|
|
115
|
-
'data-testid': dataTestId
|
|
116
|
-
}) => {
|
|
117
|
-
const cleanChildren = Children.toArray(children);
|
|
118
|
-
const lastStep = Children.count(cleanChildren) - 1;
|
|
119
|
-
return jsx(StyledContainer, {
|
|
120
|
-
className: className,
|
|
121
|
-
"data-testid": dataTestId,
|
|
122
|
-
labelPosition: labelPosition,
|
|
123
|
-
size: size,
|
|
124
|
-
children: Children.map(cleanChildren, (child, index) => {
|
|
125
|
-
const getTemporal = () => {
|
|
126
|
-
if (selected > index) return 'previous';
|
|
127
|
-
if (selected === index) return 'current';
|
|
128
|
-
return 'next';
|
|
129
|
-
};
|
|
130
|
-
const isNotLast = index < lastStep;
|
|
131
|
-
const temporal = getTemporal();
|
|
132
|
-
return (
|
|
133
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
134
|
-
jsxs(Fragment, {
|
|
135
|
-
children: [jsx(StepperNumbers, {
|
|
136
|
-
CurrentStep: index + 1,
|
|
137
|
-
temporal: temporal,
|
|
138
|
-
size: size,
|
|
139
|
-
children: child
|
|
140
|
-
}), isNotLast ? jsx(StyledLine, {
|
|
141
|
-
temporal: temporal,
|
|
142
|
-
animated: animated
|
|
143
|
-
}) : null]
|
|
144
|
-
}, `creation-progress-${index}`)
|
|
145
|
-
);
|
|
146
|
-
})
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export { Stepper };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const FOCUS_OVERLAY_SCALE_RATIO = 6;
|
|
6
|
-
const FOCUS_OVERLAY_PIXEL_RIGHT_OFFSET = 8;
|
|
7
|
-
const StyledDiv = /*#__PURE__*/_styled("div", {
|
|
8
|
-
target: "etutiin0"
|
|
9
|
-
})("position:absolute;height:calc(100% - ", ({
|
|
10
|
-
theme
|
|
11
|
-
}) => theme.space['1'], ");border-radius:", ({
|
|
12
|
-
theme
|
|
13
|
-
}) => theme.radii.default, ";background:", ({
|
|
14
|
-
theme
|
|
15
|
-
}) => theme.colors.primary.backgroundStrong, ";transform-origin:left center;transition:all 200ms ease-in-out;&[data-focusposition='right']{transform-origin:right center;}");
|
|
16
|
-
const FocusOverlay = ({
|
|
17
|
-
focusPosition,
|
|
18
|
-
rightCardWidth,
|
|
19
|
-
leftCardWidth,
|
|
20
|
-
hasMouseDown
|
|
21
|
-
}) => {
|
|
22
|
-
const translateXValue = useMemo(() => focusPosition === 'left' ? 0 : leftCardWidth + FOCUS_OVERLAY_PIXEL_RIGHT_OFFSET, [focusPosition, leftCardWidth]);
|
|
23
|
-
const getScaleXValue = () => {
|
|
24
|
-
if (!hasMouseDown || !leftCardWidth || !rightCardWidth) return 1;
|
|
25
|
-
const currentWidth = focusPosition === 'left' ? leftCardWidth : rightCardWidth;
|
|
26
|
-
return 1 + FOCUS_OVERLAY_SCALE_RATIO / currentWidth;
|
|
27
|
-
};
|
|
28
|
-
return jsx(StyledDiv, {
|
|
29
|
-
"data-focusposition": focusPosition,
|
|
30
|
-
style: {
|
|
31
|
-
transform: `translate3d(${translateXValue}px, 0, 0) scale3d(${getScaleXValue()}, 1, 1)`,
|
|
32
|
-
width: `${focusPosition === 'left' ? leftCardWidth : rightCardWidth}px`
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { FocusOverlay };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useRef, useState, useEffect } from 'react';
|
|
3
|
-
import { SelectableCard } from '../SelectableCard/index.js';
|
|
4
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
5
|
-
import { FocusOverlay } from './FocusOverlay.js';
|
|
6
|
-
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
const StyledBorderedBox = /*#__PURE__*/_styled("div", {
|
|
9
|
-
target: "e4ryteh1"
|
|
10
|
-
})("border:1px solid ", ({
|
|
11
|
-
theme
|
|
12
|
-
}) => theme.colors.neutral.border, ";border-radius:", ({
|
|
13
|
-
theme
|
|
14
|
-
}) => theme.radii.default, ";padding:", ({
|
|
15
|
-
theme
|
|
16
|
-
}) => theme.space['0.5'], ";display:flex;gap:", ({
|
|
17
|
-
theme
|
|
18
|
-
}) => theme.space['1'], ";position:relative;");
|
|
19
|
-
const StyledSelectableCard = /*#__PURE__*/_styled(SelectableCard, {
|
|
20
|
-
target: "e4ryteh0"
|
|
21
|
-
})("border:none;height:40px;padding:", ({
|
|
22
|
-
theme
|
|
23
|
-
}) => theme.space['1'], " ", ({
|
|
24
|
-
theme
|
|
25
|
-
}) => theme.space['2'], ";font-weight:", ({
|
|
26
|
-
theme
|
|
27
|
-
}) => theme.typography.bodyStrong.weight, ";justify-content:center;align-items:center;transition:all 200ms ease-in-out;white-space:nowrap;&:hover,&:focus-within,&:active{box-shadow:none;border:none;&:not([data-error='true'][data-disabled='true']){border:none;}}&[data-checked='true']{border:none;}&[data-checked='true'] label{color:", ({
|
|
28
|
-
theme
|
|
29
|
-
}) => theme.colors.primary.textStrong, ";}&:not([data-checked='true']) label{&:hover{color:", ({
|
|
30
|
-
theme
|
|
31
|
-
}) => theme.colors.primary.text, ";}}");
|
|
32
|
-
/**
|
|
33
|
-
* SwitchButton is a component that allows the user to select between two options.
|
|
34
|
-
*/
|
|
35
|
-
const SwitchButton = ({
|
|
36
|
-
value,
|
|
37
|
-
onChange,
|
|
38
|
-
onFocus,
|
|
39
|
-
onBlur,
|
|
40
|
-
name,
|
|
41
|
-
leftButton,
|
|
42
|
-
rightButton,
|
|
43
|
-
tooltip,
|
|
44
|
-
className,
|
|
45
|
-
'data-testid': dataTestId
|
|
46
|
-
}) => {
|
|
47
|
-
const leftButtonRef = useRef(null);
|
|
48
|
-
const rightButtonRef = useRef(null);
|
|
49
|
-
const [leftCardWidth, setLeftCardWidth] = useState();
|
|
50
|
-
const [rightCardWidth, setRightCardWidth] = useState();
|
|
51
|
-
const [hasMouseDown, setHasMouseDown] = useState(false);
|
|
52
|
-
const [localValue, setLocalValue] = useState(value === leftButton.value ? leftButton.value : rightButton.value);
|
|
53
|
-
const handleOnChange = event => {
|
|
54
|
-
onChange?.(event);
|
|
55
|
-
setLocalValue(event.target.value);
|
|
56
|
-
};
|
|
57
|
-
useEffect(() => {
|
|
58
|
-
if (!leftButtonRef.current || !rightButtonRef.current) return;
|
|
59
|
-
setLeftCardWidth(leftButtonRef.current.getBoundingClientRect().width);
|
|
60
|
-
setRightCardWidth(rightButtonRef.current.getBoundingClientRect().width);
|
|
61
|
-
}, [leftButton.value, leftButtonRef, localValue, rightButtonRef]);
|
|
62
|
-
const setMouseDown = isMouseDown => () => setHasMouseDown(isMouseDown);
|
|
63
|
-
return jsx(Tooltip, {
|
|
64
|
-
text: tooltip,
|
|
65
|
-
children: jsx("div", {
|
|
66
|
-
style: {
|
|
67
|
-
display: 'inline-flex'
|
|
68
|
-
},
|
|
69
|
-
className: className,
|
|
70
|
-
"data-testid": dataTestId,
|
|
71
|
-
children: jsxs(StyledBorderedBox, {
|
|
72
|
-
onMouseDown: setMouseDown(true),
|
|
73
|
-
onMouseUp: setMouseDown(false),
|
|
74
|
-
onMouseLeave: setMouseDown(false),
|
|
75
|
-
children: [rightCardWidth && leftCardWidth ? jsx(FocusOverlay, {
|
|
76
|
-
focusPosition: localValue === leftButton.value ? 'left' : 'right',
|
|
77
|
-
rightCardWidth: rightCardWidth,
|
|
78
|
-
leftCardWidth: leftCardWidth,
|
|
79
|
-
hasMouseDown: hasMouseDown
|
|
80
|
-
}) : null, jsx(StyledSelectableCard, {
|
|
81
|
-
ref: leftButtonRef,
|
|
82
|
-
name: name,
|
|
83
|
-
value: leftButton.value,
|
|
84
|
-
checked: localValue === leftButton.value,
|
|
85
|
-
onChange: handleOnChange,
|
|
86
|
-
onBlur: onBlur,
|
|
87
|
-
onFocus: onFocus,
|
|
88
|
-
"data-checked": localValue === leftButton.value,
|
|
89
|
-
label: leftButton.label,
|
|
90
|
-
"data-testid": dataTestId ? `${dataTestId}-left` : undefined
|
|
91
|
-
}), jsx(StyledSelectableCard, {
|
|
92
|
-
ref: rightButtonRef,
|
|
93
|
-
name: name,
|
|
94
|
-
value: rightButton.value,
|
|
95
|
-
checked: localValue === rightButton.value,
|
|
96
|
-
onChange: handleOnChange,
|
|
97
|
-
onBlur: onBlur,
|
|
98
|
-
onFocus: onFocus,
|
|
99
|
-
"data-checked": localValue === rightButton.value,
|
|
100
|
-
label: rightButton.label,
|
|
101
|
-
"data-testid": dataTestId ? `${dataTestId}-right` : undefined
|
|
102
|
-
})]
|
|
103
|
-
})
|
|
104
|
-
})
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export { SwitchButton };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
const StyledCell = /*#__PURE__*/_styled('td', {
|
|
5
|
-
target: "e78o8ww0"
|
|
6
|
-
})("padding:", ({
|
|
7
|
-
theme
|
|
8
|
-
}) => theme.space['1'], ";font-size:14px;");
|
|
9
|
-
const Cell = ({
|
|
10
|
-
children,
|
|
11
|
-
className,
|
|
12
|
-
colSpan,
|
|
13
|
-
rowSpan
|
|
14
|
-
}) => jsx(StyledCell, {
|
|
15
|
-
className: className,
|
|
16
|
-
colSpan: colSpan,
|
|
17
|
-
rowSpan: rowSpan,
|
|
18
|
-
children: children
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export { Cell };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
const StyledHeader = /*#__PURE__*/_styled('thead', {
|
|
5
|
-
target: "ekxedod0"
|
|
6
|
-
})("border-bottom:1px solid ", ({
|
|
7
|
-
theme
|
|
8
|
-
}) => theme.colors.neutral.border, ";");
|
|
9
|
-
const Header = ({
|
|
10
|
-
children
|
|
11
|
-
}) => jsx(StyledHeader, {
|
|
12
|
-
children: children
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export { Header };
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Icon } from '@ultraviolet/icons';
|
|
3
|
-
import { Stack } from '../Stack/index.js';
|
|
4
|
-
import { Text } from '../Text/index.js';
|
|
5
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
6
|
-
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
const StyledIconContainer = /*#__PURE__*/_styled(Stack, {
|
|
9
|
-
target: "ev6jkq82"
|
|
10
|
-
})("color:", ({
|
|
11
|
-
theme
|
|
12
|
-
}) => theme.colors.neutral.textWeak, ";&[aria-disabled='true']{cursor:not-allowed;}&[role*='button']{cursor:pointer;user-select:none;}");
|
|
13
|
-
const SortIcon = ({
|
|
14
|
-
order
|
|
15
|
-
}) => jsxs(StyledIconContainer, {
|
|
16
|
-
children: [jsx(Icon, {
|
|
17
|
-
name: "arrow-up",
|
|
18
|
-
size: 10,
|
|
19
|
-
color: order === 'ascending' ? 'primary' : 'neutral',
|
|
20
|
-
prominence: "weak"
|
|
21
|
-
}), jsx(Icon, {
|
|
22
|
-
name: "arrow-down",
|
|
23
|
-
size: 10,
|
|
24
|
-
color: order === 'descending' ? 'primary' : 'neutral',
|
|
25
|
-
prominence: "weak"
|
|
26
|
-
})]
|
|
27
|
-
});
|
|
28
|
-
const StyledHeaderCell = /*#__PURE__*/_styled('th', {
|
|
29
|
-
shouldForwardProp: prop => !['width', 'maxWidth', 'minWidth'].includes(prop),
|
|
30
|
-
target: "ev6jkq81"
|
|
31
|
-
})(({
|
|
32
|
-
width,
|
|
33
|
-
maxWidth,
|
|
34
|
-
minWidth
|
|
35
|
-
}) => `
|
|
36
|
-
${width ? `width: ${width};` : ''}
|
|
37
|
-
${maxWidth ? `max-width: ${maxWidth};` : ''}
|
|
38
|
-
${minWidth ? `min-width: ${minWidth};` : ''}
|
|
39
|
-
`, " padding:", ({
|
|
40
|
-
theme
|
|
41
|
-
}) => theme.space['1'], ";&[role*='button']{cursor:pointer;user-select:none;}");
|
|
42
|
-
const StyledText = /*#__PURE__*/_styled(Text, {
|
|
43
|
-
target: "ev6jkq80"
|
|
44
|
-
})("display:flex;flex-direction:row;align-items:center;gap:", ({
|
|
45
|
-
theme
|
|
46
|
-
}) => theme.space['1'], ";");
|
|
47
|
-
const HeaderCell = ({
|
|
48
|
-
children,
|
|
49
|
-
className,
|
|
50
|
-
isOrdered,
|
|
51
|
-
onOrder,
|
|
52
|
-
orderDirection,
|
|
53
|
-
width,
|
|
54
|
-
maxWidth,
|
|
55
|
-
minWidth,
|
|
56
|
-
info
|
|
57
|
-
}) => {
|
|
58
|
-
let order;
|
|
59
|
-
if (isOrdered && orderDirection === 'asc') {
|
|
60
|
-
order = 'ascending';
|
|
61
|
-
} else if (isOrdered && orderDirection === 'desc') {
|
|
62
|
-
order = 'descending';
|
|
63
|
-
}
|
|
64
|
-
const handleOrder = onOrder ? () => onOrder(order === 'ascending' ? 'desc' : 'asc') : undefined;
|
|
65
|
-
return jsx(StyledHeaderCell, {
|
|
66
|
-
className: className,
|
|
67
|
-
onClick: handleOrder,
|
|
68
|
-
onKeyDown: handleOrder ? event => {
|
|
69
|
-
if (event.key === ' ' || event.key === 'Enter') {
|
|
70
|
-
handleOrder();
|
|
71
|
-
if (event.key === ' ') {
|
|
72
|
-
// @note: it avoid scroll when pressing Space
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
} : undefined,
|
|
77
|
-
role: onOrder ? 'button columnheader' : undefined,
|
|
78
|
-
width: width,
|
|
79
|
-
maxWidth: maxWidth,
|
|
80
|
-
minWidth: minWidth,
|
|
81
|
-
tabIndex: handleOrder ? 0 : -1,
|
|
82
|
-
"aria-sort": order,
|
|
83
|
-
children: jsxs(StyledText, {
|
|
84
|
-
as: "div",
|
|
85
|
-
variant: "bodySmall",
|
|
86
|
-
color: order !== undefined ? 'primary' : 'neutral',
|
|
87
|
-
children: [children, info ? jsx(Tooltip, {
|
|
88
|
-
text: info,
|
|
89
|
-
children: jsx(Icon, {
|
|
90
|
-
name: "information-outline",
|
|
91
|
-
size: 20,
|
|
92
|
-
prominence: "weak",
|
|
93
|
-
color: "neutral"
|
|
94
|
-
})
|
|
95
|
-
}) : null, orderDirection !== undefined && isOrdered !== undefined ? jsx(SortIcon, {
|
|
96
|
-
"aria-disabled": !onOrder,
|
|
97
|
-
order: order
|
|
98
|
-
}) : null]
|
|
99
|
-
})
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
export { HeaderCell };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Checkbox } from '../Checkbox/index.js';
|
|
2
|
-
import { HeaderCell } from './HeaderCell.js';
|
|
3
|
-
import { useTableContext } from './TableContext.js';
|
|
4
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
const HeaderRow = ({
|
|
7
|
-
children,
|
|
8
|
-
hasSelectAllColumn
|
|
9
|
-
}) => {
|
|
10
|
-
const {
|
|
11
|
-
allRowSelectValue,
|
|
12
|
-
selectAll,
|
|
13
|
-
unselectAll,
|
|
14
|
-
selectedRowIds
|
|
15
|
-
} = useTableContext();
|
|
16
|
-
const selectableRowCount = Object.keys(selectedRowIds).length;
|
|
17
|
-
return jsxs("tr", {
|
|
18
|
-
children: [hasSelectAllColumn ? jsx(HeaderCell, {
|
|
19
|
-
width: "24px",
|
|
20
|
-
children: jsx(Checkbox, {
|
|
21
|
-
name: "table-select-all-checkbox",
|
|
22
|
-
value: "all",
|
|
23
|
-
"aria-label": "select all",
|
|
24
|
-
checked: allRowSelectValue,
|
|
25
|
-
onChange: allRowSelectValue === false ? selectAll : unselectAll,
|
|
26
|
-
disabled: selectableRowCount === 0
|
|
27
|
-
})
|
|
28
|
-
}) : null, children]
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { HeaderRow };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { keyframes } from '@emotion/react';
|
|
3
|
-
import { useEffect } from 'react';
|
|
4
|
-
import { Checkbox } from '../Checkbox/index.js';
|
|
5
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
6
|
-
import { Cell } from './Cell.js';
|
|
7
|
-
import { useTableContext } from './TableContext.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 StyledCheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
12
|
-
target: "e1qvrbgq1"
|
|
13
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
14
|
-
name: "zjik7",
|
|
15
|
-
styles: "display:flex"
|
|
16
|
-
} : {
|
|
17
|
-
name: "zjik7",
|
|
18
|
-
styles: "display:flex",
|
|
19
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
// We start at 5% and finish at 80% to leave the original background color
|
|
23
|
-
// as we can't know if the table will be stripped or not
|
|
24
|
-
const colorChange = theme => keyframes`
|
|
25
|
-
5% {
|
|
26
|
-
background-color: ${theme.colors.primary.background};
|
|
27
|
-
}
|
|
28
|
-
80% {
|
|
29
|
-
background-color: ${theme.colors.primary.background};
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
const StyledTr = /*#__PURE__*/_styled('tr', {
|
|
33
|
-
shouldForwardProp: prop => !['highlightAnimation'].includes(prop),
|
|
34
|
-
target: "e1qvrbgq0"
|
|
35
|
-
})("animation:", ({
|
|
36
|
-
highlightAnimation,
|
|
37
|
-
theme
|
|
38
|
-
}) => highlightAnimation ? colorChange(theme) : undefined, " 3s linear;");
|
|
39
|
-
const Row = ({
|
|
40
|
-
children,
|
|
41
|
-
className,
|
|
42
|
-
id,
|
|
43
|
-
selectDisabled,
|
|
44
|
-
highlightAnimation,
|
|
45
|
-
'data-testid': dataTestid
|
|
46
|
-
}) => {
|
|
47
|
-
const {
|
|
48
|
-
selectable,
|
|
49
|
-
registerSelectableRow,
|
|
50
|
-
selectedRowIds,
|
|
51
|
-
selectRow,
|
|
52
|
-
unselectRow
|
|
53
|
-
} = useTableContext();
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
if (!selectDisabled) {
|
|
56
|
-
const unregisterCallback = registerSelectableRow(id);
|
|
57
|
-
return unregisterCallback;
|
|
58
|
-
}
|
|
59
|
-
return undefined;
|
|
60
|
-
}, [id, registerSelectableRow, selectDisabled]);
|
|
61
|
-
return jsxs(StyledTr, {
|
|
62
|
-
className: className,
|
|
63
|
-
"data-testid": dataTestid,
|
|
64
|
-
highlightAnimation: highlightAnimation,
|
|
65
|
-
children: [selectable ? jsx(Cell, {
|
|
66
|
-
children: jsx(StyledCheckboxContainer, {
|
|
67
|
-
children: jsx(Tooltip, {
|
|
68
|
-
text: typeof selectDisabled === 'string' ? selectDisabled : undefined,
|
|
69
|
-
children: jsx(Checkbox, {
|
|
70
|
-
name: "table-select-checkbox",
|
|
71
|
-
"aria-label": "select",
|
|
72
|
-
checked: selectedRowIds[id],
|
|
73
|
-
value: id,
|
|
74
|
-
onChange: () => {
|
|
75
|
-
if (selectedRowIds[id]) {
|
|
76
|
-
unselectRow(id);
|
|
77
|
-
} else {
|
|
78
|
-
selectRow(id);
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
disabled: selectDisabled !== undefined
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
|
-
})
|
|
85
|
-
}) : null, children]
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export { Row };
|
|
@@ -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 { useTableContext } from './TableContext.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: "esnuyll1"
|
|
10
|
-
})("display:flex;align-items:center;padding:0 ", ({
|
|
11
|
-
theme
|
|
12
|
-
}) => theme.space['1'], ";");
|
|
13
|
-
const FlexDiv = /*#__PURE__*/_styled("div", {
|
|
14
|
-
target: "esnuyll0"
|
|
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
|
-
} = useTableContext();
|
|
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 };
|