@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,39 @@
|
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
import { inputFocusStyle as t } from "../themes/utils.js";
|
|
3
|
+
import { Flex as c } from "../Flex/Flex.js";
|
|
4
|
+
const l = o(c)`
|
|
5
|
+
line-height: ${({ theme: e }) => e.lineHeights[2]};
|
|
6
|
+
|
|
7
|
+
.cm-editor {
|
|
8
|
+
/**
|
|
9
|
+
* Hard coded since the color is the same between themes,
|
|
10
|
+
* theme.colors.neutral800 changes between themes
|
|
11
|
+
*/
|
|
12
|
+
background-color: #32324d;
|
|
13
|
+
width: 100%;
|
|
14
|
+
outline: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cm-scroller {
|
|
18
|
+
border: 1px solid ${({ theme: e, hasError: r }) => r ? e.colors.danger600 : e.colors.neutral200};
|
|
19
|
+
/* inputFocusStyle will receive hasError prop */
|
|
20
|
+
${t()}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cm-editor,
|
|
24
|
+
.cm-scroller {
|
|
25
|
+
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.cm-gutters,
|
|
29
|
+
.cm-activeLineGutter {
|
|
30
|
+
/**
|
|
31
|
+
* Hard coded since the color is the same between themes,
|
|
32
|
+
* theme.colors.neutral700 changes between themes
|
|
33
|
+
*/
|
|
34
|
+
background-color: #4a4a6a;
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
export {
|
|
38
|
+
l as JSONInputContainer
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./JSONInput.cjs");exports.JSONInput=t.JSONInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@codemirror/state"),r=require("@codemirror/view"),a=i.StateEffect.define(),d=i.StateEffect.define(),s=r.Decoration.mark({attributes:{style:"background-color: yellow; color: black"}}),n=i.StateField.define({create(){return r.Decoration.none},update(e,o){return e=e.map(o.changes),o.effects.forEach(t=>{t.is(a)?e=e.update({add:t.value,sort:!0}):t.is(d)&&(e=e.update({filter:t.value}))}),e},provide:e=>r.EditorView.decorations.from(e)});exports.addMarks=a;exports.filterMarks=d;exports.lineHighlightMark=s;exports.markField=n;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StateEffect as o, StateField as d } from "@codemirror/state";
|
|
2
|
+
import { Decoration as i, EditorView as a } from "@codemirror/view";
|
|
3
|
+
const n = o.define(), s = o.define(), l = i.mark({
|
|
4
|
+
attributes: { style: "background-color: yellow; color: black" }
|
|
5
|
+
}), m = d.define({
|
|
6
|
+
// Start with an empty set of decorations
|
|
7
|
+
create() {
|
|
8
|
+
return i.none;
|
|
9
|
+
},
|
|
10
|
+
// This is called whenever the editor updates it computes the new set
|
|
11
|
+
update(r, t) {
|
|
12
|
+
return r = r.map(t.changes), t.effects.forEach((e) => {
|
|
13
|
+
e.is(n) ? r = r.update({
|
|
14
|
+
add: e.value,
|
|
15
|
+
sort: !0
|
|
16
|
+
}) : e.is(s) && (r = r.update({ filter: e.value }));
|
|
17
|
+
}), r;
|
|
18
|
+
},
|
|
19
|
+
// Indicate that this field provides a set of decorations
|
|
20
|
+
provide: (r) => a.decorations.from(r)
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
n as addMarks,
|
|
24
|
+
s as filterMarks,
|
|
25
|
+
l as lineHighlightMark,
|
|
26
|
+
m as markField
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),s=require("../helpers/keyboardKeys.cjs"),m=require("../Box/Box.cjs"),b=({tagName:r,attributeName:d="",...f})=>{const c=()=>{const e=document.activeElement;return e?r?e.tagName.toLowerCase()===r:e.hasAttribute(d):!1},l=e=>r?e.querySelectorAll(r):e.querySelectorAll(`[${d}]`),i=e=>{switch(e.key){case s.KeyboardKeys.RIGHT:case s.KeyboardKeys.DOWN:{if(c()){e.preventDefault();const n=document.activeElement,t=[...l(e.currentTarget)],o=t.findIndex(a=>a===n),u=o+1<t.length?o+1:0;t[u].focus()}break}case s.KeyboardKeys.LEFT:case s.KeyboardKeys.UP:{if(c()){e.preventDefault();const n=document.activeElement,t=[...l(e.currentTarget)],o=t.findIndex(a=>a===n),u=o-1>-1?o-1:t.length-1;t[u].focus()}break}case s.KeyboardKeys.HOME:{c()&&(e.preventDefault(),l(e.currentTarget).item(0).focus());break}case s.KeyboardKeys.END:{if(c()){e.preventDefault();const n=l(e.currentTarget);n.item(n.length-1).focus()}break}}};return y.jsx(m.Box,{onKeyDown:i,...f})};exports.KeyboardNavigable=b;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { KeyboardKeys as o } from "../helpers/keyboardKeys.js";
|
|
3
|
+
import { Box as i } from "../Box/Box.js";
|
|
4
|
+
const v = ({ tagName: s, attributeName: a = "", ...d }) => {
|
|
5
|
+
const r = () => {
|
|
6
|
+
const e = document.activeElement;
|
|
7
|
+
return e ? s ? e.tagName.toLowerCase() === s : e.hasAttribute(a) : !1;
|
|
8
|
+
}, l = (e) => s ? e.querySelectorAll(s) : e.querySelectorAll(`[${a}]`);
|
|
9
|
+
return m(i, { onKeyDown: (e) => {
|
|
10
|
+
switch (e.key) {
|
|
11
|
+
case o.RIGHT:
|
|
12
|
+
case o.DOWN: {
|
|
13
|
+
if (r()) {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
const n = document.activeElement, t = [...l(e.currentTarget)], c = t.findIndex((f) => f === n), u = c + 1 < t.length ? c + 1 : 0;
|
|
16
|
+
t[u].focus();
|
|
17
|
+
}
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
case o.LEFT:
|
|
21
|
+
case o.UP: {
|
|
22
|
+
if (r()) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
const n = document.activeElement, t = [...l(e.currentTarget)], c = t.findIndex((f) => f === n), u = c - 1 > -1 ? c - 1 : t.length - 1;
|
|
25
|
+
t[u].focus();
|
|
26
|
+
}
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
case o.HOME: {
|
|
30
|
+
r() && (e.preventDefault(), l(e.currentTarget).item(0).focus());
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
case o.END: {
|
|
34
|
+
if (r()) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
const n = l(e.currentTarget);
|
|
37
|
+
n.item(n.length - 1).focus();
|
|
38
|
+
}
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}, ...d });
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
v as KeyboardNavigable
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./KeyboardNavigable.cjs");exports.KeyboardNavigable=e.KeyboardNavigable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const a=require("prop-types"),c=require("styled-components"),l=require("../Flex/Flex.cjs"),r=require("../Box/Box.cjs"),i=e=>e&&e.__esModule?e:{default:e},s=i(a),d=i(c),u=d.default(l.Flex)`
|
|
2
|
+
& > * + * {
|
|
3
|
+
margin-left: ${({theme:e})=>e.spaces[2]};
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
margin-left: ${({pullRight:e})=>e?"auto":void 0};
|
|
7
|
+
`,p=d.default(u)`
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
`,n=({startActions:e,endActions:o})=>e||o?t.jsx(r.Box,{paddingLeft:10,paddingRight:10,children:t.jsx(r.Box,{paddingBottom:4,children:t.jsxs(l.Flex,{justifyContent:"space-between",alignItems:"flex-start",children:[e&&t.jsx(u,{wrap:"wrap",children:e}),o&&t.jsx(p,{pullRight:!0,children:o})]})})}):null;n.defaultProps={endActions:void 0,startActions:void 0};n.propTypes={endActions:s.default.node,startActions:s.default.node};exports.ActionLayout=n;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import e from "prop-types";
|
|
4
|
+
import n from "styled-components";
|
|
5
|
+
import { Flex as p } from "../Flex/Flex.js";
|
|
6
|
+
import { Box as i } from "../Box/Box.js";
|
|
7
|
+
const d = n(p)`
|
|
8
|
+
& > * + * {
|
|
9
|
+
margin-left: ${({ theme: t }) => t.spaces[2]};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
margin-left: ${({ pullRight: t }) => t ? "auto" : void 0};
|
|
13
|
+
`, a = n(d)`
|
|
14
|
+
flex-shrink: 0;
|
|
15
|
+
`, l = ({ startActions: t, endActions: r }) => t || r ? /* @__PURE__ */ o(i, { paddingLeft: 10, paddingRight: 10, children: /* @__PURE__ */ o(i, { paddingBottom: 4, children: /* @__PURE__ */ s(p, { justifyContent: "space-between", alignItems: "flex-start", children: [
|
|
16
|
+
t && /* @__PURE__ */ o(d, { wrap: "wrap", children: t }),
|
|
17
|
+
r && /* @__PURE__ */ o(a, { pullRight: !0, children: r })
|
|
18
|
+
] }) }) }) : null;
|
|
19
|
+
l.defaultProps = {
|
|
20
|
+
endActions: void 0,
|
|
21
|
+
startActions: void 0
|
|
22
|
+
};
|
|
23
|
+
l.propTypes = {
|
|
24
|
+
endActions: e.node,
|
|
25
|
+
startActions: e.node
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
l as ActionLayout
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime");require("react");const r=require("prop-types"),n=require("../Box/Box.cjs"),u=e=>e&&e.__esModule?e:{default:e},i=u(r),t=({children:e})=>o.jsx(n.Box,{paddingLeft:10,paddingRight:10,children:e});t.propTypes={children:i.default.node.isRequired};exports.ContentLayout=t;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import p from "prop-types";
|
|
4
|
+
import { Box as t } from "../Box/Box.js";
|
|
5
|
+
const e = ({ children: o }) => /* @__PURE__ */ r(t, { paddingLeft: 10, paddingRight: 10, children: o });
|
|
6
|
+
e.propTypes = {
|
|
7
|
+
children: p.node.isRequired
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
e as ContentLayout
|
|
11
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("prop-types"),o=require("styled-components"),t=e=>e&&e.__esModule?e:{default:e},s=t(d),i=t(o),r=i.default.div`
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
4
|
+
grid-gap: ${({theme:e})=>e.spaces[4]};
|
|
5
|
+
`;r.propTypes={children:s.default.node.isRequired};exports.GridLayout=r;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import p from "prop-types";
|
|
2
|
+
import e from "styled-components";
|
|
3
|
+
const i = e.div`
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
6
|
+
grid-gap: ${({ theme: r }) => r.spaces[4]};
|
|
7
|
+
`;
|
|
8
|
+
i.propTypes = {
|
|
9
|
+
children: p.node.isRequired
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
i as GridLayout
|
|
13
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("react"),v=require("prop-types"),B=require("styled-components"),R=require("../hooks/useElementOnScreen.cjs"),b=require("../hooks/useResizeObserver.cjs"),r=require("../Box/Box.cjs"),l=require("../Flex/Flex.cjs"),u=require("../Typography/Typography.cjs"),f=e=>e&&e.__esModule?e:{default:e},m=f(c),i=f(v),T=f(B),L=()=>{const e=c.useRef(null),[a,n]=c.useState(null),[d,o]=R.useElementOnScreen({root:null,rootMargin:"0px",threshold:0});return b.useResizeObserver(d,()=>{d.current&&n(d.current.getBoundingClientRect())}),c.useEffect(()=>{e.current&&n(e.current.getBoundingClientRect())},[e]),{containerRef:d,isVisible:o,baseHeaderLayoutRef:e,headerSize:a}},p=e=>{const{containerRef:a,isVisible:n,baseHeaderLayoutRef:d,headerSize:o}=L();return t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{height:o?.height},ref:a,children:n&&t.jsx(s,{ref:d,...e})}),!n&&t.jsx(s,{...e,sticky:!0,width:o?.width})]})};p.displayName="HeaderLayout";const S=T.default(r.Box)`
|
|
2
|
+
width: ${e=>e.width}px;
|
|
3
|
+
z-index: ${({theme:e})=>e.zIndices[1]};
|
|
4
|
+
`,s=m.default.forwardRef(({navigationAction:e,primaryAction:a,secondaryAction:n,subtitle:d,title:o,sticky:y,width:g,...h},j)=>{const x=typeof d=="string";return y?t.jsx(S,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:g,"data-strapi-header-sticky":!0,children:t.jsxs(l.Flex,{justifyContent:"space-between",children:[t.jsxs(l.Flex,{children:[e&&t.jsx(r.Box,{paddingRight:3,children:e}),t.jsxs(r.Box,{children:[t.jsx(u.Typography,{variant:"beta",as:"h1",...h,children:o}),x?t.jsx(u.Typography,{variant:"pi",textColor:"neutral600",children:d}):d]}),n?t.jsx(r.Box,{paddingLeft:4,children:n}):null]}),t.jsx(l.Flex,{children:a?t.jsx(r.Box,{paddingLeft:2,children:a}):void 0})]})}):t.jsxs(r.Box,{ref:j,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:e?6:8,background:"neutral100","data-strapi-header":!0,children:[e?t.jsx(r.Box,{paddingBottom:2,children:e}):null,t.jsxs(l.Flex,{justifyContent:"space-between",children:[t.jsxs(l.Flex,{minWidth:0,children:[t.jsx(u.Typography,{as:"h1",variant:"alpha",...h,children:o}),n?t.jsx(r.Box,{paddingLeft:4,children:n}):null]}),a]}),x?t.jsx(u.Typography,{variant:"epsilon",textColor:"neutral600",as:"p",children:d}):d]})});s.displayName="BaseHeaderLayout";s.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0,sticky:!1,width:void 0};s.propTypes={navigationAction:i.default.node,primaryAction:i.default.node,secondaryAction:i.default.node,sticky:i.default.bool,subtitle:i.default.oneOfType([i.default.string,i.default.node]),title:i.default.string.isRequired,width:i.default.number};p.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0};p.propTypes={navigationAction:i.default.node,primaryAction:i.default.node,secondaryAction:i.default.node,subtitle:i.default.oneOfType([i.default.string,i.default.node]),title:i.default.string.isRequired};exports.BaseHeaderLayout=s;exports.HeaderLayout=p;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsx as i, jsxs as s, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import R, { useRef as b, useState as x, useEffect as w } from "react";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import L from "styled-components";
|
|
5
|
+
import { useElementOnScreen as S } from "../hooks/useElementOnScreen.js";
|
|
6
|
+
import { useResizeObserver as B } from "../hooks/useResizeObserver.js";
|
|
7
|
+
import { Box as d } from "../Box/Box.js";
|
|
8
|
+
import { Flex as l } from "../Flex/Flex.js";
|
|
9
|
+
import { Typography as p } from "../Typography/Typography.js";
|
|
10
|
+
const H = () => {
|
|
11
|
+
const e = b(null), [o, n] = x(null), [r, a] = S({
|
|
12
|
+
root: null,
|
|
13
|
+
rootMargin: "0px",
|
|
14
|
+
threshold: 0
|
|
15
|
+
});
|
|
16
|
+
return B(r, () => {
|
|
17
|
+
r.current && n(r.current.getBoundingClientRect());
|
|
18
|
+
}), w(() => {
|
|
19
|
+
e.current && n(e.current.getBoundingClientRect());
|
|
20
|
+
}, [e]), {
|
|
21
|
+
containerRef: r,
|
|
22
|
+
isVisible: a,
|
|
23
|
+
baseHeaderLayoutRef: e,
|
|
24
|
+
headerSize: o
|
|
25
|
+
};
|
|
26
|
+
}, h = (e) => {
|
|
27
|
+
const { containerRef: o, isVisible: n, baseHeaderLayoutRef: r, headerSize: a } = H();
|
|
28
|
+
return /* @__PURE__ */ s(v, { children: [
|
|
29
|
+
/* @__PURE__ */ i("div", { style: { height: a?.height }, ref: o, children: n && /* @__PURE__ */ i(c, { ref: r, ...e }) }),
|
|
30
|
+
!n && /* @__PURE__ */ i(c, { ...e, sticky: !0, width: a?.width })
|
|
31
|
+
] });
|
|
32
|
+
};
|
|
33
|
+
h.displayName = "HeaderLayout";
|
|
34
|
+
const T = L(d)`
|
|
35
|
+
width: ${(e) => e.width}px;
|
|
36
|
+
z-index: ${({ theme: e }) => e.zIndices[1]};
|
|
37
|
+
`, c = R.forwardRef(
|
|
38
|
+
({ navigationAction: e, primaryAction: o, secondaryAction: n, subtitle: r, title: a, sticky: g, width: m, ...u }, y) => {
|
|
39
|
+
const f = typeof r == "string";
|
|
40
|
+
return g ? /* @__PURE__ */ i(
|
|
41
|
+
T,
|
|
42
|
+
{
|
|
43
|
+
paddingLeft: 6,
|
|
44
|
+
paddingRight: 6,
|
|
45
|
+
paddingTop: 3,
|
|
46
|
+
paddingBottom: 3,
|
|
47
|
+
position: "fixed",
|
|
48
|
+
top: 0,
|
|
49
|
+
right: 0,
|
|
50
|
+
background: "neutral0",
|
|
51
|
+
shadow: "tableShadow",
|
|
52
|
+
width: m,
|
|
53
|
+
"data-strapi-header-sticky": !0,
|
|
54
|
+
children: /* @__PURE__ */ s(l, { justifyContent: "space-between", children: [
|
|
55
|
+
/* @__PURE__ */ s(l, { children: [
|
|
56
|
+
e && /* @__PURE__ */ i(d, { paddingRight: 3, children: e }),
|
|
57
|
+
/* @__PURE__ */ s(d, { children: [
|
|
58
|
+
/* @__PURE__ */ i(p, { variant: "beta", as: "h1", ...u, children: a }),
|
|
59
|
+
f ? /* @__PURE__ */ i(p, { variant: "pi", textColor: "neutral600", children: r }) : r
|
|
60
|
+
] }),
|
|
61
|
+
n ? /* @__PURE__ */ i(d, { paddingLeft: 4, children: n }) : null
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ i(l, { children: o ? /* @__PURE__ */ i(d, { paddingLeft: 2, children: o }) : void 0 })
|
|
64
|
+
] })
|
|
65
|
+
}
|
|
66
|
+
) : /* @__PURE__ */ s(
|
|
67
|
+
d,
|
|
68
|
+
{
|
|
69
|
+
ref: y,
|
|
70
|
+
paddingLeft: 10,
|
|
71
|
+
paddingRight: 10,
|
|
72
|
+
paddingBottom: 8,
|
|
73
|
+
paddingTop: e ? 6 : 8,
|
|
74
|
+
background: "neutral100",
|
|
75
|
+
"data-strapi-header": !0,
|
|
76
|
+
children: [
|
|
77
|
+
e ? /* @__PURE__ */ i(d, { paddingBottom: 2, children: e }) : null,
|
|
78
|
+
/* @__PURE__ */ s(l, { justifyContent: "space-between", children: [
|
|
79
|
+
/* @__PURE__ */ s(l, { minWidth: 0, children: [
|
|
80
|
+
/* @__PURE__ */ i(p, { as: "h1", variant: "alpha", ...u, children: a }),
|
|
81
|
+
n ? /* @__PURE__ */ i(d, { paddingLeft: 4, children: n }) : null
|
|
82
|
+
] }),
|
|
83
|
+
o
|
|
84
|
+
] }),
|
|
85
|
+
f ? /* @__PURE__ */ i(p, { variant: "epsilon", textColor: "neutral600", as: "p", children: r }) : r
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
c.displayName = "BaseHeaderLayout";
|
|
92
|
+
c.defaultProps = {
|
|
93
|
+
navigationAction: void 0,
|
|
94
|
+
primaryAction: void 0,
|
|
95
|
+
secondaryAction: void 0,
|
|
96
|
+
subtitle: void 0,
|
|
97
|
+
sticky: !1,
|
|
98
|
+
width: void 0
|
|
99
|
+
};
|
|
100
|
+
c.propTypes = {
|
|
101
|
+
navigationAction: t.node,
|
|
102
|
+
primaryAction: t.node,
|
|
103
|
+
secondaryAction: t.node,
|
|
104
|
+
sticky: t.bool,
|
|
105
|
+
// TODO V2: Remove the string fallback
|
|
106
|
+
subtitle: t.oneOfType([t.string, t.node]),
|
|
107
|
+
title: t.string.isRequired,
|
|
108
|
+
width: t.number
|
|
109
|
+
};
|
|
110
|
+
h.defaultProps = {
|
|
111
|
+
navigationAction: void 0,
|
|
112
|
+
primaryAction: void 0,
|
|
113
|
+
secondaryAction: void 0,
|
|
114
|
+
subtitle: void 0
|
|
115
|
+
};
|
|
116
|
+
h.propTypes = {
|
|
117
|
+
navigationAction: t.node,
|
|
118
|
+
primaryAction: t.node,
|
|
119
|
+
secondaryAction: t.node,
|
|
120
|
+
// TODO V2: Remove the string fallback
|
|
121
|
+
subtitle: t.oneOfType([t.string, t.node]),
|
|
122
|
+
title: t.string.isRequired
|
|
123
|
+
};
|
|
124
|
+
export {
|
|
125
|
+
c as BaseHeaderLayout,
|
|
126
|
+
h as HeaderLayout
|
|
127
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime");require("react");const u=require("prop-types"),l=require("styled-components"),d=require("../Box/Box.cjs"),s=e=>e&&e.__esModule?e:{default:e},r=s(u),n=s(l),a=n.default(d.Box)`
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: ${({hasSideNav:e})=>e?"auto 1fr":"1fr"};
|
|
4
|
+
`,c=n.default(d.Box)`
|
|
5
|
+
overflow-x: hidden;
|
|
6
|
+
`,t=({sideNav:e,children:i})=>o.jsxs(a,{hasSideNav:!!e,children:[e,o.jsx(c,{paddingBottom:10,children:i})]});t.defaultProps={sideNav:void 0};t.propTypes={children:r.default.node.isRequired,sideNav:r.default.node};exports.Layout=t;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as n, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import r from "prop-types";
|
|
4
|
+
import e from "styled-components";
|
|
5
|
+
import { Box as i } from "../Box/Box.js";
|
|
6
|
+
const s = e(i)`
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-columns: ${({ hasSideNav: o }) => o ? "auto 1fr" : "1fr"};
|
|
9
|
+
`, m = e(i)`
|
|
10
|
+
overflow-x: hidden;
|
|
11
|
+
`, t = ({ sideNav: o, children: d }) => /* @__PURE__ */ n(s, { hasSideNav: !!o, children: [
|
|
12
|
+
o,
|
|
13
|
+
/* @__PURE__ */ p(m, { paddingBottom: 10, children: d })
|
|
14
|
+
] });
|
|
15
|
+
t.defaultProps = {
|
|
16
|
+
sideNav: void 0
|
|
17
|
+
};
|
|
18
|
+
t.propTypes = {
|
|
19
|
+
children: r.node.isRequired,
|
|
20
|
+
sideNav: r.node
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
t as Layout
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("react");const i=require("prop-types"),a=require("../Grid/Grid.cjs"),o=require("../Grid/GridItem.cjs"),t=require("../Box/Box.cjs"),n=e=>e&&e.__esModule?e:{default:e},s=n(i),d=({startCol:e,endCol:u})=>r.jsxs(a.Grid,{gap:4,children:[r.jsx(o.GridItem,{col:9,s:12,children:r.jsx(t.Box,{hasRadius:!0,background:"neutral0",shadow:"tableShadow",children:e})}),r.jsx(o.GridItem,{col:3,s:12,children:r.jsx(t.Box,{hasRadius:!0,background:"neutral0",shadow:"tableShadow",children:u})})]});d.propTypes={endCol:s.default.node.isRequired,startCol:s.default.node.isRequired};exports.TwoColsLayout=d;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import o from "prop-types";
|
|
4
|
+
import { Grid as a } from "../Grid/Grid.js";
|
|
5
|
+
import { GridItem as e } from "../Grid/GridItem.js";
|
|
6
|
+
import { Box as d } from "../Box/Box.js";
|
|
7
|
+
const l = ({ startCol: i, endCol: t }) => /* @__PURE__ */ s(a, { gap: 4, children: [
|
|
8
|
+
/* @__PURE__ */ r(e, { col: 9, s: 12, children: /* @__PURE__ */ r(d, { hasRadius: !0, background: "neutral0", shadow: "tableShadow", children: i }) }),
|
|
9
|
+
/* @__PURE__ */ r(e, { col: 3, s: 12, children: /* @__PURE__ */ r(d, { hasRadius: !0, background: "neutral0", shadow: "tableShadow", children: t }) })
|
|
10
|
+
] });
|
|
11
|
+
l.propTypes = {
|
|
12
|
+
endCol: o.node.isRequired,
|
|
13
|
+
startCol: o.node.isRequired
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
l as TwoColsLayout
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Layout.cjs"),e=require("./ActionLayout.cjs"),a=require("./ContentLayout.cjs"),o=require("./HeaderLayout.cjs"),u=require("./TwoColsLayout.cjs"),r=require("./GridLayout.cjs");exports.Layout=t.Layout;exports.ActionLayout=e.ActionLayout;exports.ContentLayout=a.ContentLayout;exports.BaseHeaderLayout=o.BaseHeaderLayout;exports.HeaderLayout=o.HeaderLayout;exports.TwoColsLayout=u.TwoColsLayout;exports.GridLayout=r.GridLayout;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Layout as r } from "./Layout.js";
|
|
2
|
+
import { ActionLayout as a } from "./ActionLayout.js";
|
|
3
|
+
import { ContentLayout as y } from "./ContentLayout.js";
|
|
4
|
+
import { BaseHeaderLayout as f, HeaderLayout as m } from "./HeaderLayout.js";
|
|
5
|
+
import { TwoColsLayout as x } from "./TwoColsLayout.js";
|
|
6
|
+
import { GridLayout as n } from "./GridLayout.js";
|
|
7
|
+
export {
|
|
8
|
+
a as ActionLayout,
|
|
9
|
+
f as BaseHeaderLayout,
|
|
10
|
+
y as ContentLayout,
|
|
11
|
+
n as GridLayout,
|
|
12
|
+
m as HeaderLayout,
|
|
13
|
+
r as Layout,
|
|
14
|
+
x as TwoColsLayout
|
|
15
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),g=require("react"),y=require("@strapi/icons"),m=require("react-router-dom"),x=require("styled-components"),j=require("../themes/utils.cjs"),c=require("../Typography/Typography.cjs"),_=require("../Box/Box.cjs"),h=e=>e&&e.__esModule?e:{default:e};function b(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 q=b(g),l=h(x),v=l.default.a`
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
text-decoration: none;
|
|
5
|
+
pointer-events: ${({disabled:e})=>e?"none":void 0};
|
|
6
|
+
color: ${({disabled:e,theme:r})=>e?r.colors.neutral600:r.colors.primary600};
|
|
7
|
+
|
|
8
|
+
svg path {
|
|
9
|
+
transition: fill 150ms ease-out;
|
|
10
|
+
fill: currentColor;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
svg {
|
|
14
|
+
font-size: ${10/16}rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
${c.Typography} {
|
|
18
|
+
transition: color 150ms ease-out;
|
|
19
|
+
color: currentColor;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
color: ${({theme:e})=>e.colors.primary500};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:active {
|
|
27
|
+
color: ${({theme:e})=>e.colors.primary700};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
${j.buttonFocusStyle};
|
|
31
|
+
`,i=l.default(_.Box)`
|
|
32
|
+
display: flex;
|
|
33
|
+
`,k=q.forwardRef(({children:e,href:r,to:t,disabled:n=!1,startIcon:a,endIcon:s,...u},d)=>{const p=r?"_blank":void 0,f=r?"noreferrer noopener":void 0;return o.jsxs(v,{as:t&&!n?m.NavLink:"a",target:p,rel:f,to:n?void 0:t,href:n?"#":r,disabled:n,ref:d,...u,children:[a&&o.jsx(i,{as:"span","aria-hidden":!0,paddingRight:2,children:a}),o.jsx(c.Typography,{children:e}),s&&!r&&o.jsx(i,{as:"span","aria-hidden":!0,paddingLeft:2,children:s}),r&&o.jsx(i,{as:"span","aria-hidden":!0,paddingLeft:2,children:o.jsx(y.ExternalLink,{})})]})});exports.Link=k;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import { ExternalLink as u } from "@strapi/icons";
|
|
4
|
+
import { NavLink as g } from "react-router-dom";
|
|
5
|
+
import s from "styled-components";
|
|
6
|
+
import { buttonFocusStyle as y } from "../themes/utils.js";
|
|
7
|
+
import { Typography as p } from "../Typography/Typography.js";
|
|
8
|
+
import { Box as h } from "../Box/Box.js";
|
|
9
|
+
const x = s.a`
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
pointer-events: ${({ disabled: r }) => r ? "none" : void 0};
|
|
14
|
+
color: ${({ disabled: r, theme: o }) => r ? o.colors.neutral600 : o.colors.primary600};
|
|
15
|
+
|
|
16
|
+
svg path {
|
|
17
|
+
transition: fill 150ms ease-out;
|
|
18
|
+
fill: currentColor;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
svg {
|
|
22
|
+
font-size: ${10 / 16}rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
${p} {
|
|
26
|
+
transition: color 150ms ease-out;
|
|
27
|
+
color: currentColor;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:hover {
|
|
31
|
+
color: ${({ theme: r }) => r.colors.primary500};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:active {
|
|
35
|
+
color: ${({ theme: r }) => r.colors.primary700};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
${y};
|
|
39
|
+
`, t = s(h)`
|
|
40
|
+
display: flex;
|
|
41
|
+
`, z = f.forwardRef(({ children: r, href: o, to: i, disabled: n = !1, startIcon: a, endIcon: l, ...c }, d) => m(x, { as: i && !n ? g : "a", target: o ? "_blank" : void 0, rel: o ? "noreferrer noopener" : void 0, to: n ? void 0 : i, href: n ? "#" : o, disabled: n, ref: d, ...c, children: [a && e(t, { as: "span", "aria-hidden": !0, paddingRight: 2, children: a }), e(p, { children: r }), l && !o && e(t, { as: "span", "aria-hidden": !0, paddingLeft: 2, children: l }), o && e(t, { as: "span", "aria-hidden": !0, paddingLeft: 2, children: e(u, {}) })] }));
|
|
42
|
+
export {
|
|
43
|
+
z as Link
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Link.cjs");exports.Link=e.Link;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),S=require("react"),h=require("react-router-dom"),v=require("styled-components"),o=require("../Button/utils.cjs"),_=require("../BaseButton/BaseButton.cjs"),c=require("../Flex/Flex.cjs"),j=require("../Typography/Typography.cjs"),m=e=>e&&e.__esModule?e:{default:e};function x(e){if(e&&e.__esModule)return e;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const q=x(S),k=m(v),B=k.default(_.BaseButtonWrapper)`
|
|
2
|
+
&[aria-disabled='true'] {
|
|
3
|
+
${o.getDisabledStyle}
|
|
4
|
+
&:active {
|
|
5
|
+
${o.getDisabledStyle}
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
&:hover {
|
|
9
|
+
${o.getHoverStyle}
|
|
10
|
+
}
|
|
11
|
+
&:active {
|
|
12
|
+
${o.getActiveStyle}
|
|
13
|
+
}
|
|
14
|
+
${o.getVariantStyle}
|
|
15
|
+
`,R=q.forwardRef(({variant:e="default",startIcon:n,endIcon:r,disabled:t=!1,children:p,size:i="S",href:u,to:d,...f},g)=>{const y=u?"_blank":void 0,b=u?"noreferrer noopener":void 0,l=i==="S"?2:"10px",s=4;return a.jsxs(B,{ref:g,"aria-disabled":t,size:i,variant:e,target:y,rel:b,to:t?void 0:d,href:t?"#":u,background:"buttonPrimary600",borderColor:"buttonPrimary600",hasRadius:!0,gap:2,inline:!0,paddingBottom:l,paddingLeft:s,paddingRight:s,paddingTop:l,pointerEvents:t?"none":void 0,...f,as:d&&!t?h.NavLink:"a",children:[n&&a.jsx(c.Flex,{"aria-hidden":!0,children:n}),a.jsx(j.Typography,{variant:i==="S"?"pi":void 0,fontWeight:"bold",textColor:"buttonNeutral0",children:p}),r&&a.jsx(c.Flex,{"aria-hidden":!0,children:r})]})});exports.LinkButton=R;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs as v, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as y from "react";
|
|
3
|
+
import { NavLink as S } from "react-router-dom";
|
|
4
|
+
import b from "styled-components";
|
|
5
|
+
import { getDisabledStyle as f, getHoverStyle as x, getActiveStyle as k, getVariantStyle as $ } from "../Button/utils.js";
|
|
6
|
+
import { BaseButtonWrapper as B } from "../BaseButton/BaseButton.js";
|
|
7
|
+
import { Flex as u } from "../Flex/Flex.js";
|
|
8
|
+
import { Typography as L } from "../Typography/Typography.js";
|
|
9
|
+
const R = b(B)`
|
|
10
|
+
&[aria-disabled='true'] {
|
|
11
|
+
${f}
|
|
12
|
+
&:active {
|
|
13
|
+
${f}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
&:hover {
|
|
17
|
+
${x}
|
|
18
|
+
}
|
|
19
|
+
&:active {
|
|
20
|
+
${k}
|
|
21
|
+
}
|
|
22
|
+
${$}
|
|
23
|
+
`, A = y.forwardRef(({ variant: l = "default", startIcon: o, endIcon: i, disabled: r = !1, children: m, size: t = "S", href: e, to: a, ...g }, s) => {
|
|
24
|
+
const c = e ? "_blank" : void 0, h = e ? "noreferrer noopener" : void 0, d = t === "S" ? 2 : "10px", p = 4;
|
|
25
|
+
return v(R, { ref: s, "aria-disabled": r, size: t, variant: l, target: c, rel: h, to: r ? void 0 : a, href: r ? "#" : e, background: "buttonPrimary600", borderColor: "buttonPrimary600", hasRadius: !0, gap: 2, inline: !0, paddingBottom: d, paddingLeft: p, paddingRight: p, paddingTop: d, pointerEvents: r ? "none" : void 0, ...g, as: a && !r ? S : "a", children: [o && n(u, { "aria-hidden": !0, children: o }), n(L, { variant: t === "S" ? "pi" : void 0, fontWeight: "bold", textColor: "buttonNeutral0", children: m }), i && n(u, { "aria-hidden": !0, children: i })] });
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
A as LinkButton
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./LinkButton.cjs");exports.LinkButton=t.LinkButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./constants.cjs"),l=require("../VisuallyHidden/VisuallyHidden.cjs"),r=()=>e.jsxs(l.VisuallyHidden,{children:[e.jsx("p",{role:"log","aria-live":"polite",id:i.LiveRegionIds.Log,"aria-relevant":"all"}),e.jsx("p",{role:"status","aria-live":"polite",id:i.LiveRegionIds.Status,"aria-relevant":"all"}),e.jsx("p",{role:"alert","aria-live":"assertive",id:i.LiveRegionIds.Alert,"aria-relevant":"all"})]});exports.LiveRegions=r;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { LiveRegionIds as i } from "./constants.js";
|
|
3
|
+
import { VisuallyHidden as a } from "../VisuallyHidden/VisuallyHidden.js";
|
|
4
|
+
const s = () => r(a, { children: [e("p", { role: "log", "aria-live": "polite", id: i.Log, "aria-relevant": "all" }), e("p", { role: "status", "aria-live": "polite", id: i.Status, "aria-relevant": "all" }), e("p", { role: "alert", "aria-live": "assertive", id: i.Alert, "aria-relevant": "all" })] });
|
|
5
|
+
export {
|
|
6
|
+
s as LiveRegions
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={Log:"live-region-log",Status:"live-region-status",Alert:"live-region-alert"};exports.LiveRegionIds=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useNotifyAT.cjs"),i=require("./LiveRegions.cjs");exports.useNotifyAT=e.useNotifyAT;exports.LiveRegions=i.LiveRegions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),o=require("./constants.cjs"),n=t=>{const e=document.querySelector(`#${o.LiveRegionIds.Log}`);e&&(e.innerText=t)},r=t=>{const e=document.querySelector(`#${o.LiveRegionIds.Status}`);e&&(e.innerText=t)},s=t=>{const e=document.querySelector(`#${o.LiveRegionIds.Alert}`);e&&(e.innerText=t)},c=()=>(i.useEffect(()=>()=>{n(""),s(""),r("")},[]),{notifyLog:n,notifyAlert:s,notifyStatus:r});exports.useNotifyAT=c;
|