@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,284 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Icon } from '@ultraviolet/icons';
|
|
3
|
-
import { forwardRef, useRef, useImperativeHandle, useId, useCallback, useMemo } from 'react';
|
|
4
|
-
import { Button } from '../Button/index.js';
|
|
5
|
-
import { Row } from '../Row/index.js';
|
|
6
|
-
import { Stack } from '../Stack/index.js';
|
|
7
|
-
import { Text } from '../Text/index.js';
|
|
8
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
9
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
10
|
-
|
|
11
|
-
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)."; }
|
|
12
|
-
const SIZES = {
|
|
13
|
-
small: '30px',
|
|
14
|
-
medium: '38px',
|
|
15
|
-
large: '46px'
|
|
16
|
-
};
|
|
17
|
-
const SideContainer = /*#__PURE__*/_styled(Stack, {
|
|
18
|
-
target: "e1b9qdjy4"
|
|
19
|
-
})("padding:", ({
|
|
20
|
-
theme
|
|
21
|
-
}) => `${theme.space['0.25']} ${theme.space['1']}`, ";&[data-size='small']{height:", SIZES.small, ";}&[data-size='medium']{height:", SIZES.medium, ";}&[data-size='large']{height:", SIZES.large, ";padding:", ({
|
|
22
|
-
theme
|
|
23
|
-
}) => `${theme.space['0.5']} ${theme.space['1']}`, ";}");
|
|
24
|
-
const InputContainer = /*#__PURE__*/_styled(Row, {
|
|
25
|
-
target: "e1b9qdjy3"
|
|
26
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
27
|
-
name: "v1pgyp",
|
|
28
|
-
styles: "border-width:0 1px 0 1px;border-style:solid;border-color:inherit;background:inherit;width:100%"
|
|
29
|
-
} : {
|
|
30
|
-
name: "v1pgyp",
|
|
31
|
-
styles: "border-width:0 1px 0 1px;border-style:solid;border-color:inherit;background:inherit;width:100%",
|
|
32
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
|
-
});
|
|
34
|
-
const Unit = /*#__PURE__*/_styled(Text, {
|
|
35
|
-
shouldForwardProp: prop => !['size'].includes(prop),
|
|
36
|
-
target: "e1b9qdjy2"
|
|
37
|
-
})("display:flex;align-items:center;padding:", ({
|
|
38
|
-
theme
|
|
39
|
-
}) => theme.space['1'], ";height:", ({
|
|
40
|
-
size
|
|
41
|
-
}) => SIZES[size], ";");
|
|
42
|
-
const Input = /*#__PURE__*/_styled("input", {
|
|
43
|
-
target: "e1b9qdjy1"
|
|
44
|
-
})("outline:none;border:none;padding:0;width:100%;color:", ({
|
|
45
|
-
theme
|
|
46
|
-
}) => theme.colors.neutral.text, ";font-size:", ({
|
|
47
|
-
theme
|
|
48
|
-
}) => theme.typography.body.fontSize, ";font-family:", ({
|
|
49
|
-
theme
|
|
50
|
-
}) => theme.typography.body.fontFamily, ";font-weight:", ({
|
|
51
|
-
theme
|
|
52
|
-
}) => theme.typography.body.fontWeight, ";line-height:", ({
|
|
53
|
-
theme
|
|
54
|
-
}) => theme.typography.body.lineHeight, ";text-align:center;padding:", ({
|
|
55
|
-
theme
|
|
56
|
-
}) => theme.space['1'], ";background:none;&[data-has-unit='true']{text-align:left;padding:", ({
|
|
57
|
-
theme
|
|
58
|
-
}) => `${theme.space['1']} 0 ${theme.space['1']} ${theme.space['1']}`, ";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&{-moz-appearance:textfield;}&[data-size='small']{height:", SIZES.small, ";}&[data-size='medium']{height:", SIZES.medium, ";}&[data-size='large']{height:", SIZES.large, ";}&:read-only{color:", ({
|
|
59
|
-
theme
|
|
60
|
-
}) => theme.colors.neutral.text, ";background:", ({
|
|
61
|
-
theme
|
|
62
|
-
}) => theme.colors.neutral.backgroundWeak, ";&~", Unit, "{background:", ({
|
|
63
|
-
theme
|
|
64
|
-
}) => theme.colors.neutral.backgroundWeak, ";}}&:disabled{color:", ({
|
|
65
|
-
theme
|
|
66
|
-
}) => theme.colors.neutral.textDisabled, ";background:", ({
|
|
67
|
-
theme
|
|
68
|
-
}) => theme.colors.neutral.backgroundDisabled, ";cursor:not-allowed;&~", Unit, "{background:", ({
|
|
69
|
-
theme
|
|
70
|
-
}) => theme.colors.neutral.backgroundDisabled, ";cursor:not-allowed;user-select:none;}}&:placeholder-shown~", Unit, "{color:", ({
|
|
71
|
-
theme
|
|
72
|
-
}) => theme.colors.neutral.textWeak, ";}");
|
|
73
|
-
const Container = /*#__PURE__*/_styled("div", {
|
|
74
|
-
target: "e1b9qdjy0"
|
|
75
|
-
})("display:flex;align-items:center;justify-content:space-between;flex-direction:row;border:1px solid ", ({
|
|
76
|
-
theme
|
|
77
|
-
}) => theme.colors.neutral.border, ";border-radius:", ({
|
|
78
|
-
theme
|
|
79
|
-
}) => theme.radii.default, ";&:focus-within{border-color:", ({
|
|
80
|
-
theme
|
|
81
|
-
}) => theme.colors.primary.borderHover, ";box-shadow:", ({
|
|
82
|
-
theme
|
|
83
|
-
}) => theme.shadows.focusPrimary, ";}&[data-success='true']{border-color:", ({
|
|
84
|
-
theme
|
|
85
|
-
}) => theme.colors.success.border, ";}&[data-error='true']{border-color:", ({
|
|
86
|
-
theme
|
|
87
|
-
}) => theme.colors.danger.border, ";}&:hover{border-color:", ({
|
|
88
|
-
theme
|
|
89
|
-
}) => theme.colors.primary.borderHover, ";}&[data-readonly='true']{border-color:", ({
|
|
90
|
-
theme
|
|
91
|
-
}) => theme.colors.neutral.border, ";background:", ({
|
|
92
|
-
theme
|
|
93
|
-
}) => theme.colors.neutral.backgroundWeak, ";cursor:not-allowed;}&[data-disabled='true']{border-color:", ({
|
|
94
|
-
theme
|
|
95
|
-
}) => theme.colors.neutral.borderDisabled, ";background:", ({
|
|
96
|
-
theme
|
|
97
|
-
}) => theme.colors.neutral.backgroundDisabled, ";cursor:not-allowed;}");
|
|
98
|
-
/**
|
|
99
|
-
* NumberInputV2 component is used to increment / decrement a number value by clicking on + / - buttons or
|
|
100
|
-
* by typing into input. If the value is out of the min / max range, the input will automatically be the min / max value on blur.
|
|
101
|
-
*/
|
|
102
|
-
const NumberInputV2 = /*#__PURE__*/forwardRef(({
|
|
103
|
-
disabled = false,
|
|
104
|
-
max = Number.MAX_SAFE_INTEGER,
|
|
105
|
-
min = 0,
|
|
106
|
-
name,
|
|
107
|
-
onChange,
|
|
108
|
-
onFocus,
|
|
109
|
-
onBlur,
|
|
110
|
-
size = 'large',
|
|
111
|
-
step,
|
|
112
|
-
unit,
|
|
113
|
-
value,
|
|
114
|
-
tooltip,
|
|
115
|
-
className,
|
|
116
|
-
label,
|
|
117
|
-
labelDescription,
|
|
118
|
-
id,
|
|
119
|
-
placeholder = '',
|
|
120
|
-
error,
|
|
121
|
-
success,
|
|
122
|
-
helper,
|
|
123
|
-
'aria-label': ariaLabel,
|
|
124
|
-
'data-testid': dataTestId,
|
|
125
|
-
required,
|
|
126
|
-
autoFocus,
|
|
127
|
-
readOnly
|
|
128
|
-
}, ref) => {
|
|
129
|
-
const localRef = useRef(null);
|
|
130
|
-
useImperativeHandle(ref, () => localRef.current);
|
|
131
|
-
const uniqueId = useId();
|
|
132
|
-
const localId = id ?? uniqueId;
|
|
133
|
-
const onClickSideButton = useCallback(direction => () => {
|
|
134
|
-
if (direction === 'up') {
|
|
135
|
-
localRef.current?.stepUp();
|
|
136
|
-
} else if (direction === 'down') {
|
|
137
|
-
localRef.current?.stepDown();
|
|
138
|
-
}
|
|
139
|
-
onChange?.(parseInt(localRef.current?.value ?? '', 10) ?? min);
|
|
140
|
-
}, [localRef, min, onChange]);
|
|
141
|
-
const isMinusDisabled = useMemo(() => {
|
|
142
|
-
if (!localRef?.current?.value || localRef?.current?.value === '') {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
const numericValue = Number(localRef?.current?.value);
|
|
146
|
-
if (Number.isNaN(numericValue)) return false;
|
|
147
|
-
const minValue = typeof min === 'number' ? min : Number(min);
|
|
148
|
-
return Number.isNaN(numericValue) || numericValue <= minValue;
|
|
149
|
-
},
|
|
150
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
151
|
-
[localRef?.current?.value, min]);
|
|
152
|
-
const isPlusDisabled = useMemo(() => {
|
|
153
|
-
if (!localRef?.current?.value || localRef?.current?.value === '') {
|
|
154
|
-
return false;
|
|
155
|
-
}
|
|
156
|
-
const numericValue = Number(localRef?.current?.value);
|
|
157
|
-
if (Number.isNaN(numericValue)) return false;
|
|
158
|
-
const maxValue = typeof max === 'number' ? max : Number(max);
|
|
159
|
-
return numericValue >= maxValue;
|
|
160
|
-
},
|
|
161
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
162
|
-
[localRef?.current?.value, max]);
|
|
163
|
-
const helperSentiment = useMemo(() => {
|
|
164
|
-
if (error) {
|
|
165
|
-
return 'danger';
|
|
166
|
-
}
|
|
167
|
-
if (success) {
|
|
168
|
-
return 'success';
|
|
169
|
-
}
|
|
170
|
-
return 'neutral';
|
|
171
|
-
}, [error, success]);
|
|
172
|
-
let inputValue;
|
|
173
|
-
if (value !== undefined) {
|
|
174
|
-
inputValue = value !== null && Number.isInteger(value) ? value.toString() : '';
|
|
175
|
-
}
|
|
176
|
-
return jsxs(Stack, {
|
|
177
|
-
gap: "0.5",
|
|
178
|
-
className: className,
|
|
179
|
-
children: [label || labelDescription ? jsxs(Stack, {
|
|
180
|
-
direction: "row",
|
|
181
|
-
gap: "1",
|
|
182
|
-
alignItems: "center",
|
|
183
|
-
children: [label ? jsxs(Stack, {
|
|
184
|
-
direction: "row",
|
|
185
|
-
gap: "0.5",
|
|
186
|
-
alignItems: "start",
|
|
187
|
-
children: [jsx(Text, {
|
|
188
|
-
as: "label",
|
|
189
|
-
variant: "bodyStrong",
|
|
190
|
-
sentiment: "neutral",
|
|
191
|
-
htmlFor: id ?? localId,
|
|
192
|
-
children: label
|
|
193
|
-
}), required ? jsx(Icon, {
|
|
194
|
-
name: "asterisk",
|
|
195
|
-
color: "danger",
|
|
196
|
-
size: 8
|
|
197
|
-
}) : null]
|
|
198
|
-
}) : null, labelDescription ?? null]
|
|
199
|
-
}) : null, jsx("div", {
|
|
200
|
-
children: jsx(Tooltip, {
|
|
201
|
-
text: tooltip,
|
|
202
|
-
children: jsxs(Container, {
|
|
203
|
-
"data-disabled": disabled,
|
|
204
|
-
"data-readonly": readOnly,
|
|
205
|
-
"data-error": !!error,
|
|
206
|
-
"data-success": !!success,
|
|
207
|
-
"data-unit": !!unit,
|
|
208
|
-
children: [jsx(SideContainer, {
|
|
209
|
-
justifyContent: "center",
|
|
210
|
-
alignItems: "center",
|
|
211
|
-
"data-size": size,
|
|
212
|
-
children: jsx(Button, {
|
|
213
|
-
sentiment: "neutral",
|
|
214
|
-
variant: "ghost",
|
|
215
|
-
icon: "minus",
|
|
216
|
-
size: size === 'small' ? 'xsmall' : 'small',
|
|
217
|
-
disabled: disabled || readOnly || isMinusDisabled,
|
|
218
|
-
onClick: onClickSideButton('down'),
|
|
219
|
-
"aria-label": "minus"
|
|
220
|
-
})
|
|
221
|
-
}), jsxs(InputContainer, {
|
|
222
|
-
justifyContent: "space-between",
|
|
223
|
-
alignItems: "center",
|
|
224
|
-
templateColumns: "1fr auto",
|
|
225
|
-
children: [jsx(Input, {
|
|
226
|
-
ref: localRef,
|
|
227
|
-
type: "number",
|
|
228
|
-
name: name,
|
|
229
|
-
id: localId,
|
|
230
|
-
placeholder: placeholder,
|
|
231
|
-
onChange: onChange ? event => {
|
|
232
|
-
const newNumber = parseInt(event.target.value, 10);
|
|
233
|
-
onChange(Number.isNaN(newNumber) ? null : newNumber);
|
|
234
|
-
} : undefined,
|
|
235
|
-
value: inputValue,
|
|
236
|
-
onFocus: onFocus,
|
|
237
|
-
onBlur: onBlur,
|
|
238
|
-
"data-size": size,
|
|
239
|
-
step: step,
|
|
240
|
-
disabled: disabled,
|
|
241
|
-
"aria-label": ariaLabel,
|
|
242
|
-
"data-testid": dataTestId,
|
|
243
|
-
min: min,
|
|
244
|
-
max: max,
|
|
245
|
-
required: required,
|
|
246
|
-
autoFocus: autoFocus,
|
|
247
|
-
readOnly: readOnly,
|
|
248
|
-
"data-has-unit": !!unit
|
|
249
|
-
}), unit ? jsx(Unit, {
|
|
250
|
-
variant: "body",
|
|
251
|
-
sentiment: "neutral",
|
|
252
|
-
as: "span",
|
|
253
|
-
disabled: disabled,
|
|
254
|
-
size: size,
|
|
255
|
-
children: unit
|
|
256
|
-
}) : null]
|
|
257
|
-
}), jsx(SideContainer, {
|
|
258
|
-
justifyContent: "center",
|
|
259
|
-
alignItems: "center",
|
|
260
|
-
"data-size": size,
|
|
261
|
-
children: jsx(Button, {
|
|
262
|
-
sentiment: "neutral",
|
|
263
|
-
variant: "ghost",
|
|
264
|
-
icon: "plus",
|
|
265
|
-
size: size === 'small' ? 'xsmall' : 'small',
|
|
266
|
-
disabled: disabled || readOnly || isPlusDisabled,
|
|
267
|
-
onClick: onClickSideButton('up'),
|
|
268
|
-
"aria-label": "plus"
|
|
269
|
-
})
|
|
270
|
-
})]
|
|
271
|
-
})
|
|
272
|
-
})
|
|
273
|
-
}), error || typeof success === 'string' || typeof helper === 'string' ? jsx(Text, {
|
|
274
|
-
variant: "caption",
|
|
275
|
-
as: "span",
|
|
276
|
-
prominence: !error && !success ? 'weak' : undefined,
|
|
277
|
-
sentiment: helperSentiment,
|
|
278
|
-
disabled: disabled || readOnly,
|
|
279
|
-
children: error || success || helper
|
|
280
|
-
}) : null, !error && !success && typeof helper !== 'string' && helper ? helper : null]
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
export { NumberInputV2 };
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useCallback, useMemo, useEffect } from 'react';
|
|
3
|
-
import { Button } from '../Button/index.js';
|
|
4
|
-
import { getPageNumbers } from './getPageNumbers.js';
|
|
5
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
8
|
-
const PageNumbersContainer = /*#__PURE__*/_styled("div", {
|
|
9
|
-
target: "e5s692s2"
|
|
10
|
-
})("display:flex;gap:", ({
|
|
11
|
-
theme
|
|
12
|
-
}) => theme.space['2'], ";margin:0 ", ({
|
|
13
|
-
theme
|
|
14
|
-
}) => theme.space['2'], ";");
|
|
15
|
-
const PageSwitchContainer = /*#__PURE__*/_styled("div", {
|
|
16
|
-
target: "e5s692s1"
|
|
17
|
-
})("display:flex;gap:", ({
|
|
18
|
-
theme
|
|
19
|
-
}) => theme.space['1'], ";");
|
|
20
|
-
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
21
|
-
target: "e5s692s0"
|
|
22
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
23
|
-
name: "zjik7",
|
|
24
|
-
styles: "display:flex"
|
|
25
|
-
} : {
|
|
26
|
-
name: "zjik7",
|
|
27
|
-
styles: "display:flex",
|
|
28
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
-
});
|
|
30
|
-
/**
|
|
31
|
-
* Pagination is a component to navigate between pages, it is composed of 2 buttons to go to the previous and next page,
|
|
32
|
-
* and a list of buttons to go to a specific page.
|
|
33
|
-
*/
|
|
34
|
-
const Pagination = ({
|
|
35
|
-
disabled = false,
|
|
36
|
-
page,
|
|
37
|
-
pageCount,
|
|
38
|
-
onChange,
|
|
39
|
-
pageTabCount = 5,
|
|
40
|
-
className,
|
|
41
|
-
'data-testid': dataTestId
|
|
42
|
-
}) => {
|
|
43
|
-
const goToFirstPage = useCallback(() => {
|
|
44
|
-
onChange(1);
|
|
45
|
-
}, [onChange]);
|
|
46
|
-
const goToLastPage = useCallback(() => {
|
|
47
|
-
onChange(pageCount);
|
|
48
|
-
}, [onChange, pageCount]);
|
|
49
|
-
const goToNextPage = useCallback(() => {
|
|
50
|
-
onChange(page + 1);
|
|
51
|
-
}, [onChange, page]);
|
|
52
|
-
const goToPreviousPage = useCallback(() => {
|
|
53
|
-
onChange(page - 1);
|
|
54
|
-
}, [onChange, page]);
|
|
55
|
-
const pageNumbersToDisplay = useMemo(() => pageCount > 1 ? getPageNumbers(page, pageCount, pageTabCount) : [1], [page, pageCount, pageTabCount]);
|
|
56
|
-
const handlePageClick = useCallback(pageNumber => () => {
|
|
57
|
-
onChange(pageNumber);
|
|
58
|
-
}, [onChange]);
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
if (page < 1) {
|
|
61
|
-
onChange(1);
|
|
62
|
-
}
|
|
63
|
-
if (page > pageCount) {
|
|
64
|
-
onChange(pageCount);
|
|
65
|
-
}
|
|
66
|
-
}, [page, pageCount, onChange]);
|
|
67
|
-
return jsxs(StyledContainer, {
|
|
68
|
-
className: className,
|
|
69
|
-
"data-testid": dataTestId,
|
|
70
|
-
children: [jsxs(PageSwitchContainer, {
|
|
71
|
-
children: [jsx(Button, {
|
|
72
|
-
"aria-label": "First",
|
|
73
|
-
disabled: page <= 1 || disabled,
|
|
74
|
-
variant: "outlined",
|
|
75
|
-
sentiment: "primary",
|
|
76
|
-
onClick: goToFirstPage,
|
|
77
|
-
icon: "arrow-left-double"
|
|
78
|
-
}), jsx(Button, {
|
|
79
|
-
"aria-label": "Back",
|
|
80
|
-
disabled: page <= 1 || disabled,
|
|
81
|
-
variant: "outlined",
|
|
82
|
-
sentiment: "primary",
|
|
83
|
-
onClick: goToPreviousPage,
|
|
84
|
-
icon: "arrow-left"
|
|
85
|
-
})]
|
|
86
|
-
}), jsx(PageNumbersContainer, {
|
|
87
|
-
children: pageNumbersToDisplay.map(pageNumber => jsx(Button, {
|
|
88
|
-
"aria-label": `Page ${pageNumber}`,
|
|
89
|
-
"aria-current": pageNumber === page,
|
|
90
|
-
disabled: disabled,
|
|
91
|
-
variant: "outlined",
|
|
92
|
-
sentiment: pageNumber === page ? 'primary' : 'neutral',
|
|
93
|
-
onClick: handlePageClick(pageNumber),
|
|
94
|
-
type: "button",
|
|
95
|
-
children: pageNumber
|
|
96
|
-
}, `pagination-page-${pageNumber}`))
|
|
97
|
-
}), jsxs(PageSwitchContainer, {
|
|
98
|
-
children: [jsx(Button, {
|
|
99
|
-
"aria-label": "Next",
|
|
100
|
-
disabled: page >= pageCount || disabled,
|
|
101
|
-
variant: "outlined",
|
|
102
|
-
sentiment: "primary",
|
|
103
|
-
onClick: goToNextPage,
|
|
104
|
-
icon: "arrow-right"
|
|
105
|
-
}), jsx(Button, {
|
|
106
|
-
"aria-label": "Last",
|
|
107
|
-
disabled: page >= pageCount || disabled,
|
|
108
|
-
variant: "outlined",
|
|
109
|
-
sentiment: "primary",
|
|
110
|
-
onClick: goToLastPage,
|
|
111
|
-
icon: "arrow-right-double"
|
|
112
|
-
})]
|
|
113
|
-
})]
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export { Pagination };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Icon } from '@ultraviolet/icons';
|
|
3
|
-
import { Stack } from '../Stack/index.js';
|
|
4
|
-
import { Text } from '../Text/index.js';
|
|
5
|
-
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
const PasswordCheckContainer = /*#__PURE__*/_styled("div", {
|
|
8
|
-
target: "eunxap90"
|
|
9
|
-
})("display:grid;grid-template-columns:repeat(2, 1fr);gap:", ({
|
|
10
|
-
theme
|
|
11
|
-
}) => theme.space['1'], ";");
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* PasswordCheck is a component that display a list of password rules with a check or a cross depending on the validity
|
|
15
|
-
* of the rule.
|
|
16
|
-
*/
|
|
17
|
-
const PasswordCheck = ({
|
|
18
|
-
rules,
|
|
19
|
-
className,
|
|
20
|
-
'data-testid': dataTestId
|
|
21
|
-
}) => jsx(PasswordCheckContainer, {
|
|
22
|
-
className: className,
|
|
23
|
-
"data-testid": dataTestId,
|
|
24
|
-
children: rules.map(rule => jsxs(Stack, {
|
|
25
|
-
direction: "row",
|
|
26
|
-
gap: 1,
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
children: [jsx(Icon, {
|
|
29
|
-
name: rule.valid ? 'checkbox-circle-outline' : 'close-circle-outline',
|
|
30
|
-
color: rule.valid ? 'success' : 'neutral',
|
|
31
|
-
prominence: "weak",
|
|
32
|
-
size: 20
|
|
33
|
-
}), jsx(Text, {
|
|
34
|
-
as: "p",
|
|
35
|
-
variant: "bodySmall",
|
|
36
|
-
children: rule.text
|
|
37
|
-
})]
|
|
38
|
-
}, rule.name))
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
export { PasswordCheck };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useTheme } from '@emotion/react';
|
|
3
|
-
import { useState, useCallback, useEffect } from 'react';
|
|
4
|
-
import { Text } from '../Text/index.js';
|
|
5
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
8
|
-
const StyledTitle = /*#__PURE__*/_styled(Text, {
|
|
9
|
-
target: "e1uv9umu3"
|
|
10
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
11
|
-
name: "1gbhlwb",
|
|
12
|
-
styles: "display:inline-block;vertical-align:top;line-height:22px"
|
|
13
|
-
} : {
|
|
14
|
-
name: "1gbhlwb",
|
|
15
|
-
styles: "display:inline-block;vertical-align:top;line-height:22px",
|
|
16
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
17
|
-
});
|
|
18
|
-
const StyledStrength = /*#__PURE__*/_styled(Text, {
|
|
19
|
-
target: "e1uv9umu2"
|
|
20
|
-
})("float:right;vertical-align:top;color:", ({
|
|
21
|
-
strength
|
|
22
|
-
}) => strength.color, ";");
|
|
23
|
-
const StyledWrapper = /*#__PURE__*/_styled("div", {
|
|
24
|
-
target: "e1uv9umu1"
|
|
25
|
-
})("background-color:", ({
|
|
26
|
-
theme
|
|
27
|
-
}) => theme.colors.neutral.backgroundDisabled, ";border-radius:", ({
|
|
28
|
-
theme
|
|
29
|
-
}) => theme.radii.default, ";height:8px;margin-top:", ({
|
|
30
|
-
theme
|
|
31
|
-
}) => theme.space['1'], ";margin-bottom:", ({
|
|
32
|
-
theme
|
|
33
|
-
}) => theme.space['2'], ";");
|
|
34
|
-
const StyledMeter = /*#__PURE__*/_styled("div", {
|
|
35
|
-
target: "e1uv9umu0"
|
|
36
|
-
})("border-radius:", ({
|
|
37
|
-
theme
|
|
38
|
-
}) => theme.radii.default, ";height:100%;transition:all 0.5s;");
|
|
39
|
-
const DEFAULT_ESTIMATE = () => ({
|
|
40
|
-
score: 0
|
|
41
|
-
});
|
|
42
|
-
const DEFAULT_FORBIDDEN_WORDS = [];
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* PasswordStrengthMeter is a component that displays a password strength meter.
|
|
46
|
-
* @deprecated use Meter component instead
|
|
47
|
-
*/
|
|
48
|
-
const PasswordStrengthMeter = ({
|
|
49
|
-
password = '',
|
|
50
|
-
onChange,
|
|
51
|
-
strength,
|
|
52
|
-
title,
|
|
53
|
-
estimate = DEFAULT_ESTIMATE,
|
|
54
|
-
forbiddenInputs = DEFAULT_FORBIDDEN_WORDS,
|
|
55
|
-
className,
|
|
56
|
-
'data-testid': dataTestId
|
|
57
|
-
}) => {
|
|
58
|
-
const [score, setScore] = useState(0);
|
|
59
|
-
const theme = useTheme();
|
|
60
|
-
const [backgroundColor, setBackgroundColor] = useState(strength[0]?.color || theme.colors.success.backgroundStrong);
|
|
61
|
-
const [width, setWidth] = useState(0);
|
|
62
|
-
const getScore = useCallback(async passwordToTest => {
|
|
63
|
-
const {
|
|
64
|
-
score: internalScore = 0
|
|
65
|
-
} = await estimate(passwordToTest || '', forbiddenInputs);
|
|
66
|
-
return internalScore;
|
|
67
|
-
}, [estimate, forbiddenInputs]);
|
|
68
|
-
const handleChange = useCallback(e => onChange?.(e), [onChange]);
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
setBackgroundColor(strength[score].color);
|
|
71
|
-
handleChange(score);
|
|
72
|
-
getScore(password).then(s => setScore(s)).catch(() => null);
|
|
73
|
-
const toValue = (score + 1) / strength.length * 100;
|
|
74
|
-
setWidth(`${toValue}%`);
|
|
75
|
-
}, [getScore, handleChange, password, score, strength]);
|
|
76
|
-
return jsxs("div", {
|
|
77
|
-
title: title,
|
|
78
|
-
role: "alert",
|
|
79
|
-
"aria-live": "polite",
|
|
80
|
-
className: className,
|
|
81
|
-
"data-testid": dataTestId,
|
|
82
|
-
children: [jsx(StyledTitle, {
|
|
83
|
-
variant: "bodySmallStrong",
|
|
84
|
-
as: "p",
|
|
85
|
-
children: title
|
|
86
|
-
}), jsx(StyledStrength, {
|
|
87
|
-
as: "span",
|
|
88
|
-
variant: "bodySmallStrong",
|
|
89
|
-
strength: strength[score],
|
|
90
|
-
children: strength[score]?.t
|
|
91
|
-
}), jsx(StyledWrapper, {
|
|
92
|
-
children: jsx(StyledMeter, {
|
|
93
|
-
style: {
|
|
94
|
-
backgroundColor,
|
|
95
|
-
width
|
|
96
|
-
}
|
|
97
|
-
})
|
|
98
|
-
})]
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export { PasswordStrengthMeter };
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { keyframes, css } from '@emotion/react';
|
|
3
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
4
|
-
import TooltipContainer from './Tooltip.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 bulletFlashAnim = keyframes`
|
|
9
|
-
0% {
|
|
10
|
-
opacity: 1;
|
|
11
|
-
}
|
|
12
|
-
50% {
|
|
13
|
-
opacity: 0.1;
|
|
14
|
-
}
|
|
15
|
-
100% {
|
|
16
|
-
opacity: 1;
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
19
|
-
const animationFlash = isFocused => isFocused ? /*#__PURE__*/css(bulletFlashAnim.styles, " animation:", bulletFlashAnim.name, " linear 1500ms infinite;") : '';
|
|
20
|
-
const List = /*#__PURE__*/_styled("ul", {
|
|
21
|
-
target: "e12qyakg8"
|
|
22
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
23
|
-
name: "1yalzuy",
|
|
24
|
-
styles: "font-size:14px;list-style-type:none;display:flex;flex:1;flex-direction:column;max-height:100%;overflow-y:auto"
|
|
25
|
-
} : {
|
|
26
|
-
name: "1yalzuy",
|
|
27
|
-
styles: "font-size:14px;list-style-type:none;display:flex;flex:1;flex-direction:column;max-height:100%;overflow-y:auto",
|
|
28
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
-
});
|
|
30
|
-
const ListItem = /*#__PURE__*/_styled("li", {
|
|
31
|
-
target: "e12qyakg7"
|
|
32
|
-
})("display:flex;align-items:center;margin-top:", ({
|
|
33
|
-
theme
|
|
34
|
-
}) => theme.space['1'], ";width:100%;color:", ({
|
|
35
|
-
isFocused,
|
|
36
|
-
theme
|
|
37
|
-
}) => isFocused ? theme.colors.primary.text : theme.colors.neutral.text, ";");
|
|
38
|
-
const Bullet = /*#__PURE__*/_styled("div", {
|
|
39
|
-
target: "e12qyakg6"
|
|
40
|
-
})("display:inline-block;border-radius:", ({
|
|
41
|
-
theme
|
|
42
|
-
}) => theme.radii.circle, ";width:10px;height:10px;margin:0 ", ({
|
|
43
|
-
theme
|
|
44
|
-
}) => theme.space['1'], ";background:", ({
|
|
45
|
-
color
|
|
46
|
-
}) => color, ";", ({
|
|
47
|
-
isFocused
|
|
48
|
-
}) => animationFlash(isFocused), ";");
|
|
49
|
-
const Label = /*#__PURE__*/_styled("div", {
|
|
50
|
-
target: "e12qyakg5"
|
|
51
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
52
|
-
name: "lvt6sf",
|
|
53
|
-
styles: "display:flex;flex:1;align-items:baseline"
|
|
54
|
-
} : {
|
|
55
|
-
name: "lvt6sf",
|
|
56
|
-
styles: "display:flex;flex:1;align-items:baseline",
|
|
57
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
58
|
-
});
|
|
59
|
-
const Value = /*#__PURE__*/_styled("div", {
|
|
60
|
-
target: "e12qyakg4"
|
|
61
|
-
})("margin-left:6px;font-weight:", ({
|
|
62
|
-
isFocused
|
|
63
|
-
}) => isFocused ? 500 : 400, ";");
|
|
64
|
-
const Text = /*#__PURE__*/_styled("span", {
|
|
65
|
-
target: "e12qyakg3"
|
|
66
|
-
})("flex:none;margin-right:6px;font-weight:", ({
|
|
67
|
-
isFocused
|
|
68
|
-
}) => isFocused ? 500 : 400, ";");
|
|
69
|
-
const ToggleBox = /*#__PURE__*/_styled("div", {
|
|
70
|
-
target: "e12qyakg2"
|
|
71
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
72
|
-
name: "ki8u62",
|
|
73
|
-
styles: "width:250px;height:21px;position:absolute"
|
|
74
|
-
} : {
|
|
75
|
-
name: "ki8u62",
|
|
76
|
-
styles: "width:250px;height:21px;position:absolute",
|
|
77
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
78
|
-
});
|
|
79
|
-
const Line = /*#__PURE__*/_styled("span", {
|
|
80
|
-
target: "e12qyakg1"
|
|
81
|
-
})("border-bottom:1px solid ", ({
|
|
82
|
-
theme
|
|
83
|
-
}) => theme.colors.neutral.border, ";position:relative;width:100%;");
|
|
84
|
-
const ProgressiveLine = /*#__PURE__*/_styled("span", {
|
|
85
|
-
target: "e12qyakg0"
|
|
86
|
-
})("border-bottom:1px solid ", ({
|
|
87
|
-
theme
|
|
88
|
-
}) => theme.colors.primary.border, ";position:absolute;left:0;top:0;bottom:-1px;transition:width 500ms ease;width:", ({
|
|
89
|
-
isFocused
|
|
90
|
-
}) => isFocused ? 100 : 0, "%;");
|
|
91
|
-
const Legends = ({
|
|
92
|
-
focused,
|
|
93
|
-
data,
|
|
94
|
-
onFocusChange,
|
|
95
|
-
colors
|
|
96
|
-
}) => jsx(List, {
|
|
97
|
-
children: data?.map((item, index) => {
|
|
98
|
-
const isSegmentFocused = focused !== undefined && item.id === focused;
|
|
99
|
-
const id = `chart-legend-${item.id}`;
|
|
100
|
-
return jsx(Tooltip, {
|
|
101
|
-
visible: isSegmentFocused,
|
|
102
|
-
id: id,
|
|
103
|
-
text: jsx(TooltipContainer, {
|
|
104
|
-
data: item
|
|
105
|
-
}),
|
|
106
|
-
children: jsxs(ListItem, {
|
|
107
|
-
isFocused: isSegmentFocused,
|
|
108
|
-
children: [jsx(ToggleBox, {
|
|
109
|
-
"data-testid": id,
|
|
110
|
-
onMouseOver: () => onFocusChange(item.id),
|
|
111
|
-
onFocus: () => onFocusChange(item.id),
|
|
112
|
-
onMouseOut: () => onFocusChange(),
|
|
113
|
-
onBlur: () => onFocusChange()
|
|
114
|
-
}), jsx(Bullet, {
|
|
115
|
-
color: colors[index],
|
|
116
|
-
isFocused: isSegmentFocused,
|
|
117
|
-
needPattern: item.needPattern,
|
|
118
|
-
id: `chart-legend-${item.id}`
|
|
119
|
-
}), jsxs(Label, {
|
|
120
|
-
children: [jsx(Text, {
|
|
121
|
-
isFocused: isSegmentFocused,
|
|
122
|
-
children: item.name
|
|
123
|
-
}), jsx(Line, {
|
|
124
|
-
children: jsx(ProgressiveLine, {
|
|
125
|
-
isFocused: isSegmentFocused
|
|
126
|
-
})
|
|
127
|
-
})]
|
|
128
|
-
}), jsx(Value, {
|
|
129
|
-
isFocused: isSegmentFocused,
|
|
130
|
-
children: item.value
|
|
131
|
-
})]
|
|
132
|
-
})
|
|
133
|
-
}, item.id);
|
|
134
|
-
})
|
|
135
|
-
});
|
|
136
|
-
var Legends$1 = Legends;
|
|
137
|
-
|
|
138
|
-
export { Legends$1 as default };
|