@strapi/design-system 1.7.0 → 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/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 +9 -9
- package/dist/Combobox/Combobox.js +52 -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 +4 -4
- package/dist/Layout/HeaderLayout.js +83 -59
- 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 +3 -3
- package/dist/Popover/Popover.js +48 -100
- 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 +43 -206
- 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 +13 -13
- package/dist/Select/SelectParts.js +35 -153
- package/dist/Select/SingleSelect.cjs +1 -1
- package/dist/Select/SingleSelect.js +27 -117
- package/dist/Select/index.cjs +1 -1
- package/dist/SimpleMenu/SimpleMenu.cjs +11 -11
- package/dist/SimpleMenu/SimpleMenu.js +111 -92
- package/dist/SimpleMenu/index.cjs +1 -1
- package/dist/SimpleMenu/utils.cjs +1 -1
- package/dist/Stack/Stack.cjs +3 -3
- package/dist/Stack/Stack.js +7 -28
- package/dist/Stack/index.cjs +1 -1
- package/dist/Status/Status.cjs +7 -7
- package/dist/Status/Status.js +36 -24
- package/dist/Status/index.cjs +1 -1
- package/dist/SubNav/SubNav.cjs +5 -5
- package/dist/SubNav/SubNav.js +9 -9
- package/dist/SubNav/SubNavHeader.cjs +3 -3
- package/dist/SubNav/SubNavHeader.js +57 -47
- package/dist/SubNav/SubNavLink.cjs +5 -5
- package/dist/SubNav/SubNavLink.js +38 -32
- package/dist/SubNav/SubNavLinkSection.cjs +6 -6
- package/dist/SubNav/SubNavLinkSection.js +28 -21
- package/dist/SubNav/SubNavSection.cjs +3 -3
- package/dist/SubNav/SubNavSection.js +46 -39
- package/dist/SubNav/SubNavSectionLabel.cjs +4 -4
- package/dist/SubNav/SubNavSectionLabel.js +28 -25
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.js +14 -13
- package/dist/SubNav/index.cjs +1 -1
- package/dist/Switch/Switch.cjs +5 -5
- package/dist/Switch/Switch.js +33 -26
- package/dist/Switch/index.cjs +1 -1
- package/dist/Table/Cell.cjs +3 -3
- package/dist/Table/Cell.js +17 -13
- package/dist/Table/TFooter.cjs +5 -5
- package/dist/Table/TFooter.js +23 -16
- package/dist/Table/Table.cjs +5 -5
- package/dist/Table/Table.js +28 -24
- package/dist/Table/Tbody.cjs +2 -2
- package/dist/Table/Tbody.js +7 -6
- package/dist/Table/Thead.cjs +2 -2
- package/dist/Table/Thead.js +8 -7
- package/dist/Table/Tr.cjs +2 -2
- package/dist/Table/Tr.js +6 -5
- package/dist/Table/index.cjs +1 -1
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +26 -25
- package/dist/Tabs/TabPanels.cjs +1 -1
- package/dist/Tabs/TabPanels.js +15 -14
- package/dist/Tabs/Tabs.cjs +2 -2
- package/dist/Tabs/Tabs.js +64 -59
- package/dist/Tabs/TabsContext.cjs +1 -1
- package/dist/Tabs/components.cjs +12 -12
- package/dist/Tabs/index.cjs +1 -1
- package/dist/Tabs/useTabsFocus.cjs +1 -1
- package/dist/Tabs/useTabsFocus.js +1 -1
- package/dist/Tag/Tag.cjs +2 -2
- package/dist/Tag/Tag.js +6 -43
- package/dist/Tag/index.cjs +1 -1
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.js +8 -37
- package/dist/TextButton/index.cjs +1 -1
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.js +10 -41
- package/dist/TextInput/index.cjs +1 -1
- package/dist/Textarea/Textarea.cjs +2 -2
- package/dist/Textarea/Textarea.js +24 -21
- package/dist/Textarea/TextareaInput.cjs +4 -4
- package/dist/Textarea/TextareaInput.js +25 -30
- package/dist/Textarea/index.cjs +1 -1
- package/dist/ThemeProvider/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider/ThemeProvider.js +2 -10
- package/dist/ThemeProvider/hooks.cjs +1 -1
- package/dist/ThemeProvider/index.cjs +1 -1
- package/dist/TimePicker/TimePicker.cjs +3 -3
- package/dist/TimePicker/TimePicker.js +8 -30
- package/dist/TimePicker/index.cjs +1 -1
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
- package/dist/ToggleCheckbox/ToggleCheckbox.js +111 -110
- package/dist/ToggleCheckbox/index.cjs +1 -1
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.js +41 -35
- package/dist/ToggleInput/index.cjs +1 -1
- package/dist/Tooltip/Tooltip.cjs +2 -2
- package/dist/Tooltip/Tooltip.js +9 -52
- package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -1
- package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -1
- package/dist/Tooltip/index.cjs +1 -1
- package/dist/Tooltip/utils/positionTooltip.cjs +1 -1
- package/dist/Typography/Typography.cjs +8 -8
- package/dist/Typography/Typography.js +6 -21
- package/dist/Typography/constants.cjs +1 -1
- package/dist/Typography/index.cjs +1 -1
- package/dist/Typography/utils.cjs +9 -9
- package/dist/VisuallyHidden/VisuallyHidden.cjs +2 -2
- package/dist/VisuallyHidden/index.cjs +1 -1
- package/dist/helpers/deprecations.cjs +1 -1
- package/dist/helpers/escapeSelector.cjs +1 -1
- package/dist/helpers/getDefaultLocale.cjs +1 -1
- package/dist/helpers/getFocusableNodes.cjs +1 -1
- package/dist/helpers/keyboardKeys.cjs +1 -1
- package/dist/helpers/objects.cjs +1 -1
- package/dist/helpers/setOpacity.cjs +1 -1
- package/dist/helpers/setTabIndexOnFirstItem.cjs +1 -1
- package/dist/helpers/theme.cjs +1 -1
- package/dist/helpers/useElementOnScreen.cjs +4 -1
- package/dist/helpers/useElementOnScreen.js +6 -1
- package/dist/helpers/useId.cjs +4 -1
- package/dist/helpers/useId.js +6 -1
- package/dist/helpers/useIntersection.cjs +4 -1
- package/dist/helpers/useIntersection.js +6 -1
- package/dist/helpers/useLockScroll.cjs +4 -1
- package/dist/helpers/useLockScroll.js +6 -1
- package/dist/helpers/usePrevious.cjs +4 -1
- package/dist/helpers/usePrevious.js +6 -1
- package/dist/helpers/useResizeObserver.cjs +4 -1
- package/dist/helpers/useResizeObserver.js +6 -1
- package/dist/hooks/useComposeRefs.cjs +1 -1
- package/dist/hooks/useControllableState.cjs +1 -1
- package/dist/hooks/useElementOnScreen.cjs +1 -1
- package/dist/hooks/useId.cjs +1 -1
- package/dist/hooks/useIntersection.cjs +1 -1
- package/dist/hooks/useLockScroll.cjs +1 -1
- package/dist/hooks/usePrevious.cjs +1 -1
- package/dist/hooks/useResizeObserver.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +209 -209
- package/dist/themes/common-theme.cjs +1 -1
- package/dist/themes/darkTheme/dark-colors.cjs +1 -1
- package/dist/themes/darkTheme/dark-shadows.cjs +1 -1
- package/dist/themes/darkTheme/index.cjs +1 -1
- package/dist/themes/extendTheme.cjs +2 -2
- package/dist/themes/index.cjs +1 -1
- package/dist/themes/lightTheme/index.cjs +1 -1
- package/dist/themes/lightTheme/light-colors.cjs +1 -1
- package/dist/themes/lightTheme/light-shadows.cjs +1 -1
- package/dist/themes/sizes.cjs +1 -1
- package/dist/themes/sizes.js +4 -4
- package/dist/themes/utils.cjs +5 -5
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +3 -3
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +19 -15
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
- package/dist/v2/Breadcrumbs/Crumb.js +13 -12
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbLink.js +5 -4
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +16 -15
- package/dist/v2/Breadcrumbs/Divider.cjs +1 -1
- package/dist/v2/Breadcrumbs/Divider.js +6 -5
- package/dist/v2/Breadcrumbs/index.cjs +1 -1
- package/dist/v2/Link/Link.cjs +4 -4
- package/dist/v2/Link/Link.js +10 -39
- package/dist/v2/Link/index.cjs +1 -1
- package/dist/v2/LinkButton/LinkButton.cjs +7 -7
- package/dist/v2/LinkButton/LinkButton.js +11 -49
- package/dist/v2/LinkButton/index.cjs +1 -1
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.js +16 -15
- package/dist/v2/MainNav/MainNavContext.cjs +1 -1
- package/dist/v2/MainNav/NavBrand.cjs +6 -6
- package/dist/v2/MainNav/NavBrand.js +38 -22
- package/dist/v2/MainNav/NavCondense.cjs +3 -3
- package/dist/v2/MainNav/NavCondense.js +20 -16
- package/dist/v2/MainNav/NavFooter.cjs +1 -1
- package/dist/v2/MainNav/NavFooter.js +9 -8
- package/dist/v2/MainNav/NavLink.cjs +10 -10
- package/dist/v2/MainNav/NavLink.js +55 -45
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.js +43 -33
- package/dist/v2/MainNav/NavSections.cjs +2 -2
- package/dist/v2/MainNav/NavSections.js +15 -14
- package/dist/v2/MainNav/NavUser.cjs +3 -3
- package/dist/v2/MainNav/NavUser.js +22 -19
- package/dist/v2/MainNav/index.cjs +1 -1
- package/dist/v2/Pagination/Pagination.cjs +2 -2
- package/dist/v2/Pagination/Pagination.js +16 -15
- package/dist/v2/Pagination/PaginationContext.cjs +1 -1
- package/dist/v2/Pagination/components.cjs +10 -10
- package/dist/v2/Pagination/components.js +50 -37
- package/dist/v2/Pagination/index.cjs +1 -1
- package/dist/v2/SimpleMenu/Menu.cjs +13 -13
- package/dist/v2/SimpleMenu/Menu.js +15 -155
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -1
- package/dist/v2/SimpleMenu/SimpleMenu.js +17 -31
- package/dist/v2/SimpleMenu/index.cjs +1 -1
- package/dist/v2/SubNav/SubNav.cjs +5 -5
- package/dist/v2/SubNav/SubNav.js +9 -9
- package/dist/v2/SubNav/SubNavHeader.cjs +3 -3
- package/dist/v2/SubNav/SubNavHeader.js +57 -47
- package/dist/v2/SubNav/SubNavLink.cjs +5 -5
- package/dist/v2/SubNav/SubNavLink.js +40 -34
- package/dist/v2/SubNav/SubNavLinkSection.cjs +6 -6
- package/dist/v2/SubNav/SubNavLinkSection.js +28 -21
- package/dist/v2/SubNav/SubNavSection.cjs +3 -3
- package/dist/v2/SubNav/SubNavSection.js +48 -41
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +4 -4
- package/dist/v2/SubNav/SubNavSectionLabel.js +28 -25
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +14 -13
- package/dist/v2/SubNav/index.cjs +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.js +1 -1
- package/package.json +16 -19
- package/dist/DismissibleLayer/DismissibleLayer.cjs +0 -1
- package/dist/DismissibleLayer/DismissibleLayer.js +0 -30
- /package/dist/BaseCheckbox/assets/{checkmark-black.cjs → checkmark-black.svg.cjs} +0 -0
- /package/dist/BaseCheckbox/assets/{checkmark-black.js → checkmark-black.svg.js} +0 -0
- /package/dist/BaseCheckbox/assets/{checkmark.cjs → checkmark.svg.cjs} +0 -0
- /package/dist/BaseCheckbox/assets/{checkmark.js → checkmark.svg.js} +0 -0
- /package/dist/Loader/assets/{loader.cjs → loader.svg.cjs} +0 -0
- /package/dist/Loader/assets/{loader.js → loader.svg.js} +0 -0
- /package/dist/Pagination/assets/{next.cjs → next.svg.cjs} +0 -0
- /package/dist/Pagination/assets/{next.js → next.svg.js} +0 -0
- /package/dist/Pagination/assets/{previous.cjs → previous.svg.cjs} +0 -0
- /package/dist/Pagination/assets/{previous.js → previous.svg.js} +0 -0
- /package/dist/v2/Pagination/assets/{next.cjs → next.svg.cjs} +0 -0
- /package/dist/v2/Pagination/assets/{next.js → next.svg.js} +0 -0
- /package/dist/v2/Pagination/assets/{previous.cjs → previous.svg.cjs} +0 -0
- /package/dist/v2/Pagination/assets/{previous.js → previous.svg.js} +0 -0
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "../../Avatar/AvatarGroup.js";
|
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import i from "prop-types";
|
|
4
|
+
import f from "styled-components";
|
|
5
|
+
import { useMainNav as c } from "./MainNavContext.js";
|
|
7
6
|
import { Box as n } from "../../Box/Box.js";
|
|
8
7
|
import { Flex as u } from "../../Flex/Flex.js";
|
|
9
|
-
import {
|
|
8
|
+
import { Avatar as h, Initials as g } from "../../Avatar/Avatar.js";
|
|
10
9
|
import { VisuallyHidden as v } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
import { Typography as x } from "../../Typography/Typography.js";
|
|
11
|
+
const y = f(n)`
|
|
12
|
+
border-top: 1px solid ${({ theme: o }) => o.colors.neutral150};
|
|
13
|
+
`, t = m.forwardRef(({ src: o, children: e, initials: a, ...s }, p) => {
|
|
14
|
+
const d = c();
|
|
15
|
+
return /* @__PURE__ */ r(y, { paddingTop: 3, paddingBottom: 3, paddingLeft: 5, paddingRight: 5, ...s, children: /* @__PURE__ */ l(u, { as: "button", justifyContent: d ? "center" : void 0, ref: p, children: [
|
|
16
|
+
o ? /* @__PURE__ */ r(h, { src: o, alt: "", "aria-hidden": !0 }) : /* @__PURE__ */ r(g, { children: a }),
|
|
17
|
+
d ? /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r("span", { children: e }) }) : /* @__PURE__ */ r(n, { width: `${130 / 16}rem`, paddingLeft: 2, as: "span", children: /* @__PURE__ */ r(x, { ellipsis: !0, textColor: "neutral600", children: e }) })
|
|
18
|
+
] }) });
|
|
16
19
|
});
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
t.displayName = "NavUser";
|
|
21
|
+
t.defaultProps = {
|
|
19
22
|
src: void 0,
|
|
20
23
|
initials: void 0
|
|
21
24
|
};
|
|
22
|
-
|
|
23
|
-
children:
|
|
24
|
-
initials:
|
|
25
|
-
src:
|
|
25
|
+
t.propTypes = {
|
|
26
|
+
children: i.node.isRequired,
|
|
27
|
+
initials: i.node,
|
|
28
|
+
src: i.string
|
|
26
29
|
};
|
|
27
30
|
export {
|
|
28
|
-
|
|
31
|
+
t as NavUser
|
|
29
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MainNav.cjs"),a=require("./NavBrand.cjs"),n=require("./NavCondense.cjs"),r=require("./NavFooter.cjs"),o=require("./NavLink.cjs"),v=require("./NavSection.cjs"),N=require("./NavSections.cjs"),i=require("./NavUser.cjs");exports.MainNav=e.MainNav;exports.NavBrand=a.NavBrand;exports.NavCondense=n.NavCondense;exports.NavFooter=r.NavFooter;exports.NavLink=o.NavLink;exports.NavSection=v.NavSection;exports.NavSections=N.NavSections;exports.NavUser=i.NavUser;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),p=require("react"),o=require("prop-types"),c=require("styled-components"),g=require("./PaginationContext.cjs"),b=require("../../Flex/Flex.cjs");function f(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const s=f(p),P=c.nav``,m=c(b.Flex)`
|
|
2
2
|
& > * + * {
|
|
3
3
|
margin-left: ${({theme:e})=>e.spaces[1]};
|
|
4
4
|
}
|
|
5
|
-
`,
|
|
5
|
+
`,a=({children:e,label:n,activePage:t,pageCount:r})=>{const l=s.useMemo(()=>({activePage:t,pageCount:r}),[t,r]);return i.jsx(g.PaginationContext.Provider,{value:l,children:i.jsx(P,{"aria-label":n,children:i.jsx(m,{as:"ul",children:s.Children.map(e,(u,d)=>i.jsx("li",{children:u},d))})})})};a.defaultProps={label:"pagination"};a.propTypes={activePage:o.number.isRequired,children:o.node.isRequired,label:o.string,pageCount:o.number.isRequired};exports.Pagination=a;
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import e from "prop-types";
|
|
4
|
+
import a from "styled-components";
|
|
4
5
|
import { PaginationContext as c } from "./PaginationContext.js";
|
|
5
6
|
import { Flex as u } from "../../Flex/Flex.js";
|
|
6
|
-
const
|
|
7
|
+
const f = a.nav``, g = a(u)`
|
|
7
8
|
& > * + * {
|
|
8
|
-
margin-left: ${({ theme:
|
|
9
|
+
margin-left: ${({ theme: i }) => i.spaces[1]};
|
|
9
10
|
}
|
|
10
|
-
`,
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
`, l = ({ children: i, label: s, activePage: n, pageCount: o }) => {
|
|
12
|
+
const p = t.useMemo(() => ({ activePage: n, pageCount: o }), [n, o]);
|
|
13
|
+
return /* @__PURE__ */ r(c.Provider, { value: p, children: /* @__PURE__ */ r(f, { "aria-label": s, children: /* @__PURE__ */ r(g, { as: "ul", children: t.Children.map(i, (m, d) => /* @__PURE__ */ r("li", { children: m }, d)) }) }) });
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
+
l.defaultProps = {
|
|
15
16
|
label: "pagination"
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
-
activePage:
|
|
19
|
-
children:
|
|
20
|
-
label:
|
|
21
|
-
pageCount:
|
|
18
|
+
l.propTypes = {
|
|
19
|
+
activePage: e.number.isRequired,
|
|
20
|
+
children: e.node.isRequired,
|
|
21
|
+
label: e.string,
|
|
22
|
+
pageCount: e.number.isRequired
|
|
22
23
|
};
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
l as Pagination
|
|
25
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=t.createContext({activePage:1,pageCount:1}),n=()=>t.useContext(e);exports.PaginationContext=e;exports.usePagination=n;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),x=require("@strapi/icons"),d=require("prop-types"),t=require("styled-components"),u=require("./PaginationContext.cjs"),k=require("../../themes/utils.cjs"),L=require("../../Typography/Typography.cjs"),j=require("../../BaseLink/BaseLink.cjs"),l=require("../../VisuallyHidden/VisuallyHidden.cjs"),y=t(L.Typography)`
|
|
2
2
|
line-height: revert;
|
|
3
|
-
`,
|
|
3
|
+
`,q={active:!0},p=t(j.BaseLink).withConfig({shouldForwardProp:(e,i)=>!q[e]&&i(e)})`
|
|
4
4
|
padding: ${({theme:e})=>e.spaces[3]};
|
|
5
5
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
6
|
-
box-shadow: ${({active:e,theme:
|
|
6
|
+
box-shadow: ${({active:e,theme:i})=>e?i.shadows.filterShadow:void 0};
|
|
7
7
|
text-decoration: none;
|
|
8
8
|
display: flex;
|
|
9
9
|
|
|
10
|
-
${
|
|
11
|
-
`,
|
|
12
|
-
color: ${({theme:e,active:
|
|
13
|
-
background: ${({theme:e,active:
|
|
10
|
+
${k.buttonFocusStyle}
|
|
11
|
+
`,m=t(p)`
|
|
12
|
+
color: ${({theme:e,active:i})=>i?e.colors.primary700:e.colors.neutral800};
|
|
13
|
+
background: ${({theme:e,active:i})=>i?e.colors.neutral0:void 0};
|
|
14
14
|
|
|
15
15
|
&:hover {
|
|
16
16
|
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`,P=t(p)`
|
|
19
19
|
font-size: 0.7rem;
|
|
20
20
|
svg path {
|
|
21
21
|
fill: ${e=>e["aria-disabled"]?e.theme.colors.neutral300:e.theme.colors.neutral600};
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
${e=>e["aria-disabled"]?`
|
|
32
32
|
pointer-events: none;
|
|
33
33
|
`:void 0}
|
|
34
|
-
|
|
34
|
+
`,w=t(p)`
|
|
35
35
|
color: ${({theme:e})=>e.colors.neutral800};
|
|
36
|
-
`,
|
|
36
|
+
`,h=c.forwardRef(({children:e,...i},o)=>{const{activePage:n}=u.usePagination(),s=n===1;return r.jsxs(P,{ref:o,"aria-disabled":s,tabIndex:s?-1:void 0,...i,children:[r.jsx(l.VisuallyHidden,{children:e}),r.jsx(x.ChevronLeft,{"aria-hidden":!0})]})});h.displayName="PreviousLink";const v=c.forwardRef(({children:e,...i},o)=>{const{activePage:n,pageCount:s}=u.usePagination(),a=n===s;return r.jsxs(P,{ref:o,"aria-disabled":a,tabIndex:a?-1:void 0,...i,children:[r.jsx(l.VisuallyHidden,{children:e}),r.jsx(x.ChevronRight,{"aria-hidden":!0})]})});v.displayName="NextLink";const g=c.forwardRef(({number:e,children:i,...o},n)=>{const{activePage:s}=u.usePagination(),a=s===e;return r.jsxs(m,{ref:n,...o,active:a,children:[r.jsx(l.VisuallyHidden,{children:i}),r.jsx(y,{"aria-hidden":!0,variant:"pi",fontWeight:a?"bold":null,children:e})]})});g.displayName="PageLink";const b=({children:e,...i})=>r.jsxs(w,{...i,as:"div",children:[r.jsx(l.VisuallyHidden,{children:e}),r.jsx(y,{"aria-hidden":!0,variant:"pi",children:"…"})]});g.propTypes={children:d.node.isRequired,number:d.number.isRequired};const f={children:d.node.isRequired};v.propTypes=f;h.propTypes=f;b.propTypes={children:d.node.isRequired};exports.Dots=b;exports.NextLink=v;exports.PageLink=g;exports.PreviousLink=h;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
3
|
+
import { ChevronLeft as P, ChevronRight as x } from "@strapi/icons";
|
|
3
4
|
import d from "prop-types";
|
|
4
5
|
import s from "styled-components";
|
|
5
|
-
import { usePagination as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { VisuallyHidden as
|
|
10
|
-
const m = s(
|
|
6
|
+
import { usePagination as h } from "./PaginationContext.js";
|
|
7
|
+
import { buttonFocusStyle as k } from "../../themes/utils.js";
|
|
8
|
+
import { Typography as w } from "../../Typography/Typography.js";
|
|
9
|
+
import { BaseLink as L } from "../../BaseLink/BaseLink.js";
|
|
10
|
+
import { VisuallyHidden as c } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
11
|
+
const m = s(w)`
|
|
11
12
|
line-height: revert;
|
|
12
|
-
`,
|
|
13
|
+
`, $ = {
|
|
13
14
|
active: !0
|
|
14
|
-
},
|
|
15
|
-
shouldForwardProp: (e, r) =>
|
|
15
|
+
}, u = s(L).withConfig({
|
|
16
|
+
shouldForwardProp: (e, r) => !$[e] && r(e)
|
|
16
17
|
})`
|
|
17
18
|
padding: ${({ theme: e }) => e.spaces[3]};
|
|
18
19
|
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
@@ -20,15 +21,15 @@ const m = s(k)`
|
|
|
20
21
|
text-decoration: none;
|
|
21
22
|
display: flex;
|
|
22
23
|
|
|
23
|
-
${
|
|
24
|
-
`,
|
|
24
|
+
${k}
|
|
25
|
+
`, R = s(u)`
|
|
25
26
|
color: ${({ theme: e, active: r }) => r ? e.colors.primary700 : e.colors.neutral800};
|
|
26
27
|
background: ${({ theme: e, active: r }) => r ? e.colors.neutral0 : void 0};
|
|
27
28
|
|
|
28
29
|
&:hover {
|
|
29
30
|
box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
|
|
30
31
|
}
|
|
31
|
-
`,
|
|
32
|
+
`, f = s(u)`
|
|
32
33
|
font-size: 0.7rem;
|
|
33
34
|
svg path {
|
|
34
35
|
fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral600};
|
|
@@ -44,39 +45,51 @@ const m = s(k)`
|
|
|
44
45
|
${(e) => e["aria-disabled"] ? `
|
|
45
46
|
pointer-events: none;
|
|
46
47
|
` : void 0}
|
|
47
|
-
`,
|
|
48
|
+
`, T = s(u)`
|
|
48
49
|
color: ${({ theme: e }) => e.colors.neutral800};
|
|
49
|
-
`,
|
|
50
|
-
const { activePage:
|
|
51
|
-
return /* @__PURE__ */
|
|
50
|
+
`, v = p.forwardRef(({ children: e, ...r }, a) => {
|
|
51
|
+
const { activePage: t } = h(), i = t === 1;
|
|
52
|
+
return /* @__PURE__ */ l(f, { ref: a, "aria-disabled": i, tabIndex: i ? -1 : void 0, ...r, children: [
|
|
53
|
+
/* @__PURE__ */ o(c, { children: e }),
|
|
54
|
+
/* @__PURE__ */ o(P, { "aria-hidden": !0 })
|
|
55
|
+
] });
|
|
52
56
|
});
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
const { activePage:
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
+
v.displayName = "PreviousLink";
|
|
58
|
+
const g = p.forwardRef(({ children: e, ...r }, a) => {
|
|
59
|
+
const { activePage: t, pageCount: i } = h(), n = t === i;
|
|
60
|
+
return /* @__PURE__ */ l(f, { ref: a, "aria-disabled": n, tabIndex: n ? -1 : void 0, ...r, children: [
|
|
61
|
+
/* @__PURE__ */ o(c, { children: e }),
|
|
62
|
+
/* @__PURE__ */ o(x, { "aria-hidden": !0 })
|
|
63
|
+
] });
|
|
57
64
|
});
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
const { activePage:
|
|
61
|
-
return /* @__PURE__ */
|
|
65
|
+
g.displayName = "NextLink";
|
|
66
|
+
const b = p.forwardRef(({ number: e, children: r, ...a }, t) => {
|
|
67
|
+
const { activePage: i } = h(), n = i === e;
|
|
68
|
+
return /* @__PURE__ */ l(R, { ref: t, ...a, active: n, children: [
|
|
69
|
+
/* @__PURE__ */ o(c, { children: r }),
|
|
70
|
+
/* @__PURE__ */ o(m, { "aria-hidden": !0, variant: "pi", fontWeight: n ? "bold" : null, children: e })
|
|
71
|
+
] });
|
|
62
72
|
});
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
73
|
+
b.displayName = "PageLink";
|
|
74
|
+
const N = ({ children: e, ...r }) => /* @__PURE__ */ l(T, { ...r, as: "div", children: [
|
|
75
|
+
/* @__PURE__ */ o(c, { children: e }),
|
|
76
|
+
/* @__PURE__ */ o(m, { "aria-hidden": !0, variant: "pi", children: "…" })
|
|
77
|
+
] });
|
|
78
|
+
b.propTypes = {
|
|
66
79
|
children: d.node.isRequired,
|
|
67
80
|
number: d.number.isRequired
|
|
68
81
|
};
|
|
69
|
-
const
|
|
82
|
+
const y = {
|
|
70
83
|
children: d.node.isRequired
|
|
71
84
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
85
|
+
g.propTypes = y;
|
|
86
|
+
v.propTypes = y;
|
|
87
|
+
N.propTypes = {
|
|
75
88
|
children: d.node.isRequired
|
|
76
89
|
};
|
|
77
90
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
91
|
+
N as Dots,
|
|
92
|
+
g as NextLink,
|
|
93
|
+
b as PageLink,
|
|
94
|
+
v as PreviousLink
|
|
82
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Pagination.cjs"),i=require("./components.cjs");exports.Pagination=e.Pagination;exports.Dots=i.Dots;exports.NextLink=i.NextLink;exports.PageLink=i.PageLink;exports.PreviousLink=i.PreviousLink;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),x=require("@radix-ui/react-dropdown-menu"),c=require("@strapi/icons"),i=require("styled-components"),y=require("../../helpers/theme.cjs"),S=require("../Link/Link.cjs"),w=require("../../Button/Button.cjs"),j=require("../../Box/Box.cjs"),d=require("../../Flex/Flex.cjs"),s=require("../../Typography/Typography.cjs");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const n=m(x),T=n.Root,C=a.forwardRef(({size:e,...t},o)=>r.jsx(n.Trigger,{asChild:!0,children:r.jsx(w.Button,{ref:o,type:"button",variant:"ghost",endIcon:r.jsx(c.CarretDown,{width:`${6/16}rem`,height:`${4/16}rem`,"aria-hidden":!0}),paddingTop:e==="S"?1:2,paddingBottom:e==="S"?1:2,paddingLeft:e==="S"?3:4,paddingRight:e==="S"?3:4,...t})})),R=a.forwardRef(({children:e,intersectionId:t,popoverPlacement:o="bottom-start",...l},b)=>{const[p,f]=o.split("-");return r.jsx(n.Portal,{children:r.jsx(n.Content,{align:f,side:p,loop:!0,asChild:!0,children:r.jsxs(u,{ref:b,direction:"column",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,alignItems:"flex-start",position:"relative",overflow:"auto",...l,children:[e,r.jsx(j.Box,{id:t,width:"100%",height:"1px"})]})})})}),u=i(d.Flex)`
|
|
2
2
|
scrollbar-width: none;
|
|
3
3
|
-ms-overflow-style: none;
|
|
4
4
|
-webkit-overflow-scrolling: touch;
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
&::-webkit-scrollbar {
|
|
7
7
|
display: none;
|
|
8
8
|
}
|
|
9
|
-
`,$=({onSelect:e,disabled:
|
|
9
|
+
`,$=({onSelect:e,disabled:t=!1,...o})=>r.jsx(n.Item,{asChild:!0,onSelect:e,disabled:t,children:o.isLink||o.isExternal?r.jsx(v,{color:"neutral800",...o,isExternal:o.isExternal??!1,children:r.jsx(s.Typography,{children:o.children})}):r.jsx(g,{cursor:"pointer",color:"neutral800",background:"transparent",borderStyle:"none",...o,children:r.jsx(s.Typography,{children:o.children})})}),h=({theme:e})=>i.css`
|
|
10
10
|
text-align: left;
|
|
11
11
|
width: 100%;
|
|
12
12
|
border-radius: ${e.borderRadius};
|
|
13
13
|
padding: ${e.spaces[2]} ${e.spaces[4]};
|
|
14
14
|
|
|
15
|
-
${
|
|
15
|
+
${s.Typography} {
|
|
16
16
|
color: inherit;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&[aria-disabled] {
|
|
20
20
|
cursor: not-allowed;
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${s.Typography} {
|
|
23
23
|
color: ${e.colors.neutral500};
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
content: none;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
39
|
-
${
|
|
40
|
-
`,
|
|
38
|
+
`,g=i(d.Flex)`
|
|
39
|
+
${h}
|
|
40
|
+
`,v=i(S.Link)`
|
|
41
41
|
/* We include this here again because typically when people use OptionLink they provide an as prop which cancels the Box props */
|
|
42
|
-
color: ${({theme:e,color:
|
|
42
|
+
color: ${({theme:e,color:t})=>y.extractStyleFromTheme(e.colors,t,void 0)};
|
|
43
43
|
text-decoration: none;
|
|
44
44
|
|
|
45
45
|
&:hover {
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
fill: currentColor;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
${
|
|
55
|
-
`,
|
|
54
|
+
${h}
|
|
55
|
+
`,k=a.forwardRef((e,t)=>r.jsx(n.Label,{asChild:!0,children:r.jsx(M,{ref:t,variant:"sigma",textColor:"neutral600",...e})})),M=i(s.Typography)`
|
|
56
56
|
padding: ${({theme:e})=>e.spaces[2]} ${({theme:e})=>e.spaces[4]};
|
|
57
|
-
`,
|
|
57
|
+
`,q=n.Sub,L=a.forwardRef(({disabled:e=!1,...t},o)=>r.jsx(n.SubTrigger,{asChild:!0,disabled:e,children:r.jsxs(O,{ref:o,color:"neutral800",as:"button",type:"button",background:"transparent",borderStyle:"none",gap:5,...t,children:[r.jsx(s.Typography,{children:t.children}),r.jsx(B,{height:12,width:12})]})})),O=i(g)`
|
|
58
58
|
&[data-state='open'] {
|
|
59
59
|
background-color: ${({theme:e})=>e.colors.primary100};
|
|
60
60
|
}
|
|
61
|
-
`,
|
|
61
|
+
`,B=i(c.ChevronRight)`
|
|
62
62
|
path {
|
|
63
63
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
64
64
|
}
|
|
65
|
-
`,
|
|
65
|
+
`,I=a.forwardRef((e,t)=>r.jsx(n.Portal,{children:r.jsx(n.SubContent,{sideOffset:8,asChild:!0,children:r.jsx(u,{ref:t,direction:"column",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,alignItems:"flex-start",...e})})})),D=T,P=C,F=R,E=$,W=k,_=q,H=L,A=I;exports.Content=F;exports.Item=E;exports.Label=W;exports.Root=D;exports.SubContent=A;exports.SubRoot=_;exports.SubTrigger=H;exports.Trigger=P;
|
|
@@ -3,68 +3,15 @@ import { forwardRef as a } from "react";
|
|
|
3
3
|
import * as n from "@radix-ui/react-dropdown-menu";
|
|
4
4
|
import { CarretDown as f, ChevronRight as S } from "@strapi/icons";
|
|
5
5
|
import l, { css as w } from "styled-components";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { extractStyleFromTheme as x } from "../../helpers/theme.js";
|
|
7
|
+
import { Link as y } from "../Link/Link.js";
|
|
8
|
+
import { Button as C } from "../../Button/Button.js";
|
|
9
|
+
import { Box as $ } from "../../Box/Box.js";
|
|
8
10
|
import { Flex as s } from "../../Flex/Flex.js";
|
|
9
|
-
import { extractStyleFromTheme as C } from "../../helpers/theme.js";
|
|
10
11
|
import { Typography as i } from "../../Typography/Typography.js";
|
|
11
|
-
|
|
12
|
-
const v = n.Root, k = a(({
|
|
13
|
-
size: r,
|
|
14
|
-
...o
|
|
15
|
-
}, t) => e(n.Trigger, {
|
|
16
|
-
asChild: !0,
|
|
17
|
-
children: e(y, {
|
|
18
|
-
ref: t,
|
|
19
|
-
type: "button",
|
|
20
|
-
variant: "ghost",
|
|
21
|
-
endIcon: e(f, {
|
|
22
|
-
width: `${6 / 16}rem`,
|
|
23
|
-
height: `${4 / 16}rem`,
|
|
24
|
-
"aria-hidden": !0
|
|
25
|
-
}),
|
|
26
|
-
paddingTop: r === "S" ? 1 : 2,
|
|
27
|
-
paddingBottom: r === "S" ? 1 : 2,
|
|
28
|
-
paddingLeft: r === "S" ? 3 : 4,
|
|
29
|
-
paddingRight: r === "S" ? 3 : 4,
|
|
30
|
-
...o
|
|
31
|
-
})
|
|
32
|
-
})), R = a(({
|
|
33
|
-
children: r,
|
|
34
|
-
intersectionId: o,
|
|
35
|
-
popoverPlacement: t = "bottom-start",
|
|
36
|
-
...g
|
|
37
|
-
}, p) => {
|
|
12
|
+
const v = n.Root, k = a(({ size: r, ...o }, t) => e(n.Trigger, { asChild: !0, children: e(C, { ref: t, type: "button", variant: "ghost", endIcon: e(f, { width: `${6 / 16}rem`, height: `${4 / 16}rem`, "aria-hidden": !0 }), paddingTop: r === "S" ? 1 : 2, paddingBottom: r === "S" ? 1 : 2, paddingLeft: r === "S" ? 3 : 4, paddingRight: r === "S" ? 3 : 4, ...o }) })), R = a(({ children: r, intersectionId: o, popoverPlacement: t = "bottom-start", ...g }, p) => {
|
|
38
13
|
const [b, m] = t.split("-");
|
|
39
|
-
return e(n.Portal, {
|
|
40
|
-
children: e(n.Content, {
|
|
41
|
-
align: m,
|
|
42
|
-
side: b,
|
|
43
|
-
loop: !0,
|
|
44
|
-
asChild: !0,
|
|
45
|
-
children: d(c, {
|
|
46
|
-
ref: p,
|
|
47
|
-
direction: "column",
|
|
48
|
-
borderStyle: "solid",
|
|
49
|
-
borderWidth: "1px",
|
|
50
|
-
borderColor: "neutral150",
|
|
51
|
-
hasRadius: !0,
|
|
52
|
-
background: "neutral0",
|
|
53
|
-
shadow: "filterShadow",
|
|
54
|
-
maxHeight: "15rem",
|
|
55
|
-
padding: 1,
|
|
56
|
-
alignItems: "flex-start",
|
|
57
|
-
position: "relative",
|
|
58
|
-
overflow: "auto",
|
|
59
|
-
...g,
|
|
60
|
-
children: [r, e(x, {
|
|
61
|
-
id: o,
|
|
62
|
-
width: "100%",
|
|
63
|
-
height: "1px"
|
|
64
|
-
})]
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
});
|
|
14
|
+
return e(n.Portal, { children: e(n.Content, { align: m, side: b, loop: !0, asChild: !0, children: d(c, { ref: p, direction: "column", borderStyle: "solid", borderWidth: "1px", borderColor: "neutral150", hasRadius: !0, background: "neutral0", shadow: "filterShadow", maxHeight: "15rem", padding: 1, alignItems: "flex-start", position: "relative", overflow: "auto", ...g, children: [r, e($, { id: o, width: "100%", height: "1px" })] }) }) });
|
|
68
15
|
}), c = l(s)`
|
|
69
16
|
scrollbar-width: none;
|
|
70
17
|
-ms-overflow-style: none;
|
|
@@ -73,34 +20,7 @@ const v = n.Root, k = a(({
|
|
|
73
20
|
&::-webkit-scrollbar {
|
|
74
21
|
display: none;
|
|
75
22
|
}
|
|
76
|
-
`, T = ({
|
|
77
|
-
onSelect: r,
|
|
78
|
-
disabled: o = !1,
|
|
79
|
-
...t
|
|
80
|
-
}) => e(n.Item, {
|
|
81
|
-
asChild: !0,
|
|
82
|
-
onSelect: r,
|
|
83
|
-
disabled: o,
|
|
84
|
-
children: t.isLink || t.isExternal ? e(L, {
|
|
85
|
-
color: "neutral800",
|
|
86
|
-
...t,
|
|
87
|
-
isExternal: t.isExternal ?? !1,
|
|
88
|
-
children: e(i, {
|
|
89
|
-
children: t.children
|
|
90
|
-
})
|
|
91
|
-
}) : e(h, {
|
|
92
|
-
cursor: "pointer",
|
|
93
|
-
color: "neutral800",
|
|
94
|
-
background: "transparent",
|
|
95
|
-
borderStyle: "none",
|
|
96
|
-
...t,
|
|
97
|
-
children: e(i, {
|
|
98
|
-
children: t.children
|
|
99
|
-
})
|
|
100
|
-
})
|
|
101
|
-
}), u = ({
|
|
102
|
-
theme: r
|
|
103
|
-
}) => w`
|
|
23
|
+
`, T = ({ onSelect: r, disabled: o = !1, ...t }) => e(n.Item, { asChild: !0, onSelect: r, disabled: o, children: t.isLink || t.isExternal ? e(L, { color: "neutral800", ...t, isExternal: t.isExternal ?? !1, children: e(i, { children: t.children }) }) : e(h, { cursor: "pointer", color: "neutral800", background: "transparent", borderStyle: "none", ...t, children: e(i, { children: t.children }) }) }), u = ({ theme: r }) => w`
|
|
104
24
|
text-align: left;
|
|
105
25
|
width: 100%;
|
|
106
26
|
border-radius: ${r.borderRadius};
|
|
@@ -131,12 +51,9 @@ const v = n.Root, k = a(({
|
|
|
131
51
|
}
|
|
132
52
|
`, h = l(s)`
|
|
133
53
|
${u}
|
|
134
|
-
`, L = l(
|
|
54
|
+
`, L = l(y)`
|
|
135
55
|
/* We include this here again because typically when people use OptionLink they provide an as prop which cancels the Box props */
|
|
136
|
-
color: ${({
|
|
137
|
-
theme: r,
|
|
138
|
-
color: o
|
|
139
|
-
}) => C(r.colors, o, void 0)};
|
|
56
|
+
color: ${({ theme: r, color: o }) => x(r.colors, o, void 0)};
|
|
140
57
|
text-decoration: none;
|
|
141
58
|
|
|
142
59
|
&:hover {
|
|
@@ -149,74 +66,17 @@ const v = n.Root, k = a(({
|
|
|
149
66
|
}
|
|
150
67
|
|
|
151
68
|
${u}
|
|
152
|
-
`, M = a((r, o) => e(n.Label, {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
ref: o,
|
|
156
|
-
variant: "sigma",
|
|
157
|
-
textColor: "neutral600",
|
|
158
|
-
...r
|
|
159
|
-
})
|
|
160
|
-
})), I = l(i)`
|
|
161
|
-
padding: ${({
|
|
162
|
-
theme: r
|
|
163
|
-
}) => r.spaces[2]} ${({
|
|
164
|
-
theme: r
|
|
165
|
-
}) => r.spaces[4]};
|
|
166
|
-
`, B = n.Sub, O = a(({
|
|
167
|
-
disabled: r = !1,
|
|
168
|
-
...o
|
|
169
|
-
}, t) => e(n.SubTrigger, {
|
|
170
|
-
asChild: !0,
|
|
171
|
-
disabled: r,
|
|
172
|
-
children: d(E, {
|
|
173
|
-
ref: t,
|
|
174
|
-
color: "neutral800",
|
|
175
|
-
as: "button",
|
|
176
|
-
type: "button",
|
|
177
|
-
background: "transparent",
|
|
178
|
-
borderStyle: "none",
|
|
179
|
-
gap: 5,
|
|
180
|
-
...o,
|
|
181
|
-
children: [e(i, {
|
|
182
|
-
children: o.children
|
|
183
|
-
}), e(W, {
|
|
184
|
-
height: 12,
|
|
185
|
-
width: 12
|
|
186
|
-
})]
|
|
187
|
-
})
|
|
188
|
-
})), E = l(h)`
|
|
69
|
+
`, M = a((r, o) => e(n.Label, { asChild: !0, children: e(I, { ref: o, variant: "sigma", textColor: "neutral600", ...r }) })), I = l(i)`
|
|
70
|
+
padding: ${({ theme: r }) => r.spaces[2]} ${({ theme: r }) => r.spaces[4]};
|
|
71
|
+
`, B = n.Sub, O = a(({ disabled: r = !1, ...o }, t) => e(n.SubTrigger, { asChild: !0, disabled: r, children: d(E, { ref: t, color: "neutral800", as: "button", type: "button", background: "transparent", borderStyle: "none", gap: 5, ...o, children: [e(i, { children: o.children }), e(W, { height: 12, width: 12 })] }) })), E = l(h)`
|
|
189
72
|
&[data-state='open'] {
|
|
190
|
-
background-color: ${({
|
|
191
|
-
theme: r
|
|
192
|
-
}) => r.colors.primary100};
|
|
73
|
+
background-color: ${({ theme: r }) => r.colors.primary100};
|
|
193
74
|
}
|
|
194
75
|
`, W = l(S)`
|
|
195
76
|
path {
|
|
196
|
-
fill: ${({
|
|
197
|
-
theme: r
|
|
198
|
-
}) => r.colors.neutral500};
|
|
77
|
+
fill: ${({ theme: r }) => r.colors.neutral500};
|
|
199
78
|
}
|
|
200
|
-
`, j = a((r, o) => e(n.Portal, {
|
|
201
|
-
children: e(n.SubContent, {
|
|
202
|
-
sideOffset: 8,
|
|
203
|
-
asChild: !0,
|
|
204
|
-
children: e(c, {
|
|
205
|
-
ref: o,
|
|
206
|
-
direction: "column",
|
|
207
|
-
borderStyle: "solid",
|
|
208
|
-
borderWidth: "1px",
|
|
209
|
-
borderColor: "neutral150",
|
|
210
|
-
hasRadius: !0,
|
|
211
|
-
background: "neutral0",
|
|
212
|
-
shadow: "filterShadow",
|
|
213
|
-
maxHeight: "15rem",
|
|
214
|
-
padding: 1,
|
|
215
|
-
alignItems: "flex-start",
|
|
216
|
-
...r
|
|
217
|
-
})
|
|
218
|
-
})
|
|
219
|
-
})), N = v, Q = k, U = R, X = T, Y = M, Z = B, _ = O, z = j;
|
|
79
|
+
`, j = a((r, o) => e(n.Portal, { children: e(n.SubContent, { sideOffset: 8, asChild: !0, children: e(c, { ref: o, direction: "column", borderStyle: "solid", borderWidth: "1px", borderColor: "neutral150", hasRadius: !0, background: "neutral0", shadow: "filterShadow", maxHeight: "15rem", padding: 1, alignItems: "flex-start", ...r }) }) })), N = v, Q = k, U = R, X = T, Y = M, Z = B, _ = O, z = j;
|
|
220
80
|
export {
|
|
221
81
|
U as Content,
|
|
222
82
|
X as Item,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),n=require("./Menu.cjs"),M=require("../../hooks/useId.cjs"),S=require("../../hooks/useIntersection.cjs"),j=({children:l,id:a,onOpen:s,onClose:c,popoverPlacement:d,onReachEnd:o,...r})=>{const I=u.useRef(null),[f,h]=u.useState(!1),m=e=>{o&&o(e)},p=e=>{e&&typeof s=="function"?s():!e&&typeof c=="function"&&c(),h(e)},g=M.useId(a),i=`intersection-${CSS.escape(g)}`;return S.useIntersection(I,m,{selectorToWatch:`#${i}`,skipWhen:!f}),t.jsxs(n.Root,{onOpenChange:p,children:[t.jsx(n.Trigger,{...r,children:r.label}),t.jsx(n.Content,{intersectionId:i,popoverPlacement:d,children:l})]})},q=n.Item;exports.Menu=n;exports.MenuItem=q;exports.SimpleMenu=j;
|