@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,242 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Global } from '@emotion/react';
|
|
3
|
-
import { Icon } from '@ultraviolet/icons';
|
|
4
|
-
import { useId } from 'react';
|
|
5
|
-
import DatePicker, { registerLocale } from 'react-datepicker';
|
|
6
|
-
import css_248z from '../../../react-datepicker/dist/react-datepicker.min.css.js';
|
|
7
|
-
import { Button } from '../Button/index.js';
|
|
8
|
-
import { Stack } from '../Stack/index.js';
|
|
9
|
-
import { Text } from '../Text/index.js';
|
|
10
|
-
import { TextInputV2 } from '../TextInputV2/index.js';
|
|
11
|
-
import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
|
|
12
|
-
|
|
13
|
-
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)."; }
|
|
14
|
-
const PREFIX = '.react-datepicker';
|
|
15
|
-
const StyledWrapper = /*#__PURE__*/_styled("div", {
|
|
16
|
-
target: "e1bm75lk1"
|
|
17
|
-
})("width:100%;div", PREFIX, "-wrapper{display:block;}div", PREFIX, "__input-container{display:block;}div", PREFIX, "__triangle{display:none;}div", PREFIX, "__month-container{padding:16px;}", PREFIX, "-popper{z-index:1000;}.calendar{font-family:", ({
|
|
18
|
-
theme
|
|
19
|
-
}) => theme.typography.body.fontFamily, ";border-color:", ({
|
|
20
|
-
theme
|
|
21
|
-
}) => theme.colors.neutral.borderWeak, ";background-color:", ({
|
|
22
|
-
theme
|
|
23
|
-
}) => theme.colors.neutral.backgroundWeakElevated, ";", PREFIX, "__header{color:", ({
|
|
24
|
-
theme
|
|
25
|
-
}) => theme.colors.neutral.text, ";background-color:", ({
|
|
26
|
-
theme
|
|
27
|
-
}) => theme.colors.neutral.backgroundWeakElevated, ";border-bottom:none;text-align:inherit;display:block;padding-top:0;position:inherit;}", PREFIX, "__triangle{border-bottom-color:", ({
|
|
28
|
-
theme
|
|
29
|
-
}) => theme.colors.neutral.backgroundWeak, ";}", PREFIX, "__month{margin:0;}", PREFIX, "__day-names{margin-top:8px;}", PREFIX, "__day-name{font-family:", ({
|
|
30
|
-
theme
|
|
31
|
-
}) => theme.typography.bodySmallStrong.fontFamily, ";color:", ({
|
|
32
|
-
theme
|
|
33
|
-
}) => theme.colors.neutral.text, ";font-weight:", ({
|
|
34
|
-
theme
|
|
35
|
-
}) => theme.typography.bodySmallStrong.weight, ";font-size:", ({
|
|
36
|
-
theme
|
|
37
|
-
}) => theme.typography.bodySmallStrong.fontSize, ";line-height:", ({
|
|
38
|
-
theme
|
|
39
|
-
}) => theme.typography.bodySmallStrong.lineHeight, ";text-align:center;margin:3px;text-transform:capitalize;}", PREFIX, "__day{color:", ({
|
|
40
|
-
theme
|
|
41
|
-
}) => theme.colors.neutral.textWeak, ";font-weight:", ({
|
|
42
|
-
theme
|
|
43
|
-
}) => theme.typography.bodyStrong.weight, ";font-size:", ({
|
|
44
|
-
theme
|
|
45
|
-
}) => theme.typography.bodyStrong.fontSize, ";width:26px;height:26px;margin-left:3px;margin-right:3px;}", PREFIX, "__day--outside-month{color:", ({
|
|
46
|
-
theme
|
|
47
|
-
}) => theme.colors.neutral.textDisabled, ";font-weight:", ({
|
|
48
|
-
theme
|
|
49
|
-
}) => theme.typography.bodyStrong.weight, ";font-size:", ({
|
|
50
|
-
theme
|
|
51
|
-
}) => theme.typography.bodyStrong.fontSize, ";}", PREFIX, "__day--selected{color:", ({
|
|
52
|
-
theme
|
|
53
|
-
}) => theme.colors.primary.textStrong, ";background-color:", ({
|
|
54
|
-
theme
|
|
55
|
-
}) => theme.colors.primary.backgroundStrong, ";&[aria-disabled='true'],&:disabled{color:", ({
|
|
56
|
-
theme
|
|
57
|
-
}) => theme.colors.primary.textStrongDisabled, ";background-color:", ({
|
|
58
|
-
theme
|
|
59
|
-
}) => theme.colors.primary.backgroundStrongDisabled, ";}}", PREFIX, "__day--in-selecting-range{color:", ({
|
|
60
|
-
theme
|
|
61
|
-
}) => theme.colors.primary.text, ";background-color:", ({
|
|
62
|
-
theme
|
|
63
|
-
}) => theme.colors.primary.background, ";&[aria-disabled='true'],&:disabled{color:", ({
|
|
64
|
-
theme
|
|
65
|
-
}) => theme.colors.primary.textDisabled, ";background-color:", ({
|
|
66
|
-
theme
|
|
67
|
-
}) => theme.colors.primary.backgroundDisabled, ";}}", PREFIX, "__day--in-range{color:", ({
|
|
68
|
-
theme
|
|
69
|
-
}) => theme.colors.primary.text, ";background-color:", ({
|
|
70
|
-
theme
|
|
71
|
-
}) => theme.colors.primary.background, ";&[aria-disabled='true'],&:disabled{color:", ({
|
|
72
|
-
theme
|
|
73
|
-
}) => theme.colors.primary.textDisabled, ";background-color:", ({
|
|
74
|
-
theme
|
|
75
|
-
}) => theme.colors.primary.backgroundDisabled, ";}}", PREFIX, "__day--range-start{color:", ({
|
|
76
|
-
theme
|
|
77
|
-
}) => theme.colors.primary.textStrong, ";background-color:", ({
|
|
78
|
-
theme
|
|
79
|
-
}) => theme.colors.primary.backgroundStrong, ";&[aria-disabled='true'],&:disabled{color:", ({
|
|
80
|
-
theme
|
|
81
|
-
}) => theme.colors.primary.textStrongDisabled, ";background-color:", ({
|
|
82
|
-
theme
|
|
83
|
-
}) => theme.colors.primary.backgroundStrongDisabled, ";}}", PREFIX, "__day--range-end{color:", ({
|
|
84
|
-
theme
|
|
85
|
-
}) => theme.colors.primary.textStrong, ";background-color:", ({
|
|
86
|
-
theme
|
|
87
|
-
}) => theme.colors.primary.backgroundStrong, ";&[aria-disabled='true'],&:disabled{color:", ({
|
|
88
|
-
theme
|
|
89
|
-
}) => theme.colors.primary.textStrongDisabled, ";background-color:", ({
|
|
90
|
-
theme
|
|
91
|
-
}) => theme.colors.primary.backgroundStrongDisabled, ";}}", PREFIX, "__day--keyboard-selected{color:", ({
|
|
92
|
-
theme
|
|
93
|
-
}) => theme.colors.primary.textStrong, ";background-color:", ({
|
|
94
|
-
theme
|
|
95
|
-
}) => theme.colors.primary.backgroundStrong, ";}", PREFIX, "__day:hover{color:", ({
|
|
96
|
-
theme
|
|
97
|
-
}) => theme.colors.neutral.textHover, ";background-color:", ({
|
|
98
|
-
theme
|
|
99
|
-
}) => theme.colors.neutral.backgroundHover, ";}", PREFIX, "__day--disabled{color:", ({
|
|
100
|
-
theme
|
|
101
|
-
}) => theme.colors.neutral.textDisabled, ";}", PREFIX, "__day--disabled:hover{color:", ({
|
|
102
|
-
theme
|
|
103
|
-
}) => theme.colors.neutral.textDisabled, ";background-color:transparent;}}");
|
|
104
|
-
const StyledText = /*#__PURE__*/_styled(Text, {
|
|
105
|
-
target: "e1bm75lk0"
|
|
106
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
107
|
-
name: "kff9ir",
|
|
108
|
-
styles: "text-transform:capitalize"
|
|
109
|
-
} : {
|
|
110
|
-
name: "kff9ir",
|
|
111
|
-
styles: "text-transform:capitalize",
|
|
112
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
113
|
-
});
|
|
114
|
-
const DEFAULT_FORMAT = value => value instanceof Date ? value.toISOString() : value;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* DateInput is a wrapper around react-datepicker that provides a consistent look and feel with the rest of the Ultraviolet UI.
|
|
118
|
-
* See https://reactdatepicker.com/ for more information.
|
|
119
|
-
*/
|
|
120
|
-
const DateInput = ({
|
|
121
|
-
autoFocus = false,
|
|
122
|
-
disabled = false,
|
|
123
|
-
error,
|
|
124
|
-
format = DEFAULT_FORMAT,
|
|
125
|
-
label,
|
|
126
|
-
labelDescription,
|
|
127
|
-
locale,
|
|
128
|
-
maxDate,
|
|
129
|
-
minDate,
|
|
130
|
-
startDate,
|
|
131
|
-
endDate,
|
|
132
|
-
name,
|
|
133
|
-
onBlur,
|
|
134
|
-
onChange,
|
|
135
|
-
onFocus,
|
|
136
|
-
required = false,
|
|
137
|
-
excludeDates,
|
|
138
|
-
value,
|
|
139
|
-
selectsRange,
|
|
140
|
-
className,
|
|
141
|
-
id,
|
|
142
|
-
success,
|
|
143
|
-
helper,
|
|
144
|
-
size = 'large',
|
|
145
|
-
readOnly = false,
|
|
146
|
-
tooltip,
|
|
147
|
-
'data-testid': dataTestId
|
|
148
|
-
}) => {
|
|
149
|
-
const uniqueId = useId();
|
|
150
|
-
const localId = id ?? uniqueId;
|
|
151
|
-
|
|
152
|
-
// Linked to: https://github.com/Hacker0x01/react-datepicker/issues/3834
|
|
153
|
-
const ReactDatePicker = DatePicker.default ?? DatePicker;
|
|
154
|
-
const localeCode = (typeof locale === 'string' ? locale : locale?.code) ?? 'en-GB';
|
|
155
|
-
if (typeof locale === 'object') {
|
|
156
|
-
registerLocale(localeCode, locale);
|
|
157
|
-
}
|
|
158
|
-
const valueStart = `${startDate !== undefined && startDate !== null ? `${format(startDate)} -` : ''}`;
|
|
159
|
-
const valueEnd = `${endDate !== undefined && endDate !== null ? format(endDate) : ''}`;
|
|
160
|
-
const valueFormat = selectsRange ? `${valueStart} ${valueEnd}` : format(value);
|
|
161
|
-
return jsxs(Fragment, {
|
|
162
|
-
children: [jsx(Global, {
|
|
163
|
-
styles: css_248z
|
|
164
|
-
}), jsx(StyledWrapper, {
|
|
165
|
-
children: jsx(ReactDatePicker, {
|
|
166
|
-
required: required,
|
|
167
|
-
"data-testid": dataTestId,
|
|
168
|
-
className: className,
|
|
169
|
-
autoFocus: autoFocus,
|
|
170
|
-
fixedHeight: true,
|
|
171
|
-
name: name,
|
|
172
|
-
locale: localeCode,
|
|
173
|
-
onBlur: onBlur,
|
|
174
|
-
onChange: onChange,
|
|
175
|
-
onFocus: onFocus,
|
|
176
|
-
selected: value && !selectsRange ? new Date(value) : undefined,
|
|
177
|
-
selectsRange: selectsRange,
|
|
178
|
-
excludeDates: excludeDates,
|
|
179
|
-
customInput: jsx(TextInputV2, {
|
|
180
|
-
error: error,
|
|
181
|
-
success: success,
|
|
182
|
-
helper: helper,
|
|
183
|
-
id: localId,
|
|
184
|
-
label: label,
|
|
185
|
-
labelDescription: labelDescription,
|
|
186
|
-
value: valueFormat || '',
|
|
187
|
-
disabled: disabled,
|
|
188
|
-
size: size,
|
|
189
|
-
suffix: jsx(Icon, {
|
|
190
|
-
name: "calendar-range",
|
|
191
|
-
color: "neutral",
|
|
192
|
-
disabled: disabled
|
|
193
|
-
}),
|
|
194
|
-
readOnly: readOnly,
|
|
195
|
-
tooltip: tooltip
|
|
196
|
-
}),
|
|
197
|
-
disabled: disabled,
|
|
198
|
-
calendarClassName: "calendar",
|
|
199
|
-
minDate: minDate,
|
|
200
|
-
maxDate: maxDate,
|
|
201
|
-
startDate: startDate,
|
|
202
|
-
endDate: endDate,
|
|
203
|
-
renderCustomHeader: ({
|
|
204
|
-
date,
|
|
205
|
-
decreaseMonth,
|
|
206
|
-
increaseMonth,
|
|
207
|
-
prevMonthButtonDisabled,
|
|
208
|
-
nextMonthButtonDisabled
|
|
209
|
-
}) => jsxs(Stack, {
|
|
210
|
-
direction: "row",
|
|
211
|
-
alignItems: "center",
|
|
212
|
-
justifyContent: "space-between",
|
|
213
|
-
gap: 3,
|
|
214
|
-
children: [jsx(Button, {
|
|
215
|
-
size: "small",
|
|
216
|
-
icon: "arrow-left",
|
|
217
|
-
sentiment: "neutral",
|
|
218
|
-
variant: "ghost",
|
|
219
|
-
onClick: decreaseMonth,
|
|
220
|
-
disabled: prevMonthButtonDisabled
|
|
221
|
-
}), jsx(StyledText, {
|
|
222
|
-
variant: "bodyStrong",
|
|
223
|
-
as: "p",
|
|
224
|
-
children: new Date(date).toLocaleString(localeCode, {
|
|
225
|
-
month: 'long',
|
|
226
|
-
year: 'numeric'
|
|
227
|
-
})
|
|
228
|
-
}), jsx(Button, {
|
|
229
|
-
size: "small",
|
|
230
|
-
icon: "arrow-right",
|
|
231
|
-
sentiment: "neutral",
|
|
232
|
-
variant: "ghost",
|
|
233
|
-
onClick: increaseMonth,
|
|
234
|
-
disabled: nextMonthButtonDisabled
|
|
235
|
-
})]
|
|
236
|
-
})
|
|
237
|
-
})
|
|
238
|
-
})]
|
|
239
|
-
});
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
export { DateInput };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { useContext, createContext } from 'react';
|
|
2
|
-
|
|
3
|
-
const DialogContext = /*#__PURE__*/createContext(undefined);
|
|
4
|
-
const useDialogContext = () => {
|
|
5
|
-
const context = useContext(DialogContext);
|
|
6
|
-
if (!context) {
|
|
7
|
-
throw new Error('Dialog context can only be used inside a Dialog component');
|
|
8
|
-
}
|
|
9
|
-
return context;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { DialogContext, useDialogContext };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { Bullet } from '../Bullet/index.js';
|
|
4
|
-
import { Modal } from '../Modal/index.js';
|
|
5
|
-
import { Text } from '../Text/index.js';
|
|
6
|
-
import { useDialogContext, DialogContext } from './Context.js';
|
|
7
|
-
import { DialogButton } from './subComponents/Button.js';
|
|
8
|
-
import { DialogButtons } from './subComponents/Buttons.js';
|
|
9
|
-
import { DialogCancelButton } from './subComponents/CancelButton.js';
|
|
10
|
-
import { DialogStack } from './subComponents/Stack.js';
|
|
11
|
-
import { DialogText } from './subComponents/Text.js';
|
|
12
|
-
import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
const StyledTextTitle = /*#__PURE__*/_styled(Text, {
|
|
15
|
-
target: "ehf9m9r0"
|
|
16
|
-
})("margin-top:", ({
|
|
17
|
-
theme
|
|
18
|
-
}) => theme.space['2'], ";margin-bottom:", ({
|
|
19
|
-
theme
|
|
20
|
-
}) => theme.space['1'], ";");
|
|
21
|
-
const BaseDialog = ({
|
|
22
|
-
ariaLabel,
|
|
23
|
-
className,
|
|
24
|
-
children,
|
|
25
|
-
'data-testid': dataTestId,
|
|
26
|
-
disclosure,
|
|
27
|
-
hideOnClickOutside,
|
|
28
|
-
hideOnEsc,
|
|
29
|
-
id,
|
|
30
|
-
isClosable,
|
|
31
|
-
onBeforeClose,
|
|
32
|
-
onClose,
|
|
33
|
-
open,
|
|
34
|
-
placement,
|
|
35
|
-
sentiment,
|
|
36
|
-
title
|
|
37
|
-
}) => {
|
|
38
|
-
const headerContent = jsxs(Fragment, {
|
|
39
|
-
children: [jsx(Bullet, {
|
|
40
|
-
sentiment: sentiment,
|
|
41
|
-
icon: sentiment === 'warning' || sentiment === 'danger' ? 'information-outline' : 'check'
|
|
42
|
-
}), jsx(StyledTextTitle, {
|
|
43
|
-
as: "h2",
|
|
44
|
-
variant: "headingSmallStronger",
|
|
45
|
-
children: title
|
|
46
|
-
})]
|
|
47
|
-
});
|
|
48
|
-
const contextValue = useMemo(() => ({
|
|
49
|
-
sentiment
|
|
50
|
-
}), [sentiment]);
|
|
51
|
-
return jsx(Modal, {
|
|
52
|
-
ariaLabel: ariaLabel,
|
|
53
|
-
className: className,
|
|
54
|
-
"data-testid": dataTestId,
|
|
55
|
-
disclosure: disclosure,
|
|
56
|
-
hideOnClickOutside: hideOnClickOutside,
|
|
57
|
-
hideOnEsc: hideOnEsc,
|
|
58
|
-
id: id,
|
|
59
|
-
isClosable: isClosable,
|
|
60
|
-
onBeforeClose: onBeforeClose,
|
|
61
|
-
onClose: onClose,
|
|
62
|
-
open: open,
|
|
63
|
-
placement: placement,
|
|
64
|
-
size: "xsmall",
|
|
65
|
-
children: typeof children === 'function' ? modalProps => jsxs(DialogContext.Provider, {
|
|
66
|
-
value: contextValue,
|
|
67
|
-
children: [headerContent, children(modalProps)]
|
|
68
|
-
}) : jsxs(DialogContext.Provider, {
|
|
69
|
-
value: contextValue,
|
|
70
|
-
children: [headerContent, children]
|
|
71
|
-
})
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The Dialog component is used to show content on top of an overlay that requires user interaction.
|
|
77
|
-
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
78
|
-
*/
|
|
79
|
-
const Dialog = /*#__PURE__*/Object.assign(BaseDialog, {
|
|
80
|
-
Buttons: DialogButtons,
|
|
81
|
-
Button: DialogButton,
|
|
82
|
-
CancelButton: DialogCancelButton,
|
|
83
|
-
Stack: DialogStack,
|
|
84
|
-
Text: DialogText,
|
|
85
|
-
useDialogContext
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
export { BaseDialog, Dialog };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Button } from '../../Button/index.js';
|
|
2
|
-
import { useDialogContext } from '../Context.js';
|
|
3
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const DialogButton = ({
|
|
6
|
-
children,
|
|
7
|
-
onClick,
|
|
8
|
-
disabled,
|
|
9
|
-
tooltip
|
|
10
|
-
}) => {
|
|
11
|
-
const context = useDialogContext();
|
|
12
|
-
return jsx(Button, {
|
|
13
|
-
sentiment: context.sentiment,
|
|
14
|
-
onClick: onClick,
|
|
15
|
-
disabled: disabled,
|
|
16
|
-
tooltip: tooltip,
|
|
17
|
-
children: children
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { DialogButton };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Stack } from '../../Stack/index.js';
|
|
2
|
-
import { jsxs } from '@emotion/react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
const DialogButtons = ({
|
|
5
|
-
secondaryButton,
|
|
6
|
-
primaryButton
|
|
7
|
-
}) => jsxs(Stack, {
|
|
8
|
-
direction: "row",
|
|
9
|
-
gap: 2,
|
|
10
|
-
justifyContent: "end",
|
|
11
|
-
children: [secondaryButton, primaryButton]
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export { DialogButtons };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Button } from '../../Button/index.js';
|
|
2
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
const DialogCancelButton = ({
|
|
5
|
-
children,
|
|
6
|
-
onClick
|
|
7
|
-
}) => jsx(Button, {
|
|
8
|
-
variant: "outlined",
|
|
9
|
-
sentiment: "neutral",
|
|
10
|
-
onClick: onClick,
|
|
11
|
-
children: children
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export { DialogCancelButton };
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Link } from '../Link/index.js';
|
|
3
|
-
import { Stack } from '../Stack/index.js';
|
|
4
|
-
import { Text } from '../Text/index.js';
|
|
5
|
-
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
8
|
-
const CONTAINER_SIZES = {
|
|
9
|
-
small: 720,
|
|
10
|
-
medium: 720,
|
|
11
|
-
large: 1140
|
|
12
|
-
};
|
|
13
|
-
const IMAGE_SIZES = {
|
|
14
|
-
small: 64,
|
|
15
|
-
medium: 96,
|
|
16
|
-
large: 240
|
|
17
|
-
};
|
|
18
|
-
const CenteredText = /*#__PURE__*/_styled(Text, {
|
|
19
|
-
target: "e1m66ceh2"
|
|
20
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
21
|
-
name: "1azakc",
|
|
22
|
-
styles: "text-align:center"
|
|
23
|
-
} : {
|
|
24
|
-
name: "1azakc",
|
|
25
|
-
styles: "text-align:center",
|
|
26
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
|
-
});
|
|
28
|
-
const Container = /*#__PURE__*/_styled(Stack, {
|
|
29
|
-
shouldForwardProp: prop => !['size', 'bordered'].includes(prop),
|
|
30
|
-
target: "e1m66ceh1"
|
|
31
|
-
})("max-width:", ({
|
|
32
|
-
size
|
|
33
|
-
}) => CONTAINER_SIZES[size], "px;margin:0 auto;", ({
|
|
34
|
-
size
|
|
35
|
-
}) => size === 'large' ? 'padding: 0 140px' : null, ";", ({
|
|
36
|
-
theme,
|
|
37
|
-
bordered
|
|
38
|
-
}) => bordered ? `
|
|
39
|
-
border: 1px solid ${theme.colors.neutral.border};
|
|
40
|
-
border-radius: ${theme.radii.default};
|
|
41
|
-
` : null, ";");
|
|
42
|
-
const StyledStack = /*#__PURE__*/_styled(Stack, {
|
|
43
|
-
target: "e1m66ceh0"
|
|
44
|
-
})("padding:", ({
|
|
45
|
-
theme
|
|
46
|
-
}) => theme.space['5'], ";");
|
|
47
|
-
/**
|
|
48
|
-
* EmptyState component is used to display a message when there is no data to show.
|
|
49
|
-
*/
|
|
50
|
-
const EmptyState = ({
|
|
51
|
-
image,
|
|
52
|
-
title,
|
|
53
|
-
size = 'large',
|
|
54
|
-
description,
|
|
55
|
-
primaryButton,
|
|
56
|
-
secondaryButton,
|
|
57
|
-
learnMore,
|
|
58
|
-
className,
|
|
59
|
-
bordered,
|
|
60
|
-
children,
|
|
61
|
-
'data-testid': dataTestId
|
|
62
|
-
}) => jsx(Container, {
|
|
63
|
-
size: size,
|
|
64
|
-
bordered: bordered,
|
|
65
|
-
className: className,
|
|
66
|
-
"data-testid": dataTestId,
|
|
67
|
-
children: jsxs(StyledStack, {
|
|
68
|
-
gap: 3,
|
|
69
|
-
justifyContent: "center",
|
|
70
|
-
alignItems: "center",
|
|
71
|
-
children: [jsxs(Stack, {
|
|
72
|
-
gap: 2,
|
|
73
|
-
justifyContent: "center",
|
|
74
|
-
alignItems: "center",
|
|
75
|
-
children: [image && typeof image === 'string' ? jsx("img", {
|
|
76
|
-
width: IMAGE_SIZES[size],
|
|
77
|
-
alt: "",
|
|
78
|
-
src: image
|
|
79
|
-
}) : image, jsxs(Stack, {
|
|
80
|
-
gap: 0.5,
|
|
81
|
-
alignItems: "center",
|
|
82
|
-
children: [title ? jsx(CenteredText, {
|
|
83
|
-
as: "h2",
|
|
84
|
-
variant: "headingSmall",
|
|
85
|
-
prominence: "strong",
|
|
86
|
-
children: title
|
|
87
|
-
}) : null, jsx(CenteredText, {
|
|
88
|
-
as: "p",
|
|
89
|
-
variant: "body",
|
|
90
|
-
children: description
|
|
91
|
-
})]
|
|
92
|
-
})]
|
|
93
|
-
}), jsxs(Stack, {
|
|
94
|
-
gap: 2,
|
|
95
|
-
justifyContent: "center",
|
|
96
|
-
alignItems: "center",
|
|
97
|
-
children: [jsxs(Stack, {
|
|
98
|
-
direction: "row",
|
|
99
|
-
gap: 2,
|
|
100
|
-
children: [secondaryButton, primaryButton]
|
|
101
|
-
}), learnMore?.text ? jsx(Link, {
|
|
102
|
-
href: learnMore.link,
|
|
103
|
-
target: learnMore.target,
|
|
104
|
-
sentiment: "info",
|
|
105
|
-
iconPosition: "right",
|
|
106
|
-
children: learnMore.text
|
|
107
|
-
}) : null]
|
|
108
|
-
}), children]
|
|
109
|
-
})
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
export { EmptyState };
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useState, useRef, useEffect } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const ANIMATION_DURATION = 300; // in ms
|
|
6
|
-
|
|
7
|
-
const StyledExpandable = /*#__PURE__*/_styled('div', {
|
|
8
|
-
shouldForwardProp: prop => !['opened', 'minHeight', 'animationDuration'].includes(prop),
|
|
9
|
-
target: "e5hc7t70"
|
|
10
|
-
})("transition:max-height ", ({
|
|
11
|
-
animationDuration
|
|
12
|
-
}) => animationDuration, "ms ease-out,opacity ", ({
|
|
13
|
-
animationDuration
|
|
14
|
-
}) => animationDuration, "ms ease-out;overflow:", ({
|
|
15
|
-
opened
|
|
16
|
-
}) => opened ? 'visible' : 'hidden', ";height:auto;max-height:", ({
|
|
17
|
-
opened,
|
|
18
|
-
minHeight
|
|
19
|
-
}) => opened ? 'initial' : `${minHeight}px`, ";");
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* The Expandable component is a dynamic React component that allows for the expansion of its children content
|
|
23
|
-
* based on its height. The component comes with a sleek and smooth animation, providing a visually pleasing
|
|
24
|
-
* user experience.
|
|
25
|
-
*/
|
|
26
|
-
const Expandable = ({
|
|
27
|
-
children,
|
|
28
|
-
opened,
|
|
29
|
-
minHeight = 0,
|
|
30
|
-
className,
|
|
31
|
-
'data-testid': dataTestId,
|
|
32
|
-
animationDuration = ANIMATION_DURATION
|
|
33
|
-
}) => {
|
|
34
|
-
const [height, setHeight] = useState(null);
|
|
35
|
-
const transitionTimer = useRef();
|
|
36
|
-
const ref = useRef(null);
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* At mount, we set the height variable to the height of the content only if the component is closed.
|
|
40
|
-
* This is to ensure we don't have animation when the component is opened at mount.
|
|
41
|
-
*/
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
if (ref.current) {
|
|
44
|
-
setHeight(ref.current.scrollHeight ?? 0);
|
|
45
|
-
}
|
|
46
|
-
}, [ref.current?.scrollHeight]);
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Here we set maxHeight to the height of the content when the component is opened
|
|
50
|
-
* and after 300ms we set maxHeight to initial to let the content grow with animation.
|
|
51
|
-
* Setting it to initial is required to be able to have nested expandable or the height won't follow.
|
|
52
|
-
*/
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
if (opened && ref.current && height) {
|
|
55
|
-
ref.current.style.maxHeight = `${height}px`;
|
|
56
|
-
ref.current.style.visibility = '';
|
|
57
|
-
transitionTimer.current = setTimeout(() => {
|
|
58
|
-
if (ref.current) {
|
|
59
|
-
ref.current.style.maxHeight = 'initial';
|
|
60
|
-
ref.current.style.overflow = 'visible';
|
|
61
|
-
ref.current.style.visibility = '';
|
|
62
|
-
}
|
|
63
|
-
}, ANIMATION_DURATION);
|
|
64
|
-
} else {
|
|
65
|
-
clearTimeout(transitionTimer.current);
|
|
66
|
-
if (ref.current && height) {
|
|
67
|
-
ref.current.style.maxHeight = `${height}px`;
|
|
68
|
-
transitionTimer.current = setTimeout(() => {
|
|
69
|
-
if (ref.current) {
|
|
70
|
-
ref.current.style.maxHeight = `${minHeight}px`;
|
|
71
|
-
ref.current.style.overflow = 'hidden';
|
|
72
|
-
setTimeout(() => {
|
|
73
|
-
if (ref.current && !minHeight) {
|
|
74
|
-
ref.current.style.visibility = 'hidden';
|
|
75
|
-
}
|
|
76
|
-
}, ANIMATION_DURATION);
|
|
77
|
-
}
|
|
78
|
-
}, 0);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return () => {
|
|
82
|
-
clearTimeout(transitionTimer.current);
|
|
83
|
-
};
|
|
84
|
-
}, [height, minHeight, opened]);
|
|
85
|
-
return jsx(StyledExpandable, {
|
|
86
|
-
"data-testid": dataTestId,
|
|
87
|
-
ref: ref,
|
|
88
|
-
className: className,
|
|
89
|
-
opened: opened,
|
|
90
|
-
minHeight: minHeight,
|
|
91
|
-
animationDuration: animationDuration,
|
|
92
|
-
children: children
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export { Expandable, StyledExpandable };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '@emotion/react';
|
|
2
|
-
import { Link } from '../Link/index.js';
|
|
3
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const GlobalAlertLink = ({
|
|
6
|
-
children,
|
|
7
|
-
href,
|
|
8
|
-
target,
|
|
9
|
-
download,
|
|
10
|
-
rel,
|
|
11
|
-
className,
|
|
12
|
-
onClick,
|
|
13
|
-
'aria-label': ariaLabel,
|
|
14
|
-
oneLine = false,
|
|
15
|
-
'data-testid': dataTestId
|
|
16
|
-
}) => {
|
|
17
|
-
const {
|
|
18
|
-
theme
|
|
19
|
-
} = useTheme();
|
|
20
|
-
return jsx(Link, {
|
|
21
|
-
href: href,
|
|
22
|
-
target: target,
|
|
23
|
-
download: download,
|
|
24
|
-
sentiment: "neutral",
|
|
25
|
-
prominence: theme === 'light' ? 'stronger' : 'strong',
|
|
26
|
-
size: "small",
|
|
27
|
-
variant: "inline",
|
|
28
|
-
rel: rel,
|
|
29
|
-
className: className,
|
|
30
|
-
onClick: onClick,
|
|
31
|
-
"aria-label": ariaLabel,
|
|
32
|
-
oneLine: oneLine,
|
|
33
|
-
"data-testid": dataTestId,
|
|
34
|
-
children: children
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export { GlobalAlertLink };
|