@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
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import { Icon } from "@ultraviolet/icons";
|
|
4
|
+
import { forwardRef, useId, useMemo } from "react";
|
|
5
|
+
import { SIZE_HEIGHT, Button } from "../Button/index.js";
|
|
6
|
+
import { Row } from "../Row/index.js";
|
|
7
|
+
import { Stack } from "../Stack/index.js";
|
|
8
|
+
import { Text } from "../Text/index.js";
|
|
9
|
+
import { Tooltip } from "../Tooltip/index.js";
|
|
10
|
+
const STATE_ICON_SIZE = 16;
|
|
11
|
+
const StyledTextAreaWrapper = styled.div`
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
`;
|
|
15
|
+
const StyledTextAreaAbsoluteStack = styled(Stack)`
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: ${({ theme }) => theme.space["1.5"]};
|
|
18
|
+
right: ${({ theme }) => theme.space["1"]};
|
|
19
|
+
`;
|
|
20
|
+
const StyledTextArea = styled("textarea", {
|
|
21
|
+
shouldForwardProp: (prop) => !["hasSentimentIcon", "isClearable"].includes(prop)
|
|
22
|
+
})`
|
|
23
|
+
width: 100%;
|
|
24
|
+
resize: vertical;
|
|
25
|
+
background: ${({ theme }) => theme.colors.neutral.background};
|
|
26
|
+
border: 1px solid ${({ theme }) => theme.colors.neutral.border};
|
|
27
|
+
color: ${({ theme }) => theme.colors.neutral.text};
|
|
28
|
+
&::placeholder {
|
|
29
|
+
color: ${({ theme }) => theme.colors.neutral.textWeak};
|
|
30
|
+
}
|
|
31
|
+
border-radius: ${({ theme }) => theme.radii.default};
|
|
32
|
+
padding: ${({ theme }) => `${theme.space["1.5"]} ${theme.space["1"]} ${theme.space["1.5"]} ${theme.space["2"]}`};
|
|
33
|
+
padding-right: ${({ theme, isClearable, hasSentimentIcon }) => (
|
|
34
|
+
/* including 1 optional if both element is visible + 1 because content is absolute 1space unit from right */
|
|
35
|
+
`calc(${theme.space[isClearable && hasSentimentIcon ? "4" : "3"]} + ${isClearable ? `${SIZE_HEIGHT.xsmall}px` : "0px"} + ${hasSentimentIcon ? `${STATE_ICON_SIZE}px` : "0px"})`
|
|
36
|
+
)};
|
|
37
|
+
|
|
38
|
+
&[data-success='true'] {
|
|
39
|
+
border-color: ${({ theme }) => theme.colors.success.border};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&[data-error='true'] {
|
|
43
|
+
border-color: ${({ theme }) => theme.colors.danger.border};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&[data-readOnly='true'] {
|
|
47
|
+
background: ${({ theme }) => theme.colors.neutral.backgroundWeak};
|
|
48
|
+
border-color: ${({ theme }) => theme.colors.neutral.border};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&[data-disabled='true'] {
|
|
52
|
+
background: ${({ theme }) => theme.colors.neutral.backgroundDisabled};
|
|
53
|
+
border-color: ${({ theme }) => theme.colors.neutral.borderDisabled};
|
|
54
|
+
|
|
55
|
+
&::placeholder {
|
|
56
|
+
color: ${({ theme }) => theme.colors.neutral.textWeakDisabled};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:not([data-disabled='true']):hover {
|
|
61
|
+
&:hover {
|
|
62
|
+
border-color: ${({ theme }) => theme.colors.primary.border};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:focus {
|
|
66
|
+
outline: none;
|
|
67
|
+
border-color: ${({ theme }) => theme.colors.primary.border};
|
|
68
|
+
box-shadow: ${({ theme }) => theme.shadows.focusPrimary};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
const TextArea = forwardRef(
|
|
73
|
+
({
|
|
74
|
+
id,
|
|
75
|
+
className,
|
|
76
|
+
tabIndex,
|
|
77
|
+
value,
|
|
78
|
+
onChange,
|
|
79
|
+
placeholder,
|
|
80
|
+
rows = 3,
|
|
81
|
+
disabled = false,
|
|
82
|
+
readOnly = false,
|
|
83
|
+
success,
|
|
84
|
+
error,
|
|
85
|
+
helper,
|
|
86
|
+
minLength,
|
|
87
|
+
maxLength,
|
|
88
|
+
tooltip,
|
|
89
|
+
label,
|
|
90
|
+
autoFocus,
|
|
91
|
+
required = false,
|
|
92
|
+
"data-testid": dataTestId,
|
|
93
|
+
name,
|
|
94
|
+
onFocus,
|
|
95
|
+
onBlur,
|
|
96
|
+
clearable = false,
|
|
97
|
+
labelDescription
|
|
98
|
+
}, ref) => {
|
|
99
|
+
const localId = useId();
|
|
100
|
+
const sentiment = useMemo(() => {
|
|
101
|
+
if (error) {
|
|
102
|
+
return "danger";
|
|
103
|
+
}
|
|
104
|
+
if (success) {
|
|
105
|
+
return "success";
|
|
106
|
+
}
|
|
107
|
+
return "neutral";
|
|
108
|
+
}, [error, success]);
|
|
109
|
+
const notice = success || error || helper;
|
|
110
|
+
const computedClearable = clearable && !!value;
|
|
111
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "0.5", className, children: [
|
|
112
|
+
label || labelDescription ? /* @__PURE__ */ jsxs(Stack, { direction: "row", gap: "1", alignItems: "center", children: [
|
|
113
|
+
label ? /* @__PURE__ */ jsxs(Stack, { direction: "row", gap: "0.5", alignItems: "start", children: [
|
|
114
|
+
/* @__PURE__ */ jsx(
|
|
115
|
+
Text,
|
|
116
|
+
{
|
|
117
|
+
as: "label",
|
|
118
|
+
variant: "bodyStrong",
|
|
119
|
+
sentiment: "neutral",
|
|
120
|
+
htmlFor: id ?? localId,
|
|
121
|
+
children: label
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
required ? /* @__PURE__ */ jsx(Icon, { name: "asterisk", color: "danger", size: 8 }) : null
|
|
125
|
+
] }) : null,
|
|
126
|
+
labelDescription ?? null
|
|
127
|
+
] }) : null,
|
|
128
|
+
/* @__PURE__ */ jsx(Tooltip, { text: tooltip, children: /* @__PURE__ */ jsxs(StyledTextAreaWrapper, { children: [
|
|
129
|
+
/* @__PURE__ */ jsx(
|
|
130
|
+
StyledTextArea,
|
|
131
|
+
{
|
|
132
|
+
"aria-invalid": !!error,
|
|
133
|
+
id: id ?? localId,
|
|
134
|
+
tabIndex,
|
|
135
|
+
autoFocus,
|
|
136
|
+
disabled,
|
|
137
|
+
rows,
|
|
138
|
+
ref,
|
|
139
|
+
value,
|
|
140
|
+
onChange: (event) => {
|
|
141
|
+
onChange(event.currentTarget.value);
|
|
142
|
+
},
|
|
143
|
+
hasSentimentIcon: !!success || !!error,
|
|
144
|
+
"data-disabled": disabled,
|
|
145
|
+
"data-readOnly": readOnly,
|
|
146
|
+
"data-success": !!success,
|
|
147
|
+
"data-error": !!error,
|
|
148
|
+
isClearable: !!computedClearable,
|
|
149
|
+
minLength,
|
|
150
|
+
maxLength,
|
|
151
|
+
placeholder,
|
|
152
|
+
"data-testid": dataTestId,
|
|
153
|
+
name,
|
|
154
|
+
onFocus,
|
|
155
|
+
onBlur
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ jsxs(
|
|
159
|
+
StyledTextAreaAbsoluteStack,
|
|
160
|
+
{
|
|
161
|
+
direction: "row",
|
|
162
|
+
alignItems: "center",
|
|
163
|
+
gap: "1",
|
|
164
|
+
children: [
|
|
165
|
+
computedClearable ? /* @__PURE__ */ jsx(
|
|
166
|
+
Button,
|
|
167
|
+
{
|
|
168
|
+
"aria-label": "clear value",
|
|
169
|
+
variant: "ghost",
|
|
170
|
+
size: "xsmall",
|
|
171
|
+
icon: "close",
|
|
172
|
+
onClick: () => {
|
|
173
|
+
onChange("");
|
|
174
|
+
},
|
|
175
|
+
sentiment: "neutral"
|
|
176
|
+
}
|
|
177
|
+
) : null,
|
|
178
|
+
success ? /* @__PURE__ */ jsx(
|
|
179
|
+
Icon,
|
|
180
|
+
{
|
|
181
|
+
name: "checkbox-circle-outline",
|
|
182
|
+
color: "success",
|
|
183
|
+
size: STATE_ICON_SIZE
|
|
184
|
+
}
|
|
185
|
+
) : null,
|
|
186
|
+
error ? /* @__PURE__ */ jsx(Icon, { name: "alert", color: "danger", variant: "outlined" }) : null
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
] }) }),
|
|
191
|
+
notice || maxLength ? /* @__PURE__ */ jsxs(Row, { templateColumns: "minmax(0, 1fr) min-content", gap: "1", children: [
|
|
192
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
193
|
+
error || success || typeof helper === "string" ? /* @__PURE__ */ jsx(
|
|
194
|
+
Text,
|
|
195
|
+
{
|
|
196
|
+
as: "p",
|
|
197
|
+
variant: "caption",
|
|
198
|
+
sentiment,
|
|
199
|
+
prominence: !error && !success ? "weak" : "default",
|
|
200
|
+
disabled,
|
|
201
|
+
children: error || success || helper
|
|
202
|
+
}
|
|
203
|
+
) : null,
|
|
204
|
+
!error && !success && typeof helper !== "string" && helper ? helper : null
|
|
205
|
+
] }),
|
|
206
|
+
maxLength ? /* @__PURE__ */ jsxs(
|
|
207
|
+
Text,
|
|
208
|
+
{
|
|
209
|
+
as: "div",
|
|
210
|
+
sentiment: "neutral",
|
|
211
|
+
prominence: "weak",
|
|
212
|
+
variant: "caption",
|
|
213
|
+
children: [
|
|
214
|
+
value?.length ?? 0,
|
|
215
|
+
"/",
|
|
216
|
+
maxLength
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
) : null
|
|
220
|
+
] }) : null
|
|
221
|
+
] });
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
export {
|
|
225
|
+
TextArea
|
|
226
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { FocusEventHandler, InputHTMLAttributes, KeyboardEventHandler, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
declare const inputSizes: {
|
|
3
|
+
medium: {
|
|
4
|
+
default: string;
|
|
5
|
+
full: string;
|
|
6
|
+
};
|
|
7
|
+
small: {
|
|
8
|
+
default: string;
|
|
9
|
+
full: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type TextInputSizes = keyof typeof inputSizes;
|
|
13
|
+
export declare const textInputSizes: ("small" | "medium")[];
|
|
14
|
+
type StyledInputProps = {
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
error?: boolean;
|
|
17
|
+
fillAvailable?: boolean;
|
|
18
|
+
hasLabel?: boolean;
|
|
19
|
+
paddingRightFactor: number;
|
|
20
|
+
isPlaceholderVisible?: boolean;
|
|
21
|
+
multiline?: boolean;
|
|
22
|
+
resizable?: boolean;
|
|
23
|
+
inputSize: TextInputSizes;
|
|
24
|
+
unit?: string;
|
|
25
|
+
rightComponentLength: number;
|
|
26
|
+
} & (InputHTMLAttributes<HTMLInputElement> | TextareaHTMLAttributes<HTMLTextAreaElement>);
|
|
27
|
+
type InputProps = Omit<Exclude<StyledInputProps, TextareaHTMLAttributes<HTMLTextAreaElement>>, 'inputSize'>;
|
|
28
|
+
type TextInputProps = {
|
|
29
|
+
'data-testid'?: string;
|
|
30
|
+
ariaControls?: string;
|
|
31
|
+
autoComplete?: string;
|
|
32
|
+
autoFocus?: boolean;
|
|
33
|
+
className?: string;
|
|
34
|
+
cols?: number;
|
|
35
|
+
defaultValue?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
edit?: boolean;
|
|
38
|
+
error?: string;
|
|
39
|
+
fillAvailable?: boolean;
|
|
40
|
+
generated?: boolean;
|
|
41
|
+
height?: string | number;
|
|
42
|
+
id?: string;
|
|
43
|
+
label?: string;
|
|
44
|
+
multiline?: boolean;
|
|
45
|
+
name?: string;
|
|
46
|
+
notice?: string;
|
|
47
|
+
noTopLabel?: boolean;
|
|
48
|
+
onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
49
|
+
onChange?: (value: string) => void;
|
|
50
|
+
onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
51
|
+
onKeyUp?: KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
52
|
+
onKeyDown?: KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
53
|
+
placeholder?: string;
|
|
54
|
+
random?: string;
|
|
55
|
+
readOnly?: boolean;
|
|
56
|
+
required?: boolean;
|
|
57
|
+
resizable?: boolean;
|
|
58
|
+
rows?: number;
|
|
59
|
+
size?: TextInputSizes;
|
|
60
|
+
tabIndex?: number;
|
|
61
|
+
type?: string;
|
|
62
|
+
unit?: string;
|
|
63
|
+
valid?: boolean;
|
|
64
|
+
value?: string | number;
|
|
65
|
+
wrap?: string;
|
|
66
|
+
inputProps?: InputProps;
|
|
67
|
+
max?: InputHTMLAttributes<HTMLInputElement>['max'];
|
|
68
|
+
min?: InputHTMLAttributes<HTMLInputElement>['min'];
|
|
69
|
+
} & (Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> | Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>);
|
|
70
|
+
/**
|
|
71
|
+
* TextInput component allows users to input text, with options for customization and validation.
|
|
72
|
+
* It supports various input types and should be appropriately sized with clear labeling.
|
|
73
|
+
*/
|
|
74
|
+
export declare const TextInput: import("react").ForwardRefExoticComponent<TextInputProps & import("react").RefAttributes<HTMLInputElement | HTMLTextAreaElement | null>>;
|
|
75
|
+
export {};
|