@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
package/dist/Popover/Popover.js
CHANGED
|
@@ -1,83 +1,59 @@
|
|
|
1
1
|
import { jsx as i, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import { useFloating as w, offset as k, shift as
|
|
4
|
-
import
|
|
3
|
+
import { useFloating as w, offset as k, shift as S, flip as $, autoUpdate as y } from "@floating-ui/react-dom";
|
|
4
|
+
import f from "styled-components";
|
|
5
|
+
import { useIntersection as v } from "../hooks/useIntersection.js";
|
|
5
6
|
import { Box as d } from "../Box/Box.js";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}) => {
|
|
28
|
-
const [p, u] = a.useState(void 0), {
|
|
29
|
-
x: h,
|
|
30
|
-
y: m,
|
|
31
|
-
reference: f,
|
|
32
|
-
floating: b,
|
|
33
|
-
strategy: g
|
|
34
|
-
} = w({
|
|
7
|
+
import { Portal as P } from "../Portal/Portal.js";
|
|
8
|
+
const T = [
|
|
9
|
+
"top",
|
|
10
|
+
"top-start",
|
|
11
|
+
"top-end",
|
|
12
|
+
"right",
|
|
13
|
+
"right-start",
|
|
14
|
+
"right-end",
|
|
15
|
+
"bottom",
|
|
16
|
+
"bottom-start",
|
|
17
|
+
"bottom-end",
|
|
18
|
+
"left",
|
|
19
|
+
"left-start",
|
|
20
|
+
"left-end"
|
|
21
|
+
], W = f(d)`
|
|
22
|
+
box-shadow: ${({ theme: t }) => t.shadows.filterShadow};
|
|
23
|
+
z-index: ${({ theme: t }) => t.zIndices[0]};
|
|
24
|
+
border: 1px solid ${({ theme: t }) => t.colors.neutral150};
|
|
25
|
+
background: ${({ theme: t }) => t.colors.neutral0};
|
|
26
|
+
`, C = ({ source: t, children: e, spacing: o = 0, fullWidth: r = !1, placement: s = "bottom-start", centered: n = !1, ...l }) => {
|
|
27
|
+
const [p, u] = a.useState(void 0), { x: h, y: m, reference: c, floating: b, strategy: g } = w({
|
|
35
28
|
strategy: "fixed",
|
|
36
29
|
placement: n ? "bottom" : s,
|
|
37
|
-
middleware: [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
middleware: [
|
|
31
|
+
k({
|
|
32
|
+
mainAxis: o
|
|
33
|
+
}),
|
|
34
|
+
S(),
|
|
35
|
+
$()
|
|
36
|
+
],
|
|
37
|
+
whileElementsMounted: y
|
|
41
38
|
});
|
|
42
39
|
return a.useLayoutEffect(() => {
|
|
43
|
-
|
|
44
|
-
}, [t,
|
|
40
|
+
c(t.current);
|
|
41
|
+
}, [t, c]), a.useLayoutEffect(() => {
|
|
45
42
|
r && u(t.current.offsetWidth);
|
|
46
|
-
}, [r, t]), i(W, {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
hasRadius: !0,
|
|
55
|
-
background: "neutral0",
|
|
56
|
-
padding: 1,
|
|
57
|
-
...l,
|
|
58
|
-
children: e
|
|
59
|
-
});
|
|
60
|
-
}, R = ({
|
|
61
|
-
children: t,
|
|
62
|
-
intersectionId: e,
|
|
63
|
-
onReachEnd: o,
|
|
64
|
-
...r
|
|
65
|
-
}) => {
|
|
43
|
+
}, [r, t]), i(W, { ref: b, style: {
|
|
44
|
+
left: h,
|
|
45
|
+
top: m,
|
|
46
|
+
position: g,
|
|
47
|
+
width: p || void 0
|
|
48
|
+
}, hasRadius: !0, background: "neutral0", padding: 1, ...l, children: e });
|
|
49
|
+
}, E = ({ children: t, intersectionId: e, onReachEnd: o, ...r }) => {
|
|
66
50
|
const s = a.useRef(null);
|
|
67
|
-
return
|
|
51
|
+
return v(s, o ?? (() => {
|
|
68
52
|
}), {
|
|
69
|
-
selectorToWatch: `#${e}`,
|
|
53
|
+
selectorToWatch: `#${CSS.escape(e ?? "")}`,
|
|
70
54
|
skipWhen: !e || !o
|
|
71
|
-
}), x(
|
|
72
|
-
|
|
73
|
-
...r,
|
|
74
|
-
children: [t, e && o && i(d, {
|
|
75
|
-
id: e,
|
|
76
|
-
width: "100%",
|
|
77
|
-
height: "1px"
|
|
78
|
-
})]
|
|
79
|
-
});
|
|
80
|
-
}, L = c(d)`
|
|
55
|
+
}), x(R, { ref: s, ...r, children: [t, e && o && i(d, { id: CSS.escape(e), width: "100%", height: "1px" })] });
|
|
56
|
+
}, R = f(d)`
|
|
81
57
|
// 16 is base base size, 3 is the factor to get closer to 40px and 5 is the number of elements visible in the list
|
|
82
58
|
max-height: ${3 * 5}rem;
|
|
83
59
|
overflow-y: auto;
|
|
@@ -89,44 +65,18 @@ const T = ["top", "top-start", "top-end", "right", "right-start", "right-end", "
|
|
|
89
65
|
}
|
|
90
66
|
|
|
91
67
|
&::-webkit-scrollbar-track {
|
|
92
|
-
background: ${({
|
|
93
|
-
theme: t
|
|
94
|
-
}) => t.colors.neutral0};
|
|
68
|
+
background: ${({ theme: t }) => t.colors.neutral0};
|
|
95
69
|
}
|
|
96
70
|
|
|
97
71
|
&::-webkit-scrollbar-thumb {
|
|
98
|
-
background: ${({
|
|
99
|
-
|
|
100
|
-
}) => t.colors.neutral150};
|
|
101
|
-
border-radius: ${({
|
|
102
|
-
theme: t
|
|
103
|
-
}) => t.borderRadius};
|
|
72
|
+
background: ${({ theme: t }) => t.colors.neutral150};
|
|
73
|
+
border-radius: ${({ theme: t }) => t.borderRadius};
|
|
104
74
|
margin-right: 10px;
|
|
105
75
|
}
|
|
106
|
-
`, B = ({
|
|
107
|
-
children: t,
|
|
108
|
-
source: e,
|
|
109
|
-
spacing: o,
|
|
110
|
-
fullWidth: r,
|
|
111
|
-
placement: s,
|
|
112
|
-
centered: n,
|
|
113
|
-
...l
|
|
114
|
-
}) => i(S, {
|
|
115
|
-
children: i(E, {
|
|
116
|
-
source: e,
|
|
117
|
-
spacing: o,
|
|
118
|
-
fullWidth: r,
|
|
119
|
-
placement: s,
|
|
120
|
-
centered: n,
|
|
121
|
-
children: i(R, {
|
|
122
|
-
...l,
|
|
123
|
-
children: t
|
|
124
|
-
})
|
|
125
|
-
})
|
|
126
|
-
});
|
|
76
|
+
`, B = ({ children: t, source: e, spacing: o, fullWidth: r, placement: s, centered: n, ...l }) => i(P, { children: i(C, { source: e, spacing: o, fullWidth: r, placement: s, centered: n, children: i(E, { ...l, children: t }) }) });
|
|
127
77
|
export {
|
|
128
|
-
|
|
78
|
+
C as Content,
|
|
129
79
|
T as POPOVER_PLACEMENTS,
|
|
130
80
|
B as Popover,
|
|
131
|
-
|
|
81
|
+
E as Scrolling
|
|
132
82
|
};
|
package/dist/Popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Popover.cjs"),e={Content:o.Content,Scrolling:o.Scrolling};exports.POPOVER_PLACEMENTS=o.POPOVER_PLACEMENTS;exports.Popover=o.Popover;exports.PopoverPrimitives=e;
|
package/dist/Portal/Portal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),l=require("react-dom"),u=require("../Box/Box.cjs");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=s(c),n=i.forwardRef(({container:e=globalThis?.document?.body,...r},t)=>e?l.createPortal(a.jsx(u.Box,{ref:t,...r}),e):null);n.displayName="Portal";exports.Portal=n;
|
package/dist/Portal/Portal.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}) => {
|
|
6
|
-
|
|
7
|
-
return e.useLayoutEffect(() => (t.current = document.createElement("div"), t.current.setAttribute("data-react-portal", "true"), document.body.appendChild(t.current), n(!0), () => {
|
|
8
|
-
t.current?.remove();
|
|
9
|
-
}), []), !u || !t.current ? null : o(r, t.current);
|
|
10
|
-
};
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { createPortal as e } from "react-dom";
|
|
4
|
+
import { Box as l } from "../Box/Box.js";
|
|
5
|
+
const f = a.forwardRef(({ container: o = globalThis?.document?.body, ...r }, t) => o ? e(m(l, { ref: t, ...r }), o) : null);
|
|
6
|
+
f.displayName = "Portal";
|
|
11
7
|
export {
|
|
12
|
-
|
|
8
|
+
f as Portal
|
|
13
9
|
};
|
package/dist/Portal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Portal.cjs");exports.Portal=t.Portal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime");require("react");const r=require("prop-types"),l=require("styled-components"),d=require("../Box/Box.cjs"),b=l(d.Box)`
|
|
2
2
|
&:before {
|
|
3
3
|
background-color: ${({theme:e})=>e.colors.neutral0};
|
|
4
4
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
top: 0;
|
|
9
9
|
width: ${({value:e})=>`${e}%`};
|
|
10
10
|
}
|
|
11
|
-
`,o=({min:e,max:
|
|
11
|
+
`,o=({min:e,max:i,value:a,children:t,size:s,...n})=>u.jsx(b,{background:"neutral600",hasRadius:!0,"aria-label":t,"aria-valuemax":i,"aria-valuemin":e,"aria-valuenow":a,height:s==="S"?1:2,position:"relative",role:"progressbar",value:a,width:s==="S"?"78px":"102px",...n});o.defaultProps={min:0,max:100,value:0,size:"M"};o.propTypes={children:r.node.isRequired,max:r.number,min:r.number,size:r.oneOf(["S","M"]),value:r.number};exports.ProgressBar=o;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import o from "prop-types";
|
|
4
|
+
import u from "styled-components";
|
|
5
|
+
import { Box as p } from "../Box/Box.js";
|
|
6
|
+
const l = u(p)`
|
|
6
7
|
&:before {
|
|
7
8
|
background-color: ${({ theme: r }) => r.colors.neutral0};
|
|
8
9
|
border-radius: ${({ theme: r }) => r.borderRadius};
|
|
@@ -12,36 +13,36 @@ const p = m(l)`
|
|
|
12
13
|
top: 0;
|
|
13
14
|
width: ${({ value: r }) => `${r}%`};
|
|
14
15
|
}
|
|
15
|
-
`,
|
|
16
|
-
|
|
16
|
+
`, i = ({ min: r, max: t, value: e, children: s, size: a, ...n }) => /* @__PURE__ */ m(
|
|
17
|
+
l,
|
|
17
18
|
{
|
|
18
19
|
background: "neutral600",
|
|
19
20
|
hasRadius: !0,
|
|
20
21
|
"aria-label": s,
|
|
21
|
-
"aria-valuemax":
|
|
22
|
+
"aria-valuemax": t,
|
|
22
23
|
"aria-valuemin": r,
|
|
23
|
-
"aria-valuenow":
|
|
24
|
+
"aria-valuenow": e,
|
|
24
25
|
height: a === "S" ? 1 : 2,
|
|
25
26
|
position: "relative",
|
|
26
27
|
role: "progressbar",
|
|
27
|
-
value:
|
|
28
|
+
value: e,
|
|
28
29
|
width: a === "S" ? "78px" : "102px",
|
|
29
30
|
...n
|
|
30
31
|
}
|
|
31
32
|
);
|
|
32
|
-
|
|
33
|
+
i.defaultProps = {
|
|
33
34
|
min: 0,
|
|
34
35
|
max: 100,
|
|
35
36
|
value: 0,
|
|
36
37
|
size: "M"
|
|
37
38
|
};
|
|
38
|
-
|
|
39
|
-
children:
|
|
40
|
-
max:
|
|
41
|
-
min:
|
|
42
|
-
size:
|
|
43
|
-
value:
|
|
39
|
+
i.propTypes = {
|
|
40
|
+
children: o.node.isRequired,
|
|
41
|
+
max: o.number,
|
|
42
|
+
min: o.number,
|
|
43
|
+
size: o.oneOf(["S", "M"]),
|
|
44
|
+
value: o.number
|
|
44
45
|
};
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
i as ProgressBar
|
|
47
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./ProgressBar.cjs");exports.ProgressBar=r.ProgressBar;
|
package/dist/Radio/Radio.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const r=require("prop-types"),t=require("styled-components"),n=require("../BaseRadio/BaseRadio.cjs"),a=require("../Typography/Typography.cjs"),u=require("../Box/Box.cjs"),d=t(a.Typography)`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
|
-
`,
|
|
4
|
+
`,i=({children:o,...s})=>e.jsxs(d,{as:"label",textColor:"neutral800",children:[e.jsx(n.BaseRadio,{...s}),e.jsx(u.Box,{paddingLeft:2,children:o})]});i.propTypes={children:r.node.isRequired,value:r.any.isRequired};exports.Radio=i;
|
package/dist/Radio/Radio.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { Typography as
|
|
7
|
-
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import o from "prop-types";
|
|
4
|
+
import p from "styled-components";
|
|
5
|
+
import { BaseRadio as m } from "../BaseRadio/BaseRadio.js";
|
|
6
|
+
import { Typography as s } from "../Typography/Typography.js";
|
|
7
|
+
import { Box as a } from "../Box/Box.js";
|
|
8
|
+
const l = p(s)`
|
|
8
9
|
display: flex;
|
|
9
10
|
align-items: center;
|
|
10
|
-
`,
|
|
11
|
-
|
|
12
|
-
children:
|
|
13
|
-
|
|
11
|
+
`, d = ({ children: e, ...i }) => /* @__PURE__ */ t(l, { as: "label", textColor: "neutral800", children: [
|
|
12
|
+
/* @__PURE__ */ r(m, { ...i }),
|
|
13
|
+
/* @__PURE__ */ r(a, { paddingLeft: 2, children: e })
|
|
14
|
+
] });
|
|
15
|
+
d.propTypes = {
|
|
16
|
+
children: o.node.isRequired,
|
|
17
|
+
value: o.any.isRequired
|
|
14
18
|
};
|
|
15
19
|
export {
|
|
16
|
-
|
|
20
|
+
d as Radio
|
|
17
21
|
};
|
package/dist/Radio/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Radio.cjs"),e=require("../BaseRadio/RadioGroup.cjs");exports.Radio=o.Radio;exports.RadioGroup=e.RadioGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),l=require("react"),F=require("./RawTableContext.cjs"),s=require("../helpers/getFocusableNodes.cjs"),d=require("../helpers/keyboardKeys.cjs"),v=require("../Box/Box.cjs"),w=n=>g.jsx(y,{...n,as:"th"}),y=({coords:n={col:0,row:0},as:h="td",...x})=>{const a=l.useRef(null),{rowIndex:T,colIndex:E,setTableValues:N}=F.useTable(),[c,f]=l.useState(!1),K=e=>{const t=s.getFocusableNodes(a.current,!0);if(t.length===0||t.length===1&&s.getFocusableNodesWithKeyboardNav(t).length===0)return;if(t.length>1&&!t.find(u=>u.tagName!=="BUTTON")){e.preventDefault();const u=t.findIndex(r=>r===document.activeElement);if(e.key===d.KeyboardKeys.RIGHT){const r=t[u+1];r&&(e.stopPropagation(),r.focus())}else if(e.key===d.KeyboardKeys.LEFT){const r=t[u-1];r&&(e.stopPropagation(),r.focus())}return}const o=e.key===d.KeyboardKeys.ENTER;if(o&&!c)f(!0);else if((e.key===d.KeyboardKeys.ESCAPE||o)&&c){if(o&&document.activeElement?.tagName==="A")return;f(!1),a.current.focus()}else c&&e.stopPropagation()},i=T===n.row-1&&E===n.col-1;l.useLayoutEffect(()=>{const e=s.getFocusableNodes(a.current,!0);e.length===0||e.length===1&&s.getFocusableNodesWithKeyboardNav(e).length!==0||e.length>1&&e.find(t=>t.tagName!=="BUTTON")?(a.current.setAttribute("tabIndex",!c&&i?"0":"-1"),e.forEach((t,o)=>{t.setAttribute("tabIndex",c?"0":"-1"),c&&o===0&&t.focus()})):e.forEach(t=>{t.setAttribute("tabIndex",i?"0":"-1")})},[c,i]);const b=l.useCallback(()=>{const e=s.getFocusableNodes(a.current,!0);e.length>=1&&(s.getFocusableNodesWithKeyboardNav(e).length!==0||!e.find(t=>t.tagName!=="BUTTON"))&&f(!0),N({rowIndex:n.row-1,colIndex:n.col-1})},[n,N]);return l.useLayoutEffect(()=>{const e=a.current;return s.getFocusableNodes(e,!0).forEach(o=>{o.addEventListener("focus",b)}),()=>{s.getFocusableNodes(e,!0).forEach(u=>{u.removeEventListener("focus",b)})}},[b]),g.jsx(v.Box,{role:"gridcell",as:h,ref:a,onKeyDown:K,...x})};exports.RawTd=y;exports.RawTh=w;
|
package/dist/RawTable/RawCell.js
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
import { jsx as g } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as y, useState as I, useLayoutEffect as N, useCallback as v } from "react";
|
|
3
3
|
import { useTable as w } from "./RawTableContext.js";
|
|
4
|
-
import { Box as A } from "../Box/Box.js";
|
|
5
4
|
import { getFocusableNodes as u, getFocusableNodesWithKeyboardNav as b } from "../helpers/getFocusableNodes.js";
|
|
6
5
|
import { KeyboardKeys as f } from "../helpers/keyboardKeys.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}), B = ({
|
|
11
|
-
coords: n = {
|
|
12
|
-
col: 0,
|
|
13
|
-
row: 0
|
|
14
|
-
},
|
|
15
|
-
as: h = "td",
|
|
16
|
-
...E
|
|
17
|
-
}) => {
|
|
18
|
-
const s = y(null), {
|
|
19
|
-
rowIndex: p,
|
|
20
|
-
colIndex: x,
|
|
21
|
-
setTableValues: m
|
|
22
|
-
} = w(), [r, l] = I(!1), T = (e) => {
|
|
6
|
+
import { Box as A } from "../Box/Box.js";
|
|
7
|
+
const D = (n) => g(B, { ...n, as: "th" }), B = ({ coords: n = { col: 0, row: 0 }, as: h = "td", ...E }) => {
|
|
8
|
+
const s = y(null), { rowIndex: p, colIndex: x, setTableValues: m } = w(), [r, l] = I(!1), T = (e) => {
|
|
23
9
|
const t = u(s.current, !0);
|
|
24
10
|
if (t.length === 0 || t.length === 1 && b(t).length === 0)
|
|
25
11
|
return;
|
|
@@ -47,7 +33,7 @@ const D = (n) => g(B, {
|
|
|
47
33
|
}, i = p === n.row - 1 && x === n.col - 1;
|
|
48
34
|
N(() => {
|
|
49
35
|
const e = u(s.current, !0);
|
|
50
|
-
e.length === 0 || e.length === 1 && b(e).length !== 0 || e.length > 1 &&
|
|
36
|
+
e.length === 0 || e.length === 1 && b(e).length !== 0 || e.length > 1 && e.find((t) => t.tagName !== "BUTTON") ? (s.current.setAttribute("tabIndex", !r && i ? "0" : "-1"), e.forEach((t, o) => {
|
|
51
37
|
t.setAttribute("tabIndex", r ? "0" : "-1"), r && o === 0 && t.focus();
|
|
52
38
|
})) : e.forEach((t) => {
|
|
53
39
|
t.setAttribute("tabIndex", i ? "0" : "-1");
|
|
@@ -55,10 +41,7 @@ const D = (n) => g(B, {
|
|
|
55
41
|
}, [r, i]);
|
|
56
42
|
const d = v(() => {
|
|
57
43
|
const e = u(s.current, !0);
|
|
58
|
-
e.length >= 1 && (b(e).length !== 0 || !e.find((t) => t.tagName !== "BUTTON")) && l(!0), m({
|
|
59
|
-
rowIndex: n.row - 1,
|
|
60
|
-
colIndex: n.col - 1
|
|
61
|
-
});
|
|
44
|
+
e.length >= 1 && (b(e).length !== 0 || !e.find((t) => t.tagName !== "BUTTON")) && l(!0), m({ rowIndex: n.row - 1, colIndex: n.col - 1 });
|
|
62
45
|
}, [n, m]);
|
|
63
46
|
return N(() => {
|
|
64
47
|
const e = s.current;
|
|
@@ -69,13 +52,7 @@ const D = (n) => g(B, {
|
|
|
69
52
|
a.removeEventListener("focus", d);
|
|
70
53
|
});
|
|
71
54
|
};
|
|
72
|
-
}, [d]), g(A, {
|
|
73
|
-
role: "gridcell",
|
|
74
|
-
as: h,
|
|
75
|
-
ref: s,
|
|
76
|
-
onKeyDown: T,
|
|
77
|
-
...E
|
|
78
|
-
});
|
|
55
|
+
}, [d]), g(A, { role: "gridcell", as: h, ref: s, onKeyDown: T, ...E });
|
|
79
56
|
};
|
|
80
57
|
export {
|
|
81
58
|
B as RawTd,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("react"),P=require("./focusFocusable.cjs"),R=require("./RawTableContext.cjs"),t=require("../helpers/keyboardKeys.cjs"),q=({colCount:l,rowCount:c,jumpStep:b=3,initialCol:D=0,initialRow:k=0,...d})=>{const f=r.useRef(null),n=r.useRef(!1),[o,s]=r.useState(k),[y,u]=r.useState(D),K=r.useCallback(({colIndex:a,rowIndex:e})=>{u(a),s(e)},[]);r.useEffect(()=>{n.current&&P.focusFocusable(f.current),n.current||(n.current=!0)},[y,o]);const T=a=>{switch(a.key){case t.KeyboardKeys.RIGHT:{a.preventDefault(),u(e=>e<l-1?e+1:e);break}case t.KeyboardKeys.LEFT:{a.preventDefault(),u(e=>e>0?e-1:e);break}case t.KeyboardKeys.UP:{a.preventDefault(),s(e=>e>0?e-1:e);break}case t.KeyboardKeys.DOWN:{a.preventDefault(),s(e=>e<c-1?e+1:e);break}case t.KeyboardKeys.HOME:{a.preventDefault(),a.ctrlKey&&s(0),u(0);break}case t.KeyboardKeys.END:{a.preventDefault(),a.ctrlKey&&s(c-1),u(l-1);break}case t.KeyboardKeys.PAGE_DOWN:{a.preventDefault(),s(e=>e+b<c?e+b:c-1);break}case t.KeyboardKeys.PAGE_UP:{a.preventDefault(),s(e=>e-b>0?e-b:0);break}}},E=r.useMemo(()=>({rowIndex:o,colIndex:y,setTableValues:K}),[y,o,K]);return i.jsx(R.RawTableContext.Provider,{value:E,children:i.jsx("table",{role:"grid",ref:f,"aria-rowcount":c,"aria-colcount":l,onKeyDown:T,...d})})};exports.RawTable=q;
|
|
@@ -3,18 +3,8 @@ import { useRef as k, useState as m, useCallback as h, useEffect as G, useMemo a
|
|
|
3
3
|
import { focusFocusable as O } from "./focusFocusable.js";
|
|
4
4
|
import { RawTableContext as A } from "./RawTableContext.js";
|
|
5
5
|
import { KeyboardKeys as a } from "../helpers/keyboardKeys.js";
|
|
6
|
-
const _ = ({
|
|
7
|
-
|
|
8
|
-
rowCount: c,
|
|
9
|
-
jumpStep: f = 3,
|
|
10
|
-
initialCol: y = 0,
|
|
11
|
-
initialRow: E = 0,
|
|
12
|
-
...K
|
|
13
|
-
}) => {
|
|
14
|
-
const b = k(null), n = k(!1), [u, r] = m(E), [o, s] = m(y), i = h(({
|
|
15
|
-
colIndex: t,
|
|
16
|
-
rowIndex: e
|
|
17
|
-
}) => {
|
|
6
|
+
const _ = ({ colCount: l, rowCount: c, jumpStep: f = 3, initialCol: y = 0, initialRow: E = 0, ...K }) => {
|
|
7
|
+
const b = k(null), n = k(!1), [u, r] = m(E), [o, s] = m(y), i = h(({ colIndex: t, rowIndex: e }) => {
|
|
18
8
|
s(t), r(e);
|
|
19
9
|
}, []);
|
|
20
10
|
G(() => {
|
|
@@ -55,22 +45,8 @@ const _ = ({
|
|
|
55
45
|
break;
|
|
56
46
|
}
|
|
57
47
|
}
|
|
58
|
-
}, T = N(() => ({
|
|
59
|
-
|
|
60
|
-
colIndex: o,
|
|
61
|
-
setTableValues: i
|
|
62
|
-
}), [o, u, i]);
|
|
63
|
-
return D(A.Provider, {
|
|
64
|
-
value: T,
|
|
65
|
-
children: D("table", {
|
|
66
|
-
role: "grid",
|
|
67
|
-
ref: b,
|
|
68
|
-
"aria-rowcount": c,
|
|
69
|
-
"aria-colcount": l,
|
|
70
|
-
onKeyDown: P,
|
|
71
|
-
...K
|
|
72
|
-
})
|
|
73
|
-
});
|
|
48
|
+
}, T = N(() => ({ rowIndex: u, colIndex: o, setTableValues: i }), [o, u, i]);
|
|
49
|
+
return D(A.Provider, { value: T, children: D("table", { role: "grid", ref: b, "aria-rowcount": c, "aria-colcount": l, onKeyDown: P, ...K }) });
|
|
74
50
|
};
|
|
75
51
|
export {
|
|
76
52
|
_ as RawTable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext({rowIndex:0,colIndex:0,setTableValues(){throw new Error("setTableValues must be initialized via the RawTableContext.Provider")}}),a=()=>e.useContext(t);exports.RawTableContext=t;exports.useTable=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("react"),l=({children:t,...n})=>{const o=r.Children.toArray(t).map((e,i)=>r.isValidElement(e)?r.cloneElement(e,{"aria-rowindex":i+2}):e);return a.jsx("tbody",{...n,children:o})};exports.RawTbody=l;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { Children as m, isValidElement as a, cloneElement as l } from "react";
|
|
3
|
-
const s = ({
|
|
4
|
-
|
|
5
|
-
...n
|
|
6
|
-
}) => {
|
|
7
|
-
const o = m.toArray(e).map((r, t) => a(r) ? l(r, {
|
|
8
|
-
"aria-rowindex": t + 2
|
|
9
|
-
}) : r);
|
|
10
|
-
return i("tbody", {
|
|
11
|
-
...n,
|
|
12
|
-
children: o
|
|
13
|
-
});
|
|
3
|
+
const s = ({ children: e, ...n }) => {
|
|
4
|
+
const o = m.toArray(e).map((r, t) => a(r) ? l(r, { "aria-rowindex": t + 2 }) : r);
|
|
5
|
+
return i("tbody", { ...n, children: o });
|
|
14
6
|
};
|
|
15
7
|
export {
|
|
16
8
|
s as RawTbody
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("react"),o=({children:t,...n})=>{const a=r.Children.toArray(t).map(e=>r.isValidElement(e)?r.cloneElement(e,{"aria-rowindex":1}):e);return i.jsx("thead",{...n,children:a})};exports.RawThead=o;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Children as a, isValidElement as i, cloneElement as m } from "react";
|
|
3
|
-
const p = ({
|
|
4
|
-
|
|
5
|
-
...n
|
|
6
|
-
}) => {
|
|
7
|
-
const t = a.toArray(e).map((r) => i(r) ? m(r, {
|
|
8
|
-
"aria-rowindex": 1
|
|
9
|
-
}) : r);
|
|
10
|
-
return o("thead", {
|
|
11
|
-
...n,
|
|
12
|
-
children: t
|
|
13
|
-
});
|
|
3
|
+
const p = ({ children: e, ...n }) => {
|
|
4
|
+
const t = a.toArray(e).map((r) => i(r) ? m(r, { "aria-rowindex": 1 }) : r);
|
|
5
|
+
return o("thead", { ...n, children: t });
|
|
14
6
|
};
|
|
15
7
|
export {
|
|
16
8
|
p as RawThead
|
package/dist/RawTable/RawTr.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("react"),c=require("../Box/Box.cjs"),l=({children:o,...t})=>{const i=r.Children.toArray(o).map((e,n)=>r.isValidElement(e)?r.cloneElement(e,{"aria-colindex":n+1,coords:{col:n+1,row:t["aria-rowindex"]}}):e);return a.jsx(c.Box,{as:"tr",...t,children:i})};exports.RawTr=l;
|
package/dist/RawTable/RawTr.js
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { Children as a, isValidElement as m, cloneElement as l } from "react";
|
|
3
3
|
import { Box as c } from "../Box/Box.js";
|
|
4
|
-
const x = ({
|
|
5
|
-
children: n,
|
|
6
|
-
...o
|
|
7
|
-
}) => {
|
|
4
|
+
const x = ({ children: n, ...o }) => {
|
|
8
5
|
const t = a.toArray(n).map((r, e) => m(r) ? l(r, {
|
|
9
6
|
"aria-colindex": e + 1,
|
|
10
|
-
coords: {
|
|
11
|
-
col: e + 1,
|
|
12
|
-
row: o["aria-rowindex"]
|
|
13
|
-
}
|
|
7
|
+
coords: { col: e + 1, row: o["aria-rowindex"] }
|
|
14
8
|
}) : r);
|
|
15
|
-
return i(c, {
|
|
16
|
-
as: "tr",
|
|
17
|
-
...o,
|
|
18
|
-
children: t
|
|
19
|
-
});
|
|
9
|
+
return i(c, { as: "tr", ...o, children: t });
|
|
20
10
|
};
|
|
21
11
|
export {
|
|
22
12
|
x as RawTr
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=o=>{const e=o.querySelector('[tabindex="0"]');e&&e.focus()};exports.focusFocusable=t;
|
package/dist/RawTable/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./RawTable.cjs"),a=require("./RawCell.cjs"),r=require("./RawThead.cjs"),w=require("./RawTbody.cjs"),R=require("./RawTr.cjs");exports.RawTable=e.RawTable;exports.RawTd=a.RawTd;exports.RawTh=a.RawTh;exports.RawThead=r.RawThead;exports.RawTbody=w.RawTbody;exports.RawTr=R.RawTr;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("react");const o=e=>r.jsx("form",{...e,role:"search"});exports.SearchForm=o;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
const t = (r) => /* @__PURE__ */ o("form", { ...r, role: "search" });
|
|
3
4
|
export {
|
|
4
5
|
t as SearchForm
|
|
5
6
|
};
|