@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
|
@@ -327,8 +327,11 @@ const htmlReactParser = (html) => {
|
|
|
327
327
|
return domToReact(htmlToDOM(html));
|
|
328
328
|
};
|
|
329
329
|
|
|
330
|
+
function hasSpiritComponent(elementTag) {
|
|
331
|
+
return typeof elementTag !== 'string' && elementTag !== null && 'spiritComponent' in elementTag;
|
|
332
|
+
}
|
|
330
333
|
function mergeStyleProps(ElementTag, styleProps) {
|
|
331
|
-
const isSpiritComponent =
|
|
334
|
+
const isSpiritComponent = hasSpiritComponent(ElementTag);
|
|
332
335
|
const isNonNullableObject = (styleProp) => typeof styleProp === 'object' && styleProp !== null;
|
|
333
336
|
const extractClassNames = (styleProp) => {
|
|
334
337
|
if (typeof styleProp === 'string') {
|
|
@@ -495,8 +498,10 @@ const processProperties = (utilityKey, utilityName, propValue, prefix) => {
|
|
|
495
498
|
};
|
|
496
499
|
const isStylePropProcessable = (styleProps, stylePropKey, stylePropValue, options = { includesKey: true }) => {
|
|
497
500
|
const isStylePropKeyIncluded = isKeyIncluded(styleProps, stylePropKey);
|
|
498
|
-
|
|
499
|
-
|
|
501
|
+
if (options.includesKey) {
|
|
502
|
+
return isStylePropKeyIncluded && !isEmpty(stylePropValue);
|
|
503
|
+
}
|
|
504
|
+
return !isStylePropKeyIncluded;
|
|
500
505
|
};
|
|
501
506
|
const useStyleUtilities = (props, prefix = '', additionalProps = {}) => {
|
|
502
507
|
const styleProps = Object.assign(Object.assign(Object.assign(Object.assign({}, SpacingStyleProp), DisplayStyleProps), ThemeStyleProps), additionalProps);
|
|
@@ -753,6 +758,63 @@ const useDragAndDrop = (props) => {
|
|
|
753
758
|
};
|
|
754
759
|
};
|
|
755
760
|
|
|
761
|
+
const defaultLabels = {
|
|
762
|
+
common: {
|
|
763
|
+
close: 'Close',
|
|
764
|
+
edit: 'Edit',
|
|
765
|
+
remove: 'Remove',
|
|
766
|
+
},
|
|
767
|
+
breadcrumbs: {
|
|
768
|
+
back: 'Go back',
|
|
769
|
+
},
|
|
770
|
+
fileUploader: {
|
|
771
|
+
edit: 'Edit',
|
|
772
|
+
remove: 'Remove',
|
|
773
|
+
attachments: 'Attachments',
|
|
774
|
+
},
|
|
775
|
+
pagination: {
|
|
776
|
+
next: 'Next',
|
|
777
|
+
previous: 'Previous',
|
|
778
|
+
goToPage: 'Go to page',
|
|
779
|
+
},
|
|
780
|
+
textField: {
|
|
781
|
+
password: {
|
|
782
|
+
show: 'Show password',
|
|
783
|
+
hide: 'Hide password',
|
|
784
|
+
},
|
|
785
|
+
},
|
|
786
|
+
splitButton: {
|
|
787
|
+
dropdown: 'More',
|
|
788
|
+
},
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
const replaceTranslationParams = (translation, params) => Object.entries(params).reduce((result, [paramKey, value]) => {
|
|
792
|
+
const safeParamKey = paramKey.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
793
|
+
return result.replace(new RegExp(`\\{${safeParamKey}\\}`, 'g'), String(value));
|
|
794
|
+
}, translation);
|
|
795
|
+
|
|
796
|
+
const resolveTranslationKey = (obj, path) => {
|
|
797
|
+
const keys = path.split('.');
|
|
798
|
+
let current = obj;
|
|
799
|
+
for (const key of keys) {
|
|
800
|
+
if (typeof current === 'object' && current !== null && key in current) {
|
|
801
|
+
current = current[key];
|
|
802
|
+
}
|
|
803
|
+
else {
|
|
804
|
+
return path;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
return typeof current === 'string' ? current : path;
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
const useI18n = () => {
|
|
811
|
+
const t = (key, params) => {
|
|
812
|
+
const translation = resolveTranslationKey(defaultLabels, key);
|
|
813
|
+
return !params ? translation : replaceTranslationParams(translation, params);
|
|
814
|
+
};
|
|
815
|
+
return { t };
|
|
816
|
+
};
|
|
817
|
+
|
|
756
818
|
const defaultContext$a = undefined;
|
|
757
819
|
const IconsContext = React.createContext(defaultContext$a);
|
|
758
820
|
IconsContext.Provider;
|
|
@@ -1020,21 +1082,22 @@ var __rest$2U = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1020
1082
|
}
|
|
1021
1083
|
return t;
|
|
1022
1084
|
};
|
|
1023
|
-
const
|
|
1024
|
-
const { children, elementType
|
|
1085
|
+
const _Accordion = (props, ref) => {
|
|
1086
|
+
const { children, elementType = 'section', open, toggle } = props, restProps = __rest$2U(props, ["children", "elementType", "open", "toggle"]);
|
|
1087
|
+
const Component = elementType;
|
|
1025
1088
|
const { classProps } = useAccordionStyleProps();
|
|
1026
1089
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
1027
|
-
const mergedStyleProps = mergeStyleProps(
|
|
1090
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.root, styleProps });
|
|
1028
1091
|
const contextValue = {
|
|
1029
1092
|
open,
|
|
1030
1093
|
toggle,
|
|
1031
1094
|
};
|
|
1032
|
-
return (React.createElement(
|
|
1095
|
+
return (React.createElement(Component, Object.assign({}, transferProps, mergedStyleProps, { ref: ref }),
|
|
1033
1096
|
React.createElement(AccordionProvider, { value: contextValue }, children)));
|
|
1034
1097
|
};
|
|
1098
|
+
const Accordion = React.forwardRef(_Accordion);
|
|
1035
1099
|
Accordion.spiritComponent = 'Accordion';
|
|
1036
|
-
Accordion.
|
|
1037
|
-
Accordion.spiritDefaultProps = null;
|
|
1100
|
+
Accordion.displayName = 'Accordion';
|
|
1038
1101
|
|
|
1039
1102
|
const defaultContext$8 = {
|
|
1040
1103
|
id: '',
|
|
@@ -1055,18 +1118,19 @@ var __rest$2T = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1055
1118
|
}
|
|
1056
1119
|
return t;
|
|
1057
1120
|
};
|
|
1058
|
-
const
|
|
1059
|
-
const { children, elementType
|
|
1121
|
+
const _AccordionItem = (props, ref) => {
|
|
1122
|
+
const { children, elementType = 'article', id } = props, restProps = __rest$2T(props, ["children", "elementType", "id"]);
|
|
1123
|
+
const Component = elementType;
|
|
1060
1124
|
const { classProps } = useAccordionStyleProps();
|
|
1061
1125
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
1062
|
-
const mergedStyleProps = mergeStyleProps(
|
|
1126
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.item, styleProps });
|
|
1063
1127
|
const contextValue = { id };
|
|
1064
|
-
return (React.createElement(
|
|
1128
|
+
return (React.createElement(Component, Object.assign({}, transferProps, { id: id }, mergedStyleProps, { ref: ref }),
|
|
1065
1129
|
React.createElement(AccordionItemProvider, { value: contextValue }, children)));
|
|
1066
1130
|
};
|
|
1131
|
+
const AccordionItem = React.forwardRef(_AccordionItem);
|
|
1067
1132
|
AccordionItem.spiritComponent = 'AccordionItem';
|
|
1068
|
-
AccordionItem.
|
|
1069
|
-
AccordionItem.spiritDefaultProps = null;
|
|
1133
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
1070
1134
|
|
|
1071
1135
|
const DEFAULT_BOX_SIZE = 24;
|
|
1072
1136
|
|
|
@@ -1122,12 +1186,12 @@ var __rest$2R = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1122
1186
|
}
|
|
1123
1187
|
return t;
|
|
1124
1188
|
};
|
|
1125
|
-
const defaultProps$
|
|
1189
|
+
const defaultProps$13 = {
|
|
1126
1190
|
ariaHidden: true,
|
|
1127
1191
|
boxSize: DEFAULT_BOX_SIZE,
|
|
1128
1192
|
};
|
|
1129
1193
|
const _Icon = (props, ref) => {
|
|
1130
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1194
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$13), props);
|
|
1131
1195
|
const { boxSize, name, title, ariaHidden } = propsWithDefaults, restProps = __rest$2R(propsWithDefaults, ["boxSize", "name", "title", "ariaHidden"]);
|
|
1132
1196
|
let icon = useIcon(name);
|
|
1133
1197
|
const iconSize = useIconBoxSize(boxSize);
|
|
@@ -1145,6 +1209,7 @@ const _Icon = (props, ref) => {
|
|
|
1145
1209
|
};
|
|
1146
1210
|
const Icon = React.forwardRef(_Icon);
|
|
1147
1211
|
Icon.spiritComponent = 'Icon';
|
|
1212
|
+
Icon.displayName = 'Icon';
|
|
1148
1213
|
|
|
1149
1214
|
var __rest$2Q = (undefined && undefined.__rest) || function (s, e) {
|
|
1150
1215
|
var t = {};
|
|
@@ -1157,19 +1222,20 @@ var __rest$2Q = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1157
1222
|
}
|
|
1158
1223
|
return t;
|
|
1159
1224
|
};
|
|
1160
|
-
const defaultProps
|
|
1225
|
+
const defaultProps$12 = {
|
|
1161
1226
|
elementType: 'h3',
|
|
1162
1227
|
};
|
|
1163
|
-
const
|
|
1164
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps
|
|
1165
|
-
const { elementType
|
|
1228
|
+
const _AccordionHeader = (props, ref) => {
|
|
1229
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$12), props);
|
|
1230
|
+
const { elementType = 'h3', children, slot } = propsWithDefaults, restProps = __rest$2Q(propsWithDefaults, ["elementType", "children", "slot"]);
|
|
1231
|
+
const Component = elementType;
|
|
1166
1232
|
const { classProps } = useAccordionStyleProps();
|
|
1167
1233
|
const { toggle } = useAccordionContext();
|
|
1168
1234
|
const { id } = useAccordionItemContext();
|
|
1169
1235
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
1170
1236
|
const { isOpen } = useOpenItem(id);
|
|
1171
1237
|
const { triggerProps, headerProps } = useAccordionAriaProps({ id, isOpen });
|
|
1172
|
-
const mergedStyleProps = mergeStyleProps(
|
|
1238
|
+
const mergedStyleProps = mergeStyleProps(Component, {
|
|
1173
1239
|
classProps: classProps.header,
|
|
1174
1240
|
styleProps,
|
|
1175
1241
|
});
|
|
@@ -1178,16 +1244,16 @@ const AccordionHeader = (props) => {
|
|
|
1178
1244
|
toggle(id);
|
|
1179
1245
|
}
|
|
1180
1246
|
};
|
|
1181
|
-
return (React.createElement(
|
|
1247
|
+
return (React.createElement(Component, Object.assign({}, transferProps, mergedStyleProps, headerProps, { ref: ref }),
|
|
1182
1248
|
React.createElement("button", Object.assign({ type: "button", className: classProps.toggle, onClick: itemToggle }, triggerProps), children),
|
|
1183
1249
|
React.createElement("span", { className: classProps.side },
|
|
1184
1250
|
slot && React.createElement("span", { className: classProps.slot }, slot),
|
|
1185
1251
|
React.createElement("span", { className: classProps.icon },
|
|
1186
1252
|
React.createElement(Icon, { name: "chevron-down" })))));
|
|
1187
1253
|
};
|
|
1254
|
+
const AccordionHeader = React.forwardRef(_AccordionHeader);
|
|
1188
1255
|
AccordionHeader.spiritComponent = 'AccordionHeader';
|
|
1189
|
-
AccordionHeader.
|
|
1190
|
-
AccordionHeader.spiritDefaultProps = null;
|
|
1256
|
+
AccordionHeader.displayName = 'AccordionHeader';
|
|
1191
1257
|
|
|
1192
1258
|
var __rest$2P = (undefined && undefined.__rest) || function (s, e) {
|
|
1193
1259
|
var t = {};
|
|
@@ -1269,15 +1335,15 @@ const transitioningStyles = {
|
|
|
1269
1335
|
exiting: 'is-transitioning',
|
|
1270
1336
|
exited: '',
|
|
1271
1337
|
};
|
|
1272
|
-
const defaultProps$
|
|
1338
|
+
const defaultProps$11 = {
|
|
1273
1339
|
elementType: 'div',
|
|
1274
1340
|
isOpen: false,
|
|
1275
1341
|
collapsibleToBreakpoint: undefined,
|
|
1276
1342
|
transitionDuration: TRANSITION_DURATION$1,
|
|
1277
1343
|
};
|
|
1278
1344
|
const Collapse = (props) => {
|
|
1279
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1280
|
-
const { elementType: ElementTag = defaultProps$
|
|
1345
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$11), props);
|
|
1346
|
+
const { elementType: ElementTag = defaultProps$11.elementType, children, transitionDuration = TRANSITION_DURATION$1 } = propsWithDefaults, restProps = __rest$2O(propsWithDefaults, ["elementType", "children", "transitionDuration"]);
|
|
1281
1347
|
const rootElementRef = React.useRef(null);
|
|
1282
1348
|
const collapseElementRef = React.useRef(null);
|
|
1283
1349
|
const collapseHeight = useResizeHeight(collapseElementRef);
|
|
@@ -1326,11 +1392,11 @@ var __rest$2N = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1326
1392
|
}
|
|
1327
1393
|
return t;
|
|
1328
1394
|
};
|
|
1329
|
-
const defaultProps$
|
|
1395
|
+
const defaultProps$10 = {
|
|
1330
1396
|
isOpen: false,
|
|
1331
1397
|
};
|
|
1332
1398
|
const UncontrolledCollapse = (props) => {
|
|
1333
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1399
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$10), props);
|
|
1334
1400
|
const { children, hideOnCollapse, isDisposable, renderTrigger } = propsWithDefaults, restProps = __rest$2N(propsWithDefaults, ["children", "hideOnCollapse", "isDisposable", "renderTrigger"]);
|
|
1335
1401
|
const { isOpen, toggleHandler } = useCollapse(restProps.isOpen);
|
|
1336
1402
|
const { ariaProps } = useCollapseAriaProps(Object.assign(Object.assign({}, restProps), { isOpen }));
|
|
@@ -1387,8 +1453,7 @@ const UncontrolledAccordion = (props) => {
|
|
|
1387
1453
|
return React.createElement(Accordion, Object.assign({}, restProps, { open: open, toggle: toggle }));
|
|
1388
1454
|
};
|
|
1389
1455
|
UncontrolledAccordion.spiritComponent = 'UncontrolledAccordion';
|
|
1390
|
-
UncontrolledAccordion.
|
|
1391
|
-
UncontrolledAccordion.spiritDefaultProps = null;
|
|
1456
|
+
UncontrolledAccordion.displayName = 'UncontrolledAccordion';
|
|
1392
1457
|
|
|
1393
1458
|
var __rest$2K = (undefined && undefined.__rest) || function (s, e) {
|
|
1394
1459
|
var t = {};
|
|
@@ -1435,24 +1500,25 @@ var __rest$2J = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1435
1500
|
}
|
|
1436
1501
|
return t;
|
|
1437
1502
|
};
|
|
1438
|
-
const defaultProps
|
|
1503
|
+
const defaultProps$$ = {
|
|
1439
1504
|
alignmentX: AlignmentXExtended.STRETCH,
|
|
1440
1505
|
alignmentY: AlignmentYExtended.STRETCH,
|
|
1441
1506
|
direction: DirectionExtended.HORIZONTAL,
|
|
1442
1507
|
elementType: 'div',
|
|
1443
1508
|
isWrapping: false,
|
|
1444
1509
|
};
|
|
1445
|
-
const
|
|
1446
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps
|
|
1447
|
-
const { elementType
|
|
1510
|
+
const _Flex = (props, ref) => {
|
|
1511
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$$), props);
|
|
1512
|
+
const { elementType = defaultProps$$.elementType, direction, children } = propsWithDefaults, restProps = __rest$2J(propsWithDefaults, ["elementType", "direction", "children"]);
|
|
1513
|
+
const Component = elementType;
|
|
1448
1514
|
const { classProps, props: modifiedProps, styleProps: flexStyle } = useFlexStyleProps(Object.assign({ direction }, restProps));
|
|
1449
1515
|
const { styleProps, props: otherProps } = useStyleProps(Object.assign({}, modifiedProps));
|
|
1450
|
-
const mergedStyleProps = mergeStyleProps(
|
|
1451
|
-
return (React.createElement(
|
|
1516
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, flexStyle, styleProps, otherProps });
|
|
1517
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
1452
1518
|
};
|
|
1519
|
+
const Flex = React.forwardRef(_Flex);
|
|
1453
1520
|
Flex.spiritComponent = 'Flex';
|
|
1454
|
-
Flex.
|
|
1455
|
-
Flex.spiritDefaultProps = null;
|
|
1521
|
+
Flex.displayName = 'Flex';
|
|
1456
1522
|
|
|
1457
1523
|
var __rest$2I = (undefined && undefined.__rest) || function (s, e) {
|
|
1458
1524
|
var t = {};
|
|
@@ -1465,7 +1531,7 @@ var __rest$2I = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1465
1531
|
}
|
|
1466
1532
|
return t;
|
|
1467
1533
|
};
|
|
1468
|
-
const defaultProps$
|
|
1534
|
+
const defaultProps$_ = {
|
|
1469
1535
|
alignmentX: {
|
|
1470
1536
|
mobile: AlignmentXExtended.STRETCH,
|
|
1471
1537
|
tablet: AlignmentXExtended.LEFT,
|
|
@@ -1477,7 +1543,7 @@ const defaultProps$X = {
|
|
|
1477
1543
|
};
|
|
1478
1544
|
const ActionGroup = (props) => {
|
|
1479
1545
|
const { children } = props, restProps = __rest$2I(props, ["children"]);
|
|
1480
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1546
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$_), restProps);
|
|
1481
1547
|
return React.createElement(Flex, Object.assign({}, propsWithDefaults), children);
|
|
1482
1548
|
};
|
|
1483
1549
|
ActionGroup.spiritComponent = 'ActionGroup';
|
|
@@ -1530,22 +1596,26 @@ var __rest$2G = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1530
1596
|
}
|
|
1531
1597
|
return t;
|
|
1532
1598
|
};
|
|
1533
|
-
const defaultProps$
|
|
1599
|
+
const defaultProps$Z = {
|
|
1534
1600
|
color: 'success',
|
|
1535
1601
|
isCentered: false,
|
|
1602
|
+
elementType: 'div',
|
|
1536
1603
|
};
|
|
1537
|
-
const
|
|
1538
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1539
|
-
const { elementType
|
|
1604
|
+
const _Alert = (props) => {
|
|
1605
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$Z), props);
|
|
1606
|
+
const { elementType, children, color, iconName } = propsWithDefaults, restProps = __rest$2G(propsWithDefaults, ["elementType", "children", "color", "iconName"]);
|
|
1607
|
+
const Component = elementType;
|
|
1540
1608
|
const { classProps, props: modifiedProps } = useAlertStyleProps(Object.assign({ color }, restProps));
|
|
1541
1609
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
1542
|
-
const mergedStyleProps = mergeStyleProps(
|
|
1610
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
|
|
1543
1611
|
const alertIconName = useAlertIcon(Object.assign({ color, iconName }, otherProps));
|
|
1544
|
-
return (React.createElement(
|
|
1612
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps),
|
|
1545
1613
|
React.createElement(Icon, { name: alertIconName }),
|
|
1546
1614
|
React.createElement("div", null, children)));
|
|
1547
1615
|
};
|
|
1616
|
+
const Alert = React.forwardRef(_Alert);
|
|
1548
1617
|
Alert.spiritComponent = 'Alert';
|
|
1618
|
+
Alert.displayName = 'Alert';
|
|
1549
1619
|
|
|
1550
1620
|
var __rest$2F = (undefined && undefined.__rest) || function (s, e) {
|
|
1551
1621
|
var t = {};
|
|
@@ -1558,19 +1628,19 @@ var __rest$2F = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1558
1628
|
}
|
|
1559
1629
|
return t;
|
|
1560
1630
|
};
|
|
1561
|
-
const
|
|
1562
|
-
function useAvatarStyleProps(props) {
|
|
1631
|
+
const useAvatarStyleProps = (props) => {
|
|
1563
1632
|
const { isSquare, size } = props, restProps = __rest$2F(props, ["isSquare", "size"]);
|
|
1564
1633
|
const avatarClass = useClassNamePrefix('Avatar');
|
|
1565
1634
|
const avatarSquareClass = `${avatarClass}--square`;
|
|
1566
|
-
const
|
|
1635
|
+
const avatarSizeClass = generateResponsiveClassNames(avatarClass, size);
|
|
1636
|
+
const classProps = classNames(avatarClass, ...avatarSizeClass, {
|
|
1567
1637
|
[avatarSquareClass]: isSquare,
|
|
1568
1638
|
});
|
|
1569
1639
|
return {
|
|
1570
1640
|
classProps,
|
|
1571
1641
|
props: restProps,
|
|
1572
1642
|
};
|
|
1573
|
-
}
|
|
1643
|
+
};
|
|
1574
1644
|
|
|
1575
1645
|
var __rest$2E = (undefined && undefined.__rest) || function (s, e) {
|
|
1576
1646
|
var t = {};
|
|
@@ -1583,23 +1653,23 @@ var __rest$2E = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1583
1653
|
}
|
|
1584
1654
|
return t;
|
|
1585
1655
|
};
|
|
1586
|
-
const defaultProps$
|
|
1656
|
+
const defaultProps$Y = {
|
|
1587
1657
|
elementType: 'div',
|
|
1588
1658
|
isSquare: false,
|
|
1589
1659
|
size: SizesExtended.MEDIUM,
|
|
1590
1660
|
};
|
|
1591
1661
|
const _Avatar = (props, ref) => {
|
|
1592
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1593
|
-
const { elementType
|
|
1662
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$Y), props);
|
|
1663
|
+
const { elementType = defaultProps$Y.elementType, children } = propsWithDefaults, restProps = __rest$2E(propsWithDefaults, ["elementType", "children"]);
|
|
1664
|
+
const Component = elementType;
|
|
1594
1665
|
const { classProps, props: modifiedProps } = useAvatarStyleProps(restProps);
|
|
1595
1666
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
1596
|
-
const mergedStyleProps = mergeStyleProps(
|
|
1597
|
-
return (React.createElement(
|
|
1667
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps });
|
|
1668
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
1598
1669
|
};
|
|
1599
|
-
_Avatar.spiritComponent = 'Avatar';
|
|
1600
|
-
_Avatar.spiritDefaultElement = 'div';
|
|
1601
|
-
_Avatar.spiritDefaultProps = null;
|
|
1602
1670
|
const Avatar = React.forwardRef(_Avatar);
|
|
1671
|
+
Avatar.spiritComponent = 'Avatar';
|
|
1672
|
+
Avatar.displayName = 'Avatar';
|
|
1603
1673
|
|
|
1604
1674
|
var __rest$2D = (undefined && undefined.__rest) || function (s, e) {
|
|
1605
1675
|
var t = {};
|
|
@@ -1647,21 +1717,22 @@ var __rest$2C = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1647
1717
|
}
|
|
1648
1718
|
return t;
|
|
1649
1719
|
};
|
|
1650
|
-
const defaultProps$
|
|
1720
|
+
const defaultProps$X = {
|
|
1651
1721
|
elementType: 'div',
|
|
1652
1722
|
borderStyle: BorderStyles.SOLID,
|
|
1653
1723
|
};
|
|
1654
|
-
const
|
|
1655
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1656
|
-
const { elementType
|
|
1724
|
+
const _Box = (props, ref) => {
|
|
1725
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$X), props);
|
|
1726
|
+
const { elementType = defaultProps$X.elementType, children } = propsWithDefaults, restProps = __rest$2C(propsWithDefaults, ["elementType", "children"]);
|
|
1727
|
+
const Component = elementType;
|
|
1657
1728
|
const { classProps, props: modifiedProps } = useBoxStyleProps(restProps);
|
|
1658
1729
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps, Object.assign(Object.assign(Object.assign({}, BackgroundStyleProps), BorderRadiusStyleProps), PaddingStyleProps));
|
|
1659
|
-
const mergedStyleProps = mergeStyleProps(
|
|
1660
|
-
return (React.createElement(
|
|
1730
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps });
|
|
1731
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
1661
1732
|
};
|
|
1733
|
+
const Box = React.forwardRef(_Box);
|
|
1662
1734
|
Box.spiritComponent = 'Box';
|
|
1663
|
-
Box.
|
|
1664
|
-
Box.spiritDefaultProps = null;
|
|
1735
|
+
Box.displayName = 'Box';
|
|
1665
1736
|
|
|
1666
1737
|
var __rest$2B = (undefined && undefined.__rest) || function (s, e) {
|
|
1667
1738
|
var t = {};
|
|
@@ -1705,22 +1776,24 @@ var __rest$2A = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1705
1776
|
}
|
|
1706
1777
|
return t;
|
|
1707
1778
|
};
|
|
1708
|
-
const defaultProps$
|
|
1779
|
+
const defaultProps$W = {
|
|
1709
1780
|
elementType: 'a',
|
|
1710
1781
|
color: 'primary',
|
|
1711
1782
|
hasVisitedStyleAllowed: false,
|
|
1712
1783
|
underlined: 'hover',
|
|
1713
1784
|
};
|
|
1714
1785
|
const _Link = (props, ref) => {
|
|
1715
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1716
|
-
const { elementType
|
|
1786
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$W), props);
|
|
1787
|
+
const { elementType = defaultProps$W.elementType, children } = propsWithDefaults, restProps = __rest$2A(propsWithDefaults, ["elementType", "children"]);
|
|
1788
|
+
const Component = elementType;
|
|
1717
1789
|
const { classProps, props: modifiedProps } = useLinkStyleProps(restProps);
|
|
1718
1790
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
1719
|
-
const mergedStyleProps = mergeStyleProps(
|
|
1720
|
-
return (React.createElement(
|
|
1791
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
|
|
1792
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { href: restProps.href, ref: ref }), children));
|
|
1721
1793
|
};
|
|
1722
1794
|
const Link = React.forwardRef(_Link);
|
|
1723
1795
|
Link.spiritComponent = 'Link';
|
|
1796
|
+
Link.displayName = 'Link';
|
|
1724
1797
|
|
|
1725
1798
|
var __rest$2z = (undefined && undefined.__rest) || function (s, e) {
|
|
1726
1799
|
var t = {};
|
|
@@ -1763,14 +1836,14 @@ var __rest$2y = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1763
1836
|
}
|
|
1764
1837
|
return t;
|
|
1765
1838
|
};
|
|
1766
|
-
const defaultProps$
|
|
1839
|
+
const defaultProps$V = {
|
|
1767
1840
|
iconNameEnd: 'chevron-right',
|
|
1768
1841
|
iconNameStart: 'chevron-left',
|
|
1769
1842
|
isCurrent: false,
|
|
1770
1843
|
isGoBackOnly: false,
|
|
1771
1844
|
};
|
|
1772
1845
|
const BreadcrumbsItem = (props) => {
|
|
1773
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1846
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$V), props);
|
|
1774
1847
|
const { children, href, isCurrent, iconNameStart, iconNameEnd } = propsWithDefaults, restProps = __rest$2y(propsWithDefaults, ["children", "href", "isCurrent", "iconNameStart", "iconNameEnd"]);
|
|
1775
1848
|
const { classProps, props: otherProps } = useBreadcrumbsStyleProps(Object.assign({}, restProps));
|
|
1776
1849
|
const { styleProps, props: transferProps } = useStyleProps(otherProps);
|
|
@@ -1792,12 +1865,12 @@ var __rest$2x = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1792
1865
|
}
|
|
1793
1866
|
return t;
|
|
1794
1867
|
};
|
|
1795
|
-
const defaultProps$
|
|
1868
|
+
const defaultProps$U = {
|
|
1796
1869
|
elementType: 'nav',
|
|
1797
1870
|
items: [],
|
|
1798
1871
|
};
|
|
1799
1872
|
const Breadcrumbs = (props) => {
|
|
1800
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
1873
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$U), props);
|
|
1801
1874
|
const { children, elementType: ElementTag = 'nav', goBackTitle, items } = propsWithDefaults, restProps = __rest$2x(propsWithDefaults, ["children", "elementType", "goBackTitle", "items"]);
|
|
1802
1875
|
const { classProps, props: modifiedProps } = useBreadcrumbsStyleProps(Object.assign({}, restProps));
|
|
1803
1876
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
@@ -1913,7 +1986,7 @@ var __rest$2u = (undefined && undefined.__rest) || function (s, e) {
|
|
|
1913
1986
|
}
|
|
1914
1987
|
return t;
|
|
1915
1988
|
};
|
|
1916
|
-
const defaultProps$
|
|
1989
|
+
const defaultProps$T = {
|
|
1917
1990
|
color: 'primary',
|
|
1918
1991
|
isBlock: false,
|
|
1919
1992
|
isDisabled: false,
|
|
@@ -1925,18 +1998,20 @@ const defaultProps$Q = {
|
|
|
1925
1998
|
};
|
|
1926
1999
|
const _Button = (props, ref) => {
|
|
1927
2000
|
const propsWithContext = usePropsContext();
|
|
1928
|
-
const propsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaultProps$
|
|
1929
|
-
const { elementType
|
|
2001
|
+
const propsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaultProps$T), props), propsWithContext);
|
|
2002
|
+
const { elementType = defaultProps$T.elementType, children } = propsWithDefaults, restProps = __rest$2u(propsWithDefaults, ["elementType", "children"]);
|
|
2003
|
+
const Component = elementType;
|
|
1930
2004
|
const { buttonProps } = useButtonProps(restProps);
|
|
1931
2005
|
const { classProps, props: modifiedProps } = useButtonStyleProps(restProps);
|
|
1932
2006
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
1933
|
-
const mergedStyleProps = mergeStyleProps(
|
|
1934
|
-
return (React.createElement(
|
|
2007
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
|
|
2008
|
+
return (React.createElement(Component, Object.assign({}, otherProps, buttonProps, { ref: ref }, mergedStyleProps),
|
|
1935
2009
|
children,
|
|
1936
2010
|
restProps.isLoading && React.createElement(Spinner, null)));
|
|
1937
2011
|
};
|
|
1938
2012
|
const Button = React.forwardRef(_Button);
|
|
1939
2013
|
Button.spiritComponent = 'Button';
|
|
2014
|
+
Button.displayName = 'Button';
|
|
1940
2015
|
|
|
1941
2016
|
const useButtonLinkProps = (props) => {
|
|
1942
2017
|
const { elementType, isDisabled, isLoading, onClick, href, target, rel } = props;
|
|
@@ -2005,7 +2080,7 @@ var __rest$2s = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2005
2080
|
}
|
|
2006
2081
|
return t;
|
|
2007
2082
|
};
|
|
2008
|
-
const defaultProps$
|
|
2083
|
+
const defaultProps$S = {
|
|
2009
2084
|
color: 'primary',
|
|
2010
2085
|
elementType: 'a',
|
|
2011
2086
|
isBlock: false,
|
|
@@ -2015,21 +2090,23 @@ const defaultProps$P = {
|
|
|
2015
2090
|
size: 'medium',
|
|
2016
2091
|
};
|
|
2017
2092
|
const _ButtonLink = (props, ref) => {
|
|
2018
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2019
|
-
const { elementType
|
|
2093
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$S), props);
|
|
2094
|
+
const { elementType = defaultProps$S.elementType, children } = propsWithDefaults, restProps = __rest$2s(propsWithDefaults, ["elementType", "children"]);
|
|
2095
|
+
const Component = elementType;
|
|
2020
2096
|
const { buttonLinkProps } = useButtonLinkProps(propsWithDefaults);
|
|
2021
2097
|
const { classProps, props: modifiedProps } = useButtonLinkStyleProps(restProps);
|
|
2022
2098
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
2023
|
-
const mergedStyleProps = mergeStyleProps(
|
|
2024
|
-
return (React.createElement(
|
|
2099
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
|
|
2100
|
+
return (React.createElement(Component, Object.assign({}, otherProps, buttonLinkProps, mergedStyleProps, { ref: ref }),
|
|
2025
2101
|
children,
|
|
2026
2102
|
restProps.isLoading && React.createElement(Spinner, null)));
|
|
2027
2103
|
};
|
|
2028
2104
|
const ButtonLink = React.forwardRef(_ButtonLink);
|
|
2029
2105
|
ButtonLink.spiritComponent = 'ButtonLink';
|
|
2106
|
+
ButtonLink.displayName = 'ButtonLink';
|
|
2030
2107
|
|
|
2031
2108
|
function useCardStyleProps(props) {
|
|
2032
|
-
const { artworkAlignmentX, direction, footerAlignmentX, hasFilledHeight, isBoxed, isExpanded, isHeading, isSelectable, size, } = props || {};
|
|
2109
|
+
const { alignmentY, artworkAlignmentX, direction, footerAlignmentX, hasFilledHeight, isBoxed, isExpanded, isHeading, isSelectable, size, } = props || {};
|
|
2033
2110
|
const cardClass = useClassNamePrefix('Card');
|
|
2034
2111
|
const artworkClass = `${cardClass}Artwork`;
|
|
2035
2112
|
const bodyClass = `${cardClass}Body`;
|
|
@@ -2061,6 +2138,7 @@ function useCardStyleProps(props) {
|
|
|
2061
2138
|
[mediaHasFilledHeightClass]: hasFilledHeight,
|
|
2062
2139
|
});
|
|
2063
2140
|
const rootClasses = classNames(cardClass, {
|
|
2141
|
+
[useAlignmentClass(cardClass, alignmentY, 'alignmentY')]: alignmentY,
|
|
2064
2142
|
[directionClass]: direction,
|
|
2065
2143
|
[isBoxedClass]: isBoxed,
|
|
2066
2144
|
});
|
|
@@ -2094,15 +2172,15 @@ var __rest$2r = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2094
2172
|
}
|
|
2095
2173
|
return t;
|
|
2096
2174
|
};
|
|
2097
|
-
const defaultProps$
|
|
2175
|
+
const defaultProps$R = {
|
|
2098
2176
|
direction: DirectionExtended.VERTICAL,
|
|
2099
2177
|
elementType: 'article',
|
|
2100
2178
|
isBoxed: false,
|
|
2101
2179
|
};
|
|
2102
2180
|
const Card = (props) => {
|
|
2103
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2104
|
-
const { elementType: ElementTag = 'article', direction, isBoxed, children } = propsWithDefaults, restProps = __rest$2r(propsWithDefaults, ["elementType", "direction", "isBoxed", "children"]);
|
|
2105
|
-
const { classProps } = useCardStyleProps({ direction, isBoxed });
|
|
2181
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$R), props);
|
|
2182
|
+
const { elementType: ElementTag = 'article', alignmentY, direction, isBoxed, children } = propsWithDefaults, restProps = __rest$2r(propsWithDefaults, ["elementType", "alignmentY", "direction", "isBoxed", "children"]);
|
|
2183
|
+
const { classProps } = useCardStyleProps({ alignmentY, direction, isBoxed });
|
|
2106
2184
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2107
2185
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.root, styleProps, otherProps });
|
|
2108
2186
|
return (React.createElement(ElementTag, Object.assign({}, otherProps, mergedStyleProps), children));
|
|
@@ -2120,11 +2198,11 @@ var __rest$2q = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2120
2198
|
}
|
|
2121
2199
|
return t;
|
|
2122
2200
|
};
|
|
2123
|
-
const defaultProps$
|
|
2201
|
+
const defaultProps$Q = {
|
|
2124
2202
|
alignmentX: AlignmentX.LEFT,
|
|
2125
2203
|
};
|
|
2126
2204
|
const CardArtwork = (props) => {
|
|
2127
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2205
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$Q), props);
|
|
2128
2206
|
const { children, alignmentX } = propsWithDefaults, restProps = __rest$2q(propsWithDefaults, ["children", "alignmentX"]);
|
|
2129
2207
|
const { classProps } = useCardStyleProps({ artworkAlignmentX: alignmentX });
|
|
2130
2208
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
@@ -2143,11 +2221,11 @@ var __rest$2p = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2143
2221
|
}
|
|
2144
2222
|
return t;
|
|
2145
2223
|
};
|
|
2146
|
-
const defaultProps$
|
|
2224
|
+
const defaultProps$P = {
|
|
2147
2225
|
isSelectable: false,
|
|
2148
2226
|
};
|
|
2149
2227
|
const CardBody = (props) => {
|
|
2150
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2228
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$P), props);
|
|
2151
2229
|
const { children, isSelectable } = propsWithDefaults, restProps = __rest$2p(propsWithDefaults, ["children", "isSelectable"]);
|
|
2152
2230
|
const { classProps } = useCardStyleProps({ isSelectable });
|
|
2153
2231
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
@@ -2185,11 +2263,11 @@ var __rest$2n = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2185
2263
|
}
|
|
2186
2264
|
return t;
|
|
2187
2265
|
};
|
|
2188
|
-
const defaultProps$
|
|
2266
|
+
const defaultProps$O = {
|
|
2189
2267
|
alignmentX: AlignmentX.LEFT,
|
|
2190
2268
|
};
|
|
2191
2269
|
const CardFooter = (props) => {
|
|
2192
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2270
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$O), props);
|
|
2193
2271
|
const { children, alignmentX } = propsWithDefaults, restProps = __rest$2n(propsWithDefaults, ["children", "alignmentX"]);
|
|
2194
2272
|
const { classProps } = useCardStyleProps({ footerAlignmentX: alignmentX });
|
|
2195
2273
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
@@ -2208,12 +2286,12 @@ var __rest$2m = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2208
2286
|
}
|
|
2209
2287
|
return t;
|
|
2210
2288
|
};
|
|
2211
|
-
const defaultProps$
|
|
2289
|
+
const defaultProps$N = {
|
|
2212
2290
|
elementType: 'a',
|
|
2213
2291
|
};
|
|
2214
2292
|
const _CardLink = (props, ref) => {
|
|
2215
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2216
|
-
const { elementType: ElementTag = defaultProps$
|
|
2293
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$N), props);
|
|
2294
|
+
const { elementType: ElementTag = defaultProps$N.elementType, children, href } = propsWithDefaults, restProps = __rest$2m(propsWithDefaults, ["elementType", "children", "href"]);
|
|
2217
2295
|
const { classProps } = useCardStyleProps();
|
|
2218
2296
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2219
2297
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.link, styleProps, otherProps });
|
|
@@ -2221,6 +2299,7 @@ const _CardLink = (props, ref) => {
|
|
|
2221
2299
|
};
|
|
2222
2300
|
const CardLink = React.forwardRef(_CardLink);
|
|
2223
2301
|
CardLink.spiritComponent = 'CardLink';
|
|
2302
|
+
CardLink.displayName = 'CardLink';
|
|
2224
2303
|
|
|
2225
2304
|
var __rest$2l = (undefined && undefined.__rest) || function (s, e) {
|
|
2226
2305
|
var t = {};
|
|
@@ -2265,14 +2344,14 @@ var __rest$2k = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2265
2344
|
}
|
|
2266
2345
|
return t;
|
|
2267
2346
|
};
|
|
2268
|
-
const defaultProps$
|
|
2347
|
+
const defaultProps$M = {
|
|
2269
2348
|
fit: ObjectFit.COVER,
|
|
2270
2349
|
hasFilledHeight: false,
|
|
2271
2350
|
isExpanded: false,
|
|
2272
2351
|
size: CardSizes.AUTO,
|
|
2273
2352
|
};
|
|
2274
2353
|
const CardMedia = (props) => {
|
|
2275
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2354
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$M), props);
|
|
2276
2355
|
const { backgroundColor, children, fit, hasFilledHeight, isExpanded, size } = propsWithDefaults, restProps = __rest$2k(propsWithDefaults, ["backgroundColor", "children", "fit", "hasFilledHeight", "isExpanded", "size"]);
|
|
2277
2356
|
const { classProps } = useCardStyleProps({ size, isExpanded, hasFilledHeight });
|
|
2278
2357
|
const { classProps: cardMediaClassProps, styleProps: cardMediaStyleProps } = useCardMediaStyleProps({
|
|
@@ -2300,12 +2379,12 @@ var __rest$2j = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2300
2379
|
}
|
|
2301
2380
|
return t;
|
|
2302
2381
|
};
|
|
2303
|
-
const defaultProps$
|
|
2382
|
+
const defaultProps$L = {
|
|
2304
2383
|
elementType: 'h4',
|
|
2305
2384
|
isHeading: true,
|
|
2306
2385
|
};
|
|
2307
2386
|
const CardTitle = (props) => {
|
|
2308
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2387
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$L), props);
|
|
2309
2388
|
const { elementType: ElementTag = 'h4', children, isHeading } = propsWithDefaults, restProps = __rest$2j(propsWithDefaults, ["elementType", "children", "isHeading"]);
|
|
2310
2389
|
const { classProps } = useCardStyleProps({ isHeading });
|
|
2311
2390
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
@@ -2325,14 +2404,14 @@ var __rest$2i = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2325
2404
|
}
|
|
2326
2405
|
return t;
|
|
2327
2406
|
};
|
|
2328
|
-
const defaultProps$
|
|
2407
|
+
const defaultProps$K = {
|
|
2329
2408
|
elementType: 'div',
|
|
2330
2409
|
id: undefined,
|
|
2331
2410
|
registerAria: undefined,
|
|
2332
2411
|
};
|
|
2333
2412
|
const HelperText = (props) => {
|
|
2334
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2335
|
-
const { helperText, elementType: ElementTag = defaultProps$
|
|
2413
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$K), props);
|
|
2414
|
+
const { helperText, elementType: ElementTag = defaultProps$K.elementType, id, registerAria } = propsWithDefaults, restProps = __rest$2i(propsWithDefaults, ["helperText", "elementType", "id", "registerAria"]);
|
|
2336
2415
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
2337
2416
|
const mergedStyleProps = mergeStyleProps(ElementTag, { styleProps, transferProps });
|
|
2338
2417
|
React.useEffect(() => {
|
|
@@ -2404,15 +2483,15 @@ var __rest$2g = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2404
2483
|
}
|
|
2405
2484
|
return t;
|
|
2406
2485
|
};
|
|
2407
|
-
const defaultProps$
|
|
2486
|
+
const defaultProps$J = {
|
|
2408
2487
|
elementType: 'div',
|
|
2409
2488
|
id: undefined,
|
|
2410
2489
|
registerAria: undefined,
|
|
2411
2490
|
role: undefined,
|
|
2412
2491
|
};
|
|
2413
2492
|
const ValidationText = (props) => {
|
|
2414
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2415
|
-
const { elementType: ElementTag = defaultProps$
|
|
2493
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$J), props);
|
|
2494
|
+
const { elementType: ElementTag = defaultProps$J.elementType, id, hasValidationStateIcon, registerAria, role, validationText } = propsWithDefaults, restProps = __rest$2g(propsWithDefaults, ["elementType", "id", "hasValidationStateIcon", "registerAria", "role", "validationText"]);
|
|
2416
2495
|
const validationIconName = useValidationIcon({ hasValidationStateIcon });
|
|
2417
2496
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
2418
2497
|
const mergedStyleProps = mergeStyleProps(ElementTag, { styleProps, transferProps });
|
|
@@ -2427,7 +2506,7 @@ const ValidationText = (props) => {
|
|
|
2427
2506
|
}
|
|
2428
2507
|
const nonArrayValidationText = hasValidationStateIcon ? React.createElement("div", null, validationText) : validationText;
|
|
2429
2508
|
return (React.createElement(ElementTag, Object.assign({}, transferProps, mergedStyleProps, { id: id, role: role }),
|
|
2430
|
-
hasValidationStateIcon && React.createElement(Icon, { name: validationIconName, boxSize:
|
|
2509
|
+
hasValidationStateIcon && React.createElement(Icon, { name: validationIconName, boxSize: 20 }),
|
|
2431
2510
|
Array.isArray(validationText) ? (React.createElement("ul", null, validationText.map((item) => (React.createElement("li", { key: `validationText_${item}` }, item))))) : (nonArrayValidationText)));
|
|
2432
2511
|
};
|
|
2433
2512
|
ValidationText.spiritComponent = 'ValidationText';
|
|
@@ -2527,6 +2606,7 @@ const _Checkbox = (props, ref) => {
|
|
|
2527
2606
|
};
|
|
2528
2607
|
const Checkbox = React.forwardRef(_Checkbox);
|
|
2529
2608
|
Checkbox.spiritComponent = 'Checkbox';
|
|
2609
|
+
Checkbox.displayName = 'Checkbox';
|
|
2530
2610
|
|
|
2531
2611
|
var __rest$2d = (undefined && undefined.__rest) || function (s, e) {
|
|
2532
2612
|
var t = {};
|
|
@@ -2565,12 +2645,12 @@ var __rest$2c = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2565
2645
|
}
|
|
2566
2646
|
return t;
|
|
2567
2647
|
};
|
|
2568
|
-
const defaultProps$
|
|
2648
|
+
const defaultProps$I = {
|
|
2569
2649
|
isFluid: false,
|
|
2570
2650
|
size: SizesExtended.XLARGE,
|
|
2571
2651
|
};
|
|
2572
2652
|
const Container = (props) => {
|
|
2573
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2653
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$I), props);
|
|
2574
2654
|
const { children } = propsWithDefaults, restProps = __rest$2c(propsWithDefaults, ["children"]);
|
|
2575
2655
|
const { classProps, props: modifiedProps } = useContainerStyleProps(restProps);
|
|
2576
2656
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps, {
|
|
@@ -2635,7 +2715,7 @@ var __rest$2a = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2635
2715
|
}
|
|
2636
2716
|
return t;
|
|
2637
2717
|
};
|
|
2638
|
-
const defaultProps$
|
|
2718
|
+
const defaultProps$H = {
|
|
2639
2719
|
elementType: 'button',
|
|
2640
2720
|
isDisabled: false,
|
|
2641
2721
|
isSubtle: false,
|
|
@@ -2644,24 +2724,44 @@ const defaultProps$E = {
|
|
|
2644
2724
|
type: 'button',
|
|
2645
2725
|
};
|
|
2646
2726
|
const _ControlButton = (props, ref) => {
|
|
2647
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2648
|
-
const { elementType
|
|
2727
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$H), props);
|
|
2728
|
+
const { elementType = defaultProps$H.elementType, children } = propsWithDefaults, restProps = __rest$2a(propsWithDefaults, ["elementType", "children"]);
|
|
2729
|
+
const Component = elementType;
|
|
2649
2730
|
const { controlButtonProps } = useControlButtonProps(restProps);
|
|
2650
2731
|
const { classProps, props: modifiedProps } = useControlButtonStyleProps(restProps);
|
|
2651
2732
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
2652
|
-
const mergedStyleProps = mergeStyleProps(
|
|
2653
|
-
return (React.createElement(
|
|
2733
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
|
|
2734
|
+
return (React.createElement(Component, Object.assign({}, otherProps, controlButtonProps, { ref: ref }, mergedStyleProps), children));
|
|
2654
2735
|
};
|
|
2655
2736
|
const ControlButton = React.forwardRef(_ControlButton);
|
|
2656
2737
|
ControlButton.spiritComponent = 'ControlButton';
|
|
2738
|
+
ControlButton.displayName = 'ControlButton';
|
|
2739
|
+
|
|
2740
|
+
const TRANSITION_FALLBACK_TIMEOUT = 300;
|
|
2657
2741
|
|
|
2658
2742
|
const useDialog = (ref, isOpen) => {
|
|
2743
|
+
const closeTimeoutRef = React.useRef(null);
|
|
2744
|
+
const clearCloseTimeout = React.useCallback(() => {
|
|
2745
|
+
if (closeTimeoutRef.current !== null) {
|
|
2746
|
+
clearTimeout(closeTimeoutRef.current);
|
|
2747
|
+
closeTimeoutRef.current = null;
|
|
2748
|
+
}
|
|
2749
|
+
}, []);
|
|
2750
|
+
const scheduleDialogClose = React.useCallback((dialogNode) => {
|
|
2751
|
+
clearCloseTimeout();
|
|
2752
|
+
closeTimeoutRef.current = setTimeout(() => {
|
|
2753
|
+
if (dialogNode.open && dialogNode.close) {
|
|
2754
|
+
dialogNode.close();
|
|
2755
|
+
}
|
|
2756
|
+
}, TRANSITION_FALLBACK_TIMEOUT);
|
|
2757
|
+
}, [clearCloseTimeout]);
|
|
2659
2758
|
const handleTransitionEnd = React.useCallback((event) => {
|
|
2660
2759
|
const dialogNode = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
2661
2760
|
if (dialogNode && event.target === dialogNode && !isOpen && dialogNode.open && dialogNode.close) {
|
|
2761
|
+
clearCloseTimeout();
|
|
2662
2762
|
dialogNode.close();
|
|
2663
2763
|
}
|
|
2664
|
-
}, [isOpen, ref]);
|
|
2764
|
+
}, [isOpen, ref, clearCloseTimeout]);
|
|
2665
2765
|
useScrollControl(ref, isOpen);
|
|
2666
2766
|
const setOpenClass = React.useCallback((shouldAdd) => {
|
|
2667
2767
|
const dialogNode = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
@@ -2677,25 +2777,37 @@ const useDialog = (ref, isOpen) => {
|
|
|
2677
2777
|
React.useEffect(() => {
|
|
2678
2778
|
const dialogNode = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
2679
2779
|
if (dialogNode) {
|
|
2680
|
-
if (isOpen
|
|
2681
|
-
|
|
2682
|
-
|
|
2780
|
+
if (isOpen) {
|
|
2781
|
+
clearCloseTimeout();
|
|
2782
|
+
if (!dialogNode.open && dialogNode.showModal) {
|
|
2783
|
+
dialogNode.showModal();
|
|
2784
|
+
setOpenClass(true);
|
|
2785
|
+
}
|
|
2683
2786
|
}
|
|
2684
2787
|
else if (!isOpen && dialogNode.open) {
|
|
2685
2788
|
setOpenClass(false);
|
|
2789
|
+
scheduleDialogClose(dialogNode);
|
|
2686
2790
|
}
|
|
2687
2791
|
}
|
|
2688
|
-
|
|
2792
|
+
return () => {
|
|
2793
|
+
clearCloseTimeout();
|
|
2794
|
+
};
|
|
2795
|
+
}, [isOpen, ref, setOpenClass, clearCloseTimeout, scheduleDialogClose]);
|
|
2689
2796
|
const openDialog = () => {
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2797
|
+
const dialogNode = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
2798
|
+
if (dialogNode) {
|
|
2799
|
+
clearCloseTimeout();
|
|
2800
|
+
if (!dialogNode.open && dialogNode.showModal) {
|
|
2801
|
+
dialogNode.showModal();
|
|
2802
|
+
setOpenClass(true);
|
|
2803
|
+
}
|
|
2693
2804
|
}
|
|
2694
2805
|
};
|
|
2695
2806
|
const closeDialog = () => {
|
|
2696
2807
|
const dialogNode = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
2697
2808
|
if (dialogNode && dialogNode.open) {
|
|
2698
2809
|
setOpenClass(false);
|
|
2810
|
+
scheduleDialogClose(dialogNode);
|
|
2699
2811
|
}
|
|
2700
2812
|
};
|
|
2701
2813
|
return {
|
|
@@ -2716,7 +2828,7 @@ var __rest$29 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2716
2828
|
}
|
|
2717
2829
|
return t;
|
|
2718
2830
|
};
|
|
2719
|
-
const
|
|
2831
|
+
const _Dialog = (props, ref) => {
|
|
2720
2832
|
const { children, isOpen, onClose, closeOnBackdropClick = true, closeOnEscapeKeyDown } = props, restProps = __rest$29(props, ["children", "isOpen", "onClose", "closeOnBackdropClick", "closeOnEscapeKeyDown"]);
|
|
2721
2833
|
const dialogElementRef = React.useRef(ref);
|
|
2722
2834
|
const contentElementRef = React.useRef(null);
|
|
@@ -2739,8 +2851,9 @@ const Dialog = (props, ref) => {
|
|
|
2739
2851
|
},
|
|
2740
2852
|
})));
|
|
2741
2853
|
};
|
|
2854
|
+
const Dialog = React.forwardRef(_Dialog);
|
|
2742
2855
|
Dialog.spiritComponent = 'Dialog';
|
|
2743
|
-
|
|
2856
|
+
Dialog.displayName = 'Dialog';
|
|
2744
2857
|
|
|
2745
2858
|
function useDividerStyleProps(props) {
|
|
2746
2859
|
const DividerClass = useClassNamePrefix('Divider');
|
|
@@ -2757,7 +2870,6 @@ const Divider = (props) => {
|
|
|
2757
2870
|
};
|
|
2758
2871
|
Divider.spiritComponent = 'Divider';
|
|
2759
2872
|
|
|
2760
|
-
const DRAWER_CLOSE_BUTTON_LABEL_DEFAULT = 'Close';
|
|
2761
2873
|
const DRAWER_ALIGNMENT_DEFAULT = AlignmentX.RIGHT;
|
|
2762
2874
|
|
|
2763
2875
|
const defaultContext$7 = {
|
|
@@ -2815,7 +2927,7 @@ const Drawer = (props) => {
|
|
|
2815
2927
|
};
|
|
2816
2928
|
useLastActiveFocus(isOpen);
|
|
2817
2929
|
return (React.createElement(DrawerProvider, { value: contextValue },
|
|
2818
|
-
React.createElement(Dialog
|
|
2930
|
+
React.createElement(Dialog, Object.assign({}, otherProps, styleProps, { id: id, isOpen: isOpen, onClose: onClose, className: classNames(classProps.root, styleProps.className) }), children)));
|
|
2819
2931
|
};
|
|
2820
2932
|
Drawer.spiritComponent = 'Drawer';
|
|
2821
2933
|
|
|
@@ -2870,21 +2982,22 @@ var __rest$25 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2870
2982
|
}
|
|
2871
2983
|
return t;
|
|
2872
2984
|
};
|
|
2873
|
-
const defaultProps$
|
|
2985
|
+
const defaultProps$G = {
|
|
2874
2986
|
color: ComponentButtonColors.TERTIARY,
|
|
2875
2987
|
iconBoxSize: DEFAULT_BOX_SIZE,
|
|
2876
|
-
label: DRAWER_CLOSE_BUTTON_LABEL_DEFAULT,
|
|
2877
2988
|
size: Sizes.MEDIUM,
|
|
2878
2989
|
};
|
|
2879
2990
|
const DrawerCloseButton = (props) => {
|
|
2880
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
2991
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$G), props);
|
|
2881
2992
|
const { color, iconBoxSize, label, size } = propsWithDefaults, restProps = __rest$25(propsWithDefaults, ["color", "iconBoxSize", "label", "size"]);
|
|
2993
|
+
const { t } = useI18n();
|
|
2994
|
+
const closeLabel = label !== null && label !== void 0 ? label : t('common.close');
|
|
2882
2995
|
const { id, isOpen, onClose } = useDrawerContext();
|
|
2883
2996
|
const { classProps } = useDrawerStyleProps();
|
|
2884
2997
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2885
2998
|
return (React.createElement(Button, Object.assign({}, otherProps, { "aria-expanded": isOpen, "aria-controls": id, onClick: onClose, color: color, size: size, UNSAFE_className: classNames(classProps.closeButton, styleProps.className), UNSAFE_style: styleProps.style, isSymmetrical: true }),
|
|
2886
2999
|
React.createElement(Icon, { name: "close", boxSize: iconBoxSize }),
|
|
2887
|
-
React.createElement(VisuallyHidden, null,
|
|
3000
|
+
React.createElement(VisuallyHidden, null, closeLabel)));
|
|
2888
3001
|
};
|
|
2889
3002
|
DrawerCloseButton.spiritComponent = 'DrawerCloseButton';
|
|
2890
3003
|
|
|
@@ -2900,15 +3013,17 @@ var __rest$24 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2900
3013
|
return t;
|
|
2901
3014
|
};
|
|
2902
3015
|
const _DrawerPanel = (props, ref) => {
|
|
2903
|
-
const { elementType
|
|
3016
|
+
const { elementType = 'div', children } = props, restProps = __rest$24(props, ["elementType", "children"]);
|
|
3017
|
+
const Component = elementType;
|
|
2904
3018
|
const { classProps } = useDrawerStyleProps(restProps);
|
|
2905
3019
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
2906
|
-
const mergedStyleProps = mergeStyleProps(
|
|
2907
|
-
return (React.createElement(
|
|
3020
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.panel, styleProps, otherProps });
|
|
3021
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }),
|
|
2908
3022
|
React.createElement("div", { className: classProps.content }, children)));
|
|
2909
3023
|
};
|
|
2910
3024
|
const DrawerPanel = React.forwardRef(_DrawerPanel);
|
|
2911
3025
|
DrawerPanel.spiritComponent = 'DrawerPanel';
|
|
3026
|
+
DrawerPanel.displayName = 'DrawerPanel';
|
|
2912
3027
|
|
|
2913
3028
|
const NAME_ARIA_EXPANDED = 'aria-expanded';
|
|
2914
3029
|
const NAME_ARIA_CONTROLS = 'aria-controls';
|
|
@@ -3031,11 +3146,11 @@ var __rest$21 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3031
3146
|
}
|
|
3032
3147
|
return t;
|
|
3033
3148
|
};
|
|
3034
|
-
const defaultProps$
|
|
3149
|
+
const defaultProps$F = {
|
|
3035
3150
|
elementType: 'button',
|
|
3036
3151
|
};
|
|
3037
3152
|
const DropdownTrigger = (props) => {
|
|
3038
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
3153
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$F), props);
|
|
3039
3154
|
const { elementType: ElementTag = 'button', children } = propsWithDefaults, rest = __rest$21(propsWithDefaults, ["elementType", "children"]);
|
|
3040
3155
|
const { id, isOpen, onToggle, fullWidthMode, triggerRef } = useDropdownContext();
|
|
3041
3156
|
const { classProps, props: modifiedProps } = useDropdownStyleProps(Object.assign({ isOpen }, rest));
|
|
@@ -3163,27 +3278,30 @@ var __rest$1Z = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3163
3278
|
}
|
|
3164
3279
|
return t;
|
|
3165
3280
|
};
|
|
3166
|
-
const defaultProps$
|
|
3281
|
+
const defaultProps$E = {
|
|
3167
3282
|
elementType: 'div',
|
|
3168
3283
|
hasSpacing: false,
|
|
3169
3284
|
hasEndDivider: false,
|
|
3170
3285
|
hasIntermediateDividers: false,
|
|
3171
3286
|
hasStartDivider: false,
|
|
3172
3287
|
};
|
|
3173
|
-
const
|
|
3174
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
3175
|
-
const { elementType
|
|
3288
|
+
const _Stack = (props, ref) => {
|
|
3289
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$E), props);
|
|
3290
|
+
const { elementType = defaultProps$E.elementType, children } = propsWithDefaults, restProps = __rest$1Z(propsWithDefaults, ["elementType", "children"]);
|
|
3291
|
+
const Component = elementType;
|
|
3176
3292
|
const { classProps, props: modifiedProps, styleProps: stackStyle } = useStackStyleProps(restProps);
|
|
3177
3293
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
3178
|
-
const mergedStyleProps = mergeStyleProps(
|
|
3294
|
+
const mergedStyleProps = mergeStyleProps(Component, {
|
|
3179
3295
|
classProps: classProps.root,
|
|
3180
3296
|
stackStyle,
|
|
3181
3297
|
styleProps,
|
|
3182
3298
|
otherProps,
|
|
3183
3299
|
});
|
|
3184
|
-
return (React.createElement(
|
|
3300
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
3185
3301
|
};
|
|
3302
|
+
const Stack = React.forwardRef(_Stack);
|
|
3186
3303
|
Stack.spiritComponent = 'Stack';
|
|
3304
|
+
Stack.displayName = 'Stack';
|
|
3187
3305
|
|
|
3188
3306
|
var __rest$1Y = (undefined && undefined.__rest) || function (s, e) {
|
|
3189
3307
|
var t = {};
|
|
@@ -3196,18 +3314,24 @@ var __rest$1Y = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3196
3314
|
}
|
|
3197
3315
|
return t;
|
|
3198
3316
|
};
|
|
3199
|
-
const
|
|
3200
|
-
|
|
3317
|
+
const defaultProps$D = {
|
|
3318
|
+
elementType: 'div',
|
|
3319
|
+
};
|
|
3320
|
+
const _StackItem = (props, ref) => {
|
|
3321
|
+
const { elementType = defaultProps$D.elementType, children } = props, restProps = __rest$1Y(props, ["elementType", "children"]);
|
|
3322
|
+
const Component = elementType;
|
|
3201
3323
|
const { classProps, props: modifiedProps } = useStackStyleProps(restProps);
|
|
3202
3324
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
3203
|
-
const mergedStyleProps = mergeStyleProps(
|
|
3325
|
+
const mergedStyleProps = mergeStyleProps(Component, {
|
|
3204
3326
|
classProps: classProps.item,
|
|
3205
3327
|
styleProps,
|
|
3206
3328
|
otherProps,
|
|
3207
3329
|
});
|
|
3208
|
-
return (React.createElement(
|
|
3330
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
3209
3331
|
};
|
|
3332
|
+
const StackItem = React.forwardRef(_StackItem);
|
|
3210
3333
|
StackItem.spiritComponent = 'StackItem';
|
|
3334
|
+
StackItem.displayName = 'StackItem';
|
|
3211
3335
|
|
|
3212
3336
|
function useEmptyStateStyleProps(props) {
|
|
3213
3337
|
const emptyStateClass = useClassNamePrefix('EmptyState');
|
|
@@ -3323,9 +3447,6 @@ const DEFAULT_ERROR_MESSAGE_QUEUE_DUPLICITY = 'This file already exists in the q
|
|
|
3323
3447
|
const DEFAULT_ERROR_MESSAGE_QUEUE_LIMIT = 'You have exceeded the number of files allowed in the queue';
|
|
3324
3448
|
const DEFAULT_ERROR_MESSAGE_UNSUPPORTED_FILE = 'This file type is not supported';
|
|
3325
3449
|
const DEFAULT_ICON_NAME = 'file';
|
|
3326
|
-
const DEFAULT_BUTTON_LABEL = 'Remove';
|
|
3327
|
-
const DEFAULT_EDIT_BUTTON_LABEL = 'Edit';
|
|
3328
|
-
const DEFAULT_ATTACHMENT_LIST_LABEL = 'Attachments';
|
|
3329
3450
|
const FileUploaderCropCSS = {
|
|
3330
3451
|
TOP: '--file-uploader-attachment-image-top',
|
|
3331
3452
|
LEFT: '--file-uploader-attachment-image-left',
|
|
@@ -3695,7 +3816,9 @@ var __rest$1S = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3695
3816
|
return t;
|
|
3696
3817
|
};
|
|
3697
3818
|
const FileUploaderList = (props) => {
|
|
3698
|
-
const {
|
|
3819
|
+
const { t } = useI18n();
|
|
3820
|
+
const { label, id, attachmentComponent, inputName, hasImagePreview } = props, restProps = __rest$1S(props, ["label", "id", "attachmentComponent", "inputName", "hasImagePreview"]);
|
|
3821
|
+
const attachmentsLabel = label !== null && label !== void 0 ? label : t('fileUploader.attachments');
|
|
3699
3822
|
const { classProps } = useFileUploaderStyleProps();
|
|
3700
3823
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
3701
3824
|
const { fileQueue, onDismiss } = useFileUploaderContext();
|
|
@@ -3713,7 +3836,7 @@ const FileUploaderList = (props) => {
|
|
|
3713
3836
|
}));
|
|
3714
3837
|
}, [attachmentComponent, fileQueue, inputName, onDismiss, hasImagePreview]);
|
|
3715
3838
|
return (React.createElement(React.Fragment, null,
|
|
3716
|
-
React.createElement("h3", { id: id, hidden: true },
|
|
3839
|
+
React.createElement("h3", { id: id, hidden: true }, attachmentsLabel),
|
|
3717
3840
|
React.createElement("ul", Object.assign({ "aria-labelledby": id }, transferProps, styleProps, { className: classNames(classProps.list, styleProps.className) }), renderAttachments)));
|
|
3718
3841
|
};
|
|
3719
3842
|
FileUploaderList.spiritComponent = 'FileUploaderList';
|
|
@@ -3760,12 +3883,12 @@ const AttachmentDismissButton = (props) => {
|
|
|
3760
3883
|
};
|
|
3761
3884
|
AttachmentDismissButton.spiritComponent = 'AttachmentDismissButton';
|
|
3762
3885
|
|
|
3763
|
-
const defaultProps$
|
|
3886
|
+
const defaultProps$C = {
|
|
3764
3887
|
meta: undefined,
|
|
3765
3888
|
imageObjectFit: 'cover',
|
|
3766
3889
|
};
|
|
3767
3890
|
const AttachmentImagePreview = (props) => {
|
|
3768
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
3891
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$C), props);
|
|
3769
3892
|
const { label, imagePreview, meta, imageObjectFit } = propsWithDefaults;
|
|
3770
3893
|
const { classProps } = useFileUploaderStyleProps({ meta, imageObjectFit });
|
|
3771
3894
|
const { imageCropStyles, attachmentStyles } = classProps;
|
|
@@ -3861,7 +3984,10 @@ var __rest$1P = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3861
3984
|
return t;
|
|
3862
3985
|
};
|
|
3863
3986
|
const FileUploaderAttachment = (props) => {
|
|
3864
|
-
const {
|
|
3987
|
+
const { t } = useI18n();
|
|
3988
|
+
const { editText, file, hasImagePreview, iconName = DEFAULT_ICON_NAME, id, imageObjectFit, label, meta, name, onDismiss, onEdit, onError, removeText } = props, restProps = __rest$1P(props, ["editText", "file", "hasImagePreview", "iconName", "id", "imageObjectFit", "label", "meta", "name", "onDismiss", "onEdit", "onError", "removeText"]);
|
|
3989
|
+
const resolvedEditText = editText !== null && editText !== void 0 ? editText : t('fileUploader.edit');
|
|
3990
|
+
const resolvedRemoveText = removeText !== null && removeText !== void 0 ? removeText : t('fileUploader.remove');
|
|
3865
3991
|
const [imagePreview, setImagePreview] = React.useState('');
|
|
3866
3992
|
const { classProps } = useFileUploaderStyleProps();
|
|
3867
3993
|
const { styleProps, props: transferProps } = useStyleProps(restProps);
|
|
@@ -3882,8 +4008,8 @@ const FileUploaderAttachment = (props) => {
|
|
|
3882
4008
|
React.createElement("span", { className: classProps.attachment.name },
|
|
3883
4009
|
React.createElement("span", { className: useClassNamePrefix('text-truncate') }, label)),
|
|
3884
4010
|
onEdit && (React.createElement("span", { className: classProps.attachment.slot },
|
|
3885
|
-
React.createElement(AttachmentActionButton, { onClick: onEditHandler },
|
|
3886
|
-
React.createElement(AttachmentDismissButton, { onClick: dismissHandler },
|
|
4011
|
+
React.createElement(AttachmentActionButton, { onClick: onEditHandler }, resolvedEditText))),
|
|
4012
|
+
React.createElement(AttachmentDismissButton, { onClick: dismissHandler }, resolvedRemoveText)));
|
|
3887
4013
|
};
|
|
3888
4014
|
FileUploaderAttachment.spiritComponent = 'FileUploaderAttachment';
|
|
3889
4015
|
|
|
@@ -3987,25 +4113,28 @@ var __rest$1N = (undefined && undefined.__rest) || function (s, e) {
|
|
|
3987
4113
|
}
|
|
3988
4114
|
return t;
|
|
3989
4115
|
};
|
|
3990
|
-
const
|
|
4116
|
+
const defaultProps$B = {
|
|
3991
4117
|
backgroundColor: BackgroundColors.SECONDARY,
|
|
3992
4118
|
elementType: 'footer',
|
|
3993
4119
|
paddingBottom: PADDING_BOTTOM,
|
|
3994
4120
|
paddingTop: PADDING_TOP,
|
|
3995
4121
|
};
|
|
3996
|
-
const
|
|
3997
|
-
const propsWithDefaults = Object.assign(Object.assign({},
|
|
3998
|
-
const { elementType
|
|
4122
|
+
const _Footer = (props, ref) => {
|
|
4123
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$B), props);
|
|
4124
|
+
const { elementType = defaultProps$B.elementType, children, backgroundColor } = propsWithDefaults, restProps = __rest$1N(propsWithDefaults, ["elementType", "children", "backgroundColor"]);
|
|
4125
|
+
const Component = elementType;
|
|
3999
4126
|
const { classProps } = useFooterStyleProps({ backgroundColor });
|
|
4000
4127
|
const { styleProps, props: otherProps } = useStyleProps(restProps, {
|
|
4001
4128
|
paddingBottom: PaddingStyleProps.paddingBottom,
|
|
4002
4129
|
paddingTop: PaddingStyleProps.paddingTop,
|
|
4003
4130
|
textAlignment: TextStyleProps.textAlignment,
|
|
4004
4131
|
});
|
|
4005
|
-
const mergedStyleProps = mergeStyleProps(
|
|
4006
|
-
return (React.createElement(
|
|
4132
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
|
|
4133
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
4007
4134
|
};
|
|
4135
|
+
const Footer = React.forwardRef(_Footer);
|
|
4008
4136
|
Footer.spiritComponent = 'Footer';
|
|
4137
|
+
Footer.displayName = 'Footer';
|
|
4009
4138
|
|
|
4010
4139
|
var __rest$1M = (undefined && undefined.__rest) || function (s, e) {
|
|
4011
4140
|
var t = {};
|
|
@@ -4057,22 +4186,23 @@ var __rest$1L = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4057
4186
|
}
|
|
4058
4187
|
return t;
|
|
4059
4188
|
};
|
|
4060
|
-
const defaultProps$
|
|
4189
|
+
const defaultProps$A = {
|
|
4061
4190
|
alignmentX: AlignmentXExtended.STRETCH,
|
|
4062
4191
|
alignmentY: AlignmentYExtended.STRETCH,
|
|
4063
4192
|
elementType: 'div',
|
|
4064
4193
|
};
|
|
4065
|
-
const
|
|
4066
|
-
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$
|
|
4067
|
-
const { elementType
|
|
4194
|
+
const _Grid = (props, ref) => {
|
|
4195
|
+
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$A), props);
|
|
4196
|
+
const { elementType = defaultProps$A.elementType, children } = propsWithDefaults, restProps = __rest$1L(propsWithDefaults, ["elementType", "children"]);
|
|
4197
|
+
const Component = elementType;
|
|
4068
4198
|
const { classProps, props: modifiedProps, styleProps: gridStyle } = useGridStyleProps(restProps);
|
|
4069
4199
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
4070
|
-
const mergedStyleProps = mergeStyleProps(
|
|
4071
|
-
return (React.createElement(
|
|
4200
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps, gridStyle });
|
|
4201
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
4072
4202
|
};
|
|
4203
|
+
const Grid = React.forwardRef(_Grid);
|
|
4073
4204
|
Grid.spiritComponent = 'Grid';
|
|
4074
|
-
Grid.
|
|
4075
|
-
Grid.spiritDefaultProps = null;
|
|
4205
|
+
Grid.displayName = 'Grid';
|
|
4076
4206
|
|
|
4077
4207
|
const setStyleProperty = (styleObject, propertyName, value) => {
|
|
4078
4208
|
styleObject[propertyName] = value;
|
|
@@ -4094,18 +4224,19 @@ const setGridItemStyle = (styleObject, baseVarName, propValue) => {
|
|
|
4094
4224
|
function useGridItemStyleProps(props) {
|
|
4095
4225
|
const gridItemClass = useClassNamePrefix('GridItem');
|
|
4096
4226
|
const gridItemStyle = {};
|
|
4097
|
-
const
|
|
4098
|
-
const typePropNames = Object.keys(
|
|
4227
|
+
const mutableProps = Object.assign({}, props);
|
|
4228
|
+
const typePropNames = Object.keys(mutableProps).filter((propName) => propName.startsWith('column') || propName.startsWith('row'));
|
|
4099
4229
|
typePropNames.forEach((propName) => {
|
|
4100
4230
|
const type = propName.startsWith('column') ? 'column' : 'row';
|
|
4101
|
-
|
|
4102
|
-
|
|
4231
|
+
const value = mutableProps[propName];
|
|
4232
|
+
if (value) {
|
|
4233
|
+
setGridItemStyle(gridItemStyle, `grid-item-${type}-${propName.replace(type, '').toLowerCase()}`, value);
|
|
4103
4234
|
}
|
|
4104
|
-
delete
|
|
4235
|
+
delete mutableProps[propName];
|
|
4105
4236
|
});
|
|
4106
4237
|
return {
|
|
4107
4238
|
classProps: gridItemClass,
|
|
4108
|
-
props:
|
|
4239
|
+
props: mutableProps,
|
|
4109
4240
|
styleProps: gridItemStyle,
|
|
4110
4241
|
};
|
|
4111
4242
|
}
|
|
@@ -4121,16 +4252,20 @@ var __rest$1K = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4121
4252
|
}
|
|
4122
4253
|
return t;
|
|
4123
4254
|
};
|
|
4124
|
-
const
|
|
4125
|
-
|
|
4255
|
+
const defaultProps$z = {
|
|
4256
|
+
elementType: 'div',
|
|
4257
|
+
};
|
|
4258
|
+
const _GridItem = (props, ref) => {
|
|
4259
|
+
const { elementType = defaultProps$z.elementType, children } = props, restProps = __rest$1K(props, ["elementType", "children"]);
|
|
4260
|
+
const Component = elementType;
|
|
4126
4261
|
const { classProps, styleProps: gridItemStyle, props: modifiedProps } = useGridItemStyleProps(restProps);
|
|
4127
4262
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
4128
|
-
const mergedStyleProps = mergeStyleProps(
|
|
4129
|
-
return (React.createElement(
|
|
4263
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps, gridItemStyle });
|
|
4264
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
4130
4265
|
};
|
|
4266
|
+
const GridItem = React.forwardRef(_GridItem);
|
|
4131
4267
|
GridItem.spiritComponent = 'GridItem';
|
|
4132
|
-
GridItem.
|
|
4133
|
-
GridItem.spiritDefaultProps = null;
|
|
4268
|
+
GridItem.displayName = 'GridItem';
|
|
4134
4269
|
|
|
4135
4270
|
const HEADER_COLOR_DEFAULT = 'primary';
|
|
4136
4271
|
const HEADER_ACTIONS_COLOR_DEFAULT = 'primary';
|
|
@@ -4275,7 +4410,7 @@ const HeaderDialog = (props) => {
|
|
|
4275
4410
|
const providerValue = { id, isOpen, onClose };
|
|
4276
4411
|
useLastActiveFocus(isOpen);
|
|
4277
4412
|
return (React.createElement(HeaderDialogProvider, { value: providerValue },
|
|
4278
|
-
React.createElement(Dialog
|
|
4413
|
+
React.createElement(Dialog, Object.assign({}, otherProps, { id: id, isOpen: isOpen, onClose: onClose, className: classNames(classProps.headerDialog.root, styleProps.className), style: styleProps.style }),
|
|
4279
4414
|
React.createElement("div", { className: classProps.headerDialog.panel },
|
|
4280
4415
|
React.createElement("div", { className: classProps.headerDialog.content }, children)))));
|
|
4281
4416
|
};
|
|
@@ -4346,18 +4481,20 @@ var __rest$1E = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4346
4481
|
return t;
|
|
4347
4482
|
};
|
|
4348
4483
|
const _HeaderDialogLink = (props, ref) => {
|
|
4349
|
-
const { elementType
|
|
4484
|
+
const { elementType = 'a', children, isCurrent } = props, restProps = __rest$1E(props, ["elementType", "children", "isCurrent"]);
|
|
4485
|
+
const Component = elementType;
|
|
4350
4486
|
const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });
|
|
4351
4487
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4352
|
-
const mergedStyleProps = mergeStyleProps(
|
|
4488
|
+
const mergedStyleProps = mergeStyleProps(Component, {
|
|
4353
4489
|
classProps: classProps.headerDialogLink,
|
|
4354
4490
|
styleProps,
|
|
4355
4491
|
otherProps,
|
|
4356
4492
|
});
|
|
4357
|
-
return (React.createElement(
|
|
4493
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
4358
4494
|
};
|
|
4359
4495
|
const HeaderDialogLink = React.forwardRef(_HeaderDialogLink);
|
|
4360
4496
|
HeaderDialogLink.spiritComponent = 'HeaderDialogLink';
|
|
4497
|
+
HeaderDialogLink.displayName = 'HeaderDialogLink';
|
|
4361
4498
|
|
|
4362
4499
|
const HeaderDialogNav = (props) => {
|
|
4363
4500
|
const { classProps } = useHeaderStyleProps();
|
|
@@ -4392,18 +4529,20 @@ var __rest$1D = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4392
4529
|
return t;
|
|
4393
4530
|
};
|
|
4394
4531
|
const _HeaderLink = (props, ref) => {
|
|
4395
|
-
const { elementType
|
|
4532
|
+
const { elementType = 'a', children, isCurrent } = props, restProps = __rest$1D(props, ["elementType", "children", "isCurrent"]);
|
|
4533
|
+
const Component = elementType;
|
|
4396
4534
|
const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });
|
|
4397
4535
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4398
|
-
const mergedStyleProps = mergeStyleProps(
|
|
4536
|
+
const mergedStyleProps = mergeStyleProps(Component, {
|
|
4399
4537
|
classProps: classProps.headerLink,
|
|
4400
4538
|
styleProps,
|
|
4401
4539
|
otherProps,
|
|
4402
4540
|
});
|
|
4403
|
-
return (React.createElement(
|
|
4541
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
4404
4542
|
};
|
|
4405
4543
|
const HeaderLink = React.forwardRef(_HeaderLink);
|
|
4406
4544
|
HeaderLink.spiritComponent = 'HeaderLink';
|
|
4545
|
+
HeaderLink.displayName = 'HeaderLink';
|
|
4407
4546
|
|
|
4408
4547
|
var __rest$1C = (undefined && undefined.__rest) || function (s, e) {
|
|
4409
4548
|
var t = {};
|
|
@@ -4510,17 +4649,18 @@ var __rest$1z = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4510
4649
|
const defaultProps$w = {
|
|
4511
4650
|
elementType: 'span',
|
|
4512
4651
|
};
|
|
4513
|
-
const
|
|
4652
|
+
const _Hidden = (props, ref) => {
|
|
4514
4653
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$w), props);
|
|
4515
|
-
const { elementType
|
|
4654
|
+
const { elementType = defaultProps$w.elementType, children, on, from } = propsWithDefaults, restProps = __rest$1z(propsWithDefaults, ["elementType", "children", "on", "from"]);
|
|
4655
|
+
const Component = elementType;
|
|
4516
4656
|
const stylePropsWithMapping = Object.assign(Object.assign({}, restProps), { hideOn: on || restProps.hideOn, hideFrom: from || restProps.hideFrom });
|
|
4517
4657
|
const { styleProps, props: otherProps } = useStyleProps(stylePropsWithMapping);
|
|
4518
|
-
const mergedStyleProps = mergeStyleProps(
|
|
4519
|
-
return (React.createElement(
|
|
4658
|
+
const mergedStyleProps = mergeStyleProps(Component, { styleProps });
|
|
4659
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
4520
4660
|
};
|
|
4661
|
+
const Hidden = React.forwardRef(_Hidden);
|
|
4521
4662
|
Hidden.spiritComponent = 'Hidden';
|
|
4522
|
-
Hidden.
|
|
4523
|
-
Hidden.spiritDefaultProps = null;
|
|
4663
|
+
Hidden.displayName = 'Hidden';
|
|
4524
4664
|
|
|
4525
4665
|
const IconBoxShapes = {
|
|
4526
4666
|
ROUNDED: 'rounded',
|
|
@@ -4620,17 +4760,20 @@ const defaultProps$v = {
|
|
|
4620
4760
|
isSubtle: true,
|
|
4621
4761
|
size: SizesExtended.MEDIUM,
|
|
4622
4762
|
};
|
|
4623
|
-
const
|
|
4763
|
+
const _IconBox = (props, ref) => {
|
|
4624
4764
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$v), props);
|
|
4625
4765
|
const { elementType, shape, color, iconName, isSubtle, hasBorder, size } = propsWithDefaults, restProps = __rest$1x(propsWithDefaults, ["elementType", "shape", "color", "iconName", "isSubtle", "hasBorder", "size"]);
|
|
4766
|
+
const Component = elementType;
|
|
4626
4767
|
const { colors } = useIconBoxColors(color, isSubtle);
|
|
4627
4768
|
const { iconBoxStyles: iconBoxStyleProps, props: modifiedProps, shapesProps, sizeProps: { padding, iconSize }, } = useIconBoxStyleProps(Object.assign({ size,
|
|
4628
4769
|
shape }, restProps));
|
|
4629
4770
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
4630
|
-
return (React.createElement(Box, Object.assign({}, otherProps, { backgroundColor: colors.background, elementType:
|
|
4771
|
+
return (React.createElement(Box, Object.assign({}, otherProps, { backgroundColor: colors.background, elementType: Component, borderColor: hasBorder ? colors.border : undefined, borderRadius: shapesProps, borderWidth: hasBorder ? BorderWidths['100'] : undefined, padding: padding, textColor: colors.text, UNSAFE_className: classNames(styleProps.className, 'd-inline-flex'), UNSAFE_style: Object.assign(Object.assign({}, styleProps.style), iconBoxStyleProps), ref: ref }),
|
|
4631
4772
|
React.createElement(Icon, { "aria-hidden": "true", boxSize: iconSize, name: iconName })));
|
|
4632
4773
|
};
|
|
4774
|
+
const IconBox = React.forwardRef(_IconBox);
|
|
4633
4775
|
IconBox.spiritComponent = 'IconBox';
|
|
4776
|
+
IconBox.displayName = 'IconBox';
|
|
4634
4777
|
|
|
4635
4778
|
var __rest$1w = (undefined && undefined.__rest) || function (s, e) {
|
|
4636
4779
|
var t = {};
|
|
@@ -4848,7 +4991,7 @@ const Modal = (props) => {
|
|
|
4848
4991
|
};
|
|
4849
4992
|
useLastActiveFocus(isOpen);
|
|
4850
4993
|
return (React.createElement(ModalProvider, { value: contextValue },
|
|
4851
|
-
React.createElement(Dialog
|
|
4994
|
+
React.createElement(Dialog, Object.assign({}, otherProps, styleProps, { id: id, isOpen: isOpen, onClose: onClose, className: classNames(classProps.root, styleProps.className), "aria-labelledby": `${id}__title` }), children)));
|
|
4852
4995
|
};
|
|
4853
4996
|
Modal.spiritComponent = 'Modal';
|
|
4854
4997
|
|
|
@@ -4871,8 +5014,6 @@ const ModalBody = (_a) => {
|
|
|
4871
5014
|
};
|
|
4872
5015
|
ModalBody.spiritComponent = 'ModalBody';
|
|
4873
5016
|
|
|
4874
|
-
const MODAL_CLOSE_BUTTON_LABEL_DEFAULT = 'Close';
|
|
4875
|
-
|
|
4876
5017
|
var __rest$1q = (undefined && undefined.__rest) || function (s, e) {
|
|
4877
5018
|
var t = {};
|
|
4878
5019
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -4885,10 +5026,12 @@ var __rest$1q = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4885
5026
|
return t;
|
|
4886
5027
|
};
|
|
4887
5028
|
const ModalCloseButton = (_a) => {
|
|
4888
|
-
var { label
|
|
5029
|
+
var { label, onClose, id, isOpen } = _a, restProps = __rest$1q(_a, ["label", "onClose", "id", "isOpen"]);
|
|
5030
|
+
const { t } = useI18n();
|
|
5031
|
+
const closeLabel = label !== null && label !== void 0 ? label : t('common.close');
|
|
4889
5032
|
return (React.createElement(Button, Object.assign({}, restProps, { isSymmetrical: true, color: "tertiary", onClick: onClose, "aria-expanded": isOpen, "aria-controls": id }),
|
|
4890
5033
|
React.createElement(Icon, { name: "close" }),
|
|
4891
|
-
React.createElement(VisuallyHidden, null,
|
|
5034
|
+
React.createElement(VisuallyHidden, null, closeLabel)));
|
|
4892
5035
|
};
|
|
4893
5036
|
ModalCloseButton.spiritComponent = 'ModalCloseButton';
|
|
4894
5037
|
|
|
@@ -4937,21 +5080,23 @@ var __rest$1o = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4937
5080
|
}
|
|
4938
5081
|
return t;
|
|
4939
5082
|
};
|
|
4940
|
-
const
|
|
4941
|
-
const { elementType
|
|
5083
|
+
const _ModalDialog = (props, ref) => {
|
|
5084
|
+
const { elementType = 'article', children, isDockedOnMobile, isExpandedOnMobile, isScrollable } = props, restProps = __rest$1o(props, ["elementType", "children", "isDockedOnMobile", "isExpandedOnMobile", "isScrollable"]);
|
|
5085
|
+
const Component = elementType;
|
|
4942
5086
|
const { classProps } = useModalStyleProps({ isDockedOnMobile, isExpandedOnMobile, isScrollable });
|
|
4943
5087
|
const { modalDialogStyleProps, props: modifiedProps } = useModalDialogStyleProps(restProps);
|
|
4944
5088
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
4945
|
-
const mergedStyleProps = mergeStyleProps(
|
|
5089
|
+
const mergedStyleProps = mergeStyleProps(Component, {
|
|
4946
5090
|
classProps: classProps.dialog,
|
|
4947
5091
|
modalDialogStyleProps,
|
|
4948
5092
|
styleProps,
|
|
4949
5093
|
otherProps,
|
|
4950
5094
|
});
|
|
4951
|
-
return (React.createElement(
|
|
5095
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
4952
5096
|
};
|
|
5097
|
+
const ModalDialog = React.forwardRef(_ModalDialog);
|
|
4953
5098
|
ModalDialog.spiritComponent = 'ModalDialog';
|
|
4954
|
-
|
|
5099
|
+
ModalDialog.displayName = 'ModalDialog';
|
|
4955
5100
|
|
|
4956
5101
|
var __rest$1n = (undefined && undefined.__rest) || function (s, e) {
|
|
4957
5102
|
var t = {};
|
|
@@ -4990,13 +5135,15 @@ const defaultProps$t = {
|
|
|
4990
5135
|
};
|
|
4991
5136
|
const ModalHeader = (props) => {
|
|
4992
5137
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$t), props);
|
|
4993
|
-
const { children, closeLabel
|
|
5138
|
+
const { children, closeLabel, hasCloseButton } = propsWithDefaults, restProps = __rest$1m(propsWithDefaults, ["children", "closeLabel", "hasCloseButton"]);
|
|
5139
|
+
const { t } = useI18n();
|
|
5140
|
+
const resolvedCloseLabel = closeLabel !== null && closeLabel !== void 0 ? closeLabel : t('common.close');
|
|
4994
5141
|
const { classProps } = useModalStyleProps();
|
|
4995
5142
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
4996
5143
|
const { id, isOpen, onClose } = useModalContext();
|
|
4997
5144
|
return (React.createElement("header", Object.assign({}, otherProps, styleProps, { className: classNames(classProps.header, styleProps.className) }),
|
|
4998
5145
|
children && (React.createElement("h2", { id: `${id}__title`, className: classProps.title }, children)),
|
|
4999
|
-
hasCloseButton && React.createElement(ModalCloseButton, { id: id, isOpen: isOpen, label:
|
|
5146
|
+
hasCloseButton && React.createElement(ModalCloseButton, { id: id, isOpen: isOpen, label: resolvedCloseLabel, onClose: onClose })));
|
|
5000
5147
|
};
|
|
5001
5148
|
ModalHeader.spiritComponent = 'ModalHeader';
|
|
5002
5149
|
|
|
@@ -5105,6 +5252,7 @@ const _NavigationAction = (props, ref) => {
|
|
|
5105
5252
|
};
|
|
5106
5253
|
const NavigationAction = React.forwardRef(_NavigationAction);
|
|
5107
5254
|
NavigationAction.spiritComponent = 'NavigationAction';
|
|
5255
|
+
NavigationAction.displayName = 'NavigationAction';
|
|
5108
5256
|
|
|
5109
5257
|
var __rest$1i = (undefined && undefined.__rest) || function (s, e) {
|
|
5110
5258
|
var t = {};
|
|
@@ -5120,19 +5268,21 @@ var __rest$1i = (undefined && undefined.__rest) || function (s, e) {
|
|
|
5120
5268
|
const defaultProps$q = {
|
|
5121
5269
|
elementType: 'a',
|
|
5122
5270
|
isSquare: false,
|
|
5271
|
+
avatarSize: Sizes.SMALL,
|
|
5123
5272
|
};
|
|
5124
5273
|
const _NavigationAvatar = (props, ref) => {
|
|
5125
5274
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$q), props);
|
|
5126
|
-
const { elementType: ElementTag = defaultProps$q.elementType, avatarContent, isSquare, children } = propsWithDefaults, restProps = __rest$1i(propsWithDefaults, ["elementType", "avatarContent", "isSquare", "children"]);
|
|
5275
|
+
const { elementType: ElementTag = defaultProps$q.elementType, avatarContent, avatarSize = defaultProps$q.avatarSize, isSquare, children } = propsWithDefaults, restProps = __rest$1i(propsWithDefaults, ["elementType", "avatarContent", "avatarSize", "isSquare", "children"]);
|
|
5127
5276
|
const { classProps, props: modifiedProps } = useNavigationStyleProps(Object.assign({ isSquare }, restProps));
|
|
5128
5277
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
5129
5278
|
const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.avatar, styleProps, otherProps });
|
|
5130
|
-
return (React.createElement(ElementTag, Object.assign({}, otherProps, mergedStyleProps, {
|
|
5131
|
-
React.createElement(Avatar, { size:
|
|
5279
|
+
return (React.createElement(ElementTag, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }),
|
|
5280
|
+
React.createElement(Avatar, { size: avatarSize, isSquare: isSquare }, avatarContent),
|
|
5132
5281
|
children));
|
|
5133
5282
|
};
|
|
5134
5283
|
const NavigationAvatar = React.forwardRef(_NavigationAvatar);
|
|
5135
5284
|
NavigationAvatar.spiritComponent = 'NavigationAvatar';
|
|
5285
|
+
NavigationAvatar.displayName = 'NavigationAvatar';
|
|
5136
5286
|
|
|
5137
5287
|
var __rest$1h = (undefined && undefined.__rest) || function (s, e) {
|
|
5138
5288
|
var t = {};
|
|
@@ -5201,10 +5351,6 @@ const Pagination = (props) => {
|
|
|
5201
5351
|
};
|
|
5202
5352
|
Pagination.spiritComponent = 'Pagination';
|
|
5203
5353
|
|
|
5204
|
-
const PAGINATION_PREVIOUS_LINK_DEFAULT_ACCESSIBILITY_LABEL = 'Previous';
|
|
5205
|
-
const PAGINATION_NEXT_LINK_DEFAULT_ACCESSIBILITY_LABEL = 'Next';
|
|
5206
|
-
const PAGINATION_LINK_DEFAULT_ACCESSIBILITY_LABEL_PREFIX = 'Go to page';
|
|
5207
|
-
|
|
5208
5354
|
var __rest$1f = (undefined && undefined.__rest) || function (s, e) {
|
|
5209
5355
|
var t = {};
|
|
5210
5356
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -5217,19 +5363,20 @@ var __rest$1f = (undefined && undefined.__rest) || function (s, e) {
|
|
|
5217
5363
|
return t;
|
|
5218
5364
|
};
|
|
5219
5365
|
const _PaginationButtonLink = (props, ref) => {
|
|
5220
|
-
const
|
|
5221
|
-
|
|
5222
|
-
|
|
5366
|
+
const { t } = useI18n();
|
|
5367
|
+
const _a = props, { direction, accessibilityLabel } = _a, restProps = __rest$1f(_a, ["direction", "accessibilityLabel"]);
|
|
5368
|
+
const directionLabel = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : (direction === 'previous' ? t('pagination.previous') : t('pagination.next'));
|
|
5223
5369
|
const iconType = {
|
|
5224
5370
|
previous: 'chevron-left',
|
|
5225
5371
|
next: 'chevron-right',
|
|
5226
5372
|
};
|
|
5227
5373
|
return (React.createElement(ButtonLink, Object.assign({ color: "secondary", isSymmetrical: true }, restProps, { ref: ref }),
|
|
5228
5374
|
React.createElement(Icon, { name: iconType[direction] }),
|
|
5229
|
-
React.createElement(VisuallyHidden, null,
|
|
5375
|
+
React.createElement(VisuallyHidden, null, directionLabel)));
|
|
5230
5376
|
};
|
|
5231
5377
|
const PaginationButtonLink = React.forwardRef(_PaginationButtonLink);
|
|
5232
5378
|
PaginationButtonLink.spiritComponent = 'PaginationButtonLink';
|
|
5379
|
+
PaginationButtonLink.displayName = 'PaginationButtonLink';
|
|
5233
5380
|
|
|
5234
5381
|
var __rest$1e = (undefined && undefined.__rest) || function (s, e) {
|
|
5235
5382
|
var t = {};
|
|
@@ -5262,17 +5409,20 @@ var __rest$1d = (undefined && undefined.__rest) || function (s, e) {
|
|
|
5262
5409
|
return t;
|
|
5263
5410
|
};
|
|
5264
5411
|
const _PaginationLink = (props, ref) => {
|
|
5265
|
-
const {
|
|
5266
|
-
const
|
|
5412
|
+
const { t } = useI18n();
|
|
5413
|
+
const { elementType = 'a', accessibilityLabel, isCurrent, pageNumber } = props, restProps = __rest$1d(props, ["elementType", "accessibilityLabel", "isCurrent", "pageNumber"]);
|
|
5414
|
+
const visuallyHiddenLabel = accessibilityLabel || `${t('pagination.goToPage')} ${pageNumber}`;
|
|
5415
|
+
const Component = elementType;
|
|
5267
5416
|
const { classProps } = usePaginationStyleProps({ isCurrent });
|
|
5268
5417
|
const { styleProps, props: otherProps } = useStyleProps(restProps);
|
|
5269
|
-
const mergedStyleProps = mergeStyleProps(
|
|
5270
|
-
return (React.createElement(
|
|
5418
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.link, styleProps, otherProps });
|
|
5419
|
+
return (React.createElement(Component, Object.assign({}, (isCurrent && { 'aria-current': 'page' }), otherProps, mergedStyleProps, { ref: ref }),
|
|
5271
5420
|
React.createElement(VisuallyHidden, null, visuallyHiddenLabel),
|
|
5272
5421
|
React.createElement("span", { "aria-hidden": "true" }, pageNumber)));
|
|
5273
5422
|
};
|
|
5274
5423
|
const PaginationLink = React.forwardRef(_PaginationLink);
|
|
5275
5424
|
PaginationLink.spiritComponent = 'PaginationLink';
|
|
5425
|
+
PaginationLink.displayName = 'PaginationLink';
|
|
5276
5426
|
|
|
5277
5427
|
var __rest$1c = (undefined && undefined.__rest) || function (s, e) {
|
|
5278
5428
|
var t = {};
|
|
@@ -5286,11 +5436,14 @@ var __rest$1c = (undefined && undefined.__rest) || function (s, e) {
|
|
|
5286
5436
|
return t;
|
|
5287
5437
|
};
|
|
5288
5438
|
const _PaginationLinkNext = (_a, ref) => {
|
|
5289
|
-
var { accessibilityLabel
|
|
5290
|
-
|
|
5439
|
+
var { accessibilityLabel } = _a, restProps = __rest$1c(_a, ["accessibilityLabel"]);
|
|
5440
|
+
const { t } = useI18n();
|
|
5441
|
+
const nextLabel = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : t('pagination.next');
|
|
5442
|
+
return React.createElement(PaginationButtonLink, Object.assign({ direction: "next", accessibilityLabel: nextLabel }, restProps, { ref: ref }));
|
|
5291
5443
|
};
|
|
5292
5444
|
const PaginationLinkNext = React.forwardRef(_PaginationLinkNext);
|
|
5293
5445
|
PaginationLinkNext.spiritComponent = 'PaginationLinkNext';
|
|
5446
|
+
PaginationLinkNext.displayName = 'PaginationLinkNext';
|
|
5294
5447
|
|
|
5295
5448
|
var __rest$1b = (undefined && undefined.__rest) || function (s, e) {
|
|
5296
5449
|
var t = {};
|
|
@@ -5304,11 +5457,14 @@ var __rest$1b = (undefined && undefined.__rest) || function (s, e) {
|
|
|
5304
5457
|
return t;
|
|
5305
5458
|
};
|
|
5306
5459
|
const _PaginationLinkPrevious = (_a, ref) => {
|
|
5307
|
-
var { accessibilityLabel
|
|
5308
|
-
|
|
5460
|
+
var { accessibilityLabel } = _a, restProps = __rest$1b(_a, ["accessibilityLabel"]);
|
|
5461
|
+
const { t } = useI18n();
|
|
5462
|
+
const previousLabel = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : t('pagination.previous');
|
|
5463
|
+
return React.createElement(PaginationButtonLink, Object.assign({ direction: "previous", accessibilityLabel: previousLabel }, restProps, { ref: ref }));
|
|
5309
5464
|
};
|
|
5310
5465
|
const PaginationLinkPrevious = React.forwardRef(_PaginationLinkPrevious);
|
|
5311
5466
|
PaginationLinkPrevious.spiritComponent = 'PaginationLinkPrevious';
|
|
5467
|
+
PaginationLinkPrevious.displayName = 'PaginationLinkPrevious';
|
|
5312
5468
|
|
|
5313
5469
|
const usePagination = ({ totalPages, onChange, defaultPage, visiblePages }) => {
|
|
5314
5470
|
const [currentPage, setCurrentPage] = React.useState(defaultPage <= 0 || defaultPage > totalPages ? 1 : (defaultPage !== null && defaultPage !== void 0 ? defaultPage : 1));
|
|
@@ -5355,7 +5511,11 @@ var __rest$1a = (undefined && undefined.__rest) || function (s, e) {
|
|
|
5355
5511
|
return t;
|
|
5356
5512
|
};
|
|
5357
5513
|
const UncontrolledPagination = (props) => {
|
|
5358
|
-
const {
|
|
5514
|
+
const { t } = useI18n();
|
|
5515
|
+
const { accessibilityLabel, accessibilityLabelPrevious, accessibilityLabelNext, defaultPage = 1, onChange, totalPages = 0, visiblePages = 5 } = props, rest = __rest$1a(props, ["accessibilityLabel", "accessibilityLabelPrevious", "accessibilityLabelNext", "defaultPage", "onChange", "totalPages", "visiblePages"]);
|
|
5516
|
+
const resolvedAccessibilityLabel = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : t('pagination.goToPage');
|
|
5517
|
+
const resolvedAccessibilityLabelPrevious = accessibilityLabelPrevious !== null && accessibilityLabelPrevious !== void 0 ? accessibilityLabelPrevious : t('pagination.previous');
|
|
5518
|
+
const resolvedAccessibilityLabelNext = accessibilityLabelNext !== null && accessibilityLabelNext !== void 0 ? accessibilityLabelNext : t('pagination.next');
|
|
5359
5519
|
const { currentPage, pages, handlePageChange } = usePagination({
|
|
5360
5520
|
defaultPage,
|
|
5361
5521
|
onChange,
|
|
@@ -5363,16 +5523,16 @@ const UncontrolledPagination = (props) => {
|
|
|
5363
5523
|
visiblePages,
|
|
5364
5524
|
});
|
|
5365
5525
|
return (React.createElement(Pagination, Object.assign({}, rest),
|
|
5366
|
-
currentPage !== 1 && (React.createElement(PaginationLinkPrevious, { accessibilityLabel:
|
|
5526
|
+
currentPage !== 1 && (React.createElement(PaginationLinkPrevious, { accessibilityLabel: resolvedAccessibilityLabelPrevious, onClick: (event) => {
|
|
5367
5527
|
event.preventDefault();
|
|
5368
5528
|
handlePageChange(currentPage - 1);
|
|
5369
5529
|
} })), pages === null || pages === void 0 ? void 0 :
|
|
5370
5530
|
pages.map((pageNumber) => (React.createElement(PaginationItem, { key: pageNumber },
|
|
5371
|
-
React.createElement(PaginationLink, { accessibilityLabel: `${
|
|
5531
|
+
React.createElement(PaginationLink, { accessibilityLabel: `${resolvedAccessibilityLabel} ${pageNumber}`, href: "#", isCurrent: currentPage === pageNumber, pageNumber: pageNumber, onClick: (event) => {
|
|
5372
5532
|
event.preventDefault();
|
|
5373
5533
|
handlePageChange(pageNumber);
|
|
5374
5534
|
} })))),
|
|
5375
|
-
currentPage !== totalPages && (React.createElement(PaginationLinkNext, { accessibilityLabel:
|
|
5535
|
+
currentPage !== totalPages && (React.createElement(PaginationLinkNext, { accessibilityLabel: resolvedAccessibilityLabelNext, onClick: (event) => {
|
|
5376
5536
|
event.preventDefault();
|
|
5377
5537
|
handlePageChange(currentPage + 1);
|
|
5378
5538
|
} }))));
|
|
@@ -5820,18 +5980,19 @@ var __rest$11 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
5820
5980
|
}
|
|
5821
5981
|
return t;
|
|
5822
5982
|
};
|
|
5823
|
-
const
|
|
5983
|
+
const _Tooltip = (props, ref) => {
|
|
5824
5984
|
var _a;
|
|
5825
|
-
const { children, elementType
|
|
5985
|
+
const { children, elementType = 'div', enableFlipping: flipProp = true, enableFlippingCrossAxis: flipCrossAxis = true, enableShifting: shiftProp = true, enableSizing: sizeProp = true, flipFallbackAxisSideDirection = 'none', flipFallbackPlacements = ['bottom', 'top'], id, isDismissible = false, isFocusableOnHover = false, isOpen = false, onToggle, placement: tooltipPlacement, positionStrategy = 'absolute', trigger = ['click', 'hover'] } = props, restProps = __rest$11(props, ["children", "elementType", "enableFlipping", "enableFlippingCrossAxis", "enableShifting", "enableSizing", "flipFallbackAxisSideDirection", "flipFallbackPlacements", "id", "isDismissible", "isFocusableOnHover", "isOpen", "onToggle", "placement", "positionStrategy", "trigger"]);
|
|
5986
|
+
const Component = elementType;
|
|
5826
5987
|
const { classProps, props: modifiedProps } = useTooltipStyleProps(Object.assign({ isDismissible,
|
|
5827
5988
|
isOpen }, restProps));
|
|
5828
5989
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
5829
|
-
const mergedStyleProps = mergeStyleProps(
|
|
5990
|
+
const mergedStyleProps = mergeStyleProps(Component, {
|
|
5830
5991
|
classProps: classProps.rootClassName,
|
|
5831
5992
|
styleProps,
|
|
5832
5993
|
});
|
|
5833
5994
|
const arrowRef = React.useRef(null);
|
|
5834
|
-
const tooltipRef = React.useRef(
|
|
5995
|
+
const tooltipRef = React.useRef(ref);
|
|
5835
5996
|
let tooltipMaxWidth;
|
|
5836
5997
|
let tooltipOffset;
|
|
5837
5998
|
let tooltipCornerOffset;
|
|
@@ -5886,9 +6047,11 @@ const Tooltip = (props) => {
|
|
|
5886
6047
|
y,
|
|
5887
6048
|
position,
|
|
5888
6049
|
} },
|
|
5889
|
-
React.createElement(
|
|
6050
|
+
React.createElement(Component, Object.assign({}, otherProps, { ref: tooltipRef }, mergedStyleProps), children)));
|
|
5890
6051
|
};
|
|
6052
|
+
const Tooltip = React.forwardRef(_Tooltip);
|
|
5891
6053
|
Tooltip.spiritComponent = 'Tooltip';
|
|
6054
|
+
Tooltip.displayName = 'Tooltip';
|
|
5892
6055
|
|
|
5893
6056
|
var __rest$10 = (undefined && undefined.__rest) || function (s, e) {
|
|
5894
6057
|
var t = {};
|
|
@@ -5902,12 +6065,14 @@ var __rest$10 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
5902
6065
|
return t;
|
|
5903
6066
|
};
|
|
5904
6067
|
const TooltipCloseButton = (_a) => {
|
|
5905
|
-
var { label
|
|
6068
|
+
var { label, onClick } = _a, restProps = __rest$10(_a, ["label", "onClick"]);
|
|
6069
|
+
const { t } = useI18n();
|
|
6070
|
+
const closeLabel = label !== null && label !== void 0 ? label : t('common.close');
|
|
5906
6071
|
const { classProps, props: modifiedProps } = useTooltipStyleProps(restProps);
|
|
5907
6072
|
const { styleProps } = useStyleProps(Object.assign({}, modifiedProps));
|
|
5908
6073
|
return (React.createElement("button", { type: "button", className: classNames(classProps.closeButtonClassName, styleProps.className), style: styleProps.style, onClick: onClick, "aria-expanded": "true" },
|
|
5909
6074
|
React.createElement(Icon, { name: "close", "aria-hidden": "true" }),
|
|
5910
|
-
React.createElement(VisuallyHidden, null,
|
|
6075
|
+
React.createElement(VisuallyHidden, null, closeLabel)));
|
|
5911
6076
|
};
|
|
5912
6077
|
TooltipCloseButton.spiritComponent = 'TooltipCloseButton';
|
|
5913
6078
|
|
|
@@ -6039,7 +6204,7 @@ const PricingPlanFeatureTitle = (_a) => {
|
|
|
6039
6204
|
React.createElement(Icon, { name: "check-plain", boxSize: 16 }),
|
|
6040
6205
|
React.createElement("button", { type: "button", onClick: () => setIsModalOpen(true), className: classNames(classProps.body.featureTitleText, 'text-underlined-dotted') }, title),
|
|
6041
6206
|
React.createElement(Modal, { id: `${featureId}-modal`, isOpen: isModalOpen, onClose: () => setIsModalOpen(false) },
|
|
6042
|
-
React.createElement(ModalDialog
|
|
6207
|
+
React.createElement(ModalDialog, { isScrollable: true },
|
|
6043
6208
|
React.createElement(ModalHeader, null, title),
|
|
6044
6209
|
React.createElement(ModalBody, null, modalContent)))));
|
|
6045
6210
|
}
|
|
@@ -6201,6 +6366,7 @@ const _Radio = (props, ref) => {
|
|
|
6201
6366
|
};
|
|
6202
6367
|
const Radio = React.forwardRef(_Radio);
|
|
6203
6368
|
Radio.spiritComponent = 'Radio';
|
|
6369
|
+
Radio.displayName = 'Radio';
|
|
6204
6370
|
|
|
6205
6371
|
const DEBOUNCE_DELAY = 50;
|
|
6206
6372
|
const EDGE_DETECTION_INACCURACY_PX = 1;
|
|
@@ -6427,7 +6593,7 @@ const sizePaddingMapping = {
|
|
|
6427
6593
|
[SizesExtended.LARGE]: { paddingY: { mobile: 'space-1200', tablet: 'space-1400' } },
|
|
6428
6594
|
[SizesExtended.XLARGE]: { paddingY: { mobile: 'space-1400', tablet: 'space-1600' } },
|
|
6429
6595
|
};
|
|
6430
|
-
const useSectionSizeProps = (props) => {
|
|
6596
|
+
const useSectionSizeProps = (props = {}) => {
|
|
6431
6597
|
const { size } = props;
|
|
6432
6598
|
const modifiedProps = size ? Object.assign(Object.assign({}, sizePaddingMapping[size]), props) : props;
|
|
6433
6599
|
return {
|
|
@@ -6459,14 +6625,14 @@ var __rest$Q = (undefined && undefined.__rest) || function (s, e) {
|
|
|
6459
6625
|
return t;
|
|
6460
6626
|
};
|
|
6461
6627
|
const defaultProps$i = {
|
|
6462
|
-
containerProps: undefined,
|
|
6463
6628
|
elementType: 'section',
|
|
6464
6629
|
hasContainer: true,
|
|
6465
6630
|
size: undefined,
|
|
6466
6631
|
};
|
|
6467
|
-
const
|
|
6632
|
+
const _Section = (props, ref) => {
|
|
6468
6633
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$i), props);
|
|
6469
|
-
const { elementType
|
|
6634
|
+
const { elementType = defaultProps$i.elementType, backgroundColor, children, containerProps, hasContainer } = propsWithDefaults, restProps = __rest$Q(propsWithDefaults, ["elementType", "backgroundColor", "children", "containerProps", "hasContainer"]);
|
|
6635
|
+
const Component = elementType;
|
|
6470
6636
|
const { classProps } = useSectionStyleProps({ backgroundColor });
|
|
6471
6637
|
const { modifiedProps } = useSectionSizeProps(restProps);
|
|
6472
6638
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps, {
|
|
@@ -6475,10 +6641,12 @@ const Section = (props) => {
|
|
|
6475
6641
|
paddingY: PaddingStyleProps.paddingY,
|
|
6476
6642
|
textAlignment: TextStyleProps.textAlignment,
|
|
6477
6643
|
});
|
|
6478
|
-
const mergedStyleProps = mergeStyleProps(
|
|
6479
|
-
return (React.createElement(
|
|
6644
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps });
|
|
6645
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), hasContainer ? React.createElement(Container, Object.assign({}, containerProps), children) : children));
|
|
6480
6646
|
};
|
|
6647
|
+
const Section = React.forwardRef(_Section);
|
|
6481
6648
|
Section.spiritComponent = 'Section';
|
|
6649
|
+
Section.displayName = 'Section';
|
|
6482
6650
|
|
|
6483
6651
|
const defaultContext$1 = {
|
|
6484
6652
|
isMultiselect: false,
|
|
@@ -6569,9 +6737,9 @@ var __rest$N = (undefined && undefined.__rest) || function (s, e) {
|
|
|
6569
6737
|
}
|
|
6570
6738
|
return t;
|
|
6571
6739
|
};
|
|
6572
|
-
const
|
|
6740
|
+
const _SegmentedControlItem = (props, ref) => {
|
|
6573
6741
|
const { isMultiselect, name, onSelectionChange, selectedValue, setSelectedValue } = useSegmentedControlContext();
|
|
6574
|
-
const { id, isDisabled, value, children } =
|
|
6742
|
+
const _a = props, { id, isDisabled, value, children } = _a, restProps = __rest$N(_a, ["id", "isDisabled", "value", "children"]);
|
|
6575
6743
|
const { classProps, props: modifiedProps } = useSegmentedControlStyleProps(restProps);
|
|
6576
6744
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
6577
6745
|
const handleSetSelectedValue = (v) => {
|
|
@@ -6596,8 +6764,10 @@ const SegmentedControlItem = React.forwardRef((props, ref) => {
|
|
|
6596
6764
|
return (React.createElement(React.Fragment, null,
|
|
6597
6765
|
React.createElement("input", Object.assign({}, otherProps, styleProps, (isDisabled && { disabled: true }), { className: classNames(classProps.input, styleProps.className), type: isMultiselect ? 'checkbox' : 'radio', name: name, id: id, value: value, checked: isChecked, onChange: () => handleSetSelectedValue(String(value)) })),
|
|
6598
6766
|
React.createElement("label", Object.assign({ ref: ref, htmlFor: id }, styleProps, { className: classNames(classProps.label, styleProps.className) }), children)));
|
|
6599
|
-
}
|
|
6767
|
+
};
|
|
6768
|
+
const SegmentedControlItem = React.forwardRef(_SegmentedControlItem);
|
|
6600
6769
|
SegmentedControlItem.spiritComponent = 'SegmentedControlItem';
|
|
6770
|
+
SegmentedControlItem.displayName = 'SegmentedControlItem';
|
|
6601
6771
|
|
|
6602
6772
|
const useSegmentedControl = ({ defaultSelectedValue, isMultiselect }) => {
|
|
6603
6773
|
let initialValue;
|
|
@@ -6696,6 +6866,7 @@ const _Select = (props, ref) => {
|
|
|
6696
6866
|
};
|
|
6697
6867
|
const Select = React.forwardRef(_Select);
|
|
6698
6868
|
Select.spiritComponent = 'Select';
|
|
6869
|
+
Select.displayName = 'Select';
|
|
6699
6870
|
|
|
6700
6871
|
var __rest$L = (undefined && undefined.__rest) || function (s, e) {
|
|
6701
6872
|
var t = {};
|
|
@@ -6921,6 +7092,7 @@ const _SkipLink = (props, ref) => {
|
|
|
6921
7092
|
};
|
|
6922
7093
|
const SkipLink = React.forwardRef(_SkipLink);
|
|
6923
7094
|
SkipLink.spiritComponent = 'SkipLink';
|
|
7095
|
+
SkipLink.displayName = 'SkipLink';
|
|
6924
7096
|
|
|
6925
7097
|
const SLIDER_DEFAULT_PROPS = {
|
|
6926
7098
|
max: 100,
|
|
@@ -7008,6 +7180,7 @@ const _Slider = (props, ref) => {
|
|
|
7008
7180
|
};
|
|
7009
7181
|
const Slider = React.forwardRef(_Slider);
|
|
7010
7182
|
Slider.spiritComponent = 'Slider';
|
|
7183
|
+
Slider.displayName = 'Slider';
|
|
7011
7184
|
|
|
7012
7185
|
function useSplitButtonStyleProps() {
|
|
7013
7186
|
const SplitButtonClass = useClassNamePrefix('SplitButton');
|
|
@@ -7040,8 +7213,6 @@ const SplitButton = (props) => {
|
|
|
7040
7213
|
React.createElement("div", Object.assign({}, styleProps, otherProps, { className: classNames(classProps, styleProps.className) }), children)));
|
|
7041
7214
|
};
|
|
7042
7215
|
|
|
7043
|
-
const UNCONTROLLED_SPLIT_BUTTON_DROPDOWN_TRIGGER_LABEL_DEFAULT = 'More';
|
|
7044
|
-
|
|
7045
7216
|
var __rest$B = (undefined && undefined.__rest) || function (s, e) {
|
|
7046
7217
|
var t = {};
|
|
7047
7218
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -7056,20 +7227,21 @@ var __rest$B = (undefined && undefined.__rest) || function (s, e) {
|
|
|
7056
7227
|
const defaultProps$a = {
|
|
7057
7228
|
dropdownPlacement: 'bottom-end',
|
|
7058
7229
|
dropdownTriggerIconName: 'chevron-down',
|
|
7059
|
-
dropdownTriggerLabel: UNCONTROLLED_SPLIT_BUTTON_DROPDOWN_TRIGGER_LABEL_DEFAULT,
|
|
7060
7230
|
};
|
|
7061
7231
|
const UncontrolledSplitButton = (props) => {
|
|
7232
|
+
const { t } = useI18n();
|
|
7062
7233
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$a), props);
|
|
7063
7234
|
const { buttonIconName, buttonLabel, buttonOnClick, children, dropdownTriggerIconName, dropdownTriggerLabel, dropdownPlacement, id, isButtonLabelHidden, isDisabled, isDropdownTriggerLabelHidden } = propsWithDefaults, restProps = __rest$B(propsWithDefaults, ["buttonIconName", "buttonLabel", "buttonOnClick", "children", "dropdownTriggerIconName", "dropdownTriggerLabel", "dropdownPlacement", "id", "isButtonLabelHidden", "isDisabled", "isDropdownTriggerLabelHidden"]);
|
|
7235
|
+
const resolvedDropdownTriggerLabel = dropdownTriggerLabel !== null && dropdownTriggerLabel !== void 0 ? dropdownTriggerLabel : t('splitButton.dropdown');
|
|
7064
7236
|
const [openDropdownState, setOpenDropdownState] = React.useState(false);
|
|
7065
7237
|
return (React.createElement(SplitButton, Object.assign({}, restProps, { id: id, isDisabled: isDisabled }),
|
|
7066
7238
|
React.createElement(Button, { onClick: buttonOnClick },
|
|
7067
|
-
buttonIconName && React.createElement(Icon, { name: buttonIconName,
|
|
7239
|
+
buttonIconName && React.createElement(Icon, Object.assign({ name: buttonIconName }, (!isButtonLabelHidden && { marginRight: 'space-400' }))),
|
|
7068
7240
|
isButtonLabelHidden ? React.createElement(VisuallyHidden, null, buttonLabel) : buttonLabel),
|
|
7069
7241
|
React.createElement(Dropdown, { id: `${id}-dropdown`, isOpen: openDropdownState, onToggle: () => setOpenDropdownState(!openDropdownState), placement: dropdownPlacement },
|
|
7070
7242
|
React.createElement(DropdownTrigger, { elementType: Button },
|
|
7071
|
-
isDropdownTriggerLabelHidden ? (React.createElement(VisuallyHidden, null,
|
|
7072
|
-
React.createElement(Icon, { name: dropdownTriggerIconName,
|
|
7243
|
+
isDropdownTriggerLabelHidden ? (React.createElement(VisuallyHidden, null, resolvedDropdownTriggerLabel)) : (resolvedDropdownTriggerLabel),
|
|
7244
|
+
React.createElement(Icon, Object.assign({ name: dropdownTriggerIconName }, (!isDropdownTriggerLabelHidden && { marginLeft: 'space-400' })))),
|
|
7073
7245
|
React.createElement(DropdownPopover, null, children))));
|
|
7074
7246
|
};
|
|
7075
7247
|
|
|
@@ -7183,15 +7355,17 @@ const defaultProps$9 = {
|
|
|
7183
7355
|
};
|
|
7184
7356
|
const _TabLink = (props, ref) => {
|
|
7185
7357
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$9), props);
|
|
7186
|
-
const { elementType
|
|
7358
|
+
const { elementType = 'a', children, itemProps = {} } = propsWithDefaults, restProps = __rest$x(propsWithDefaults, ["elementType", "children", "itemProps"]);
|
|
7359
|
+
const Component = elementType;
|
|
7187
7360
|
const { classProps } = useTabsStyleProps();
|
|
7188
7361
|
const { styleProps: itemStyleProps, props: itemTransferProps } = useStyleProps(itemProps);
|
|
7189
|
-
const mergedStyleProps = mergeStyleProps(
|
|
7362
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.link });
|
|
7190
7363
|
return (React.createElement("li", Object.assign({}, itemStyleProps, itemTransferProps, { className: classNames(classProps.item, itemStyleProps.className), role: "presentation" }),
|
|
7191
|
-
React.createElement(
|
|
7364
|
+
React.createElement(Component, Object.assign({}, restProps, mergedStyleProps, { ref: ref }), children)));
|
|
7192
7365
|
};
|
|
7193
7366
|
const TabLink = React.forwardRef(_TabLink);
|
|
7194
7367
|
TabLink.spiritComponent = 'TabLink';
|
|
7368
|
+
TabLink.displayName = 'TabLink';
|
|
7195
7369
|
|
|
7196
7370
|
var __rest$w = (undefined && undefined.__rest) || function (s, e) {
|
|
7197
7371
|
var t = {};
|
|
@@ -7303,14 +7477,16 @@ const defaultProps$8 = {
|
|
|
7303
7477
|
};
|
|
7304
7478
|
const _Tag = (props, ref) => {
|
|
7305
7479
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$8), props);
|
|
7306
|
-
const { elementType
|
|
7480
|
+
const { elementType = defaultProps$8.elementType, children } = propsWithDefaults, restProps = __rest$t(propsWithDefaults, ["elementType", "children"]);
|
|
7481
|
+
const Component = elementType;
|
|
7307
7482
|
const { classProps, props: modifiedProps } = useTagStyleProps(restProps);
|
|
7308
7483
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
7309
|
-
const mergedStyleProps = mergeStyleProps(
|
|
7310
|
-
return (React.createElement(
|
|
7484
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
|
|
7485
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
7311
7486
|
};
|
|
7312
7487
|
const Tag = React.forwardRef(_Tag);
|
|
7313
7488
|
Tag.spiritComponent = 'Tag';
|
|
7489
|
+
Tag.displayName = 'Tag';
|
|
7314
7490
|
|
|
7315
7491
|
var __rest$s = (undefined && undefined.__rest) || function (s, e) {
|
|
7316
7492
|
var t = {};
|
|
@@ -7406,12 +7582,13 @@ const _TextFieldBaseInput = (props, ref) => {
|
|
|
7406
7582
|
const { classProps, props: modifiedProps } = useTextFieldBaseInputStyleProps(props);
|
|
7407
7583
|
const { id, isDisabled, isMultiline, isRequired, inputWidth, type } = modifiedProps, restProps = __rest$p(modifiedProps, ["id", "isDisabled", "isMultiline", "isRequired", "inputWidth", "type"]);
|
|
7408
7584
|
const { props: otherProps } = useStyleProps(restProps);
|
|
7409
|
-
const
|
|
7585
|
+
const Component = isMultiline ? 'textarea' : 'input';
|
|
7410
7586
|
const inputType = isMultiline ? undefined : type;
|
|
7411
|
-
return (React.createElement(
|
|
7587
|
+
return (React.createElement(Component, Object.assign({}, otherProps, { className: classProps.input, disabled: isDisabled, id: id, required: isRequired, size: inputWidth, type: inputType, ref: ref })));
|
|
7412
7588
|
};
|
|
7413
7589
|
const TextFieldBaseInput = React.forwardRef(_TextFieldBaseInput);
|
|
7414
7590
|
TextFieldBaseInput.spiritComponent = 'TextFieldBaseInput';
|
|
7591
|
+
TextFieldBaseInput.displayName = 'TextFieldBaseInput';
|
|
7415
7592
|
|
|
7416
7593
|
var __rest$o = (undefined && undefined.__rest) || function (s, e) {
|
|
7417
7594
|
var t = {};
|
|
@@ -7466,9 +7643,6 @@ function useTextFieldBaseStyleProps(props) {
|
|
|
7466
7643
|
};
|
|
7467
7644
|
}
|
|
7468
7645
|
|
|
7469
|
-
const TEXT_FIELD_BASE_PASSWORD_TOGGLE_SHOW_LABEL_DEFAULT = 'Show password';
|
|
7470
|
-
const TEXT_FIELD_BASE_PASSWORD_TOGGLE_HIDE_LABEL_DEFAULT = 'Hide password';
|
|
7471
|
-
|
|
7472
7646
|
function useTextFieldBasePasswordToggleStyleProps() {
|
|
7473
7647
|
const TextFieldBaseClass = useClassNamePrefix('TextField');
|
|
7474
7648
|
const TextFieldBasePasswordToggleClass = `${TextFieldBaseClass}__passwordToggle`;
|
|
@@ -7484,11 +7658,10 @@ function useTextFieldBasePasswordToggleStyleProps() {
|
|
|
7484
7658
|
}
|
|
7485
7659
|
|
|
7486
7660
|
const TextFieldBasePasswordToggle = (props) => {
|
|
7661
|
+
const { t } = useI18n();
|
|
7487
7662
|
const { children, isPasswordShown, onToggleClick, isDisabled, size } = props;
|
|
7488
7663
|
const { classProps } = useTextFieldBasePasswordToggleStyleProps();
|
|
7489
|
-
const ariaLabel = isPasswordShown
|
|
7490
|
-
? TEXT_FIELD_BASE_PASSWORD_TOGGLE_HIDE_LABEL_DEFAULT
|
|
7491
|
-
: TEXT_FIELD_BASE_PASSWORD_TOGGLE_SHOW_LABEL_DEFAULT;
|
|
7664
|
+
const ariaLabel = isPasswordShown ? t('textField.password.hide') : t('textField.password.show');
|
|
7492
7665
|
return (React.createElement("div", { className: classProps.passwordToggle },
|
|
7493
7666
|
children,
|
|
7494
7667
|
React.createElement("button", { className: classProps.passwordToggleButton, type: "button", role: "switch", "aria-checked": !!isPasswordShown, "aria-label": ariaLabel, onClick: () => onToggleClick(), disabled: isDisabled },
|
|
@@ -7562,6 +7735,7 @@ const _TextFieldBase = (props, ref) => {
|
|
|
7562
7735
|
};
|
|
7563
7736
|
const TextFieldBase = React.forwardRef(_TextFieldBase);
|
|
7564
7737
|
TextFieldBase.spiritComponent = 'TextFieldBase';
|
|
7738
|
+
TextFieldBase.displayName = 'TextFieldBase';
|
|
7565
7739
|
|
|
7566
7740
|
const useAdjustHeight = ({ elementReference, maxHeight, onInput, isAutoResizing, }) => {
|
|
7567
7741
|
const adjustHeight = (element) => {
|
|
@@ -7622,10 +7796,12 @@ const _TextArea = (props, ref) => {
|
|
|
7622
7796
|
};
|
|
7623
7797
|
const TextArea = React.forwardRef(_TextArea);
|
|
7624
7798
|
TextArea.spiritComponent = 'TextArea';
|
|
7799
|
+
TextArea.displayName = 'TextArea';
|
|
7625
7800
|
|
|
7626
7801
|
const _TextField = (props, ref) => (React.createElement(TextFieldBase, Object.assign({ type: "text" }, props, { ref: ref })));
|
|
7627
7802
|
const TextField = React.forwardRef(_TextField);
|
|
7628
7803
|
TextField.spiritComponent = 'TextField';
|
|
7804
|
+
TextField.displayName = 'TextField';
|
|
7629
7805
|
|
|
7630
7806
|
const TIMELINE_MARKER = {
|
|
7631
7807
|
DOT: 'dot',
|
|
@@ -7861,7 +8037,6 @@ const TRANSITIONING_STYLES = {
|
|
|
7861
8037
|
exited: 'is-hidden',
|
|
7862
8038
|
};
|
|
7863
8039
|
const ICON_BOX_SIZE = 20;
|
|
7864
|
-
const TOAST_BAR_CLOSE_BUTTON_LABEL_DEFAULT = 'Close';
|
|
7865
8040
|
const DEFAULT_TOAST_COLOR = 'neutral';
|
|
7866
8041
|
const DEFAULT_TOAST_AUTO_CLOSE_INTERVAL = 3000;
|
|
7867
8042
|
const ToastColorsExtended = {
|
|
@@ -7952,7 +8127,9 @@ var __rest$a = (undefined && undefined.__rest) || function (s, e) {
|
|
|
7952
8127
|
return t;
|
|
7953
8128
|
};
|
|
7954
8129
|
const ToastBar = (props) => {
|
|
7955
|
-
const {
|
|
8130
|
+
const { t } = useI18n();
|
|
8131
|
+
const { id, children, closeLabel, color = DEFAULT_TOAST_COLOR, hasIcon, iconName, isDismissible, isOpen = true, onClose = () => { } } = props, restProps = __rest$a(props, ["id", "children", "closeLabel", "color", "hasIcon", "iconName", "isDismissible", "isOpen", "onClose"]);
|
|
8132
|
+
const resolvedCloseLabel = closeLabel !== null && closeLabel !== void 0 ? closeLabel : t('common.close');
|
|
7956
8133
|
const rootElementRef = React.useRef(null);
|
|
7957
8134
|
const toastIconName = useToastIcon({ color, iconName });
|
|
7958
8135
|
const { classProps, props: modifiedProps } = useToastBarStyleProps(Object.assign(Object.assign({}, restProps), { color,
|
|
@@ -7963,7 +8140,7 @@ const ToastBar = (props) => {
|
|
|
7963
8140
|
React.createElement("div", { className: classProps.container },
|
|
7964
8141
|
(hasIcon || iconName) && React.createElement(Icon, { name: toastIconName, boxSize: ICON_BOX_SIZE }),
|
|
7965
8142
|
React.createElement("div", { className: classProps.content }, children)),
|
|
7966
|
-
React.createElement(ToastCloseButton, { id: id, isOpen: isOpen, closeLabel:
|
|
8143
|
+
React.createElement(ToastCloseButton, { id: id, isOpen: isOpen, closeLabel: resolvedCloseLabel, onClose: onClose, isDismissible: isDismissible }))))));
|
|
7967
8144
|
};
|
|
7968
8145
|
ToastBar.spiritComponent = 'ToastBar';
|
|
7969
8146
|
|
|
@@ -8001,14 +8178,16 @@ const defaultProps$2 = {
|
|
|
8001
8178
|
};
|
|
8002
8179
|
const _ToastBarLink = (props, ref) => {
|
|
8003
8180
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps$2), props);
|
|
8004
|
-
const { elementType
|
|
8181
|
+
const { elementType = defaultProps$2.elementType, children } = propsWithDefaults, restProps = __rest$8(propsWithDefaults, ["elementType", "children"]);
|
|
8182
|
+
const Component = elementType;
|
|
8005
8183
|
const { classProps, props: modifiedProps } = useToastBarStyleProps(Object.assign({}, restProps));
|
|
8006
8184
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
8007
|
-
const mergedStyleProps = mergeStyleProps(
|
|
8008
|
-
return (React.createElement(
|
|
8185
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.link, styleProps, otherProps });
|
|
8186
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { ref: ref }), children));
|
|
8009
8187
|
};
|
|
8010
8188
|
const ToastBarLink = React.forwardRef(_ToastBarLink);
|
|
8011
8189
|
ToastBarLink.spiritComponent = 'ToastBarLink';
|
|
8190
|
+
ToastBarLink.displayName = 'ToastBarLink';
|
|
8012
8191
|
|
|
8013
8192
|
const defaultToastContext = {
|
|
8014
8193
|
clear: () => { },
|
|
@@ -8039,11 +8218,13 @@ var __rest$7 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
8039
8218
|
return t;
|
|
8040
8219
|
};
|
|
8041
8220
|
const UncontrolledToast = (props) => {
|
|
8042
|
-
const {
|
|
8221
|
+
const { t } = useI18n();
|
|
8222
|
+
const { alignmentX, alignmentY, isCollapsible, closeLabel } = props, restProps = __rest$7(props, ["alignmentX", "alignmentY", "isCollapsible", "closeLabel"]);
|
|
8223
|
+
const resolvedCloseLabel = closeLabel !== null && closeLabel !== void 0 ? closeLabel : t('common.close');
|
|
8043
8224
|
const { hide, queue } = useToast();
|
|
8044
8225
|
return (React.createElement(Toast, { alignmentX: alignmentX, alignmentY: alignmentY, isCollapsible: isCollapsible }, queue.map((item) => {
|
|
8045
8226
|
const { color, iconName, id, isOpen, content, hasIcon, isDismissible, linkProps } = item;
|
|
8046
|
-
return (React.createElement(ToastBar, Object.assign({}, restProps, { key: id, id: id, closeLabel:
|
|
8227
|
+
return (React.createElement(ToastBar, Object.assign({}, restProps, { key: id, id: id, closeLabel: resolvedCloseLabel, color: color, hasIcon: hasIcon, iconName: iconName, isDismissible: isDismissible, onClose: () => hide(id), isOpen: isOpen && !!content }),
|
|
8047
8228
|
React.createElement(ToastBarMessage, null, content.message),
|
|
8048
8229
|
content.link && React.createElement(ToastBarLink, Object.assign({}, linkProps), content.link)));
|
|
8049
8230
|
})));
|
|
@@ -8137,6 +8318,7 @@ const _Toggle = (props, ref) => {
|
|
|
8137
8318
|
};
|
|
8138
8319
|
const Toggle = React.forwardRef(_Toggle);
|
|
8139
8320
|
Toggle.spiritComponent = 'Toggle';
|
|
8321
|
+
Toggle.displayName = 'Toggle';
|
|
8140
8322
|
|
|
8141
8323
|
const ELLIPSIS = '…';
|
|
8142
8324
|
const truncateByWords = (content, limit) => {
|
|
@@ -8295,14 +8477,16 @@ const defaultProps = {
|
|
|
8295
8477
|
};
|
|
8296
8478
|
const _HeaderLogo = (props, ref) => {
|
|
8297
8479
|
const propsWithDefaults = Object.assign(Object.assign({}, defaultProps), props);
|
|
8298
|
-
const { elementType
|
|
8480
|
+
const { elementType = defaultProps.elementType, children } = propsWithDefaults, restProps = __rest(propsWithDefaults, ["elementType", "children"]);
|
|
8481
|
+
const Component = elementType;
|
|
8299
8482
|
const { classProps, props: modifiedProps } = useUnstableHeaderStyleProps(restProps);
|
|
8300
8483
|
const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
|
|
8301
|
-
const mergedStyleProps = mergeStyleProps(
|
|
8302
|
-
return (React.createElement(
|
|
8484
|
+
const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.logo, styleProps, otherProps });
|
|
8485
|
+
return (React.createElement(Component, Object.assign({}, otherProps, mergedStyleProps, { href: restProps.href, ref: ref }), children));
|
|
8303
8486
|
};
|
|
8304
8487
|
const UNSTABLE_HeaderLogo = React.forwardRef(_HeaderLogo);
|
|
8305
8488
|
UNSTABLE_HeaderLogo.spiritComponent = 'UNSTABLE_HeaderLogo';
|
|
8489
|
+
UNSTABLE_HeaderLogo.displayName = 'UNSTABLE_HeaderLogo';
|
|
8306
8490
|
|
|
8307
8491
|
exports.Accordion = Accordion;
|
|
8308
8492
|
exports.AccordionContent = AccordionContent;
|
|
@@ -8334,9 +8518,6 @@ exports.Collapse = Collapse;
|
|
|
8334
8518
|
exports.Container = Container;
|
|
8335
8519
|
exports.ControlButton = ControlButton;
|
|
8336
8520
|
exports.DEBOUNCE_DELAY = DEBOUNCE_DELAY;
|
|
8337
|
-
exports.DEFAULT_ATTACHMENT_LIST_LABEL = DEFAULT_ATTACHMENT_LIST_LABEL;
|
|
8338
|
-
exports.DEFAULT_BUTTON_LABEL = DEFAULT_BUTTON_LABEL;
|
|
8339
|
-
exports.DEFAULT_EDIT_BUTTON_LABEL = DEFAULT_EDIT_BUTTON_LABEL;
|
|
8340
8521
|
exports.DEFAULT_ERROR_MESSAGE_MAX_FILE_SIZE = DEFAULT_ERROR_MESSAGE_MAX_FILE_SIZE;
|
|
8341
8522
|
exports.DEFAULT_ERROR_MESSAGE_QUEUE_DUPLICITY = DEFAULT_ERROR_MESSAGE_QUEUE_DUPLICITY;
|
|
8342
8523
|
exports.DEFAULT_ERROR_MESSAGE_QUEUE_LIMIT = DEFAULT_ERROR_MESSAGE_QUEUE_LIMIT;
|
|
@@ -8346,7 +8527,7 @@ exports.DEFAULT_FILE_SIZE_LIMIT = DEFAULT_FILE_SIZE_LIMIT;
|
|
|
8346
8527
|
exports.DEFAULT_ICON_NAME = DEFAULT_ICON_NAME;
|
|
8347
8528
|
exports.DEFAULT_TOAST_AUTO_CLOSE_INTERVAL = DEFAULT_TOAST_AUTO_CLOSE_INTERVAL;
|
|
8348
8529
|
exports.DEFAULT_TOAST_COLOR = DEFAULT_TOAST_COLOR;
|
|
8349
|
-
exports.Dialog = Dialog
|
|
8530
|
+
exports.Dialog = Dialog;
|
|
8350
8531
|
exports.Divider = Divider;
|
|
8351
8532
|
exports.Drawer = Drawer;
|
|
8352
8533
|
exports.DrawerCloseButton = DrawerCloseButton;
|
|
@@ -8407,7 +8588,7 @@ exports.Modal = Modal;
|
|
|
8407
8588
|
exports.ModalBody = ModalBody;
|
|
8408
8589
|
exports.ModalCloseButton = ModalCloseButton;
|
|
8409
8590
|
exports.ModalConsumer = ModalConsumer;
|
|
8410
|
-
exports.ModalDialog = ModalDialog
|
|
8591
|
+
exports.ModalDialog = ModalDialog;
|
|
8411
8592
|
exports.ModalFooter = ModalFooter;
|
|
8412
8593
|
exports.ModalHeader = ModalHeader;
|
|
8413
8594
|
exports.ModalProvider = ModalProvider;
|
|
@@ -8416,9 +8597,6 @@ exports.NavigationAction = NavigationAction;
|
|
|
8416
8597
|
exports.NavigationAvatar = NavigationAvatar;
|
|
8417
8598
|
exports.NavigationItem = NavigationItem;
|
|
8418
8599
|
exports.NoSsr = NoSsr;
|
|
8419
|
-
exports.PAGINATION_LINK_DEFAULT_ACCESSIBILITY_LABEL_PREFIX = PAGINATION_LINK_DEFAULT_ACCESSIBILITY_LABEL_PREFIX;
|
|
8420
|
-
exports.PAGINATION_NEXT_LINK_DEFAULT_ACCESSIBILITY_LABEL = PAGINATION_NEXT_LINK_DEFAULT_ACCESSIBILITY_LABEL;
|
|
8421
|
-
exports.PAGINATION_PREVIOUS_LINK_DEFAULT_ACCESSIBILITY_LABEL = PAGINATION_PREVIOUS_LINK_DEFAULT_ACCESSIBILITY_LABEL;
|
|
8422
8600
|
exports.Pagination = Pagination;
|
|
8423
8601
|
exports.PaginationButtonLink = PaginationButtonLink;
|
|
8424
8602
|
exports.PaginationItem = PaginationItem;
|
|
@@ -8457,7 +8635,6 @@ exports.Spinner = Spinner;
|
|
|
8457
8635
|
exports.SplitButton = SplitButton;
|
|
8458
8636
|
exports.Stack = Stack;
|
|
8459
8637
|
exports.StackItem = StackItem;
|
|
8460
|
-
exports.TOAST_BAR_CLOSE_BUTTON_LABEL_DEFAULT = TOAST_BAR_CLOSE_BUTTON_LABEL_DEFAULT;
|
|
8461
8638
|
exports.TRANSITIONING_STYLES = TRANSITIONING_STYLES;
|
|
8462
8639
|
exports.TRANSITION_DURATION = TRANSITION_DURATION;
|
|
8463
8640
|
exports.TabContent = TabContent;
|