@alma-oss/spirit-web-react 4.2.1 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -11
- package/bundles/web-react.umd.js +33496 -33281
- package/bundles/web-react.umd.js.map +1 -1
- package/bundles/web-react.umd.min.js +3 -3
- package/bundles/web-react.umd.min.js.map +1 -1
- package/common/common.cjs.map +1 -1
- package/common/utilities/utilities.cjs.map +1 -1
- package/components/Accordion/Accordion.cjs +31 -23
- package/components/Accordion/Accordion.cjs.map +1 -1
- package/components/Accordion/Accordion.d.ts +2 -8
- package/components/Accordion/Accordion.js +8 -7
- package/components/Accordion/Accordion.js.map +1 -1
- package/components/Accordion/AccordionContext.d.ts +5 -5
- package/components/Accordion/AccordionContext.js.map +1 -1
- package/components/Accordion/AccordionHeader.d.ts +2 -8
- package/components/Accordion/AccordionHeader.js +8 -7
- package/components/Accordion/AccordionHeader.js.map +1 -1
- package/components/Accordion/AccordionItem.d.ts +2 -8
- package/components/Accordion/AccordionItem.js +8 -7
- package/components/Accordion/AccordionItem.js.map +1 -1
- package/components/Accordion/UncontrolledAccordion.d.ts +2 -3
- package/components/Accordion/UncontrolledAccordion.js +1 -2
- package/components/Accordion/UncontrolledAccordion.js.map +1 -1
- package/components/Accordion/useAccordion.d.ts +2 -2
- package/components/Accordion/useAccordion.js.map +1 -1
- package/components/Accordion/useAccordionStyleProps.d.ts +2 -3
- package/components/Accordion/useAccordionStyleProps.js.map +1 -1
- package/components/ActionGroup/ActionGroup.cjs +15 -9
- package/components/ActionGroup/ActionGroup.cjs.map +1 -1
- package/components/Alert/Alert.cjs +17 -7
- package/components/Alert/Alert.cjs.map +1 -1
- package/components/Alert/Alert.d.ts +2 -6
- package/components/Alert/Alert.js +9 -5
- package/components/Alert/Alert.js.map +1 -1
- package/components/Alert/useAlertIcon.d.ts +1 -1
- package/components/Alert/useAlertStyleProps.d.ts +4 -5
- package/components/Alert/useAlertStyleProps.js.map +1 -1
- package/components/Avatar/Avatar.cjs +41 -16
- package/components/Avatar/Avatar.cjs.map +1 -1
- package/components/Avatar/Avatar.d.ts +2 -5
- package/components/Avatar/Avatar.js +6 -6
- package/components/Avatar/Avatar.js.map +1 -1
- package/components/Avatar/useAvatarStyleProps.d.ts +4 -4
- package/components/Avatar/useAvatarStyleProps.js +5 -5
- package/components/Avatar/useAvatarStyleProps.js.map +1 -1
- package/components/Box/Box.cjs +15 -9
- package/components/Box/Box.cjs.map +1 -1
- package/components/Box/Box.d.ts +3 -8
- package/components/Box/Box.js +8 -7
- package/components/Box/Box.js.map +1 -1
- package/components/Box/useBoxStyleProps.d.ts +2 -2
- package/components/Breadcrumbs/Breadcrumbs.cjs +14 -6
- package/components/Breadcrumbs/Breadcrumbs.cjs.map +1 -1
- package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/components/Button/Button.cjs +19 -9
- package/components/Button/Button.cjs.map +1 -1
- package/components/Button/Button.d.ts +2 -2
- package/components/Button/Button.js +5 -3
- package/components/Button/Button.js.map +1 -1
- package/components/Button/useButtonStyleProps.d.ts +19 -6
- package/components/Button/useButtonStyleProps.js.map +1 -1
- package/components/ButtonLink/ButtonLink.d.ts +2 -2
- package/components/ButtonLink/ButtonLink.js +5 -3
- package/components/ButtonLink/ButtonLink.js.map +1 -1
- package/components/ButtonLink/useButtonLinkProps.d.ts +10 -4
- package/components/ButtonLink/useButtonLinkProps.js.map +1 -1
- package/components/ButtonLink/useButtonLinkStyleProps.d.ts +19 -6
- package/components/ButtonLink/useButtonLinkStyleProps.js.map +1 -1
- package/components/Card/Card.cjs +13 -6
- package/components/Card/Card.cjs.map +1 -1
- package/components/Card/Card.d.ts +1 -1
- package/components/Card/Card.js +2 -2
- package/components/Card/Card.js.map +1 -1
- package/components/Card/CardLink.d.ts +2 -4
- package/components/Card/CardLink.js +1 -0
- package/components/Card/CardLink.js.map +1 -1
- package/components/Card/CardTitle.d.ts +1 -1
- package/components/Card/useCardStyleProps.d.ts +2 -1
- package/components/Card/useCardStyleProps.js +2 -1
- package/components/Card/useCardStyleProps.js.map +1 -1
- package/components/Checkbox/Checkbox.cjs +11 -4
- package/components/Checkbox/Checkbox.cjs.map +1 -1
- package/components/Checkbox/Checkbox.d.ts +2 -3
- package/components/Checkbox/Checkbox.js +1 -0
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Collapse/Collapse.cjs +8 -3
- package/components/Collapse/Collapse.cjs.map +1 -1
- package/components/Container/Container.cjs +4 -2
- package/components/Container/Container.cjs.map +1 -1
- package/components/ControlButton/ControlButton.d.ts +2 -2
- package/components/ControlButton/ControlButton.js +5 -3
- package/components/ControlButton/ControlButton.js.map +1 -1
- package/components/ControlButton/useControlButtonStyleProps.d.ts +19 -6
- package/components/ControlButton/useControlButtonStyleProps.js.map +1 -1
- package/components/Dialog/Dialog.cjs +42 -11
- package/components/Dialog/Dialog.cjs.map +1 -1
- package/components/Dialog/Dialog.d.ts +3 -4
- package/components/Dialog/Dialog.js +4 -2
- package/components/Dialog/Dialog.js.map +1 -1
- package/components/Dialog/constants.d.ts +1 -0
- package/components/Dialog/constants.js +2 -0
- package/components/Dialog/constants.js.map +1 -0
- package/components/Dialog/useDialog.js +38 -9
- package/components/Dialog/useDialog.js.map +1 -1
- package/components/Divider/Divider.cjs +4 -2
- package/components/Divider/Divider.cjs.map +1 -1
- package/components/Drawer/Drawer.cjs +126 -26
- package/components/Drawer/Drawer.cjs.map +1 -1
- package/components/Drawer/DrawerCloseButton.js +4 -4
- package/components/Drawer/DrawerCloseButton.js.map +1 -1
- package/components/Drawer/DrawerPanel.d.ts +3 -3
- package/components/Drawer/DrawerPanel.js +5 -3
- package/components/Drawer/DrawerPanel.js.map +1 -1
- package/components/Drawer/constants.d.ts +0 -1
- package/components/Drawer/constants.js +0 -1
- package/components/Drawer/constants.js.map +1 -1
- package/components/Dropdown/Dropdown.cjs +8 -3
- package/components/Dropdown/Dropdown.cjs.map +1 -1
- package/components/Dropdown/DropdownTrigger.d.ts +1 -1
- package/components/EmptyState/EmptyState.cjs +43 -17
- package/components/EmptyState/EmptyState.cjs.map +1 -1
- package/components/Field/Field.cjs +10 -4
- package/components/Field/Field.cjs.map +1 -1
- package/components/Field/HelperText.d.ts +1 -1
- package/components/Field/Label.d.ts +1 -1
- package/components/Field/ValidationText.d.ts +1 -1
- package/components/Field/ValidationText.js +1 -1
- package/components/Field/ValidationText.js.map +1 -1
- package/components/Field/types.d.ts +3 -3
- package/components/FieldGroup/FieldGroup.cjs +10 -4
- package/components/FieldGroup/FieldGroup.cjs.map +1 -1
- package/components/FileUploader/FileUploader.cjs +77 -15
- package/components/FileUploader/FileUploader.cjs.map +1 -1
- package/components/FileUploader/FileUploaderAttachment.js +8 -5
- package/components/FileUploader/FileUploaderAttachment.js.map +1 -1
- package/components/FileUploader/FileUploaderList.js +5 -4
- package/components/FileUploader/FileUploaderList.js.map +1 -1
- package/components/FileUploader/constants.d.ts +0 -3
- package/components/FileUploader/constants.js +0 -3
- package/components/FileUploader/constants.js.map +1 -1
- package/components/Flex/Flex.cjs +15 -9
- package/components/Flex/Flex.cjs.map +1 -1
- package/components/Flex/Flex.d.ts +2 -8
- package/components/Flex/Flex.js +8 -7
- package/components/Flex/Flex.js.map +1 -1
- package/components/Flex/useFlexStyleProps.d.ts +3 -3
- package/components/Flex/useFlexStyleProps.js.map +1 -1
- package/components/Footer/Footer.cjs +17 -9
- package/components/Footer/Footer.cjs.map +1 -1
- package/components/Footer/Footer.d.ts +2 -6
- package/components/Footer/Footer.js +10 -7
- package/components/Footer/Footer.js.map +1 -1
- package/components/Grid/Grid.cjs +34 -23
- package/components/Grid/Grid.cjs.map +1 -1
- package/components/Grid/Grid.d.ts +2 -8
- package/components/Grid/Grid.js +8 -7
- package/components/Grid/Grid.js.map +1 -1
- package/components/Grid/GridItem.d.ts +2 -8
- package/components/Grid/GridItem.js +11 -7
- package/components/Grid/GridItem.js.map +1 -1
- package/components/Grid/useGridItemStyleProps.js +7 -6
- package/components/Grid/useGridItemStyleProps.js.map +1 -1
- package/components/Header/Header.cjs +71 -26
- package/components/Header/Header.cjs.map +1 -1
- package/components/Header/HeaderDialogContext.d.ts +2 -2
- package/components/Header/HeaderDialogContext.js.map +1 -1
- package/components/Header/HeaderDialogLink.d.ts +2 -3
- package/components/Header/HeaderDialogLink.js +5 -3
- package/components/Header/HeaderDialogLink.js.map +1 -1
- package/components/Header/HeaderLink.d.ts +2 -3
- package/components/Header/HeaderLink.js +5 -3
- package/components/Header/HeaderLink.js.map +1 -1
- package/components/Heading/Heading.cjs +8 -3
- package/components/Heading/Heading.cjs.map +1 -1
- package/components/Heading/Heading.d.ts +1 -1
- package/components/Heading/Heading.js.map +1 -1
- package/components/Heading/useHeadingStyleProps.d.ts +3 -3
- package/components/Heading/useHeadingStyleProps.js.map +1 -1
- package/components/Hidden/Hidden.d.ts +2 -8
- package/components/Hidden/Hidden.js +8 -7
- package/components/Hidden/Hidden.js.map +1 -1
- package/components/Icon/Icon.cjs +5 -2
- package/components/Icon/Icon.cjs.map +1 -1
- package/components/Icon/Icon.d.ts +2 -3
- package/components/Icon/Icon.js +1 -0
- package/components/Icon/Icon.js.map +1 -1
- package/components/Icon/useIconStyleProps.d.ts +6 -1322
- package/components/Icon/useIconStyleProps.js.map +1 -1
- package/components/IconBox/IconBox.cjs +21 -11
- package/components/IconBox/IconBox.cjs.map +1 -1
- package/components/IconBox/IconBox.d.ts +2 -6
- package/components/IconBox/IconBox.js +6 -3
- package/components/IconBox/IconBox.js.map +1 -1
- package/components/IconBox/useIconBoxStyleProps.d.ts +2 -2
- package/components/Item/Item.cjs +9 -3
- package/components/Item/Item.cjs.map +1 -1
- package/components/Item/Item.d.ts +1 -1
- package/components/Link/Link.cjs +13 -6
- package/components/Link/Link.cjs.map +1 -1
- package/components/Link/Link.d.ts +2 -3
- package/components/Link/Link.js +5 -3
- package/components/Link/Link.js.map +1 -1
- package/components/Link/useLinkStyleProps.d.ts +5 -7
- package/components/Link/useLinkStyleProps.js.map +1 -1
- package/components/Matrix/Matrix.cjs +8 -3
- package/components/Matrix/Matrix.cjs.map +1 -1
- package/components/Matrix/Matrix.d.ts +1 -1
- package/components/Matrix/Matrix.js +1 -1
- package/components/Matrix/Matrix.js.map +1 -1
- package/components/Matrix/{constant.js → constants.js} +1 -1
- package/components/Matrix/constants.js.map +1 -0
- package/components/Matrix/useMatrixStyleProps.js +1 -1
- package/components/Matrix/useMatrixStyleProps.js.map +1 -1
- package/components/Modal/Modal.cjs +134 -32
- package/components/Modal/Modal.cjs.map +1 -1
- package/components/Modal/ModalCloseButton.js +5 -3
- package/components/Modal/ModalCloseButton.js.map +1 -1
- package/components/Modal/ModalDialog.d.ts +4 -3
- package/components/Modal/ModalDialog.js +8 -5
- package/components/Modal/ModalDialog.js.map +1 -1
- package/components/Modal/ModalHeader.js +5 -4
- package/components/Modal/ModalHeader.js.map +1 -1
- package/components/Modal/useModalDialogStyleProps.d.ts +11 -833
- package/components/Modal/useModalDialogStyleProps.js.map +1 -1
- package/components/Navigation/Navigation.cjs +47 -19
- package/components/Navigation/Navigation.cjs.map +1 -1
- package/components/Navigation/NavigationAction.d.ts +3 -3
- package/components/Navigation/NavigationAction.js +1 -0
- package/components/Navigation/NavigationAction.js.map +1 -1
- package/components/Navigation/NavigationAvatar.d.ts +3 -3
- package/components/Navigation/NavigationAvatar.js +5 -3
- package/components/Navigation/NavigationAvatar.js.map +1 -1
- package/components/NoSsr/NoSsr.cjs.map +1 -1
- package/components/Pagination/Pagination.cjs +106 -32
- package/components/Pagination/Pagination.cjs.map +1 -1
- package/components/Pagination/PaginationButtonLink.d.ts +2 -3
- package/components/Pagination/PaginationButtonLink.js +6 -5
- package/components/Pagination/PaginationButtonLink.js.map +1 -1
- package/components/Pagination/PaginationLink.d.ts +3 -3
- package/components/Pagination/PaginationLink.js +8 -6
- package/components/Pagination/PaginationLink.js.map +1 -1
- package/components/Pagination/PaginationLinkNext.d.ts +2 -3
- package/components/Pagination/PaginationLinkNext.js +6 -3
- package/components/Pagination/PaginationLinkNext.js.map +1 -1
- package/components/Pagination/PaginationLinkPrevious.d.ts +2 -3
- package/components/Pagination/PaginationLinkPrevious.js +6 -3
- package/components/Pagination/PaginationLinkPrevious.js.map +1 -1
- package/components/Pagination/UncontrolledPagination.js +9 -5
- package/components/Pagination/UncontrolledPagination.js.map +1 -1
- package/components/Pagination/index.d.ts +0 -1
- package/components/Pagination/index.js +0 -1
- package/components/Pagination/index.js.map +1 -1
- package/components/PartnerLogo/PartnerLogo.cjs +4 -2
- package/components/PartnerLogo/PartnerLogo.cjs.map +1 -1
- package/components/Pill/Pill.cjs +8 -3
- package/components/Pill/Pill.cjs.map +1 -1
- package/components/Pill/Pill.d.ts +1 -1
- package/components/Pill/usePillStyleProps.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.cjs +146 -39
- package/components/PricingPlan/PricingPlan.cjs.map +1 -1
- package/components/PricingPlan/PricingPlan.d.ts +1 -1
- package/components/PricingPlan/PricingPlanBody.d.ts +1 -1
- package/components/PricingPlan/PricingPlanFooter.d.ts +1 -1
- package/components/PricingPlan/PricingPlanHeader.d.ts +1 -1
- package/components/ProductLogo/ProductLogo.cjs +4 -2
- package/components/ProductLogo/ProductLogo.cjs.map +1 -1
- package/components/Radio/Radio.cjs +10 -3
- package/components/Radio/Radio.cjs.map +1 -1
- package/components/Radio/Radio.d.ts +2 -3
- package/components/Radio/Radio.js +1 -0
- package/components/Radio/Radio.js.map +1 -1
- package/components/ScrollView/ScrollView.cjs +14 -6
- package/components/ScrollView/ScrollView.cjs.map +1 -1
- package/components/Section/Section.cjs +16 -9
- package/components/Section/Section.cjs.map +1 -1
- package/components/Section/Section.d.ts +2 -6
- package/components/Section/Section.js +8 -6
- package/components/Section/Section.js.map +1 -1
- package/components/Section/useSectionSizeProps.d.ts +4 -6
- package/components/Section/useSectionSizeProps.js +1 -1
- package/components/Section/useSectionSizeProps.js.map +1 -1
- package/components/Section/useSectionStyleProps.d.ts +3 -5
- package/components/Section/useSectionStyleProps.js.map +1 -1
- package/components/SegmentedControl/SegmentedControl.cjs +13 -6
- package/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
- package/components/SegmentedControl/SegmentedControlItem.d.ts +2 -3
- package/components/SegmentedControl/SegmentedControlItem.js +5 -3
- package/components/SegmentedControl/SegmentedControlItem.js.map +1 -1
- package/components/Select/Select.cjs +11 -4
- package/components/Select/Select.cjs.map +1 -1
- package/components/Select/Select.d.ts +2 -3
- package/components/Select/Select.js +1 -0
- package/components/Select/Select.js.map +1 -1
- package/components/Skeleton/Skeleton.cjs +8 -3
- package/components/Skeleton/Skeleton.cjs.map +1 -1
- package/components/Skeleton/SkeletonHeading.d.ts +1 -1
- package/components/Skeleton/SkeletonShape.d.ts +1 -1
- package/components/Skeleton/SkeletonText.d.ts +1 -1
- package/components/Skeleton/useSkeletonShapeStyleProps.d.ts +10 -848
- package/components/Skeleton/useSkeletonShapeStyleProps.js.map +1 -1
- package/components/Skeleton/useSkeletonStyleProps.d.ts +1 -1
- package/components/SkipLink/SkipLink.cjs +5 -2
- package/components/SkipLink/SkipLink.cjs.map +1 -1
- package/components/SkipLink/SkipLink.d.ts +3 -3
- package/components/SkipLink/SkipLink.js +1 -0
- package/components/SkipLink/SkipLink.js.map +1 -1
- package/components/Slider/Slider.cjs +11 -4
- package/components/Slider/Slider.cjs.map +1 -1
- package/components/Slider/Slider.d.ts +2 -3
- package/components/Slider/Slider.js +1 -0
- package/components/Slider/Slider.js.map +1 -1
- package/components/Spinner/Spinner.cjs +5 -2
- package/components/Spinner/Spinner.cjs.map +1 -1
- package/components/SplitButton/SplitButton.cjs +81 -15
- package/components/SplitButton/SplitButton.cjs.map +1 -1
- package/components/SplitButton/UncontrolledSplitButton.js +6 -5
- package/components/SplitButton/UncontrolledSplitButton.js.map +1 -1
- package/components/Stack/Stack.cjs +27 -13
- package/components/Stack/Stack.cjs.map +1 -1
- package/components/Stack/Stack.d.ts +2 -6
- package/components/Stack/Stack.js +8 -5
- package/components/Stack/Stack.js.map +1 -1
- package/components/Stack/StackItem.d.ts +2 -6
- package/components/Stack/StackItem.js +11 -5
- package/components/Stack/StackItem.js.map +1 -1
- package/components/Stack/useStackStyleProps.d.ts +19 -10
- package/components/Stack/useStackStyleProps.js.map +1 -1
- package/components/Tabs/TabLink.d.ts +2 -3
- package/components/Tabs/TabLink.js +5 -3
- package/components/Tabs/TabLink.js.map +1 -1
- package/components/Tabs/Tabs.cjs +13 -6
- package/components/Tabs/Tabs.cjs.map +1 -1
- package/components/Tag/Tag.cjs +13 -6
- package/components/Tag/Tag.cjs.map +1 -1
- package/components/Tag/Tag.d.ts +3 -3
- package/components/Tag/Tag.js +5 -3
- package/components/Tag/Tag.js.map +1 -1
- package/components/Tag/useTagStyleProps.d.ts +1 -1
- package/components/Text/Text.cjs +8 -3
- package/components/Text/Text.cjs.map +1 -1
- package/components/Text/Text.d.ts +1 -1
- package/components/Text/Text.js.map +1 -1
- package/components/Text/useTextStyleProps.d.ts +3 -3
- package/components/Text/useTextStyleProps.js.map +1 -1
- package/components/TextArea/TextArea.cjs +74 -12
- package/components/TextArea/TextArea.cjs.map +1 -1
- package/components/TextArea/TextArea.d.ts +2 -3
- package/components/TextArea/TextArea.js +1 -0
- package/components/TextArea/TextArea.js.map +1 -1
- package/components/TextField/TextField.cjs +74 -12
- package/components/TextField/TextField.cjs.map +1 -1
- package/components/TextField/TextField.d.ts +2 -3
- package/components/TextField/TextField.js +1 -0
- package/components/TextField/TextField.js.map +1 -1
- package/components/TextFieldBase/TextFieldBase.cjs +73 -12
- package/components/TextFieldBase/TextFieldBase.cjs.map +1 -1
- package/components/TextFieldBase/TextFieldBase.d.ts +2 -6
- package/components/TextFieldBase/TextFieldBase.js +1 -0
- package/components/TextFieldBase/TextFieldBase.js.map +1 -1
- package/components/TextFieldBase/TextFieldBaseInput.d.ts +2 -3
- package/components/TextFieldBase/TextFieldBaseInput.js +3 -2
- package/components/TextFieldBase/TextFieldBaseInput.js.map +1 -1
- package/components/TextFieldBase/TextFieldBasePasswordToggle.js +3 -4
- package/components/TextFieldBase/TextFieldBasePasswordToggle.js.map +1 -1
- package/components/Timeline/Timeline.cjs +8 -3
- package/components/Timeline/Timeline.cjs.map +1 -1
- package/components/Timeline/Timeline.d.ts +1 -1
- package/components/Timeline/TimelineStep.d.ts +1 -1
- package/components/Toast/Toast.cjs +79 -12
- package/components/Toast/Toast.cjs.map +1 -1
- package/components/Toast/ToastBar.js +6 -4
- package/components/Toast/ToastBar.js.map +1 -1
- package/components/Toast/ToastBarLink.d.ts +2 -3
- package/components/Toast/ToastBarLink.js +5 -3
- package/components/Toast/ToastBarLink.js.map +1 -1
- package/components/Toast/UncontrolledToast.js +5 -3
- package/components/Toast/UncontrolledToast.js.map +1 -1
- package/components/Toast/constants.d.ts +0 -1
- package/components/Toast/constants.js +0 -1
- package/components/Toast/constants.js.map +1 -1
- package/components/Toggle/Toggle.cjs +11 -4
- package/components/Toggle/Toggle.cjs.map +1 -1
- package/components/Toggle/Toggle.d.ts +2 -3
- package/components/Toggle/Toggle.js +1 -0
- package/components/Toggle/Toggle.js.map +1 -1
- package/components/Tooltip/Tooltip.cjs +78 -10
- package/components/Tooltip/Tooltip.cjs.map +1 -1
- package/components/Tooltip/Tooltip.d.ts +2 -6
- package/components/Tooltip/Tooltip.js +9 -6
- package/components/Tooltip/Tooltip.js.map +1 -1
- package/components/Tooltip/TooltipCloseButton.js +5 -3
- package/components/Tooltip/TooltipCloseButton.js.map +1 -1
- package/components/Tooltip/useTooltipStyleProps.d.ts +20 -8
- package/components/Tooltip/useTooltipStyleProps.js.map +1 -1
- package/components/Truncate/Truncate.cjs +8 -3
- package/components/Truncate/Truncate.cjs.map +1 -1
- package/components/Truncate/Truncate.d.ts +1 -1
- package/components/Truncate/useTruncateStyleProps.d.ts +3 -3
- package/components/UNSTABLE_Header/UNSTABLE_Header.cjs +13 -6
- package/components/UNSTABLE_Header/UNSTABLE_Header.cjs.map +1 -1
- package/components/UNSTABLE_Header/UNSTABLE_HeaderLogo.d.ts +2 -3
- package/components/UNSTABLE_Header/UNSTABLE_HeaderLogo.js +5 -3
- package/components/UNSTABLE_Header/UNSTABLE_HeaderLogo.js.map +1 -1
- package/components/VisuallyHidden/VisuallyHidden.cjs +8 -3
- package/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
- package/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/components/VisuallyHidden/useVisuallyHiddenProps.d.ts +3 -3
- package/components/components.cjs +470 -293
- package/components/components.cjs.map +1 -1
- package/constants/constants.cjs.map +1 -1
- package/hooks/hooks.cjs +62 -2
- package/hooks/hooks.cjs.map +1 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +1 -0
- package/hooks/index.js.map +1 -1
- package/hooks/useI18n.d.ts +6 -0
- package/hooks/useI18n.js +9 -0
- package/hooks/useI18n.js.map +1 -0
- package/hooks/useStyleUtilities.js +4 -2
- package/hooks/useStyleUtilities.js.map +1 -1
- package/index.cjs +474 -293
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +28 -26
- package/spirit-web-react.cjs +475 -294
- package/spirit-web-react.cjs.map +1 -1
- package/spirit-web-react.min.cjs +1 -1
- package/translations/defaults.d.ts +29 -0
- package/translations/defaults.js +30 -0
- package/translations/defaults.js.map +1 -0
- package/translations/index.d.ts +3 -0
- package/translations/index.js +4 -0
- package/translations/index.js.map +1 -0
- package/translations/replaceTranslationParams.d.ts +1 -0
- package/translations/replaceTranslationParams.js +5 -0
- package/translations/replaceTranslationParams.js.map +1 -0
- package/translations/resolveTranslationKey.d.ts +10 -0
- package/translations/resolveTranslationKey.js +14 -0
- package/translations/resolveTranslationKey.js.map +1 -0
- package/types/accordion.d.ts +18 -18
- package/types/alert.d.ts +4 -6
- package/types/avatar.d.ts +6 -6
- package/types/box.d.ts +4 -6
- package/types/breadcrumbs.d.ts +2 -2
- package/types/button.d.ts +9 -11
- package/types/card.d.ts +9 -9
- package/types/card.js.map +1 -1
- package/types/controlButton.d.ts +8 -7
- package/types/drawer.d.ts +3 -3
- package/types/flex.d.ts +7 -8
- package/types/footer.d.ts +6 -7
- package/types/grid.d.ts +14 -12
- package/types/header.d.ts +16 -18
- package/types/heading.d.ts +4 -4
- package/types/hidden.d.ts +7 -6
- package/types/icon.d.ts +5 -3
- package/types/iconBox.d.ts +7 -6
- package/types/item.d.ts +3 -3
- package/types/link.d.ts +9 -8
- package/types/link.js.map +1 -1
- package/types/matrix.d.ts +3 -3
- package/types/modal.d.ts +7 -5
- package/types/navigation.d.ts +10 -5
- package/types/pill.d.ts +3 -3
- package/types/pricingPlan.d.ts +2 -2
- package/types/section.d.ts +6 -5
- package/types/shared/dialogs.d.ts +6 -3
- package/types/shared/element.d.ts +5 -7
- package/types/shared/index.d.ts +4 -3
- package/types/shared/index.js +1 -0
- package/types/shared/index.js.map +1 -1
- package/types/shared/polymorphic.d.ts +13 -0
- package/types/shared/polymorphic.js +2 -0
- package/types/shared/polymorphic.js.map +1 -0
- package/types/shared/shared.cjs.map +1 -1
- package/types/skeleton.d.ts +9 -6
- package/types/spinner.d.ts +1 -1
- package/types/stack.d.ts +12 -10
- package/types/tabs.d.ts +6 -5
- package/types/tag.d.ts +3 -3
- package/types/text.d.ts +3 -3
- package/types/tooltip.d.ts +23 -21
- package/types/tooltip.js.map +1 -1
- package/types/types.cjs.map +1 -1
- package/types/unstableHeader.d.ts +9 -7
- package/types/visuallyHidden.d.ts +4 -4
- package/utils/mergeStyleProps.js +4 -1
- package/utils/mergeStyleProps.js.map +1 -1
- package/utils/utils.cjs +4 -1
- package/utils/utils.cjs.map +1 -1
- package/components/Matrix/constant.js.map +0 -1
- package/components/Modal/constants.d.ts +0 -1
- package/components/Modal/constants.js +0 -2
- package/components/Modal/constants.js.map +0 -1
- package/components/Pagination/constants.d.ts +0 -3
- package/components/Pagination/constants.js +0 -4
- package/components/Pagination/constants.js.map +0 -1
- package/components/SplitButton/constants.d.ts +0 -1
- package/components/SplitButton/constants.js +0 -2
- package/components/SplitButton/constants.js.map +0 -1
- package/components/TextFieldBase/constants.d.ts +0 -2
- package/components/TextFieldBase/constants.js +0 -3
- package/components/TextFieldBase/constants.js.map +0 -1
- /package/components/Matrix/{constant.d.ts → constants.d.ts} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const defaultLabels: {
|
|
2
|
+
common: {
|
|
3
|
+
close: string;
|
|
4
|
+
edit: string;
|
|
5
|
+
remove: string;
|
|
6
|
+
};
|
|
7
|
+
breadcrumbs: {
|
|
8
|
+
back: string;
|
|
9
|
+
};
|
|
10
|
+
fileUploader: {
|
|
11
|
+
edit: string;
|
|
12
|
+
remove: string;
|
|
13
|
+
attachments: string;
|
|
14
|
+
};
|
|
15
|
+
pagination: {
|
|
16
|
+
next: string;
|
|
17
|
+
previous: string;
|
|
18
|
+
goToPage: string;
|
|
19
|
+
};
|
|
20
|
+
textField: {
|
|
21
|
+
password: {
|
|
22
|
+
show: string;
|
|
23
|
+
hide: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
splitButton: {
|
|
27
|
+
dropdown: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const defaultLabels = {
|
|
2
|
+
common: {
|
|
3
|
+
close: 'Close',
|
|
4
|
+
edit: 'Edit',
|
|
5
|
+
remove: 'Remove',
|
|
6
|
+
},
|
|
7
|
+
breadcrumbs: {
|
|
8
|
+
back: 'Go back',
|
|
9
|
+
},
|
|
10
|
+
fileUploader: {
|
|
11
|
+
edit: 'Edit',
|
|
12
|
+
remove: 'Remove',
|
|
13
|
+
attachments: 'Attachments',
|
|
14
|
+
},
|
|
15
|
+
pagination: {
|
|
16
|
+
next: 'Next',
|
|
17
|
+
previous: 'Previous',
|
|
18
|
+
goToPage: 'Go to page',
|
|
19
|
+
},
|
|
20
|
+
textField: {
|
|
21
|
+
password: {
|
|
22
|
+
show: 'Show password',
|
|
23
|
+
hide: 'Hide password',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
splitButton: {
|
|
27
|
+
dropdown: 'More',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/translations/defaults.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE;QACN,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;KACjB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,SAAS;KAChB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,aAAa;KAC3B;IACD,UAAU,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,YAAY;KACvB;IACD,SAAS,EAAE;QACT,QAAQ,EAAE;YACR,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,eAAe;SACtB;KACF;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/translations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const replaceTranslationParams: (translation: string, params: Record<string, unknown>) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const replaceTranslationParams = (translation, params) => Object.entries(params).reduce((result, [paramKey, value]) => {
|
|
2
|
+
const safeParamKey = paramKey.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
3
|
+
return result.replace(new RegExp(`\\{${safeParamKey}\\}`, 'g'), String(value));
|
|
4
|
+
}, translation);
|
|
5
|
+
//# sourceMappingURL=replaceTranslationParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replaceTranslationParams.js","sourceRoot":"","sources":["../../src/translations/replaceTranslationParams.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAmB,EAAE,MAA+B,EAAU,EAAE,CACvG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE;IAC1D,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAErE,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,MAAM,YAAY,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACjF,CAAC,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Segment = string;
|
|
2
|
+
type TwoSegments = `${Segment}.${Segment}`;
|
|
3
|
+
type ThreeSegments = `${TwoSegments}.${Segment}`;
|
|
4
|
+
type FourSegments = `${ThreeSegments}.${Segment}`;
|
|
5
|
+
type DotPath = Segment | TwoSegments | ThreeSegments | FourSegments;
|
|
6
|
+
type Translations = {
|
|
7
|
+
[key: string]: string | Translations;
|
|
8
|
+
};
|
|
9
|
+
export declare const resolveTranslationKey: (obj: Translations, path: DotPath) => string;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const resolveTranslationKey = (obj, path) => {
|
|
2
|
+
const keys = path.split('.');
|
|
3
|
+
let current = obj;
|
|
4
|
+
for (const key of keys) {
|
|
5
|
+
if (typeof current === 'object' && current !== null && key in current) {
|
|
6
|
+
current = current[key];
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
return path;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return typeof current === 'string' ? current : path;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=resolveTranslationKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveTranslationKey.js","sourceRoot":"","sources":["../../src/translations/resolveTranslationKey.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAiB,EAAE,IAAa,EAAU,EAAE;IAChF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,OAAO,GAA0B,GAAG,CAAC;IAEzC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;YACtE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACtD,CAAC,CAAC"}
|
package/types/accordion.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { type ElementType, type ReactNode } from 'react';
|
|
2
|
-
import { type ChildrenProps, type
|
|
2
|
+
import { type ChildrenProps, type PolymorphicComponentProps, type StyleProps } from './shared';
|
|
3
3
|
export type AccordionOpenStateType = string | string[] | undefined;
|
|
4
|
-
export interface
|
|
4
|
+
export interface AccordionState {
|
|
5
5
|
open: AccordionOpenStateType;
|
|
6
6
|
toggle: (id: string) => void;
|
|
7
7
|
}
|
|
8
8
|
export interface AccordionItemContextProps {
|
|
9
9
|
id: string;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface AccordionStateProps {
|
|
12
|
+
defaultOpen?: AccordionOpenStateType;
|
|
13
|
+
stayOpen?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface AccordionBaseProps extends ChildrenProps, StyleProps {
|
|
12
16
|
}
|
|
13
|
-
export interface
|
|
17
|
+
export interface AccordionStyleProps extends AccordionBaseProps, AccordionState {
|
|
14
18
|
}
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
export
|
|
19
|
+
export interface AccordionProps extends AccordionStyleProps {
|
|
20
|
+
}
|
|
21
|
+
export interface AccordionHeaderProps extends AccordionBaseProps {
|
|
18
22
|
slot?: ReactNode;
|
|
19
|
-
} & BaseAccordionProps;
|
|
20
|
-
export type SpiritAccordionHeaderProps<T extends ElementType = 'h3'> = AccordionHeaderProps<T> & SpiritPolymorphicElementPropsWithRef<T, AccordionHeaderProps<T>>;
|
|
21
|
-
export interface AccordionItemBaseProps extends BaseAccordionProps, AccordionItemContextProps {
|
|
22
23
|
}
|
|
23
|
-
export
|
|
24
|
-
export type SpiritAccordionItemProps<T extends ElementType = 'article'> = AccordionItemProps<T> & SpiritPolymorphicElementPropsWithRef<T, AccordionItemProps<T>>;
|
|
25
|
-
export interface AccordionContentProps extends BaseAccordionProps {
|
|
24
|
+
export interface AccordionItemProps extends AccordionBaseProps, AccordionItemContextProps {
|
|
26
25
|
}
|
|
27
|
-
export interface
|
|
28
|
-
defaultOpen?: AccordionOpenStateType;
|
|
29
|
-
stayOpen?: boolean;
|
|
26
|
+
export interface AccordionContentProps extends AccordionBaseProps {
|
|
30
27
|
}
|
|
31
|
-
export type UncontrolledAccordionProps
|
|
32
|
-
export type
|
|
28
|
+
export type UncontrolledAccordionProps = AccordionBaseProps & AccordionStateProps;
|
|
29
|
+
export type SpiritAccordionProps<E extends ElementType = 'section'> = PolymorphicComponentProps<E, AccordionProps>;
|
|
30
|
+
export type SpiritAccordionHeaderProps<E extends ElementType = 'h3'> = PolymorphicComponentProps<E, AccordionHeaderProps>;
|
|
31
|
+
export type SpiritAccordionItemProps<E extends ElementType = 'article'> = PolymorphicComponentProps<E, AccordionItemProps>;
|
|
32
|
+
export type SpiritUncontrolledAccordionProps<E extends ElementType = 'section'> = PolymorphicComponentProps<E, UncontrolledAccordionProps>;
|
package/types/alert.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { type ElementType } from 'react';
|
|
2
|
-
import type { ChildrenProps, EmotionColorNamesType,
|
|
3
|
-
export interface
|
|
4
|
-
elementType?: T;
|
|
2
|
+
import type { ChildrenProps, EmotionColorNamesType, SpiritPolymorphicComponentPropWithRef, StyleProps } from './shared';
|
|
3
|
+
export interface AlertBaseProps extends ChildrenProps, StyleProps {
|
|
5
4
|
}
|
|
6
|
-
export interface AlertProps
|
|
7
|
-
}
|
|
8
|
-
export interface SpiritAlertProps<T extends ElementType = 'div', C = void> extends AriaAlertElementTypeProps<T>, AlertProps {
|
|
5
|
+
export interface AlertProps<C = void> extends AlertBaseProps {
|
|
9
6
|
color?: EmotionColorNamesType | C;
|
|
10
7
|
iconName?: string;
|
|
11
8
|
isCentered?: boolean;
|
|
12
9
|
}
|
|
10
|
+
export type SpiritAlertProps<E extends ElementType = 'div', C = void> = SpiritPolymorphicComponentPropWithRef<E, AlertProps<C>>;
|
package/types/avatar.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type ElementType } from 'react';
|
|
2
|
-
import { type ChildrenProps, type SizeExtendedDictionaryType, type SpiritPolymorphicComponentPropWithRef, type StyleProps } from './shared';
|
|
3
|
-
export type
|
|
2
|
+
import { type ChildrenProps, type SingleOrResponsive, type SizeExtendedDictionaryType, type SpiritPolymorphicComponentPropWithRef, type StyleProps } from './shared';
|
|
3
|
+
export type SpiritAvatarSizeType<S> = SingleOrResponsive<SizeExtendedDictionaryType<S> | S>;
|
|
4
4
|
export interface AvatarBaseProps extends ChildrenProps, StyleProps {
|
|
5
5
|
}
|
|
6
|
-
export interface AvatarStyleProps<S =
|
|
6
|
+
export interface AvatarStyleProps<S = string> extends AvatarBaseProps {
|
|
7
7
|
isSquare?: boolean;
|
|
8
|
-
size?:
|
|
8
|
+
size?: SpiritAvatarSizeType<S>;
|
|
9
9
|
}
|
|
10
|
-
export type AvatarProps<S =
|
|
11
|
-
export type SpiritAvatarProps<E extends ElementType = 'div', S =
|
|
10
|
+
export type AvatarProps<S = string> = AvatarStyleProps<S>;
|
|
11
|
+
export type SpiritAvatarProps<E extends ElementType = 'div', S = string> = SpiritPolymorphicComponentPropWithRef<E, AvatarProps<S>>;
|
package/types/box.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ElementType
|
|
2
|
-
import { type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type BackgroundGradientsDictionaryType, type BackgroundNeutralColorsType, type BorderAccentColorsType, type BorderColorsDictionaryType, type BorderEmotionColorsType, type BorderRadiiTokenType, type BorderStylesDictionaryType, type BorderWidthsDictionaryType, type ChildrenProps, type
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type BackgroundGradientsDictionaryType, type BackgroundNeutralColorsType, type BorderAccentColorsType, type BorderColorsDictionaryType, type BorderEmotionColorsType, type BorderRadiiTokenType, type BorderStylesDictionaryType, type BorderWidthsDictionaryType, type ChildrenProps, type PolymorphicComponentProps, type SingleOrResponsive, type SpaceToken, type StyleProps, type TextColorProps } from './shared';
|
|
3
3
|
export type BoxBackgroundColorsType = BackgroundColorsDictionaryType | BackgroundAccentColorsType | BackgroundEmotionColorsType | BackgroundNeutralColorsType;
|
|
4
4
|
export interface BoxBaseProps extends ChildrenProps, TextColorProps, StyleProps {
|
|
5
5
|
backgroundColor?: BoxBackgroundColorsType;
|
|
@@ -16,7 +16,5 @@ export interface BoxBaseProps extends ChildrenProps, TextColorProps, StyleProps
|
|
|
16
16
|
paddingLeft?: SingleOrResponsive<SpaceToken>;
|
|
17
17
|
paddingRight?: SingleOrResponsive<SpaceToken>;
|
|
18
18
|
}
|
|
19
|
-
export type BoxProps<E extends ElementType> =
|
|
20
|
-
|
|
21
|
-
} & BoxBaseProps;
|
|
22
|
-
export type SpiritBoxProps<E extends ElementType = 'div'> = BoxProps<E> & SpiritPolymorphicElementPropsWithRef<E, BoxProps<E>>;
|
|
19
|
+
export type BoxProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, BoxBaseProps>;
|
|
20
|
+
export type SpiritBoxProps<E extends ElementType = 'div'> = BoxProps<E>;
|
package/types/breadcrumbs.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export interface SpiritBreadcrumbsItemProps extends ChildrenProps {
|
|
|
12
12
|
isCurrent?: boolean;
|
|
13
13
|
isGoBackOnly?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export interface AriaBreadcrumbsElementTypeProps<
|
|
16
|
-
elementType?:
|
|
15
|
+
export interface AriaBreadcrumbsElementTypeProps<E extends ElementType = 'nav'> {
|
|
16
|
+
elementType?: E;
|
|
17
17
|
}
|
|
18
18
|
export interface BreadcrumbsStyleProps extends StyleProps, TransferProps {
|
|
19
19
|
isGoBackOnly?: boolean;
|
package/types/button.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { ButtonSizesType, ButtonType, ChildrenProps, ClickEvents, ComponentButtonColorNamesType, EmotionColorNamesType, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import type { ButtonSizesType, ButtonType, ChildrenProps, ClickEvents, ComponentButtonColorNamesType, EmotionColorNamesType, PolymorphicComponentProps, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
|
|
3
3
|
export type ButtonColor<C> = ComponentButtonColorNamesType<C> | EmotionColorNamesType<C>;
|
|
4
4
|
export type ButtonSize<S> = keyof S extends never ? SizesDictionaryType : ButtonSizesType | S;
|
|
5
|
-
export interface ButtonBaseProps
|
|
5
|
+
export interface ButtonBaseProps extends ChildrenProps, StyleProps, ClickEvents {
|
|
6
|
+
}
|
|
7
|
+
export interface ButtonStyleProps<C = void, S = void> extends ButtonBaseProps {
|
|
6
8
|
color?: ButtonColor<C>;
|
|
7
9
|
isDisabled?: boolean;
|
|
8
10
|
isBlock?: boolean;
|
|
@@ -10,12 +12,8 @@ export interface ButtonBaseProps<C = void, S = void> extends ChildrenProps, Styl
|
|
|
10
12
|
isSymmetrical?: SingleOrResponsive<boolean>;
|
|
11
13
|
size?: ButtonSize<S>;
|
|
12
14
|
}
|
|
13
|
-
export
|
|
14
|
-
elementType?: E;
|
|
15
|
+
export interface ButtonProps<C = void, S = void> extends ButtonStyleProps<C, S> {
|
|
15
16
|
type?: ButtonType;
|
|
16
|
-
}
|
|
17
|
-
export type
|
|
18
|
-
|
|
19
|
-
} & ButtonBaseProps<C, S>;
|
|
20
|
-
export type SpiritButtonProps<E extends ElementType = 'button', C = void, S = void> = ButtonProps<E, C, S> & ComponentPropsWithRef<E>;
|
|
21
|
-
export type SpiritButtonLinkProps<E extends ElementType = 'a', C = void, S = void> = ButtonLinkProps<E, C, S> & ComponentPropsWithRef<E>;
|
|
17
|
+
}
|
|
18
|
+
export type SpiritButtonProps<E extends ElementType = 'button', C = void, S = void> = PolymorphicComponentProps<E, ButtonProps<C, S>>;
|
|
19
|
+
export type SpiritButtonLinkProps<E extends ElementType = 'a', C = void, S = void> = PolymorphicComponentProps<E, Omit<ButtonProps<C, S>, 'type'>>;
|
package/types/card.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ElementType
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
2
|
import { type ObjectFit } from '../constants';
|
|
3
|
-
import { type AlignmentXDictionaryType, type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type ChildrenProps, type DirectionExtendedDictionaryType, type StyleProps, type TransferProps } from './shared';
|
|
3
|
+
import { type AlignmentXDictionaryType, type AlignmentYDictionaryType, type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type ChildrenProps, type DirectionExtendedDictionaryType, type SingleOrResponsive, type StyleProps, type TransferProps } from './shared';
|
|
4
4
|
export declare const CardSizes: {
|
|
5
5
|
readonly AUTO: "auto";
|
|
6
6
|
readonly SMALL: "small";
|
|
@@ -8,17 +8,17 @@ export declare const CardSizes: {
|
|
|
8
8
|
readonly LARGE: "large";
|
|
9
9
|
};
|
|
10
10
|
export type CardSizesDictionaryKeys = keyof typeof CardSizes;
|
|
11
|
-
export type CardSizesDictionaryType<
|
|
12
|
-
export type CardAlignmentXType = NonNullable<AlignmentXDictionaryType
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
elementType?: T | JSXElementConstructor<unknown>;
|
|
11
|
+
export type CardSizesDictionaryType<C = undefined> = (typeof CardSizes)[CardSizesDictionaryKeys] | C;
|
|
12
|
+
export type CardAlignmentXType = SingleOrResponsive<NonNullable<AlignmentXDictionaryType>>;
|
|
13
|
+
export type CardAlignmentYType = SingleOrResponsive<NonNullable<AlignmentYDictionaryType>>;
|
|
14
|
+
export interface CardElementTypeProps<E extends ElementType = 'article'> {
|
|
15
|
+
elementType?: E;
|
|
17
16
|
}
|
|
18
17
|
export type CardDirectionType = NonNullable<DirectionExtendedDictionaryType> | {
|
|
19
18
|
[key: string]: NonNullable<DirectionExtendedDictionaryType>;
|
|
20
19
|
};
|
|
21
|
-
export interface CardProps<
|
|
20
|
+
export interface CardProps<E extends ElementType = 'article'> extends CardElementTypeProps<E> {
|
|
21
|
+
alignmentY?: CardAlignmentYType;
|
|
22
22
|
direction?: CardDirectionType;
|
|
23
23
|
isBoxed?: boolean;
|
|
24
24
|
}
|
package/types/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/types/card.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/types/card.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAcrD,MAAM,CAAC,MAAM,SAAS,GAAG,gCACpB,KAAK,KACR,IAAI,EAAE,MAAM,GACJ,CAAC"}
|
package/types/controlButton.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { ButtonType, ChildrenProps, ClickEvents, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import type { ButtonType, ChildrenProps, ClickEvents, PolymorphicComponentProps, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
|
|
3
3
|
export type ControlButtonSize<S> = keyof S extends never ? SizesDictionaryType : 'small' | 'medium' | 'large' | S;
|
|
4
|
-
export interface ControlButtonBaseProps
|
|
4
|
+
export interface ControlButtonBaseProps extends ChildrenProps, StyleProps, ClickEvents {
|
|
5
|
+
}
|
|
6
|
+
export interface ControlButtonStyleProps<S = void> extends ControlButtonBaseProps {
|
|
5
7
|
isDisabled?: boolean;
|
|
6
8
|
isSubtle?: boolean;
|
|
7
9
|
isSymmetrical?: SingleOrResponsive<boolean>;
|
|
8
10
|
size?: ControlButtonSize<S>;
|
|
9
11
|
}
|
|
10
|
-
export
|
|
11
|
-
elementType?: E;
|
|
12
|
+
export interface ControlButtonProps<S = void> extends ControlButtonStyleProps<S> {
|
|
12
13
|
type?: ButtonType;
|
|
13
|
-
}
|
|
14
|
-
export type SpiritControlButtonProps<E extends ElementType = 'button', S = void> =
|
|
14
|
+
}
|
|
15
|
+
export type SpiritControlButtonProps<E extends ElementType = 'button', S = void> = PolymorphicComponentProps<E, ControlButtonProps<S>>;
|
package/types/drawer.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef, type ElementType } from 'react';
|
|
1
|
+
import { type ComponentPropsWithRef, type ElementType, type SyntheticEvent } from 'react';
|
|
2
2
|
import { type AlignmentX } from '../constants';
|
|
3
3
|
import { type ButtonColor, type ButtonSize } from './button';
|
|
4
4
|
import { type IconBoxSize } from './icon';
|
|
5
|
-
import { type ChildrenProps, type
|
|
5
|
+
import { type ChildrenProps, type OmittedExtendedUnsafeStyleProps, type SpiritButtonElementProps, type SpiritDialogElementProps, type StyleProps } from './shared';
|
|
6
6
|
export type DrawerAlignmentXType = (typeof AlignmentX)['LEFT' | 'RIGHT'];
|
|
7
7
|
export type DrawerPanelElementType = 'aside' | 'form';
|
|
8
8
|
export type DrawerPanelHandlingProps = {
|
|
9
9
|
isOpen: boolean;
|
|
10
|
-
onClose: (event:
|
|
10
|
+
onClose: (event: Event | SyntheticEvent) => void;
|
|
11
11
|
closeOnBackdropClick?: boolean;
|
|
12
12
|
closeOnEscapeKeyDown?: boolean;
|
|
13
13
|
};
|
package/types/flex.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { type ElementType
|
|
2
|
-
import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type DirectionExtendedDictionaryType, type
|
|
3
|
-
export interface FlexElementTypeProps<T extends ElementType = 'div'> {
|
|
4
|
-
elementType?: T | JSXElementConstructor<unknown>;
|
|
5
|
-
}
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type DirectionExtendedDictionaryType, type PolymorphicComponentProps, type SingleOrResponsive, type SpaceToken, type StyleProps } from './shared';
|
|
6
3
|
export type FlexDirection = DirectionExtendedDictionaryType | 'row' | 'column';
|
|
7
4
|
export type FlexDirectionType = FlexDirection | {
|
|
8
5
|
[key: string]: FlexDirection;
|
|
@@ -16,7 +13,9 @@ export type FlexAlignmentYType = NonNullable<AlignmentYExtendedDictionaryType> |
|
|
|
16
13
|
export type FlexWrapType = boolean | {
|
|
17
14
|
[key: string]: boolean;
|
|
18
15
|
};
|
|
19
|
-
export interface
|
|
16
|
+
export interface FlexBaseProps extends ChildrenProps, StyleProps {
|
|
17
|
+
}
|
|
18
|
+
export interface FlexStyleProps extends FlexBaseProps {
|
|
20
19
|
alignmentX?: FlexAlignmentXType;
|
|
21
20
|
alignmentY?: FlexAlignmentYType;
|
|
22
21
|
direction?: FlexDirectionType;
|
|
@@ -25,6 +24,6 @@ export interface FlexCustomLayoutProps {
|
|
|
25
24
|
spacingX?: SingleOrResponsive<SpaceToken>;
|
|
26
25
|
spacingY?: SingleOrResponsive<SpaceToken>;
|
|
27
26
|
}
|
|
28
|
-
export interface FlexProps
|
|
27
|
+
export interface FlexProps extends FlexStyleProps {
|
|
29
28
|
}
|
|
30
|
-
export type SpiritFlexProps<
|
|
29
|
+
export type SpiritFlexProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, FlexProps>;
|
package/types/footer.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { type ElementType } from 'react';
|
|
2
|
-
import { type BackgroundColorsDictionaryType, type ChildrenProps, type
|
|
3
|
-
export interface
|
|
2
|
+
import { type BackgroundColorsDictionaryType, type ChildrenProps, type PolymorphicComponentProps, type SpaceToken, type StyleProps, type TextAlignmentType } from './shared';
|
|
3
|
+
export interface FooterBaseProps extends ChildrenProps, StyleProps {
|
|
4
|
+
}
|
|
5
|
+
export interface FooterStyleProps extends FooterBaseProps {
|
|
4
6
|
paddingTop?: SpaceToken;
|
|
5
7
|
paddingBottom?: SpaceToken;
|
|
6
8
|
backgroundColor?: BackgroundColorsDictionaryType;
|
|
7
9
|
textAlignment?: TextAlignmentType;
|
|
8
10
|
}
|
|
9
|
-
export interface
|
|
11
|
+
export interface FooterProps extends FooterStyleProps {
|
|
10
12
|
}
|
|
11
|
-
export type
|
|
12
|
-
elementType?: E;
|
|
13
|
-
} & FooterBaseProps;
|
|
14
|
-
export type SpiritFooterProps<E extends ElementType = 'footer'> = FooterProps<E> & SpiritPolymorphicElementPropsWithRef<E, FooterProps<E>>;
|
|
13
|
+
export type SpiritFooterProps<E extends ElementType = 'footer'> = PolymorphicComponentProps<E, FooterProps>;
|
package/types/grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ElementType
|
|
2
|
-
import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type GridColumns, type
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type GridColumns, type PolymorphicComponentProps, type SingleOrResponsive, type SpaceToken, type StyleProps } from './shared';
|
|
3
3
|
export type GridColsBreakpoints = {
|
|
4
4
|
mobile?: GridColumns;
|
|
5
5
|
tablet?: GridColumns;
|
|
@@ -12,12 +12,6 @@ export type GridItemPositionBreakpoints = {
|
|
|
12
12
|
desktop?: number | GridItemSpan;
|
|
13
13
|
};
|
|
14
14
|
export type GridItemPosition = number | GridItemSpan | GridItemPositionBreakpoints;
|
|
15
|
-
export interface GridElementTypeProps<T extends ElementType = 'div'> {
|
|
16
|
-
elementType?: T | JSXElementConstructor<unknown>;
|
|
17
|
-
}
|
|
18
|
-
export interface GridItemElementTypeProps<T extends ElementType = 'div'> {
|
|
19
|
-
elementType?: T | JSXElementConstructor<unknown>;
|
|
20
|
-
}
|
|
21
15
|
export type GridAlignmentXType = NonNullable<AlignmentXExtendedDictionaryType> | {
|
|
22
16
|
[key: string]: NonNullable<AlignmentXExtendedDictionaryType>;
|
|
23
17
|
};
|
|
@@ -38,9 +32,17 @@ export interface GridItemCustomLayoutProps {
|
|
|
38
32
|
rowEnd?: GridItemPosition;
|
|
39
33
|
rowStart?: GridItemPosition;
|
|
40
34
|
}
|
|
41
|
-
export interface
|
|
35
|
+
export interface GridBaseProps extends ChildrenProps, StyleProps {
|
|
36
|
+
}
|
|
37
|
+
export interface GridItemBaseProps extends ChildrenProps, StyleProps {
|
|
38
|
+
}
|
|
39
|
+
export interface GridStyleProps extends GridBaseProps, GridCustomLayoutProps {
|
|
40
|
+
}
|
|
41
|
+
export interface GridItemStyleProps extends GridItemBaseProps, GridItemCustomLayoutProps {
|
|
42
|
+
}
|
|
43
|
+
export interface GridProps extends GridStyleProps {
|
|
42
44
|
}
|
|
43
|
-
export interface GridItemProps
|
|
45
|
+
export interface GridItemProps extends GridItemStyleProps {
|
|
44
46
|
}
|
|
45
|
-
export type SpiritGridProps<
|
|
46
|
-
export type SpiritGridItemProps<
|
|
47
|
+
export type SpiritGridProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, GridProps>;
|
|
48
|
+
export type SpiritGridItemProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, GridItemProps>;
|
package/types/header.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { type ElementType } from 'react';
|
|
2
|
-
import { type ChildrenProps, type
|
|
1
|
+
import { type ElementType, type SyntheticEvent } from 'react';
|
|
2
|
+
import { type ChildrenProps, type PolymorphicComponentProps, type SpiritButtonElementProps, type SpiritDialogElementProps, type SpiritElementProps, type SpiritLItemElementProps, type SpiritSpanElementProps, type SpiritUListElementProps, type StyleProps, type TransferProps } from './shared';
|
|
3
3
|
export type HeaderActionsColorType = 'primary' | 'secondary';
|
|
4
4
|
export type HeaderColorType = 'primary' | 'transparent';
|
|
5
5
|
export type HeaderDialogHandlingProps = {
|
|
6
6
|
isOpen: boolean;
|
|
7
|
-
onClose: (event:
|
|
7
|
+
onClose: (event: Event | SyntheticEvent) => void;
|
|
8
8
|
};
|
|
9
9
|
export type HeaderMobileActionsHandlingProps = {
|
|
10
10
|
isOpen: boolean;
|
|
11
|
-
onOpen: (event:
|
|
11
|
+
onOpen: (event: Event | SyntheticEvent) => void;
|
|
12
12
|
};
|
|
13
13
|
export interface HeaderProps extends SpiritElementProps, ChildrenProps {
|
|
14
14
|
color?: HeaderColorType;
|
|
@@ -30,26 +30,12 @@ export interface HeaderDialogButtonProps extends SpiritButtonElementProps, Child
|
|
|
30
30
|
export interface HeaderDialogCloseButtonProps extends Omit<SpiritButtonElementProps, 'children'> {
|
|
31
31
|
label?: string;
|
|
32
32
|
}
|
|
33
|
-
export interface BaseHeaderDialogLinkProps extends ChildrenProps, StyleProps, TransferProps {
|
|
34
|
-
isCurrent?: boolean;
|
|
35
|
-
}
|
|
36
|
-
export type HeaderDialogLinkProps<E extends ElementType = 'a'> = {
|
|
37
|
-
elementType?: E;
|
|
38
|
-
} & BaseHeaderDialogLinkProps;
|
|
39
|
-
export type SpiritDialogHeaderLinkProps<E extends ElementType = 'a'> = HeaderDialogLinkProps<E> & SpiritPolymorphicElementPropsWithRef<E, HeaderDialogLinkProps<E>>;
|
|
40
33
|
export interface HeaderDialogNavProps extends SpiritUListElementProps, ChildrenProps {
|
|
41
34
|
}
|
|
42
35
|
export interface HeaderDialogNavItemProps extends SpiritLItemElementProps, ChildrenProps {
|
|
43
36
|
}
|
|
44
37
|
export interface HeaderDialogTextProps extends SpiritSpanElementProps, ChildrenProps {
|
|
45
38
|
}
|
|
46
|
-
export interface HeaderLinkBaseProps extends ChildrenProps, StyleProps, TransferProps {
|
|
47
|
-
isCurrent?: boolean;
|
|
48
|
-
}
|
|
49
|
-
export type HeaderLinkProps<E extends ElementType = 'a'> = {
|
|
50
|
-
elementType?: E;
|
|
51
|
-
} & HeaderLinkBaseProps;
|
|
52
|
-
export type SpiritHeaderLinkProps<E extends ElementType = 'a'> = HeaderLinkProps<E> & SpiritPolymorphicElementPropsWithRef<E, HeaderLinkProps<E>>;
|
|
53
39
|
export interface HeaderMobileActionsProps extends SpiritElementProps, HeaderMobileActionsHandlingProps, ChildrenProps {
|
|
54
40
|
dialogId: string;
|
|
55
41
|
menuToggleLabel?: string;
|
|
@@ -58,3 +44,15 @@ export interface HeaderNavProps extends SpiritUListElementProps, ChildrenProps {
|
|
|
58
44
|
}
|
|
59
45
|
export interface HeaderNavItemProps extends SpiritLItemElementProps, ChildrenProps {
|
|
60
46
|
}
|
|
47
|
+
export interface HeaderDialogLinkStyleProps extends ChildrenProps, StyleProps, TransferProps {
|
|
48
|
+
isCurrent?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface HeaderLinkStyleProps extends ChildrenProps, StyleProps, TransferProps {
|
|
51
|
+
isCurrent?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface HeaderDialogLinkProps extends HeaderDialogLinkStyleProps {
|
|
54
|
+
}
|
|
55
|
+
export interface HeaderLinkProps extends HeaderLinkStyleProps {
|
|
56
|
+
}
|
|
57
|
+
export type SpiritDialogHeaderLinkProps<E extends ElementType = 'a'> = PolymorphicComponentProps<E, HeaderDialogLinkProps>;
|
|
58
|
+
export type SpiritHeaderLinkProps<E extends ElementType = 'a'> = PolymorphicComponentProps<E, HeaderLinkProps>;
|
package/types/heading.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type ElementType
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
2
|
import type { ChildrenProps, EmphasisDictionaryType, EmphasisProps, SizeExtendedDictionaryType, SizeProps, StyleProps, TextColorProps, TextColorsType, TransferProps, TypographyBaseProps } from './shared';
|
|
3
3
|
export type HeadingColorsType<C = undefined> = TextColorsType<C>;
|
|
4
|
-
export interface HeadingElementTypeProps<
|
|
5
|
-
elementType:
|
|
4
|
+
export interface HeadingElementTypeProps<E extends ElementType> {
|
|
5
|
+
elementType: E;
|
|
6
6
|
}
|
|
7
7
|
export interface HeadingProps<T extends ElementType> extends HeadingElementTypeProps<T>, ChildrenProps, StyleProps, TransferProps, TypographyBaseProps {
|
|
8
8
|
}
|
|
9
|
-
export interface SpiritHeadingProps<T extends ElementType, S = void,
|
|
9
|
+
export interface SpiritHeadingProps<T extends ElementType, S = void, Emph = void, C = void> extends HeadingProps<T>, SizeProps<SizeExtendedDictionaryType<S>>, EmphasisProps<EmphasisDictionaryType<Emph>>, TextColorProps<HeadingColorsType<C>> {
|
|
10
10
|
}
|
package/types/hidden.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type ElementType
|
|
2
|
-
import { type BreakpointToken, type ChildrenProps, type
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type BreakpointToken, type ChildrenProps, type PolymorphicComponentProps, type StyleProps } from './shared';
|
|
3
3
|
export interface HiddenBaseProps extends ChildrenProps, StyleProps {
|
|
4
|
+
}
|
|
5
|
+
export interface HiddenStyleProps extends HiddenBaseProps {
|
|
4
6
|
from?: BreakpointToken;
|
|
5
7
|
on?: BreakpointToken | BreakpointToken[];
|
|
6
8
|
}
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export type SpiritHiddenProps<E extends ElementType = 'span'> = HiddenProps<E> & SpiritPolymorphicElementPropsWithRef<E, HiddenProps<E>>;
|
|
9
|
+
export interface HiddenProps extends HiddenStyleProps {
|
|
10
|
+
}
|
|
11
|
+
export type SpiritHiddenProps<E extends ElementType = 'span'> = PolymorphicComponentProps<E, HiddenProps>;
|
package/types/icon.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { type SVGAttributes } from 'react';
|
|
2
|
-
import { type AccentColorNamesType, type ChildrenProps, type EmotionColorNamesType, type SingleOrResponsive, type StyleProps, type TextColorNamesType
|
|
2
|
+
import { type AccentColorNamesType, type ChildrenProps, type EmotionColorNamesType, type SingleOrResponsive, type StyleProps, type TextColorNamesType } from './shared';
|
|
3
3
|
export type IconBoxSize = SingleOrResponsive<number>;
|
|
4
4
|
export type IconColorType = TextColorNamesType | EmotionColorNamesType | AccentColorNamesType;
|
|
5
|
-
export interface
|
|
6
|
-
ariaHidden?: boolean;
|
|
5
|
+
export interface IconStyleProps extends SVGAttributes<SVGElement> {
|
|
7
6
|
boxSize?: IconBoxSize;
|
|
8
7
|
color?: IconColorType;
|
|
9
8
|
name: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IconProps extends IconStyleProps, StyleProps, ChildrenProps {
|
|
11
|
+
ariaHidden?: boolean;
|
|
10
12
|
title?: string;
|
|
11
13
|
}
|
|
12
14
|
export interface SpiritIconProps extends IconProps {
|
package/types/iconBox.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { type ElementType
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
2
|
import { type IconBoxShapes } from '../components/IconBox/constants';
|
|
3
|
-
import type { AccentColorNamesType, ChildrenProps, EmotionColorNamesType, SingleOrResponsive, SizeExtendedDictionaryType,
|
|
3
|
+
import type { AccentColorNamesType, ChildrenProps, EmotionColorNamesType, PolymorphicComponentProps, SingleOrResponsive, SizeExtendedDictionaryType, StyleProps } from './shared';
|
|
4
4
|
export type IconBoxShapeKeys = keyof typeof IconBoxShapes;
|
|
5
5
|
export type IconBoxShapeType = (typeof IconBoxShapes)[IconBoxShapeKeys];
|
|
6
6
|
export type IconBoxColorsType = AccentColorNamesType | EmotionColorNamesType;
|
|
7
7
|
export interface IconBoxBaseProps extends ChildrenProps, StyleProps {
|
|
8
|
+
}
|
|
9
|
+
export interface IconBoxStyleProps extends IconBoxBaseProps {
|
|
8
10
|
color?: IconBoxColorsType;
|
|
9
11
|
shape?: IconBoxShapeType;
|
|
10
12
|
hasBorder?: boolean;
|
|
@@ -12,7 +14,6 @@ export interface IconBoxBaseProps extends ChildrenProps, StyleProps {
|
|
|
12
14
|
isSubtle?: boolean;
|
|
13
15
|
size?: SingleOrResponsive<SizeExtendedDictionaryType>;
|
|
14
16
|
}
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export type SpiritIconBoxProps<E extends ElementType = 'div'> = IconBoxProps<E> & SpiritPolymorphicElementPropsWithRef<E, IconBoxProps<E>>;
|
|
17
|
+
export interface IconBoxProps extends IconBoxStyleProps {
|
|
18
|
+
}
|
|
19
|
+
export type SpiritIconBoxProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, IconBoxProps>;
|
package/types/item.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type ElementType, type
|
|
1
|
+
import { type ElementType, type ReactNode } from 'react';
|
|
2
2
|
import { type StyleProps, type TransferProps } from './shared';
|
|
3
|
-
export interface AriaItemElementTypeProps<
|
|
4
|
-
elementType?:
|
|
3
|
+
export interface AriaItemElementTypeProps<E extends ElementType = 'button'> {
|
|
4
|
+
elementType?: E;
|
|
5
5
|
}
|
|
6
6
|
export interface ItemStyleProps extends StyleProps, TransferProps {
|
|
7
7
|
isDisabled?: boolean;
|