@strapi/design-system 0.0.0-typescript.0 → 0.0.0-typescript.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/Accordion.cjs +8 -8
- package/dist/Accordion/Accordion.d.ts +48 -0
- package/dist/Accordion/Accordion.js +73 -67
- package/dist/Accordion/AccordionContent.cjs +1 -1
- package/dist/Accordion/AccordionContent.d.ts +3 -0
- package/dist/Accordion/AccordionContent.js +44 -18
- package/dist/Accordion/AccordionContext.cjs +1 -1
- package/dist/Accordion/AccordionContext.d.ts +12 -0
- package/dist/Accordion/AccordionContext.js +10 -4
- package/dist/Accordion/AccordionGroup.cjs +20 -20
- package/dist/Accordion/AccordionGroup.d.ts +8 -0
- package/dist/Accordion/AccordionGroup.js +98 -59
- package/dist/Accordion/AccordionToggle.cjs +6 -6
- package/dist/Accordion/AccordionToggle.d.ts +22 -0
- package/dist/Accordion/AccordionToggle.js +141 -96
- package/dist/Accordion/index.d.ts +4 -0
- package/dist/Accordion/utils.cjs +1 -1
- package/dist/Accordion/utils.d.ts +7 -0
- package/dist/Accordion/utils.js +4 -4
- package/dist/Alert/Alert.cjs +12 -12
- package/dist/Alert/Alert.d.ts +33 -0
- package/dist/Alert/Alert.js +124 -88
- package/dist/Alert/index.d.ts +1 -0
- package/dist/Alert/utils.cjs +1 -1
- package/dist/Alert/utils.d.ts +10 -0
- package/dist/Alert/utils.js +3 -3
- package/dist/Avatar/Avatar.cjs +6 -6
- package/dist/Avatar/Avatar.d.ts +19 -0
- package/dist/Avatar/Avatar.js +65 -60
- package/dist/Avatar/AvatarGroup.d.ts +1 -0
- package/dist/Avatar/constants.d.ts +2 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/Badge/Badge.cjs +4 -4
- package/dist/Badge/Badge.d.ts +13 -0
- package/dist/Badge/Badge.js +65 -37
- package/dist/Badge/index.d.ts +1 -0
- package/dist/BaseButton/BaseButton.cjs +3 -3
- package/dist/BaseButton/BaseButton.d.ts +6 -0
- package/dist/BaseButton/BaseButton.js +68 -30
- package/dist/BaseButton/index.d.ts +1 -0
- package/dist/BaseCheckbox/BaseCheckbox.cjs +6 -6
- package/dist/BaseCheckbox/BaseCheckbox.d.ts +28 -0
- package/dist/BaseCheckbox/BaseCheckbox.js +102 -59
- package/dist/BaseCheckbox/index.d.ts +1 -0
- package/dist/BaseCheckbox/utils.d.ts +7 -0
- package/dist/BaseLink/BaseLink.cjs +2 -2
- package/dist/BaseLink/BaseLink.d.ts +9 -0
- package/dist/BaseLink/BaseLink.js +47 -27
- package/dist/BaseLink/index.d.ts +1 -0
- package/dist/BaseRadio/BaseRadio.cjs +9 -9
- package/dist/BaseRadio/BaseRadio.d.ts +6 -0
- package/dist/BaseRadio/BaseRadio.js +81 -39
- package/dist/BaseRadio/RadioGroup.cjs +1 -1
- package/dist/BaseRadio/RadioGroup.d.ts +12 -0
- package/dist/BaseRadio/RadioGroup.js +59 -28
- package/dist/BaseRadio/context.cjs +1 -1
- package/dist/BaseRadio/context.d.ts +9 -0
- package/dist/BaseRadio/context.js +8 -4
- package/dist/BaseRadio/index.d.ts +2 -0
- package/dist/BaseRadio/utils.cjs +1 -1
- package/dist/BaseRadio/utils.d.ts +4 -0
- package/dist/BaseRadio/utils.js +1 -1
- package/dist/Box/Box.cjs +31 -32
- package/dist/Box/Box.d.ts +97 -0
- package/dist/Box/Box.js +182 -59
- package/dist/Box/index.d.ts +1 -0
- package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +16 -0
- package/dist/Breadcrumbs/Breadcrumbs.js +75 -39
- package/dist/Breadcrumbs/index.d.ts +1 -0
- package/dist/Button/Button.cjs +15 -15
- package/dist/Button/Button.d.ts +14 -0
- package/dist/Button/Button.js +116 -76
- package/dist/Button/constants.d.ts +13 -0
- package/dist/Button/index.d.ts +1 -0
- package/dist/Button/utils.cjs +23 -23
- package/dist/Button/utils.d.ts +18 -0
- package/dist/Button/utils.js +15 -15
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.d.ts +5 -0
- package/dist/Card/Card.js +47 -27
- package/dist/Card/CardAction.cjs +4 -4
- package/dist/Card/CardAction.d.ts +8 -0
- package/dist/Card/CardAction.js +12 -6
- package/dist/Card/CardAsset.cjs +4 -4
- package/dist/Card/CardAsset.d.ts +7 -0
- package/dist/Card/CardAsset.js +56 -25
- package/dist/Card/CardBadge.cjs +3 -3
- package/dist/Card/CardBadge.d.ts +3 -0
- package/dist/Card/CardBadge.js +23 -10
- package/dist/Card/CardBody.cjs +1 -1
- package/dist/Card/CardBody.d.ts +3 -0
- package/dist/Card/CardBody.js +22 -10
- package/dist/Card/CardCheckbox.cjs +1 -1
- package/dist/Card/CardCheckbox.d.ts +3 -0
- package/dist/Card/CardCheckbox.js +26 -13
- package/dist/Card/CardContent.cjs +2 -2
- package/dist/Card/CardContent.d.ts +5 -0
- package/dist/Card/CardContent.js +35 -11
- package/dist/Card/CardContext.cjs +1 -1
- package/dist/Card/CardContext.d.ts +6 -0
- package/dist/Card/CardContext.js +3 -1
- package/dist/Card/CardHeader.cjs +2 -2
- package/dist/Card/CardHeader.d.ts +3 -0
- package/dist/Card/CardHeader.js +22 -10
- package/dist/Card/CardTimer.cjs +2 -2
- package/dist/Card/CardTimer.d.ts +5 -0
- package/dist/Card/CardTimer.js +52 -22
- package/dist/Card/CardTitle.cjs +1 -1
- package/dist/Card/CardTitle.d.ts +5 -0
- package/dist/Card/CardTitle.js +29 -16
- package/dist/Card/index.d.ts +10 -0
- package/dist/CarouselInput/Carousel.cjs +6 -6
- package/dist/CarouselInput/Carousel.d.ts +41 -0
- package/dist/CarouselInput/Carousel.js +107 -77
- package/dist/CarouselInput/CarouselActions.cjs +1 -1
- package/dist/CarouselInput/CarouselActions.d.ts +1 -0
- package/dist/CarouselInput/CarouselActions.js +17 -7
- package/dist/CarouselInput/CarouselImage.cjs +3 -3
- package/dist/CarouselInput/CarouselImage.d.ts +14 -0
- package/dist/CarouselInput/CarouselImage.js +38 -26
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.d.ts +52 -0
- package/dist/CarouselInput/CarouselInput.js +83 -49
- package/dist/CarouselInput/CarouselSlide.cjs +2 -2
- package/dist/CarouselInput/CarouselSlide.d.ts +18 -0
- package/dist/CarouselInput/CarouselSlide.js +42 -20
- package/dist/CarouselInput/index.d.ts +5 -0
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.d.ts +28 -0
- package/dist/Checkbox/Checkbox.js +63 -44
- package/dist/Checkbox/index.d.ts +1 -0
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.d.ts +99 -0
- package/dist/Combobox/Combobox.js +247 -197
- package/dist/Combobox/ComboboxList.d.ts +13 -0
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/ComboboxOption.d.ts +2 -0
- package/dist/Combobox/ComboboxOption.js +47 -25
- package/dist/Combobox/components.d.ts +8 -0
- package/dist/Combobox/index.d.ts +2 -0
- package/dist/Combobox/utils.cjs +1 -1
- package/dist/Combobox/utils.d.ts +35 -0
- package/dist/Combobox/utils.js +21 -21
- package/dist/DatePicker/DatePicker.cjs +1 -1
- package/dist/DatePicker/DatePicker.d.ts +56 -0
- package/dist/DatePicker/DatePicker.js +109 -86
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
- package/dist/DatePicker/DatePickerCalendar.d.ts +35 -0
- package/dist/DatePicker/DatePickerCalendar.js +1 -1
- package/dist/DatePicker/DatePickerTd.cjs +4 -4
- package/dist/DatePicker/DatePickerTd.d.ts +22 -0
- package/dist/DatePicker/DatePickerTd.js +42 -23
- package/dist/DatePicker/DatePickerTh.cjs +3 -3
- package/dist/DatePicker/DatePickerTh.d.ts +10 -0
- package/dist/DatePicker/DatePickerTh.js +44 -23
- package/dist/DatePicker/compareDates.d.ts +1 -0
- package/dist/DatePicker/components.d.ts +26 -0
- package/dist/DatePicker/index.d.ts +1 -0
- package/dist/DatePicker/utils/formatDate.d.ts +1 -0
- package/dist/DatePicker/utils/generateWeeks.d.ts +1 -0
- package/dist/DatePicker/utils/getDayOfWeek.d.ts +9 -0
- package/dist/DatePicker/utils/getMonths.d.ts +1 -0
- package/dist/DatePicker/utils/getYears.cjs +1 -1
- package/dist/DatePicker/utils/getYears.d.ts +1 -0
- package/dist/DatePicker/utils/getYears.js +7 -6
- package/dist/DatePicker/utils/index.d.ts +5 -0
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.d.ts +24 -0
- package/dist/DateTimePicker/DateTimePicker.js +124 -91
- package/dist/DateTimePicker/DateTimePickerProps.cjs +1 -1
- package/dist/DateTimePicker/DateTimePickerProps.d.ts +51 -0
- package/dist/DateTimePicker/DateTimePickerProps.js +19 -10
- package/dist/DateTimePicker/__tests__/parseDate.test.d.ts +1 -0
- package/dist/DateTimePicker/index.d.ts +1 -0
- package/dist/DateTimePicker/parseDate.d.ts +1 -0
- package/dist/Dialog/Dialog.cjs +5 -5
- package/dist/Dialog/Dialog.d.ts +25 -0
- package/dist/Dialog/Dialog.js +58 -39
- package/dist/Dialog/DialogBody.d.ts +16 -0
- package/dist/Dialog/DialogFooter.d.ts +18 -0
- package/dist/Dialog/index.d.ts +3 -0
- package/dist/DismissibleLayer/DismissibleLayer.d.ts +19 -0
- package/dist/DismissibleLayer/index.d.ts +1 -0
- package/dist/Divider/Divider.cjs +2 -2
- package/dist/Divider/Divider.d.ts +17 -0
- package/dist/Divider/Divider.js +38 -15
- package/dist/Divider/index.d.ts +1 -0
- package/dist/EmptyStateLayout/EmptyStateLayout.d.ts +25 -0
- package/dist/EmptyStateLayout/index.d.ts +1 -0
- package/dist/EmptyStateLayout/story-assets/Illo.d.ts +1 -0
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.d.ts +28 -0
- package/dist/Field/Field.js +39 -22
- package/dist/Field/FieldAction.cjs +2 -2
- package/dist/Field/FieldAction.d.ts +12 -0
- package/dist/Field/FieldAction.js +35 -13
- package/dist/Field/FieldContext.d.ts +12 -0
- package/dist/Field/FieldError.d.ts +1 -0
- package/dist/Field/FieldHint.d.ts +1 -0
- package/dist/Field/FieldInput.cjs +6 -6
- package/dist/Field/FieldInput.d.ts +6 -0
- package/dist/Field/FieldInput.js +66 -47
- package/dist/Field/FieldLabel.cjs +3 -3
- package/dist/Field/FieldLabel.d.ts +20 -0
- package/dist/Field/FieldLabel.js +46 -27
- package/dist/Field/index.d.ts +7 -0
- package/dist/Flex/Flex.cjs +5 -5
- package/dist/Flex/Flex.d.ts +14 -0
- package/dist/Flex/Flex.js +29 -17
- package/dist/Flex/index.d.ts +1 -0
- package/dist/FocusTrap/ExampleComponent.d.ts +1 -0
- package/dist/FocusTrap/FocusTrap.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.d.ts +18 -0
- package/dist/FocusTrap/FocusTrap.js +52 -32
- package/dist/FocusTrap/index.d.ts +1 -0
- package/dist/Grid/Grid.cjs +3 -3
- package/dist/Grid/Grid.d.ts +18 -0
- package/dist/Grid/Grid.js +42 -20
- package/dist/Grid/GridContext.d.ts +8 -0
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.d.ts +22 -0
- package/dist/Grid/GridItem.js +41 -22
- package/dist/Grid/index.d.ts +2 -0
- package/dist/Icon/Icon.cjs +3 -3
- package/dist/Icon/Icon.d.ts +7 -0
- package/dist/Icon/Icon.js +50 -22
- package/dist/Icon/index.d.ts +1 -0
- package/dist/IconButton/IconButton.cjs +4 -4
- package/dist/IconButton/IconButton.d.ts +3 -0
- package/dist/IconButton/IconButton.js +64 -44
- package/dist/IconButton/index.d.ts +1 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -1
- package/dist/KeyboardNavigable/KeyboardNavigable.d.ts +6 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.js +67 -50
- package/dist/KeyboardNavigable/index.d.ts +1 -0
- package/dist/Layout/ActionLayout.d.ts +17 -0
- package/dist/Layout/ContentLayout.d.ts +9 -0
- package/dist/Layout/GridLayout.d.ts +1 -0
- package/dist/Layout/HeaderLayout.cjs +2 -2
- package/dist/Layout/HeaderLayout.d.ts +24 -0
- package/dist/Layout/HeaderLayout.js +96 -78
- package/dist/Layout/Layout.d.ts +15 -0
- package/dist/Layout/TwoColsLayout.d.ts +11 -0
- package/dist/Layout/index.d.ts +6 -0
- package/dist/Link/Link.cjs +6 -6
- package/dist/Link/Link.d.ts +31 -0
- package/dist/Link/Link.js +55 -36
- package/dist/Link/index.d.ts +1 -0
- package/dist/LinkButton/LinkButton.cjs +10 -10
- package/dist/LinkButton/LinkButton.d.ts +2 -0
- package/dist/LinkButton/LinkButton.js +69 -47
- package/dist/LinkButton/index.d.ts +1 -0
- package/dist/LiveRegions/LiveRegions.cjs +1 -1
- package/dist/LiveRegions/LiveRegions.d.ts +1 -0
- package/dist/LiveRegions/LiveRegions.js +22 -20
- package/dist/LiveRegions/StoryComponent.cjs +1 -1
- package/dist/LiveRegions/StoryComponent.d.ts +3 -0
- package/dist/LiveRegions/StoryComponent.js +18 -15
- package/dist/LiveRegions/constants.d.ts +5 -0
- package/dist/LiveRegions/index.d.ts +1 -0
- package/dist/LiveRegions/useNotifyAT.d.ts +5 -0
- package/dist/Loader/Loader.cjs +4 -4
- package/dist/Loader/Loader.d.ts +2 -0
- package/dist/Loader/Loader.js +47 -25
- package/dist/Loader/index.d.ts +1 -0
- package/dist/Main/Main.cjs +2 -2
- package/dist/Main/Main.d.ts +14 -0
- package/dist/Main/Main.js +35 -15
- package/dist/Main/SkipToContent.d.ts +9 -0
- package/dist/Main/index.d.ts +2 -0
- package/dist/MainNav/MainNav.cjs +2 -2
- package/dist/MainNav/MainNav.d.ts +14 -0
- package/dist/MainNav/MainNav.js +39 -17
- package/dist/MainNav/MainNavContext.d.ts +2 -0
- package/dist/MainNav/NavBrand.d.ts +19 -0
- package/dist/MainNav/NavCondense.cjs +3 -3
- package/dist/MainNav/NavCondense.d.ts +10 -0
- package/dist/MainNav/NavCondense.js +40 -20
- package/dist/MainNav/NavLink.cjs +9 -9
- package/dist/MainNav/NavLink.d.ts +23 -0
- package/dist/MainNav/NavLink.js +72 -53
- package/dist/MainNav/NavSection.cjs +1 -1
- package/dist/MainNav/NavSection.d.ts +12 -0
- package/dist/MainNav/NavSection.js +67 -46
- package/dist/MainNav/NavSections.cjs +1 -1
- package/dist/MainNav/NavSections.d.ts +10 -0
- package/dist/MainNav/NavSections.js +40 -18
- package/dist/MainNav/NavUser.cjs +2 -2
- package/dist/MainNav/NavUser.d.ts +2 -0
- package/dist/MainNav/NavUser.js +51 -31
- package/dist/MainNav/index.d.ts +7 -0
- package/dist/ModalLayout/ModalBody.cjs +2 -2
- package/dist/ModalLayout/ModalBody.d.ts +1 -0
- package/dist/ModalLayout/ModalBody.js +19 -9
- package/dist/ModalLayout/ModalContext.d.ts +2 -0
- package/dist/ModalLayout/ModalFooter.d.ts +17 -0
- package/dist/ModalLayout/ModalHeader.d.ts +15 -0
- package/dist/ModalLayout/ModalLayout.cjs +3 -3
- package/dist/ModalLayout/ModalLayout.d.ts +12 -0
- package/dist/ModalLayout/ModalLayout.js +52 -30
- package/dist/ModalLayout/index.d.ts +4 -0
- package/dist/NumberInput/NumberInput.cjs +6 -6
- package/dist/NumberInput/NumberInput.d.ts +2 -0
- package/dist/NumberInput/NumberInput.js +157 -123
- package/dist/NumberInput/index.d.ts +1 -0
- package/dist/Pagination/Pagination.d.ts +19 -0
- package/dist/Pagination/PaginationContext.d.ts +8 -0
- package/dist/Pagination/components.cjs +7 -7
- package/dist/Pagination/components.d.ts +50 -0
- package/dist/Pagination/components.js +88 -65
- package/dist/Pagination/index.d.ts +2 -0
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.d.ts +34 -0
- package/dist/Popover/Popover.js +91 -65
- package/dist/Popover/index.d.ts +1 -0
- package/dist/Portal/Portal.cjs +1 -1
- package/dist/Portal/Portal.d.ts +9 -0
- package/dist/Portal/Portal.js +12 -11
- package/dist/Portal/index.d.ts +1 -0
- package/dist/ProgressBar/ProgressBar.cjs +2 -2
- package/dist/ProgressBar/ProgressBar.d.ts +28 -0
- package/dist/ProgressBar/ProgressBar.js +49 -27
- package/dist/ProgressBar/index.d.ts +1 -0
- package/dist/Radio/Radio.cjs +2 -2
- package/dist/Radio/Radio.d.ts +11 -0
- package/dist/Radio/Radio.js +40 -19
- package/dist/Radio/index.d.ts +2 -0
- package/dist/RawTable/RawCell.cjs +1 -1
- package/dist/RawTable/RawCell.d.ts +47 -0
- package/dist/RawTable/RawCell.js +89 -69
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.d.ts +26 -0
- package/dist/RawTable/RawTable.js +66 -46
- package/dist/RawTable/RawTableContext.d.ts +10 -0
- package/dist/RawTable/RawTbody.cjs +1 -1
- package/dist/RawTable/RawTbody.d.ts +10 -0
- package/dist/RawTable/RawTbody.js +30 -11
- package/dist/RawTable/RawThead.cjs +1 -1
- package/dist/RawTable/RawThead.d.ts +10 -0
- package/dist/RawTable/RawThead.js +29 -10
- package/dist/RawTable/RawTr.cjs +1 -1
- package/dist/RawTable/RawTr.d.ts +11 -0
- package/dist/RawTable/RawTr.js +34 -14
- package/dist/RawTable/focusFocusable.d.ts +1 -0
- package/dist/RawTable/index.d.ts +5 -0
- package/dist/Searchbar/SearchForm.cjs +1 -1
- package/dist/Searchbar/SearchForm.d.ts +1 -0
- package/dist/Searchbar/SearchForm.js +16 -5
- package/dist/Searchbar/Searchbar.cjs +7 -7
- package/dist/Searchbar/Searchbar.d.ts +2 -0
- package/dist/Searchbar/Searchbar.js +65 -45
- package/dist/Searchbar/index.d.ts +2 -0
- package/dist/Select/MultiSelectNested.cjs +1 -1
- package/dist/Select/MultiSelectNested.d.ts +10 -0
- package/dist/Select/MultiSelectNested.js +45 -23
- package/dist/Select/OptGroup.cjs +1 -1
- package/dist/Select/OptGroup.d.ts +13 -0
- package/dist/Select/OptGroup.js +35 -15
- package/dist/Select/Option.cjs +7 -7
- package/dist/Select/Option.d.ts +35 -0
- package/dist/Select/Option.js +57 -37
- package/dist/Select/Select.cjs +2 -2
- package/dist/Select/Select.d.ts +72 -0
- package/dist/Select/Select.js +186 -145
- package/dist/Select/SelectButton.cjs +2 -2
- package/dist/Select/SelectButton.d.ts +2 -0
- package/dist/Select/SelectButton.js +53 -33
- package/dist/Select/SelectList.d.ts +25 -0
- package/dist/Select/SelectTags.d.ts +22 -0
- package/dist/Select/components.d.ts +3 -0
- package/dist/Select/constants.d.ts +10 -0
- package/dist/Select/hooks/useButtonRef.d.ts +1 -0
- package/dist/Select/hooks/useListRef.d.ts +1 -0
- package/dist/Select/index.d.ts +5 -0
- package/dist/Select/utils.d.ts +2 -0
- package/dist/SimpleMenu/SimpleMenu.cjs +7 -23
- package/dist/SimpleMenu/SimpleMenu.d.ts +73 -0
- package/dist/SimpleMenu/SimpleMenu.js +154 -152
- package/dist/SimpleMenu/index.d.ts +1 -0
- package/dist/SimpleMenu/utils.d.ts +3 -0
- package/dist/Stack/Stack.cjs +5 -5
- package/dist/Stack/Stack.d.ts +19 -0
- package/dist/Stack/Stack.js +60 -36
- package/dist/Stack/index.d.ts +1 -0
- package/dist/Status/Status.cjs +4 -4
- package/dist/Status/Status.d.ts +24 -0
- package/dist/Status/Status.js +50 -30
- package/dist/Status/index.d.ts +1 -0
- package/dist/SubNav/SubNav.cjs +3 -3
- package/dist/SubNav/SubNav.d.ts +11 -0
- package/dist/SubNav/SubNav.js +37 -15
- package/dist/SubNav/SubNavHeader.cjs +2 -2
- package/dist/SubNav/SubNavHeader.d.ts +40 -0
- package/dist/SubNav/SubNavHeader.js +39 -38
- package/dist/SubNav/SubNavLink.cjs +6 -6
- package/dist/SubNav/SubNavLink.d.ts +25 -0
- package/dist/SubNav/SubNavLink.js +61 -39
- package/dist/SubNav/SubNavLinkSection.d.ts +19 -0
- package/dist/SubNav/SubNavSection.d.ts +27 -0
- package/dist/SubNav/SubNavSectionLabel.d.ts +26 -0
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.d.ts +10 -0
- package/dist/SubNav/SubNavSections.js +39 -17
- package/dist/SubNav/index.d.ts +6 -0
- package/dist/Switch/Switch.cjs +5 -5
- package/dist/Switch/Switch.d.ts +2 -0
- package/dist/Switch/Switch.js +57 -35
- package/dist/Switch/index.d.ts +1 -0
- package/dist/Table/Cell.cjs +3 -3
- package/dist/Table/Cell.d.ts +17 -0
- package/dist/Table/Cell.js +40 -20
- package/dist/Table/TFooter.cjs +3 -3
- package/dist/Table/TFooter.d.ts +12 -0
- package/dist/Table/TFooter.js +50 -28
- package/dist/Table/Table.cjs +5 -5
- package/dist/Table/Table.d.ts +18 -0
- package/dist/Table/Table.js +55 -35
- package/dist/Table/Tbody.cjs +2 -2
- package/dist/Table/Tbody.d.ts +1 -0
- package/dist/Table/Tbody.js +17 -8
- package/dist/Table/Thead.cjs +2 -2
- package/dist/Table/Thead.d.ts +1 -0
- package/dist/Table/Thead.js +17 -8
- package/dist/Table/Tr.cjs +2 -2
- package/dist/Table/Tr.d.ts +1 -0
- package/dist/Table/Tr.js +17 -8
- package/dist/Table/index.d.ts +6 -0
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.d.ts +2 -0
- package/dist/Tabs/TabGroup.js +45 -26
- package/dist/Tabs/TabPanels.cjs +1 -1
- package/dist/Tabs/TabPanels.d.ts +24 -0
- package/dist/Tabs/TabPanels.js +43 -24
- package/dist/Tabs/Tabs.cjs +2 -2
- package/dist/Tabs/Tabs.d.ts +51 -0
- package/dist/Tabs/Tabs.js +112 -94
- package/dist/Tabs/TabsContext.d.ts +2 -0
- package/dist/Tabs/components.d.ts +6 -0
- package/dist/Tabs/index.d.ts +3 -0
- package/dist/Tabs/useTabsFocus.d.ts +1 -0
- package/dist/Tag/Tag.cjs +4 -4
- package/dist/Tag/Tag.d.ts +23 -0
- package/dist/Tag/Tag.js +50 -27
- package/dist/Tag/index.d.ts +1 -0
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.d.ts +16 -0
- package/dist/TextButton/TextButton.js +80 -51
- package/dist/TextButton/index.d.ts +1 -0
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.d.ts +2 -0
- package/dist/TextInput/TextInput.js +69 -49
- package/dist/TextInput/index.d.ts +1 -0
- package/dist/Textarea/Textarea.cjs +3 -3
- package/dist/Textarea/Textarea.d.ts +2 -0
- package/dist/Textarea/Textarea.js +63 -43
- package/dist/Textarea/TextareaInput.cjs +4 -4
- package/dist/Textarea/TextareaInput.d.ts +2 -0
- package/dist/Textarea/TextareaInput.js +49 -30
- package/dist/Textarea/index.d.ts +1 -0
- package/dist/ThemeProvider/ThemeProvider.cjs +2 -2
- package/dist/ThemeProvider/ThemeProvider.d.ts +8 -0
- package/dist/ThemeProvider/ThemeProvider.js +12 -11
- package/dist/ThemeProvider/hooks.d.ts +1 -0
- package/dist/ThemeProvider/index.d.ts +2 -0
- package/dist/TimePicker/TimePicker.cjs +3 -3
- package/dist/TimePicker/TimePicker.d.ts +54 -0
- package/dist/TimePicker/TimePicker.js +92 -64
- package/dist/TimePicker/index.d.ts +1 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
- package/dist/ToggleCheckbox/ToggleCheckbox.d.ts +2 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.js +75 -60
- package/dist/ToggleCheckbox/index.d.ts +1 -0
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.d.ts +59 -0
- package/dist/ToggleInput/ToggleInput.js +98 -65
- package/dist/ToggleInput/index.d.ts +1 -0
- package/dist/Tooltip/Tooltip.cjs +2 -2
- package/dist/Tooltip/Tooltip.d.ts +32 -0
- package/dist/Tooltip/Tooltip.js +57 -38
- package/dist/Tooltip/hooks/useTooltipHandlers.d.ts +7 -0
- package/dist/Tooltip/hooks/useTooltipLayout.d.ts +4 -0
- package/dist/Tooltip/index.d.ts +1 -0
- package/dist/Tooltip/utils/positionTooltip.d.ts +7 -0
- package/dist/Typography/Typography.cjs +7 -7
- package/dist/Typography/Typography.d.ts +16 -0
- package/dist/Typography/Typography.js +28 -17
- package/dist/Typography/constants.d.ts +8 -0
- package/dist/Typography/index.d.ts +1 -0
- package/dist/Typography/utils.cjs +2 -2
- package/dist/Typography/utils.d.ts +13 -0
- package/dist/Typography/utils.js +6 -6
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -0
- package/dist/VisuallyHidden/index.d.ts +1 -0
- package/dist/helpers/arrays.cjs +1 -0
- package/dist/helpers/arrays.d.ts +7 -0
- package/dist/helpers/arrays.js +6 -0
- package/dist/helpers/escapeSelector.d.ts +1 -0
- package/dist/helpers/genId.d.ts +1 -0
- package/dist/helpers/getDefaultLocale.cjs +1 -1
- package/dist/helpers/getDefaultLocale.d.ts +1 -0
- package/dist/helpers/getDefaultLocale.js +1 -1
- package/dist/helpers/getFocusableNodes.d.ts +10 -0
- package/dist/helpers/handleResponsiveValues.cjs +1 -5
- package/dist/helpers/handleResponsiveValues.d.ts +9 -0
- package/dist/helpers/handleResponsiveValues.js +21 -15
- package/dist/helpers/keyboardKeys.d.ts +17 -0
- package/dist/helpers/objects.cjs +1 -0
- package/dist/helpers/objects.d.ts +28 -0
- package/dist/helpers/objects.js +26 -0
- package/dist/helpers/setOpacity.cjs +1 -1
- package/dist/helpers/setOpacity.d.ts +1 -0
- package/dist/helpers/setOpacity.js +1 -1
- package/dist/helpers/setTabIndexOnFirstItem.d.ts +1 -0
- package/dist/helpers/theme.cjs +1 -0
- package/dist/helpers/theme.d.ts +2 -0
- package/dist/helpers/theme.js +7 -0
- package/dist/helpers/useElementOnScreen.d.ts +1 -0
- package/dist/helpers/useId.d.ts +1 -0
- package/dist/helpers/useIntersection.cjs +1 -1
- package/dist/helpers/useIntersection.d.ts +10 -0
- package/dist/helpers/useIntersection.js +8 -8
- package/dist/helpers/useLockScroll.d.ts +2 -0
- package/dist/helpers/usePrevious.d.ts +1 -0
- package/dist/helpers/useResizeObserver.d.ts +2 -0
- package/dist/hooks/useControllableState.cjs +1 -1
- package/dist/hooks/useControllableState.d.ts +16 -0
- package/dist/hooks/useControllableState.js +13 -16
- package/dist/index.d.ts +64 -0
- package/dist/themes/ColorButton.cjs +3 -3
- package/dist/themes/ColorButton.d.ts +6 -0
- package/dist/themes/ColorButton.js +23 -19
- package/dist/themes/common-theme.d.ts +2 -0
- package/dist/themes/darkTheme/dark-colors.d.ts +4 -0
- package/dist/themes/darkTheme/dark-shadows.d.ts +4 -0
- package/dist/themes/darkTheme/index.cjs +1 -1
- package/dist/themes/darkTheme/index.d.ts +2 -0
- package/dist/themes/darkTheme/index.js +18 -8
- package/dist/themes/extendTheme.cjs +4 -4
- package/dist/themes/extendTheme.d.ts +2 -0
- package/dist/themes/extendTheme.js +14 -22
- package/dist/themes/index.d.ts +4 -0
- package/dist/themes/lightTheme/index.cjs +1 -1
- package/dist/themes/lightTheme/index.d.ts +2 -0
- package/dist/themes/lightTheme/index.js +18 -8
- package/dist/themes/lightTheme/light-colors.d.ts +4 -0
- package/dist/themes/lightTheme/light-shadows.d.ts +4 -0
- package/dist/themes/sizes.d.ts +2 -0
- package/dist/themes/utils.d.ts +12 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
- package/dist/v2/Breadcrumbs/Breadcrumbs.d.ts +13 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +43 -23
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
- package/dist/v2/Breadcrumbs/Crumb.d.ts +17 -0
- package/dist/v2/Breadcrumbs/Crumb.js +44 -22
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbLink.d.ts +16 -0
- package/dist/v2/Breadcrumbs/CrumbLink.js +35 -14
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.d.ts +12 -0
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +41 -19
- package/dist/v2/Breadcrumbs/Divider.d.ts +4 -0
- package/dist/v2/Breadcrumbs/index.d.ts +4 -0
- package/dist/v2/Link/Link.cjs +5 -5
- package/dist/v2/Link/Link.d.ts +2 -0
- package/dist/v2/Link/Link.js +64 -42
- package/dist/v2/Link/index.d.ts +1 -0
- package/dist/v2/LinkButton/LinkButton.cjs +10 -10
- package/dist/v2/LinkButton/LinkButton.d.ts +2 -0
- package/dist/v2/LinkButton/LinkButton.js +75 -51
- package/dist/v2/LinkButton/index.d.ts +1 -0
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.d.ts +14 -0
- package/dist/v2/MainNav/MainNav.js +39 -17
- package/dist/v2/MainNav/MainNavContext.d.ts +2 -0
- package/dist/v2/MainNav/NavBrand.cjs +3 -3
- package/dist/v2/MainNav/NavBrand.d.ts +2 -0
- package/dist/v2/MainNav/NavBrand.js +78 -57
- package/dist/v2/MainNav/NavCondense.cjs +3 -3
- package/dist/v2/MainNav/NavCondense.d.ts +10 -0
- package/dist/v2/MainNav/NavCondense.js +40 -20
- package/dist/v2/MainNav/NavLink.cjs +9 -9
- package/dist/v2/MainNav/NavLink.d.ts +2 -0
- package/dist/v2/MainNav/NavLink.js +77 -56
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.d.ts +12 -0
- package/dist/v2/MainNav/NavSection.js +67 -46
- package/dist/v2/MainNav/NavSections.cjs +1 -1
- package/dist/v2/MainNav/NavSections.d.ts +10 -0
- package/dist/v2/MainNav/NavSections.js +40 -18
- package/dist/v2/MainNav/NavUser.cjs +2 -2
- package/dist/v2/MainNav/NavUser.d.ts +2 -0
- package/dist/v2/MainNav/NavUser.js +51 -31
- package/dist/v2/MainNav/index.d.ts +7 -0
- package/dist/v2/Pagination/Pagination.d.ts +19 -0
- package/dist/v2/Pagination/PaginationContext.d.ts +8 -0
- package/dist/v2/Pagination/components.cjs +7 -7
- package/dist/v2/Pagination/components.d.ts +14 -0
- package/dist/v2/Pagination/components.js +89 -65
- package/dist/v2/Pagination/index.d.ts +2 -0
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +7 -21
- package/dist/v2/SimpleMenu/SimpleMenu.d.ts +70 -0
- package/dist/v2/SimpleMenu/SimpleMenu.js +147 -143
- package/dist/v2/SimpleMenu/index.d.ts +1 -0
- package/dist/v2/SimpleMenu/utils.d.ts +3 -0
- package/dist/v2/SubNav/SubNav.cjs +3 -3
- package/dist/v2/SubNav/SubNav.d.ts +11 -0
- package/dist/v2/SubNav/SubNav.js +37 -15
- package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
- package/dist/v2/SubNav/SubNavHeader.d.ts +40 -0
- package/dist/v2/SubNav/SubNavHeader.js +39 -38
- package/dist/v2/SubNav/SubNavLink.cjs +6 -6
- package/dist/v2/SubNav/SubNavLink.d.ts +2 -0
- package/dist/v2/SubNav/SubNavLink.js +64 -42
- package/dist/v2/SubNav/SubNavLinkSection.d.ts +17 -0
- package/dist/v2/SubNav/SubNavSection.d.ts +25 -0
- package/dist/v2/SubNav/SubNavSectionLabel.d.ts +26 -0
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.d.ts +10 -0
- package/dist/v2/SubNav/SubNavSections.js +39 -17
- package/dist/v2/SubNav/index.d.ts +6 -0
- package/dist/v2/index.d.ts +7 -0
- package/package.json +4 -3
- package/dist/Box/BoxProps.cjs +0 -1
- package/dist/Box/BoxProps.js +0 -51
- package/dist/Flex/FlexProps.cjs +0 -1
- package/dist/Flex/FlexProps.js +0 -41
- package/dist/Typography/TypographyProps.cjs +0 -1
- package/dist/Typography/TypographyProps.js +0 -31
- package/dist/themes/colors.cjs +0 -1
- package/dist/themes/colors.js +0 -49
|
@@ -1,16 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var a = Object.getOwnPropertySymbols;
|
|
3
|
+
var c = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var i = (e, r, o) => r in e ? y(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, p = (e, r) => {
|
|
5
|
+
for (var o in r || (r = {}))
|
|
6
|
+
c.call(r, o) && i(e, o, r[o]);
|
|
7
|
+
if (a)
|
|
8
|
+
for (var o of a(r))
|
|
9
|
+
l.call(r, o) && i(e, o, r[o]);
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
var m = (e, r) => {
|
|
13
|
+
var o = {};
|
|
14
|
+
for (var t in e)
|
|
15
|
+
c.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
|
|
16
|
+
if (e != null && a)
|
|
17
|
+
for (var t of a(e))
|
|
18
|
+
r.indexOf(t) < 0 && l.call(e, t) && (o[t] = e[t]);
|
|
19
|
+
return o;
|
|
20
|
+
};
|
|
21
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
22
|
+
import k, { useContext as x } from "react";
|
|
23
|
+
import S from "styled-components";
|
|
24
|
+
import { RadioContext as w } from "./context.js";
|
|
25
|
+
import { getRadioSize as s, getSelectedRadioSize as f, getSelectedRadioPosition as u } from "./utils.js";
|
|
26
|
+
const C = S.input`
|
|
7
27
|
margin: 0;
|
|
8
28
|
padding: 0;
|
|
9
|
-
background-color: ${({
|
|
10
|
-
|
|
29
|
+
background-color: ${({
|
|
30
|
+
theme: e
|
|
31
|
+
}) => e.colors.neutral0};
|
|
32
|
+
border: 1px solid ${({
|
|
33
|
+
theme: e
|
|
34
|
+
}) => e.colors.primary600};
|
|
11
35
|
border-radius: 50%;
|
|
12
|
-
height: ${
|
|
13
|
-
|
|
36
|
+
height: ${({
|
|
37
|
+
size: e
|
|
38
|
+
}) => typeof e == "number" ? e : s(e)};
|
|
39
|
+
width: ${({
|
|
40
|
+
size: e
|
|
41
|
+
}) => typeof e == "number" ? e : s(e)};
|
|
14
42
|
-webkit-appearance: none;
|
|
15
43
|
|
|
16
44
|
&:after {
|
|
@@ -19,44 +47,58 @@ const h = g.input`
|
|
|
19
47
|
position: relative;
|
|
20
48
|
z-index: 1;
|
|
21
49
|
display: block;
|
|
22
|
-
height: ${
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
50
|
+
height: ${({
|
|
51
|
+
size: e
|
|
52
|
+
}) => typeof e == "number" ? e : f(e)};
|
|
53
|
+
width: ${({
|
|
54
|
+
size: e
|
|
55
|
+
}) => typeof e == "number" ? e : f(e)};
|
|
56
|
+
left: ${u};
|
|
57
|
+
top: ${u};
|
|
26
58
|
}
|
|
27
59
|
|
|
28
60
|
&:checked:after {
|
|
29
|
-
background: ${({
|
|
61
|
+
background: ${({
|
|
62
|
+
theme: e
|
|
63
|
+
}) => e.colors.primary600};
|
|
30
64
|
}
|
|
31
65
|
|
|
32
66
|
&:disabled {
|
|
33
|
-
border: 1px solid ${({
|
|
34
|
-
|
|
67
|
+
border: 1px solid ${({
|
|
68
|
+
theme: e
|
|
69
|
+
}) => e.colors.neutral300};
|
|
70
|
+
background: ${({
|
|
71
|
+
theme: e
|
|
72
|
+
}) => e.colors.neutral200};
|
|
35
73
|
}
|
|
36
|
-
`,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
74
|
+
`, I = k.forwardRef((_, t) => {
|
|
75
|
+
var n = _, {
|
|
76
|
+
value: e,
|
|
77
|
+
disabled: r = !1
|
|
78
|
+
} = n, o = m(n, [
|
|
79
|
+
"value",
|
|
80
|
+
"disabled"
|
|
81
|
+
]);
|
|
82
|
+
const {
|
|
83
|
+
onChange: b,
|
|
84
|
+
selected: g,
|
|
85
|
+
name: h,
|
|
86
|
+
size: $
|
|
87
|
+
} = x(w), d = g === e;
|
|
88
|
+
return R(C, p({
|
|
89
|
+
ref: t,
|
|
40
90
|
type: "radio",
|
|
41
|
-
name:
|
|
91
|
+
name: h,
|
|
42
92
|
value: e,
|
|
43
|
-
tabIndex:
|
|
44
|
-
"aria-checked":
|
|
45
|
-
checked:
|
|
46
|
-
disabled:
|
|
47
|
-
size:
|
|
48
|
-
onChange:
|
|
49
|
-
|
|
50
|
-
});
|
|
93
|
+
tabIndex: d ? 0 : -1,
|
|
94
|
+
"aria-checked": d,
|
|
95
|
+
checked: d,
|
|
96
|
+
disabled: r,
|
|
97
|
+
size: $,
|
|
98
|
+
onChange: b
|
|
99
|
+
}, o));
|
|
51
100
|
});
|
|
52
|
-
|
|
53
|
-
r.defaultProps = {
|
|
54
|
-
disabled: !1
|
|
55
|
-
};
|
|
56
|
-
r.propTypes = {
|
|
57
|
-
disabled: i.bool,
|
|
58
|
-
value: i.string.isRequired
|
|
59
|
-
};
|
|
101
|
+
I.displayName = "Radio";
|
|
60
102
|
export {
|
|
61
|
-
|
|
103
|
+
I as BaseRadio
|
|
62
104
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var I=Object.defineProperty,m=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var c=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&c(e,r,t[r]);if(s)for(var r of s(t))a.call(t,r)&&c(e,r,t[r]);return e},x=(e,t)=>m(e,q(t));var b=(e,t)=>{var r={};for(var o in e)d.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&s)for(var o of s(e))t.indexOf(o)<0&&a.call(e,o)&&(r[o]=e[o]);return r};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react/jsx-runtime"),j=require("react"),O=require("./context.cjs"),T=require("../helpers/setTabIndexOnFirstItem.cjs"),g=h=>{var n=h,{children:e,labelledBy:t,onChange:r,value:o="",size:R="M",name:i}=n,p=b(n,["children","labelledBy","onChange","value","size","name"]);const u=j.useRef(null);return j.useLayoutEffect(()=>{o||T.setTabIndexOnFirstItem(u.current,`[name="${i}"]`)},[o,i]),f.jsx(O.RadioContext.Provider,{value:{onChange:r,selected:o,name:i,size:R},children:f.jsx("div",x(l({ref:u,role:"radiogroup","aria-labelledby":t},p),{children:e}))})};exports.RadioGroup=g;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChangeEventHandler } from 'react';
|
|
2
|
+
export type RadioGroupSize = 'M' | 'L';
|
|
3
|
+
interface RadioGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
labelledBy: string;
|
|
6
|
+
name: string;
|
|
7
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
8
|
+
size?: RadioGroupSize;
|
|
9
|
+
value?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const RadioGroup: ({ children, labelledBy, onChange, value, size, name, ...props }: RadioGroupProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,32 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
var b = Object.defineProperty, h = Object.defineProperties;
|
|
2
|
+
var y = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var i = Object.getOwnPropertySymbols;
|
|
4
|
+
var m = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var l = (r, o, e) => o in r ? b(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e, s = (r, o) => {
|
|
6
|
+
for (var e in o || (o = {}))
|
|
7
|
+
m.call(o, e) && l(r, e, o[e]);
|
|
8
|
+
if (i)
|
|
9
|
+
for (var e of i(o))
|
|
10
|
+
p.call(o, e) && l(r, e, o[e]);
|
|
11
|
+
return r;
|
|
12
|
+
}, u = (r, o) => h(r, y(o));
|
|
13
|
+
var a = (r, o) => {
|
|
14
|
+
var e = {};
|
|
15
|
+
for (var t in r)
|
|
16
|
+
m.call(r, t) && o.indexOf(t) < 0 && (e[t] = r[t]);
|
|
17
|
+
if (r != null && i)
|
|
18
|
+
for (var t of i(r))
|
|
19
|
+
o.indexOf(t) < 0 && p.call(r, t) && (e[t] = r[t]);
|
|
20
|
+
return e;
|
|
17
21
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
23
|
+
import { useRef as G, useLayoutEffect as I } from "react";
|
|
24
|
+
import { RadioContext as g } from "./context.js";
|
|
25
|
+
import { setTabIndexOnFirstItem as j } from "../helpers/setTabIndexOnFirstItem.js";
|
|
26
|
+
const O = (v) => {
|
|
27
|
+
var f = v, {
|
|
28
|
+
children: r,
|
|
29
|
+
labelledBy: o,
|
|
30
|
+
onChange: e,
|
|
31
|
+
value: t = "",
|
|
32
|
+
size: x = "M",
|
|
33
|
+
name: d
|
|
34
|
+
} = f, R = a(f, [
|
|
35
|
+
"children",
|
|
36
|
+
"labelledBy",
|
|
37
|
+
"onChange",
|
|
38
|
+
"value",
|
|
39
|
+
"size",
|
|
40
|
+
"name"
|
|
41
|
+
]);
|
|
42
|
+
const n = G(null);
|
|
43
|
+
return I(() => {
|
|
44
|
+
t || j(n.current, `[name="${d}"]`);
|
|
45
|
+
}, [t, d]), c(g.Provider, {
|
|
46
|
+
value: {
|
|
47
|
+
onChange: e,
|
|
48
|
+
selected: t,
|
|
49
|
+
name: d,
|
|
50
|
+
size: x
|
|
51
|
+
},
|
|
52
|
+
children: c("div", u(s({
|
|
53
|
+
ref: n,
|
|
54
|
+
role: "radiogroup",
|
|
55
|
+
"aria-labelledby": o
|
|
56
|
+
}, R), {
|
|
57
|
+
children: r
|
|
58
|
+
}))
|
|
59
|
+
});
|
|
29
60
|
};
|
|
30
61
|
export {
|
|
31
|
-
|
|
62
|
+
O as RadioGroup
|
|
32
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react"),t=e.createContext({onChange:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react"),t=e.createContext({onChange:void 0,name:"",size:"M",selected:""});exports.RadioContext=t;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChangeEventHandler } from 'react';
|
|
2
|
+
import type { RadioGroupSize } from './RadioGroup';
|
|
3
|
+
export interface RadioContextValue {
|
|
4
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
5
|
+
name: string;
|
|
6
|
+
size: RadioGroupSize;
|
|
7
|
+
selected: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const RadioContext: import("react").Context<RadioContextValue>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { createContext as
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
import { createContext as e } from "react";
|
|
2
|
+
const n = e({
|
|
3
|
+
onChange: void 0,
|
|
4
|
+
name: "",
|
|
5
|
+
size: "M",
|
|
6
|
+
selected: ""
|
|
7
|
+
});
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
n as RadioContext
|
|
6
10
|
};
|
package/dist/BaseRadio/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=e=>e==="M"?"18px":"20px",i=e=>e==="M"?"10px":"12px",o=()=>"3px";exports.getRadioSize=t;exports.getSelectedRadioPosition=o;exports.getSelectedRadioSize=i;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RadioGroupSize } from './RadioGroup';
|
|
2
|
+
export declare const getRadioSize: (size: RadioGroupSize) => "20px" | "18px";
|
|
3
|
+
export declare const getSelectedRadioSize: (size: RadioGroupSize) => "12px" | "10px";
|
|
4
|
+
export declare const getSelectedRadioPosition: () => string;
|
package/dist/BaseRadio/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t = (
|
|
1
|
+
const t = (e) => e === "M" ? "18px" : "20px", r = (e) => e === "M" ? "10px" : "12px", i = () => "3px";
|
|
2
2
|
export {
|
|
3
3
|
t as getRadioSize,
|
|
4
4
|
i as getSelectedRadioPosition,
|
package/dist/Box/Box.cjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("styled-components"),o=require("../helpers/handleResponsiveValues.cjs"),r=require("../helpers/theme.cjs"),i=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},d=i(a),l={color:!0},m=d.default.div.withConfig({shouldForwardProp:(e,t)=>!l[e]&&t(e)})`
|
|
2
2
|
// Font
|
|
3
|
-
font-size: ${({fontSize:e,theme:
|
|
3
|
+
font-size: ${({fontSize:e,theme:t})=>r.extractStyleFromTheme(t.fontSizes,e,e)};
|
|
4
4
|
|
|
5
5
|
// Colors
|
|
6
|
-
background: ${({theme:e,background:
|
|
7
|
-
color: ${({theme:e,color:
|
|
6
|
+
background: ${({theme:e,background:t})=>r.extractStyleFromTheme(e.colors,t,void 0)};
|
|
7
|
+
color: ${({theme:e,color:t})=>r.extractStyleFromTheme(e.colors,t,void 0)};
|
|
8
8
|
|
|
9
9
|
// Spaces
|
|
10
|
-
${({theme:e,padding:
|
|
11
|
-
${({theme:e,paddingTop:
|
|
12
|
-
${({theme:e,paddingRight:
|
|
13
|
-
${({theme:e,paddingBottom:
|
|
14
|
-
${({theme:e,paddingLeft:
|
|
15
|
-
${({theme:e,marginLeft:
|
|
16
|
-
${({theme:e,marginRight:
|
|
17
|
-
${({theme:e,marginTop:
|
|
18
|
-
${({theme:e,marginBottom:
|
|
10
|
+
${({theme:e,padding:t})=>o("padding",t,e)}
|
|
11
|
+
${({theme:e,paddingTop:t})=>o("padding-top",t,e)}
|
|
12
|
+
${({theme:e,paddingRight:t})=>o("padding-right",t,e)}
|
|
13
|
+
${({theme:e,paddingBottom:t})=>o("padding-bottom",t,e)}
|
|
14
|
+
${({theme:e,paddingLeft:t})=>o("padding-left",t,e)}
|
|
15
|
+
${({theme:e,marginLeft:t})=>o("margin-left",t,e)}
|
|
16
|
+
${({theme:e,marginRight:t})=>o("margin-right",t,e)}
|
|
17
|
+
${({theme:e,marginTop:t})=>o("margin-top",t,e)}
|
|
18
|
+
${({theme:e,marginBottom:t})=>o("margin-bottom",t,e)}
|
|
19
19
|
|
|
20
20
|
// Responsive hiding
|
|
21
|
-
${({theme:e,hiddenS:
|
|
22
|
-
${({theme:e,hiddenXS:
|
|
21
|
+
${({theme:e,hiddenS:t})=>t?`${e.mediaQueries.tablet} { display: none; }`:void 0}
|
|
22
|
+
${({theme:e,hiddenXS:t})=>t?`${e.mediaQueries.mobile} { display: none; }`:void 0}
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
// Borders
|
|
26
|
-
border-radius: ${({theme:e,hasRadius:
|
|
26
|
+
border-radius: ${({theme:e,hasRadius:t,borderRadius:s})=>t?e.borderRadius:s};
|
|
27
27
|
border-style: ${({borderStyle:e})=>e};
|
|
28
28
|
border-width: ${({borderWidth:e})=>e};
|
|
29
|
-
border-color: ${({borderColor:e,theme:
|
|
30
|
-
border: ${({theme:e,borderColor:
|
|
29
|
+
border-color: ${({borderColor:e,theme:t})=>r.extractStyleFromTheme(t.colors,e,void 0)};
|
|
30
|
+
border: ${({theme:e,borderColor:t,borderStyle:s,borderWidth:n})=>{if(t&&!s&&!n)return`1px solid ${e.colors[t]}`}};
|
|
31
31
|
|
|
32
32
|
// Shadows
|
|
33
|
-
box-shadow: ${({theme:e,shadow:
|
|
33
|
+
box-shadow: ${({theme:e,shadow:t})=>r.extractStyleFromTheme(e.shadows,t,void 0)};
|
|
34
34
|
|
|
35
35
|
// Handlers
|
|
36
36
|
pointer-events: ${({pointerEvents:e})=>e};
|
|
37
37
|
&:hover {
|
|
38
|
-
${({_hover:e,theme:
|
|
38
|
+
${({_hover:e,theme:t})=>e?e(t):void 0}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// Display
|
|
@@ -43,21 +43,20 @@
|
|
|
43
43
|
|
|
44
44
|
// Position
|
|
45
45
|
position: ${({position:e})=>e};
|
|
46
|
-
left: ${({left:e,theme:
|
|
47
|
-
right: ${({right:e,theme:
|
|
48
|
-
top: ${({top:e,theme:
|
|
49
|
-
bottom: ${({bottom:e,theme:
|
|
46
|
+
left: ${({left:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
47
|
+
right: ${({right:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
48
|
+
top: ${({top:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
49
|
+
bottom: ${({bottom:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
50
50
|
z-index: ${({zIndex:e})=>e};
|
|
51
51
|
overflow: ${({overflow:e})=>e};
|
|
52
|
-
cursor: ${({cursor:e})=>e};
|
|
53
52
|
|
|
54
53
|
// Size
|
|
55
|
-
width: ${({width:e,theme:
|
|
56
|
-
max-width: ${({maxWidth:e,theme:
|
|
57
|
-
min-width: ${({minWidth:e,theme:
|
|
58
|
-
height: ${({height:e,theme:
|
|
59
|
-
max-height: ${({maxHeight:e,theme:
|
|
60
|
-
min-height: ${({minHeight:e,theme:
|
|
54
|
+
width: ${({width:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
55
|
+
max-width: ${({maxWidth:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
56
|
+
min-width: ${({minWidth:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
57
|
+
height: ${({height:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
58
|
+
max-height: ${({maxHeight:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
59
|
+
min-height: ${({minHeight:e,theme:t})=>r.extractStyleFromTheme(t.spaces,e,e)};
|
|
61
60
|
|
|
62
61
|
// Animation
|
|
63
62
|
transition: ${({transition:e})=>e};
|
|
@@ -77,4 +76,4 @@
|
|
|
77
76
|
|
|
78
77
|
// Cursor
|
|
79
78
|
cursor: ${({cursor:e})=>e};
|
|
80
|
-
`;
|
|
79
|
+
`;exports.Box=m;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { CSSProperties, DefaultTheme } from 'styled-components';
|
|
3
|
+
type SpaceProps = keyof DefaultTheme['spaces'] | Array<keyof DefaultTheme['spaces']>;
|
|
4
|
+
type DefaultThemeOrCSSProp<T extends keyof DefaultTheme, K extends keyof CSSProperties> = keyof DefaultTheme[T] | CSSProperties[K];
|
|
5
|
+
export type BoxProps<TElement extends HTMLElement = HTMLDivElement> = Pick<CSSProperties, 'pointerEvents' | 'display' | 'position' | 'zIndex' | 'overflow' | 'cursor' | 'transition' | 'transform' | 'animation' | 'textAlign' | 'textTransform' | 'lineHeight'> & HTMLAttributes<TElement> & {
|
|
6
|
+
/**
|
|
7
|
+
* JavaScript hover handler
|
|
8
|
+
*/
|
|
9
|
+
_hover?: (theme: DefaultTheme) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Background color
|
|
12
|
+
*/
|
|
13
|
+
background?: keyof DefaultTheme['colors'];
|
|
14
|
+
/**
|
|
15
|
+
* Flex basis
|
|
16
|
+
*/
|
|
17
|
+
basis?: CSSProperties['flexBasis'];
|
|
18
|
+
/**
|
|
19
|
+
* Border color
|
|
20
|
+
*/
|
|
21
|
+
borderColor?: keyof DefaultTheme['colors'];
|
|
22
|
+
/**
|
|
23
|
+
* Text color
|
|
24
|
+
*/
|
|
25
|
+
color?: keyof DefaultTheme['colors'];
|
|
26
|
+
/**
|
|
27
|
+
* Flex
|
|
28
|
+
*/
|
|
29
|
+
flex?: CSSProperties['flex'];
|
|
30
|
+
fontSize?: DefaultThemeOrCSSProp<'fontSizes', 'fontSize'>;
|
|
31
|
+
/**
|
|
32
|
+
* Flex grow
|
|
33
|
+
*/
|
|
34
|
+
grow?: CSSProperties['flexGrow'];
|
|
35
|
+
/**
|
|
36
|
+
* If `true`, will add a border radius to the `Box`
|
|
37
|
+
*/
|
|
38
|
+
hasRadius?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Responsive hiding. If `true`, will the `Box` for tablet size screens.
|
|
41
|
+
*/
|
|
42
|
+
hiddenS?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Responsive hiding. If `true`, will the `Box` for mobile size screens.
|
|
45
|
+
*/
|
|
46
|
+
hiddenXS?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Padding. Supports responsive values
|
|
49
|
+
*/
|
|
50
|
+
padding?: SpaceProps;
|
|
51
|
+
/**
|
|
52
|
+
* Padding bottom. Supports responsive values
|
|
53
|
+
*/
|
|
54
|
+
paddingBottom?: SpaceProps;
|
|
55
|
+
/**
|
|
56
|
+
* Padding left. Supports responsive values
|
|
57
|
+
*/
|
|
58
|
+
paddingLeft?: SpaceProps;
|
|
59
|
+
/**
|
|
60
|
+
* Padding right. Supports responsive values
|
|
61
|
+
*/
|
|
62
|
+
paddingRight?: SpaceProps;
|
|
63
|
+
/**
|
|
64
|
+
* Padding top. Supports responsive values
|
|
65
|
+
*/
|
|
66
|
+
paddingTop?: SpaceProps;
|
|
67
|
+
marginLeft?: SpaceProps;
|
|
68
|
+
marginBottom?: SpaceProps;
|
|
69
|
+
marginRight?: SpaceProps;
|
|
70
|
+
marginTop?: SpaceProps;
|
|
71
|
+
/**
|
|
72
|
+
* Shadow name (see `theme.shadows`)
|
|
73
|
+
*/
|
|
74
|
+
shadow?: keyof DefaultTheme['shadows'];
|
|
75
|
+
/**
|
|
76
|
+
* Flex shrink
|
|
77
|
+
*/
|
|
78
|
+
shrink?: CSSProperties['flexShrink'];
|
|
79
|
+
width?: DefaultThemeOrCSSProp<'spaces', 'width'>;
|
|
80
|
+
minWidth?: DefaultThemeOrCSSProp<'spaces', 'minWidth'>;
|
|
81
|
+
maxWidth?: DefaultThemeOrCSSProp<'spaces', 'maxWidth'>;
|
|
82
|
+
height?: DefaultThemeOrCSSProp<'spaces', 'height'>;
|
|
83
|
+
minHeight?: DefaultThemeOrCSSProp<'spaces', 'minHeight'>;
|
|
84
|
+
maxHeight?: DefaultThemeOrCSSProp<'spaces', 'maxHeight'>;
|
|
85
|
+
top?: DefaultThemeOrCSSProp<'spaces', 'top'>;
|
|
86
|
+
left?: DefaultThemeOrCSSProp<'spaces', 'left'>;
|
|
87
|
+
bottom?: DefaultThemeOrCSSProp<'spaces', 'bottom'>;
|
|
88
|
+
right?: DefaultThemeOrCSSProp<'spaces', 'right'>;
|
|
89
|
+
borderRadius?: CSSProperties['borderRadius'];
|
|
90
|
+
borderStyle?: CSSProperties['borderStyle'];
|
|
91
|
+
borderWidth?: CSSProperties['borderWidth'];
|
|
92
|
+
children?: React.ReactNode;
|
|
93
|
+
as?: string | React.ComponentType<any>;
|
|
94
|
+
forwardedAs?: string | React.ComponentType<any>;
|
|
95
|
+
};
|
|
96
|
+
export declare const Box: import("styled-components").StyledComponent<"div", DefaultTheme, BoxProps<HTMLDivElement>, never>;
|
|
97
|
+
export {};
|