@pingux/astro 2.9.2 → 2.13.0-alpha.4
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 +6 -2
- package/lib/README.md +6 -2
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.mdx +40 -0
- package/lib/cjs/components/AccordionGroup/Accordion.styles.js +1 -2
- package/lib/cjs/components/AccordionGroup/AccordionGroup.mdx +41 -0
- package/lib/cjs/components/ArrayField/ArrayField.mdx +34 -0
- package/lib/cjs/components/AstroWrapper/AstroWrapper.mdx +16 -0
- package/lib/cjs/components/Avatar/Avatar.mdx +14 -0
- package/lib/cjs/components/Badge/Badge.mdx +24 -0
- package/lib/cjs/components/Box/Box.d.ts +4 -0
- package/lib/cjs/components/Box/Box.js +4 -19
- package/lib/cjs/components/Box/Box.mdx +23 -0
- package/lib/cjs/components/Box/Box.styles.d.ts +6 -0
- package/lib/cjs/components/Box/Box.test.d.ts +1 -0
- package/lib/cjs/components/Box/Box.test.js +2 -6
- package/lib/cjs/components/Box/index.d.ts +1 -0
- package/lib/cjs/components/Bracket/Bracket.mdx +17 -0
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.mdx +40 -0
- package/lib/cjs/components/Button/Button.mdx +40 -0
- package/lib/cjs/components/Button/Button.stories.js +30 -5
- package/lib/cjs/components/Button/Buttons.styles.js +25 -7
- package/lib/cjs/components/Calendar/Calendar.mdx +39 -0
- package/lib/cjs/components/Callout/Callout.mdx +28 -0
- package/lib/cjs/components/Card/Card.mdx +32 -0
- package/lib/cjs/components/CheckboxField/CheckboxField.mdx +42 -0
- package/lib/cjs/components/CodeView/CodeView.mdx +23 -0
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.mdx +29 -0
- package/lib/cjs/components/ColorField/ColorField.mdx +38 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.mdx +66 -0
- package/lib/cjs/components/CopyText/CopyText.mdx +23 -0
- package/lib/cjs/components/DataTable/DataTable.mdx +54 -0
- package/lib/cjs/components/DatePicker/DatePicker.mdx +49 -0
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +2 -1
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +36 -0
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +29 -45
- package/lib/cjs/components/FileInputField/FileInputField.mdx +33 -0
- package/lib/cjs/components/HelpHint/HelpHint.js +145 -27
- package/lib/cjs/components/HelpHint/HelpHint.mdx +32 -0
- package/lib/cjs/components/HelpHint/HelpHint.stories.js +40 -7
- package/lib/cjs/components/HelpHint/HelpHint.styles.js +9 -1
- package/lib/cjs/components/HelpHint/HelpHint.test.js +202 -30
- package/lib/cjs/components/Icon/Icon.d.ts +4 -0
- package/lib/cjs/components/Icon/Icon.js +4 -27
- package/lib/cjs/components/Icon/Icon.mdx +49 -0
- package/lib/cjs/components/Icon/Icon.stories.d.ts +8 -0
- package/lib/cjs/components/Icon/Icon.test.d.ts +1 -0
- package/lib/cjs/components/Icon/index.d.ts +1 -0
- package/lib/cjs/components/IconBadge/IconBadge.mdx +14 -0
- package/lib/cjs/components/IconButton/IconButton.mdx +33 -0
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.mdx +31 -0
- package/lib/cjs/components/Image/Image.mdx +28 -0
- package/lib/cjs/components/ImageUploadField/ImageUploadField.mdx +38 -0
- package/lib/cjs/components/Link/Link.mdx +27 -0
- package/lib/cjs/components/Link/Link.styles.js +10 -0
- package/lib/cjs/components/LinkSelectField/LinkSelectField.mdx +47 -0
- package/lib/cjs/components/ListItem/ListItem.mdx +21 -0
- package/lib/cjs/components/ListView/ListView.mdx +44 -0
- package/lib/cjs/components/ListView/ListView.stories.js +93 -47
- package/lib/cjs/components/Loader/Loader.d.ts +4 -0
- package/lib/cjs/components/Loader/Loader.js +0 -14
- package/lib/cjs/components/Loader/Loader.mdx +29 -0
- package/lib/cjs/components/Loader/Loader.styles.d.ts +53 -0
- package/lib/cjs/components/Loader/Loader.test.d.ts +1 -0
- package/lib/cjs/components/Loader/index.d.ts +1 -0
- package/lib/cjs/components/Menu/Menu.mdx +43 -0
- package/lib/cjs/components/Messages/Messages.mdx +35 -0
- package/lib/cjs/components/Modal/Modal.mdx +59 -0
- package/lib/cjs/components/MultivaluesField/MultivaluesField.mdx +44 -0
- package/lib/cjs/components/NavBar/NavBar.mdx +42 -0
- package/lib/cjs/components/NumberField/NumberField.mdx +39 -0
- package/lib/cjs/components/OverlayPanel/OverlayPanel.mdx +39 -0
- package/lib/cjs/components/PasswordField/PasswordField.mdx +33 -0
- package/lib/cjs/components/PopoverContainer/PopoverContainer.d.ts +9 -0
- package/lib/cjs/components/PopoverContainer/PopoverContainer.js +7 -38
- package/lib/cjs/components/PopoverContainer/index.d.ts +2 -0
- package/lib/cjs/components/PopoverMenu/PopoverMenu.mdx +53 -0
- package/lib/cjs/components/RadioGroupField/RadioGroupField.mdx +41 -0
- package/lib/cjs/components/RequirementsList/RequirementsList.mdx +17 -0
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.mdx +36 -0
- package/lib/cjs/components/ScrollBox/ScrollBox.mdx +17 -0
- package/lib/cjs/components/SearchField/SearchField.mdx +33 -0
- package/lib/cjs/components/SelectField/SelectField.mdx +46 -0
- package/lib/cjs/components/Separator/Separator.mdx +19 -0
- package/lib/cjs/components/Stepper/Stepper.mdx +41 -0
- package/lib/cjs/components/SwitchField/SwitchField.mdx +36 -0
- package/lib/cjs/components/Table/Table.mdx +30 -0
- package/lib/cjs/components/TableCell/TableCell.d.ts +12 -0
- package/lib/cjs/components/TableCell/TableCell.js +0 -5
- package/lib/cjs/components/TableCell/TableCell.test.d.ts +1 -0
- package/lib/cjs/components/TableCell/index.d.ts +1 -0
- package/lib/cjs/components/Tabs/Tabs.mdx +40 -0
- package/lib/cjs/components/Text/Text.d.ts +4 -0
- package/lib/cjs/components/Text/Text.js +3 -7
- package/lib/cjs/components/Text/Text.mdx +13 -0
- package/lib/cjs/components/Text/Text.stories.d.ts +6 -0
- package/lib/cjs/components/Text/Text.styles.d.ts +286 -0
- package/lib/cjs/components/Text/Text.test.d.ts +1 -0
- package/lib/cjs/components/Text/index.d.ts +1 -0
- package/lib/cjs/components/TextAreaField/TextAreaField.mdx +34 -0
- package/lib/cjs/components/TextField/TextField.mdx +34 -0
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.mdx +18 -0
- package/lib/cjs/components/TooltipTrigger/Tooltip.styles.js +2 -1
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +2 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.mdx +23 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.test.js +47 -1
- package/lib/cjs/docs/Props.stories.mdx +35 -0
- package/lib/cjs/docs/Welcome.stories.mdx +149 -0
- package/lib/cjs/docs/hooks/useDebounce.stories.mdx +59 -0
- package/lib/cjs/docs/hooks/useModalState.stories.mdx +83 -0
- package/lib/cjs/docs/hooks/useOverlayPanelState.stories.mdx +84 -0
- package/lib/cjs/docs/theme/AstroNanoTheme.stories.mdx +174 -0
- package/lib/cjs/docs/theme/AstroTheme.stories.mdx +20 -0
- package/lib/cjs/docs/theme/CustomThemes.stories.mdx +70 -0
- package/lib/cjs/docs/theme/StylingGuideline.stories.mdx +116 -0
- package/lib/cjs/docs/utils/messagesReducer.stories.mdx +64 -0
- package/lib/cjs/experimental/EditButton/EditButton.js +63 -0
- package/lib/cjs/experimental/EditButton/EditButton.mdx +9 -0
- package/lib/cjs/experimental/EditButton/EditButton.stories.js +91 -0
- package/lib/cjs/experimental/EditButton/EditButton.test.js +71 -0
- package/lib/cjs/experimental/EditButton/index.js +14 -0
- package/lib/cjs/experimental/ListView/ListView.mdx +47 -0
- package/lib/cjs/experimental/ListView/ListView.stories.js +742 -0
- package/lib/cjs/experimental/ListViewItem/ListViewItem.js +23 -5
- package/lib/cjs/experimental/ListViewItem/ListViewItem.mdx +36 -0
- package/lib/cjs/experimental/ListViewItem/ListViewItem.stories.js +31 -7
- package/lib/cjs/experimental/ListViewItem/ListViewItem.test.js +51 -7
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemEditButton.js +1 -4
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemEditButton.stories.js +4 -1
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemSwitchField.js +1 -0
- package/lib/cjs/experimental/ListViewItem/listViewItemAttributes.js +28 -13
- package/lib/cjs/experimental/PanelHeader/PanelHeader.js +88 -0
- package/lib/cjs/experimental/PanelHeader/PanelHeader.mdx +19 -0
- package/lib/cjs/experimental/PanelHeader/PanelHeader.stories.js +71 -0
- package/lib/cjs/experimental/PanelHeader/PanelHeader.styles.js +38 -0
- package/lib/cjs/experimental/PanelHeader/PanelHeader.test.js +46 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderCloseButton.js +34 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderCloseButton.stories.js +31 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderCloseButton.test.js +25 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderMenu.js +27 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderMenu.stories.js +36 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderMenu.test.js +58 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderSwitchField.js +27 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderSwitchField.stories.js +41 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderSwitchField.test.js +25 -0
- package/lib/cjs/experimental/PanelHeader/index.js +14 -0
- package/lib/cjs/experimental/README.stories.mdx +7 -0
- package/lib/cjs/experimental/SaveBar/SaveBar.mdx +13 -0
- package/lib/cjs/experimental/recipes/ListAndPanel.stories.js +1 -1
- package/lib/cjs/hooks/usePropWarning/usePropWarning.js +1 -1
- package/lib/cjs/hooks/useStatusClasses/useStatusClasses.js +2 -2
- package/lib/cjs/hooks/useTShirtSize/useTShirtSize.js +1 -1
- package/lib/cjs/index.d.ts +173 -0
- package/lib/cjs/index.js +53 -1
- package/lib/cjs/recipes/{AttributesAndPingOneMapping.stories.js → AttributeMapping.stories.js} +392 -132
- package/lib/cjs/styles/colors.js +1 -1
- package/lib/cjs/styles/variants/README.md +98 -0
- package/lib/cjs/styles/variants/variants.js +2 -0
- package/lib/cjs/types/box.d.ts +10 -0
- package/lib/cjs/types/box.js +6 -0
- package/lib/cjs/types/icon.d.ts +34 -0
- package/lib/cjs/types/icon.js +6 -0
- package/lib/cjs/types/index.d.ts +7 -0
- package/lib/cjs/types/index.js +86 -0
- package/lib/cjs/types/loader.d.ts +14 -0
- package/lib/cjs/types/loader.js +6 -0
- package/lib/cjs/types/mdx.d.js +1 -0
- package/lib/cjs/types/popoverContainer.d.ts +23 -0
- package/lib/cjs/types/popoverContainer.js +6 -0
- package/lib/cjs/types/shared/dom.d.ts +9 -0
- package/lib/cjs/types/shared/dom.js +6 -0
- package/lib/cjs/types/shared/index.d.ts +3 -0
- package/lib/cjs/types/shared/index.js +42 -0
- package/lib/cjs/types/shared/style.d.ts +11 -0
- package/lib/cjs/types/shared/style.js +6 -0
- package/lib/cjs/types/shared/test.d.ts +3 -0
- package/lib/cjs/types/shared/test.js +6 -0
- package/lib/cjs/types/shared/utils.d.ts +1 -0
- package/lib/cjs/types/shared/utils.js +6 -0
- package/lib/cjs/types/tableCell.d.ts +5 -0
- package/lib/cjs/types/tableCell.js +6 -0
- package/lib/cjs/types/text.d.ts +3 -0
- package/lib/cjs/types/text.js +6 -0
- package/lib/cjs/utils/designUtils/figmaLinks.js +2 -1
- package/lib/components/AccordionGridGroup/AccordionGridGroup.mdx +40 -0
- package/lib/components/AccordionGroup/Accordion.styles.js +1 -2
- package/lib/components/AccordionGroup/AccordionGroup.mdx +41 -0
- package/lib/components/ArrayField/ArrayField.mdx +34 -0
- package/lib/components/AstroWrapper/AstroWrapper.mdx +16 -0
- package/lib/components/Avatar/Avatar.mdx +14 -0
- package/lib/components/Badge/Badge.mdx +24 -0
- package/lib/components/Box/Box.js +4 -19
- package/lib/components/Box/Box.mdx +23 -0
- package/lib/components/Box/Box.test.js +2 -6
- package/lib/components/Bracket/Bracket.mdx +17 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.mdx +40 -0
- package/lib/components/Button/Button.mdx +40 -0
- package/lib/components/Button/Button.stories.js +30 -5
- package/lib/components/Button/Buttons.styles.js +25 -7
- package/lib/components/Calendar/Calendar.mdx +39 -0
- package/lib/components/Callout/Callout.mdx +28 -0
- package/lib/components/Card/Card.mdx +32 -0
- package/lib/components/CheckboxField/CheckboxField.mdx +42 -0
- package/lib/components/CodeView/CodeView.mdx +23 -0
- package/lib/components/CollapsiblePanel/CollapsiblePanel.mdx +29 -0
- package/lib/components/ColorField/ColorField.mdx +38 -0
- package/lib/components/ComboBoxField/ComboBoxField.mdx +66 -0
- package/lib/components/CopyText/CopyText.mdx +23 -0
- package/lib/components/DataTable/DataTable.mdx +54 -0
- package/lib/components/DatePicker/DatePicker.mdx +49 -0
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +2 -1
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +36 -0
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +29 -45
- package/lib/components/FileInputField/FileInputField.mdx +33 -0
- package/lib/components/HelpHint/HelpHint.js +148 -30
- package/lib/components/HelpHint/HelpHint.mdx +32 -0
- package/lib/components/HelpHint/HelpHint.stories.js +37 -6
- package/lib/components/HelpHint/HelpHint.styles.js +9 -1
- package/lib/components/HelpHint/HelpHint.test.js +202 -30
- package/lib/components/Icon/Icon.js +2 -25
- package/lib/components/Icon/Icon.mdx +49 -0
- package/lib/components/IconBadge/IconBadge.mdx +14 -0
- package/lib/components/IconButton/IconButton.mdx +33 -0
- package/lib/components/IconButtonToggle/IconButtonToggle.mdx +31 -0
- package/lib/components/Image/Image.mdx +28 -0
- package/lib/components/ImageUploadField/ImageUploadField.mdx +38 -0
- package/lib/components/Link/Link.mdx +27 -0
- package/lib/components/Link/Link.styles.js +10 -0
- package/lib/components/LinkSelectField/LinkSelectField.mdx +47 -0
- package/lib/components/ListItem/ListItem.mdx +21 -0
- package/lib/components/ListView/ListView.mdx +44 -0
- package/lib/components/ListView/ListView.stories.js +94 -48
- package/lib/components/Loader/Loader.js +0 -14
- package/lib/components/Loader/Loader.mdx +29 -0
- package/lib/components/Menu/Menu.mdx +43 -0
- package/lib/components/Messages/Messages.mdx +35 -0
- package/lib/components/Modal/Modal.mdx +59 -0
- package/lib/components/MultivaluesField/MultivaluesField.mdx +44 -0
- package/lib/components/NavBar/NavBar.mdx +42 -0
- package/lib/components/NumberField/NumberField.mdx +39 -0
- package/lib/components/OverlayPanel/OverlayPanel.mdx +39 -0
- package/lib/components/PasswordField/PasswordField.mdx +33 -0
- package/lib/components/PopoverContainer/PopoverContainer.js +7 -38
- package/lib/components/PopoverMenu/PopoverMenu.mdx +53 -0
- package/lib/components/RadioGroupField/RadioGroupField.mdx +41 -0
- package/lib/components/RequirementsList/RequirementsList.mdx +17 -0
- package/lib/components/RockerButtonGroup/RockerButtonGroup.mdx +36 -0
- package/lib/components/ScrollBox/ScrollBox.mdx +17 -0
- package/lib/components/SearchField/SearchField.mdx +33 -0
- package/lib/components/SelectField/SelectField.mdx +46 -0
- package/lib/components/Separator/Separator.mdx +19 -0
- package/lib/components/Stepper/Stepper.mdx +41 -0
- package/lib/components/SwitchField/SwitchField.mdx +36 -0
- package/lib/components/Table/Table.mdx +30 -0
- package/lib/components/TableCell/TableCell.js +0 -5
- package/lib/components/Tabs/Tabs.mdx +40 -0
- package/lib/components/Text/Text.js +3 -7
- package/lib/components/Text/Text.mdx +13 -0
- package/lib/components/TextAreaField/TextAreaField.mdx +34 -0
- package/lib/components/TextField/TextField.mdx +34 -0
- package/lib/components/TimeZonePicker/TimeZonePicker.mdx +18 -0
- package/lib/components/TooltipTrigger/Tooltip.styles.js +1 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.js +2 -0
- package/lib/components/TooltipTrigger/TooltipTrigger.mdx +23 -0
- package/lib/components/TooltipTrigger/TooltipTrigger.test.js +48 -2
- package/lib/docs/Props.stories.mdx +35 -0
- package/lib/docs/Welcome.stories.mdx +149 -0
- package/lib/docs/hooks/useDebounce.stories.mdx +59 -0
- package/lib/docs/hooks/useModalState.stories.mdx +83 -0
- package/lib/docs/hooks/useOverlayPanelState.stories.mdx +84 -0
- package/lib/docs/theme/AstroNanoTheme.stories.mdx +174 -0
- package/lib/docs/theme/AstroTheme.stories.mdx +20 -0
- package/lib/docs/theme/CustomThemes.stories.mdx +70 -0
- package/lib/docs/theme/StylingGuideline.stories.mdx +116 -0
- package/lib/docs/utils/messagesReducer.stories.mdx +64 -0
- package/lib/experimental/EditButton/EditButton.js +50 -0
- package/lib/experimental/EditButton/EditButton.mdx +9 -0
- package/lib/experimental/EditButton/EditButton.stories.js +75 -0
- package/lib/experimental/EditButton/EditButton.test.js +68 -0
- package/lib/experimental/EditButton/index.js +1 -0
- package/lib/experimental/ListView/ListView.mdx +47 -0
- package/lib/experimental/ListView/ListView.stories.js +729 -0
- package/lib/experimental/ListViewItem/ListViewItem.js +24 -6
- package/lib/experimental/ListViewItem/ListViewItem.mdx +36 -0
- package/lib/experimental/ListViewItem/ListViewItem.stories.js +28 -5
- package/lib/experimental/ListViewItem/ListViewItem.test.js +45 -1
- package/lib/experimental/ListViewItem/controls/ListViewItemEditButton.js +1 -4
- package/lib/experimental/ListViewItem/controls/ListViewItemEditButton.stories.js +4 -1
- package/lib/experimental/ListViewItem/controls/ListViewItemSwitchField.js +1 -0
- package/lib/experimental/ListViewItem/listViewItemAttributes.js +25 -12
- package/lib/experimental/PanelHeader/PanelHeader.js +75 -0
- package/lib/experimental/PanelHeader/PanelHeader.mdx +19 -0
- package/lib/experimental/PanelHeader/PanelHeader.stories.js +59 -0
- package/lib/experimental/PanelHeader/PanelHeader.styles.js +30 -0
- package/lib/experimental/PanelHeader/PanelHeader.test.js +43 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderCloseButton.js +25 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderCloseButton.stories.js +21 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderCloseButton.test.js +22 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderMenu.js +18 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderMenu.stories.js +26 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderMenu.test.js +55 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderSwitchField.js +18 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderSwitchField.stories.js +32 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderSwitchField.test.js +22 -0
- package/lib/experimental/PanelHeader/index.js +1 -0
- package/lib/experimental/README.stories.mdx +7 -0
- package/lib/experimental/SaveBar/SaveBar.mdx +13 -0
- package/lib/experimental/recipes/ListAndPanel.stories.js +1 -1
- package/lib/hooks/usePropWarning/usePropWarning.js +1 -1
- package/lib/hooks/useStatusClasses/useStatusClasses.js +2 -2
- package/lib/hooks/useTShirtSize/useTShirtSize.js +1 -1
- package/lib/index.js +6 -0
- package/lib/recipes/AttributeMapping.stories.js +540 -0
- package/lib/styles/colors.js +1 -1
- package/lib/styles/variants/README.md +98 -0
- package/lib/styles/variants/variants.js +2 -0
- package/lib/types/box.js +1 -0
- package/lib/types/icon.js +1 -0
- package/lib/types/index.js +7 -0
- package/lib/types/loader.js +1 -0
- package/lib/types/mdx.d.js +0 -0
- package/lib/types/popoverContainer.js +1 -0
- package/lib/types/shared/dom.js +1 -0
- package/lib/types/shared/index.js +3 -0
- package/lib/types/shared/style.js +1 -0
- package/lib/types/shared/test.js +1 -0
- package/lib/types/shared/utils.js +1 -0
- package/lib/types/tableCell.js +1 -0
- package/lib/types/text.js +1 -0
- package/lib/utils/designUtils/figmaLinks.js +2 -1
- package/package.json +20 -6
- package/CHANGELOG.md +0 -2565
- package/NOTICE +0 -2481
- package/NOTICE.html +0 -9174
- package/lib/cjs/recipes/AttributeMappingReadOnlyField.stories.js +0 -254
- package/lib/recipes/AttributeMappingReadOnlyField.stories.js +0 -243
- package/lib/recipes/AttributesAndPingOneMapping.stories.js +0 -282
@@ -9,17 +9,16 @@ exports["default"] = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
10
10
|
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
13
12
|
var _styledSystem = require("styled-system");
|
14
13
|
var _themeUi = require("theme-ui");
|
15
14
|
var _variants = require("../../utils/devUtils/constants/variants");
|
16
15
|
var _react2 = require("@emotion/react");
|
17
16
|
var ExtendedText = /*#__PURE__*/(0, _base["default"])(_themeUi.Text, process.env.NODE_ENV === "production" ? {
|
18
|
-
target: "
|
17
|
+
target: "etvnvar0"
|
19
18
|
} : {
|
20
|
-
target: "
|
19
|
+
target: "etvnvar0",
|
21
20
|
label: "ExtendedText"
|
22
|
-
})(_styledSystem.layout, _styledSystem.flexbox, _styledSystem.typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
21
|
+
})(_styledSystem.layout, _styledSystem.flexbox, _styledSystem.typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1RleHQvVGV4dC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUXFCIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1RleHQvVGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgZmxleGJveCwgbGF5b3V0LCB0eXBvZ3JhcGh5IH0gZnJvbSAnc3R5bGVkLXN5c3RlbSc7XG5pbXBvcnQgeyBUZXh0IGFzIFRoZW1lVUlUZXh0IH0gZnJvbSAndGhlbWUtdWknO1xuXG5pbXBvcnQgeyBUZXh0UHJvcHMgfSBmcm9tICcuLi8uLi90eXBlcyc7XG5pbXBvcnQgeyB0ZXh0VmFyaWFudHMgfSBmcm9tICcuLi8uLi91dGlscy9kZXZVdGlscy9jb25zdGFudHMvdmFyaWFudHMnO1xuXG5jb25zdCBFeHRlbmRlZFRleHQgPSBzdHlsZWQoVGhlbWVVSVRleHQpKFxuICBsYXlvdXQsXG4gIGZsZXhib3gsXG4gIHR5cG9ncmFwaHksXG4pO1xuXG5jb25zdCBUZXh0ID0gUmVhY3QuZm9yd2FyZFJlZigocHJvcHM6IFRleHRQcm9wcywgcmVmOiBSZWFjdC5SZWY8SFRNTERpdkVsZW1lbnQ+KSA9PiAoXG4gIDxFeHRlbmRlZFRleHQgdmFyaWFudD1cImJhc2VcIiB7Li4ucHJvcHN9IHJlZj17cmVmfSAvPlxuKSk7XG5cblRleHQuZGVmYXVsdFByb3BzID0ge1xuICB2YXJpYW50OiB0ZXh0VmFyaWFudHMuQkFTRSxcbn07XG5cblRleHQuZGlzcGxheU5hbWUgPSAnVGV4dCc7XG5cbmV4cG9ydCBkZWZhdWx0IFRleHQ7XG4iXX0= */");
|
23
22
|
var Text = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
24
23
|
return (0, _react2.jsx)(ExtendedText, (0, _extends2["default"])({
|
25
24
|
variant: "base"
|
@@ -27,9 +26,6 @@ var Text = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
27
26
|
ref: ref
|
28
27
|
}));
|
29
28
|
});
|
30
|
-
Text.propTypes = {
|
31
|
-
variant: _propTypes["default"].string
|
32
|
-
};
|
33
29
|
Text.defaultProps = {
|
34
30
|
variant: _variants.textVariants.BASE
|
35
31
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Text/Text" />
|
4
|
+
|
5
|
+
# Text
|
6
|
+
|
7
|
+
The Text component is used to display text and supports [Typography Props from Styled System](https://styled-system.com/table/#typography) from Styled System.
|
8
|
+
|
9
|
+
Text should be adjusted in terms of font weight, size and formatting to emphasize hierarchy, and shouldn’t: rely only on color to convey importance.
|
10
|
+
|
11
|
+
### Required Components
|
12
|
+
|
13
|
+
This component can be used independently and does not require additional components.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Story } from '@storybook/react';
|
2
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
3
|
+
export default _default;
|
4
|
+
export declare const Default: Story;
|
5
|
+
export declare const WithCustomWidth: Story;
|
6
|
+
export declare const TypographyStyleProps: Story;
|
@@ -0,0 +1,286 @@
|
|
1
|
+
export declare const base: {
|
2
|
+
display: string;
|
3
|
+
fontSize: string;
|
4
|
+
color: string;
|
5
|
+
fontFamily: string;
|
6
|
+
overflowWrap: string;
|
7
|
+
};
|
8
|
+
export declare const wordWrap: {
|
9
|
+
display: string;
|
10
|
+
overflowWrap: string;
|
11
|
+
maxWidth: string;
|
12
|
+
wordWrap: string;
|
13
|
+
wordBreak: string;
|
14
|
+
};
|
15
|
+
export declare const text: {
|
16
|
+
base: {
|
17
|
+
display: string;
|
18
|
+
fontSize: string;
|
19
|
+
color: string;
|
20
|
+
fontFamily: string;
|
21
|
+
overflowWrap: string;
|
22
|
+
};
|
23
|
+
bodyStrong: {
|
24
|
+
fontWeight: number;
|
25
|
+
color: string;
|
26
|
+
fontFamily: string;
|
27
|
+
display: string;
|
28
|
+
overflowWrap: string;
|
29
|
+
maxWidth: string;
|
30
|
+
wordWrap: string;
|
31
|
+
wordBreak: string;
|
32
|
+
};
|
33
|
+
bodyWeak: {
|
34
|
+
fontSize: string;
|
35
|
+
color: string;
|
36
|
+
fontFamily: string;
|
37
|
+
display: string;
|
38
|
+
overflowWrap: string;
|
39
|
+
maxWidth: string;
|
40
|
+
wordWrap: string;
|
41
|
+
wordBreak: string;
|
42
|
+
};
|
43
|
+
buttonLabel: {
|
44
|
+
fontSize: string;
|
45
|
+
fontWeight: number;
|
46
|
+
color: string;
|
47
|
+
fontFamily: string;
|
48
|
+
display: string;
|
49
|
+
overflowWrap: string;
|
50
|
+
maxWidth: string;
|
51
|
+
wordWrap: string;
|
52
|
+
wordBreak: string;
|
53
|
+
};
|
54
|
+
buttonTitle: {
|
55
|
+
fontSize: string;
|
56
|
+
fontWeight: number;
|
57
|
+
color: string;
|
58
|
+
fontFamily: string;
|
59
|
+
lineHeight: string;
|
60
|
+
display: string;
|
61
|
+
overflowWrap: string;
|
62
|
+
maxWidth: string;
|
63
|
+
wordWrap: string;
|
64
|
+
wordBreak: string;
|
65
|
+
};
|
66
|
+
buttonSubtitle: {
|
67
|
+
fontSize: string;
|
68
|
+
fontWeight: number;
|
69
|
+
color: string;
|
70
|
+
fontFamily: string;
|
71
|
+
lineHeight: string;
|
72
|
+
display: string;
|
73
|
+
overflowWrap: string;
|
74
|
+
maxWidth: string;
|
75
|
+
wordWrap: string;
|
76
|
+
wordBreak: string;
|
77
|
+
};
|
78
|
+
capsLabel: {
|
79
|
+
color: string;
|
80
|
+
textTransform: string;
|
81
|
+
fontFamily: string;
|
82
|
+
display: string;
|
83
|
+
overflowWrap: string;
|
84
|
+
maxWidth: string;
|
85
|
+
wordWrap: string;
|
86
|
+
wordBreak: string;
|
87
|
+
};
|
88
|
+
environmentBreadcrumb: {
|
89
|
+
fontSize: string;
|
90
|
+
fontWeight: number;
|
91
|
+
color: string;
|
92
|
+
textTransform: string;
|
93
|
+
display: string;
|
94
|
+
fontFamily: string;
|
95
|
+
overflowWrap: string;
|
96
|
+
};
|
97
|
+
H1: {
|
98
|
+
fontWeight: number;
|
99
|
+
lineHeight: string;
|
100
|
+
fontSize: string;
|
101
|
+
color: string;
|
102
|
+
fontFamily: string;
|
103
|
+
display: string;
|
104
|
+
overflowWrap: string;
|
105
|
+
maxWidth: string;
|
106
|
+
wordWrap: string;
|
107
|
+
wordBreak: string;
|
108
|
+
};
|
109
|
+
H2: {
|
110
|
+
fontWeight: number;
|
111
|
+
lineHeight: string;
|
112
|
+
fontSize: string;
|
113
|
+
color: string;
|
114
|
+
fontFamily: string;
|
115
|
+
display: string;
|
116
|
+
overflowWrap: string;
|
117
|
+
maxWidth: string;
|
118
|
+
wordWrap: string;
|
119
|
+
wordBreak: string;
|
120
|
+
};
|
121
|
+
H3: {
|
122
|
+
fontWeight: number;
|
123
|
+
lineHeight: string;
|
124
|
+
fontSize: string;
|
125
|
+
color: string;
|
126
|
+
fontFamily: string;
|
127
|
+
display: string;
|
128
|
+
overflowWrap: string;
|
129
|
+
maxWidth: string;
|
130
|
+
wordWrap: string;
|
131
|
+
wordBreak: string;
|
132
|
+
};
|
133
|
+
H4: {
|
134
|
+
fontSize: string;
|
135
|
+
fontWeight: number;
|
136
|
+
color: string;
|
137
|
+
fontFamily: string;
|
138
|
+
lineHeight: string;
|
139
|
+
display: string;
|
140
|
+
overflowWrap: string;
|
141
|
+
maxWidth: string;
|
142
|
+
wordWrap: string;
|
143
|
+
wordBreak: string;
|
144
|
+
};
|
145
|
+
inputValue: {
|
146
|
+
fontWeight: number;
|
147
|
+
color: string;
|
148
|
+
fontFamily: string;
|
149
|
+
};
|
150
|
+
itemTitle: {
|
151
|
+
fontSize: string;
|
152
|
+
fontWeight: number;
|
153
|
+
color: string;
|
154
|
+
fontFamily: string;
|
155
|
+
display: string;
|
156
|
+
overflowWrap: string;
|
157
|
+
maxWidth: string;
|
158
|
+
wordWrap: string;
|
159
|
+
wordBreak: string;
|
160
|
+
};
|
161
|
+
itemSubtitle: {
|
162
|
+
fontSize: string;
|
163
|
+
fontWeight: number;
|
164
|
+
color: string;
|
165
|
+
fontFamily: string;
|
166
|
+
display: string;
|
167
|
+
overflowWrap: string;
|
168
|
+
maxWidth: string;
|
169
|
+
wordWrap: string;
|
170
|
+
wordBreak: string;
|
171
|
+
};
|
172
|
+
label: {
|
173
|
+
fontSize: string;
|
174
|
+
color: string;
|
175
|
+
fontFamily: string;
|
176
|
+
fontWeight: number;
|
177
|
+
display: string;
|
178
|
+
overflowWrap: string;
|
179
|
+
maxWidth: string;
|
180
|
+
wordWrap: string;
|
181
|
+
wordBreak: string;
|
182
|
+
};
|
183
|
+
listTitle: {
|
184
|
+
fontSize: string;
|
185
|
+
fontWeight: number;
|
186
|
+
color: string;
|
187
|
+
whiteSpace: string;
|
188
|
+
overflow: string;
|
189
|
+
textOverflow: string;
|
190
|
+
display: string;
|
191
|
+
overflowWrap: string;
|
192
|
+
maxWidth: string;
|
193
|
+
wordWrap: string;
|
194
|
+
wordBreak: string;
|
195
|
+
};
|
196
|
+
listSubtitle: {
|
197
|
+
fontSize: string;
|
198
|
+
fontWeight: number;
|
199
|
+
color: string;
|
200
|
+
whiteSpace: string;
|
201
|
+
overflow: string;
|
202
|
+
textOverflow: string;
|
203
|
+
display: string;
|
204
|
+
overflowWrap: string;
|
205
|
+
maxWidth: string;
|
206
|
+
wordWrap: string;
|
207
|
+
wordBreak: string;
|
208
|
+
};
|
209
|
+
placeholder: {
|
210
|
+
fontWeight: number;
|
211
|
+
color: string;
|
212
|
+
fontFamily: string;
|
213
|
+
};
|
214
|
+
sectionTitle: {
|
215
|
+
fontSize: string;
|
216
|
+
fontWeight: number;
|
217
|
+
color: string;
|
218
|
+
fontFamily: string;
|
219
|
+
display: string;
|
220
|
+
overflowWrap: string;
|
221
|
+
maxWidth: string;
|
222
|
+
wordWrap: string;
|
223
|
+
wordBreak: string;
|
224
|
+
};
|
225
|
+
subtitle: {
|
226
|
+
fontWeight: number;
|
227
|
+
color: string;
|
228
|
+
fontFamily: string;
|
229
|
+
display: string;
|
230
|
+
overflowWrap: string;
|
231
|
+
maxWidth: string;
|
232
|
+
wordWrap: string;
|
233
|
+
wordBreak: string;
|
234
|
+
};
|
235
|
+
tabLabel: {
|
236
|
+
fontSize: string;
|
237
|
+
fontWeight: number;
|
238
|
+
mb: string;
|
239
|
+
lineHeight: string;
|
240
|
+
color: string;
|
241
|
+
height: string;
|
242
|
+
'.is-selected &, .is-hovered &': {
|
243
|
+
color: string;
|
244
|
+
};
|
245
|
+
'.is-selected &': {
|
246
|
+
color: string;
|
247
|
+
mb: number;
|
248
|
+
};
|
249
|
+
'.is-disabled &': {
|
250
|
+
color: string;
|
251
|
+
};
|
252
|
+
display: string;
|
253
|
+
overflowWrap: string;
|
254
|
+
maxWidth: string;
|
255
|
+
wordWrap: string;
|
256
|
+
wordBreak: string;
|
257
|
+
fontFamily: string;
|
258
|
+
};
|
259
|
+
tableData: {
|
260
|
+
fontSize: string;
|
261
|
+
fontWeight: number;
|
262
|
+
color: string;
|
263
|
+
fontFamily: string;
|
264
|
+
display: string;
|
265
|
+
overflowWrap: string;
|
266
|
+
maxWidth: string;
|
267
|
+
wordWrap: string;
|
268
|
+
wordBreak: string;
|
269
|
+
};
|
270
|
+
textEllipsis: {
|
271
|
+
whiteSpace: string;
|
272
|
+
overflow: string;
|
273
|
+
textOverflow: string;
|
274
|
+
};
|
275
|
+
title: {
|
276
|
+
fontSize: string;
|
277
|
+
fontWeight: number;
|
278
|
+
color: string;
|
279
|
+
fontFamily: string;
|
280
|
+
display: string;
|
281
|
+
overflowWrap: string;
|
282
|
+
maxWidth: string;
|
283
|
+
wordWrap: string;
|
284
|
+
wordBreak: string;
|
285
|
+
};
|
286
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './Text';
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/TextAreaField/TextAreaField" />
|
4
|
+
|
5
|
+
# TextAreaField
|
6
|
+
|
7
|
+
The TextAreaField component combines a text area, label, and helper text for a resizable field, which is suitable for long plain-text input.
|
8
|
+
|
9
|
+
This field should:
|
10
|
+
- Be used to accommodate varying amounts of text that can span multiple lines, such as a description, message, comments, or feedback.
|
11
|
+
- Use the maxLength prop for character limitations.
|
12
|
+
|
13
|
+
This field shouldn’t:
|
14
|
+
- Be used when the character count fits in a single line. Use the [TextField](./?path=/docs/form-textfield--default) component instead.
|
15
|
+
- Use quiet styles, such as a blended background with only a bottom border, for fixed height. Since it is taller and wider than most components, it might be harder to interact with it without visual cues.
|
16
|
+
|
17
|
+
### Required components
|
18
|
+
|
19
|
+
This component can be used independently and does not require additional components.
|
20
|
+
|
21
|
+
### Accessibility
|
22
|
+
|
23
|
+
#### Keyboard Navigation
|
24
|
+
|
25
|
+
These keys provide additional functionality to the component.
|
26
|
+
|
27
|
+
| Keys | Functions |
|
28
|
+
| ---- | --------- |
|
29
|
+
| Tab | The field is focusable using the Tab key and follows the page tab sequence. |
|
30
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
31
|
+
|
32
|
+
#### Screen readers
|
33
|
+
|
34
|
+
This component uses the **`aria-labelledby`** attribute pointing to the label, and the **`aria-invalid`** attribute to detect incorrect values or status errors, which is set to “False” by default.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/TextField/TextField" />
|
4
|
+
|
5
|
+
# TextField
|
6
|
+
|
7
|
+
The component combines a text input, label, and helper text to enter, read or edit data.
|
8
|
+
|
9
|
+
TextField should be used:
|
10
|
+
- To enter no more than a single line of text.
|
11
|
+
- To input unique information known only to the user and is difficult to predict with preset options.
|
12
|
+
- When the data can be entered easily in a free format rather than using complex controls.
|
13
|
+
- WithSlots props to insert extra UI elements.
|
14
|
+
|
15
|
+
TextField shouldn’t be used to collect text longer than a single line. Use the [TextAreaField](./?path=/docs/form-textareafield--default) component instead.
|
16
|
+
|
17
|
+
### Required components
|
18
|
+
|
19
|
+
This component can be used independently and does not require additional components.
|
20
|
+
|
21
|
+
### Accessibility
|
22
|
+
|
23
|
+
#### Keyboard Navigation
|
24
|
+
|
25
|
+
These keys provide additional functionality to the component.
|
26
|
+
|
27
|
+
| Keys | Functions |
|
28
|
+
| ---- | --------- |
|
29
|
+
| Tab | The field is focusable using the Tab key and follows the page tab sequence. |
|
30
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
31
|
+
|
32
|
+
#### Screen readers
|
33
|
+
|
34
|
+
This component uses the **`aria-labelledby`** attribute pointing to the label, and the **`aria-invalid`** attribute to detect incorrect values or status errors, which is set to “False” by default.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/TimeZonePicker/TimeZonePicker" />
|
4
|
+
|
5
|
+
# TimeZonePicker
|
6
|
+
|
7
|
+
This component allows users to choose a timezone from a [list of timezones](https://github.com/yury-dymov/react-bootstrap-timezone-picker/blob/master/src/timezones.json).
|
8
|
+
It uses the [ComboBoxField](./?path=/docs/form-comboboxfield--default) component and its props.
|
9
|
+
|
10
|
+
The TimeZonePicker should be used for searching and filtering through the available timezones. Use the additonalTimeZones prop to add a new timezone.
|
11
|
+
|
12
|
+
### Required components
|
13
|
+
|
14
|
+
This component can be used independently and does not require additional components.
|
15
|
+
|
16
|
+
### Accessibility
|
17
|
+
|
18
|
+
The component follows the same accessibility patterns as [ComboBoxField](./?path=/docs/form-comboboxfield--default).
|
@@ -12,7 +12,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
12
12
|
_Object$defineProperty(exports, "__esModule", {
|
13
13
|
value: true
|
14
14
|
});
|
15
|
-
exports["default"] = exports.button = void 0;
|
15
|
+
exports["default"] = exports.container = exports.button = void 0;
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
17
17
|
var _Badge = require("../Badge/Badge.styles");
|
18
18
|
var _Buttons = require("../Button/Buttons.styles");
|
@@ -33,6 +33,7 @@ var container = {
|
|
33
33
|
WebkitLineClamp: '4'
|
34
34
|
}
|
35
35
|
};
|
36
|
+
exports.container = container;
|
36
37
|
var badge = _objectSpread(_objectSpread({}, _Badge.baseBadge), {}, {
|
37
38
|
cursor: 'default',
|
38
39
|
'&.is-hovered, &.is-pressed': {
|
@@ -100,6 +100,8 @@ TooltipTrigger.propTypes = {
|
|
100
100
|
/** The additional offset applied along the cross axis
|
101
101
|
* between the element and its anchor element. */
|
102
102
|
crossOffset: _propTypes["default"].number,
|
103
|
+
/** Amount of time before the tooltip disappears */
|
104
|
+
closeDelay: _propTypes["default"].number,
|
103
105
|
/** Amount of time before the tooltip shows */
|
104
106
|
delay: _propTypes["default"].number,
|
105
107
|
/** Where the popover menu opens relative to its trigger. */
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/TooltipTrigger/TooltipTrigger" />
|
4
|
+
|
5
|
+
# TooltipTrigger
|
6
|
+
|
7
|
+
The TooltipTrigger is a composed component that displays additional information on hover, click or focus.
|
8
|
+
This component is typically used as a design fallback for contextual information that may be hard to convey otherwise. It can also be disabled without disabling button-press events.
|
9
|
+
|
10
|
+
This component should provide useful, supplementary information or clarification regarding the element it points to.
|
11
|
+
It shouldn’t contain essential content, error or feedback messages, or action items.
|
12
|
+
|
13
|
+
Tooltips cannot contain interactive content (links, buttons) according to the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/).
|
14
|
+
|
15
|
+
### Required Components
|
16
|
+
|
17
|
+
This component requires the [Button](./?path=/docs/components-button--default) and Tooltip components.
|
18
|
+
|
19
|
+
### Accessibility
|
20
|
+
|
21
|
+
#### Screen Readers
|
22
|
+
|
23
|
+
The trigger button uses the **`aria-describedby`** attribute with the tooltip container ID to announce the screen reader content when it becomes visible.
|
@@ -1,6 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
4
|
+
var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
var _Object$create = require("@babel/runtime-corejs3/core-js-stable/object/create");
|
7
|
+
var _Object$getPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of");
|
8
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
9
|
+
var _Object$setPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/set-prototype-of");
|
10
|
+
var _Promise = require("@babel/runtime-corejs3/core-js-stable/promise");
|
11
|
+
var _reverseInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/reverse");
|
12
|
+
var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
3
13
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
14
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
4
15
|
var _react = _interopRequireDefault(require("react"));
|
5
16
|
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
6
17
|
var _index = require("../../index");
|
@@ -8,6 +19,7 @@ var _theme = _interopRequireDefault(require("../../styles/theme"));
|
|
8
19
|
var _testAxe = _interopRequireDefault(require("../../utils/testUtils/testAxe"));
|
9
20
|
var _testWrapper = require("../../utils/testUtils/testWrapper");
|
10
21
|
var _react2 = require("@emotion/react");
|
22
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context2; _forEachInstanceProperty(_context2 = ["next", "throw", "return"]).call(_context2, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context3; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context3 = this.tryEntries).call(_context3, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
11
23
|
var getComponent = function getComponent() {
|
12
24
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
13
25
|
return (0, _testWrapper.render)((0, _react2.jsx)(_index.TooltipTrigger, props, (0, _react2.jsx)(_index.Button, props.buttonProps, "Mock Button"), (0, _react2.jsx)(_index.Tooltip, null, "Tooltip Content")));
|
@@ -81,4 +93,38 @@ test('passing in width applies the correct width to the container', function ()
|
|
81
93
|
});
|
82
94
|
var arrow = _testWrapper.screen.getByTestId('popover-container');
|
83
95
|
expect(arrow).toHaveStyle('width: 100px');
|
84
|
-
});
|
96
|
+
});
|
97
|
+
test('tooltip closes after closeDelay when mouse leaves trigger', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
98
|
+
var closeDelay, button;
|
99
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
100
|
+
while (1) {
|
101
|
+
switch (_context.prev = _context.next) {
|
102
|
+
case 0:
|
103
|
+
closeDelay = 5000;
|
104
|
+
getComponent({
|
105
|
+
closeDelay: closeDelay
|
106
|
+
});
|
107
|
+
button = _testWrapper.screen.getByRole('button');
|
108
|
+
_testWrapper.fireEvent.mouseEnter(button);
|
109
|
+
expect(_testWrapper.screen.queryByRole('tooltip')).toBeInTheDocument();
|
110
|
+
_testWrapper.fireEvent.mouseLeave(button);
|
111
|
+
_context.next = 8;
|
112
|
+
return (0, _testWrapper.waitFor)(function () {
|
113
|
+
expect(_testWrapper.screen.queryByRole('tooltip')).toBeInTheDocument();
|
114
|
+
}, {
|
115
|
+
timeout: closeDelay / 2 + 100
|
116
|
+
});
|
117
|
+
case 8:
|
118
|
+
_context.next = 10;
|
119
|
+
return (0, _testWrapper.waitFor)(function () {
|
120
|
+
expect(_testWrapper.screen.queryByRole('tooltip')).not.toBeInTheDocument();
|
121
|
+
}, {
|
122
|
+
timeout: closeDelay + 100
|
123
|
+
});
|
124
|
+
case 10:
|
125
|
+
case "end":
|
126
|
+
return _context.stop();
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}, _callee);
|
130
|
+
})));
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Docs/Props" />
|
4
|
+
|
5
|
+
## Understanding Astro Props
|
6
|
+
|
7
|
+
Most of the Astro components can be customized through props which are documented in there respective component examples. If you want to pass your own custom props to an Astro component many components have wrapperProps, containerProps, and controlProps designed just for this.
|
8
|
+
|
9
|
+
- **containerProps:** an object that gets spread to the outermost container commonly used for passing styles
|
10
|
+
- **wrapperProps:** an object that gets spread to the container directly wrapping and input field
|
11
|
+
- **controlProps:** an object that gets spread to an input field
|
12
|
+
|
13
|
+
```
|
14
|
+
const ExampleComponent = ({
|
15
|
+
containerProps,
|
16
|
+
controlProps,
|
17
|
+
wrapperProps,
|
18
|
+
}) => (
|
19
|
+
<ContainerBox {...containerProps}>
|
20
|
+
<Box {...wrapperProps}>
|
21
|
+
<input type="text" {...controlProps} />
|
22
|
+
</Box>
|
23
|
+
</ContainerBox>
|
24
|
+
);
|
25
|
+
};
|
26
|
+
```
|
27
|
+
|
28
|
+
Most of the Field/Input components have the following props, see the individual component for more details:
|
29
|
+
- `isDisabled`
|
30
|
+
- `isOpen`
|
31
|
+
- `isReadOnly`
|
32
|
+
- `isRequired`
|
33
|
+
- `onChange`
|
34
|
+
- `onFocus`
|
35
|
+
- `onFocusChange`
|