@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,100 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { useTheme } from '@emotion/react';
|
|
3
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
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)."; }
|
|
6
|
-
const VIEWBOX_WIDTH = 100;
|
|
7
|
-
const VIEWBOX_HEIGHT = 100;
|
|
8
|
-
const HALF_VIEWBOX_WIDTH = VIEWBOX_WIDTH / 2;
|
|
9
|
-
const HALF_VIEWBOX_HEIGHT = VIEWBOX_HEIGHT / 2;
|
|
10
|
-
const StyledSvg = /*#__PURE__*/_styled('svg', {
|
|
11
|
-
shouldForwardProp: prop => !['active'].includes(prop),
|
|
12
|
-
target: "e1y1n78x1"
|
|
13
|
-
})(({
|
|
14
|
-
active
|
|
15
|
-
}) => active ? `
|
|
16
|
-
animation: spin 0.75s linear infinite;
|
|
17
|
-
|
|
18
|
-
@keyframes spin {
|
|
19
|
-
from {
|
|
20
|
-
transform: rotate(0deg);
|
|
21
|
-
}
|
|
22
|
-
to {
|
|
23
|
-
transform: rotate(360deg);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
` : '', ";");
|
|
27
|
-
const Text = /*#__PURE__*/_styled('text', {
|
|
28
|
-
shouldForwardProp: prop => !['color'].includes(prop),
|
|
29
|
-
target: "e1y1n78x0"
|
|
30
|
-
})("fill:", ({
|
|
31
|
-
theme,
|
|
32
|
-
color
|
|
33
|
-
}) => theme.colors[color]?.backgroundStrong || color, ";font-size:26px;dominant-baseline:middle;text-anchor:middle;");
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Loader is a circular progress indicator that can be used to indicate that an action is being performed.
|
|
37
|
-
*/
|
|
38
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
39
|
-
name: "si0mpz",
|
|
40
|
-
styles: "transition:stroke-dashoffset 0.5s ease 0s"
|
|
41
|
-
} : {
|
|
42
|
-
name: "si0mpz",
|
|
43
|
-
styles: "transition:stroke-dashoffset 0.5s ease 0s",
|
|
44
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
45
|
-
};
|
|
46
|
-
const Loader = ({
|
|
47
|
-
percentage = 20,
|
|
48
|
-
text,
|
|
49
|
-
size = 40,
|
|
50
|
-
strokeWidth = 16,
|
|
51
|
-
color = 'primary',
|
|
52
|
-
trailColor = 'neutral',
|
|
53
|
-
active = false,
|
|
54
|
-
label = 'Loading'
|
|
55
|
-
}) => {
|
|
56
|
-
const theme = useTheme();
|
|
57
|
-
const circleRadius = HALF_VIEWBOX_HEIGHT - strokeWidth / 2;
|
|
58
|
-
const boundedPercentage = Math.min(Math.max(percentage, 0), 100) / 100;
|
|
59
|
-
const circleDiameter = Math.PI * 2 * circleRadius;
|
|
60
|
-
return jsxs(StyledSvg, {
|
|
61
|
-
active: active,
|
|
62
|
-
role: "progressbar",
|
|
63
|
-
"aria-label": label,
|
|
64
|
-
"aria-valuemin": 0,
|
|
65
|
-
"aria-valuemax": 100,
|
|
66
|
-
"aria-valuenow": percentage,
|
|
67
|
-
"aria-valuetext": `${percentage}%`,
|
|
68
|
-
viewBox: `0 0 ${VIEWBOX_WIDTH} ${VIEWBOX_HEIGHT}`,
|
|
69
|
-
style: {
|
|
70
|
-
height: typeof size === 'string' ? size : `${size}px`,
|
|
71
|
-
width: typeof size === 'string' ? size : `${size}px`
|
|
72
|
-
},
|
|
73
|
-
children: [jsx("circle", {
|
|
74
|
-
cx: HALF_VIEWBOX_WIDTH,
|
|
75
|
-
cy: HALF_VIEWBOX_HEIGHT,
|
|
76
|
-
r: circleRadius,
|
|
77
|
-
fill: "none",
|
|
78
|
-
strokeWidth: strokeWidth,
|
|
79
|
-
stroke: theme.colors[trailColor]?.border || trailColor
|
|
80
|
-
}), jsx("circle", {
|
|
81
|
-
css: _ref,
|
|
82
|
-
cx: HALF_VIEWBOX_WIDTH,
|
|
83
|
-
cy: HALF_VIEWBOX_HEIGHT,
|
|
84
|
-
r: circleRadius,
|
|
85
|
-
fill: "none",
|
|
86
|
-
strokeWidth: strokeWidth,
|
|
87
|
-
strokeDasharray: circleDiameter,
|
|
88
|
-
strokeDashoffset: (1 - boundedPercentage) * circleDiameter,
|
|
89
|
-
stroke: theme.colors[color]?.backgroundStrong || color,
|
|
90
|
-
strokeLinecap: "round"
|
|
91
|
-
}), text ? jsx(Text, {
|
|
92
|
-
color: color,
|
|
93
|
-
x: HALF_VIEWBOX_WIDTH,
|
|
94
|
-
y: HALF_VIEWBOX_HEIGHT,
|
|
95
|
-
children: text
|
|
96
|
-
}) : null]
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export { Loader };
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
4
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
const itemCoreStyle = ({
|
|
7
|
-
theme,
|
|
8
|
-
borderless,
|
|
9
|
-
sentiment,
|
|
10
|
-
disabled
|
|
11
|
-
}) => `
|
|
12
|
-
display: inline-block;
|
|
13
|
-
font-size: ${theme.typography.bodySmall.fontSize};
|
|
14
|
-
line-height: ${theme.typography.bodySmall.lineHeight};
|
|
15
|
-
font-weight: inherit;
|
|
16
|
-
padding: ${`${theme.space['0.5']} ${theme.space['1']}`};
|
|
17
|
-
border: none;
|
|
18
|
-
${borderless ? '' : `border-bottom: 1px solid ${theme.colors.neutral.border};`}
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
min-width: 110px;
|
|
21
|
-
|
|
22
|
-
color: ${theme.colors[sentiment][disabled ? 'textDisabled' : 'text']};
|
|
23
|
-
svg {
|
|
24
|
-
fill: ${theme.colors[sentiment][disabled ? 'textDisabled' : 'text']};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
${disabled ? `
|
|
28
|
-
cursor: not-allowed;
|
|
29
|
-
` : `
|
|
30
|
-
&:hover,
|
|
31
|
-
&:focus {
|
|
32
|
-
color: ${theme.colors[sentiment].textHover};
|
|
33
|
-
svg {
|
|
34
|
-
fill: ${theme.colors[sentiment].textHover};
|
|
35
|
-
}
|
|
36
|
-
}`}
|
|
37
|
-
`;
|
|
38
|
-
const StyledItem = /*#__PURE__*/_styled('button', {
|
|
39
|
-
shouldForwardProp: prop => !['borderless', 'sentiment'].includes(prop),
|
|
40
|
-
target: "e10f690h1"
|
|
41
|
-
})(({
|
|
42
|
-
theme,
|
|
43
|
-
borderless,
|
|
44
|
-
sentiment,
|
|
45
|
-
disabled
|
|
46
|
-
}) => itemCoreStyle({
|
|
47
|
-
theme,
|
|
48
|
-
borderless,
|
|
49
|
-
sentiment,
|
|
50
|
-
disabled
|
|
51
|
-
}), " background:none;");
|
|
52
|
-
const StyledLinkItem = /*#__PURE__*/_styled('a', {
|
|
53
|
-
shouldForwardProp: prop => !['borderless', 'sentiment'].includes(prop),
|
|
54
|
-
target: "e10f690h0"
|
|
55
|
-
})(({
|
|
56
|
-
theme,
|
|
57
|
-
borderless,
|
|
58
|
-
sentiment,
|
|
59
|
-
disabled
|
|
60
|
-
}) => itemCoreStyle({
|
|
61
|
-
theme,
|
|
62
|
-
borderless,
|
|
63
|
-
sentiment,
|
|
64
|
-
disabled
|
|
65
|
-
}), " text-decoration:none;&:focus{text-decoration:none;}");
|
|
66
|
-
const Item = /*#__PURE__*/forwardRef(({
|
|
67
|
-
borderless = false,
|
|
68
|
-
disabled = false,
|
|
69
|
-
onClick,
|
|
70
|
-
sentiment = 'neutral',
|
|
71
|
-
href,
|
|
72
|
-
children,
|
|
73
|
-
tooltip,
|
|
74
|
-
className,
|
|
75
|
-
'data-testid': dataTestId
|
|
76
|
-
}, ref) => {
|
|
77
|
-
if (href && !disabled) {
|
|
78
|
-
return jsx(Tooltip, {
|
|
79
|
-
text: tooltip,
|
|
80
|
-
children: jsx(StyledLinkItem, {
|
|
81
|
-
borderless: true,
|
|
82
|
-
href: href,
|
|
83
|
-
ref: ref,
|
|
84
|
-
onClick: disabled ? undefined : onClick,
|
|
85
|
-
role: "menuitem",
|
|
86
|
-
disabled: disabled,
|
|
87
|
-
sentiment: sentiment,
|
|
88
|
-
className: className,
|
|
89
|
-
"data-testid": dataTestId,
|
|
90
|
-
children: children
|
|
91
|
-
})
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
return jsx(Tooltip, {
|
|
95
|
-
text: tooltip,
|
|
96
|
-
children: jsx(StyledItem, {
|
|
97
|
-
type: "button",
|
|
98
|
-
ref: ref,
|
|
99
|
-
role: "menuitem",
|
|
100
|
-
disabled: disabled,
|
|
101
|
-
onClick: onClick,
|
|
102
|
-
borderless: borderless,
|
|
103
|
-
sentiment: sentiment,
|
|
104
|
-
className: className,
|
|
105
|
-
"data-testid": dataTestId,
|
|
106
|
-
children: children
|
|
107
|
-
})
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
var Item$1 = Item;
|
|
111
|
-
|
|
112
|
-
export { Item$1 as default };
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
import { forwardRef, isValidElement, useRef, useImperativeHandle, cloneElement } from 'react';
|
|
4
|
-
import { usePopoverState, PopoverDisclosure, Popover } from 'reakit/Popover';
|
|
5
|
-
import { Portal } from 'reakit/Portal';
|
|
6
|
-
import Item from './Item.js';
|
|
7
|
-
import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
10
|
-
const StyledPopover = /*#__PURE__*/_styled(Popover, {
|
|
11
|
-
target: "e1hqs9p51"
|
|
12
|
-
})("border-radius:", ({
|
|
13
|
-
theme
|
|
14
|
-
}) => theme.radii.default, ";background-color:", ({
|
|
15
|
-
theme
|
|
16
|
-
}) => theme.colors.neutral.background, ";color:", ({
|
|
17
|
-
theme
|
|
18
|
-
}) => theme.colors.neutral.text, ";box-shadow:", ({
|
|
19
|
-
theme
|
|
20
|
-
}) => theme.shadows.dropdown, ";");
|
|
21
|
-
const bottomStyles = theme => /*#__PURE__*/css("box-shadow:", theme.shadows.menu, ";&:after,&:before{bottom:100%;}&:after{border-bottom-color:", theme.colors.neutral.background, ";}&:before{border-bottom-color:transparent;}");
|
|
22
|
-
const topStyles = theme => /*#__PURE__*/css("box-shadow:", theme.shadows.menu, ";&:after,&:before{top:100%;}&:after{border-top-color:", theme.colors.neutral.background, ";}&:before{border-top-color:rgba(165, 165, 205, 0.4);}");
|
|
23
|
-
const endStyles = process.env.NODE_ENV === "production" ? {
|
|
24
|
-
name: "15zu3sa",
|
|
25
|
-
styles: "&:after{margin-left:-9px;right:24px;}&:before{margin-left:-11px;right:24px;}"
|
|
26
|
-
} : {
|
|
27
|
-
name: "15zu3sa",
|
|
28
|
-
styles: "&:after{margin-left:-9px;right:24px;}&:before{margin-left:-11px;right:24px;}",
|
|
29
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
|
-
};
|
|
31
|
-
const startStyles = process.env.NODE_ENV === "production" ? {
|
|
32
|
-
name: "17k88rr",
|
|
33
|
-
styles: "&:after{margin-right:-9px;left:24px;}&:before{margin-right:-11px;left:24px;}"
|
|
34
|
-
} : {
|
|
35
|
-
name: "17k88rr",
|
|
36
|
-
styles: "&:after{margin-right:-9px;left:24px;}&:before{margin-right:-11px;left:24px;}",
|
|
37
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
38
|
-
};
|
|
39
|
-
const centerStyles = process.env.NODE_ENV === "production" ? {
|
|
40
|
-
name: "1qzrhtz",
|
|
41
|
-
styles: "&:after,&:before{left:50%;transform:translateX(-50%);}"
|
|
42
|
-
} : {
|
|
43
|
-
name: "1qzrhtz",
|
|
44
|
-
styles: "&:after,&:before{left:50%;transform:translateX(-50%);}",
|
|
45
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
46
|
-
};
|
|
47
|
-
const arrowPlacementStyles = {
|
|
48
|
-
bottom: theme => /*#__PURE__*/css(centerStyles, ";", bottomStyles(theme), ";"),
|
|
49
|
-
'bottom-end': theme => /*#__PURE__*/css(endStyles, ";", bottomStyles(theme), ";"),
|
|
50
|
-
'bottom-start': theme => /*#__PURE__*/css(startStyles, ";", bottomStyles(theme), ";"),
|
|
51
|
-
top: theme => /*#__PURE__*/css(centerStyles, ";", topStyles(theme), ";"),
|
|
52
|
-
'top-end': theme => /*#__PURE__*/css(endStyles, ";", topStyles(theme), ";"),
|
|
53
|
-
'top-start': theme => /*#__PURE__*/css(startStyles, ";", topStyles(theme), ";")
|
|
54
|
-
};
|
|
55
|
-
const MenuList = /*#__PURE__*/_styled("div", {
|
|
56
|
-
target: "e1hqs9p50"
|
|
57
|
-
})("&:after,&:before{border:solid transparent;border-width:9px;content:' ';height:0;width:0;position:absolute;pointer-events:none;}&:after{border-color:transparent;}&:before{border-color:transparent;}background-color:", ({
|
|
58
|
-
theme
|
|
59
|
-
}) => theme.colors.neutral.backgroundWeakElevated, ";display:flex;flex-direction:column;text-align:center;justify-content:center;color:", ({
|
|
60
|
-
theme
|
|
61
|
-
}) => theme.colors.neutral.text, ";border-radius:", ({
|
|
62
|
-
theme
|
|
63
|
-
}) => theme.radii.default, ";position:relative;", ({
|
|
64
|
-
placement,
|
|
65
|
-
theme,
|
|
66
|
-
hasArrow
|
|
67
|
-
}) => hasArrow && arrowPlacementStyles[placement]?.(theme), ";");
|
|
68
|
-
const FwdMenu = /*#__PURE__*/forwardRef(({
|
|
69
|
-
ariaLabel = 'Menu',
|
|
70
|
-
id,
|
|
71
|
-
children,
|
|
72
|
-
disclosure,
|
|
73
|
-
hasArrow = true,
|
|
74
|
-
placement = 'bottom',
|
|
75
|
-
visible = false,
|
|
76
|
-
className,
|
|
77
|
-
'data-testid': dataTestId
|
|
78
|
-
}, ref) => {
|
|
79
|
-
const popover = usePopoverState({
|
|
80
|
-
baseId: id,
|
|
81
|
-
placement,
|
|
82
|
-
visible
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
// if you need dialog inside your component, use function, otherwise component is fine
|
|
86
|
-
const target = /*#__PURE__*/isValidElement(disclosure) ? disclosure : disclosure(popover);
|
|
87
|
-
const innerRef = useRef(target);
|
|
88
|
-
useImperativeHandle(ref, () => innerRef.current);
|
|
89
|
-
return jsxs(Fragment, {
|
|
90
|
-
children: [disclosure &&
|
|
91
|
-
// @ts-expect-error reakit types are invalid, no need to pass as something, default is div
|
|
92
|
-
jsx(PopoverDisclosure, {
|
|
93
|
-
...popover,
|
|
94
|
-
onClick: event => {
|
|
95
|
-
target?.props?.onClick?.(event);
|
|
96
|
-
},
|
|
97
|
-
ref: innerRef,
|
|
98
|
-
children: disclosureProps => /*#__PURE__*/cloneElement(target, disclosureProps)
|
|
99
|
-
}), jsx(Portal, {
|
|
100
|
-
children: jsx(StyledPopover, {
|
|
101
|
-
...popover,
|
|
102
|
-
"aria-label": ariaLabel,
|
|
103
|
-
className: className,
|
|
104
|
-
children: /* Required to avoid loading menu content if not visible */
|
|
105
|
-
popover.visible ? jsx(MenuList, {
|
|
106
|
-
"data-testid": dataTestId,
|
|
107
|
-
className: className,
|
|
108
|
-
hasArrow: hasArrow,
|
|
109
|
-
placement: popover.placement,
|
|
110
|
-
role: "menu",
|
|
111
|
-
children: typeof children === 'function' ? children(popover) : children
|
|
112
|
-
}) : null
|
|
113
|
-
})
|
|
114
|
-
})]
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* A menu is a widget that offers a list of choices to the user, such as a set of actions or functions.
|
|
120
|
-
* A menu is usually opened, or made visible, by activating a menu button, choosing an item in a menu that opens a
|
|
121
|
-
* sub menu, or by invoking a command, such as `Shift + F10` on Windows, that opens a context specific menu.
|
|
122
|
-
* When a user activates a choice in a menu, the menu usually closes unless the choice opened a submenu.
|
|
123
|
-
* @deprecated use MenuV2 component instead
|
|
124
|
-
*/
|
|
125
|
-
const Menu = /*#__PURE__*/Object.assign(FwdMenu, {
|
|
126
|
-
Item
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
export { Menu };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Text } from '../Text/index.js';
|
|
3
|
-
import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const Container = /*#__PURE__*/_styled("span", {
|
|
6
|
-
target: "e7u2rl20"
|
|
7
|
-
})("padding:", ({
|
|
8
|
-
theme
|
|
9
|
-
}) => `${theme.space['0.5']} ${theme.space['1.5']}`, ";text-align:left;");
|
|
10
|
-
const Group = ({
|
|
11
|
-
label,
|
|
12
|
-
children
|
|
13
|
-
}) => jsxs(Fragment, {
|
|
14
|
-
children: [jsx(Container, {
|
|
15
|
-
children: jsx(Text, {
|
|
16
|
-
variant: "captionStrong",
|
|
17
|
-
as: "span",
|
|
18
|
-
prominence: "weak",
|
|
19
|
-
sentiment: "neutral",
|
|
20
|
-
children: label
|
|
21
|
-
})
|
|
22
|
-
}), children]
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export { Group };
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { Tooltip } from '../Tooltip/index.js';
|
|
4
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
const ANIMATION_DURATION = 200; // in ms
|
|
7
|
-
|
|
8
|
-
const itemCoreStyle = ({
|
|
9
|
-
theme,
|
|
10
|
-
sentiment,
|
|
11
|
-
disabled
|
|
12
|
-
}) => `
|
|
13
|
-
display: flex;
|
|
14
|
-
justify-content: start;
|
|
15
|
-
align-items: center;
|
|
16
|
-
min-height: 32px;
|
|
17
|
-
max-height: 44px;
|
|
18
|
-
font-size: ${theme.typography.bodySmall.fontSize};
|
|
19
|
-
line-height: ${theme.typography.bodySmall.lineHeight};
|
|
20
|
-
font-weight: inherit;
|
|
21
|
-
padding: ${`${theme.space['0.5']} ${theme.space['1']}`};
|
|
22
|
-
border: none;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
min-width: 110px;
|
|
25
|
-
width: 100%;
|
|
26
|
-
border-radius: ${theme.radii.default};
|
|
27
|
-
transition: background-color ${ANIMATION_DURATION}ms, color ${ANIMATION_DURATION}ms;
|
|
28
|
-
|
|
29
|
-
color: ${theme.colors[sentiment][disabled ? 'textDisabled' : 'text']};
|
|
30
|
-
svg {
|
|
31
|
-
fill: ${theme.colors[sentiment][disabled ? 'textDisabled' : 'text']};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
${disabled ? `
|
|
35
|
-
cursor: not-allowed;
|
|
36
|
-
` : `
|
|
37
|
-
&:hover,
|
|
38
|
-
&:focus, &[data-active='true'] {
|
|
39
|
-
background-color: ${theme.colors[sentiment].backgroundHover};
|
|
40
|
-
color: ${theme.colors[sentiment].textHover};
|
|
41
|
-
svg {
|
|
42
|
-
fill: ${theme.colors[sentiment].textHover};
|
|
43
|
-
}
|
|
44
|
-
}`}
|
|
45
|
-
`;
|
|
46
|
-
const Container = /*#__PURE__*/_styled('div', {
|
|
47
|
-
shouldForwardProp: prop => !['borderless'].includes(prop),
|
|
48
|
-
target: "ei26g5y2"
|
|
49
|
-
})(({
|
|
50
|
-
theme,
|
|
51
|
-
borderless
|
|
52
|
-
}) => borderless ? '' : `border-bottom: 1px solid ${theme.colors.neutral.border};`, " padding:", ({
|
|
53
|
-
theme,
|
|
54
|
-
borderless
|
|
55
|
-
}) => `${borderless ? theme.space['0.25'] : theme.space['0.5']} ${theme.space['0.5']}`, ";&:last-child{border:none;}");
|
|
56
|
-
const StyledItem = /*#__PURE__*/_styled('button', {
|
|
57
|
-
shouldForwardProp: prop => !['borderless', 'sentiment'].includes(prop),
|
|
58
|
-
target: "ei26g5y1"
|
|
59
|
-
})(({
|
|
60
|
-
theme,
|
|
61
|
-
borderless,
|
|
62
|
-
sentiment,
|
|
63
|
-
disabled
|
|
64
|
-
}) => itemCoreStyle({
|
|
65
|
-
theme,
|
|
66
|
-
borderless,
|
|
67
|
-
sentiment,
|
|
68
|
-
disabled
|
|
69
|
-
}), " background:none;");
|
|
70
|
-
const StyledLinkItem = /*#__PURE__*/_styled('a', {
|
|
71
|
-
shouldForwardProp: prop => !['borderless', 'sentiment'].includes(prop),
|
|
72
|
-
target: "ei26g5y0"
|
|
73
|
-
})(({
|
|
74
|
-
theme,
|
|
75
|
-
borderless,
|
|
76
|
-
sentiment,
|
|
77
|
-
disabled
|
|
78
|
-
}) => itemCoreStyle({
|
|
79
|
-
theme,
|
|
80
|
-
borderless,
|
|
81
|
-
sentiment,
|
|
82
|
-
disabled
|
|
83
|
-
}), " text-decoration:none;&:focus{text-decoration:none;}");
|
|
84
|
-
const Item = /*#__PURE__*/forwardRef(({
|
|
85
|
-
borderless = false,
|
|
86
|
-
disabled = false,
|
|
87
|
-
onClick,
|
|
88
|
-
sentiment = 'neutral',
|
|
89
|
-
href,
|
|
90
|
-
children,
|
|
91
|
-
tooltip,
|
|
92
|
-
active,
|
|
93
|
-
className,
|
|
94
|
-
'data-testid': dataTestId
|
|
95
|
-
}, ref) => {
|
|
96
|
-
if (href && !disabled) {
|
|
97
|
-
return jsx(Container, {
|
|
98
|
-
borderless: borderless,
|
|
99
|
-
children: jsx(Tooltip, {
|
|
100
|
-
text: tooltip,
|
|
101
|
-
children: jsx(StyledLinkItem, {
|
|
102
|
-
"data-active": active,
|
|
103
|
-
borderless: true,
|
|
104
|
-
href: href,
|
|
105
|
-
ref: ref,
|
|
106
|
-
onClick: disabled ? undefined : onClick,
|
|
107
|
-
role: "menuitem",
|
|
108
|
-
disabled: disabled,
|
|
109
|
-
sentiment: sentiment,
|
|
110
|
-
className: className,
|
|
111
|
-
"data-testid": dataTestId,
|
|
112
|
-
children: children
|
|
113
|
-
})
|
|
114
|
-
})
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
return jsx(Container, {
|
|
118
|
-
borderless: borderless,
|
|
119
|
-
children: jsx(Tooltip, {
|
|
120
|
-
text: tooltip,
|
|
121
|
-
children: jsx(StyledItem, {
|
|
122
|
-
type: "button",
|
|
123
|
-
ref: ref,
|
|
124
|
-
role: "menuitem",
|
|
125
|
-
disabled: disabled,
|
|
126
|
-
onClick: onClick,
|
|
127
|
-
borderless: borderless,
|
|
128
|
-
sentiment: sentiment,
|
|
129
|
-
className: className,
|
|
130
|
-
"data-testid": dataTestId,
|
|
131
|
-
"data-active": active,
|
|
132
|
-
children: children
|
|
133
|
-
})
|
|
134
|
-
})
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
var Item$1 = Item;
|
|
138
|
-
|
|
139
|
-
export { Item$1 as default };
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { forwardRef, useState, useRef, useId, isValidElement, useImperativeHandle, cloneElement } from 'react';
|
|
3
|
-
import { Popup } from '../Popup/index.js';
|
|
4
|
-
import { Stack } from '../Stack/index.js';
|
|
5
|
-
import { Group } from './Group.js';
|
|
6
|
-
import Item from './Item.js';
|
|
7
|
-
import { jsx } from '@emotion/react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
const SIZES = {
|
|
10
|
-
small: '180px',
|
|
11
|
-
medium: '280px',
|
|
12
|
-
large: '380px'
|
|
13
|
-
};
|
|
14
|
-
const StyledPopup = /*#__PURE__*/_styled(Popup, {
|
|
15
|
-
shouldForwardProp: prop => !['size'].includes(prop),
|
|
16
|
-
target: "e1jn11gg1"
|
|
17
|
-
})("background-color:", ({
|
|
18
|
-
theme
|
|
19
|
-
}) => theme.colors.neutral.background, ";box-shadow:", ({
|
|
20
|
-
theme
|
|
21
|
-
}) => theme.shadows.menu, ";padding:0;&[data-has-arrow='true']{&::after{border-color:", ({
|
|
22
|
-
theme
|
|
23
|
-
}) => theme.colors.neutral.background, " transparent transparent transparent;}}width:", ({
|
|
24
|
-
size
|
|
25
|
-
}) => SIZES[size], ";max-width:none;padding:", ({
|
|
26
|
-
theme
|
|
27
|
-
}) => `${theme.space['0.25']} 0`, ";");
|
|
28
|
-
const MenuList = /*#__PURE__*/_styled(Stack, {
|
|
29
|
-
target: "e1jn11gg0"
|
|
30
|
-
})("overflow-y:auto;overflow-x:hidden;&:after,&:before{border:solid transparent;border-width:9px;content:' ';height:0;width:0;position:absolute;pointer-events:none;}&:after{border-color:transparent;}&:before{border-color:transparent;}background-color:", ({
|
|
31
|
-
theme
|
|
32
|
-
}) => theme.colors.neutral.backgroundWeakElevated, ";color:", ({
|
|
33
|
-
theme
|
|
34
|
-
}) => theme.colors.neutral.text, ";border-radius:", ({
|
|
35
|
-
theme
|
|
36
|
-
}) => theme.radii.default, ";position:relative;");
|
|
37
|
-
const FwdMenu = /*#__PURE__*/forwardRef(({
|
|
38
|
-
id,
|
|
39
|
-
ariaLabel = 'Menu',
|
|
40
|
-
children,
|
|
41
|
-
disclosure,
|
|
42
|
-
hasArrow = false,
|
|
43
|
-
placement = 'bottom',
|
|
44
|
-
visible = false,
|
|
45
|
-
className,
|
|
46
|
-
'data-testid': dataTestId,
|
|
47
|
-
maxHeight,
|
|
48
|
-
maxWidth,
|
|
49
|
-
portalTarget,
|
|
50
|
-
size = 'small',
|
|
51
|
-
triggerMethod = 'click'
|
|
52
|
-
}, ref) => {
|
|
53
|
-
const [isVisible, setIsVisible] = useState(visible);
|
|
54
|
-
const popupRef = useRef(null);
|
|
55
|
-
const disclosureRef = useRef(null);
|
|
56
|
-
const tempId = useId();
|
|
57
|
-
const finalId = `menu-${id ?? tempId}`;
|
|
58
|
-
|
|
59
|
-
// if you need dialog inside your component, use function, otherwise component is fine
|
|
60
|
-
const target = /*#__PURE__*/isValidElement(disclosure) ? disclosure : disclosure({
|
|
61
|
-
visible: isVisible
|
|
62
|
-
});
|
|
63
|
-
const innerRef = useRef(target);
|
|
64
|
-
useImperativeHandle(ref, () => innerRef.current);
|
|
65
|
-
const finalDisclosure = /*#__PURE__*/cloneElement(target, {
|
|
66
|
-
onClick: event => {
|
|
67
|
-
target.props.onClick?.(event);
|
|
68
|
-
setIsVisible(!isVisible);
|
|
69
|
-
},
|
|
70
|
-
'aria-haspopup': 'dialog',
|
|
71
|
-
'aria-expanded': isVisible,
|
|
72
|
-
// @ts-expect-error not sure how to fix this
|
|
73
|
-
ref: disclosureRef
|
|
74
|
-
});
|
|
75
|
-
return jsx(StyledPopup, {
|
|
76
|
-
debounceDelay: triggerMethod === 'hover' ? 250 : 0,
|
|
77
|
-
hideOnClickOutside: true,
|
|
78
|
-
"aria-label": ariaLabel,
|
|
79
|
-
className: className,
|
|
80
|
-
visible: triggerMethod === 'click' ? isVisible : undefined,
|
|
81
|
-
placement: placement,
|
|
82
|
-
hasArrow: hasArrow,
|
|
83
|
-
"data-has-arrow": hasArrow,
|
|
84
|
-
role: "dialog",
|
|
85
|
-
id: finalId,
|
|
86
|
-
ref: popupRef,
|
|
87
|
-
onClose: () => setIsVisible(false),
|
|
88
|
-
tabIndex: -1,
|
|
89
|
-
maxHeight: maxHeight ?? '480px',
|
|
90
|
-
maxWidth: maxWidth,
|
|
91
|
-
size: size,
|
|
92
|
-
text: jsx(MenuList, {
|
|
93
|
-
"data-testid": dataTestId,
|
|
94
|
-
className: className,
|
|
95
|
-
role: "menu",
|
|
96
|
-
children: typeof children === 'function' ? children({
|
|
97
|
-
toggle: () => setIsVisible(!isVisible)
|
|
98
|
-
}) : children
|
|
99
|
-
}),
|
|
100
|
-
portalTarget: portalTarget,
|
|
101
|
-
children: finalDisclosure
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* A menu is a widget that offers a list of choices to the user, such as a set of actions or functions.
|
|
107
|
-
* A menu is usually opened, or made visible, by activating a menu button, choosing an item in a menu that opens a
|
|
108
|
-
* sub menu, or by invoking a command, such as `Shift + F10` on Windows, that opens a context specific menu.
|
|
109
|
-
* When a user activates a choice in a menu, the menu usually closes unless the choice opened a submenu.
|
|
110
|
-
*/
|
|
111
|
-
const MenuV2 = /*#__PURE__*/Object.assign(FwdMenu, {
|
|
112
|
-
Item,
|
|
113
|
-
Group
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
export { MenuV2 };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import _styled from '@emotion/styled/base';
|
|
2
|
-
import { Text } from '../Text/index.js';
|
|
3
|
-
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const StyledStrength = /*#__PURE__*/_styled(Text, {
|
|
6
|
-
shouldForwardProp: prop => !['color'].includes(prop),
|
|
7
|
-
target: "e157fc5l2"
|
|
8
|
-
})("float:right;vertical-align:top;color:", ({
|
|
9
|
-
strength
|
|
10
|
-
}) => strength.color, ";");
|
|
11
|
-
const StyledWrapper = /*#__PURE__*/_styled("div", {
|
|
12
|
-
target: "e157fc5l1"
|
|
13
|
-
})("background-color:", ({
|
|
14
|
-
theme
|
|
15
|
-
}) => theme.colors.neutral.backgroundDisabled, ";border-radius:", ({
|
|
16
|
-
theme
|
|
17
|
-
}) => theme.radii.default, ";height:", ({
|
|
18
|
-
theme
|
|
19
|
-
}) => theme.space['1'], ";margin-top:", ({
|
|
20
|
-
theme
|
|
21
|
-
}) => theme.space['1'], ";margin-bottom:", ({
|
|
22
|
-
theme
|
|
23
|
-
}) => theme.space['2'], ";");
|
|
24
|
-
const StyledMeter = /*#__PURE__*/_styled("div", {
|
|
25
|
-
target: "e157fc5l0"
|
|
26
|
-
})("border-radius:", ({
|
|
27
|
-
theme
|
|
28
|
-
}) => theme.radii.default, ";height:100%;transition:all 0.5s;");
|
|
29
|
-
/**
|
|
30
|
-
* Show strength of a password based on different criteria.
|
|
31
|
-
*/
|
|
32
|
-
const Meter = ({
|
|
33
|
-
strength,
|
|
34
|
-
title,
|
|
35
|
-
value,
|
|
36
|
-
className,
|
|
37
|
-
'data-testid': dataTestId,
|
|
38
|
-
id
|
|
39
|
-
}) => {
|
|
40
|
-
const toValue = (value + 1) / strength.length * 100;
|
|
41
|
-
const width = `${toValue}%`;
|
|
42
|
-
const backgroundColor = strength[value]?.color ?? strength[0].color;
|
|
43
|
-
const text = strength[value]?.text ?? strength[0].text;
|
|
44
|
-
return jsxs("div", {
|
|
45
|
-
"aria-live": "polite",
|
|
46
|
-
"aria-valuemax": strength.length ?? 0,
|
|
47
|
-
"aria-valuemin": 0,
|
|
48
|
-
"aria-valuenow": value,
|
|
49
|
-
className: className,
|
|
50
|
-
"data-testid": dataTestId,
|
|
51
|
-
id: id,
|
|
52
|
-
role: "meter",
|
|
53
|
-
title: title,
|
|
54
|
-
"aria-labelledby": "meter-label",
|
|
55
|
-
children: [jsxs(Text, {
|
|
56
|
-
id: "meter-label",
|
|
57
|
-
variant: "bodySmallStrong",
|
|
58
|
-
as: "p",
|
|
59
|
-
children: [title, jsx(StyledStrength, {
|
|
60
|
-
as: "span",
|
|
61
|
-
variant: "bodySmallStrong",
|
|
62
|
-
strength: strength[value],
|
|
63
|
-
children: text
|
|
64
|
-
})]
|
|
65
|
-
}), jsx(StyledWrapper, {
|
|
66
|
-
children: jsx(StyledMeter, {
|
|
67
|
-
style: {
|
|
68
|
-
backgroundColor,
|
|
69
|
-
width
|
|
70
|
-
}
|
|
71
|
-
})
|
|
72
|
-
})]
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export { Meter };
|