@pingux/astro 2.9.2 → 2.13.0-alpha.10
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/AccordionGridGroup/AccordionGridGroup.test.js +2 -2
- package/lib/cjs/components/AccordionGroup/Accordion.styles.js +1 -2
- package/lib/cjs/components/AccordionGroup/AccordionGroup.js +4 -5
- 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/Calendar/Calendar.test.js +2 -2
- package/lib/cjs/components/Calendar/CalendarCell.js +2 -3
- package/lib/cjs/components/Calendar/CalendarGrid.js +1 -3
- package/lib/cjs/components/Callout/Callout.mdx +28 -0
- package/lib/cjs/components/Card/Card.mdx +32 -0
- package/lib/cjs/components/Checkbox/Checkbox.js +1 -2
- package/lib/cjs/components/Checkbox/CheckboxBase.js +1 -2
- package/lib/cjs/components/CheckboxField/CheckboxField.mdx +42 -0
- package/lib/cjs/components/CodeView/CodeView.mdx +23 -0
- package/lib/cjs/components/CodeView/CodeView.test.js +1 -1
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.mdx +29 -0
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelBadge.js +0 -1
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +2 -3
- package/lib/cjs/components/ColorField/ColorField.mdx +38 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.mdx +66 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +1 -1
- package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +2 -2
- package/lib/cjs/components/CopyText/CopyText.mdx +23 -0
- package/lib/cjs/components/CopyText/CopyText.test.js +1 -1
- package/lib/cjs/components/DataTable/DataTable.mdx +54 -0
- package/lib/cjs/components/DataTable/DataTable.stories.js +1 -1
- package/lib/cjs/components/DataTable/DataTable.test.js +2 -2
- package/lib/cjs/components/DataTable/DataTableVirtualizer.js +2 -3
- package/lib/cjs/components/DatePicker/DateField.js +4 -5
- package/lib/cjs/components/DatePicker/DatePicker.js +4 -6
- package/lib/cjs/components/DatePicker/DatePicker.mdx +49 -0
- package/lib/cjs/components/DatePicker/DatePicker.test.js +2 -2
- package/lib/cjs/components/DatePicker/DateSegment.js +1 -2
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +3 -3
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +36 -0
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +29 -45
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +1 -1
- package/lib/cjs/components/FieldHelperText/FieldHelperText.js +4 -4
- 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 +213 -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/ImageUploadField/ImageUploadField.stories.js +1 -1
- package/lib/cjs/components/ImageUploadField/ImageUploadField.test.js +2 -2
- package/lib/cjs/components/Input/Input.js +2 -3
- package/lib/cjs/components/Label/Label.styles.js +1 -1
- 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/LinkSelectField/LinkSelectField.stories.js +1 -1
- package/lib/cjs/components/LinkSelectField/LinkSelectField.test.js +2 -2
- package/lib/cjs/components/ListBox/ListBox.test.js +2 -2
- 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 +95 -49
- package/lib/cjs/components/ListView/ListView.test.js +2 -2
- 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/MenuItem/MenuItem.js +2 -3
- package/lib/cjs/components/Messages/Messages.mdx +35 -0
- package/lib/cjs/components/Modal/Modal.mdx +59 -0
- package/lib/cjs/components/Modal/tests/Modal.integration.test.js +1 -2
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +43 -9
- package/lib/cjs/components/MultivaluesField/MultivaluesField.mdx +44 -0
- package/lib/cjs/components/MultivaluesField/MultivaluesField.test.js +3 -3
- package/lib/cjs/components/NavBar/NavBar.mdx +42 -0
- package/lib/cjs/components/NavBarSection/NavBarSection.js +2 -3
- 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/PasswordField/PasswordField.test.js +2 -3
- package/lib/cjs/components/PopoverContainer/PopoverContainer.d.ts +9 -0
- package/lib/cjs/components/PopoverContainer/PopoverContainer.js +10 -42
- package/lib/cjs/components/PopoverContainer/index.d.ts +2 -0
- package/lib/cjs/components/PopoverMenu/PopoverMenu.mdx +53 -0
- package/lib/cjs/components/Radio/Radio.js +1 -2
- package/lib/cjs/components/RadioGroupField/RadioGroupField.mdx +41 -0
- package/lib/cjs/components/RadioGroupField/RadioGroupField.test.js +2 -2
- 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/Select.styles.js +1 -1
- package/lib/cjs/components/SelectField/SelectField.mdx +46 -0
- package/lib/cjs/components/SelectField/SelectField.stories.js +1 -1
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +4 -4
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.test.js +2 -2
- package/lib/cjs/components/Separator/Separator.mdx +19 -0
- package/lib/cjs/components/Stepper/Stepper.mdx +41 -0
- package/lib/cjs/components/Stepper/Stepper.styles.js +1 -1
- package/lib/cjs/components/Stepper/Stepper.test.js +2 -3
- package/lib/cjs/components/Switch/Switch.js +1 -2
- package/lib/cjs/components/SwitchField/SwitchField.js +1 -0
- package/lib/cjs/components/SwitchField/SwitchField.mdx +36 -0
- package/lib/cjs/components/Tab/Tab.js +2 -3
- package/lib/cjs/components/TabPicker/TabPicker.js +1 -1
- package/lib/cjs/components/Table/Table.mdx +30 -0
- package/lib/cjs/components/TableBody/TableBody.js +0 -1
- package/lib/cjs/components/TableCaption/TableCaption.js +0 -1
- package/lib/cjs/components/TableCell/TableCell.d.ts +12 -0
- package/lib/cjs/components/TableCell/TableCell.js +0 -6
- 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/TableHead/TableHead.js +0 -1
- package/lib/cjs/components/TableRow/TableRow.js +0 -1
- package/lib/cjs/components/Tabs/Tabs.mdx +40 -0
- package/lib/cjs/components/Tabs/Tabs.test.js +3 -4
- 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/TextArea/TextArea.js +1 -3
- package/lib/cjs/components/TextAreaField/TextAreaField.mdx +34 -0
- package/lib/cjs/components/TextField/TextField.js +1 -1
- 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 +2 -7
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemEditButton.stories.js +4 -1
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemMenu.js +0 -1
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemMenu.test.js +2 -2
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemSwitchField.js +2 -3
- 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 +32 -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 +25 -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 +25 -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/useComponentToggle/useComponentToggle.test.js +2 -2
- package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
- package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.test.js +1 -1
- package/lib/cjs/hooks/useOverlappingMenuHoverState/useOverlappingMenuHoverState.test.js +2 -2
- 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/ApplicationSearchDropdown.stories.hidden.js +1 -1
- package/lib/cjs/recipes/{AttributesAndPingOneMapping.stories.js → AttributeMapping.stories.js} +392 -132
- package/lib/cjs/recipes/Slider.stories.js +1 -1
- package/lib/cjs/styles/colors.js +1 -1
- package/lib/cjs/styles/forms/index.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/cjs/utils/devUtils/constants/variants.js +1 -2
- package/lib/cjs/utils/testUtils/testAxe.js +2 -2
- package/lib/cjs/utils/testUtils/testWrapper.js +2 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.mdx +40 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +2 -2
- 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/Calendar/Calendar.test.js +2 -2
- 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/CodeView/CodeView.test.js +1 -1
- 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/ComboBoxField/ComboBoxField.stories.js +1 -1
- package/lib/components/ComboBoxField/ComboBoxField.test.js +2 -2
- package/lib/components/CopyText/CopyText.mdx +23 -0
- package/lib/components/CopyText/CopyText.test.js +1 -1
- package/lib/components/DataTable/DataTable.mdx +54 -0
- package/lib/components/DataTable/DataTable.stories.js +1 -1
- package/lib/components/DataTable/DataTable.test.js +1 -1
- package/lib/components/DatePicker/DatePicker.mdx +49 -0
- package/lib/components/DatePicker/DatePicker.test.js +2 -2
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +3 -3
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +36 -0
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +29 -45
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +1 -1
- 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 +213 -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/ImageUploadField/ImageUploadField.stories.js +1 -1
- package/lib/components/ImageUploadField/ImageUploadField.test.js +2 -2
- 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/LinkSelectField/LinkSelectField.stories.js +1 -1
- package/lib/components/LinkSelectField/LinkSelectField.test.js +2 -2
- package/lib/components/ListBox/ListBox.test.js +2 -2
- package/lib/components/ListItem/ListItem.mdx +21 -0
- package/lib/components/ListView/ListView.mdx +44 -0
- package/lib/components/ListView/ListView.stories.js +96 -50
- package/lib/components/ListView/ListView.test.js +2 -2
- 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.js +43 -9
- package/lib/components/MultivaluesField/MultivaluesField.mdx +44 -0
- package/lib/components/MultivaluesField/MultivaluesField.test.js +3 -3
- 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/PasswordField/PasswordField.test.js +2 -2
- 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/RadioGroupField/RadioGroupField.test.js +2 -2
- 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/SelectField/SelectField.stories.js +1 -1
- package/lib/components/SelectFieldBase/SelectFieldBase.test.js +2 -2
- package/lib/components/Separator/Separator.mdx +19 -0
- package/lib/components/Stepper/Stepper.mdx +41 -0
- package/lib/components/Stepper/Stepper.test.js +2 -2
- 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/Tabs/Tabs.test.js +2 -2
- 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.js +1 -1
- 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/ListViewItemMenu.test.js +2 -2
- 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/useComponentToggle/useComponentToggle.test.js +2 -2
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.test.js +1 -1
- package/lib/hooks/useOverlappingMenuHoverState/useOverlappingMenuHoverState.test.js +2 -2
- 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/lib/utils/testUtils/testAxe.js +2 -2
- package/package.json +23 -9
- 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
@@ -1,5 +1,5 @@
|
|
1
|
-
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
2
1
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
2
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
3
3
|
import _Object$create from "@babel/runtime-corejs3/core-js-stable/object/create";
|
4
4
|
import _Object$getPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/get-prototype-of";
|
5
5
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
@@ -10,7 +10,7 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
10
10
|
import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
|
11
11
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
|
12
12
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
13
|
-
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; }
|
13
|
+
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, defineProperty = _Object$defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $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 defineProperty(generator, "_invoke", { value: makeInvokeMethod(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; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(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); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), 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 (val) { var object = Object(val), 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; }
|
14
14
|
import React from 'react';
|
15
15
|
import { Item } from 'react-stately';
|
16
16
|
import userEvent from '@testing-library/user-event';
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/AccordionGroup/AccordionGroup" />
|
4
|
+
|
5
|
+
# AccordionGroup
|
6
|
+
|
7
|
+
Accordions are for grouping big chunks of content into easier-to-scan headers, which the user can expand when they want to read what is associated with that header.
|
8
|
+
|
9
|
+
Accordions should be used:
|
10
|
+
- To organize related information.
|
11
|
+
- To shorten pages and reduce scrolling when it’s not crucial that users review the content.
|
12
|
+
- When white space is at a minimum and content cannot be displayed all at once.
|
13
|
+
|
14
|
+
Accordions should not have focusable items as children.
|
15
|
+
|
16
|
+
It is built on React Aria [useAccordion](https://reactspectrum.blob.core.windows.net/reactspectrum/d77b35e970e5549f66b47a83f07423f5c93b7297/docs/react-aria/useAccordion.html).
|
17
|
+
|
18
|
+
### Required components
|
19
|
+
|
20
|
+
This component requires Item originating from [react-stately/collections](https://react-spectrum.adobe.com/react-stately/collections.html).
|
21
|
+
|
22
|
+
### Accessibility
|
23
|
+
|
24
|
+
This component should adhere to the [WAI-ARIA Accordion](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/examples/accordion) accessibility guidelines.
|
25
|
+
|
26
|
+
#### Keyboard Navigation
|
27
|
+
|
28
|
+
These keys provide additional functionality to the component.
|
29
|
+
|
30
|
+
| Keys | Functions |
|
31
|
+
| ---- | --------- |
|
32
|
+
| Space or Enter | When focus is on the accordion header of a collapsed section, these keys expand the section. |
|
33
|
+
| Tab | Moves focus to the next focusable component. All focusable components in the accordion are included in the page tab sequence.|
|
34
|
+
| Shift + Tab | Moves focus to the previous focusable component. All focusable components in the accordion are included in the page tab sequence. |
|
35
|
+
|
36
|
+
#### Screen readers
|
37
|
+
|
38
|
+
This component uses the following attributes to assist screen readers:
|
39
|
+
- The accordion header button uses the **`aria-expanded`** attribute to indicate when the content expands and collapses.
|
40
|
+
- When expanded, the **`aria-controls`** attribute is added to the button pointing to the content. The button uses **`aria-label`** to provide an accessible name.
|
41
|
+
- The **`aria-labelledby`** attribute is added to the entire accordion component, which is supplied with the button ID.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/ArrayField/ArrayField" />
|
4
|
+
|
5
|
+
# ArrayField
|
6
|
+
|
7
|
+
The component displays array collections to provide useful functions and optimizations for arrays.
|
8
|
+
|
9
|
+
ArrayField should:
|
10
|
+
- Be used for dynamic-sized arrays/lists.
|
11
|
+
- Be used with common array/list manipulations.
|
12
|
+
- Be used to create an instance or collect information.
|
13
|
+
|
14
|
+
### Required Components
|
15
|
+
|
16
|
+
This component requires the appropriate field component ([TextField](./?path=/story/form-textfield--default) or [SelectField](./?path=/story/form-selectfield--default)) and the ArrayFieldDeleteButton.
|
17
|
+
|
18
|
+
### Accessibility
|
19
|
+
|
20
|
+
#### Keyboard Navigation
|
21
|
+
|
22
|
+
These keys provide additional functionality to the component.
|
23
|
+
|
24
|
+
| Keys | Functions |
|
25
|
+
| ---- | ---- |
|
26
|
+
| Space or Enter | When focused, selects the item. |
|
27
|
+
| Tab | Moves focus to the next focusable component and follows the page tab sequence. |
|
28
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
29
|
+
|
30
|
+
#### Screen Readers
|
31
|
+
|
32
|
+
This component uses the following attributes to assist screen readers:
|
33
|
+
- The input uses the **`aria-invalid`** attribute to alert users that the values entered are not in the expected format.
|
34
|
+
- The field and buttons use the **`aria-label`** attribute to provide accessible names.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/AstroWrapper/AstroWrapper" />
|
4
|
+
|
5
|
+
# AstroWrapper
|
6
|
+
|
7
|
+
The AstroWrapper component provides a standard background, global styles, and the Astro theme, by default. This component should be used:
|
8
|
+
- Sparingly and cautiously when altering the default theme.
|
9
|
+
- With the **`themeOverrides`** prop to change some base theme properties.
|
10
|
+
- When targeting multiple components on a global scale.
|
11
|
+
|
12
|
+
It should not be used for minor CSS alterations. Use sx objects instead.
|
13
|
+
|
14
|
+
### Required components
|
15
|
+
|
16
|
+
This component can be used independently and does not require additional components.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Avatar/Avatar" />
|
4
|
+
|
5
|
+
# Avatar
|
6
|
+
|
7
|
+
Avatars are graphical representations of a user, and are usually photos, illustrations, or the user’s initials. When photos or illustrations aren’t available, the user’s initials are used instead.
|
8
|
+
The alternate text used on the image cannot be empty as it describes the function/appearance of the image.
|
9
|
+
|
10
|
+
This component is built on [Avatar from Theme-UI](https://theme-ui.com/components/avatar/).
|
11
|
+
|
12
|
+
### Required components
|
13
|
+
|
14
|
+
This component can be used independently and does not require additional components.
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Badge/Badge" />
|
4
|
+
|
5
|
+
# Badge
|
6
|
+
|
7
|
+
Badges are compact Box components used as filtering cues or contextual support. They should be clearly labeled and should not be used as buttons.
|
8
|
+
|
9
|
+
This component uses [props from Theme-UI](https://theme-ui.com/sx-prop).
|
10
|
+
|
11
|
+
### Required Components
|
12
|
+
|
13
|
+
This component can be used independently and does not require additional components.
|
14
|
+
|
15
|
+
### Accessibility
|
16
|
+
|
17
|
+
#### Keyboard Navigation
|
18
|
+
|
19
|
+
Badge itself is not focusable. However, when components are added to it, these keys provide additional functionality.
|
20
|
+
|
21
|
+
| Keys | Functions |
|
22
|
+
| ---- | --------- |
|
23
|
+
| Space or Enter | Selects the component. |
|
24
|
+
| Tab | Focuses the component and follows the page tab sequence. |
|
@@ -15,19 +15,17 @@ import _Number$isNaN from "@babel/runtime-corejs3/core-js-stable/number/is-nan";
|
|
15
15
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
16
16
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
17
17
|
import React, { forwardRef, useMemo } from 'react';
|
18
|
-
import { propType as stylePropType } from '@styled-system/prop-types';
|
19
18
|
import { toNumber } from 'lodash';
|
20
|
-
import PropTypes from 'prop-types';
|
21
19
|
import { flexbox, layout, typography } from 'styled-system';
|
22
20
|
import { Box as ThemeUIBox } from 'theme-ui';
|
23
21
|
import { usePropWarning, useStatusClasses } from '../../hooks';
|
24
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
25
23
|
var ExtendedBox = /*#__PURE__*/_styled(ThemeUIBox, process.env.NODE_ENV === "production" ? {
|
26
|
-
target: "
|
24
|
+
target: "ejf9h0h0"
|
27
25
|
} : {
|
28
|
-
target: "
|
26
|
+
target: "ejf9h0h0",
|
29
27
|
label: "ExtendedBox"
|
30
|
-
})(layout, flexbox, typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
28
|
+
})(layout, flexbox, typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JveC9Cb3gudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVNvQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9Cb3gvQm94LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyBmb3J3YXJkUmVmLCB1c2VNZW1vIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgdG9OdW1iZXIgfSBmcm9tICdsb2Rhc2gnO1xuaW1wb3J0IHsgZmxleGJveCwgbGF5b3V0LCB0eXBvZ3JhcGh5IH0gZnJvbSAnc3R5bGVkLXN5c3RlbSc7XG5pbXBvcnQgeyBCb3ggYXMgVGhlbWVVSUJveCB9IGZyb20gJ3RoZW1lLXVpJztcblxuaW1wb3J0IHsgdXNlUHJvcFdhcm5pbmcsIHVzZVN0YXR1c0NsYXNzZXMgfSBmcm9tICcuLi8uLi9ob29rcyc7XG5pbXBvcnQgeyBCb3hQcm9wcywgUmVhY3RSZWYgfSBmcm9tICcuLi8uLi90eXBlcyc7XG5cbmNvbnN0IEV4dGVuZGVkQm94ID0gc3R5bGVkKFRoZW1lVUlCb3gpKFxuICBsYXlvdXQsXG4gIGZsZXhib3gsXG4gIHR5cG9ncmFwaHksXG4pO1xuXG5jb25zdCBCb3ggPSBmb3J3YXJkUmVmKChwcm9wczogQm94UHJvcHMsIHJlZjogUmVhY3RSZWYpID0+IHtcbiAgY29uc3Qge1xuICAgIGZsZXhEaXJlY3Rpb24sXG4gICAgZ2FwLFxuICAgIGlzUm93LFxuICAgIGlzRGlzYWJsZWQsXG4gICAgY2xhc3NOYW1lLFxuICAgIGZvbnRTaXplLFxuICAgIHN4LFxuICAgIC4uLm90aGVyc1xuICB9ID0gcHJvcHM7XG4gIGNvbnN0IGZkID0gZmxleERpcmVjdGlvbiB8fCBpc1JvdyA/ICdyb3cnIDogJ2NvbHVtbic7XG4gIGNvbnN0IGN1c3RvbSA9IHsgLi4uc3ggfTtcblxuICBjb25zdCB7IGNsYXNzTmFtZXMgfSA9IHVzZVN0YXR1c0NsYXNzZXMoY2xhc3NOYW1lLCB7IGlzRGlzYWJsZWQgfSk7XG4gIHVzZVByb3BXYXJuaW5nKHByb3BzLCAnZGlzYWJsZWQnLCAnaXNEaXNhYmxlZCcpO1xuXG4gIGlmIChnYXApIHtcbiAgICBjdXN0b21bJyYgPiAqICsgKjpub3QoOmZpcnN0LW9mLXR5cGU6bm90KHN0eWxlKTpub3QoOmZpcnN0LW9mLXR5cGUgfiAqKSknXSA9IHtcbiAgICAgIFtmZCA9PT0gJ3JvdycgPyAnbWFyZ2luTGVmdCcgOiAnbWFyZ2luVG9wJ106IGdhcCxcbiAgICB9O1xuICB9XG5cbiAgY29uc3QgY3VzdG9tRm9udFNpemUgPSB1c2VNZW1vKCgpID0+IHtcbiAgICBjb25zdCBudW1lcmljYWxGb250U2l6ZSA9IHRvTnVtYmVyKGZvbnRTaXplKTtcbiAgICBpZiAoTnVtYmVyLmlzTmFOKG51bWVyaWNhbEZvbnRTaXplKSkge1xuICAgICAgcmV0dXJuIGZvbnRTaXplO1xuICAgIH1cbiAgICByZXR1cm4gbnVtZXJpY2FsRm9udFNpemU7XG4gIH0sIFtmb250U2l6ZV0pO1xuXG4gIHJldHVybiAoXG4gICAgPEV4dGVuZGVkQm94XG4gICAgICBjbGFzc05hbWU9e2NsYXNzTmFtZXN9XG4gICAgICByZWY9e3JlZn1cbiAgICAgIGRpc3BsYXk9XCJmbGV4XCJcbiAgICAgIGZsZXhEaXJlY3Rpb249e2ZkfVxuICAgICAgdmFyaWFudD1cImJveC5iYXNlXCJcbiAgICAgIGZvbnRTaXplPXtjdXN0b21Gb250U2l6ZX1cbiAgICAgIHsuLi5vdGhlcnN9XG4gICAgICBzeD17Y3VzdG9tfVxuICAgIC8+XG4gICk7XG59KTtcblxuQm94LmRlZmF1bHRQcm9wcyA9IHtcbiAgYXM6ICdkaXYnLFxuICBpc1JvdzogZmFsc2UsXG4gIGlzRGlzYWJsZWQ6IGZhbHNlLFxufTtcblxuQm94LmRpc3BsYXlOYW1lID0gJ0JveCc7XG5cbmV4cG9ydCBkZWZhdWx0IEJveDtcbiJdfQ== */");
|
31
29
|
var Box = /*#__PURE__*/forwardRef(function (props, ref) {
|
32
30
|
var flexDirection = props.flexDirection,
|
33
31
|
gap = props.gap,
|
@@ -45,7 +43,7 @@ var Box = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
45
43
|
classNames = _useStatusClasses.classNames;
|
46
44
|
usePropWarning(props, 'disabled', 'isDisabled');
|
47
45
|
if (gap) {
|
48
|
-
custom['& > * + *:not(:first-
|
46
|
+
custom['& > * + *:not(:first-of-type:not(style):not(:first-of-type ~ *))'] = _defineProperty({}, fd === 'row' ? 'marginLeft' : 'marginTop', gap);
|
49
47
|
}
|
50
48
|
var customFontSize = useMemo(function () {
|
51
49
|
var numericalFontSize = toNumber(fontSize);
|
@@ -65,19 +63,6 @@ var Box = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
65
63
|
sx: custom
|
66
64
|
}));
|
67
65
|
});
|
68
|
-
Box.propTypes = {
|
69
|
-
/** The background color of the box. */
|
70
|
-
bg: PropTypes.string,
|
71
|
-
/** Whether the box is disabled. */
|
72
|
-
isDisabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
73
|
-
/** The base HTML tag name or React component type to render */
|
74
|
-
as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
75
|
-
/** When true, display as a row rather than a column. */
|
76
|
-
isRow: PropTypes.bool,
|
77
|
-
/** Gap between items, whether in a row or column. */
|
78
|
-
gap: stylePropType,
|
79
|
-
fontSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
80
|
-
};
|
81
66
|
Box.defaultProps = {
|
82
67
|
as: 'div',
|
83
68
|
isRow: false,
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Box/Box" />
|
4
|
+
|
5
|
+
# Box
|
6
|
+
|
7
|
+
A Box is a flex-based component that can be used as a container for text, form controls, or other components.
|
8
|
+
You can customize the colors, margins, and padding surrounding the objects in the box.
|
9
|
+
|
10
|
+
This component should be used to style form controls, or as a container.
|
11
|
+
It should not be used for large, complex layouts. Use a [React Spectrum Grid](https://react-spectrum.adobe.com/react-spectrum/Grid.html) instead.
|
12
|
+
|
13
|
+
The Box is built on [Box-Theme UI](https://theme-ui.com/components/box/)
|
14
|
+
and accepts most [Styled System style props](https://styled-system.com/table/).
|
15
|
+
|
16
|
+
### Required components
|
17
|
+
|
18
|
+
- This component can be used independently and does not require additional components.
|
19
|
+
|
20
|
+
### Accessibility
|
21
|
+
|
22
|
+
This component adheres to the [WCAG 2.1 - 1.3.1 Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html)
|
23
|
+
accessibility guidelines.
|
@@ -45,9 +45,7 @@ test('box with default gap', function () {
|
|
45
45
|
gap: '30px'
|
46
46
|
});
|
47
47
|
var box = screen.getByTestId(testId);
|
48
|
-
expect(box).toHaveStyle('margin-top: 0px'
|
49
|
-
target: '> * + *'
|
50
|
-
});
|
48
|
+
expect(box).toHaveStyle('margin-top: 0px');
|
51
49
|
});
|
52
50
|
test('box as row with gap', function () {
|
53
51
|
getComponent({
|
@@ -55,7 +53,5 @@ test('box as row with gap', function () {
|
|
55
53
|
gap: '30px'
|
56
54
|
});
|
57
55
|
var box = screen.getByTestId(testId);
|
58
|
-
expect(box).toHaveStyle('margin-left: 0px'
|
59
|
-
target: '> * + *'
|
60
|
-
});
|
56
|
+
expect(box).toHaveStyle('margin-left: 0px');
|
61
57
|
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Bracket/Bracket" />
|
4
|
+
|
5
|
+
# Bracket
|
6
|
+
|
7
|
+
The Bracket component displays information in a hierarchical view of the content structure.
|
8
|
+
Items such as headings, directories, and subitems are displayed in a tree structure, which shows how these items are related to each other.
|
9
|
+
|
10
|
+
Brackets should avoid cross-referencing. Try separating the content into sections instead.
|
11
|
+
Brackets shouldn’t display too many levels of depth to avoid overflow.
|
12
|
+
|
13
|
+
### Required components
|
14
|
+
|
15
|
+
This component requires the [Badge](./?path=/docs/components-badge--default),[Box](./?path=/story/components-box--default), and [Text](./?path=/docs/components-text--default) components.
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Breadcrumbs/Breadcrumbs" />
|
4
|
+
|
5
|
+
# Breadcrumbs
|
6
|
+
|
7
|
+
Breadcrumbs display a hierarchy of links to the current page or resource in an application. They are effective in products and experiences that have a large amount of content organized in a hierarchy of more than two levels.
|
8
|
+
They take up little space but still provide context for the user’s place in the navigation hierarchy, but should be treated as secondary navigation and never entirely replace the primary navigation.
|
9
|
+
|
10
|
+
There are two different types of breadcrumbs:
|
11
|
+
- **Location-based**: Illustrate the hierarchy and show users where they are within that hierarchy.
|
12
|
+
- **Path-based**: Show the steps the user took to get to the current page, rather than reflecting the site’s information architecture.
|
13
|
+
|
14
|
+
It is built on React Aria [useBreadcrumbs](https://react-spectrum.adobe.com/react-aria/useBreadcrumbs.html) from React-Aria.
|
15
|
+
|
16
|
+
### Required components
|
17
|
+
|
18
|
+
This component requires Item originating from [react-stately/collections](https://react-spectrum.adobe.com/react-stately/collections.html).
|
19
|
+
|
20
|
+
### Accessibility
|
21
|
+
|
22
|
+
This component should adhere to the [WAI-ARIA Breadcrumbs](https://www.w3.org/WAI/ARIA/apg/example-index/breadcrumb/index.html) accessibility guidelines.
|
23
|
+
|
24
|
+
#### Keyboard Navigation
|
25
|
+
|
26
|
+
These keys provide additional functionality to the component.
|
27
|
+
|
28
|
+
| Keys | Functions |
|
29
|
+
| ---- | --------- |
|
30
|
+
| Space or Enter | Selects the item and navigates to the associated location. |
|
31
|
+
| Tab | Moves focus to the next focusable component and follows the page tab sequence. |
|
32
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
33
|
+
|
34
|
+
#### Screen readers
|
35
|
+
|
36
|
+
This component uses the following attributes to assist screen readers:
|
37
|
+
|
38
|
+
- The Breadcrumbs and BreadcrumbItems components use the **`aria-label`** attribute to provide an accessible name.
|
39
|
+
- The Icon component uses the **`aria-hidden`** attribute to hide its content from assistive technology.
|
40
|
+
- The last BreadcrumbItem component uses the **`aria-current`** attribute to indicate that the user is currently viewing that page.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Button/Button" />
|
4
|
+
|
5
|
+
# Button
|
6
|
+
|
7
|
+
Buttons are used to trigger actions or events and can contain an icon or a text label. The style used depends on its type:
|
8
|
+
|
9
|
+
- **Primary buttons**: Indicate the call to action on the page. Primary buttons should only appear once per screen (not including the application header, modal dialog, or side panel).
|
10
|
+
- **Secondary buttons**: Secondary buttons, the default, often have text labels and can only be used in conjunction with a primary button. As part of a pair, the secondary button’s function is to perform the negative action of the set, such as “Cancel” or “Back.”
|
11
|
+
- **Tertiary buttons**: Indicate that lower-priority tasks can be accomplished, and are often used in sections of the UI that have less space, such as cards, lists, or tables.
|
12
|
+
- **Danger buttons**: Use these buttons for:
|
13
|
+
|
14
|
+
- Dangerous actions, such as those that lose or destroy data.
|
15
|
+
- Primary danger buttons should only be used when the dangerous action is the most likely action, such as the affirmative Delete action in a deletion confirmation dialog.
|
16
|
+
- Secondary and tertiary variants can also be used for actions related to current errors, such as resolving them or viewing their details.
|
17
|
+
|
18
|
+
This component is built on [Button from Theme-UI](https://theme-ui.com/components/button)
|
19
|
+
|
20
|
+
### Required components
|
21
|
+
|
22
|
+
This component can be used independently and does not require additional components.
|
23
|
+
|
24
|
+
### Accessibility
|
25
|
+
|
26
|
+
This component should adhere to the [WAI-ARIA Button](https://www.w3.org/TR/wai-aria-practices-1.1/examples/button/button.html) accessibility guidelines.
|
27
|
+
|
28
|
+
#### Keyboard Navigation
|
29
|
+
|
30
|
+
These keys provide additional functionality to the component.
|
31
|
+
|
32
|
+
| Keys | Functions |
|
33
|
+
| ---- | --------- |
|
34
|
+
| Space or Enter | Selects the button. |
|
35
|
+
| Tab | Focuses the button and follows the page tab sequence. |
|
36
|
+
|
37
|
+
#### Screen readers.
|
38
|
+
|
39
|
+
This component uses the **`aria-label`** attribute to provide an accessible name.
|
40
|
+
|
@@ -13,8 +13,8 @@ var _excluded = ["isConfigured"];
|
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
14
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
15
15
|
import React from 'react';
|
16
|
-
import AddCircleIcon from '@pingux/mdi-react/AddCircleIcon';
|
17
16
|
import CreateIcon from '@pingux/mdi-react/CreateIcon';
|
17
|
+
import PlusIcon from '@pingux/mdi-react/PlusIcon';
|
18
18
|
import { withDesign } from 'storybook-addon-designs';
|
19
19
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
20
20
|
import { Box, Button, Icon, Text } from '../../index';
|
@@ -58,13 +58,14 @@ export var Disabled = function Disabled() {
|
|
58
58
|
};
|
59
59
|
export var TextIconButton = function TextIconButton() {
|
60
60
|
return ___EmotionJSX(Button, {
|
61
|
-
mb: "sm"
|
61
|
+
mb: "sm",
|
62
|
+
variant: "withIcon"
|
62
63
|
}, ___EmotionJSX(Box, {
|
63
64
|
isRow: true,
|
64
65
|
alignItems: "center"
|
65
66
|
}, ___EmotionJSX(Icon, {
|
66
|
-
icon:
|
67
|
-
mr: "
|
67
|
+
icon: PlusIcon,
|
68
|
+
mr: "xs",
|
68
69
|
color: "active",
|
69
70
|
size: 20,
|
70
71
|
title: {
|
@@ -78,10 +79,34 @@ export var InlineButton = function InlineButton() {
|
|
78
79
|
mr: "auto",
|
79
80
|
variant: "inline"
|
80
81
|
}, "Inline"), ___EmotionJSX(Button, {
|
82
|
+
mb: "sm",
|
83
|
+
mr: "auto",
|
84
|
+
variant: "inlineWithIcon"
|
85
|
+
}, ___EmotionJSX(Icon, {
|
86
|
+
icon: PlusIcon,
|
87
|
+
mr: "xs",
|
88
|
+
color: "active",
|
89
|
+
size: 15,
|
90
|
+
title: {
|
91
|
+
name: 'Add Circle Icon'
|
92
|
+
}
|
93
|
+
}), "Inline with icon"), ___EmotionJSX(Button, {
|
81
94
|
mb: "sm",
|
82
95
|
mr: "auto",
|
83
96
|
variant: "inlinePrimary"
|
84
|
-
}, "Inline primary")
|
97
|
+
}, "Inline primary"), ___EmotionJSX(Button, {
|
98
|
+
mb: "sm",
|
99
|
+
mr: "auto",
|
100
|
+
variant: "inlinePrimaryWithIcon"
|
101
|
+
}, ___EmotionJSX(Icon, {
|
102
|
+
icon: PlusIcon,
|
103
|
+
mr: "xs",
|
104
|
+
color: "active",
|
105
|
+
size: 15,
|
106
|
+
title: {
|
107
|
+
name: 'Add Circle Icon'
|
108
|
+
}
|
109
|
+
}), "Inline primary with icon"));
|
85
110
|
};
|
86
111
|
export var ColorBlockButton = function ColorBlockButton(args) {
|
87
112
|
// Change `isConfigured` property in storybook controls
|
@@ -12,10 +12,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
12
12
|
import { text as textVariants } from '../Text/Text.styles';
|
13
13
|
export var base = _objectSpread({
|
14
14
|
cursor: 'pointer',
|
15
|
-
height:
|
16
|
-
lineHeight: '
|
15
|
+
height: '37px',
|
16
|
+
lineHeight: '115%',
|
17
17
|
minWidth: 'min-content',
|
18
|
-
|
18
|
+
padding: '10px 15px',
|
19
19
|
outline: 'none',
|
20
20
|
display: 'inline-flex',
|
21
21
|
alignItems: 'center',
|
@@ -73,6 +73,15 @@ var primary = _objectSpread(_objectSpread({}, base), {}, {
|
|
73
73
|
},
|
74
74
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
75
75
|
});
|
76
|
+
var withIcon = _objectSpread(_objectSpread({}, base), {}, {
|
77
|
+
padding: '8.5px 15px 8.5px 10px',
|
78
|
+
bg: 'white',
|
79
|
+
border: '1px solid',
|
80
|
+
borderColor: 'active',
|
81
|
+
'&.is-hovered': _objectSpread({}, defaultHover),
|
82
|
+
'&.is-pressed': _objectSpread({}, defaultActive),
|
83
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
84
|
+
});
|
76
85
|
var success = _objectSpread(_objectSpread({}, base), {}, {
|
77
86
|
display: 'inline-flex',
|
78
87
|
bg: 'success.bright',
|
@@ -100,7 +109,7 @@ var critical = _objectSpread(_objectSpread({}, base), {}, {
|
|
100
109
|
var inline = _objectSpread(_objectSpread({}, base), {}, {
|
101
110
|
display: 'inline-flex',
|
102
111
|
bg: 'white',
|
103
|
-
height: '
|
112
|
+
height: '21px',
|
104
113
|
lineHeight: 1,
|
105
114
|
fontSize: 'sm',
|
106
115
|
borderRadius: '15px',
|
@@ -124,6 +133,12 @@ var inlinePrimary = _objectSpread(_objectSpread(_objectSpread({}, inline), defau
|
|
124
133
|
borderColor: 'accent.20'
|
125
134
|
})
|
126
135
|
});
|
136
|
+
var inlineWithIcon = _objectSpread(_objectSpread({}, inline), {}, {
|
137
|
+
padding: '3px 15px 3px 10px'
|
138
|
+
});
|
139
|
+
var inlinePrimaryWithIcon = _objectSpread(_objectSpread({}, inlinePrimary), {}, {
|
140
|
+
padding: '3px 15px 3px 10px'
|
141
|
+
});
|
127
142
|
export var text = _objectSpread(_objectSpread({}, base), {}, {
|
128
143
|
display: 'inline-flex',
|
129
144
|
bg: 'transparent',
|
@@ -177,8 +192,8 @@ var colorBlock = {
|
|
177
192
|
outline: 'none',
|
178
193
|
cursor: 'pointer',
|
179
194
|
width: 150,
|
180
|
-
|
181
|
-
p: '5px 15px',
|
195
|
+
height: '40px',
|
196
|
+
p: '5px 10px 5px 15px',
|
182
197
|
display: 'flex',
|
183
198
|
justifyContent: 'space-between',
|
184
199
|
alignItems: 'center',
|
@@ -252,5 +267,8 @@ export default {
|
|
252
267
|
primary: primary,
|
253
268
|
quiet: quiet,
|
254
269
|
success: success,
|
255
|
-
colorBlock: colorBlock
|
270
|
+
colorBlock: colorBlock,
|
271
|
+
withIcon: withIcon,
|
272
|
+
inlineWithIcon: inlineWithIcon,
|
273
|
+
inlinePrimaryWithIcon: inlinePrimaryWithIcon
|
256
274
|
};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Calendar/Calendar" />
|
4
|
+
|
5
|
+
# Calendar
|
6
|
+
|
7
|
+
The calendar component displays months in a grid-like view and gives users the ability to quickly go through months and years to select a specific date.
|
8
|
+
|
9
|
+
This component is built on [useCalendar](https://react-spectrum.adobe.com/react-aria/useCalendar.html#usecalendar-1), [useCalendarGrid](https://react-spectrum.adobe.com/react-aria/useCalendar.html#usecalendargrid), and
|
10
|
+
[useCalendarCell](https://react-spectrum.adobe.com/react-aria/useCalendar.html#usecalendarcell) from React Aria, and [useCalendarState](https://react-spectrum.adobe.com/react-stately/useCalendarState.html) from React Stately.
|
11
|
+
|
12
|
+
### Required components
|
13
|
+
|
14
|
+
This component can be used independently and does not require additional components.
|
15
|
+
|
16
|
+
### Accessibility
|
17
|
+
|
18
|
+
#### Keyboard Navigation
|
19
|
+
|
20
|
+
These keys provide additional functionality to the component.
|
21
|
+
|
22
|
+
| Keys | Functions |
|
23
|
+
| ---- | --------- |
|
24
|
+
| Space or Enter | Selects the date when a date is focused, and navigates to the calendar pages when the navigational buttons are focused. |
|
25
|
+
| Tab | Components in the calendar are focusable and follow the page tab sequence. |
|
26
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
27
|
+
| Pressing Home:(Fn + Right Arrow Key) Or Control or Command + Home | Shifts the focus to the first calendar date. |
|
28
|
+
| Pressing Home:(Fn + left Arrow Key) Or Control or Command + End | Shifts the focus to the last calendar date. |
|
29
|
+
| Arrow key | Navigates up, down, right, and left across the calendar. |
|
30
|
+
| Page up | Changes the grid of dates to the previous month. |
|
31
|
+
| Page down | Changes the grid of dates to the next month. |
|
32
|
+
| Shift + page up | Changes the grid of dates to the same month in the previous year. |
|
33
|
+
| Shift+ page down | Changes the grid of dates to the same month in the next year. |
|
34
|
+
|
35
|
+
#### Screen Readers
|
36
|
+
|
37
|
+
This component uses the following attributes to assist screen readers:
|
38
|
+
- The **`aria-label`** attribute is used to provide an accessible name.
|
39
|
+
- In each data cell, the **`aria-selected`** attribute is set to “true” when a date is selected, and **`aria-disabled`** is set to “false” by default.
|