@pingux/astro 2.9.1 → 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 +20 -6
- package/CHANGELOG.md +0 -2554
- 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,38 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/ImageUploadField/ImageUploadField" />
|
4
|
+
|
5
|
+
# ImageUploadField
|
6
|
+
|
7
|
+
The ImageUploadField component is a variation of the [FileInputField](./?path=/docs/form-fileinputfield--default) used for uploading images.
|
8
|
+
|
9
|
+
### Required components
|
10
|
+
|
11
|
+
This component requires the OverlayProvider component.
|
12
|
+
|
13
|
+
### Accessibility
|
14
|
+
|
15
|
+
#### Keyboard Navigation
|
16
|
+
|
17
|
+
These keys provide additional functionality to the component.
|
18
|
+
|
19
|
+
| Keys | Functions |
|
20
|
+
| ---- | --------- |
|
21
|
+
| Tab | Focuses the field and follows the page tab sequence. |
|
22
|
+
| Space or Enter | When the trigger is focused, the file browser opens. When the menu item is focused, it triggers an action. |
|
23
|
+
| Down arrow | After uploading, pressing the Down arrow with a focused trigger opens the popover menu. |
|
24
|
+
| Arrow keys | Can be used to move the selection in the popover. |
|
25
|
+
| Shift + Tab | Moves focus to the previous focusable component.|
|
26
|
+
| Home(Fn + Right Arrow Key) Or Control/Command + Home | Shifts the focus to the first item in the listbox. |
|
27
|
+
| End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last item in the listbox. |
|
28
|
+
| Esc | Pressing the escape key closes the popover menu and adds focus to the trigger. |
|
29
|
+
|
30
|
+
#### Screen readers
|
31
|
+
|
32
|
+
This component uses the following attributes to assist screen readers:
|
33
|
+
|
34
|
+
- The input uses the **`aria-labelledby`** attribute to reference the label.
|
35
|
+
- The trigger button uses the **`aria-label`** attribute to provide an accessible name.
|
36
|
+
- The **`aria-expanded`** attribute is used to indicate the expansion or collapse of the popover.
|
37
|
+
- The **`aria-haspopup`** attribute indicates the type of popup content as a menu. Once expanded, **`aria-controls`** is added to the button pointing to the popover.
|
38
|
+
- The menu uses vertical **`aria-orientation`** by default, and each menu item has a “False” **`aria-disabled`** value.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Link/Link" />
|
4
|
+
|
5
|
+
# Link
|
6
|
+
|
7
|
+
This basic link component is built on [Link from Theme-UI](https://theme-ui.com/components/link) and [useLink](https://react-spectrum.adobe.com/react-aria/useLink.html) from React Aria.
|
8
|
+
|
9
|
+
Links should:
|
10
|
+
- Have the same font size as surrounding text when used inline.
|
11
|
+
- Be considerate of the screen reader. Write descriptive link text and alternate text.
|
12
|
+
|
13
|
+
Link shouldn’t be used in titles, and preferably used within the body text.
|
14
|
+
|
15
|
+
### Required Components
|
16
|
+
|
17
|
+
This component can be used independently and does not require additional components.
|
18
|
+
|
19
|
+
### Accessibility
|
20
|
+
This component adheres to [WAI-ARIA Link](https://www.w3.org/WAI/ARIA/apg/patterns/link/) accessibility guidelines.
|
21
|
+
|
22
|
+
#### Keyboard Navigation
|
23
|
+
|
24
|
+
| Key | Functions |
|
25
|
+
| ---- | ---- |
|
26
|
+
| Space or Enter | Selects the link. |
|
27
|
+
| Tab | Focuses the link and follows the page tab sequence. |
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/LinkSelectField/LinkSelectField" />
|
4
|
+
|
5
|
+
# LinkSelectField
|
6
|
+
|
7
|
+
The LinkSelectField component collects information from a dropdown menu of options using [useSelect](https://react-spectrum.adobe.com/react-aria/useSelect.html) from React Aria and
|
8
|
+
[useSelectState](https://react-spectrum.adobe.com/react-stately/useSelectState.html) from React Stately.
|
9
|
+
It does not rely on native browser or mobile implementations.
|
10
|
+
|
11
|
+
This component should be used to limit the options available to users.
|
12
|
+
It should not be used:
|
13
|
+
- When there are fewer than 3 options for the user to choose from:
|
14
|
+
- Use the [RadioGroupField](./?path=/docs/form-radiogroupfield--default) if users must choose 1 option.
|
15
|
+
- Use the [CheckBoxField](./?path=/docs/form-checkboxfield--default) if users can choose more than 1 option.
|
16
|
+
- If the exact input value is important to specify, use the [TextField](./?path=/docs/form-textfield--default).
|
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 | Focuses the field and follows the page tab sequence. |
|
31
|
+
| Space or Enter | When the trigger is focused, the menu opens or closes. When the menu item is focused, it selects the listbox option. |
|
32
|
+
| Arrow keys | Can be used to move the selection in the listbox. |
|
33
|
+
| Shift + Tab | Moves focus to the previous focusable component.|
|
34
|
+
| Home(Fn + Right Arrow Key) Or Control/Command + Home | Shifts the focus to the first item in the listbox. |
|
35
|
+
| End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last item in the listbox. |
|
36
|
+
| Esc | Pressing the escape key closes the popover menu and adds focus to the previously focused component.|
|
37
|
+
|
38
|
+
#### Screen readers
|
39
|
+
|
40
|
+
This component uses the following attributes to assist screen readers:
|
41
|
+
|
42
|
+
- The trigger button uses the **`aria-expanded`** attribute to indicate the expansion or collapse of the popover menu, the **`aria-label`** attribute to provide an accessible name, and the **`aria-labelledby`** attribute to reference the label.
|
43
|
+
- The **`aria-haspopup`** attribute indicates the type of popup content as a listbox.
|
44
|
+
- A visually hidden DismissButton is added for screen reader users to close the overlay in the absence of a dismiss button.
|
45
|
+
- The listbox in the popover uses the **`aria-labelledby`** attribute, which also references the label.
|
46
|
+
- Each option 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.
|
47
|
+
- The **`aria-disabled`** attribute value is “False” for each option, by default.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/ListItem/ListItem" />
|
4
|
+
|
5
|
+
# ListItem
|
6
|
+
|
7
|
+
ListItems are items that display within the [ListView](./?path=/docs/components-listview--default) component.
|
8
|
+
This component accepts most of its styling properties from [Styled System](https://styled-system.com/table/).
|
9
|
+
|
10
|
+
### Required Components
|
11
|
+
|
12
|
+
This component can be used independently and does not require additional components.
|
13
|
+
|
14
|
+
### Accessibility
|
15
|
+
|
16
|
+
#### Keyboard Navigation
|
17
|
+
|
18
|
+
| Key | Functions |
|
19
|
+
| ---- | ---- |
|
20
|
+
| Space or Enter | Selects the item. |
|
21
|
+
| Tab | Focuses item and follows the page tab sequence. |
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/ListView/ListView" />
|
4
|
+
|
5
|
+
# ListView
|
6
|
+
|
7
|
+
ListViews are used to display a list of items. Users can select, view, or edit items in this list.
|
8
|
+
This virtualized component supports asynchronous data in infinitely scrollable lists.
|
9
|
+
|
10
|
+
This component should:
|
11
|
+
- Be used to list items that contain a significant amount of information within them.
|
12
|
+
- Be able to access ListItem information.
|
13
|
+
|
14
|
+
It shouldn’t be used to list items that only have a single piece of information.
|
15
|
+
|
16
|
+
### Required Components
|
17
|
+
|
18
|
+
This component requires [ListItem](./?path=/docs/components-listitem--default).
|
19
|
+
|
20
|
+
### Accessibility
|
21
|
+
|
22
|
+
This component should adhere to the [WAI-ARIA ListBox](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/) accessibility guidelines.
|
23
|
+
|
24
|
+
#### Keyboard Navigation
|
25
|
+
|
26
|
+
These keys provide additional functionality to the component.
|
27
|
+
|
28
|
+
| Key | Functions |
|
29
|
+
| ---- | ---- |
|
30
|
+
| Space or Enter | Selects the item. |
|
31
|
+
| Tab | Focuses item and follows the page tab sequence. |
|
32
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
33
|
+
| Arrow keys | Can be used to move the selection in the menu. |
|
34
|
+
| Home(Fn + Right Arrow Key) Or Control/Command + Home | Shifts the focus to the first row. |
|
35
|
+
| End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last visible row. |
|
36
|
+
|
37
|
+
#### Screen Readers
|
38
|
+
|
39
|
+
This component uses the following attributes to assist screen readers:
|
40
|
+
- The **`aria-label`** attribute is used to provide an accessible name.
|
41
|
+
- The **`aria-rowcount`** and **`aria-columncount`** attributes are used to indicate the total number of rows and columns in the grid structure.
|
42
|
+
- The **`aria-multiselectable`** attribute is used to indicate that users can toggle between items in the grid.
|
43
|
+
- Each ListViewItem uses the **`aria-rowindex`** attribute, which defines a component's position in the total number of rows.
|
44
|
+
- Each item also uses the aria-label, **`aria-colindex`** attributes to indicate the component’s column position and aria-selected to indicate the currently selected state.
|
@@ -17,16 +17,18 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
17
17
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
18
18
|
import React from 'react';
|
19
19
|
import { Item, useAsyncList } from 'react-stately';
|
20
|
+
import CreateIcon from '@pingux/mdi-react/CreateIcon';
|
20
21
|
import FormSelectIcon from '@pingux/mdi-react/FormSelectIcon';
|
22
|
+
import MoreVertIcon from '@pingux/mdi-react/MoreVertIcon';
|
21
23
|
import { action } from '@storybook/addon-actions';
|
22
24
|
import isChromatic from 'chromatic/isChromatic';
|
23
25
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
24
|
-
import { Box,
|
26
|
+
import { Box, Icon, IconButton, ListView, Text } from '../../index';
|
25
27
|
import loadingStates from '../../utils/devUtils/constants/loadingStates';
|
26
28
|
import ListViewReadme from './ListView.mdx';
|
27
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
28
30
|
export default {
|
29
|
-
title: '
|
31
|
+
title: 'Components/ListView',
|
30
32
|
component: ListView,
|
31
33
|
parameters: {
|
32
34
|
docs: {
|
@@ -45,20 +47,19 @@ export default {
|
|
45
47
|
options: loadingStates
|
46
48
|
}
|
47
49
|
},
|
48
|
-
disabledKeys: {
|
50
|
+
disabledKeys: {
|
51
|
+
defaultValue: ['Snake']
|
52
|
+
},
|
49
53
|
items: {
|
50
54
|
control: {
|
51
55
|
type: 'none'
|
52
56
|
}
|
53
57
|
},
|
54
58
|
onSelectionChange: {
|
55
|
-
control: 'none'
|
59
|
+
control: 'none',
|
60
|
+
// eslint-disable-next-line no-console
|
61
|
+
defaultValue: console.log
|
56
62
|
}
|
57
|
-
},
|
58
|
-
args: {
|
59
|
-
disabledKeys: ['Snake'],
|
60
|
-
// eslint-disable-next-line no-console
|
61
|
-
onSelectionChange: console.log
|
62
63
|
}
|
63
64
|
};
|
64
65
|
var items = [{
|
@@ -532,33 +533,82 @@ var actions = {
|
|
532
533
|
onFocus: action('onFocus'),
|
533
534
|
onLoadMore: action('onLoadMore')
|
534
535
|
};
|
535
|
-
var
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
536
|
+
var ListElement = function ListElement(_ref) {
|
537
|
+
var item = _ref.item;
|
538
|
+
return ___EmotionJSX(Box, {
|
539
|
+
isRow: true
|
540
|
+
}, ___EmotionJSX(Box, {
|
541
|
+
isRow: true,
|
542
|
+
mr: "auto",
|
543
|
+
alignSelf: "center"
|
544
|
+
}, ___EmotionJSX(Icon, {
|
545
|
+
icon: FormSelectIcon,
|
546
|
+
mr: "sm",
|
547
|
+
color: "accent.40",
|
548
|
+
size: "md"
|
549
|
+
}), ___EmotionJSX(Text, {
|
550
|
+
variant: "itemTitle",
|
551
|
+
alignSelf: "center"
|
552
|
+
}, item.name)), ___EmotionJSX(Box, {
|
553
|
+
isRow: true,
|
554
|
+
alignSelf: "center",
|
555
|
+
gap: "sm"
|
556
|
+
}, ___EmotionJSX(IconButton, {
|
557
|
+
"aria-label": "create-icon"
|
558
|
+
}, ___EmotionJSX(Icon, {
|
559
|
+
icon: CreateIcon,
|
560
|
+
size: "sm"
|
561
|
+
})), ___EmotionJSX(IconButton, {
|
562
|
+
"aria-label": "actions-icon"
|
563
|
+
}, ___EmotionJSX(Icon, {
|
564
|
+
icon: MoreVertIcon,
|
565
|
+
size: "sm"
|
566
|
+
}))));
|
543
567
|
};
|
544
|
-
export var Default = function Default(
|
545
|
-
var args = _extends({}, (_objectDestructuringEmpty(
|
568
|
+
export var Default = function Default(_ref2) {
|
569
|
+
var args = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
546
570
|
return ___EmotionJSX(ListView, _extends({}, props, args, {
|
547
571
|
items: items
|
548
572
|
}), function (item) {
|
549
573
|
return ___EmotionJSX(Item, {
|
550
|
-
key: item.name
|
551
|
-
|
552
|
-
data:
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
574
|
+
key: item.name,
|
575
|
+
textValue: item.name,
|
576
|
+
"data-id": item.key
|
577
|
+
}, ___EmotionJSX(Box, {
|
578
|
+
isRow: true
|
579
|
+
}, ___EmotionJSX(Box, {
|
580
|
+
isRow: true,
|
581
|
+
mr: "auto",
|
582
|
+
alignSelf: "center"
|
583
|
+
}, ___EmotionJSX(Icon, {
|
584
|
+
icon: FormSelectIcon,
|
585
|
+
mr: "sm",
|
586
|
+
color: "accent.40",
|
587
|
+
size: "md"
|
588
|
+
}), ___EmotionJSX(Text, {
|
589
|
+
variant: "itemTitle",
|
590
|
+
alignSelf: "center"
|
591
|
+
}, item.name)), ___EmotionJSX(Box, {
|
592
|
+
isRow: true,
|
593
|
+
alignSelf: "center",
|
594
|
+
gap: "sm"
|
595
|
+
}, ___EmotionJSX(IconButton, {
|
596
|
+
"aria-label": "create-icon"
|
597
|
+
}, ___EmotionJSX(Icon, {
|
598
|
+
icon: CreateIcon,
|
599
|
+
size: "sm"
|
600
|
+
})), ___EmotionJSX(IconButton, {
|
601
|
+
"aria-label": "actions-icon",
|
602
|
+
size: "sm"
|
603
|
+
}, ___EmotionJSX(Icon, {
|
604
|
+
icon: MoreVertIcon,
|
605
|
+
size: "sm"
|
606
|
+
})))));
|
557
607
|
});
|
558
608
|
};
|
559
609
|
export var InfiniteLoadingList = function InfiniteLoadingList(args) {
|
560
610
|
var getMockData = /*#__PURE__*/function () {
|
561
|
-
var
|
611
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(signal, cursor) {
|
562
612
|
var pageNumber;
|
563
613
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
564
614
|
while (1) {
|
@@ -590,11 +640,11 @@ export var InfiniteLoadingList = function InfiniteLoadingList(args) {
|
|
590
640
|
}, _callee);
|
591
641
|
}));
|
592
642
|
return function getMockData(_x, _x2) {
|
593
|
-
return
|
643
|
+
return _ref3.apply(this, arguments);
|
594
644
|
};
|
595
645
|
}();
|
596
646
|
var fetchApiData = /*#__PURE__*/function () {
|
597
|
-
var
|
647
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(signal, cursor, filterText) {
|
598
648
|
var res, json;
|
599
649
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
600
650
|
while (1) {
|
@@ -648,18 +698,18 @@ export var InfiniteLoadingList = function InfiniteLoadingList(args) {
|
|
648
698
|
}, _callee2, null, [[2, 14]]);
|
649
699
|
}));
|
650
700
|
return function fetchApiData(_x3, _x4, _x5) {
|
651
|
-
return
|
701
|
+
return _ref4.apply(this, arguments);
|
652
702
|
};
|
653
703
|
}();
|
654
704
|
var list = useAsyncList({
|
655
|
-
load: function load(
|
705
|
+
load: function load(_ref5) {
|
656
706
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
657
707
|
var signal, cursor, filterText;
|
658
708
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
659
709
|
while (1) {
|
660
710
|
switch (_context3.prev = _context3.next) {
|
661
711
|
case 0:
|
662
|
-
signal =
|
712
|
+
signal = _ref5.signal, cursor = _ref5.cursor, filterText = _ref5.filterText;
|
663
713
|
if (cursor) {
|
664
714
|
// eslint-disable-next-line
|
665
715
|
cursor = cursor.replace(/^http:\/\//i, "https://");
|
@@ -692,13 +742,11 @@ export var InfiniteLoadingList = function InfiniteLoadingList(args) {
|
|
692
742
|
onLoadMore: list.loadMore
|
693
743
|
}), function (item) {
|
694
744
|
return ___EmotionJSX(Item, {
|
695
|
-
key: item.name
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
}
|
701
|
-
}, ___EmotionJSX(Controls, null)));
|
745
|
+
key: item.name,
|
746
|
+
textValue: item.name
|
747
|
+
}, ___EmotionJSX(ListElement, {
|
748
|
+
item: item
|
749
|
+
}));
|
702
750
|
}));
|
703
751
|
};
|
704
752
|
InfiniteLoadingList.args = {
|
@@ -711,19 +759,17 @@ InfiniteLoadingList.parameters = {
|
|
711
759
|
}
|
712
760
|
}
|
713
761
|
};
|
714
|
-
export var MultipleSelection = function MultipleSelection(
|
715
|
-
var args = _extends({}, (_objectDestructuringEmpty(
|
762
|
+
export var MultipleSelection = function MultipleSelection(_ref6) {
|
763
|
+
var args = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
|
716
764
|
return ___EmotionJSX(ListView, _extends({}, props, args, {
|
717
765
|
items: items,
|
718
766
|
selectionMode: "multiple"
|
719
767
|
}), function (item) {
|
720
768
|
return ___EmotionJSX(Item, {
|
721
|
-
key: item.name
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
}
|
727
|
-
}, ___EmotionJSX(Controls, null)));
|
769
|
+
key: item.name,
|
770
|
+
textValue: item.name
|
771
|
+
}, ___EmotionJSX(ListElement, {
|
772
|
+
item: item
|
773
|
+
}));
|
728
774
|
});
|
729
775
|
};
|
@@ -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 = ["size"];
|
4
4
|
import React, { forwardRef } from 'react';
|
5
|
-
import PropTypes from 'prop-types';
|
6
5
|
import Box from '../Box';
|
7
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
8
7
|
var Loader = /*#__PURE__*/forwardRef(function (props, ref) {
|
@@ -24,17 +23,4 @@ var Loader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
24
23
|
variant: "loader.dotRight"
|
25
24
|
}));
|
26
25
|
});
|
27
|
-
Loader.propTypes = {
|
28
|
-
/**
|
29
|
-
* Color key from theme or string value.
|
30
|
-
* Default color inherits the font color.
|
31
|
-
*/
|
32
|
-
color: PropTypes.string,
|
33
|
-
/**
|
34
|
-
* Size as number or pixel / em / rem value.
|
35
|
-
* Sizes can either be a string such as xs, sm, md, etc or numeric size with unit such as 15px.
|
36
|
-
* Default size inherits the font size.
|
37
|
-
*/
|
38
|
-
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
39
|
-
};
|
40
26
|
export default Loader;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Loader/Loader" />
|
4
|
+
|
5
|
+
# Loader
|
6
|
+
|
7
|
+
The Loader component provides users information about the loading or computing processes that are occurring.
|
8
|
+
|
9
|
+
This component should be:
|
10
|
+
- Used to show an indeterminate state.
|
11
|
+
- Restricted to a single use per view to avoid unnecessary disruption.
|
12
|
+
|
13
|
+
It should not be used:
|
14
|
+
- When the wait time for a process is known.
|
15
|
+
- When trying to communicate progression in steps.
|
16
|
+
|
17
|
+
The Loader component is based on the [useProgressBar](https://react-spectrum.adobe.com/react-aria/useProgressBar.html) React Aria component.
|
18
|
+
|
19
|
+
### Required Components
|
20
|
+
|
21
|
+
This component can be used independently and does not require additional components.
|
22
|
+
|
23
|
+
### Accessibility
|
24
|
+
|
25
|
+
#### Screen readers
|
26
|
+
|
27
|
+
This component uses the following attributes to assist screen readers:
|
28
|
+
- The **`aria-label`** attribute is used to provide an accessible name.
|
29
|
+
- The **`aria-live`** attribute is used to announce content changes in a live region.
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Menu/Menu" />
|
4
|
+
|
5
|
+
# Menu
|
6
|
+
|
7
|
+
The Menu component is intended to be used as a wrapper for MenuItems. It is based on the [useMenu](https://react-spectrum.adobe.com/react-aria/useMenu.html)
|
8
|
+
React Aria component, and is often used in a [PopoverMenu](./?path=/story/components-popovermenu--default).
|
9
|
+
|
10
|
+
Menus should:
|
11
|
+
- Only contain the most relevant categories for a quick scan.
|
12
|
+
- Be used to view actions and not content.
|
13
|
+
|
14
|
+
Menus shouldn’t:
|
15
|
+
- Display more than 5 items to easily interpret the scope of actions.
|
16
|
+
- Include ellipses (…) in menu item names. An ellipsis indicates that the user action prompt opens a new window.
|
17
|
+
|
18
|
+
### Required Components
|
19
|
+
|
20
|
+
This component requires the Item component, which is exported within Astro, but originates 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 Menu](https://www.w3.org/WAI/tutorials/menus/) accessibility guidelines.
|
25
|
+
|
26
|
+
#### Keyboard Navigation
|
27
|
+
|
28
|
+
These keys provide additional functionality to the component.
|
29
|
+
|
30
|
+
| Key | Functions |
|
31
|
+
| ---- | ---- |
|
32
|
+
| Space or Enter | Selects the menu item. |
|
33
|
+
| Tab | Focuses the menu item and follows the page tab sequence. |
|
34
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
35
|
+
| Home(Fn + Right Arrow Key) Or Control/Command + Home| Shifts the focus to the first row. |
|
36
|
+
| End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last visible row. |
|
37
|
+
|
38
|
+
#### Screen Readers
|
39
|
+
|
40
|
+
This component uses the following attributes to assist screen readers:
|
41
|
+
- The **`aria-label`** attribute is used to provide an accessible name.
|
42
|
+
- Each menu option has the default **`aria-disabled`** value as “False.”
|
43
|
+
- The **`aria-orientation`** attribute indicates whether the menu is horizontally or vertically oriented, or undefined.
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Messages/Messages" />
|
4
|
+
|
5
|
+
# Messages
|
6
|
+
|
7
|
+
Use this component to display warning or alert messages, which often highlight an imminent problem or confirm a risky action.
|
8
|
+
|
9
|
+
These messages should:
|
10
|
+
- Capture the user’s attention at the right time.
|
11
|
+
- Clearly explain the reason for the warning or alert and the actions the user needs to take.
|
12
|
+
- Explain what will happen if they don’t act, using the appropriate sense of urgency.
|
13
|
+
- Be short. Limit the number of alerts to one per component.
|
14
|
+
|
15
|
+
See our [Warning and alert messages writing guidelines](https://pingidentity.atlassian.net/wiki/spaces/CCC/pages/21137295/Warning+and+alert+messages) for additional information.
|
16
|
+
|
17
|
+
### Required Components
|
18
|
+
|
19
|
+
This component requires the Item component, which is exported within Astro, but originates from [react-stately/collections](https://react-spectrum.adobe.com/react-stately/collections.html).
|
20
|
+
|
21
|
+
### Accessibility
|
22
|
+
|
23
|
+
#### Keyboard Navigation
|
24
|
+
|
25
|
+
These keys provide additional functionality to the component.
|
26
|
+
|
27
|
+
| Key | Functions |
|
28
|
+
| ---- | ---- |
|
29
|
+
| Tab | Focuses the IconButton within the message and follows the page tab sequence. |
|
30
|
+
| Space or Enter | Selects the button when it is focused. |
|
31
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
32
|
+
|
33
|
+
#### Screen Readers
|
34
|
+
|
35
|
+
The **`aria-live`** attribute is used to announce content changes in a live region.
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Modal/Modal" />
|
4
|
+
|
5
|
+
# Modal
|
6
|
+
|
7
|
+
Modals (also known as modal windows, overlays, and dialogs) are large UI elements that sit on top of an application's main window.
|
8
|
+
To return to the application's main interface, users must interact with the modal.
|
9
|
+
|
10
|
+
This component must be wrapped in an OverlayProvider and the first child component should be a trigger, such as a button.
|
11
|
+
|
12
|
+
If the modal is used to display an error message, it displays after users perform an action and require a response.
|
13
|
+
These messages should be short, meaningful, free of technical jargon, and follow status color guidelines.
|
14
|
+
They can also be used to educate users, but don’t try to explain complicated troubleshooting processes in error messages.
|
15
|
+
|
16
|
+
Error messages should clearly explain:
|
17
|
+
- What happened
|
18
|
+
- Why it happened, if that’s relevant
|
19
|
+
- The steps users should take to resolve the issue
|
20
|
+
|
21
|
+
See our [Error message writing guidelines](https://pingidentity.atlassian.net/wiki/spaces/CCC/pages/21137273/Error+messages) for additional information.
|
22
|
+
|
23
|
+
Modals should:
|
24
|
+
- Be used for important warnings and information requests as a way to prevent or correct critical errors.
|
25
|
+
- Be used to break down complex workflow to not overwhelm the user.
|
26
|
+
- Have all the critical information inside it to help users make decisions.
|
27
|
+
|
28
|
+
Modals should not:
|
29
|
+
- Be nested inside or replaced by another modal.
|
30
|
+
- Be overused as it disrupts the user’s workflow and requires a response.
|
31
|
+
- Have content that requires scrolling. If the content length is exceedingly large or requires complex forms, use the [OverlayPanel](./?path=/docs/components-overlaypanel--default) component.
|
32
|
+
- Be used for brief warnings and alerts, use the [Messages](./?path=/docs/components-messages--default) component instead.
|
33
|
+
|
34
|
+
### Required Components
|
35
|
+
|
36
|
+
This component requires the OverlayProvider and [Button](./?path=/docs/components-button--default) components.
|
37
|
+
|
38
|
+
### Accessibility
|
39
|
+
|
40
|
+
This component should adhere to the [WAI-ARIA Modal](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/dialog/) accessibility guidelines.
|
41
|
+
|
42
|
+
#### Keyboard Navigation
|
43
|
+
|
44
|
+
These keys provide additional functionality to the component.
|
45
|
+
|
46
|
+
| Key | Functions |
|
47
|
+
| ---- | ---- |
|
48
|
+
| Tab | The trigger component and the content in the modal are focusable using the Tab key. |
|
49
|
+
| | When a modal opens, focus moves to an element contained in the modal, which is usually the first focusable element. If the first focusable element does not make sense, tabindex=”-1” should be added to a static element at the top of the modal, which could be the panel title. |
|
50
|
+
| Space or Enter | Opens the modal when the trigger is focused. Once opened, the focus is locked inside the modal. |
|
51
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
52
|
+
| Esc | Pressing the escape key closes the modal and adds focus to the previously focused component. |
|
53
|
+
|
54
|
+
#### Screen Readers
|
55
|
+
|
56
|
+
This component uses the following attributes to assist screen readers:
|
57
|
+
- The button uses the **`aria-label`** attribute to provide an accessible name.
|
58
|
+
- The **`aria-labelledby`** attribute is supplied with label ID.
|
59
|
+
- The **`aria-modal`** attribute allows the assistive technologies to inform users that the ability to interact with or access other content on the page requires the modal dialog to be closed.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/MultivaluesField/MultivaluesField" />
|
4
|
+
|
5
|
+
# MultivaluesField
|
6
|
+
|
7
|
+
The MultivalueField component allows users to select more than one option from a list.
|
8
|
+
Using [useListState](https://react-spectrum.adobe.com/react-stately/useListState.html) from React Stately, it combines an input with a Listbox for a filterable dropdown list.
|
9
|
+
|
10
|
+
This component should:
|
11
|
+
- Be used when choosing multiple items from a list of options or filtering through items by typing.
|
12
|
+
- Allow you to add and remove custom items from the list.
|
13
|
+
|
14
|
+
It should not:
|
15
|
+
- Have fewer than 4 options. If it does, use a [CheckboxField](./?path=/docs/form-checkboxfield--default) instead.
|
16
|
+
- Be used when only 1 item can be selected.
|
17
|
+
- Have a long async loaded list, consider using useAsyncList like [ComboBoxField](./?path=/docs/form-comboboxfield--default) instead.
|
18
|
+
|
19
|
+
### Required components
|
20
|
+
|
21
|
+
This component requires the OverlayProvider and Item originating from [react-stately/collections](https://react-spectrum.adobe.com/react-stately/collections.html).
|
22
|
+
|
23
|
+
### Accessibility
|
24
|
+
|
25
|
+
#### Keyboard Navigation
|
26
|
+
|
27
|
+
These keys provide additional functionality to the component.
|
28
|
+
|
29
|
+
| Keys | Functions |
|
30
|
+
| ---- | --------- |
|
31
|
+
| Tab | Focuses the field and follows the page tab sequence. |
|
32
|
+
| Space or Enter | Opens or closes the menu when the input is focused. |
|
33
|
+
| Arrow keys | Moves through the list popover. |
|
34
|
+
| Shift + Tab | Moves focus to the previous focusable component.|
|
35
|
+
| | To allow multiple selections, the user making a selection does not close the menu. However, clicking outside of the listbox or pressing Tab with an open popover does. |
|
36
|
+
|
37
|
+
#### Screen readers
|
38
|
+
|
39
|
+
This component uses the following attributes to assist screen readers:
|
40
|
+
|
41
|
+
- The input uses the **`aria-expanded`** attribute to show the expansion and collapse of the popover, the **`aria-invalid`** attribute set to “True” when an incorrect value or status error occurs, and the **`aria-labelledby`** attribute is used to reference the label.
|
42
|
+
- The list box **`aria-multiselectable`** attribute is set to “True” by default.
|
43
|
+
- Each option uses the **`aria-selected`** attribute to indicate the state of selection, **`aria-posinset`** to give the option position in the current set of list items, and the **`aria-setsize`** attribute to define the current set of options.
|
44
|
+
- The **`aria-disabled`** attribute is set to “False” for each option by default.
|