@strapi/design-system 1.3.0-beta.3 → 1.3.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/LICENSE +20 -0
- package/dist/Accordion/Accordion.cjs +23 -0
- package/dist/Accordion/Accordion.js +88 -0
- package/dist/Accordion/AccordionContent.cjs +1 -0
- package/dist/Accordion/AccordionContent.js +23 -0
- package/dist/Accordion/AccordionContext.cjs +1 -0
- package/dist/Accordion/AccordionContext.js +6 -0
- package/dist/Accordion/AccordionGroup.cjs +47 -0
- package/dist/Accordion/AccordionGroup.js +91 -0
- package/dist/Accordion/AccordionToggle.cjs +28 -0
- package/dist/Accordion/AccordionToggle.js +127 -0
- package/dist/Accordion/index.cjs +1 -0
- package/dist/Accordion/index.js +11 -0
- package/dist/Accordion/utils.cjs +1 -0
- package/dist/Accordion/utils.js +7 -0
- package/dist/Alert/Alert.cjs +35 -0
- package/dist/Alert/Alert.js +111 -0
- package/dist/Alert/index.cjs +1 -0
- package/dist/Alert/index.js +4 -0
- package/dist/Alert/utils.cjs +1 -0
- package/dist/Alert/utils.js +6 -0
- package/dist/Avatar/Avatar.cjs +29 -0
- package/dist/Avatar/Avatar.js +80 -0
- package/dist/Avatar/AvatarGroup.cjs +5 -0
- package/dist/Avatar/AvatarGroup.js +11 -0
- package/dist/Avatar/constants.cjs +1 -0
- package/dist/Avatar/constants.js +5 -0
- package/dist/Avatar/index.cjs +1 -0
- package/dist/Avatar/index.js +7 -0
- package/dist/Badge/Badge.cjs +1 -0
- package/dist/Badge/Badge.js +33 -0
- package/dist/Badge/index.cjs +1 -0
- package/dist/Badge/index.js +4 -0
- package/dist/BaseButton/BaseButton.cjs +23 -0
- package/dist/BaseButton/BaseButton.js +45 -0
- package/dist/BaseButton/index.cjs +1 -0
- package/dist/BaseButton/index.js +5 -0
- package/dist/BaseCheckbox/BaseCheckbox.cjs +62 -0
- package/dist/BaseCheckbox/BaseCheckbox.js +105 -0
- package/dist/BaseCheckbox/assets/checkmark-black.cjs +1 -0
- package/dist/BaseCheckbox/assets/checkmark-black.js +4 -0
- package/dist/BaseCheckbox/assets/checkmark.cjs +1 -0
- package/dist/BaseCheckbox/assets/checkmark.js +4 -0
- package/dist/BaseCheckbox/index.cjs +1 -0
- package/dist/BaseCheckbox/index.js +4 -0
- package/dist/BaseCheckbox/utils.cjs +1 -0
- package/dist/BaseCheckbox/utils.js +4 -0
- package/dist/BaseLink/BaseLink.cjs +3 -0
- package/dist/BaseLink/BaseLink.js +31 -0
- package/dist/BaseLink/index.cjs +1 -0
- package/dist/BaseLink/index.js +4 -0
- package/dist/BaseRadio/BaseRadio.cjs +31 -0
- package/dist/BaseRadio/BaseRadio.js +62 -0
- package/dist/BaseRadio/RadioGroup.cjs +1 -0
- package/dist/BaseRadio/RadioGroup.js +32 -0
- package/dist/BaseRadio/context.cjs +1 -0
- package/dist/BaseRadio/context.js +6 -0
- package/dist/BaseRadio/index.cjs +1 -0
- package/dist/BaseRadio/index.js +6 -0
- package/dist/BaseRadio/utils.cjs +1 -0
- package/dist/BaseRadio/utils.js +6 -0
- package/dist/Box/Box.cjs +80 -0
- package/dist/Box/Box.js +95 -0
- package/dist/Box/BoxProps.cjs +1 -0
- package/dist/Box/BoxProps.js +51 -0
- package/dist/Box/index.cjs +1 -0
- package/dist/Box/index.js +4 -0
- package/dist/Breadcrumbs/Breadcrumbs.cjs +16 -0
- package/dist/Breadcrumbs/Breadcrumbs.js +52 -0
- package/dist/Breadcrumbs/index.cjs +1 -0
- package/dist/Breadcrumbs/index.js +5 -0
- package/dist/Button/Button.cjs +48 -0
- package/dist/Button/Button.js +109 -0
- package/dist/Button/constants.cjs +1 -0
- package/dist/Button/constants.js +14 -0
- package/dist/Button/index.cjs +1 -0
- package/dist/Button/index.js +5 -0
- package/dist/Button/utils.cjs +87 -0
- package/dist/Button/utils.js +112 -0
- package/dist/Card/Card.cjs +1 -0
- package/dist/Card/Card.js +32 -0
- package/dist/Card/CardAction.cjs +6 -0
- package/dist/Card/CardAction.js +14 -0
- package/dist/Card/CardAsset.cjs +19 -0
- package/dist/Card/CardAsset.js +42 -0
- package/dist/Card/CardBadge.cjs +6 -0
- package/dist/Card/CardBadge.js +14 -0
- package/dist/Card/CardBody.cjs +1 -0
- package/dist/Card/CardBody.js +15 -0
- package/dist/Card/CardCheckbox.cjs +1 -0
- package/dist/Card/CardCheckbox.js +16 -0
- package/dist/Card/CardContent.cjs +3 -0
- package/dist/Card/CardContent.js +15 -0
- package/dist/Card/CardContext.cjs +1 -0
- package/dist/Card/CardContext.js +6 -0
- package/dist/Card/CardHeader.cjs +4 -0
- package/dist/Card/CardHeader.js +13 -0
- package/dist/Card/CardTimer.cjs +5 -0
- package/dist/Card/CardTimer.js +26 -0
- package/dist/Card/CardTitle.cjs +1 -0
- package/dist/Card/CardTitle.js +23 -0
- package/dist/Card/index.cjs +1 -0
- package/dist/Card/index.js +23 -0
- package/dist/CarouselInput/Carousel.cjs +14 -0
- package/dist/CarouselInput/Carousel.js +131 -0
- package/dist/CarouselInput/CarouselActions.cjs +1 -0
- package/dist/CarouselInput/CarouselActions.js +14 -0
- package/dist/CarouselInput/CarouselImage.cjs +4 -0
- package/dist/CarouselInput/CarouselImage.js +35 -0
- package/dist/CarouselInput/CarouselInput.cjs +1 -0
- package/dist/CarouselInput/CarouselInput.js +79 -0
- package/dist/CarouselInput/CarouselSlide.cjs +3 -0
- package/dist/CarouselInput/CarouselSlide.js +26 -0
- package/dist/CarouselInput/index.cjs +1 -0
- package/dist/CarouselInput/index.js +12 -0
- package/dist/Checkbox/Checkbox.cjs +7 -0
- package/dist/Checkbox/Checkbox.js +64 -0
- package/dist/Checkbox/index.cjs +1 -0
- package/dist/Checkbox/index.js +4 -0
- package/dist/Combobox/Combobox.cjs +1 -0
- package/dist/Combobox/Combobox.js +285 -0
- package/dist/Combobox/ComboboxList.cjs +1 -0
- package/dist/Combobox/ComboboxList.js +15 -0
- package/dist/Combobox/ComboboxOption.cjs +1 -0
- package/dist/Combobox/ComboboxOption.js +30 -0
- package/dist/Combobox/components.cjs +53 -0
- package/dist/Combobox/components.js +64 -0
- package/dist/Combobox/index.cjs +1 -0
- package/dist/Combobox/index.js +7 -0
- package/dist/Combobox/utils.cjs +1 -0
- package/dist/Combobox/utils.js +78 -0
- package/dist/DatePicker/DatePicker.cjs +1 -0
- package/dist/DatePicker/DatePicker.js +104 -0
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -0
- package/dist/DatePicker/DatePickerCalendar.js +102 -0
- package/dist/DatePicker/DatePickerTd.cjs +19 -0
- package/dist/DatePicker/DatePickerTd.js +55 -0
- package/dist/DatePicker/DatePickerTh.cjs +9 -0
- package/dist/DatePicker/DatePickerTh.js +35 -0
- package/dist/DatePicker/compareDates.cjs +1 -0
- package/dist/DatePicker/compareDates.js +4 -0
- package/dist/DatePicker/components.cjs +31 -0
- package/dist/DatePicker/components.js +41 -0
- package/dist/DatePicker/index.cjs +1 -0
- package/dist/DatePicker/index.js +4 -0
- package/dist/DatePicker/utils/formatDate.cjs +1 -0
- package/dist/DatePicker/utils/formatDate.js +4 -0
- package/dist/DatePicker/utils/generateWeeks.cjs +1 -0
- package/dist/DatePicker/utils/generateWeeks.js +17 -0
- package/dist/DatePicker/utils/getDayOfWeek.cjs +1 -0
- package/dist/DatePicker/utils/getDayOfWeek.js +15 -0
- package/dist/DatePicker/utils/getMonths.cjs +1 -0
- package/dist/DatePicker/utils/getMonths.js +7 -0
- package/dist/DatePicker/utils/getYears.cjs +1 -0
- package/dist/DatePicker/utils/getYears.js +9 -0
- package/dist/DatePicker/utils/index.cjs +1 -0
- package/dist/DatePicker/utils/index.js +12 -0
- package/dist/Dialog/Dialog.cjs +14 -0
- package/dist/Dialog/Dialog.js +66 -0
- package/dist/Dialog/DialogBody.cjs +10 -0
- package/dist/Dialog/DialogBody.js +32 -0
- package/dist/Dialog/DialogFooter.cjs +9 -0
- package/dist/Dialog/DialogFooter.js +31 -0
- package/dist/Dialog/index.cjs +1 -0
- package/dist/Dialog/index.js +8 -0
- package/dist/DismissibleLayer/DismissibleLayer.cjs +1 -0
- package/dist/DismissibleLayer/DismissibleLayer.js +38 -0
- package/dist/DismissibleLayer/index.cjs +1 -0
- package/dist/DismissibleLayer/index.js +4 -0
- package/dist/Divider/Divider.cjs +5 -0
- package/dist/Divider/Divider.js +24 -0
- package/dist/Divider/index.cjs +1 -0
- package/dist/Divider/index.js +4 -0
- package/dist/EmptyStateLayout/EmptyStateLayout.cjs +10 -0
- package/dist/EmptyStateLayout/EmptyStateLayout.js +44 -0
- package/dist/EmptyStateLayout/index.cjs +1 -0
- package/dist/EmptyStateLayout/index.js +4 -0
- package/dist/EmptyStateLayout/story-assets/Illo.cjs +1 -0
- package/dist/EmptyStateLayout/story-assets/Illo.js +49 -0
- package/dist/Field/Field.cjs +1 -0
- package/dist/Field/Field.js +28 -0
- package/dist/Field/FieldAction.cjs +10 -0
- package/dist/Field/FieldAction.js +24 -0
- package/dist/Field/FieldContext.cjs +1 -0
- package/dist/Field/FieldContext.js +6 -0
- package/dist/Field/FieldError.cjs +1 -0
- package/dist/Field/FieldError.js +16 -0
- package/dist/Field/FieldHint.cjs +1 -0
- package/dist/Field/FieldHint.js +15 -0
- package/dist/Field/FieldInput.cjs +43 -0
- package/dist/Field/FieldInput.js +105 -0
- package/dist/Field/FieldLabel.cjs +9 -0
- package/dist/Field/FieldLabel.js +44 -0
- package/dist/Field/index.cjs +1 -0
- package/dist/Field/index.js +18 -0
- package/dist/Flex/Flex.cjs +9 -0
- package/dist/Flex/Flex.js +22 -0
- package/dist/Flex/FlexProps.cjs +1 -0
- package/dist/Flex/FlexProps.js +40 -0
- package/dist/Flex/index.cjs +1 -0
- package/dist/Flex/index.js +4 -0
- package/dist/FocusTrap/ExampleComponent.cjs +1 -0
- package/dist/FocusTrap/ExampleComponent.js +70 -0
- package/dist/FocusTrap/FocusTrap.cjs +1 -0
- package/dist/FocusTrap/FocusTrap.js +48 -0
- package/dist/FocusTrap/index.cjs +1 -0
- package/dist/FocusTrap/index.js +4 -0
- package/dist/Grid/Grid.cjs +5 -0
- package/dist/Grid/Grid.js +28 -0
- package/dist/Grid/GridContext.cjs +1 -0
- package/dist/Grid/GridContext.js +6 -0
- package/dist/Grid/GridItem.cjs +12 -0
- package/dist/Grid/GridItem.js +41 -0
- package/dist/Grid/index.cjs +1 -0
- package/dist/Grid/index.js +6 -0
- package/dist/Icon/Icon.cjs +6 -0
- package/dist/Icon/Icon.js +26 -0
- package/dist/Icon/index.cjs +1 -0
- package/dist/Icon/index.js +4 -0
- package/dist/IconButton/IconButton.cjs +86 -0
- package/dist/IconButton/IconButton.js +149 -0
- package/dist/IconButton/index.cjs +1 -0
- package/dist/IconButton/index.js +5 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.js +58 -0
- package/dist/KeyboardNavigable/index.cjs +1 -0
- package/dist/KeyboardNavigable/index.js +4 -0
- package/dist/Layout/ActionLayout.cjs +9 -0
- package/dist/Layout/ActionLayout.js +37 -0
- package/dist/Layout/ContentLayout.cjs +1 -0
- package/dist/Layout/ContentLayout.js +13 -0
- package/dist/Layout/GridLayout.cjs +5 -0
- package/dist/Layout/GridLayout.js +13 -0
- package/dist/Layout/HeaderLayout.cjs +8 -0
- package/dist/Layout/HeaderLayout.js +132 -0
- package/dist/Layout/Layout.cjs +6 -0
- package/dist/Layout/Layout.js +24 -0
- package/dist/Layout/TwoColsLayout.cjs +1 -0
- package/dist/Layout/TwoColsLayout.js +29 -0
- package/dist/Layout/index.cjs +1 -0
- package/dist/Layout/index.js +15 -0
- package/dist/Link/Link.cjs +33 -0
- package/dist/Link/Link.js +87 -0
- package/dist/Link/index.cjs +1 -0
- package/dist/Link/index.js +4 -0
- package/dist/LinkButton/LinkButton.cjs +32 -0
- package/dist/LinkButton/LinkButton.js +99 -0
- package/dist/LinkButton/index.cjs +1 -0
- package/dist/LinkButton/index.js +4 -0
- package/dist/LiveRegions/LiveRegions.cjs +1 -0
- package/dist/LiveRegions/LiveRegions.js +22 -0
- package/dist/LiveRegions/StoryComponent.cjs +1 -0
- package/dist/LiveRegions/StoryComponent.js +18 -0
- package/dist/LiveRegions/constants.cjs +1 -0
- package/dist/LiveRegions/constants.js +8 -0
- package/dist/LiveRegions/index.cjs +1 -0
- package/dist/LiveRegions/index.js +4 -0
- package/dist/LiveRegions/useNotifyAT.cjs +1 -0
- package/dist/LiveRegions/useNotifyAT.js +17 -0
- package/dist/Loader/Loader.cjs +12 -0
- package/dist/Loader/Loader.js +37 -0
- package/dist/Loader/assets/loader.cjs +1 -0
- package/dist/Loader/assets/loader.js +4 -0
- package/dist/Loader/index.cjs +1 -0
- package/dist/Loader/index.js +4 -0
- package/dist/Main/Main.cjs +6 -0
- package/dist/Main/Main.js +26 -0
- package/dist/Main/SkipToContent.cjs +12 -0
- package/dist/Main/SkipToContent.js +29 -0
- package/dist/Main/index.cjs +1 -0
- package/dist/Main/index.js +6 -0
- package/dist/MainNav/MainNav.cjs +9 -0
- package/dist/MainNav/MainNav.js +30 -0
- package/dist/MainNav/MainNavContext.cjs +1 -0
- package/dist/MainNav/MainNavContext.js +6 -0
- package/dist/MainNav/NavBrand.cjs +12 -0
- package/dist/MainNav/NavBrand.js +67 -0
- package/dist/MainNav/NavCondense.cjs +20 -0
- package/dist/MainNav/NavCondense.js +45 -0
- package/dist/MainNav/NavLink.cjs +69 -0
- package/dist/MainNav/NavLink.js +119 -0
- package/dist/MainNav/NavSection.cjs +1 -0
- package/dist/MainNav/NavSection.js +49 -0
- package/dist/MainNav/NavSections.cjs +1 -0
- package/dist/MainNav/NavSections.js +21 -0
- package/dist/MainNav/NavUser.cjs +7 -0
- package/dist/MainNav/NavUser.js +54 -0
- package/dist/MainNav/index.cjs +1 -0
- package/dist/MainNav/index.js +16 -0
- package/dist/ModalLayout/ModalBody.cjs +4 -0
- package/dist/ModalLayout/ModalBody.js +13 -0
- package/dist/ModalLayout/ModalContext.cjs +1 -0
- package/dist/ModalLayout/ModalContext.js +6 -0
- package/dist/ModalLayout/ModalFooter.cjs +8 -0
- package/dist/ModalLayout/ModalFooter.js +32 -0
- package/dist/ModalLayout/ModalHeader.cjs +4 -0
- package/dist/ModalLayout/ModalHeader.js +37 -0
- package/dist/ModalLayout/ModalLayout.cjs +12 -0
- package/dist/ModalLayout/ModalLayout.js +42 -0
- package/dist/ModalLayout/index.cjs +1 -0
- package/dist/ModalLayout/index.js +10 -0
- package/dist/NumberInput/NumberInput.cjs +12 -0
- package/dist/NumberInput/NumberInput.js +179 -0
- package/dist/NumberInput/index.cjs +1 -0
- package/dist/NumberInput/index.js +4 -0
- package/dist/Pagination/Pagination.cjs +5 -0
- package/dist/Pagination/Pagination.js +30 -0
- package/dist/Pagination/PaginationContext.cjs +1 -0
- package/dist/Pagination/PaginationContext.js +6 -0
- package/dist/Pagination/assets/next.cjs +1 -0
- package/dist/Pagination/assets/next.js +4 -0
- package/dist/Pagination/assets/previous.cjs +1 -0
- package/dist/Pagination/assets/previous.js +4 -0
- package/dist/Pagination/components.cjs +36 -0
- package/dist/Pagination/components.js +111 -0
- package/dist/Pagination/index.cjs +1 -0
- package/dist/Pagination/index.js +9 -0
- package/dist/Popover/Popover.cjs +26 -0
- package/dist/Popover/Popover.js +122 -0
- package/dist/Popover/index.cjs +1 -0
- package/dist/Popover/index.js +5 -0
- package/dist/Portal/Portal.cjs +1 -0
- package/dist/Portal/Portal.js +15 -0
- package/dist/Portal/index.cjs +1 -0
- package/dist/Portal/index.js +4 -0
- package/dist/ProgressBar/ProgressBar.cjs +11 -0
- package/dist/ProgressBar/ProgressBar.js +44 -0
- package/dist/ProgressBar/index.cjs +1 -0
- package/dist/ProgressBar/index.js +4 -0
- package/dist/Radio/Radio.cjs +4 -0
- package/dist/Radio/Radio.js +24 -0
- package/dist/Radio/index.cjs +1 -0
- package/dist/Radio/index.js +6 -0
- package/dist/RawTable/RawCell.cjs +1 -0
- package/dist/RawTable/RawCell.js +80 -0
- package/dist/RawTable/RawTable.cjs +1 -0
- package/dist/RawTable/RawTable.js +73 -0
- package/dist/RawTable/RawTableContext.cjs +1 -0
- package/dist/RawTable/RawTableContext.js +12 -0
- package/dist/RawTable/RawTbody.cjs +1 -0
- package/dist/RawTable/RawTbody.js +16 -0
- package/dist/RawTable/RawThead.cjs +1 -0
- package/dist/RawTable/RawThead.js +14 -0
- package/dist/RawTable/RawTr.cjs +1 -0
- package/dist/RawTable/RawTr.js +19 -0
- package/dist/RawTable/focusFocusable.cjs +1 -0
- package/dist/RawTable/focusFocusable.js +7 -0
- package/dist/RawTable/index.cjs +1 -0
- package/dist/RawTable/index.js +13 -0
- package/dist/Searchbar/SearchForm.cjs +1 -0
- package/dist/Searchbar/SearchForm.js +8 -0
- package/dist/Searchbar/Searchbar.cjs +29 -0
- package/dist/Searchbar/Searchbar.js +79 -0
- package/dist/Searchbar/index.cjs +1 -0
- package/dist/Searchbar/index.js +6 -0
- package/dist/Select/MultiSelectNested.cjs +1 -0
- package/dist/Select/MultiSelectNested.js +26 -0
- package/dist/Select/OptGroup.cjs +1 -0
- package/dist/Select/OptGroup.js +20 -0
- package/dist/Select/Option.cjs +49 -0
- package/dist/Select/Option.js +104 -0
- package/dist/Select/Select.cjs +3 -0
- package/dist/Select/Select.js +227 -0
- package/dist/Select/SelectButton.cjs +19 -0
- package/dist/Select/SelectButton.js +64 -0
- package/dist/Select/SelectList.cjs +1 -0
- package/dist/Select/SelectList.js +81 -0
- package/dist/Select/SelectTags.cjs +8 -0
- package/dist/Select/SelectTags.js +36 -0
- package/dist/Select/components.cjs +39 -0
- package/dist/Select/components.js +48 -0
- package/dist/Select/constants.cjs +1 -0
- package/dist/Select/constants.js +8 -0
- package/dist/Select/hooks/useButtonRef.cjs +1 -0
- package/dist/Select/hooks/useButtonRef.js +13 -0
- package/dist/Select/hooks/useListRef.cjs +1 -0
- package/dist/Select/hooks/useListRef.js +18 -0
- package/dist/Select/index.cjs +1 -0
- package/dist/Select/index.js +12 -0
- package/dist/Select/utils.cjs +1 -0
- package/dist/Select/utils.js +17 -0
- package/dist/SimpleMenu/SimpleMenu.cjs +19 -0
- package/dist/SimpleMenu/SimpleMenu.js +164 -0
- package/dist/SimpleMenu/index.cjs +1 -0
- package/dist/SimpleMenu/index.js +5 -0
- package/dist/SimpleMenu/utils.cjs +12 -0
- package/dist/SimpleMenu/utils.js +15 -0
- package/dist/Stack/Stack.cjs +19 -0
- package/dist/Stack/Stack.js +55 -0
- package/dist/Stack/index.cjs +1 -0
- package/dist/Stack/index.js +4 -0
- package/dist/Status/Status.cjs +11 -0
- package/dist/Status/Status.js +46 -0
- package/dist/Status/index.cjs +1 -0
- package/dist/Status/index.js +4 -0
- package/dist/SubNav/SubNav.cjs +10 -0
- package/dist/SubNav/SubNav.js +26 -0
- package/dist/SubNav/SubNavHeader.cjs +4 -0
- package/dist/SubNav/SubNavHeader.js +98 -0
- package/dist/SubNav/SubNavLink.cjs +39 -0
- package/dist/SubNav/SubNavLink.js +80 -0
- package/dist/SubNav/SubNavLinkSection.cjs +19 -0
- package/dist/SubNav/SubNavLinkSection.js +68 -0
- package/dist/SubNav/SubNavSection.cjs +8 -0
- package/dist/SubNav/SubNavSection.js +63 -0
- package/dist/SubNav/SubNavSectionLabel.cjs +9 -0
- package/dist/SubNav/SubNavSectionLabel.js +53 -0
- package/dist/SubNav/SubNavSections.cjs +1 -0
- package/dist/SubNav/SubNavSections.js +20 -0
- package/dist/SubNav/index.cjs +1 -0
- package/dist/SubNav/index.js +15 -0
- package/dist/Switch/Switch.cjs +42 -0
- package/dist/Switch/Switch.js +80 -0
- package/dist/Switch/index.cjs +1 -0
- package/dist/Switch/index.js +4 -0
- package/dist/Table/Cell.cjs +17 -0
- package/dist/Table/Cell.js +39 -0
- package/dist/Table/TFooter.cjs +22 -0
- package/dist/Table/TFooter.js +50 -0
- package/dist/Table/Table.cjs +36 -0
- package/dist/Table/Table.js +80 -0
- package/dist/Table/Tbody.cjs +5 -0
- package/dist/Table/Tbody.js +13 -0
- package/dist/Table/Thead.cjs +3 -0
- package/dist/Table/Thead.js +11 -0
- package/dist/Table/Tr.cjs +20 -0
- package/dist/Table/Tr.js +28 -0
- package/dist/Table/index.cjs +1 -0
- package/dist/Table/index.js +15 -0
- package/dist/Tabs/TabGroup.cjs +1 -0
- package/dist/Tabs/TabGroup.js +36 -0
- package/dist/Tabs/TabPanels.cjs +1 -0
- package/dist/Tabs/TabPanels.js +32 -0
- package/dist/Tabs/Tabs.cjs +5 -0
- package/dist/Tabs/Tabs.js +134 -0
- package/dist/Tabs/TabsContext.cjs +1 -0
- package/dist/Tabs/TabsContext.js +6 -0
- package/dist/Tabs/components.cjs +43 -0
- package/dist/Tabs/components.js +52 -0
- package/dist/Tabs/index.cjs +1 -0
- package/dist/Tabs/index.js +10 -0
- package/dist/Tabs/useTabsFocus.cjs +1 -0
- package/dist/Tabs/useTabsFocus.js +16 -0
- package/dist/Tag/Tag.cjs +14 -0
- package/dist/Tag/Tag.js +60 -0
- package/dist/Tag/index.cjs +1 -0
- package/dist/Tag/index.js +4 -0
- package/dist/TextButton/TextButton.cjs +32 -0
- package/dist/TextButton/TextButton.js +82 -0
- package/dist/TextButton/index.cjs +1 -0
- package/dist/TextButton/index.js +4 -0
- package/dist/TextInput/TextInput.cjs +1 -0
- package/dist/TextInput/TextInput.js +69 -0
- package/dist/TextInput/index.cjs +1 -0
- package/dist/TextInput/index.js +4 -0
- package/dist/Textarea/Textarea.cjs +15 -0
- package/dist/Textarea/Textarea.js +74 -0
- package/dist/Textarea/TextareaInput.cjs +30 -0
- package/dist/Textarea/TextareaInput.js +68 -0
- package/dist/Textarea/index.cjs +1 -0
- package/dist/Textarea/index.js +4 -0
- package/dist/ThemeProvider/ThemeProvider.cjs +173 -0
- package/dist/ThemeProvider/ThemeProvider.js +186 -0
- package/dist/ThemeProvider/hooks.cjs +1 -0
- package/dist/ThemeProvider/hooks.js +5 -0
- package/dist/ThemeProvider/index.cjs +1 -0
- package/dist/ThemeProvider/index.js +6 -0
- package/dist/TimePicker/TimePicker.cjs +12 -0
- package/dist/TimePicker/TimePicker.js +101 -0
- package/dist/TimePicker/index.cjs +1 -0
- package/dist/TimePicker/index.js +4 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +36 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.js +119 -0
- package/dist/ToggleCheckbox/index.cjs +1 -0
- package/dist/ToggleCheckbox/index.js +4 -0
- package/dist/ToggleInput/ToggleInput.cjs +6 -0
- package/dist/ToggleInput/ToggleInput.js +90 -0
- package/dist/ToggleInput/index.cjs +1 -0
- package/dist/ToggleInput/index.js +4 -0
- package/dist/Tooltip/Tooltip.cjs +6 -0
- package/dist/Tooltip/Tooltip.js +60 -0
- package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -0
- package/dist/Tooltip/hooks/useTooltipHandlers.js +22 -0
- package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -0
- package/dist/Tooltip/hooks/useTooltipLayout.js +14 -0
- package/dist/Tooltip/index.cjs +1 -0
- package/dist/Tooltip/index.js +4 -0
- package/dist/Tooltip/utils/positionTooltip.cjs +1 -0
- package/dist/Tooltip/utils/positionTooltip.js +27 -0
- package/dist/Typography/Typography.cjs +13 -0
- package/dist/Typography/Typography.js +26 -0
- package/dist/Typography/TypographyProps.cjs +1 -0
- package/dist/Typography/TypographyProps.js +31 -0
- package/dist/Typography/constants.cjs +1 -0
- package/dist/Typography/constants.js +11 -0
- package/dist/Typography/index.cjs +1 -0
- package/dist/Typography/index.js +4 -0
- package/dist/Typography/utils.cjs +34 -0
- package/dist/Typography/utils.js +59 -0
- package/dist/VisuallyHidden/VisuallyHidden.cjs +10 -0
- package/dist/VisuallyHidden/VisuallyHidden.js +14 -0
- package/dist/VisuallyHidden/index.cjs +1 -0
- package/dist/VisuallyHidden/index.js +4 -0
- package/dist/helpers/escapeSelector.cjs +1 -0
- package/dist/helpers/escapeSelector.js +4 -0
- package/dist/helpers/genId.cjs +1 -0
- package/dist/helpers/genId.js +5 -0
- package/dist/helpers/getDefaultLocale.cjs +1 -0
- package/dist/helpers/getDefaultLocale.js +4 -0
- package/dist/helpers/getFocusableNodes.cjs +1 -0
- package/dist/helpers/getFocusableNodes.js +7 -0
- package/dist/helpers/handleResponsiveValues.cjs +5 -0
- package/dist/helpers/handleResponsiveValues.js +19 -0
- package/dist/helpers/keyboardKeys.cjs +1 -0
- package/dist/helpers/keyboardKeys.js +20 -0
- package/dist/helpers/setOpacity.cjs +1 -0
- package/dist/helpers/setOpacity.js +4 -0
- package/dist/helpers/setTabIndexOnFirstItem.cjs +1 -0
- package/dist/helpers/setTabIndexOnFirstItem.js +7 -0
- package/dist/helpers/useElementOnScreen.cjs +1 -0
- package/dist/helpers/useElementOnScreen.js +15 -0
- package/dist/helpers/useId.cjs +1 -0
- package/dist/helpers/useId.js +6 -0
- package/dist/helpers/useIntersection.cjs +1 -0
- package/dist/helpers/useIntersection.js +21 -0
- package/dist/helpers/useLockScroll.cjs +1 -0
- package/dist/helpers/useLockScroll.js +9 -0
- package/dist/helpers/usePrevious.cjs +1 -0
- package/dist/helpers/usePrevious.js +10 -0
- package/dist/helpers/useResizeObserver.cjs +1 -0
- package/dist/helpers/useResizeObserver.js +14 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +288 -0
- package/dist/themes/ColorButton.cjs +3 -0
- package/dist/themes/ColorButton.js +25 -0
- package/dist/themes/colors.cjs +1 -0
- package/dist/themes/colors.js +49 -0
- package/dist/themes/common-theme.cjs +1 -0
- package/dist/themes/common-theme.js +21 -0
- package/dist/themes/darkTheme/dark-colors.cjs +1 -0
- package/dist/themes/darkTheme/dark-colors.js +52 -0
- package/dist/themes/darkTheme/dark-shadows.cjs +1 -0
- package/dist/themes/darkTheme/dark-shadows.js +12 -0
- package/dist/themes/darkTheme/index.cjs +1 -0
- package/dist/themes/darkTheme/index.js +11 -0
- package/dist/themes/extendTheme.cjs +13 -0
- package/dist/themes/extendTheme.js +36 -0
- package/dist/themes/index.cjs +1 -0
- package/dist/themes/index.js +12 -0
- package/dist/themes/lightTheme/index.cjs +1 -0
- package/dist/themes/lightTheme/index.js +11 -0
- package/dist/themes/lightTheme/light-colors.cjs +1 -0
- package/dist/themes/lightTheme/light-colors.js +52 -0
- package/dist/themes/lightTheme/light-shadows.cjs +1 -0
- package/dist/themes/lightTheme/light-shadows.js +12 -0
- package/dist/themes/sizes.cjs +1 -0
- package/dist/themes/sizes.js +18 -0
- package/dist/themes/utils.cjs +41 -0
- package/dist/themes/utils.js +46 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +9 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +38 -0
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -0
- package/dist/v2/Breadcrumbs/Crumb.js +27 -0
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +14 -0
- package/dist/v2/Breadcrumbs/CrumbLink.js +31 -0
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +8 -0
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +28 -0
- package/dist/v2/Breadcrumbs/Divider.cjs +1 -0
- package/dist/v2/Breadcrumbs/Divider.js +15 -0
- package/dist/v2/Breadcrumbs/index.cjs +1 -0
- package/dist/v2/Breadcrumbs/index.js +10 -0
- package/dist/v2/Link/Link.cjs +23 -0
- package/dist/v2/Link/Link.js +69 -0
- package/dist/v2/Link/index.cjs +1 -0
- package/dist/v2/Link/index.js +4 -0
- package/dist/v2/LinkButton/LinkButton.cjs +33 -0
- package/dist/v2/LinkButton/LinkButton.js +95 -0
- package/dist/v2/LinkButton/index.cjs +1 -0
- package/dist/v2/LinkButton/index.js +4 -0
- package/dist/v2/MainNav/MainNav.cjs +9 -0
- package/dist/v2/MainNav/MainNav.js +30 -0
- package/dist/v2/MainNav/MainNavContext.cjs +1 -0
- package/dist/v2/MainNav/MainNavContext.js +6 -0
- package/dist/v2/MainNav/NavBrand.cjs +12 -0
- package/dist/v2/MainNav/NavBrand.js +68 -0
- package/dist/v2/MainNav/NavCondense.cjs +20 -0
- package/dist/v2/MainNav/NavCondense.js +45 -0
- package/dist/v2/MainNav/NavLink.cjs +69 -0
- package/dist/v2/MainNav/NavLink.js +122 -0
- package/dist/v2/MainNav/NavSection.cjs +1 -0
- package/dist/v2/MainNav/NavSection.js +49 -0
- package/dist/v2/MainNav/NavSections.cjs +1 -0
- package/dist/v2/MainNav/NavSections.js +21 -0
- package/dist/v2/MainNav/NavUser.cjs +7 -0
- package/dist/v2/MainNav/NavUser.js +54 -0
- package/dist/v2/MainNav/index.cjs +1 -0
- package/dist/v2/MainNav/index.js +16 -0
- package/dist/v2/Pagination/Pagination.cjs +5 -0
- package/dist/v2/Pagination/Pagination.js +30 -0
- package/dist/v2/Pagination/PaginationContext.cjs +1 -0
- package/dist/v2/Pagination/PaginationContext.js +6 -0
- package/dist/v2/Pagination/assets/next.cjs +1 -0
- package/dist/v2/Pagination/assets/next.js +4 -0
- package/dist/v2/Pagination/assets/previous.cjs +1 -0
- package/dist/v2/Pagination/assets/previous.js +4 -0
- package/dist/v2/Pagination/components.cjs +36 -0
- package/dist/v2/Pagination/components.js +111 -0
- package/dist/v2/Pagination/index.cjs +1 -0
- package/dist/v2/Pagination/index.js +9 -0
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +19 -0
- package/dist/v2/SimpleMenu/SimpleMenu.js +164 -0
- package/dist/v2/SimpleMenu/index.cjs +1 -0
- package/dist/v2/SimpleMenu/index.js +5 -0
- package/dist/v2/SimpleMenu/utils.cjs +12 -0
- package/dist/v2/SimpleMenu/utils.js +15 -0
- package/dist/v2/SubNav/SubNav.cjs +10 -0
- package/dist/v2/SubNav/SubNav.js +26 -0
- package/dist/v2/SubNav/SubNavHeader.cjs +4 -0
- package/dist/v2/SubNav/SubNavHeader.js +98 -0
- package/dist/v2/SubNav/SubNavLink.cjs +39 -0
- package/dist/v2/SubNav/SubNavLink.js +83 -0
- package/dist/v2/SubNav/SubNavLinkSection.cjs +19 -0
- package/dist/v2/SubNav/SubNavLinkSection.js +68 -0
- package/dist/v2/SubNav/SubNavSection.cjs +8 -0
- package/dist/v2/SubNav/SubNavSection.js +63 -0
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +9 -0
- package/dist/v2/SubNav/SubNavSectionLabel.js +53 -0
- package/dist/v2/SubNav/SubNavSections.cjs +1 -0
- package/dist/v2/SubNav/SubNavSections.js +20 -0
- package/dist/v2/SubNav/index.cjs +1 -0
- package/dist/v2/SubNav/index.js +15 -0
- package/dist/v2/index.cjs +1 -0
- package/dist/v2/index.js +51 -0
- package/package.json +23 -22
- package/Accordion.development.js +0 -775
- package/Accordion.js +0 -9
- package/Accordion.production.js +0 -1
- package/Alert.development.js +0 -562
- package/Alert.js +0 -9
- package/Alert.production.js +0 -1
- package/Avatar.development.js +0 -485
- package/Avatar.js +0 -9
- package/Avatar.production.js +0 -1
- package/Badge.development.js +0 -494
- package/Badge.js +0 -9
- package/Badge.production.js +0 -1
- package/BaseButton.development.js +0 -285
- package/BaseButton.js +0 -9
- package/BaseButton.production.js +0 -1
- package/BaseCheckbox.development.js +0 -434
- package/BaseCheckbox.js +0 -9
- package/BaseCheckbox.production.js +0 -1
- package/BaseLink.development.js +0 -273
- package/BaseLink.js +0 -9
- package/BaseLink.production.js +0 -1
- package/BaseRadio.development.js +0 -321
- package/BaseRadio.js +0 -9
- package/BaseRadio.production.js +0 -1
- package/Box.development.js +0 -341
- package/Box.js +0 -9
- package/Box.production.js +0 -1
- package/Breadcrumbs.development.js +0 -518
- package/Breadcrumbs.js +0 -9
- package/Breadcrumbs.production.js +0 -1
- package/Button.development.js +0 -573
- package/Button.js +0 -9
- package/Button.production.js +0 -1
- package/Card.development.js +0 -746
- package/Card.js +0 -9
- package/Card.production.js +0 -1
- package/CarouselInput.development.js +0 -898
- package/CarouselInput.js +0 -9
- package/CarouselInput.production.js +0 -1
- package/Checkbox.development.js +0 -722
- package/Checkbox.js +0 -9
- package/Checkbox.production.js +0 -1
- package/Combobox.development.js +0 -934
- package/Combobox.js +0 -9
- package/Combobox.production.js +0 -1
- package/DatePicker.development.js +0 -1323
- package/DatePicker.js +0 -9
- package/DatePicker.production.js +0 -1
- package/DateTimePicker.development.js +0 -1622
- package/DateTimePicker.js +0 -9
- package/DateTimePicker.production.js +0 -1
- package/Dialog.development.js +0 -741
- package/Dialog.js +0 -9
- package/Dialog.production.js +0 -1
- package/DismissibleLayer.development.js +0 -218
- package/DismissibleLayer.js +0 -9
- package/DismissibleLayer.production.js +0 -1
- package/Divider.development.js +0 -398
- package/Divider.js +0 -9
- package/Divider.production.js +0 -1
- package/EmptyStateLayout.development.js +0 -425
- package/EmptyStateLayout.js +0 -9
- package/EmptyStateLayout.production.js +0 -1
- package/Field.development.js +0 -614
- package/Field.js +0 -9
- package/Field.production.js +0 -1
- package/Flex.development.js +0 -377
- package/Flex.js +0 -9
- package/Flex.production.js +0 -1
- package/FocusTrap.development.js +0 -341
- package/FocusTrap.js +0 -9
- package/FocusTrap.production.js +0 -1
- package/Grid.development.js +0 -422
- package/Grid.js +0 -9
- package/Grid.production.js +0 -1
- package/Icon.development.js +0 -376
- package/Icon.js +0 -9
- package/Icon.production.js +0 -1
- package/IconButton.development.js +0 -684
- package/IconButton.js +0 -9
- package/IconButton.production.js +0 -1
- package/KeyboardNavigable.development.js +0 -454
- package/KeyboardNavigable.js +0 -9
- package/KeyboardNavigable.production.js +0 -1
- package/Layout.development.js +0 -626
- package/Layout.js +0 -9
- package/Layout.production.js +0 -1
- package/Link.development.js +0 -492
- package/Link.js +0 -9
- package/Link.production.js +0 -1
- package/LinkButton.development.js +0 -573
- package/LinkButton.js +0 -9
- package/LinkButton.production.js +0 -1
- package/LiveRegions.development.js +0 -147
- package/LiveRegions.js +0 -9
- package/LiveRegions.production.js +0 -1
- package/Loader.development.js +0 -309
- package/Loader.js +0 -9
- package/Loader.production.js +0 -1
- package/Main.development.js +0 -410
- package/Main.js +0 -9
- package/Main.production.js +0 -1
- package/MainNav.development.js +0 -957
- package/MainNav.js +0 -9
- package/MainNav.production.js +0 -1
- package/ModalLayout.development.js +0 -895
- package/ModalLayout.js +0 -9
- package/ModalLayout.production.js +0 -1
- package/NumberInput.development.js +0 -733
- package/NumberInput.js +0 -9
- package/NumberInput.production.js +0 -1
- package/Pagination.development.js +0 -587
- package/Pagination.js +0 -9
- package/Pagination.production.js +0 -1
- package/Popover.development.js +0 -481
- package/Popover.js +0 -9
- package/Popover.production.js +0 -1
- package/Portal.development.js +0 -212
- package/Portal.js +0 -9
- package/Portal.production.js +0 -1
- package/ProgressBar.development.js +0 -273
- package/ProgressBar.js +0 -9
- package/ProgressBar.production.js +0 -1
- package/Radio.development.js +0 -518
- package/Radio.js +0 -9
- package/Radio.production.js +0 -1
- package/RawTable.development.js +0 -549
- package/RawTable.js +0 -9
- package/RawTable.production.js +0 -1
- package/Searchbar.development.js +0 -696
- package/Searchbar.js +0 -9
- package/Searchbar.production.js +0 -1
- package/Select.development.js +0 -1063
- package/Select.js +0 -9
- package/Select.production.js +0 -1
- package/SimpleMenu.development.js +0 -821
- package/SimpleMenu.js +0 -9
- package/SimpleMenu.production.js +0 -1
- package/Stack.development.js +0 -434
- package/Stack.js +0 -9
- package/Stack.production.js +0 -1
- package/Status.development.js +0 -494
- package/Status.js +0 -9
- package/Status.production.js +0 -1
- package/SubNav.development.js +0 -1123
- package/SubNav.js +0 -9
- package/SubNav.production.js +0 -1
- package/Switch.development.js +0 -434
- package/Switch.js +0 -9
- package/Switch.production.js +0 -1
- package/Table.development.js +0 -741
- package/Table.js +0 -9
- package/Table.production.js +0 -1
- package/Tabs.development.js +0 -590
- package/Tabs.js +0 -9
- package/Tabs.production.js +0 -1
- package/Tag.development.js +0 -494
- package/Tag.js +0 -9
- package/Tag.production.js +0 -1
- package/TextButton.development.js +0 -517
- package/TextButton.js +0 -9
- package/TextButton.production.js +0 -1
- package/TextInput.development.js +0 -662
- package/TextInput.js +0 -9
- package/TextInput.production.js +0 -1
- package/Textarea.development.js +0 -674
- package/Textarea.js +0 -9
- package/Textarea.production.js +0 -1
- package/ThemeProvider.development.js +0 -300
- package/ThemeProvider.js +0 -9
- package/ThemeProvider.production.js +0 -1
- package/TimePicker.development.js +0 -1098
- package/TimePicker.js +0 -9
- package/TimePicker.production.js +0 -1
- package/ToggleCheckbox.development.js +0 -542
- package/ToggleCheckbox.js +0 -9
- package/ToggleCheckbox.production.js +0 -1
- package/ToggleInput.development.js +0 -745
- package/ToggleInput.js +0 -9
- package/ToggleInput.production.js +0 -1
- package/Tooltip.development.js +0 -588
- package/Tooltip.js +0 -9
- package/Tooltip.production.js +0 -1
- package/Typography.development.js +0 -276
- package/Typography.js +0 -9
- package/Typography.production.js +0 -1
- package/VisuallyHidden.development.js +0 -146
- package/VisuallyHidden.js +0 -9
- package/VisuallyHidden.production.js +0 -1
- package/index.development.js +0 -4338
- package/index.js +0 -9
- package/index.production.js +0 -1
- package/themes.development.js +0 -254
- package/themes.js +0 -9
- package/themes.production.js +0 -1
- package/v2/Breadcrumbs.development.js +0 -906
- package/v2/Breadcrumbs.js +0 -9
- package/v2/Breadcrumbs.production.js +0 -1
- package/v2/Link.development.js +0 -505
- package/v2/Link.js +0 -9
- package/v2/Link.production.js +0 -1
- package/v2/LinkButton.development.js +0 -586
- package/v2/LinkButton.js +0 -9
- package/v2/LinkButton.production.js +0 -1
- package/v2/MainNav.development.js +0 -970
- package/v2/MainNav.js +0 -9
- package/v2/MainNav.production.js +0 -1
- package/v2/Pagination.development.js +0 -600
- package/v2/Pagination.js +0 -9
- package/v2/Pagination.production.js +0 -1
- package/v2/SimpleMenu.development.js +0 -834
- package/v2/SimpleMenu.js +0 -9
- package/v2/SimpleMenu.production.js +0 -1
- package/v2/SubNav.development.js +0 -1136
- package/v2/SubNav.js +0 -9
- package/v2/SubNav.production.js +0 -1
- package/v2/index.development.js +0 -1740
- package/v2/index.js +0 -9
- package/v2/index.production.js +0 -1
- package/v2/package.json +0 -81
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import e from "styled-components";
|
|
2
|
+
import { Box as t } from "../Box/Box.js";
|
|
3
|
+
import { Flex as n } from "../Flex/Flex.js";
|
|
4
|
+
import { getThemeSize as i, inputFocusStyle as l } from "../themes/utils.js";
|
|
5
|
+
const u = e(n)`
|
|
6
|
+
position: relative;
|
|
7
|
+
border: 1px solid ${({ theme: o, hasError: r }) => r ? o.colors.danger600 : o.colors.neutral200};
|
|
8
|
+
padding-right: ${({ theme: o }) => o.spaces[3]};
|
|
9
|
+
border-radius: ${({ theme: o }) => o.borderRadius};
|
|
10
|
+
background: ${({ theme: o }) => o.colors.neutral0};
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
min-height: ${i("input")};
|
|
13
|
+
|
|
14
|
+
${({ theme: o, disabled: r }) => r ? `
|
|
15
|
+
color: ${o.colors.neutral600};
|
|
16
|
+
background: ${o.colors.neutral150};
|
|
17
|
+
` : void 0}
|
|
18
|
+
|
|
19
|
+
${l()}
|
|
20
|
+
`, d = e(t)`
|
|
21
|
+
background: transparent;
|
|
22
|
+
border: none;
|
|
23
|
+
position: relative;
|
|
24
|
+
z-index: 1;
|
|
25
|
+
|
|
26
|
+
svg {
|
|
27
|
+
height: ${11 / 16}rem;
|
|
28
|
+
width: ${11 / 16}rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
svg path {
|
|
32
|
+
fill: ${({ theme: o }) => o.colors.neutral600};
|
|
33
|
+
}
|
|
34
|
+
`, $ = e(d)`
|
|
35
|
+
display: flex;
|
|
36
|
+
background: none;
|
|
37
|
+
border: none;
|
|
38
|
+
cursor: ${({ disabled: o }) => o ? "not-allowed" : void 0};
|
|
39
|
+
|
|
40
|
+
svg {
|
|
41
|
+
width: ${6 / 16}rem;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
export {
|
|
45
|
+
$ as CaretBox,
|
|
46
|
+
d as IconBox,
|
|
47
|
+
u as SelectButtonWrapper
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={Keyboard:"down:keyboard",Mouse:"down:mouse"},o={Keyboard:"up:keyboard",Mouse:"up:mouse"};exports.DownState=e;exports.UpState=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react"),s=require("../constants.cjs"),c=t=>{const r=e.useRef(null),n=e.useRef(null),u=e.useRef();return t&&(u.current=t),e.useEffect(()=>{!n.current||t||(u.current===s.DownState.Keyboard||u.current===s.UpState.Keyboard)&&r.current.focus()},[t]),e.useEffect(()=>{n.current=!0},[]),r};exports.useButtonRef=c;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useRef as e, useEffect as n } from "react";
|
|
2
|
+
import { DownState as f, UpState as c } from "../constants.js";
|
|
3
|
+
const m = (t) => {
|
|
4
|
+
const u = e(null), o = e(null), r = e();
|
|
5
|
+
return t && (r.current = t), n(() => {
|
|
6
|
+
!o.current || t || (r.current === f.Keyboard || r.current === c.Keyboard) && u.current.focus();
|
|
7
|
+
}, [t]), n(() => {
|
|
8
|
+
o.current = !0;
|
|
9
|
+
}, []), u;
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
m as useButtonRef
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),s=require("../constants.cjs"),u=require("../utils.cjs"),i=r=>{const e=o.useRef(null);return o.useEffect(()=>{e.current.focus()},[]),o.useEffect(()=>{if(!e.current)return;const n=e.current.querySelector('[aria-selected="true"]'),c=e.current.querySelectorAll('[role="option"]');let t;n?t=n:r===s.UpState.Keyboard?t=c[c.length-1]:r===s.DownState.Keyboard&&(t=c[0]),t&&(r===s.UpState.Keyboard||r===s.DownState.Keyboard)&&u.changeDescendant(e.current,t)},[]),e};exports.useListRef=i;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useRef as i, useEffect as c } from "react";
|
|
2
|
+
import { UpState as s, DownState as f } from "../constants.js";
|
|
3
|
+
import { changeDescendant as l } from "../utils.js";
|
|
4
|
+
const y = (r) => {
|
|
5
|
+
const e = i(null);
|
|
6
|
+
return c(() => {
|
|
7
|
+
e.current.focus();
|
|
8
|
+
}, []), c(() => {
|
|
9
|
+
if (!e.current)
|
|
10
|
+
return;
|
|
11
|
+
const n = e.current.querySelector('[aria-selected="true"]'), o = e.current.querySelectorAll('[role="option"]');
|
|
12
|
+
let t;
|
|
13
|
+
n ? t = n : r === s.Keyboard ? t = o[o.length - 1] : r === f.Keyboard && (t = o[0]), t && (r === s.Keyboard || r === f.Keyboard) && l(e.current, t);
|
|
14
|
+
}, []), e;
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
y as useListRef
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Select.cjs"),t=require("./Option.cjs"),c=require("./OptGroup.cjs"),s=require("./MultiSelectNested.cjs"),i=require("./SelectList.cjs");exports.Select=e.Select;exports.Option=t.Option;exports.OptGroup=c.OptGroup;exports.MultiSelectNested=s.MultiSelectNested;exports.SelectList=i.SelectList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Select as o } from "./Select.js";
|
|
2
|
+
import { Option as p } from "./Option.js";
|
|
3
|
+
import { OptGroup as m } from "./OptGroup.js";
|
|
4
|
+
import { MultiSelectNested as l } from "./MultiSelectNested.js";
|
|
5
|
+
import { SelectList as i } from "./SelectList.js";
|
|
6
|
+
export {
|
|
7
|
+
l as MultiSelectNested,
|
|
8
|
+
m as OptGroup,
|
|
9
|
+
p as Option,
|
|
10
|
+
o as Select,
|
|
11
|
+
i as SelectList
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("compute-scroll-into-view"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=a(s),i=(e,t)=>{e.setAttribute("aria-activedescendant",t.getAttribute("id")),e.querySelectorAll('[role="option"]').forEach(c=>c.classList.remove("is-focused")),t.classList.add("is-focused"),r.default(t,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}).forEach(({el:c,top:o,left:n})=>{c.scrollTop=o,c.scrollLeft=n})},l=e=>{const t=e.getAttribute("aria-activedescendant");return e.querySelector(`#${t}`)};exports.changeDescendant=i;exports.getActiveDescendant=l;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import n from "compute-scroll-into-view";
|
|
2
|
+
const d = (e, t) => {
|
|
3
|
+
e.setAttribute("aria-activedescendant", t.getAttribute("id")), e.querySelectorAll('[role="option"]').forEach((c) => c.classList.remove("is-focused")), t.classList.add("is-focused"), n(t, {
|
|
4
|
+
scrollMode: "if-needed",
|
|
5
|
+
block: "nearest",
|
|
6
|
+
inline: "nearest"
|
|
7
|
+
}).forEach(({ el: c, top: o, left: s }) => {
|
|
8
|
+
c.scrollTop = o, c.scrollLeft = s;
|
|
9
|
+
});
|
|
10
|
+
}, l = (e) => {
|
|
11
|
+
const t = e.getAttribute("aria-activedescendant");
|
|
12
|
+
return e.querySelector(`#${t}`);
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
d as changeDescendant,
|
|
16
|
+
l as getActiveDescendant
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react"),A=require("prop-types"),N=require("styled-components"),$=require("@strapi/icons/CarretDown"),L=require("react-router-dom"),k=require("../Typography/Typography.cjs"),B=require("../Box/Box.cjs"),V=require("../Flex/Flex.cjs"),q=require("../Button/Button.cjs"),v=require("../Popover/Popover.cjs"),C=require("./utils.cjs"),W=require("../helpers/useId.cjs"),a=require("../helpers/keyboardKeys.cjs"),K=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},o=K(u),n=K(A),P=K(N),z=K($),U=P.default.button`
|
|
2
|
+
border: none;
|
|
3
|
+
padding: 0;
|
|
4
|
+
background: transparent;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
${C.getOptionStyle}
|
|
7
|
+
`,G=P.default(L.NavLink)`
|
|
8
|
+
text-decoration: none;
|
|
9
|
+
${C.getOptionStyle}
|
|
10
|
+
`,H=P.default.span`
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
svg {
|
|
14
|
+
height: 4px;
|
|
15
|
+
width: 6px;
|
|
16
|
+
}
|
|
17
|
+
`,J=P.default(q.Button)`
|
|
18
|
+
padding: ${({theme:e})=>`${e.spaces[1]} ${e.spaces[3]}`};
|
|
19
|
+
`,I=({children:e,onClick:p,to:y,isFocused:l,...m})=>{const s=u.useRef();u.useEffect(()=>{l&&s.current&&s.current.focus()},[l]);const E={tabIndex:l?0:-1,ref:s,role:"menuitem",...m},b=g=>{(g.key===a.KeyboardKeys.SPACE||g.key===a.KeyboardKeys.ENTER)&&p()};return y?o.default.createElement(G,{to:y,...E},o.default.createElement(B.Box,{padding:2},o.default.createElement(k.Typography,null,e))):o.default.createElement(U,{onKeyDown:b,onMouseDown:p,type:"button",...E},o.default.createElement(B.Box,{padding:2},o.default.createElement(k.Typography,null,e)))};I.defaultProps={onClick:()=>{},isFocused:!1,to:void 0};I.propTypes={as:n.default.elementType,children:n.default.node.isRequired,isFocused:n.default.bool,onClick:n.default.func,to:n.default.string};const i=({label:e,children:p,id:y,as:l,onOpen:m=()=>{},onClose:s=()=>{},size:E,popoverPlacement:b,...g})=>{const d=u.useRef(),S=W.useId("simplemenu",y),T=u.useRef(!1),[c,f]=u.useState(!1),[x,D]=u.useState(0),h=u.Children.toArray(p),M=E==="S"?J:q.Button,R=l||M;u.useEffect(()=>{if(["string","number"].includes(typeof e)){const t=h.findIndex(r=>r.props.children===e);t!==-1&&D(t)}},[e]),u.useEffect(()=>{T?.current?c&&typeof m=="function"?m():typeof s=="function"&&s():T.current=!0},[T,c]),u.useEffect(()=>{o.default.isValidElement(e)&&x==-1&&d.current.focus()},[e,x]);const w=t=>{c&&(t.key===a.KeyboardKeys.ESCAPE&&(t.stopPropagation(),f(!1),d.current.focus()),t.key===a.KeyboardKeys.DOWN&&D(r=>r===h.length-1?0:r+1),t.key===a.KeyboardKeys.UP&&D(r=>r===0?h.length-1:r-1))},O=t=>{(t.key===a.KeyboardKeys.ENTER||t.key===a.KeyboardKeys.SPACE)&&f(r=>!r)},_=t=>{t.preventDefault(),t.currentTarget.contains(t.relatedTarget)||f(!1)},j=t=>{t.preventDefault(),f(r=>!r)},F=h.map((t,r)=>o.default.createElement(V.Flex,{as:"li",key:r,justifyContent:"center",role:"menuitem"},u.cloneElement(t,{onClick:()=>{t.props.onClick(),f(!1),d.current.focus()},isFocused:x===r})));return o.default.createElement("div",{onKeyDown:w},o.default.createElement(R,{label:o.default.isValidElement(e)?null:e,"aria-haspopup":!0,"aria-expanded":c,"aria-controls":S,onKeyDown:O,onMouseDown:j,ref:d,type:"button",variant:"ghost",endIcon:o.default.createElement(H,null,o.default.createElement(z.default,{"aria-hidden":!0})),...g},e),c&&o.default.createElement(v.Popover,{onBlur:_,placement:b,source:d,spacing:4},o.default.createElement(B.Box,{role:"menu",as:"ul",padding:1,id:S},F)))};i.defaultProps={as:void 0};i.displayName="SimpleMenu";i.defaultProps={popoverPlacement:"bottom-start",size:"M"};i.propTypes={as:n.default.any,children:n.default.oneOfType([n.default.arrayOf(n.default.node),n.default.node]).isRequired,id:n.default.string,label:n.default.oneOfType([n.default.string,n.default.number,n.default.element]).isRequired,onClose:n.default.func,onOpen:n.default.func,popoverPlacement:n.default.oneOf(v.POPOVER_PLACEMENTS),size:n.default.oneOf(["S","M"])};exports.MenuItem=I;exports.SimpleMenu=i;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import t, { useRef as T, useEffect as g, useState as x, Children as F, cloneElement as V } from "react";
|
|
2
|
+
import n from "prop-types";
|
|
3
|
+
import h from "styled-components";
|
|
4
|
+
import q from "@strapi/icons/CarretDown";
|
|
5
|
+
import { NavLink as L } from "react-router-dom";
|
|
6
|
+
import { Typography as M } from "../Typography/Typography.js";
|
|
7
|
+
import { Box as S } from "../Box/Box.js";
|
|
8
|
+
import { Flex as W } from "../Flex/Flex.js";
|
|
9
|
+
import { Button as O } from "../Button/Button.js";
|
|
10
|
+
import { POPOVER_PLACEMENTS as _, Popover as z } from "../Popover/Popover.js";
|
|
11
|
+
import { getOptionStyle as v } from "./utils.js";
|
|
12
|
+
import { useId as j } from "../helpers/useId.js";
|
|
13
|
+
import { KeyboardKeys as s } from "../helpers/keyboardKeys.js";
|
|
14
|
+
const U = h.button`
|
|
15
|
+
border: none;
|
|
16
|
+
padding: 0;
|
|
17
|
+
background: transparent;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
${v}
|
|
20
|
+
`, G = h(L)`
|
|
21
|
+
text-decoration: none;
|
|
22
|
+
${v}
|
|
23
|
+
`, H = h.span`
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
svg {
|
|
27
|
+
height: 4px;
|
|
28
|
+
width: 6px;
|
|
29
|
+
}
|
|
30
|
+
`, J = h(O)`
|
|
31
|
+
padding: ${({ theme: o }) => `${o.spaces[1]} ${o.spaces[3]}`};
|
|
32
|
+
`, R = ({ children: o, onClick: l, to: m, isFocused: a, ...f }) => {
|
|
33
|
+
const i = T();
|
|
34
|
+
g(() => {
|
|
35
|
+
a && i.current && i.current.focus();
|
|
36
|
+
}, [a]);
|
|
37
|
+
const d = {
|
|
38
|
+
tabIndex: a ? 0 : -1,
|
|
39
|
+
ref: i,
|
|
40
|
+
role: "menuitem",
|
|
41
|
+
...f
|
|
42
|
+
}, D = (y) => {
|
|
43
|
+
(y.key === s.SPACE || y.key === s.ENTER) && l();
|
|
44
|
+
};
|
|
45
|
+
return m ? /* @__PURE__ */ t.createElement(G, {
|
|
46
|
+
to: m,
|
|
47
|
+
...d
|
|
48
|
+
}, /* @__PURE__ */ t.createElement(S, {
|
|
49
|
+
padding: 2
|
|
50
|
+
}, /* @__PURE__ */ t.createElement(M, null, o))) : /* @__PURE__ */ t.createElement(U, {
|
|
51
|
+
onKeyDown: D,
|
|
52
|
+
onMouseDown: l,
|
|
53
|
+
type: "button",
|
|
54
|
+
...d
|
|
55
|
+
}, /* @__PURE__ */ t.createElement(S, {
|
|
56
|
+
padding: 2
|
|
57
|
+
}, /* @__PURE__ */ t.createElement(M, null, o)));
|
|
58
|
+
};
|
|
59
|
+
R.defaultProps = {
|
|
60
|
+
onClick: () => {
|
|
61
|
+
},
|
|
62
|
+
isFocused: !1,
|
|
63
|
+
to: void 0
|
|
64
|
+
};
|
|
65
|
+
R.propTypes = {
|
|
66
|
+
as: n.elementType,
|
|
67
|
+
children: n.node.isRequired,
|
|
68
|
+
isFocused: n.bool,
|
|
69
|
+
onClick: n.func,
|
|
70
|
+
to: n.string
|
|
71
|
+
};
|
|
72
|
+
const P = ({
|
|
73
|
+
label: o,
|
|
74
|
+
children: l,
|
|
75
|
+
id: m,
|
|
76
|
+
as: a,
|
|
77
|
+
onOpen: f = () => {
|
|
78
|
+
},
|
|
79
|
+
onClose: i = () => {
|
|
80
|
+
},
|
|
81
|
+
size: d,
|
|
82
|
+
popoverPlacement: D,
|
|
83
|
+
...y
|
|
84
|
+
}) => {
|
|
85
|
+
const c = T(), w = j("simplemenu", m), k = T(!1), [p, u] = x(!1), [C, I] = x(0), E = F.toArray(l), b = a || (d === "S" ? J : O);
|
|
86
|
+
g(() => {
|
|
87
|
+
if (["string", "number"].includes(typeof o)) {
|
|
88
|
+
const e = E.findIndex((r) => r.props.children === o);
|
|
89
|
+
e !== -1 && I(e);
|
|
90
|
+
}
|
|
91
|
+
}, [o]), g(() => {
|
|
92
|
+
k?.current ? p && typeof f == "function" ? f() : typeof i == "function" && i() : k.current = !0;
|
|
93
|
+
}, [k, p]), g(() => {
|
|
94
|
+
t.isValidElement(o) && C == -1 && c.current.focus();
|
|
95
|
+
}, [o, C]);
|
|
96
|
+
const B = (e) => {
|
|
97
|
+
p && (e.key === s.ESCAPE && (e.stopPropagation(), u(!1), c.current.focus()), e.key === s.DOWN && I((r) => r === E.length - 1 ? 0 : r + 1), e.key === s.UP && I((r) => r === 0 ? E.length - 1 : r - 1));
|
|
98
|
+
}, K = (e) => {
|
|
99
|
+
(e.key === s.ENTER || e.key === s.SPACE) && u((r) => !r);
|
|
100
|
+
}, A = (e) => {
|
|
101
|
+
e.preventDefault(), e.currentTarget.contains(e.relatedTarget) || u(!1);
|
|
102
|
+
}, N = (e) => {
|
|
103
|
+
e.preventDefault(), u((r) => !r);
|
|
104
|
+
}, $ = E.map((e, r) => /* @__PURE__ */ t.createElement(W, {
|
|
105
|
+
as: "li",
|
|
106
|
+
key: r,
|
|
107
|
+
justifyContent: "center",
|
|
108
|
+
role: "menuitem"
|
|
109
|
+
}, V(e, {
|
|
110
|
+
onClick: () => {
|
|
111
|
+
e.props.onClick(), u(!1), c.current.focus();
|
|
112
|
+
},
|
|
113
|
+
isFocused: C === r
|
|
114
|
+
})));
|
|
115
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
116
|
+
onKeyDown: B
|
|
117
|
+
}, /* @__PURE__ */ t.createElement(b, {
|
|
118
|
+
label: t.isValidElement(o) ? null : o,
|
|
119
|
+
"aria-haspopup": !0,
|
|
120
|
+
"aria-expanded": p,
|
|
121
|
+
"aria-controls": w,
|
|
122
|
+
onKeyDown: K,
|
|
123
|
+
onMouseDown: N,
|
|
124
|
+
ref: c,
|
|
125
|
+
type: "button",
|
|
126
|
+
variant: "ghost",
|
|
127
|
+
endIcon: /* @__PURE__ */ t.createElement(H, null, /* @__PURE__ */ t.createElement(q, {
|
|
128
|
+
"aria-hidden": !0
|
|
129
|
+
})),
|
|
130
|
+
...y
|
|
131
|
+
}, o), p && /* @__PURE__ */ t.createElement(z, {
|
|
132
|
+
onBlur: A,
|
|
133
|
+
placement: D,
|
|
134
|
+
source: c,
|
|
135
|
+
spacing: 4
|
|
136
|
+
}, /* @__PURE__ */ t.createElement(S, {
|
|
137
|
+
role: "menu",
|
|
138
|
+
as: "ul",
|
|
139
|
+
padding: 1,
|
|
140
|
+
id: w
|
|
141
|
+
}, $)));
|
|
142
|
+
};
|
|
143
|
+
P.defaultProps = {
|
|
144
|
+
as: void 0
|
|
145
|
+
};
|
|
146
|
+
P.displayName = "SimpleMenu";
|
|
147
|
+
P.defaultProps = {
|
|
148
|
+
popoverPlacement: "bottom-start",
|
|
149
|
+
size: "M"
|
|
150
|
+
};
|
|
151
|
+
P.propTypes = {
|
|
152
|
+
as: n.any,
|
|
153
|
+
children: n.oneOfType([n.arrayOf(n.node), n.node]).isRequired,
|
|
154
|
+
id: n.string,
|
|
155
|
+
label: n.oneOfType([n.string, n.number, n.element]).isRequired,
|
|
156
|
+
onClose: n.func,
|
|
157
|
+
onOpen: n.func,
|
|
158
|
+
popoverPlacement: n.oneOf(_),
|
|
159
|
+
size: n.oneOf(["S", "M"])
|
|
160
|
+
};
|
|
161
|
+
export {
|
|
162
|
+
R as MenuItem,
|
|
163
|
+
P as SimpleMenu
|
|
164
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./SimpleMenu.cjs");exports.MenuItem=e.MenuItem;exports.SimpleMenu=e.SimpleMenu;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=({theme:o})=>`
|
|
2
|
+
text-align: left;
|
|
3
|
+
width: 100%;
|
|
4
|
+
color: ${o.colors.neutral800};
|
|
5
|
+
border-radius: ${o.borderRadius};
|
|
6
|
+
&:focus {
|
|
7
|
+
background-color: ${o.colors.primary100};
|
|
8
|
+
}
|
|
9
|
+
&:not([aria-disabled]):hover {
|
|
10
|
+
background-color: ${o.colors.primary100};
|
|
11
|
+
}
|
|
12
|
+
`;exports.getOptionStyle=r;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const r = ({ theme: o }) => `
|
|
2
|
+
text-align: left;
|
|
3
|
+
width: 100%;
|
|
4
|
+
color: ${o.colors.neutral800};
|
|
5
|
+
border-radius: ${o.borderRadius};
|
|
6
|
+
&:focus {
|
|
7
|
+
background-color: ${o.colors.primary100};
|
|
8
|
+
}
|
|
9
|
+
&:not([aria-disabled]):hover {
|
|
10
|
+
background-color: ${o.colors.primary100};
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
export {
|
|
14
|
+
r as getOptionStyle
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),f=require("prop-types"),g=require("styled-components"),d=require("../Flex/Flex.cjs"),r=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=r(c),n=r(f),u=r(g),p={size:!0},m=u.default(d.Flex).withConfig({shouldForwardProp:(e,t)=>!p[e]&&t(e)})`
|
|
2
|
+
& > * {
|
|
3
|
+
margin-top: 0;
|
|
4
|
+
margin-bottom: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
& > * + * {
|
|
8
|
+
margin-top: ${({theme:e,spacing:t})=>e.spaces[t]};
|
|
9
|
+
}
|
|
10
|
+
`,y=u.default(d.Flex).withConfig({shouldForwardProp:(e,t)=>!p[e]&&t(e)})`
|
|
11
|
+
& > * {
|
|
12
|
+
margin-left: 0;
|
|
13
|
+
margin-right: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
& > * + * {
|
|
17
|
+
margin-left: ${({theme:e,spacing:t})=>e.spaces[t]};
|
|
18
|
+
}
|
|
19
|
+
`,a=c.forwardRef(({horizontal:e,spacing:t,size:o,...s},i)=>(o&&console.warn('Deprecation warning: Usage of "size" prop in Stack component is deprecated. This is discouraged and will be removed in the next major release. Please use "spacing" instead'),e?l.default.createElement(y,{ref:i,spacing:t||o,...s}):l.default.createElement(m,{direction:"column",alignItems:"stretch",ref:i,spacing:t||o,...s})));a.displayName="Stack";a.defaultProps={horizontal:!1,size:void 0,spacing:void 0};a.propTypes={horizontal:n.default.bool,size:n.default.number,spacing:n.default.number};exports.Stack=a;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import s, { forwardRef as p } from "react";
|
|
2
|
+
import r from "prop-types";
|
|
3
|
+
import c from "styled-components";
|
|
4
|
+
import { Flex as m } from "../Flex/Flex.js";
|
|
5
|
+
const l = {
|
|
6
|
+
size: !0
|
|
7
|
+
}, d = c(m).withConfig({
|
|
8
|
+
shouldForwardProp: (e, t) => !l[e] && t(e)
|
|
9
|
+
})`
|
|
10
|
+
& > * {
|
|
11
|
+
margin-top: 0;
|
|
12
|
+
margin-bottom: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
& > * + * {
|
|
16
|
+
margin-top: ${({ theme: e, spacing: t }) => e.spaces[t]};
|
|
17
|
+
}
|
|
18
|
+
`, g = c(m).withConfig({
|
|
19
|
+
shouldForwardProp: (e, t) => !l[e] && t(e)
|
|
20
|
+
})`
|
|
21
|
+
& > * {
|
|
22
|
+
margin-left: 0;
|
|
23
|
+
margin-right: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
& > * + * {
|
|
27
|
+
margin-left: ${({ theme: e, spacing: t }) => e.spaces[t]};
|
|
28
|
+
}
|
|
29
|
+
`, a = p(({ horizontal: e, spacing: t, size: o, ...i }, n) => (o && console.warn(
|
|
30
|
+
'Deprecation warning: Usage of "size" prop in Stack component is deprecated. This is discouraged and will be removed in the next major release. Please use "spacing" instead'
|
|
31
|
+
), e ? /* @__PURE__ */ s.createElement(g, {
|
|
32
|
+
ref: n,
|
|
33
|
+
spacing: t || o,
|
|
34
|
+
...i
|
|
35
|
+
}) : /* @__PURE__ */ s.createElement(d, {
|
|
36
|
+
direction: "column",
|
|
37
|
+
alignItems: "stretch",
|
|
38
|
+
ref: n,
|
|
39
|
+
spacing: t || o,
|
|
40
|
+
...i
|
|
41
|
+
})));
|
|
42
|
+
a.displayName = "Stack";
|
|
43
|
+
a.defaultProps = {
|
|
44
|
+
horizontal: !1,
|
|
45
|
+
size: void 0,
|
|
46
|
+
spacing: void 0
|
|
47
|
+
};
|
|
48
|
+
a.propTypes = {
|
|
49
|
+
horizontal: r.bool,
|
|
50
|
+
size: r.number,
|
|
51
|
+
spacing: r.number
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
a as Stack
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Stack.cjs");exports.Stack=e.Stack;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("react"),b=require("prop-types"),m=require("../Box/Box.cjs"),$=require("../Flex/Flex.cjs"),x=require("../Typography/Typography.cjs"),T=require("styled-components"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=a(h),o=a(b),c=a(T),_=c.default.div`
|
|
2
|
+
margin-right: ${({theme:e})=>e.spaces[3]};
|
|
3
|
+
width: ${6/16}rem;
|
|
4
|
+
height: ${6/16}rem;
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
background: ${({theme:e,backgroundColor:t})=>e.colors[t]};
|
|
7
|
+
`,B=c.default(m.Box)`
|
|
8
|
+
${x.Typography} {
|
|
9
|
+
color: ${({theme:e,textColor:t})=>e.colors[t]};
|
|
10
|
+
}
|
|
11
|
+
`,s=({variant:e,showBullet:t,size:l,children:n,...p})=>{const i=`${e}100`,g=`${e}200`,f=`${e}600`,y=`${e}600`,u=l==="S"?2:5,d=l==="S"?1:4;return r.default.createElement(B,{borderColor:g,textColor:y,background:i,hasRadius:!0,paddingTop:d,paddingBottom:d,paddingLeft:u,paddingRight:u,...p},t?r.default.createElement($.Flex,null,r.default.createElement(_,{backgroundColor:f}),n):n)};s.defaultProps={showBullet:!0,size:"M",variant:"primary"};s.propTypes={children:o.default.node.isRequired,showBullet:o.default.bool,size:o.default.oneOf(["S","M"]),variant:o.default.oneOf(["alternative","danger","neutral","primary","secondary","success","warning"])};exports.Status=s;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import t from "react";
|
|
2
|
+
import e from "prop-types";
|
|
3
|
+
import { Box as f } from "../Box/Box.js";
|
|
4
|
+
import { Flex as $ } from "../Flex/Flex.js";
|
|
5
|
+
import { Typography as h } from "../Typography/Typography.js";
|
|
6
|
+
import l from "styled-components";
|
|
7
|
+
const b = l.div`
|
|
8
|
+
margin-right: ${({ theme: o }) => o.spaces[3]};
|
|
9
|
+
width: ${6 / 16}rem;
|
|
10
|
+
height: ${6 / 16}rem;
|
|
11
|
+
border-radius: 50%;
|
|
12
|
+
background: ${({ theme: o, backgroundColor: r }) => o.colors[r]};
|
|
13
|
+
`, y = l(f)`
|
|
14
|
+
${h} {
|
|
15
|
+
color: ${({ theme: o, textColor: r }) => o.colors[r]};
|
|
16
|
+
}
|
|
17
|
+
`, p = ({ variant: o, showBullet: r, size: n, children: a, ...i }) => {
|
|
18
|
+
const c = `${o}100`, m = `${o}200`, u = `${o}600`, g = `${o}600`, s = n === "S" ? 2 : 5, d = n === "S" ? 1 : 4;
|
|
19
|
+
return /* @__PURE__ */ t.createElement(y, {
|
|
20
|
+
borderColor: m,
|
|
21
|
+
textColor: g,
|
|
22
|
+
background: c,
|
|
23
|
+
hasRadius: !0,
|
|
24
|
+
paddingTop: d,
|
|
25
|
+
paddingBottom: d,
|
|
26
|
+
paddingLeft: s,
|
|
27
|
+
paddingRight: s,
|
|
28
|
+
...i
|
|
29
|
+
}, r ? /* @__PURE__ */ t.createElement($, null, /* @__PURE__ */ t.createElement(b, {
|
|
30
|
+
backgroundColor: u
|
|
31
|
+
}), a) : a);
|
|
32
|
+
};
|
|
33
|
+
p.defaultProps = {
|
|
34
|
+
showBullet: !0,
|
|
35
|
+
size: "M",
|
|
36
|
+
variant: "primary"
|
|
37
|
+
};
|
|
38
|
+
p.propTypes = {
|
|
39
|
+
children: e.node.isRequired,
|
|
40
|
+
showBullet: e.bool,
|
|
41
|
+
size: e.oneOf(["S", "M"]),
|
|
42
|
+
variant: e.oneOf(["alternative", "danger", "neutral", "primary", "secondary", "success", "warning"])
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
p as Status
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./Status.cjs");exports.Status=t.Status;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react"),i=require("styled-components"),u=require("prop-types"),d=require("../Grid/Grid.cjs");require("../Grid/GridItem.cjs");const t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=t(s),c=t(i),n=t(u),r=`${232/16}rem`,p=c.default(d.Grid)`
|
|
2
|
+
width: ${r};
|
|
3
|
+
background: ${({theme:e})=>e.colors.neutral100};
|
|
4
|
+
position: sticky;
|
|
5
|
+
top: 0;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
border-right: 1px solid ${({theme:e})=>e.colors.neutral200};
|
|
9
|
+
z-index: 1;
|
|
10
|
+
`,o=({ariaLabel:e,...a})=>l.default.createElement(p,{"aria-label":e,as:"nav",...a});o.propTypes={ariaLabel:n.default.string.isRequired};exports.SubNav=o;exports.subNavWidth=r;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import t from "react";
|
|
2
|
+
import e from "styled-components";
|
|
3
|
+
import i from "prop-types";
|
|
4
|
+
import { Grid as a } from "../Grid/Grid.js";
|
|
5
|
+
import "../Grid/GridItem.js";
|
|
6
|
+
const p = `${232 / 16}rem`, s = e(a)`
|
|
7
|
+
width: ${p};
|
|
8
|
+
background: ${({ theme: r }) => r.colors.neutral100};
|
|
9
|
+
position: sticky;
|
|
10
|
+
top: 0;
|
|
11
|
+
height: 100vh;
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
border-right: 1px solid ${({ theme: r }) => r.colors.neutral200};
|
|
14
|
+
z-index: 1;
|
|
15
|
+
`, l = ({ ariaLabel: r, ...o }) => /* @__PURE__ */ t.createElement(s, {
|
|
16
|
+
"aria-label": r,
|
|
17
|
+
as: "nav",
|
|
18
|
+
...o
|
|
19
|
+
});
|
|
20
|
+
l.propTypes = {
|
|
21
|
+
ariaLabel: i.string.isRequired
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
l as SubNav,
|
|
25
|
+
p as subNavWidth
|
|
26
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),C=require("prop-types"),_=require("styled-components"),I=require("@strapi/icons/Search"),R=require("../Flex/Flex.cjs"),D=require("../Typography/Typography.cjs"),P=require("../IconButton/IconButton.cjs"),s=require("../Box/Box.cjs"),F=require("../Divider/Divider.cjs"),K=require("../Searchbar/Searchbar.cjs"),L=require("../Searchbar/SearchForm.cjs"),k=require("../helpers/useId.cjs"),w=require("../helpers/usePrevious.cjs"),O=require("../helpers/keyboardKeys.cjs"),l=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},e=l(o),r=l(C),H=l(_),M=l(I),p=H.default(F.Divider)`
|
|
2
|
+
width: ${24/16}rem;
|
|
3
|
+
background-color: ${({theme:t})=>t.colors.neutral200};
|
|
4
|
+
`,i=({as:t,label:h,searchLabel:f,searchable:g,onChange:b,value:y,onClear:m,onSubmit:S,id:v})=>{const[n,u]=o.useState(!1),B=w.usePrevious(n),q=k.useId("subnav-searchbar-clear",v),c=o.useRef(),d=o.useRef();o.useEffect(()=>{n&&c.current&&c.current.focus(),B&&!n&&d.current&&d.current.focus()},[n]);const E=()=>{u(a=>!a)},j=a=>{m(a),c.current.focus()},T=a=>{a.relatedTarget?.id!==q&&u(!1)},x=a=>{a.key===O.KeyboardKeys.ESCAPE&&u(!1)};return n?e.default.createElement(s.Box,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4},e.default.createElement(L.SearchForm,null,e.default.createElement(K.Searchbar,{name:"searchbar",value:y,onChange:b,placeholder:"e.g: strapi-plugin-abcd",onKeyDown:x,ref:c,onBlur:T,onClear:j,onSubmit:S,clearLabel:"Clear",size:"S"},f)),e.default.createElement(s.Box,{paddingLeft:2,paddingTop:4},e.default.createElement(p,null))):e.default.createElement(s.Box,{paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4},e.default.createElement(R.Flex,{justifyContent:"space-between",alignItems:"flex-start"},e.default.createElement(D.Typography,{variant:"beta",as:t},h),g&&e.default.createElement(P.IconButton,{ref:d,onClick:E,label:f,icon:e.default.createElement(M.default,null)})),e.default.createElement(s.Box,{paddingTop:4},e.default.createElement(p,null)))};i.defaultProps={as:"h2",searchable:!1,onChange:()=>{},onClear:()=>{},onSubmit:()=>{},value:"",searchLabel:"",id:void 0};i.propTypes={as:r.default.string,id:r.default.string,label:r.default.string.isRequired,onChange:r.default.func,onClear:r.default.func,onSubmit:r.default.func,searchLabel:r.default.string,searchable:r.default.bool,value:r.default.string};exports.SubNavHeader=i;
|