@ultraviolet/ui 1.51.1 → 1.51.3
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 +30 -0
- package/dist/components/Alert/index.d.ts +27 -0
- package/dist/components/Alert/index.js +115 -0
- package/dist/components/Avatar/index.d.ts +43 -0
- package/dist/components/Avatar/index.js +57 -0
- package/dist/components/Badge/index.d.ts +31 -0
- package/dist/components/Badge/index.js +99 -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 +116 -0
- package/dist/components/BarChart/Tooltip.d.ts +9 -0
- package/dist/components/BarChart/Tooltip.js +41 -0
- package/dist/components/BarChart/index.d.ts +27 -0
- package/dist/components/BarChart/index.js +69 -0
- package/dist/components/BarStack/index.d.ts +36 -0
- package/dist/components/BarStack/index.js +114 -0
- package/dist/components/Breadcrumbs/index.d.ts +30 -0
- package/dist/components/Breadcrumbs/index.js +73 -0
- package/dist/components/Bullet/index.d.ts +39 -0
- package/dist/components/Bullet/index.js +84 -0
- package/dist/components/Button/index.d.ts +120 -0
- package/dist/components/Button/index.js +249 -0
- package/dist/components/Card/index.d.ts +20 -0
- package/dist/components/Card/index.js +52 -0
- package/dist/components/Carousel/index.d.ts +19 -0
- package/dist/components/Carousel/index.js +123 -0
- package/dist/components/Checkbox/index.d.ts +36 -0
- package/dist/components/Checkbox/index.js +262 -0
- package/dist/components/CheckboxGroup/index.d.ts +24 -0
- package/dist/components/CheckboxGroup/index.js +116 -0
- package/dist/components/CopyButton/index.d.ts +19 -0
- package/dist/components/CopyButton/index.js +23 -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 +182 -0
- package/dist/components/Dialog/Context.d.ts +7 -0
- package/dist/components/Dialog/Context.js +13 -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 +66 -0
- package/dist/components/Dialog/subComponents/Button.d.ts +7 -0
- package/dist/components/Dialog/subComponents/Button.js +15 -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 +8 -0
- package/dist/components/Dialog/subComponents/Text.d.ts +6 -0
- package/dist/components/Dialog/subComponents/Text.js +8 -0
- package/dist/components/EmptyState/index.d.ts +38 -0
- package/dist/components/EmptyState/index.js +90 -0
- package/dist/components/Expandable/index.d.ts +33 -0
- package/dist/components/Expandable/index.js +75 -0
- package/dist/components/GlobalAlert/GlobalAlertLink.d.ts +3 -0
- package/dist/components/GlobalAlert/GlobalAlertLink.js +23 -0
- package/dist/components/GlobalAlert/index.d.ts +40 -0
- package/dist/components/GlobalAlert/index.js +59 -0
- package/dist/components/LineChart/CustomLegend.d.ts +13 -0
- package/dist/components/LineChart/CustomLegend.js +113 -0
- package/dist/components/LineChart/Tooltip.d.ts +6 -0
- package/dist/components/LineChart/Tooltip.js +35 -0
- package/dist/components/LineChart/helpers.d.ts +8 -0
- package/dist/{src/components → components}/LineChart/helpers.js +22 -10
- package/dist/components/LineChart/index.d.ts +25 -0
- package/dist/components/LineChart/index.js +101 -0
- package/dist/components/Link/index.d.ts +33 -0
- package/dist/components/Link/index.js +128 -0
- package/dist/components/List/Body.d.ts +6 -0
- package/dist/components/List/Body.js +16 -0
- package/dist/components/List/Cell.d.ts +12 -0
- package/dist/components/List/Cell.js +41 -0
- package/dist/components/List/HeaderCell.d.ts +11 -0
- package/dist/components/List/HeaderCell.js +82 -0
- package/dist/components/List/HeaderRow.d.ts +7 -0
- package/dist/components/List/HeaderRow.js +36 -0
- package/dist/components/List/ListContext.d.ts +34 -0
- package/dist/{src/components → components}/List/ListContext.js +27 -29
- package/dist/components/List/Row.d.ts +23 -0
- package/dist/components/List/Row.js +161 -0
- package/dist/components/List/SelectBar.d.ts +15 -0
- package/dist/components/List/SelectBar.js +52 -0
- package/dist/components/List/SkeletonRows.d.ts +7 -0
- package/dist/components/List/SkeletonRows.js +55 -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 +60 -0
- package/dist/components/Loader/index.d.ts +22 -0
- package/dist/components/Loader/index.js +77 -0
- package/dist/components/Menu/Item.d.ts +15 -0
- package/dist/components/Menu/Item.js +91 -0
- package/dist/components/Menu/index.d.ts +49 -0
- package/dist/components/Menu/index.js +116 -0
- package/dist/components/MenuV2/Group.d.ts +7 -0
- package/dist/components/MenuV2/Group.js +21 -0
- package/dist/components/MenuV2/Item.d.ts +16 -0
- package/dist/components/MenuV2/Item.js +113 -0
- package/dist/components/MenuV2/index.d.ts +90 -0
- package/dist/components/MenuV2/index.js +90 -0
- package/dist/components/Meter/index.d.ts +26 -0
- package/dist/components/Meter/index.js +63 -0
- package/dist/components/Modal/Dialog.d.ts +3 -0
- package/dist/components/Modal/Dialog.js +141 -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 +79 -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 +23 -0
- package/dist/components/Notification/index.d.ts +36 -0
- package/dist/components/Notification/index.js +49 -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 +262 -0
- package/dist/components/NumberInputV2/index.d.ts +27 -0
- package/dist/components/NumberInputV2/index.js +221 -0
- package/dist/components/Pagination/getPageNumbers.d.ts +8 -0
- package/dist/{src/components → components}/Pagination/getPageNumbers.js +3 -9
- package/dist/components/Pagination/index.d.ts +30 -0
- package/dist/components/Pagination/index.js +88 -0
- package/dist/components/PasswordCheck/index.d.ts +20 -0
- package/dist/components/PasswordCheck/index.js +24 -0
- package/dist/components/PasswordStrengthMeter/index.d.ts +39 -0
- package/dist/components/PasswordStrengthMeter/index.js +96 -0
- package/dist/components/PieChart/Legends.d.ts +9 -0
- package/dist/components/PieChart/Legends.js +142 -0
- package/dist/components/PieChart/Tooltip.d.ts +12 -0
- package/dist/components/PieChart/Tooltip.js +49 -0
- package/dist/components/PieChart/index.d.ts +20 -0
- package/dist/components/PieChart/index.js +101 -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 +100 -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 +216 -0
- package/dist/components/Popup/index.d.ts +72 -0
- package/dist/components/Popup/index.js +297 -0
- package/dist/components/ProgressBar/index.d.ts +14 -0
- package/dist/components/ProgressBar/index.js +53 -0
- package/dist/components/Radio/index.d.ts +21 -0
- package/dist/components/Radio/index.js +133 -0
- package/dist/components/RadioGroup/index.d.ts +25 -0
- package/dist/components/RadioGroup/index.js +99 -0
- package/dist/components/Row/index.d.ts +22 -0
- package/dist/components/Row/index.js +34 -0
- package/dist/components/SelectInput/index.d.ts +75 -0
- package/dist/components/SelectInput/index.js +516 -0
- package/dist/components/SelectInputV2/Dropdown.d.ts +23 -0
- package/dist/components/SelectInputV2/Dropdown.js +429 -0
- package/dist/components/SelectInputV2/DropdownOption.d.ts +8 -0
- package/dist/components/SelectInputV2/DropdownOption.js +62 -0
- package/dist/components/SelectInputV2/SearchBarDropdown.d.ts +9 -0
- package/dist/components/SelectInputV2/SearchBarDropdown.js +107 -0
- package/dist/components/SelectInputV2/SelectBar.d.ts +14 -0
- package/dist/components/SelectInputV2/SelectBar.js +224 -0
- package/dist/components/SelectInputV2/SelectInputProvider.d.ts +41 -0
- package/dist/{src/components → components}/SelectInputV2/SelectInputProvider.js +38 -36
- 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 +87 -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 +137 -0
- package/dist/components/SelectableCardGroup/index.d.ts +23 -0
- package/dist/components/SelectableCardGroup/index.js +107 -0
- package/dist/components/Separator/index.d.ts +17 -0
- package/dist/components/Separator/index.js +56 -0
- package/dist/components/Skeleton/Block.d.ts +3 -0
- package/dist/components/Skeleton/Block.js +38 -0
- package/dist/components/Skeleton/Blocks.d.ts +4 -0
- package/dist/components/Skeleton/Blocks.js +38 -0
- package/dist/components/Skeleton/BoxWithIcon.d.ts +4 -0
- package/dist/components/Skeleton/BoxWithIcon.js +36 -0
- package/dist/components/Skeleton/Donut.d.ts +1 -0
- package/dist/components/Skeleton/Donut.js +61 -0
- package/dist/components/Skeleton/IconSkeleton.d.ts +5 -0
- package/dist/components/Skeleton/IconSkeleton.js +22 -0
- package/dist/components/Skeleton/Line.d.ts +5 -0
- package/dist/components/Skeleton/Line.js +16 -0
- package/dist/components/Skeleton/List.d.ts +4 -0
- package/dist/components/Skeleton/List.js +56 -0
- package/dist/components/Skeleton/Slider.d.ts +3 -0
- package/dist/components/Skeleton/Slider.js +40 -0
- package/dist/components/Skeleton/Square.d.ts +5 -0
- package/dist/components/Skeleton/Square.js +12 -0
- package/dist/components/Skeleton/index.d.ts +47 -0
- package/dist/components/Skeleton/index.js +79 -0
- package/dist/components/Snippet/index.d.ts +23 -0
- package/dist/components/Snippet/index.js +182 -0
- package/dist/components/Stack/index.d.ts +23 -0
- package/dist/components/Stack/index.js +29 -0
- package/dist/components/Status/index.d.ts +32 -0
- package/dist/components/Status/index.js +72 -0
- package/dist/components/StepList/index.d.ts +33 -0
- package/dist/components/StepList/index.js +58 -0
- package/dist/components/Stepper/index.d.ts +15 -0
- package/dist/components/Stepper/index.js +145 -0
- package/dist/components/SwitchButton/FocusOverlay.d.ts +8 -0
- package/dist/components/SwitchButton/FocusOverlay.js +38 -0
- package/dist/components/SwitchButton/index.d.ts +26 -0
- package/dist/components/SwitchButton/index.js +76 -0
- package/dist/components/Table/Body.d.ts +6 -0
- package/dist/components/Table/Body.js +7 -0
- package/dist/components/Table/Cell.d.ts +9 -0
- package/dist/components/Table/Cell.js +19 -0
- package/dist/components/Table/Header.d.ts +6 -0
- package/dist/components/Table/Header.js +16 -0
- package/dist/components/Table/HeaderCell.d.ts +14 -0
- package/dist/components/Table/HeaderCell.js +80 -0
- package/dist/components/Table/HeaderRow.d.ts +7 -0
- package/dist/components/Table/HeaderRow.js +23 -0
- package/dist/components/Table/Row.d.ts +14 -0
- package/dist/components/Table/Row.js +80 -0
- package/dist/components/Table/SelectBar.d.ts +15 -0
- package/dist/components/Table/SelectBar.js +52 -0
- package/dist/components/Table/SkeletonRows.d.ts +7 -0
- package/dist/components/Table/SkeletonRows.js +54 -0
- package/dist/components/Table/TableContext.d.ts +27 -0
- package/dist/{src/components → components}/Table/TableContext.js +19 -21
- package/dist/components/Table/index.d.ts +60 -0
- package/dist/components/Table/index.js +67 -0
- package/dist/components/Tabs/Tab.d.ts +20 -0
- package/dist/components/Tabs/Tab.js +120 -0
- package/dist/components/Tabs/TabMenu.d.ts +8 -0
- package/dist/components/Tabs/TabMenu.js +62 -0
- package/dist/components/Tabs/TabMenuItem.d.ts +20 -0
- package/dist/components/Tabs/TabMenuItem.js +34 -0
- package/dist/components/Tabs/TabsContext.d.ts +8 -0
- package/dist/components/Tabs/TabsContext.js +7 -0
- package/dist/components/Tabs/index.d.ts +50 -0
- package/dist/components/Tabs/index.js +102 -0
- package/dist/components/Tag/index.d.ts +26 -0
- package/dist/components/Tag/index.js +144 -0
- package/dist/components/TagInput/index.d.ts +55 -0
- package/dist/components/TagInput/index.js +253 -0
- package/dist/components/TagList/index.d.ts +37 -0
- package/dist/components/TagList/index.js +98 -0
- package/dist/components/Text/index.d.ts +40 -0
- package/dist/components/Text/index.js +82 -0
- package/dist/components/TextArea/index.d.ts +50 -0
- package/dist/components/TextArea/index.js +158 -0
- package/dist/components/TextInput/index.d.ts +75 -0
- package/dist/components/TextInput/index.js +387 -0
- package/dist/components/TextInputV2/index.d.ts +30 -0
- package/dist/components/TextInputV2/index.js +190 -0
- package/dist/components/TimeInput/index.d.ts +25 -0
- package/dist/components/TimeInput/index.js +28 -0
- package/dist/components/Toaster/index.d.ts +46 -0
- package/dist/components/Toaster/index.js +83 -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 +136 -0
- package/dist/components/ToggleGroup/index.d.ts +24 -0
- package/dist/components/ToggleGroup/index.js +96 -0
- package/dist/components/Tooltip/index.d.ts +9 -0
- package/dist/components/Tooltip/index.js +40 -0
- package/dist/components/VerificationCode/index.d.ts +36 -0
- package/dist/components/VerificationCode/index.js +217 -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 -3723
- 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 +27 -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/{src/utils → utils}/ids.js +5 -4
- 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 +15 -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 +18 -8
- 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/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/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 -118
- 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 -146
- package/dist/src/components/Popup/helpers.js +0 -252
- package/dist/src/components/Popup/index.js +0 -383
- 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 -122
- package/dist/src/components/SelectInputV2/SelectBar.js +0 -282
- 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/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/responsive/Breakpoint.js +0 -12
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import _styled from "@emotion/styled/base";
|
|
3
|
+
import { useState, useId, useCallback } from "react";
|
|
4
|
+
import { Button } from "../Button/index.js";
|
|
5
|
+
import { Dialog } from "./Dialog.js";
|
|
6
|
+
import { Disclosure } from "./Disclosure.js";
|
|
7
|
+
const StyledContainer = /* @__PURE__ */ _styled("div", process.env.NODE_ENV === "production" ? {
|
|
8
|
+
target: "ebywm9u0"
|
|
9
|
+
} : {
|
|
10
|
+
target: "ebywm9u0",
|
|
11
|
+
label: "StyledContainer"
|
|
12
|
+
})("position:absolute;top:", ({
|
|
13
|
+
theme
|
|
14
|
+
}) => theme.space["2"], ";right:", ({
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.space["2"], ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3VsdHJhdmlvbGV0L3VsdHJhdmlvbGV0L3BhY2thZ2VzL3VpL3NyYy9jb21wb25lbnRzL01vZGFsL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0Q2tDIiwiZmlsZSI6Ii9ob21lL3J1bm5lci93b3JrL3VsdHJhdmlvbGV0L3VsdHJhdmlvbGV0L3BhY2thZ2VzL3VpL3NyYy9jb21wb25lbnRzL01vZGFsL2luZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IHR5cGUgeyBSZWFjdEVsZW1lbnQsIFJlYWN0Tm9kZSB9IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHR5cGUgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgeyB1c2VDYWxsYmFjaywgdXNlSWQsIHVzZVN0YXRlIH0gZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBCdXR0b24gfSBmcm9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gICBkYXRhLXRlc3RpZD17ZGF0YVRlc3RJZH1cbiAgICAgICAgaWQ9e2ZpbmFsSWR9XG4gICAgICAgIGRpYWxvZ0Nzcz17Y3VzdG9tRGlhbG9nU3R5bGVzfVxuICAgICAgICBiYWNrZHJvcENzcz17Y3VzdG9tRGlhbG9nQmFja2Ryb3BTdHlsZXN9XG4gICAgICA+XG4gICAgICAgIDw+XG4gICAgICAgICAge3R5cGVvZiBjaGlsZHJlbiA9PT0gJ2Z1bmN0aW9uJ1xuICAgICAgICAgICAgPyBjaGlsZHJlbih7XG4gICAgICAgICAgICAgICAgdmlzaWJsZSxcbiAgICAgICAgICAgICAgICBvbkNsb3NlOiBoYW5kbGVDbG9zZSxcbiAgICAgICAgICAgICAgICBvbk9wZW46IGhhbmRsZU9wZW4sXG4gICAgICAgICAgICAgICAgdG9nZ2xlOiBoYW5kbGVUb2dnbGUsXG4gICAgICAgICAgICAgICAgbW9kYWxJZDogZmluYWxJZCxcbiAgICAgICAgICAgICAgICBoaWRlOiBoYW5kbGVDbG9zZSxcbiAgICAgICAgICAgICAgICBjbG9zZTogaGFuZGxlQ2xvc2UsXG4gICAgICAgICAgICAgICAgc2hvdzogaGFuZGxlT3BlbixcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIDogY2hpbGRyZW59XG4gICAgICAgICAgPFN0eWxlZENvbnRhaW5lcj5cbiAgICAgICAgICAgIHtpc0Nsb3NhYmxlID8gKFxuICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgZGF0YS10ZXN0aWQ9e1xuICAgICAgICAgICAgICAgICAgZGF0YVRlc3RJZCA/IGAke2RhdGFUZXN0SWR9LWNsb3NlLWJ1dHRvbmAgOiB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb25DbGljaz17aGFuZGxlQ2xvc2V9XG4gICAgICAgICAgICAgICAgdmFyaWFudD1cImdob3N0XCJcbiAgICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICAgIGljb249XCJjbG9zZVwiXG4gICAgICAgICAgICAgICAgc2VudGltZW50PVwibmV1dHJhbFwiXG4gICAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cImNsb3NlXCJcbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICAgIDwvU3R5bGVkQ29udGFpbmVyPlxuICAgICAgICA8Lz5cbiAgICAgIDwvRGlhbG9nPlxuICAgIDwvPlxuICApXG59XG4iXX0= */"));
|
|
17
|
+
const Modal = ({
|
|
18
|
+
ariaLabel = "modal",
|
|
19
|
+
id,
|
|
20
|
+
children,
|
|
21
|
+
disclosure,
|
|
22
|
+
hideOnClickOutside = true,
|
|
23
|
+
hideOnEsc = true,
|
|
24
|
+
isClosable = true,
|
|
25
|
+
onClose,
|
|
26
|
+
onBeforeClose,
|
|
27
|
+
open = false,
|
|
28
|
+
opened = false,
|
|
29
|
+
placement = "center",
|
|
30
|
+
preventBodyScroll = true,
|
|
31
|
+
size,
|
|
32
|
+
className,
|
|
33
|
+
"data-testid": dataTestId,
|
|
34
|
+
backdropClassName,
|
|
35
|
+
width = "small",
|
|
36
|
+
customDialogStyles,
|
|
37
|
+
customDialogBackdropStyles
|
|
38
|
+
}) => {
|
|
39
|
+
const [visible, setVisible] = useState(false);
|
|
40
|
+
const controlId = useId();
|
|
41
|
+
const handleOpen = useCallback(() => {
|
|
42
|
+
setVisible(true);
|
|
43
|
+
}, []);
|
|
44
|
+
const handleClose = useCallback(() => {
|
|
45
|
+
if (onClose) {
|
|
46
|
+
onClose();
|
|
47
|
+
} else {
|
|
48
|
+
const promise = onBeforeClose?.();
|
|
49
|
+
if (promise && "catch" in promise) {
|
|
50
|
+
promise.catch(() => null);
|
|
51
|
+
}
|
|
52
|
+
setVisible(false);
|
|
53
|
+
}
|
|
54
|
+
}, [onBeforeClose, onClose]);
|
|
55
|
+
const handleToggle = useCallback(() => {
|
|
56
|
+
setVisible((current) => !current);
|
|
57
|
+
}, []);
|
|
58
|
+
const finalId = id ?? controlId;
|
|
59
|
+
const finalSize = size ?? width;
|
|
60
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
disclosure ? /* @__PURE__ */ jsx(Disclosure, { id: finalId, handleOpen, disclosure, handleClose, visible, toggle: handleToggle }) : null,
|
|
62
|
+
/* @__PURE__ */ jsx(Dialog, { open: visible || open || opened, placement, size: finalSize, ariaLabel, hideOnClickOutside, hideOnEsc, preventBodyScroll, onClose: handleClose, className, backdropClassName, "data-testid": dataTestId, id: finalId, dialogCss: customDialogStyles, backdropCss: customDialogBackdropStyles, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63
|
+
typeof children === "function" ? children({
|
|
64
|
+
visible,
|
|
65
|
+
onClose: handleClose,
|
|
66
|
+
onOpen: handleOpen,
|
|
67
|
+
toggle: handleToggle,
|
|
68
|
+
modalId: finalId,
|
|
69
|
+
hide: handleClose,
|
|
70
|
+
close: handleClose,
|
|
71
|
+
show: handleOpen
|
|
72
|
+
}) : children,
|
|
73
|
+
/* @__PURE__ */ jsx(StyledContainer, { children: isClosable ? /* @__PURE__ */ jsx(Button, { "data-testid": dataTestId ? `${dataTestId}-close-button` : void 0, onClick: handleClose, variant: "ghost", size: "small", icon: "close", sentiment: "neutral", "aria-label": "close" }) : null })
|
|
74
|
+
] }) })
|
|
75
|
+
] });
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
Modal
|
|
79
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export type ModalSize = 'large' | 'medium' | 'small' | 'xsmall' | 'xxsmall';
|
|
4
|
+
export type ModalPlacement = 'bottom' | 'bottom-left' | 'bottom-right' | 'center' | 'top' | 'top-left' | 'top-right' | 'right' | 'left';
|
|
5
|
+
export type ModalState = {
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated use show
|
|
8
|
+
*/
|
|
9
|
+
onOpen: () => void;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated use close
|
|
12
|
+
*/
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
toggle: () => void;
|
|
15
|
+
visible: boolean;
|
|
16
|
+
modalId: string;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated use close
|
|
19
|
+
*/
|
|
20
|
+
hide: () => void;
|
|
21
|
+
close: () => void;
|
|
22
|
+
show: () => void;
|
|
23
|
+
};
|
|
24
|
+
export type DisclosureProps = {
|
|
25
|
+
disclosure?: ReactElement | ((state: ModalState) => ReactElement);
|
|
26
|
+
handleOpen: ModalState['show'];
|
|
27
|
+
handleClose: ModalState['close'];
|
|
28
|
+
visible: ModalState['visible'];
|
|
29
|
+
toggle: ModalState['toggle'];
|
|
30
|
+
id: string;
|
|
31
|
+
};
|
|
32
|
+
export type DialogProps = {
|
|
33
|
+
ariaLabel?: string;
|
|
34
|
+
backdropClassName?: string;
|
|
35
|
+
id: string;
|
|
36
|
+
open: boolean;
|
|
37
|
+
size: ModalSize;
|
|
38
|
+
className?: string;
|
|
39
|
+
placement: ModalPlacement;
|
|
40
|
+
hideOnClickOutside?: boolean;
|
|
41
|
+
hideOnEsc?: boolean;
|
|
42
|
+
preventBodyScroll?: boolean;
|
|
43
|
+
onClose: () => void;
|
|
44
|
+
'data-testid'?: string;
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
backdropCss: React.JSX.IntrinsicAttributes['css'];
|
|
47
|
+
dialogCss: React.JSX.IntrinsicAttributes['css'];
|
|
48
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type NoticeProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
'data-testid'?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A Notice is used to display a short message to the user.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Notice: ({ children, className, "data-testid": dataTestId, }: NoticeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import _styled from "@emotion/styled/base";
|
|
3
|
+
import { Icon } from "@ultraviolet/icons";
|
|
4
|
+
import { Text } from "../Text/index.js";
|
|
5
|
+
const StyledSpan = /* @__PURE__ */ _styled(Text, process.env.NODE_ENV === "production" ? {
|
|
6
|
+
target: "e19pqvs30"
|
|
7
|
+
} : {
|
|
8
|
+
target: "e19pqvs30",
|
|
9
|
+
label: "StyledSpan"
|
|
10
|
+
})("display:flex;align-items:center;gap:", ({
|
|
11
|
+
theme
|
|
12
|
+
}) => theme.space["1"], ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3VsdHJhdmlvbGV0L3VsdHJhdmlvbGV0L3BhY2thZ2VzL3VpL3NyYy9jb21wb25lbnRzL05vdGljZS9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBVytCIiwiZmlsZSI6Ii9ob21lL3J1bm5lci93b3JrL3VsdHJhdmlvbGV0L3VsdHJhdmlvbGV0L3BhY2thZ2VzL3VpL3NyYy9jb21wb25lbnRzL05vdGljZS9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IEljb24gfSBmcm9tICdAdWx0cmF2aW9sZXQvaWNvbnMnXG5pbXBvcnQgdHlwZSB7IFJlYWN0Tm9kZSB9IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgVGV4dCB9IGZyb20gJy4uL1RleHQnXG5cbnR5cGUgTm90aWNlUHJvcHMgPSB7XG4gIGNoaWxkcmVuOiBSZWFjdE5vZGVcbiAgY2xhc3NOYW1lPzogc3RyaW5nXG4gICdkYXRhLXRlc3RpZCc/OiBzdHJpbmdcbn1cblxuY29uc3QgU3R5bGVkU3BhbiA9IHN0eWxlZChUZXh0KWBcbiAgZGlzcGxheTogZmxleDtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgZ2FwOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLnNwYWNlWycxJ119O1xuYFxuXG4vKipcbiAqIEEgTm90aWNlIGlzIHVzZWQgdG8gZGlzcGxheSBhIHNob3J0IG1lc3NhZ2UgdG8gdGhlIHVzZXIuXG4gKi9cbmV4cG9ydCBjb25zdCBOb3RpY2UgPSAoe1xuICBjaGlsZHJlbixcbiAgY2xhc3NOYW1lLFxuICAnZGF0YS10ZXN0aWQnOiBkYXRhVGVzdElkLFxufTogTm90aWNlUHJvcHMpID0+IChcbiAgPFN0eWxlZFNwYW5cbiAgICBhcz1cInNwYW5cIlxuICAgIHZhcmlhbnQ9XCJjYXB0aW9uXCJcbiAgICBzZW50aW1lbnQ9XCJuZXV0cmFsXCJcbiAgICBwcm9taW5lbmNlPVwid2Vha1wiXG4gICAgZGF0YS10ZXN0aWQ9e2RhdGFUZXN0SWR9XG4gICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gID5cbiAgICA8SWNvblxuICAgICAgbmFtZT1cImluZm9ybWF0aW9uLW91dGxpbmVcIlxuICAgICAgc2l6ZT17MTZ9XG4gICAgICBjb2xvcj1cIm5ldXRyYWxcIlxuICAgICAgcHJvbWluZW5jZT1cIndlYWtcIlxuICAgIC8+XG4gICAge2NoaWxkcmVufVxuICA8L1N0eWxlZFNwYW4+XG4pXG4iXX0= */"));
|
|
13
|
+
const Notice = ({
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
"data-testid": dataTestId
|
|
17
|
+
}) => /* @__PURE__ */ jsxs(StyledSpan, { as: "span", variant: "caption", sentiment: "neutral", prominence: "weak", "data-testid": dataTestId, className, children: [
|
|
18
|
+
/* @__PURE__ */ jsx(Icon, { name: "information-outline", size: 16, color: "neutral", prominence: "weak" }),
|
|
19
|
+
children
|
|
20
|
+
] });
|
|
21
|
+
export {
|
|
22
|
+
Notice
|
|
23
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Theme as ThemeToastify, ToastOptions, TypeOptions } from 'react-toastify';
|
|
3
|
+
type CloseButtonProps = {
|
|
4
|
+
closeToast: (event: React.MouseEvent<HTMLElement>) => void;
|
|
5
|
+
type: TypeOptions;
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
theme: ThemeToastify;
|
|
8
|
+
};
|
|
9
|
+
export declare const notification: (children: ((props: CloseButtonProps) => ReactNode) | ReactNode, title: string, icon?: ReactNode, isClosable?: boolean, containerId?: string, options?: ToastOptions) => import("react-toastify").Id;
|
|
10
|
+
type NotificationContainerProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Delay (in ms) before the notification autocloses. To disable autoclose, set to false
|
|
13
|
+
*/
|
|
14
|
+
autoClose?: false | number;
|
|
15
|
+
/**
|
|
16
|
+
* Whether to display the newest toast on top.
|
|
17
|
+
* `Default: false`
|
|
18
|
+
*/
|
|
19
|
+
newestOnTop?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Limit the number of toast displayed at the same time
|
|
22
|
+
*/
|
|
23
|
+
limit?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Position on the notification container
|
|
26
|
+
*/
|
|
27
|
+
position?: ToastOptions['position'];
|
|
28
|
+
'data-testid'?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Give a personalized containerId in case there are multiple notifications with different styled to display
|
|
32
|
+
*/
|
|
33
|
+
containerId?: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const NotificationContainer: ({ newestOnTop, limit, autoClose, position, "data-testid": dataTestId, className, containerId, }: NotificationContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useTheme, Global, ClassNames, css } from "@emotion/react";
|
|
3
|
+
import { toast, ToastContainer, Slide } from "react-toastify";
|
|
4
|
+
import { Button } from "../Button/index.js";
|
|
5
|
+
import { Stack } from "../Stack/index.js";
|
|
6
|
+
import { Text } from "../Text/index.js";
|
|
7
|
+
import style from "./react-toastify.css.js";
|
|
8
|
+
const PREFIX = ".Toastify";
|
|
9
|
+
const styles = {
|
|
10
|
+
toast: ({
|
|
11
|
+
theme
|
|
12
|
+
}) => /* @__PURE__ */ css("border-radius:", theme.radii.default, ";&", PREFIX, "__toast{background-color:", theme.colors.neutral.background, ";color:", theme.colors.neutral.text, ";padding:", theme.space["2"], ";box-shadow:", theme.shadows.defaultShadow, ";}&", PREFIX, "__toast-container{width:312px;}", PREFIX, "__toast-body{margin:0;padding:0;display:none;}" + (process.env.NODE_ENV === "production" ? "" : ";label:toast;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3VsdHJhdmlvbGV0L3VsdHJhdmlvbGV0L3BhY2thZ2VzL3VpL3NyYy9jb21wb25lbnRzL05vdGlmaWNhdGlvbi9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0N3QyIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay91bHRyYXZpb2xldC91bHRyYXZpb2xldC9wYWNrYWdlcy91aS9zcmMvY29tcG9uZW50cy9Ob3RpZmljYXRpb24vaW5kZXgudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBUaGVtZSB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0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xhc3NOYW1lPXtsb2NhbENzcyhzdHlsZXMudG9hc3QoeyB0aGVtZSB9KSl9XG4gICAgICAgICAgICBpY29uPXtmYWxzZX1cbiAgICAgICAgICAgIGF1dG9DbG9zZT17YXV0b0Nsb3NlfVxuICAgICAgICAgICAgbmV3ZXN0T25Ub3A9e25ld2VzdE9uVG9wfVxuICAgICAgICAgICAgbGltaXQ9e2xpbWl0fVxuICAgICAgICAgICAgcG9zaXRpb249e3Bvc2l0aW9ufVxuICAgICAgICAgICAgaGlkZVByb2dyZXNzQmFyXG4gICAgICAgICAgICBkcmFnZ2FibGU9e2ZhbHNlfVxuICAgICAgICAgICAgdHJhbnNpdGlvbj17U2xpZGV9XG4gICAgICAgICAgICBjbGFzc05hbWU9e2NsYXNzTmFtZX1cbiAgICAgICAgICAgIGNvbnRhaW5lcklkPXtjb250YWluZXJJZH1cbiAgICAgICAgICAvPlxuICAgICAgICApfVxuICAgICAgPC9DbGFzc05hbWVzPlxuICAgIDwvPlxuICApXG59XG4iXX0= */")
|
|
13
|
+
};
|
|
14
|
+
const closeButton = (props) => /* @__PURE__ */ jsx(Button, { "aria-label": "close", icon: "close", sentiment: "neutral", variant: "ghost", onClick: props.closeToast, size: "xsmall" });
|
|
15
|
+
const notification = (children, title, icon, isClosable, containerId, options) => toast("", {
|
|
16
|
+
...options,
|
|
17
|
+
closeButton: (props) => /* @__PURE__ */ jsxs(Stack, { direction: "row", gap: 2, children: [
|
|
18
|
+
/* @__PURE__ */ jsx("div", { children: icon }),
|
|
19
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "column", children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Text, { as: "h3", variant: "bodySmallStronger", children: title }),
|
|
21
|
+
typeof children === "function" ? children(props) : children
|
|
22
|
+
] }),
|
|
23
|
+
isClosable ? closeButton(props) : null
|
|
24
|
+
] }),
|
|
25
|
+
containerId: containerId ?? "notification"
|
|
26
|
+
});
|
|
27
|
+
const NotificationContainer = ({
|
|
28
|
+
newestOnTop,
|
|
29
|
+
limit,
|
|
30
|
+
autoClose = false,
|
|
31
|
+
position = "top-right",
|
|
32
|
+
"data-testid": dataTestId,
|
|
33
|
+
className,
|
|
34
|
+
containerId = "notification"
|
|
35
|
+
}) => {
|
|
36
|
+
const theme = useTheme();
|
|
37
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Global, { styles: style }),
|
|
39
|
+
/* @__PURE__ */ jsx(ClassNames, { children: ({
|
|
40
|
+
css: localCss
|
|
41
|
+
}) => /* @__PURE__ */ jsx(ToastContainer, { "data-testid": dataTestId, toastClassName: localCss(styles.toast({
|
|
42
|
+
theme
|
|
43
|
+
})), icon: false, autoClose, newestOnTop, limit, position, hideProgressBar: true, draggable: false, transition: Slide, className, containerId }) })
|
|
44
|
+
] });
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
NotificationContainer,
|
|
48
|
+
notification
|
|
49
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const style = ':root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-offset:16px;--toastify-toast-top:max(var(--toastify-toast-offset),env(safe-area-inset-top));--toastify-toast-right:max(var(--toastify-toast-offset),env(safe-area-inset-right));--toastify-toast-left:max(var(--toastify-toast-offset),env(safe-area-inset-left));--toastify-toast-bottom:max(var(--toastify-toast-offset),env(safe-area-inset-bottom));--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-toast-bd-radius:6px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error);--toastify-color-progress-bgo:0.2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translateZ(var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translateX(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:auto}}.Toastify__toast{--y:0;position:relative;-ms-touch-action:none;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__close-button,.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right;border-bottom-left-radius:0;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}';
|
|
2
|
+
export {
|
|
3
|
+
style as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const bounded: (value: number, min: number, max: number) => number;
|
|
2
|
+
export declare const roundStep: (value: number, step: number, direction: number) => number;
|
|
3
|
+
export declare const getMinusRoundedValue: (currentValue: number, step: number) => number;
|
|
4
|
+
export declare const getPlusRoundedValue: (currentValue: number, step: number) => number;
|
|
@@ -2,5 +2,9 @@ const bounded = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
|
2
2
|
const roundStep = (value, step, direction) => direction === -1 ? Math.floor(value / step) * step : Math.ceil(value / step) * step;
|
|
3
3
|
const getMinusRoundedValue = (currentValue, step) => currentValue % step === 0 ? roundStep(currentValue - step, step, -1) : roundStep(currentValue, step, -1);
|
|
4
4
|
const getPlusRoundedValue = (currentValue, step) => currentValue % step === 0 ? roundStep(currentValue + step, step, 1) : roundStep(currentValue, step, 1);
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
export {
|
|
6
|
+
bounded,
|
|
7
|
+
getMinusRoundedValue,
|
|
8
|
+
getPlusRoundedValue,
|
|
9
|
+
roundStep
|
|
10
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
declare const containerSizes: {
|
|
3
|
+
large: number;
|
|
4
|
+
medium: number;
|
|
5
|
+
small: number;
|
|
6
|
+
};
|
|
7
|
+
type ContainerSizesType = keyof typeof containerSizes;
|
|
8
|
+
type NumberInputProps = {
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
maxValue?: number;
|
|
11
|
+
minValue?: number;
|
|
12
|
+
name?: string;
|
|
13
|
+
onChange?: (input: number | undefined) => void;
|
|
14
|
+
onMaxCrossed?(): void;
|
|
15
|
+
onMinCrossed?(): void;
|
|
16
|
+
size?: ContainerSizesType;
|
|
17
|
+
/**
|
|
18
|
+
* Define how much will stepper increase / decrease each time you click on + / - button.
|
|
19
|
+
*/
|
|
20
|
+
step?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Text displayed into component at the right of number value.
|
|
23
|
+
*/
|
|
24
|
+
text?: string;
|
|
25
|
+
defaultValue?: number;
|
|
26
|
+
value?: number | null;
|
|
27
|
+
disabledTooltip?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
'data-testid'?: string;
|
|
30
|
+
label?: string;
|
|
31
|
+
'aria-label'?: string;
|
|
32
|
+
'aria-describedby'?: string;
|
|
33
|
+
id?: string;
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
error?: string | boolean;
|
|
36
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange' | 'value' | 'defaultValue'>;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated This component is deprecated. Please use `NumberInputV2` instead.
|
|
39
|
+
*/
|
|
40
|
+
export declare const NumberInput: ({ disabled, maxValue, minValue, name, onChange, onFocus, onBlur, onMaxCrossed, onMinCrossed, size, step, text, defaultValue, value, disabledTooltip, className, label, id, placeholder, error, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "data-testid": dataTestId, }: NumberInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
|
+
export {};
|