@pingux/astro 2.9.2 → 2.13.0-alpha.11
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} +405 -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 +7 -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 +553 -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 +7 -1
- package/lib/utils/testUtils/testAxe.js +2 -2
- package/package.json +23 -9
- package/CHANGELOG.md +0 -2565
- package/NOTICE +0 -2481
- package/NOTICE.html +0 -9174
- package/lib/cjs/recipes/AttributeMappingReadOnlyField.stories.js +0 -254
- package/lib/recipes/AttributeMappingReadOnlyField.stories.js +0 -243
- package/lib/recipes/AttributesAndPingOneMapping.stories.js +0 -282
@@ -19,10 +19,10 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
19
19
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
20
20
|
var base = _objectSpread({
|
21
21
|
cursor: 'pointer',
|
22
|
-
height:
|
23
|
-
lineHeight: '
|
22
|
+
height: '37px',
|
23
|
+
lineHeight: '115%',
|
24
24
|
minWidth: 'min-content',
|
25
|
-
|
25
|
+
padding: '10px 15px',
|
26
26
|
outline: 'none',
|
27
27
|
display: 'inline-flex',
|
28
28
|
alignItems: 'center',
|
@@ -83,6 +83,15 @@ var primary = _objectSpread(_objectSpread({}, base), {}, {
|
|
83
83
|
},
|
84
84
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
85
85
|
});
|
86
|
+
var withIcon = _objectSpread(_objectSpread({}, base), {}, {
|
87
|
+
padding: '8.5px 15px 8.5px 10px',
|
88
|
+
bg: 'white',
|
89
|
+
border: '1px solid',
|
90
|
+
borderColor: 'active',
|
91
|
+
'&.is-hovered': _objectSpread({}, defaultHover),
|
92
|
+
'&.is-pressed': _objectSpread({}, defaultActive),
|
93
|
+
'&.is-focused': _objectSpread({}, defaultFocus)
|
94
|
+
});
|
86
95
|
var success = _objectSpread(_objectSpread({}, base), {}, {
|
87
96
|
display: 'inline-flex',
|
88
97
|
bg: 'success.bright',
|
@@ -110,7 +119,7 @@ var critical = _objectSpread(_objectSpread({}, base), {}, {
|
|
110
119
|
var inline = _objectSpread(_objectSpread({}, base), {}, {
|
111
120
|
display: 'inline-flex',
|
112
121
|
bg: 'white',
|
113
|
-
height: '
|
122
|
+
height: '21px',
|
114
123
|
lineHeight: 1,
|
115
124
|
fontSize: 'sm',
|
116
125
|
borderRadius: '15px',
|
@@ -134,6 +143,12 @@ var inlinePrimary = _objectSpread(_objectSpread(_objectSpread({}, inline), defau
|
|
134
143
|
borderColor: 'accent.20'
|
135
144
|
})
|
136
145
|
});
|
146
|
+
var inlineWithIcon = _objectSpread(_objectSpread({}, inline), {}, {
|
147
|
+
padding: '3px 15px 3px 10px'
|
148
|
+
});
|
149
|
+
var inlinePrimaryWithIcon = _objectSpread(_objectSpread({}, inlinePrimary), {}, {
|
150
|
+
padding: '3px 15px 3px 10px'
|
151
|
+
});
|
137
152
|
var text = _objectSpread(_objectSpread({}, base), {}, {
|
138
153
|
display: 'inline-flex',
|
139
154
|
bg: 'transparent',
|
@@ -190,8 +205,8 @@ var colorBlock = {
|
|
190
205
|
outline: 'none',
|
191
206
|
cursor: 'pointer',
|
192
207
|
width: 150,
|
193
|
-
|
194
|
-
p: '5px 15px',
|
208
|
+
height: '40px',
|
209
|
+
p: '5px 10px 5px 15px',
|
195
210
|
display: 'flex',
|
196
211
|
justifyContent: 'space-between',
|
197
212
|
alignItems: 'center',
|
@@ -265,6 +280,9 @@ var _default = {
|
|
265
280
|
primary: primary,
|
266
281
|
quiet: quiet,
|
267
282
|
success: success,
|
268
|
-
colorBlock: colorBlock
|
283
|
+
colorBlock: colorBlock,
|
284
|
+
withIcon: withIcon,
|
285
|
+
inlineWithIcon: inlineWithIcon,
|
286
|
+
inlinePrimaryWithIcon: inlinePrimaryWithIcon
|
269
287
|
};
|
270
288
|
exports["default"] = _default;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Calendar/Calendar" />
|
4
|
+
|
5
|
+
# Calendar
|
6
|
+
|
7
|
+
The calendar component displays months in a grid-like view and gives users the ability to quickly go through months and years to select a specific date.
|
8
|
+
|
9
|
+
This component is built on [useCalendar](https://react-spectrum.adobe.com/react-aria/useCalendar.html#usecalendar-1), [useCalendarGrid](https://react-spectrum.adobe.com/react-aria/useCalendar.html#usecalendargrid), and
|
10
|
+
[useCalendarCell](https://react-spectrum.adobe.com/react-aria/useCalendar.html#usecalendarcell) from React Aria, and [useCalendarState](https://react-spectrum.adobe.com/react-stately/useCalendarState.html) from React Stately.
|
11
|
+
|
12
|
+
### Required components
|
13
|
+
|
14
|
+
This component can be used independently and does not require additional components.
|
15
|
+
|
16
|
+
### Accessibility
|
17
|
+
|
18
|
+
#### Keyboard Navigation
|
19
|
+
|
20
|
+
These keys provide additional functionality to the component.
|
21
|
+
|
22
|
+
| Keys | Functions |
|
23
|
+
| ---- | --------- |
|
24
|
+
| Space or Enter | Selects the date when a date is focused, and navigates to the calendar pages when the navigational buttons are focused. |
|
25
|
+
| Tab | Components in the calendar are focusable and follow the page tab sequence. |
|
26
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
27
|
+
| Pressing Home:(Fn + Right Arrow Key) Or Control or Command + Home | Shifts the focus to the first calendar date. |
|
28
|
+
| Pressing Home:(Fn + left Arrow Key) Or Control or Command + End | Shifts the focus to the last calendar date. |
|
29
|
+
| Arrow key | Navigates up, down, right, and left across the calendar. |
|
30
|
+
| Page up | Changes the grid of dates to the previous month. |
|
31
|
+
| Page down | Changes the grid of dates to the next month. |
|
32
|
+
| Shift + page up | Changes the grid of dates to the same month in the previous year. |
|
33
|
+
| Shift+ page down | Changes the grid of dates to the same month in the next year. |
|
34
|
+
|
35
|
+
#### Screen Readers
|
36
|
+
|
37
|
+
This component uses the following attributes to assist screen readers:
|
38
|
+
- The **`aria-label`** attribute is used to provide an accessible name.
|
39
|
+
- In each data cell, the **`aria-selected`** attribute is set to “true” when a date is selected, and **`aria-disabled`** is set to “false” by default.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
4
|
-
var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
5
4
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
5
|
+
var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
6
6
|
var _Object$create = require("@babel/runtime-corejs3/core-js-stable/object/create");
|
7
7
|
var _Object$getPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of");
|
8
8
|
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
@@ -22,7 +22,7 @@ var _isDateWithinRanges = require("../../utils/devUtils/props/isDateWithinRanges
|
|
22
22
|
var _testWrapper = require("../../utils/testUtils/testWrapper");
|
23
23
|
var _Calendar = _interopRequireDefault(require("./Calendar"));
|
24
24
|
var _react2 = require("@emotion/react");
|
25
|
-
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 _context9; _forEachInstanceProperty(_context9 = ["next", "throw", "return"]).call(_context9, 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 _context10; 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(_context10 = this.tryEntries).call(_context10, 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; }
|
25
|
+
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 _context9; _forEachInstanceProperty(_context9 = ["next", "throw", "return"]).call(_context9, 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 _context10; 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(_context10 = this.tryEntries).call(_context10, 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; }
|
26
26
|
var unavailableRanges = [['2022-08-01', '2022-08-03'], ['2022-08-15', '2022-08-20']];
|
27
27
|
// This function is run against each date in the calendar
|
28
28
|
var isDateUnavailable = function isDateUnavailable(date) {
|
@@ -21,14 +21,13 @@ var _hooks = require("../../hooks");
|
|
21
21
|
var _index = require("../../index");
|
22
22
|
var _react2 = require("@emotion/react");
|
23
23
|
var _excluded = ["state", "date", "className"];
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
25
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
26
24
|
/**
|
27
25
|
* Grid cell button element with the formatted day number.
|
28
26
|
* Utilizes the useCalendarCell hook to return props for an individual cell,
|
29
27
|
* along with states and information.
|
30
28
|
*/
|
31
|
-
|
29
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
32
31
|
var CalendarCell = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
33
32
|
var state = props.state,
|
34
33
|
date = props.date,
|
@@ -22,9 +22,7 @@ var _react2 = require("@emotion/react");
|
|
22
22
|
* The calendar body component with column header and calendar cells.
|
23
23
|
* Utilizes useCalendarGrid to return props for an individual grid of dates in a month
|
24
24
|
* along with formatted weekday names based on the current locale.
|
25
|
-
*/
|
26
|
-
|
27
|
-
var CalendarGrid = function CalendarGrid(props) {
|
25
|
+
*/var CalendarGrid = function CalendarGrid(props) {
|
28
26
|
var _context2, _context3, _context4;
|
29
27
|
var state = props.state,
|
30
28
|
customWeekDays = props.customWeekDays;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Callout/Callout" />
|
4
|
+
|
5
|
+
# Callout
|
6
|
+
|
7
|
+
Callouts are persistent box-like components that display brief status reports regarding continuing and developing conditions.
|
8
|
+
Callouts should contain only 1 or 2 pieces of information and display at the top of the panels or above the related content without blocking important information on the screen, and should not be stacked on top of each other.
|
9
|
+
|
10
|
+
### Required components
|
11
|
+
|
12
|
+
This component requires the [Link](./?path=/docs/components-link--default) and [Text](./?path=/docs/components-text--default) components.
|
13
|
+
|
14
|
+
### Accessibility
|
15
|
+
|
16
|
+
#### Keyboard Navigation
|
17
|
+
|
18
|
+
The callout itself is not focusable but the components within it are.
|
19
|
+
These keys provide additional functionality to the component.
|
20
|
+
|
21
|
+
| Keys | Functions |
|
22
|
+
| ---- | --------- |
|
23
|
+
| Space or Enter | Selects the component within. |
|
24
|
+
| Tab | Focuses the component within and follows the page tab sequence. |
|
25
|
+
|
26
|
+
#### Screen readers
|
27
|
+
|
28
|
+
This component uses the **`aria-label`** attribute to provide an accessible name.
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/Card/Card" />
|
4
|
+
|
5
|
+
# Card
|
6
|
+
|
7
|
+
Cards are usually placed in groups and used to display content related to a single subject.
|
8
|
+
The content can consist of multiple components of varying types and sizes.
|
9
|
+
|
10
|
+
Card should:
|
11
|
+
- Relay clear expectations for user interactions.
|
12
|
+
- Be self-contained and freely placed based on function.
|
13
|
+
- Be grouped in a uniform layout when the content length and sizes are similar.
|
14
|
+
|
15
|
+
Cards shouldn’t contain too much information. Keep it simple and scannable.
|
16
|
+
|
17
|
+
This component is built on [Box from Theme-UI](https://theme-ui.com/components/box) and accepts most [Styled System props](https://styled-system.com/table/).
|
18
|
+
|
19
|
+
### Required Components
|
20
|
+
|
21
|
+
This component can be used independently and does not require additional components.
|
22
|
+
|
23
|
+
### Accessibility
|
24
|
+
|
25
|
+
#### Keyboard Navigation
|
26
|
+
|
27
|
+
These keys provide additional functionality to the Interactive Card components.
|
28
|
+
|
29
|
+
| Keys | Functions |
|
30
|
+
| ---- | --------- |
|
31
|
+
| Space or Enter | Selects the button. |
|
32
|
+
| Tab | Focuses the button and follows the page tab sequence.|
|
@@ -20,8 +20,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
20
20
|
* Built on top of the [Checkbox from Theme-UI](https://theme-ui.com/components/checkbox/).
|
21
21
|
*
|
22
22
|
* **Note: Requires a label. It's recommended to use `CheckboxField` for a complete solution.**
|
23
|
-
*/
|
24
|
-
var Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
23
|
+
*/var Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
25
24
|
return (0, _react2.jsx)(_CheckboxBase["default"], (0, _extends2["default"])({
|
26
25
|
ref: ref
|
27
26
|
}, props));
|
@@ -20,8 +20,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
20
20
|
/**
|
21
21
|
* Checkbox component from Theme UI, renders a visually hidden input + svg icons for the
|
22
22
|
* checked and unchecked states.
|
23
|
-
*/
|
24
|
-
var DefaultCheckbox = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
23
|
+
*/var DefaultCheckbox = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
25
24
|
return (0, _react2.jsx)(_themeUi.Checkbox, (0, _extends2["default"])({
|
26
25
|
ref: ref,
|
27
26
|
__css: {
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/CheckboxField/CheckboxField" />
|
4
|
+
|
5
|
+
# CheckboxField
|
6
|
+
|
7
|
+
This component combines Checkbox, Label, and HelperText for a complete, form-ready solution.
|
8
|
+
CheckboxFields are shown as square boxes that users can select or deselect to indicate true or false and should:
|
9
|
+
- Have short, concise, clear labels.
|
10
|
+
- Be used in multi-selection lists.
|
11
|
+
- Be used for options that can be toggled on or off.
|
12
|
+
|
13
|
+
These fields should not be used to select from mutually exclusive options.
|
14
|
+
Use the [RadioGroupField](./?path=/story/form-radiogroupfield--default) instead.
|
15
|
+
|
16
|
+
The CheckboxField component uses [useCheckbox](https://react-spectrum.adobe.com/react-aria/useCheckbox.html) from React Aria and
|
17
|
+
[useToggleState](https://react-spectrum.adobe.com/react-stately/useToggleState.html) from React Stately.
|
18
|
+
|
19
|
+
### Required Components
|
20
|
+
|
21
|
+
This component can be used independently and does not require additional components.
|
22
|
+
|
23
|
+
### Accessibility
|
24
|
+
|
25
|
+
This component should adhere to the [WAI-ARIA Checkbox](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/) accessibility guidelines.
|
26
|
+
|
27
|
+
#### Keyboard Navigation
|
28
|
+
|
29
|
+
These keys provide additional functionality to the component.
|
30
|
+
|
31
|
+
| Keys | Functions |
|
32
|
+
| ---- | ---- |
|
33
|
+
| Space | When focused, toggles the check box on and off. |
|
34
|
+
| Tab | Moves focus to the next focusable component and follows the page tab sequence. |
|
35
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
36
|
+
|
37
|
+
#### Screen Readers
|
38
|
+
|
39
|
+
This component uses the following attributes to assist screen readers:
|
40
|
+
- The **`aria-checked`** attribute is used to indicate the current checked status.
|
41
|
+
- The **`aria-labelledby`** attribute is provided with the label ID to reference it.
|
42
|
+
- The **`aria-hidden`** attribute is used to hide its content from assistive technology.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/CodeView/CodeView" />
|
4
|
+
|
5
|
+
# CodeView
|
6
|
+
|
7
|
+
This component is used for code syntax highlighting and is built on [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer).
|
8
|
+
It should contain the language title and be formatted with indentations, line breaks, and comments, and should not contain complex code snippets.
|
9
|
+
|
10
|
+
### Required Components
|
11
|
+
|
12
|
+
This component requires the [Text](./?path=/docs/components-text--default) component.
|
13
|
+
|
14
|
+
### Accessibility
|
15
|
+
|
16
|
+
#### Keyboard Navigation
|
17
|
+
|
18
|
+
These keys provide additional functionality to the component.
|
19
|
+
|
20
|
+
| Keys | Functions |
|
21
|
+
| ---- | --------- |
|
22
|
+
| Space or Enter | Selects the CopyButton inside the CodeView component. |
|
23
|
+
| Tab | Focuses the CopyButton inside the CodeView component. |
|
@@ -27,7 +27,7 @@ var _ = require("../..");
|
|
27
27
|
var _testAxe = _interopRequireDefault(require("../../utils/testUtils/testAxe"));
|
28
28
|
var _testWrapper = require("../../utils/testUtils/testWrapper");
|
29
29
|
var _react2 = require("@emotion/react");
|
30
|
-
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 _context7; _forEachInstanceProperty(_context7 = ["next", "throw", "return"]).call(_context7, 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 _context8; 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(_context8 = this.tryEntries).call(_context8, 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; }
|
30
|
+
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 _context7; _forEachInstanceProperty(_context7 = ["next", "throw", "return"]).call(_context7, 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 _context8; 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(_context8 = this.tryEntries).call(_context8, 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; }
|
31
31
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
32
32
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context5 = ownKeys(Object(source), !0)).call(_context5, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context6 = ownKeys(Object(source))).call(_context6, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
33
33
|
var testId = 'test-code-sample';
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/CollapsiblePanel/CollapsiblePanel" />
|
4
|
+
|
5
|
+
# CollapsiblePanel
|
6
|
+
|
7
|
+
CollapsiblePanel provides users with the ability to expand and collapse content as needed while saving horizontal space, and shouldn’t be used with invisible triggers.
|
8
|
+
|
9
|
+
### Required Components
|
10
|
+
|
11
|
+
This component can be used independently and does not require additional components.
|
12
|
+
|
13
|
+
### Accessibility
|
14
|
+
|
15
|
+
#### Keyboard Navigation
|
16
|
+
|
17
|
+
These keys provide additional functionality to the component.
|
18
|
+
|
19
|
+
| Keys | Functions |
|
20
|
+
| ---- | --------- |
|
21
|
+
| Space or Enter | Expands or collapses the content when the trigger is focused. |
|
22
|
+
| Tab | Focuses the trigger button and the panel content. |
|
23
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
24
|
+
| Esc | Pressing the escape key closes the panel when it is expanded. |
|
25
|
+
|
26
|
+
#### Screen Readers
|
27
|
+
This component uses the **`aria-rowcount`** and **`aria-columncount`** attributes to indicate the total number of rows and columns in the grid structure.
|
28
|
+
|
29
|
+
|
@@ -16,7 +16,6 @@ var _excluded = ["selectedFilterCount"];
|
|
16
16
|
/**
|
17
17
|
* The CollapsiblePanelBadge serves as a badge to display selected count.
|
18
18
|
*/
|
19
|
-
|
20
19
|
var CollapsiblePanelBadge = function CollapsiblePanelBadge(props) {
|
21
20
|
var selectedFilterCount = props.selectedFilterCount,
|
22
21
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
@@ -21,13 +21,12 @@ var _index = require("../../index");
|
|
21
21
|
var _CollapsiblePanelBadge = _interopRequireDefault(require("./CollapsiblePanelBadge"));
|
22
22
|
var _react2 = require("@emotion/react");
|
23
23
|
var _excluded = ["selectedFilterCount", "className", "children", "closeAriaLabel", "isDefaultOpen", "isOpen", "onOpenChange", "openAriaLabel", "collapsiblePanelId"];
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
25
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
26
24
|
/**
|
27
25
|
* The CollapsiblePanelContainer serves as a wrapper around a list and its associated trigger,
|
28
26
|
* linking the list's open state with the trigger's press state and providing necessary context.
|
29
27
|
*/
|
30
|
-
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
29
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
31
30
|
var CollapsiblePanelContainer = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
32
31
|
var selectedFilterCount = props.selectedFilterCount,
|
33
32
|
className = props.className,
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/ColorField/ColorField" />
|
4
|
+
|
5
|
+
# ColorField
|
6
|
+
|
7
|
+
The ColorField component allows users to pick a color from a color swatch and use that color.
|
8
|
+
The colors must use the same color naming conventions, such as HEX, RBBA, and HSLA.
|
9
|
+
Pick one convention and stick with it.
|
10
|
+
|
11
|
+
This component uses [useColorField](https://react-spectrum.adobe.com/react-aria/useColorField.html) from React Aria,
|
12
|
+
[useColorFieldState](https://react-spectrum.adobe.com/react-stately/useColorFieldState.html) from React Stately
|
13
|
+
and [React Color](https://casesandberg.github.io/react-color/) as a color picker.
|
14
|
+
|
15
|
+
### Required Components
|
16
|
+
|
17
|
+
This component is built using [useOverLayTrigger](https://react-spectrum.adobe.com/react-aria/useOverlayTrigger.html), and requires the
|
18
|
+
react-aria [OverlayProvider](https://react-spectrum.adobe.com/react-aria/useOverlayTrigger.html#:~:text=contained%20in%20an-,OverlayProvider,-%2C%20which%20is%20used), which is exported from Astro.
|
19
|
+
|
20
|
+
### Accessibility
|
21
|
+
|
22
|
+
#### Keyboard Navigation
|
23
|
+
|
24
|
+
These keys provide additional functionality to the component.
|
25
|
+
|
26
|
+
| Keys | Functions |
|
27
|
+
| ---- | ---- |
|
28
|
+
| Tab |Focuses the color swatch and follows the page tab sequence. |
|
29
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
30
|
+
| Space or Enter | Opens the color swatch when it is focused. Once opened, the focus moves to the input field and is locked inside the ColorPicker Overlay. |
|
31
|
+
| Esc | When the picker is open, pressing the escape key closes the overlay and focuses on the previously focused component. |
|
32
|
+
|
33
|
+
#### Screen Readers
|
34
|
+
|
35
|
+
This component uses the following attributes to assist screen readers:
|
36
|
+
- The trigger button uses the **`aria-expanded`** attribute to indicate the expansion and collapse of Chrome Picker.
|
37
|
+
- When expanded, **`aria-controls`** is added to the button pointing to the Chrome Picker.
|
38
|
+
- The visibly hidden input uses the **`aria-labelledby`** attribute supplied with label ID.
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
2
|
+
|
3
|
+
<Meta title="Components/ComboBoxField/ComboBoxField" />
|
4
|
+
|
5
|
+
# ComboBoxField
|
6
|
+
|
7
|
+
The ComboBoxField combines the features of a textbox and a listbox.
|
8
|
+
This component provides a more compact way to present a list of choices, as the list is hidden until you click the drop-down arrow.
|
9
|
+
A combo box also gives you the ability to enter a value that is not in the list.
|
10
|
+
|
11
|
+
Use this component for large complex lists, ideally sorted. Do not use this component:
|
12
|
+
- If the list will never have more than 6 items.
|
13
|
+
- With small lists where one option is pre-selected by default. Use the [RadioGroupField](./?path=/docs/form-radiogroupfield--default) instead.
|
14
|
+
|
15
|
+
This component uses [useComboBox](https://react-spectrum.adobe.com/react-aria/useComboBox.html) from React
|
16
|
+
Aria and [useComboBoxState](https://react-spectrum.adobe.com/react-stately/useComboBoxState.html)
|
17
|
+
from React Stately.
|
18
|
+
|
19
|
+
### Required Components
|
20
|
+
|
21
|
+
This component is built using [useOverLayTrigger](https://react-spectrum.adobe.com/react-aria/useOverlayTrigger.html), and requires the
|
22
|
+
react-aria [OverlayProvider](https://react-spectrum.adobe.com/react-aria/useOverlayTrigger.html#:~:text=contained%20in%20an-,OverlayProvider,-%2C%20which%20is%20used),
|
23
|
+
exported from Astro and Item originating from [react-stately/collections](https://react-spectrum.adobe.com/react-stately/collections.html).
|
24
|
+
|
25
|
+
### Accessibility
|
26
|
+
|
27
|
+
This component should adhere to the [WAI-ARIA ComboBox](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) accessibility guidelines.
|
28
|
+
|
29
|
+
#### Keyboard Navigation
|
30
|
+
|
31
|
+
These keys provide additional functionality to the component.
|
32
|
+
|
33
|
+
| Keys | Functions |
|
34
|
+
| ---- | ---- |
|
35
|
+
| Tab | Focuses the field and follows the page tab sequence. |
|
36
|
+
| Shift + Tab | Moves focus to the previous focusable component. |
|
37
|
+
| Space or Enter | Selects the component when it is focused. |
|
38
|
+
| Down arrow | Opens the popover if it isn’t already open. |
|
39
|
+
| Up and down arrows | Can be used to move through the selection in the popover. |
|
40
|
+
| Typing in input field | Adds focus to it and opens the popover. |
|
41
|
+
| Home(Fn + Right Arrow Key) Or Control/Command + Home | Shifts the focus to the first item in the listbox. |
|
42
|
+
| End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last item in the listbox. |
|
43
|
+
| Esc | Pressing the escape key closes the overlay and adds focus to the previously focused component. |
|
44
|
+
|
45
|
+
#### Screen Readers
|
46
|
+
This component uses the following attributes to assist screen readers:
|
47
|
+
|
48
|
+
Input:
|
49
|
+
- The input uses **`aria-expanded`** to indicate the expansion/collapse of the listbox.
|
50
|
+
- When expanded **`aria-controls`** is added to the input pointing to the ListBox.
|
51
|
+
- The input has **`aria-labelledby`** supplied with label ID and **`aria-activedescendent`** identifies the currently focused option from the list.
|
52
|
+
- The label uses **`aria-hidden`** to hide its content from assistive technology.
|
53
|
+
- The **`aria-autocomplete`** list model displays all the possible values in the pop-up list.
|
54
|
+
- The Input has **`aria-invalid`** set to true when the entered value does not conform to the expected format.
|
55
|
+
|
56
|
+
Button:
|
57
|
+
- The trigger button uses **`aria-expanded`** to indicate the expansion/collapse of content.
|
58
|
+
- The attribute **`aria-haspopup`** has “True” set as the value, which indicates that the type of popup content is a Listbox.
|
59
|
+
- The button and label ID are supplied to **`aria-labelledby`** to reference it.
|
60
|
+
- When expanded **`aria-controls`** is added to the input pointing to the listbox.
|
61
|
+
|
62
|
+
Option:
|
63
|
+
- The ListBox has the label and its ID supplied to **`aria-labelledby`** and **`aria-label`** provides an accessible name to the component.
|
64
|
+
- Each ListBox option has the default **`aria-disabled`** set as false and **`aria-selected`** to indicate the currently selected option.
|
65
|
+
- The **`aria-posinset`** attribute defines an element's number or position in the current set of list items.
|
66
|
+
- The **`aria-setsize`** attribute defines the number of items in the current set of list items.
|