@strapi/design-system 0.0.0-3cf3ff39
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 +7 -0
- package/README.md +47 -0
- package/dist/Accordion/Accordion.cjs +23 -0
- package/dist/Accordion/Accordion.js +38 -0
- package/dist/Accordion/AccordionContent.cjs +1 -0
- package/dist/Accordion/AccordionContent.js +13 -0
- package/dist/Accordion/AccordionContext.cjs +1 -0
- package/dist/Accordion/AccordionContext.js +12 -0
- package/dist/Accordion/AccordionGroup.cjs +47 -0
- package/dist/Accordion/AccordionGroup.js +60 -0
- package/dist/Accordion/AccordionToggle.cjs +28 -0
- package/dist/Accordion/AccordionToggle.js +53 -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 +46 -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 +18 -0
- package/dist/Avatar/Avatar.js +39 -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 +4 -0
- package/dist/Badge/Badge.js +14 -0
- package/dist/Badge/index.cjs +1 -0
- package/dist/Badge/index.js +4 -0
- package/dist/BaseButton/BaseButton.cjs +17 -0
- package/dist/BaseButton/BaseButton.js +27 -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 +80 -0
- package/dist/BaseCheckbox/assets/checkmark-black.svg.cjs +1 -0
- package/dist/BaseCheckbox/assets/checkmark-black.svg.js +4 -0
- package/dist/BaseCheckbox/assets/checkmark.svg.cjs +1 -0
- package/dist/BaseCheckbox/assets/checkmark.svg.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 +1 -0
- package/dist/BaseLink/BaseLink.js +8 -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 +58 -0
- package/dist/BaseRadio/RadioGroup.cjs +1 -0
- package/dist/BaseRadio/RadioGroup.js +15 -0
- package/dist/BaseRadio/context.cjs +1 -0
- package/dist/BaseRadio/context.js +10 -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 +79 -0
- package/dist/Box/Box.js +95 -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 +30 -0
- package/dist/Breadcrumbs/index.cjs +1 -0
- package/dist/Breadcrumbs/index.js +5 -0
- package/dist/Button/Button.cjs +31 -0
- package/dist/Button/Button.js +51 -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 +12 -0
- package/dist/Card/CardAction.cjs +6 -0
- package/dist/Card/CardAction.js +20 -0
- package/dist/Card/CardAsset.cjs +19 -0
- package/dist/Card/CardAsset.js +28 -0
- package/dist/Card/CardBadge.cjs +6 -0
- package/dist/Card/CardBadge.js +12 -0
- package/dist/Card/CardBody.cjs +1 -0
- package/dist/Card/CardBody.js +7 -0
- package/dist/Card/CardCheckbox.cjs +1 -0
- package/dist/Card/CardCheckbox.js +14 -0
- package/dist/Card/CardContent.cjs +3 -0
- package/dist/Card/CardContent.js +9 -0
- package/dist/Card/CardContext.cjs +1 -0
- package/dist/Card/CardContext.js +6 -0
- package/dist/Card/CardHeader.cjs +3 -0
- package/dist/Card/CardHeader.js +9 -0
- package/dist/Card/CardTimer.cjs +1 -0
- package/dist/Card/CardTimer.js +7 -0
- package/dist/Card/CardTitle.cjs +1 -0
- package/dist/Card/CardTitle.js +11 -0
- package/dist/Card/index.cjs +1 -0
- package/dist/Card/index.js +23 -0
- package/dist/CarouselInput/Carousel.cjs +13 -0
- package/dist/CarouselInput/Carousel.js +40 -0
- package/dist/CarouselInput/CarouselActions.cjs +1 -0
- package/dist/CarouselInput/CarouselActions.js +6 -0
- package/dist/CarouselInput/CarouselImage.cjs +3 -0
- package/dist/CarouselInput/CarouselImage.js +17 -0
- package/dist/CarouselInput/CarouselInput.cjs +1 -0
- package/dist/CarouselInput/CarouselInput.js +15 -0
- package/dist/CarouselInput/CarouselSlide.cjs +1 -0
- package/dist/CarouselInput/CarouselSlide.js +6 -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 +28 -0
- package/dist/Checkbox/index.cjs +1 -0
- package/dist/Checkbox/index.js +4 -0
- package/dist/Combobox/Combobox.cjs +107 -0
- package/dist/Combobox/Combobox.js +175 -0
- package/dist/Combobox/ComboboxList.cjs +5 -0
- package/dist/Combobox/ComboboxList.js +10 -0
- package/dist/Combobox/ComboboxOption.cjs +1 -0
- package/dist/Combobox/ComboboxOption.js +5 -0
- package/dist/Combobox/index.cjs +1 -0
- package/dist/Combobox/index.js +7 -0
- package/dist/DatePicker/DatePicker.cjs +88 -0
- package/dist/DatePicker/DatePicker.js +397 -0
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -0
- package/dist/DatePicker/DatePickerCalendar.js +43 -0
- package/dist/DatePicker/DatePickerTd.cjs +19 -0
- package/dist/DatePicker/DatePickerTd.js +29 -0
- package/dist/DatePicker/DatePickerTh.cjs +9 -0
- package/dist/DatePicker/DatePickerTh.js +18 -0
- package/dist/DatePicker/compareDates.cjs +1 -0
- package/dist/DatePicker/compareDates.js +4 -0
- package/dist/DatePicker/components.cjs +39 -0
- package/dist/DatePicker/components.js +53 -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/DateTimePicker/DateTimePicker.cjs +5 -0
- package/dist/DateTimePicker/DateTimePicker.js +91 -0
- package/dist/DateTimePicker/index.cjs +1 -0
- package/dist/DateTimePicker/index.js +5 -0
- package/dist/DateTimePicker/parseDate.cjs +1 -0
- package/dist/DateTimePicker/parseDate.js +8 -0
- package/dist/DesignSystemProvider.cjs +1 -0
- package/dist/DesignSystemProvider.js +10 -0
- package/dist/Dialog/Dialog.cjs +11 -0
- package/dist/Dialog/Dialog.js +31 -0
- package/dist/Dialog/DialogBody.cjs +10 -0
- package/dist/Dialog/DialogBody.js +17 -0
- package/dist/Dialog/DialogFooter.cjs +9 -0
- package/dist/Dialog/DialogFooter.js +16 -0
- package/dist/Dialog/index.cjs +1 -0
- package/dist/Dialog/index.js +8 -0
- package/dist/DismissibleLayer/index.cjs +1 -0
- package/dist/DismissibleLayer/index.js +5 -0
- package/dist/Divider/Divider.cjs +7 -0
- package/dist/Divider/Divider.js +13 -0
- package/dist/Divider/index.cjs +1 -0
- package/dist/Divider/index.js +4 -0
- package/dist/EmptyStateLayout/EmptyStateLayout.cjs +5 -0
- package/dist/EmptyStateLayout/EmptyStateLayout.js +13 -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 +5 -0
- package/dist/Field/Field.cjs +1 -0
- package/dist/Field/Field.js +12 -0
- package/dist/Field/FieldAction.cjs +4 -0
- package/dist/Field/FieldAction.js +16 -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 +10 -0
- package/dist/Field/FieldHint.cjs +1 -0
- package/dist/Field/FieldHint.js +10 -0
- package/dist/Field/FieldInput.cjs +41 -0
- package/dist/Field/FieldInput.js +63 -0
- package/dist/Field/FieldLabel.cjs +12 -0
- package/dist/Field/FieldLabel.js +25 -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 +19 -0
- package/dist/Flex/index.cjs +1 -0
- package/dist/Flex/index.js +4 -0
- package/dist/FocusTrap/FocusTrap.cjs +1 -0
- package/dist/FocusTrap/FocusTrap.js +33 -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 +26 -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 +34 -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 +15 -0
- package/dist/Icon/index.cjs +1 -0
- package/dist/Icon/index.js +4 -0
- package/dist/IconButton/IconButton.cjs +81 -0
- package/dist/IconButton/IconButton.js +101 -0
- package/dist/IconButton/index.cjs +1 -0
- package/dist/IconButton/index.js +5 -0
- package/dist/JSONInput/JSONInput.cjs +1 -0
- package/dist/JSONInput/JSONInput.js +64 -0
- package/dist/JSONInput/JSONInputContainer.cjs +33 -0
- package/dist/JSONInput/JSONInputContainer.js +39 -0
- package/dist/JSONInput/index.cjs +1 -0
- package/dist/JSONInput/index.js +4 -0
- package/dist/JSONInput/utils/decorationExtension.cjs +1 -0
- package/dist/JSONInput/utils/decorationExtension.js +27 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.js +46 -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 +29 -0
- package/dist/Layout/ContentLayout.cjs +1 -0
- package/dist/Layout/ContentLayout.js +11 -0
- package/dist/Layout/GridLayout.cjs +5 -0
- package/dist/Layout/GridLayout.js +13 -0
- package/dist/Layout/HeaderLayout.cjs +4 -0
- package/dist/Layout/HeaderLayout.js +127 -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 +17 -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 +44 -0
- package/dist/Link/index.cjs +1 -0
- package/dist/Link/index.js +4 -0
- package/dist/LinkButton/LinkButton.cjs +15 -0
- package/dist/LinkButton/LinkButton.js +29 -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 +7 -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 +6 -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 +20 -0
- package/dist/Loader/assets/loader.svg.cjs +1 -0
- package/dist/Loader/assets/loader.svg.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 +12 -0
- package/dist/Main/SkipToContent.cjs +8 -0
- package/dist/Main/SkipToContent.js +14 -0
- package/dist/Main/index.cjs +1 -0
- package/dist/Main/index.js +6 -0
- package/dist/MainNav/MainNav.cjs +4 -0
- package/dist/MainNav/MainNav.js +33 -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 +49 -0
- package/dist/MainNav/NavCondense.cjs +20 -0
- package/dist/MainNav/NavCondense.js +40 -0
- package/dist/MainNav/NavFooter.cjs +1 -0
- package/dist/MainNav/NavFooter.js +12 -0
- package/dist/MainNav/NavLink.cjs +69 -0
- package/dist/MainNav/NavLink.js +103 -0
- package/dist/MainNav/NavSection.cjs +1 -0
- package/dist/MainNav/NavSection.js +46 -0
- package/dist/MainNav/NavSections.cjs +4 -0
- package/dist/MainNav/NavSections.js +26 -0
- package/dist/MainNav/NavUser.cjs +3 -0
- package/dist/MainNav/NavUser.js +32 -0
- package/dist/MainNav/index.cjs +1 -0
- package/dist/MainNav/index.js +18 -0
- package/dist/ModalLayout/ModalBody.cjs +4 -0
- package/dist/ModalLayout/ModalBody.js +10 -0
- package/dist/ModalLayout/ModalContext.cjs +1 -0
- package/dist/ModalLayout/ModalContext.js +7 -0
- package/dist/ModalLayout/ModalFooter.cjs +4 -0
- package/dist/ModalLayout/ModalFooter.js +11 -0
- package/dist/ModalLayout/ModalHeader.cjs +4 -0
- package/dist/ModalLayout/ModalHeader.js +17 -0
- package/dist/ModalLayout/ModalLayout.cjs +4 -0
- package/dist/ModalLayout/ModalLayout.js +16 -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 +79 -0
- package/dist/NumberInput/index.cjs +1 -0
- package/dist/NumberInput/index.js +4 -0
- package/dist/Pagination/Pagination.cjs +1 -0
- package/dist/Pagination/Pagination.js +12 -0
- package/dist/Pagination/PaginationContext.cjs +1 -0
- package/dist/Pagination/PaginationContext.js +6 -0
- package/dist/Pagination/assets/next.svg.cjs +1 -0
- package/dist/Pagination/assets/next.svg.js +4 -0
- package/dist/Pagination/assets/previous.svg.cjs +1 -0
- package/dist/Pagination/assets/previous.svg.js +4 -0
- package/dist/Pagination/components.cjs +33 -0
- package/dist/Pagination/components.js +67 -0
- package/dist/Pagination/index.cjs +1 -0
- package/dist/Pagination/index.js +9 -0
- package/dist/Popover/Popover.cjs +25 -0
- package/dist/Popover/Popover.js +127 -0
- package/dist/Popover/index.cjs +1 -0
- package/dist/Popover/index.js +7 -0
- package/dist/Popover/primitives.cjs +1 -0
- package/dist/Popover/primitives.js +5 -0
- package/dist/Portal/Portal.cjs +1 -0
- package/dist/Portal/Portal.js +9 -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 +17 -0
- package/dist/ProgressBar/index.cjs +1 -0
- package/dist/ProgressBar/index.js +4 -0
- package/dist/Radio/Radio.cjs +1 -0
- package/dist/Radio/Radio.js +8 -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 +60 -0
- package/dist/RawTable/RawTable.cjs +1 -0
- package/dist/RawTable/RawTable.js +53 -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 +9 -0
- package/dist/RawTable/RawThead.cjs +1 -0
- package/dist/RawTable/RawThead.js +9 -0
- package/dist/RawTable/RawTr.cjs +1 -0
- package/dist/RawTable/RawTr.js +13 -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 +5 -0
- package/dist/Searchbar/Searchbar.cjs +28 -0
- package/dist/Searchbar/Searchbar.js +47 -0
- package/dist/Searchbar/index.cjs +1 -0
- package/dist/Searchbar/index.js +6 -0
- package/dist/Select/MultiSelect.cjs +30 -0
- package/dist/Select/MultiSelect.js +75 -0
- package/dist/Select/MultiSelectNested.cjs +3 -0
- package/dist/Select/MultiSelectNested.js +9 -0
- package/dist/Select/OptGroup.cjs +5 -0
- package/dist/Select/OptGroup.js +10 -0
- package/dist/Select/Option.cjs +5 -0
- package/dist/Select/Option.js +16 -0
- package/dist/Select/Select.cjs +6 -0
- package/dist/Select/Select.js +19 -0
- package/dist/Select/SelectList.cjs +5 -0
- package/dist/Select/SelectList.js +85 -0
- package/dist/Select/SelectParts.cjs +83 -0
- package/dist/Select/SelectParts.js +110 -0
- package/dist/Select/SingleSelect.cjs +1 -0
- package/dist/Select/SingleSelect.js +44 -0
- package/dist/Select/index.cjs +1 -0
- package/dist/Select/index.js +19 -0
- package/dist/SimpleMenu/SimpleMenu.cjs +35 -0
- package/dist/SimpleMenu/SimpleMenu.js +198 -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 +35 -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 +22 -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 +22 -0
- package/dist/SubNav/SubNavHeader.cjs +4 -0
- package/dist/SubNav/SubNavHeader.js +86 -0
- package/dist/SubNav/SubNavLink.cjs +39 -0
- package/dist/SubNav/SubNavLink.js +81 -0
- package/dist/SubNav/SubNavLinkSection.cjs +19 -0
- package/dist/SubNav/SubNavLinkSection.js +51 -0
- package/dist/SubNav/SubNavSection.cjs +8 -0
- package/dist/SubNav/SubNavSection.js +64 -0
- package/dist/SubNav/SubNavSectionLabel.cjs +9 -0
- package/dist/SubNav/SubNavSectionLabel.js +47 -0
- package/dist/SubNav/SubNavSections.cjs +1 -0
- package/dist/SubNav/SubNavSections.js +22 -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 +50 -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 +38 -0
- package/dist/Table/TFooter.cjs +22 -0
- package/dist/Table/TFooter.js +43 -0
- package/dist/Table/Table.cjs +34 -0
- package/dist/Table/Table.js +70 -0
- package/dist/Table/Tbody.cjs +5 -0
- package/dist/Table/Tbody.js +12 -0
- package/dist/Table/Thead.cjs +3 -0
- package/dist/Table/Thead.js +10 -0
- package/dist/Table/Tr.cjs +20 -0
- package/dist/Table/Tr.js +27 -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 +16 -0
- package/dist/Tabs/TabPanels.cjs +1 -0
- package/dist/Tabs/TabPanels.js +14 -0
- package/dist/Tabs/Tabs.cjs +5 -0
- package/dist/Tabs/Tabs.js +76 -0
- package/dist/Tabs/TabsContext.cjs +1 -0
- package/dist/Tabs/TabsContext.js +13 -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/Tag/Tag.cjs +14 -0
- package/dist/Tag/Tag.js +23 -0
- package/dist/Tag/index.cjs +1 -0
- package/dist/Tag/index.js +4 -0
- package/dist/TextButton/TextButton.cjs +26 -0
- package/dist/TextButton/TextButton.js +40 -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 +21 -0
- package/dist/TextInput/index.cjs +1 -0
- package/dist/TextInput/index.js +4 -0
- package/dist/Textarea/Textarea.cjs +17 -0
- package/dist/Textarea/Textarea.js +39 -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 +180 -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 +8 -0
- package/dist/TimePicker/TimePicker.js +83 -0
- package/dist/TimePicker/index.cjs +1 -0
- package/dist/TimePicker/index.js +5 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +36 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.js +59 -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 +23 -0
- package/dist/ToggleInput/index.cjs +1 -0
- package/dist/ToggleInput/index.js +4 -0
- package/dist/Tooltip/Tooltip.cjs +5 -0
- package/dist/Tooltip/Tooltip.js +26 -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 +17 -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 +14 -0
- package/dist/Typography/Typography.js +25 -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/context.cjs +1 -0
- package/dist/helpers/context.js +21 -0
- package/dist/helpers/deprecations.cjs +1 -0
- package/dist/helpers/deprecations.js +13 -0
- package/dist/helpers/getDefaultLocale.cjs +4 -0
- package/dist/helpers/getDefaultLocale.js +9 -0
- package/dist/helpers/getFocusableNodes.cjs +1 -0
- package/dist/helpers/getFocusableNodes.js +7 -0
- package/dist/helpers/handleResponsiveValues.cjs +1 -0
- package/dist/helpers/handleResponsiveValues.js +25 -0
- package/dist/helpers/keyboardKeys.cjs +1 -0
- package/dist/helpers/keyboardKeys.js +20 -0
- package/dist/helpers/objects.cjs +1 -0
- package/dist/helpers/objects.js +10 -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/strings.cjs +1 -0
- package/dist/helpers/strings.js +4 -0
- package/dist/helpers/theme.cjs +1 -0
- package/dist/helpers/theme.js +7 -0
- package/dist/helpers/useElementOnScreen.cjs +4 -0
- package/dist/helpers/useElementOnScreen.js +11 -0
- package/dist/helpers/useId.cjs +4 -0
- package/dist/helpers/useId.js +11 -0
- package/dist/helpers/useIntersection.cjs +4 -0
- package/dist/helpers/useIntersection.js +11 -0
- package/dist/helpers/useLockScroll.cjs +4 -0
- package/dist/helpers/useLockScroll.js +11 -0
- package/dist/helpers/usePrevious.cjs +4 -0
- package/dist/helpers/usePrevious.js +11 -0
- package/dist/helpers/useResizeObserver.cjs +4 -0
- package/dist/helpers/useResizeObserver.js +11 -0
- package/dist/hooks/useComposeRefs.cjs +1 -0
- package/dist/hooks/useComposeRefs.js +14 -0
- package/dist/hooks/useControllableState.cjs +1 -0
- package/dist/hooks/useControllableState.js +22 -0
- package/dist/hooks/useDateFormatter.cjs +1 -0
- package/dist/hooks/useDateFormatter.js +20 -0
- package/dist/hooks/useElementOnScreen.cjs +1 -0
- package/dist/hooks/useElementOnScreen.js +15 -0
- package/dist/hooks/useId.cjs +1 -0
- package/dist/hooks/useId.js +13 -0
- package/dist/hooks/useIntersection.cjs +1 -0
- package/dist/hooks/useIntersection.js +23 -0
- package/dist/hooks/useLockScroll.cjs +1 -0
- package/dist/hooks/useLockScroll.js +9 -0
- package/dist/hooks/usePrevious.cjs +1 -0
- package/dist/hooks/usePrevious.js +10 -0
- package/dist/hooks/useResizeObserver.cjs +1 -0
- package/dist/hooks/useResizeObserver.js +16 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +311 -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 +22 -0
- package/dist/themes/utils.cjs +41 -0
- package/dist/themes/utils.js +47 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +9 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +33 -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 +30 -0
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +8 -0
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +23 -0
- package/dist/v2/Breadcrumbs/Divider.cjs +1 -0
- package/dist/v2/Breadcrumbs/Divider.js +9 -0
- package/dist/v2/Breadcrumbs/index.cjs +1 -0
- package/dist/v2/Breadcrumbs/index.js +10 -0
- package/dist/v2/Link/Link.cjs +25 -0
- package/dist/v2/Link/Link.js +36 -0
- package/dist/v2/Link/index.cjs +1 -0
- package/dist/v2/Link/index.js +4 -0
- package/dist/v2/LinkButton/LinkButton.cjs +20 -0
- package/dist/v2/LinkButton/LinkButton.js +35 -0
- package/dist/v2/LinkButton/index.cjs +1 -0
- package/dist/v2/LinkButton/index.js +4 -0
- package/dist/v2/MainNav/MainNav.cjs +4 -0
- package/dist/v2/MainNav/MainNav.js +33 -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 +50 -0
- package/dist/v2/MainNav/NavCondense.cjs +20 -0
- package/dist/v2/MainNav/NavCondense.js +40 -0
- package/dist/v2/MainNav/NavFooter.cjs +1 -0
- package/dist/v2/MainNav/NavFooter.js +12 -0
- package/dist/v2/MainNav/NavLink.cjs +69 -0
- package/dist/v2/MainNav/NavLink.js +103 -0
- package/dist/v2/MainNav/NavSection.cjs +1 -0
- package/dist/v2/MainNav/NavSection.js +46 -0
- package/dist/v2/MainNav/NavSections.cjs +4 -0
- package/dist/v2/MainNav/NavSections.js +26 -0
- package/dist/v2/MainNav/NavUser.cjs +3 -0
- package/dist/v2/MainNav/NavUser.js +32 -0
- package/dist/v2/MainNav/index.cjs +1 -0
- package/dist/v2/MainNav/index.js +18 -0
- package/dist/v2/Pagination/Pagination.cjs +5 -0
- package/dist/v2/Pagination/Pagination.js +26 -0
- package/dist/v2/Pagination/PaginationContext.cjs +1 -0
- package/dist/v2/Pagination/PaginationContext.js +6 -0
- package/dist/v2/Pagination/assets/next.svg.cjs +1 -0
- package/dist/v2/Pagination/assets/next.svg.js +4 -0
- package/dist/v2/Pagination/assets/previous.svg.cjs +1 -0
- package/dist/v2/Pagination/assets/previous.svg.js +4 -0
- package/dist/v2/Pagination/components.cjs +36 -0
- package/dist/v2/Pagination/components.js +95 -0
- package/dist/v2/Pagination/index.cjs +1 -0
- package/dist/v2/Pagination/index.js +9 -0
- package/dist/v2/SimpleMenu/Menu.cjs +65 -0
- package/dist/v2/SimpleMenu/Menu.js +89 -0
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -0
- package/dist/v2/SimpleMenu/SimpleMenu.js +27 -0
- package/dist/v2/SimpleMenu/index.cjs +1 -0
- package/dist/v2/SimpleMenu/index.js +7 -0
- package/dist/v2/SubNav/SubNav.cjs +10 -0
- package/dist/v2/SubNav/SubNav.js +22 -0
- package/dist/v2/SubNav/SubNavHeader.cjs +4 -0
- package/dist/v2/SubNav/SubNavHeader.js +86 -0
- package/dist/v2/SubNav/SubNavLink.cjs +39 -0
- package/dist/v2/SubNav/SubNavLink.js +84 -0
- package/dist/v2/SubNav/SubNavLinkSection.cjs +19 -0
- package/dist/v2/SubNav/SubNavLinkSection.js +50 -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 +47 -0
- package/dist/v2/SubNav/SubNavSections.cjs +1 -0
- package/dist/v2/SubNav/SubNavSections.js +22 -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 +55 -0
- package/package.json +69 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import i from "prop-types";
|
|
4
|
+
import f from "styled-components";
|
|
5
|
+
import { useMainNav as c } from "./MainNavContext.js";
|
|
6
|
+
import { Avatar as u, Initials as h } from "../Avatar/Avatar.js";
|
|
7
|
+
import { Box as n } from "../Box/Box.js";
|
|
8
|
+
import { Flex as g } from "../Flex/Flex.js";
|
|
9
|
+
import { VisuallyHidden as v } from "../VisuallyHidden/VisuallyHidden.js";
|
|
10
|
+
import { Typography as x } from "../Typography/Typography.js";
|
|
11
|
+
const y = f(n)`
|
|
12
|
+
border-top: 1px solid ${({ theme: o }) => o.colors.neutral150};
|
|
13
|
+
`, t = m.forwardRef(({ src: o, children: e, initials: a, ...s }, p) => {
|
|
14
|
+
const d = c();
|
|
15
|
+
return /* @__PURE__ */ r(y, { paddingTop: 3, paddingBottom: 3, paddingLeft: 5, paddingRight: 5, ...s, children: /* @__PURE__ */ l(g, { as: "button", justifyContent: d ? "center" : void 0, ref: p, children: [
|
|
16
|
+
o ? /* @__PURE__ */ r(u, { src: o, alt: "", "aria-hidden": !0 }) : /* @__PURE__ */ r(h, { children: a }),
|
|
17
|
+
d ? /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r("span", { children: e }) }) : /* @__PURE__ */ r(n, { width: `${130 / 16}rem`, paddingLeft: 2, as: "span", children: /* @__PURE__ */ r(x, { ellipsis: !0, textColor: "neutral600", children: e }) })
|
|
18
|
+
] }) });
|
|
19
|
+
});
|
|
20
|
+
t.displayName = "NavUser";
|
|
21
|
+
t.defaultProps = {
|
|
22
|
+
src: void 0,
|
|
23
|
+
initials: void 0
|
|
24
|
+
};
|
|
25
|
+
t.propTypes = {
|
|
26
|
+
children: i.node.isRequired,
|
|
27
|
+
initials: i.node,
|
|
28
|
+
src: i.string
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
t as NavUser
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MainNav.cjs"),a=require("./NavBrand.cjs"),n=require("./NavCondense.cjs"),r=require("./NavFooter.cjs"),o=require("./NavLink.cjs"),v=require("./NavSection.cjs"),N=require("./NavSections.cjs"),i=require("./NavUser.cjs");exports.MainNav=e.MainNav;exports.NavBrand=a.NavBrand;exports.NavCondense=n.NavCondense;exports.NavFooter=r.NavFooter;exports.NavLink=o.NavLink;exports.NavSection=v.NavSection;exports.NavSections=N.NavSections;exports.NavUser=i.NavUser;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MainNav as e } from "./MainNav.js";
|
|
2
|
+
import { NavBrand as a } from "./NavBrand.js";
|
|
3
|
+
import { NavCondense as m } from "./NavCondense.js";
|
|
4
|
+
import { NavFooter as v } from "./NavFooter.js";
|
|
5
|
+
import { NavLink as N } from "./NavLink.js";
|
|
6
|
+
import { NavSection as i } from "./NavSection.js";
|
|
7
|
+
import { NavSections as c } from "./NavSections.js";
|
|
8
|
+
import { NavUser as S } from "./NavUser.js";
|
|
9
|
+
export {
|
|
10
|
+
e as MainNav,
|
|
11
|
+
a as NavBrand,
|
|
12
|
+
m as NavCondense,
|
|
13
|
+
v as NavFooter,
|
|
14
|
+
N as NavLink,
|
|
15
|
+
i as NavSection,
|
|
16
|
+
c as NavSections,
|
|
17
|
+
S as NavUser
|
|
18
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("styled-components"),d=require("../Box/Box.cjs"),r=e=>e&&e.__esModule?e:{default:e},l=r(t),s=l.default(d.Box)`
|
|
2
|
+
overflow: auto;
|
|
3
|
+
max-height: 60vh;
|
|
4
|
+
`,u=e=>o.jsx(s,{padding:7,...e});exports.ModalBody=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(()=>{}),o=()=>e.useContext(t);exports.ModalContext=t;exports.useModal=o;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),d=require("styled-components"),n=require("../Box/Box.cjs"),r=require("../Flex/Flex.cjs"),s=e=>e&&e.__esModule?e:{default:e},l=s(d),a=l.default(n.Box)`
|
|
2
|
+
border-radius: 0 0 ${({theme:e})=>e.borderRadius} ${({theme:e})=>e.borderRadius};
|
|
3
|
+
border-top: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
4
|
+
`,i=({startActions:e,endActions:t})=>o.jsx(a,{paddingTop:4,paddingBottom:4,paddingLeft:5,paddingRight:5,background:"neutral100",children:o.jsxs(r.Flex,{justifyContent:"space-between",children:[o.jsx(r.Flex,{gap:2,children:e}),o.jsx(r.Flex,{gap:2,children:t})]})});exports.ModalFooter=i;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as o, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import i from "styled-components";
|
|
3
|
+
import { Box as n } from "../Box/Box.js";
|
|
4
|
+
import { Flex as d } from "../Flex/Flex.js";
|
|
5
|
+
const p = i(n)`
|
|
6
|
+
border-radius: 0 0 ${({ theme: r }) => r.borderRadius} ${({ theme: r }) => r.borderRadius};
|
|
7
|
+
border-top: 1px solid ${({ theme: r }) => r.colors.neutral150};
|
|
8
|
+
`, m = ({ startActions: r, endActions: e }) => o(p, { paddingTop: 4, paddingBottom: 4, paddingLeft: 5, paddingRight: 5, background: "neutral100", children: t(d, { justifyContent: "space-between", children: [o(d, { gap: 2, children: r }), o(d, { gap: 2, children: e })] }) });
|
|
9
|
+
export {
|
|
10
|
+
m as ModalFooter
|
|
11
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("@strapi/icons"),d=require("styled-components"),s=require("./ModalContext.cjs"),a=require("../IconButton/IconButton.cjs"),l=require("../Box/Box.cjs"),i=require("../Flex/Flex.cjs"),u=e=>e&&e.__esModule?e:{default:e},c=u(d),p=c.default(l.Box)`
|
|
2
|
+
border-radius: ${({theme:e})=>e.borderRadius} ${({theme:e})=>e.borderRadius} 0 0;
|
|
3
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
4
|
+
`,x=({children:e,closeLabel:t="Close the modal"})=>{const r=s.useModal();return o.jsx(p,{paddingTop:4,paddingBottom:4,paddingLeft:5,paddingRight:5,background:"neutral100",children:o.jsxs(i.Flex,{justifyContent:"space-between",children:[e,o.jsx(a.IconButton,{onClick:r,"aria-label":t,icon:o.jsx(n.Cross,{})})]})})};exports.ModalHeader=x;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { Cross as i } from "@strapi/icons";
|
|
3
|
+
import a from "styled-components";
|
|
4
|
+
import { useModal as n } from "./ModalContext.js";
|
|
5
|
+
import { IconButton as s } from "../IconButton/IconButton.js";
|
|
6
|
+
import { Box as l } from "../Box/Box.js";
|
|
7
|
+
import { Flex as m } from "../Flex/Flex.js";
|
|
8
|
+
const p = a(l)`
|
|
9
|
+
border-radius: ${({ theme: o }) => o.borderRadius} ${({ theme: o }) => o.borderRadius} 0 0;
|
|
10
|
+
border-bottom: 1px solid ${({ theme: o }) => o.colors.neutral150};
|
|
11
|
+
`, h = ({ children: o, closeLabel: e = "Close the modal" }) => {
|
|
12
|
+
const t = n();
|
|
13
|
+
return r(p, { paddingTop: 4, paddingBottom: 4, paddingLeft: 5, paddingRight: 5, background: "neutral100", children: d(m, { justifyContent: "space-between", children: [o, r(s, { onClick: t, "aria-label": e, icon: r(i, {}) })] }) });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
h as ModalHeader
|
|
17
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("styled-components"),a=require("./ModalContext.cjs"),s=require("../DismissibleLayer/index.cjs"),d=require("../hooks/useLockScroll.cjs"),l=require("../Flex/Flex.cjs"),u=require("../Portal/Portal.cjs"),c=require("../FocusTrap/FocusTrap.cjs"),x=require("../Box/Box.cjs"),p=e=>e&&e.__esModule?e:{default:e},h=p(i),y=h.default(l.Flex)`
|
|
2
|
+
background: ${({theme:e})=>`${e.colors.neutral800}1F`};
|
|
3
|
+
inset: 0;
|
|
4
|
+
`,g=({onClose:e,labelledBy:r,...t})=>(d(!0),o.jsx(u.Portal,{children:o.jsx(a.ModalContext.Provider,{value:e,children:o.jsx(y,{justifyContent:"center",paddingLeft:8,paddingRight:8,position:"fixed",zIndex:4,children:o.jsx(c.FocusTrap,{children:o.jsx(s.DismissibleLayer,{onEscapeKeyDown:e,onPointerDownOutside:e,children:o.jsx(x.Box,{"aria-labelledby":r,"aria-modal":!0,onClick:n=>n.stopPropagation(),background:"neutral0",hasRadius:!0,role:"dialog",shadow:"popupShadow",width:`${830/16}rem`,...t})})})})})}));exports.ModalLayout=g;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import a from "styled-components";
|
|
3
|
+
import { ModalContext as d } from "./ModalContext.js";
|
|
4
|
+
import { DismissibleLayer as n } from "../DismissibleLayer/index.js";
|
|
5
|
+
import l from "../hooks/useLockScroll.js";
|
|
6
|
+
import { Flex as p } from "../Flex/Flex.js";
|
|
7
|
+
import { Portal as m } from "../Portal/Portal.js";
|
|
8
|
+
import { FocusTrap as s } from "../FocusTrap/FocusTrap.js";
|
|
9
|
+
import { Box as c } from "../Box/Box.js";
|
|
10
|
+
const u = a(p)`
|
|
11
|
+
background: ${({ theme: r }) => `${r.colors.neutral800}1F`};
|
|
12
|
+
inset: 0;
|
|
13
|
+
`, P = ({ onClose: r, labelledBy: t, ...i }) => (l(!0), o(m, { children: o(d.Provider, { value: r, children: o(u, { justifyContent: "center", paddingLeft: 8, paddingRight: 8, position: "fixed", zIndex: 4, children: o(s, { children: o(n, { onEscapeKeyDown: r, onPointerDownOutside: r, children: o(c, { "aria-labelledby": t, "aria-modal": !0, onClick: (e) => e.stopPropagation(), background: "neutral0", hasRadius: !0, role: "dialog", shadow: "popupShadow", width: `${830 / 16}rem`, ...i }) }) }) }) }) }));
|
|
14
|
+
export {
|
|
15
|
+
P as ModalLayout
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./ModalLayout.cjs"),e=require("./ModalHeader.cjs"),a=require("./ModalFooter.cjs"),d=require("./ModalBody.cjs");exports.ModalLayout=o.ModalLayout;exports.ModalHeader=e.ModalHeader;exports.ModalFooter=a.ModalFooter;exports.ModalBody=d.ModalBody;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ModalLayout as e } from "./ModalLayout.js";
|
|
2
|
+
import { ModalHeader as d } from "./ModalHeader.js";
|
|
3
|
+
import { ModalFooter as f } from "./ModalFooter.js";
|
|
4
|
+
import { ModalBody as m } from "./ModalBody.js";
|
|
5
|
+
export {
|
|
6
|
+
m as ModalBody,
|
|
7
|
+
f as ModalFooter,
|
|
8
|
+
d as ModalHeader,
|
|
9
|
+
e as ModalLayout
|
|
10
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),x=require("@internationalized/number"),g=require("@strapi/icons"),M=require("styled-components"),B=require("../DesignSystemProvider.cjs"),h=require("../helpers/keyboardKeys.cjs"),E=require("../hooks/useControllableState.cjs"),U=require("../hooks/useId.cjs"),H=require("../Field/FieldInput.cjs"),O=require("../Field/Field.cjs"),T=require("../Flex/Flex.cjs"),z=require("../Field/FieldLabel.cjs"),y=require("../Icon/Icon.cjs"),W=require("../Field/FieldHint.cjs"),X=require("../Field/FieldError.cjs"),I=r=>r&&r.__esModule?r:{default:r},Y=I(l),G=I(M),N=G.default.button`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 1rem;
|
|
4
|
+
align-items: ${({reverse:r})=>r?"flex-end":"flex-start"};
|
|
5
|
+
transform: translateY(${({reverse:r})=>r?"-2px":"2px"});
|
|
6
|
+
cursor: ${({disabled:r})=>r?"not-allowed":void 0};
|
|
7
|
+
svg {
|
|
8
|
+
display: block;
|
|
9
|
+
height: ${4/16}rem;
|
|
10
|
+
transform: ${({reverse:r})=>r?"rotateX(180deg)":void 0};
|
|
11
|
+
}
|
|
12
|
+
`,J="",Q=Y.default.forwardRef(({size:r="M",startAction:q,name:F,hint:w,error:j,label:d,labelAction:D,locale:C,id:V,onValueChange:S,value:m,step:o=1,required:A=!1,disabled:u=!1,...R},_)=>{const k=U.useId(V),K=B.useDesignSystem("NumberInput"),f=C||K.locale,i=l.useRef(new x.NumberParser(f,{style:"decimal"})),c=l.useRef(new x.NumberFormatter(f,{maximumFractionDigits:20})),[s,P]=E.useControllableState({prop(e){const n=String(m);return isNaN(Number(n))||n!==e&&e!==""?e:c.current.format(Number(m))},defaultProp:J,onChange(e){const n=i.current.parse(e??"");S(isNaN(n)?void 0:n)}}),a=e=>{P(String(e))},v=({target:{value:e}})=>{i.current.isValidPartialNumber(e)&&a(e)},b=()=>{if(!s){a(o);return}const e=i.current.parse(s),n=isNaN(e)?o:e+o;a(c.current.format(n))},p=()=>{if(!s){a(-o);return}const e=i.current.parse(s),n=isNaN(e)?-o:e-o;a(c.current.format(n))},$=e=>{if(!u)switch(e.key){case h.KeyboardKeys.DOWN:{e.preventDefault(),p();break}case h.KeyboardKeys.UP:{e.preventDefault(),b();break}}},L=()=>{if(s){const e=i.current.parse(s),n=isNaN(e)?"":c.current.format(e);a(n)}};return t.jsx(O.Field,{name:F,hint:w,error:j,id:k,required:A,children:t.jsxs(T.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[d&&t.jsx(z.FieldLabel,{action:D,children:d}),t.jsx(H.FieldInput,{ref:_,startAction:q,disabled:u,type:"text",inputMode:"decimal",onChange:v,onKeyDown:$,onBlur:L,value:s,size:r,endAction:t.jsxs(t.Fragment,{children:[t.jsx(N,{disabled:u,"aria-hidden":!0,reverse:!0,onClick:b,tabIndex:-1,type:"button","data-testid":"ArrowUp",children:t.jsx(y.Icon,{as:g.CarretDown,color:"neutral500"})}),t.jsx(N,{disabled:u,"aria-hidden":!0,onClick:p,tabIndex:-1,type:"button","data-testid":"ArrowDown",children:t.jsx(y.Icon,{as:g.CarretDown,color:"neutral500"})})]}),...R}),t.jsx(W.FieldHint,{}),t.jsx(X.FieldError,{})]})})});exports.NumberInput=Q;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as n, jsxs as h, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import j, { useRef as b } from "react";
|
|
3
|
+
import { NumberParser as E, NumberFormatter as M } from "@internationalized/number";
|
|
4
|
+
import { CarretDown as N } from "@strapi/icons";
|
|
5
|
+
import q from "styled-components";
|
|
6
|
+
import { useDesignSystem as z } from "../DesignSystemProvider.js";
|
|
7
|
+
import { KeyboardKeys as g } from "../helpers/keyboardKeys.js";
|
|
8
|
+
import { useControllableState as H } from "../hooks/useControllableState.js";
|
|
9
|
+
import { useId as O } from "../hooks/useId.js";
|
|
10
|
+
import { FieldInput as T } from "../Field/FieldInput.js";
|
|
11
|
+
import { Field as W } from "../Field/Field.js";
|
|
12
|
+
import { Flex as X } from "../Flex/Flex.js";
|
|
13
|
+
import { FieldLabel as Y } from "../Field/FieldLabel.js";
|
|
14
|
+
import { Icon as w } from "../Icon/Icon.js";
|
|
15
|
+
import { FieldHint as G } from "../Field/FieldHint.js";
|
|
16
|
+
import { FieldError as J } from "../Field/FieldError.js";
|
|
17
|
+
const x = q.button`
|
|
18
|
+
display: flex;
|
|
19
|
+
height: 1rem;
|
|
20
|
+
align-items: ${({ reverse: t }) => t ? "flex-end" : "flex-start"};
|
|
21
|
+
transform: translateY(${({ reverse: t }) => t ? "-2px" : "2px"});
|
|
22
|
+
cursor: ${({ disabled: t }) => t ? "not-allowed" : void 0};
|
|
23
|
+
svg {
|
|
24
|
+
display: block;
|
|
25
|
+
height: ${4 / 16}rem;
|
|
26
|
+
transform: ${({ reverse: t }) => t ? "rotateX(180deg)" : void 0};
|
|
27
|
+
}
|
|
28
|
+
`, Q = "", he = j.forwardRef(({ size: t = "M", startAction: y, name: I, hint: F, error: V, label: c, labelAction: D, locale: A, id: C, onValueChange: k, value: u, step: a = 1, required: P = !1, disabled: m = !1, ...R }, S) => {
|
|
29
|
+
const $ = O(C), K = z("NumberInput"), d = A || K.locale, s = b(new E(d, { style: "decimal" })), l = b(new M(d, { maximumFractionDigits: 20 })), [o, v] = H({
|
|
30
|
+
prop(e) {
|
|
31
|
+
const r = String(u);
|
|
32
|
+
return isNaN(Number(r)) || r !== e && e !== "" ? e : l.current.format(Number(u));
|
|
33
|
+
},
|
|
34
|
+
defaultProp: Q,
|
|
35
|
+
onChange(e) {
|
|
36
|
+
const r = s.current.parse(e ?? "");
|
|
37
|
+
k(isNaN(r) ? void 0 : r);
|
|
38
|
+
}
|
|
39
|
+
}), i = (e) => {
|
|
40
|
+
v(String(e));
|
|
41
|
+
}, B = ({ target: { value: e } }) => {
|
|
42
|
+
s.current.isValidPartialNumber(e) && i(e);
|
|
43
|
+
}, f = () => {
|
|
44
|
+
if (!o) {
|
|
45
|
+
i(a);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const e = s.current.parse(o), r = isNaN(e) ? a : e + a;
|
|
49
|
+
i(l.current.format(r));
|
|
50
|
+
}, p = () => {
|
|
51
|
+
if (!o) {
|
|
52
|
+
i(-a);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const e = s.current.parse(o), r = isNaN(e) ? -a : e - a;
|
|
56
|
+
i(l.current.format(r));
|
|
57
|
+
}, L = (e) => {
|
|
58
|
+
if (!m)
|
|
59
|
+
switch (e.key) {
|
|
60
|
+
case g.DOWN: {
|
|
61
|
+
e.preventDefault(), p();
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case g.UP: {
|
|
65
|
+
e.preventDefault(), f();
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, U = () => {
|
|
70
|
+
if (o) {
|
|
71
|
+
const e = s.current.parse(o), r = isNaN(e) ? "" : l.current.format(e);
|
|
72
|
+
i(r);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return n(W, { name: I, hint: F, error: V, id: $, required: P, children: h(X, { direction: "column", alignItems: "stretch", gap: 1, children: [c && n(Y, { action: D, children: c }), n(T, { ref: S, startAction: y, disabled: m, type: "text", inputMode: "decimal", onChange: B, onKeyDown: L, onBlur: U, value: o, size: t, endAction: h(_, { children: [n(x, { disabled: m, "aria-hidden": !0, reverse: !0, onClick: f, tabIndex: -1, type: "button", "data-testid": "ArrowUp", children: n(w, { as: N, color: "neutral500" }) }), n(x, { disabled: m, "aria-hidden": !0, onClick: p, tabIndex: -1, type: "button", "data-testid": "ArrowDown", children: n(w, { as: N, color: "neutral500" }) })] }), ...R }), n(G, {}), n(J, {})] }) });
|
|
76
|
+
});
|
|
77
|
+
export {
|
|
78
|
+
he as NumberInput
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./NumberInput.cjs");exports.NumberInput=e.NumberInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("react"),u=require("./PaginationContext.cjs"),d=require("../Box/Box.cjs"),x=require("../Flex/Flex.cjs");function g(e){if(e&&e.__esModule)return e;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const i=g(l),f=({children:e,label:n="Pagination",activePage:t,pageCount:r})=>{const a=i.useMemo(()=>({activePage:t,pageCount:r}),[t,r]);return o.jsx(u.PaginationContext.Provider,{value:a,children:o.jsx(d.Box,{"aria-label":n,as:"nav",children:o.jsx(x.Flex,{as:"ol",gap:1,children:i.Children.map(e,(c,s)=>o.jsx("li",{children:c},s))})})})};exports.Pagination=f;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { PaginationContext as c } from "./PaginationContext.js";
|
|
4
|
+
import { Box as p } from "../Box/Box.js";
|
|
5
|
+
import { Flex as s } from "../Flex/Flex.js";
|
|
6
|
+
const u = ({ children: t, label: a = "Pagination", activePage: o, pageCount: i }) => {
|
|
7
|
+
const e = n.useMemo(() => ({ activePage: o, pageCount: i }), [o, i]);
|
|
8
|
+
return r(c.Provider, { value: e, children: r(p, { "aria-label": a, as: "nav", children: r(s, { as: "ol", gap: 1, children: n.Children.map(t, (m, l) => r("li", { children: m }, l)) }) }) });
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
u as Pagination
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=t.createContext({activePage:1,pageCount:1}),n=()=>t.useContext(e);exports.PaginationContext=e;exports.usePagination=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const M="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0tMC4wMDAxOTU1MDMgMS4xNzVMMy44MTY0NyA1TC0wLjAwMDE5NTUwMyA4LjgyNUwxLjE3NDggMTBMNi4xNzQ4IDVMMS4xNzQ4IDBMLTAuMDAwMTk1NTAzIDEuMTc1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";module.exports=M;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const M = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0tMC4wMDAxOTU1MDMgMS4xNzVMMy44MTY0NyA1TC0wLjAwMDE5NTUwMyA4LjgyNUwxLjE3NDggMTBMNi4xNzQ4IDVMMS4xNzQ4IDBMLTAuMDAwMTk1NTAzIDEuMTc1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";
|
|
2
|
+
export {
|
|
3
|
+
M as default
|
|
4
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const I="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02LjE3NSA4LjgyNUwyLjM1ODMzIDVMNi4xNzUgMS4xNzVMNSAwTDAgNUw1IDEwTDYuMTc1IDguODI1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";module.exports=I;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const I = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02LjE3NSA4LjgyNUwyLjM1ODMzIDVMNi4xNzUgMS4xNzVMNSAwTDAgNUw1IDEwTDYuMTc1IDguODI1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";
|
|
2
|
+
export {
|
|
3
|
+
I as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),u=require("@strapi/icons"),v=require("react-router-dom"),y=require("styled-components"),d=require("./PaginationContext.cjs"),b=require("../themes/utils.cjs"),o=require("../VisuallyHidden/VisuallyHidden.cjs"),c=require("../Typography/Typography.cjs"),P=require("../Box/Box.cjs"),j=e=>e&&e.__esModule?e:{default:e},l=j(y),k={active:!0},h=l.default(v.NavLink).withConfig({shouldForwardProp:(e,i)=>!k[e]&&i(e)})`
|
|
2
|
+
padding: ${({theme:e})=>e.spaces[3]};
|
|
3
|
+
border-radius: ${({theme:e})=>e.borderRadius};
|
|
4
|
+
box-shadow: ${({active:e,theme:i})=>e?i.shadows.filterShadow:void 0};
|
|
5
|
+
text-decoration: none;
|
|
6
|
+
display: flex;
|
|
7
|
+
|
|
8
|
+
${b.buttonFocusStyle}
|
|
9
|
+
`,L=l.default(h)`
|
|
10
|
+
color: ${({theme:e,active:i})=>i?e.colors.primary700:e.colors.neutral800};
|
|
11
|
+
background: ${({theme:e,active:i})=>i?e.colors.neutral0:void 0};
|
|
12
|
+
|
|
13
|
+
&:hover {
|
|
14
|
+
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
15
|
+
}
|
|
16
|
+
`,g=l.default(h)`
|
|
17
|
+
font-size: ${11/16}rem;
|
|
18
|
+
|
|
19
|
+
svg path {
|
|
20
|
+
fill: ${e=>e["aria-disabled"]?e.theme.colors.neutral300:e.theme.colors.neutral600};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:focus,
|
|
24
|
+
&:hover {
|
|
25
|
+
svg path {
|
|
26
|
+
fill: ${e=>e["aria-disabled"]?e.theme.colors.neutral300:e.theme.colors.neutral700};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
${e=>e["aria-disabled"]?`
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
`:void 0}
|
|
33
|
+
`,x=({children:e,to:i,...r})=>{const{activePage:a}=d.usePagination(),t=a===1;return n.jsxs(g,{to:t?"#":i,"aria-disabled":t,tabIndex:t?-1:void 0,...r,children:[n.jsx(o.VisuallyHidden,{children:e}),n.jsx(u.ChevronLeft,{"aria-hidden":!0})]})};x.displayName="PreviousLink";const f=({children:e,to:i,...r})=>{const{activePage:a,pageCount:t}=d.usePagination(),s=a===t;return n.jsxs(g,{to:s?"#":i,"aria-disabled":s,tabIndex:s?-1:void 0,...r,children:[n.jsx(o.VisuallyHidden,{children:e}),n.jsx(u.ChevronRight,{"aria-hidden":!0})]})};f.displayName="NextLink";const p=({number:e,children:i,...r})=>{const{activePage:a}=d.usePagination(),t=a===e;return n.jsxs(L,{...r,active:t,children:[n.jsx(o.VisuallyHidden,{children:i}),n.jsx(c.Typography,{"aria-hidden":!0,fontWeight:t?"bold":void 0,lineHeight:"revert",variant:"pi",children:e})]})};p.displayName="PageLink";const $=({children:e,...i})=>n.jsxs(P.Box,{...i,children:[n.jsx(o.VisuallyHidden,{children:e}),n.jsx(c.Typography,{"aria-hidden":!0,lineHeight:"revert",textColor:"neutral800",variant:"pi",children:"…"})]});exports.Dots=$;exports.NextLink=f;exports.PageLink=p;exports.PreviousLink=x;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft as f, ChevronRight as m } from "@strapi/icons";
|
|
3
|
+
import { NavLink as v } from "react-router-dom";
|
|
4
|
+
import l from "styled-components";
|
|
5
|
+
import { usePagination as c } from "./PaginationContext.js";
|
|
6
|
+
import { buttonFocusStyle as g } from "../themes/utils.js";
|
|
7
|
+
import { VisuallyHidden as d } from "../VisuallyHidden/VisuallyHidden.js";
|
|
8
|
+
import { Typography as h } from "../Typography/Typography.js";
|
|
9
|
+
import { Box as b } from "../Box/Box.js";
|
|
10
|
+
const x = {
|
|
11
|
+
active: !0
|
|
12
|
+
}, u = l(v).withConfig({
|
|
13
|
+
shouldForwardProp: (e, r) => !x[e] && r(e)
|
|
14
|
+
})`
|
|
15
|
+
padding: ${({ theme: e }) => e.spaces[3]};
|
|
16
|
+
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
17
|
+
box-shadow: ${({ active: e, theme: r }) => e ? r.shadows.filterShadow : void 0};
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
display: flex;
|
|
20
|
+
|
|
21
|
+
${g}
|
|
22
|
+
`, k = l(u)`
|
|
23
|
+
color: ${({ theme: e, active: r }) => r ? e.colors.primary700 : e.colors.neutral800};
|
|
24
|
+
background: ${({ theme: e, active: r }) => r ? e.colors.neutral0 : void 0};
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
|
|
28
|
+
}
|
|
29
|
+
`, p = l(u)`
|
|
30
|
+
font-size: ${11 / 16}rem;
|
|
31
|
+
|
|
32
|
+
svg path {
|
|
33
|
+
fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral600};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:focus,
|
|
37
|
+
&:hover {
|
|
38
|
+
svg path {
|
|
39
|
+
fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral700};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
${(e) => e["aria-disabled"] ? `
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
` : void 0}
|
|
46
|
+
`, L = ({ children: e, to: r, ...n }) => {
|
|
47
|
+
const { activePage: t } = c(), i = t === 1;
|
|
48
|
+
return a(p, { to: i ? "#" : r, "aria-disabled": i, tabIndex: i ? -1 : void 0, ...n, children: [o(d, { children: e }), o(f, { "aria-hidden": !0 })] });
|
|
49
|
+
};
|
|
50
|
+
L.displayName = "PreviousLink";
|
|
51
|
+
const P = ({ children: e, to: r, ...n }) => {
|
|
52
|
+
const { activePage: t, pageCount: i } = c(), s = t === i;
|
|
53
|
+
return a(p, { to: s ? "#" : r, "aria-disabled": s, tabIndex: s ? -1 : void 0, ...n, children: [o(d, { children: e }), o(m, { "aria-hidden": !0 })] });
|
|
54
|
+
};
|
|
55
|
+
P.displayName = "NextLink";
|
|
56
|
+
const $ = ({ number: e, children: r, ...n }) => {
|
|
57
|
+
const { activePage: t } = c(), i = t === e;
|
|
58
|
+
return a(k, { ...n, active: i, children: [o(d, { children: r }), o(h, { "aria-hidden": !0, fontWeight: i ? "bold" : void 0, lineHeight: "revert", variant: "pi", children: e })] });
|
|
59
|
+
};
|
|
60
|
+
$.displayName = "PageLink";
|
|
61
|
+
const F = ({ children: e, ...r }) => a(b, { ...r, children: [o(d, { children: e }), o(h, { "aria-hidden": !0, lineHeight: "revert", textColor: "neutral800", variant: "pi", children: "…" })] });
|
|
62
|
+
export {
|
|
63
|
+
F as Dots,
|
|
64
|
+
P as NextLink,
|
|
65
|
+
$ as PageLink,
|
|
66
|
+
L as PreviousLink
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Pagination.cjs"),i=require("./components.cjs");exports.Pagination=e.Pagination;exports.Dots=i.Dots;exports.NextLink=i.NextLink;exports.PageLink=i.PageLink;exports.PreviousLink=i.PreviousLink;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),M=require("react"),u=require("@floating-ui/react-dom"),z=require("@radix-ui/react-focus-scope"),m=require("@strapi/ui-primitives"),T=require("aria-hidden"),W=require("react-remove-scroll"),A=require("styled-components"),B=require("../DismissibleLayer/index.cjs"),P=require("../helpers/strings.cjs"),H=require("../hooks/useComposeRefs.cjs"),K=require("../hooks/useId.cjs"),N=require("../hooks/useIntersection.cjs"),g=require("../Box/Box.cjs"),U=require("../Portal/Portal.cjs"),V=e=>e&&e.__esModule?e:{default:e};function Z(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const s=Z(M),R=V(A),G=["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"],J=R.default(g.Box)`
|
|
2
|
+
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
3
|
+
z-index: ${({theme:e})=>e.zIndices[0]};
|
|
4
|
+
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
5
|
+
`,E=s.forwardRef(({source:e,children:r,spacing:t=0,fullWidth:n=!1,placement:c="bottom-start",centered:l=!1,onEscapeKeyDown:d,onPointerDownOutside:f,onDismiss:a,onFocusOutside:p,...O},S)=>{const[h,k]=s.useState(null),[j,q]=s.useState(void 0),w=s.useRef(!1),{x:C,y:D,reference:v,floating:_,strategy:L}=u.useFloating({strategy:"fixed",placement:l?"bottom":c,middleware:[u.offset({mainAxis:t}),u.shift(),u.flip()],whileElementsMounted:u.autoUpdate});s.useLayoutEffect(()=>{v(e.current)},[e,v]),s.useLayoutEffect(()=>{n&&q(e.current.offsetWidth)},[n,e]),s.useEffect(()=>{if(h)return T.hideOthers(h)},[h]);const x=m.useCallbackRef(a);s.useEffect(()=>{const o=()=>{x()};return window.addEventListener("blur",o),window.addEventListener("resize",o),()=>{window.removeEventListener("blur",o),window.removeEventListener("resize",o)}},[x]);const I=H.useComposedRefs(S,o=>k(o),_);return i.jsx(W.RemoveScroll,{allowPinchZoom:!0,children:i.jsx(z.FocusScope,{asChild:!0,loop:!0,trapped:!0,onUnmountAutoFocus:o=>{o.preventDefault(),w.current||e.current?.focus({preventScroll:!0})},children:i.jsx(B.DismissibleLayer,{asChild:!0,onEscapeKeyDown:d,onPointerDownOutside:m.composeEventHandlers(f,o=>{const b=o.detail.originalEvent,$=b.button===0&&b.ctrlKey===!0,F=b.button===2||$;w.current=F},{checkForDefaultPrevented:!1}),onFocusOutside:m.composeEventHandlers(p,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:a,children:i.jsx(J,{ref:I,style:{left:C,top:D,position:L,width:j||void 0},hasRadius:!0,background:"neutral0",padding:1,...O,children:r})})})})}),y=({children:e,intersectionId:r,onReachEnd:t,...n})=>{const c=s.useRef(null),l=K.useId();return N.useIntersection(c,t??(()=>{}),{selectorToWatch:`#${P.stripReactIdOfColon(l)}`,skipWhen:!r||!t}),i.jsxs(Q,{ref:c,...n,children:[e,r&&t&&i.jsx(g.Box,{id:P.stripReactIdOfColon(l),width:"100%",height:"1px"})]})},Q=R.default(g.Box)`
|
|
6
|
+
// 16 is base base size, 3 is the factor to get closer to 40px and 5 is the number of elements visible in the list
|
|
7
|
+
max-height: ${3*5}rem;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
overflow-x: hidden;
|
|
10
|
+
|
|
11
|
+
&::-webkit-scrollbar {
|
|
12
|
+
-webkit-appearance: none;
|
|
13
|
+
width: 4px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&::-webkit-scrollbar-track {
|
|
17
|
+
background: ${({theme:e})=>e.colors.neutral0};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&::-webkit-scrollbar-thumb {
|
|
21
|
+
background: ${({theme:e})=>e.colors.neutral150};
|
|
22
|
+
border-radius: ${({theme:e})=>e.borderRadius};
|
|
23
|
+
margin-right: 10px;
|
|
24
|
+
}
|
|
25
|
+
`,X=({children:e,source:r,spacing:t,fullWidth:n,placement:c,centered:l,onEscapeKeyDown:d,onPointerDownOutside:f,onDismiss:a,...p})=>i.jsx(U.Portal,{children:i.jsx(E,{source:r,spacing:t,fullWidth:n,placement:c,centered:l,onEscapeKeyDown:d,onPointerDownOutside:f,onDismiss:a,children:i.jsx(y,{...p,children:e})})});exports.Content=E;exports.POPOVER_PLACEMENTS=G;exports.Popover=X;exports.Scrolling=y;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsx as r, jsxs as I } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { useFloating as W, offset as A, shift as K, flip as j, autoUpdate as M } from "@floating-ui/react-dom";
|
|
4
|
+
import { FocusScope as T } from "@radix-ui/react-focus-scope";
|
|
5
|
+
import { useCallbackRef as U, composeEventHandlers as v } from "@strapi/ui-primitives";
|
|
6
|
+
import { hideOthers as B } from "aria-hidden";
|
|
7
|
+
import { RemoveScroll as H } from "react-remove-scroll";
|
|
8
|
+
import k from "styled-components";
|
|
9
|
+
import { DismissibleLayer as N } from "../DismissibleLayer/index.js";
|
|
10
|
+
import { stripReactIdOfColon as x } from "../helpers/strings.js";
|
|
11
|
+
import { useComposedRefs as V } from "../hooks/useComposeRefs.js";
|
|
12
|
+
import { useId as Z } from "../hooks/useId.js";
|
|
13
|
+
import { useIntersection as _ } from "../hooks/useIntersection.js";
|
|
14
|
+
import { Box as h } from "../Box/Box.js";
|
|
15
|
+
import { Portal as q } from "../Portal/Portal.js";
|
|
16
|
+
const me = [
|
|
17
|
+
"top",
|
|
18
|
+
"top-start",
|
|
19
|
+
"top-end",
|
|
20
|
+
"right",
|
|
21
|
+
"right-start",
|
|
22
|
+
"right-end",
|
|
23
|
+
"bottom",
|
|
24
|
+
"bottom-start",
|
|
25
|
+
"bottom-end",
|
|
26
|
+
"left",
|
|
27
|
+
"left-start",
|
|
28
|
+
"left-end"
|
|
29
|
+
], G = k(h)`
|
|
30
|
+
box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
|
|
31
|
+
z-index: ${({ theme: e }) => e.zIndices[0]};
|
|
32
|
+
border: 1px solid ${({ theme: e }) => e.colors.neutral150};
|
|
33
|
+
`, J = o.forwardRef(({ source: e, children: s, spacing: n = 0, fullWidth: i = !1, placement: l = "bottom-start", centered: a = !1, onEscapeKeyDown: d, onPointerDownOutside: f, onDismiss: c, onFocusOutside: u, ...E }, R) => {
|
|
34
|
+
const [m, y] = o.useState(null), [P, C] = o.useState(void 0), b = o.useRef(!1), { x: D, y: L, reference: w, floating: S, strategy: O } = W({
|
|
35
|
+
strategy: "fixed",
|
|
36
|
+
placement: a ? "bottom" : l,
|
|
37
|
+
middleware: [
|
|
38
|
+
A({
|
|
39
|
+
mainAxis: n
|
|
40
|
+
}),
|
|
41
|
+
K(),
|
|
42
|
+
j()
|
|
43
|
+
],
|
|
44
|
+
whileElementsMounted: M
|
|
45
|
+
});
|
|
46
|
+
o.useLayoutEffect(() => {
|
|
47
|
+
w(e.current);
|
|
48
|
+
}, [e, w]), o.useLayoutEffect(() => {
|
|
49
|
+
i && C(e.current.offsetWidth);
|
|
50
|
+
}, [i, e]), o.useEffect(() => {
|
|
51
|
+
if (m)
|
|
52
|
+
return B(m);
|
|
53
|
+
}, [m]);
|
|
54
|
+
const g = U(c);
|
|
55
|
+
o.useEffect(() => {
|
|
56
|
+
const t = () => {
|
|
57
|
+
g();
|
|
58
|
+
};
|
|
59
|
+
return window.addEventListener("blur", t), window.addEventListener("resize", t), () => {
|
|
60
|
+
window.removeEventListener("blur", t), window.removeEventListener("resize", t);
|
|
61
|
+
};
|
|
62
|
+
}, [g]);
|
|
63
|
+
const $ = V(R, (t) => y(t), S);
|
|
64
|
+
return r(H, { allowPinchZoom: !0, children: r(T, {
|
|
65
|
+
asChild: !0,
|
|
66
|
+
loop: !0,
|
|
67
|
+
// we make sure we're not trapping once it's been closed
|
|
68
|
+
// (closed !== unmounted when animating out)
|
|
69
|
+
trapped: !0,
|
|
70
|
+
onUnmountAutoFocus: (t) => {
|
|
71
|
+
t.preventDefault(), b.current || e.current?.focus({ preventScroll: !0 });
|
|
72
|
+
},
|
|
73
|
+
children: r(N, {
|
|
74
|
+
asChild: !0,
|
|
75
|
+
onEscapeKeyDown: d,
|
|
76
|
+
onPointerDownOutside: v(f, (t) => {
|
|
77
|
+
const p = t.detail.originalEvent, F = p.button === 0 && p.ctrlKey === !0, z = p.button === 2 || F;
|
|
78
|
+
b.current = z;
|
|
79
|
+
}, { checkForDefaultPrevented: !1 }),
|
|
80
|
+
// When focus is trapped, a `focusout` event may still happen.
|
|
81
|
+
// We make sure we don't trigger our `onDismiss` in such case.
|
|
82
|
+
onFocusOutside: v(u, (t) => t.preventDefault(), {
|
|
83
|
+
checkForDefaultPrevented: !1
|
|
84
|
+
}),
|
|
85
|
+
onDismiss: c,
|
|
86
|
+
children: r(G, { ref: $, style: {
|
|
87
|
+
left: D,
|
|
88
|
+
top: L,
|
|
89
|
+
position: O,
|
|
90
|
+
width: P || void 0
|
|
91
|
+
}, hasRadius: !0, background: "neutral0", padding: 1, ...E, children: s })
|
|
92
|
+
})
|
|
93
|
+
}) });
|
|
94
|
+
}), Q = ({ children: e, intersectionId: s, onReachEnd: n, ...i }) => {
|
|
95
|
+
const l = o.useRef(null), a = Z();
|
|
96
|
+
return _(l, n ?? (() => {
|
|
97
|
+
}), {
|
|
98
|
+
selectorToWatch: `#${x(a)}`,
|
|
99
|
+
skipWhen: !s || !n
|
|
100
|
+
}), I(X, { ref: l, ...i, children: [e, s && n && r(h, { id: x(a), width: "100%", height: "1px" })] });
|
|
101
|
+
}, X = k(h)`
|
|
102
|
+
// 16 is base base size, 3 is the factor to get closer to 40px and 5 is the number of elements visible in the list
|
|
103
|
+
max-height: ${3 * 5}rem;
|
|
104
|
+
overflow-y: auto;
|
|
105
|
+
overflow-x: hidden;
|
|
106
|
+
|
|
107
|
+
&::-webkit-scrollbar {
|
|
108
|
+
-webkit-appearance: none;
|
|
109
|
+
width: 4px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&::-webkit-scrollbar-track {
|
|
113
|
+
background: ${({ theme: e }) => e.colors.neutral0};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&::-webkit-scrollbar-thumb {
|
|
117
|
+
background: ${({ theme: e }) => e.colors.neutral150};
|
|
118
|
+
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
119
|
+
margin-right: 10px;
|
|
120
|
+
}
|
|
121
|
+
`, pe = ({ children: e, source: s, spacing: n, fullWidth: i, placement: l, centered: a, onEscapeKeyDown: d, onPointerDownOutside: f, onDismiss: c, ...u }) => r(q, { children: r(J, { source: s, spacing: n, fullWidth: i, placement: l, centered: a, onEscapeKeyDown: d, onPointerDownOutside: f, onDismiss: c, children: r(Q, { ...u, children: e }) }) });
|
|
122
|
+
export {
|
|
123
|
+
J as Content,
|
|
124
|
+
me as POPOVER_PLACEMENTS,
|
|
125
|
+
pe as Popover,
|
|
126
|
+
Q as Scrolling
|
|
127
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Popover.cjs"),o=require("./primitives.cjs");exports.POPOVER_PLACEMENTS=e.POPOVER_PLACEMENTS;exports.Popover=e.Popover;exports.PopoverPrimitives=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Popover.cjs");exports.Content=e.Content;exports.Scrolling=e.Scrolling;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),a=require("react"),u=require("react-dom"),l=require("../Box/Box.cjs");function s(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=s(a),n=i.forwardRef(({container:e=globalThis?.document?.body,...r},t)=>e?u.createPortal(c.jsx(l.Box,{ref:t,...r}),e):null);n.displayName="Portal";exports.Portal=n;
|