@strapi/design-system 0.0.0-599b75fb-test → 0.0.0-622b91ef
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 +47 -0
- 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 +3 -3
- 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 +23 -29
- package/dist/Alert/Alert.js +33 -111
- package/dist/Alert/index.cjs +1 -1
- package/dist/Alert/utils.cjs +1 -1
- package/dist/Alert/utils.js +14 -3
- 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 +2 -2
- package/dist/Badge/Badge.js +4 -33
- package/dist/Badge/index.cjs +1 -1
- package/dist/BaseButton/BaseButton.cjs +4 -4
- package/dist/BaseButton/BaseButton.js +15 -38
- 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 -3
- package/dist/BaseLink/BaseLink.js +2 -18
- package/dist/BaseLink/index.cjs +1 -1
- package/dist/BaseRadio/BaseRadio.cjs +2 -2
- 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 +3 -3
- package/dist/Box/Box.js +47 -173
- package/dist/Box/index.cjs +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.js +10 -43
- package/dist/Breadcrumbs/index.cjs +1 -1
- package/dist/Button/Button.cjs +10 -5
- package/dist/Button/Button.js +27 -69
- 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 +3 -3
- package/dist/Card/CardAsset.js +5 -25
- package/dist/Card/CardBadge.cjs +2 -2
- 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 -7
- package/dist/CarouselInput/Carousel.js +24 -69
- package/dist/CarouselInput/CarouselActions.cjs +1 -1
- package/dist/CarouselInput/CarouselActions.js +4 -16
- package/dist/CarouselInput/CarouselImage.cjs +3 -4
- package/dist/CarouselInput/CarouselImage.js +13 -22
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +12 -72
- package/dist/CarouselInput/CarouselSlide.cjs +1 -3
- package/dist/CarouselInput/CarouselSlide.js +4 -28
- package/dist/CarouselInput/index.cjs +1 -1
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.js +21 -38
- package/dist/Checkbox/index.cjs +1 -1
- package/dist/Combobox/Combobox.cjs +107 -1
- package/dist/Combobox/Combobox.js +168 -280
- package/dist/Combobox/ComboboxList.cjs +5 -1
- package/dist/Combobox/ComboboxList.js +8 -6
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/ComboboxOption.js +3 -29
- package/dist/Combobox/index.cjs +1 -1
- package/dist/DatePicker/DatePicker.cjs +85 -5
- package/dist/DatePicker/DatePicker.js +423 -76
- package/dist/DatePicker/index.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.cjs +7 -1
- package/dist/DateTimePicker/DateTimePicker.js +96 -103
- package/dist/DateTimePicker/index.cjs +1 -1
- package/dist/DateTimePicker/index.js +3 -2
- package/dist/DesignSystemProvider.cjs +1 -0
- package/dist/DesignSystemProvider.js +10 -0
- package/dist/Dialog/Dialog.cjs +4 -4
- package/dist/Dialog/Dialog.js +20 -45
- package/dist/Dialog/DialogBody.cjs +2 -2
- package/dist/Dialog/DialogBody.js +9 -18
- package/dist/Dialog/DialogFooter.cjs +2 -2
- package/dist/Dialog/DialogFooter.js +7 -17
- 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 +6 -15
- package/dist/Divider/index.cjs +1 -1
- package/dist/EmptyStateLayout/EmptyStateLayout.cjs +2 -7
- package/dist/EmptyStateLayout/EmptyStateLayout.js +8 -25
- package/dist/EmptyStateLayout/index.cjs +1 -1
- package/dist/EmptyStateLayout/story-assets/Illo.cjs +1 -1
- package/dist/EmptyStateLayout/story-assets/Illo.js +3 -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 +4 -14
- package/dist/Field/FieldInput.cjs +4 -4
- 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 +4 -4
- 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 +10 -20
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.js +10 -26
- package/dist/Grid/index.cjs +1 -1
- package/dist/Icon/Icon.cjs +3 -3
- 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 +34 -85
- 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 +1 -9
- package/dist/Layout/ActionLayout.js +4 -23
- package/dist/Layout/ContentLayout.cjs +1 -1
- package/dist/Layout/ContentLayout.js +3 -7
- package/dist/Layout/GridLayout.cjs +3 -3
- package/dist/Layout/GridLayout.js +4 -8
- package/dist/Layout/HeaderLayout.cjs +4 -3
- package/dist/Layout/HeaderLayout.js +25 -96
- package/dist/Layout/Layout.cjs +4 -4
- package/dist/Layout/Layout.js +8 -16
- package/dist/Layout/TwoColsLayout.cjs +1 -1
- package/dist/Layout/TwoColsLayout.js +6 -11
- package/dist/Layout/index.cjs +1 -1
- package/dist/Link/Link.cjs +4 -4
- package/dist/Link/Link.js +9 -53
- package/dist/Link/index.cjs +1 -1
- package/dist/LinkButton/LinkButton.cjs +2 -2
- 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 +2 -2
- 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 +6 -15
- package/dist/Main/SkipToContent.cjs +4 -7
- package/dist/Main/SkipToContent.js +5 -24
- package/dist/Main/index.cjs +1 -1
- package/dist/MainNav/MainNav.cjs +2 -2
- package/dist/MainNav/MainNav.js +9 -30
- package/dist/MainNav/MainNavContext.cjs +1 -1
- package/dist/MainNav/MainNavContext.js +1 -1
- package/dist/MainNav/NavBrand.cjs +3 -3
- package/dist/MainNav/NavBrand.js +14 -24
- package/dist/MainNav/NavCondense.cjs +2 -2
- package/dist/MainNav/NavCondense.js +10 -14
- package/dist/MainNav/NavFooter.cjs +1 -1
- package/dist/MainNav/NavFooter.js +4 -9
- package/dist/MainNav/NavLink.cjs +6 -6
- package/dist/MainNav/NavLink.js +39 -51
- package/dist/MainNav/NavSection.cjs +1 -1
- package/dist/MainNav/NavSection.js +9 -33
- package/dist/MainNav/NavSections.cjs +2 -2
- package/dist/MainNav/NavSections.js +8 -21
- package/dist/MainNav/NavUser.cjs +2 -2
- package/dist/MainNav/NavUser.js +14 -25
- package/dist/MainNav/index.cjs +1 -1
- package/dist/ModalLayout/ModalBody.cjs +2 -2
- package/dist/ModalLayout/ModalBody.js +6 -6
- package/dist/ModalLayout/ModalContext.cjs +1 -1
- package/dist/ModalLayout/ModalContext.js +2 -1
- package/dist/ModalLayout/ModalFooter.cjs +2 -6
- package/dist/ModalLayout/ModalFooter.js +8 -21
- package/dist/ModalLayout/ModalHeader.cjs +2 -2
- package/dist/ModalLayout/ModalHeader.js +13 -21
- package/dist/ModalLayout/ModalLayout.cjs +3 -5
- package/dist/ModalLayout/ModalLayout.js +12 -31
- package/dist/ModalLayout/index.cjs +1 -1
- package/dist/NumberInput/NumberInput.cjs +2 -2
- package/dist/NumberInput/NumberInput.js +69 -162
- package/dist/NumberInput/index.cjs +1 -1
- package/dist/Pagination/Pagination.cjs +1 -5
- package/dist/Pagination/Pagination.js +8 -21
- package/dist/Pagination/PaginationContext.cjs +1 -1
- package/dist/Pagination/components.cjs +10 -13
- package/dist/Pagination/components.js +33 -69
- package/dist/Pagination/index.cjs +1 -1
- package/dist/Popover/Popover.cjs +4 -5
- package/dist/Popover/Popover.js +105 -110
- package/dist/Popover/index.cjs +1 -1
- package/dist/Popover/index.js +5 -9
- package/dist/Popover/primitives.cjs +1 -0
- package/dist/Popover/primitives.js +5 -0
- 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 +5 -5
- package/dist/ProgressBar/ProgressBar.js +6 -36
- package/dist/ProgressBar/index.cjs +1 -1
- package/dist/Radio/Radio.cjs +1 -4
- package/dist/Radio/Radio.js +6 -15
- 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 -3
- package/dist/Searchbar/Searchbar.cjs +10 -11
- package/dist/Searchbar/Searchbar.js +31 -59
- package/dist/Searchbar/index.cjs +1 -1
- package/dist/Select/MultiSelect.cjs +30 -0
- package/dist/Select/MultiSelect.js +75 -0
- package/dist/Select/MultiSelectNested.cjs +3 -1
- package/dist/Select/MultiSelectNested.js +7 -12
- package/dist/Select/OptGroup.cjs +5 -1
- package/dist/Select/OptGroup.js +8 -22
- package/dist/Select/Option.cjs +5 -45
- package/dist/Select/Option.js +13 -99
- package/dist/Select/Select.cjs +6 -3
- package/dist/Select/Select.js +16 -206
- package/dist/Select/SelectList.cjs +5 -1
- package/dist/Select/SelectList.js +67 -69
- package/dist/Select/SelectParts.cjs +83 -0
- package/dist/Select/SelectParts.js +110 -0
- package/dist/Select/SingleSelect.cjs +1 -0
- package/dist/Select/SingleSelect.js +44 -0
- package/dist/Select/index.cjs +1 -1
- package/dist/Select/index.js +17 -10
- package/dist/SimpleMenu/SimpleMenu.cjs +9 -9
- package/dist/SimpleMenu/SimpleMenu.js +73 -143
- package/dist/SimpleMenu/index.cjs +1 -1
- package/dist/SimpleMenu/utils.cjs +1 -1
- package/dist/Stack/Stack.cjs +5 -5
- 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 +12 -38
- package/dist/Status/index.cjs +1 -1
- package/dist/SubNav/SubNav.cjs +5 -5
- package/dist/SubNav/SubNav.js +8 -13
- package/dist/SubNav/SubNavHeader.cjs +3 -3
- package/dist/SubNav/SubNavHeader.js +32 -69
- package/dist/SubNav/SubNavLink.cjs +13 -13
- package/dist/SubNav/SubNavLink.js +18 -44
- package/dist/SubNav/SubNavLinkSection.cjs +4 -4
- package/dist/SubNav/SubNavLinkSection.js +15 -24
- package/dist/SubNav/SubNavSection.cjs +2 -2
- package/dist/SubNav/SubNavSection.js +16 -49
- package/dist/SubNav/SubNavSectionLabel.cjs +3 -3
- package/dist/SubNav/SubNavSectionLabel.js +11 -36
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.js +5 -18
- package/dist/SubNav/index.cjs +1 -1
- package/dist/Switch/Switch.cjs +3 -3
- package/dist/Switch/Switch.js +15 -44
- package/dist/Switch/index.cjs +1 -1
- package/dist/Table/Cell.cjs +3 -3
- package/dist/Table/Cell.js +9 -18
- package/dist/Table/TFooter.cjs +3 -3
- package/dist/Table/TFooter.js +11 -16
- package/dist/Table/Table.cjs +12 -12
- package/dist/Table/Table.js +16 -24
- package/dist/Table/Tbody.cjs +2 -2
- package/dist/Table/Tbody.js +6 -6
- package/dist/Table/Thead.cjs +2 -2
- package/dist/Table/Thead.js +6 -6
- package/dist/Table/Tr.cjs +2 -2
- package/dist/Table/Tr.js +6 -6
- package/dist/Table/index.cjs +1 -1
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +13 -36
- package/dist/Tabs/TabPanels.cjs +1 -1
- package/dist/Tabs/TabPanels.js +11 -21
- package/dist/Tabs/Tabs.cjs +2 -2
- package/dist/Tabs/Tabs.js +56 -106
- package/dist/Tabs/TabsContext.cjs +1 -1
- package/dist/Tabs/TabsContext.js +11 -4
- package/dist/Tabs/components.cjs +17 -17
- package/dist/Tabs/index.cjs +1 -1
- package/dist/Tag/Tag.cjs +4 -4
- package/dist/Tag/Tag.js +6 -43
- package/dist/Tag/index.cjs +1 -1
- package/dist/TextButton/TextButton.cjs +6 -12
- package/dist/TextButton/TextButton.js +17 -60
- 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 +14 -12
- package/dist/Textarea/Textarea.js +33 -52
- package/dist/Textarea/index.cjs +1 -1
- package/dist/ThemeProvider/ThemeProvider.cjs +2 -2
- package/dist/ThemeProvider/ThemeProvider.js +5 -12
- package/dist/ThemeProvider/hooks.cjs +1 -1
- package/dist/ThemeProvider/index.cjs +1 -1
- package/dist/TimePicker/TimePicker.cjs +5 -7
- package/dist/TimePicker/TimePicker.js +79 -53
- package/dist/TimePicker/index.cjs +1 -1
- package/dist/TimePicker/index.js +3 -2
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
- package/dist/ToggleCheckbox/ToggleCheckbox.js +27 -122
- package/dist/ToggleCheckbox/index.cjs +1 -1
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.js +15 -62
- 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 +2 -2
- package/dist/Typography/Typography.js +11 -26
- 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 +1 -1
- package/dist/VisuallyHidden/index.cjs +1 -1
- package/dist/helpers/context.cjs +1 -0
- package/dist/helpers/context.js +21 -0
- package/dist/helpers/deprecations.cjs +1 -1
- package/dist/helpers/getDefaultLocale.cjs +4 -1
- package/dist/helpers/getDefaultLocale.js +7 -2
- package/dist/helpers/getFocusableNodes.cjs +1 -1
- package/dist/helpers/keyboardKeys.cjs +1 -1
- package/dist/helpers/objects.cjs +1 -1
- package/dist/helpers/objects.js +6 -22
- package/dist/helpers/setOpacity.cjs +1 -1
- package/dist/helpers/setTabIndexOnFirstItem.cjs +1 -1
- package/dist/helpers/strings.cjs +1 -0
- package/dist/helpers/strings.js +4 -0
- 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 -0
- package/dist/hooks/useComposeRefs.js +14 -0
- package/dist/hooks/useControllableState.cjs +1 -1
- package/dist/hooks/useControllableState.js +7 -7
- package/dist/hooks/useDateFormatter.cjs +1 -0
- package/dist/hooks/useDateFormatter.js +20 -0
- package/dist/hooks/useElementOnScreen.cjs +1 -1
- package/dist/hooks/useId.cjs +1 -1
- package/dist/hooks/useIntersection.cjs +1 -1
- package/dist/hooks/useIntersection.js +8 -8
- package/dist/hooks/useLockScroll.cjs +1 -1
- package/dist/hooks/usePrevious.cjs +1 -1
- package/dist/hooks/useResizeObserver.cjs +1 -1
- package/dist/hooks/useResizeObserver.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +305 -293
- 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 +4 -4
- package/dist/themes/extendTheme.js +21 -13
- 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 +4 -4
- package/dist/themes/utils.js +7 -6
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +15 -19
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
- package/dist/v2/Breadcrumbs/Crumb.js +5 -23
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbLink.js +6 -14
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +4 -3
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +11 -16
- package/dist/v2/Breadcrumbs/Divider.cjs +1 -1
- package/dist/v2/Breadcrumbs/Divider.js +5 -5
- package/dist/v2/Breadcrumbs/index.cjs +1 -1
- package/dist/v2/Link/Link.cjs +13 -11
- package/dist/v2/Link/Link.js +23 -37
- package/dist/v2/Link/index.cjs +1 -1
- package/dist/v2/LinkButton/LinkButton.cjs +2 -2
- 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 +9 -30
- package/dist/v2/MainNav/MainNavContext.cjs +1 -1
- package/dist/v2/MainNav/MainNavContext.js +1 -1
- package/dist/v2/MainNav/NavBrand.cjs +3 -3
- package/dist/v2/MainNav/NavBrand.js +16 -23
- package/dist/v2/MainNav/NavCondense.cjs +2 -5
- package/dist/v2/MainNav/NavCondense.js +19 -22
- package/dist/v2/MainNav/NavFooter.cjs +1 -1
- package/dist/v2/MainNav/NavFooter.js +4 -9
- package/dist/v2/MainNav/NavLink.cjs +10 -10
- package/dist/v2/MainNav/NavLink.js +39 -50
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.js +9 -33
- package/dist/v2/MainNav/NavSections.cjs +2 -2
- package/dist/v2/MainNav/NavSections.js +7 -20
- package/dist/v2/MainNav/NavUser.cjs +2 -2
- package/dist/v2/MainNav/NavUser.js +15 -26
- package/dist/v2/MainNav/index.cjs +1 -1
- package/dist/v2/Pagination/Pagination.cjs +1 -5
- package/dist/v2/Pagination/Pagination.js +8 -21
- package/dist/v2/Pagination/PaginationContext.cjs +1 -1
- package/dist/v2/Pagination/components.cjs +10 -13
- package/dist/v2/Pagination/components.js +31 -51
- package/dist/v2/Pagination/index.cjs +1 -1
- package/dist/v2/SimpleMenu/Menu.cjs +65 -0
- package/dist/v2/SimpleMenu/Menu.js +89 -0
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -33
- package/dist/v2/SimpleMenu/SimpleMenu.js +25 -177
- package/dist/v2/SimpleMenu/index.cjs +1 -1
- package/dist/v2/SimpleMenu/index.js +5 -3
- package/dist/v2/SubNav/SubNav.cjs +5 -5
- package/dist/v2/SubNav/SubNav.js +8 -13
- package/dist/v2/SubNav/SubNavHeader.cjs +3 -3
- package/dist/v2/SubNav/SubNavHeader.js +33 -70
- package/dist/v2/SubNav/SubNavLink.cjs +5 -5
- package/dist/v2/SubNav/SubNavLink.js +21 -49
- package/dist/v2/SubNav/SubNavLinkSection.cjs +4 -4
- package/dist/v2/SubNav/SubNavLinkSection.js +16 -24
- package/dist/v2/SubNav/SubNavSection.cjs +2 -2
- package/dist/v2/SubNav/SubNavSection.js +14 -46
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +3 -3
- package/dist/v2/SubNav/SubNavSectionLabel.js +11 -36
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +5 -18
- package/dist/v2/SubNav/index.cjs +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.js +53 -51
- package/package.json +23 -35
- package/dist/Combobox/components.cjs +0 -53
- package/dist/Combobox/components.js +0 -64
- package/dist/Combobox/utils.cjs +0 -1
- package/dist/Combobox/utils.js +0 -78
- package/dist/DatePicker/DatePickerCalendar.cjs +0 -1
- package/dist/DatePicker/DatePickerCalendar.js +0 -142
- package/dist/DatePicker/DatePickerTd.cjs +0 -19
- package/dist/DatePicker/DatePickerTd.js +0 -61
- package/dist/DatePicker/DatePickerTh.cjs +0 -9
- package/dist/DatePicker/DatePickerTh.js +0 -42
- package/dist/DatePicker/compareDates.cjs +0 -1
- package/dist/DatePicker/compareDates.js +0 -4
- package/dist/DatePicker/components.cjs +0 -33
- package/dist/DatePicker/components.js +0 -43
- package/dist/DatePicker/utils/formatDate.cjs +0 -1
- package/dist/DatePicker/utils/formatDate.js +0 -4
- package/dist/DatePicker/utils/generateWeeks.cjs +0 -1
- package/dist/DatePicker/utils/generateWeeks.js +0 -17
- package/dist/DatePicker/utils/getDayOfWeek.cjs +0 -1
- package/dist/DatePicker/utils/getDayOfWeek.js +0 -15
- package/dist/DatePicker/utils/getMonths.cjs +0 -1
- package/dist/DatePicker/utils/getMonths.js +0 -7
- package/dist/DatePicker/utils/getYears.cjs +0 -1
- package/dist/DatePicker/utils/getYears.js +0 -9
- package/dist/DatePicker/utils/index.cjs +0 -1
- package/dist/DatePicker/utils/index.js +0 -12
- package/dist/DismissibleLayer/DismissibleLayer.cjs +0 -1
- package/dist/DismissibleLayer/DismissibleLayer.js +0 -30
- package/dist/Grid/GridContext.cjs +0 -1
- package/dist/Grid/GridContext.js +0 -6
- package/dist/Select/SelectButton.cjs +0 -19
- package/dist/Select/SelectButton.js +0 -69
- package/dist/Select/SelectTags.cjs +0 -6
- package/dist/Select/SelectTags.js +0 -38
- package/dist/Select/components.cjs +0 -39
- package/dist/Select/components.js +0 -48
- package/dist/Select/constants.cjs +0 -1
- package/dist/Select/constants.js +0 -8
- package/dist/Select/hooks/useButtonRef.cjs +0 -1
- package/dist/Select/hooks/useButtonRef.js +0 -13
- package/dist/Select/hooks/useListRef.cjs +0 -1
- package/dist/Select/hooks/useListRef.js +0 -18
- package/dist/Select/utils.cjs +0 -1
- package/dist/Select/utils.js +0 -17
- package/dist/Tabs/useTabsFocus.cjs +0 -1
- package/dist/Tabs/useTabsFocus.js +0 -17
- package/dist/Textarea/TextareaInput.cjs +0 -30
- package/dist/Textarea/TextareaInput.js +0 -70
- package/dist/helpers/arrays.cjs +0 -1
- package/dist/helpers/arrays.js +0 -6
- package/dist/helpers/escapeSelector.cjs +0 -1
- package/dist/helpers/escapeSelector.js +0 -4
- package/dist/v2/SimpleMenu/utils.cjs +0 -12
- package/dist/v2/SimpleMenu/utils.js +0 -15
- /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/Combobox/utils.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import l from "compute-scroll-into-view";
|
|
2
|
-
import { KeyboardKeys as r } from "../helpers/keyboardKeys.js";
|
|
3
|
-
const t = {
|
|
4
|
-
Close: "Close",
|
|
5
|
-
CloseSelect: "CloseSelect",
|
|
6
|
-
First: "First",
|
|
7
|
-
Last: "Last",
|
|
8
|
-
Next: "Next",
|
|
9
|
-
Open: "Open",
|
|
10
|
-
PageDown: "PageDown",
|
|
11
|
-
PageUp: "PageUp",
|
|
12
|
-
Previous: "Previous",
|
|
13
|
-
Select: "Select",
|
|
14
|
-
Space: "Space",
|
|
15
|
-
Type: "Type"
|
|
16
|
-
}, f = {
|
|
17
|
-
Close: "Close",
|
|
18
|
-
First: "First",
|
|
19
|
-
Last: "Last",
|
|
20
|
-
Next: "Next",
|
|
21
|
-
Open: "Open",
|
|
22
|
-
Previous: "Previous",
|
|
23
|
-
Select: "Select",
|
|
24
|
-
UpLevel: "UpLevel"
|
|
25
|
-
};
|
|
26
|
-
function d(e = [], n = null, i = []) {
|
|
27
|
-
const o = String(n ?? "").toLowerCase();
|
|
28
|
-
return o ? e.filter((s) => s.props.children.toString().toLowerCase().includes(o) && i.indexOf(s) < 0) : e;
|
|
29
|
-
}
|
|
30
|
-
function C(e, n) {
|
|
31
|
-
if (!n && e === r.DOWN)
|
|
32
|
-
return t.Open;
|
|
33
|
-
if (e === r.DOWN)
|
|
34
|
-
return t.Next;
|
|
35
|
-
if (e === r.UP)
|
|
36
|
-
return t.Previous;
|
|
37
|
-
if (e === r.HOME)
|
|
38
|
-
return t.First;
|
|
39
|
-
if (e === r.END)
|
|
40
|
-
return t.Last;
|
|
41
|
-
if (e === r.ESCAPE)
|
|
42
|
-
return t.Close;
|
|
43
|
-
if (e === r.ENTER)
|
|
44
|
-
return t.CloseSelect;
|
|
45
|
-
if (e === r.BACKSPACE || e === r.CLEAR || e.length === 1)
|
|
46
|
-
return t.Type;
|
|
47
|
-
}
|
|
48
|
-
function S(e, n, i) {
|
|
49
|
-
switch (i) {
|
|
50
|
-
case t.First:
|
|
51
|
-
return 0;
|
|
52
|
-
case t.Last:
|
|
53
|
-
return n;
|
|
54
|
-
case t.Previous:
|
|
55
|
-
return Math.max(0, e - 1);
|
|
56
|
-
case t.Next:
|
|
57
|
-
return Math.min(n, e + 1);
|
|
58
|
-
default:
|
|
59
|
-
return e;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function P(e) {
|
|
63
|
-
l(e, {
|
|
64
|
-
scrollMode: "if-needed",
|
|
65
|
-
block: "nearest",
|
|
66
|
-
inline: "nearest"
|
|
67
|
-
}).forEach(({ el: i, top: o, left: s }) => {
|
|
68
|
-
i.scrollTop = o, i.scrollLeft = s;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
export {
|
|
72
|
-
t as MenuActions,
|
|
73
|
-
f as TreeActions,
|
|
74
|
-
d as filterOptions,
|
|
75
|
-
C as getActionFromKey,
|
|
76
|
-
S as getUpdatedIndex,
|
|
77
|
-
P as maintainScrollVisibility
|
|
78
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),T=require("react"),L=require("./components.cjs"),O=require("./DatePickerTd.cjs"),a=require("./DatePickerTh.cjs"),H=require("./utils/getDayOfWeek.cjs"),V=require("./utils/getMonths.cjs"),$=require("./utils/generateWeeks.cjs"),E=require("./utils/getYears.cjs"),I=require("./utils/formatDate.cjs"),h=require("../Box/Box.cjs"),_=require("../Flex/Flex.cjs"),z=require("../FocusTrap/FocusTrap.cjs"),A=require("../helpers/getDefaultLocale.cjs"),G=require("../RawTable/RawTable.cjs");require("../RawTable/RawTableContext.cjs");const J=require("../RawTable/RawThead.cjs"),K=require("../RawTable/RawTbody.cjs"),g=require("../RawTable/RawTr.cjs"),i=require("../SimpleMenu/SimpleMenu.cjs"),N=require("../VisuallyHidden/VisuallyHidden.cjs"),Q=({onEscape:s,popoverSource:l,...o})=>e.jsx(L.DatePickerPopover,{source:l,role:"dialog","aria-modal":"true",spacing:4,children:e.jsx(z.FocusTrap,{onEscape:s,children:e.jsx(D,{...o})})}),D=({selectedDate:s,initialDate:l=new Date,locale:o,onChange:j,minDate:p,maxDate:w})=>{const[c,d]=T.useState(l),[x,k,R]=$.generateWeeks(c,s),{sun:m,mon:q,tue:P,wed:f,thu:M,fri:b,sat:C}=H.getDayOfWeek(),u=V.getMonths(),y=E.getYears(p,w),F=o||A.getDefaultLocale();T.useEffect(()=>{s&&d(s)},[s]);const S=t=>{const r=new Date(c);r.setMonth(u.indexOf(t)),d(r)},B=t=>{const r=new Date(c);r.setFullYear(t),d(r)},Y=t=>()=>{j&&j(t)};return e.jsxs(h.Box,{padding:4,children:[e.jsx(h.Box,{paddingBottom:4,paddingLeft:2,paddingRight:2,children:e.jsxs(_.Flex,{children:[e.jsx(i.SimpleMenu,{label:u[c.getMonth()],children:u.map(t=>e.jsx(i.MenuItem,{onClick:()=>S(t),children:t},t))}),e.jsx(h.Box,{paddingLeft:2,children:e.jsx(i.SimpleMenu,{label:c.getFullYear(),children:y.map(t=>e.jsx(i.MenuItem,{onClick:()=>B(t),children:t},t))})})]})}),e.jsxs(G.RawTable,{colCount:7,rowCount:x.length+1,initialCol:R,initialRow:k,role:"grid",children:[e.jsx(J.RawThead,{children:e.jsxs(g.RawTr,{"aria-rowindex":1,children:[e.jsx(a.DatePickerTh,{children:m}),e.jsx(a.DatePickerTh,{children:q}),e.jsx(a.DatePickerTh,{children:P}),e.jsx(a.DatePickerTh,{children:f}),e.jsx(a.DatePickerTh,{children:M}),e.jsx(a.DatePickerTh,{children:b}),e.jsx(a.DatePickerTh,{children:C})]})}),e.jsx(K.RawTbody,{children:x.map((t,r)=>e.jsx(g.RawTr,{children:t.map(({date:n,outsideMonth:W,isSelected:v})=>e.jsxs(O.DatePickerTd,{outsideMonth:W,onSelectDay:Y(n),isSelected:v,children:[e.jsx("span",{"aria-hidden":!0,children:n.getDate()}),e.jsx(N.VisuallyHidden,{children:e.jsx("span",{children:I.formatDate(n,F)})})]},`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`))},r))})]})]})};exports.DatePickerCalendar=Q;exports.DatePickerCalendarContent=D;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { useState as E, useEffect as O } from "react";
|
|
3
|
-
import { DatePickerPopover as W } from "./components.js";
|
|
4
|
-
import { DatePickerTd as H } from "./DatePickerTd.js";
|
|
5
|
-
import { DatePickerTh as t } from "./DatePickerTh.js";
|
|
6
|
-
import { getDayOfWeek as I } from "./utils/getDayOfWeek.js";
|
|
7
|
-
import { getMonths as V } from "./utils/getMonths.js";
|
|
8
|
-
import { generateWeeks as q } from "./utils/generateWeeks.js";
|
|
9
|
-
import { getYears as z } from "./utils/getYears.js";
|
|
10
|
-
import { formatDate as A } from "./utils/formatDate.js";
|
|
11
|
-
import { Box as p } from "../Box/Box.js";
|
|
12
|
-
import { Flex as G } from "../Flex/Flex.js";
|
|
13
|
-
import { FocusTrap as J } from "../FocusTrap/FocusTrap.js";
|
|
14
|
-
import { getDefaultLocale as K } from "../helpers/getDefaultLocale.js";
|
|
15
|
-
import { RawTable as N } from "../RawTable/RawTable.js";
|
|
16
|
-
import "../RawTable/RawTableContext.js";
|
|
17
|
-
import { RawThead as Q } from "../RawTable/RawThead.js";
|
|
18
|
-
import { RawTbody as U } from "../RawTable/RawTbody.js";
|
|
19
|
-
import { RawTr as u } from "../RawTable/RawTr.js";
|
|
20
|
-
import { SimpleMenu as g, MenuItem as D } from "../SimpleMenu/SimpleMenu.js";
|
|
21
|
-
import { VisuallyHidden as X } from "../VisuallyHidden/VisuallyHidden.js";
|
|
22
|
-
const Ce = ({
|
|
23
|
-
onEscape: i,
|
|
24
|
-
popoverSource: c,
|
|
25
|
-
...d
|
|
26
|
-
}) => e(W, {
|
|
27
|
-
source: c,
|
|
28
|
-
role: "dialog",
|
|
29
|
-
"aria-modal": "true",
|
|
30
|
-
spacing: 4,
|
|
31
|
-
children: e(J, {
|
|
32
|
-
onEscape: i,
|
|
33
|
-
children: e(Z, {
|
|
34
|
-
...d
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
}), Z = ({
|
|
38
|
-
selectedDate: i,
|
|
39
|
-
initialDate: c = new Date(),
|
|
40
|
-
locale: d,
|
|
41
|
-
onChange: s,
|
|
42
|
-
minDate: w,
|
|
43
|
-
maxDate: k
|
|
44
|
-
}) => {
|
|
45
|
-
const [a, m] = E(c), [f, C, M] = q(a, i), {
|
|
46
|
-
sun: x,
|
|
47
|
-
mon: R,
|
|
48
|
-
tue: T,
|
|
49
|
-
wed: P,
|
|
50
|
-
thu: F,
|
|
51
|
-
fri: S,
|
|
52
|
-
sat: Y
|
|
53
|
-
} = I(), h = V(), b = z(w, k), y = d || K();
|
|
54
|
-
O(() => {
|
|
55
|
-
i && m(i);
|
|
56
|
-
}, [i]);
|
|
57
|
-
const v = (r) => {
|
|
58
|
-
const o = new Date(a);
|
|
59
|
-
o.setMonth(h.indexOf(r)), m(o);
|
|
60
|
-
}, L = (r) => {
|
|
61
|
-
const o = new Date(a);
|
|
62
|
-
o.setFullYear(r), m(o);
|
|
63
|
-
}, $ = (r) => () => {
|
|
64
|
-
s && s(r);
|
|
65
|
-
};
|
|
66
|
-
return l(p, {
|
|
67
|
-
padding: 4,
|
|
68
|
-
children: [e(p, {
|
|
69
|
-
paddingBottom: 4,
|
|
70
|
-
paddingLeft: 2,
|
|
71
|
-
paddingRight: 2,
|
|
72
|
-
children: l(G, {
|
|
73
|
-
children: [e(g, {
|
|
74
|
-
label: h[a.getMonth()],
|
|
75
|
-
children: h.map((r) => e(D, {
|
|
76
|
-
onClick: () => v(r),
|
|
77
|
-
children: r
|
|
78
|
-
}, r))
|
|
79
|
-
}), e(p, {
|
|
80
|
-
paddingLeft: 2,
|
|
81
|
-
children: e(g, {
|
|
82
|
-
label: a.getFullYear(),
|
|
83
|
-
children: b.map((r) => e(D, {
|
|
84
|
-
onClick: () => L(r),
|
|
85
|
-
children: r
|
|
86
|
-
}, r))
|
|
87
|
-
})
|
|
88
|
-
})]
|
|
89
|
-
})
|
|
90
|
-
}), l(N, {
|
|
91
|
-
colCount: 7,
|
|
92
|
-
rowCount: f.length + 1,
|
|
93
|
-
initialCol: M,
|
|
94
|
-
initialRow: C,
|
|
95
|
-
role: "grid",
|
|
96
|
-
children: [e(Q, {
|
|
97
|
-
children: l(u, {
|
|
98
|
-
"aria-rowindex": 1,
|
|
99
|
-
children: [e(t, {
|
|
100
|
-
children: x
|
|
101
|
-
}), e(t, {
|
|
102
|
-
children: R
|
|
103
|
-
}), e(t, {
|
|
104
|
-
children: T
|
|
105
|
-
}), e(t, {
|
|
106
|
-
children: P
|
|
107
|
-
}), e(t, {
|
|
108
|
-
children: F
|
|
109
|
-
}), e(t, {
|
|
110
|
-
children: S
|
|
111
|
-
}), e(t, {
|
|
112
|
-
children: Y
|
|
113
|
-
})]
|
|
114
|
-
})
|
|
115
|
-
}), e(U, {
|
|
116
|
-
children: f.map((r, o) => e(u, {
|
|
117
|
-
children: r.map(({
|
|
118
|
-
date: n,
|
|
119
|
-
outsideMonth: j,
|
|
120
|
-
isSelected: B
|
|
121
|
-
}) => l(H, {
|
|
122
|
-
outsideMonth: j,
|
|
123
|
-
onSelectDay: $(n),
|
|
124
|
-
isSelected: B,
|
|
125
|
-
children: [e("span", {
|
|
126
|
-
"aria-hidden": !0,
|
|
127
|
-
children: n.getDate()
|
|
128
|
-
}), e(X, {
|
|
129
|
-
children: e("span", {
|
|
130
|
-
children: A(n, y)
|
|
131
|
-
})
|
|
132
|
-
})]
|
|
133
|
-
}, `${n.getFullYear()}-${n.getMonth() + 1}-${n.getDate()}`))
|
|
134
|
-
}, o))
|
|
135
|
-
})]
|
|
136
|
-
})]
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
|
-
export {
|
|
140
|
-
Ce as DatePickerCalendar,
|
|
141
|
-
Z as DatePickerCalendarContent
|
|
142
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),s=require("styled-components");require("react");require("../RawTable/RawTableContext.cjs");const u=require("../RawTable/RawCell.cjs");require("../Box/Box.cjs");const l=require("../Typography/Typography.cjs"),c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},d=c(s),p=d.default.button`
|
|
2
|
-
border: none;
|
|
3
|
-
background: ${({theme:e,$isSelected:r})=>r?e.colors.primary100:e.colors.neutral0};
|
|
4
|
-
height: ${32/16}rem;
|
|
5
|
-
text-align: center;
|
|
6
|
-
width: ${32/16}rem;
|
|
7
|
-
border-radius: ${({theme:e})=>e.borderRadius};
|
|
8
|
-
|
|
9
|
-
// Trick to prevent the outline from overflowing because of the general outline-offset
|
|
10
|
-
outline-offset: -2px;
|
|
11
|
-
|
|
12
|
-
&:hover {
|
|
13
|
-
background: ${({theme:e})=>e.colors.primary100};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&:hover > ${l.Typography} {
|
|
17
|
-
color: ${({theme:e})=>e.colors.primary600};
|
|
18
|
-
}
|
|
19
|
-
`,y=({children:e,outsideMonth:r=!1,onSelectDay:n,isSelected:t=!1,...i})=>{let o="neutral900";return t?o="primary600":r&&(o="neutral600"),a.jsx(u.RawTd,{...i,children:a.jsx(p,{tabIndex:-1,onClick:n,$isSelected:t,type:"button",children:a.jsx(l.Typography,{variant:"pi",textColor:o,fontWeight:t?"bold":void 0,children:e})})})};exports.DatePickerTd=y;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import p from "styled-components";
|
|
3
|
-
import "react";
|
|
4
|
-
import "../RawTable/RawTableContext.js";
|
|
5
|
-
import { RawTd as c } from "../RawTable/RawCell.js";
|
|
6
|
-
import "../Box/Box.js";
|
|
7
|
-
import { Typography as n } from "../Typography/Typography.js";
|
|
8
|
-
const d = p.button`
|
|
9
|
-
border: none;
|
|
10
|
-
background: ${({
|
|
11
|
-
theme: r,
|
|
12
|
-
$isSelected: o
|
|
13
|
-
}) => o ? r.colors.primary100 : r.colors.neutral0};
|
|
14
|
-
height: ${32 / 16}rem;
|
|
15
|
-
text-align: center;
|
|
16
|
-
width: ${32 / 16}rem;
|
|
17
|
-
border-radius: ${({
|
|
18
|
-
theme: r
|
|
19
|
-
}) => r.borderRadius};
|
|
20
|
-
|
|
21
|
-
// Trick to prevent the outline from overflowing because of the general outline-offset
|
|
22
|
-
outline-offset: -2px;
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
background: ${({
|
|
26
|
-
theme: r
|
|
27
|
-
}) => r.colors.primary100};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&:hover > ${n} {
|
|
31
|
-
color: ${({
|
|
32
|
-
theme: r
|
|
33
|
-
}) => r.colors.primary600};
|
|
34
|
-
}
|
|
35
|
-
`, y = ({
|
|
36
|
-
children: r,
|
|
37
|
-
outsideMonth: o = !1,
|
|
38
|
-
onSelectDay: l,
|
|
39
|
-
isSelected: e = !1,
|
|
40
|
-
...a
|
|
41
|
-
}) => {
|
|
42
|
-
let t = "neutral900";
|
|
43
|
-
return e ? t = "primary600" : o && (t = "neutral600"), i(c, {
|
|
44
|
-
...a,
|
|
45
|
-
children: i(d, {
|
|
46
|
-
tabIndex: -1,
|
|
47
|
-
onClick: l,
|
|
48
|
-
$isSelected: e,
|
|
49
|
-
type: "button",
|
|
50
|
-
children: i(n, {
|
|
51
|
-
variant: "pi",
|
|
52
|
-
textColor: t,
|
|
53
|
-
fontWeight: e ? "bold" : void 0,
|
|
54
|
-
children: r
|
|
55
|
-
})
|
|
56
|
-
})
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
y as DatePickerTd
|
|
61
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),a=require("styled-components"),o=require("../Flex/Flex.cjs");require("react");require("../RawTable/RawTableContext.cjs");const s=require("../RawTable/RawCell.cjs");require("../Box/Box.cjs");const l=require("../Typography/Typography.cjs"),n=require("../VisuallyHidden/VisuallyHidden.cjs"),u=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=u(a),c=r.default(s.RawTh)`
|
|
2
|
-
// Trick to prevent the outline from overflowing because of the general outline-offset
|
|
3
|
-
outline-offset: -2px;
|
|
4
|
-
border-radius: ${({theme:e})=>e.borderRadius};
|
|
5
|
-
text-transform: capitalize;
|
|
6
|
-
`,d=r.default(o.Flex)`
|
|
7
|
-
height: ${24/16}rem;
|
|
8
|
-
width: ${32/16}rem;
|
|
9
|
-
`,h=({children:e,...i})=>t.jsx(c,{...i,children:t.jsxs(d,{justifyContent:"center",children:[t.jsx(l.Typography,{variant:"pi",fontWeight:"bold",color:"neutral800","aria-hidden":!0,children:e.substr(0,2)}),t.jsx(n.VisuallyHidden,{children:t.jsx("span",{children:e})})]})});exports.DatePickerTh=h;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import t from "styled-components";
|
|
3
|
-
import { Flex as n } from "../Flex/Flex.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import "../RawTable/RawTableContext.js";
|
|
6
|
-
import { RawTh as a } from "../RawTable/RawCell.js";
|
|
7
|
-
import "../Box/Box.js";
|
|
8
|
-
import { Typography as m } from "../Typography/Typography.js";
|
|
9
|
-
import { VisuallyHidden as p } from "../VisuallyHidden/VisuallyHidden.js";
|
|
10
|
-
const s = t(a)`
|
|
11
|
-
// Trick to prevent the outline from overflowing because of the general outline-offset
|
|
12
|
-
outline-offset: -2px;
|
|
13
|
-
border-radius: ${({
|
|
14
|
-
theme: r
|
|
15
|
-
}) => r.borderRadius};
|
|
16
|
-
text-transform: capitalize;
|
|
17
|
-
`, l = t(n)`
|
|
18
|
-
height: ${24 / 16}rem;
|
|
19
|
-
width: ${32 / 16}rem;
|
|
20
|
-
`, y = ({
|
|
21
|
-
children: r,
|
|
22
|
-
...o
|
|
23
|
-
}) => e(s, {
|
|
24
|
-
...o,
|
|
25
|
-
children: i(l, {
|
|
26
|
-
justifyContent: "center",
|
|
27
|
-
children: [e(m, {
|
|
28
|
-
variant: "pi",
|
|
29
|
-
fontWeight: "bold",
|
|
30
|
-
color: "neutral800",
|
|
31
|
-
"aria-hidden": !0,
|
|
32
|
-
children: r.substr(0, 2)
|
|
33
|
-
}), e(p, {
|
|
34
|
-
children: e("span", {
|
|
35
|
-
children: r
|
|
36
|
-
})
|
|
37
|
-
})]
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
export {
|
|
41
|
-
y as DatePickerTh
|
|
42
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=(e,t)=>!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate();exports.isDateEqual=l;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("styled-components"),n=require("../Box/Box.cjs"),a=require("../Field/FieldInput.cjs"),i=require("../Popover/Popover.cjs"),s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},o=s(r),d=o.default(i.Popover)`
|
|
2
|
-
max-height: ${3*6}rem;
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
`,l=o.default.button`
|
|
5
|
-
border: none;
|
|
6
|
-
background: transparent;
|
|
7
|
-
border-radius: ${({theme:e})=>e.borderRadius};
|
|
8
|
-
cursor: ${e=>e["aria-disabled"]?"not-allowed":void 0};
|
|
9
|
-
|
|
10
|
-
& svg path {
|
|
11
|
-
fill: ${({theme:e})=>e.colors.neutral500};
|
|
12
|
-
}
|
|
13
|
-
`,c=o.default.div`
|
|
14
|
-
${({bold:e,theme:t})=>e?r.css`
|
|
15
|
-
& ${a.InputWrapper} {
|
|
16
|
-
border: 1px solid ${t.colors.primary600};
|
|
17
|
-
}
|
|
18
|
-
`:""}
|
|
19
|
-
`,u=o.default(n.Box)`
|
|
20
|
-
background: transparent;
|
|
21
|
-
border: none;
|
|
22
|
-
position: relative;
|
|
23
|
-
z-index: 1;
|
|
24
|
-
|
|
25
|
-
svg {
|
|
26
|
-
height: ${11/16}rem;
|
|
27
|
-
width: ${11/16}rem;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
svg path {
|
|
31
|
-
fill: ${({theme:e})=>e.colors.neutral600};
|
|
32
|
-
}
|
|
33
|
-
`;exports.DatePickerButton=l;exports.DatePickerPopover=d;exports.DatePickerWrapper=c;exports.IconBox=u;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import o, { css as t } from "styled-components";
|
|
2
|
-
import { Box as n } from "../Box/Box.js";
|
|
3
|
-
import { InputWrapper as i } from "../Field/FieldInput.js";
|
|
4
|
-
import { Popover as a } from "../Popover/Popover.js";
|
|
5
|
-
const c = o(a)`
|
|
6
|
-
max-height: ${3 * 6}rem;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
`, m = o.button`
|
|
9
|
-
border: none;
|
|
10
|
-
background: transparent;
|
|
11
|
-
border-radius: ${({ theme: r }) => r.borderRadius};
|
|
12
|
-
cursor: ${(r) => r["aria-disabled"] ? "not-allowed" : void 0};
|
|
13
|
-
|
|
14
|
-
& svg path {
|
|
15
|
-
fill: ${({ theme: r }) => r.colors.neutral500};
|
|
16
|
-
}
|
|
17
|
-
`, u = o.div`
|
|
18
|
-
${({ bold: r, theme: e }) => r ? t`
|
|
19
|
-
& ${i} {
|
|
20
|
-
border: 1px solid ${e.colors.primary600};
|
|
21
|
-
}
|
|
22
|
-
` : ""}
|
|
23
|
-
`, $ = o(n)`
|
|
24
|
-
background: transparent;
|
|
25
|
-
border: none;
|
|
26
|
-
position: relative;
|
|
27
|
-
z-index: 1;
|
|
28
|
-
|
|
29
|
-
svg {
|
|
30
|
-
height: ${11 / 16}rem;
|
|
31
|
-
width: ${11 / 16}rem;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
svg path {
|
|
35
|
-
fill: ${({ theme: r }) => r.colors.neutral600};
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
export {
|
|
39
|
-
m as DatePickerButton,
|
|
40
|
-
c as DatePickerPopover,
|
|
41
|
-
u as DatePickerWrapper,
|
|
42
|
-
$ as IconBox
|
|
43
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=(t,e)=>new Intl.DateTimeFormat(e).format(t);exports.formatDate=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const D=require("../compareDates.cjs"),M=7*6,f=(e,g)=>{const i=new Date(e.getFullYear(),e.getMonth(),1),l=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),c=new Date(e.getFullYear(),e.getMonth(),0).getDate(),s=i.getDay(),h=l+s,r=[];let a=0,u=0,n=0,o;for(let t=0;t<M;t++)t>6&&t%7===0&&n++,r[n]||(r[n]=[]),t<s?o={date:new Date(e.getFullYear(),e.getMonth()-1,c-s+t+1),outsideMonth:!0}:t<h?o={date:new Date(e.getFullYear(),e.getMonth(),t-s+1)}:o={date:new Date(e.getFullYear(),e.getMonth()+1,t-s-l+1),outsideMonth:!0},D.isDateEqual(g,o.date)&&(a=n+1,u=r[n].length,o.isSelected=!0),r[n].push(o);return[r,a,u]};exports.generateWeeks=f;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { isDateEqual as f } from "../compareDates.js";
|
|
2
|
-
const D = 7 * 6, w = (e, g) => {
|
|
3
|
-
const i = new Date(e.getFullYear(), e.getMonth(), 1), l = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate(), h = new Date(e.getFullYear(), e.getMonth(), 0).getDate(), r = i.getDay(), c = l + r, s = [];
|
|
4
|
-
let a = 0, u = 0, n = 0, o;
|
|
5
|
-
for (let t = 0; t < D; t++)
|
|
6
|
-
t > 6 && t % 7 === 0 && n++, s[n] || (s[n] = []), t < r ? o = {
|
|
7
|
-
date: new Date(e.getFullYear(), e.getMonth() - 1, h - r + t + 1),
|
|
8
|
-
outsideMonth: !0
|
|
9
|
-
} : t < c ? o = { date: new Date(e.getFullYear(), e.getMonth(), t - r + 1) } : o = {
|
|
10
|
-
date: new Date(e.getFullYear(), e.getMonth() + 1, t - r - l + 1),
|
|
11
|
-
outsideMonth: !0
|
|
12
|
-
}, f(g, o.date) && (a = n + 1, u = s[n].length, o.isSelected = !0), s[n].push(o);
|
|
13
|
-
return [s, a, u];
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
w as generateWeeks
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=()=>{const e=new Intl.DateTimeFormat(void 0,{weekday:"long"}).format,t=new Date(1970,0,1),n=new Date(1970,0,2),o=new Date(1970,0,3),a=new Date(1970,0,4),s=new Date(1970,0,5),u=new Date(1970,0,6),r=new Date(1970,0,7);return{sun:e(a),mon:e(s),tue:e(u),wed:e(r),thu:e(t),fri:e(n),sat:e(o)}};exports.getDayOfWeek=c;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const D = () => {
|
|
2
|
-
const e = new Intl.DateTimeFormat(void 0, { weekday: "long" }).format, t = new Date(1970, 0, 1), n = new Date(1970, 0, 2), o = new Date(1970, 0, 3), a = new Date(1970, 0, 4), s = new Date(1970, 0, 5), w = new Date(1970, 0, 6), c = new Date(1970, 0, 7);
|
|
3
|
-
return {
|
|
4
|
-
sun: e(a),
|
|
5
|
-
mon: e(s),
|
|
6
|
-
tue: e(w),
|
|
7
|
-
wed: e(c),
|
|
8
|
-
thu: e(t),
|
|
9
|
-
fri: e(n),
|
|
10
|
-
sat: e(o)
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
D as getDayOfWeek
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=()=>{const e=new Intl.DateTimeFormat(void 0,{month:"long"}).format;return Array(12).fill(null).map((o,t)=>e(new Date(1970,t,1)))};exports.getMonths=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=200,u=15,c=(s,a)=>{const t=new Date().getFullYear(),n=s?.getFullYear()??t-l,o=a?.getFullYear()??t+u,r=[];for(let e=n;e<=o;e++)r.push(e);return r};exports.getYears=c;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./getDayOfWeek.cjs"),t=require("./getMonths.cjs"),r=require("./generateWeeks.cjs"),s=require("./getYears.cjs"),a=require("./formatDate.cjs");exports.getDayOfWeek=e.getDayOfWeek;exports.getMonths=t.getMonths;exports.generateWeeks=r.generateWeeks;exports.getYears=s.getYears;exports.formatDate=a.formatDate;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { getDayOfWeek as o } from "./getDayOfWeek.js";
|
|
2
|
-
import { getMonths as f } from "./getMonths.js";
|
|
3
|
-
import { generateWeeks as a } from "./generateWeeks.js";
|
|
4
|
-
import { getYears as x } from "./getYears.js";
|
|
5
|
-
import { formatDate as s } from "./formatDate.js";
|
|
6
|
-
export {
|
|
7
|
-
s as formatDate,
|
|
8
|
-
a as generateWeeks,
|
|
9
|
-
o as getDayOfWeek,
|
|
10
|
-
f as getMonths,
|
|
11
|
-
x as getYears
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),i=require("@radix-ui/react-use-callback-ref"),R=require("prop-types"),l=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},b=l(a),s=l(R),o=({children:e,className:d,onEscapeKeyDown:f,onPointerDownOutside:p})=>{const r=a.useRef(null),c=i.useCallbackRef(f),u=i.useCallbackRef(p);return a.useEffect(()=>{const t=n=>{n.key==="Escape"&&c(n)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[c]),a.useEffect(()=>{const t=n=>{const y=r.current.closest("[data-react-portal]"),m=n.target.closest("[data-react-portal]");r.current&&!r.current.contains(n.target)&&y===m&&u()};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[u]),b.default.createElement("div",{ref:r,className:d},e)};o.defaultProps={className:void 0};o.propTypes={children:s.default.node.isRequired,className:s.default.string,onEscapeKeyDown:s.default.func.isRequired,onPointerDownOutside:s.default.func.isRequired};exports.DismissibleLayer=o;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import y, { useRef as w, useEffect as a } from "react";
|
|
2
|
-
import { useCallbackRef as c } from "@radix-ui/react-use-callback-ref";
|
|
3
|
-
import r from "prop-types";
|
|
4
|
-
const i = ({ children: d, className: u, onEscapeKeyDown: l, onPointerDownOutside: m }) => {
|
|
5
|
-
const n = w(null), o = c(l), s = c(m);
|
|
6
|
-
return a(() => {
|
|
7
|
-
const e = (t) => {
|
|
8
|
-
t.key === "Escape" && o(t);
|
|
9
|
-
};
|
|
10
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
11
|
-
}, [o]), a(() => {
|
|
12
|
-
const e = (t) => {
|
|
13
|
-
const p = n.current.closest("[data-react-portal]"), f = t.target.closest("[data-react-portal]");
|
|
14
|
-
n.current && !n.current.contains(t.target) && p === f && s();
|
|
15
|
-
};
|
|
16
|
-
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
17
|
-
}, [s]), /* @__PURE__ */ y.createElement("div", { ref: n, className: u }, d);
|
|
18
|
-
};
|
|
19
|
-
i.defaultProps = {
|
|
20
|
-
className: void 0
|
|
21
|
-
};
|
|
22
|
-
i.propTypes = {
|
|
23
|
-
children: r.node.isRequired,
|
|
24
|
-
className: r.string,
|
|
25
|
-
onEscapeKeyDown: r.func.isRequired,
|
|
26
|
-
onPointerDownOutside: r.func.isRequired
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
i as DismissibleLayer
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react"),t=e.createContext({gap:0,gridCols:12}),r=()=>e.useContext(t);exports.GridContext=t;exports.useGrid=r;
|
package/dist/Grid/GridContext.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react"),b=require("prop-types"),f=require("styled-components"),l=require("./constants.cjs"),t=require("../helpers/keyboardKeys.cjs"),n=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},K=n(u),o=n(b),h=n(f),S=h.default.button`
|
|
2
|
-
position: absolute;
|
|
3
|
-
left: 0;
|
|
4
|
-
right: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
top: 0;
|
|
7
|
-
width: 100%;
|
|
8
|
-
background: transparent;
|
|
9
|
-
border: none;
|
|
10
|
-
|
|
11
|
-
// The focus state is moved to the parent thanks to :focus-within
|
|
12
|
-
&:focus {
|
|
13
|
-
outline: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&[data-disabled] {
|
|
17
|
-
cursor: not-allowed;
|
|
18
|
-
}
|
|
19
|
-
`,a=u.forwardRef(({labelledBy:e,expanded:c,onTrigger:d,disabled:s,...i},y)=>{const p=r=>{if(!s)switch(r.key){case t.KeyboardKeys.DOWN:case t.KeyboardKeys.SPACE:case t.KeyboardKeys.ENTER:{r.preventDefault(),d(l.DownState.Keyboard);break}case t.KeyboardKeys.UP:{r.preventDefault(),d(l.UpState.Keyboard);break}}};return K.default.createElement(S,{ref:y,role:"combobox","aria-labelledby":e,"aria-haspopup":"listbox","aria-expanded":c,onKeyDown:p,disabled:s,"data-disabled":s?"":void 0,type:"button",...i})});a.displayName="SelectButton";a.defaultProps={expanded:!1,disabled:!1};a.propTypes={disabled:o.default.bool,expanded:o.default.bool,labelledBy:o.default.string.isRequired,onTrigger:o.default.func.isRequired};exports.SelectButton=a;
|