@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
package/dist/Status/Status.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as i, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import p from "styled-components";
|
|
4
5
|
import { Box as f } from "../Box/Box.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
6
|
+
import { Typography as $ } from "../Typography/Typography.js";
|
|
7
|
+
import { Flex as b } from "../Flex/Flex.js";
|
|
8
|
+
const y = p.div`
|
|
8
9
|
margin-right: ${({ theme: o }) => o.spaces[3]};
|
|
9
10
|
width: ${6 / 16}rem;
|
|
10
11
|
height: ${6 / 16}rem;
|
|
11
12
|
border-radius: 50%;
|
|
12
13
|
background: ${({ theme: o, backgroundColor: r }) => o.colors[r]};
|
|
13
|
-
`,
|
|
14
|
-
${
|
|
14
|
+
`, x = p(f)`
|
|
15
|
+
${$} {
|
|
15
16
|
color: ${({ theme: o, textColor: r }) => o.colors[r]};
|
|
16
17
|
}
|
|
17
|
-
`,
|
|
18
|
-
const c = `${o}100`, m = `${o}200`, u = `${o}600`, g = `${o}600`,
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
18
|
+
`, a = ({ variant: o, showBullet: r, size: e, children: s, ...l }) => {
|
|
19
|
+
const c = `${o}100`, m = `${o}200`, u = `${o}600`, g = `${o}600`, n = e === "S" ? 2 : 5, d = e === "S" ? 1 : 4;
|
|
20
|
+
return /* @__PURE__ */ i(
|
|
21
|
+
x,
|
|
21
22
|
{
|
|
22
23
|
borderColor: m,
|
|
23
24
|
textColor: g,
|
|
@@ -25,24 +26,35 @@ const b = l.div`
|
|
|
25
26
|
hasRadius: !0,
|
|
26
27
|
paddingTop: d,
|
|
27
28
|
paddingBottom: d,
|
|
28
|
-
paddingLeft:
|
|
29
|
-
paddingRight:
|
|
30
|
-
...
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
paddingLeft: n,
|
|
30
|
+
paddingRight: n,
|
|
31
|
+
...l,
|
|
32
|
+
children: r ? /* @__PURE__ */ h(b, { children: [
|
|
33
|
+
/* @__PURE__ */ i(y, { backgroundColor: u }),
|
|
34
|
+
s
|
|
35
|
+
] }) : s
|
|
36
|
+
}
|
|
33
37
|
);
|
|
34
38
|
};
|
|
35
|
-
|
|
39
|
+
a.defaultProps = {
|
|
36
40
|
showBullet: !0,
|
|
37
41
|
size: "M",
|
|
38
42
|
variant: "primary"
|
|
39
43
|
};
|
|
40
|
-
|
|
41
|
-
children:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
a.propTypes = {
|
|
45
|
+
children: t.node.isRequired,
|
|
46
|
+
/**
|
|
47
|
+
* If `false`, the preceeding bullet of the status won't be displayed.
|
|
48
|
+
* This prop and the bullet will be removed in the next major version.
|
|
49
|
+
*/
|
|
50
|
+
showBullet: t.bool,
|
|
51
|
+
// TODO V2: remove prop and bullet
|
|
52
|
+
size: t.oneOf(["S", "M"]),
|
|
53
|
+
/**
|
|
54
|
+
* Color variation
|
|
55
|
+
*/
|
|
56
|
+
variant: t.oneOf(["alternative", "danger", "neutral", "primary", "secondary", "success", "warning"])
|
|
45
57
|
};
|
|
46
58
|
export {
|
|
47
|
-
|
|
59
|
+
a as Status
|
|
48
60
|
};
|
package/dist/Status/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Status.cjs");exports.Status=t.Status;
|
package/dist/SubNav/SubNav.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.
|
|
2
|
-
width: ${
|
|
3
|
-
background: ${({theme:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime");require("react");const s=require("prop-types"),a=require("styled-components"),u=require("../Grid/Grid.cjs"),e=`${232/16}rem`,n=a(u.Grid)`
|
|
2
|
+
width: ${e};
|
|
3
|
+
background: ${({theme:r})=>r.colors.neutral100};
|
|
4
4
|
position: sticky;
|
|
5
5
|
top: 0;
|
|
6
6
|
height: 100vh;
|
|
7
7
|
overflow-y: auto;
|
|
8
|
-
border-right: 1px solid ${({theme:
|
|
8
|
+
border-right: 1px solid ${({theme:r})=>r.colors.neutral200};
|
|
9
9
|
z-index: 1;
|
|
10
|
-
`,
|
|
10
|
+
`,t=({ariaLabel:r,...i})=>o.jsx(n,{"aria-label":r,as:"nav",...i});t.propTypes={ariaLabel:s.string.isRequired};exports.SubNav=t;exports.subNavWidth=e;
|
package/dist/SubNav/SubNav.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
import
|
|
3
|
-
import i from "
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import i from "prop-types";
|
|
4
|
+
import e from "styled-components";
|
|
4
5
|
import { Grid as a } from "../Grid/Grid.js";
|
|
5
|
-
|
|
6
|
-
const p = `${232 / 16}rem`, s = i(a)`
|
|
6
|
+
const p = `${232 / 16}rem`, s = e(a)`
|
|
7
7
|
width: ${p};
|
|
8
8
|
background: ${({ theme: r }) => r.colors.neutral100};
|
|
9
9
|
position: sticky;
|
|
@@ -12,11 +12,11 @@ const p = `${232 / 16}rem`, s = i(a)`
|
|
|
12
12
|
overflow-y: auto;
|
|
13
13
|
border-right: 1px solid ${({ theme: r }) => r.colors.neutral200};
|
|
14
14
|
z-index: 1;
|
|
15
|
-
`,
|
|
16
|
-
|
|
17
|
-
ariaLabel:
|
|
15
|
+
`, n = ({ ariaLabel: r, ...o }) => /* @__PURE__ */ t(s, { "aria-label": r, as: "nav", ...o });
|
|
16
|
+
n.propTypes = {
|
|
17
|
+
ariaLabel: i.string.isRequired
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
n as SubNav,
|
|
21
21
|
p as subNavWidth
|
|
22
22
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),T=require("@strapi/icons"),r=require("prop-types"),R=require("styled-components"),I=require("../helpers/keyboardKeys.cjs"),P=require("../hooks/useId.cjs"),D=require("../hooks/usePrevious.cjs"),K=require("../Searchbar/SearchForm.cjs"),L=require("../Searchbar/Searchbar.cjs"),k=require("../Divider/Divider.cjs"),a=require("../Box/Box.cjs"),w=require("../Flex/Flex.cjs"),F=require("../Typography/Typography.cjs"),O=require("../IconButton/IconButton.cjs"),p=R(k.Divider)`
|
|
2
2
|
width: ${24/16}rem;
|
|
3
|
-
background-color: ${({theme:
|
|
4
|
-
`,
|
|
3
|
+
background-color: ${({theme:i})=>i.colors.neutral200};
|
|
4
|
+
`,d=({as:i,label:g,searchLabel:l,searchable:f,onChange:b,value:x,onClear:S,onSubmit:y,id:q})=>{const[s,c]=t.useState(!1),h=D.usePrevious(s),j=P.useId(q),o=t.useRef(),u=t.useRef();t.useEffect(()=>{s&&o.current&&o.current.focus(),h&&!s&&u.current&&u.current.focus()},[s,h]);const v=()=>{c(n=>!n)},B=n=>{S(n),o.current.focus()},m=n=>{n.relatedTarget?.id!==j&&c(!1)},C=n=>{n.key===I.KeyboardKeys.ESCAPE&&c(!1)};return s?e.jsxs(a.Box,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4,children:[e.jsx(K.SearchForm,{children:e.jsx(L.Searchbar,{name:"searchbar",value:x,onChange:b,placeholder:"e.g: strapi-plugin-abcd",onKeyDown:C,ref:o,onBlur:m,onClear:B,onSubmit:y,clearLabel:"Clear",size:"S",children:l})}),e.jsx(a.Box,{paddingLeft:2,paddingTop:4,children:e.jsx(p,{})})]}):e.jsxs(a.Box,{paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4,children:[e.jsxs(w.Flex,{justifyContent:"space-between",alignItems:"flex-start",children:[e.jsx(F.Typography,{variant:"beta",as:i,children:g}),f&&e.jsx(O.IconButton,{ref:u,onClick:v,label:l,icon:e.jsx(T.Search,{})})]}),e.jsx(a.Box,{paddingTop:4,children:e.jsx(p,{})})]})};d.defaultProps={as:"h2",searchable:!1,onChange(){},onClear(){},onSubmit(){},value:"",searchLabel:"",id:void 0};d.propTypes={as:r.string,id:r.string,label:r.string.isRequired,onChange:r.func,onClear:r.func,onSubmit:r.func,searchLabel:r.string,searchable:r.bool,value:r.string};exports.SubNavHeader=d;
|
|
@@ -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 { Searchbar as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
7
|
+
import { useId as j } from "../hooks/useId.js";
|
|
8
|
+
import { usePrevious as k } from "../hooks/usePrevious.js";
|
|
9
|
+
import { SearchForm as E } from "../Searchbar/SearchForm.js";
|
|
10
|
+
import { Searchbar as O } from "../Searchbar/Searchbar.js";
|
|
11
|
+
import { Divider as F } from "../Divider/Divider.js";
|
|
12
|
+
import { Box as a } from "../Box/Box.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(F)`
|
|
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(E, { children: /* @__PURE__ */ e(
|
|
35
|
+
O,
|
|
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");require("react");const g=require("@strapi/icons"),i=require("prop-types"),x=require("react-router-dom"),l=require("styled-components"),s=require("../Box/Box.cjs"),a=require("../Typography/Typography.cjs"),n=require("../Flex/Flex.cjs"),y=l(s.Box)`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
svg > * {
|
|
16
16
|
fill: ${e.colors.primary700};
|
|
17
17
|
}
|
|
18
|
-
${
|
|
18
|
+
${a.Typography} {
|
|
19
19
|
color: ${e.colors.primary700};
|
|
20
20
|
font-weight: 500;
|
|
21
21
|
}
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
&:focus-visible {
|
|
26
26
|
outline-offset: -2px;
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
28
|
+
`,c=l(g.Dot)`
|
|
29
29
|
width: ${12/16}rem;
|
|
30
30
|
height: ${4/16}rem;
|
|
31
31
|
* {
|
|
32
32
|
fill: ${({theme:e,$active:o})=>o?e.colors.primary600:e.colors.neutral600};
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`,h=l.div`
|
|
35
35
|
svg {
|
|
36
36
|
height: ${12/16}rem;
|
|
37
37
|
width: ${12/16}rem;
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,t=({children:e,icon:o,withBullet:u,isSubSectionChild:d,...p})=>r.jsxs(y,{as:x.NavLink,icon:o,background:"neutral100",paddingLeft:d?9:7,paddingBottom:2,paddingTop:2,...p,children:[r.jsxs(n.Flex,{children:[o?r.jsx(h,{children:o}):r.jsx(c,{}),r.jsx(s.Box,{paddingLeft:2,children:r.jsx(a.Typography,{as:"span",children:e})})]}),u&&r.jsx(s.Box,{as:n.Flex,paddingRight:4,children:r.jsx(c,{$active:!0})})]});t.displayName="SubNavLink";t.defaultProps={icon:null,isSubSectionChild:!1,withBullet:!1};t.propTypes={children:i.node.isRequired,icon:i.element,isSubSectionChild:i.bool,withBullet:i.bool};exports.SubNavLink=t;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { Typography as
|
|
9
|
-
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Dot as f } from "@strapi/icons";
|
|
4
|
+
import e from "prop-types";
|
|
5
|
+
import { NavLink as g } from "react-router-dom";
|
|
6
|
+
import l from "styled-components";
|
|
7
|
+
import { Box as t } from "../Box/Box.js";
|
|
8
|
+
import { Typography as c } from "../Typography/Typography.js";
|
|
9
|
+
import { Flex as p } from "../Flex/Flex.js";
|
|
10
|
+
const h = 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: o }) => o.colors.neutral800};
|
|
15
16
|
svg > * {
|
|
16
|
-
fill: ${({ theme:
|
|
17
|
+
fill: ${({ theme: o }) => o.colors.neutral600};
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
&.active {
|
|
20
|
-
${({ theme:
|
|
21
|
-
background-color: ${
|
|
22
|
-
border-right: 2px solid ${
|
|
21
|
+
${({ theme: o }) => `
|
|
22
|
+
background-color: ${o.colors.primary100};
|
|
23
|
+
border-right: 2px solid ${o.colors.primary600};
|
|
23
24
|
svg > * {
|
|
24
|
-
fill: ${
|
|
25
|
+
fill: ${o.colors.primary700};
|
|
25
26
|
}
|
|
26
|
-
${
|
|
27
|
-
color: ${
|
|
27
|
+
${c} {
|
|
28
|
+
color: ${o.colors.primary700};
|
|
28
29
|
font-weight: 500;
|
|
29
30
|
}
|
|
30
31
|
`}
|
|
@@ -33,30 +34,35 @@ const g = i(l)`
|
|
|
33
34
|
&:focus-visible {
|
|
34
35
|
outline-offset: -2px;
|
|
35
36
|
}
|
|
36
|
-
`,
|
|
37
|
+
`, a = l(f)`
|
|
37
38
|
width: ${12 / 16}rem;
|
|
38
39
|
height: ${4 / 16}rem;
|
|
39
40
|
* {
|
|
40
|
-
fill: ${({ theme:
|
|
41
|
+
fill: ${({ theme: o, $active: i }) => i ? o.colors.primary600 : o.colors.neutral600};
|
|
41
42
|
}
|
|
42
|
-
`, $ =
|
|
43
|
+
`, $ = l.div`
|
|
43
44
|
svg {
|
|
44
45
|
height: ${12 / 16}rem;
|
|
45
46
|
width: ${12 / 16}rem;
|
|
46
47
|
}
|
|
47
|
-
`, n = ({ children:
|
|
48
|
-
|
|
48
|
+
`, n = ({ children: o, icon: i, withBullet: d, isSubSectionChild: m, ...u }) => /* @__PURE__ */ s(
|
|
49
|
+
h,
|
|
49
50
|
{
|
|
50
|
-
as:
|
|
51
|
-
icon:
|
|
51
|
+
as: g,
|
|
52
|
+
icon: i,
|
|
52
53
|
background: "neutral100",
|
|
53
54
|
paddingLeft: m ? 9 : 7,
|
|
54
55
|
paddingBottom: 2,
|
|
55
56
|
paddingTop: 2,
|
|
56
|
-
...
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
...u,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ s(p, { children: [
|
|
60
|
+
i ? /* @__PURE__ */ r($, { children: i }) : /* @__PURE__ */ r(a, {}),
|
|
61
|
+
/* @__PURE__ */ r(t, { paddingLeft: 2, children: /* @__PURE__ */ r(c, { as: "span", children: o }) })
|
|
62
|
+
] }),
|
|
63
|
+
d && /* @__PURE__ */ r(t, { as: p, paddingRight: 4, children: /* @__PURE__ */ r(a, { $active: !0 }) })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
60
66
|
);
|
|
61
67
|
n.displayName = "SubNavLink";
|
|
62
68
|
n.defaultProps = {
|
|
@@ -65,10 +71,10 @@ n.defaultProps = {
|
|
|
65
71
|
withBullet: !1
|
|
66
72
|
};
|
|
67
73
|
n.propTypes = {
|
|
68
|
-
children:
|
|
69
|
-
icon:
|
|
70
|
-
isSubSectionChild:
|
|
71
|
-
withBullet:
|
|
74
|
+
children: e.node.isRequired,
|
|
75
|
+
icon: e.element,
|
|
76
|
+
isSubSectionChild: e.bool,
|
|
77
|
+
withBullet: e.bool
|
|
72
78
|
};
|
|
73
79
|
export {
|
|
74
80
|
n as SubNavLink
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),x=require("@strapi/icons"),i=require("prop-types"),s=require("styled-components"),j=require("../hooks/useId.cjs"),o=require("../Box/Box.cjs"),y=require("../Flex/Flex.cjs"),b=require("../Typography/Typography.cjs"),S=s(o.Box)`
|
|
2
2
|
svg {
|
|
3
3
|
height: ${4/16}rem;
|
|
4
4
|
path {
|
|
5
|
-
fill: ${({theme:
|
|
5
|
+
fill: ${({theme:n})=>n.colors.neutral700};
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,f=s.button`
|
|
9
9
|
border: none;
|
|
10
10
|
padding: 0;
|
|
11
11
|
background: transparent;
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
|
-
`,
|
|
14
|
+
`,m=s.div`
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
width: ${12/16}rem;
|
|
18
|
-
transform: rotateX(${({rotated:
|
|
19
|
-
`,
|
|
18
|
+
transform: rotateX(${({rotated:n})=>n?"0deg":"180deg"});
|
|
19
|
+
`,d=({label:n,children:l,id:p})=>{const[r,u]=c.useState(!0),a=j.useId(p),h=()=>{u(t=>!t)};return e.jsxs(o.Box,{children:[e.jsx(S,{paddingLeft:7,paddingTop:2,paddingBottom:2,paddingRight:4,children:e.jsx(y.Flex,{justifyContent:"space-between",children:e.jsxs(f,{onClick:h,"aria-expanded":r,"aria-controls":a,children:[e.jsx(m,{rotated:r,children:e.jsx(x.CarretDown,{"aria-hidden":!0})}),e.jsx(o.Box,{paddingLeft:2,children:e.jsx(b.Typography,{as:"span",fontWeight:"semiBold",textColor:"neutral800",children:n})})]})})}),r&&e.jsx("ul",{id:a,children:c.Children.map(l,(t,g)=>e.jsx("li",{children:t},g))})]})};d.defaultProps={children:void 0,id:void 0};d.propTypes={children:i.node,id:i.string,label:i.string.isRequired};exports.SubNavLinkSection=d;
|
|
@@ -1,43 +1,50 @@
|
|
|
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 f, Children as g } from "react";
|
|
3
|
+
import { CarretDown as u } from "@strapi/icons";
|
|
4
|
+
import t 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
|
-
`, v =
|
|
17
|
+
`, v = d.button`
|
|
17
18
|
border: none;
|
|
18
19
|
padding: 0;
|
|
19
20
|
background: transparent;
|
|
20
21
|
display: flex;
|
|
21
22
|
align-items: center;
|
|
22
|
-
`,
|
|
23
|
+
`, C = 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] = f(!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(v, { onClick: () => {
|
|
32
|
+
m((n) => !n);
|
|
33
|
+
}, "aria-expanded": i, "aria-controls": a, children: [
|
|
34
|
+
/* @__PURE__ */ e(C, { rotated: i, children: /* @__PURE__ */ e(u, { "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: g.map(s, (n, h) => /* @__PURE__ */ e("li", { children: n }, h)) })
|
|
38
|
+
] });
|
|
32
39
|
};
|
|
33
40
|
l.defaultProps = {
|
|
34
41
|
children: void 0,
|
|
35
42
|
id: void 0
|
|
36
43
|
};
|
|
37
44
|
l.propTypes = {
|
|
38
|
-
children:
|
|
39
|
-
id:
|
|
40
|
-
label:
|
|
45
|
+
children: t.node,
|
|
46
|
+
id: t.string,
|
|
47
|
+
label: t.string.isRequired
|
|
41
48
|
};
|
|
42
49
|
export {
|
|
43
50
|
l as SubNavLinkSection
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),t=require("prop-types"),b=require("styled-components"),S=require("./SubNavSectionLabel.cjs"),q=require("../hooks/useId.cjs"),d=require("../Box/Box.cjs"),v=require("../Flex/Flex.cjs"),j=require("../Badge/Badge.cjs"),m=b(d.Box)`
|
|
2
2
|
svg {
|
|
3
3
|
height: ${4/16}rem;
|
|
4
4
|
path {
|
|
5
|
-
fill: ${({theme:
|
|
5
|
+
fill: ${({theme:i})=>i.colors.neutral500};
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,o=({collapsable:i,label:c,badgeLabel:r,children:u,id:p})=>{const[s,g]=a.useState(!0),l=q.useId(p),h=()=>{g(n=>!n)};return e.jsxs(v.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[e.jsx(m,{paddingLeft:6,paddingTop:1,paddingBottom:1,paddingRight:4,children:e.jsxs(d.Box,{position:"relative",paddingRight:r?6:0,children:[e.jsx(S.SubNavSectionLabel,{onClick:h,ariaExpanded:s,ariaControls:l,collapsable:i,label:c}),r&&e.jsx(j.Badge,{backgroundColor:"neutral150",textColor:"neutral600",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",children:r})]})}),(!i||s)&&e.jsx("ol",{id:l,children:a.Children.map(u,(n,x)=>e.jsx("li",{children:n},x))})]})};o.defaultProps={badgeLabel:null,children:void 0,collapsable:!1,id:void 0};o.propTypes={badgeLabel:t.string,children:t.node,collapsable:t.bool,id:t.string,label:t.string.isRequired};exports.SubNavSection=o;
|