@pingux/astro 1.42.2 → 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 +0 -24
- 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 +70 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.js +21 -74
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +13 -65
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +26 -106
- package/lib/cjs/components/AccordionGridGroup/index.js +0 -4
- package/lib/cjs/components/AccordionGridItem/AccordionGridItem.js +27 -61
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +24 -57
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +37 -78
- package/lib/cjs/components/AccordionGridItem/index.js +0 -4
- package/lib/cjs/components/AccordionGroup/Accordion.styles.js +69 -0
- package/lib/cjs/components/AccordionGroup/AccordionGroup.js +16 -55
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +12 -44
- package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +30 -129
- package/lib/cjs/components/AccordionGroup/index.js +0 -4
- package/lib/cjs/components/AccordionItem/AccordionItem.js +42 -77
- package/lib/cjs/components/AccordionItem/index.js +0 -4
- package/lib/cjs/components/ArrayField/ArrayField.js +43 -113
- package/lib/cjs/components/ArrayField/ArrayField.stories.js +11 -46
- 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/{Chip → Badge}/Badge.js +15 -55
- package/lib/cjs/components/{Chip → Badge}/Badge.stories.js +43 -77
- package/lib/cjs/components/Badge/Badge.styles.js +162 -0
- package/lib/cjs/components/{Chip → Badge}/Badge.test.js +10 -27
- package/lib/cjs/components/{Chip → Badge}/index.js +2 -6
- package/lib/cjs/components/Box/Box.js +22 -64
- package/lib/cjs/components/Box/Box.stories.js +47 -71
- package/lib/cjs/{styles/variants/tooltip.js → components/Box/Box.styles.js} +3 -5
- 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 +4 -22
- package/lib/cjs/components/Bracket/Bracket.stories.js +8 -19
- package/lib/cjs/components/Bracket/Bracket.styles.js +17 -0
- 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 +50 -0
- package/lib/cjs/components/Breadcrumbs/BreadcrumbItem.js +11 -55
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +12 -44
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +5 -21
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.test.js +10 -28
- package/lib/cjs/components/Breadcrumbs/index.js +2 -8
- package/lib/cjs/components/Button/Button.js +37 -96
- package/lib/cjs/components/Button/Button.stories.js +5 -31
- package/lib/cjs/components/Button/Button.test.js +6 -43
- package/lib/cjs/components/Button/Buttons.styles.js +248 -0
- 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 +21 -0
- 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/{styles/forms/checkbox.js → 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 +31 -94
- package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +38 -98
- 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 +26 -68
- package/lib/cjs/components/CodeView/CodeView.stories.js +15 -26
- package/lib/cjs/{styles/variants/codeView.js → 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 +34 -69
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +13 -59
- package/lib/cjs/{styles/variants/collapsiblePanel.js → components/CollapsiblePanel/CollapsiblePanel.styles.js} +64 -28
- 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 +4 -15
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelBadge.test.js +2 -14
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +20 -51
- 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 +4 -20
- 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 +53 -117
- package/lib/cjs/components/ColorField/ColorField.stories.js +13 -56
- package/lib/cjs/{styles/forms/comboBox.js → components/ColorField/ColorField.styles.js} +8 -24
- package/lib/cjs/components/ColorField/ColorField.test.js +2 -41
- package/lib/cjs/components/ColorField/index.js +0 -4
- package/lib/cjs/{styles/forms/radio.js → components/ComboBox/ComboBox.styles.js} +25 -34
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +49 -89
- package/lib/cjs/components/ComboBox/index.js +0 -4
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +67 -162
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +53 -144
- 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 +3 -21
- package/lib/cjs/components/CopyText/CopyText.js +36 -81
- package/lib/cjs/components/CopyText/CopyText.stories.js +1 -19
- package/lib/cjs/components/CopyText/CopyText.styles.js +54 -0
- 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 +98 -172
- package/lib/cjs/components/DataTable/DataTable.stories.js +25 -73
- package/lib/cjs/components/DataTable/DataTable.styles.js +3 -21
- package/lib/cjs/components/DataTable/DataTable.test.js +88 -228
- package/lib/cjs/components/DataTable/{DataTableChip.js → DataTableBadge.js} +6 -21
- package/lib/cjs/components/DataTable/{DataTableChip.test.js → DataTableBadge.test.js} +1 -7
- 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 +5 -17
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +68 -150
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +65 -140
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +28 -98
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +54 -0
- package/lib/cjs/components/EnvironmentBreadcrumb/index.js +0 -4
- package/lib/cjs/components/FieldHelperText/FieldHelperText.js +5 -28
- package/lib/cjs/components/FieldHelperText/FieldHelperText.stories.js +1 -17
- package/lib/cjs/{styles/variants/bidirectionalIconButton.js → components/FieldHelperText/FieldHelperText.styles.js} +20 -32
- 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 +51 -123
- package/lib/cjs/components/FileInputField/FileInputField.stories.js +23 -67
- package/lib/cjs/components/FileInputField/FileInputField.styles.js +63 -0
- package/lib/cjs/components/FileInputField/FileInputField.test.js +2 -47
- package/lib/cjs/components/FileInputField/FileItem.js +13 -39
- package/lib/cjs/components/FileInputField/FileSelect.js +7 -32
- package/lib/cjs/components/FileInputField/index.js +0 -4
- package/lib/cjs/components/HelpHint/HelpHint.js +7 -29
- package/lib/cjs/components/HelpHint/HelpHint.stories.js +2 -16
- package/lib/cjs/components/HelpHint/HelpHint.styles.js +59 -0
- 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 +5 -36
- 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 +37 -86
- package/lib/cjs/components/IconButton/IconButton.stories.js +9 -31
- package/lib/cjs/components/IconButton/IconButton.styles.js +165 -0
- 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/{styles/variants/images.js → 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 +19 -46
- package/lib/cjs/components/ImageUploadField/ImageUploadField.js +12 -59
- package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +61 -108
- package/lib/cjs/components/ImageUploadField/ImageUploadField.test.js +34 -97
- package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +24 -63
- package/lib/cjs/components/ImageUploadField/imageUpload.js +52 -0
- 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/{styles/forms/input.js → components/Input/Input.styles.js} +28 -37
- 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/{styles/forms/label.js → components/Label/Label.styles.js} +11 -24
- 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 +24 -58
- package/lib/cjs/components/Link/Link.stories.js +6 -18
- package/lib/cjs/{styles/variants/links.js → components/Link/Link.styles.js} +3 -20
- 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 +32 -99
- package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +26 -80
- 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 +41 -83
- package/lib/cjs/{styles/variants/listBox.js → components/ListBox/ListBox.styles.js} +11 -18
- package/lib/cjs/components/ListBox/ListBox.test.js +20 -45
- package/lib/cjs/components/ListBox/ListBoxContext.js +0 -6
- package/lib/cjs/components/ListBox/ListBoxSection.js +14 -37
- 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 +22 -69
- package/lib/cjs/components/ListItem/ListItem.stories.js +26 -125
- package/lib/cjs/components/ListItem/ListItem.styles.js +29 -0
- package/lib/cjs/components/ListItem/ListItem.test.js +14 -70
- package/lib/cjs/components/ListItem/index.js +0 -4
- package/lib/cjs/components/ListView/ListView.js +23 -85
- package/lib/cjs/components/ListView/ListView.stories.js +58 -105
- package/lib/cjs/components/ListView/ListView.test.js +41 -100
- 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 +42 -75
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +72 -0
- 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/{styles/variants/loader.js → 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 +25 -92
- package/lib/cjs/components/Menu/Menu.stories.js +11 -44
- package/lib/cjs/{styles/variants/menu.js → 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 +50 -91
- package/lib/cjs/{styles/variants/menuItem.js → 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 +29 -67
- package/lib/cjs/components/Messages/Message.styles.js +108 -0
- package/lib/cjs/components/Messages/Messages.js +6 -29
- package/lib/cjs/components/Messages/Messages.reducer.js +0 -18
- package/lib/cjs/components/Messages/Messages.stories.js +32 -91
- package/lib/cjs/components/Messages/Messages.test.js +10 -63
- 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 +37 -103
- package/lib/cjs/components/Modal/Modal.stories.js +2 -12
- package/lib/cjs/{styles/variants/modal.js → components/Modal/Modal.styles.js} +13 -33
- 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 +92 -215
- package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +64 -133
- package/lib/cjs/components/MultivaluesField/MultivaluesField.test.js +41 -232
- 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 +5 -36
- package/lib/cjs/{styles/variants/navBar.js → components/NavBar/NavBar.styles.js} +89 -27
- 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 +37 -71
- package/lib/cjs/components/NavBarSection/NavBarItemBody.js +10 -34
- package/lib/cjs/components/NavBarSection/NavBarItemBody.test.js +2 -9
- package/lib/cjs/components/NavBarSection/NavBarItemButton.js +12 -40
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +11 -36
- package/lib/cjs/components/NavBarSection/NavBarItemLink.js +12 -41
- package/lib/cjs/components/NavBarSection/NavBarSection.js +17 -65
- package/lib/cjs/components/NavBarSection/index.js +2 -12
- package/lib/cjs/components/NumberField/NumberField.js +46 -115
- package/lib/cjs/components/NumberField/NumberField.stories.js +7 -49
- package/lib/cjs/{styles/variants/numberField.js → components/NumberField/NumberField.styles.js} +11 -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 +17 -50
- package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +62 -104
- package/lib/cjs/{styles/variants/overlayPanel.js → components/OverlayPanel/OverlayPanel.styles.js} +6 -8
- 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 +54 -138
- package/lib/cjs/components/PasswordField/PasswordField.stories.js +74 -161
- 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 +39 -99
- 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 +35 -84
- package/lib/cjs/components/PopoverMenu/PopoverMenu.stories.js +19 -42
- package/lib/cjs/{styles/variants/popoverMenu.js → 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 +63 -0
- package/lib/cjs/components/Radio/index.js +0 -4
- package/lib/cjs/components/RadioField/RadioField.js +34 -93
- 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 +26 -69
- 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 +19 -52
- package/lib/cjs/components/RockerButton/RockerButton.styles.js +55 -0
- package/lib/cjs/components/RockerButton/index.js +0 -14
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.js +13 -52
- 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 +26 -63
- package/lib/cjs/components/ScrollBox/ScrollBox.stories.js +1 -12
- package/lib/cjs/components/ScrollBox/ScrollBox.styles.js +51 -0
- package/lib/cjs/components/ScrollBox/ScrollBox.test.js +0 -24
- package/lib/cjs/components/ScrollBox/index.js +0 -4
- package/lib/cjs/{styles/forms/search.js → components/SearchField/Search.styles.js} +4 -6
- package/lib/cjs/components/SearchField/SearchField.js +35 -116
- package/lib/cjs/components/SearchField/SearchField.stories.js +11 -57
- package/lib/cjs/components/SearchField/SearchField.test.js +4 -73
- package/lib/cjs/components/SearchField/index.js +0 -4
- package/lib/cjs/{styles/forms/select.js → components/SelectField/Select.styles.js} +8 -25
- package/lib/cjs/components/SelectField/SelectField.js +8 -68
- package/lib/cjs/components/SelectField/SelectField.stories.js +28 -90
- package/lib/cjs/components/SelectField/SelectField.test.js +13 -43
- package/lib/cjs/components/SelectField/index.js +0 -4
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +38 -93
- 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 +10 -32
- package/lib/cjs/components/Separator/Separator.stories.js +3 -15
- package/lib/cjs/{styles/variants/separator.js → 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 +7 -27
- package/lib/cjs/components/Stepper/Stepper.constants.js +0 -2
- package/lib/cjs/components/Stepper/Stepper.js +12 -49
- package/lib/cjs/components/Stepper/Stepper.stories.js +12 -32
- package/lib/cjs/{styles/variants/stepper.js → components/Stepper/Stepper.styles.js} +6 -21
- 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 +2 -17
- package/lib/cjs/{styles/forms/switch.js → components/Switch/Switch.styles.js} +2 -17
- package/lib/cjs/components/Switch/index.js +0 -4
- package/lib/cjs/components/SwitchField/SwitchField.js +47 -116
- package/lib/cjs/components/SwitchField/SwitchField.stories.js +8 -51
- 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 +45 -82
- package/lib/cjs/components/Tab/index.js +0 -14
- package/lib/cjs/components/TabPicker/TabPicker.js +40 -88
- package/lib/cjs/components/TabPicker/index.js +0 -4
- package/lib/cjs/components/Table/Table.js +3 -13
- package/lib/cjs/components/Table/Table.stories.js +4 -22
- package/lib/cjs/{styles/variants/table.js → components/Table/Table.styles.js} +15 -32
- 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 +3 -13
- package/lib/cjs/components/TableBody/index.js +0 -4
- package/lib/cjs/components/TableCaption/TableCaption.js +3 -13
- package/lib/cjs/components/TableCaption/index.js +0 -4
- package/lib/cjs/components/TableCell/TableCell.js +4 -15
- 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 +3 -13
- package/lib/cjs/components/TableRow/index.js +0 -4
- package/lib/cjs/components/Tabs/Tabs.js +21 -81
- package/lib/cjs/components/Tabs/Tabs.stories.js +7 -52
- package/lib/cjs/{styles/variants/tabs.js → components/Tabs/Tabs.style.js} +15 -19
- 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/{styles/variants/text.js → components/Text/Text.styles.js} +4 -215
- 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/{styles/forms/textarea.js → components/TextArea/TextArea.styles.js} +28 -20
- 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 +34 -104
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +26 -81
- 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 +20 -88
- package/lib/cjs/components/TextField/TextField.stories.js +43 -113
- 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 +38 -0
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.js +25 -84
- 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 +8 -29
- package/lib/cjs/components/TooltipTrigger/Tooltip.styles.js +73 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +41 -88
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +7 -40
- 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 +129 -150
- package/lib/cjs/hooks/useField/useField.test.js +112 -89
- 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 +4 -9
- 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 +4 -13
- package/lib/cjs/hooks/useOverlayPanelState/useOverlayPanelState.test.js +5 -8
- 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 +79 -119
- 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 +187 -573
- package/lib/cjs/recipes/ApplicationSearchDropdown.stories.js +26 -73
- package/lib/cjs/recipes/Arrow.stories.js +0 -10
- package/lib/cjs/recipes/AttributeMappingReadOnlyField.stories.js +9 -25
- package/lib/cjs/recipes/AttributesAndPingOneMapping.stories.js +16 -51
- package/lib/cjs/recipes/CollapsiblePanel.stories.js +16 -58
- package/lib/cjs/recipes/ConditionalFilter.stories.js +24 -39
- package/lib/cjs/recipes/CopyToClipboard.stories.js +1 -11
- package/lib/cjs/recipes/CountryPicker.stories.js +18 -56
- package/lib/cjs/recipes/DatePicker.stories.js +70 -61
- 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 +18 -64
- package/lib/cjs/recipes/LinkedListView.stories.js +53 -67
- package/lib/cjs/recipes/ListAndPanel.stories.js +66 -159
- package/lib/cjs/recipes/LogoTabs.stories.js +9 -42
- package/lib/cjs/recipes/MaskedValue.stories.js +21 -33
- package/lib/cjs/recipes/NeutralInput.stories.js +0 -9
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +4 -21
- 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 +178 -124
- package/lib/cjs/recipes/ScrollableListView.stories.js +11 -38
- package/lib/cjs/recipes/SelectedFieldOverlay.story.js +0 -12
- package/lib/cjs/recipes/Slider.stories.js +32 -78
- 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 +49 -93
- package/lib/cjs/styles/breakpoints.js +0 -2
- package/lib/cjs/styles/colors.js +15 -39
- package/lib/cjs/styles/forms/index.js +22 -41
- 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 +18 -0
- package/lib/cjs/styles/theme.js +6 -30
- package/lib/cjs/styles/themeOverrides/index.js +2 -6
- package/lib/cjs/styles/themeOverrides/stories/AccordionGroup.chromatic.stories.js +27 -0
- package/lib/cjs/styles/themeOverrides/stories/Button.chromatic.stories.js +52 -0
- package/lib/cjs/styles/themeOverrides/stories/EnvironmentBreadcrumb.chromatic.stories.js +114 -0
- package/lib/cjs/styles/themeOverrides/stories/IconButton.chromatic.stories.js +36 -0
- package/lib/cjs/styles/themeOverrides/stories/Label.chromatic.stories.js +22 -0
- package/lib/cjs/styles/themeOverrides/stories/Link.chromatic.stories.js +24 -0
- package/lib/cjs/styles/themeOverrides/stories/NavBar.chromatic.stories.js +373 -0
- package/lib/cjs/styles/themeOverrides/stories/NumberField.chromatic.stories.js +22 -0
- package/lib/cjs/styles/themeOverrides/stories/RockerButtonGroup.chromatic.stories.js +31 -0
- package/lib/cjs/styles/themeOverrides/stories/SearchField.chromatic.stories.js +28 -0
- package/lib/cjs/styles/themeOverrides/stories/SelectField.chromatic.stories.js +31 -0
- package/lib/cjs/styles/themeOverrides/uiLibraryOverride.js +69 -67
- package/lib/cjs/{components/List/List.js → styles/themeOverrides/withUiLibraryCss.js} +23 -38
- package/lib/cjs/styles/themes/astro-nano/astro-nano.js +20 -39
- 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 +38 -41
- package/lib/cjs/styles/variants/variants.js +63 -91
- 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 +5 -15
- 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/{hoverProps.js → fieldAttributes.js} +30 -40
- 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 +62 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.js +16 -38
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +11 -38
- package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +18 -12
- package/lib/components/AccordionGridItem/AccordionGridItem.js +26 -36
- package/lib/components/AccordionGridItem/AccordionGridItemBody.js +23 -34
- package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +35 -51
- package/lib/components/AccordionGroup/Accordion.styles.js +61 -0
- package/lib/components/AccordionGroup/AccordionGroup.js +16 -28
- package/lib/components/AccordionGroup/AccordionGroup.stories.js +6 -7
- package/lib/components/AccordionGroup/AccordionGroup.test.js +13 -21
- package/lib/components/AccordionItem/AccordionItem.js +41 -52
- package/lib/components/ArrayField/ArrayField.js +42 -73
- package/lib/components/ArrayField/ArrayField.stories.js +8 -18
- 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/{Chip → Badge}/Badge.js +15 -28
- package/lib/components/{Chip → Badge}/Badge.stories.js +45 -53
- package/lib/components/Badge/Badge.styles.js +150 -0
- package/lib/components/{Chip → Badge}/Badge.test.js +8 -12
- package/lib/components/Badge/index.js +1 -0
- package/lib/components/Box/Box.js +16 -33
- package/lib/components/Box/Box.stories.js +7 -11
- package/lib/components/Box/Box.styles.js +6 -0
- package/lib/components/Box/Box.test.js +7 -7
- package/lib/components/Bracket/Bracket.js +5 -7
- package/lib/components/Bracket/Bracket.stories.js +8 -7
- package/lib/components/Bracket/Bracket.styles.js +9 -0
- package/lib/components/Bracket/Bracket.test.js +3 -4
- package/lib/components/Breadcrumbs/Breadcrumb.styles.js +42 -0
- package/lib/components/Breadcrumbs/BreadcrumbItem.js +10 -30
- package/lib/components/Breadcrumbs/Breadcrumbs.js +11 -21
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +2 -3
- package/lib/components/Breadcrumbs/Breadcrumbs.test.js +7 -8
- package/lib/components/Breadcrumbs/index.js +2 -2
- package/lib/components/Button/Button.js +36 -68
- package/lib/components/Button/Button.stories.js +7 -6
- package/lib/components/Button/Button.test.js +6 -5
- package/lib/components/Button/Buttons.styles.js +234 -0
- 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.styles.js +13 -0
- package/lib/components/Card/Card.test.js +4 -8
- package/lib/components/Checkbox/Checkbox.js +1 -1
- package/lib/{styles/forms/checkbox.js → 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 +31 -66
- package/lib/components/CheckboxField/CheckboxField.stories.js +37 -60
- package/lib/components/CheckboxField/CheckboxField.test.js +23 -23
- package/lib/components/CodeView/CodeView.js +25 -37
- package/lib/components/CodeView/CodeView.stories.js +15 -7
- package/lib/components/CodeView/CodeView.test.js +20 -24
- package/lib/components/CollapsiblePanel/CollapsiblePanel.js +25 -39
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +15 -23
- package/lib/{styles/variants/collapsiblePanel.js → components/CollapsiblePanel/CollapsiblePanel.styles.js} +61 -14
- package/lib/components/CollapsiblePanel/CollapsiblePanel.test.js +2 -3
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelBadge.js +4 -7
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelBadge.test.js +2 -3
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +19 -29
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelContainer.test.js +2 -3
- package/lib/components/CollapsiblePanelItem/CollapsiblePanelItem.js +4 -9
- package/lib/components/CollapsiblePanelItem/CollapsiblePanelItem.test.js +2 -3
- package/lib/components/ColorField/ColorField.js +48 -77
- package/lib/components/ColorField/ColorField.stories.js +13 -31
- package/lib/{styles/forms/comboBox.js → components/ColorField/ColorField.styles.js} +8 -12
- package/lib/components/ColorField/ColorField.test.js +2 -18
- package/lib/{styles/variants/bidirectionalIconButton.js → components/ComboBox/ComboBox.styles.js} +24 -22
- package/lib/components/ComboBox/ComboBoxInput.js +48 -57
- package/lib/components/ComboBoxField/ComboBoxField.js +63 -121
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +52 -70
- package/lib/components/ComboBoxField/ComboBoxField.test.js +153 -159
- package/lib/components/CopyText/CopyButton.js +3 -4
- package/lib/components/CopyText/CopyText.js +31 -57
- package/lib/components/CopyText/CopyText.stories.js +1 -1
- package/lib/components/CopyText/CopyText.styles.js +45 -0
- package/lib/components/CopyText/CopyText.test.js +333 -372
- package/lib/components/DataTable/DataTable.js +84 -125
- package/lib/components/DataTable/DataTable.stories.js +23 -34
- package/lib/components/DataTable/DataTable.styles.js +1 -8
- package/lib/components/DataTable/DataTable.test.js +83 -173
- package/lib/components/DataTable/{DataTableChip.js → DataTableBadge.js} +6 -6
- package/lib/components/DataTable/{DataTableChip.test.js → DataTableBadge.test.js} +2 -4
- 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 +3 -3
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +63 -106
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +65 -103
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +23 -26
- package/lib/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +46 -0
- package/lib/components/FieldHelperText/FieldHelperText.js +6 -9
- package/lib/components/FieldHelperText/FieldHelperText.stories.js +1 -1
- package/lib/{styles/forms/textarea.js → components/FieldHelperText/FieldHelperText.styles.js} +21 -12
- package/lib/components/FieldHelperText/FieldHelperText.test.js +6 -12
- package/lib/components/FileInputField/FileInputField.js +50 -83
- package/lib/components/FileInputField/FileInputField.stories.js +14 -20
- package/lib/components/FileInputField/FileInputField.styles.js +55 -0
- package/lib/components/FileInputField/FileInputField.test.js +2 -7
- package/lib/components/FileInputField/FileItem.js +13 -20
- package/lib/components/FileInputField/FileSelect.js +7 -14
- package/lib/components/HelpHint/HelpHint.js +7 -12
- package/lib/components/HelpHint/HelpHint.stories.js +2 -2
- package/lib/components/HelpHint/HelpHint.styles.js +50 -0
- package/lib/components/HelpHint/HelpHint.test.js +3 -4
- package/lib/components/Icon/Icon.js +4 -11
- package/lib/components/Icon/Icon.stories.js +5 -7
- 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 +37 -59
- package/lib/components/IconButton/IconButton.stories.js +10 -9
- package/lib/components/IconButton/IconButton.styles.js +155 -0
- 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 +17 -27
- package/lib/components/ImageUploadField/ImageUploadField.js +13 -32
- package/lib/components/ImageUploadField/ImageUploadField.stories.js +61 -71
- package/lib/components/ImageUploadField/ImageUploadField.test.js +34 -44
- package/lib/components/ImageUploadField/ImageUploadFieldBase.js +19 -29
- package/lib/components/ImageUploadField/imageUpload.js +44 -0
- package/lib/components/Input/Input.js +4 -11
- package/lib/{styles/forms/input.js → components/Input/Input.styles.js} +26 -19
- 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/{styles/forms/label.js → components/Label/Label.styles.js} +9 -8
- package/lib/components/Label/Label.test.js +4 -7
- package/lib/components/Link/Link.js +22 -37
- package/lib/components/Link/Link.stories.js +5 -5
- package/lib/{styles/variants/links.js → components/Link/Link.styles.js} +1 -6
- package/lib/components/Link/Link.test.js +2 -3
- package/lib/components/LinkSelectField/LinkSelectField.js +32 -73
- package/lib/components/LinkSelectField/LinkSelectField.stories.js +22 -29
- package/lib/components/LinkSelectField/LinkSelectField.test.js +24 -21
- package/lib/components/ListBox/ListBox.js +41 -49
- package/lib/{styles/variants/listBox.js → components/ListBox/ListBox.styles.js} +9 -4
- package/lib/components/ListBox/ListBox.test.js +17 -15
- package/lib/components/ListBox/ListBoxSection.js +15 -20
- package/lib/components/ListBox/Option.js +25 -36
- package/lib/components/ListItem/ListItem.js +21 -45
- package/lib/components/ListItem/ListItem.stories.js +8 -74
- package/lib/components/ListItem/ListItem.styles.js +21 -0
- package/lib/components/ListItem/ListItem.test.js +14 -50
- package/lib/components/ListView/ListView.js +24 -53
- package/lib/components/ListView/ListView.stories.js +30 -48
- package/lib/components/ListView/ListView.test.js +36 -49
- package/lib/components/ListViewItem/ListViewItem.js +39 -53
- package/lib/components/ListViewItem/ListViewItem.styles.js +64 -0
- package/lib/components/Loader/Loader.js +2 -4
- package/lib/components/Loader/Loader.stories.js +2 -3
- package/lib/{styles/variants/loader.js → components/Loader/Loader.styles.js} +0 -9
- package/lib/components/Loader/Loader.test.js +2 -3
- package/lib/components/Menu/Menu.js +20 -55
- package/lib/components/Menu/Menu.stories.js +6 -21
- package/lib/components/Menu/Menu.test.js +21 -15
- package/lib/components/MenuItem/MenuItem.js +48 -69
- package/lib/components/MenuItem/MenuItem.test.js +8 -13
- package/lib/components/Messages/Message.js +30 -46
- package/lib/components/Messages/Message.styles.js +99 -0
- package/lib/components/Messages/Messages.js +6 -9
- 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 +7 -18
- 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 +32 -69
- package/lib/components/Modal/Modal.stories.js +3 -2
- package/lib/{styles/variants/modal.js → components/Modal/Modal.styles.js} +10 -19
- 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 +91 -175
- package/lib/components/MultivaluesField/MultivaluesField.stories.js +64 -92
- package/lib/components/MultivaluesField/MultivaluesField.test.js +41 -48
- package/lib/components/NavBar/NavBar.js +14 -27
- package/lib/components/NavBar/NavBar.stories.js +5 -11
- package/lib/{styles/variants/navBar.js → components/NavBar/NavBar.styles.js} +89 -15
- package/lib/components/NavBar/NavBar.test.js +12 -28
- package/lib/components/NavBarSection/NavBarItem.js +35 -49
- package/lib/components/NavBarSection/NavBarItemBody.js +11 -20
- package/lib/components/NavBarSection/NavBarItemBody.test.js +2 -5
- package/lib/components/NavBarSection/NavBarItemButton.js +13 -23
- package/lib/components/NavBarSection/NavBarItemHeader.js +11 -21
- package/lib/components/NavBarSection/NavBarItemLink.js +13 -24
- package/lib/components/NavBarSection/NavBarSection.js +17 -49
- package/lib/components/NavBarSection/index.js +2 -2
- package/lib/components/NumberField/NumberField.js +43 -80
- package/lib/components/NumberField/NumberField.stories.js +7 -10
- package/lib/{styles/variants/numberField.js → components/NumberField/NumberField.styles.js} +11 -8
- package/lib/components/NumberField/NumberField.test.js +5 -6
- package/lib/components/OverlayPanel/OverlayPanel.js +18 -31
- package/lib/components/OverlayPanel/OverlayPanel.stories.js +56 -73
- package/lib/{styles/variants/overlayPanel.js → components/OverlayPanel/OverlayPanel.styles.js} +6 -6
- 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 +54 -104
- package/lib/components/PasswordField/PasswordField.stories.js +74 -112
- package/lib/components/PasswordField/PasswordField.test.js +24 -21
- package/lib/components/PopoverContainer/PopoverContainer.js +36 -73
- package/lib/components/PopoverContainer/PopoverContainer.test.js +4 -6
- package/lib/components/PopoverMenu/PopoverMenu.js +30 -52
- 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/{styles/forms/radio.js → components/Radio/Radio.styles.js} +28 -6
- package/lib/components/RadioField/RadioField.js +34 -66
- package/lib/components/RadioField/RadioField.test.js +2 -3
- package/lib/components/RadioGroupField/RadioGroupField.js +27 -41
- 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 +18 -27
- package/lib/components/RockerButton/RockerButton.styles.js +47 -0
- package/lib/components/RockerButtonGroup/RockerButtonGroup.js +11 -21
- package/lib/components/RockerButtonGroup/RockerButtonGroup.stories.js +6 -7
- package/lib/components/RockerButtonGroup/RockerButtonGroup.test.js +7 -12
- package/lib/components/ScrollBox/ScrollBox.js +26 -40
- package/lib/components/ScrollBox/ScrollBox.stories.js +1 -1
- package/lib/components/ScrollBox/ScrollBox.styles.js +43 -0
- package/lib/components/ScrollBox/ScrollBox.test.js +0 -3
- package/lib/{styles/forms/search.js → components/SearchField/Search.styles.js} +2 -2
- package/lib/components/SearchField/SearchField.js +34 -89
- package/lib/components/SearchField/SearchField.stories.js +15 -23
- package/lib/components/SearchField/SearchField.test.js +4 -5
- package/lib/{styles/forms/select.js → components/SelectField/Select.styles.js} +5 -7
- package/lib/components/SelectField/SelectField.js +9 -45
- package/lib/components/SelectField/SelectField.stories.js +22 -29
- package/lib/components/SelectField/SelectField.test.js +12 -17
- package/lib/components/SelectFieldBase/SelectFieldBase.js +39 -61
- 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/{styles/variants/separator.js → 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 +7 -9
- package/lib/components/Stepper/Stepper.js +12 -29
- package/lib/components/Stepper/Stepper.stories.js +6 -6
- package/lib/{styles/variants/stepper.js → components/Stepper/Stepper.styles.js} +5 -8
- 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/{styles/forms/switch.js → components/Switch/Switch.styles.js} +1 -4
- package/lib/components/SwitchField/SwitchField.js +48 -87
- package/lib/components/SwitchField/SwitchField.stories.js +8 -14
- package/lib/components/SwitchField/SwitchField.test.js +2 -3
- package/lib/components/Tab/Tab.js +41 -54
- package/lib/components/TabPicker/TabPicker.js +40 -61
- package/lib/components/Table/Table.js +3 -6
- package/lib/components/Table/Table.stories.js +4 -5
- package/lib/{styles/variants/table.js → components/Table/Table.styles.js} +15 -21
- package/lib/components/Table/Table.test.js +7 -9
- package/lib/components/TableBody/TableBody.js +3 -6
- package/lib/components/TableCaption/TableCaption.js +3 -6
- package/lib/components/TableCell/TableCell.js +4 -7
- package/lib/components/TableCell/TableCell.test.js +4 -5
- package/lib/components/TableHead/TableHead.js +2 -5
- package/lib/components/TableRow/TableRow.js +3 -6
- package/lib/components/Tabs/Tabs.js +18 -47
- package/lib/components/Tabs/Tabs.stories.js +7 -13
- package/lib/{styles/variants/tabs.js → components/Tabs/Tabs.style.js} +12 -5
- 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/{styles/variants/text.js → components/Text/Text.styles.js} +3 -205
- package/lib/components/Text/Text.test.js +11 -17
- package/lib/components/TextArea/TextArea.js +2 -2
- package/lib/components/TextArea/TextArea.styles.js +45 -0
- package/lib/components/TextArea/TextArea.test.js +3 -4
- package/lib/components/TextAreaField/TextAreaField.js +36 -83
- package/lib/components/TextAreaField/TextAreaField.stories.js +11 -18
- package/lib/components/TextAreaField/TextAreaField.test.js +5 -10
- package/lib/components/TextField/TextField.js +22 -64
- package/lib/components/TextField/TextField.stories.js +21 -28
- package/lib/components/TextField/TextField.test.js +4 -8
- package/lib/components/TimeZonePicker/TimeZone.styles.js +30 -0
- package/lib/components/TimeZonePicker/TimeZonePicker.js +25 -55
- package/lib/components/TimeZonePicker/TimeZonePicker.test.js +3 -7
- package/lib/components/TooltipTrigger/Tooltip.js +7 -10
- package/lib/components/TooltipTrigger/Tooltip.styles.js +64 -0
- package/lib/components/TooltipTrigger/TooltipTrigger.js +39 -64
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +5 -5
- 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 +126 -124
- package/lib/hooks/useField/useField.test.js +111 -74
- package/lib/hooks/useImageUploadState/useImageUploadState.js +21 -37
- package/lib/hooks/useLabelHeight/useLabelHeight.js +4 -10
- package/lib/hooks/useModalState/useModalState.js +4 -5
- 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 +4 -9
- package/lib/hooks/useOverlayPanelState/useOverlayPanelState.test.js +5 -5
- 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 +73 -86
- 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 +30 -34
- package/lib/recipes/ApplicationSearchDropdown.stories.js +26 -43
- package/lib/recipes/AttributeMappingReadOnlyField.stories.js +10 -13
- package/lib/recipes/AttributesAndPingOneMapping.stories.js +18 -33
- package/lib/recipes/CollapsiblePanel.stories.js +18 -28
- package/lib/recipes/ConditionalFilter.stories.js +25 -28
- package/lib/recipes/CopyToClipboard.stories.js +1 -1
- package/lib/recipes/CountryPicker.stories.js +18 -35
- package/lib/recipes/DatePicker.stories.js +70 -37
- package/lib/recipes/EditableInput.stories.js +34 -57
- package/lib/recipes/FlippableCaretMenuButton.stories.js +18 -33
- package/lib/recipes/LinkedListView.stories.js +49 -47
- package/lib/recipes/ListAndPanel.stories.js +31 -102
- package/lib/recipes/LogoTabs.stories.js +9 -17
- package/lib/recipes/MaskedValue.stories.js +21 -14
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +5 -8
- 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 +177 -107
- package/lib/recipes/ScrollableListView.stories.js +11 -17
- package/lib/recipes/Slider.stories.js +23 -43
- 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 +22 -16
- 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-ui/ThemeView.js +9 -0
- package/lib/styles/theme.js +7 -10
- package/lib/styles/themeOverrides/index.js +1 -1
- package/lib/styles/themeOverrides/stories/AccordionGroup.chromatic.stories.js +17 -0
- package/lib/styles/themeOverrides/stories/Button.chromatic.stories.js +37 -0
- package/lib/styles/themeOverrides/stories/EnvironmentBreadcrumb.chromatic.stories.js +101 -0
- package/lib/styles/themeOverrides/stories/IconButton.chromatic.stories.js +25 -0
- package/lib/styles/themeOverrides/stories/Label.chromatic.stories.js +12 -0
- package/lib/styles/themeOverrides/stories/Link.chromatic.stories.js +14 -0
- package/lib/styles/themeOverrides/stories/NavBar.chromatic.stories.js +363 -0
- package/lib/styles/themeOverrides/stories/NumberField.chromatic.stories.js +12 -0
- package/lib/styles/themeOverrides/stories/RockerButtonGroup.chromatic.stories.js +21 -0
- package/lib/styles/themeOverrides/stories/SearchField.chromatic.stories.js +18 -0
- package/lib/styles/themeOverrides/stories/SelectField.chromatic.stories.js +21 -0
- package/lib/styles/themeOverrides/uiLibraryOverride.js +69 -55
- package/lib/styles/themeOverrides/withUiLibraryCss.js +25 -0
- package/lib/styles/themes/astro-nano/astro-nano.js +20 -23
- 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 +22 -6
- package/lib/styles/variants/variants.js +48 -35
- package/lib/utils/devUtils/constants/htmlElements.js +1 -0
- package/lib/utils/devUtils/constants/variants.js +5 -6
- 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/{hoverProps.js → fieldAttributes.js} +26 -24
- 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 +55 -59
- package/NOTICE.html +0 -4707
- package/lib/cjs/components/ArrayField/ArrayFieldItem.js +0 -50
- package/lib/cjs/components/Chip/Chip.js +0 -58
- package/lib/cjs/components/List/List.stories.js +0 -66
- package/lib/cjs/components/List/List.test.js +0 -36
- package/lib/cjs/components/List/index.js +0 -18
- package/lib/cjs/components/PageHeader/index.js +0 -18
- package/lib/cjs/styles/variants/accordion.js +0 -92
- package/lib/cjs/styles/variants/boxes.js +0 -442
- package/lib/cjs/styles/variants/buttons.js +0 -815
- package/lib/cjs/styles/variants/imageUpload.js +0 -29
- package/lib/cjs/styles/variants/messages.js +0 -53
- package/lib/cjs/styles/variants/rockerbutton.js +0 -25
- package/lib/components/ArrayField/ArrayFieldItem.js +0 -31
- package/lib/components/Chip/Chip.js +0 -38
- package/lib/components/Chip/index.js +0 -1
- package/lib/components/List/List.js +0 -26
- package/lib/components/List/List.stories.js +0 -43
- package/lib/components/List/List.test.js +0 -24
- package/lib/components/List/index.js +0 -1
- package/lib/components/PageHeader/index.js +0 -1
- package/lib/styles/variants/accordion.js +0 -82
- package/lib/styles/variants/boxes.js +0 -421
- package/lib/styles/variants/buttons.js +0 -792
- package/lib/styles/variants/imageUpload.js +0 -19
- package/lib/styles/variants/messages.js +0 -43
- package/lib/styles/variants/rockerbutton.js +0 -15
- package/lib/styles/variants/tooltip.js +0 -6
- /package/lib/{styles/variants/codeView.js → components/CodeView/CodeView.styles.js} +0 -0
- /package/lib/{styles/variants/images.js → components/Image/Image.styles.js} +0 -0
- /package/lib/{styles/variants/menu.js → components/Menu/Menu.styles.js} +0 -0
- /package/lib/{styles/variants/menuItem.js → components/MenuItem/MenuItem.styles.js} +0 -0
- /package/lib/{styles/variants/popoverMenu.js → components/PopoverMenu/PopoverMenu.styles.js} +0 -0
|
@@ -7,12 +7,9 @@ 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
|
-
import { focusWithCroppedOutline } from './buttons';
|
|
12
|
+
import { focusWithCroppedOutline } from '../Button/Buttons.styles';
|
|
16
13
|
var app = {
|
|
17
14
|
color: 'active',
|
|
18
15
|
fontFamily: 'standard',
|
|
@@ -31,7 +28,6 @@ var app = {
|
|
|
31
28
|
pointerEvents: 'none'
|
|
32
29
|
}
|
|
33
30
|
};
|
|
34
|
-
|
|
35
31
|
var web = _objectSpread(_objectSpread({}, app), {}, {
|
|
36
32
|
textDecoration: 'underline',
|
|
37
33
|
'&:visited': {
|
|
@@ -39,7 +35,6 @@ var web = _objectSpread(_objectSpread({}, app), {}, {
|
|
|
39
35
|
},
|
|
40
36
|
'&.is-focused': _objectSpread({}, focusWithCroppedOutline)
|
|
41
37
|
});
|
|
42
|
-
|
|
43
38
|
export default {
|
|
44
39
|
app: app,
|
|
45
40
|
web: web
|
|
@@ -10,13 +10,12 @@ var defaultProps = {
|
|
|
10
10
|
'data-testid': testId,
|
|
11
11
|
children: 'This is a link'
|
|
12
12
|
};
|
|
13
|
-
|
|
14
13
|
var getComponent = function getComponent() {
|
|
15
14
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
15
|
return render(___EmotionJSX(Link, _extends({}, defaultProps, props)));
|
|
17
|
-
};
|
|
18
|
-
|
|
16
|
+
};
|
|
19
17
|
|
|
18
|
+
// Need to be added to each test file to test accessibility using axe.
|
|
20
19
|
axeTest(getComponent);
|
|
21
20
|
test('a link is rendered', function () {
|
|
22
21
|
getComponent();
|
|
@@ -7,23 +7,23 @@ 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
|
+
import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/esm/objectDestructuringEmpty";
|
|
10
11
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
11
12
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
|
12
|
-
|
|
13
13
|
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
14
|
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
15
|
import React, { forwardRef } from 'react';
|
|
18
|
-
import
|
|
16
|
+
import { VisuallyHidden } from 'react-aria';
|
|
19
17
|
import MenuDown from 'mdi-react/MenuDownIcon';
|
|
18
|
+
import PropTypes from 'prop-types';
|
|
20
19
|
import { v4 as uuid } from 'uuid';
|
|
21
|
-
import {
|
|
22
|
-
import { Box, Button, Loader, Icon, Text } from '../../';
|
|
23
|
-
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/devUtils/props/ariaAttributes';
|
|
20
|
+
import { Box, Button, Icon, Loader, Text } from '../..';
|
|
24
21
|
import { usePropWarning, useSelectField } from '../../hooks';
|
|
25
|
-
import SelectFieldBase from '../SelectFieldBase';
|
|
26
22
|
import statuses from '../../utils/devUtils/constants/statuses';
|
|
23
|
+
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/devUtils/props/ariaAttributes';
|
|
24
|
+
import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
|
|
25
|
+
import SelectFieldBase from '../SelectFieldBase';
|
|
26
|
+
|
|
27
27
|
/**
|
|
28
28
|
* Select field (dropdown) that does not rely on native browser or mobile implementations.
|
|
29
29
|
*
|
|
@@ -31,43 +31,38 @@ import statuses from '../../utils/devUtils/constants/statuses';
|
|
|
31
31
|
* and [useSelectState](https://react-spectrum.adobe.com/react-stately/useSelectState.html) from
|
|
32
32
|
* React Stately.
|
|
33
33
|
*/
|
|
34
|
-
|
|
35
34
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
36
35
|
var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
37
36
|
var placeholder = props.placeholder,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
isDisabled = props.isDisabled,
|
|
38
|
+
status = props.status,
|
|
39
|
+
helperText = props.helperText;
|
|
42
40
|
var _getAriaAttributeProp = getAriaAttributeProps(props),
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
ariaProps = _getAriaAttributeProp.ariaProps;
|
|
45
42
|
var helperTextId = uuid();
|
|
46
43
|
usePropWarning(props, 'disabled', 'isDisabled');
|
|
47
|
-
|
|
48
44
|
var _useSelectField = useSelectField(_objectSpread(_objectSpread({
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
triggerRef = selectFieldProps.triggerRef;
|
|
63
|
-
|
|
45
|
+
listboxStyle: {
|
|
46
|
+
width: '10em'
|
|
47
|
+
}
|
|
48
|
+
}, props), {}, {
|
|
49
|
+
// Need this for not applying is-default class
|
|
50
|
+
status: status === statuses.DEFAULT ? null : status
|
|
51
|
+
}), ref),
|
|
52
|
+
selectFieldProps = _extends({}, (_objectDestructuringEmpty(_useSelectField), _useSelectField));
|
|
53
|
+
var fieldControlInputProps = selectFieldProps.fieldControlInputProps,
|
|
54
|
+
isLoadingInitial = selectFieldProps.isLoadingInitial,
|
|
55
|
+
state = selectFieldProps.state,
|
|
56
|
+
triggerProps = selectFieldProps.triggerProps,
|
|
57
|
+
triggerRef = selectFieldProps.triggerRef;
|
|
64
58
|
var trigger = ___EmotionJSX(Button, _extends({
|
|
65
|
-
className:
|
|
59
|
+
className: fieldControlInputProps.className,
|
|
66
60
|
ref: triggerRef,
|
|
67
61
|
variant: "link",
|
|
68
|
-
tabIndex: isDisabled ? -1 : 0
|
|
62
|
+
tabIndex: isDisabled ? -1 : 0
|
|
63
|
+
}, triggerProps, ariaProps, {
|
|
69
64
|
"aria-describedby": helperText && helperTextId
|
|
70
|
-
}
|
|
65
|
+
}), ___EmotionJSX(Text, {
|
|
71
66
|
variant: "label",
|
|
72
67
|
color: "active"
|
|
73
68
|
}, placeholder), ___EmotionJSX(Box, {
|
|
@@ -87,111 +82,75 @@ var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
87
82
|
"aria-live": "polite",
|
|
88
83
|
id: helperTextId
|
|
89
84
|
}, helperText));
|
|
90
|
-
|
|
91
85
|
return ___EmotionJSX(SelectFieldBase, _extends({}, props, selectFieldProps, {
|
|
92
86
|
trigger: trigger
|
|
93
87
|
}));
|
|
94
88
|
});
|
|
95
|
-
LinkSelectField.propTypes = _objectSpread({
|
|
89
|
+
LinkSelectField.propTypes = _objectSpread(_objectSpread({
|
|
96
90
|
/** Alignment of the popover menu relative to the trigger. */
|
|
97
91
|
align: PropTypes.oneOf(['start', 'end', 'middle']),
|
|
98
|
-
|
|
99
92
|
/** Where the popover menu opens relative to its trigger. */
|
|
100
93
|
direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
101
|
-
|
|
102
94
|
/** The initial selected key in the collection (uncontrolled). */
|
|
103
95
|
defaultSelectedKey: PropTypes.string,
|
|
104
|
-
|
|
105
96
|
/** Array of keys to disable within the options list. */
|
|
106
97
|
disabledKeys: PropTypes.arrayOf(PropTypes.string),
|
|
107
|
-
|
|
108
98
|
/** Whether the collection allows empty selection. */
|
|
109
99
|
hasNoEmptySelection: PropTypes.bool,
|
|
110
|
-
|
|
111
100
|
/** Whether the field has a status indicator. */
|
|
112
101
|
hasNoStatusIndicator: PropTypes.bool,
|
|
113
|
-
|
|
114
102
|
/** Text rendered below the input. */
|
|
115
103
|
helperText: PropTypes.node,
|
|
116
|
-
|
|
117
104
|
/** If present this prop will cause a help hint to render in the label of the field. */
|
|
118
105
|
hintText: PropTypes.string,
|
|
119
|
-
|
|
120
106
|
/** Sets the default open state of the menu. */
|
|
121
107
|
isDefaultOpen: PropTypes.bool,
|
|
122
|
-
|
|
123
108
|
/** Whether the input is disabled. */
|
|
124
109
|
isDisabled: PropTypes.bool,
|
|
125
|
-
|
|
126
110
|
/** Whether the items are currently loading. */
|
|
127
111
|
isLoading: PropTypes.bool,
|
|
128
|
-
|
|
129
112
|
/** @ignore Whether the menu should automatically flip direction when space is limited. */
|
|
130
113
|
isNotFlippable: PropTypes.bool,
|
|
131
|
-
|
|
132
114
|
/** Sets the open state of the menu. */
|
|
133
115
|
isOpen: PropTypes.bool,
|
|
134
|
-
|
|
135
116
|
/** @ignore Whether the input can be selected but not changed by the user. */
|
|
136
117
|
isReadOnly: PropTypes.bool,
|
|
137
|
-
|
|
138
118
|
/** Whether user input is required on the input before form submission. */
|
|
139
119
|
isRequired: PropTypes.bool,
|
|
140
|
-
|
|
141
120
|
/**
|
|
142
121
|
* *For performance reasons, use this prop instead of Array.map when iteratively rendering Items*.
|
|
143
122
|
* For use with [dynamic collections](https://react-spectrum.adobe.com/react-stately/collections.html#dynamic-collections).
|
|
144
123
|
*/
|
|
145
124
|
items: PropTypes.arrayOf(PropTypes.shape({})),
|
|
146
|
-
|
|
147
125
|
/** The label for the select element. */
|
|
148
126
|
label: PropTypes.node,
|
|
149
|
-
|
|
150
127
|
/** The name for the select element, used when submitting a form. */
|
|
151
128
|
name: PropTypes.string,
|
|
152
|
-
|
|
153
129
|
/** Temporary text that occupies the text input when it is empty. */
|
|
154
130
|
placeholder: PropTypes.string,
|
|
155
|
-
|
|
156
131
|
/** The currently selected key in the collection (controlled). */
|
|
157
132
|
selectedKey: PropTypes.string,
|
|
158
|
-
|
|
159
133
|
/** Determines the type of label applied to the component. */
|
|
160
134
|
status: PropTypes.oneOf(_Object$values(statuses)),
|
|
161
|
-
|
|
162
135
|
/**
|
|
163
136
|
* Handler that is called when more items should be loaded, e.g. while scrolling near the bottom.
|
|
164
137
|
*
|
|
165
138
|
* () => any
|
|
166
139
|
*/
|
|
167
140
|
onLoadMore: PropTypes.func,
|
|
168
|
-
|
|
169
141
|
/**
|
|
170
142
|
* Method that is called when the open state of the menu changes.
|
|
171
143
|
*
|
|
172
144
|
* (isOpen: boolean) => void
|
|
173
145
|
*/
|
|
174
146
|
onOpenChange: PropTypes.func,
|
|
175
|
-
|
|
176
147
|
/**
|
|
177
148
|
* Handler that is called when the selection changes.
|
|
178
149
|
*
|
|
179
150
|
* (key: Key) => any
|
|
180
151
|
*/
|
|
181
|
-
onSelectionChange: PropTypes.func
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Props object passed along to `useSelect` from React Aria, `useSelectState` from React Stately,
|
|
185
|
-
* and/or the visible button representation for the select input.
|
|
186
|
-
*/
|
|
187
|
-
controlProps: PropTypes.shape({}),
|
|
188
|
-
|
|
189
|
-
/** Props object passed along to the root container as-is. */
|
|
190
|
-
containerProps: PropTypes.shape({}),
|
|
191
|
-
|
|
192
|
-
/** Props object passed along to the label as-is. */
|
|
193
|
-
labelProps: PropTypes.shape({})
|
|
194
|
-
}, ariaAttributesBasePropTypes);
|
|
152
|
+
onSelectionChange: PropTypes.func
|
|
153
|
+
}, inputFieldAttributesBasePropTypes), ariaAttributesBasePropTypes);
|
|
195
154
|
LinkSelectField.defaultProps = {
|
|
196
155
|
placeholder: 'Select',
|
|
197
156
|
status: statuses.DEFAULT,
|
|
@@ -6,29 +6,32 @@ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/inst
|
|
|
6
6
|
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
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
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
10
|
+
import _Object$create from "@babel/runtime-corejs3/core-js-stable/object/create";
|
|
11
|
+
import _Object$getPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/get-prototype-of";
|
|
12
|
+
import _Object$setPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/set-prototype-of";
|
|
13
|
+
import _reverseInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reverse";
|
|
14
|
+
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
15
|
+
import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
|
|
9
16
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
|
|
10
17
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
11
18
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
12
19
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
13
|
-
|
|
14
20
|
var _context, _context2;
|
|
15
|
-
|
|
16
|
-
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
21
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context6; _forEachInstanceProperty(_context6 = ["next", "throw", "return"]).call(_context6, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context7; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context7 = this.tryEntries).call(_context7, resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
17
22
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
18
23
|
import _fillInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/fill";
|
|
19
24
|
import _Promise from "@babel/runtime-corejs3/core-js-stable/promise";
|
|
20
25
|
import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
|
21
|
-
|
|
22
26
|
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; }
|
|
23
|
-
|
|
24
27
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
-
|
|
26
28
|
import React, { useState } from 'react';
|
|
27
|
-
import { OverlayProvider } from '
|
|
28
|
-
import { useAsyncList } from '
|
|
29
|
-
import { Box, Item, LinkSelectField, Separator } from '
|
|
30
|
-
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
|
29
|
+
import { OverlayProvider } from 'react-aria';
|
|
30
|
+
import { useAsyncList } from 'react-stately';
|
|
31
|
+
import { Box, Item, LinkSelectField, Separator } from '../..';
|
|
31
32
|
import statuses from '../../utils/devUtils/constants/statuses';
|
|
33
|
+
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
|
34
|
+
import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
|
|
32
35
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
33
36
|
export default {
|
|
34
37
|
title: 'Form/LinkSelectField',
|
|
@@ -40,7 +43,7 @@ export default {
|
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
},
|
|
43
|
-
argTypes: _objectSpread({
|
|
46
|
+
argTypes: _objectSpread(_objectSpread({
|
|
44
47
|
label: {
|
|
45
48
|
control: {
|
|
46
49
|
type: 'text'
|
|
@@ -76,13 +79,12 @@ export default {
|
|
|
76
79
|
isDisabled: {},
|
|
77
80
|
isOpen: {},
|
|
78
81
|
isRequired: {},
|
|
79
|
-
controlProps: {},
|
|
80
82
|
selectedKey: {
|
|
81
83
|
control: {
|
|
82
84
|
type: 'none'
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
|
-
}, ariaAttributeBaseArgTypes)
|
|
87
|
+
}, ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes)
|
|
86
88
|
};
|
|
87
89
|
export var Default = function Default(args) {
|
|
88
90
|
return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(LinkSelectField, _extends({}, args, {
|
|
@@ -143,14 +145,12 @@ LeftLabel.parameters = {
|
|
|
143
145
|
};
|
|
144
146
|
export var Controlled = function Controlled() {
|
|
145
147
|
var _useState = useState('yellow'),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
149
|
+
selectedKey = _useState2[0],
|
|
150
|
+
setSelectedKey = _useState2[1];
|
|
150
151
|
var handleSelectionChange = function handleSelectionChange(key) {
|
|
151
152
|
return setSelectedKey(key);
|
|
152
153
|
};
|
|
153
|
-
|
|
154
154
|
return ___EmotionJSX(LinkSelectField, {
|
|
155
155
|
selectedKey: selectedKey,
|
|
156
156
|
onSelectionChange: handleSelectionChange,
|
|
@@ -223,20 +223,17 @@ export var HelperText = function HelperText() {
|
|
|
223
223
|
key: "yellow"
|
|
224
224
|
}, "Yellow"));
|
|
225
225
|
};
|
|
226
|
-
|
|
227
226
|
var options = _mapInstanceProperty(_context = _fillInstanceProperty(_context2 = new Array(200)).call(_context2)).call(_context, function (_, i) {
|
|
228
227
|
return {
|
|
229
228
|
key: "option-".concat(i),
|
|
230
229
|
name: "Option ".concat(i)
|
|
231
230
|
};
|
|
232
231
|
});
|
|
233
|
-
|
|
234
232
|
export var DynamicItems = function DynamicItems() {
|
|
235
233
|
// options = new Array(200).fill().map((_, i) => ({ key: `option-${i}`, name: `Option ${i}` }));
|
|
236
234
|
var _useState3 = useState(options),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
235
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
236
|
+
items = _useState4[0];
|
|
240
237
|
return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(LinkSelectField, {
|
|
241
238
|
label: "Select an option...",
|
|
242
239
|
items: items
|
|
@@ -255,9 +252,9 @@ export var AsyncLoading = function AsyncLoading() {
|
|
|
255
252
|
// This example uses `useAsyncList` from "@react-stately/data"
|
|
256
253
|
var list = useAsyncList({
|
|
257
254
|
load: function load(_ref) {
|
|
258
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
255
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
259
256
|
var signal, cursor, res, json;
|
|
260
|
-
return _regeneratorRuntime.wrap(function _callee$(_context3) {
|
|
257
|
+
return _regeneratorRuntime().wrap(function _callee$(_context3) {
|
|
261
258
|
while (1) {
|
|
262
259
|
switch (_context3.prev = _context3.next) {
|
|
263
260
|
case 0:
|
|
@@ -266,25 +263,21 @@ export var AsyncLoading = function AsyncLoading() {
|
|
|
266
263
|
return fetch(cursor || 'https://pokeapi.co/api/v2/pokemon', {
|
|
267
264
|
signal: signal
|
|
268
265
|
});
|
|
269
|
-
|
|
270
266
|
case 3:
|
|
271
267
|
res = _context3.sent;
|
|
272
268
|
_context3.next = 6;
|
|
273
269
|
return res.json();
|
|
274
|
-
|
|
275
270
|
case 6:
|
|
276
271
|
json = _context3.sent;
|
|
277
272
|
_context3.next = 9;
|
|
278
273
|
return new _Promise(function (resolve) {
|
|
279
274
|
return _setTimeout(resolve, cursor ? 2000 : 3000);
|
|
280
275
|
});
|
|
281
|
-
|
|
282
276
|
case 9:
|
|
283
277
|
return _context3.abrupt("return", {
|
|
284
278
|
items: json.results,
|
|
285
279
|
cursor: json.next
|
|
286
280
|
});
|
|
287
|
-
|
|
288
281
|
case 10:
|
|
289
282
|
case "end":
|
|
290
283
|
return _context3.stop();
|
|
@@ -1,12 +1,22 @@
|
|
|
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 _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
6
|
+
import _Object$setPrototypeOf from "@babel/runtime-corejs3/core-js-stable/object/set-prototype-of";
|
|
7
|
+
import _Promise from "@babel/runtime-corejs3/core-js-stable/promise";
|
|
8
|
+
import _reverseInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reverse";
|
|
9
|
+
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
10
|
+
import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
|
|
1
11
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
|
|
2
12
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
3
|
-
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; }
|
|
4
14
|
import React from 'react';
|
|
5
|
-
import { axe } from 'jest-axe';
|
|
6
15
|
import userEvent from '@testing-library/user-event';
|
|
16
|
+
import { axe } from 'jest-axe';
|
|
17
|
+
import { Item, LinkSelectField } from '../../index';
|
|
7
18
|
import statuses from '../../utils/devUtils/constants/statuses';
|
|
8
19
|
import { render, screen, within } from '../../utils/testUtils/testWrapper';
|
|
9
|
-
import { LinkSelectField, Item } from '../../index';
|
|
10
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
11
21
|
var items = [{
|
|
12
22
|
name: 'a'
|
|
@@ -27,21 +37,17 @@ var defaultProps = {
|
|
|
27
37
|
value: testValue,
|
|
28
38
|
items: items
|
|
29
39
|
};
|
|
30
|
-
|
|
31
40
|
var getComponent = function getComponent() {
|
|
32
41
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33
|
-
|
|
34
42
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
_ref$renderFn = _ref.renderFn,
|
|
44
|
+
renderFn = _ref$renderFn === void 0 ? render : _ref$renderFn;
|
|
38
45
|
return renderFn(___EmotionJSX(LinkSelectField, _extends({}, defaultProps, props), function (item) {
|
|
39
46
|
return ___EmotionJSX(Item, {
|
|
40
47
|
key: item.name
|
|
41
48
|
}, item.name);
|
|
42
49
|
}));
|
|
43
50
|
};
|
|
44
|
-
|
|
45
51
|
var onSelectionChange = jest.fn();
|
|
46
52
|
beforeAll(function () {
|
|
47
53
|
jest.spyOn(window.HTMLElement.prototype, 'clientWidth', 'get').mockImplementation(function () {
|
|
@@ -84,16 +90,17 @@ test('default select field', function () {
|
|
|
84
90
|
expect(hiddenInput).toBeInTheDocument();
|
|
85
91
|
expect(visibleInput).toBeInTheDocument();
|
|
86
92
|
expect(hiddenLabel).toBeInTheDocument();
|
|
87
|
-
expect(visibleLabel).toBeInTheDocument();
|
|
93
|
+
expect(visibleLabel).toBeInTheDocument();
|
|
88
94
|
|
|
95
|
+
// jest-dom .toBeVisible does not take into account aria-hidden
|
|
89
96
|
/* eslint-disable testing-library/no-node-access */
|
|
90
|
-
|
|
91
97
|
expect(hiddenInput.closest('[aria-hidden="true"]')).not.toBeNull();
|
|
92
98
|
expect(visibleInput.closest('[aria-hidden="true"]')).toBeNull();
|
|
93
99
|
expect(hiddenLabel.closest('[aria-hidden="true"]')).not.toBeNull();
|
|
94
100
|
expect(visibleLabel.closest('[aria-hidden="true"]')).toBeNull();
|
|
95
101
|
/* eslint-enable testing-library/no-node-access */
|
|
96
102
|
});
|
|
103
|
+
|
|
97
104
|
test('control props work for visible button control', function () {
|
|
98
105
|
getComponent();
|
|
99
106
|
var inputs = screen.getAllByLabelText(defaultProps.label);
|
|
@@ -151,11 +158,10 @@ test('select field with helper text', function () {
|
|
|
151
158
|
});
|
|
152
159
|
test('displays a loader while loading', function () {
|
|
153
160
|
var _getComponent = getComponent({
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
161
|
+
items: [],
|
|
162
|
+
isLoading: true
|
|
163
|
+
}),
|
|
164
|
+
rerender = _getComponent.rerender;
|
|
159
165
|
var button = screen.getByRole('button');
|
|
160
166
|
var loader = within(button).getByRole('alert');
|
|
161
167
|
expect(loader).toHaveAttribute('aria-label', 'Loading in progress');
|
|
@@ -178,10 +184,9 @@ test('passing helper text should display it and correct aria attributes on input
|
|
|
178
184
|
var helperTextID = helper.getAttribute('id');
|
|
179
185
|
expect(screen.getByRole('button')).toHaveAttribute('aria-describedby', helperTextID);
|
|
180
186
|
});
|
|
181
|
-
test('should have no accessibility violations', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
187
|
+
test('should have no accessibility violations', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
182
188
|
var _getComponent2, container, results;
|
|
183
|
-
|
|
184
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
189
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
185
190
|
while (1) {
|
|
186
191
|
switch (_context.prev = _context.next) {
|
|
187
192
|
case 0:
|
|
@@ -189,11 +194,9 @@ test('should have no accessibility violations', /*#__PURE__*/_asyncToGenerator(
|
|
|
189
194
|
_getComponent2 = getComponent(), container = _getComponent2.container;
|
|
190
195
|
_context.next = 4;
|
|
191
196
|
return axe(container);
|
|
192
|
-
|
|
193
197
|
case 4:
|
|
194
198
|
results = _context.sent;
|
|
195
199
|
expect(results).toHaveNoViolations();
|
|
196
|
-
|
|
197
200
|
case 6:
|
|
198
201
|
case "end":
|
|
199
202
|
return _context.stop();
|