@pingux/astro 1.42.0-alpha.0 → 2.0.0-alpha.1
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/lib/cjs/components/AccordionGridGroup/AccordionGrid.styles.js +85 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.js +6 -6
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +5 -28
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +8 -8
- package/lib/cjs/components/AccordionGridItem/AccordionGridItem.js +4 -4
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +4 -4
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +6 -8
- package/lib/cjs/components/AccordionGroup/Accordion.styles.js +86 -0
- package/lib/cjs/components/AccordionGroup/AccordionGroup.js +3 -3
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +7 -7
- package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +15 -15
- package/lib/cjs/components/AccordionItem/AccordionItem.js +8 -10
- package/lib/cjs/components/ArrayField/ArrayField.js +18 -20
- package/lib/cjs/components/ArrayField/ArrayField.stories.js +4 -4
- package/lib/cjs/components/{Chip → Badge}/Badge.js +1 -1
- package/lib/cjs/components/{Chip → Badge}/Badge.stories.js +29 -26
- package/lib/cjs/components/Badge/Badge.styles.js +191 -0
- package/lib/cjs/components/{Chip → Badge}/Badge.test.js +6 -6
- package/lib/cjs/components/{Chip → Badge}/index.js +2 -2
- package/lib/cjs/components/Box/Box.js +2 -2
- package/lib/cjs/{styles/variants/tooltip.js → components/Box/Box.styles.js} +3 -3
- package/lib/cjs/components/Bracket/Bracket.js +1 -1
- package/lib/cjs/components/Bracket/Bracket.stories.js +7 -6
- package/lib/cjs/components/Bracket/Bracket.styles.js +19 -0
- package/lib/cjs/components/Breadcrumbs/Breadcrumb.styles.js +65 -0
- package/lib/cjs/components/Breadcrumbs/BreadcrumbItem.js +4 -6
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +5 -7
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +6 -6
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.test.js +6 -6
- package/lib/cjs/components/Button/Button.js +5 -18
- package/lib/cjs/components/Button/Button.stories.js +1 -1
- package/lib/cjs/components/Button/Buttons.styles.js +276 -0
- package/lib/cjs/components/Card/Card.styles.js +23 -0
- package/lib/cjs/{styles/forms/checkbox.js → components/Checkbox/Checkbox.styles.js} +0 -0
- package/lib/cjs/components/CheckboxField/CheckboxField.js +14 -19
- package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +5 -18
- package/lib/cjs/components/CodeView/CodeView.js +2 -2
- package/lib/cjs/components/CodeView/CodeView.stories.js +1 -1
- package/lib/cjs/{styles/variants/codeView.js → components/CodeView/CodeView.styles.js} +0 -0
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.js +7 -9
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +2 -2
- package/lib/cjs/{styles/variants/collapsiblePanel.js → components/CollapsiblePanel/CollapsiblePanel.styles.js} +72 -13
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelBadge.js +2 -2
- package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +4 -4
- package/lib/cjs/components/CollapsiblePanelItem/CollapsiblePanelItem.js +1 -1
- package/lib/cjs/components/ColorField/ColorField.js +23 -31
- package/lib/cjs/components/ColorField/ColorField.stories.js +4 -17
- package/lib/cjs/{styles/forms/comboBox.js → components/ColorField/ColorField.styles.js} +9 -9
- package/lib/cjs/{styles/forms/radio.js → components/ComboBox/ComboBox.styles.js} +27 -19
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +20 -24
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +10 -14
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +3 -3
- package/lib/cjs/components/CopyText/CopyButton.js +2 -3
- package/lib/cjs/components/CopyText/CopyText.js +8 -10
- package/lib/cjs/components/CopyText/CopyText.styles.js +69 -0
- package/lib/cjs/components/DataTable/DataTable.js +46 -26
- package/lib/cjs/components/DataTable/DataTable.stories.js +7 -7
- package/lib/cjs/components/DataTable/DataTable.styles.js +3 -3
- package/lib/cjs/components/DataTable/DataTable.test.js +8 -8
- package/lib/cjs/components/DataTable/{DataTableChip.js → DataTableBadge.js} +4 -4
- package/lib/cjs/components/DataTable/{DataTableChip.test.js → DataTableBadge.test.js} +1 -1
- package/lib/cjs/components/DataTable/index.js +3 -3
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +14 -18
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +23 -23
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +3 -5
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +69 -0
- package/lib/cjs/components/FieldHelperText/FieldHelperText.js +1 -1
- package/lib/cjs/{styles/variants/bidirectionalIconButton.js → components/FieldHelperText/FieldHelperText.styles.js} +21 -17
- package/lib/cjs/components/FileInputField/FileInputField.js +16 -13
- package/lib/cjs/components/FileInputField/FileInputField.stories.js +4 -2
- package/lib/cjs/components/FileInputField/FileInputField.styles.js +78 -0
- package/lib/cjs/components/FileInputField/FileItem.js +7 -7
- package/lib/cjs/components/FileInputField/FileSelect.js +1 -1
- package/lib/cjs/components/HelpHint/HelpHint.js +3 -4
- package/lib/cjs/components/HelpHint/HelpHint.styles.js +74 -0
- package/lib/cjs/components/IconButton/IconButton.js +9 -11
- package/lib/cjs/components/IconButton/IconButton.stories.js +2 -2
- package/lib/cjs/components/IconButton/IconButton.styles.js +194 -0
- package/lib/cjs/{styles/variants/images.js → components/Image/Image.styles.js} +0 -0
- package/lib/cjs/components/ImageUploadField/ImagePreviewButton.js +6 -8
- package/lib/cjs/components/ImageUploadField/ImageUploadField.js +4 -2
- package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +4 -2
- package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +8 -7
- package/lib/cjs/components/ImageUploadField/imageUpload.js +69 -0
- package/lib/cjs/{styles/forms/input.js → components/Input/Input.styles.js} +21 -15
- package/lib/cjs/{styles/forms/label.js → components/Label/Label.styles.js} +4 -4
- package/lib/cjs/components/Link/Link.js +5 -9
- package/lib/cjs/components/Link/Link.stories.js +2 -2
- package/lib/cjs/{styles/variants/links.js → components/Link/Link.styles.js} +3 -3
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +10 -19
- package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +10 -9
- package/lib/cjs/components/ListBox/ListBox.js +6 -6
- package/lib/cjs/{styles/variants/listBox.js → components/ListBox/ListBox.styles.js} +11 -3
- package/lib/cjs/components/ListBox/ListBox.test.js +3 -3
- package/lib/cjs/components/ListBox/ListBoxSection.js +3 -3
- package/lib/cjs/components/ListBox/Option.js +2 -2
- package/lib/cjs/components/ListItem/ListItem.js +1 -1
- package/lib/cjs/components/ListItem/ListItem.styles.js +31 -0
- package/lib/cjs/components/ListView/ListView.stories.js +8 -10
- package/lib/cjs/components/ListView/ListView.test.js +8 -8
- package/lib/cjs/components/ListViewItem/ListViewItem.js +7 -9
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +88 -0
- package/lib/cjs/{styles/variants/loader.js → components/Loader/Loader.styles.js} +0 -0
- package/lib/cjs/components/Menu/Menu.js +7 -9
- package/lib/cjs/components/Menu/Menu.stories.js +4 -4
- package/lib/cjs/{styles/variants/menu.js → components/Menu/Menu.styles.js} +0 -0
- package/lib/cjs/components/MenuItem/MenuItem.js +3 -5
- package/lib/cjs/{styles/variants/menuItem.js → components/MenuItem/MenuItem.styles.js} +0 -0
- package/lib/cjs/components/Messages/Message.js +3 -3
- package/lib/cjs/components/Messages/Message.styles.js +110 -0
- package/lib/cjs/components/Messages/Messages.js +1 -1
- package/lib/cjs/components/Messages/Messages.stories.js +14 -14
- package/lib/cjs/components/Messages/Messages.test.js +4 -4
- package/lib/cjs/components/Modal/Modal.js +9 -24
- package/lib/cjs/{styles/variants/modal.js → components/Modal/Modal.styles.js} +13 -16
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +15 -18
- package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +10 -8
- package/lib/cjs/components/MultivaluesField/MultivaluesField.test.js +14 -14
- package/lib/cjs/components/NavBar/NavBar.stories.js +1 -1
- package/lib/cjs/{styles/variants/navBar.js → components/NavBar/NavBar.styles.js} +96 -10
- package/lib/cjs/components/NavBarSection/NavBarItem.js +7 -9
- package/lib/cjs/components/NavBarSection/NavBarItemBody.js +1 -1
- package/lib/cjs/components/NavBarSection/NavBarItemButton.js +1 -1
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +1 -1
- package/lib/cjs/components/NavBarSection/NavBarItemLink.js +1 -1
- package/lib/cjs/components/NavBarSection/NavBarSection.js +2 -2
- package/lib/cjs/components/NumberField/NumberField.js +31 -29
- package/lib/cjs/components/NumberField/NumberField.stories.js +4 -2
- package/lib/cjs/{styles/variants/numberField.js → components/NumberField/NumberField.styles.js} +13 -3
- package/lib/cjs/components/OverlayPanel/OverlayPanel.js +4 -4
- package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +23 -22
- package/lib/cjs/{styles/variants/overlayPanel.js → components/OverlayPanel/OverlayPanel.styles.js} +6 -6
- package/lib/cjs/components/PasswordField/PasswordField.js +20 -25
- package/lib/cjs/components/PasswordField/PasswordField.stories.js +4 -2
- package/lib/cjs/components/PopoverContainer/PopoverContainer.js +7 -31
- package/lib/cjs/components/PopoverMenu/PopoverMenu.js +8 -12
- package/lib/cjs/{styles/variants/popoverMenu.js → components/PopoverMenu/PopoverMenu.styles.js} +0 -0
- package/lib/cjs/components/Radio/Radio.styles.js +75 -0
- package/lib/cjs/components/RadioField/RadioField.js +15 -19
- package/lib/cjs/components/RadioGroupField/RadioGroupField.js +12 -8
- package/lib/cjs/components/RockerButton/RockerButton.js +5 -5
- package/lib/cjs/components/RockerButton/RockerButton.styles.js +72 -0
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.js +6 -6
- package/lib/cjs/components/ScrollBox/ScrollBox.js +3 -3
- package/lib/cjs/components/ScrollBox/ScrollBox.styles.js +53 -0
- package/lib/cjs/{styles/forms/search.js → components/SearchField/Search.styles.js} +4 -4
- package/lib/cjs/components/SearchField/SearchField.js +16 -22
- package/lib/cjs/components/SearchField/SearchField.stories.js +4 -5
- package/lib/cjs/{styles/forms/select.js → components/SelectField/Select.styles.js} +6 -6
- package/lib/cjs/components/SelectField/SelectField.js +5 -9
- package/lib/cjs/components/SelectField/SelectField.stories.js +12 -11
- package/lib/cjs/components/SelectField/SelectField.test.js +2 -2
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +19 -16
- package/lib/cjs/components/Separator/Separator.js +2 -2
- package/lib/cjs/{styles/variants/separator.js → components/Separator/Separator.styles.js} +0 -0
- package/lib/cjs/components/Stepper/Step.js +4 -4
- package/lib/cjs/{styles/variants/stepper.js → components/Stepper/Stepper.styles.js} +4 -4
- package/lib/cjs/components/Switch/Switch.js +2 -2
- package/lib/cjs/{styles/forms/switch.js → components/Switch/Switch.styles.js} +2 -2
- package/lib/cjs/components/SwitchField/SwitchField.js +17 -23
- package/lib/cjs/components/SwitchField/SwitchField.stories.js +4 -5
- package/lib/cjs/components/Tab/Tab.js +7 -11
- package/lib/cjs/components/TabPicker/TabPicker.js +5 -5
- package/lib/cjs/components/Table/Table.js +1 -1
- package/lib/cjs/{styles/variants/table.js → components/Table/Table.styles.js} +15 -15
- package/lib/cjs/components/TableBody/TableBody.js +1 -1
- package/lib/cjs/components/TableCaption/TableCaption.js +1 -1
- package/lib/cjs/components/TableCell/TableCell.js +1 -1
- package/lib/cjs/components/TableRow/TableRow.js +1 -1
- package/lib/cjs/components/Tabs/Tabs.js +5 -5
- package/lib/cjs/components/Tabs/Tabs.stories.js +1 -1
- package/lib/cjs/{styles/variants/tabs.js → components/Tabs/Tabs.style.js} +17 -4
- package/lib/cjs/{styles/variants/text.js → components/Text/Text.styles.js} +4 -195
- package/lib/cjs/{styles/forms/textarea.js → components/TextArea/TextArea.styles.js} +27 -4
- package/lib/cjs/components/TextAreaField/TextAreaField.js +18 -24
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +4 -5
- package/lib/cjs/components/TextField/TextField.js +11 -19
- package/lib/cjs/components/TextField/TextField.stories.js +4 -2
- package/lib/cjs/components/TimeZonePicker/TimeZone.styles.js +40 -0
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.js +4 -4
- package/lib/cjs/components/TooltipTrigger/Tooltip.js +4 -4
- package/lib/cjs/components/TooltipTrigger/Tooltip.styles.js +93 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +6 -8
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +6 -6
- package/lib/cjs/hooks/useField/useField.js +43 -20
- package/lib/cjs/hooks/useField/useField.test.js +55 -16
- package/lib/cjs/hooks/useModalState/useModalState.js +2 -2
- package/lib/cjs/hooks/useOverlayPanelState/useOverlayPanelState.js +2 -2
- package/lib/cjs/hooks/useOverlayPanelState/useOverlayPanelState.test.js +2 -1
- package/lib/cjs/hooks/useSelectField/useSelectField.js +12 -14
- package/lib/cjs/index.js +82 -119
- package/lib/cjs/recipes/ApplicationSearchDropdown.stories.js +7 -7
- package/lib/cjs/recipes/AttributeMappingReadOnlyField.stories.js +4 -4
- package/lib/cjs/recipes/CollapsiblePanel.stories.js +3 -3
- package/lib/cjs/recipes/ConditionalFilter.stories.js +21 -21
- package/lib/cjs/recipes/CountryPicker.stories.js +3 -3
- package/lib/cjs/recipes/DatePicker.stories.js +48 -5
- package/lib/cjs/recipes/FlippableCaretMenuButton.stories.js +2 -2
- package/lib/cjs/recipes/LinkedListView.stories.js +26 -15
- package/lib/cjs/recipes/ListAndPanel.stories.js +9 -9
- package/lib/cjs/recipes/LogoTabs.stories.js +2 -2
- package/lib/cjs/recipes/MaskedValue.stories.js +12 -1
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +2 -2
- package/lib/cjs/recipes/RowLineChart.stories.js +184 -99
- package/lib/cjs/recipes/ScrollableListView.stories.js +4 -4
- package/lib/cjs/recipes/Slider.stories.js +13 -19
- package/lib/cjs/styles/ColorDocumentation.js +2 -2
- package/lib/cjs/styles/forms/index.js +25 -13
- package/lib/cjs/styles/theme-ui/ThemeView.js +27 -0
- package/lib/cjs/styles/theme.js +3 -3
- package/lib/cjs/styles/themeOverrides/stories/AccordionGroup.chromatic.stories.js +37 -0
- package/lib/cjs/styles/themeOverrides/stories/Button.chromatic.stories.js +72 -0
- package/lib/cjs/styles/themeOverrides/stories/EnvironmentBreadcrumb.chromatic.stories.js +145 -0
- package/lib/cjs/styles/themeOverrides/stories/IconButton.chromatic.stories.js +49 -0
- package/lib/cjs/styles/themeOverrides/stories/Label.chromatic.stories.js +32 -0
- package/lib/cjs/styles/themeOverrides/stories/Link.chromatic.stories.js +34 -0
- package/lib/cjs/styles/themeOverrides/stories/NavBar.chromatic.stories.js +395 -0
- package/lib/cjs/styles/themeOverrides/stories/NumberField.chromatic.stories.js +32 -0
- package/lib/cjs/styles/themeOverrides/stories/RockerButtonGroup.chromatic.stories.js +41 -0
- package/lib/cjs/styles/themeOverrides/stories/SearchField.chromatic.stories.js +40 -0
- package/lib/cjs/styles/themeOverrides/stories/SelectField.chromatic.stories.js +42 -0
- package/lib/cjs/styles/themeOverrides/uiLibraryOverride.js +69 -52
- package/lib/cjs/{components/List/List.js → styles/themeOverrides/withUiLibraryCss.js} +26 -24
- package/lib/cjs/styles/themes/astro-nano/astro-nano.js +19 -19
- package/lib/cjs/styles/variants/index.js +51 -22
- package/lib/cjs/styles/variants/variants.js +70 -46
- package/lib/cjs/utils/devUtils/constants/variants.js +4 -4
- package/lib/cjs/utils/devUtils/props/fieldAttributes.js +74 -0
- package/lib/components/AccordionGridGroup/AccordionGrid.styles.js +65 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.js +3 -3
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +2 -25
- package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +1 -1
- package/lib/components/AccordionGridItem/AccordionGridItem.js +2 -2
- package/lib/components/AccordionGridItem/AccordionGridItemBody.js +2 -2
- package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +2 -3
- package/lib/components/AccordionGroup/Accordion.styles.js +66 -0
- package/lib/components/AccordionGroup/AccordionGroup.js +1 -1
- package/lib/components/AccordionGroup/AccordionGroup.stories.js +1 -1
- package/lib/components/AccordionGroup/AccordionGroup.test.js +1 -1
- package/lib/components/AccordionItem/AccordionItem.js +5 -6
- package/lib/components/ArrayField/ArrayField.js +15 -15
- package/lib/components/ArrayField/ArrayField.stories.js +1 -1
- package/lib/components/{Chip → Badge}/Badge.js +1 -1
- package/lib/components/{Chip → Badge}/Badge.stories.js +34 -31
- package/lib/components/Badge/Badge.styles.js +163 -0
- package/lib/components/{Chip → Badge}/Badge.test.js +6 -6
- package/lib/components/Badge/index.js +1 -0
- package/lib/components/Box/Box.js +2 -2
- package/lib/components/Box/Box.styles.js +6 -0
- package/lib/components/Bracket/Bracket.js +1 -1
- package/lib/components/Bracket/Bracket.stories.js +8 -7
- package/lib/components/Bracket/Bracket.styles.js +9 -0
- package/lib/{styles/variants/bidirectionalIconButton.js → components/Breadcrumbs/Breadcrumb.styles.js} +26 -15
- package/lib/components/Breadcrumbs/BreadcrumbItem.js +2 -3
- package/lib/components/Breadcrumbs/Breadcrumbs.js +3 -4
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +2 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.test.js +3 -3
- package/lib/components/Button/Button.js +2 -13
- package/lib/components/Button/Button.stories.js +1 -1
- package/lib/components/Button/Buttons.styles.js +246 -0
- package/lib/components/Card/Card.styles.js +13 -0
- package/lib/{styles/forms/checkbox.js → components/Checkbox/Checkbox.styles.js} +0 -0
- package/lib/components/CheckboxField/CheckboxField.js +12 -18
- package/lib/components/CheckboxField/CheckboxField.stories.js +4 -18
- package/lib/components/CodeView/CodeView.js +2 -2
- package/lib/components/CodeView/CodeView.stories.js +1 -1
- package/lib/{styles/variants/codeView.js → components/CodeView/CodeView.styles.js} +0 -0
- package/lib/components/CollapsiblePanel/CollapsiblePanel.js +4 -5
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +3 -3
- package/lib/{styles/variants/collapsiblePanel.js → components/CollapsiblePanel/CollapsiblePanel.styles.js} +65 -11
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelBadge.js +2 -2
- package/lib/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +3 -3
- package/lib/components/CollapsiblePanelItem/CollapsiblePanelItem.js +1 -1
- package/lib/components/ColorField/ColorField.js +15 -22
- package/lib/components/ColorField/ColorField.stories.js +3 -17
- package/lib/{styles/forms/comboBox.js → components/ColorField/ColorField.styles.js} +8 -9
- package/lib/{styles/forms/radio.js → components/ComboBox/ComboBox.styles.js} +24 -16
- package/lib/components/ComboBox/ComboBoxInput.js +17 -20
- package/lib/components/ComboBoxField/ComboBoxField.js +4 -6
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +2 -2
- package/lib/components/CopyText/CopyButton.js +2 -3
- package/lib/components/CopyText/CopyText.js +3 -4
- package/lib/components/CopyText/CopyText.styles.js +48 -0
- package/lib/components/DataTable/DataTable.js +31 -8
- package/lib/components/DataTable/DataTable.stories.js +6 -6
- package/lib/components/DataTable/DataTable.styles.js +1 -1
- package/lib/components/DataTable/DataTable.test.js +1 -1
- package/lib/components/DataTable/{DataTableChip.js → DataTableBadge.js} +5 -5
- package/lib/components/DataTable/{DataTableChip.test.js → DataTableBadge.test.js} +2 -2
- package/lib/components/DataTable/index.js +1 -1
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +8 -10
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +22 -22
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +2 -3
- package/lib/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +49 -0
- package/lib/components/FieldHelperText/FieldHelperText.js +1 -1
- package/lib/{styles/forms/textarea.js → components/FieldHelperText/FieldHelperText.styles.js} +22 -8
- package/lib/components/FileInputField/FileInputField.js +13 -10
- package/lib/components/FileInputField/FileInputField.stories.js +3 -2
- package/lib/components/FileInputField/FileInputField.styles.js +58 -0
- package/lib/components/FileInputField/FileItem.js +5 -5
- package/lib/components/FileInputField/FileSelect.js +1 -1
- package/lib/components/HelpHint/HelpHint.js +3 -4
- package/lib/components/HelpHint/HelpHint.styles.js +53 -0
- package/lib/components/IconButton/IconButton.js +5 -5
- package/lib/components/IconButton/IconButton.stories.js +2 -2
- package/lib/components/IconButton/IconButton.styles.js +164 -0
- package/lib/{styles/variants/images.js → components/Image/Image.styles.js} +0 -0
- package/lib/components/ImageUploadField/ImagePreviewButton.js +4 -5
- package/lib/components/ImageUploadField/ImageUploadField.js +3 -2
- package/lib/components/ImageUploadField/ImageUploadField.stories.js +3 -2
- package/lib/components/ImageUploadField/ImageUploadFieldBase.js +6 -5
- package/lib/components/ImageUploadField/imageUpload.js +49 -0
- package/lib/{styles/forms/input.js → components/Input/Input.styles.js} +18 -12
- package/lib/{styles/forms/label.js → components/Label/Label.styles.js} +1 -1
- package/lib/components/Link/Link.js +1 -3
- package/lib/components/Link/Link.stories.js +1 -1
- package/lib/{styles/variants/links.js → components/Link/Link.styles.js} +1 -1
- package/lib/components/LinkSelectField/LinkSelectField.js +9 -19
- package/lib/components/LinkSelectField/LinkSelectField.stories.js +5 -5
- package/lib/components/ListBox/ListBox.js +3 -3
- package/lib/{styles/variants/listBox.js → components/ListBox/ListBox.styles.js} +9 -1
- package/lib/components/ListBox/ListBox.test.js +1 -1
- package/lib/components/ListBox/ListBoxSection.js +2 -2
- package/lib/components/ListBox/Option.js +1 -1
- package/lib/components/ListItem/ListItem.js +1 -1
- package/lib/components/ListItem/ListItem.styles.js +21 -0
- package/lib/components/ListView/ListView.stories.js +3 -4
- package/lib/components/ListView/ListView.test.js +2 -2
- package/lib/components/ListViewItem/ListViewItem.js +3 -4
- package/lib/components/ListViewItem/ListViewItem.styles.js +69 -0
- package/lib/{styles/variants/loader.js → components/Loader/Loader.styles.js} +0 -0
- package/lib/components/Menu/Menu.js +3 -4
- package/lib/components/Menu/Menu.stories.js +1 -1
- package/lib/{styles/variants/menu.js → components/Menu/Menu.styles.js} +0 -0
- package/lib/components/MenuItem/MenuItem.js +1 -2
- package/lib/{styles/variants/menuItem.js → components/MenuItem/MenuItem.styles.js} +0 -0
- package/lib/components/Messages/Message.js +3 -3
- package/lib/components/Messages/Message.styles.js +99 -0
- package/lib/components/Messages/Messages.js +1 -1
- package/lib/components/Messages/Messages.stories.js +1 -1
- package/lib/components/Messages/Messages.test.js +1 -1
- package/lib/components/Modal/Modal.js +2 -14
- package/lib/{styles/variants/modal.js → components/Modal/Modal.styles.js} +10 -14
- package/lib/components/MultivaluesField/MultivaluesField.js +11 -14
- package/lib/components/MultivaluesField/MultivaluesField.stories.js +9 -8
- package/lib/components/MultivaluesField/MultivaluesField.test.js +14 -14
- package/lib/components/NavBar/NavBar.stories.js +1 -1
- package/lib/{styles/variants/navBar.js → components/NavBar/NavBar.styles.js} +94 -10
- package/lib/components/NavBarSection/NavBarItem.js +3 -4
- package/lib/components/NavBarSection/NavBarItemBody.js +1 -1
- package/lib/components/NavBarSection/NavBarItemButton.js +1 -1
- package/lib/components/NavBarSection/NavBarItemHeader.js +1 -1
- package/lib/components/NavBarSection/NavBarItemLink.js +1 -1
- package/lib/components/NavBarSection/NavBarSection.js +2 -2
- package/lib/components/NumberField/NumberField.js +25 -23
- package/lib/components/NumberField/NumberField.stories.js +3 -2
- package/lib/{styles/variants/numberField.js → components/NumberField/NumberField.styles.js} +12 -3
- package/lib/components/OverlayPanel/OverlayPanel.js +3 -3
- package/lib/components/OverlayPanel/OverlayPanel.stories.js +21 -18
- package/lib/{styles/variants/overlayPanel.js → components/OverlayPanel/OverlayPanel.styles.js} +6 -6
- package/lib/components/PasswordField/PasswordField.js +18 -24
- package/lib/components/PasswordField/PasswordField.stories.js +3 -2
- package/lib/components/PopoverContainer/PopoverContainer.js +3 -26
- package/lib/components/PopoverMenu/PopoverMenu.js +2 -4
- package/lib/{styles/variants/popoverMenu.js → components/PopoverMenu/PopoverMenu.styles.js} +0 -0
- package/lib/components/Radio/Radio.styles.js +55 -0
- package/lib/components/RadioField/RadioField.js +13 -18
- package/lib/components/RadioGroupField/RadioGroupField.js +9 -6
- package/lib/components/RockerButton/RockerButton.js +3 -3
- package/lib/components/RockerButton/RockerButton.styles.js +52 -0
- package/lib/components/RockerButtonGroup/RockerButtonGroup.js +4 -4
- package/lib/components/ScrollBox/ScrollBox.js +3 -3
- package/lib/components/ScrollBox/ScrollBox.styles.js +43 -0
- package/lib/{styles/forms/search.js → components/SearchField/Search.styles.js} +2 -2
- package/lib/components/SearchField/SearchField.js +11 -18
- package/lib/components/SearchField/SearchField.stories.js +3 -5
- package/lib/{styles/forms/select.js → components/SelectField/Select.styles.js} +3 -3
- package/lib/components/SelectField/SelectField.js +4 -9
- package/lib/components/SelectField/SelectField.stories.js +5 -5
- package/lib/components/SelectField/SelectField.test.js +1 -1
- package/lib/components/SelectFieldBase/SelectFieldBase.js +18 -15
- package/lib/components/Separator/Separator.js +1 -1
- package/lib/{styles/variants/separator.js → components/Separator/Separator.styles.js} +0 -0
- package/lib/components/Stepper/Step.js +2 -2
- package/lib/{styles/variants/stepper.js → components/Stepper/Stepper.styles.js} +3 -3
- package/lib/components/Switch/Switch.js +1 -1
- package/lib/{styles/forms/switch.js → components/Switch/Switch.styles.js} +1 -1
- package/lib/components/SwitchField/SwitchField.js +13 -20
- package/lib/components/SwitchField/SwitchField.stories.js +3 -5
- package/lib/components/Tab/Tab.js +2 -4
- package/lib/components/TabPicker/TabPicker.js +3 -3
- package/lib/components/Table/Table.js +1 -1
- package/lib/{styles/variants/table.js → components/Table/Table.styles.js} +15 -15
- package/lib/components/TableBody/TableBody.js +1 -1
- package/lib/components/TableCaption/TableCaption.js +1 -1
- package/lib/components/TableCell/TableCell.js +1 -1
- package/lib/components/TableRow/TableRow.js +1 -1
- package/lib/components/Tabs/Tabs.js +2 -2
- package/lib/components/Tabs/Tabs.stories.js +2 -2
- package/lib/{styles/variants/tabs.js → components/Tabs/Tabs.style.js} +12 -2
- package/lib/{styles/variants/text.js → components/Text/Text.styles.js} +3 -196
- package/lib/components/TextArea/TextArea.styles.js +47 -0
- package/lib/components/TextAreaField/TextAreaField.js +17 -24
- package/lib/components/TextAreaField/TextAreaField.stories.js +3 -5
- package/lib/components/TextField/TextField.js +10 -19
- package/lib/components/TextField/TextField.stories.js +3 -2
- package/lib/components/TimeZonePicker/TimeZone.styles.js +30 -0
- package/lib/components/TimeZonePicker/TimeZonePicker.js +4 -4
- package/lib/components/TooltipTrigger/Tooltip.js +3 -3
- package/lib/components/TooltipTrigger/Tooltip.styles.js +71 -0
- package/lib/components/TooltipTrigger/TooltipTrigger.js +2 -3
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +4 -4
- package/lib/hooks/useField/useField.js +39 -14
- package/lib/hooks/useField/useField.test.js +55 -16
- package/lib/hooks/useModalState/useModalState.js +1 -1
- package/lib/hooks/useOverlayPanelState/useOverlayPanelState.js +1 -1
- package/lib/hooks/useOverlayPanelState/useOverlayPanelState.test.js +2 -1
- package/lib/hooks/useSelectField/useSelectField.js +6 -6
- package/lib/index.js +5 -9
- package/lib/recipes/ApplicationSearchDropdown.stories.js +4 -4
- package/lib/recipes/AttributeMappingReadOnlyField.stories.js +5 -5
- package/lib/recipes/CollapsiblePanel.stories.js +4 -4
- package/lib/recipes/ConditionalFilter.stories.js +22 -22
- package/lib/recipes/CountryPicker.stories.js +3 -3
- package/lib/recipes/DatePicker.stories.js +47 -5
- package/lib/recipes/FlippableCaretMenuButton.stories.js +1 -1
- package/lib/recipes/LinkedListView.stories.js +22 -10
- package/lib/recipes/ListAndPanel.stories.js +2 -2
- package/lib/recipes/LogoTabs.stories.js +1 -1
- package/lib/recipes/MaskedValue.stories.js +12 -1
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +2 -2
- package/lib/recipes/RowLineChart.stories.js +176 -95
- package/lib/recipes/ScrollableListView.stories.js +2 -2
- package/lib/recipes/Slider.stories.js +4 -7
- package/lib/styles/ColorDocumentation.js +1 -1
- package/lib/styles/forms/index.js +21 -12
- package/lib/styles/theme-ui/ThemeView.js +9 -0
- package/lib/styles/theme.js +4 -4
- 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 +108 -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 +367 -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 +19 -0
- package/lib/styles/themeOverrides/stories/SelectField.chromatic.stories.js +21 -0
- package/lib/styles/themeOverrides/uiLibraryOverride.js +69 -52
- package/lib/styles/themeOverrides/withUiLibraryCss.js +28 -0
- package/lib/styles/themes/astro-nano/astro-nano.js +19 -19
- package/lib/styles/variants/index.js +25 -6
- package/lib/styles/variants/variants.js +47 -31
- package/lib/utils/devUtils/constants/variants.js +2 -2
- package/lib/utils/devUtils/props/fieldAttributes.js +52 -0
- package/package.json +24 -54
- package/NOTICE +0 -2481
- 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/styles/variants/accordion.js +0 -92
- package/lib/cjs/styles/variants/boxes.js +0 -439
- 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/styles/variants/accordion.js +0 -82
- package/lib/styles/variants/boxes.js +0 -418
- 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
@@ -0,0 +1,21 @@
|
|
1
|
+
var container = {
|
2
|
+
display: 'flex',
|
3
|
+
flex: '1 1 0px',
|
4
|
+
cursor: 'pointer',
|
5
|
+
height: '64px',
|
6
|
+
pl: 'md',
|
7
|
+
pr: 'sm',
|
8
|
+
pt: 16,
|
9
|
+
pb: 16,
|
10
|
+
justifyContent: 'center',
|
11
|
+
bg: 'accent.99',
|
12
|
+
'&.is-selected': {
|
13
|
+
bg: 'white'
|
14
|
+
},
|
15
|
+
'&.is-hovered': {
|
16
|
+
bg: 'white'
|
17
|
+
}
|
18
|
+
};
|
19
|
+
export default {
|
20
|
+
container: container
|
21
|
+
};
|
@@ -7,13 +7,12 @@ import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
|
7
7
|
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
8
8
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
9
9
|
import React from 'react';
|
10
|
-
import
|
10
|
+
import isChromatic from 'chromatic/isChromatic';
|
11
11
|
import CreateIcon from 'mdi-react/CreateIcon';
|
12
|
-
import MoreVertIcon from 'mdi-react/MoreVertIcon';
|
13
12
|
import FormSelectIcon from 'mdi-react/FormSelectIcon';
|
14
|
-
import
|
13
|
+
import MoreVertIcon from 'mdi-react/MoreVertIcon';
|
14
|
+
import { Item, useAsyncList } from 'react-stately';
|
15
15
|
import { action } from '@storybook/addon-actions';
|
16
|
-
import isChromatic from 'chromatic/isChromatic';
|
17
16
|
import ListView from '.';
|
18
17
|
import Box from '../Box/Box';
|
19
18
|
import Icon from '../Icon';
|
@@ -4,9 +4,9 @@ import _Set from "@babel/runtime-corejs3/core-js-stable/set";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
5
5
|
import React from 'react';
|
6
6
|
import _ from 'lodash';
|
7
|
+
import { FocusScope } from 'react-aria';
|
8
|
+
import { Item } from 'react-stately';
|
7
9
|
import userEvent from '@testing-library/user-event';
|
8
|
-
import { FocusScope } from '@react-aria/focus';
|
9
|
-
import { Item } from '@react-stately/collections';
|
10
10
|
import { render, screen } from '../../utils/testUtils/testWrapper';
|
11
11
|
import loadingStates from '../../utils/devUtils/constants/loadingStates';
|
12
12
|
import ListView from './ListView';
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import React, { useContext, useRef } from 'react';
|
3
|
-
import { mergeProps } from '@react-aria/utils';
|
4
|
-
import { useFocusRing } from '@react-aria/focus';
|
5
3
|
import PropTypes from 'prop-types';
|
4
|
+
import { mergeProps, useFocusRing } from 'react-aria';
|
6
5
|
import { useListItem } from '@react-aria/list';
|
7
6
|
import { useHover } from '@react-aria/interactions';
|
8
7
|
import { ListViewContext } from '../ListView/ListViewContext';
|
@@ -71,9 +70,9 @@ var ListViewItem = function ListViewItem(props) {
|
|
71
70
|
outline: 'none'
|
72
71
|
}
|
73
72
|
}), ___EmotionJSX(Box, _extends({
|
74
|
-
as: "div"
|
73
|
+
as: "div",
|
74
|
+
variant: "listViewItem.container"
|
75
75
|
}, gridCellProps, {
|
76
|
-
variant: "boxes.listViewItem",
|
77
76
|
isFocused: isDisabled ? false : isFocusVisible,
|
78
77
|
isDisabled: isDisabled,
|
79
78
|
isSelected: isSelected,
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
2
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
3
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
4
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
5
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
6
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
7
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
+
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
12
|
+
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
|
+
|
15
|
+
var container = {
|
16
|
+
display: 'flex',
|
17
|
+
padding: '0px 15px 0px 25px',
|
18
|
+
flex: '1 1 0px',
|
19
|
+
minHeight: '80px',
|
20
|
+
justifyContent: 'center',
|
21
|
+
bg: 'accent.99',
|
22
|
+
outline: 'none',
|
23
|
+
'&.is-selected': {
|
24
|
+
bg: 'white'
|
25
|
+
},
|
26
|
+
'&.is-hovered': {
|
27
|
+
bg: 'white',
|
28
|
+
cursor: 'pointer'
|
29
|
+
},
|
30
|
+
'&.is-focused': {
|
31
|
+
boxShadow: '0 0 0 1px inset #D033FF'
|
32
|
+
},
|
33
|
+
'&.has-separator': {
|
34
|
+
borderBottom: '1px solid',
|
35
|
+
borderBottomColor: 'line.hairline'
|
36
|
+
}
|
37
|
+
};
|
38
|
+
|
39
|
+
var linkedViewContainer = _objectSpread(_objectSpread({}, container), {}, {
|
40
|
+
minHeight: '75px',
|
41
|
+
height: '76px',
|
42
|
+
'&.has-inset-separator': {
|
43
|
+
'&:after': {
|
44
|
+
content: '""',
|
45
|
+
position: 'absolute',
|
46
|
+
width: 'calc(100% - 43px)',
|
47
|
+
right: 0,
|
48
|
+
bottom: 0,
|
49
|
+
borderBottom: '1px solid',
|
50
|
+
borderBottomColor: 'line.hairline'
|
51
|
+
},
|
52
|
+
'&.is-focused': {
|
53
|
+
'&:after': {
|
54
|
+
content: '""',
|
55
|
+
position: 'absolute',
|
56
|
+
width: 'calc(100% - 43px)',
|
57
|
+
right: 0,
|
58
|
+
bottom: 0,
|
59
|
+
borderBottom: '1px solid',
|
60
|
+
borderBottomColor: 'focus'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
});
|
65
|
+
|
66
|
+
export default {
|
67
|
+
container: container,
|
68
|
+
linkedViewContainer: linkedViewContainer
|
69
|
+
};
|
File without changes
|
@@ -19,10 +19,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
19
19
|
|
20
20
|
import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
|
21
21
|
import PropTypes from 'prop-types';
|
22
|
-
import { useMenu } from '
|
23
|
-
import { useTreeState } from '
|
24
|
-
import {
|
25
|
-
import { useSyncRef, mergeProps } from '@react-aria/utils';
|
22
|
+
import { mergeProps, useFocusRing, useMenu } from 'react-aria';
|
23
|
+
import { useTreeState } from 'react-stately';
|
24
|
+
import { useSyncRef } from '@react-aria/utils';
|
26
25
|
import { MenuContext } from '../../context/MenuContext';
|
27
26
|
import { usePropWarning } from '../../hooks';
|
28
27
|
import MenuItem from '../MenuItem';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import React from 'react';
|
3
|
-
import { Item } from '
|
3
|
+
import { Item } from 'react-stately';
|
4
4
|
import Menu from '../Menu';
|
5
5
|
import Text from '../Text';
|
6
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
File without changes
|
@@ -4,8 +4,7 @@ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectW
|
|
4
4
|
var _excluded = ["isSeparator", "isPressed", "data-id"];
|
5
5
|
import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
6
6
|
import PropTypes from 'prop-types';
|
7
|
-
import { mergeProps } from '
|
8
|
-
import { useMenuItem } from '@react-aria/menu';
|
7
|
+
import { mergeProps, useMenuItem } from 'react-aria';
|
9
8
|
import { useFocus, useHover, usePress } from '@react-aria/interactions';
|
10
9
|
import { useMenuContext } from '../../context/MenuContext';
|
11
10
|
import { usePropWarning, useStatusClasses } from '../../hooks';
|
File without changes
|
@@ -103,7 +103,7 @@ var Message = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
103
103
|
status: status
|
104
104
|
}, messageIconProps));
|
105
105
|
return ___EmotionJSX(Box, {
|
106
|
-
variant: "
|
106
|
+
variant: "message.transition",
|
107
107
|
className: wrapperClasses,
|
108
108
|
sx: {
|
109
109
|
maxHeight: !isHidden ? innerHeight : 0
|
@@ -117,7 +117,7 @@ var Message = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
117
117
|
}, ___EmotionJSX(Box, {
|
118
118
|
ref: ref,
|
119
119
|
isRow: true,
|
120
|
-
variant: "
|
120
|
+
variant: "message.item",
|
121
121
|
className: statusClasses,
|
122
122
|
bg: bg
|
123
123
|
}, messageIcon, ___EmotionJSX(Text, {
|
@@ -126,7 +126,7 @@ var Message = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
126
126
|
mr: "md"
|
127
127
|
}, children), ___EmotionJSX(CloseButton, {
|
128
128
|
onPress: onCloseHandler,
|
129
|
-
variant: "
|
129
|
+
variant: "messageCloseButton",
|
130
130
|
className: statusClasses,
|
131
131
|
color: color
|
132
132
|
}))));
|
@@ -0,0 +1,99 @@
|
|
1
|
+
var wrapper = {
|
2
|
+
position: 'absolute',
|
3
|
+
right: 'lg',
|
4
|
+
bottom: 'lg',
|
5
|
+
left: 'lg',
|
6
|
+
alignItems: 'flex-end',
|
7
|
+
pointerEvents: 'none'
|
8
|
+
};
|
9
|
+
var transition = {
|
10
|
+
transition: 'opacity 200ms, max-height 200ms',
|
11
|
+
opacity: 1,
|
12
|
+
'&.is-hidden': {
|
13
|
+
opacity: 0
|
14
|
+
}
|
15
|
+
};
|
16
|
+
var item = {
|
17
|
+
maxWidth: 400,
|
18
|
+
pointerEvents: 'all',
|
19
|
+
mb: 'md',
|
20
|
+
p: 'md',
|
21
|
+
wordBreak: 'break-word',
|
22
|
+
alignItems: 'center',
|
23
|
+
bg: 'neutral.95',
|
24
|
+
color: 'neutral.10',
|
25
|
+
borderRadius: 4,
|
26
|
+
'&.is-success, > .is-success': {
|
27
|
+
bg: 'success.light',
|
28
|
+
color: 'success.dark'
|
29
|
+
},
|
30
|
+
'&.is-warning, > .is-warning': {
|
31
|
+
bg: 'warning.light',
|
32
|
+
color: 'warning.dark'
|
33
|
+
},
|
34
|
+
'&.is-error, > .is-error': {
|
35
|
+
bg: 'critical.light',
|
36
|
+
color: 'critical.dark'
|
37
|
+
}
|
38
|
+
};
|
39
|
+
export var messageCloseButton = {
|
40
|
+
p: 0,
|
41
|
+
ml: 'auto',
|
42
|
+
outline: 'none',
|
43
|
+
path: {
|
44
|
+
fill: 'neutral.10'
|
45
|
+
},
|
46
|
+
'&.is-hovered': {
|
47
|
+
bg: 'white',
|
48
|
+
boxShadow: 'standard'
|
49
|
+
},
|
50
|
+
'&.is-pressed': {
|
51
|
+
boxShadow: 'standard',
|
52
|
+
bg: 'neutral.10',
|
53
|
+
path: {
|
54
|
+
fill: 'white'
|
55
|
+
}
|
56
|
+
},
|
57
|
+
'&.is-success': {
|
58
|
+
path: {
|
59
|
+
fill: 'success.dark'
|
60
|
+
},
|
61
|
+
'&.is-pressed': {
|
62
|
+
boxShadow: 'standard',
|
63
|
+
bg: 'success.dark',
|
64
|
+
path: {
|
65
|
+
fill: 'white'
|
66
|
+
}
|
67
|
+
}
|
68
|
+
},
|
69
|
+
'&.is-warning': {
|
70
|
+
path: {
|
71
|
+
fill: 'warning.dark'
|
72
|
+
},
|
73
|
+
'&.is-pressed': {
|
74
|
+
boxShadow: 'standard',
|
75
|
+
bg: 'warning.dark',
|
76
|
+
path: {
|
77
|
+
fill: 'white'
|
78
|
+
}
|
79
|
+
}
|
80
|
+
},
|
81
|
+
'&.is-error': {
|
82
|
+
path: {
|
83
|
+
fill: 'critical.dark'
|
84
|
+
},
|
85
|
+
'&.is-pressed': {
|
86
|
+
boxShadow: 'standard',
|
87
|
+
bg: 'critical.dark',
|
88
|
+
path: {
|
89
|
+
fill: 'white'
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
};
|
94
|
+
export default {
|
95
|
+
wrapper: wrapper,
|
96
|
+
transition: transition,
|
97
|
+
item: item,
|
98
|
+
messageCloseButton: messageCloseButton
|
99
|
+
};
|
@@ -26,7 +26,7 @@ var Messages = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
26
26
|
var state = useListState(props);
|
27
27
|
return ___EmotionJSX(Box, _extends({
|
28
28
|
ref: ref,
|
29
|
-
variant: "
|
29
|
+
variant: "message.wrapper"
|
30
30
|
}, others), _mapInstanceProperty(_context = _Array$from(state.collection)).call(_context, function (item) {
|
31
31
|
return ___EmotionJSX(Message, {
|
32
32
|
key: item.key,
|
@@ -19,8 +19,8 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
19
19
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
20
20
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
21
21
|
import React, { useEffect, useReducer, useState } from 'react';
|
22
|
-
import { Item } from '@react-stately/collections';
|
23
22
|
import AccountIcon from 'mdi-react/AccountIcon';
|
23
|
+
import { Item } from 'react-stately';
|
24
24
|
import statuses from '../../utils/devUtils/constants/statuses';
|
25
25
|
import { Box, Button, Messages } from '../..';
|
26
26
|
import { messagesReducerStory as messagesReducer, multiMessagesReducerStory as multiMessagesReducer } from './index';
|
@@ -3,7 +3,7 @@ import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
|
3
3
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
4
4
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
5
5
|
import React from 'react';
|
6
|
-
import { Item } from '
|
6
|
+
import { Item } from 'react-stately';
|
7
7
|
import userEvent from '@testing-library/user-event';
|
8
8
|
import AccountIcon from 'mdi-react/AccountIcon';
|
9
9
|
import axeTest from '../../utils/testUtils/testAxe';
|
@@ -16,16 +16,13 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
16
16
|
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; }
|
17
17
|
|
18
18
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
19
|
-
import PropTypes from 'prop-types';
|
20
|
-
import { useOverlay, usePreventScroll, useModal, OverlayContainer } from '@react-aria/overlays';
|
21
|
-
import { useDialog } from '@react-aria/dialog';
|
22
|
-
import { FocusScope } from '@react-aria/focus';
|
23
19
|
import CloseIcon from 'mdi-react/CloseIcon';
|
20
|
+
import PropTypes from 'prop-types';
|
21
|
+
import { FocusScope, OverlayContainer, useDialog, useModal, useOverlay, usePreventScroll } from 'react-aria';
|
24
22
|
import Box from '../Box';
|
25
23
|
import IconButton from '../IconButton';
|
26
24
|
import Icon from '../Icon';
|
27
25
|
import Text from '../Text';
|
28
|
-
import { useStatusClasses, useDeprecationWarning } from '../../hooks';
|
29
26
|
/**
|
30
27
|
* Modals are overlays that interrupt a user’s workflow to convey an important message.
|
31
28
|
* The component must be wrapped in an OverlayProvider, and the first child should be a trigger,
|
@@ -88,16 +85,7 @@ var Modal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
88
85
|
dialogProps = _useDialog.dialogProps,
|
89
86
|
titleProps = _useDialog.titleProps;
|
90
87
|
|
91
|
-
var _useStatusClasses = useStatusClasses(className, {
|
92
|
-
isDarkMode: others.variant === 'modal.dark'
|
93
|
-
}),
|
94
|
-
classNames = _useStatusClasses.classNames;
|
95
|
-
|
96
|
-
useDeprecationWarning('The "dark" variant for Modal will be deprecated in Astro-UI 2.0.0.', {
|
97
|
-
isActive: others.variant === 'modal.dark'
|
98
|
-
});
|
99
88
|
return ___EmotionJSX(OverlayContainer, null, ___EmotionJSX(Box, _extends({
|
100
|
-
className: classNames,
|
101
89
|
variant: "modal.container"
|
102
90
|
}, others, containerProps), ___EmotionJSX(FocusScope, {
|
103
91
|
contain: true,
|
@@ -12,7 +12,7 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
12
12
|
|
13
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
14
|
|
15
|
-
import { text } from '../
|
15
|
+
import { text } from '../Text/Text.styles';
|
16
16
|
var closeIcon = {
|
17
17
|
color: 'neutral.40'
|
18
18
|
};
|
@@ -39,27 +39,23 @@ var content = {
|
|
39
39
|
pl: 'lg',
|
40
40
|
maxWidth: '400px',
|
41
41
|
boxShadow: 'standard',
|
42
|
-
borderRadius: 3
|
43
|
-
'.is-dark-mode &': {
|
44
|
-
color: 'white',
|
45
|
-
bg: 'accent.5'
|
46
|
-
}
|
42
|
+
borderRadius: 3
|
47
43
|
};
|
48
44
|
|
49
|
-
var dark = _objectSpread({}, container);
|
50
|
-
|
51
45
|
var title = _objectSpread(_objectSpread({}, text.title), {}, {
|
52
46
|
mr: 'sm',
|
53
|
-
fontWeight: 3
|
54
|
-
'.is-dark-mode &': {
|
55
|
-
color: 'white'
|
56
|
-
}
|
47
|
+
fontWeight: 3
|
57
48
|
});
|
58
49
|
|
50
|
+
export var modalCloseButton = {
|
51
|
+
position: 'absolute',
|
52
|
+
top: 14,
|
53
|
+
right: 10
|
54
|
+
};
|
59
55
|
export default {
|
60
56
|
closeIcon: closeIcon,
|
61
57
|
container: container,
|
62
58
|
content: content,
|
63
|
-
|
64
|
-
|
59
|
+
title: title,
|
60
|
+
modalCloseButton: modalCloseButton
|
65
61
|
};
|
@@ -23,15 +23,15 @@ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance
|
|
23
23
|
import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
|
24
24
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
25
25
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
26
|
-
import PropTypes from 'prop-types';
|
27
26
|
import Clear from 'mdi-react/CloseIcon';
|
28
|
-
import
|
27
|
+
import PropTypes from 'prop-types';
|
28
|
+
import { DismissButton, FocusScope, useOverlayPosition } from 'react-aria';
|
29
29
|
import { useFilter } from '@react-aria/i18n';
|
30
|
-
import { DismissButton, useOverlayPosition } from '@react-aria/overlays';
|
31
30
|
import { useLayoutEffect, useResizeObserver } from '@react-aria/utils';
|
32
31
|
import { useListState } from '@react-stately/list';
|
33
|
-
import { Box,
|
32
|
+
import { Box, Badge, Icon, IconButton, PopoverContainer, ScrollBox, Text, TextField } from '../../';
|
34
33
|
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/devUtils/props/ariaAttributes';
|
34
|
+
import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
|
35
35
|
import { usePropWarning } from '../../hooks';
|
36
36
|
import ListBox from '../ListBox';
|
37
37
|
import { isIterableProp } from '../../utils/devUtils/props/isIterable';
|
@@ -347,11 +347,11 @@ var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
347
347
|
});
|
348
348
|
|
349
349
|
if (item) {
|
350
|
-
return ___EmotionJSX(
|
350
|
+
return ___EmotionJSX(Badge, {
|
351
351
|
key: item.key,
|
352
352
|
role: "presentation",
|
353
353
|
label: item.name,
|
354
|
-
variant: "
|
354
|
+
variant: "readOnlyBadge",
|
355
355
|
bg: "white",
|
356
356
|
textProps: {
|
357
357
|
sx: {
|
@@ -365,10 +365,10 @@ var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
365
365
|
}));
|
366
366
|
|
367
367
|
var multivaluesFieldChip = function multivaluesFieldChip(item) {
|
368
|
-
return ___EmotionJSX(
|
368
|
+
return ___EmotionJSX(Badge, _extends({
|
369
369
|
key: item.key,
|
370
370
|
role: "presentation",
|
371
|
-
variant: "
|
371
|
+
variant: "selectedItemBadge",
|
372
372
|
bg: "active",
|
373
373
|
label: item.name,
|
374
374
|
slots: item.slots
|
@@ -377,7 +377,7 @@ var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
377
377
|
onPress: function onPress() {
|
378
378
|
return deleteItem(item.key);
|
379
379
|
},
|
380
|
-
variant: "
|
380
|
+
variant: "badge.deleteButton"
|
381
381
|
}, item.buttonProps), ___EmotionJSX(Icon, {
|
382
382
|
icon: Clear,
|
383
383
|
color: "white",
|
@@ -473,10 +473,7 @@ var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
473
473
|
style: style
|
474
474
|
}, listbox));
|
475
475
|
});
|
476
|
-
MultivaluesField.propTypes = _objectSpread({
|
477
|
-
/** Props object that is spread directly into the root (top-level) Box component. */
|
478
|
-
containerProps: PropTypes.shape({}),
|
479
|
-
|
476
|
+
MultivaluesField.propTypes = _objectSpread(_objectSpread({
|
480
477
|
/** The initial selected keys in the collection (uncontrolled). */
|
481
478
|
defaultSelectedKeys: isIterableProp,
|
482
479
|
|
@@ -599,7 +596,7 @@ MultivaluesField.propTypes = _objectSpread({
|
|
599
596
|
|
600
597
|
/** Determines the input status indicator and helper text styling. */
|
601
598
|
status: PropTypes.oneOf(_Object$values(statuses))
|
602
|
-
}, ariaAttributesBasePropTypes);
|
599
|
+
}, ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
|
603
600
|
MultivaluesField.defaultProps = {
|
604
601
|
direction: 'bottom',
|
605
602
|
isReadOnly: false,
|
@@ -17,12 +17,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
17
17
|
import React, { useState } from 'react';
|
18
18
|
import { Box, Item, MultivaluesField, OverlayProvider, Icon } from '../../';
|
19
19
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
20
|
+
import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
|
20
21
|
import statuses from '../../utils/devUtils/constants/statuses';
|
21
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
22
23
|
export default {
|
23
24
|
title: 'Form/MultivaluesField',
|
24
25
|
component: MultivaluesField,
|
25
|
-
argTypes: _objectSpread({
|
26
|
+
argTypes: _objectSpread(_objectSpread({
|
26
27
|
direction: {
|
27
28
|
defaultValue: 'bottom'
|
28
29
|
},
|
@@ -69,7 +70,7 @@ export default {
|
|
69
70
|
type: 'text'
|
70
71
|
}
|
71
72
|
}
|
72
|
-
}, ariaAttributeBaseArgTypes),
|
73
|
+
}, ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes),
|
73
74
|
parameters: {
|
74
75
|
docs: {
|
75
76
|
source: {
|
@@ -214,11 +215,11 @@ var itemsWithSlots = [{
|
|
214
215
|
name: 'Aardvark',
|
215
216
|
key: 'Aardvark',
|
216
217
|
chipProps: {
|
217
|
-
variant: '
|
218
|
+
variant: 'itemBadgeWithSlot',
|
218
219
|
bg: 'white'
|
219
220
|
},
|
220
221
|
buttonProps: {
|
221
|
-
variant: '
|
222
|
+
variant: 'chipWithSlotDeleteButton'
|
222
223
|
},
|
223
224
|
slots: {
|
224
225
|
leftIcon: ___EmotionJSX(Icon, {
|
@@ -231,11 +232,11 @@ var itemsWithSlots = [{
|
|
231
232
|
name: 'Kangaroo',
|
232
233
|
key: 'Kangaroo',
|
233
234
|
chipProps: {
|
234
|
-
variant: '
|
235
|
+
variant: 'itemBadgeWithSlot',
|
235
236
|
bg: 'white'
|
236
237
|
},
|
237
238
|
buttonProps: {
|
238
|
-
variant: '
|
239
|
+
variant: 'chipWithSlotDeleteButton'
|
239
240
|
},
|
240
241
|
slots: {
|
241
242
|
leftIcon: ___EmotionJSX(Icon, {
|
@@ -248,11 +249,11 @@ var itemsWithSlots = [{
|
|
248
249
|
name: 'Snake',
|
249
250
|
key: 'Snake',
|
250
251
|
chipProps: {
|
251
|
-
variant: '
|
252
|
+
variant: 'itemBadgeWithSlot',
|
252
253
|
bg: 'white'
|
253
254
|
},
|
254
255
|
buttonProps: {
|
255
|
-
variant: '
|
256
|
+
variant: 'chipWithSlotDeleteButton'
|
256
257
|
},
|
257
258
|
slots: {
|
258
259
|
leftIcon: ___EmotionJSX(Icon, {
|
@@ -467,10 +467,10 @@ test('default selected keys', function () {
|
|
467
467
|
});
|
468
468
|
var listbox = screen.queryByRole('listbox');
|
469
469
|
expect(listbox).not.toBeInTheDocument();
|
470
|
-
var
|
471
|
-
expect(
|
472
|
-
var
|
473
|
-
expect(
|
470
|
+
var firstBadge = screen.getByText(items[1].name);
|
471
|
+
expect(firstBadge).toBeInTheDocument();
|
472
|
+
var secondBadge = screen.getByText(items[2].name);
|
473
|
+
expect(secondBadge).toBeInTheDocument();
|
474
474
|
});
|
475
475
|
test('selected keys', function () {
|
476
476
|
getComponent({
|
@@ -478,10 +478,10 @@ test('selected keys', function () {
|
|
478
478
|
});
|
479
479
|
var listbox = screen.queryByRole('listbox');
|
480
480
|
expect(listbox).not.toBeInTheDocument();
|
481
|
-
var
|
482
|
-
expect(
|
483
|
-
var
|
484
|
-
expect(
|
481
|
+
var firstBadge = screen.getByText(items[1].name);
|
482
|
+
expect(firstBadge).toBeInTheDocument();
|
483
|
+
var secondBadge = screen.getByText(items[2].name);
|
484
|
+
expect(secondBadge).toBeInTheDocument();
|
485
485
|
});
|
486
486
|
test('should have no accessibility violations', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
487
487
|
var _getComponent, container, results;
|
@@ -512,13 +512,13 @@ test('read only keys', function () {
|
|
512
512
|
});
|
513
513
|
var listbox = screen.queryByRole('listbox');
|
514
514
|
expect(listbox).not.toBeInTheDocument();
|
515
|
-
var
|
516
|
-
var deleteButton1 =
|
517
|
-
expect(
|
515
|
+
var firstBadge = screen.getByText(items[1].name);
|
516
|
+
var deleteButton1 = firstBadge.nextSibling;
|
517
|
+
expect(firstBadge).toBeInTheDocument();
|
518
518
|
expect(deleteButton1).toBeNull();
|
519
|
-
var
|
520
|
-
expect(
|
521
|
-
var deleteButton2 =
|
519
|
+
var secondBadge = screen.getByText(items[2].name);
|
520
|
+
expect(secondBadge).toBeInTheDocument();
|
521
|
+
var deleteButton2 = firstBadge.nextSibling;
|
522
522
|
expect(deleteButton2).toBeNull();
|
523
523
|
});
|
524
524
|
test('passing helper text should display it and correct aria attributes on input', function () {
|
@@ -112,7 +112,7 @@ var data = [{
|
|
112
112
|
children: [___EmotionJSX(NavBarItemLink, {
|
113
113
|
key: "Dashboard Link Group",
|
114
114
|
id: "Dashboard Link Group",
|
115
|
-
variant: "
|
115
|
+
variant: "variants.navBar.itemButton",
|
116
116
|
href: "https://pingidentity.com/"
|
117
117
|
}, "Group"), ___EmotionJSX(NavBarItemButton, {
|
118
118
|
key: "Dashboard Link Populations",
|