@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,122 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Icon } from '@ultraviolet/icons';
|
|
3
|
-
import { useMemo, createContext, useContext } from 'react';
|
|
4
|
-
import { Stack } from '../Stack/index.js';
|
|
5
|
-
import { Text } from '../Text/index.js';
|
|
6
|
-
import { Toggle } from '../Toggle/index.js';
|
|
7
|
-
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
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)."; }
|
|
10
|
-
const ToggleGroupContext = /*#__PURE__*/createContext(undefined);
|
|
11
|
-
/**
|
|
12
|
-
* ToggleGroup is a component that allows you to group a set of Toggle components together under the same legend.
|
|
13
|
-
*/
|
|
14
|
-
const ToggleGroupToggle = ({
|
|
15
|
-
disabled,
|
|
16
|
-
name,
|
|
17
|
-
value,
|
|
18
|
-
label,
|
|
19
|
-
helper,
|
|
20
|
-
className,
|
|
21
|
-
'data-testid': dataTestId
|
|
22
|
-
}) => {
|
|
23
|
-
const context = useContext(ToggleGroupContext);
|
|
24
|
-
if (!context) {
|
|
25
|
-
throw new Error('ToggleGroup.Toggle can only be used inside a ToggleGroup');
|
|
26
|
-
}
|
|
27
|
-
const {
|
|
28
|
-
groupName,
|
|
29
|
-
onChange,
|
|
30
|
-
groupValues
|
|
31
|
-
} = context;
|
|
32
|
-
const ToggleName = `${groupName}.${name}`;
|
|
33
|
-
const ToggleValue = `${value}`;
|
|
34
|
-
return jsx(Toggle, {
|
|
35
|
-
onChange: onChange,
|
|
36
|
-
checked: groupValues?.includes(ToggleValue),
|
|
37
|
-
disabled: disabled,
|
|
38
|
-
name: ToggleName,
|
|
39
|
-
value: ToggleValue,
|
|
40
|
-
helper: helper,
|
|
41
|
-
className: className,
|
|
42
|
-
"data-testid": dataTestId,
|
|
43
|
-
label: label
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
const FieldSet = /*#__PURE__*/_styled("fieldset", {
|
|
47
|
-
target: "e1qvneex1"
|
|
48
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
49
|
-
name: "7o2an9",
|
|
50
|
-
styles: "border:none;padding:0;margin:0"
|
|
51
|
-
} : {
|
|
52
|
-
name: "7o2an9",
|
|
53
|
-
styles: "border:none;padding:0;margin:0",
|
|
54
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
55
|
-
});
|
|
56
|
-
const StyledRequiredIcon = /*#__PURE__*/_styled(Icon, {
|
|
57
|
-
target: "e1qvneex0"
|
|
58
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
59
|
-
name: "1nglpc5",
|
|
60
|
-
styles: "vertical-align:super"
|
|
61
|
-
} : {
|
|
62
|
-
name: "1nglpc5",
|
|
63
|
-
styles: "vertical-align:super",
|
|
64
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
65
|
-
});
|
|
66
|
-
const ToggleGroup = ({
|
|
67
|
-
legend,
|
|
68
|
-
value,
|
|
69
|
-
className,
|
|
70
|
-
helper,
|
|
71
|
-
error,
|
|
72
|
-
direction = 'column',
|
|
73
|
-
children,
|
|
74
|
-
onChange,
|
|
75
|
-
name,
|
|
76
|
-
required = false
|
|
77
|
-
}) => {
|
|
78
|
-
const contextValue = useMemo(() => ({
|
|
79
|
-
groupName: name,
|
|
80
|
-
groupValues: value ?? [],
|
|
81
|
-
onChange
|
|
82
|
-
}), [name, value, onChange]);
|
|
83
|
-
return jsx(ToggleGroupContext.Provider, {
|
|
84
|
-
value: contextValue,
|
|
85
|
-
children: jsxs(Stack, {
|
|
86
|
-
gap: 1,
|
|
87
|
-
children: [jsx(FieldSet, {
|
|
88
|
-
className: className,
|
|
89
|
-
children: jsxs(Stack, {
|
|
90
|
-
gap: 1.5,
|
|
91
|
-
children: [jsxs(Text, {
|
|
92
|
-
as: "legend",
|
|
93
|
-
variant: "bodyStrong",
|
|
94
|
-
children: [legend, "\xA0", required ? jsx(StyledRequiredIcon, {
|
|
95
|
-
name: "asterisk",
|
|
96
|
-
color: "danger",
|
|
97
|
-
size: 8
|
|
98
|
-
}) : null]
|
|
99
|
-
}), jsx(Stack, {
|
|
100
|
-
gap: 2,
|
|
101
|
-
direction: direction,
|
|
102
|
-
children: children
|
|
103
|
-
})]
|
|
104
|
-
})
|
|
105
|
-
}), helper ? jsx(Text, {
|
|
106
|
-
as: "p",
|
|
107
|
-
variant: "bodySmall",
|
|
108
|
-
prominence: "weak",
|
|
109
|
-
children: helper
|
|
110
|
-
}) : null, error ? jsx(Text, {
|
|
111
|
-
as: "p",
|
|
112
|
-
variant: "bodySmall",
|
|
113
|
-
sentiment: "danger",
|
|
114
|
-
prominence: "weak",
|
|
115
|
-
children: error
|
|
116
|
-
}) : null]
|
|
117
|
-
})
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
ToggleGroup.Toggle = ToggleGroupToggle;
|
|
121
|
-
|
|
122
|
-
export { ToggleGroup, ToggleGroupToggle };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { Popup } from '../Popup/index.js';
|
|
4
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
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)."; }
|
|
7
|
-
const StyledPopup = /*#__PURE__*/_styled(Popup, {
|
|
8
|
-
target: "e1h4zly10"
|
|
9
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
10
|
-
name: "je8g23",
|
|
11
|
-
styles: "pointer-events:none"
|
|
12
|
-
} : {
|
|
13
|
-
name: "je8g23",
|
|
14
|
-
styles: "pointer-events:none",
|
|
15
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Tooltip component is used to display additional information on hover or focus.
|
|
20
|
-
* It is used to explain the purpose of the element it is attached to.
|
|
21
|
-
*/
|
|
22
|
-
const Tooltip = /*#__PURE__*/forwardRef(({
|
|
23
|
-
children,
|
|
24
|
-
text = '',
|
|
25
|
-
placement = 'auto',
|
|
26
|
-
id,
|
|
27
|
-
className,
|
|
28
|
-
containerFullWidth,
|
|
29
|
-
maxWidth = 232,
|
|
30
|
-
visible,
|
|
31
|
-
innerRef,
|
|
32
|
-
role = 'tooltip',
|
|
33
|
-
'data-testid': dataTestId,
|
|
34
|
-
portalTarget,
|
|
35
|
-
debounceDelay,
|
|
36
|
-
tabIndex
|
|
37
|
-
}, tooltipRef) => jsx(StyledPopup, {
|
|
38
|
-
id: id,
|
|
39
|
-
ref: tooltipRef,
|
|
40
|
-
role: role,
|
|
41
|
-
"data-testid": dataTestId,
|
|
42
|
-
className: className,
|
|
43
|
-
containerFullWidth: containerFullWidth,
|
|
44
|
-
maxWidth: maxWidth,
|
|
45
|
-
visible: visible,
|
|
46
|
-
placement: placement,
|
|
47
|
-
text: text,
|
|
48
|
-
innerRef: innerRef,
|
|
49
|
-
portalTarget: portalTarget,
|
|
50
|
-
tabIndex: tabIndex,
|
|
51
|
-
debounceDelay: debounceDelay,
|
|
52
|
-
children: children
|
|
53
|
-
}));
|
|
54
|
-
|
|
55
|
-
export { Tooltip };
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useId, useState, createRef } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const SIZE_HEIGHT = {
|
|
6
|
-
xlarge: 64,
|
|
7
|
-
large: 48,
|
|
8
|
-
medium: 40,
|
|
9
|
-
small: 32
|
|
10
|
-
};
|
|
11
|
-
const SIZE_WIDTH = {
|
|
12
|
-
xlarge: 56,
|
|
13
|
-
large: 40,
|
|
14
|
-
medium: 32,
|
|
15
|
-
small: 24
|
|
16
|
-
};
|
|
17
|
-
const StyledInput = /*#__PURE__*/_styled('input', {
|
|
18
|
-
shouldForwardProp: prop => !['inputSize'].includes(prop),
|
|
19
|
-
target: "e1a2bx9q0"
|
|
20
|
-
})("background:", ({
|
|
21
|
-
theme
|
|
22
|
-
}) => theme.colors.neutral.background, ";border:solid 1px ", ({
|
|
23
|
-
'aria-invalid': error,
|
|
24
|
-
theme
|
|
25
|
-
}) => error ? theme.colors.danger.border : theme.colors.neutral.border, ";color:", ({
|
|
26
|
-
'aria-invalid': error,
|
|
27
|
-
theme
|
|
28
|
-
}) => error ? theme.colors.danger.text : theme.colors.neutral.text, ";", ({
|
|
29
|
-
inputSize,
|
|
30
|
-
theme
|
|
31
|
-
}) => {
|
|
32
|
-
if (inputSize === 'small') {
|
|
33
|
-
return `
|
|
34
|
-
font-size: ${theme.typography.caption.fontSize};
|
|
35
|
-
font-weight: ${theme.typography.caption.weight};
|
|
36
|
-
`;
|
|
37
|
-
}
|
|
38
|
-
return `
|
|
39
|
-
font-size: ${theme.typography.body.fontSize};
|
|
40
|
-
font-weight: ${theme.typography.body.weight};
|
|
41
|
-
`;
|
|
42
|
-
}, " text-align:center;border-radius:", ({
|
|
43
|
-
theme
|
|
44
|
-
}) => theme.radii.default, ";margin-right:", ({
|
|
45
|
-
theme
|
|
46
|
-
}) => theme.space['1'], ";width:", ({
|
|
47
|
-
inputSize
|
|
48
|
-
}) => SIZE_WIDTH[inputSize], "px;height:", ({
|
|
49
|
-
inputSize
|
|
50
|
-
}) => SIZE_HEIGHT[inputSize], "px;outline-style:none;transition:border-color 0.2s ease,box-shadow 0.2s ease;&:hover,&:focus{border-color:", ({
|
|
51
|
-
'aria-invalid': error,
|
|
52
|
-
theme
|
|
53
|
-
}) => error ? theme.colors.danger.borderHover : theme.colors.primary.borderHover, ";}&:focus{box-shadow:", ({
|
|
54
|
-
'aria-invalid': error,
|
|
55
|
-
theme: {
|
|
56
|
-
shadows
|
|
57
|
-
}
|
|
58
|
-
}) => error ? shadows.focusDanger : shadows.focusPrimary, ";}&:last-child{margin-right:0;}&::placeholder{color:", ({
|
|
59
|
-
disabled,
|
|
60
|
-
theme
|
|
61
|
-
}) => disabled ? theme.colors.neutral.textWeakDisabled : theme.colors.neutral.textWeak, ";}", ({
|
|
62
|
-
disabled,
|
|
63
|
-
theme: {
|
|
64
|
-
colors
|
|
65
|
-
}
|
|
66
|
-
}) => disabled && `cursor: default;
|
|
67
|
-
background-color: ${colors.neutral.backgroundDisabled};
|
|
68
|
-
border-color: ${colors.neutral.borderDisabled};
|
|
69
|
-
color: ${colors.neutral.textDisabled};
|
|
70
|
-
|
|
71
|
-
&:hover {
|
|
72
|
-
border: ${colors.neutral.borderDisabled}
|
|
73
|
-
}
|
|
74
|
-
`, ";");
|
|
75
|
-
const DEFAULT_ON_FUNCTION = () => {};
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Verification code allows you to enter a code in multiple fields (4 by default).
|
|
79
|
-
*/
|
|
80
|
-
const VerificationCode = ({
|
|
81
|
-
disabled = false,
|
|
82
|
-
className,
|
|
83
|
-
error = false,
|
|
84
|
-
fields = 4,
|
|
85
|
-
initialValue = '',
|
|
86
|
-
inputId,
|
|
87
|
-
inputStyle = '',
|
|
88
|
-
size = 'large',
|
|
89
|
-
onChange = DEFAULT_ON_FUNCTION,
|
|
90
|
-
onComplete = DEFAULT_ON_FUNCTION,
|
|
91
|
-
placeholder = '',
|
|
92
|
-
required = false,
|
|
93
|
-
type = 'number',
|
|
94
|
-
'data-testid': dataTestId,
|
|
95
|
-
'aria-label': ariaLabel = 'Verification code'
|
|
96
|
-
}) => {
|
|
97
|
-
const uniqueId = useId();
|
|
98
|
-
const valuesArray = Object.assign(new Array(fields).fill(''), initialValue.substring(0, fields).split(''));
|
|
99
|
-
const [values, setValues] = useState(valuesArray);
|
|
100
|
-
const inputRefs = Array.from({
|
|
101
|
-
length: fields
|
|
102
|
-
}, () => /*#__PURE__*/createRef());
|
|
103
|
-
const triggerChange = inputValues => {
|
|
104
|
-
const stringValue = inputValues.join('');
|
|
105
|
-
if (onChange) {
|
|
106
|
-
onChange(stringValue);
|
|
107
|
-
}
|
|
108
|
-
if (onComplete && stringValue.length >= fields) {
|
|
109
|
-
onComplete(stringValue);
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
const inputOnChange = index => event => {
|
|
113
|
-
let {
|
|
114
|
-
value
|
|
115
|
-
} = event.target;
|
|
116
|
-
if (type === 'number') {
|
|
117
|
-
value = event.target.value.replace(/[^\d]/gi, '');
|
|
118
|
-
}
|
|
119
|
-
const newValues = [...values];
|
|
120
|
-
if (value === '' || type === 'number' && !new RegExp(event.target.pattern).test(value)) {
|
|
121
|
-
newValues[index] = '';
|
|
122
|
-
setValues(newValues);
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
const sanitizedValue = value[0]; // in case more than 1 char, we just take the first one
|
|
126
|
-
newValues[index] = sanitizedValue;
|
|
127
|
-
setValues(newValues);
|
|
128
|
-
const nextIndex = Math.min(index + 1, fields - 1);
|
|
129
|
-
const next = inputRefs[nextIndex];
|
|
130
|
-
next?.current?.focus();
|
|
131
|
-
triggerChange(newValues);
|
|
132
|
-
};
|
|
133
|
-
const inputOnKeyDown = index => event => {
|
|
134
|
-
const prevIndex = index - 1;
|
|
135
|
-
const nextIndex = index + 1;
|
|
136
|
-
const first = inputRefs[0];
|
|
137
|
-
const last = inputRefs[inputRefs.length - 1];
|
|
138
|
-
const prev = inputRefs[prevIndex];
|
|
139
|
-
const next = inputRefs[nextIndex];
|
|
140
|
-
const vals = [...values];
|
|
141
|
-
switch (event.key) {
|
|
142
|
-
case 'Backspace':
|
|
143
|
-
event.preventDefault();
|
|
144
|
-
if (values[index]) {
|
|
145
|
-
vals[index] = '';
|
|
146
|
-
setValues(vals);
|
|
147
|
-
triggerChange(vals);
|
|
148
|
-
} else if (prev) {
|
|
149
|
-
vals[prevIndex] = '';
|
|
150
|
-
prev?.current?.focus();
|
|
151
|
-
setValues(vals);
|
|
152
|
-
triggerChange(vals);
|
|
153
|
-
}
|
|
154
|
-
break;
|
|
155
|
-
case 'ArrowLeft':
|
|
156
|
-
event.preventDefault();
|
|
157
|
-
prev?.current?.focus();
|
|
158
|
-
break;
|
|
159
|
-
case 'ArrowRight':
|
|
160
|
-
event.preventDefault();
|
|
161
|
-
next?.current?.focus();
|
|
162
|
-
break;
|
|
163
|
-
case 'ArrowUp':
|
|
164
|
-
event.preventDefault();
|
|
165
|
-
first?.current?.focus();
|
|
166
|
-
break;
|
|
167
|
-
case 'ArrowDown':
|
|
168
|
-
event.preventDefault();
|
|
169
|
-
last?.current?.focus();
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
const inputOnFocus = event => event.target.select();
|
|
174
|
-
const inputOnPaste = currentIndex => event => {
|
|
175
|
-
event.preventDefault();
|
|
176
|
-
const pastedValue = [...event.clipboardData.getData('Text').split('')].map(copiedValue =>
|
|
177
|
-
// Replace non number char with empty char when type is number
|
|
178
|
-
type === 'number' ? copiedValue.replace(/[^\d]/gi, '') : copiedValue);
|
|
179
|
-
|
|
180
|
-
// Trim array to avoid array overflow
|
|
181
|
-
pastedValue.splice(fields - currentIndex < pastedValue.length ? fields - currentIndex : pastedValue.length);
|
|
182
|
-
setValues(vals => {
|
|
183
|
-
const newArray = vals.slice();
|
|
184
|
-
newArray.splice(currentIndex, pastedValue.length, ...pastedValue);
|
|
185
|
-
return newArray;
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
// we select min value between the end of inputs and valid pasted chars
|
|
189
|
-
const nextIndex = Math.min(currentIndex + pastedValue.filter(item => item !== '').length, inputRefs.length - 1);
|
|
190
|
-
const next = inputRefs[nextIndex];
|
|
191
|
-
next?.current?.focus();
|
|
192
|
-
triggerChange(pastedValue);
|
|
193
|
-
};
|
|
194
|
-
return jsx("div", {
|
|
195
|
-
className: className,
|
|
196
|
-
"data-testid": dataTestId,
|
|
197
|
-
children: values.map((value, index) => jsx(StyledInput, {
|
|
198
|
-
css: [inputStyle],
|
|
199
|
-
"aria-invalid": error,
|
|
200
|
-
inputSize: size,
|
|
201
|
-
type: type === 'number' ? 'tel' : type,
|
|
202
|
-
pattern: type === 'number' ? '[0-9]*' : undefined
|
|
203
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
204
|
-
,
|
|
205
|
-
|
|
206
|
-
"data-testid": index,
|
|
207
|
-
value: value,
|
|
208
|
-
id: `${inputId || uniqueId}-${index}`,
|
|
209
|
-
ref: inputRefs[index],
|
|
210
|
-
onChange: inputOnChange(index),
|
|
211
|
-
onKeyDown: inputOnKeyDown(index),
|
|
212
|
-
onPaste: inputOnPaste(index),
|
|
213
|
-
onFocus: inputOnFocus,
|
|
214
|
-
disabled: disabled,
|
|
215
|
-
required: required,
|
|
216
|
-
placeholder: placeholder?.[index] ?? '',
|
|
217
|
-
"aria-label": `${ariaLabel} ${index}`
|
|
218
|
-
}, index))
|
|
219
|
-
});
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
export { VerificationCode };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const getLegendColor = theme => {
|
|
2
|
-
const {
|
|
3
|
-
colors
|
|
4
|
-
} = theme;
|
|
5
|
-
return Object.keys(colors.other.data.charts).filter(key => !['success', 'danger'].includes(key)).sort((a, b) => {
|
|
6
|
-
if (Number(a.replace('data', '')) < Number(b.replace('data', ''))) {
|
|
7
|
-
return -1;
|
|
8
|
-
}
|
|
9
|
-
return 1;
|
|
10
|
-
}).map(key => colors.other.data.charts[key]);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { getLegendColor };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const recursivelyGetChildrenString = children => {
|
|
2
|
-
if (typeof children === 'string') return children;
|
|
3
|
-
if (Array.isArray(children)) return ''; // We can't determine which string to display in tooltip
|
|
4
|
-
if (typeof children === 'object') {
|
|
5
|
-
const childProps = children?.['props']?.['children'];
|
|
6
|
-
if (childProps) return recursivelyGetChildrenString(childProps);
|
|
7
|
-
}
|
|
8
|
-
return '';
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { recursivelyGetChildrenString as default };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This hook checks if the element has overflow based on the offsetWidth and scrollWidth of the element.
|
|
5
|
-
*/
|
|
6
|
-
const useIsOverflowing = (ref, callback) => {
|
|
7
|
-
const [isOverflowing, setIsOverflowing] = useState(false);
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
const handleResize = () => {
|
|
10
|
-
if (!ref.current) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const element = ref.current;
|
|
14
|
-
const hasOverflow = element.clientWidth < element.scrollWidth;
|
|
15
|
-
setIsOverflowing(hasOverflow);
|
|
16
|
-
if (callback) callback(hasOverflow);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// This will add the function into the browser event queue after the DOM is painted
|
|
20
|
-
// which is needed to get the correct offsetWidth and scrollWidth
|
|
21
|
-
setTimeout(() => handleResize(), 0);
|
|
22
|
-
|
|
23
|
-
// Listen for resize events
|
|
24
|
-
window.addEventListener('resize', handleResize);
|
|
25
|
-
|
|
26
|
-
// Cleanup the event listener
|
|
27
|
-
return () => {
|
|
28
|
-
window.removeEventListener('resize', handleResize);
|
|
29
|
-
};
|
|
30
|
-
}, [ref, callback]);
|
|
31
|
-
return isOverflowing;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export { useIsOverflowing };
|
package/dist/src/index.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
export { extendTheme } from './theme/index.js';
|
|
2
|
-
export { consoleDarkTheme as darkTheme, consoleLightTheme as theme } from '@ultraviolet/themes';
|
|
3
|
-
export { bounce, fadeIn, fadeOut, flash, ping, pulse, quickScaleDown, scaleBack, scaleDown, scaleForward, scaleUp, sketchIn, sketchOut, slideDownLarge, slideFromBottom, slideFromLeft, slideFromRight, slideFromTop, slideToBottom, slideToLeft, slideToRight, slideToTop, slideUpLarge, unfoldIn, unfoldOut, zoomIn, zoomOut } from './utils/animations.js';
|
|
4
|
-
export { default as Breakpoint } from './utils/responsive/Breakpoint.js';
|
|
5
|
-
export { down, up } from './utils/responsive/utilities.js';
|
|
6
|
-
export { getUUID } from './utils/ids.js';
|
|
7
|
-
export { default as normalize } from './utils/normalize.js';
|
|
8
|
-
export { ActionBar } from './components/ActionBar/index.js';
|
|
9
|
-
export { Alert } from './components/Alert/index.js';
|
|
10
|
-
export { Avatar } from './components/Avatar/index.js';
|
|
11
|
-
export { Badge } from './components/Badge/index.js';
|
|
12
|
-
export { Banner } from './components/Banner/index.js';
|
|
13
|
-
export { BarChart } from './components/BarChart/index.js';
|
|
14
|
-
export { BarStack } from './components/BarStack/index.js';
|
|
15
|
-
export { Breadcrumbs } from './components/Breadcrumbs/index.js';
|
|
16
|
-
export { Bullet } from './components/Bullet/index.js';
|
|
17
|
-
export { Button } from './components/Button/index.js';
|
|
18
|
-
export { Card } from './components/Card/index.js';
|
|
19
|
-
export { Carousel } from './components/Carousel/index.js';
|
|
20
|
-
export { Checkbox } from './components/Checkbox/index.js';
|
|
21
|
-
export { CopyButton } from './components/CopyButton/index.js';
|
|
22
|
-
export { DateInput } from './components/DateInput/index.js';
|
|
23
|
-
export { Dialog } from './components/Dialog/index.js';
|
|
24
|
-
export { EmptyState } from './components/EmptyState/index.js';
|
|
25
|
-
export { Expandable } from './components/Expandable/index.js';
|
|
26
|
-
export { LineChart } from './components/LineChart/index.js';
|
|
27
|
-
export { Link } from './components/Link/index.js';
|
|
28
|
-
export { List } from './components/List/index.js';
|
|
29
|
-
export { Loader } from './components/Loader/index.js';
|
|
30
|
-
export { Menu } from './components/Menu/index.js';
|
|
31
|
-
export { Meter } from './components/Meter/index.js';
|
|
32
|
-
export { Modal } from './components/Modal/index.js';
|
|
33
|
-
export { Notice } from './components/Notice/index.js';
|
|
34
|
-
export { CheckboxGroup, CheckboxGroupCheckbox } from './components/CheckboxGroup/index.js';
|
|
35
|
-
export { NumberInput } from './components/NumberInput/index.js';
|
|
36
|
-
export { NumberInputV2 } from './components/NumberInputV2/index.js';
|
|
37
|
-
export { Pagination } from './components/Pagination/index.js';
|
|
38
|
-
export { PasswordCheck } from './components/PasswordCheck/index.js';
|
|
39
|
-
export { PasswordStrengthMeter } from './components/PasswordStrengthMeter/index.js';
|
|
40
|
-
export { PieChart } from './components/PieChart/index.js';
|
|
41
|
-
export { Popover } from './components/Popover/index.js';
|
|
42
|
-
export { Popup } from './components/Popup/index.js';
|
|
43
|
-
export { ProgressBar } from './components/ProgressBar/index.js';
|
|
44
|
-
export { Radio } from './components/Radio/index.js';
|
|
45
|
-
export { Row } from './components/Row/index.js';
|
|
46
|
-
export { SelectableCard } from './components/SelectableCard/index.js';
|
|
47
|
-
export { SelectInput } from './components/SelectInput/index.js';
|
|
48
|
-
export { Separator } from './components/Separator/index.js';
|
|
49
|
-
export { Skeleton } from './components/Skeleton/index.js';
|
|
50
|
-
export { Snippet } from './components/Snippet/index.js';
|
|
51
|
-
export { Stack } from './components/Stack/index.js';
|
|
52
|
-
export { Status } from './components/Status/index.js';
|
|
53
|
-
export { StepList } from './components/StepList/index.js';
|
|
54
|
-
export { Stepper } from './components/Stepper/index.js';
|
|
55
|
-
export { SwitchButton } from './components/SwitchButton/index.js';
|
|
56
|
-
export { Table } from './components/Table/index.js';
|
|
57
|
-
export { Tabs } from './components/Tabs/index.js';
|
|
58
|
-
export { Tag } from './components/Tag/index.js';
|
|
59
|
-
export { TagInput } from './components/TagInput/index.js';
|
|
60
|
-
export { TagList } from './components/TagList/index.js';
|
|
61
|
-
export { Text } from './components/Text/index.js';
|
|
62
|
-
export { TextArea } from './components/TextArea/index.js';
|
|
63
|
-
export { TextInput } from './components/TextInput/index.js';
|
|
64
|
-
export { TextInputV2 } from './components/TextInputV2/index.js';
|
|
65
|
-
export { TimeInput } from './components/TimeInput/index.js';
|
|
66
|
-
export { ToastContainer, toast } from './components/Toaster/index.js';
|
|
67
|
-
export { Toggle } from './components/Toggle/index.js';
|
|
68
|
-
export { ToggleGroup } from './components/ToggleGroup/index.js';
|
|
69
|
-
export { Tooltip } from './components/Tooltip/index.js';
|
|
70
|
-
export { VerificationCode } from './components/VerificationCode/index.js';
|
|
71
|
-
export { RadioGroup } from './components/RadioGroup/index.js';
|
|
72
|
-
export { Icon } from '@ultraviolet/icons';
|
|
73
|
-
export { MenuV2 } from './components/MenuV2/index.js';
|
|
74
|
-
export { GlobalAlert } from './components/GlobalAlert/index.js';
|
|
75
|
-
export { NotificationContainer, notification } from './components/Notification/index.js';
|
|
76
|
-
export { SelectableCardGroup } from './components/SelectableCardGroup/index.js';
|
|
77
|
-
export { SelectInputV2 } from './components/SelectInputV2/index.js';
|
package/dist/src/theme/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { consoleLightTheme } from '@ultraviolet/themes';
|
|
2
|
-
export { consoleDarkTheme as darkTheme, consoleLightTheme as default } from '@ultraviolet/themes';
|
|
3
|
-
import deepmerge from 'deepmerge';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated use UltravioletUITheme instead
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const {
|
|
10
|
-
colors,
|
|
11
|
-
shadows,
|
|
12
|
-
typography,
|
|
13
|
-
space,
|
|
14
|
-
radii,
|
|
15
|
-
screens
|
|
16
|
-
} = consoleLightTheme;
|
|
17
|
-
/**
|
|
18
|
-
* Will extend theme with new theme properties
|
|
19
|
-
* @param {UltravioletUITheme} baseTheme the theme you want to extend from, by default it is set to light theme
|
|
20
|
-
* @param {RecursivePartial<UltravioletUITheme>} extendedTheme the properties of a new theme you want to apply from baseTheme
|
|
21
|
-
*/
|
|
22
|
-
const extendTheme = extendedTheme => deepmerge(consoleLightTheme, extendedTheme);
|
|
23
|
-
|
|
24
|
-
// This type exclude overlay color
|
|
25
|
-
|
|
26
|
-
const SENTIMENTS = ['primary', 'secondary', 'neutral', 'success', 'danger', 'warning', 'info'];
|
|
27
|
-
const SENTIMENTS_WITHOUT_NEUTRAL = /*#__PURE__*/SENTIMENTS.filter(sentiment => sentiment !== 'neutral');
|
|
28
|
-
|
|
29
|
-
export { SENTIMENTS, SENTIMENTS_WITHOUT_NEUTRAL, colors, extendTheme, radii, screens, shadows, space, typography };
|
package/dist/src/utils/ids.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { up, down } from './utilities.js';
|
|
3
|
-
|
|
4
|
-
const Breakpoint = /*#__PURE__*/_styled("div", {
|
|
5
|
-
target: "e1ehbeci0"
|
|
6
|
-
})("display:none;", props => `
|
|
7
|
-
${props.up ? up(props.up, 'display: block;') : ''}
|
|
8
|
-
${props.down ? down(props.down, 'display: block;') : ''}
|
|
9
|
-
`, ";");
|
|
10
|
-
var Breakpoint$1 = Breakpoint;
|
|
11
|
-
|
|
12
|
-
export { Breakpoint$1 as default };
|