@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,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Square: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const variants: {
|
|
3
|
+
readonly block: ({ length }: {
|
|
4
|
+
length?: number | undefined;
|
|
5
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
readonly blocks: ({ col, length, }: {
|
|
7
|
+
col?: number | undefined;
|
|
8
|
+
length?: number | undefined;
|
|
9
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
readonly box: ({ col, length, }: {
|
|
11
|
+
col?: number | undefined;
|
|
12
|
+
length?: number | undefined;
|
|
13
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
readonly donut: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
readonly line: import("@emotion/styled").StyledComponent<{
|
|
16
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
18
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
19
|
+
readonly list: ({ length, col, }: {
|
|
20
|
+
length?: number | undefined;
|
|
21
|
+
col?: number | undefined;
|
|
22
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
readonly slider: ({ length }: {
|
|
24
|
+
length?: number | undefined;
|
|
25
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
26
|
+
readonly square: import("@emotion/styled").StyledComponent<{
|
|
27
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
28
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
29
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
30
|
+
};
|
|
31
|
+
type SkeletonVariant = keyof typeof variants;
|
|
32
|
+
type SkeletonProps = {
|
|
33
|
+
variant?: SkeletonVariant;
|
|
34
|
+
length?: number;
|
|
35
|
+
col?: number;
|
|
36
|
+
className?: string;
|
|
37
|
+
'aria-label'?: string;
|
|
38
|
+
'data-testid'?: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Skeleton component is used to indicate that the data is loading.
|
|
42
|
+
* It is used to provide a better user experience by showing a temporary placeholder reflecting the dimensions of the
|
|
43
|
+
* content that will eventually be loaded on the screen.
|
|
44
|
+
*/
|
|
45
|
+
export declare const Skeleton: ({ variant, length, col, className, "aria-label": ariaLabel, "data-testid": dataTestId, }: SkeletonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare const skeletonTypes: ("line" | "list" | "slider" | "square" | "block" | "blocks" | "box" | "donut")[];
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { keyframes } from "@emotion/react";
|
|
3
|
+
import styled from "@emotion/styled";
|
|
4
|
+
import { Block } from "./Block.js";
|
|
5
|
+
import { Blocks } from "./Blocks.js";
|
|
6
|
+
import { BoxWithIcon } from "./BoxWithIcon.js";
|
|
7
|
+
import { Donut } from "./Donut.js";
|
|
8
|
+
import { Line } from "./Line.js";
|
|
9
|
+
import { List } from "./List.js";
|
|
10
|
+
import { Slider } from "./Slider.js";
|
|
11
|
+
import { Square } from "./Square.js";
|
|
12
|
+
const shineAnimation = keyframes`
|
|
13
|
+
from {
|
|
14
|
+
left: -25%;
|
|
15
|
+
}
|
|
16
|
+
to {
|
|
17
|
+
left: 100%;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const StyledContainer = styled.div`
|
|
21
|
+
position: relative;
|
|
22
|
+
width: 100%;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
cursor: progress;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-flow: column;
|
|
27
|
+
height: 100%;
|
|
28
|
+
`;
|
|
29
|
+
const StyledDiv = styled.div`
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 0;
|
|
32
|
+
height: 100%;
|
|
33
|
+
width: 25%;
|
|
34
|
+
opacity: 0.8;
|
|
35
|
+
background: linear-gradient(
|
|
36
|
+
90deg,
|
|
37
|
+
${({ theme }) => theme.colors.neutral.backgroundWeak}00,
|
|
38
|
+
${({ theme }) => theme.colors.neutral.backgroundWeak}4D,
|
|
39
|
+
${({ theme }) => theme.colors.neutral.backgroundWeak}66,
|
|
40
|
+
${({ theme }) => theme.colors.neutral.backgroundWeak}4D,
|
|
41
|
+
${({ theme }) => theme.colors.neutral.backgroundWeak}00
|
|
42
|
+
);
|
|
43
|
+
animation: ${shineAnimation} 1s linear infinite;
|
|
44
|
+
animation-direction: alternate;
|
|
45
|
+
|
|
46
|
+
@media (prefers-reduced-motion: reduce) {
|
|
47
|
+
animation: unset;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
const variants = {
|
|
51
|
+
block: Block,
|
|
52
|
+
blocks: Blocks,
|
|
53
|
+
box: BoxWithIcon,
|
|
54
|
+
donut: Donut,
|
|
55
|
+
line: Line,
|
|
56
|
+
list: List,
|
|
57
|
+
slider: Slider,
|
|
58
|
+
square: Square
|
|
59
|
+
};
|
|
60
|
+
const Skeleton = ({
|
|
61
|
+
variant = "blocks",
|
|
62
|
+
length,
|
|
63
|
+
col,
|
|
64
|
+
className,
|
|
65
|
+
"aria-label": ariaLabel,
|
|
66
|
+
"data-testid": dataTestId
|
|
67
|
+
}) => {
|
|
68
|
+
const Component = variants[variant];
|
|
69
|
+
return /* @__PURE__ */ jsxs(
|
|
70
|
+
StyledContainer,
|
|
71
|
+
{
|
|
72
|
+
className,
|
|
73
|
+
"aria-busy": true,
|
|
74
|
+
"aria-live": "polite",
|
|
75
|
+
"aria-label": ariaLabel,
|
|
76
|
+
"data-testid": dataTestId,
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ jsx(Component, { length, col }),
|
|
79
|
+
/* @__PURE__ */ jsx(StyledDiv, {})
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
Skeleton
|
|
86
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { CopyButton } from '../CopyButton';
|
|
3
|
+
type Prefixes = 'lines' | 'command';
|
|
4
|
+
type SnippetProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
children: string;
|
|
7
|
+
/**
|
|
8
|
+
* prefix display an element at the beginning of the snippet that is not copiable or selectable.
|
|
9
|
+
* For `lines` prefix it will display the line number.
|
|
10
|
+
* For `command` prefix it will display a `$` sign.
|
|
11
|
+
*/
|
|
12
|
+
prefix?: Prefixes;
|
|
13
|
+
showText?: string;
|
|
14
|
+
hideText?: string;
|
|
15
|
+
'data-testid'?: string;
|
|
16
|
+
initiallyExpanded?: boolean;
|
|
17
|
+
} & Pick<ComponentProps<typeof CopyButton>, 'copyText' | 'copiedText'>;
|
|
18
|
+
/**
|
|
19
|
+
* Snippet component is used to display code snippets with the ability to copy the code.
|
|
20
|
+
* It also has the ability to show/hide the code snippet if it has more than 4 lines.
|
|
21
|
+
*/
|
|
22
|
+
export declare const Snippet: ({ children, copyText, copiedText, showText, hideText, prefix, className, "data-testid": dataTestId, initiallyExpanded, }: SnippetProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import { Icon } from "@ultraviolet/icons";
|
|
4
|
+
import { useReducer, Children } from "react";
|
|
5
|
+
import { CopyButton } from "../CopyButton/index.js";
|
|
6
|
+
import { Expandable } from "../Expandable/index.js";
|
|
7
|
+
import { Stack } from "../Stack/index.js";
|
|
8
|
+
import { Text } from "../Text/index.js";
|
|
9
|
+
const LINES_BREAK_REGEX = /\r\n|\r|\n/;
|
|
10
|
+
const PreText = styled(Text, {
|
|
11
|
+
shouldForwardProp: (prop) => !["multiline", "hasShowMoreButton", "showMore"].includes(prop)
|
|
12
|
+
})`
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: ${({ theme }) => theme.space["2"]};
|
|
15
|
+
padding-right: ${({ theme }) => theme.space["9"]};
|
|
16
|
+
overflow-x: ${({ hasShowMoreButton, showMore }) => hasShowMoreButton && !showMore ? "hidden" : "auto"};
|
|
17
|
+
overflow-y: hidden;
|
|
18
|
+
${({ multiline }) => !multiline ? "white-space: nowrap;" : ""}
|
|
19
|
+
height: auto;
|
|
20
|
+
counter-reset: section;
|
|
21
|
+
`;
|
|
22
|
+
const StyledSpan = styled("span", {
|
|
23
|
+
shouldForwardProp: (prop) => !["linePrefix", "multiline", "prefix"].includes(prop)
|
|
24
|
+
})`
|
|
25
|
+
display: block;
|
|
26
|
+
|
|
27
|
+
&:after {
|
|
28
|
+
content: '';
|
|
29
|
+
${({ theme, multiline }) => multiline ? `padding: ${theme.space["4"]}` : `padding-right: ${theme.space["8"]}`};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
${({ prefix, theme }) => prefix ? `
|
|
33
|
+
&:before {
|
|
34
|
+
color: ${theme.colors.neutral.textWeak};
|
|
35
|
+
width: ${prefix === "lines" ? "35px" : ""};
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
justify-content: flex-end;
|
|
38
|
+
counter-increment: section;
|
|
39
|
+
content: ${prefix === "lines" ? "counter(section)" : "'$'"};
|
|
40
|
+
padding-right: ${theme.space["1"]};
|
|
41
|
+
}
|
|
42
|
+
` : null}
|
|
43
|
+
`;
|
|
44
|
+
const Container = styled("div", {
|
|
45
|
+
shouldForwardProp: (prop) => !["multiline"].includes(prop)
|
|
46
|
+
})`
|
|
47
|
+
position: relative;
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: start;
|
|
50
|
+
max-width: 100%;
|
|
51
|
+
${({ multiline }) => multiline ? "width: 100%;" : ""}
|
|
52
|
+
background: ${({ theme }) => theme.colors.neutral.backgroundWeak};
|
|
53
|
+
border-radius: ${({ theme }) => theme.radii.default};
|
|
54
|
+
`;
|
|
55
|
+
const StyledStack = styled(Stack)`
|
|
56
|
+
width: 100%;
|
|
57
|
+
`;
|
|
58
|
+
const ButtonContainer = styled("div", {
|
|
59
|
+
shouldForwardProp: (prop) => !["multiline"].includes(prop)
|
|
60
|
+
})`
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: 0;
|
|
63
|
+
right: 0;
|
|
64
|
+
padding: ${({ theme, multiline }) => `${theme.space[multiline ? "2" : "1"]} ${theme.space["2"]} 0 0`};
|
|
65
|
+
background: ${({ theme }) => theme.colors.neutral.backgroundWeak};
|
|
66
|
+
border-radius: ${({ theme }) => theme.radii.default};
|
|
67
|
+
border: 2px solid transparent;
|
|
68
|
+
${({ multiline, theme }) => !multiline ? `box-shadow: -27px 0 19px -11px ${theme.colors.neutral.backgroundWeak}` : ""};
|
|
69
|
+
`;
|
|
70
|
+
const ShowMoreContainer = styled("div", {
|
|
71
|
+
shouldForwardProp: (prop) => !["showMore"].includes(prop)
|
|
72
|
+
})`
|
|
73
|
+
width: 100%;
|
|
74
|
+
box-shadow: ${({ theme, showMore }) => !showMore ? `0px -22px 19px -6px
|
|
75
|
+
${theme.colors.neutral.backgroundWeak}` : "none"};
|
|
76
|
+
`;
|
|
77
|
+
const StyledButton = styled.button`
|
|
78
|
+
width: 100%;
|
|
79
|
+
background: none;
|
|
80
|
+
border: none;
|
|
81
|
+
padding: ${({ theme }) => theme.space["2"]};
|
|
82
|
+
padding-top: ${({ theme }) => theme.space["1"]};
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
`;
|
|
85
|
+
const AlignCenterText = styled(Text)`
|
|
86
|
+
display: flex;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
align-items: center;
|
|
89
|
+
`;
|
|
90
|
+
const AnimatedArrowIcon = styled(Icon, {
|
|
91
|
+
shouldForwardProp: (prop) => !["showMore"].includes(prop)
|
|
92
|
+
})`
|
|
93
|
+
transform: ${({ showMore }) => showMore ? "rotate(180deg)" : "rotate(0deg)"};
|
|
94
|
+
transform-origin: center;
|
|
95
|
+
transition: transform 300ms ease-in-out;
|
|
96
|
+
`;
|
|
97
|
+
const CodeContent = ({
|
|
98
|
+
children,
|
|
99
|
+
prefix,
|
|
100
|
+
multiline,
|
|
101
|
+
showMore,
|
|
102
|
+
hasShowMoreButton,
|
|
103
|
+
lines
|
|
104
|
+
}) => /* @__PURE__ */ jsx(
|
|
105
|
+
PreText,
|
|
106
|
+
{
|
|
107
|
+
as: "pre",
|
|
108
|
+
variant: "code",
|
|
109
|
+
multiline,
|
|
110
|
+
hasShowMoreButton,
|
|
111
|
+
showMore,
|
|
112
|
+
children: multiline ? Children.map(lines, (child) => /* @__PURE__ */ jsx(StyledSpan, { multiline: true, prefix, children: child })) : /* @__PURE__ */ jsx(StyledSpan, { prefix, children })
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
const Snippet = ({
|
|
116
|
+
children,
|
|
117
|
+
copyText,
|
|
118
|
+
copiedText,
|
|
119
|
+
showText = "Show",
|
|
120
|
+
hideText = "Hide",
|
|
121
|
+
prefix,
|
|
122
|
+
className,
|
|
123
|
+
"data-testid": dataTestId,
|
|
124
|
+
initiallyExpanded
|
|
125
|
+
}) => {
|
|
126
|
+
const [showMore, setShowMore] = useReducer(
|
|
127
|
+
(value) => !value,
|
|
128
|
+
initiallyExpanded ?? false
|
|
129
|
+
);
|
|
130
|
+
const lines = children.split(LINES_BREAK_REGEX).filter(Boolean);
|
|
131
|
+
const numberOfLines = lines.length;
|
|
132
|
+
const multiline = numberOfLines > 1;
|
|
133
|
+
const hasShowMoreButton = numberOfLines > 4 && multiline;
|
|
134
|
+
return /* @__PURE__ */ jsx(
|
|
135
|
+
Container,
|
|
136
|
+
{
|
|
137
|
+
multiline,
|
|
138
|
+
className,
|
|
139
|
+
"data-testid": dataTestId,
|
|
140
|
+
children: /* @__PURE__ */ jsxs(StyledStack, { children: [
|
|
141
|
+
hasShowMoreButton ? /* @__PURE__ */ jsx(Expandable, { minHeight: 120, opened: showMore, children: /* @__PURE__ */ jsx(CodeContent, { prefix, multiline, lines, children }) }) : /* @__PURE__ */ jsx(CodeContent, { prefix, multiline, lines, children }),
|
|
142
|
+
/* @__PURE__ */ jsx(ButtonContainer, { multiline: multiline && numberOfLines > 1, children: /* @__PURE__ */ jsx(
|
|
143
|
+
CopyButton,
|
|
144
|
+
{
|
|
145
|
+
value: children,
|
|
146
|
+
copyText,
|
|
147
|
+
copiedText,
|
|
148
|
+
noBorder: true,
|
|
149
|
+
sentiment: "neutral"
|
|
150
|
+
}
|
|
151
|
+
) }),
|
|
152
|
+
hasShowMoreButton ? /* @__PURE__ */ jsx(ShowMoreContainer, { showMore, children: /* @__PURE__ */ jsx(
|
|
153
|
+
StyledButton,
|
|
154
|
+
{
|
|
155
|
+
type: "button",
|
|
156
|
+
onClick: setShowMore,
|
|
157
|
+
"aria-expanded": showMore,
|
|
158
|
+
children: /* @__PURE__ */ jsxs(AlignCenterText, { as: "span", variant: "bodySmallStrong", children: [
|
|
159
|
+
showMore ? hideText : showText,
|
|
160
|
+
" ",
|
|
161
|
+
/* @__PURE__ */ jsx(AnimatedArrowIcon, { name: "arrow-down", showMore })
|
|
162
|
+
] })
|
|
163
|
+
}
|
|
164
|
+
) }) : null
|
|
165
|
+
] })
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
};
|
|
169
|
+
export {
|
|
170
|
+
Snippet
|
|
171
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import type { UltravioletUITheme } from '../../theme';
|
|
3
|
+
type StackProps = {
|
|
4
|
+
gap?: keyof UltravioletUITheme['space'] | number;
|
|
5
|
+
direction?: 'row' | 'column';
|
|
6
|
+
alignItems?: CSSProperties['alignItems'];
|
|
7
|
+
justifyContent?: CSSProperties['justifyContent'];
|
|
8
|
+
wrap?: boolean | CSSProperties['flexWrap'];
|
|
9
|
+
width?: CSSProperties['width'];
|
|
10
|
+
flex?: CSSProperties['flex'];
|
|
11
|
+
className?: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
'data-testid'?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A Stack is a widget that organize children in a vertical or horizontal layout based on css Flex,
|
|
17
|
+
* it accepts few props to deal with spacing and align.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Stack: import("@emotion/styled").StyledComponent<{
|
|
20
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
22
|
+
} & StackProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
const Stack = styled("div", {
|
|
3
|
+
shouldForwardProp: (prop) => ![
|
|
4
|
+
"gap",
|
|
5
|
+
"direction",
|
|
6
|
+
"alignItems",
|
|
7
|
+
"justifyContent",
|
|
8
|
+
"wrap",
|
|
9
|
+
"width",
|
|
10
|
+
"flex"
|
|
11
|
+
].includes(prop)
|
|
12
|
+
})`
|
|
13
|
+
display: flex;
|
|
14
|
+
|
|
15
|
+
${({
|
|
16
|
+
theme,
|
|
17
|
+
gap = 0,
|
|
18
|
+
direction = "column",
|
|
19
|
+
alignItems = "normal",
|
|
20
|
+
justifyContent = "normal",
|
|
21
|
+
wrap = "nowrap",
|
|
22
|
+
width,
|
|
23
|
+
flex
|
|
24
|
+
}) => `
|
|
25
|
+
gap: ${theme.space[gap]};
|
|
26
|
+
flex-direction: ${direction};
|
|
27
|
+
align-items: ${alignItems};
|
|
28
|
+
justify-content: ${justifyContent};
|
|
29
|
+
flex-wrap: ${typeof wrap === "boolean" ? "wrap" : wrap};
|
|
30
|
+
${flex ? `flex: ${flex};` : ""}
|
|
31
|
+
${width ? `width: ${width};` : ""}
|
|
32
|
+
`}
|
|
33
|
+
`;
|
|
34
|
+
export {
|
|
35
|
+
Stack
|
|
36
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Theme } from '@emotion/react';
|
|
2
|
+
declare const sentiments: {
|
|
3
|
+
readonly danger: ({ theme }: {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
}) => string;
|
|
6
|
+
readonly info: ({ theme }: {
|
|
7
|
+
theme: Theme;
|
|
8
|
+
}) => string;
|
|
9
|
+
readonly neutral: ({ theme }: {
|
|
10
|
+
theme: Theme;
|
|
11
|
+
}) => string;
|
|
12
|
+
readonly success: ({ theme }: {
|
|
13
|
+
theme: Theme;
|
|
14
|
+
}) => string;
|
|
15
|
+
readonly warning: ({ theme }: {
|
|
16
|
+
theme: Theme;
|
|
17
|
+
}) => string;
|
|
18
|
+
};
|
|
19
|
+
type StatusSentiment = keyof typeof sentiments;
|
|
20
|
+
export declare const statusSentiments: ("neutral" | "success" | "danger" | "warning" | "info")[];
|
|
21
|
+
type StatusProps = {
|
|
22
|
+
animated?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
sentiment: StatusSentiment;
|
|
25
|
+
tooltip?: string;
|
|
26
|
+
'data-testid'?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Status component used to display a colored circle with a tooltip for additional information.
|
|
30
|
+
*/
|
|
31
|
+
export declare const Status: ({ animated, className, tooltip, sentiment, "data-testid": dataTestId, }: StatusProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import { Tooltip } from "../Tooltip/index.js";
|
|
4
|
+
import { ping } from "../../utils/animations.js";
|
|
5
|
+
const HEIGHT = "10px";
|
|
6
|
+
const WIDTH = "10px";
|
|
7
|
+
const sentiments = {
|
|
8
|
+
danger: ({ theme }) => `
|
|
9
|
+
background-color: ${theme.colors.danger.backgroundStrong};
|
|
10
|
+
`,
|
|
11
|
+
info: ({ theme }) => `
|
|
12
|
+
background-color: ${theme.colors.info.backgroundStrong};
|
|
13
|
+
`,
|
|
14
|
+
neutral: ({ theme }) => `
|
|
15
|
+
background-color: ${theme.colors.neutral.backgroundStronger};
|
|
16
|
+
`,
|
|
17
|
+
success: ({ theme }) => `
|
|
18
|
+
background-color: ${theme.colors.success.backgroundStrong};
|
|
19
|
+
`,
|
|
20
|
+
warning: ({ theme }) => `
|
|
21
|
+
background-color: ${theme.colors.warning.backgroundStrong};
|
|
22
|
+
`
|
|
23
|
+
};
|
|
24
|
+
const StyledCircle = styled.span`
|
|
25
|
+
display: inline-block;
|
|
26
|
+
width: ${WIDTH};
|
|
27
|
+
height: ${HEIGHT};
|
|
28
|
+
border-radius: ${({ theme }) => theme.radii.circle};
|
|
29
|
+
${({ sentiment }) => sentiments[sentiment]};
|
|
30
|
+
`;
|
|
31
|
+
const StyledAnimatedCircle = styled.span`
|
|
32
|
+
position: absolute;
|
|
33
|
+
width: ${WIDTH};
|
|
34
|
+
height: ${HEIGHT};
|
|
35
|
+
opacity: 0.75;
|
|
36
|
+
border-radius: ${({ theme }) => theme.radii.circle};
|
|
37
|
+
animation: ${ping} 1.1s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
38
|
+
${({ sentiment }) => sentiments[sentiment]};
|
|
39
|
+
`;
|
|
40
|
+
const Container = styled.span`
|
|
41
|
+
display: flex;
|
|
42
|
+
width: ${WIDTH};
|
|
43
|
+
height: ${HEIGHT};
|
|
44
|
+
`;
|
|
45
|
+
const Status = ({
|
|
46
|
+
animated = false,
|
|
47
|
+
className,
|
|
48
|
+
tooltip,
|
|
49
|
+
sentiment,
|
|
50
|
+
"data-testid": dataTestId
|
|
51
|
+
}) => /* @__PURE__ */ jsx(Tooltip, { text: tooltip, children: /* @__PURE__ */ jsxs(Container, { className, "data-testid": dataTestId, children: [
|
|
52
|
+
animated ? /* @__PURE__ */ jsx(StyledAnimatedCircle, { sentiment }) : null,
|
|
53
|
+
/* @__PURE__ */ jsx(StyledCircle, { sentiment })
|
|
54
|
+
] }) });
|
|
55
|
+
export {
|
|
56
|
+
Status
|
|
57
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Bullet } from '../Bullet';
|
|
3
|
+
export type Sizes = 'small' | 'medium';
|
|
4
|
+
type ContentProps = {
|
|
5
|
+
bulletIcon: ComponentProps<typeof Bullet>['icon'];
|
|
6
|
+
bulletText?: never;
|
|
7
|
+
} | {
|
|
8
|
+
bulletIcon?: never;
|
|
9
|
+
bulletText: string;
|
|
10
|
+
};
|
|
11
|
+
type ItemProps = {
|
|
12
|
+
sentiment?: ComponentProps<typeof Bullet>['sentiment'];
|
|
13
|
+
prominence?: ComponentProps<typeof Bullet>['prominence'];
|
|
14
|
+
size?: Sizes;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
} & ContentProps;
|
|
20
|
+
type StepListProps = {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
'data-testid'?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* StepList component is used to display a list of steps.
|
|
27
|
+
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
28
|
+
*/
|
|
29
|
+
export declare const StepList: {
|
|
30
|
+
({ children, className, "data-testid": dataTestId, }: StepListProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
31
|
+
Item: ({ bulletText, bulletIcon, sentiment, prominence, children, onClick, size, disabled, className, }: ItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import { Bullet } from "../Bullet/index.js";
|
|
4
|
+
const Steps = styled.ul`
|
|
5
|
+
list-style: none;
|
|
6
|
+
padding-left: 0;
|
|
7
|
+
text-align: left;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: ${({ theme }) => theme.space["3"]};
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
`;
|
|
13
|
+
const Step = styled("li", {
|
|
14
|
+
shouldForwardProp: (prop) => !["disabled"].includes(prop)
|
|
15
|
+
})`
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
gap: 1rem;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
color: ${({ theme, disabled }) => disabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.textStrong};
|
|
21
|
+
`;
|
|
22
|
+
const StyledDiv = styled("div", {
|
|
23
|
+
shouldForwardProp: (prop) => !["size"].includes(prop)
|
|
24
|
+
})`
|
|
25
|
+
flex: 1;
|
|
26
|
+
margin: auto;
|
|
27
|
+
line-height: ${({ size }) => size === "medium" ? "32px" : "24px"};
|
|
28
|
+
font-size: ${({ size }) => size === "medium" ? "24px" : "16px"};
|
|
29
|
+
`;
|
|
30
|
+
const Item = ({
|
|
31
|
+
bulletText,
|
|
32
|
+
bulletIcon,
|
|
33
|
+
sentiment,
|
|
34
|
+
prominence,
|
|
35
|
+
children,
|
|
36
|
+
onClick,
|
|
37
|
+
size = "medium",
|
|
38
|
+
disabled = false,
|
|
39
|
+
className
|
|
40
|
+
}) => /* @__PURE__ */ jsxs(Step, { disabled, className, onClick, children: [
|
|
41
|
+
bulletIcon ? /* @__PURE__ */ jsx(
|
|
42
|
+
Bullet,
|
|
43
|
+
{
|
|
44
|
+
icon: bulletIcon,
|
|
45
|
+
size,
|
|
46
|
+
sentiment: disabled ? "disabled" : sentiment,
|
|
47
|
+
prominence
|
|
48
|
+
}
|
|
49
|
+
) : null,
|
|
50
|
+
bulletText ? /* @__PURE__ */ jsx(
|
|
51
|
+
Bullet,
|
|
52
|
+
{
|
|
53
|
+
text: bulletText,
|
|
54
|
+
size,
|
|
55
|
+
sentiment: disabled ? "disabled" : sentiment,
|
|
56
|
+
prominence
|
|
57
|
+
}
|
|
58
|
+
) : null,
|
|
59
|
+
/* @__PURE__ */ jsx(StyledDiv, { size, children })
|
|
60
|
+
] });
|
|
61
|
+
const StepList = ({
|
|
62
|
+
children,
|
|
63
|
+
className,
|
|
64
|
+
"data-testid": dataTestId
|
|
65
|
+
}) => /* @__PURE__ */ jsx(Steps, { className, "data-testid": dataTestId, children });
|
|
66
|
+
StepList.Item = Item;
|
|
67
|
+
export {
|
|
68
|
+
StepList
|
|
69
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type StepperProps = {
|
|
3
|
+
animated?: boolean;
|
|
4
|
+
selected?: number;
|
|
5
|
+
children: ReactNode[];
|
|
6
|
+
className?: string;
|
|
7
|
+
labelPosition?: 'bottom' | 'right';
|
|
8
|
+
size?: 'small' | 'medium';
|
|
9
|
+
'data-testid'?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Stepper component to show the progress of a process in a linear way.
|
|
13
|
+
*/
|
|
14
|
+
export declare const Stepper: ({ children, selected, animated, className, labelPosition, size, "data-testid": dataTestId, }: StepperProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|