@pingux/astro 2.0.0-alpha.1 → 2.0.0-alpha.4
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/CHANGELOG.md +35 -0
- package/NOTICE +2481 -0
- package/README.md +25 -2
- package/lib/Patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +11 -11
- package/lib/Patterns/AttributeMappingEditViewPattern.stories.hidden.js +4 -4
- package/lib/Patterns/ListAndPanelPattern.stories.hidden.js +9 -12
- package/lib/Patterns/MessagesPattern.stories.hidden.js +3 -7
- package/lib/Patterns/SaveBarPattern.stories.hidden.js +5 -6
- package/lib/Patterns/UnsavedChangesPattern.stories.hidden.js +12 -20
- package/lib/cjs/Patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +10 -20
- package/lib/cjs/Patterns/AttributeMappingEditViewPattern.stories.hidden.js +4 -16
- package/lib/cjs/Patterns/ListAndPanelPattern.stories.hidden.js +8 -33
- package/lib/cjs/Patterns/MessagesPattern.stories.hidden.js +3 -22
- package/lib/cjs/Patterns/SaveBarPattern.stories.hidden.js +5 -21
- package/lib/cjs/Patterns/UnsavedChangesPattern.stories.hidden.js +11 -34
- package/lib/cjs/components/AccordionGridGroup/AccordionGrid.styles.js +0 -15
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.js +19 -72
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +8 -37
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +20 -100
- package/lib/cjs/components/AccordionGridGroup/index.js +0 -4
- package/lib/cjs/components/AccordionGridItem/AccordionGridItem.js +24 -58
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +21 -54
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +32 -71
- package/lib/cjs/components/AccordionGridItem/index.js +0 -4
- package/lib/cjs/components/AccordionGroup/Accordion.styles.js +0 -17
- package/lib/cjs/components/AccordionGroup/AccordionGroup.js +15 -54
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +5 -37
- package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +18 -117
- package/lib/cjs/components/AccordionGroup/index.js +0 -4
- package/lib/cjs/components/AccordionItem/AccordionItem.js +37 -70
- package/lib/cjs/components/AccordionItem/index.js +0 -4
- package/lib/cjs/components/ArrayField/ArrayField.js +28 -96
- package/lib/cjs/components/ArrayField/ArrayField.stories.js +7 -42
- package/lib/cjs/components/ArrayField/ArrayField.test.js +2 -31
- package/lib/cjs/components/ArrayField/ArrayFieldDeleteButton.js +3 -14
- package/lib/cjs/components/ArrayField/index.js +0 -6
- package/lib/cjs/components/AstroWrapper/AstroWrapper.js +19 -48
- package/lib/cjs/components/AstroWrapper/AstroWrapper.stories.js +0 -13
- package/lib/cjs/components/AstroWrapper/AstroWrapper.test.js +4 -12
- package/lib/cjs/components/AstroWrapper/PageWrapper.test.js +6 -13
- package/lib/cjs/components/AstroWrapper/index.js +0 -14
- package/lib/cjs/components/Avatar/Avatar.js +0 -15
- package/lib/cjs/components/Avatar/Avatar.stories.js +3 -15
- package/lib/cjs/components/Avatar/Avatar.test.js +2 -15
- package/lib/cjs/components/Avatar/index.js +0 -4
- package/lib/cjs/components/Badge/Badge.js +14 -54
- package/lib/cjs/components/Badge/Badge.stories.js +15 -52
- package/lib/cjs/components/Badge/Badge.styles.js +0 -29
- package/lib/cjs/components/Badge/Badge.test.js +6 -23
- package/lib/cjs/components/Badge/index.js +0 -4
- package/lib/cjs/components/Box/Box.js +21 -63
- package/lib/cjs/components/Box/Box.stories.js +47 -71
- package/lib/cjs/components/Box/Box.styles.js +0 -2
- package/lib/cjs/components/Box/Box.test.js +11 -28
- package/lib/cjs/components/Box/index.js +0 -4
- package/lib/cjs/components/Bracket/Bracket.js +3 -21
- package/lib/cjs/components/Bracket/Bracket.stories.js +1 -13
- package/lib/cjs/components/Bracket/Bracket.styles.js +0 -2
- package/lib/cjs/components/Bracket/Bracket.test.js +3 -13
- package/lib/cjs/components/Bracket/index.js +0 -4
- package/lib/cjs/components/Breadcrumbs/Breadcrumb.styles.js +0 -15
- package/lib/cjs/components/Breadcrumbs/BreadcrumbItem.js +8 -50
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +8 -38
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +2 -18
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.test.js +5 -23
- package/lib/cjs/components/Breadcrumbs/index.js +2 -8
- package/lib/cjs/components/Button/Button.js +34 -80
- package/lib/cjs/components/Button/Button.stories.js +4 -30
- package/lib/cjs/components/Button/Button.test.js +6 -43
- package/lib/cjs/components/Button/Buttons.styles.js +0 -28
- package/lib/cjs/components/Button/constants.js +0 -2
- package/lib/cjs/components/Button/index.js +0 -4
- package/lib/cjs/components/Callout/Callout.js +3 -19
- package/lib/cjs/components/Callout/Callout.stories.js +3 -22
- package/lib/cjs/components/Callout/Callout.test.js +0 -20
- package/lib/cjs/components/Callout/index.js +0 -4
- package/lib/cjs/components/Card/Card.js +35 -69
- package/lib/cjs/components/Card/Card.stories.js +1 -17
- package/lib/cjs/components/Card/Card.styles.js +0 -2
- package/lib/cjs/components/Card/Card.test.js +4 -33
- package/lib/cjs/components/Card/index.js +0 -4
- package/lib/cjs/components/Checkbox/Checkbox.js +0 -13
- package/lib/cjs/components/Checkbox/Checkbox.styles.js +1 -2
- package/lib/cjs/components/Checkbox/Checkbox.test.js +5 -13
- package/lib/cjs/components/Checkbox/CheckboxBase.js +2 -19
- package/lib/cjs/components/Checkbox/index.js +0 -4
- package/lib/cjs/components/CheckboxField/CheckboxField.js +20 -78
- package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +34 -81
- package/lib/cjs/components/CheckboxField/CheckboxField.test.js +24 -60
- package/lib/cjs/components/CheckboxField/index.js +0 -4
- package/lib/cjs/components/CodeView/CodeView.js +24 -66
- package/lib/cjs/components/CodeView/CodeView.stories.js +5 -26
- package/lib/cjs/components/CodeView/CodeView.styles.js +0 -2
- package/lib/cjs/components/CodeView/CodeView.test.js +20 -57
- package/lib/cjs/components/CodeView/index.js +0 -4
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.js +28 -61
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +11 -57
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.styles.js +0 -23
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.test.js +2 -14
- package/lib/cjs/components/CollapsiblePanel/index.js +0 -4
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelBadge.js +2 -13
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelBadge.test.js +2 -14
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +17 -48
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelContainer.test.js +2 -31
- package/lib/cjs/components/CollapsiblePanelContainer/index.js +0 -4
- package/lib/cjs/components/CollapsiblePanelItem/CollapsiblePanelItem.js +3 -19
- package/lib/cjs/components/CollapsiblePanelItem/CollapsiblePanelItem.test.js +2 -18
- package/lib/cjs/components/CollapsiblePanelItem/index.js +0 -4
- package/lib/cjs/components/ColorField/ColorField.js +39 -94
- package/lib/cjs/components/ColorField/ColorField.stories.js +10 -40
- package/lib/cjs/components/ColorField/ColorField.styles.js +1 -17
- package/lib/cjs/components/ColorField/ColorField.test.js +2 -21
- package/lib/cjs/components/ColorField/index.js +0 -4
- package/lib/cjs/components/ComboBox/ComboBox.styles.js +0 -17
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +38 -74
- package/lib/cjs/components/ComboBox/index.js +0 -4
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +59 -150
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +50 -141
- package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +148 -361
- package/lib/cjs/components/ComboBoxField/index.js +0 -4
- package/lib/cjs/components/CopyText/CopyButton.js +1 -18
- package/lib/cjs/components/CopyText/CopyText.js +28 -71
- package/lib/cjs/components/CopyText/CopyText.stories.js +1 -19
- package/lib/cjs/components/CopyText/CopyText.styles.js +0 -15
- package/lib/cjs/components/CopyText/CopyText.test.js +333 -414
- package/lib/cjs/components/CopyText/index.js +0 -4
- package/lib/cjs/components/DataTable/DataTable.js +58 -152
- package/lib/cjs/components/DataTable/DataTable.stories.js +21 -69
- package/lib/cjs/components/DataTable/DataTable.styles.js +0 -18
- package/lib/cjs/components/DataTable/DataTable.test.js +81 -221
- package/lib/cjs/components/DataTable/DataTableBadge.js +2 -17
- package/lib/cjs/components/DataTable/DataTableBadge.test.js +0 -6
- package/lib/cjs/components/DataTable/DataTableMenu.js +0 -13
- package/lib/cjs/components/DataTable/DataTableMenu.test.js +0 -6
- package/lib/cjs/components/DataTable/DataTableMultiLine.js +1 -17
- package/lib/cjs/components/DataTable/DataTableMultiLine.test.js +0 -7
- package/lib/cjs/components/DataTable/DataTableVirtualizer.js +31 -52
- package/lib/cjs/components/DataTable/index.js +2 -14
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +61 -139
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +48 -123
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +29 -97
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +0 -15
- package/lib/cjs/components/EnvironmentBreadcrumb/index.js +0 -4
- package/lib/cjs/components/FieldHelperText/FieldHelperText.js +4 -27
- package/lib/cjs/components/FieldHelperText/FieldHelperText.stories.js +1 -17
- package/lib/cjs/components/FieldHelperText/FieldHelperText.styles.js +0 -16
- package/lib/cjs/components/FieldHelperText/FieldHelperText.test.js +6 -24
- package/lib/cjs/components/FieldHelperText/index.js +0 -4
- package/lib/cjs/components/FileInputField/FileInputField.js +41 -116
- package/lib/cjs/components/FileInputField/FileInputField.stories.js +20 -66
- package/lib/cjs/components/FileInputField/FileInputField.styles.js +0 -15
- package/lib/cjs/components/FileInputField/FileInputField.test.js +2 -47
- package/lib/cjs/components/FileInputField/FileItem.js +10 -36
- package/lib/cjs/components/FileInputField/FileSelect.js +6 -31
- package/lib/cjs/components/FileInputField/index.js +0 -4
- package/lib/cjs/components/HelpHint/HelpHint.js +5 -26
- package/lib/cjs/components/HelpHint/HelpHint.stories.js +2 -16
- package/lib/cjs/components/HelpHint/HelpHint.styles.js +0 -15
- package/lib/cjs/components/HelpHint/HelpHint.test.js +3 -23
- package/lib/cjs/components/HelpHint/index.js +0 -4
- package/lib/cjs/components/Icon/Icon.js +4 -32
- package/lib/cjs/components/Icon/Icon.stories.js +4 -35
- package/lib/cjs/components/Icon/Icon.test.js +4 -21
- package/lib/cjs/components/Icon/NoticeIcon.js +2 -23
- package/lib/cjs/components/Icon/NoticeIcon.test.js +0 -10
- package/lib/cjs/components/Icon/index.js +0 -4
- package/lib/cjs/components/IconBadge/IconBadge.js +8 -36
- package/lib/cjs/components/IconBadge/IconBadge.stories.js +2 -15
- package/lib/cjs/components/IconBadge/IconBadge.test.js +2 -14
- package/lib/cjs/components/IconBadge/index.js +0 -4
- package/lib/cjs/components/IconButton/IconButton.js +32 -79
- package/lib/cjs/components/IconButton/IconButton.stories.js +7 -29
- package/lib/cjs/components/IconButton/IconButton.styles.js +3 -32
- package/lib/cjs/components/IconButton/IconButton.test.js +6 -53
- package/lib/cjs/components/IconButton/index.js +0 -4
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.js +10 -30
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.stories.js +4 -26
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.test.js +3 -18
- package/lib/cjs/components/IconButtonToggle/index.js +0 -4
- package/lib/cjs/components/Image/Image.js +28 -84
- package/lib/cjs/components/Image/Image.stories.js +8 -43
- package/lib/cjs/components/Image/Image.styles.js +0 -2
- package/lib/cjs/components/Image/Image.test.js +5 -41
- package/lib/cjs/components/Image/index.js +0 -4
- package/lib/cjs/components/ImageUploadField/ImagePreviewButton.js +16 -41
- package/lib/cjs/components/ImageUploadField/ImageUploadField.js +9 -58
- package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +58 -107
- package/lib/cjs/components/ImageUploadField/ImageUploadField.test.js +34 -97
- package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +22 -62
- package/lib/cjs/components/ImageUploadField/imageUpload.js +0 -17
- package/lib/cjs/components/ImageUploadField/index.js +0 -4
- package/lib/cjs/components/Input/Input.js +5 -27
- package/lib/cjs/components/Input/Input.stories.js +0 -14
- package/lib/cjs/components/Input/Input.styles.js +8 -23
- package/lib/cjs/components/Input/Input.test.js +3 -25
- package/lib/cjs/components/Input/index.js +0 -4
- package/lib/cjs/components/Label/Label.js +19 -48
- package/lib/cjs/components/Label/Label.stories.js +1 -16
- package/lib/cjs/components/Label/Label.styles.js +7 -20
- package/lib/cjs/components/Label/Label.test.js +4 -26
- package/lib/cjs/components/Label/constants.js +0 -2
- package/lib/cjs/components/Label/index.js +0 -4
- package/lib/cjs/components/Link/Link.js +21 -51
- package/lib/cjs/components/Link/Link.stories.js +4 -16
- package/lib/cjs/components/Link/Link.styles.js +0 -17
- package/lib/cjs/components/Link/Link.test.js +2 -26
- package/lib/cjs/components/Link/index.js +0 -4
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +23 -81
- package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +17 -72
- package/lib/cjs/components/LinkSelectField/LinkSelectField.test.js +24 -58
- package/lib/cjs/components/LinkSelectField/index.js +0 -4
- package/lib/cjs/components/ListBox/ListBox.js +39 -81
- package/lib/cjs/components/ListBox/ListBox.styles.js +0 -15
- package/lib/cjs/components/ListBox/ListBox.test.js +18 -43
- package/lib/cjs/components/ListBox/ListBoxContext.js +0 -6
- package/lib/cjs/components/ListBox/ListBoxSection.js +12 -35
- package/lib/cjs/components/ListBox/Option.js +24 -62
- package/lib/cjs/components/ListBox/index.js +0 -6
- package/lib/cjs/components/ListItem/ListItem.js +11 -33
- package/lib/cjs/components/ListItem/ListItem.stories.js +2 -20
- package/lib/cjs/components/ListItem/ListItem.styles.js +0 -2
- package/lib/cjs/components/ListItem/ListItem.test.js +3 -15
- package/lib/cjs/components/ListItem/index.js +0 -4
- package/lib/cjs/components/ListView/ListView.js +22 -77
- package/lib/cjs/components/ListView/ListView.stories.js +52 -97
- package/lib/cjs/components/ListView/ListView.test.js +34 -93
- package/lib/cjs/components/ListView/ListViewContext.js +0 -6
- package/lib/cjs/components/ListView/index.js +0 -4
- package/lib/cjs/components/ListViewItem/ListViewItem.js +35 -64
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +0 -16
- package/lib/cjs/components/ListViewItem/index.js +0 -4
- package/lib/cjs/components/Loader/Loader.js +2 -18
- package/lib/cjs/components/Loader/Loader.stories.js +2 -17
- package/lib/cjs/components/Loader/Loader.styles.js +0 -22
- package/lib/cjs/components/Loader/Loader.test.js +2 -12
- package/lib/cjs/components/Loader/index.js +0 -4
- package/lib/cjs/components/Menu/Menu.js +14 -65
- package/lib/cjs/components/Menu/Menu.stories.js +5 -16
- package/lib/cjs/components/Menu/Menu.styles.js +0 -2
- package/lib/cjs/components/Menu/Menu.test.js +20 -67
- package/lib/cjs/components/Menu/index.js +0 -4
- package/lib/cjs/components/MenuItem/MenuItem.js +47 -86
- package/lib/cjs/components/MenuItem/MenuItem.styles.js +0 -2
- package/lib/cjs/components/MenuItem/MenuItem.test.js +7 -65
- package/lib/cjs/components/MenuItem/index.js +0 -4
- package/lib/cjs/components/Messages/Message.js +26 -64
- package/lib/cjs/components/Messages/Message.styles.js +0 -2
- package/lib/cjs/components/Messages/Messages.js +5 -28
- package/lib/cjs/components/Messages/Messages.reducer.js +0 -18
- package/lib/cjs/components/Messages/Messages.stories.js +20 -79
- package/lib/cjs/components/Messages/Messages.test.js +6 -59
- package/lib/cjs/components/Messages/index.js +2 -16
- package/lib/cjs/components/Messages/utils/index.js +0 -6
- package/lib/cjs/components/Messages/utils/messagesReducer.js +9 -51
- package/lib/cjs/components/Messages/utils/multiMessagesReducer.js +7 -43
- package/lib/cjs/components/Messages/utils/tests/messagesReducer.test.js +5 -23
- package/lib/cjs/components/Messages/utils/tests/multiMessagesReducer.test.js +7 -26
- package/lib/cjs/components/Modal/Modal.js +30 -81
- package/lib/cjs/components/Modal/Modal.stories.js +2 -12
- package/lib/cjs/components/Modal/Modal.styles.js +0 -17
- package/lib/cjs/components/Modal/index.js +0 -4
- package/lib/cjs/components/Modal/tests/Modal.integration.test.js +11 -26
- package/lib/cjs/components/Modal/tests/Modal.unit.test.js +14 -52
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +81 -201
- package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +55 -126
- package/lib/cjs/components/MultivaluesField/MultivaluesField.test.js +27 -218
- package/lib/cjs/components/MultivaluesField/index.js +0 -4
- package/lib/cjs/components/NavBar/NavBar.js +14 -46
- package/lib/cjs/components/NavBar/NavBar.stories.js +4 -35
- package/lib/cjs/components/NavBar/NavBar.styles.js +0 -24
- package/lib/cjs/components/NavBar/NavBar.test.js +27 -145
- package/lib/cjs/components/NavBar/index.js +0 -4
- package/lib/cjs/components/NavBarSection/NavBarItem.js +31 -63
- package/lib/cjs/components/NavBarSection/NavBarItemBody.js +9 -33
- package/lib/cjs/components/NavBarSection/NavBarItemBody.test.js +2 -9
- package/lib/cjs/components/NavBarSection/NavBarItemButton.js +11 -39
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +10 -35
- package/lib/cjs/components/NavBarSection/NavBarItemLink.js +11 -40
- package/lib/cjs/components/NavBarSection/NavBarSection.js +15 -63
- package/lib/cjs/components/NavBarSection/index.js +2 -12
- package/lib/cjs/components/NumberField/NumberField.js +24 -95
- package/lib/cjs/components/NumberField/NumberField.stories.js +4 -48
- package/lib/cjs/components/NumberField/NumberField.styles.js +1 -20
- package/lib/cjs/components/NumberField/NumberField.test.js +5 -48
- package/lib/cjs/components/NumberField/index.js +0 -4
- package/lib/cjs/components/OverlayPanel/OverlayPanel.js +14 -47
- package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +41 -84
- package/lib/cjs/components/OverlayPanel/OverlayPanel.styles.js +0 -2
- package/lib/cjs/components/OverlayPanel/OverlayPanel.test.js +2 -33
- package/lib/cjs/components/OverlayPanel/index.js +0 -4
- package/lib/cjs/components/PageHeader/PageHeader.js +5 -22
- package/lib/cjs/components/PageHeader/PageHeader.stories.js +4 -15
- package/lib/cjs/components/PageHeader/PageHeader.test.js +3 -13
- package/lib/cjs/components/PasswordField/PasswordField.js +38 -117
- package/lib/cjs/components/PasswordField/PasswordField.stories.js +71 -160
- package/lib/cjs/components/PasswordField/PasswordField.test.js +41 -75
- package/lib/cjs/components/PasswordField/index.js +0 -4
- package/lib/cjs/components/PopoverContainer/PopoverContainer.js +34 -70
- package/lib/cjs/components/PopoverContainer/PopoverContainer.test.js +4 -16
- package/lib/cjs/components/PopoverContainer/index.js +0 -14
- package/lib/cjs/components/PopoverMenu/PopoverMenu.js +27 -72
- package/lib/cjs/components/PopoverMenu/PopoverMenu.stories.js +19 -42
- package/lib/cjs/components/PopoverMenu/PopoverMenu.styles.js +0 -2
- package/lib/cjs/components/PopoverMenu/PopoverMenu.test.js +14 -69
- package/lib/cjs/components/PopoverMenu/index.js +0 -4
- package/lib/cjs/components/Radio/Radio.js +0 -13
- package/lib/cjs/components/Radio/Radio.styles.js +5 -17
- package/lib/cjs/components/Radio/index.js +0 -4
- package/lib/cjs/components/RadioField/RadioField.js +24 -79
- package/lib/cjs/components/RadioField/RadioField.test.js +2 -27
- package/lib/cjs/components/RadioField/index.js +0 -14
- package/lib/cjs/components/RadioGroupField/RadioGroupField.js +18 -65
- package/lib/cjs/components/RadioGroupField/RadioGroupField.stories.js +5 -43
- package/lib/cjs/components/RadioGroupField/RadioGroupField.test.js +22 -55
- package/lib/cjs/components/RadioGroupField/index.js +0 -4
- package/lib/cjs/components/RequirementsList/RequirementsList.js +5 -33
- package/lib/cjs/components/RequirementsList/RequirementsList.stories.js +1 -12
- package/lib/cjs/components/RequirementsList/RequirementsList.test.js +13 -26
- package/lib/cjs/components/RequirementsList/index.js +0 -4
- package/lib/cjs/components/RockerButton/RockerButton.js +15 -48
- package/lib/cjs/components/RockerButton/RockerButton.styles.js +0 -17
- package/lib/cjs/components/RockerButton/index.js +0 -14
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.js +8 -47
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.stories.js +12 -37
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.test.js +7 -34
- package/lib/cjs/components/RockerButtonGroup/index.js +0 -14
- package/lib/cjs/components/ScrollBox/ScrollBox.js +23 -60
- package/lib/cjs/components/ScrollBox/ScrollBox.stories.js +1 -12
- package/lib/cjs/components/ScrollBox/ScrollBox.styles.js +0 -2
- package/lib/cjs/components/ScrollBox/ScrollBox.test.js +0 -24
- package/lib/cjs/components/ScrollBox/index.js +0 -4
- package/lib/cjs/components/SearchField/Search.styles.js +0 -2
- package/lib/cjs/components/SearchField/SearchField.js +26 -101
- package/lib/cjs/components/SearchField/SearchField.stories.js +8 -53
- package/lib/cjs/components/SearchField/SearchField.test.js +4 -73
- package/lib/cjs/components/SearchField/index.js +0 -4
- package/lib/cjs/components/SelectField/Select.styles.js +3 -20
- package/lib/cjs/components/SelectField/SelectField.js +4 -60
- package/lib/cjs/components/SelectField/SelectField.stories.js +17 -80
- package/lib/cjs/components/SelectField/SelectField.test.js +11 -41
- package/lib/cjs/components/SelectField/index.js +0 -4
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +23 -81
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.test.js +39 -143
- package/lib/cjs/components/SelectFieldBase/index.js +0 -4
- package/lib/cjs/components/Separator/Separator.js +9 -31
- package/lib/cjs/components/Separator/Separator.stories.js +3 -15
- package/lib/cjs/components/Separator/Separator.styles.js +0 -17
- package/lib/cjs/components/Separator/Separator.test.js +2 -13
- package/lib/cjs/components/Separator/index.js +0 -4
- package/lib/cjs/components/Stepper/Line.js +5 -20
- package/lib/cjs/components/Stepper/Step.js +11 -34
- package/lib/cjs/components/Stepper/Stepper.constants.js +0 -2
- package/lib/cjs/components/Stepper/Stepper.js +15 -56
- package/lib/cjs/components/Stepper/Stepper.stories.js +12 -30
- package/lib/cjs/components/Stepper/Stepper.styles.js +2 -17
- package/lib/cjs/components/Stepper/Stepper.test.js +30 -62
- package/lib/cjs/components/Stepper/index.js +2 -8
- package/lib/cjs/components/Switch/Switch.js +1 -16
- package/lib/cjs/components/Switch/Switch.styles.js +0 -15
- package/lib/cjs/components/Switch/index.js +0 -4
- package/lib/cjs/components/SwitchField/SwitchField.js +37 -98
- package/lib/cjs/components/SwitchField/SwitchField.stories.js +6 -48
- package/lib/cjs/components/SwitchField/SwitchField.test.js +2 -44
- package/lib/cjs/components/SwitchField/index.js +0 -4
- package/lib/cjs/components/Tab/Tab.js +38 -71
- package/lib/cjs/components/Tab/index.js +0 -14
- package/lib/cjs/components/TabPicker/TabPicker.js +37 -85
- package/lib/cjs/components/TabPicker/index.js +0 -4
- package/lib/cjs/components/Table/Table.js +2 -12
- package/lib/cjs/components/Table/Table.stories.js +4 -22
- package/lib/cjs/components/Table/Table.styles.js +0 -17
- package/lib/cjs/components/Table/Table.test.js +7 -25
- package/lib/cjs/components/Table/index.js +0 -4
- package/lib/cjs/components/TableBody/TableBody.js +2 -12
- package/lib/cjs/components/TableBody/index.js +0 -4
- package/lib/cjs/components/TableCaption/TableCaption.js +2 -12
- package/lib/cjs/components/TableCaption/index.js +0 -4
- package/lib/cjs/components/TableCell/TableCell.js +3 -14
- package/lib/cjs/components/TableCell/TableCell.test.js +4 -19
- package/lib/cjs/components/TableCell/index.js +0 -4
- package/lib/cjs/components/TableHead/TableHead.js +2 -12
- package/lib/cjs/components/TableHead/index.js +0 -4
- package/lib/cjs/components/TableRow/TableRow.js +2 -12
- package/lib/cjs/components/TableRow/index.js +0 -4
- package/lib/cjs/components/Tabs/Tabs.js +17 -77
- package/lib/cjs/components/Tabs/Tabs.stories.js +6 -51
- package/lib/cjs/components/Tabs/Tabs.style.js +0 -17
- package/lib/cjs/components/Tabs/Tabs.test.js +87 -180
- package/lib/cjs/components/Tabs/index.js +0 -14
- package/lib/cjs/components/Text/Text.js +3 -15
- package/lib/cjs/components/Text/Text.stories.js +17 -42
- package/lib/cjs/components/Text/Text.styles.js +0 -20
- package/lib/cjs/components/Text/Text.test.js +11 -38
- package/lib/cjs/components/Text/index.js +0 -4
- package/lib/cjs/components/TextArea/TextArea.js +3 -14
- package/lib/cjs/components/TextArea/TextArea.styles.js +1 -16
- package/lib/cjs/components/TextArea/TextArea.test.js +3 -13
- package/lib/cjs/components/TextArea/index.js +0 -4
- package/lib/cjs/components/TextAreaField/TextAreaField.js +19 -83
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +23 -77
- package/lib/cjs/components/TextAreaField/TextAreaField.test.js +4 -43
- package/lib/cjs/components/TextAreaField/index.js +0 -4
- package/lib/cjs/components/TextField/TextField.js +13 -73
- package/lib/cjs/components/TextField/TextField.stories.js +40 -112
- package/lib/cjs/components/TextField/TextField.test.js +4 -48
- package/lib/cjs/components/TextField/index.js +0 -4
- package/lib/cjs/components/TimeZonePicker/TimeZone.styles.js +0 -2
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.js +21 -80
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.stories.js +0 -11
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.test.js +3 -27
- package/lib/cjs/components/TimeZonePicker/index.js +0 -4
- package/lib/cjs/components/TimeZonePicker/timezones.js +0 -2
- package/lib/cjs/components/TooltipTrigger/Tooltip.js +4 -25
- package/lib/cjs/components/TooltipTrigger/Tooltip.styles.js +1 -21
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +36 -81
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +1 -34
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.test.js +6 -41
- package/lib/cjs/components/TooltipTrigger/index.js +2 -8
- package/lib/cjs/context/AccordionContext/index.js +0 -7
- package/lib/cjs/context/AccordionGridContext/index.js +0 -6
- package/lib/cjs/context/BadgeContext/index.js +0 -4
- package/lib/cjs/context/DataTableContext/index.js +0 -12
- package/lib/cjs/context/MenuContext/index.js +0 -6
- package/lib/cjs/context/NavBarContext/index.js +0 -6
- package/lib/cjs/context/TooltipContext/index.js +0 -7
- package/lib/cjs/docs/design/ColorDocumentation.stories.js +2 -12
- package/lib/cjs/docs/design/ContainerSizes.stories.js +3 -14
- package/lib/cjs/docs/design/Spacing.stories.js +4 -21
- package/lib/cjs/docs/design/Typography.stories.js +19 -37
- package/lib/cjs/docs/theme/ThemeDocumentation.js +0 -9
- package/lib/cjs/hooks/index.js +1 -37
- package/lib/cjs/hooks/useAriaLabelWarning/index.js +0 -4
- package/lib/cjs/hooks/useAriaLabelWarning/useAriaLabelWarning.js +0 -6
- package/lib/cjs/hooks/useAriaLabelWarning/useAriaLabelWarning.test.js +1 -5
- package/lib/cjs/hooks/useColumnStyles/index.js +0 -4
- package/lib/cjs/hooks/useColumnStyles/useColumnStyles.js +3 -12
- package/lib/cjs/hooks/useComponentToggle/index.js +0 -4
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.js +7 -21
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.test.js +23 -44
- package/lib/cjs/hooks/useCopyToClipboard/index.js +0 -4
- package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js +12 -20
- package/lib/cjs/hooks/useCopyToClipboard/useCopyToClipboard.test.js +11 -22
- package/lib/cjs/hooks/useDebounce/index.js +0 -4
- package/lib/cjs/hooks/useDebounce/useDebounce.js +4 -14
- package/lib/cjs/hooks/useDebounce/useDebounce.test.js +14 -18
- package/lib/cjs/hooks/useDeprecationWarning/index.js +0 -4
- package/lib/cjs/hooks/useDeprecationWarning/useDeprecationWarning.js +7 -18
- package/lib/cjs/hooks/useDeprecationWarning/useDeprecationWarning.test.js +9 -20
- package/lib/cjs/hooks/useDevelopmentWarning/index.js +0 -4
- package/lib/cjs/hooks/useDevelopmentWarning/useDevelopmentWarning.js +1 -6
- package/lib/cjs/hooks/useDevelopmentWarning/useDevelopmentWarning.test.js +1 -5
- package/lib/cjs/hooks/useFallbackImage/index.js +0 -4
- package/lib/cjs/hooks/useFallbackImage/useFallbackImage.js +4 -11
- package/lib/cjs/hooks/useFallbackImage/useFallbackImage.test.js +8 -24
- package/lib/cjs/hooks/useField/index.js +0 -4
- package/lib/cjs/hooks/useField/useField.js +115 -159
- package/lib/cjs/hooks/useField/useField.test.js +57 -73
- package/lib/cjs/hooks/useImageUploadState/index.js +0 -4
- package/lib/cjs/hooks/useImageUploadState/useImageUploadState.js +21 -43
- package/lib/cjs/hooks/useLabelHeight/index.js +0 -4
- package/lib/cjs/hooks/useLabelHeight/useLabelHeight.js +4 -15
- package/lib/cjs/hooks/useModalState/index.js +0 -4
- package/lib/cjs/hooks/useModalState/useModalState.js +2 -7
- package/lib/cjs/hooks/useModalState/useModalState.test.js +23 -32
- package/lib/cjs/hooks/useNavBarPress/index.js +0 -4
- package/lib/cjs/hooks/useNavBarPress/useNavBarPress.js +1 -8
- package/lib/cjs/hooks/useNavBarPress/useNavBarPress.test.js +16 -23
- package/lib/cjs/hooks/useOverlayPanelState/index.js +0 -4
- package/lib/cjs/hooks/useOverlayPanelState/useOverlayPanelState.js +2 -11
- package/lib/cjs/hooks/useOverlayPanelState/useOverlayPanelState.test.js +3 -7
- package/lib/cjs/hooks/useProgressiveState/index.js +0 -4
- package/lib/cjs/hooks/useProgressiveState/useProgressiveState.js +0 -7
- package/lib/cjs/hooks/useProgressiveState/useProgressiveState.test.js +13 -42
- package/lib/cjs/hooks/usePropWarning/index.js +0 -4
- package/lib/cjs/hooks/usePropWarning/usePropWarning.js +3 -13
- package/lib/cjs/hooks/usePropWarning/usePropWarning.test.js +1 -5
- package/lib/cjs/hooks/useRockerButton/index.js +0 -4
- package/lib/cjs/hooks/useRockerButton/useRockerButton.js +8 -27
- package/lib/cjs/hooks/useSelectField/index.js +0 -4
- package/lib/cjs/hooks/useSelectField/useSelectField.js +69 -107
- package/lib/cjs/hooks/useStatusClasses/index.js +0 -4
- package/lib/cjs/hooks/useStatusClasses/useStatusClasses.js +1 -9
- package/lib/cjs/hooks/useStatusClasses/useStatusClasses.test.js +12 -21
- package/lib/cjs/hooks/useTShirtSize/index.js +0 -4
- package/lib/cjs/hooks/useTShirtSize/useTShirtSize.js +1 -7
- package/lib/cjs/hooks/useTShirtSize/useTShirtSize.test.js +10 -20
- package/lib/cjs/index.js +175 -516
- package/lib/cjs/recipes/ApplicationSearchDropdown.stories.js +23 -70
- package/lib/cjs/recipes/Arrow.stories.js +0 -10
- package/lib/cjs/recipes/AttributeMappingReadOnlyField.stories.js +5 -21
- package/lib/cjs/recipes/AttributesAndPingOneMapping.stories.js +16 -51
- package/lib/cjs/recipes/CollapsiblePanel.stories.js +13 -55
- package/lib/cjs/recipes/ConditionalFilter.stories.js +3 -18
- package/lib/cjs/recipes/CopyToClipboard.stories.js +1 -11
- package/lib/cjs/recipes/CountryPicker.stories.js +15 -53
- package/lib/cjs/recipes/DatePicker.stories.js +24 -58
- package/lib/cjs/recipes/DraggableBox.stories.js +0 -13
- package/lib/cjs/recipes/EditableInput.stories.js +32 -80
- package/lib/cjs/recipes/FlippableCaretMenuButton.stories.js +17 -63
- package/lib/cjs/recipes/LinkedListView.stories.js +29 -54
- package/lib/cjs/recipes/ListAndPanel.stories.js +42 -74
- package/lib/cjs/recipes/LogoTabs.stories.js +8 -41
- package/lib/cjs/recipes/MaskedValue.stories.js +9 -32
- package/lib/cjs/recipes/NeutralInput.stories.js +0 -9
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +2 -19
- package/lib/cjs/recipes/PageHeader.stories.js +0 -10
- package/lib/cjs/recipes/PanelHeader.stories.js +2 -19
- package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +6 -30
- package/lib/cjs/recipes/RowLineChart.stories.js +5 -36
- package/lib/cjs/recipes/ScrollableListView.stories.js +9 -36
- package/lib/cjs/recipes/SelectedFieldOverlay.story.js +0 -12
- package/lib/cjs/recipes/Slider.stories.js +20 -60
- package/lib/cjs/recipes/StatsCircle.stories.js +0 -11
- package/lib/cjs/recipes/TrialExperienceIndustryButtons.stories.js +1 -25
- package/lib/cjs/recipes/TrialExperienceStatusBar.stories.js +13 -51
- package/lib/cjs/styles/ColorDocumentation.js +48 -92
- package/lib/cjs/styles/breakpoints.js +0 -2
- package/lib/cjs/styles/colors.js +15 -39
- package/lib/cjs/styles/forms/index.js +0 -31
- package/lib/cjs/styles/spacing.js +1 -3
- package/lib/cjs/styles/templates/Nav/HeaderBar.js +4 -26
- package/lib/cjs/styles/templates/Nav/Nav.stories.js +19 -39
- package/lib/cjs/styles/templates/Nav/NavData.js +4 -24
- package/lib/cjs/styles/text.js +0 -9
- package/lib/cjs/styles/theme-ui/ThemeView.js +0 -9
- package/lib/cjs/styles/theme.js +3 -27
- package/lib/cjs/styles/themeOverrides/index.js +2 -6
- package/lib/cjs/styles/themeOverrides/stories/AccordionGroup.chromatic.stories.js +0 -10
- package/lib/cjs/styles/themeOverrides/stories/Button.chromatic.stories.js +0 -20
- package/lib/cjs/styles/themeOverrides/stories/EnvironmentBreadcrumb.chromatic.stories.js +7 -38
- package/lib/cjs/styles/themeOverrides/stories/IconButton.chromatic.stories.js +0 -13
- package/lib/cjs/styles/themeOverrides/stories/Label.chromatic.stories.js +0 -10
- package/lib/cjs/styles/themeOverrides/stories/Link.chromatic.stories.js +1 -11
- package/lib/cjs/styles/themeOverrides/stories/NavBar.chromatic.stories.js +0 -22
- package/lib/cjs/styles/themeOverrides/stories/NumberField.chromatic.stories.js +0 -10
- package/lib/cjs/styles/themeOverrides/stories/RockerButtonGroup.chromatic.stories.js +0 -10
- package/lib/cjs/styles/themeOverrides/stories/SearchField.chromatic.stories.js +0 -12
- package/lib/cjs/styles/themeOverrides/stories/SelectField.chromatic.stories.js +0 -11
- package/lib/cjs/styles/themeOverrides/uiLibraryOverride.js +0 -15
- package/lib/cjs/styles/themeOverrides/withUiLibraryCss.js +0 -17
- package/lib/cjs/styles/themes/astro-nano/astro-nano.js +1 -20
- package/lib/cjs/styles/themes/astro-nano/index.js +0 -4
- package/lib/cjs/styles/themes/end-user/end-user.js +1 -22
- package/lib/cjs/styles/themes/end-user/index.js +0 -4
- package/lib/cjs/styles/useAstroTheme.js +0 -11
- package/lib/cjs/styles/variants/callout.js +0 -18
- package/lib/cjs/styles/variants/index.js +4 -36
- package/lib/cjs/styles/variants/variants.js +4 -56
- package/lib/cjs/utils/devUtils/constants/animals.js +0 -2
- package/lib/cjs/utils/devUtils/constants/firstNames.js +0 -2
- package/lib/cjs/utils/devUtils/constants/htmlElements.js +1 -3
- package/lib/cjs/utils/devUtils/constants/images.js +0 -2
- package/lib/cjs/utils/devUtils/constants/loadingStates.js +0 -2
- package/lib/cjs/utils/devUtils/constants/orientation.js +0 -2
- package/lib/cjs/utils/devUtils/constants/panelSizes.js +0 -2
- package/lib/cjs/utils/devUtils/constants/statuses.js +0 -2
- package/lib/cjs/utils/devUtils/constants/tShirtSizes.js +0 -2
- package/lib/cjs/utils/devUtils/constants/text.js +0 -2
- package/lib/cjs/utils/devUtils/constants/variants.js +2 -12
- package/lib/cjs/utils/devUtils/createMockData.js +0 -31
- package/lib/cjs/utils/devUtils/decorators/withDeprecationWarning.js +1 -11
- package/lib/cjs/utils/devUtils/props/ariaAttributes.js +2 -28
- package/lib/cjs/utils/devUtils/props/ariaAttributes.test.js +4 -22
- package/lib/cjs/utils/devUtils/props/fieldAttributes.js +0 -15
- package/lib/cjs/utils/devUtils/props/isIterable.js +6 -21
- package/lib/cjs/utils/devUtils/props/isValidPositiveInt.js +2 -13
- package/lib/cjs/utils/devUtils/styledSystemUtils.js +8 -32
- package/lib/cjs/utils/styleUtils/index.js +0 -4
- package/lib/cjs/utils/testUtils/setupTests.js +5 -11
- package/lib/cjs/utils/testUtils/testAxe.js +15 -19
- package/lib/cjs/utils/testUtils/testTheme.js +0 -2
- package/lib/cjs/utils/testUtils/testWrapper.js +13 -39
- package/lib/components/AccordionGridGroup/AccordionGrid.styles.js +0 -3
- package/lib/components/AccordionGridGroup/AccordionGridGroup.js +15 -37
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +9 -13
- package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +17 -11
- package/lib/components/AccordionGridItem/AccordionGridItem.js +24 -34
- package/lib/components/AccordionGridItem/AccordionGridItemBody.js +21 -32
- package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +33 -48
- package/lib/components/AccordionGroup/Accordion.styles.js +1 -6
- package/lib/components/AccordionGroup/AccordionGroup.js +16 -28
- package/lib/components/AccordionGroup/AccordionGroup.stories.js +5 -6
- package/lib/components/AccordionGroup/AccordionGroup.test.js +12 -20
- package/lib/components/AccordionItem/AccordionItem.js +38 -48
- package/lib/components/ArrayField/ArrayField.js +29 -60
- package/lib/components/ArrayField/ArrayField.stories.js +7 -17
- package/lib/components/ArrayField/ArrayField.test.js +2 -5
- package/lib/components/ArrayField/ArrayFieldDeleteButton.js +3 -5
- package/lib/components/AstroWrapper/AstroWrapper.js +17 -26
- package/lib/components/AstroWrapper/AstroWrapper.test.js +4 -4
- package/lib/components/AstroWrapper/PageWrapper.test.js +7 -6
- package/lib/components/Avatar/Avatar.js +0 -1
- package/lib/components/Avatar/Avatar.stories.js +3 -3
- package/lib/components/Avatar/Avatar.test.js +2 -3
- package/lib/components/Badge/Badge.js +14 -27
- package/lib/components/Badge/Badge.stories.js +15 -26
- package/lib/components/Badge/Badge.styles.js +1 -14
- package/lib/components/Badge/Badge.test.js +3 -7
- package/lib/components/Box/Box.js +15 -32
- package/lib/components/Box/Box.stories.js +7 -11
- package/lib/components/Box/Box.test.js +7 -7
- package/lib/components/Bracket/Bracket.js +4 -6
- package/lib/components/Bracket/Bracket.stories.js +1 -1
- package/lib/components/Bracket/Bracket.test.js +3 -4
- package/lib/components/Breadcrumbs/Breadcrumb.styles.js +0 -3
- package/lib/components/Breadcrumbs/BreadcrumbItem.js +9 -28
- package/lib/components/Breadcrumbs/Breadcrumbs.js +9 -18
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +2 -3
- package/lib/components/Breadcrumbs/Breadcrumbs.test.js +5 -6
- package/lib/components/Breadcrumbs/index.js +2 -2
- package/lib/components/Button/Button.js +36 -57
- package/lib/components/Button/Button.stories.js +6 -5
- package/lib/components/Button/Button.test.js +6 -5
- package/lib/components/Button/Buttons.styles.js +0 -12
- package/lib/components/Callout/Callout.js +3 -6
- package/lib/components/Callout/Callout.stories.js +6 -4
- package/lib/components/Callout/Callout.test.js +0 -4
- package/lib/components/Card/Card.js +35 -49
- package/lib/components/Card/Card.stories.js +1 -1
- package/lib/components/Card/Card.test.js +4 -8
- package/lib/components/Checkbox/Checkbox.js +1 -1
- package/lib/components/Checkbox/Checkbox.styles.js +1 -0
- package/lib/components/Checkbox/Checkbox.test.js +5 -6
- package/lib/components/Checkbox/CheckboxBase.js +3 -5
- package/lib/components/CheckboxField/CheckboxField.js +22 -51
- package/lib/components/CheckboxField/CheckboxField.stories.js +33 -42
- package/lib/components/CheckboxField/CheckboxField.test.js +23 -23
- package/lib/components/CodeView/CodeView.js +23 -35
- package/lib/components/CodeView/CodeView.stories.js +5 -6
- package/lib/components/CodeView/CodeView.test.js +20 -24
- package/lib/components/CollapsiblePanel/CollapsiblePanel.js +22 -35
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +13 -21
- package/lib/components/CollapsiblePanel/CollapsiblePanel.styles.js +1 -8
- package/lib/components/CollapsiblePanel/CollapsiblePanel.test.js +2 -3
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelBadge.js +2 -5
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelBadge.test.js +2 -3
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +17 -27
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelContainer.test.js +2 -3
- package/lib/components/CollapsiblePanelItem/CollapsiblePanelItem.js +3 -8
- package/lib/components/CollapsiblePanelItem/CollapsiblePanelItem.test.js +2 -3
- package/lib/components/ColorField/ColorField.js +40 -61
- package/lib/components/ColorField/ColorField.stories.js +10 -14
- package/lib/components/ColorField/ColorField.styles.js +1 -4
- package/lib/components/ColorField/ColorField.test.js +2 -3
- package/lib/components/ComboBox/ComboBox.styles.js +0 -5
- package/lib/components/ComboBox/ComboBoxInput.js +38 -44
- package/lib/components/ComboBoxField/ComboBoxField.js +61 -117
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +50 -68
- package/lib/components/ComboBoxField/ComboBoxField.test.js +153 -159
- package/lib/components/CopyText/CopyButton.js +1 -1
- package/lib/components/CopyText/CopyText.js +28 -53
- package/lib/components/CopyText/CopyText.stories.js +1 -1
- package/lib/components/CopyText/CopyText.styles.js +0 -3
- package/lib/components/CopyText/CopyText.test.js +333 -372
- package/lib/components/DataTable/DataTable.js +58 -122
- package/lib/components/DataTable/DataTable.stories.js +20 -31
- package/lib/components/DataTable/DataTable.styles.js +0 -7
- package/lib/components/DataTable/DataTable.test.js +82 -172
- package/lib/components/DataTable/DataTableBadge.js +1 -1
- package/lib/components/DataTable/DataTableBadge.test.js +0 -2
- package/lib/components/DataTable/DataTableMenu.test.js +0 -2
- package/lib/components/DataTable/DataTableMultiLine.js +1 -2
- package/lib/components/DataTable/DataTableMultiLine.test.js +0 -2
- package/lib/components/DataTable/DataTableVirtualizer.js +31 -35
- package/lib/components/DataTable/index.js +2 -2
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +61 -102
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +46 -84
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +24 -26
- package/lib/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +0 -3
- package/lib/components/FieldHelperText/FieldHelperText.js +5 -8
- package/lib/components/FieldHelperText/FieldHelperText.stories.js +1 -1
- package/lib/components/FieldHelperText/FieldHelperText.styles.js +0 -5
- package/lib/components/FieldHelperText/FieldHelperText.test.js +6 -12
- package/lib/components/FileInputField/FileInputField.js +41 -77
- package/lib/components/FileInputField/FileInputField.stories.js +11 -18
- package/lib/components/FileInputField/FileInputField.styles.js +0 -3
- package/lib/components/FileInputField/FileInputField.test.js +2 -7
- package/lib/components/FileInputField/FileItem.js +11 -18
- package/lib/components/FileInputField/FileSelect.js +6 -13
- package/lib/components/HelpHint/HelpHint.js +4 -8
- package/lib/components/HelpHint/HelpHint.stories.js +2 -2
- package/lib/components/HelpHint/HelpHint.styles.js +0 -3
- package/lib/components/HelpHint/HelpHint.test.js +3 -4
- package/lib/components/Icon/Icon.js +4 -11
- package/lib/components/Icon/Icon.stories.js +4 -6
- package/lib/components/Icon/Icon.test.js +3 -4
- package/lib/components/Icon/NoticeIcon.js +2 -5
- package/lib/components/Icon/NoticeIcon.test.js +0 -2
- package/lib/components/IconBadge/IconBadge.js +8 -18
- package/lib/components/IconBadge/IconBadge.stories.js +2 -2
- package/lib/components/IconBadge/IconBadge.test.js +3 -6
- package/lib/components/IconButton/IconButton.js +34 -56
- package/lib/components/IconButton/IconButton.stories.js +8 -7
- package/lib/components/IconButton/IconButton.styles.js +3 -12
- package/lib/components/IconButton/IconButton.test.js +6 -7
- package/lib/components/IconButtonToggle/IconButtonToggle.js +10 -20
- package/lib/components/IconButtonToggle/IconButtonToggle.stories.js +4 -6
- package/lib/components/IconButtonToggle/IconButtonToggle.test.js +3 -7
- package/lib/components/Image/Image.js +30 -60
- package/lib/components/Image/Image.stories.js +8 -10
- package/lib/components/Image/Image.test.js +5 -13
- package/lib/components/ImageUploadField/ImagePreviewButton.js +16 -25
- package/lib/components/ImageUploadField/ImageUploadField.js +10 -30
- package/lib/components/ImageUploadField/ImageUploadField.stories.js +58 -69
- package/lib/components/ImageUploadField/ImageUploadField.test.js +34 -44
- package/lib/components/ImageUploadField/ImageUploadFieldBase.js +16 -27
- package/lib/components/ImageUploadField/imageUpload.js +0 -5
- package/lib/components/Input/Input.js +4 -11
- package/lib/components/Input/Input.styles.js +10 -9
- package/lib/components/Input/Input.test.js +3 -4
- package/lib/components/Label/Label.js +18 -28
- package/lib/components/Label/Label.stories.js +1 -1
- package/lib/components/Label/Label.styles.js +8 -7
- package/lib/components/Label/Label.test.js +4 -7
- package/lib/components/Link/Link.js +22 -35
- package/lib/components/Link/Link.stories.js +4 -4
- package/lib/components/Link/Link.styles.js +0 -5
- package/lib/components/Link/Link.test.js +2 -3
- package/lib/components/LinkSelectField/LinkSelectField.js +23 -54
- package/lib/components/LinkSelectField/LinkSelectField.stories.js +17 -24
- package/lib/components/LinkSelectField/LinkSelectField.test.js +24 -21
- package/lib/components/ListBox/ListBox.js +40 -48
- package/lib/components/ListBox/ListBox.styles.js +0 -3
- package/lib/components/ListBox/ListBox.test.js +17 -15
- package/lib/components/ListBox/ListBoxSection.js +13 -18
- package/lib/components/ListBox/Option.js +25 -36
- package/lib/components/ListItem/ListItem.js +12 -16
- package/lib/components/ListItem/ListItem.stories.js +2 -2
- package/lib/components/ListItem/ListItem.test.js +3 -4
- package/lib/components/ListView/ListView.js +23 -45
- package/lib/components/ListView/ListView.stories.js +28 -45
- package/lib/components/ListView/ListView.test.js +34 -47
- package/lib/components/ListViewItem/ListViewItem.js +35 -46
- package/lib/components/ListViewItem/ListViewItem.styles.js +0 -5
- package/lib/components/Loader/Loader.js +2 -4
- package/lib/components/Loader/Loader.stories.js +2 -3
- package/lib/components/Loader/Loader.styles.js +0 -9
- package/lib/components/Loader/Loader.test.js +2 -3
- package/lib/components/Menu/Menu.js +14 -36
- package/lib/components/Menu/Menu.stories.js +3 -3
- package/lib/components/Menu/Menu.test.js +21 -15
- package/lib/components/MenuItem/MenuItem.js +47 -67
- package/lib/components/MenuItem/MenuItem.test.js +8 -13
- package/lib/components/Messages/Message.js +27 -43
- package/lib/components/Messages/Messages.js +5 -8
- package/lib/components/Messages/Messages.reducer.js +0 -6
- package/lib/components/Messages/Messages.stories.js +20 -38
- package/lib/components/Messages/Messages.test.js +6 -17
- package/lib/components/Messages/index.js +2 -2
- package/lib/components/Messages/utils/messagesReducer.js +10 -26
- package/lib/components/Messages/utils/multiMessagesReducer.js +8 -20
- package/lib/components/Messages/utils/tests/messagesReducer.test.js +6 -10
- package/lib/components/Messages/utils/tests/multiMessagesReducer.test.js +8 -13
- package/lib/components/Modal/Modal.js +31 -56
- package/lib/components/Modal/Modal.stories.js +3 -2
- package/lib/components/Modal/Modal.styles.js +0 -5
- package/lib/components/Modal/tests/Modal.integration.test.js +13 -12
- package/lib/components/Modal/tests/Modal.unit.test.js +16 -22
- package/lib/components/MultivaluesField/MultivaluesField.js +82 -163
- package/lib/components/MultivaluesField/MultivaluesField.stories.js +55 -84
- package/lib/components/MultivaluesField/MultivaluesField.test.js +27 -34
- package/lib/components/NavBar/NavBar.js +14 -27
- package/lib/components/NavBar/NavBar.stories.js +4 -10
- package/lib/components/NavBar/NavBar.styles.js +0 -10
- package/lib/components/NavBar/NavBar.test.js +12 -28
- package/lib/components/NavBarSection/NavBarItem.js +32 -45
- package/lib/components/NavBarSection/NavBarItemBody.js +10 -19
- package/lib/components/NavBarSection/NavBarItemBody.test.js +2 -5
- package/lib/components/NavBarSection/NavBarItemButton.js +12 -22
- package/lib/components/NavBarSection/NavBarItemHeader.js +10 -20
- package/lib/components/NavBarSection/NavBarItemLink.js +12 -23
- package/lib/components/NavBarSection/NavBarSection.js +15 -47
- package/lib/components/NavBarSection/index.js +2 -2
- package/lib/components/NumberField/NumberField.js +24 -63
- package/lib/components/NumberField/NumberField.stories.js +4 -8
- package/lib/components/NumberField/NumberField.styles.js +1 -7
- package/lib/components/NumberField/NumberField.test.js +5 -6
- package/lib/components/OverlayPanel/OverlayPanel.js +16 -29
- package/lib/components/OverlayPanel/OverlayPanel.stories.js +39 -59
- package/lib/components/OverlayPanel/OverlayPanel.test.js +2 -3
- package/lib/components/PageHeader/PageHeader.js +5 -6
- package/lib/components/PageHeader/PageHeader.stories.js +4 -4
- package/lib/components/PageHeader/PageHeader.test.js +3 -4
- package/lib/components/PasswordField/PasswordField.js +39 -83
- package/lib/components/PasswordField/PasswordField.stories.js +71 -110
- package/lib/components/PasswordField/PasswordField.test.js +24 -21
- package/lib/components/PopoverContainer/PopoverContainer.js +34 -48
- package/lib/components/PopoverContainer/PopoverContainer.test.js +4 -6
- package/lib/components/PopoverMenu/PopoverMenu.js +28 -48
- package/lib/components/PopoverMenu/PopoverMenu.stories.js +20 -13
- package/lib/components/PopoverMenu/PopoverMenu.test.js +15 -16
- package/lib/components/Radio/Radio.js +1 -1
- package/lib/components/Radio/Radio.styles.js +6 -6
- package/lib/components/RadioField/RadioField.js +25 -52
- package/lib/components/RadioField/RadioField.test.js +2 -3
- package/lib/components/RadioGroupField/RadioGroupField.js +19 -36
- package/lib/components/RadioGroupField/RadioGroupField.stories.js +5 -9
- package/lib/components/RadioGroupField/RadioGroupField.test.js +21 -13
- package/lib/components/RequirementsList/RequirementsList.js +5 -11
- package/lib/components/RequirementsList/RequirementsList.stories.js +1 -1
- package/lib/components/RequirementsList/RequirementsList.test.js +7 -7
- package/lib/components/RockerButton/RockerButton.js +16 -25
- package/lib/components/RockerButton/RockerButton.styles.js +0 -5
- package/lib/components/RockerButtonGroup/RockerButtonGroup.js +8 -18
- package/lib/components/RockerButtonGroup/RockerButtonGroup.stories.js +6 -7
- package/lib/components/RockerButtonGroup/RockerButtonGroup.test.js +7 -12
- package/lib/components/ScrollBox/ScrollBox.js +23 -37
- package/lib/components/ScrollBox/ScrollBox.stories.js +1 -1
- package/lib/components/ScrollBox/ScrollBox.test.js +0 -3
- package/lib/components/SearchField/SearchField.js +27 -75
- package/lib/components/SearchField/SearchField.stories.js +12 -18
- package/lib/components/SearchField/SearchField.test.js +4 -5
- package/lib/components/SelectField/Select.styles.js +3 -5
- package/lib/components/SelectField/SelectField.js +6 -37
- package/lib/components/SelectField/SelectField.stories.js +17 -24
- package/lib/components/SelectField/SelectField.test.js +11 -16
- package/lib/components/SelectFieldBase/SelectFieldBase.js +24 -49
- package/lib/components/SelectFieldBase/SelectFieldBase.test.js +40 -39
- package/lib/components/Separator/Separator.js +10 -13
- package/lib/components/Separator/Separator.stories.js +3 -3
- package/lib/components/Separator/Separator.styles.js +0 -6
- package/lib/components/Separator/Separator.test.js +2 -3
- package/lib/components/Stepper/Line.js +5 -9
- package/lib/components/Stepper/Step.js +9 -12
- package/lib/components/Stepper/Stepper.js +13 -32
- package/lib/components/Stepper/Stepper.stories.js +13 -12
- package/lib/components/Stepper/Stepper.styles.js +2 -5
- package/lib/components/Stepper/Stepper.test.js +32 -37
- package/lib/components/Stepper/index.js +2 -2
- package/lib/components/Switch/Switch.js +2 -2
- package/lib/components/Switch/Switch.styles.js +0 -3
- package/lib/components/SwitchField/SwitchField.js +39 -69
- package/lib/components/SwitchField/SwitchField.stories.js +6 -10
- package/lib/components/SwitchField/SwitchField.test.js +2 -3
- package/lib/components/Tab/Tab.js +39 -50
- package/lib/components/TabPicker/TabPicker.js +38 -59
- package/lib/components/Table/Table.js +2 -5
- package/lib/components/Table/Table.stories.js +4 -5
- package/lib/components/Table/Table.styles.js +0 -6
- package/lib/components/Table/Table.test.js +7 -9
- package/lib/components/TableBody/TableBody.js +2 -5
- package/lib/components/TableCaption/TableCaption.js +2 -5
- package/lib/components/TableCell/TableCell.js +3 -6
- package/lib/components/TableCell/TableCell.test.js +4 -5
- package/lib/components/TableHead/TableHead.js +2 -5
- package/lib/components/TableRow/TableRow.js +2 -5
- package/lib/components/Tabs/Tabs.js +17 -46
- package/lib/components/Tabs/Tabs.stories.js +6 -12
- package/lib/components/Tabs/Tabs.style.js +1 -4
- package/lib/components/Tabs/Tabs.test.js +88 -122
- package/lib/components/Text/Text.js +3 -4
- package/lib/components/Text/Text.stories.js +18 -28
- package/lib/components/Text/Text.styles.js +0 -9
- package/lib/components/Text/Text.test.js +11 -17
- package/lib/components/TextArea/TextArea.js +2 -2
- package/lib/components/TextArea/TextArea.styles.js +2 -4
- package/lib/components/TextArea/TextArea.test.js +3 -4
- package/lib/components/TextAreaField/TextAreaField.js +21 -61
- package/lib/components/TextAreaField/TextAreaField.stories.js +8 -13
- package/lib/components/TextAreaField/TextAreaField.test.js +5 -10
- package/lib/components/TextField/TextField.js +15 -48
- package/lib/components/TextField/TextField.stories.js +18 -26
- package/lib/components/TextField/TextField.test.js +4 -8
- package/lib/components/TimeZonePicker/TimeZonePicker.js +21 -51
- package/lib/components/TimeZonePicker/TimeZonePicker.test.js +3 -7
- package/lib/components/TooltipTrigger/Tooltip.js +4 -7
- package/lib/components/TooltipTrigger/Tooltip.styles.js +1 -8
- package/lib/components/TooltipTrigger/TooltipTrigger.js +37 -61
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +1 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.test.js +6 -7
- package/lib/components/TooltipTrigger/index.js +2 -2
- package/lib/context/AccordionContext/index.js +0 -1
- package/lib/context/TooltipContext/index.js +0 -1
- package/lib/docs/design/ColorDocumentation.stories.js +1 -1
- package/lib/docs/design/ContainerSizes.stories.js +3 -5
- package/lib/docs/design/Spacing.stories.js +3 -6
- package/lib/docs/design/Typography.stories.js +6 -10
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useAriaLabelWarning/useAriaLabelWarning.js +1 -2
- package/lib/hooks/useAriaLabelWarning/useAriaLabelWarning.test.js +1 -2
- package/lib/hooks/useColumnStyles/useColumnStyles.js +3 -7
- package/lib/hooks/useComponentToggle/useComponentToggle.js +7 -14
- package/lib/hooks/useComponentToggle/useComponentToggle.test.js +25 -25
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.js +13 -15
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.test.js +11 -10
- package/lib/hooks/useDebounce/useDebounce.js +4 -9
- package/lib/hooks/useDebounce/useDebounce.test.js +14 -15
- package/lib/hooks/useDeprecationWarning/useDeprecationWarning.js +7 -12
- package/lib/hooks/useDeprecationWarning/useDeprecationWarning.test.js +11 -16
- package/lib/hooks/useDevelopmentWarning/useDevelopmentWarning.js +2 -3
- package/lib/hooks/useDevelopmentWarning/useDevelopmentWarning.test.js +1 -2
- package/lib/hooks/useFallbackImage/useFallbackImage.js +4 -6
- package/lib/hooks/useFallbackImage/useFallbackImage.test.js +8 -13
- package/lib/hooks/useField/useField.js +112 -135
- package/lib/hooks/useField/useField.test.js +58 -60
- package/lib/hooks/useImageUploadState/useImageUploadState.js +21 -37
- package/lib/hooks/useLabelHeight/useLabelHeight.js +4 -10
- package/lib/hooks/useModalState/useModalState.js +3 -4
- package/lib/hooks/useModalState/useModalState.test.js +24 -30
- package/lib/hooks/useNavBarPress/useNavBarPress.js +1 -5
- package/lib/hooks/useNavBarPress/useNavBarPress.test.js +16 -20
- package/lib/hooks/useOverlayPanelState/useOverlayPanelState.js +3 -8
- package/lib/hooks/useOverlayPanelState/useOverlayPanelState.test.js +3 -4
- package/lib/hooks/useProgressiveState/useProgressiveState.js +1 -4
- package/lib/hooks/useProgressiveState/useProgressiveState.test.js +13 -20
- package/lib/hooks/usePropWarning/usePropWarning.js +3 -6
- package/lib/hooks/usePropWarning/usePropWarning.test.js +1 -2
- package/lib/hooks/useRockerButton/useRockerButton.js +8 -15
- package/lib/hooks/useSelectField/useSelectField.js +70 -83
- package/lib/hooks/useStatusClasses/useStatusClasses.js +2 -3
- package/lib/hooks/useStatusClasses/useStatusClasses.test.js +12 -18
- package/lib/hooks/useTShirtSize/useTShirtSize.js +1 -2
- package/lib/hooks/useTShirtSize/useTShirtSize.test.js +10 -17
- package/lib/index.js +28 -28
- package/lib/recipes/ApplicationSearchDropdown.stories.js +25 -42
- package/lib/recipes/AttributeMappingReadOnlyField.stories.js +6 -9
- package/lib/recipes/AttributesAndPingOneMapping.stories.js +18 -33
- package/lib/recipes/CollapsiblePanel.stories.js +15 -25
- package/lib/recipes/ConditionalFilter.stories.js +4 -7
- package/lib/recipes/CopyToClipboard.stories.js +1 -1
- package/lib/recipes/CountryPicker.stories.js +15 -32
- package/lib/recipes/DatePicker.stories.js +24 -33
- package/lib/recipes/EditableInput.stories.js +34 -57
- package/lib/recipes/FlippableCaretMenuButton.stories.js +18 -33
- package/lib/recipes/LinkedListView.stories.js +30 -40
- package/lib/recipes/ListAndPanel.stories.js +42 -50
- package/lib/recipes/LogoTabs.stories.js +8 -16
- package/lib/recipes/MaskedValue.stories.js +9 -13
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +3 -6
- package/lib/recipes/PageHeader.stories.js +1 -1
- package/lib/recipes/PanelHeader.stories.js +2 -2
- package/lib/recipes/RadioButtonsWithLinks.stories.js +6 -11
- package/lib/recipes/RowLineChart.stories.js +5 -16
- package/lib/recipes/ScrollableListView.stories.js +10 -16
- package/lib/recipes/Slider.stories.js +20 -37
- package/lib/recipes/TrialExperienceIndustryButtons.stories.js +1 -12
- package/lib/recipes/TrialExperienceStatusBar.stories.js +14 -32
- package/lib/styles/ColorDocumentation.js +48 -62
- package/lib/styles/colors.js +17 -25
- package/lib/styles/forms/index.js +2 -5
- package/lib/styles/spacing.js +1 -1
- package/lib/styles/templates/Nav/HeaderBar.js +4 -9
- package/lib/styles/templates/Nav/Nav.stories.js +6 -9
- package/lib/styles/templates/Nav/NavData.js +5 -11
- package/lib/styles/text.js +1 -5
- package/lib/styles/theme.js +3 -6
- package/lib/styles/themeOverrides/index.js +1 -1
- package/lib/styles/themeOverrides/stories/EnvironmentBreadcrumb.chromatic.stories.js +8 -15
- package/lib/styles/themeOverrides/stories/Link.chromatic.stories.js +1 -1
- package/lib/styles/themeOverrides/stories/NavBar.chromatic.stories.js +1 -5
- package/lib/styles/themeOverrides/stories/SearchField.chromatic.stories.js +0 -1
- package/lib/styles/themeOverrides/uiLibraryOverride.js +0 -3
- package/lib/styles/themeOverrides/withUiLibraryCss.js +0 -3
- package/lib/styles/themes/astro-nano/astro-nano.js +1 -4
- package/lib/styles/themes/end-user/end-user.js +1 -11
- package/lib/styles/variants/callout.js +0 -7
- package/lib/styles/variants/index.js +2 -5
- package/lib/styles/variants/variants.js +4 -7
- package/lib/utils/devUtils/constants/htmlElements.js +1 -0
- package/lib/utils/devUtils/constants/variants.js +4 -5
- package/lib/utils/devUtils/createMockData.js +2 -13
- package/lib/utils/devUtils/decorators/withDeprecationWarning.js +1 -5
- package/lib/utils/devUtils/props/ariaAttributes.js +2 -9
- package/lib/utils/devUtils/props/ariaAttributes.test.js +4 -11
- package/lib/utils/devUtils/props/fieldAttributes.js +0 -3
- package/lib/utils/devUtils/props/isIterable.js +6 -15
- package/lib/utils/devUtils/props/isValidPositiveInt.js +2 -8
- package/lib/utils/devUtils/styledSystemUtils.js +7 -12
- package/lib/utils/testUtils/setupTests.js +5 -4
- package/lib/utils/testUtils/testAxe.js +16 -13
- package/lib/utils/testUtils/testWrapper.js +7 -14
- package/package.json +41 -15
- package/lib/cjs/components/PageHeader/index.js +0 -18
- package/lib/components/PageHeader/index.js +0 -1
@@ -9,23 +9,21 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
9
9
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
10
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
11
11
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
12
|
-
|
13
12
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
14
|
-
|
15
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
16
|
-
|
17
14
|
import React, { forwardRef, useMemo } from 'react';
|
18
|
-
import PropTypes from 'prop-types';
|
19
15
|
import { useRadioGroup } from 'react-aria';
|
20
16
|
import { useRadioGroupState } from 'react-stately';
|
17
|
+
import PropTypes from 'prop-types';
|
21
18
|
import { v4 as uuid } from 'uuid';
|
22
|
-
import { Box, FieldHelperText, Label } from '
|
19
|
+
import { Box, FieldHelperText, Label } from '../..';
|
20
|
+
import { usePropWarning, useStatusClasses } from '../../hooks';
|
21
|
+
import ORIENTATION from '../../utils/devUtils/constants/orientation';
|
22
|
+
import statuses from '../../utils/devUtils/constants/statuses';
|
23
23
|
import { ariaAttributesBasePropTypes } from '../../utils/devUtils/props/ariaAttributes';
|
24
24
|
import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
|
25
|
-
import { useStatusClasses, usePropWarning } from '../../hooks';
|
26
|
-
import ORIENTATION from '../../utils/devUtils/constants/orientation';
|
27
25
|
import { RadioContext } from '../RadioField';
|
28
|
-
|
26
|
+
|
29
27
|
/**
|
30
28
|
* Radio group component for a single-choice list of options.
|
31
29
|
*
|
@@ -34,29 +32,25 @@ import statuses from '../../utils/devUtils/constants/statuses';
|
|
34
32
|
* [useRadioGroupState](https://react-spectrum.adobe.com/react-stately/useRadioGroupState.html)
|
35
33
|
* from React Stately.
|
36
34
|
*/
|
37
|
-
|
38
35
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
39
36
|
var RadioGroupField = /*#__PURE__*/forwardRef(function (props, ref) {
|
40
37
|
var children = props.children,
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
38
|
+
className = props.className,
|
39
|
+
helperText = props.helperText,
|
40
|
+
isDisabled = props.isDisabled,
|
41
|
+
isRequired = props.isRequired,
|
42
|
+
hintText = props.hintText,
|
43
|
+
label = props.label,
|
44
|
+
orientation = props.orientation,
|
45
|
+
status = props.status;
|
49
46
|
var state = useRadioGroupState(props);
|
50
|
-
|
51
47
|
var _useRadioGroup = useRadioGroup(props, state),
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
radioGroupProps = _useRadioGroup.radioGroupProps,
|
49
|
+
labelProps = _useRadioGroup.labelProps;
|
55
50
|
var _useStatusClasses = useStatusClasses(className, {
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
51
|
+
'is-horizontal': orientation === ORIENTATION.HORIZONTAL
|
52
|
+
}),
|
53
|
+
classNames = _useStatusClasses.classNames;
|
60
54
|
usePropWarning(props, 'disabled', 'isDisabled');
|
61
55
|
var unhandledAriaProps = {
|
62
56
|
'aria-controls': props['aria-controls']
|
@@ -92,44 +86,33 @@ var RadioGroupField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
92
86
|
RadioGroupField.propTypes = _objectSpread(_objectSpread({
|
93
87
|
/** The name of the RadioGroupField, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name_and_radio_buttons). */
|
94
88
|
name: PropTypes.string,
|
95
|
-
|
96
89
|
/** The current value (controlled). */
|
97
90
|
value: PropTypes.string,
|
98
|
-
|
99
91
|
/** The default value (uncontrolled). */
|
100
92
|
defaultValue: PropTypes.string,
|
101
|
-
|
102
93
|
/** Text to display after the radio group label. Useful for errors or other info. */
|
103
94
|
helperText: PropTypes.node,
|
104
|
-
|
105
95
|
/** If present this prop will cause a help hint to render in the label of the field. */
|
106
96
|
hintText: PropTypes.string,
|
107
|
-
|
108
97
|
/** Determines the arrangement of the radios. */
|
109
98
|
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
110
|
-
|
111
99
|
/** Determines the helper text styling. */
|
112
100
|
status: PropTypes.oneOf(_Object$values(statuses)),
|
113
|
-
|
114
101
|
/**
|
115
102
|
* Handler that is called when the value changes.
|
116
103
|
*
|
117
104
|
* `(newValue) => void`
|
118
105
|
*/
|
119
106
|
onChange: PropTypes.func,
|
120
|
-
|
121
107
|
/** Whether the radio group is disabled. */
|
122
108
|
isDisabled: PropTypes.bool,
|
123
|
-
|
124
109
|
/** Whether user input is required on the input before form submission. */
|
125
110
|
isRequired: PropTypes.bool,
|
126
|
-
|
127
111
|
/**
|
128
112
|
* The content to display as the label. If not set, It is recommended to set an aria-label or
|
129
113
|
* aria-labelledby attribute for accessibility.
|
130
114
|
*/
|
131
115
|
label: PropTypes.node,
|
132
|
-
|
133
116
|
/** The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id). */
|
134
117
|
id: PropTypes.string
|
135
118
|
}, ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
|
@@ -8,16 +8,13 @@ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/obje
|
|
8
8
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
9
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
10
10
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
11
|
-
|
12
11
|
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; }
|
13
|
-
|
14
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
15
|
-
|
16
13
|
import React, { useState } from 'react';
|
14
|
+
import statuses from '../../utils/devUtils/constants/statuses';
|
17
15
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
18
|
-
import RadioGroupField from '.';
|
19
16
|
import RadioField from '../RadioField';
|
20
|
-
import
|
17
|
+
import RadioGroupField from '.';
|
21
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
22
19
|
export default {
|
23
20
|
title: 'Form/RadioGroupField',
|
@@ -75,10 +72,9 @@ export var Default = function Default(args) {
|
|
75
72
|
};
|
76
73
|
export var Controlled = function Controlled() {
|
77
74
|
var _useState = useState('A'),
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
75
|
+
_useState2 = _slicedToArray(_useState, 2),
|
76
|
+
value = _useState2[0],
|
77
|
+
setValue = _useState2[1];
|
82
78
|
return ___EmotionJSX(RadioGroupField, {
|
83
79
|
label: "Pick one",
|
84
80
|
value: value,
|
@@ -1,15 +1,24 @@
|
|
1
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
2
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
3
|
+
import _Object$create from "@babel/runtime-corejs3/core-js-stable/object/create";
|
4
|
+
import _Object$getPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/get-prototype-of";
|
5
|
+
import _Object$setPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/set-prototype-of";
|
6
|
+
import _Promise from "@babel/runtime-corejs3/core-js-stable/promise";
|
7
|
+
import _reverseInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reverse";
|
8
|
+
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
9
|
+
import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
|
1
10
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
|
2
11
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
3
12
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
4
|
-
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
13
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context2; _forEachInstanceProperty(_context2 = ["next", "throw", "return"]).call(_context2, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context3; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context3 = this.tryEntries).call(_context3, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
5
14
|
import React from 'react';
|
6
15
|
import userEvent from '@testing-library/user-event';
|
16
|
+
import ORIENTATION from '../../utils/devUtils/constants/orientation';
|
17
|
+
import statuses from '../../utils/devUtils/constants/statuses';
|
7
18
|
import axeTest from '../../utils/testUtils/testAxe';
|
8
19
|
import { render, screen } from '../../utils/testUtils/testWrapper';
|
9
|
-
import statuses from '../../utils/devUtils/constants/statuses';
|
10
|
-
import RadioGroupField from '.';
|
11
20
|
import RadioField from '../RadioField';
|
12
|
-
import
|
21
|
+
import RadioGroupField from '.';
|
13
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
14
23
|
var testId = 'test-radio-group';
|
15
24
|
var testLabel = 'Test Label';
|
@@ -18,7 +27,6 @@ var defaultProps = {
|
|
18
27
|
'data-testid': testId,
|
19
28
|
label: testLabel
|
20
29
|
};
|
21
|
-
|
22
30
|
var getComponent = function getComponent() {
|
23
31
|
var groupProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
24
32
|
var radioProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
@@ -32,9 +40,9 @@ var getComponent = function getComponent() {
|
|
32
40
|
value: testValues[2],
|
33
41
|
label: testValues[2]
|
34
42
|
}, radioProps[2]))));
|
35
|
-
};
|
36
|
-
|
43
|
+
};
|
37
44
|
|
45
|
+
// Need to be added to each test file to test accessibility using axe.
|
38
46
|
axeTest(getComponent);
|
39
47
|
test('default radio group', function () {
|
40
48
|
getComponent();
|
@@ -56,9 +64,9 @@ test('radio group onChange', function () {
|
|
56
64
|
userEvent.click(radios[0]);
|
57
65
|
expect(onChange).toHaveBeenNthCalledWith(1, testValues[0]);
|
58
66
|
});
|
59
|
-
test('radio group only allows one checked option', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
67
|
+
test('radio group only allows one checked option', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
60
68
|
var radioA, radioB, labelA, labelB;
|
61
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
69
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
62
70
|
while (1) {
|
63
71
|
switch (_context.prev = _context.next) {
|
64
72
|
case 0:
|
@@ -80,7 +88,6 @@ test('radio group only allows one checked option', /*#__PURE__*/_asyncToGenerato
|
|
80
88
|
expect(screen.queryAllByRole('radio', {
|
81
89
|
checked: true
|
82
90
|
}).length).toBe(1);
|
83
|
-
|
84
91
|
case 16:
|
85
92
|
case "end":
|
86
93
|
return _context.stop();
|
@@ -93,8 +100,9 @@ test('value for controlled radio group', function () {
|
|
93
100
|
value: testValues[0]
|
94
101
|
});
|
95
102
|
var radios = screen.getAllByRole('radio');
|
96
|
-
expect(radios[0]).toBeChecked();
|
103
|
+
expect(radios[0]).toBeChecked();
|
97
104
|
|
105
|
+
// Ensure it is controlled.
|
98
106
|
userEvent.click(radios[1]);
|
99
107
|
expect(radios[0]).toBeChecked();
|
100
108
|
expect(radios[1]).not.toBeChecked();
|
@@ -107,8 +115,9 @@ test('defaultValue for uncontrolled radio group', function () {
|
|
107
115
|
defaultValue: testValues[0]
|
108
116
|
});
|
109
117
|
var radios = screen.getAllByRole('radio');
|
110
|
-
expect(radios[0]).toBeChecked();
|
118
|
+
expect(radios[0]).toBeChecked();
|
111
119
|
|
120
|
+
// Ensure it is uncontrolled.
|
112
121
|
userEvent.click(radios[1]);
|
113
122
|
expect(radios[0]).not.toBeChecked();
|
114
123
|
expect(radios[1]).toBeChecked();
|
@@ -121,7 +130,6 @@ test('disabled radio group disables all radios and the group label', function ()
|
|
121
130
|
isDisabled: true
|
122
131
|
});
|
123
132
|
var radios = screen.getAllByRole('radio');
|
124
|
-
|
125
133
|
_forEachInstanceProperty(radios).call(radios, function (radio) {
|
126
134
|
return expect(radio).toBeDisabled();
|
127
135
|
});
|
@@ -3,24 +3,23 @@ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectW
|
|
3
3
|
var _excluded = ["requirements"];
|
4
4
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
5
5
|
import React, { forwardRef } from 'react';
|
6
|
-
import PropTypes from 'prop-types';
|
7
|
-
import SuccessCircle from 'mdi-react/CheckCircleIcon';
|
8
6
|
import ErrorCircle from 'mdi-react/AlertCircleIcon';
|
9
7
|
import WarningCircle from 'mdi-react/AlertCircleOutlineIcon';
|
10
8
|
import DefaultCircle from 'mdi-react/CheckboxBlankCircleOutlineIcon';
|
9
|
+
import SuccessCircle from 'mdi-react/CheckCircleIcon';
|
10
|
+
import PropTypes from 'prop-types';
|
11
11
|
import Box from '../Box';
|
12
|
-
import Text from '../Text';
|
13
12
|
import Icon from '../Icon';
|
13
|
+
import Text from '../Text';
|
14
|
+
|
14
15
|
/**
|
15
16
|
* List of requirements for a password, with indicators that can change to show when
|
16
17
|
* requirements are satisfied.
|
17
18
|
*/
|
18
|
-
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
20
20
|
var RequirementsList = /*#__PURE__*/forwardRef(function (props, ref) {
|
21
21
|
var requirements = props.requirements,
|
22
|
-
|
23
|
-
|
22
|
+
others = _objectWithoutProperties(props, _excluded);
|
24
23
|
var statusIconRender = function statusIconRender(status) {
|
25
24
|
switch (status) {
|
26
25
|
case 'success':
|
@@ -31,7 +30,6 @@ var RequirementsList = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
31
30
|
size: 18,
|
32
31
|
"data-testid": "status-icon__".concat(status)
|
33
32
|
});
|
34
|
-
|
35
33
|
case 'warning':
|
36
34
|
return ___EmotionJSX(Icon, {
|
37
35
|
icon: WarningCircle,
|
@@ -40,7 +38,6 @@ var RequirementsList = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
40
38
|
size: 18,
|
41
39
|
"data-testid": "status-icon__".concat(status)
|
42
40
|
});
|
43
|
-
|
44
41
|
case 'error':
|
45
42
|
return ___EmotionJSX(Icon, {
|
46
43
|
icon: ErrorCircle,
|
@@ -49,7 +46,6 @@ var RequirementsList = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
49
46
|
size: 18,
|
50
47
|
"data-testid": "status-icon__".concat(status)
|
51
48
|
});
|
52
|
-
|
53
49
|
default:
|
54
50
|
return ___EmotionJSX(Icon, {
|
55
51
|
icon: DefaultCircle,
|
@@ -60,7 +56,6 @@ var RequirementsList = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
60
56
|
});
|
61
57
|
}
|
62
58
|
};
|
63
|
-
|
64
59
|
var buildRequirementsLine = function buildRequirementsLine(req) {
|
65
60
|
return ___EmotionJSX(Box, {
|
66
61
|
role: "listitem",
|
@@ -73,7 +68,6 @@ var RequirementsList = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
73
68
|
variant: "bodyWeak"
|
74
69
|
}, req.name));
|
75
70
|
};
|
76
|
-
|
77
71
|
return ___EmotionJSX(Box, _extends({
|
78
72
|
role: "list",
|
79
73
|
p: "lg",
|
@@ -28,7 +28,7 @@ export default {
|
|
28
28
|
};
|
29
29
|
export var Default = function Default(_ref) {
|
30
30
|
var label = _ref.label,
|
31
|
-
|
31
|
+
requirements = _ref.requirements;
|
32
32
|
return ___EmotionJSX(RequirementsList, {
|
33
33
|
label: label,
|
34
34
|
requirements: requirements
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import React from 'react';
|
3
|
-
import { render, screen } from '@testing-library/react';
|
4
|
-
import { CacheProvider } from '@emotion/react';
|
5
3
|
import createCache from '@emotion/cache';
|
4
|
+
import { CacheProvider } from '@emotion/react';
|
5
|
+
import { render, screen } from '@testing-library/react';
|
6
|
+
import axeTest from '../../utils/testUtils/testAxe';
|
6
7
|
import RequirementsList from '.';
|
7
|
-
|
8
|
+
|
9
|
+
// Emotion Cache added as test fails otherwise, root cause of this failure is unknown.
|
8
10
|
// Failure occured with ThemeUI refactor.
|
9
11
|
// https://github.com/emotion-js/emotion/issues/1105#issuecomment-557726922
|
10
|
-
|
11
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
12
13
|
var emotionCache = createCache({
|
13
14
|
key: 'requirements-test'
|
@@ -38,15 +39,14 @@ var defaultProps = {
|
|
38
39
|
'data-testid': testId,
|
39
40
|
requirements: testRequirements
|
40
41
|
};
|
41
|
-
|
42
42
|
var getComponent = function getComponent() {
|
43
43
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
44
44
|
return render(___EmotionJSX(CacheProvider, {
|
45
45
|
value: emotionCache
|
46
46
|
}, ___EmotionJSX(RequirementsList, _extends({}, defaultProps, props))));
|
47
|
-
};
|
48
|
-
|
47
|
+
};
|
49
48
|
|
49
|
+
// Need to be added to each test file to test accessibility using axe.
|
50
50
|
axeTest(getComponent);
|
51
51
|
test('base case requirements list', function () {
|
52
52
|
getComponent();
|
@@ -8,50 +8,42 @@ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/obje
|
|
8
8
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
9
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
10
10
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
11
|
-
|
12
11
|
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; }
|
13
|
-
|
14
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
15
|
-
|
16
13
|
import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
|
17
|
-
import PropTypes from 'prop-types';
|
18
14
|
import { FocusRing } from 'react-aria';
|
19
15
|
import { Item } from 'react-stately';
|
20
|
-
import
|
16
|
+
import PropTypes from 'prop-types';
|
17
|
+
import { usePropWarning, useRockerButton, useStatusClasses } from '../../hooks';
|
21
18
|
import { Box } from '../../index';
|
22
19
|
import { RockerContext } from '../RockerButtonGroup';
|
23
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
24
21
|
export var CollectionRockerButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
25
22
|
var className = props.className,
|
26
|
-
|
23
|
+
item = props.item;
|
27
24
|
var key = item.key,
|
28
|
-
|
29
|
-
|
25
|
+
rendered = item.rendered,
|
26
|
+
itemProps = item.props;
|
30
27
|
var state = useContext(RockerContext);
|
31
28
|
var isDisabled = state.disabledKeys.has(key);
|
32
29
|
var isSelected = state.selectedKey === key;
|
33
|
-
|
34
30
|
var _useStatusClasses = useStatusClasses(className, {
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
31
|
+
isSelected: isSelected,
|
32
|
+
isDisabled: isDisabled
|
33
|
+
}),
|
34
|
+
classNames = _useStatusClasses.classNames;
|
40
35
|
var rockerButtonRef = useRef();
|
41
36
|
usePropWarning(props, 'disabled', 'isDisabled');
|
42
37
|
/* istanbul ignore next */
|
43
|
-
|
44
38
|
useImperativeHandle(ref, function () {
|
45
39
|
return rockerButtonRef.current;
|
46
40
|
});
|
47
|
-
|
48
41
|
var _useRockerButton = useRockerButton({
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
42
|
+
item: item,
|
43
|
+
isDisabled: isDisabled,
|
44
|
+
isSelected: isSelected
|
45
|
+
}, state, rockerButtonRef),
|
46
|
+
rockerButtonProps = _useRockerButton.rockerButtonProps;
|
55
47
|
return ___EmotionJSX(FocusRing, {
|
56
48
|
focusRingClass: "is-focused"
|
57
49
|
}, ___EmotionJSX(Box, _extends({
|
@@ -71,7 +63,6 @@ CollectionRockerButton.propTypes = {
|
|
71
63
|
/** Allows custom styles to be passed to button. */
|
72
64
|
selectedStyles: PropTypes.shape({}),
|
73
65
|
// adding to surface in props table
|
74
|
-
|
75
66
|
/** @ignore */
|
76
67
|
item: PropTypes.shape({
|
77
68
|
key: PropTypes.string,
|
@@ -92,7 +83,7 @@ CollectionRockerButton.defaultProps = {
|
|
92
83
|
}
|
93
84
|
}
|
94
85
|
}
|
95
|
-
};
|
86
|
+
};
|
87
|
+
// Export Item as default for simplicity, convert to CollectionRockerButton within
|
96
88
|
// RockerButtonGroup component.
|
97
|
-
|
98
89
|
export default Item;
|
@@ -7,11 +7,8 @@ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-st
|
|
7
7
|
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
8
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
9
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
-
|
11
10
|
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; }
|
12
|
-
|
13
11
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
|
-
|
15
12
|
import { base, defaultFocus } from '../Button/Buttons.styles';
|
16
13
|
var container = {
|
17
14
|
alignItems: 'flex-start'
|
@@ -24,7 +21,6 @@ var innerContainer = {
|
|
24
21
|
borderRadius: '15px',
|
25
22
|
padding: '2px'
|
26
23
|
};
|
27
|
-
|
28
24
|
var thumbSwitch = _objectSpread(_objectSpread({}, base), {}, {
|
29
25
|
border: '0',
|
30
26
|
display: 'inline-flex',
|
@@ -44,7 +40,6 @@ var thumbSwitch = _objectSpread(_objectSpread({}, base), {}, {
|
|
44
40
|
},
|
45
41
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
46
42
|
});
|
47
|
-
|
48
43
|
export default {
|
49
44
|
container: container,
|
50
45
|
innerContainer: innerContainer,
|
@@ -12,20 +12,18 @@ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectW
|
|
12
12
|
var _excluded = ["children", "onSelectionChange", "tabListProps", "disabledKeys"];
|
13
13
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
14
14
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
15
|
-
|
16
15
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
17
|
-
|
18
16
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
19
|
-
|
20
17
|
import React, { forwardRef, useImperativeHandle, useRef } from 'react';
|
21
|
-
import PropTypes from 'prop-types';
|
22
18
|
import { useTabList } from 'react-aria';
|
23
19
|
import { useTabListState } from 'react-stately';
|
20
|
+
import PropTypes from 'prop-types';
|
24
21
|
import { usePropWarning } from '../../hooks';
|
25
22
|
import Box from '../Box';
|
26
23
|
import { CollectionRockerButton } from '../RockerButton';
|
27
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
28
25
|
export var RockerContext = /*#__PURE__*/React.createContext({});
|
26
|
+
|
29
27
|
/**
|
30
28
|
* This component handles a single selection state for a group of rocker buttons.
|
31
29
|
* It is intended to be used with < RockerButton > as children.
|
@@ -33,28 +31,23 @@ export var RockerContext = /*#__PURE__*/React.createContext({});
|
|
33
31
|
|
34
32
|
var RockerButtonGroup = /*#__PURE__*/forwardRef(function (props, ref) {
|
35
33
|
var _context;
|
36
|
-
|
37
34
|
var children = props.children,
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
35
|
+
onSelectionChange = props.onSelectionChange,
|
36
|
+
tabListProps = props.tabListProps,
|
37
|
+
disabledKeys = props.disabledKeys,
|
38
|
+
others = _objectWithoutProperties(props, _excluded);
|
43
39
|
var buttonGroupRef = useRef();
|
44
40
|
usePropWarning(props, 'disabled', 'isDisabled');
|
45
41
|
/* istanbul ignore next */
|
46
|
-
|
47
42
|
useImperativeHandle(ref, function () {
|
48
43
|
return buttonGroupRef.current;
|
49
44
|
});
|
50
45
|
var state = useTabListState(_objectSpread(_objectSpread({}, props), {}, {
|
51
46
|
onSelectionChange: onSelectionChange
|
52
47
|
}));
|
53
|
-
|
54
48
|
var _useTabList = useTabList(props, state, buttonGroupRef),
|
55
|
-
|
56
|
-
|
57
|
-
|
49
|
+
raTabListProps = _useTabList.tabListProps;
|
50
|
+
// removed tabList role for now as this isn't really the role we are looking for
|
58
51
|
delete raTabListProps.role;
|
59
52
|
return ___EmotionJSX(RockerContext.Provider, {
|
60
53
|
value: state
|
@@ -76,13 +69,10 @@ var RockerButtonGroup = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
76
69
|
RockerButtonGroup.propTypes = {
|
77
70
|
/** The default button key to be selected. (uncontrolled) */
|
78
71
|
defaultSelectedKey: PropTypes.string,
|
79
|
-
|
80
72
|
/** The button key that is currently selected. (controlled) */
|
81
73
|
selectedKey: PropTypes.string,
|
82
|
-
|
83
74
|
/** Which keys should be disabled. */
|
84
75
|
disabledKeys: PropTypes.arrayOf(PropTypes.string),
|
85
|
-
|
86
76
|
/** Handler that is called when the selected button has changed. */
|
87
77
|
onSelectionChange: PropTypes.func
|
88
78
|
};
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
|
+
import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/esm/objectDestructuringEmpty";
|
2
3
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
3
4
|
import React, { useState } from 'react';
|
4
|
-
import RockerButtonGroup from '../RockerButtonGroup';
|
5
5
|
import RockerButton from '../RockerButton';
|
6
|
+
import RockerButtonGroup from '.';
|
6
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
8
|
export default {
|
8
9
|
title: 'Components/RockerButtonGroup',
|
@@ -27,8 +28,7 @@ export default {
|
|
27
28
|
}
|
28
29
|
};
|
29
30
|
export var Default = function Default(_ref) {
|
30
|
-
var args = _extends({}, _ref);
|
31
|
-
|
31
|
+
var args = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
32
32
|
return ___EmotionJSX(RockerButtonGroup, args, ___EmotionJSX(RockerButton, {
|
33
33
|
name: "and",
|
34
34
|
key: "and"
|
@@ -54,10 +54,9 @@ export var Uncontrolled = function Uncontrolled() {
|
|
54
54
|
};
|
55
55
|
export var Controlled = function Controlled() {
|
56
56
|
var _useState = useState('and'),
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
57
|
+
_useState2 = _slicedToArray(_useState, 2),
|
58
|
+
currentTab = _useState2[0],
|
59
|
+
setCurrentTab = _useState2[1];
|
61
60
|
return ___EmotionJSX(RockerButtonGroup, {
|
62
61
|
selectedKey: currentTab,
|
63
62
|
onSelectionChange: setCurrentTab
|