@strapi/design-system 1.7.0 → 1.7.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +12 -12
- 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 +2 -2
- 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 +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 +2 -2
- 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 +5 -5
- 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 +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 -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 +6 -6
- 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 +3 -3
- 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 +2 -2
- package/dist/DatePicker/DatePickerTd.js +13 -45
- package/dist/DatePicker/DatePickerTh.cjs +3 -3
- package/dist/DatePicker/DatePickerTh.js +9 -33
- package/dist/DatePicker/compareDates.cjs +1 -1
- package/dist/DatePicker/components.cjs +13 -7
- 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 +5 -5
- 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 +2 -2
- 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 +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 +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 +2 -2
- 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 +3 -3
- package/dist/Icon/Icon.js +6 -21
- package/dist/Icon/index.cjs +1 -1
- package/dist/IconButton/IconButton.cjs +3 -3
- 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 +2 -2
- package/dist/Layout/HeaderLayout.cjs +2 -2
- 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 +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 +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 +3 -3
- package/dist/MainNav/NavBrand.js +37 -21
- package/dist/MainNav/NavCondense.cjs +2 -2
- 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 +2 -2
- 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 +3 -3
- package/dist/ModalLayout/ModalLayout.js +24 -23
- package/dist/ModalLayout/index.cjs +1 -1
- package/dist/NumberInput/NumberInput.cjs +2 -2
- 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 +6 -6
- package/dist/Searchbar/Searchbar.js +51 -50
- package/dist/Searchbar/index.cjs +1 -1
- package/dist/Select/MultiSelect.cjs +6 -6
- package/dist/Select/MultiSelect.js +43 -206
- package/dist/Select/MultiSelectNested.cjs +2 -2
- 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 +9 -9
- 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 +5 -5
- package/dist/Stack/Stack.js +7 -28
- package/dist/Stack/index.cjs +1 -1
- package/dist/Status/Status.cjs +6 -6
- package/dist/Status/Status.js +36 -24
- package/dist/Status/index.cjs +1 -1
- package/dist/SubNav/SubNav.cjs +2 -2
- package/dist/SubNav/SubNav.js +9 -9
- package/dist/SubNav/SubNavHeader.cjs +2 -2
- 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 +4 -4
- package/dist/SubNav/SubNavLinkSection.js +28 -21
- package/dist/SubNav/SubNavSection.cjs +2 -2
- package/dist/SubNav/SubNavSection.js +46 -39
- package/dist/SubNav/SubNavSectionLabel.cjs +3 -3
- 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 +3 -3
- 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 +17 -17
- 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 +4 -4
- package/dist/Tag/Tag.js +6 -43
- package/dist/Tag/index.cjs +1 -1
- package/dist/TextButton/TextButton.cjs +5 -5
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +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 +16 -15
- package/dist/v2/MainNav/MainNavContext.cjs +1 -1
- package/dist/v2/MainNav/NavBrand.cjs +3 -3
- package/dist/v2/MainNav/NavBrand.js +38 -22
- package/dist/v2/MainNav/NavCondense.cjs +2 -2
- 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 +6 -6
- 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 +2 -2
- 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 +8 -8
- 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 +2 -2
- package/dist/v2/SubNav/SubNav.js +9 -9
- package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
- 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 +4 -4
- package/dist/v2/SubNav/SubNavLinkSection.js +28 -21
- package/dist/v2/SubNav/SubNavSection.cjs +2 -2
- package/dist/v2/SubNav/SubNavSection.js +48 -41
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +3 -3
- 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,53 +1,63 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as f, useEffect as D } from "react";
|
|
3
|
+
import { Search as I } from "@strapi/icons";
|
|
3
4
|
import r from "prop-types";
|
|
4
|
-
import
|
|
5
|
-
import { Box as n } from "../../Box/Box.js";
|
|
6
|
-
import { Divider as I } from "../../Divider/Divider.js";
|
|
7
|
-
import { Flex as K } from "../../Flex/Flex.js";
|
|
5
|
+
import K from "styled-components";
|
|
8
6
|
import { KeyboardKeys as P } from "../../helpers/keyboardKeys.js";
|
|
9
|
-
import { useId as
|
|
10
|
-
import { usePrevious as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { SearchForm as
|
|
14
|
-
import {
|
|
15
|
-
|
|
7
|
+
import { useId as j } from "../../hooks/useId.js";
|
|
8
|
+
import { usePrevious as k } from "../../hooks/usePrevious.js";
|
|
9
|
+
import { Divider as E } from "../../Divider/Divider.js";
|
|
10
|
+
import { Box as a } from "../../Box/Box.js";
|
|
11
|
+
import { SearchForm as O } from "../../Searchbar/SearchForm.js";
|
|
12
|
+
import { Searchbar as F } from "../../Searchbar/Searchbar.js";
|
|
13
|
+
import { Flex as $ } from "../../Flex/Flex.js";
|
|
14
|
+
import { Typography as q } from "../../Typography/Typography.js";
|
|
15
|
+
import { IconButton as z } from "../../IconButton/IconButton.js";
|
|
16
|
+
const m = K(E)`
|
|
16
17
|
width: ${24 / 16}rem;
|
|
17
|
-
background-color: ${({ theme:
|
|
18
|
-
`,
|
|
19
|
-
const [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, [
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
18
|
+
background-color: ${({ theme: i }) => i.colors.neutral200};
|
|
19
|
+
`, u = ({ as: i, label: h, searchLabel: l, searchable: g, onChange: b, value: S, onClear: y, onSubmit: C, id: v }) => {
|
|
20
|
+
const [n, s] = w(!1), p = k(n), B = j(v), t = f(), c = f();
|
|
21
|
+
D(() => {
|
|
22
|
+
n && t.current && t.current.focus(), p && !n && c.current && c.current.focus();
|
|
23
|
+
}, [n, p]);
|
|
24
|
+
const T = () => {
|
|
25
|
+
s((o) => !o);
|
|
26
|
+
}, x = (o) => {
|
|
27
|
+
y(o), t.current.focus();
|
|
28
|
+
}, R = (o) => {
|
|
29
|
+
o.relatedTarget?.id !== B && s(!1);
|
|
30
|
+
}, L = (o) => {
|
|
31
|
+
o.key === P.ESCAPE && s(!1);
|
|
31
32
|
};
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
33
|
+
return n ? /* @__PURE__ */ d(a, { paddingLeft: 4, paddingTop: 5, paddingBottom: 2, paddingRight: 4, children: [
|
|
34
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
|
|
35
|
+
F,
|
|
36
|
+
{
|
|
37
|
+
name: "searchbar",
|
|
38
|
+
value: S,
|
|
39
|
+
onChange: b,
|
|
40
|
+
placeholder: "e.g: strapi-plugin-abcd",
|
|
41
|
+
onKeyDown: L,
|
|
42
|
+
ref: t,
|
|
43
|
+
onBlur: R,
|
|
44
|
+
onClear: x,
|
|
45
|
+
onSubmit: C,
|
|
46
|
+
clearLabel: "Clear",
|
|
47
|
+
size: "S",
|
|
48
|
+
children: l
|
|
49
|
+
}
|
|
50
|
+
) }),
|
|
51
|
+
/* @__PURE__ */ e(a, { paddingLeft: 2, paddingTop: 4, children: /* @__PURE__ */ e(m, {}) })
|
|
52
|
+
] }) : /* @__PURE__ */ d(a, { paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [
|
|
53
|
+
/* @__PURE__ */ d($, { justifyContent: "space-between", alignItems: "flex-start", children: [
|
|
54
|
+
/* @__PURE__ */ e(q, { variant: "beta", as: i, children: h }),
|
|
55
|
+
g && /* @__PURE__ */ e(z, { ref: c, onClick: T, label: l, icon: /* @__PURE__ */ e(I, {}) })
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ e(a, { paddingTop: 4, children: /* @__PURE__ */ e(m, {}) })
|
|
58
|
+
] });
|
|
49
59
|
};
|
|
50
|
-
|
|
60
|
+
u.defaultProps = {
|
|
51
61
|
as: "h2",
|
|
52
62
|
searchable: !1,
|
|
53
63
|
onChange() {
|
|
@@ -60,7 +70,7 @@ f.defaultProps = {
|
|
|
60
70
|
searchLabel: "",
|
|
61
71
|
id: void 0
|
|
62
72
|
};
|
|
63
|
-
|
|
73
|
+
u.propTypes = {
|
|
64
74
|
as: r.string,
|
|
65
75
|
id: r.string,
|
|
66
76
|
label: r.string.isRequired,
|
|
@@ -72,5 +82,5 @@ f.propTypes = {
|
|
|
72
82
|
value: r.string
|
|
73
83
|
};
|
|
74
84
|
export {
|
|
75
|
-
|
|
85
|
+
u as SubNavHeader
|
|
76
86
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),x=require("react"),h=require("@strapi/icons"),b=require("prop-types"),$=require("styled-components"),s=require("../../Box/Box.cjs"),c=require("../../Typography/Typography.cjs"),a=require("../../Flex/Flex.cjs"),m=require("../../BaseLink/BaseLink.cjs"),i=e=>e&&e.__esModule?e:{default:e},v=i(x),t=i(b),n=i($),j=n.default(s.Box)`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
&:focus-visible {
|
|
26
26
|
outline-offset: -2px;
|
|
27
27
|
}
|
|
28
|
-
`,u=
|
|
28
|
+
`,u=n.default(h.Dot)`
|
|
29
29
|
width: ${12/16}rem;
|
|
30
30
|
height: ${4/16}rem;
|
|
31
31
|
* {
|
|
32
|
-
fill: ${({theme:e,$active:
|
|
32
|
+
fill: ${({theme:e,$active:o})=>o?e.colors.primary600:e.colors.neutral600};
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`,q=n.default.div`
|
|
35
35
|
svg {
|
|
36
36
|
height: ${12/16}rem;
|
|
37
37
|
width: ${12/16}rem;
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,l=v.default.forwardRef(({children:e,icon:o,withBullet:d,as:p,isSubSectionChild:f,...y},g)=>r.jsxs(j,{as:p,icon:o,background:"neutral100",paddingLeft:f?9:7,paddingBottom:2,paddingTop:2,ref:g,...y,children:[r.jsxs(a.Flex,{children:[o?r.jsx(q,{children:o}):r.jsx(u,{}),r.jsx(s.Box,{paddingLeft:2,children:r.jsx(c.Typography,{as:"span",children:e})})]}),d&&r.jsx(s.Box,{as:a.Flex,paddingRight:4,children:r.jsx(u,{$active:!0})})]}));l.displayName="SubNavLink";l.defaultProps={as:m.BaseLink,icon:null,isSubSectionChild:!1,withBullet:!1};l.propTypes={as:t.default.elementType,children:t.default.node.isRequired,icon:t.default.element,isSubSectionChild:t.default.bool,withBullet:t.default.bool};exports.SubNavLink=l;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import i from "
|
|
5
|
-
import
|
|
6
|
-
import { Box as
|
|
1
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import h from "react";
|
|
3
|
+
import { Dot as y } from "@strapi/icons";
|
|
4
|
+
import i from "prop-types";
|
|
5
|
+
import l from "styled-components";
|
|
6
|
+
import { Box as t } from "../../Box/Box.js";
|
|
7
|
+
import { Typography as c } from "../../Typography/Typography.js";
|
|
7
8
|
import { Flex as a } from "../../Flex/Flex.js";
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
9
|
+
import { BaseLink as $ } from "../../BaseLink/BaseLink.js";
|
|
10
|
+
const b = l(t)`
|
|
10
11
|
display: flex;
|
|
11
12
|
align-items: center;
|
|
12
13
|
justify-content: space-between;
|
|
13
14
|
text-decoration: none;
|
|
14
|
-
color: ${({ theme:
|
|
15
|
+
color: ${({ theme: r }) => r.colors.neutral800};
|
|
15
16
|
svg > * {
|
|
16
|
-
fill: ${({ theme:
|
|
17
|
+
fill: ${({ theme: r }) => r.colors.neutral600};
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
&.active {
|
|
20
|
-
${({ theme:
|
|
21
|
-
background-color: ${
|
|
22
|
-
border-right: 2px solid ${
|
|
21
|
+
${({ theme: r }) => `
|
|
22
|
+
background-color: ${r.colors.primary100};
|
|
23
|
+
border-right: 2px solid ${r.colors.primary600};
|
|
23
24
|
svg > * {
|
|
24
|
-
fill: ${
|
|
25
|
+
fill: ${r.colors.primary700};
|
|
25
26
|
}
|
|
26
|
-
${
|
|
27
|
-
color: ${
|
|
27
|
+
${c} {
|
|
28
|
+
color: ${r.colors.primary700};
|
|
28
29
|
font-weight: 500;
|
|
29
30
|
}
|
|
30
31
|
`}
|
|
@@ -33,45 +34,50 @@ const $ = i(l)`
|
|
|
33
34
|
&:focus-visible {
|
|
34
35
|
outline-offset: -2px;
|
|
35
36
|
}
|
|
36
|
-
`,
|
|
37
|
+
`, p = l(y)`
|
|
37
38
|
width: ${12 / 16}rem;
|
|
38
39
|
height: ${4 / 16}rem;
|
|
39
40
|
* {
|
|
40
|
-
fill: ${({ theme:
|
|
41
|
+
fill: ${({ theme: r, $active: e }) => e ? r.colors.primary600 : r.colors.neutral600};
|
|
41
42
|
}
|
|
42
|
-
`,
|
|
43
|
+
`, v = l.div`
|
|
43
44
|
svg {
|
|
44
45
|
height: ${12 / 16}rem;
|
|
45
46
|
width: ${12 / 16}rem;
|
|
46
47
|
}
|
|
47
|
-
`, n =
|
|
48
|
-
|
|
48
|
+
`, n = h.forwardRef(({ children: r, icon: e, withBullet: d, as: m, isSubSectionChild: f, ...u }, g) => /* @__PURE__ */ s(
|
|
49
|
+
b,
|
|
49
50
|
{
|
|
50
51
|
as: m,
|
|
51
|
-
icon:
|
|
52
|
+
icon: e,
|
|
52
53
|
background: "neutral100",
|
|
53
|
-
paddingLeft:
|
|
54
|
+
paddingLeft: f ? 9 : 7,
|
|
54
55
|
paddingBottom: 2,
|
|
55
56
|
paddingTop: 2,
|
|
56
|
-
ref:
|
|
57
|
-
...u
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
ref: g,
|
|
58
|
+
...u,
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ s(a, { children: [
|
|
61
|
+
e ? /* @__PURE__ */ o(v, { children: e }) : /* @__PURE__ */ o(p, {}),
|
|
62
|
+
/* @__PURE__ */ o(t, { paddingLeft: 2, children: /* @__PURE__ */ o(c, { as: "span", children: r }) })
|
|
63
|
+
] }),
|
|
64
|
+
d && /* @__PURE__ */ o(t, { as: a, paddingRight: 4, children: /* @__PURE__ */ o(p, { $active: !0 }) })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
61
67
|
));
|
|
62
68
|
n.displayName = "SubNavLink";
|
|
63
69
|
n.defaultProps = {
|
|
64
|
-
as:
|
|
70
|
+
as: $,
|
|
65
71
|
icon: null,
|
|
66
72
|
isSubSectionChild: !1,
|
|
67
73
|
withBullet: !1
|
|
68
74
|
};
|
|
69
75
|
n.propTypes = {
|
|
70
|
-
as:
|
|
71
|
-
children:
|
|
72
|
-
icon:
|
|
73
|
-
isSubSectionChild:
|
|
74
|
-
withBullet:
|
|
76
|
+
as: i.elementType,
|
|
77
|
+
children: i.node.isRequired,
|
|
78
|
+
icon: i.element,
|
|
79
|
+
isSubSectionChild: i.bool,
|
|
80
|
+
withBullet: i.bool
|
|
75
81
|
};
|
|
76
82
|
export {
|
|
77
83
|
n as SubNavLink
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),f=require("@strapi/icons"),y=require("prop-types"),j=require("styled-components"),b=require("../../hooks/useId.cjs"),o=require("../../Box/Box.cjs"),q=require("../../Flex/Flex.cjs"),S=require("../../Typography/Typography.cjs"),c=e=>e&&e.__esModule?e:{default:e},i=c(y),s=c(j),m=s.default(o.Box)`
|
|
2
2
|
svg {
|
|
3
3
|
height: ${4/16}rem;
|
|
4
4
|
path {
|
|
5
5
|
fill: ${({theme:e})=>e.colors.neutral700};
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,k=s.default.button`
|
|
9
9
|
border: none;
|
|
10
10
|
padding: 0;
|
|
11
11
|
background: transparent;
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
|
-
`,v=
|
|
14
|
+
`,v=s.default.div`
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
width: ${12/16}rem;
|
|
18
18
|
transform: rotateX(${({rotated:e})=>e?"0deg":"180deg"});
|
|
19
|
-
`,
|
|
19
|
+
`,d=({label:e,children:u,id:p})=>{const[n,g]=l.useState(!0),a=b.useId(p),h=()=>{g(r=>!r)};return t.jsxs(o.Box,{children:[t.jsx(m,{paddingLeft:7,paddingTop:2,paddingBottom:2,paddingRight:4,children:t.jsx(q.Flex,{justifyContent:"space-between",children:t.jsxs(k,{onClick:h,"aria-expanded":n,"aria-controls":a,children:[t.jsx(v,{rotated:n,children:t.jsx(f.CarretDown,{"aria-hidden":!0})}),t.jsx(o.Box,{paddingLeft:2,children:t.jsx(S.Typography,{as:"span",fontWeight:"semiBold",textColor:"neutral800",children:e})})]})})}),n&&t.jsx("ul",{id:a,children:l.Children.map(u,(r,x)=>t.jsx("li",{children:r},x))})]})};d.defaultProps={id:void 0};d.propTypes={children:i.default.node.isRequired,id:i.default.string,label:i.default.string.isRequired};exports.SubNavLinkSection=d;
|
|
@@ -1,42 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, Children as f } from "react";
|
|
3
|
+
import { CarretDown as g } from "@strapi/icons";
|
|
4
|
+
import n from "prop-types";
|
|
5
|
+
import d from "styled-components";
|
|
6
|
+
import { useId as x } from "../../hooks/useId.js";
|
|
7
|
+
import { Box as o } from "../../Box/Box.js";
|
|
8
|
+
import { Flex as b } from "../../Flex/Flex.js";
|
|
9
|
+
import { Typography as k } from "../../Typography/Typography.js";
|
|
10
|
+
const y = d(o)`
|
|
10
11
|
svg {
|
|
11
12
|
height: ${4 / 16}rem;
|
|
12
13
|
path {
|
|
13
|
-
fill: ${({ theme:
|
|
14
|
+
fill: ${({ theme: r }) => r.colors.neutral700};
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
`,
|
|
17
|
+
`, C = d.button`
|
|
17
18
|
border: none;
|
|
18
19
|
padding: 0;
|
|
19
20
|
background: transparent;
|
|
20
21
|
display: flex;
|
|
21
22
|
align-items: center;
|
|
22
|
-
`, S =
|
|
23
|
+
`, S = d.div`
|
|
23
24
|
display: flex;
|
|
24
25
|
align-items: center;
|
|
25
26
|
width: ${12 / 16}rem;
|
|
26
|
-
transform: rotateX(${({ rotated:
|
|
27
|
-
`, l = ({ label:
|
|
28
|
-
const [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
transform: rotateX(${({ rotated: r }) => r ? "0deg" : "180deg"});
|
|
28
|
+
`, l = ({ label: r, children: s, id: c }) => {
|
|
29
|
+
const [i, m] = u(!0), a = x(c);
|
|
30
|
+
return /* @__PURE__ */ p(o, { children: [
|
|
31
|
+
/* @__PURE__ */ e(y, { paddingLeft: 7, paddingTop: 2, paddingBottom: 2, paddingRight: 4, children: /* @__PURE__ */ e(b, { justifyContent: "space-between", children: /* @__PURE__ */ p(C, { onClick: () => {
|
|
32
|
+
m((t) => !t);
|
|
33
|
+
}, "aria-expanded": i, "aria-controls": a, children: [
|
|
34
|
+
/* @__PURE__ */ e(S, { rotated: i, children: /* @__PURE__ */ e(g, { "aria-hidden": !0 }) }),
|
|
35
|
+
/* @__PURE__ */ e(o, { paddingLeft: 2, children: /* @__PURE__ */ e(k, { as: "span", fontWeight: "semiBold", textColor: "neutral800", children: r }) })
|
|
36
|
+
] }) }) }),
|
|
37
|
+
i && /* @__PURE__ */ e("ul", { id: a, children: f.map(s, (t, h) => /* @__PURE__ */ e("li", { children: t }, h)) })
|
|
38
|
+
] });
|
|
32
39
|
};
|
|
33
40
|
l.defaultProps = {
|
|
34
41
|
id: void 0
|
|
35
42
|
};
|
|
36
43
|
l.propTypes = {
|
|
37
|
-
children:
|
|
38
|
-
id:
|
|
39
|
-
label:
|
|
44
|
+
children: n.node.isRequired,
|
|
45
|
+
id: n.string,
|
|
46
|
+
label: n.string.isRequired
|
|
40
47
|
};
|
|
41
48
|
export {
|
|
42
49
|
l as SubNavLinkSection
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),b=require("prop-types"),S=require("styled-components"),q=require("./SubNavSectionLabel.cjs"),j=require("../../hooks/useId.cjs"),d=require("../../Box/Box.cjs"),v=require("../../Flex/Flex.cjs"),m=require("../../Badge/Badge.cjs"),u=e=>e&&e.__esModule?e:{default:e},r=u(b),y=u(S),_=y.default(d.Box)`
|
|
2
2
|
svg {
|
|
3
3
|
height: ${4/16}rem;
|
|
4
4
|
path {
|
|
5
5
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,o=({collapsable:e,label:c,badgeLabel:i,children:p,id:g})=>{const[s,f]=a.useState(!0),l=j.useId(g),h=()=>{f(n=>!n)};return t.jsxs(v.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[t.jsx(_,{paddingLeft:6,paddingTop:2,paddingBottom:2,paddingRight:4,children:t.jsxs(d.Box,{position:"relative",paddingRight:i?6:0,children:[t.jsx(q.SubNavSectionLabel,{onClick:h,ariaExpanded:s,ariaControls:l,collapsable:e,label:c}),i&&t.jsx(m.Badge,{backgroundColor:"neutral150",textColor:"neutral600",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",children:i})]})}),(!e||s)&&t.jsx("ol",{id:l,children:a.Children.map(p,(n,x)=>t.jsx("li",{children:n},x))})]})};o.defaultProps={badgeLabel:null,collapsable:!1,id:void 0};o.propTypes={badgeLabel:r.default.string,children:r.default.node.isRequired,collapsable:r.default.bool,id:r.default.string,label:r.default.string.isRequired};exports.SubNavSection=o;
|
|
@@ -1,56 +1,63 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, Children as f } from "react";
|
|
3
|
+
import o from "prop-types";
|
|
3
4
|
import b from "styled-components";
|
|
4
|
-
import { SubNavSectionLabel as
|
|
5
|
-
import { Badge as S } from "../../Badge/Badge.js";
|
|
6
|
-
import { Box as l } from "../../Box/Box.js";
|
|
7
|
-
import { Flex as v } from "../../Flex/Flex.js";
|
|
5
|
+
import { SubNavSectionLabel as x } from "./SubNavSectionLabel.js";
|
|
8
6
|
import { useId as C } from "../../hooks/useId.js";
|
|
9
|
-
|
|
7
|
+
import { Box as d } from "../../Box/Box.js";
|
|
8
|
+
import { Flex as S } from "../../Flex/Flex.js";
|
|
9
|
+
import { Badge as v } from "../../Badge/Badge.js";
|
|
10
|
+
const k = b(d)`
|
|
10
11
|
svg {
|
|
11
12
|
height: ${4 / 16}rem;
|
|
12
13
|
path {
|
|
13
|
-
fill: ${({ theme:
|
|
14
|
+
fill: ${({ theme: i }) => i.colors.neutral500};
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
`,
|
|
17
|
-
const [n,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
17
|
+
`, s = ({ collapsable: i, label: p, badgeLabel: t, children: c, id: m }) => {
|
|
18
|
+
const [n, u] = h(!0), l = C(m);
|
|
19
|
+
return /* @__PURE__ */ a(S, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
20
|
+
/* @__PURE__ */ r(k, { paddingLeft: 6, paddingTop: 2, paddingBottom: 2, paddingRight: 4, children: /* @__PURE__ */ a(d, { position: "relative", paddingRight: t ? 6 : 0, children: [
|
|
21
|
+
/* @__PURE__ */ r(
|
|
22
|
+
x,
|
|
23
|
+
{
|
|
24
|
+
onClick: () => {
|
|
25
|
+
u((e) => !e);
|
|
26
|
+
},
|
|
27
|
+
ariaExpanded: n,
|
|
28
|
+
ariaControls: l,
|
|
29
|
+
collapsable: i,
|
|
30
|
+
label: p
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
t && /* @__PURE__ */ r(
|
|
34
|
+
v,
|
|
35
|
+
{
|
|
36
|
+
backgroundColor: "neutral150",
|
|
37
|
+
textColor: "neutral600",
|
|
38
|
+
position: "absolute",
|
|
39
|
+
right: 0,
|
|
40
|
+
top: "50%",
|
|
41
|
+
transform: "translateY(-50%)",
|
|
42
|
+
children: t
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] }) }),
|
|
46
|
+
(!i || n) && /* @__PURE__ */ r("ol", { id: l, children: f.map(c, (e, g) => /* @__PURE__ */ r("li", { children: e }, g)) })
|
|
47
|
+
] });
|
|
41
48
|
};
|
|
42
|
-
|
|
49
|
+
s.defaultProps = {
|
|
43
50
|
badgeLabel: null,
|
|
44
51
|
collapsable: !1,
|
|
45
52
|
id: void 0
|
|
46
53
|
};
|
|
47
|
-
|
|
48
|
-
badgeLabel:
|
|
49
|
-
children:
|
|
50
|
-
collapsable:
|
|
51
|
-
id:
|
|
52
|
-
label:
|
|
54
|
+
s.propTypes = {
|
|
55
|
+
badgeLabel: o.string,
|
|
56
|
+
children: o.node.isRequired,
|
|
57
|
+
collapsable: o.bool,
|
|
58
|
+
id: o.string,
|
|
59
|
+
label: o.string.isRequired
|
|
53
60
|
};
|
|
54
61
|
export {
|
|
55
|
-
|
|
62
|
+
s as SubNavSection
|
|
56
63
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("react");const x=require("@strapi/icons"),f=require("prop-types"),g=require("styled-components"),b=require("../../Flex/Flex.cjs"),l=require("../../Box/Box.cjs"),i=require("../../Typography/Typography.cjs"),d=e=>e&&e.__esModule?e:{default:e},t=d(f),u=d(g),s=u.default(b.Flex)`
|
|
2
2
|
border: none;
|
|
3
3
|
padding: 0;
|
|
4
4
|
background: transparent;
|
|
5
|
-
`,
|
|
5
|
+
`,y=u.default.div`
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
transform: rotateX(${({rotated:e})=>e?"0deg":"180deg"});
|
|
9
|
-
`,
|
|
9
|
+
`,a=({collapsable:e,label:n,onClick:c,ariaExpanded:o,ariaControls:p})=>e?r.jsxs(s,{as:"button",onClick:c,"aria-expanded":o,"aria-controls":p,textAlign:"left",children:[r.jsx(l.Box,{paddingRight:1,children:r.jsx(i.Typography,{variant:"sigma",textColor:"neutral600",children:n})}),e&&r.jsx(y,{rotated:o,children:r.jsx(x.CarretDown,{"aria-hidden":!0})})]}):r.jsx(s,{children:r.jsx(l.Box,{paddingRight:1,children:r.jsx(i.Typography,{variant:"sigma",textColor:"neutral600",children:n})})});a.defaultProps={ariaControls:null,ariaExpanded:null,collapsable:!1,onClick(){}};a.propTypes={ariaControls:t.default.string,ariaExpanded:t.default.bool,collapsable:t.default.bool,label:t.default.string.isRequired,onClick:t.default.func};exports.SubNavSectionLabel=a;
|
|
@@ -1,44 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { CarretDown as g } from "@strapi/icons";
|
|
4
|
+
import o from "prop-types";
|
|
4
5
|
import p from "styled-components";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Typography as
|
|
8
|
-
const
|
|
6
|
+
import { Flex as f } from "../../Flex/Flex.js";
|
|
7
|
+
import { Box as a } from "../../Box/Box.js";
|
|
8
|
+
import { Typography as i } from "../../Typography/Typography.js";
|
|
9
|
+
const l = p(f)`
|
|
9
10
|
border: none;
|
|
10
11
|
padding: 0;
|
|
11
12
|
background: transparent;
|
|
12
|
-
`,
|
|
13
|
+
`, u = p.div`
|
|
13
14
|
display: flex;
|
|
14
15
|
align-items: center;
|
|
15
16
|
transform: rotateX(${({ rotated: t }) => t ? "0deg" : "180deg"});
|
|
16
|
-
`,
|
|
17
|
-
|
|
17
|
+
`, d = ({ collapsable: t, label: e, onClick: s, ariaExpanded: n, ariaControls: c }) => t ? /* @__PURE__ */ m(
|
|
18
|
+
l,
|
|
18
19
|
{
|
|
19
20
|
as: "button",
|
|
20
|
-
onClick:
|
|
21
|
-
"aria-expanded":
|
|
21
|
+
onClick: s,
|
|
22
|
+
"aria-expanded": n,
|
|
22
23
|
"aria-controls": c,
|
|
23
|
-
textAlign: "left"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
textAlign: "left",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ r(a, { paddingRight: 1, children: /* @__PURE__ */ r(i, { variant: "sigma", textColor: "neutral600", children: e }) }),
|
|
27
|
+
t && /* @__PURE__ */ r(u, { rotated: n, children: /* @__PURE__ */ r(g, { "aria-hidden": !0 }) })
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
) : /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(a, { paddingRight: 1, children: /* @__PURE__ */ r(i, { variant: "sigma", textColor: "neutral600", children: e }) }) });
|
|
31
|
+
d.defaultProps = {
|
|
29
32
|
ariaControls: null,
|
|
30
33
|
ariaExpanded: null,
|
|
31
34
|
collapsable: !1,
|
|
32
35
|
onClick() {
|
|
33
36
|
}
|
|
34
37
|
};
|
|
35
|
-
|
|
36
|
-
ariaControls:
|
|
37
|
-
ariaExpanded:
|
|
38
|
-
collapsable:
|
|
39
|
-
label:
|
|
40
|
-
onClick:
|
|
38
|
+
d.propTypes = {
|
|
39
|
+
ariaControls: o.string,
|
|
40
|
+
ariaExpanded: o.bool,
|
|
41
|
+
collapsable: o.bool,
|
|
42
|
+
label: o.string.isRequired,
|
|
43
|
+
onClick: o.func
|
|
41
44
|
};
|
|
42
45
|
export {
|
|
43
|
-
|
|
46
|
+
d as SubNavSectionLabel
|
|
44
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("react"),l=require("prop-types"),d=require("../../Box/Box.cjs"),a=require("../../Flex/Flex.cjs"),p=e=>e&&e.__esModule?e:{default:e},x=p(l),n=({children:e,spacing:o=2,horizontal:t=!1,...s})=>r.jsx(d.Box,{paddingTop:2,paddingBottom:4,children:r.jsx(a.Flex,{as:"ol",gap:o,direction:t?"row":"column",alignItems:t?"center":"stretch",...s,children:u.Children.map(e,(i,c)=>r.jsx("li",{children:i},c))})});n.propTypes={children:x.default.node.isRequired};exports.SubNavSections=n;
|