@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,289 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Icon } from '@ultraviolet/icons';
|
|
3
|
-
import { forwardRef, useId, useState, useMemo } from 'react';
|
|
4
|
-
import { Button } from '../Button/index.js';
|
|
5
|
-
import { Loader } from '../Loader/index.js';
|
|
6
|
-
import { Stack } from '../Stack/index.js';
|
|
7
|
-
import { Text } from '../Text/index.js';
|
|
8
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
9
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
10
|
-
|
|
11
|
-
const TEXTINPUT_SIZE_HEIGHT = {
|
|
12
|
-
large: 48,
|
|
13
|
-
medium: 40,
|
|
14
|
-
small: 32
|
|
15
|
-
};
|
|
16
|
-
const BasicPrefixStack = /*#__PURE__*/_styled(Stack, {
|
|
17
|
-
target: "e7tir8v5"
|
|
18
|
-
})("padding:", ({
|
|
19
|
-
theme
|
|
20
|
-
}) => theme.space['2'], ";border-right:1px solid;border-color:inherit;");
|
|
21
|
-
const StateStack = /*#__PURE__*/_styled(Stack, {
|
|
22
|
-
target: "e7tir8v4"
|
|
23
|
-
})("padding:", ({
|
|
24
|
-
theme
|
|
25
|
-
}) => `0 ${theme.space['2']}`, ";");
|
|
26
|
-
const BasicSuffixStack = /*#__PURE__*/_styled(Stack, {
|
|
27
|
-
target: "e7tir8v3"
|
|
28
|
-
})("padding:", ({
|
|
29
|
-
theme
|
|
30
|
-
}) => `0 ${theme.space['2']}`, ";border-left:1px solid;border-color:inherit;");
|
|
31
|
-
const CTASuffixStack = /*#__PURE__*/_styled(Stack, {
|
|
32
|
-
target: "e7tir8v2"
|
|
33
|
-
})("padding:", ({
|
|
34
|
-
theme
|
|
35
|
-
}) => `0 ${theme.space['1']}`, ";border-left:1px solid;border-color:inherit;");
|
|
36
|
-
const StyledInput = /*#__PURE__*/_styled('input', {
|
|
37
|
-
shouldForwardProp: prop => !['isSuccess', 'isError', 'isClearable'].includes(prop),
|
|
38
|
-
target: "e7tir8v1"
|
|
39
|
-
})("flex:1;border:none;outline:none;height:100%;padding-left:", ({
|
|
40
|
-
theme
|
|
41
|
-
}) => theme.space['2'], ";background:transparent;");
|
|
42
|
-
const StyledInputWrapper = /*#__PURE__*/_styled('div', {
|
|
43
|
-
shouldForwardProp: prop => !['hasFocus', 'size'].includes(prop),
|
|
44
|
-
target: "e7tir8v0"
|
|
45
|
-
})("display:flex;flex-direction:row;height:", ({
|
|
46
|
-
size
|
|
47
|
-
}) => TEXTINPUT_SIZE_HEIGHT[size], "px;background:", ({
|
|
48
|
-
theme
|
|
49
|
-
}) => theme.colors.neutral.background, ";border:1px solid ", ({
|
|
50
|
-
theme
|
|
51
|
-
}) => theme.colors.neutral.border, ";border-radius:", ({
|
|
52
|
-
theme
|
|
53
|
-
}) => theme.radii.default, ";&>", StyledInput, "{color:", ({
|
|
54
|
-
theme
|
|
55
|
-
}) => theme.colors.neutral.text, ";&::placeholder{color:", ({
|
|
56
|
-
theme
|
|
57
|
-
}) => theme.colors.neutral.textWeak, ";}}&[data-success='true']{border-color:", ({
|
|
58
|
-
theme
|
|
59
|
-
}) => theme.colors.success.border, ";}&[data-error='true']{border-color:", ({
|
|
60
|
-
theme
|
|
61
|
-
}) => theme.colors.danger.border, ";}&[data-readonly='true']{background:", ({
|
|
62
|
-
theme
|
|
63
|
-
}) => theme.colors.neutral.backgroundWeak, ";border-color:", ({
|
|
64
|
-
theme
|
|
65
|
-
}) => theme.colors.neutral.border, ";}&[data-disabled='true']{background:", ({
|
|
66
|
-
theme
|
|
67
|
-
}) => theme.colors.neutral.backgroundDisabled, ";border-color:", ({
|
|
68
|
-
theme
|
|
69
|
-
}) => theme.colors.neutral.borderDisabled, ";&>", StyledInput, "{color:", ({
|
|
70
|
-
theme
|
|
71
|
-
}) => theme.colors.neutral.textDisabled, ";&::placeholder{color:", ({
|
|
72
|
-
theme
|
|
73
|
-
}) => theme.colors.neutral.textWeakDisabled, ";}}}&:not([data-disabled='true']):not([data-readonly]):hover{border-color:", ({
|
|
74
|
-
theme
|
|
75
|
-
}) => theme.colors.primary.border, ";}", ({
|
|
76
|
-
theme,
|
|
77
|
-
hasFocus
|
|
78
|
-
}) => hasFocus ? `
|
|
79
|
-
box-shadow: ${theme.shadows.focusPrimary};
|
|
80
|
-
border: 1px solid ${theme.colors.primary.border};
|
|
81
|
-
` : null, ";");
|
|
82
|
-
/**
|
|
83
|
-
* This component offers an extended input HTML
|
|
84
|
-
*/
|
|
85
|
-
const TextInputV2 = /*#__PURE__*/forwardRef(({
|
|
86
|
-
id,
|
|
87
|
-
className,
|
|
88
|
-
tabIndex,
|
|
89
|
-
value,
|
|
90
|
-
onChange,
|
|
91
|
-
placeholder,
|
|
92
|
-
disabled = false,
|
|
93
|
-
readOnly = false,
|
|
94
|
-
success,
|
|
95
|
-
error,
|
|
96
|
-
helper,
|
|
97
|
-
tooltip,
|
|
98
|
-
label,
|
|
99
|
-
autoFocus,
|
|
100
|
-
required = false,
|
|
101
|
-
'data-testid': dataTestId,
|
|
102
|
-
name,
|
|
103
|
-
onFocus,
|
|
104
|
-
onBlur,
|
|
105
|
-
clearable = false,
|
|
106
|
-
labelDescription,
|
|
107
|
-
type = 'text',
|
|
108
|
-
prefix,
|
|
109
|
-
suffix,
|
|
110
|
-
size = 'large',
|
|
111
|
-
loading,
|
|
112
|
-
onRandomize,
|
|
113
|
-
minLength,
|
|
114
|
-
maxLength,
|
|
115
|
-
'aria-labelledby': ariaLabelledBy,
|
|
116
|
-
'aria-label': ariaLabel,
|
|
117
|
-
autoComplete,
|
|
118
|
-
onKeyDown
|
|
119
|
-
}, ref) => {
|
|
120
|
-
const localId = useId();
|
|
121
|
-
const [hasFocus, setHasFocus] = useState(false);
|
|
122
|
-
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
123
|
-
const computedType = type === 'password' && isPasswordVisible ? 'text' : type;
|
|
124
|
-
const sentiment = useMemo(() => {
|
|
125
|
-
if (error) {
|
|
126
|
-
return 'danger';
|
|
127
|
-
}
|
|
128
|
-
if (success) {
|
|
129
|
-
return 'success';
|
|
130
|
-
}
|
|
131
|
-
return 'neutral';
|
|
132
|
-
}, [error, success]);
|
|
133
|
-
const computedClearable = clearable && !!value;
|
|
134
|
-
return jsxs(Stack, {
|
|
135
|
-
gap: 0.5,
|
|
136
|
-
className: className,
|
|
137
|
-
children: [label || labelDescription ? jsxs(Stack, {
|
|
138
|
-
direction: "row",
|
|
139
|
-
gap: "1",
|
|
140
|
-
alignItems: "center",
|
|
141
|
-
children: [label ? jsxs(Stack, {
|
|
142
|
-
direction: "row",
|
|
143
|
-
gap: "0.5",
|
|
144
|
-
alignItems: "start",
|
|
145
|
-
children: [jsx(Text, {
|
|
146
|
-
as: "label",
|
|
147
|
-
variant: "bodyStrong",
|
|
148
|
-
sentiment: "neutral",
|
|
149
|
-
htmlFor: id ?? localId,
|
|
150
|
-
children: label
|
|
151
|
-
}), required ? jsx(Icon, {
|
|
152
|
-
name: "asterisk",
|
|
153
|
-
color: "danger",
|
|
154
|
-
size: 8
|
|
155
|
-
}) : null]
|
|
156
|
-
}) : null, labelDescription ?? null]
|
|
157
|
-
}) : null, jsx("div", {
|
|
158
|
-
children: jsx(Tooltip, {
|
|
159
|
-
text: tooltip,
|
|
160
|
-
children: jsxs(StyledInputWrapper, {
|
|
161
|
-
hasFocus: hasFocus,
|
|
162
|
-
"data-disabled": disabled,
|
|
163
|
-
"data-readonly": readOnly,
|
|
164
|
-
"data-success": !!success,
|
|
165
|
-
"data-error": !!error,
|
|
166
|
-
size: size,
|
|
167
|
-
children: [prefix ? jsx(BasicPrefixStack, {
|
|
168
|
-
direction: "row",
|
|
169
|
-
alignItems: "center",
|
|
170
|
-
children: typeof prefix === 'string' ? jsx(Text, {
|
|
171
|
-
as: "span",
|
|
172
|
-
sentiment: "neutral",
|
|
173
|
-
variant: "bodySmall",
|
|
174
|
-
disabled: disabled,
|
|
175
|
-
children: prefix
|
|
176
|
-
}) : prefix
|
|
177
|
-
}) : null, jsx(StyledInput, {
|
|
178
|
-
type: computedType,
|
|
179
|
-
"aria-invalid": !!error,
|
|
180
|
-
id: id ?? localId,
|
|
181
|
-
tabIndex: tabIndex,
|
|
182
|
-
autoFocus: autoFocus,
|
|
183
|
-
disabled: disabled,
|
|
184
|
-
ref: ref,
|
|
185
|
-
value: value === null || value === undefined ? '' : value,
|
|
186
|
-
onChange: event => {
|
|
187
|
-
onChange?.(event.currentTarget.value);
|
|
188
|
-
},
|
|
189
|
-
isSuccess: !!success,
|
|
190
|
-
isError: !!error,
|
|
191
|
-
isClearable: !!computedClearable,
|
|
192
|
-
placeholder: placeholder,
|
|
193
|
-
"data-testid": dataTestId,
|
|
194
|
-
name: name,
|
|
195
|
-
onFocus: event => {
|
|
196
|
-
setHasFocus(true);
|
|
197
|
-
onFocus?.(event);
|
|
198
|
-
},
|
|
199
|
-
onBlur: event => {
|
|
200
|
-
setHasFocus(false);
|
|
201
|
-
onBlur?.(event);
|
|
202
|
-
},
|
|
203
|
-
readOnly: readOnly,
|
|
204
|
-
minLength: minLength,
|
|
205
|
-
maxLength: maxLength,
|
|
206
|
-
"aria-labelledby": ariaLabelledBy,
|
|
207
|
-
"aria-label": ariaLabel,
|
|
208
|
-
autoComplete: autoComplete,
|
|
209
|
-
required: required,
|
|
210
|
-
onKeyDown: onKeyDown
|
|
211
|
-
}), success || error || loading || computedClearable ? jsxs(StateStack, {
|
|
212
|
-
direction: "row",
|
|
213
|
-
gap: 1,
|
|
214
|
-
alignItems: "center",
|
|
215
|
-
children: [computedClearable ? jsx(Button, {
|
|
216
|
-
"aria-label": "clear value",
|
|
217
|
-
disabled: disabled || !value,
|
|
218
|
-
variant: "ghost",
|
|
219
|
-
size: size === 'small' ? 'xsmall' : 'small',
|
|
220
|
-
icon: "close",
|
|
221
|
-
onClick: () => {
|
|
222
|
-
onChange?.('');
|
|
223
|
-
},
|
|
224
|
-
sentiment: "neutral"
|
|
225
|
-
}) : null, success ? jsx(Icon, {
|
|
226
|
-
name: "checkbox-circle-outline",
|
|
227
|
-
color: "success",
|
|
228
|
-
size: 16,
|
|
229
|
-
disabled: disabled
|
|
230
|
-
}) : null, error ? jsx(Icon, {
|
|
231
|
-
name: "alert",
|
|
232
|
-
color: "danger",
|
|
233
|
-
size: 16,
|
|
234
|
-
disabled: disabled
|
|
235
|
-
}) : null, loading && !disabled ? jsx(Loader, {
|
|
236
|
-
active: true,
|
|
237
|
-
size: 16
|
|
238
|
-
}) : null]
|
|
239
|
-
}) : null, suffix ? jsx(BasicSuffixStack, {
|
|
240
|
-
direction: "row",
|
|
241
|
-
alignItems: "center",
|
|
242
|
-
children: typeof suffix === 'string' ? jsx(Text, {
|
|
243
|
-
as: "span",
|
|
244
|
-
sentiment: "neutral",
|
|
245
|
-
variant: "bodySmall",
|
|
246
|
-
disabled: disabled,
|
|
247
|
-
children: suffix
|
|
248
|
-
}) : suffix
|
|
249
|
-
}) : null, type === 'password' ? jsx(CTASuffixStack, {
|
|
250
|
-
direction: "row",
|
|
251
|
-
alignItems: "center",
|
|
252
|
-
children: jsx(Button, {
|
|
253
|
-
disabled: disabled,
|
|
254
|
-
"data-testid": dataTestId ? `${dataTestId}-visibility-button` : undefined,
|
|
255
|
-
"aria-label": isPasswordVisible ? 'hide' : 'show',
|
|
256
|
-
onClick: () => {
|
|
257
|
-
setIsPasswordVisible(!isPasswordVisible);
|
|
258
|
-
},
|
|
259
|
-
variant: "ghost",
|
|
260
|
-
sentiment: "neutral",
|
|
261
|
-
icon: isPasswordVisible ? 'eye-off' : 'eye',
|
|
262
|
-
size: size === 'small' ? 'xsmall' : 'small'
|
|
263
|
-
})
|
|
264
|
-
}) : null, onRandomize ? jsx(CTASuffixStack, {
|
|
265
|
-
direction: "row",
|
|
266
|
-
alignItems: "center",
|
|
267
|
-
children: jsx(Button, {
|
|
268
|
-
disabled: disabled,
|
|
269
|
-
icon: "auto-fix",
|
|
270
|
-
size: size === 'small' ? 'xsmall' : 'small',
|
|
271
|
-
variant: "ghost",
|
|
272
|
-
sentiment: "neutral",
|
|
273
|
-
onClick: onRandomize
|
|
274
|
-
})
|
|
275
|
-
}) : null]
|
|
276
|
-
})
|
|
277
|
-
})
|
|
278
|
-
}), error || typeof success === 'string' || typeof helper === 'string' ? jsx(Text, {
|
|
279
|
-
as: "p",
|
|
280
|
-
variant: "caption",
|
|
281
|
-
sentiment: sentiment,
|
|
282
|
-
prominence: !error && !success ? 'weak' : 'default',
|
|
283
|
-
disabled: disabled,
|
|
284
|
-
children: error || success || helper
|
|
285
|
-
}) : null, !error && !success && typeof helper !== 'string' && helper ? helper : null]
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
export { TEXTINPUT_SIZE_HEIGHT, TextInputV2 };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { SelectInput } from '../SelectInput/index.js';
|
|
2
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
const hours = ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'];
|
|
5
|
-
const half = ['00:00', '00:30', '01:00', '01:30', '02:00', '02:30', '03:00', '03:30', '04:00', '04:30', '05:00', '05:30', '06:00', '06:30', '07:00', '07:30', '08:00', '08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00', '18:30', '19:00', '19:30', '20:00', '20:30', '21:00', '21:30', '22:00', '22:30', '23:00', '23:30'];
|
|
6
|
-
const quarter = ['00:00', '00:15', '00:30', '00:45', '01:00', '01:15', '01:30', '01:45', '02:00', '02:15', '02:30', '02:45', '03:00', '03:15', '03:30', '03:45', '04:00', '04:15', '04:30', '04:45', '05:00', '05:15', '05:30', '05:45', '06:00', '06:15', '06:30', '06:45', '07:00', '07:15', '07:30', '07:45', '08:00', '08:15', '08:30', '08:45', '09:00', '09:15', '09:30', '09:45', '10:00', '10:15', '10:30', '10:45', '11:00', '11:15', '11:30', '11:45', '12:00', '12:15', '12:30', '12:45', '13:00', '13:15', '13:30', '13:45', '14:00', '14:15', '14:30', '14:45', '15:00', '15:15', '15:30', '15:45', '16:00', '16:15', '16:30', '16:45', '17:00', '17:15', '17:30', '17:45', '18:00', '18:15', '18:30', '18:45', '19:00', '19:15', '19:30', '19:45', '20:00', '20:15', '20:30', '20:45', '21:00', '21:15', '21:30', '21:45', '22:00', '22:15', '22:30', '22:45', '23:00', '23:15', '23:30', '23:45'];
|
|
7
|
-
const schedules = {
|
|
8
|
-
half,
|
|
9
|
-
hours,
|
|
10
|
-
quarter
|
|
11
|
-
};
|
|
12
|
-
const options = schedule => schedules[schedule].map(hour => ({
|
|
13
|
-
label: hour,
|
|
14
|
-
value: hour
|
|
15
|
-
}));
|
|
16
|
-
const defaultValue = {
|
|
17
|
-
label: '00:00',
|
|
18
|
-
value: '00:00'
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* A time input component that allows users to select a time from a dropdown. The component is built on top of the
|
|
22
|
-
* `SelectInput` component.
|
|
23
|
-
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
24
|
-
*/
|
|
25
|
-
const TimeInput = ({
|
|
26
|
-
value = defaultValue,
|
|
27
|
-
schedule = 'hours',
|
|
28
|
-
...props
|
|
29
|
-
} = {}) => jsx(SelectInput, {
|
|
30
|
-
...props,
|
|
31
|
-
time: true,
|
|
32
|
-
value: value,
|
|
33
|
-
options: options(schedule)
|
|
34
|
-
});
|
|
35
|
-
TimeInput.options = options;
|
|
36
|
-
|
|
37
|
-
export { TimeInput, schedules };
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useTheme, Global, ClassNames, css } from '@emotion/react';
|
|
3
|
-
import { toast as toast$1, ToastContainer as ToastContainer$1, Slide } from 'react-toastify';
|
|
4
|
-
import css_248z from '../../../react-toastify/dist/ReactToastify.min.css.js';
|
|
5
|
-
import { Button } from '../Button/index.js';
|
|
6
|
-
import { Stack } from '../Stack/index.js';
|
|
7
|
-
import { Text } from '../Text/index.js';
|
|
8
|
-
import { jsx, jsxs, Fragment } 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 PREFIX = '.Toastify';
|
|
12
|
-
const AUTOCLOSE_DELAY = 6000; // Delay to close the toast in ms
|
|
13
|
-
|
|
14
|
-
const styles = {
|
|
15
|
-
toast: theme => /*#__PURE__*/css("border-radius:", theme.radii.default, ";min-height:52px;", PREFIX, "__toast-container{width:344px;}", PREFIX, "__toast-body{margin:0;padding:0;}&", PREFIX, "__toast--success{background-color:", theme.colors.neutral.backgroundStronger, ";color:", theme.colors.neutral.textStronger, ";padding:", theme.space['2'], ";}&", PREFIX, "__toast--info{background-color:", theme.colors.info.backgroundStrong, ";color:", theme.colors.neutral.textStronger, ";padding:", theme.space['2'], ";}&", PREFIX, "__toast--error{background-color:", theme.colors.danger.backgroundStrong, ";color:", theme.colors.neutral.textStronger, ";padding:", theme.space['2'], ";}&", PREFIX, "__toast--warning{background-color:", theme.colors.warning.backgroundStrong, ";color:", theme.colors.warning.textStrong, ";padding:", theme.space['2'], ";}")
|
|
16
|
-
};
|
|
17
|
-
const StyledButton = /*#__PURE__*/_styled(Button, {
|
|
18
|
-
target: "e1eb63990"
|
|
19
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
20
|
-
name: "1nobnvq",
|
|
21
|
-
styles: "background:none;margin:auto;&:hover,&:active{background:none;}"
|
|
22
|
-
} : {
|
|
23
|
-
name: "1nobnvq",
|
|
24
|
-
styles: "background:none;margin:auto;&:hover,&:active{background:none;}",
|
|
25
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
26
|
-
});
|
|
27
|
-
const CloseButton = ({
|
|
28
|
-
closeToast,
|
|
29
|
-
sentiment = 'success'
|
|
30
|
-
}) => jsx(StyledButton, {
|
|
31
|
-
"aria-label": "close",
|
|
32
|
-
icon: "close",
|
|
33
|
-
onClick: closeToast,
|
|
34
|
-
sentiment: sentiment,
|
|
35
|
-
size: "xsmall"
|
|
36
|
-
});
|
|
37
|
-
const Content = ({
|
|
38
|
-
children
|
|
39
|
-
}) => jsx(Stack, {
|
|
40
|
-
gap: 2,
|
|
41
|
-
direction: "row",
|
|
42
|
-
children: jsx(Text, {
|
|
43
|
-
variant: "bodySmallStrong",
|
|
44
|
-
as: "span",
|
|
45
|
-
children: children
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
const toast = {
|
|
49
|
-
error: (children, options, containerId) => toast$1.error(jsx(Content, {
|
|
50
|
-
children: children
|
|
51
|
-
}), {
|
|
52
|
-
...options,
|
|
53
|
-
closeButton: jsx(CloseButton, {
|
|
54
|
-
sentiment: "danger"
|
|
55
|
-
}),
|
|
56
|
-
containerId: containerId ?? 'toaster'
|
|
57
|
-
}),
|
|
58
|
-
/**
|
|
59
|
-
* @deprecated "Deprecated, please use another variant instead"
|
|
60
|
-
*/
|
|
61
|
-
info: (children, options, containerId) => toast$1.info(jsx(Content, {
|
|
62
|
-
children: children
|
|
63
|
-
}), {
|
|
64
|
-
...options,
|
|
65
|
-
closeButton: jsx(CloseButton, {
|
|
66
|
-
sentiment: "info"
|
|
67
|
-
}),
|
|
68
|
-
containerId: containerId ?? 'toaster'
|
|
69
|
-
}),
|
|
70
|
-
success: (children, options, containerId) => toast$1.success(jsx(Content, {
|
|
71
|
-
children: children
|
|
72
|
-
}), {
|
|
73
|
-
...options,
|
|
74
|
-
closeButton: jsx(CloseButton, {
|
|
75
|
-
sentiment: "success"
|
|
76
|
-
}),
|
|
77
|
-
containerId: containerId ?? 'toaster'
|
|
78
|
-
}),
|
|
79
|
-
warning: (children, options, containerId) => toast$1.warn(jsx(Content, {
|
|
80
|
-
children: children
|
|
81
|
-
}), {
|
|
82
|
-
...options,
|
|
83
|
-
closeButton: jsx(CloseButton, {
|
|
84
|
-
sentiment: "warning"
|
|
85
|
-
}),
|
|
86
|
-
containerId: containerId ?? 'toaster'
|
|
87
|
-
})
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Display short information about an event that happen in the interface in a floating alert.
|
|
91
|
-
* Toaster is based on **react-tostify**, you can find a complete documentation
|
|
92
|
-
* [here](https://fkhadra.github.io/react-toastify/introduction/).
|
|
93
|
-
*
|
|
94
|
-
* Toaster is separated in two parts, first the `ToastContainer` which is where the div of the toast will be rendered,
|
|
95
|
-
* and second the `toast()` function which is used to display the toast.
|
|
96
|
-
*/
|
|
97
|
-
const ToastContainer = ({
|
|
98
|
-
newestOnTop,
|
|
99
|
-
limit,
|
|
100
|
-
position = 'top-right',
|
|
101
|
-
'data-testid': dataTestId,
|
|
102
|
-
className,
|
|
103
|
-
autoClose,
|
|
104
|
-
containerId = 'toaster'
|
|
105
|
-
}) => {
|
|
106
|
-
const theme = useTheme();
|
|
107
|
-
return jsxs(Fragment, {
|
|
108
|
-
children: [jsx(Global, {
|
|
109
|
-
styles: css_248z
|
|
110
|
-
}), jsx(ClassNames, {
|
|
111
|
-
children: ({
|
|
112
|
-
css: localCss
|
|
113
|
-
}) => jsx(ToastContainer$1, {
|
|
114
|
-
"data-testid": dataTestId,
|
|
115
|
-
toastClassName: localCss(styles.toast(theme)),
|
|
116
|
-
autoClose: autoClose ?? AUTOCLOSE_DELAY,
|
|
117
|
-
icon: false,
|
|
118
|
-
newestOnTop: newestOnTop,
|
|
119
|
-
limit: limit,
|
|
120
|
-
position: position,
|
|
121
|
-
stacked: true,
|
|
122
|
-
hideProgressBar: true,
|
|
123
|
-
className: className,
|
|
124
|
-
transition: Slide,
|
|
125
|
-
containerId: containerId
|
|
126
|
-
})
|
|
127
|
-
})]
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export { ToastContainer, toast };
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Icon } from '@ultraviolet/icons';
|
|
3
|
-
import { forwardRef, useState, useId, useCallback, useEffect } from 'react';
|
|
4
|
-
import { Row } from '../Row/index.js';
|
|
5
|
-
import { Stack } from '../Stack/index.js';
|
|
6
|
-
import { Text } from '../Text/index.js';
|
|
7
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
8
|
-
import { jsx, jsxs } 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 SIZES = {
|
|
12
|
-
large: {
|
|
13
|
-
ball: 16,
|
|
14
|
-
height: 24,
|
|
15
|
-
width: 48
|
|
16
|
-
},
|
|
17
|
-
small: {
|
|
18
|
-
ball: 12,
|
|
19
|
-
height: 20,
|
|
20
|
-
width: 40
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const StyledToggle = /*#__PURE__*/_styled("div", {
|
|
24
|
-
target: "e1wstm612"
|
|
25
|
-
})("box-sizing:content-box;outline:none;overflow:hidden;display:flex;align-items:center;border:none;border-radius:", ({
|
|
26
|
-
theme
|
|
27
|
-
}) => theme.radii.xlarge, ";position:relative;transition:all 300ms;background-color:", ({
|
|
28
|
-
theme
|
|
29
|
-
}) => theme.colors.neutral.backgroundStrong, ";width:", ({
|
|
30
|
-
size
|
|
31
|
-
}) => SIZES[size].width, "px;height:", ({
|
|
32
|
-
size
|
|
33
|
-
}) => SIZES[size].height, "px;&:hover{background-color:", ({
|
|
34
|
-
theme
|
|
35
|
-
}) => theme.colors.neutral.backgroundStrongHover, ";}&:after{content:'';position:absolute;top:", ({
|
|
36
|
-
size
|
|
37
|
-
}) => SIZES[size].height / 2 - SIZES[size].ball / 2, "px;left:5px;width:", ({
|
|
38
|
-
size
|
|
39
|
-
}) => SIZES[size].ball, "px;height:", ({
|
|
40
|
-
size
|
|
41
|
-
}) => SIZES[size].ball, "px;border-radius:", ({
|
|
42
|
-
theme
|
|
43
|
-
}) => theme.radii.circle, ";background-color:", ({
|
|
44
|
-
theme
|
|
45
|
-
}) => theme.colors.neutral.background, ";transition:all 300ms;}&:focus-within,&:focus{box-shadow:", ({
|
|
46
|
-
theme
|
|
47
|
-
}) => theme.shadows.focusNeutral, ";}&[data-disabled='false']:active:after{width:", ({
|
|
48
|
-
size
|
|
49
|
-
}) => SIZES[size].ball * 1.3775, "px;}&[data-checked='true']{color:", ({
|
|
50
|
-
theme
|
|
51
|
-
}) => theme.colors.neutral.textStrong, ";background-color:", ({
|
|
52
|
-
theme
|
|
53
|
-
}) => theme.colors.primary.backgroundStrong, ";&:hover{background-color:", ({
|
|
54
|
-
theme
|
|
55
|
-
}) => theme.colors.primary.backgroundStrongHover, ";}&:after{left:calc(100% - 5px);transform:translateX(-100%);}&:focus-within,&:focus{box-shadow:", ({
|
|
56
|
-
theme
|
|
57
|
-
}) => theme.shadows.focusPrimary, ";}}&[data-disabled='true']{background:", ({
|
|
58
|
-
theme
|
|
59
|
-
}) => theme.colors.neutral.backgroundStrongDisabled, ";&[data-checked='true']{background:", ({
|
|
60
|
-
theme
|
|
61
|
-
}) => theme.colors.primary.backgroundStrongDisabled, ";}}");
|
|
62
|
-
const StyledCheckbox = /*#__PURE__*/_styled("input", {
|
|
63
|
-
target: "e1wstm611"
|
|
64
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
65
|
-
name: "p9zju0",
|
|
66
|
-
styles: "position:absolute;opacity:0;top:0;left:0;width:100%;height:100%;cursor:pointer;&[disabled]{cursor:not-allowed;}"
|
|
67
|
-
} : {
|
|
68
|
-
name: "p9zju0",
|
|
69
|
-
styles: "position:absolute;opacity:0;top:0;left:0;width:100%;height:100%;cursor:pointer;&[disabled]{cursor:not-allowed;}",
|
|
70
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
71
|
-
});
|
|
72
|
-
const StyledLabel = /*#__PURE__*/_styled("label", {
|
|
73
|
-
target: "e1wstm610"
|
|
74
|
-
})("display:flex;gap:", ({
|
|
75
|
-
theme
|
|
76
|
-
}) => theme.space['1'], ";align-items:start;width:fit-content;cursor:pointer;flex-direction:", ({
|
|
77
|
-
labelPosition
|
|
78
|
-
}) => labelPosition === 'left' ? 'row' : 'row-reverse', ";&:active ", StyledToggle, "[data-disabled='false']:after{width:", ({
|
|
79
|
-
size
|
|
80
|
-
}) => SIZES[size].ball * 1.3775, "px;}&[aria-disabled='true']{cursor:not-allowed;color:", ({
|
|
81
|
-
theme
|
|
82
|
-
}) => theme.colors.neutral.textDisabled, ";}");
|
|
83
|
-
const RequiredIcon = () => jsx("sup", {
|
|
84
|
-
children: jsx(Icon, {
|
|
85
|
-
name: "asterisk",
|
|
86
|
-
size: 10,
|
|
87
|
-
color: "danger"
|
|
88
|
-
})
|
|
89
|
-
});
|
|
90
|
-
/**
|
|
91
|
-
* Toggle component is used to toggle between two states (on/off, true/false, etc.).
|
|
92
|
-
*/
|
|
93
|
-
const Toggle = /*#__PURE__*/forwardRef(({
|
|
94
|
-
checked = false,
|
|
95
|
-
disabled = false,
|
|
96
|
-
id,
|
|
97
|
-
name,
|
|
98
|
-
onChange,
|
|
99
|
-
size = 'large',
|
|
100
|
-
tooltip,
|
|
101
|
-
labelPosition = 'right',
|
|
102
|
-
label,
|
|
103
|
-
helper,
|
|
104
|
-
required,
|
|
105
|
-
className,
|
|
106
|
-
'data-testid': dataTestId,
|
|
107
|
-
value
|
|
108
|
-
}, ref) => {
|
|
109
|
-
const [state, setState] = useState(checked);
|
|
110
|
-
const uniqueId = useId();
|
|
111
|
-
const onLocalChange = useCallback(event => {
|
|
112
|
-
if (onChange) onChange?.(event);else setState(event.target.checked);
|
|
113
|
-
}, [onChange, setState]);
|
|
114
|
-
useEffect(() => {
|
|
115
|
-
setState(checked);
|
|
116
|
-
}, [checked, setState]);
|
|
117
|
-
return jsx(Tooltip, {
|
|
118
|
-
text: tooltip,
|
|
119
|
-
children: jsxs(StyledLabel, {
|
|
120
|
-
"aria-disabled": disabled,
|
|
121
|
-
size: size,
|
|
122
|
-
onClick: evt => evt.stopPropagation(),
|
|
123
|
-
className: className,
|
|
124
|
-
"data-testid": dataTestId,
|
|
125
|
-
labelPosition: labelPosition,
|
|
126
|
-
children: [jsxs(Stack, {
|
|
127
|
-
gap: 0.25,
|
|
128
|
-
alignItems: "baseline",
|
|
129
|
-
children: [label ? jsxs(Row, {
|
|
130
|
-
templateColumns: "auto 1fr",
|
|
131
|
-
gap: 1,
|
|
132
|
-
alignItems: "center",
|
|
133
|
-
children: [label, required ? jsx(RequiredIcon, {}) : null]
|
|
134
|
-
}) : null, helper ? jsx(Text, {
|
|
135
|
-
as: "p",
|
|
136
|
-
variant: "bodySmall",
|
|
137
|
-
prominence: "weak",
|
|
138
|
-
children: helper
|
|
139
|
-
}) : null]
|
|
140
|
-
}), jsx(StyledToggle, {
|
|
141
|
-
size: size,
|
|
142
|
-
"data-checked": state,
|
|
143
|
-
"data-disabled": disabled,
|
|
144
|
-
children: jsx(StyledCheckbox, {
|
|
145
|
-
id: id || uniqueId,
|
|
146
|
-
checked: state,
|
|
147
|
-
"aria-checked": state,
|
|
148
|
-
disabled: disabled,
|
|
149
|
-
name: name,
|
|
150
|
-
onChange: onLocalChange,
|
|
151
|
-
type: "checkbox",
|
|
152
|
-
ref: ref,
|
|
153
|
-
value: value
|
|
154
|
-
})
|
|
155
|
-
})]
|
|
156
|
-
})
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
export { SIZES, Toggle };
|