@ultraviolet/ui 3.0.0-beta.8 → 3.0.0
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/README.md +66 -30
- package/dist/components/ActionBar/index.d.ts +3 -2
- package/dist/components/ActionBar/index.js +20 -4
- package/dist/components/ActionBar/styles.css.js +0 -1
- package/dist/components/Alert/index.d.ts +4 -2
- package/dist/components/Alert/index.js +100 -21
- package/dist/components/Alert/styles.css.d.ts +10 -1
- package/dist/components/Alert/styles.css.js +8 -5
- package/dist/components/Avatar/constants.d.ts +5 -5
- package/dist/components/Avatar/constants.js +1 -1
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Avatar/index.js +48 -36
- package/dist/components/Avatar/styles.css.d.ts +24 -24
- package/dist/components/Avatar/types.d.ts +2 -1
- package/dist/components/Badge/index.d.ts +3 -2
- package/dist/components/Badge/index.js +21 -9
- package/dist/components/Banner/index.d.ts +3 -2
- package/dist/components/Banner/index.js +90 -31
- package/dist/components/Banner/styles.css.d.ts +1 -1
- package/dist/components/BarChart/Tooltip.d.ts +3 -3
- package/dist/components/BarChart/Tooltip.js +27 -43
- package/dist/components/BarChart/index.d.ts +4 -3
- package/dist/components/BarChart/index.js +55 -33
- package/dist/components/BarChart/styles.css.d.ts +3 -0
- package/dist/components/BarChart/styles.css.js +9 -0
- package/dist/components/BarStack/index.d.ts +3 -2
- package/dist/components/BarStack/index.js +67 -36
- package/dist/components/BarStack/styles.css.d.ts +1 -0
- package/dist/components/BarStack/styles.css.js +6 -4
- package/dist/components/Breadcrumbs/components/Item.d.ts +3 -2
- package/dist/components/Breadcrumbs/components/Item.js +62 -41
- package/dist/components/Breadcrumbs/components/styles.css.d.ts +13 -0
- package/dist/components/Breadcrumbs/components/styles.css.js +18 -0
- package/dist/components/Breadcrumbs/index.d.ts +2 -1
- package/dist/components/Breadcrumbs/index.js +14 -19
- package/dist/components/Breadcrumbs/styles.css.d.ts +1 -0
- package/dist/components/Breadcrumbs/styles.css.js +5 -0
- package/dist/components/Bullet/constants.d.ts +10 -0
- package/dist/components/Bullet/index.d.ts +7 -15
- package/dist/components/Bullet/index.js +15 -75
- package/dist/components/Bullet/styles.css.d.ts +23 -0
- package/dist/components/Bullet/styles.css.js +6 -0
- package/dist/components/Button/constants.d.ts +1 -0
- package/dist/components/Button/constants.js +0 -1
- package/dist/components/Button/index.d.ts +5 -7
- package/dist/components/Button/index.js +123 -71
- package/dist/components/Card/index.d.ts +2 -1
- package/dist/components/Card/index.js +81 -52
- package/dist/components/Card/styles.css.d.ts +2 -0
- package/dist/components/Card/styles.css.js +7 -0
- package/dist/components/Carousel/index.d.ts +5 -4
- package/dist/components/Carousel/index.js +76 -79
- package/dist/components/Carousel/styles.css.d.ts +6 -0
- package/dist/components/Carousel/styles.css.js +15 -0
- package/dist/components/Checkbox/index.d.ts +1 -21
- package/dist/components/Checkbox/index.js +142 -241
- package/dist/components/Checkbox/styles.css.d.ts +7 -0
- package/dist/components/Checkbox/styles.css.js +17 -0
- package/dist/components/CheckboxGroup/index.d.ts +4 -4
- package/dist/components/CheckboxGroup/index.js +82 -56
- package/dist/components/CheckboxGroup/styles.css.d.ts +2 -0
- package/dist/components/CheckboxGroup/styles.css.js +7 -0
- package/dist/components/Chip/ChipIcon.d.ts +1 -1
- package/dist/components/Chip/ChipIcon.js +46 -12
- package/dist/components/Chip/index.d.ts +5 -4
- package/dist/components/Chip/index.js +38 -12
- package/dist/components/CopyButton/index.d.ts +3 -1
- package/dist/components/CopyButton/index.js +25 -9
- package/dist/components/DateInput/components/CalendarContent.d.ts +1 -1
- package/dist/components/DateInput/components/CalendarContent.js +62 -43
- package/dist/components/DateInput/components/CalendarDaily.d.ts +1 -1
- package/dist/components/DateInput/components/CalendarDaily.js +106 -101
- package/dist/components/DateInput/components/CalendarMonthly.d.ts +1 -1
- package/dist/components/DateInput/components/CalendarMonthly.js +63 -60
- package/dist/components/DateInput/components/Popup.d.ts +1 -1
- package/dist/components/DateInput/components/Popup.js +30 -18
- package/dist/components/DateInput/components/styles.css.d.ts +4 -0
- package/dist/components/DateInput/components/styles.css.js +12 -0
- package/dist/components/DateInput/helpers.d.ts +0 -2
- package/dist/components/DateInput/helpers.js +10 -11
- package/dist/components/DateInput/helpersLocale.js +3 -9
- package/dist/components/DateInput/index.d.ts +3 -2
- package/dist/components/DateInput/index.js +197 -83
- package/dist/components/DateInput/styles.css.d.ts +8 -0
- package/dist/components/DateInput/styles.css.js +8 -0
- package/dist/components/Dialog/Context.js +3 -1
- package/dist/components/Dialog/components/Button.d.ts +2 -2
- package/dist/components/Dialog/components/Button.js +14 -3
- package/dist/components/Dialog/components/Buttons.d.ts +1 -1
- package/dist/components/Dialog/components/Buttons.js +1 -1
- package/dist/components/Dialog/components/CancelButton.d.ts +3 -2
- package/dist/components/Dialog/components/CancelButton.js +14 -3
- package/dist/components/Dialog/components/Stack.d.ts +3 -2
- package/dist/components/Dialog/components/Stack.js +2 -4
- package/dist/components/Dialog/components/Text.d.ts +3 -1
- package/dist/components/Dialog/components/Text.js +2 -4
- package/dist/components/Dialog/constants.d.ts +1 -1
- package/dist/components/Dialog/index.d.ts +19 -14
- package/dist/components/Dialog/index.js +46 -30
- package/dist/components/Dialog/styles.css.d.ts +2 -0
- package/dist/components/Dialog/styles.css.js +7 -0
- package/dist/components/Drawer/index.d.ts +12 -19
- package/dist/components/Drawer/index.js +57 -102
- package/dist/components/Drawer/styles.css.d.ts +12 -0
- package/dist/components/Drawer/styles.css.js +17 -0
- package/dist/components/EmptyState/index.d.ts +4 -8
- package/dist/components/EmptyState/index.js +66 -84
- package/dist/components/EmptyState/styles.css.d.ts +29 -0
- package/dist/components/EmptyState/styles.css.js +10 -0
- package/dist/components/Expandable/index.d.ts +4 -9
- package/dist/components/Expandable/index.js +60 -26
- package/dist/components/Expandable/styles.css.d.ts +2 -0
- package/dist/components/Expandable/styles.css.js +7 -0
- package/dist/components/ExpandableCard/components/Title.d.ts +2 -2
- package/dist/components/ExpandableCard/components/Title.js +14 -3
- package/dist/components/ExpandableCard/constants.d.ts +1 -0
- package/dist/components/ExpandableCard/index.d.ts +4 -3
- package/dist/components/ExpandableCard/index.js +199 -179
- package/dist/components/ExpandableCard/styles.css.d.ts +7 -0
- package/dist/components/ExpandableCard/styles.css.js +17 -0
- package/dist/components/GlobalAlert/GlobalAlertLink.d.ts +1 -1
- package/dist/components/GlobalAlert/GlobalAlertLink.js +24 -7
- package/dist/components/GlobalAlert/index.d.ts +4 -3
- package/dist/components/GlobalAlert/index.js +54 -38
- package/dist/components/GlobalAlert/styles.css.d.ts +2 -0
- package/dist/components/GlobalAlert/styles.css.js +7 -0
- package/dist/components/InfiniteScroll/index.d.ts +3 -2
- package/dist/components/InfiniteScroll/index.js +42 -33
- package/dist/components/Key/constants.d.ts +8 -0
- package/dist/components/Key/constants.js +11 -0
- package/dist/components/Key/index.d.ts +3 -9
- package/dist/components/Key/index.js +33 -58
- package/dist/components/Key/styles.css.d.ts +29 -0
- package/dist/components/Key/styles.css.js +6 -0
- package/dist/components/Label/index.d.ts +3 -2
- package/dist/components/Label/index.js +88 -27
- package/dist/components/Label/styles.css.d.ts +1 -0
- package/dist/components/Label/styles.css.js +5 -0
- package/dist/components/LineChart/CustomLegend.d.ts +1 -1
- package/dist/components/LineChart/CustomLegend.js +55 -95
- package/dist/components/LineChart/Tooltip.d.ts +1 -1
- package/dist/components/LineChart/Tooltip.js +33 -38
- package/dist/components/LineChart/helpers.js +15 -14
- package/dist/components/LineChart/index.d.ts +3 -2
- package/dist/components/LineChart/index.js +58 -40
- package/dist/components/LineChart/styles.css.d.ts +12 -0
- package/dist/components/LineChart/styles.css.js +27 -0
- package/dist/components/Link/constants.d.ts +6 -0
- package/dist/components/Link/index.d.ts +4 -7
- package/dist/components/Link/index.js +76 -158
- package/dist/components/Link/styles.css.d.ts +78 -0
- package/dist/components/Link/styles.css.js +14 -0
- package/dist/components/List/Cell.d.ts +2 -1
- package/dist/components/List/Cell.js +28 -18
- package/dist/components/List/ColumnProvider.d.ts +14 -0
- package/dist/components/List/ColumnProvider.js +34 -0
- package/dist/components/List/HeaderCell.d.ts +2 -2
- package/dist/components/List/HeaderCell.js +41 -56
- package/dist/components/List/HeaderRow.d.ts +1 -1
- package/dist/components/List/HeaderRow.js +17 -34
- package/dist/components/List/ListContext.d.ts +1 -1
- package/dist/components/List/ListContext.js +128 -78
- package/dist/components/List/Row.d.ts +0 -16
- package/dist/components/List/Row.js +171 -253
- package/dist/components/List/SelectBar.d.ts +1 -1
- package/dist/components/List/SelectBar.js +20 -10
- package/dist/components/List/SkeletonRows.d.ts +1 -1
- package/dist/components/List/SkeletonRows.js +28 -45
- package/dist/components/List/index.d.ts +6 -4
- package/dist/components/List/index.js +62 -49
- package/dist/components/List/styles.css.d.ts +24 -0
- package/dist/components/List/styles.css.js +35 -0
- package/dist/components/List/variables.css.d.ts +7 -0
- package/dist/components/List/variables.css.js +16 -0
- package/dist/components/Loader/constants.d.ts +8 -0
- package/dist/components/Loader/constants.js +11 -0
- package/dist/components/Loader/index.d.ts +4 -9
- package/dist/components/Loader/index.js +53 -46
- package/dist/components/Loader/styles.css.d.ts +1 -0
- package/dist/components/Loader/styles.css.js +3 -1
- package/dist/components/Menu/MenuContent.d.ts +3 -2
- package/dist/components/Menu/MenuContent.js +218 -219
- package/dist/components/Menu/MenuProvider.d.ts +1 -1
- package/dist/components/Menu/MenuProvider.js +26 -13
- package/dist/components/Menu/components/Group.d.ts +3 -2
- package/dist/components/Menu/components/Group.js +15 -13
- package/dist/components/Menu/components/Item.d.ts +4 -3
- package/dist/components/Menu/components/Item.js +146 -159
- package/dist/components/Menu/helpers.js +3 -1
- package/dist/components/Menu/index.d.ts +8 -5
- package/dist/components/Menu/index.js +6 -12
- package/dist/components/Menu/styles.css.d.ts +47 -0
- package/dist/components/Menu/styles.css.js +24 -0
- package/dist/components/Menu/types.d.ts +3 -3
- package/dist/components/Meter/index.d.ts +3 -1
- package/dist/components/Meter/index.js +44 -12
- package/dist/components/Modal/ModalContent.d.ts +3 -2
- package/dist/components/Modal/ModalContent.js +44 -23
- package/dist/components/Modal/ModalProvider.d.ts +1 -1
- package/dist/components/Modal/ModalProvider.js +14 -11
- package/dist/components/Modal/components/Dialog.d.ts +2 -14
- package/dist/components/Modal/components/Dialog.js +96 -110
- package/dist/components/Modal/constants.d.ts +42 -2
- package/dist/components/Modal/index.d.ts +3 -2
- package/dist/components/Modal/index.js +62 -4
- package/dist/components/Modal/styles.css.d.ts +78 -0
- package/dist/components/Modal/styles.css.js +21 -0
- package/dist/components/Modal/types.d.ts +2 -1
- package/dist/components/Notice/index.d.ts +3 -2
- package/dist/components/Notice/index.js +26 -6
- package/dist/components/Notification/Notification.d.ts +10 -0
- package/dist/components/Notification/Notification.js +33 -0
- package/dist/components/Notification/NotificationContainer.d.ts +30 -0
- package/dist/components/Notification/NotificationContainer.js +33 -0
- package/dist/components/Notification/index.d.ts +2 -36
- package/dist/components/Notification/styles.css.d.ts +1 -0
- package/dist/components/Notification/styles.css.js +5 -0
- package/dist/components/NumberInput/constant.d.ts +5 -0
- package/dist/components/NumberInput/index.d.ts +2 -6
- package/dist/components/NumberInput/index.js +241 -246
- package/dist/components/NumberInput/styles.css.d.ts +109 -0
- package/dist/components/NumberInput/styles.css.js +14 -0
- package/dist/components/Pagination/PaginationButtons.d.ts +1 -1
- package/dist/components/Pagination/PaginationButtons.js +76 -46
- package/dist/components/Pagination/PerPage.d.ts +1 -1
- package/dist/components/Pagination/PerPage.js +32 -32
- package/dist/components/Pagination/getPageNumbers.js +12 -13
- package/dist/components/Pagination/index.d.ts +3 -1
- package/dist/components/Pagination/index.js +29 -5
- package/dist/components/Pagination/styles.css.d.ts +3 -0
- package/dist/components/Pagination/styles.css.js +9 -0
- package/dist/components/PasswordCheck/index.d.ts +3 -1
- package/dist/components/PasswordCheck/index.js +30 -15
- package/dist/components/PasswordCheck/styles.css.d.ts +1 -0
- package/dist/components/PasswordCheck/styles.css.js +5 -0
- package/dist/components/PieChart/Legends.d.ts +2 -2
- package/dist/components/PieChart/Legends.js +57 -127
- package/dist/components/PieChart/Tooltip.d.ts +2 -2
- package/dist/components/PieChart/Tooltip.js +6 -37
- package/dist/components/PieChart/index.d.ts +3 -2
- package/dist/components/PieChart/index.js +86 -63
- package/dist/components/PieChart/styles.css.d.ts +49 -0
- package/dist/components/PieChart/styles.css.js +36 -0
- package/dist/components/Popover/index.d.ts +2 -1
- package/dist/components/Popover/index.js +104 -45
- package/dist/components/Popup/helpers.d.ts +5 -1
- package/dist/components/Popup/helpers.js +57 -39
- package/dist/components/Popup/index.d.ts +4 -2
- package/dist/components/Popup/index.js +373 -243
- package/dist/components/Popup/styles.css.js +0 -1
- package/dist/components/Popup/variables.css.js +1 -0
- package/dist/components/ProgressBar/constants.d.ts +1 -0
- package/dist/components/ProgressBar/index.d.ts +5 -4
- package/dist/components/ProgressBar/index.js +79 -92
- package/dist/components/ProgressBar/styles.css.d.ts +4 -0
- package/dist/components/ProgressBar/styles.css.js +11 -0
- package/dist/components/ProgressBar/variables.css.d.ts +1 -0
- package/dist/components/ProgressBar/variables.css.js +5 -0
- package/dist/components/Radio/index.d.ts +1 -31
- package/dist/components/Radio/index.js +91 -161
- package/dist/components/Radio/styles.css.d.ts +9 -0
- package/dist/components/Radio/styles.css.js +21 -0
- package/dist/components/RadioGroup/index.d.ts +2 -2
- package/dist/components/RadioGroup/index.js +78 -39
- package/dist/components/RadioGroup/styles.css.d.ts +1 -0
- package/dist/components/RadioGroup/styles.css.js +5 -0
- package/dist/components/Row/index.d.ts +2 -1
- package/dist/components/Row/index.js +40 -25
- package/dist/components/Row/styles.css.d.ts +56 -45
- package/dist/components/Row/styles.css.js +2 -2
- package/dist/components/Row/variables.css.js +1 -0
- package/dist/components/SearchInput/KeyGroup.d.ts +1 -1
- package/dist/components/SearchInput/KeyGroup.js +3 -23
- package/dist/components/SearchInput/index.js +234 -199
- package/dist/components/SearchInput/styles.css.d.ts +3 -0
- package/dist/components/SearchInput/styles.css.js +10 -0
- package/dist/components/SelectInput/SelectInputProvider.d.ts +1 -1
- package/dist/components/SelectInput/SelectInputProvider.js +91 -55
- package/dist/components/SelectInput/{Dropdown.d.ts → components/Dropdown.d.ts} +2 -2
- package/dist/components/SelectInput/components/Dropdown.js +682 -0
- package/dist/components/SelectInput/{DropdownOption.d.ts → components/DropdownOption.d.ts} +2 -2
- package/dist/components/SelectInput/components/DropdownOption.js +196 -0
- package/dist/components/SelectInput/components/SearchBarDropdown.d.ts +9 -0
- package/dist/components/SelectInput/components/SearchBarDropdown.js +146 -0
- package/dist/components/SelectInput/{SelectBar.d.ts → components/SelectBar.d.ts} +2 -13
- package/dist/components/SelectInput/components/SelectBar.js +392 -0
- package/dist/components/SelectInput/components/dropdown.css.d.ts +35 -0
- package/dist/components/SelectInput/components/dropdown.css.js +34 -0
- package/dist/components/SelectInput/components/selectBar.css.d.ts +108 -0
- package/dist/components/SelectInput/components/selectBar.css.js +22 -0
- package/dist/components/SelectInput/index.d.ts +2 -2
- package/dist/components/SelectInput/index.js +107 -38
- package/dist/components/SelectInput/styles.css.d.ts +2 -0
- package/dist/components/SelectInput/styles.css.js +7 -0
- package/dist/components/SelectableCard/index.d.ts +2 -1
- package/dist/components/SelectableCard/index.js +206 -275
- package/dist/components/SelectableCard/styles.css.d.ts +26 -0
- package/dist/components/SelectableCard/styles.css.js +21 -0
- package/dist/components/SelectableCard/variables.css.d.ts +3 -0
- package/dist/components/SelectableCard/variables.css.js +8 -0
- package/dist/components/SelectableCardGroup/index.d.ts +2 -2
- package/dist/components/SelectableCardGroup/index.js +69 -42
- package/dist/components/SelectableCardGroup/styles.css.d.ts +1 -0
- package/dist/components/SelectableCardGroup/styles.css.js +5 -0
- package/dist/components/SelectableCardOptionGroup/Provider.js +3 -1
- package/dist/components/SelectableCardOptionGroup/components/Image.d.ts +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Image.js +13 -25
- package/dist/components/SelectableCardOptionGroup/components/Option.d.ts +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Option.js +99 -81
- package/dist/components/SelectableCardOptionGroup/index.d.ts +4 -4
- package/dist/components/SelectableCardOptionGroup/index.js +57 -36
- package/dist/components/SelectableCardOptionGroup/styles.css.d.ts +8 -0
- package/dist/components/SelectableCardOptionGroup/styles.css.js +21 -0
- package/dist/components/Separator/index.d.ts +3 -2
- package/dist/components/Separator/index.js +44 -26
- package/dist/components/Skeleton/Block.d.ts +1 -1
- package/dist/components/Skeleton/Block.js +3 -29
- package/dist/components/Skeleton/Blocks.d.ts +1 -1
- package/dist/components/Skeleton/Blocks.js +16 -30
- package/dist/components/Skeleton/BoxWithIcon.d.ts +1 -1
- package/dist/components/Skeleton/BoxWithIcon.js +16 -28
- package/dist/components/Skeleton/Donut.d.ts +1 -1
- package/dist/components/Skeleton/Donut.js +13 -44
- package/dist/components/Skeleton/IconSkeleton.d.ts +1 -4
- package/dist/components/Skeleton/IconSkeleton.js +3 -19
- package/dist/components/Skeleton/Line.d.ts +1 -4
- package/dist/components/Skeleton/Line.js +12 -13
- package/dist/components/Skeleton/List.d.ts +1 -1
- package/dist/components/Skeleton/List.js +4 -46
- package/dist/components/Skeleton/Slider.d.ts +1 -1
- package/dist/components/Skeleton/Slider.js +13 -37
- package/dist/components/Skeleton/Square.d.ts +1 -4
- package/dist/components/Skeleton/Square.js +3 -9
- package/dist/components/Skeleton/index.d.ts +11 -15
- package/dist/components/Skeleton/index.js +19 -48
- package/dist/components/Skeleton/styles.css.d.ts +2 -0
- package/dist/components/Skeleton/styles.css.js +7 -0
- package/dist/components/Skeleton/stylesVariants.css.d.ts +22 -0
- package/dist/components/Skeleton/stylesVariants.css.js +47 -0
- package/dist/components/Slider/components/DoubleSlider.d.ts +1 -1
- package/dist/components/Slider/components/DoubleSlider.js +197 -144
- package/dist/components/Slider/components/Options.d.ts +1 -13
- package/dist/components/Slider/components/Options.js +46 -49
- package/dist/components/Slider/components/SingleSlider.d.ts +1 -1
- package/dist/components/Slider/components/SingleSlider.js +138 -112
- package/dist/components/Slider/index.d.ts +1 -1
- package/dist/components/Slider/index.js +85 -13
- package/dist/components/Slider/styles.css.d.ts +171 -0
- package/dist/components/Slider/styles.css.js +36 -0
- package/dist/components/Slider/types.d.ts +1 -1
- package/dist/components/Snippet/index.d.ts +3 -2
- package/dist/components/Snippet/index.js +110 -157
- package/dist/components/Snippet/styles.css.d.ts +48 -0
- package/dist/components/Snippet/styles.css.js +26 -0
- package/dist/components/Stack/index.d.ts +6 -5
- package/dist/components/Stack/index.js +38 -34
- package/dist/components/Stack/styles.css.d.ts +51 -51
- package/dist/components/Stack/styles.css.js +2 -2
- package/dist/components/Stack/types.d.ts +8 -0
- package/dist/components/Stack/variables.css.js +1 -0
- package/dist/components/Status/index.d.ts +3 -1
- package/dist/components/Status/index.js +15 -12
- package/dist/components/StepList/index.d.ts +4 -3
- package/dist/components/StepList/index.js +32 -10
- package/dist/components/Stepper/Step.d.ts +3 -2
- package/dist/components/Stepper/Step.js +82 -114
- package/dist/components/Stepper/StepperProvider.d.ts +1 -1
- package/dist/components/Stepper/StepperProvider.js +13 -10
- package/dist/components/Stepper/index.d.ts +6 -4
- package/dist/components/Stepper/index.js +49 -81
- package/dist/components/Stepper/styles.css.d.ts +122 -0
- package/dist/components/Stepper/styles.css.js +20 -0
- package/dist/components/SwitchButton/FocusOverlay.d.ts +1 -1
- package/dist/components/SwitchButton/FocusOverlay.js +12 -20
- package/dist/components/SwitchButton/Option.d.ts +3 -2
- package/dist/components/SwitchButton/Option.js +23 -45
- package/dist/components/SwitchButton/index.d.ts +6 -4
- package/dist/components/SwitchButton/index.js +98 -73
- package/dist/components/SwitchButton/styles.css.d.ts +7 -0
- package/dist/components/SwitchButton/styles.css.js +9 -0
- package/dist/components/Table/Body.d.ts +1 -1
- package/dist/components/Table/Body.js +2 -4
- package/dist/components/Table/Cell.d.ts +3 -2
- package/dist/components/Table/Cell.js +28 -21
- package/dist/components/Table/Header.d.ts +1 -1
- package/dist/components/Table/Header.js +3 -13
- package/dist/components/Table/HeaderCell.d.ts +1 -1
- package/dist/components/Table/HeaderCell.js +51 -57
- package/dist/components/Table/HeaderRow.d.ts +1 -1
- package/dist/components/Table/HeaderRow.js +22 -13
- package/dist/components/Table/Row.d.ts +3 -2
- package/dist/components/Table/Row.js +75 -95
- package/dist/components/Table/SelectBar.d.ts +1 -1
- package/dist/components/Table/SelectBar.js +20 -10
- package/dist/components/Table/SkeletonRows.d.ts +1 -1
- package/dist/components/Table/SkeletonRows.js +18 -46
- package/dist/components/Table/TableContext.d.ts +1 -1
- package/dist/components/Table/TableContext.js +22 -13
- package/dist/components/Table/constants.js +0 -2
- package/dist/components/Table/index.d.ts +13 -9
- package/dist/components/Table/index.js +67 -68
- package/dist/components/Table/styles.css.d.ts +68 -0
- package/dist/components/Table/styles.css.js +29 -0
- package/dist/components/Table/variables.css.d.ts +6 -0
- package/dist/components/Table/variables.css.js +14 -0
- package/dist/components/Tabs/Tab.d.ts +2 -5
- package/dist/components/Tabs/Tab.js +80 -112
- package/dist/components/Tabs/TabMenu.js +40 -55
- package/dist/components/Tabs/TabMenuItem.d.ts +3 -19
- package/dist/components/Tabs/TabMenuItem.js +21 -20
- package/dist/components/Tabs/TabsContext.js +3 -1
- package/dist/components/Tabs/index.d.ts +6 -6
- package/dist/components/Tabs/index.js +36 -46
- package/dist/components/Tabs/styles.css.d.ts +9 -0
- package/dist/components/Tabs/styles.css.js +21 -0
- package/dist/components/Tag/index.d.ts +5 -4
- package/dist/components/Tag/index.js +40 -93
- package/dist/components/Tag/styles.css.d.ts +34 -0
- package/dist/components/Tag/styles.css.js +10 -0
- package/dist/components/TagInput/index.d.ts +4 -7
- package/dist/components/TagInput/index.js +138 -150
- package/dist/components/TagInput/styles.css.d.ts +24 -0
- package/dist/components/TagInput/styles.css.js +12 -0
- package/dist/components/TagList/constant.d.ts +1 -0
- package/dist/components/TagList/constant.js +5 -0
- package/dist/components/TagList/index.d.ts +3 -2
- package/dist/components/TagList/index.js +138 -106
- package/dist/components/TagList/styles.css.d.ts +11 -0
- package/dist/components/TagList/styles.css.js +14 -0
- package/dist/components/Text/constants.d.ts +9 -0
- package/dist/components/Text/index.d.ts +2 -5
- package/dist/components/Text/index.js +21 -17
- package/dist/components/Text/style.css.js +0 -1
- package/dist/components/Text/variables.css.js +1 -0
- package/dist/components/TextArea/index.d.ts +2 -1
- package/dist/components/TextArea/index.js +182 -166
- package/dist/components/TextArea/styles.css.d.ts +15 -0
- package/dist/components/TextArea/styles.css.js +12 -0
- package/dist/components/TextInput/constants.d.ts +5 -0
- package/dist/components/TextInput/index.d.ts +3 -51
- package/dist/components/TextInput/index.js +287 -209
- package/dist/components/TextInput/styles.css.d.ts +8 -0
- package/dist/components/TextInput/styles.css.js +17 -0
- package/dist/components/TimeInput/constants.js +1 -11
- package/dist/components/TimeInput/index.d.ts +3 -9
- package/dist/components/TimeInput/index.js +211 -199
- package/dist/components/TimeInput/styles.css.d.ts +82 -0
- package/dist/components/TimeInput/styles.css.js +10 -0
- package/dist/components/Toaster/Toaster.d.ts +7 -0
- package/dist/components/Toaster/Toaster.js +25 -0
- package/dist/components/Toaster/ToasterContainer.d.ts +38 -0
- package/dist/components/Toaster/ToasterContainer.js +37 -0
- package/dist/components/Toaster/components/Button.d.ts +1 -1
- package/dist/components/Toaster/components/CloseButton.d.ts +8 -0
- package/dist/components/Toaster/components/CloseButton.js +22 -0
- package/dist/components/Toaster/components/Content.d.ts +6 -0
- package/dist/components/Toaster/components/Content.js +8 -0
- package/dist/components/Toaster/components/Link.d.ts +1 -1
- package/dist/components/Toaster/constants.d.ts +1 -0
- package/dist/components/Toaster/constants.js +4 -0
- package/dist/components/Toaster/index.d.ts +4 -45
- package/dist/components/Toaster/styles.css.d.ts +3 -0
- package/dist/components/Toaster/styles.css.js +7 -0
- package/dist/components/Toggle/index.d.ts +1 -19
- package/dist/components/Toggle/index.js +101 -135
- package/dist/components/Toggle/styles.css.d.ts +108 -0
- package/dist/components/Toggle/styles.css.js +10 -0
- package/dist/components/ToggleGroup/index.d.ts +4 -4
- package/dist/components/ToggleGroup/index.js +66 -41
- package/dist/components/ToggleGroup/styles.css.d.ts +1 -0
- package/dist/components/ToggleGroup/styles.css.js +5 -0
- package/dist/components/Tooltip/index.d.ts +2 -1
- package/dist/components/Tooltip/index.js +42 -18
- package/dist/components/TreeMapChart/Tooltip.d.ts +6 -0
- package/dist/components/TreeMapChart/Tooltip.js +15 -0
- package/dist/components/TreeMapChart/index.d.ts +18 -0
- package/dist/components/TreeMapChart/index.js +74 -0
- package/dist/components/TreeMapChart/styles.css.d.ts +2 -0
- package/dist/components/TreeMapChart/styles.css.js +7 -0
- package/dist/components/TreeMapChart/types.d.ts +7 -0
- package/dist/components/UnitInput/index.d.ts +3 -2
- package/dist/components/UnitInput/index.js +130 -139
- package/dist/components/UnitInput/styles.css.d.ts +7 -0
- package/dist/components/UnitInput/styles.css.js +18 -0
- package/dist/components/VerificationCode/constants.d.ts +13 -0
- package/dist/components/VerificationCode/index.d.ts +3 -4
- package/dist/components/VerificationCode/index.js +84 -105
- package/dist/components/VerificationCode/styles.css.d.ts +3 -0
- package/dist/components/VerificationCode/styles.css.js +9 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/helpers/legend.d.ts +2 -2
- package/dist/helpers/legend.js +5 -5
- package/dist/helpers/nivoTheme.d.ts +1 -1
- package/dist/helpers/treeMap.d.ts +91 -0
- package/dist/helpers/treeMap.js +42 -0
- package/dist/hooks/useIsOverflowing.js +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +40 -10
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/theme/ThemeProvider.js +7 -32
- package/dist/theme/index.d.ts +2 -3
- package/dist/theme/index.js +5 -14
- package/dist/ui.css +1 -1
- package/dist/utils/animations/animations.d.ts +27 -0
- package/dist/utils/animations/animations.js +271 -0
- package/dist/utils/animations/animationsVE.css.d.ts +27 -0
- package/dist/utils/animations/animationsVE.css.js +57 -0
- package/dist/utils/ids.js +1 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/responsive/index.d.ts +0 -1
- package/dist/utils/responsive/style.css.d.ts +3 -0
- package/package.json +12 -14
- package/dist/components/ActionBar/index.cjs +0 -18
- package/dist/components/ActionBar/styles.css.cjs +0 -11
- package/dist/components/Alert/index.cjs +0 -54
- package/dist/components/Alert/styles.css.cjs +0 -14
- package/dist/components/Avatar/constants.cjs +0 -19
- package/dist/components/Avatar/index.cjs +0 -64
- package/dist/components/Avatar/styles.css.cjs +0 -16
- package/dist/components/Avatar/variables.css.cjs +0 -9
- package/dist/components/Badge/constant.cjs +0 -8
- package/dist/components/Badge/index.cjs +0 -26
- package/dist/components/Badge/styles.css.cjs +0 -6
- package/dist/components/Banner/assets/default-image-small.svg.cjs +0 -3
- package/dist/components/Banner/assets/default-image.svg.cjs +0 -3
- package/dist/components/Banner/index.cjs +0 -74
- package/dist/components/Banner/styles.css.cjs +0 -10
- package/dist/components/BarChart/Tooltip.cjs +0 -53
- package/dist/components/BarChart/index.cjs +0 -58
- package/dist/components/BarStack/index.cjs +0 -49
- package/dist/components/BarStack/styles.css.cjs +0 -9
- package/dist/components/BarStack/variables.css.cjs +0 -25
- package/dist/components/BarStack/variables.css.d.ts +0 -11
- package/dist/components/BarStack/variables.css.js +0 -25
- package/dist/components/Breadcrumbs/components/Item.cjs +0 -58
- package/dist/components/Breadcrumbs/constants.cjs +0 -4
- package/dist/components/Breadcrumbs/constants.js +0 -4
- package/dist/components/Breadcrumbs/index.cjs +0 -30
- package/dist/components/Bullet/index.cjs +0 -89
- package/dist/components/Button/constants.cjs +0 -7
- package/dist/components/Button/index.cjs +0 -82
- package/dist/components/Button/styles.css.cjs +0 -6
- package/dist/components/Card/index.cjs +0 -61
- package/dist/components/Carousel/index.cjs +0 -125
- package/dist/components/Checkbox/index.cjs +0 -255
- package/dist/components/CheckboxGroup/index.cjs +0 -107
- package/dist/components/Chip/ChipContext.cjs +0 -6
- package/dist/components/Chip/ChipIcon.cjs +0 -52
- package/dist/components/Chip/index.cjs +0 -59
- package/dist/components/Chip/styles.css.cjs +0 -7
- package/dist/components/CopyButton/index.cjs +0 -34
- package/dist/components/DateInput/Context.cjs +0 -23
- package/dist/components/DateInput/components/CalendarContent.cjs +0 -79
- package/dist/components/DateInput/components/CalendarDaily.cjs +0 -209
- package/dist/components/DateInput/components/CalendarMonthly.cjs +0 -127
- package/dist/components/DateInput/components/Popup.cjs +0 -41
- package/dist/components/DateInput/constants.cjs +0 -6
- package/dist/components/DateInput/helpers.cjs +0 -77
- package/dist/components/DateInput/helpersLocale.cjs +0 -64
- package/dist/components/DateInput/index.cjs +0 -211
- package/dist/components/Dialog/Context.cjs +0 -14
- package/dist/components/Dialog/components/Button.cjs +0 -16
- package/dist/components/Dialog/components/Buttons.cjs +0 -13
- package/dist/components/Dialog/components/CancelButton.cjs +0 -11
- package/dist/components/Dialog/components/Stack.cjs +0 -9
- package/dist/components/Dialog/components/Text.cjs +0 -9
- package/dist/components/Dialog/index.cjs +0 -77
- package/dist/components/Drawer/index.cjs +0 -141
- package/dist/components/EmptyState/index.cjs +0 -104
- package/dist/components/Expandable/index.cjs +0 -113
- package/dist/components/ExpandableCard/components/Title.cjs +0 -12
- package/dist/components/ExpandableCard/index.cjs +0 -197
- package/dist/components/GlobalAlert/GlobalAlertLink.cjs +0 -24
- package/dist/components/GlobalAlert/index.cjs +0 -65
- package/dist/components/InfiniteScroll/index.cjs +0 -89
- package/dist/components/Key/index.cjs +0 -85
- package/dist/components/Label/index.cjs +0 -54
- package/dist/components/LineChart/CustomLegend.cjs +0 -130
- package/dist/components/LineChart/Tooltip.cjs +0 -48
- package/dist/components/LineChart/helpers.cjs +0 -57
- package/dist/components/LineChart/index.cjs +0 -90
- package/dist/components/Link/index.cjs +0 -170
- package/dist/components/List/Cell.cjs +0 -25
- package/dist/components/List/HeaderCell.cjs +0 -83
- package/dist/components/List/HeaderRow.cjs +0 -47
- package/dist/components/List/ListContext.cjs +0 -210
- package/dist/components/List/Row.cjs +0 -267
- package/dist/components/List/SelectBar.cjs +0 -28
- package/dist/components/List/SkeletonRows.cjs +0 -60
- package/dist/components/List/constants.cjs +0 -5
- package/dist/components/List/constants.js +0 -5
- package/dist/components/List/index.cjs +0 -76
- package/dist/components/Loader/index.cjs +0 -64
- package/dist/components/Loader/styles.css.cjs +0 -7
- package/dist/components/Menu/MenuContent.cjs +0 -240
- package/dist/components/Menu/MenuProvider.cjs +0 -44
- package/dist/components/Menu/components/Group.cjs +0 -34
- package/dist/components/Menu/components/Item.cjs +0 -174
- package/dist/components/Menu/constants.cjs +0 -7
- package/dist/components/Menu/constants.js +0 -7
- package/dist/components/Menu/helpers.cjs +0 -48
- package/dist/components/Menu/index.cjs +0 -20
- package/dist/components/Meter/index.cjs +0 -33
- package/dist/components/Meter/styles.css.cjs +0 -11
- package/dist/components/Modal/ModalContent.cjs +0 -50
- package/dist/components/Modal/ModalProvider.cjs +0 -41
- package/dist/components/Modal/components/Dialog.cjs +0 -208
- package/dist/components/Modal/components/Disclosure.cjs +0 -42
- package/dist/components/Modal/constants.cjs +0 -53
- package/dist/components/Modal/constants.js +0 -53
- package/dist/components/Modal/index.cjs +0 -57
- package/dist/components/Notice/index.cjs +0 -16
- package/dist/components/Notice/styles.css.cjs +0 -5
- package/dist/components/Notification/index.cjs +0 -51
- package/dist/components/Notification/index.js +0 -51
- package/dist/components/NumberInput/index.cjs +0 -261
- package/dist/components/Pagination/PaginationButtons.cjs +0 -86
- package/dist/components/Pagination/PerPage.cjs +0 -66
- package/dist/components/Pagination/getPageNumbers.cjs +0 -23
- package/dist/components/Pagination/index.cjs +0 -42
- package/dist/components/PasswordCheck/index.cjs +0 -27
- package/dist/components/PieChart/Legends.cjs +0 -140
- package/dist/components/PieChart/Tooltip.cjs +0 -49
- package/dist/components/PieChart/index.cjs +0 -90
- package/dist/components/Popover/index.cjs +0 -66
- package/dist/components/Popover/styles.css.cjs +0 -8
- package/dist/components/Popup/helpers.cjs +0 -260
- package/dist/components/Popup/index.cjs +0 -279
- package/dist/components/Popup/styles.css.cjs +0 -13
- package/dist/components/Popup/variables.css.cjs +0 -18
- package/dist/components/ProgressBar/index.cjs +0 -115
- package/dist/components/Radio/index.cjs +0 -173
- package/dist/components/RadioGroup/index.cjs +0 -90
- package/dist/components/Row/index.cjs +0 -42
- package/dist/components/Row/styles.css.cjs +0 -17
- package/dist/components/Row/variables.css.cjs +0 -6
- package/dist/components/SearchInput/KeyGroup.cjs +0 -31
- package/dist/components/SearchInput/index.cjs +0 -221
- package/dist/components/SelectInput/Dropdown.cjs +0 -488
- package/dist/components/SelectInput/Dropdown.js +0 -486
- package/dist/components/SelectInput/DropdownOption.cjs +0 -91
- package/dist/components/SelectInput/DropdownOption.js +0 -89
- package/dist/components/SelectInput/SearchBarDropdown.cjs +0 -133
- package/dist/components/SelectInput/SearchBarDropdown.d.ts +0 -11
- package/dist/components/SelectInput/SearchBarDropdown.js +0 -131
- package/dist/components/SelectInput/SelectBar.cjs +0 -366
- package/dist/components/SelectInput/SelectBar.js +0 -364
- package/dist/components/SelectInput/SelectInputProvider.cjs +0 -203
- package/dist/components/SelectInput/findOptionInOptions.cjs +0 -12
- package/dist/components/SelectInput/index.cjs +0 -93
- package/dist/components/SelectInput/types.cjs +0 -9
- package/dist/components/SelectableCard/index.cjs +0 -306
- package/dist/components/SelectableCardGroup/index.cjs +0 -92
- package/dist/components/SelectableCardOptionGroup/Provider.cjs +0 -24
- package/dist/components/SelectableCardOptionGroup/components/Image.cjs +0 -35
- package/dist/components/SelectableCardOptionGroup/components/Option.cjs +0 -121
- package/dist/components/SelectableCardOptionGroup/index.cjs +0 -68
- package/dist/components/Separator/index.cjs +0 -39
- package/dist/components/Separator/styles.css.cjs +0 -10
- package/dist/components/Skeleton/Block.cjs +0 -41
- package/dist/components/Skeleton/Blocks.cjs +0 -41
- package/dist/components/Skeleton/BoxWithIcon.cjs +0 -39
- package/dist/components/Skeleton/Donut.cjs +0 -57
- package/dist/components/Skeleton/IconSkeleton.cjs +0 -25
- package/dist/components/Skeleton/Line.cjs +0 -21
- package/dist/components/Skeleton/List.cjs +0 -56
- package/dist/components/Skeleton/Slider.cjs +0 -43
- package/dist/components/Skeleton/Square.cjs +0 -15
- package/dist/components/Skeleton/index.cjs +0 -81
- package/dist/components/Slider/components/DoubleSlider.cjs +0 -288
- package/dist/components/Slider/components/Options.cjs +0 -56
- package/dist/components/Slider/components/SingleSlider.cjs +0 -209
- package/dist/components/Slider/constant.cjs +0 -4
- package/dist/components/Slider/index.cjs +0 -59
- package/dist/components/Slider/styles.cjs +0 -63
- package/dist/components/Slider/styles.d.ts +0 -62
- package/dist/components/Slider/styles.js +0 -61
- package/dist/components/Snippet/index.cjs +0 -197
- package/dist/components/Stack/index.cjs +0 -77
- package/dist/components/Stack/styles.css.cjs +0 -19
- package/dist/components/Stack/variables.css.cjs +0 -10
- package/dist/components/Status/index.cjs +0 -24
- package/dist/components/Status/styles.css.cjs +0 -11
- package/dist/components/StepList/index.cjs +0 -31
- package/dist/components/StepList/styles.css.cjs +0 -10
- package/dist/components/Stepper/Step.cjs +0 -141
- package/dist/components/Stepper/StepperProvider.cjs +0 -41
- package/dist/components/Stepper/index.cjs +0 -103
- package/dist/components/SwitchButton/FocusOverlay.cjs +0 -32
- package/dist/components/SwitchButton/Option.cjs +0 -82
- package/dist/components/SwitchButton/SwitchButtonContext.cjs +0 -13
- package/dist/components/SwitchButton/constant.cjs +0 -4
- package/dist/components/SwitchButton/index.cjs +0 -134
- package/dist/components/Table/Body.cjs +0 -8
- package/dist/components/Table/Cell.cjs +0 -33
- package/dist/components/Table/Header.cjs +0 -19
- package/dist/components/Table/HeaderCell.cjs +0 -87
- package/dist/components/Table/HeaderRow.cjs +0 -28
- package/dist/components/Table/Row.cjs +0 -166
- package/dist/components/Table/SelectBar.cjs +0 -28
- package/dist/components/Table/SkeletonRows.cjs +0 -55
- package/dist/components/Table/TableContext.cjs +0 -43
- package/dist/components/Table/constants.cjs +0 -6
- package/dist/components/Table/index.cjs +0 -100
- package/dist/components/Tabs/Tab.cjs +0 -124
- package/dist/components/Tabs/TabMenu.cjs +0 -65
- package/dist/components/Tabs/TabMenuItem.cjs +0 -37
- package/dist/components/Tabs/TabsContext.cjs +0 -7
- package/dist/components/Tabs/index.cjs +0 -106
- package/dist/components/Tag/index.cjs +0 -150
- package/dist/components/TagInput/index.cjs +0 -256
- package/dist/components/TagList/index.cjs +0 -206
- package/dist/components/Text/constant.d.ts +0 -6
- package/dist/components/Text/index.cjs +0 -53
- package/dist/components/Text/style.css.cjs +0 -7
- package/dist/components/Text/variables.css.cjs +0 -6
- package/dist/components/TextArea/index.cjs +0 -184
- package/dist/components/TextInput/index.cjs +0 -223
- package/dist/components/TimeInput/constants.cjs +0 -19
- package/dist/components/TimeInput/helpers.cjs +0 -66
- package/dist/components/TimeInput/index.cjs +0 -352
- package/dist/components/Toaster/components/Button.cjs +0 -15
- package/dist/components/Toaster/components/Button.js +0 -12
- package/dist/components/Toaster/index.cjs +0 -66
- package/dist/components/Toaster/index.js +0 -64
- package/dist/components/Toggle/index.cjs +0 -147
- package/dist/components/ToggleGroup/index.cjs +0 -88
- package/dist/components/Tooltip/index.cjs +0 -25
- package/dist/components/Tooltip/styles.css.cjs +0 -5
- package/dist/components/UnitInput/index.cjs +0 -203
- package/dist/components/VerificationCode/index.cjs +0 -230
- package/dist/helpers/isClientSide.cjs +0 -4
- package/dist/helpers/legend.cjs +0 -14
- package/dist/helpers/nivoTheme.cjs +0 -22
- package/dist/helpers/recursivelyGetChildrenString.cjs +0 -17
- package/dist/hooks/useIsOverflowing.cjs +0 -23
- package/dist/index.cjs +0 -204
- package/dist/theme/ThemeProvider.cjs +0 -43
- package/dist/theme/index.cjs +0 -34
- package/dist/utils/animationVanillaExtract.css.d.ts +0 -2
- package/dist/utils/animations.cjs +0 -276
- package/dist/utils/animations.d.ts +0 -162
- package/dist/utils/animations.js +0 -276
- package/dist/utils/capitalize.cjs +0 -3
- package/dist/utils/capitalize.js +0 -4
- package/dist/utils/ids.cjs +0 -8
- package/dist/utils/normalize.cjs +0 -35
- package/dist/utils/responsive/Breakpoint.cjs +0 -15
- package/dist/utils/responsive/Breakpoint.d.ts +0 -9
- package/dist/utils/responsive/Breakpoint.js +0 -14
- package/dist/utils/responsive/utilities.cjs +0 -17
- package/dist/utils/searchAlgorithm.cjs +0 -40
- package/dist/utils/searchAlgorithm.d.ts +0 -12
- package/dist/utils/searchAlgorithm.js +0 -40
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const errorText: string;
|
|
2
|
+
export declare const innerCheckbox: string;
|
|
3
|
+
export declare const checkMixedMark: string;
|
|
4
|
+
export declare const icon: string;
|
|
5
|
+
export declare const label: string;
|
|
6
|
+
export declare const checkboxInput: string;
|
|
7
|
+
export declare const checkboxContainer: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
var errorText = "uv_9pjq8o0";
|
|
3
|
+
var innerCheckbox = "uv_9pjq8o1";
|
|
4
|
+
var checkMixedMark = "uv_9pjq8o2";
|
|
5
|
+
var icon = "uv_9pjq8o3";
|
|
6
|
+
var label = "uv_9pjq8o4";
|
|
7
|
+
var checkboxInput = "uv_9pjq8o5";
|
|
8
|
+
var checkboxContainer = "uv_9pjq8o6";
|
|
9
|
+
export {
|
|
10
|
+
checkMixedMark,
|
|
11
|
+
checkboxContainer,
|
|
12
|
+
checkboxInput,
|
|
13
|
+
errorText,
|
|
14
|
+
icon,
|
|
15
|
+
innerCheckbox,
|
|
16
|
+
label
|
|
17
|
+
};
|
|
@@ -3,7 +3,7 @@ import { Checkbox } from '../Checkbox';
|
|
|
3
3
|
type CheckboxGroupCheckboxProps = Omit<ComponentProps<typeof Checkbox>, 'onChange' | 'checked'> & {
|
|
4
4
|
value: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const CheckboxGroupCheckbox: ({ onFocus, onBlur, disabled, error, name, value, children, helper, className, autoFocus, "data-testid": dataTestId, required, tooltip, }: CheckboxGroupCheckboxProps) => import("
|
|
6
|
+
export declare const CheckboxGroupCheckbox: ({ onFocus, onBlur, disabled, error, name, value, children, helper, className, autoFocus, "data-testid": dataTestId, required, tooltip, style, }: CheckboxGroupCheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
type CheckboxGroupProps = {
|
|
8
8
|
legend?: string;
|
|
9
9
|
legendDescription?: ReactNode;
|
|
@@ -15,12 +15,12 @@ type CheckboxGroupProps = {
|
|
|
15
15
|
children: ReactNode;
|
|
16
16
|
required?: boolean;
|
|
17
17
|
description?: ReactNode;
|
|
18
|
-
} & Required<Pick<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'name'>> & Pick<InputHTMLAttributes<HTMLInputElement>, 'required'>;
|
|
18
|
+
} & Required<Pick<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'name'>> & Pick<InputHTMLAttributes<HTMLInputElement>, 'required' | 'style'>;
|
|
19
19
|
/**
|
|
20
20
|
* CheckboxGroup is a component that groups a set of checkboxes together with a legend and helper/error text.
|
|
21
21
|
*/
|
|
22
22
|
export declare const CheckboxGroup: {
|
|
23
|
-
({ legend, legendDescription, value, className, helper, error, direction, children, onChange, name, description, required, }: CheckboxGroupProps): import("
|
|
24
|
-
Checkbox: ({ onFocus, onBlur, disabled, error, name, value, children, helper, className, autoFocus, "data-testid": dataTestId, required, tooltip, }: CheckboxGroupCheckboxProps) => import("
|
|
23
|
+
({ legend, legendDescription, value, className, helper, error, direction, children, onChange, name, description, required, style, }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Checkbox: ({ onFocus, onBlur, disabled, error, name, value, children, helper, className, autoFocus, "data-testid": dataTestId, required, tooltip, style, }: CheckboxGroupCheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
};
|
|
26
26
|
export {};
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx, jsxs } from "
|
|
3
|
-
import _styled from "@emotion/styled/base";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { useMemo, createContext, useContext } from "react";
|
|
5
4
|
import { Checkbox } from "../Checkbox/index.js";
|
|
6
5
|
import { Label } from "../Label/index.js";
|
|
7
6
|
import { Stack } from "../Stack/index.js";
|
|
8
7
|
import { Text } from "../Text/index.js";
|
|
9
|
-
|
|
10
|
-
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).";
|
|
11
|
-
}
|
|
8
|
+
import { fieldset, checkbox } from "./styles.css.js";
|
|
12
9
|
const CheckboxGroupContext = createContext(void 0);
|
|
13
|
-
const StyledCheckbox = /* @__PURE__ */ _styled(Checkbox, process.env.NODE_ENV === "production" ? {
|
|
14
|
-
target: "e1k5uyng1"
|
|
15
|
-
} : {
|
|
16
|
-
target: "e1k5uyng1",
|
|
17
|
-
label: "StyledCheckbox"
|
|
18
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
19
|
-
name: "6vgcqf",
|
|
20
|
-
styles: "label{width:fit-content;}"
|
|
21
|
-
} : {
|
|
22
|
-
name: "6vgcqf",
|
|
23
|
-
styles: "label{width:fit-content;}/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3VsdHJhdmlvbGV0L3VsdHJhdmlvbGV0L3BhY2thZ2VzL3VpL3NyYy9jb21wb25lbnRzL0NoZWNrYm94R3JvdXAvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCdUMiLCJmaWxlIjoiL2hvbWUvcnVubmVyL3dvcmsvdWx0cmF2aW9sZXQvdWx0cmF2aW9sZXQvcGFja2FnZXMvdWkvc3JjL2NvbXBvbmVudHMvQ2hlY2tib3hHcm91cC9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIGNsaWVudCdcblxuaW1wb3J0IH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4gICAgICAgICAgICAgIDxTdGFjayBnYXA9ezAuNX0+XG4gICAgICAgICAgICAgICAge2xlZ2VuZCA/IChcbiAgICAgICAgICAgICAgICAgIDxMYWJlbFxuICAgICAgICAgICAgICAgICAgICBhcz1cImxlZ2VuZFwiXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsRGVzY3JpcHRpb249e2xlZ2VuZERlc2NyaXB0aW9ufVxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZD17cmVxdWlyZWR9XG4gICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIHtsZWdlbmR9XG4gICAgICAgICAgICAgICAgICA8L0xhYmVsPlxuICAgICAgICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICAgICAgICAgIHtkZXNjcmlwdGlvbiA/IChcbiAgICAgICAgICAgICAgICAgIDxUZXh0XG4gICAgICAgICAgICAgICAgICAgIGFzPXt0eXBlb2YgZGVzY3JpcHRpb24gPT09ICdzdHJpbmcnID8gJ3AnIDogJ2Rpdid9XG4gICAgICAgICAgICAgICAgICAgIHByb21pbmVuY2U9XCJ3ZWFrXCJcbiAgICAgICAgICAgICAgICAgICAgc2VudGltZW50PVwibmV1dHJhbFwiXG4gICAgICAgICAgICAgICAgICAgIHZhcmlhbnQ9XCJib2R5U21hbGxcIlxuICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICB7ZGVzY3JpcHRpb259XG4gICAgICAgICAgICAgICAgICA8L1RleHQ+XG4gICAgICAgICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgICAgICAgIDwvU3RhY2s+XG4gICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgIDxTdGFjayBkaXJlY3Rpb249e2RpcmVjdGlvbn0gZ2FwPXtkaXJlY3Rpb24gPT09ICdjb2x1bW4nID8gMSA6IDJ9PlxuICAgICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgICA8L1N0YWNrPlxuICAgICAgICAgIDwvU3RhY2s+XG4gICAgICAgIDwvRmllbGRTZXQ+XG4gICAgICAgIHtoZWxwZXIgPyAoXG4gICAgICAgICAgPFRleHRcbiAgICAgICAgICAgIGFzPVwic3BhblwiXG4gICAgICAgICAgICBwcm9taW5lbmNlPVwid2Vha1wiXG4gICAgICAgICAgICBzZW50aW1lbnQ9XCJuZXV0cmFsXCJcbiAgICAgICAgICAgIHZhcmlhbnQ9XCJjYXB0aW9uXCJcbiAgICAgICAgICA+XG4gICAgICAgICAgICB7aGVscGVyfVxuICAgICAgICAgIDwvVGV4dD5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICAgIHtlcnJvciA/IChcbiAgICAgICAgICA8VGV4dCBhcz1cInNwYW5cIiBzZW50aW1lbnQ9XCJkYW5nZXJcIiB2YXJpYW50PVwiY2FwdGlvblwiPlxuICAgICAgICAgICAge2Vycm9yfVxuICAgICAgICAgIDwvVGV4dD5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICA8L1N0YWNrPlxuICAgIDwvQ2hlY2tib3hHcm91cENvbnRleHQuUHJvdmlkZXI+XG4gIClcbn1cblxuQ2hlY2tib3hHcm91cC5DaGVja2JveCA9IENoZWNrYm94R3JvdXBDaGVja2JveFxuIl19 */",
|
|
24
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
|
-
});
|
|
26
10
|
const CheckboxGroupCheckbox = ({
|
|
27
11
|
onFocus,
|
|
28
12
|
onBlur,
|
|
@@ -36,35 +20,40 @@ const CheckboxGroupCheckbox = ({
|
|
|
36
20
|
autoFocus,
|
|
37
21
|
"data-testid": dataTestId,
|
|
38
22
|
required,
|
|
39
|
-
tooltip
|
|
23
|
+
tooltip,
|
|
24
|
+
style
|
|
40
25
|
}) => {
|
|
41
26
|
const context = useContext(CheckboxGroupContext);
|
|
42
27
|
if (!context) {
|
|
43
|
-
throw new Error(
|
|
28
|
+
throw new Error(
|
|
29
|
+
"CheckboxGroup.Checkbox can only be used inside a CheckboxGroup"
|
|
30
|
+
);
|
|
44
31
|
}
|
|
45
|
-
const {
|
|
46
|
-
groupName,
|
|
47
|
-
onChange,
|
|
48
|
-
groupValues,
|
|
49
|
-
error: errorContext
|
|
50
|
-
} = context;
|
|
32
|
+
const { groupName, onChange, groupValues, error: errorContext } = context;
|
|
51
33
|
const checkboxName = `${groupName}.${name ?? ""}`;
|
|
52
34
|
const checkboxValue = `${value}`;
|
|
53
|
-
return /* @__PURE__ */ jsx(
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
Checkbox,
|
|
37
|
+
{
|
|
38
|
+
autoFocus,
|
|
39
|
+
checked: groupValues?.includes(checkboxValue),
|
|
40
|
+
className: `${className ? `${className} ` : ""}${checkbox}`,
|
|
41
|
+
"data-testid": dataTestId,
|
|
42
|
+
disabled,
|
|
43
|
+
error: error || errorContext,
|
|
44
|
+
helper,
|
|
45
|
+
name: checkboxName,
|
|
46
|
+
onBlur,
|
|
47
|
+
onChange,
|
|
48
|
+
onFocus,
|
|
49
|
+
required,
|
|
50
|
+
style,
|
|
51
|
+
tooltip,
|
|
52
|
+
value: checkboxValue,
|
|
53
|
+
children
|
|
54
|
+
}
|
|
55
|
+
);
|
|
54
56
|
};
|
|
55
|
-
const FieldSet = /* @__PURE__ */ _styled("fieldset", process.env.NODE_ENV === "production" ? {
|
|
56
|
-
target: "e1k5uyng0"
|
|
57
|
-
} : {
|
|
58
|
-
target: "e1k5uyng0",
|
|
59
|
-
label: "FieldSet"
|
|
60
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
61
|
-
name: "7o2an9",
|
|
62
|
-
styles: "border:none;padding:0;margin:0"
|
|
63
|
-
} : {
|
|
64
|
-
name: "7o2an9",
|
|
65
|
-
styles: "border:none;padding:0;margin:0/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3VsdHJhdmlvbGV0L3VsdHJhdmlvbGV0L3BhY2thZ2VzL3VpL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WQsIGVycm9yXSxcbiAgKVxuXG4gIHJldHVybiAoXG4gICAgPENoZWNrYm94R3JvdXBDb250ZXh0LlByb3ZpZGVyIHZhbHVlPXtjb250ZXh0VmFsdWV9PlxuICAgICAgPFN0YWNrIGdhcD17MX0+XG4gICAgICAgIDxGaWVsZFNldCBjbGFzc05hbWU9e2NsYXNzTmFtZX0+XG4gICAgICAgICAgPFN0YWNrIGdhcD17MS41fT5cbiAgICAgICAgICAgIHtsZWdlbmQgfHwgZGVzY3JpcHRpb24gPyAoXG4gICAgICAgICAgICAgIDxTdGFjayBnYXA9ezAuNX0+XG4gICAgICAgICAgICAgICAge2xlZ2VuZCA/IChcbiAgICAgICAgICAgICAgICAgIDxMYWJlbFxuICAgICAgICAgICAgICAgICAgICBhcz1cImxlZ2VuZFwiXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsRGVzY3JpcHRpb249e2xlZ2VuZERlc2NyaXB0aW9ufVxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZD17cmVxdWlyZWR9XG4gICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIHtsZWdlbmR9XG4gICAgICAgICAgICAgICAgICA8L0xhYmVsPlxuICAgICAgICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICAgICAgICAgIHtkZXNjcmlwdGlvbiA/IChcbiAgICAgICAgICAgICAgICAgIDxUZXh0XG4gICAgICAgICAgICAgICAgICAgIGFzPXt0eXBlb2YgZGVzY3JpcHRpb24gPT09ICdzdHJpbmcnID8gJ3AnIDogJ2Rpdid9XG4gICAgICAgICAgICAgICAgICAgIHByb21pbmVuY2U9XCJ3ZWFrXCJcbiAgICAgICAgICAgICAgICAgICAgc2VudGltZW50PVwibmV1dHJhbFwiXG4gICAgICAgICAgICAgICAgICAgIHZhcmlhbnQ9XCJib2R5U21hbGxcIlxuICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICB7ZGVzY3JpcHRpb259XG4gICAgICAgICAgICAgICAgICA8L1RleHQ+XG4gICAgICAgICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgICAgICAgIDwvU3RhY2s+XG4gICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgIDxTdGFjayBkaXJlY3Rpb249e2RpcmVjdGlvbn0gZ2FwPXtkaXJlY3Rpb24gPT09ICdjb2x1bW4nID8gMSA6IDJ9PlxuICAgICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgICA8L1N0YWNrPlxuICAgICAgICAgIDwvU3RhY2s+XG4gICAgICAgIDwvRmllbGRTZXQ+XG4gICAgICAgIHtoZWxwZXIgPyAoXG4gICAgICAgICAgPFRleHRcbiAgICAgICAgICAgIGFzPVwic3BhblwiXG4gICAgICAgICAgICBwcm9taW5lbmNlPVwid2Vha1wiXG4gICAgICAgICAgICBzZW50aW1lbnQ9XCJuZXV0cmFsXCJcbiAgICAgICAgICAgIHZhcmlhbnQ9XCJjYXB0aW9uXCJcbiAgICAgICAgICA+XG4gICAgICAgICAgICB7aGVscGVyfVxuICAgICAgICAgIDwvVGV4dD5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICAgIHtlcnJvciA/IChcbiAgICAgICAgICA8VGV4dCBhcz1cInNwYW5cIiBzZW50aW1lbnQ9XCJkYW5nZXJcIiB2YXJpYW50PVwiY2FwdGlvblwiPlxuICAgICAgICAgICAge2Vycm9yfVxuICAgICAgICAgIDwvVGV4dD5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICA8L1N0YWNrPlxuICAgIDwvQ2hlY2tib3hHcm91cENvbnRleHQuUHJvdmlkZXI+XG4gIClcbn1cblxuQ2hlY2tib3hHcm91cC5DaGVja2JveCA9IENoZWNrYm94R3JvdXBDaGVja2JveFxuIl19 */",
|
|
66
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
67
|
-
});
|
|
68
57
|
const CheckboxGroup = ({
|
|
69
58
|
legend,
|
|
70
59
|
legendDescription,
|
|
@@ -77,24 +66,61 @@ const CheckboxGroup = ({
|
|
|
77
66
|
onChange,
|
|
78
67
|
name,
|
|
79
68
|
description,
|
|
80
|
-
required = false
|
|
69
|
+
required = false,
|
|
70
|
+
style
|
|
81
71
|
}) => {
|
|
82
|
-
const contextValue = useMemo(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
72
|
+
const contextValue = useMemo(
|
|
73
|
+
() => ({
|
|
74
|
+
error: !!error,
|
|
75
|
+
groupName: name,
|
|
76
|
+
groupValues: value ?? [],
|
|
77
|
+
onChange,
|
|
78
|
+
required
|
|
79
|
+
}),
|
|
80
|
+
[name, value, onChange, required, error]
|
|
81
|
+
);
|
|
89
82
|
return /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs(Stack, { gap: 1, children: [
|
|
90
|
-
/* @__PURE__ */ jsx(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
"fieldset",
|
|
85
|
+
{
|
|
86
|
+
className: `${className ? `${className} ` : ""}${fieldset}`,
|
|
87
|
+
style,
|
|
88
|
+
children: /* @__PURE__ */ jsxs(Stack, { gap: 1.5, children: [
|
|
89
|
+
legend || description ? /* @__PURE__ */ jsxs(Stack, { gap: 0.5, children: [
|
|
90
|
+
legend ? /* @__PURE__ */ jsx(
|
|
91
|
+
Label,
|
|
92
|
+
{
|
|
93
|
+
as: "legend",
|
|
94
|
+
labelDescription: legendDescription,
|
|
95
|
+
required,
|
|
96
|
+
children: legend
|
|
97
|
+
}
|
|
98
|
+
) : null,
|
|
99
|
+
description ? /* @__PURE__ */ jsx(
|
|
100
|
+
Text,
|
|
101
|
+
{
|
|
102
|
+
as: typeof description === "string" ? "p" : "div",
|
|
103
|
+
prominence: "weak",
|
|
104
|
+
sentiment: "neutral",
|
|
105
|
+
variant: "bodySmall",
|
|
106
|
+
children: description
|
|
107
|
+
}
|
|
108
|
+
) : null
|
|
109
|
+
] }) : null,
|
|
110
|
+
/* @__PURE__ */ jsx(Stack, { direction, gap: direction === "column" ? 1 : 2, children })
|
|
111
|
+
] })
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
helper ? /* @__PURE__ */ jsx(
|
|
115
|
+
Text,
|
|
116
|
+
{
|
|
117
|
+
as: "span",
|
|
118
|
+
prominence: "weak",
|
|
119
|
+
sentiment: "neutral",
|
|
120
|
+
variant: "caption",
|
|
121
|
+
children: helper
|
|
122
|
+
}
|
|
123
|
+
) : null,
|
|
98
124
|
error ? /* @__PURE__ */ jsx(Text, { as: "span", sentiment: "danger", variant: "caption", children: error }) : null
|
|
99
125
|
] }) });
|
|
100
126
|
};
|
|
@@ -9,5 +9,5 @@ type ChipIconType = {
|
|
|
9
9
|
onClick?: () => void;
|
|
10
10
|
'data-testid'?: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const ChipIcon: ({ name, onClick, "data-testid": dataTestId, }: ChipIconType) => import("
|
|
12
|
+
export declare const ChipIcon: ({ name, onClick, "data-testid": dataTestId, }: ChipIconType) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as Icon from "@ultraviolet/icons";
|
|
4
4
|
import { useContext } from "react";
|
|
5
5
|
import { ChipContext } from "./ChipContext.js";
|
|
@@ -13,21 +13,55 @@ const ChipIcon = ({
|
|
|
13
13
|
if (!context) {
|
|
14
14
|
throw new Error("Chip.Icon can only be used inside a Chip component");
|
|
15
15
|
}
|
|
16
|
-
const {
|
|
17
|
-
disabled,
|
|
18
|
-
isActive,
|
|
19
|
-
iconRef
|
|
20
|
-
} = context;
|
|
16
|
+
const { disabled, isActive, iconRef } = context;
|
|
21
17
|
const IconUsed = Icon[`${name.charAt(0).toUpperCase() + name.slice(1)}Icon`];
|
|
22
18
|
if (onClick) {
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
"button",
|
|
21
|
+
{
|
|
22
|
+
className: buttonContainer,
|
|
23
|
+
"data-active": isActive,
|
|
24
|
+
"data-disabled": disabled,
|
|
25
|
+
"data-has-onclick": !!onClick && !disabled,
|
|
26
|
+
"data-testid": dataTestId,
|
|
27
|
+
onClick: (event) => {
|
|
28
|
+
if (!disabled && onClick) {
|
|
29
|
+
event.stopPropagation();
|
|
30
|
+
onClick();
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
ref: iconRef,
|
|
34
|
+
children: /* @__PURE__ */ jsx(
|
|
35
|
+
IconUsed,
|
|
36
|
+
{
|
|
37
|
+
disabled,
|
|
38
|
+
prominence: isActive ? "stronger" : "default",
|
|
39
|
+
sentiment: "neutral",
|
|
40
|
+
size: "small"
|
|
41
|
+
}
|
|
42
|
+
)
|
|
27
43
|
}
|
|
28
|
-
|
|
44
|
+
);
|
|
29
45
|
}
|
|
30
|
-
return /* @__PURE__ */ jsx(
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
className: buttonContainer,
|
|
50
|
+
"data-active": isActive,
|
|
51
|
+
"data-disabled": disabled,
|
|
52
|
+
"data-testid": dataTestId,
|
|
53
|
+
ref: iconRef,
|
|
54
|
+
children: /* @__PURE__ */ jsx(
|
|
55
|
+
IconUsed,
|
|
56
|
+
{
|
|
57
|
+
disabled,
|
|
58
|
+
prominence: isActive ? "stronger" : "default",
|
|
59
|
+
sentiment: "neutral",
|
|
60
|
+
size: "small"
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
31
65
|
};
|
|
32
66
|
export {
|
|
33
67
|
ChipIcon
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
type ChipType = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
size?: 'medium' | 'large';
|
|
@@ -7,16 +7,17 @@ type ChipType = {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
'data-testid'?: string;
|
|
9
9
|
onClick?: (active: boolean) => void;
|
|
10
|
+
style?: CSSProperties;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
13
|
* Chip component is used to display a clickable status or a label in a small container
|
|
13
14
|
*/
|
|
14
15
|
export declare const Chip: {
|
|
15
|
-
({ children, size, disabled, active, className, "data-testid": dataTestId, onClick, }: ChipType): import("
|
|
16
|
+
({ children, size, disabled, active, className, "data-testid": dataTestId, onClick, style, }: ChipType): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
Icon: ({ name, onClick, "data-testid": dataTestId, }: {
|
|
17
|
-
name: "search" | "anchor" | "bold" | "sort" | "
|
|
18
|
+
name: "search" | "anchor" | "bold" | "filter" | "sort" | "italic" | "underline" | "drag" | "address" | "audio" | "video" | "image" | "stop" | "view" | "id" | "pen" | "download" | "cancel" | "close" | "play" | "send" | "email" | "arrowLeft" | "upload" | "addressOutline" | "addressPlay" | "adjustmentsHorizontal" | "adjustmentsHorizontalOutline" | "alertCircle" | "alertCircleOutline" | "arrowDown" | "arrowLeftBottom" | "arrowLeftDouble" | "arrowRightBottom" | "arrowRightDouble" | "arrowRight" | "arrowUp" | "attach" | "autoFix" | "autoFixOutline" | "bookOpenOutline" | "bookOpenOutlineOutline" | "boxEssentials" | "boxEssentialsOutline" | "bullhorn" | "bullhornOutline" | "burger" | "calculator" | "calculatorOutline" | "calendarRange" | "calendarRangeOutline" | "chat" | "chatOutline" | "checkCircle" | "checkCircleOutline" | "check" | "clickhouse" | "lock" | "clock" | "lockOutline" | "clockOutline" | "closeCircle" | "closeCircleOutline" | "console" | "consoleOutline" | "copyContent" | "credential" | "credentialOutline" | "creditCard" | "creditCardOutline" | "database" | "databaseOutline" | "delete" | "deleteOutline" | "detach" | "doc" | "docOutline" | "dotsHorizontal" | "dotsVertical" | "earth" | "earthOutline" | "east" | "eastShort" | "emailOutline" | "emailRemove" | "emailRemoveOutline" | "equal" | "escape" | "expand" | "expandMore" | "eye" | "eyeOff" | "eyeOffOutline" | "eyeOutline" | "filterOutline" | "folder" | "folderOutline" | "github" | "helpCircle" | "helpCircleOutline" | "idOutline" | "imageOutline" | "information" | "informationOutline" | "instagram" | "leaf" | "leafOutline" | "leftRightArrow" | "lightBulb" | "lightBulbOutline" | "linkedin" | "listBullet" | "listNumber" | "logout" | "members" | "membersOutline" | "minus" | "moon" | "moonOutline" | "mosaic" | "mosaicOutline" | "music" | "musicOutline" | "north" | "northShort" | "notification" | "notificationOutline" | "openInNew" | "organization" | "paperclip" | "partnerSpace" | "pen2" | "pen2Outline" | "pencil" | "pencilOutline" | "penOutline" | "phone" | "phoneOutline" | "pin" | "pinOutline" | "playOutline" | "plus" | "privacy" | "privacyOutline" | "profile" | "profileOutline" | "progressCheck" | "rayEndArrow" | "rayStartArrow" | "rayStartEnd" | "rayTopArrow" | "reboot" | "restore" | "revoke" | "rocket" | "rocketOutline" | "rss" | "sendOutline" | "settings" | "settingsOutline" | "sidebar" | "sidebarOutline" | "slack" | "south" | "southShort" | "sparkles" | "sparklesOutline" | "star" | "starOutline" | "stopOutline" | "sun" | "sunOutline" | "support" | "supportOutline" | "switchOrga" | "thumbsDown" | "thumbsDownOutline" | "thumbsUp" | "thumbsUpOutline" | "twitter" | "unlock" | "unlockOutline" | "unpin" | "unpinOutline" | "videoOutline" | "weatherNight" | "weatherNightOutline" | "west" | "westShort" | "youtube";
|
|
18
19
|
onClick?: () => void;
|
|
19
20
|
'data-testid'?: string;
|
|
20
|
-
}) => import("
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
};
|
|
22
23
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useRef, useMemo, useEffect } from "react";
|
|
4
4
|
import { Stack } from "../Stack/index.js";
|
|
5
5
|
import { Text } from "../Text/index.js";
|
|
@@ -13,7 +13,8 @@ const Chip = ({
|
|
|
13
13
|
active = false,
|
|
14
14
|
className,
|
|
15
15
|
"data-testid": dataTestId,
|
|
16
|
-
onClick
|
|
16
|
+
onClick,
|
|
17
|
+
style
|
|
17
18
|
}) => {
|
|
18
19
|
const [isActive, setIsActive] = useState(active);
|
|
19
20
|
const [hasTrailingIcon, setTrailingIcon] = useState(false);
|
|
@@ -28,11 +29,10 @@ const Chip = ({
|
|
|
28
29
|
}
|
|
29
30
|
return "default";
|
|
30
31
|
}, [isActive, disabled]);
|
|
31
|
-
const value = useMemo(
|
|
32
|
-
disabled,
|
|
33
|
-
iconRef
|
|
34
|
-
|
|
35
|
-
}), [isActive, disabled, iconRef]);
|
|
32
|
+
const value = useMemo(
|
|
33
|
+
() => ({ disabled, iconRef, isActive }),
|
|
34
|
+
[isActive, disabled, iconRef]
|
|
35
|
+
);
|
|
36
36
|
useEffect(() => {
|
|
37
37
|
setIsActive(active);
|
|
38
38
|
}, [active]);
|
|
@@ -46,12 +46,38 @@ const Chip = ({
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}, [children, iconRef]);
|
|
49
|
-
return /* @__PURE__ */ jsx(ChipContext.Provider, { value, children: /* @__PURE__ */ jsx(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
return /* @__PURE__ */ jsx(ChipContext.Provider, { value, children: /* @__PURE__ */ jsx(
|
|
50
|
+
Text,
|
|
51
|
+
{
|
|
52
|
+
as: "div",
|
|
53
|
+
style,
|
|
54
|
+
variant: size === "large" ? "bodySmall" : "caption",
|
|
55
|
+
children: /* @__PURE__ */ jsx(
|
|
56
|
+
Stack,
|
|
57
|
+
{
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
className: `${className ? `${className} ` : ""}${container}`,
|
|
60
|
+
"data-active": isActive,
|
|
61
|
+
"data-disabled": disabled,
|
|
62
|
+
"data-prominence": prominence,
|
|
63
|
+
"data-size": size,
|
|
64
|
+
"data-testid": dataTestId,
|
|
65
|
+
"data-trailing-icon": hasTrailingIcon,
|
|
66
|
+
direction: "row",
|
|
67
|
+
gap: 1,
|
|
68
|
+
justifyContent: "center",
|
|
69
|
+
onClick: () => {
|
|
70
|
+
if (!disabled) {
|
|
71
|
+
setIsActive(!isActive);
|
|
72
|
+
onClick?.(!isActive);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
ref: chipRef,
|
|
76
|
+
children
|
|
77
|
+
}
|
|
78
|
+
)
|
|
53
79
|
}
|
|
54
|
-
|
|
80
|
+
) });
|
|
55
81
|
};
|
|
56
82
|
Chip.Icon = ChipIcon;
|
|
57
83
|
export {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
1
2
|
type CopyButtonProps = {
|
|
2
3
|
size?: 'xsmall' | 'small' | 'medium' | 'large';
|
|
3
4
|
value: string;
|
|
@@ -9,9 +10,10 @@ type CopyButtonProps = {
|
|
|
9
10
|
'data-testid'?: string;
|
|
10
11
|
children?: string;
|
|
11
12
|
onCopy?: () => void;
|
|
13
|
+
style?: CSSProperties;
|
|
12
14
|
};
|
|
13
15
|
/**
|
|
14
16
|
* CopyButton is a button that copies a given value to the clipboard.
|
|
15
17
|
*/
|
|
16
|
-
export declare const CopyButton: ({ size, value, copyText, copiedText, sentiment, bordered, className, children, "data-testid": dataTestId, onCopy, }: CopyButtonProps) => import("
|
|
18
|
+
export declare const CopyButton: ({ size, value, copyText, copiedText, sentiment, bordered, className, children, "data-testid": dataTestId, onCopy, style, }: CopyButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs, jsx } from "
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { CheckIcon, CopyContentIcon } from "@ultraviolet/icons";
|
|
4
4
|
import useClipboard from "react-use-clipboard";
|
|
5
5
|
import { Button } from "../Button/index.js";
|
|
@@ -14,18 +14,34 @@ const CopyButton = ({
|
|
|
14
14
|
className,
|
|
15
15
|
children,
|
|
16
16
|
"data-testid": dataTestId,
|
|
17
|
-
onCopy
|
|
17
|
+
onCopy,
|
|
18
|
+
style
|
|
18
19
|
}) => {
|
|
19
20
|
const [isCopied, setCopied] = useClipboard(value, {
|
|
20
21
|
successDuration: COPY_DURATION
|
|
21
22
|
});
|
|
22
|
-
return /* @__PURE__ */ jsxs(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
Button,
|
|
25
|
+
{
|
|
26
|
+
"aria-label": "Copy",
|
|
27
|
+
className,
|
|
28
|
+
"data-testid": dataTestId,
|
|
29
|
+
onClick: () => {
|
|
30
|
+
setCopied();
|
|
31
|
+
onCopy?.();
|
|
32
|
+
},
|
|
33
|
+
sentiment,
|
|
34
|
+
size,
|
|
35
|
+
style,
|
|
36
|
+
tooltip: isCopied ? copiedText : copyText,
|
|
37
|
+
type: "button",
|
|
38
|
+
variant: !bordered ? "ghost" : "outlined",
|
|
39
|
+
children: [
|
|
40
|
+
isCopied ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CopyContentIcon, {}),
|
|
41
|
+
children
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
29
45
|
};
|
|
30
46
|
export {
|
|
31
47
|
CopyButton
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CalendarContent: () => import("
|
|
1
|
+
export declare const CalendarContent: () => import("react/jsx-runtime").JSX.Element;
|