@strapi/design-system 1.7.0-alpha.5 → 1.7.1
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 +1 -1
- package/dist/Accordion/Accordion.cjs +4 -4
- package/dist/Accordion/Accordion.js +13 -71
- package/dist/Accordion/AccordionContent.cjs +1 -1
- package/dist/Accordion/AccordionContent.js +3 -16
- package/dist/Accordion/AccordionContext.cjs +1 -1
- package/dist/Accordion/AccordionGroup.cjs +4 -4
- package/dist/Accordion/AccordionGroup.js +19 -89
- package/dist/Accordion/AccordionToggle.cjs +6 -6
- package/dist/Accordion/AccordionToggle.js +11 -101
- package/dist/Accordion/index.cjs +1 -1
- package/dist/Accordion/utils.cjs +1 -1
- package/dist/Alert/Alert.cjs +15 -15
- package/dist/Alert/Alert.js +8 -80
- package/dist/Alert/index.cjs +1 -1
- package/dist/Alert/utils.cjs +1 -1
- package/dist/Avatar/Avatar.cjs +5 -5
- package/dist/Avatar/Avatar.js +12 -56
- package/dist/Avatar/AvatarGroup.cjs +3 -3
- package/dist/Avatar/constants.cjs +1 -1
- package/dist/Avatar/index.cjs +1 -1
- package/dist/Badge/Badge.cjs +4 -4
- package/dist/Badge/Badge.js +4 -33
- package/dist/Badge/index.cjs +1 -1
- package/dist/BaseButton/BaseButton.cjs +3 -3
- package/dist/BaseButton/BaseButton.js +8 -32
- package/dist/BaseButton/index.cjs +1 -1
- package/dist/BaseCheckbox/BaseCheckbox.cjs +4 -4
- package/dist/BaseCheckbox/BaseCheckbox.js +19 -62
- package/dist/BaseCheckbox/index.cjs +1 -1
- package/dist/BaseCheckbox/utils.cjs +1 -1
- package/dist/BaseLink/BaseLink.cjs +1 -1
- package/dist/BaseLink/BaseLink.js +1 -17
- package/dist/BaseLink/index.cjs +1 -1
- package/dist/BaseRadio/BaseRadio.cjs +8 -8
- package/dist/BaseRadio/BaseRadio.js +12 -38
- package/dist/BaseRadio/RadioGroup.cjs +1 -1
- package/dist/BaseRadio/RadioGroup.js +3 -25
- package/dist/BaseRadio/context.cjs +1 -1
- package/dist/BaseRadio/index.cjs +1 -1
- package/dist/BaseRadio/utils.cjs +1 -1
- package/dist/Box/Box.cjs +1 -1
- package/dist/Box/Box.js +47 -173
- package/dist/Box/index.cjs +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.cjs +3 -3
- package/dist/Breadcrumbs/Breadcrumbs.js +10 -43
- package/dist/Breadcrumbs/index.cjs +1 -1
- package/dist/Button/Button.cjs +11 -11
- package/dist/Button/Button.js +7 -54
- package/dist/Button/constants.cjs +1 -1
- package/dist/Button/index.cjs +1 -1
- package/dist/Button/utils.cjs +1 -1
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.js +5 -25
- package/dist/Card/CardAction.cjs +2 -2
- package/dist/Card/CardAsset.cjs +4 -4
- package/dist/Card/CardAsset.js +5 -25
- package/dist/Card/CardBadge.cjs +3 -3
- package/dist/Card/CardBadge.js +2 -8
- package/dist/Card/CardBody.cjs +1 -1
- package/dist/Card/CardBody.js +1 -10
- package/dist/Card/CardCheckbox.cjs +1 -1
- package/dist/Card/CardCheckbox.js +5 -10
- package/dist/Card/CardContent.cjs +2 -2
- package/dist/Card/CardContent.js +1 -7
- package/dist/Card/CardContext.cjs +1 -1
- package/dist/Card/CardContext.js +1 -3
- package/dist/Card/CardHeader.cjs +2 -2
- package/dist/Card/CardHeader.js +2 -8
- package/dist/Card/CardTimer.cjs +1 -1
- package/dist/Card/CardTimer.js +1 -19
- package/dist/Card/CardTitle.cjs +1 -1
- package/dist/Card/CardTitle.js +3 -17
- package/dist/Card/index.cjs +1 -1
- package/dist/CarouselInput/Carousel.cjs +6 -6
- package/dist/CarouselInput/Carousel.js +51 -42
- package/dist/CarouselInput/CarouselActions.cjs +1 -1
- package/dist/CarouselInput/CarouselActions.js +8 -7
- package/dist/CarouselInput/CarouselImage.cjs +3 -3
- package/dist/CarouselInput/CarouselImage.js +13 -12
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +39 -36
- package/dist/CarouselInput/CarouselSlide.cjs +2 -2
- package/dist/CarouselInput/CarouselSlide.js +10 -9
- package/dist/CarouselInput/index.cjs +1 -1
- package/dist/Checkbox/Checkbox.cjs +3 -3
- package/dist/Checkbox/Checkbox.js +37 -32
- package/dist/Checkbox/index.cjs +1 -1
- package/dist/Combobox/Combobox.cjs +10 -9
- package/dist/Combobox/Combobox.js +53 -253
- package/dist/Combobox/ComboboxList.cjs +5 -1
- package/dist/Combobox/ComboboxList.js +6 -5
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/index.cjs +1 -1
- package/dist/DatePicker/DatePicker.cjs +5 -5
- package/dist/DatePicker/DatePicker.js +38 -56
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
- package/dist/DatePicker/DatePickerCalendar.js +20 -119
- package/dist/DatePicker/DatePickerTd.cjs +3 -3
- package/dist/DatePicker/DatePickerTd.js +13 -45
- package/dist/DatePicker/DatePickerTh.cjs +4 -4
- package/dist/DatePicker/DatePickerTh.js +9 -33
- package/dist/DatePicker/compareDates.cjs +1 -1
- package/dist/DatePicker/components.cjs +14 -8
- package/dist/DatePicker/components.js +17 -7
- package/dist/DatePicker/index.cjs +1 -1
- package/dist/DatePicker/utils/formatDate.cjs +1 -1
- package/dist/DatePicker/utils/generateWeeks.cjs +1 -1
- package/dist/DatePicker/utils/getDayOfWeek.cjs +1 -1
- package/dist/DatePicker/utils/getMonths.cjs +1 -1
- package/dist/DatePicker/utils/getYears.cjs +1 -1
- package/dist/DatePicker/utils/getYears.js +1 -1
- package/dist/DatePicker/utils/index.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +41 -92
- package/dist/DateTimePicker/index.cjs +1 -1
- package/dist/DateTimePicker/parseDate.cjs +1 -1
- package/dist/Dialog/Dialog.cjs +6 -6
- package/dist/Dialog/Dialog.js +41 -38
- package/dist/Dialog/DialogBody.cjs +2 -2
- package/dist/Dialog/DialogBody.js +19 -15
- package/dist/Dialog/DialogFooter.cjs +3 -3
- package/dist/Dialog/DialogFooter.js +10 -6
- package/dist/Dialog/index.cjs +1 -1
- package/dist/DismissibleLayer/index.cjs +1 -1
- package/dist/DismissibleLayer/index.js +3 -2
- package/dist/Divider/Divider.cjs +2 -2
- package/dist/Divider/Divider.js +11 -10
- package/dist/Divider/index.cjs +1 -1
- package/dist/EmptyStateLayout/EmptyStateLayout.cjs +3 -3
- package/dist/EmptyStateLayout/EmptyStateLayout.js +13 -8
- package/dist/EmptyStateLayout/index.cjs +1 -1
- package/dist/EmptyStateLayout/story-assets/Illo.cjs +1 -1
- package/dist/EmptyStateLayout/story-assets/Illo.js +71 -62
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.js +5 -26
- package/dist/Field/FieldAction.cjs +2 -2
- package/dist/Field/FieldAction.js +5 -20
- package/dist/Field/FieldContext.cjs +1 -1
- package/dist/Field/FieldError.cjs +1 -1
- package/dist/Field/FieldError.js +2 -12
- package/dist/Field/FieldHint.cjs +1 -1
- package/dist/Field/FieldHint.js +2 -12
- package/dist/Field/FieldInput.cjs +7 -7
- package/dist/Field/FieldInput.js +19 -86
- package/dist/Field/FieldLabel.cjs +4 -4
- package/dist/Field/FieldLabel.js +7 -32
- package/dist/Field/index.cjs +1 -1
- package/dist/Flex/Flex.cjs +3 -3
- package/dist/Flex/Flex.js +10 -25
- package/dist/Flex/index.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.js +14 -22
- package/dist/FocusTrap/index.cjs +1 -1
- package/dist/Grid/Grid.cjs +3 -3
- package/dist/Grid/Grid.js +15 -14
- package/dist/Grid/GridContext.cjs +1 -1
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.js +12 -11
- package/dist/Grid/index.cjs +1 -1
- package/dist/Icon/Icon.cjs +4 -4
- package/dist/Icon/Icon.js +6 -21
- package/dist/Icon/index.cjs +1 -1
- package/dist/IconButton/IconButton.cjs +4 -4
- package/dist/IconButton/IconButton.js +28 -81
- package/dist/IconButton/index.cjs +1 -1
- package/dist/JSONInput/JSONInput.cjs +1 -1
- package/dist/JSONInput/JSONInput.js +11 -56
- package/dist/JSONInput/JSONInputContainer.cjs +3 -3
- package/dist/JSONInput/JSONInputContainer.js +7 -14
- package/dist/JSONInput/index.cjs +1 -1
- package/dist/JSONInput/utils/decorationExtension.cjs +1 -1
- package/dist/JSONInput/utils/decorationExtension.js +3 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -1
- package/dist/KeyboardNavigable/KeyboardNavigable.js +32 -39
- package/dist/KeyboardNavigable/index.cjs +1 -1
- package/dist/Layout/ActionLayout.cjs +3 -3
- package/dist/Layout/ActionLayout.js +17 -13
- package/dist/Layout/ContentLayout.cjs +1 -1
- package/dist/Layout/ContentLayout.js +8 -7
- package/dist/Layout/GridLayout.cjs +3 -3
- package/dist/Layout/HeaderLayout.cjs +3 -2
- package/dist/Layout/HeaderLayout.js +70 -46
- package/dist/Layout/Layout.cjs +3 -3
- package/dist/Layout/Layout.js +14 -10
- package/dist/Layout/TwoColsLayout.cjs +1 -1
- package/dist/Layout/TwoColsLayout.js +12 -8
- package/dist/Layout/index.cjs +1 -1
- package/dist/Link/Link.cjs +5 -5
- package/dist/Link/Link.js +9 -53
- package/dist/Link/index.cjs +1 -1
- package/dist/LinkButton/LinkButton.cjs +7 -7
- package/dist/LinkButton/LinkButton.js +8 -51
- package/dist/LinkButton/index.cjs +1 -1
- package/dist/LiveRegions/LiveRegions.cjs +1 -1
- package/dist/LiveRegions/LiveRegions.js +1 -18
- package/dist/LiveRegions/constants.cjs +1 -1
- package/dist/LiveRegions/index.cjs +1 -1
- package/dist/LiveRegions/useNotifyAT.cjs +1 -1
- package/dist/Loader/Loader.cjs +5 -5
- package/dist/Loader/Loader.js +3 -22
- package/dist/Loader/index.cjs +1 -1
- package/dist/Main/Main.cjs +2 -2
- package/dist/Main/Main.js +7 -9
- package/dist/Main/SkipToContent.cjs +2 -2
- package/dist/Main/SkipToContent.js +10 -9
- package/dist/Main/index.cjs +1 -1
- package/dist/MainNav/MainNav.cjs +2 -2
- package/dist/MainNav/MainNav.js +16 -15
- package/dist/MainNav/MainNavContext.cjs +1 -1
- package/dist/MainNav/NavBrand.cjs +6 -6
- package/dist/MainNav/NavBrand.js +37 -21
- package/dist/MainNav/NavCondense.cjs +3 -3
- package/dist/MainNav/NavCondense.js +20 -16
- package/dist/MainNav/NavFooter.cjs +1 -1
- package/dist/MainNav/NavFooter.js +9 -8
- package/dist/MainNav/NavLink.cjs +10 -10
- package/dist/MainNav/NavLink.js +53 -43
- package/dist/MainNav/NavSection.cjs +1 -1
- package/dist/MainNav/NavSection.js +43 -33
- package/dist/MainNav/NavSections.cjs +2 -2
- package/dist/MainNav/NavSections.js +15 -14
- package/dist/MainNav/NavUser.cjs +3 -3
- package/dist/MainNav/NavUser.js +23 -20
- package/dist/MainNav/index.cjs +1 -1
- package/dist/ModalLayout/ModalBody.cjs +2 -2
- package/dist/ModalLayout/ModalBody.js +7 -6
- package/dist/ModalLayout/ModalContext.cjs +1 -1
- package/dist/ModalLayout/ModalFooter.cjs +3 -3
- package/dist/ModalLayout/ModalFooter.js +17 -13
- package/dist/ModalLayout/ModalHeader.cjs +2 -2
- package/dist/ModalLayout/ModalHeader.js +20 -16
- package/dist/ModalLayout/ModalLayout.cjs +4 -4
- package/dist/ModalLayout/ModalLayout.js +24 -23
- package/dist/ModalLayout/index.cjs +1 -1
- package/dist/NumberInput/NumberInput.cjs +6 -6
- package/dist/NumberInput/NumberInput.js +113 -106
- package/dist/NumberInput/index.cjs +1 -1
- package/dist/Pagination/Pagination.cjs +2 -2
- package/dist/Pagination/Pagination.js +16 -15
- package/dist/Pagination/PaginationContext.cjs +1 -1
- package/dist/Pagination/components.cjs +10 -10
- package/dist/Pagination/components.js +58 -47
- package/dist/Pagination/index.cjs +1 -1
- package/dist/Popover/Popover.cjs +4 -4
- package/dist/Popover/Popover.js +51 -101
- package/dist/Popover/index.cjs +1 -1
- package/dist/Portal/Portal.cjs +1 -1
- package/dist/Portal/Portal.js +7 -11
- package/dist/Portal/index.cjs +1 -1
- package/dist/ProgressBar/ProgressBar.cjs +2 -2
- package/dist/ProgressBar/ProgressBar.js +19 -18
- package/dist/ProgressBar/index.cjs +1 -1
- package/dist/Radio/Radio.cjs +2 -2
- package/dist/Radio/Radio.js +16 -12
- package/dist/Radio/index.cjs +1 -1
- package/dist/RawTable/RawCell.cjs +1 -1
- package/dist/RawTable/RawCell.js +6 -29
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.js +4 -28
- package/dist/RawTable/RawTableContext.cjs +1 -1
- package/dist/RawTable/RawTbody.cjs +1 -1
- package/dist/RawTable/RawTbody.js +3 -11
- package/dist/RawTable/RawThead.cjs +1 -1
- package/dist/RawTable/RawThead.js +3 -11
- package/dist/RawTable/RawTr.cjs +1 -1
- package/dist/RawTable/RawTr.js +3 -13
- package/dist/RawTable/focusFocusable.cjs +1 -1
- package/dist/RawTable/index.cjs +1 -1
- package/dist/Searchbar/SearchForm.cjs +1 -1
- package/dist/Searchbar/SearchForm.js +3 -2
- package/dist/Searchbar/Searchbar.cjs +7 -7
- package/dist/Searchbar/Searchbar.js +51 -50
- package/dist/Searchbar/index.cjs +1 -1
- package/dist/Select/MultiSelect.cjs +7 -7
- package/dist/Select/MultiSelect.js +46 -211
- package/dist/Select/MultiSelectNested.cjs +3 -3
- package/dist/Select/MultiSelectNested.js +2 -20
- package/dist/Select/OptGroup.cjs +5 -1
- package/dist/Select/OptGroup.js +5 -0
- package/dist/Select/Option.cjs +5 -1
- package/dist/Select/Option.js +13 -11
- package/dist/Select/Select.cjs +6 -1
- package/dist/Select/Select.js +16 -8
- package/dist/Select/SelectList.cjs +5 -1
- package/dist/Select/SelectList.js +52 -72
- package/dist/Select/SelectParts.cjs +11 -10
- package/dist/Select/SelectParts.js +37 -153
- package/dist/Select/SingleSelect.cjs +1 -1
- package/dist/Select/SingleSelect.js +27 -117
- package/dist/Select/index.cjs +1 -1
- package/dist/SimpleMenu/SimpleMenu.cjs +11 -11
- package/dist/SimpleMenu/SimpleMenu.js +111 -92
- package/dist/SimpleMenu/index.cjs +1 -1
- package/dist/SimpleMenu/utils.cjs +1 -1
- package/dist/Stack/Stack.cjs +3 -3
- package/dist/Stack/Stack.js +7 -28
- package/dist/Stack/index.cjs +1 -1
- package/dist/Status/Status.cjs +7 -7
- package/dist/Status/Status.js +36 -24
- package/dist/Status/index.cjs +1 -1
- package/dist/SubNav/SubNav.cjs +5 -5
- package/dist/SubNav/SubNav.js +9 -9
- package/dist/SubNav/SubNavHeader.cjs +3 -3
- package/dist/SubNav/SubNavHeader.js +57 -47
- package/dist/SubNav/SubNavLink.cjs +5 -5
- package/dist/SubNav/SubNavLink.js +38 -32
- package/dist/SubNav/SubNavLinkSection.cjs +6 -6
- package/dist/SubNav/SubNavLinkSection.js +28 -21
- package/dist/SubNav/SubNavSection.cjs +3 -3
- package/dist/SubNav/SubNavSection.js +46 -39
- package/dist/SubNav/SubNavSectionLabel.cjs +4 -4
- package/dist/SubNav/SubNavSectionLabel.js +28 -25
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.js +14 -13
- package/dist/SubNav/index.cjs +1 -1
- package/dist/Switch/Switch.cjs +5 -5
- package/dist/Switch/Switch.js +33 -26
- package/dist/Switch/index.cjs +1 -1
- package/dist/Table/Cell.cjs +3 -3
- package/dist/Table/Cell.js +17 -13
- package/dist/Table/TFooter.cjs +5 -5
- package/dist/Table/TFooter.js +23 -16
- package/dist/Table/Table.cjs +5 -5
- package/dist/Table/Table.js +28 -24
- package/dist/Table/Tbody.cjs +2 -2
- package/dist/Table/Tbody.js +7 -6
- package/dist/Table/Thead.cjs +2 -2
- package/dist/Table/Thead.js +8 -7
- package/dist/Table/Tr.cjs +2 -2
- package/dist/Table/Tr.js +6 -5
- package/dist/Table/index.cjs +1 -1
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +26 -25
- package/dist/Tabs/TabPanels.cjs +1 -1
- package/dist/Tabs/TabPanels.js +15 -14
- package/dist/Tabs/Tabs.cjs +2 -2
- package/dist/Tabs/Tabs.js +64 -59
- package/dist/Tabs/TabsContext.cjs +1 -1
- package/dist/Tabs/components.cjs +12 -12
- package/dist/Tabs/index.cjs +1 -1
- package/dist/Tabs/useTabsFocus.cjs +1 -1
- package/dist/Tabs/useTabsFocus.js +1 -1
- package/dist/Tag/Tag.cjs +2 -2
- package/dist/Tag/Tag.js +6 -43
- package/dist/Tag/index.cjs +1 -1
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.js +8 -37
- package/dist/TextButton/index.cjs +1 -1
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.js +10 -41
- package/dist/TextInput/index.cjs +1 -1
- package/dist/Textarea/Textarea.cjs +2 -2
- package/dist/Textarea/Textarea.js +24 -21
- package/dist/Textarea/TextareaInput.cjs +4 -4
- package/dist/Textarea/TextareaInput.js +25 -30
- package/dist/Textarea/index.cjs +1 -1
- package/dist/ThemeProvider/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider/ThemeProvider.js +2 -10
- package/dist/ThemeProvider/hooks.cjs +1 -1
- package/dist/ThemeProvider/index.cjs +1 -1
- package/dist/TimePicker/TimePicker.cjs +3 -3
- package/dist/TimePicker/TimePicker.js +8 -30
- package/dist/TimePicker/index.cjs +1 -1
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
- package/dist/ToggleCheckbox/ToggleCheckbox.js +111 -110
- package/dist/ToggleCheckbox/index.cjs +1 -1
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.js +41 -35
- package/dist/ToggleInput/index.cjs +1 -1
- package/dist/Tooltip/Tooltip.cjs +2 -2
- package/dist/Tooltip/Tooltip.js +9 -52
- package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -1
- package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -1
- package/dist/Tooltip/index.cjs +1 -1
- package/dist/Tooltip/utils/positionTooltip.cjs +1 -1
- package/dist/Typography/Typography.cjs +8 -8
- package/dist/Typography/Typography.js +6 -21
- package/dist/Typography/constants.cjs +1 -1
- package/dist/Typography/index.cjs +1 -1
- package/dist/Typography/utils.cjs +9 -9
- package/dist/VisuallyHidden/VisuallyHidden.cjs +2 -2
- package/dist/VisuallyHidden/index.cjs +1 -1
- package/dist/helpers/deprecations.cjs +1 -1
- package/dist/helpers/escapeSelector.cjs +1 -1
- package/dist/helpers/getDefaultLocale.cjs +1 -1
- package/dist/helpers/getFocusableNodes.cjs +1 -1
- package/dist/helpers/keyboardKeys.cjs +1 -1
- package/dist/helpers/objects.cjs +1 -1
- package/dist/helpers/setOpacity.cjs +1 -1
- package/dist/helpers/setTabIndexOnFirstItem.cjs +1 -1
- package/dist/helpers/theme.cjs +1 -1
- package/dist/helpers/useElementOnScreen.cjs +4 -1
- package/dist/helpers/useElementOnScreen.js +6 -1
- package/dist/helpers/useId.cjs +4 -1
- package/dist/helpers/useId.js +6 -1
- package/dist/helpers/useIntersection.cjs +4 -1
- package/dist/helpers/useIntersection.js +6 -1
- package/dist/helpers/useLockScroll.cjs +4 -1
- package/dist/helpers/useLockScroll.js +6 -1
- package/dist/helpers/usePrevious.cjs +4 -1
- package/dist/helpers/usePrevious.js +6 -1
- package/dist/helpers/useResizeObserver.cjs +4 -1
- package/dist/helpers/useResizeObserver.js +6 -1
- package/dist/hooks/useComposeRefs.cjs +1 -1
- package/dist/hooks/useControllableState.cjs +1 -1
- package/dist/hooks/useElementOnScreen.cjs +1 -1
- package/dist/hooks/useId.cjs +1 -1
- package/dist/hooks/useIntersection.cjs +1 -1
- package/dist/hooks/useLockScroll.cjs +1 -1
- package/dist/hooks/usePrevious.cjs +1 -1
- package/dist/hooks/useResizeObserver.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +209 -209
- package/dist/themes/common-theme.cjs +1 -1
- package/dist/themes/darkTheme/dark-colors.cjs +1 -1
- package/dist/themes/darkTheme/dark-shadows.cjs +1 -1
- package/dist/themes/darkTheme/index.cjs +1 -1
- package/dist/themes/extendTheme.cjs +2 -2
- package/dist/themes/index.cjs +1 -1
- package/dist/themes/lightTheme/index.cjs +1 -1
- package/dist/themes/lightTheme/light-colors.cjs +1 -1
- package/dist/themes/lightTheme/light-shadows.cjs +1 -1
- package/dist/themes/sizes.cjs +1 -1
- package/dist/themes/sizes.js +4 -4
- package/dist/themes/utils.cjs +5 -5
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +3 -3
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +19 -15
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
- package/dist/v2/Breadcrumbs/Crumb.js +13 -12
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbLink.js +5 -4
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +16 -15
- package/dist/v2/Breadcrumbs/Divider.cjs +1 -1
- package/dist/v2/Breadcrumbs/Divider.js +6 -5
- package/dist/v2/Breadcrumbs/index.cjs +1 -1
- package/dist/v2/Link/Link.cjs +4 -4
- package/dist/v2/Link/Link.js +10 -39
- package/dist/v2/Link/index.cjs +1 -1
- package/dist/v2/LinkButton/LinkButton.cjs +7 -7
- package/dist/v2/LinkButton/LinkButton.js +11 -49
- package/dist/v2/LinkButton/index.cjs +1 -1
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.js +16 -15
- package/dist/v2/MainNav/MainNavContext.cjs +1 -1
- package/dist/v2/MainNav/NavBrand.cjs +6 -6
- package/dist/v2/MainNav/NavBrand.js +38 -22
- package/dist/v2/MainNav/NavCondense.cjs +3 -3
- package/dist/v2/MainNav/NavCondense.js +20 -16
- package/dist/v2/MainNav/NavFooter.cjs +1 -1
- package/dist/v2/MainNav/NavFooter.js +9 -8
- package/dist/v2/MainNav/NavLink.cjs +10 -10
- package/dist/v2/MainNav/NavLink.js +55 -45
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.js +43 -33
- package/dist/v2/MainNav/NavSections.cjs +2 -2
- package/dist/v2/MainNav/NavSections.js +15 -14
- package/dist/v2/MainNav/NavUser.cjs +3 -3
- package/dist/v2/MainNav/NavUser.js +22 -19
- package/dist/v2/MainNav/index.cjs +1 -1
- package/dist/v2/Pagination/Pagination.cjs +2 -2
- package/dist/v2/Pagination/Pagination.js +16 -15
- package/dist/v2/Pagination/PaginationContext.cjs +1 -1
- package/dist/v2/Pagination/components.cjs +10 -10
- package/dist/v2/Pagination/components.js +50 -37
- package/dist/v2/Pagination/index.cjs +1 -1
- package/dist/v2/SimpleMenu/Menu.cjs +13 -13
- package/dist/v2/SimpleMenu/Menu.js +15 -155
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -1
- package/dist/v2/SimpleMenu/SimpleMenu.js +17 -31
- package/dist/v2/SimpleMenu/index.cjs +1 -1
- package/dist/v2/SubNav/SubNav.cjs +5 -5
- package/dist/v2/SubNav/SubNav.js +9 -9
- package/dist/v2/SubNav/SubNavHeader.cjs +3 -3
- package/dist/v2/SubNav/SubNavHeader.js +57 -47
- package/dist/v2/SubNav/SubNavLink.cjs +5 -5
- package/dist/v2/SubNav/SubNavLink.js +40 -34
- package/dist/v2/SubNav/SubNavLinkSection.cjs +6 -6
- package/dist/v2/SubNav/SubNavLinkSection.js +28 -21
- package/dist/v2/SubNav/SubNavSection.cjs +3 -3
- package/dist/v2/SubNav/SubNavSection.js +48 -41
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +4 -4
- package/dist/v2/SubNav/SubNavSectionLabel.js +28 -25
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +14 -13
- package/dist/v2/SubNav/index.cjs +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.js +1 -1
- package/package.json +16 -19
- package/dist/DismissibleLayer/DismissibleLayer.cjs +0 -1
- package/dist/DismissibleLayer/DismissibleLayer.js +0 -30
- /package/dist/BaseCheckbox/assets/{checkmark-black.cjs → checkmark-black.svg.cjs} +0 -0
- /package/dist/BaseCheckbox/assets/{checkmark-black.js → checkmark-black.svg.js} +0 -0
- /package/dist/BaseCheckbox/assets/{checkmark.cjs → checkmark.svg.cjs} +0 -0
- /package/dist/BaseCheckbox/assets/{checkmark.js → checkmark.svg.js} +0 -0
- /package/dist/Loader/assets/{loader.cjs → loader.svg.cjs} +0 -0
- /package/dist/Loader/assets/{loader.js → loader.svg.js} +0 -0
- /package/dist/Pagination/assets/{next.cjs → next.svg.cjs} +0 -0
- /package/dist/Pagination/assets/{next.js → next.svg.js} +0 -0
- /package/dist/Pagination/assets/{previous.cjs → previous.svg.cjs} +0 -0
- /package/dist/Pagination/assets/{previous.js → previous.svg.js} +0 -0
- /package/dist/v2/Pagination/assets/{next.cjs → next.svg.cjs} +0 -0
- /package/dist/v2/Pagination/assets/{next.js → next.svg.js} +0 -0
- /package/dist/v2/Pagination/assets/{previous.cjs → previous.svg.cjs} +0 -0
- /package/dist/v2/Pagination/assets/{previous.js → previous.svg.js} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),R=require("react"),o=require("prop-types"),a=require("styled-components"),$=require("../themes/sizes.cjs"),L=require("../themes/utils.cjs"),m=require("../Box/Box.cjs"),z=require("../Flex/Flex.cjs"),S=require("../Field/FieldContext.cjs"),F=require("../VisuallyHidden/VisuallyHidden.cjs"),h=require("../Typography/Typography.cjs"),W=a.label`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-block;
|
|
4
4
|
z-index: 0;
|
|
5
5
|
width: 100%;
|
|
6
|
-
`,
|
|
6
|
+
`,B=a(m.Box)`
|
|
7
7
|
cursor: ${({disabled:e})=>e?"not-allowed":void 0};
|
|
8
8
|
// Masks the background of each value
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
flex-wrap: wrap;
|
|
11
11
|
|
|
12
|
-
${
|
|
13
|
-
`,
|
|
14
|
-
background-color: ${({theme:e,checked:
|
|
12
|
+
${L.inputFocusStyle()}
|
|
13
|
+
`,g=a(z.Flex).attrs({hasRadius:!0})`
|
|
14
|
+
background-color: ${({theme:e,checked:i,disabled:l})=>i?l?e.colors.neutral200:e.colors.neutral0:"transparent"};
|
|
15
15
|
border: 1px solid
|
|
16
|
-
${({theme:e,checked:
|
|
16
|
+
${({theme:e,checked:i,disabled:l})=>i&&i!==null?l?e.colors.neutral300:e.colors.neutral200:l?e.colors.neutral150:e.colors.neutral100};
|
|
17
17
|
position: relative;
|
|
18
18
|
user-select: none;
|
|
19
19
|
z-index: 2;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
padding-top: ${({size:e})=>`${e==="S"?"2px":"6px"}`};
|
|
27
27
|
padding-bottom: ${({size:e})=>`${e==="S"?"2px":"6px"}`};
|
|
28
|
-
`,
|
|
28
|
+
`,I=a.input`
|
|
29
29
|
height: 100%;
|
|
30
30
|
left: 0;
|
|
31
31
|
opacity: 0;
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
top: 0;
|
|
34
34
|
z-index: 1;
|
|
35
35
|
width: 100%;
|
|
36
|
-
`,
|
|
36
|
+
`,s=R.forwardRef(({size:e,onLabel:i,offLabel:l,children:x,checked:r,disabled:t,onChange:f,...b},y)=>{const{error:C,hint:q,id:c,name:w,required:j}=S.useField(),p="neutral600";let T=!r&&r!==null?"danger700":p,v=r?"primary600":p;const k=d=>{t||f(d)};let u;return C?u=`${c}-error`:q&&(u=`${c}-hint`),n.jsxs(W,{children:[n.jsx(F.VisuallyHidden,{children:x}),n.jsxs(B,{hasRadius:!0,disabled:t,padding:1,display:"flex",background:t?"neutral150":"neutral100",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral200",children:[n.jsx(g,{size:e,paddingLeft:3,paddingRight:3,justifyContent:"center",alignItems:"center","aria-hidden":!0,checked:r===null?!1:!r,disabled:t,children:n.jsx(h.Typography,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:t?"neutral700":T,children:l})}),n.jsx(g,{size:e,paddingLeft:3,paddingRight:3,justifyContent:"center",alignItems:"center","aria-hidden":!0,checked:r===null?!1:r,disabled:t,children:n.jsx(h.Typography,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:t?"neutral700":v,children:i})}),n.jsx(I,{type:"checkbox","aria-disabled":t,"aria-describedby":u,onChange:d=>k(d),name:w,ref:y,"aria-required":j,...b,checked:!(r===null||!r)})]})]})});s.displayName="ToggleCheckbox";s.defaultProps={disabled:!1,checked:!1,onChange:void 0,size:"M"};s.propTypes={checked:o.bool,children:o.string.isRequired,disabled:o.bool,offLabel:o.string.isRequired,onChange:o.func,onLabel:o.string.isRequired,size:o.oneOf(Object.keys($.sizes.input))};exports.ToggleCheckbox=s;
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import "../
|
|
6
|
-
import "../
|
|
7
|
-
import "../
|
|
8
|
-
import "
|
|
9
|
-
import { useField as
|
|
10
|
-
import {
|
|
11
|
-
import "../
|
|
12
|
-
|
|
13
|
-
import { sizes as q } from "../themes/sizes.js";
|
|
14
|
-
import { inputFocusStyle as z } from "../themes/utils.js";
|
|
15
|
-
import { VisuallyHidden as W } from "../VisuallyHidden/VisuallyHidden.js";
|
|
16
|
-
const S = l.label`
|
|
1
|
+
import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import L from "react";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import a from "styled-components";
|
|
5
|
+
import { sizes as j } from "../themes/sizes.js";
|
|
6
|
+
import { inputFocusStyle as q } from "../themes/utils.js";
|
|
7
|
+
import { Box as z } from "../Box/Box.js";
|
|
8
|
+
import { Flex as W } from "../Flex/Flex.js";
|
|
9
|
+
import { useField as S } from "../Field/FieldContext.js";
|
|
10
|
+
import { VisuallyHidden as B } from "../VisuallyHidden/VisuallyHidden.js";
|
|
11
|
+
import { Typography as h } from "../Typography/Typography.js";
|
|
12
|
+
const F = a.label`
|
|
17
13
|
position: relative;
|
|
18
14
|
display: inline-block;
|
|
19
15
|
z-index: 0;
|
|
20
16
|
width: 100%;
|
|
21
|
-
`,
|
|
17
|
+
`, I = a(z)`
|
|
22
18
|
cursor: ${({ disabled: e }) => e ? "not-allowed" : void 0};
|
|
23
19
|
// Masks the background of each value
|
|
24
20
|
overflow: hidden;
|
|
25
21
|
flex-wrap: wrap;
|
|
26
22
|
|
|
27
|
-
${
|
|
28
|
-
`,
|
|
23
|
+
${q()}
|
|
24
|
+
`, g = a(W).attrs({
|
|
29
25
|
hasRadius: !0
|
|
30
26
|
})`
|
|
31
|
-
background-color: ${({ theme: e, checked:
|
|
27
|
+
background-color: ${({ theme: e, checked: n, disabled: i }) => n ? i ? e.colors.neutral200 : e.colors.neutral0 : "transparent"};
|
|
32
28
|
border: 1px solid
|
|
33
|
-
${({ theme: e, checked:
|
|
29
|
+
${({ theme: e, checked: n, disabled: i }) => n && n !== null ? i ? e.colors.neutral300 : e.colors.neutral200 : i ? e.colors.neutral150 : e.colors.neutral100};
|
|
34
30
|
position: relative;
|
|
35
31
|
user-select: none;
|
|
36
32
|
z-index: 2;
|
|
@@ -42,7 +38,7 @@ const S = l.label`
|
|
|
42
38
|
*/
|
|
43
39
|
padding-top: ${({ size: e }) => `${e === "S" ? "2px" : "6px"}`};
|
|
44
40
|
padding-bottom: ${({ size: e }) => `${e === "S" ? "2px" : "6px"}`};
|
|
45
|
-
`,
|
|
41
|
+
`, M = a.input`
|
|
46
42
|
height: 100%;
|
|
47
43
|
left: 0;
|
|
48
44
|
opacity: 0;
|
|
@@ -50,105 +46,110 @@ const S = l.label`
|
|
|
50
46
|
top: 0;
|
|
51
47
|
z-index: 1;
|
|
52
48
|
width: 100%;
|
|
53
|
-
`,
|
|
54
|
-
({ size: e, onLabel:
|
|
55
|
-
const { error:
|
|
56
|
-
let
|
|
57
|
-
const
|
|
58
|
-
o ||
|
|
49
|
+
`, u = L.forwardRef(
|
|
50
|
+
({ size: e, onLabel: n, offLabel: i, children: b, checked: r, disabled: o, onChange: x, ...m }, y) => {
|
|
51
|
+
const { error: C, hint: w, id: d, name: v, required: $ } = S(), f = "neutral600";
|
|
52
|
+
let k = !r && r !== null ? "danger700" : f, R = r ? "primary600" : f;
|
|
53
|
+
const T = (p) => {
|
|
54
|
+
o || x(p);
|
|
59
55
|
};
|
|
60
|
-
let
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
disabled: o,
|
|
66
|
-
padding: 1,
|
|
67
|
-
display: "flex",
|
|
68
|
-
background: o ? "neutral150" : "neutral100",
|
|
69
|
-
borderStyle: "solid",
|
|
70
|
-
borderWidth: "1px",
|
|
71
|
-
borderColor: "neutral200"
|
|
72
|
-
},
|
|
73
|
-
/* @__PURE__ */ t.createElement(
|
|
74
|
-
m,
|
|
56
|
+
let s;
|
|
57
|
+
return C ? s = `${d}-error` : w && (s = `${d}-hint`), /* @__PURE__ */ c(F, { children: [
|
|
58
|
+
/* @__PURE__ */ l(B, { children: b }),
|
|
59
|
+
/* @__PURE__ */ c(
|
|
60
|
+
I,
|
|
75
61
|
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
62
|
+
hasRadius: !0,
|
|
63
|
+
disabled: o,
|
|
64
|
+
padding: 1,
|
|
65
|
+
display: "flex",
|
|
66
|
+
background: o ? "neutral150" : "neutral100",
|
|
67
|
+
borderStyle: "solid",
|
|
68
|
+
borderWidth: "1px",
|
|
69
|
+
borderColor: "neutral200",
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ l(
|
|
72
|
+
g,
|
|
73
|
+
{
|
|
74
|
+
size: e,
|
|
75
|
+
paddingLeft: 3,
|
|
76
|
+
paddingRight: 3,
|
|
77
|
+
justifyContent: "center",
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
"aria-hidden": !0,
|
|
80
|
+
checked: r === null ? !1 : !r,
|
|
81
|
+
disabled: o,
|
|
82
|
+
children: /* @__PURE__ */ l(
|
|
83
|
+
h,
|
|
84
|
+
{
|
|
85
|
+
variant: "pi",
|
|
86
|
+
fontWeight: "bold",
|
|
87
|
+
textTransform: "uppercase",
|
|
88
|
+
textColor: o ? "neutral700" : k,
|
|
89
|
+
children: i
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ l(
|
|
95
|
+
g,
|
|
96
|
+
{
|
|
97
|
+
size: e,
|
|
98
|
+
paddingLeft: 3,
|
|
99
|
+
paddingRight: 3,
|
|
100
|
+
justifyContent: "center",
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
"aria-hidden": !0,
|
|
103
|
+
checked: r === null ? !1 : r,
|
|
104
|
+
disabled: o,
|
|
105
|
+
children: /* @__PURE__ */ l(
|
|
106
|
+
h,
|
|
107
|
+
{
|
|
108
|
+
variant: "pi",
|
|
109
|
+
fontWeight: "bold",
|
|
110
|
+
textTransform: "uppercase",
|
|
111
|
+
textColor: o ? "neutral700" : R,
|
|
112
|
+
children: n
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ l(
|
|
118
|
+
M,
|
|
119
|
+
{
|
|
120
|
+
type: "checkbox",
|
|
121
|
+
"aria-disabled": o,
|
|
122
|
+
"aria-describedby": s,
|
|
123
|
+
onChange: (p) => T(p),
|
|
124
|
+
name: v,
|
|
125
|
+
ref: y,
|
|
126
|
+
"aria-required": $,
|
|
127
|
+
...m,
|
|
128
|
+
checked: !(r === null || !r)
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
]
|
|
131
132
|
}
|
|
132
133
|
)
|
|
133
|
-
)
|
|
134
|
+
] });
|
|
134
135
|
}
|
|
135
136
|
);
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
u.displayName = "ToggleCheckbox";
|
|
138
|
+
u.defaultProps = {
|
|
138
139
|
disabled: !1,
|
|
139
140
|
checked: !1,
|
|
140
141
|
onChange: void 0,
|
|
141
142
|
size: "M"
|
|
142
143
|
};
|
|
143
|
-
|
|
144
|
-
checked:
|
|
145
|
-
children:
|
|
146
|
-
disabled:
|
|
147
|
-
offLabel:
|
|
148
|
-
onChange:
|
|
149
|
-
onLabel:
|
|
150
|
-
size:
|
|
144
|
+
u.propTypes = {
|
|
145
|
+
checked: t.bool,
|
|
146
|
+
children: t.string.isRequired,
|
|
147
|
+
disabled: t.bool,
|
|
148
|
+
offLabel: t.string.isRequired,
|
|
149
|
+
onChange: t.func,
|
|
150
|
+
onLabel: t.string.isRequired,
|
|
151
|
+
size: t.oneOf(Object.keys(j.input))
|
|
151
152
|
};
|
|
152
153
|
export {
|
|
153
|
-
|
|
154
|
+
u as ToggleCheckbox
|
|
154
155
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ToggleCheckbox.cjs");exports.ToggleCheckbox=e.ToggleCheckbox;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("react");const e=require("prop-types"),u=require("styled-components"),F=require("../hooks/useId.cjs"),j=require("../themes/sizes.cjs"),T=require("../ToggleCheckbox/ToggleCheckbox.cjs"),m=require("../Field/Field.cjs"),y=require("../TextButton/TextButton.cjs"),c=require("../Flex/Flex.cjs"),v=require("../Field/FieldLabel.cjs"),I=require("../Field/FieldHint.cjs"),k=require("../Field/FieldError.cjs"),C=u(m.Field)`
|
|
2
2
|
max-width: 320px;
|
|
3
|
-
`,
|
|
3
|
+
`,O=u(y.TextButton)`
|
|
4
4
|
align-self: flex-end;
|
|
5
5
|
margin-left: auto;
|
|
6
|
-
`,
|
|
6
|
+
`,i=({disabled:n,size:a,error:g,hint:x,label:o,name:p,labelAction:b,required:q,id:h,onClear:t,clearLabel:l,checked:s,...f})=>{const d=F.useId(h);return r.jsx(C,{name:p,hint:x,error:g,id:d,required:q,children:r.jsxs(c.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[r.jsxs(c.Flex,{children:[r.jsx(v.FieldLabel,{action:b,children:o}),l&&t&&s!==null&&!n&&r.jsx(O,{onClick:t,children:l})]}),r.jsx(T.ToggleCheckbox,{id:d,size:a,checked:s,disabled:n,...f,children:o}),r.jsx(I.FieldHint,{}),r.jsx(k.FieldError,{})]})})};i.displayName="ToggleInput";i.defaultProps={checked:!1,clearLabel:void 0,disabled:!1,error:void 0,hint:void 0,id:void 0,label:"",labelAction:void 0,name:"",onClear:void 0,required:!1,size:"M"};i.propTypes={checked:e.bool,clearLabel:e.string,disabled:e.bool,error:e.string,hint:e.oneOfType([e.string,e.node,e.arrayOf(e.node)]),id:e.string,label:e.string,labelAction:e.node,name:e.string,onClear:e.func,required:e.bool,size:e.oneOf(Object.keys(j.sizes.input))};exports.ToggleInput=i;
|
|
@@ -1,43 +1,49 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
2
3
|
import e from "prop-types";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "../
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import "../
|
|
10
|
-
import "../Field/
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
import { sizes as k } from "../themes/sizes.js";
|
|
15
|
-
import { ToggleCheckbox as C } from "../ToggleCheckbox/ToggleCheckbox.js";
|
|
16
|
-
const O = p(y)`
|
|
4
|
+
import a from "styled-components";
|
|
5
|
+
import { useId as T } from "../hooks/useId.js";
|
|
6
|
+
import { sizes as v } from "../themes/sizes.js";
|
|
7
|
+
import { ToggleCheckbox as F } from "../ToggleCheckbox/ToggleCheckbox.js";
|
|
8
|
+
import { Field as I } from "../Field/Field.js";
|
|
9
|
+
import { TextButton as k } from "../TextButton/TextButton.js";
|
|
10
|
+
import { Flex as p } from "../Flex/Flex.js";
|
|
11
|
+
import { FieldLabel as C } from "../Field/FieldLabel.js";
|
|
12
|
+
import { FieldHint as O } from "../Field/FieldHint.js";
|
|
13
|
+
import { FieldError as j } from "../Field/FieldError.js";
|
|
14
|
+
const z = a(I)`
|
|
17
15
|
max-width: 320px;
|
|
18
|
-
`,
|
|
16
|
+
`, q = a(k)`
|
|
19
17
|
align-self: flex-end;
|
|
20
18
|
margin-left: auto;
|
|
21
|
-
`,
|
|
22
|
-
disabled:
|
|
23
|
-
size:
|
|
24
|
-
error:
|
|
25
|
-
hint:
|
|
26
|
-
label:
|
|
19
|
+
`, r = ({
|
|
20
|
+
disabled: i,
|
|
21
|
+
size: c,
|
|
22
|
+
error: f,
|
|
23
|
+
hint: g,
|
|
24
|
+
label: t,
|
|
27
25
|
name: u,
|
|
28
|
-
labelAction:
|
|
26
|
+
labelAction: h,
|
|
29
27
|
required: b,
|
|
30
|
-
id:
|
|
31
|
-
onClear:
|
|
32
|
-
clearLabel:
|
|
33
|
-
checked:
|
|
34
|
-
...
|
|
28
|
+
id: x,
|
|
29
|
+
onClear: n,
|
|
30
|
+
clearLabel: l,
|
|
31
|
+
checked: d,
|
|
32
|
+
...y
|
|
35
33
|
}) => {
|
|
36
|
-
const
|
|
37
|
-
return /* @__PURE__ */
|
|
34
|
+
const m = T(x);
|
|
35
|
+
return /* @__PURE__ */ o(z, { name: u, hint: g, error: f, id: m, required: b, children: /* @__PURE__ */ s(p, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
36
|
+
/* @__PURE__ */ s(p, { children: [
|
|
37
|
+
/* @__PURE__ */ o(C, { action: h, children: t }),
|
|
38
|
+
l && n && d !== null && !i && /* @__PURE__ */ o(q, { onClick: n, children: l })
|
|
39
|
+
] }),
|
|
40
|
+
/* @__PURE__ */ o(F, { id: m, size: c, checked: d, disabled: i, ...y, children: t }),
|
|
41
|
+
/* @__PURE__ */ o(O, {}),
|
|
42
|
+
/* @__PURE__ */ o(j, {})
|
|
43
|
+
] }) });
|
|
38
44
|
};
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
r.displayName = "ToggleInput";
|
|
46
|
+
r.defaultProps = {
|
|
41
47
|
checked: !1,
|
|
42
48
|
clearLabel: void 0,
|
|
43
49
|
disabled: !1,
|
|
@@ -51,7 +57,7 @@ t.defaultProps = {
|
|
|
51
57
|
required: !1,
|
|
52
58
|
size: "M"
|
|
53
59
|
};
|
|
54
|
-
|
|
60
|
+
r.propTypes = {
|
|
55
61
|
checked: e.bool,
|
|
56
62
|
clearLabel: e.string,
|
|
57
63
|
disabled: e.bool,
|
|
@@ -63,8 +69,8 @@ t.propTypes = {
|
|
|
63
69
|
name: e.string,
|
|
64
70
|
onClear: e.func,
|
|
65
71
|
required: e.bool,
|
|
66
|
-
size: e.oneOf(Object.keys(
|
|
72
|
+
size: e.oneOf(Object.keys(v.input))
|
|
67
73
|
};
|
|
68
74
|
export {
|
|
69
|
-
|
|
75
|
+
r as ToggleInput
|
|
70
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ToggleInput.cjs");exports.ToggleInput=e.ToggleInput;
|
package/dist/Tooltip/Tooltip.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),g=require("react"),x=require("styled-components"),j=require("./hooks/useTooltipHandlers.cjs"),h=require("./hooks/useTooltipLayout.cjs"),l=require("../hooks/useId.cjs"),T=require("../Portal/Portal.cjs"),q=require("../Box/Box.cjs"),m=require("../VisuallyHidden/VisuallyHidden.cjs"),v=require("../Typography/Typography.cjs");function I(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const O=I(g),R=x(q.Box)`
|
|
2
2
|
/* z-index exist because of its position inside Modals */
|
|
3
3
|
z-index: 4;
|
|
4
4
|
display: ${({visible:e})=>e?"revert":"none"};
|
|
5
|
-
`,
|
|
5
|
+
`,H=({children:e,label:r,description:t,delay:n=500,position:a="top",id:d,...u})=>{const i=l.useId(d),c=l.useId(),{visible:s,...p}=j.useTooltipHandlers(n),{tooltipWrapperRef:b,toggleSourceRef:f}=h.useTooltipLayout(s,a),y=O.cloneElement(e,{tabIndex:0,"aria-labelledby":r?i:void 0,"aria-describedby":t?i:void 0,...p});return o.jsxs(o.Fragment,{children:[o.jsx(T.Portal,{children:o.jsxs(R,{id:i,background:"neutral900",hasRadius:!0,padding:2,role:"tooltip",ref:b,visible:s,position:"absolute",...u,children:[s&&o.jsx(m.VisuallyHidden,{id:c,children:t}),o.jsx(v.Typography,{as:"p",variant:"pi",fontWeight:"bold",textColor:"neutral0",children:r||t})]})}),o.jsx("span",{ref:f,children:y})]})};exports.Tooltip=H;
|
package/dist/Tooltip/Tooltip.js
CHANGED
|
@@ -3,66 +3,23 @@ import * as y from "react";
|
|
|
3
3
|
import g from "styled-components";
|
|
4
4
|
import { useTooltipHandlers as T } from "./hooks/useTooltipHandlers.js";
|
|
5
5
|
import { useTooltipLayout as v } from "./hooks/useTooltipLayout.js";
|
|
6
|
-
import { Box as I } from "../Box/Box.js";
|
|
7
6
|
import { useId as d } from "../hooks/useId.js";
|
|
8
|
-
import { Portal as
|
|
9
|
-
import {
|
|
10
|
-
import { VisuallyHidden as
|
|
11
|
-
|
|
7
|
+
import { Portal as I } from "../Portal/Portal.js";
|
|
8
|
+
import { Box as R } from "../Box/Box.js";
|
|
9
|
+
import { VisuallyHidden as H } from "../VisuallyHidden/VisuallyHidden.js";
|
|
10
|
+
import { Typography as W } from "../Typography/Typography.js";
|
|
11
|
+
const j = g(R)`
|
|
12
12
|
/* z-index exist because of its position inside Modals */
|
|
13
13
|
z-index: 4;
|
|
14
|
-
display: ${({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
`, S = ({
|
|
18
|
-
children: e,
|
|
19
|
-
label: n,
|
|
20
|
-
description: r,
|
|
21
|
-
delay: s = 500,
|
|
22
|
-
position: p = "top",
|
|
23
|
-
id: a,
|
|
24
|
-
...m
|
|
25
|
-
}) => {
|
|
26
|
-
const t = d(a), c = d(), {
|
|
27
|
-
visible: i,
|
|
28
|
-
...f
|
|
29
|
-
} = T(s), {
|
|
30
|
-
tooltipWrapperRef: u,
|
|
31
|
-
toggleSourceRef: b
|
|
32
|
-
} = v(i, p), h = y.cloneElement(e, {
|
|
14
|
+
display: ${({ visible: e }) => e ? "revert" : "none"};
|
|
15
|
+
`, S = ({ children: e, label: n, description: r, delay: s = 500, position: p = "top", id: a, ...m }) => {
|
|
16
|
+
const t = d(a), c = d(), { visible: i, ...f } = T(s), { tooltipWrapperRef: u, toggleSourceRef: b } = v(i, p), h = y.cloneElement(e, {
|
|
33
17
|
tabIndex: 0,
|
|
34
18
|
"aria-labelledby": n ? t : void 0,
|
|
35
19
|
"aria-describedby": r ? t : void 0,
|
|
36
20
|
...f
|
|
37
21
|
});
|
|
38
|
-
return l(x, {
|
|
39
|
-
children: [o(R, {
|
|
40
|
-
children: l(j, {
|
|
41
|
-
id: t,
|
|
42
|
-
background: "neutral900",
|
|
43
|
-
hasRadius: !0,
|
|
44
|
-
padding: 2,
|
|
45
|
-
role: "tooltip",
|
|
46
|
-
ref: u,
|
|
47
|
-
visible: i,
|
|
48
|
-
position: "absolute",
|
|
49
|
-
...m,
|
|
50
|
-
children: [i && o(W, {
|
|
51
|
-
id: c,
|
|
52
|
-
children: r
|
|
53
|
-
}), o(H, {
|
|
54
|
-
as: "p",
|
|
55
|
-
variant: "pi",
|
|
56
|
-
fontWeight: "bold",
|
|
57
|
-
textColor: "neutral0",
|
|
58
|
-
children: n || r
|
|
59
|
-
})]
|
|
60
|
-
})
|
|
61
|
-
}), o("span", {
|
|
62
|
-
ref: b,
|
|
63
|
-
children: h
|
|
64
|
-
})]
|
|
65
|
-
});
|
|
22
|
+
return l(x, { children: [o(I, { children: l(j, { id: t, background: "neutral900", hasRadius: !0, padding: 2, role: "tooltip", ref: u, visible: i, position: "absolute", ...m, children: [i && o(H, { id: c, children: r }), o(W, { as: "p", variant: "pi", fontWeight: "bold", textColor: "neutral0", children: n || r })] }) }), o("span", { ref: b, children: h })] });
|
|
66
23
|
};
|
|
67
24
|
export {
|
|
68
25
|
S as Tooltip
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),u=r=>{const[s,e]=o.useState(!1),t=o.useRef(null),n=()=>{typeof t.current=="number"&&(clearTimeout(t.current),t.current=null)};return o.useEffect(()=>()=>{n()},[]),{visible:s,onFocus:()=>{e(!0)},onBlur:()=>{e(!1)},onMouseEnter:()=>{t.current=setTimeout(()=>{e(!0)},r)},onMouseLeave:()=>{n(),e(!1)}}};exports.useTooltipHandlers=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),c=require("../utils/positionTooltip.cjs"),i=(e,u)=>{const l=o.useRef(null),r=o.useRef(null);return o.useLayoutEffect(()=>{if(e){const t=l.current,s=r.current;if(t&&s){const n=c.positionTooltip(t,s,u);t.style.left=`${n.left}px`,t.style.top=`${n.top}px`}}},[u,e]),{tooltipWrapperRef:l,toggleSourceRef:r}};exports.useTooltipLayout=i;
|
package/dist/Tooltip/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Tooltip.cjs");exports.Tooltip=o.Tooltip;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=8,d=(h,i)=>{const f=(h.width-i.width)/2,t=i.left-f,n=i.top+i.height+s+window.pageYOffset;return{left:t,top:n}},o=(h,i)=>{const f=(h.height-i.height)/2,t=i.left+i.width+s,n=i.top-f+window.pageYOffset;return{left:t,top:n}},p=(h,i)=>{const f=(h.height-i.height)/2,t=i.left-h.width-s,n=i.top-f+window.pageYOffset;return{left:t,top:n}},e=(h,i)=>{const f=(h.width-i.width)/2;let t=i.left-f,n=i.top-h.height-s+window.pageYOffset;const w=window.innerWidth-i.right;return i.left+h.width-w>window.innerWidth?(t=i.left-h.width-s,n=i.top+window.scrollY-i.height/2):t<0?(t=i.width+i.left+s,n=i.top+window.scrollY-h.height/2+s):n<0&&t>0&&(n=i.top+i.height+s),{left:t,top:n}},r=(h,i,f)=>{const t=h.getBoundingClientRect(),n=i.getBoundingClientRect();return f==="bottom"?d(t,n):f==="right"?o(t,n):f==="left"?p(t,n):e(t,n)};exports.positionTooltip=r;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.
|
|
2
|
-
${
|
|
3
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),r=require("./utils.cjs"),o=require("../helpers/theme.cjs"),n={fontSize:!0,fontWeight:!0},a=i.span.withConfig({shouldForwardProp:(e,t)=>!n[e]&&t(e)})`
|
|
2
|
+
${r.variantStyle}
|
|
3
|
+
${r.ellipsisStyle}
|
|
4
4
|
|
|
5
5
|
// These properties need to come after {variantStyle}, because they might
|
|
6
6
|
// overwrite a variant attribute
|
|
7
|
-
font-weight: ${({theme:e,fontWeight:t})=>
|
|
8
|
-
font-size: ${({theme:e,fontSize:t})=>
|
|
9
|
-
line-height: ${({theme:e,lineHeight:t})=>
|
|
10
|
-
color: ${
|
|
7
|
+
font-weight: ${({theme:e,fontWeight:t})=>o.extractStyleFromTheme(e.fontWeights,t,void 0)};
|
|
8
|
+
font-size: ${({theme:e,fontSize:t})=>o.extractStyleFromTheme(e.fontSizes,t,void 0)};
|
|
9
|
+
line-height: ${({theme:e,lineHeight:t})=>o.extractStyleFromTheme(e.lineHeights,t,void 0)};
|
|
10
|
+
color: ${r.handleColor};
|
|
11
11
|
text-align: ${({textAlign:e})=>e};
|
|
12
12
|
text-decoration: ${({textDecoration:e})=>e};
|
|
13
13
|
text-transform: ${({textTransform:e})=>e};
|
|
14
|
-
`;exports.Typography=
|
|
14
|
+
`;exports.Typography=a;
|
|
@@ -12,28 +12,13 @@ const s = {
|
|
|
12
12
|
|
|
13
13
|
// These properties need to come after {variantStyle}, because they might
|
|
14
14
|
// overwrite a variant attribute
|
|
15
|
-
font-weight: ${({
|
|
16
|
-
theme: t,
|
|
17
|
-
|
|
18
|
-
}) => o(t.fontWeights, e, void 0)};
|
|
19
|
-
font-size: ${({
|
|
20
|
-
theme: t,
|
|
21
|
-
fontSize: e
|
|
22
|
-
}) => o(t.fontSizes, e, void 0)};
|
|
23
|
-
line-height: ${({
|
|
24
|
-
theme: t,
|
|
25
|
-
lineHeight: e
|
|
26
|
-
}) => o(t.lineHeights, e, void 0)};
|
|
15
|
+
font-weight: ${({ theme: t, fontWeight: e }) => o(t.fontWeights, e, void 0)};
|
|
16
|
+
font-size: ${({ theme: t, fontSize: e }) => o(t.fontSizes, e, void 0)};
|
|
17
|
+
line-height: ${({ theme: t, lineHeight: e }) => o(t.lineHeights, e, void 0)};
|
|
27
18
|
color: ${a};
|
|
28
|
-
text-align: ${({
|
|
29
|
-
|
|
30
|
-
}) => t};
|
|
31
|
-
text-decoration: ${({
|
|
32
|
-
textDecoration: t
|
|
33
|
-
}) => t};
|
|
34
|
-
text-transform: ${({
|
|
35
|
-
textTransform: t
|
|
36
|
-
}) => t};
|
|
19
|
+
text-align: ${({ textAlign: t }) => t};
|
|
20
|
+
text-decoration: ${({ textDecoration: t }) => t};
|
|
21
|
+
text-transform: ${({ textTransform: t }) => t};
|
|
37
22
|
`;
|
|
38
23
|
export {
|
|
39
24
|
d as Typography
|