@pingux/astro 2.9.1 → 2.13.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/lib/README.md +6 -2
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.mdx +40 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +2 -2
- package/lib/cjs/components/AccordionGroup/Accordion.styles.js +1 -2
- package/lib/cjs/components/AccordionGroup/AccordionGroup.js +4 -5
- package/lib/cjs/components/AccordionGroup/AccordionGroup.mdx +41 -0
- package/lib/cjs/components/ArrayField/ArrayField.mdx +34 -0
- package/lib/cjs/components/AstroWrapper/AstroWrapper.mdx +16 -0
- package/lib/cjs/components/Avatar/Avatar.mdx +14 -0
- package/lib/cjs/components/Badge/Badge.mdx +24 -0
- package/lib/cjs/components/Box/Box.d.ts +4 -0
- package/lib/cjs/components/Box/Box.js +4 -19
- package/lib/cjs/components/Box/Box.mdx +23 -0
- package/lib/cjs/components/Box/Box.styles.d.ts +6 -0
- package/lib/cjs/components/Box/Box.test.d.ts +1 -0
- package/lib/cjs/components/Box/Box.test.js +2 -6
- package/lib/cjs/components/Box/index.d.ts +1 -0
- package/lib/cjs/components/Bracket/Bracket.mdx +17 -0
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.mdx +40 -0
- package/lib/cjs/components/Button/Button.mdx +40 -0
- package/lib/cjs/components/Button/Button.stories.js +30 -5
- package/lib/cjs/components/Button/Buttons.styles.js +25 -7
- package/lib/cjs/components/Calendar/Calendar.mdx +39 -0
- package/lib/cjs/components/Calendar/Calendar.test.js +2 -2
- package/lib/cjs/components/Calendar/CalendarCell.js +2 -3
- package/lib/cjs/components/Calendar/CalendarGrid.js +1 -3
- package/lib/cjs/components/Callout/Callout.mdx +28 -0
- package/lib/cjs/components/Card/Card.mdx +32 -0
- package/lib/cjs/components/Checkbox/Checkbox.js +1 -2
- package/lib/cjs/components/Checkbox/CheckboxBase.js +1 -2
- package/lib/cjs/components/CheckboxField/CheckboxField.mdx +42 -0
- package/lib/cjs/components/CodeView/CodeView.mdx +23 -0
- package/lib/cjs/components/CodeView/CodeView.test.js +1 -1
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.mdx +29 -0
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelBadge.js +0 -1
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +2 -3
- package/lib/cjs/components/ColorField/ColorField.mdx +38 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.mdx +66 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +1 -1
- package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +2 -2
- package/lib/cjs/components/CopyText/CopyText.mdx +23 -0
- package/lib/cjs/components/CopyText/CopyText.test.js +1 -1
- package/lib/cjs/components/DataTable/DataTable.mdx +54 -0
- package/lib/cjs/components/DataTable/DataTable.stories.js +1 -1
- package/lib/cjs/components/DataTable/DataTable.test.js +2 -2
- package/lib/cjs/components/DataTable/DataTableVirtualizer.js +2 -3
- package/lib/cjs/components/DatePicker/DateField.js +4 -5
- package/lib/cjs/components/DatePicker/DatePicker.js +4 -6
- package/lib/cjs/components/DatePicker/DatePicker.mdx +49 -0
- package/lib/cjs/components/DatePicker/DatePicker.test.js +2 -2
- package/lib/cjs/components/DatePicker/DateSegment.js +1 -2
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +3 -3
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +36 -0
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +29 -45
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +1 -1
- package/lib/cjs/components/FieldHelperText/FieldHelperText.js +4 -4
- package/lib/cjs/components/FileInputField/FileInputField.mdx +33 -0
- package/lib/cjs/components/HelpHint/HelpHint.js +145 -27
- package/lib/cjs/components/HelpHint/HelpHint.mdx +32 -0
- package/lib/cjs/components/HelpHint/HelpHint.stories.js +40 -7
- package/lib/cjs/components/HelpHint/HelpHint.styles.js +9 -1
- package/lib/cjs/components/HelpHint/HelpHint.test.js +213 -30
- package/lib/cjs/components/Icon/Icon.d.ts +4 -0
- package/lib/cjs/components/Icon/Icon.js +4 -27
- package/lib/cjs/components/Icon/Icon.mdx +49 -0
- package/lib/cjs/components/Icon/Icon.stories.d.ts +8 -0
- package/lib/cjs/components/Icon/Icon.test.d.ts +1 -0
- package/lib/cjs/components/Icon/index.d.ts +1 -0
- package/lib/cjs/components/IconBadge/IconBadge.mdx +14 -0
- package/lib/cjs/components/IconButton/IconButton.mdx +33 -0
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.mdx +31 -0
- package/lib/cjs/components/Image/Image.mdx +28 -0
- package/lib/cjs/components/ImageUploadField/ImageUploadField.mdx +38 -0
- package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +1 -1
- package/lib/cjs/components/ImageUploadField/ImageUploadField.test.js +2 -2
- package/lib/cjs/components/Input/Input.js +2 -3
- package/lib/cjs/components/Label/Label.styles.js +1 -1
- package/lib/cjs/components/Link/Link.mdx +27 -0
- package/lib/cjs/components/Link/Link.styles.js +10 -0
- package/lib/cjs/components/LinkSelectField/LinkSelectField.mdx +47 -0
- package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +1 -1
- package/lib/cjs/components/LinkSelectField/LinkSelectField.test.js +2 -2
- package/lib/cjs/components/ListBox/ListBox.test.js +2 -2
- package/lib/cjs/components/ListItem/ListItem.mdx +21 -0
- package/lib/cjs/components/ListView/ListView.mdx +44 -0
- package/lib/cjs/components/ListView/ListView.stories.js +95 -49
- package/lib/cjs/components/ListView/ListView.test.js +2 -2
- package/lib/cjs/components/Loader/Loader.d.ts +4 -0
- package/lib/cjs/components/Loader/Loader.js +0 -14
- package/lib/cjs/components/Loader/Loader.mdx +29 -0
- package/lib/cjs/components/Loader/Loader.styles.d.ts +53 -0
- package/lib/cjs/components/Loader/Loader.test.d.ts +1 -0
- package/lib/cjs/components/Loader/index.d.ts +1 -0
- package/lib/cjs/components/Menu/Menu.mdx +43 -0
- package/lib/cjs/components/MenuItem/MenuItem.js +2 -3
- package/lib/cjs/components/Messages/Messages.mdx +35 -0
- package/lib/cjs/components/Modal/Modal.mdx +59 -0
- package/lib/cjs/components/Modal/tests/Modal.integration.test.js +1 -2
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +43 -9
- package/lib/cjs/components/MultivaluesField/MultivaluesField.mdx +44 -0
- package/lib/cjs/components/MultivaluesField/MultivaluesField.test.js +3 -3
- package/lib/cjs/components/NavBar/NavBar.mdx +42 -0
- package/lib/cjs/components/NavBarSection/NavBarSection.js +2 -3
- package/lib/cjs/components/NumberField/NumberField.mdx +39 -0
- package/lib/cjs/components/OverlayPanel/OverlayPanel.mdx +39 -0
- package/lib/cjs/components/PasswordField/PasswordField.mdx +33 -0
- package/lib/cjs/components/PasswordField/PasswordField.test.js +2 -3
- package/lib/cjs/components/PopoverContainer/PopoverContainer.d.ts +9 -0
- package/lib/cjs/components/PopoverContainer/PopoverContainer.js +10 -42
- package/lib/cjs/components/PopoverContainer/index.d.ts +2 -0
- package/lib/cjs/components/PopoverMenu/PopoverMenu.mdx +53 -0
- package/lib/cjs/components/Radio/Radio.js +1 -2
- package/lib/cjs/components/RadioGroupField/RadioGroupField.mdx +41 -0
- package/lib/cjs/components/RadioGroupField/RadioGroupField.test.js +2 -2
- package/lib/cjs/components/RequirementsList/RequirementsList.mdx +17 -0
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.mdx +36 -0
- package/lib/cjs/components/ScrollBox/ScrollBox.mdx +17 -0
- package/lib/cjs/components/SearchField/SearchField.mdx +33 -0
- package/lib/cjs/components/SelectField/Select.styles.js +1 -1
- package/lib/cjs/components/SelectField/SelectField.mdx +46 -0
- package/lib/cjs/components/SelectField/SelectField.stories.js +1 -1
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +4 -4
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.test.js +2 -2
- package/lib/cjs/components/Separator/Separator.mdx +19 -0
- package/lib/cjs/components/Stepper/Stepper.mdx +41 -0
- package/lib/cjs/components/Stepper/Stepper.styles.js +1 -1
- package/lib/cjs/components/Stepper/Stepper.test.js +2 -3
- package/lib/cjs/components/Switch/Switch.js +1 -2
- package/lib/cjs/components/SwitchField/SwitchField.js +1 -0
- package/lib/cjs/components/SwitchField/SwitchField.mdx +36 -0
- package/lib/cjs/components/Tab/Tab.js +2 -3
- package/lib/cjs/components/TabPicker/TabPicker.js +1 -1
- package/lib/cjs/components/Table/Table.mdx +30 -0
- package/lib/cjs/components/TableBody/TableBody.js +0 -1
- package/lib/cjs/components/TableCaption/TableCaption.js +0 -1
- package/lib/cjs/components/TableCell/TableCell.d.ts +12 -0
- package/lib/cjs/components/TableCell/TableCell.js +0 -6
- package/lib/cjs/components/TableCell/TableCell.test.d.ts +1 -0
- package/lib/cjs/components/TableCell/index.d.ts +1 -0
- package/lib/cjs/components/TableHead/TableHead.js +0 -1
- package/lib/cjs/components/TableRow/TableRow.js +0 -1
- package/lib/cjs/components/Tabs/Tabs.mdx +40 -0
- package/lib/cjs/components/Tabs/Tabs.test.js +3 -4
- package/lib/cjs/components/Text/Text.d.ts +4 -0
- package/lib/cjs/components/Text/Text.js +3 -7
- package/lib/cjs/components/Text/Text.mdx +13 -0
- package/lib/cjs/components/Text/Text.stories.d.ts +6 -0
- package/lib/cjs/components/Text/Text.styles.d.ts +286 -0
- package/lib/cjs/components/Text/Text.test.d.ts +1 -0
- package/lib/cjs/components/Text/index.d.ts +1 -0
- package/lib/cjs/components/TextArea/TextArea.js +1 -3
- package/lib/cjs/components/TextAreaField/TextAreaField.mdx +34 -0
- package/lib/cjs/components/TextField/TextField.js +1 -1
- package/lib/cjs/components/TextField/TextField.mdx +34 -0
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.mdx +18 -0
- package/lib/cjs/components/TooltipTrigger/Tooltip.styles.js +2 -1
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +2 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.mdx +23 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.test.js +47 -1
- package/lib/cjs/docs/Props.stories.mdx +35 -0
- package/lib/cjs/docs/Welcome.stories.mdx +149 -0
- package/lib/cjs/docs/hooks/useDebounce.stories.mdx +59 -0
- package/lib/cjs/docs/hooks/useModalState.stories.mdx +83 -0
- package/lib/cjs/docs/hooks/useOverlayPanelState.stories.mdx +84 -0
- package/lib/cjs/docs/theme/AstroNanoTheme.stories.mdx +174 -0
- package/lib/cjs/docs/theme/AstroTheme.stories.mdx +20 -0
- package/lib/cjs/docs/theme/CustomThemes.stories.mdx +70 -0
- package/lib/cjs/docs/theme/StylingGuideline.stories.mdx +116 -0
- package/lib/cjs/docs/utils/messagesReducer.stories.mdx +64 -0
- package/lib/cjs/experimental/EditButton/EditButton.js +63 -0
- package/lib/cjs/experimental/EditButton/EditButton.mdx +9 -0
- package/lib/cjs/experimental/EditButton/EditButton.stories.js +91 -0
- package/lib/cjs/experimental/EditButton/EditButton.test.js +71 -0
- package/lib/cjs/experimental/EditButton/index.js +14 -0
- package/lib/cjs/experimental/ListView/ListView.mdx +47 -0
- package/lib/cjs/experimental/ListView/ListView.stories.js +742 -0
- package/lib/cjs/experimental/ListViewItem/ListViewItem.js +23 -5
- package/lib/cjs/experimental/ListViewItem/ListViewItem.mdx +36 -0
- package/lib/cjs/experimental/ListViewItem/ListViewItem.stories.js +31 -7
- package/lib/cjs/experimental/ListViewItem/ListViewItem.test.js +51 -7
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemEditButton.js +2 -7
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemEditButton.stories.js +4 -1
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemMenu.js +0 -1
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemMenu.test.js +2 -2
- package/lib/cjs/experimental/ListViewItem/controls/ListViewItemSwitchField.js +2 -3
- package/lib/cjs/experimental/ListViewItem/listViewItemAttributes.js +28 -13
- package/lib/cjs/experimental/PanelHeader/PanelHeader.js +88 -0
- package/lib/cjs/experimental/PanelHeader/PanelHeader.mdx +19 -0
- package/lib/cjs/experimental/PanelHeader/PanelHeader.stories.js +71 -0
- package/lib/cjs/experimental/PanelHeader/PanelHeader.styles.js +38 -0
- package/lib/cjs/experimental/PanelHeader/PanelHeader.test.js +46 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderCloseButton.js +32 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderCloseButton.stories.js +31 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderCloseButton.test.js +25 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderMenu.js +25 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderMenu.stories.js +36 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderMenu.test.js +58 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderSwitchField.js +25 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderSwitchField.stories.js +41 -0
- package/lib/cjs/experimental/PanelHeader/controls/PanelHeaderSwitchField.test.js +25 -0
- package/lib/cjs/experimental/PanelHeader/index.js +14 -0
- package/lib/cjs/experimental/README.stories.mdx +7 -0
- package/lib/cjs/experimental/SaveBar/SaveBar.mdx +13 -0
- package/lib/cjs/experimental/recipes/ListAndPanel.stories.js +1 -1
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.test.js +2 -2
- package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
- package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.test.js +1 -1
- package/lib/cjs/hooks/useOverlappingMenuHoverState/useOverlappingMenuHoverState.test.js +2 -2
- package/lib/cjs/hooks/usePropWarning/usePropWarning.js +1 -1
- package/lib/cjs/hooks/useStatusClasses/useStatusClasses.js +2 -2
- package/lib/cjs/hooks/useTShirtSize/useTShirtSize.js +1 -1
- package/lib/cjs/index.d.ts +173 -0
- package/lib/cjs/index.js +53 -1
- package/lib/cjs/recipes/ApplicationSearchDropdown.stories.hidden.js +1 -1
- package/lib/cjs/recipes/{AttributesAndPingOneMapping.stories.js → AttributeMapping.stories.js} +392 -132
- package/lib/cjs/recipes/Slider.stories.js +1 -1
- package/lib/cjs/styles/colors.js +1 -1
- package/lib/cjs/styles/forms/index.js +1 -1
- package/lib/cjs/styles/variants/README.md +98 -0
- package/lib/cjs/styles/variants/variants.js +2 -0
- package/lib/cjs/types/box.d.ts +10 -0
- package/lib/cjs/types/box.js +6 -0
- package/lib/cjs/types/icon.d.ts +34 -0
- package/lib/cjs/types/icon.js +6 -0
- package/lib/cjs/types/index.d.ts +7 -0
- package/lib/cjs/types/index.js +86 -0
- package/lib/cjs/types/loader.d.ts +14 -0
- package/lib/cjs/types/loader.js +6 -0
- package/lib/cjs/types/mdx.d.js +1 -0
- package/lib/cjs/types/popoverContainer.d.ts +23 -0
- package/lib/cjs/types/popoverContainer.js +6 -0
- package/lib/cjs/types/shared/dom.d.ts +9 -0
- package/lib/cjs/types/shared/dom.js +6 -0
- package/lib/cjs/types/shared/index.d.ts +3 -0
- package/lib/cjs/types/shared/index.js +42 -0
- package/lib/cjs/types/shared/style.d.ts +11 -0
- package/lib/cjs/types/shared/style.js +6 -0
- package/lib/cjs/types/shared/test.d.ts +3 -0
- package/lib/cjs/types/shared/test.js +6 -0
- package/lib/cjs/types/shared/utils.d.ts +1 -0
- package/lib/cjs/types/shared/utils.js +6 -0
- package/lib/cjs/types/tableCell.d.ts +5 -0
- package/lib/cjs/types/tableCell.js +6 -0
- package/lib/cjs/types/text.d.ts +3 -0
- package/lib/cjs/types/text.js +6 -0
- package/lib/cjs/utils/designUtils/figmaLinks.js +2 -1
- package/lib/cjs/utils/devUtils/constants/variants.js +1 -2
- package/lib/cjs/utils/testUtils/testAxe.js +2 -2
- package/lib/cjs/utils/testUtils/testWrapper.js +2 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.mdx +40 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +2 -2
- package/lib/components/AccordionGroup/Accordion.styles.js +1 -2
- package/lib/components/AccordionGroup/AccordionGroup.mdx +41 -0
- package/lib/components/ArrayField/ArrayField.mdx +34 -0
- package/lib/components/AstroWrapper/AstroWrapper.mdx +16 -0
- package/lib/components/Avatar/Avatar.mdx +14 -0
- package/lib/components/Badge/Badge.mdx +24 -0
- package/lib/components/Box/Box.js +4 -19
- package/lib/components/Box/Box.mdx +23 -0
- package/lib/components/Box/Box.test.js +2 -6
- package/lib/components/Bracket/Bracket.mdx +17 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.mdx +40 -0
- package/lib/components/Button/Button.mdx +40 -0
- package/lib/components/Button/Button.stories.js +30 -5
- package/lib/components/Button/Buttons.styles.js +25 -7
- package/lib/components/Calendar/Calendar.mdx +39 -0
- package/lib/components/Calendar/Calendar.test.js +2 -2
- package/lib/components/Callout/Callout.mdx +28 -0
- package/lib/components/Card/Card.mdx +32 -0
- package/lib/components/CheckboxField/CheckboxField.mdx +42 -0
- package/lib/components/CodeView/CodeView.mdx +23 -0
- package/lib/components/CodeView/CodeView.test.js +1 -1
- package/lib/components/CollapsiblePanel/CollapsiblePanel.mdx +29 -0
- package/lib/components/ColorField/ColorField.mdx +38 -0
- package/lib/components/ComboBoxField/ComboBoxField.mdx +66 -0
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +1 -1
- package/lib/components/ComboBoxField/ComboBoxField.test.js +2 -2
- package/lib/components/CopyText/CopyText.mdx +23 -0
- package/lib/components/CopyText/CopyText.test.js +1 -1
- package/lib/components/DataTable/DataTable.mdx +54 -0
- package/lib/components/DataTable/DataTable.stories.js +1 -1
- package/lib/components/DataTable/DataTable.test.js +1 -1
- package/lib/components/DatePicker/DatePicker.mdx +49 -0
- package/lib/components/DatePicker/DatePicker.test.js +2 -2
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +3 -3
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +36 -0
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +29 -45
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +1 -1
- package/lib/components/FileInputField/FileInputField.mdx +33 -0
- package/lib/components/HelpHint/HelpHint.js +148 -30
- package/lib/components/HelpHint/HelpHint.mdx +32 -0
- package/lib/components/HelpHint/HelpHint.stories.js +37 -6
- package/lib/components/HelpHint/HelpHint.styles.js +9 -1
- package/lib/components/HelpHint/HelpHint.test.js +213 -30
- package/lib/components/Icon/Icon.js +2 -25
- package/lib/components/Icon/Icon.mdx +49 -0
- package/lib/components/IconBadge/IconBadge.mdx +14 -0
- package/lib/components/IconButton/IconButton.mdx +33 -0
- package/lib/components/IconButtonToggle/IconButtonToggle.mdx +31 -0
- package/lib/components/Image/Image.mdx +28 -0
- package/lib/components/ImageUploadField/ImageUploadField.mdx +38 -0
- package/lib/components/ImageUploadField/ImageUploadField.stories.js +1 -1
- package/lib/components/ImageUploadField/ImageUploadField.test.js +2 -2
- package/lib/components/Link/Link.mdx +27 -0
- package/lib/components/Link/Link.styles.js +10 -0
- package/lib/components/LinkSelectField/LinkSelectField.mdx +47 -0
- package/lib/components/LinkSelectField/LinkSelectField.stories.js +1 -1
- package/lib/components/LinkSelectField/LinkSelectField.test.js +2 -2
- package/lib/components/ListBox/ListBox.test.js +2 -2
- package/lib/components/ListItem/ListItem.mdx +21 -0
- package/lib/components/ListView/ListView.mdx +44 -0
- package/lib/components/ListView/ListView.stories.js +96 -50
- package/lib/components/ListView/ListView.test.js +2 -2
- package/lib/components/Loader/Loader.js +0 -14
- package/lib/components/Loader/Loader.mdx +29 -0
- package/lib/components/Menu/Menu.mdx +43 -0
- package/lib/components/Messages/Messages.mdx +35 -0
- package/lib/components/Modal/Modal.mdx +59 -0
- package/lib/components/MultivaluesField/MultivaluesField.js +43 -9
- package/lib/components/MultivaluesField/MultivaluesField.mdx +44 -0
- package/lib/components/MultivaluesField/MultivaluesField.test.js +3 -3
- package/lib/components/NavBar/NavBar.mdx +42 -0
- package/lib/components/NumberField/NumberField.mdx +39 -0
- package/lib/components/OverlayPanel/OverlayPanel.mdx +39 -0
- package/lib/components/PasswordField/PasswordField.mdx +33 -0
- package/lib/components/PasswordField/PasswordField.test.js +2 -2
- package/lib/components/PopoverContainer/PopoverContainer.js +7 -38
- package/lib/components/PopoverMenu/PopoverMenu.mdx +53 -0
- package/lib/components/RadioGroupField/RadioGroupField.mdx +41 -0
- package/lib/components/RadioGroupField/RadioGroupField.test.js +2 -2
- package/lib/components/RequirementsList/RequirementsList.mdx +17 -0
- package/lib/components/RockerButtonGroup/RockerButtonGroup.mdx +36 -0
- package/lib/components/ScrollBox/ScrollBox.mdx +17 -0
- package/lib/components/SearchField/SearchField.mdx +33 -0
- package/lib/components/SelectField/SelectField.mdx +46 -0
- package/lib/components/SelectField/SelectField.stories.js +1 -1
- package/lib/components/SelectFieldBase/SelectFieldBase.test.js +2 -2
- package/lib/components/Separator/Separator.mdx +19 -0
- package/lib/components/Stepper/Stepper.mdx +41 -0
- package/lib/components/Stepper/Stepper.test.js +2 -2
- package/lib/components/SwitchField/SwitchField.mdx +36 -0
- package/lib/components/Table/Table.mdx +30 -0
- package/lib/components/TableCell/TableCell.js +0 -5
- package/lib/components/Tabs/Tabs.mdx +40 -0
- package/lib/components/Tabs/Tabs.test.js +2 -2
- package/lib/components/Text/Text.js +3 -7
- package/lib/components/Text/Text.mdx +13 -0
- package/lib/components/TextAreaField/TextAreaField.mdx +34 -0
- package/lib/components/TextField/TextField.js +1 -1
- package/lib/components/TextField/TextField.mdx +34 -0
- package/lib/components/TimeZonePicker/TimeZonePicker.mdx +18 -0
- package/lib/components/TooltipTrigger/Tooltip.styles.js +1 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.js +2 -0
- package/lib/components/TooltipTrigger/TooltipTrigger.mdx +23 -0
- package/lib/components/TooltipTrigger/TooltipTrigger.test.js +48 -2
- package/lib/docs/Props.stories.mdx +35 -0
- package/lib/docs/Welcome.stories.mdx +149 -0
- package/lib/docs/hooks/useDebounce.stories.mdx +59 -0
- package/lib/docs/hooks/useModalState.stories.mdx +83 -0
- package/lib/docs/hooks/useOverlayPanelState.stories.mdx +84 -0
- package/lib/docs/theme/AstroNanoTheme.stories.mdx +174 -0
- package/lib/docs/theme/AstroTheme.stories.mdx +20 -0
- package/lib/docs/theme/CustomThemes.stories.mdx +70 -0
- package/lib/docs/theme/StylingGuideline.stories.mdx +116 -0
- package/lib/docs/utils/messagesReducer.stories.mdx +64 -0
- package/lib/experimental/EditButton/EditButton.js +50 -0
- package/lib/experimental/EditButton/EditButton.mdx +9 -0
- package/lib/experimental/EditButton/EditButton.stories.js +75 -0
- package/lib/experimental/EditButton/EditButton.test.js +68 -0
- package/lib/experimental/EditButton/index.js +1 -0
- package/lib/experimental/ListView/ListView.mdx +47 -0
- package/lib/experimental/ListView/ListView.stories.js +729 -0
- package/lib/experimental/ListViewItem/ListViewItem.js +24 -6
- package/lib/experimental/ListViewItem/ListViewItem.mdx +36 -0
- package/lib/experimental/ListViewItem/ListViewItem.stories.js +28 -5
- package/lib/experimental/ListViewItem/ListViewItem.test.js +45 -1
- package/lib/experimental/ListViewItem/controls/ListViewItemEditButton.js +1 -4
- package/lib/experimental/ListViewItem/controls/ListViewItemEditButton.stories.js +4 -1
- package/lib/experimental/ListViewItem/controls/ListViewItemMenu.test.js +2 -2
- package/lib/experimental/ListViewItem/controls/ListViewItemSwitchField.js +1 -0
- package/lib/experimental/ListViewItem/listViewItemAttributes.js +25 -12
- package/lib/experimental/PanelHeader/PanelHeader.js +75 -0
- package/lib/experimental/PanelHeader/PanelHeader.mdx +19 -0
- package/lib/experimental/PanelHeader/PanelHeader.stories.js +59 -0
- package/lib/experimental/PanelHeader/PanelHeader.styles.js +30 -0
- package/lib/experimental/PanelHeader/PanelHeader.test.js +43 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderCloseButton.js +25 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderCloseButton.stories.js +21 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderCloseButton.test.js +22 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderMenu.js +18 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderMenu.stories.js +26 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderMenu.test.js +55 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderSwitchField.js +18 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderSwitchField.stories.js +32 -0
- package/lib/experimental/PanelHeader/controls/PanelHeaderSwitchField.test.js +22 -0
- package/lib/experimental/PanelHeader/index.js +1 -0
- package/lib/experimental/README.stories.mdx +7 -0
- package/lib/experimental/SaveBar/SaveBar.mdx +13 -0
- package/lib/experimental/recipes/ListAndPanel.stories.js +1 -1
- package/lib/hooks/useComponentToggle/useComponentToggle.test.js +2 -2
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.test.js +1 -1
- package/lib/hooks/useOverlappingMenuHoverState/useOverlappingMenuHoverState.test.js +2 -2
- package/lib/hooks/usePropWarning/usePropWarning.js +1 -1
- package/lib/hooks/useStatusClasses/useStatusClasses.js +2 -2
- package/lib/hooks/useTShirtSize/useTShirtSize.js +1 -1
- package/lib/index.js +6 -0
- package/lib/recipes/AttributeMapping.stories.js +540 -0
- package/lib/styles/colors.js +1 -1
- package/lib/styles/variants/README.md +98 -0
- package/lib/styles/variants/variants.js +2 -0
- package/lib/types/box.js +1 -0
- package/lib/types/icon.js +1 -0
- package/lib/types/index.js +7 -0
- package/lib/types/loader.js +1 -0
- package/lib/types/mdx.d.js +0 -0
- package/lib/types/popoverContainer.js +1 -0
- package/lib/types/shared/dom.js +1 -0
- package/lib/types/shared/index.js +3 -0
- package/lib/types/shared/style.js +1 -0
- package/lib/types/shared/test.js +1 -0
- package/lib/types/shared/utils.js +1 -0
- package/lib/types/tableCell.js +1 -0
- package/lib/types/text.js +1 -0
- package/lib/utils/designUtils/figmaLinks.js +2 -1
- package/lib/utils/testUtils/testAxe.js +2 -2
- package/package.json +24 -10
- 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,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.
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
2
1
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
2
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
3
3
|
import _Object$create from "@babel/runtime-corejs3/core-js-stable/object/create";
|
4
4
|
import _Object$getPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/get-prototype-of";
|
5
5
|
import _Object$setPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/set-prototype-of";
|
@@ -10,7 +10,7 @@ import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
|
|
10
10
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
|
11
11
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
12
12
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
13
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context2; _forEachInstanceProperty(_context2 = ["next", "throw", "return"]).call(_context2, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context3; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context3 = this.tryEntries).call(_context3, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
13
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = _Object$defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context2; _forEachInstanceProperty(_context2 = ["next", "throw", "return"]).call(_context2, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context3; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context3 = this.tryEntries).call(_context3, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
14
14
|
import React from 'react';
|
15
15
|
import userEvent from '@testing-library/user-event';
|
16
16
|
import ORIENTATION from '../../utils/devUtils/constants/orientation';
|
@@ -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.
|
@@ -18,7 +18,7 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
18
18
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
19
19
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
20
20
|
var _context, _context2;
|
21
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context6; _forEachInstanceProperty(_context6 = ["next", "throw", "return"]).call(_context6, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context7; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context7 = this.tryEntries).call(_context7, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
21
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = _Object$defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context6; _forEachInstanceProperty(_context6 = ["next", "throw", "return"]).call(_context6, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context7; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context7 = this.tryEntries).call(_context7, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
22
22
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
23
23
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
24
24
|
import _fillInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/fill";
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
2
1
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
2
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
3
3
|
import _Object$create from "@babel/runtime-corejs3/core-js-stable/object/create";
|
4
4
|
import _Object$getPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/get-prototype-of";
|
5
5
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
@@ -12,7 +12,7 @@ import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerat
|
|
12
12
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
13
13
|
import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/esm/objectDestructuringEmpty";
|
14
14
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
15
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context2; _forEachInstanceProperty(_context2 = ["next", "throw", "return"]).call(_context2, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context3; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context3 = this.tryEntries).call(_context3, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
15
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = _Object$defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context2; _forEachInstanceProperty(_context2 = ["next", "throw", "return"]).call(_context2, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context3; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context3 = this.tryEntries).call(_context3, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
16
16
|
import React, { forwardRef } from 'react';
|
17
17
|
import userEvent from '@testing-library/user-event';
|
18
18
|
import { axe } from 'jest-axe';
|
@@ -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.
|
@@ -2,12 +2,12 @@ import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
|
3
3
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
4
4
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
5
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context2; _forEachInstanceProperty(_context2 = ["next", "throw", "return"]).call(_context2, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context3; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context3 = this.tryEntries).call(_context3, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
5
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = _Object$defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context2; _forEachInstanceProperty(_context2 = ["next", "throw", "return"]).call(_context2, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context3; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context3 = this.tryEntries).call(_context3, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
6
6
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
7
7
|
import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
8
8
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
9
|
-
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
10
9
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
10
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
11
11
|
import _Object$create from "@babel/runtime-corejs3/core-js-stable/object/create";
|
12
12
|
import _Object$getPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/get-prototype-of";
|
13
13
|
import _Object$setPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/set-prototype-of";
|
@@ -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.
|