@pingux/astro 2.9.2 → 2.13.0-alpha.3
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.mdx +32 -0
- 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/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/TooltipTrigger.mdx +21 -0
- 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/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.mdx +32 -0
- 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/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/TooltipTrigger.mdx +21 -0
- 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/package.json +19 -5
- 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
@@ -0,0 +1,42 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Navbar/Navbar" />
|
4
|
+
|
5
|
+
# Navbar
|
6
|
+
|
7
|
+
The NavBar component is primarily to navigate within apps.
|
8
|
+
This component is built to have the NavBarSection component passed into it. NavBarSection is an iterative component with an array of objects passed into it.
|
9
|
+
|
10
|
+
The NavBar should:
|
11
|
+
- Be visually separate from the content.
|
12
|
+
- Have descriptive titles describing the destination, action item or category.
|
13
|
+
- Group navigation items into sections based on related categories.
|
14
|
+
- Order content logically for a natural progression.
|
15
|
+
|
16
|
+
### Required Components
|
17
|
+
|
18
|
+
This component requires these components:
|
19
|
+
- NavBarItem
|
20
|
+
- NavBarItemLink
|
21
|
+
- NavBarItemButton
|
22
|
+
- NavBarSection
|
23
|
+
|
24
|
+
### Accessibility
|
25
|
+
|
26
|
+
#### Keyboard Navigation
|
27
|
+
|
28
|
+
These keys provide additional functionality to the component.
|
29
|
+
|
30
|
+
| Key | Functions |
|
31
|
+
| ---- | ---- |
|
32
|
+
| Tab | All of the content in the NavBar is focusable. |
|
33
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
34
|
+
| Space or Enter | Toggles the component when the accordion is focused. |
|
35
|
+
| Arrow keys | All components within the NavBar are accessible using arrow keys. |
|
36
|
+
| Esc | Pressing the escape key when the accordion is open and focused collapses the component. |
|
37
|
+
|
38
|
+
#### Screen readers
|
39
|
+
|
40
|
+
This component uses the following attributes to assist screen readers:
|
41
|
+
- Each Link component uses the **`aria-label`** attribute to provide an accessible name.
|
42
|
+
- The Icon uses the **`aria-hidden`** attribute to hide its content from assistive technology.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/NumberField/NumberField" />
|
4
|
+
|
5
|
+
# NumberField
|
6
|
+
|
7
|
+
This component is a variation of an input field that only accepts numeric values, and can be incremented and decremented using stepper buttons.
|
8
|
+
It uses the [useNumberField](https://react-spectrum.adobe.com/react-aria/useNumberField.html) component from React Aria and the [useNumberFieldState](https://react-spectrum.adobe.com/react-stately/useNumberFieldState.html) component from React Stately.
|
9
|
+
|
10
|
+
The NumberFields should:
|
11
|
+
- Be used when the users may not know exact values and need to adjust it relative to its current state.
|
12
|
+
- Set a common default value when possible for proper context. For example, travel companies put the default number of passengers to 1. The default value is easily modified by typing into the field.
|
13
|
+
- Use formatOptions props to include unit symbols, as appropriate.
|
14
|
+
- Have a clear and concise label to specify what value the user should enter.
|
15
|
+
|
16
|
+
This component shouldn’t be used with other digit-based values like date, telephone, and Zip code.
|
17
|
+
|
18
|
+
### Required components
|
19
|
+
|
20
|
+
This component can be used independently and does not require additional components.
|
21
|
+
|
22
|
+
### Accessibility
|
23
|
+
|
24
|
+
#### Keyboard Navigation
|
25
|
+
|
26
|
+
These keys provide additional functionality to the component.
|
27
|
+
|
28
|
+
| Keys | Functions |
|
29
|
+
| ---- | --------- |
|
30
|
+
| Tab | The input is focusable using the Tab key and follows the page tab sequence. |
|
31
|
+
| Arrow keys | Can be used to increment or decrement the numbers displayed in the field. |
|
32
|
+
| Shift + Tab | Moves focus to the previous focusable component.|
|
33
|
+
| Stepper buttons | Pressing and holding the stepper buttons allows continuous increments or decrements. |
|
34
|
+
|
35
|
+
#### Screen readers
|
36
|
+
|
37
|
+
This component uses the following attributes to assist screen readers:
|
38
|
+
- The input component uses the **`aria-labelledby`** attribute to reference the label.
|
39
|
+
- The two icon buttons each use the **`aria-controls`** attribute with the input ID and the **`aria-label`** attribute to provide an accessible name.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/OverlayPanel/OverlayPanel" />
|
4
|
+
|
5
|
+
# OverlayPanel
|
6
|
+
|
7
|
+
OverlayPanel is a generic container component that can overlay other components on a page.
|
8
|
+
In Astro, this component is used to display detailed information and present modal interactions.
|
9
|
+
|
10
|
+
**Note**: The way the OverlayPanel displays in Firefox browser differs from other browsers. This is a Storybook-only issue and will not affect the way it works in your application, but test your application in Chrome or Safari.
|
11
|
+
|
12
|
+
This component should:
|
13
|
+
- Be used to show content that is too long to put in a popover or modal.
|
14
|
+
- Show content related to the state of the main view.
|
15
|
+
|
16
|
+
This component should not:
|
17
|
+
- Be overused, as it disrupts the user’s workflow.
|
18
|
+
- Cover content that is contextually relevant to the overlay being displayed.
|
19
|
+
|
20
|
+
### Required Components
|
21
|
+
|
22
|
+
This component requires the OverlayProvider component.
|
23
|
+
|
24
|
+
### Accessibility
|
25
|
+
|
26
|
+
#### Keyboard Navigation
|
27
|
+
|
28
|
+
These keys provide additional functionality to the component.
|
29
|
+
|
30
|
+
| Key | Functions |
|
31
|
+
| ---- | ---- |
|
32
|
+
| Tab | The trigger is focusable using the Tab key and follows the page tab sequence. |
|
33
|
+
| Space or Enter | Opens or closes the panel when the trigger is focused. |
|
34
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
35
|
+
| Esc | Pressing the escape key closes the overlay and focuses on the previous focusable component. |
|
36
|
+
|
37
|
+
#### Screen Readers
|
38
|
+
|
39
|
+
The trigger button uses the **`aria-expanded`** attribute to indicate the expansion and collapse of content.
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/PasswordField/PasswordField" />
|
4
|
+
|
5
|
+
# PasswordField
|
6
|
+
|
7
|
+
The PasswordField component combines the Input, Label, IconButton and HelpText components to create a complete, form-ready solution.
|
8
|
+
|
9
|
+
Password fields should specify requirements, whenever possible.
|
10
|
+
However, they should not allow users to disable the mask button in most cases, unless for a good reason.
|
11
|
+
This feature is helpful for smaller screens where the users are more likely to incorrectly enter their passwords than on a computer with a keyboard.
|
12
|
+
|
13
|
+
### Required components
|
14
|
+
|
15
|
+
This component can be used independently and does not require additional components.
|
16
|
+
|
17
|
+
### Accessibility
|
18
|
+
|
19
|
+
#### Keyboard Navigation
|
20
|
+
|
21
|
+
These keys provide additional functionality to the component.
|
22
|
+
|
23
|
+
| Keys | Functions |
|
24
|
+
| ---- | --------- |
|
25
|
+
| Tab | The input is focusable using the Tab key and follows the page tab sequence. |
|
26
|
+
| Shift + Tab | Moves focus to the previous focusable component.|
|
27
|
+
| Space or Enter | Toggles the PasswordType component to hide or reveal the input. |
|
28
|
+
|
29
|
+
#### Screen readers
|
30
|
+
|
31
|
+
This component uses the following attributes to assist screen readers:
|
32
|
+
- The input component uses the **`aria-labelledby`** attribute to reference the label ID.
|
33
|
+
- The icon buttons use **`aria-label`** attribute to provide an accessible name.
|
@@ -10,13 +10,12 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
10
10
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
11
11
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
12
12
|
var _excluded = ["children"],
|
13
|
-
_excluded2 = ["children", "className", "placement", "arrowProps", "arrowCrossOffset", "isOpen", "hasNoArrow", "isNotClosedOnBlur", "
|
13
|
+
_excluded2 = ["children", "className", "placement", "arrowProps", "arrowCrossOffset", "isOpen", "hasNoArrow", "isNotClosedOnBlur", "isNonModal", "width", "direction", "sx"],
|
14
14
|
_excluded3 = ["arrowCrossOffset", "sx", "direction"];
|
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, useImperativeHandle, useRef } from 'react';
|
18
18
|
import { mergeProps, OverlayContainer, useModal, useOverlay } from 'react-aria';
|
19
|
-
import PropTypes from 'prop-types';
|
20
19
|
import { useStatusClasses } from '../../hooks';
|
21
20
|
import Box from '../Box';
|
22
21
|
|
@@ -31,19 +30,8 @@ var PopoverContainer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
31
30
|
ref: ref
|
32
31
|
}, others), children));
|
33
32
|
});
|
34
|
-
|
35
|
-
|
36
|
-
arrowProps: PropTypes.shape({}),
|
37
|
-
onClose: PropTypes.func,
|
38
|
-
isNotClosedOnBlur: PropTypes.bool,
|
39
|
-
hasNoArrow: PropTypes.bool,
|
40
|
-
isKeyboardDismissDisabled: PropTypes.bool,
|
41
|
-
isNonModal: PropTypes.bool,
|
42
|
-
isDismissable: PropTypes.bool,
|
43
|
-
width: PropTypes.string,
|
44
|
-
arrowCrossOffset: PropTypes.string,
|
45
|
-
direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left'])
|
46
|
-
};
|
33
|
+
|
34
|
+
// eslint-disable-next-line max-len
|
47
35
|
export var PopoverWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
48
36
|
var children = props.children,
|
49
37
|
className = props.className,
|
@@ -53,14 +41,12 @@ export var PopoverWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
53
41
|
isOpen = props.isOpen,
|
54
42
|
hasNoArrow = props.hasNoArrow,
|
55
43
|
isNotClosedOnBlur = props.isNotClosedOnBlur,
|
56
|
-
isKeyboardDismissDisabled = props.isKeyboardDismissDisabled,
|
57
44
|
isNonModal = props.isNonModal,
|
58
|
-
isDismissable = props.isDismissable,
|
59
45
|
width = props.width,
|
60
46
|
direction = props.direction,
|
61
47
|
sx = props.sx,
|
62
48
|
others = _objectWithoutProperties(props, _excluded2);
|
63
|
-
var popoverRef = useRef();
|
49
|
+
var popoverRef = useRef(null);
|
64
50
|
/* istanbul ignore next */
|
65
51
|
useImperativeHandle(ref, function () {
|
66
52
|
return popoverRef.current;
|
@@ -77,6 +63,9 @@ export var PopoverWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
77
63
|
isOpen: isOpen
|
78
64
|
}),
|
79
65
|
classNames = _useStatusClasses.classNames;
|
66
|
+
if (!isOpen) {
|
67
|
+
return null;
|
68
|
+
}
|
80
69
|
return isOpen && ___EmotionJSX(Box, _extends({}, mergeProps(others, overlayProps, modalProps), {
|
81
70
|
variant: "popoverMenu.container",
|
82
71
|
ref: popoverRef,
|
@@ -92,20 +81,6 @@ export var PopoverWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
92
81
|
direction: direction
|
93
82
|
})));
|
94
83
|
});
|
95
|
-
PopoverWrapper.propTypes = {
|
96
|
-
placement: PropTypes.string,
|
97
|
-
arrowProps: PropTypes.shape({}),
|
98
|
-
isOpen: PropTypes.bool,
|
99
|
-
hasNoArrow: PropTypes.bool,
|
100
|
-
isNotClosedOnBlur: PropTypes.bool,
|
101
|
-
isKeyboardDismissDisabled: PropTypes.bool,
|
102
|
-
isNonModal: PropTypes.bool,
|
103
|
-
isDismissable: PropTypes.bool,
|
104
|
-
width: PropTypes.string,
|
105
|
-
arrowCrossOffset: PropTypes.string,
|
106
|
-
sx: PropTypes.shape({}),
|
107
|
-
direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left'])
|
108
|
-
};
|
109
84
|
PopoverWrapper.defaultProps = {
|
110
85
|
placement: 'bottom'
|
111
86
|
};
|
@@ -144,10 +119,4 @@ export var PopoverArrow = function PopoverArrow(props) {
|
|
144
119
|
sx: _objectSpread(_objectSpread({}, arrowCrossOffset && calculateOffset()), sx)
|
145
120
|
}));
|
146
121
|
};
|
147
|
-
PopoverArrow.propTypes = {
|
148
|
-
width: PropTypes.string,
|
149
|
-
arrowCrossOffset: PropTypes.string,
|
150
|
-
sx: PropTypes.shape({}),
|
151
|
-
direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left'])
|
152
|
-
};
|
153
122
|
export default PopoverContainer;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/PopoverMenu/PopoverMenu" />
|
4
|
+
|
5
|
+
# PopoverMenu
|
6
|
+
|
7
|
+
The PopoverMenu component serves as a wrapper for the Menu component and the associated trigger.
|
8
|
+
It links the Menu's open state to the trigger's press state to provide the necessary overlay context.
|
9
|
+
It primarily uses the [useMenuTrigger](https://react-spectrum.adobe.com/react-aria/useMenuTrigger.html) from React Aria
|
10
|
+
and [useMenuTriggerState](https://react-spectrum.adobe.com/react-stately/useMenuTriggerState.html) from React Stately.
|
11
|
+
|
12
|
+
The PopoverMenu should:
|
13
|
+
- Be triggered by a [Button](./?path=/docs/components-button--default) or [IconButton](./?path=/docs/components-iconbutton--default).
|
14
|
+
- Include actionable labels, such as view, edit, and delete.
|
15
|
+
|
16
|
+
The PopoverMenu shouldn’t have more than five options.
|
17
|
+
|
18
|
+
### Required Components
|
19
|
+
|
20
|
+
This component requires these components:
|
21
|
+
|
22
|
+
- OverlayProvider
|
23
|
+
- [Button](./?path=/docs/components-button--default)
|
24
|
+
- [Menu](./?path=/docs/components-menu--default)
|
25
|
+
- Item: This component originates from the [react-stately/collections](https://react-spectrum.adobe.com/react-stately/collections.html) and is exported within Astro.
|
26
|
+
|
27
|
+
### Accessibility
|
28
|
+
|
29
|
+
This component should adhere to the [WAI-ARIA Dialog](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/dialog/) accessibility guidelines.
|
30
|
+
|
31
|
+
#### Keyboard Navigation
|
32
|
+
|
33
|
+
These keys provide additional functionality to the component.
|
34
|
+
|
35
|
+
| Key | Functions |
|
36
|
+
| ---- | ---- |
|
37
|
+
| Tab | The trigger and menu items are focusable using the Tab key. |
|
38
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
39
|
+
| Space or Enter | Pressing Space or Enter on a focused trigger opens or closes the menu and selects the MenuItems it is focused on. |
|
40
|
+
| Arrow keys | Moves the selection through the popover. |
|
41
|
+
| Esc | Pressing the escape key closes the popover and focuses on the previous focusable component. |
|
42
|
+
|
43
|
+
#### Screen Readers
|
44
|
+
|
45
|
+
This component uses the following attributes to assist screen readers:
|
46
|
+
- The **`aria-haspopup`** attribute is set to “True” to indicate that this component contains popover content.
|
47
|
+
- The trigger uses the **`aria-expanded`** attribute to indicate when the content expands and collapses.
|
48
|
+
- The menu ID is supplied to the **`aria-controls`** attribute pointing to the content.
|
49
|
+
- The **`aria-orientation`** attribute indicates whether the orientation is horizontal, vertical, unknown, or ambiguous.
|
50
|
+
- The default **`aria-disabled`** attribute is set to “False” by default.
|
51
|
+
- The button ID is supplied to the **`aria-labelledby`** attribute to reference it.
|
52
|
+
|
53
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/RadioGroupField/RadioGroupField" />
|
4
|
+
|
5
|
+
# RadioGroupField
|
6
|
+
|
7
|
+
The RadioGroupField component allows users to select a single option from a list of mutually exclusive options.
|
8
|
+
This component uses [useRadioGroup](https://react-spectrum.adobe.com/react-aria/useRadioGroup.html) from React Aria and [useRadioGroupState](https://react-spectrum.adobe.com/react-stately/useRadioGroupState.html) from React Stately.
|
9
|
+
|
10
|
+
RadioGroupField should:
|
11
|
+
- Offer at least two choices.
|
12
|
+
- Have a clear label describing the context.
|
13
|
+
- Include a None option, when appropriate.
|
14
|
+
|
15
|
+
RadioGroupField shouldn’t be used to change state or set off an action. Nor should it be used to display a list of more than 6 options. If that’s the case, use the [SelectField](./?path=/story/form-selectfield--default) instead.
|
16
|
+
|
17
|
+
### Required components
|
18
|
+
|
19
|
+
This component requires the RadioField component.
|
20
|
+
|
21
|
+
### Accessibility
|
22
|
+
|
23
|
+
This component should adhere to the [WAI-ARIA RadioGroup](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) accessibility guidelines.
|
24
|
+
|
25
|
+
#### Keyboard Navigation
|
26
|
+
|
27
|
+
These keys provide additional functionality to the component.
|
28
|
+
|
29
|
+
| Keys | Functions |
|
30
|
+
| ---- | --------- |
|
31
|
+
| Tab | The field is focusable using the Tab key and follows the page tab sequence. |
|
32
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
33
|
+
| Arrow Keys | Once focused, the radio button can be selected using any of the arrow keys. |
|
34
|
+
| Space | If the radio button is focused, pressing space selects or deselects it. |
|
35
|
+
|
36
|
+
#### Screen readers
|
37
|
+
|
38
|
+
This component uses the following attributes to assist screen readers:
|
39
|
+
|
40
|
+
- The **`aria-labelledby`** attribute is used to reference the label, and the **`aria-orientation`** attribute is set to “Vertical” by default.
|
41
|
+
- Each radio input also uses the **`aria-labelledby`** attribute pointing to its label.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/RequirementsList/RequirementsList" />
|
4
|
+
|
5
|
+
# RequirementsList
|
6
|
+
|
7
|
+
The RequirementsList component is used to display password requirements and includes indicators showing the requirement status.
|
8
|
+
|
9
|
+
This list should:
|
10
|
+
- Be sorted in a logical way that makes content easy to scan.
|
11
|
+
- Have each item associated with an action.
|
12
|
+
|
13
|
+
The list shouldn’t use punctuation at the end of each line.
|
14
|
+
|
15
|
+
### Required Components
|
16
|
+
|
17
|
+
This component can be used independently and does not require additional components.
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/RockerButtonGroup/RockerButtonGroup" />
|
4
|
+
|
5
|
+
# RockerButtonGroup
|
6
|
+
|
7
|
+
This component handles a single selection state for a group of rocker buttons. It is intended to be used with the RockerButton component as children.
|
8
|
+
|
9
|
+
This component should:
|
10
|
+
- Be used for a single-item selection.
|
11
|
+
- Contain concise labels.
|
12
|
+
|
13
|
+
It shouldn’t be used as a replacement for RadioButton.
|
14
|
+
|
15
|
+
### Required Components
|
16
|
+
|
17
|
+
This component requires the RockerButton component.
|
18
|
+
|
19
|
+
### Accessibility
|
20
|
+
|
21
|
+
#### Keyboard Navigation
|
22
|
+
|
23
|
+
These keys provide additional functionality to the component.
|
24
|
+
|
25
|
+
| Key | Functions |
|
26
|
+
| ---- | ---- |
|
27
|
+
| Tab | The group is focusable using the Tab key and follows the page tab sequence. |
|
28
|
+
| Arrow keys & Enter or Space| After the RockerButtonGroup has focus, individual rocker buttons can be focused using the right and left arrow keys, and selected by either pressing the Enter key or Space. |
|
29
|
+
| Arrow keys | The right and left arrow keys can loop back to the beginning and end of the group |
|
30
|
+
|
31
|
+
#### Screen Readers
|
32
|
+
|
33
|
+
This component uses the following attributes to assist screen readers:
|
34
|
+
- The **`aria-orientation`** attribute indicates whether the orientation is horizontal, vertical, unknown, or ambiguous.
|
35
|
+
- The default **`aria-disabled`** attribute is set to “False” by default.
|
36
|
+
- The buttons use the **`aria-pressed`** attribute to indicate the current status of the toggle button.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/ScrollBox/ScrollBox" />
|
4
|
+
|
5
|
+
# ScrollBox
|
6
|
+
|
7
|
+
The ScrollBox component is a container that allows users to scroll through content.
|
8
|
+
|
9
|
+
This component should:
|
10
|
+
- Be used for large amounts of text, such as disclaimers and terms of service.
|
11
|
+
- Always have a visible scroll bar or default operating scroll bar.
|
12
|
+
|
13
|
+
It shouldn’t rely on the user to scroll down to the end. Include important information in the visible area.
|
14
|
+
|
15
|
+
### Required Components
|
16
|
+
|
17
|
+
This component requires the [Box](./?path=/story/components-box--default) component.
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/SearchField/SearchField" />
|
4
|
+
|
5
|
+
# SearchField
|
6
|
+
|
7
|
+
The SearchField component renders a search field with associated controls, including visual elements and keyboard interaction handlers.
|
8
|
+
It is built with [useSearchField](https://react-spectrum.adobe.com/react-aria/useSearchField.html) from React Aria and [useSearchFieldState](https://react-spectrum.adobe.com/react-stately/useSearchFieldState.html) from React Stately.
|
9
|
+
|
10
|
+
This component should be:
|
11
|
+
- Used for searching and filtering.
|
12
|
+
- Limited to a single use per page.
|
13
|
+
|
14
|
+
It shouldn’t:
|
15
|
+
- Use important information as placeholders. Once the search term is entered, the placeholder is no longer visible.
|
16
|
+
- Be used if all the information is easily accessible and within view.
|
17
|
+
|
18
|
+
### Required components
|
19
|
+
|
20
|
+
This component can be used independently and does not require additional components.
|
21
|
+
|
22
|
+
### Accessibility
|
23
|
+
|
24
|
+
#### Keyboard Navigation
|
25
|
+
|
26
|
+
These keys provide additional functionality to the component.
|
27
|
+
|
28
|
+
| Keys | Functions |
|
29
|
+
| ---- | --------- |
|
30
|
+
| Tab | The field is focusable using the Tab key and follows the page tab sequence. |
|
31
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
32
|
+
| Enter or Space | Once the user starts typing, the previously hidden clear button can be focused and selected by pressing the Enter or Space key. |
|
33
|
+
| Esc and Enter | The field can be cleared by pressing the Escape key and handles submit events on Enter. |
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/SelectField/SelectField" />
|
4
|
+
|
5
|
+
# SelectField
|
6
|
+
|
7
|
+
The component allows items to be selected from a drop-down list and displayed in the field.
|
8
|
+
It is a variation of the [LinkSelectField](./?path=/docs/form-linkselectfield--default) component that uses [useSelect](https://react-spectrum.adobe.com/react-aria/useSelect.html) from React Aria and [useSelectState](https://react-spectrum.adobe.com/react-stately/useSelectState.html) from React Stately and does not rely on native browsers or mobile implementations.
|
9
|
+
|
10
|
+
The SelectField component should be used to present choices between mutually exclusive options.
|
11
|
+
|
12
|
+
It shouldn’t be used:
|
13
|
+
- When there are fewer than three options. Use the [RadioGroupField](./?path=/docs/form-radiogroupfield--default) component instead.
|
14
|
+
- If the user input can't be predicted using the preset values and the exact input value is important to specify, use the [TextField](./?path=/docs/form-textfield--default) component instead.
|
15
|
+
- For large complex lists. The user should be able to easily scan and navigate the list.
|
16
|
+
If the list is large, use the [ComboBoxField](./?path=/docs/form-comboboxfield--default) component instead.
|
17
|
+
|
18
|
+
### Required components
|
19
|
+
|
20
|
+
This component requires the OverlayProvider and Item originating from [react-stately/collections](https://react-spectrum.adobe.com/react-stately/collections.html).
|
21
|
+
|
22
|
+
### Accessibility
|
23
|
+
|
24
|
+
#### Keyboard Navigation
|
25
|
+
|
26
|
+
These keys provide additional functionality to the component.
|
27
|
+
|
28
|
+
| Keys | Functions |
|
29
|
+
| ---- | --------- |
|
30
|
+
| Tab | The field is focusable using the Tab key and follows the page tab sequence. |
|
31
|
+
| Shift + Tab | Moves focus to the previous focusable component.|
|
32
|
+
| Space or Enter | Pressing Space or Enter when the trigger button is focused opens or closes the menu. Pressing Space or Enter when the menu item is focused selects the listbox option. |
|
33
|
+
| Arrow keys | Can be used to move through the listbox selection. |
|
34
|
+
| Typing in input field | Adds focus to it and opens the popover. |
|
35
|
+
| Home(Fn + Right Arrow Key) Or Control/Command + Home | Shifts the focus to the first item in the listbox. |
|
36
|
+
| End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last item in the listbox. |
|
37
|
+
| Esc | Pressing the escape key closes the popover menu and adds focus to the input.|
|
38
|
+
|
39
|
+
#### Screen readers
|
40
|
+
|
41
|
+
This component uses the following attributes to assist screen readers:
|
42
|
+
- The trigger button uses the **`aria-labelledby`** attribute to reference the label ID, the **`aria-expanded`** attribute to indicate the expansion or collapse of the popover,
|
43
|
+
- The **`aria-haspopup`** attribute indicates the type of popup content as a listbox. Once expanded, the **`aria-controls`** attribute is added to the button pointing to the popover.
|
44
|
+
- The component uses the **`aria-invalid`** attribute to detect incorrect values or status errors, and is set to “False” by default.
|
45
|
+
- The listbox uses the **`aria-labelledby`** attribute pointing to the label ID.
|
46
|
+
- Each option in the list uses the **`aria-selected`** attribute to indicate the selection state, **`aria-posinset`** to give the option’s position in the current set of list items, and **`aria-setsize`** to define the current set of options. The default **`aria-disabled`** value is false for each option.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Separator/Separator" />
|
4
|
+
|
5
|
+
# Separator
|
6
|
+
|
7
|
+
The Separator component is a basic separator that accepts most of the styling props from [styled-system](https://styled-system.com/table).
|
8
|
+
|
9
|
+
This component should be used to divide or group content within a page. However, it shouldn't be placed between the last component and the footer or between buttons.
|
10
|
+
|
11
|
+
### Required Components
|
12
|
+
|
13
|
+
This component can be used independently and does not require additional components.
|
14
|
+
|
15
|
+
### Accessibility
|
16
|
+
|
17
|
+
#### Screen Readers
|
18
|
+
|
19
|
+
The **`aria-orientation`** attribute indicates whether the orientation is horizontal, vertical, unknown, or ambiguous
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Stepper/Stepper" />
|
4
|
+
|
5
|
+
# Stepper
|
6
|
+
|
7
|
+
The Stepper component acts as a wrapper for individual step components.
|
8
|
+
It is used to display progress through a sequence of logical and numbered steps, usually within a configuration wizard.
|
9
|
+
|
10
|
+
This component should be used:
|
11
|
+
- To reveal or hide sections of content.
|
12
|
+
- For progressive disclosure.
|
13
|
+
|
14
|
+
It shouldn’t have more than 6 steps or be used as a replacement for a static label or text.
|
15
|
+
|
16
|
+
### Required Components
|
17
|
+
|
18
|
+
This component requires the Item originating from [react-stately/collections](https://react-spectrum.adobe.com/react-stately/collections.html) and [Text](./?path=/docs/components-text--default) components.
|
19
|
+
|
20
|
+
### Accessibility
|
21
|
+
|
22
|
+
This component should adhere to the [WAI-ARIA Stepper](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) accessibility guidelines.
|
23
|
+
|
24
|
+
#### Keyboard Navigation
|
25
|
+
|
26
|
+
These keys provide additional functionality to the component.
|
27
|
+
|
28
|
+
| Keys | Function |
|
29
|
+
| ---- | ---- |
|
30
|
+
| Tab | The field is focusable using the Tab key and follows the page tab sequence. |
|
31
|
+
| Arrow keys | When this field is focused, the arrow keys can be used to navigate through the steps. |
|
32
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
33
|
+
| Home(Fn + Right Arrow Key) Or Control/Command + Home| Shifts the focus to the first step. |
|
34
|
+
| End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last step. |
|
35
|
+
|
36
|
+
#### Screen Readers
|
37
|
+
|
38
|
+
This component uses the following attributes to assist screen readers:
|
39
|
+
- The **`aria-orientation`** attribute indicates whether the orientation is horizontal, vertical, unknown, or ambiguous.
|
40
|
+
- Each step uses the **`aria-selected`** attribute to indicate the selection status, and the **`aria-control`** attribute is supplied with the associated panel ID that displays the content.
|
41
|
+
- Each step uses the **`aria-labelledby`** with the label ID to reference it.
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/SwitchField/SwitchField" />
|
4
|
+
|
5
|
+
# SwitchField
|
6
|
+
|
7
|
+
The SwitchField component combines a switch, label, and helper text for a complete solution.
|
8
|
+
|
9
|
+
This component should be used for:
|
10
|
+
- Communicating activations and deactivations.
|
11
|
+
- Describing changes with immediate response (setting applied, hidden functionality) without user confirmation.
|
12
|
+
|
13
|
+
It shouldn’t change labels while toggling between states, or have indeterminate partial states. It can only be on or off.
|
14
|
+
|
15
|
+
### Required components
|
16
|
+
|
17
|
+
This component can be used independently and does not require additional components.
|
18
|
+
|
19
|
+
### Accessibility
|
20
|
+
|
21
|
+
This component should adhere to the [WAI-ARIA Switch](https://www.w3.org/WAI/ARIA/apg/patterns/switch/) accessibility guidelines.
|
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
|
+
| Space | When focused, Space toggles the switched field. |
|
32
|
+
|
33
|
+
#### Screen readers
|
34
|
+
|
35
|
+
The hidden input uses the **`aria-labelledby`** attribute to associate the label, the **`aria-label`** attribute to provide an accessible name,
|
36
|
+
and the **`aria-checked`** attribute for the switched state.
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Table/Table" />
|
4
|
+
|
5
|
+
# Table
|
6
|
+
|
7
|
+
Data tables display information in a grid-like format of rows and columns.
|
8
|
+
They organize information in a way that’s easy to scan so that users can look for patterns and develop insights from data.
|
9
|
+
|
10
|
+
Column header names describe the type of content displayed in each column.
|
11
|
+
Each row contains data related to a single entity.
|
12
|
+
|
13
|
+
Tables should:
|
14
|
+
- Have consistently aligned content.
|
15
|
+
- Use multiple heading rows for higher-level grouping of the columns.
|
16
|
+
- Use column dividers sparingly.
|
17
|
+
|
18
|
+
Tables shouldn’t use different indicators to represent empty fields.
|
19
|
+
|
20
|
+
This basic component is rendered as an HTML `<table>`, which accepts the `<TableBody>` component and the `<TableHead>` as children.
|
21
|
+
|
22
|
+
### Required Components
|
23
|
+
|
24
|
+
This component requires these additional components:
|
25
|
+
|
26
|
+
- TableCaption
|
27
|
+
- TableHead
|
28
|
+
- TableRow
|
29
|
+
- TableCell
|
30
|
+
- TableBody
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
3
|
var _excluded = ["children", "isHeading"];
|
4
4
|
import React from 'react';
|
5
|
-
import PropTypes from 'prop-types';
|
6
5
|
import Box from '../Box';
|
7
6
|
|
8
7
|
/**
|
@@ -23,8 +22,4 @@ var TableCell = function TableCell(props) {
|
|
23
22
|
as: isHeading ? 'th' : 'td'
|
24
23
|
}, others), children);
|
25
24
|
};
|
26
|
-
TableCell.propTypes = {
|
27
|
-
/** Determines whether or not the html rendered is a th or td element. */
|
28
|
-
isHeading: PropTypes.bool
|
29
|
-
};
|
30
25
|
export default TableCell;
|