@pingux/astro 1.41.0-alpha.5 → 1.42.0-alpha.0
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 +24 -0
- package/README.md +1 -2
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.js +6 -6
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +28 -5
- 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 +8 -6
- 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 +10 -8
- package/lib/cjs/components/ArrayField/ArrayField.js +20 -18
- package/lib/cjs/components/ArrayField/ArrayField.stories.js +4 -4
- package/lib/cjs/components/ArrayField/ArrayFieldItem.js +50 -0
- package/lib/cjs/components/Box/Box.js +2 -2
- package/lib/cjs/components/Bracket/Bracket.js +1 -1
- package/lib/cjs/components/Bracket/Bracket.stories.js +6 -7
- package/lib/cjs/components/Breadcrumbs/BreadcrumbItem.js +6 -4
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +7 -5
- 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 +18 -5
- package/lib/cjs/components/Button/Button.stories.js +1 -1
- package/lib/cjs/components/CheckboxField/CheckboxField.js +19 -14
- package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +18 -5
- package/lib/cjs/components/{Badge → Chip}/Badge.js +1 -1
- package/lib/cjs/components/{Badge → Chip}/Badge.stories.js +26 -29
- package/lib/cjs/components/{Badge → Chip}/Badge.test.js +6 -6
- package/lib/cjs/components/Chip/Chip.js +58 -0
- package/lib/cjs/components/{Badge → Chip}/index.js +2 -2
- package/lib/cjs/components/CodeView/CodeView.js +2 -2
- package/lib/cjs/components/CodeView/CodeView.stories.js +1 -1
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.js +9 -7
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +2 -2
- 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 +31 -23
- package/lib/cjs/components/ColorField/ColorField.stories.js +17 -4
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +24 -20
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +14 -10
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +3 -3
- package/lib/cjs/components/CopyText/CopyButton.js +3 -2
- package/lib/cjs/components/CopyText/CopyText.js +10 -8
- package/lib/cjs/components/DataTable/DataTable.js +26 -46
- 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/{DataTableBadge.js → DataTableChip.js} +4 -4
- package/lib/cjs/components/DataTable/{DataTableBadge.test.js → DataTableChip.test.js} +1 -1
- package/lib/cjs/components/DataTable/index.js +3 -3
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +18 -14
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +23 -23
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +5 -3
- package/lib/cjs/components/FieldHelperText/FieldHelperText.js +1 -1
- package/lib/cjs/components/FileInputField/FileInputField.js +13 -16
- package/lib/cjs/components/FileInputField/FileInputField.stories.js +2 -4
- 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 +4 -3
- package/lib/cjs/components/IconButton/IconButton.js +11 -9
- package/lib/cjs/components/IconButton/IconButton.stories.js +2 -2
- package/lib/cjs/components/ImageUploadField/ImagePreviewButton.js +8 -6
- package/lib/cjs/components/ImageUploadField/ImageUploadField.js +2 -4
- package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +2 -4
- package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +7 -8
- package/lib/cjs/components/Link/Link.js +9 -5
- package/lib/cjs/components/Link/Link.stories.js +2 -2
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +19 -10
- package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +9 -10
- package/lib/cjs/{styles/themeOverrides/withUiLibraryCss.js → components/List/List.js} +24 -26
- package/lib/cjs/components/List/List.stories.js +66 -0
- package/lib/cjs/components/List/List.test.js +36 -0
- package/lib/cjs/components/List/index.js +18 -0
- package/lib/cjs/components/ListBox/ListBox.js +6 -6
- 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/ListView/ListView.stories.js +10 -8
- package/lib/cjs/components/ListView/ListView.test.js +8 -8
- package/lib/cjs/components/ListViewItem/ListViewItem.js +9 -7
- package/lib/cjs/components/Menu/Menu.js +9 -7
- package/lib/cjs/components/Menu/Menu.stories.js +4 -4
- package/lib/cjs/components/MenuItem/MenuItem.js +5 -3
- package/lib/cjs/components/Messages/Message.js +3 -3
- 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 +24 -9
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +18 -15
- package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +8 -10
- package/lib/cjs/components/MultivaluesField/MultivaluesField.test.js +14 -14
- package/lib/cjs/components/NavBar/NavBar.stories.js +1 -1
- package/lib/cjs/components/NavBarSection/NavBarItem.js +9 -7
- 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 +29 -31
- package/lib/cjs/components/NumberField/NumberField.stories.js +2 -4
- package/lib/cjs/components/OverlayPanel/OverlayPanel.js +4 -4
- package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +6 -6
- package/lib/cjs/components/PasswordField/PasswordField.js +25 -20
- package/lib/cjs/components/PasswordField/PasswordField.stories.js +2 -4
- package/lib/cjs/components/PopoverContainer/PopoverContainer.js +31 -7
- package/lib/cjs/components/PopoverMenu/PopoverMenu.js +12 -8
- package/lib/cjs/components/RadioField/RadioField.js +19 -15
- package/lib/cjs/components/RadioGroupField/RadioGroupField.js +8 -12
- package/lib/cjs/components/RockerButton/RockerButton.js +5 -5
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.js +6 -6
- package/lib/cjs/components/ScrollBox/ScrollBox.js +3 -3
- package/lib/cjs/components/SearchField/SearchField.js +22 -16
- package/lib/cjs/components/SearchField/SearchField.stories.js +5 -4
- package/lib/cjs/components/SelectField/SelectField.js +9 -5
- package/lib/cjs/components/SelectField/SelectField.stories.js +11 -12
- package/lib/cjs/components/SelectField/SelectField.test.js +2 -2
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +16 -19
- package/lib/cjs/components/Separator/Separator.js +2 -2
- package/lib/cjs/components/Stepper/Step.js +4 -4
- package/lib/cjs/components/Switch/Switch.js +2 -2
- package/lib/cjs/components/SwitchField/SwitchField.js +23 -17
- package/lib/cjs/components/SwitchField/SwitchField.stories.js +5 -4
- package/lib/cjs/components/Tab/Tab.js +11 -7
- package/lib/cjs/components/TabPicker/TabPicker.js +5 -5
- package/lib/cjs/components/Table/Table.js +1 -1
- 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/components/TextAreaField/TextAreaField.js +24 -18
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +5 -4
- package/lib/cjs/components/TextField/TextField.js +19 -11
- package/lib/cjs/components/TextField/TextField.stories.js +2 -4
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.js +4 -4
- package/lib/cjs/components/TooltipTrigger/Tooltip.js +4 -4
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +8 -6
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +6 -6
- package/lib/cjs/hooks/useField/useField.js +20 -43
- package/lib/cjs/hooks/useField/useField.test.js +16 -55
- 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 +1 -2
- package/lib/cjs/hooks/useSelectField/useSelectField.js +14 -12
- package/lib/cjs/index.js +119 -82
- 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 +5 -48
- package/lib/cjs/recipes/FlippableCaretMenuButton.stories.js +2 -2
- package/lib/cjs/recipes/LinkedListView.stories.js +15 -26
- 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 +1 -12
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +2 -2
- package/lib/cjs/recipes/RowLineChart.stories.js +99 -184
- package/lib/cjs/recipes/ScrollableListView.stories.js +4 -4
- package/lib/cjs/recipes/Slider.stories.js +19 -13
- package/lib/cjs/styles/ColorDocumentation.js +2 -2
- package/lib/cjs/{components/Checkbox/Checkbox.styles.js → styles/forms/checkbox.js} +0 -0
- package/lib/cjs/{components/ColorField/ColorField.styles.js → styles/forms/comboBox.js} +9 -9
- package/lib/cjs/styles/forms/index.js +13 -25
- package/lib/cjs/{components/Input/Input.styles.js → styles/forms/input.js} +15 -21
- package/lib/cjs/{components/Label/Label.styles.js → styles/forms/label.js} +4 -4
- package/lib/cjs/{components/ComboBox/ComboBox.styles.js → styles/forms/radio.js} +19 -27
- package/lib/cjs/{components/SearchField/Search.styles.js → styles/forms/search.js} +4 -4
- package/lib/cjs/{components/SelectField/Select.styles.js → styles/forms/select.js} +6 -6
- package/lib/cjs/{components/Switch/Switch.styles.js → styles/forms/switch.js} +2 -2
- package/lib/cjs/styles/forms/textarea.js +46 -0
- package/lib/cjs/styles/theme.js +3 -3
- package/lib/cjs/styles/themeOverrides/uiLibraryOverride.js +52 -69
- package/lib/cjs/styles/themes/astro-nano/astro-nano.js +19 -19
- package/lib/cjs/styles/variants/accordion.js +92 -0
- package/lib/cjs/{components/FieldHelperText/FieldHelperText.styles.js → styles/variants/bidirectionalIconButton.js} +17 -21
- package/lib/cjs/styles/variants/boxes.js +439 -0
- package/lib/cjs/styles/variants/buttons.js +815 -0
- package/lib/cjs/{components/CodeView/CodeView.styles.js → styles/variants/codeView.js} +0 -0
- package/lib/cjs/{components/CollapsiblePanel/CollapsiblePanel.styles.js → styles/variants/collapsiblePanel.js} +13 -72
- package/lib/cjs/styles/variants/imageUpload.js +29 -0
- package/lib/cjs/{components/Image/Image.styles.js → styles/variants/images.js} +0 -0
- package/lib/cjs/styles/variants/index.js +22 -51
- package/lib/cjs/{components/Link/Link.styles.js → styles/variants/links.js} +3 -3
- package/lib/cjs/{components/ListBox/ListBox.styles.js → styles/variants/listBox.js} +3 -11
- package/lib/cjs/{components/Loader/Loader.styles.js → styles/variants/loader.js} +0 -0
- package/lib/cjs/{components/Menu/Menu.styles.js → styles/variants/menu.js} +0 -0
- package/lib/cjs/{components/MenuItem/MenuItem.styles.js → styles/variants/menuItem.js} +0 -0
- package/lib/cjs/styles/variants/messages.js +53 -0
- package/lib/cjs/{components/Modal/Modal.styles.js → styles/variants/modal.js} +16 -13
- package/lib/cjs/{components/NavBar/NavBar.styles.js → styles/variants/navBar.js} +10 -96
- package/lib/cjs/{components/NumberField/NumberField.styles.js → styles/variants/numberField.js} +3 -13
- package/lib/cjs/{components/OverlayPanel/OverlayPanel.styles.js → styles/variants/overlayPanel.js} +6 -6
- package/lib/cjs/{components/PopoverMenu/PopoverMenu.styles.js → styles/variants/popoverMenu.js} +0 -0
- package/lib/cjs/styles/variants/rockerbutton.js +25 -0
- package/lib/cjs/{components/Separator/Separator.styles.js → styles/variants/separator.js} +0 -0
- package/lib/cjs/{components/Stepper/Stepper.styles.js → styles/variants/stepper.js} +4 -4
- package/lib/cjs/{components/Table/Table.styles.js → styles/variants/table.js} +15 -15
- package/lib/cjs/{components/Tabs/Tabs.style.js → styles/variants/tabs.js} +4 -17
- package/lib/cjs/{components/Text/Text.styles.js → styles/variants/text.js} +195 -4
- package/lib/cjs/{components/Box/Box.styles.js → styles/variants/tooltip.js} +3 -3
- package/lib/cjs/styles/variants/variants.js +46 -70
- package/lib/cjs/utils/devUtils/constants/variants.js +4 -4
- package/lib/components/AccordionGridGroup/AccordionGridGroup.js +3 -3
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +25 -2
- 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 +3 -2
- 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 +6 -5
- package/lib/components/ArrayField/ArrayField.js +15 -15
- package/lib/components/ArrayField/ArrayField.stories.js +1 -1
- package/lib/components/ArrayField/ArrayFieldItem.js +31 -0
- package/lib/components/Box/Box.js +2 -2
- package/lib/components/Bracket/Bracket.js +1 -1
- package/lib/components/Bracket/Bracket.stories.js +7 -8
- package/lib/components/Breadcrumbs/BreadcrumbItem.js +3 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.js +4 -3
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +2 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.test.js +3 -3
- package/lib/components/Button/Button.js +13 -2
- package/lib/components/Button/Button.stories.js +1 -1
- package/lib/components/CheckboxField/CheckboxField.js +18 -12
- package/lib/components/CheckboxField/CheckboxField.stories.js +18 -4
- package/lib/components/{Badge → Chip}/Badge.js +1 -1
- package/lib/components/{Badge → Chip}/Badge.stories.js +31 -34
- package/lib/components/{Badge → Chip}/Badge.test.js +6 -6
- package/lib/components/Chip/Chip.js +38 -0
- package/lib/components/Chip/index.js +1 -0
- package/lib/components/CodeView/CodeView.js +2 -2
- package/lib/components/CodeView/CodeView.stories.js +1 -1
- package/lib/components/CollapsiblePanel/CollapsiblePanel.js +5 -4
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +3 -3
- 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 +22 -15
- package/lib/components/ColorField/ColorField.stories.js +17 -3
- package/lib/components/ComboBox/ComboBoxInput.js +20 -17
- package/lib/components/ComboBoxField/ComboBoxField.js +6 -4
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +2 -2
- package/lib/components/CopyText/CopyButton.js +3 -2
- package/lib/components/CopyText/CopyText.js +4 -3
- package/lib/components/DataTable/DataTable.js +8 -31
- 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/{DataTableBadge.js → DataTableChip.js} +5 -5
- package/lib/components/DataTable/{DataTableBadge.test.js → DataTableChip.test.js} +2 -2
- package/lib/components/DataTable/index.js +1 -1
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +10 -8
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +22 -22
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +3 -2
- package/lib/components/FieldHelperText/FieldHelperText.js +1 -1
- package/lib/components/FileInputField/FileInputField.js +10 -13
- package/lib/components/FileInputField/FileInputField.stories.js +2 -3
- package/lib/components/FileInputField/FileItem.js +5 -5
- package/lib/components/FileInputField/FileSelect.js +1 -1
- package/lib/components/HelpHint/HelpHint.js +4 -3
- package/lib/components/IconButton/IconButton.js +5 -5
- package/lib/components/IconButton/IconButton.stories.js +2 -2
- package/lib/components/ImageUploadField/ImagePreviewButton.js +5 -4
- package/lib/components/ImageUploadField/ImageUploadField.js +2 -3
- package/lib/components/ImageUploadField/ImageUploadField.stories.js +2 -3
- package/lib/components/ImageUploadField/ImageUploadFieldBase.js +5 -6
- package/lib/components/Link/Link.js +3 -1
- package/lib/components/Link/Link.stories.js +1 -1
- package/lib/components/LinkSelectField/LinkSelectField.js +19 -9
- package/lib/components/LinkSelectField/LinkSelectField.stories.js +5 -5
- package/lib/components/List/List.js +26 -0
- package/lib/components/List/List.stories.js +43 -0
- package/lib/components/List/List.test.js +24 -0
- package/lib/components/List/index.js +1 -0
- package/lib/components/ListBox/ListBox.js +3 -3
- 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/ListView/ListView.stories.js +4 -3
- package/lib/components/ListView/ListView.test.js +2 -2
- package/lib/components/ListViewItem/ListViewItem.js +4 -3
- package/lib/components/Menu/Menu.js +4 -3
- package/lib/components/Menu/Menu.stories.js +1 -1
- package/lib/components/MenuItem/MenuItem.js +2 -1
- package/lib/components/Messages/Message.js +3 -3
- 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 +14 -2
- package/lib/components/MultivaluesField/MultivaluesField.js +14 -11
- package/lib/components/MultivaluesField/MultivaluesField.stories.js +8 -9
- package/lib/components/MultivaluesField/MultivaluesField.test.js +14 -14
- package/lib/components/NavBar/NavBar.stories.js +1 -1
- package/lib/components/NavBarSection/NavBarItem.js +4 -3
- 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 +23 -25
- package/lib/components/NumberField/NumberField.stories.js +2 -3
- package/lib/components/OverlayPanel/OverlayPanel.js +3 -3
- package/lib/components/OverlayPanel/OverlayPanel.stories.js +2 -2
- package/lib/components/PasswordField/PasswordField.js +24 -18
- package/lib/components/PasswordField/PasswordField.stories.js +2 -3
- package/lib/components/PopoverContainer/PopoverContainer.js +26 -3
- package/lib/components/PopoverMenu/PopoverMenu.js +4 -2
- package/lib/components/RadioField/RadioField.js +18 -13
- package/lib/components/RadioGroupField/RadioGroupField.js +6 -9
- package/lib/components/RockerButton/RockerButton.js +3 -3
- package/lib/components/RockerButtonGroup/RockerButtonGroup.js +4 -4
- package/lib/components/ScrollBox/ScrollBox.js +3 -3
- package/lib/components/SearchField/SearchField.js +18 -11
- package/lib/components/SearchField/SearchField.stories.js +5 -3
- package/lib/components/SelectField/SelectField.js +9 -4
- package/lib/components/SelectField/SelectField.stories.js +5 -5
- package/lib/components/SelectField/SelectField.test.js +1 -1
- package/lib/components/SelectFieldBase/SelectFieldBase.js +15 -18
- package/lib/components/Separator/Separator.js +1 -1
- package/lib/components/Stepper/Step.js +2 -2
- package/lib/components/Switch/Switch.js +1 -1
- package/lib/components/SwitchField/SwitchField.js +20 -13
- package/lib/components/SwitchField/SwitchField.stories.js +5 -3
- package/lib/components/Tab/Tab.js +4 -2
- package/lib/components/TabPicker/TabPicker.js +3 -3
- package/lib/components/Table/Table.js +1 -1
- 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/components/TextAreaField/TextAreaField.js +24 -17
- package/lib/components/TextAreaField/TextAreaField.stories.js +5 -3
- package/lib/components/TextField/TextField.js +19 -10
- package/lib/components/TextField/TextField.stories.js +2 -3
- package/lib/components/TimeZonePicker/TimeZonePicker.js +4 -4
- package/lib/components/TooltipTrigger/Tooltip.js +3 -3
- package/lib/components/TooltipTrigger/TooltipTrigger.js +3 -2
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +4 -4
- package/lib/hooks/useField/useField.js +14 -39
- package/lib/hooks/useField/useField.test.js +16 -55
- package/lib/hooks/useModalState/useModalState.js +1 -1
- package/lib/hooks/useOverlayPanelState/useOverlayPanelState.js +1 -1
- package/lib/hooks/useOverlayPanelState/useOverlayPanelState.test.js +1 -2
- package/lib/hooks/useSelectField/useSelectField.js +6 -6
- package/lib/index.js +9 -5
- 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 +5 -47
- package/lib/recipes/FlippableCaretMenuButton.stories.js +1 -1
- package/lib/recipes/LinkedListView.stories.js +10 -22
- package/lib/recipes/ListAndPanel.stories.js +2 -2
- package/lib/recipes/LogoTabs.stories.js +1 -1
- package/lib/recipes/MaskedValue.stories.js +1 -12
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +2 -2
- package/lib/recipes/RowLineChart.stories.js +95 -176
- package/lib/recipes/ScrollableListView.stories.js +2 -2
- package/lib/recipes/Slider.stories.js +7 -4
- package/lib/styles/ColorDocumentation.js +1 -1
- package/lib/{components/Checkbox/Checkbox.styles.js → styles/forms/checkbox.js} +0 -0
- package/lib/{components/ColorField/ColorField.styles.js → styles/forms/comboBox.js} +9 -8
- package/lib/styles/forms/index.js +12 -21
- package/lib/{components/Input/Input.styles.js → styles/forms/input.js} +12 -18
- package/lib/{components/Label/Label.styles.js → styles/forms/label.js} +1 -1
- package/lib/{components/FieldHelperText/FieldHelperText.styles.js → styles/forms/radio.js} +15 -21
- package/lib/{components/SearchField/Search.styles.js → styles/forms/search.js} +2 -2
- package/lib/{components/SelectField/Select.styles.js → styles/forms/select.js} +3 -3
- package/lib/{components/Switch/Switch.styles.js → styles/forms/switch.js} +1 -1
- package/lib/styles/forms/textarea.js +25 -0
- package/lib/styles/theme.js +4 -4
- package/lib/styles/themeOverrides/uiLibraryOverride.js +52 -69
- package/lib/styles/themes/astro-nano/astro-nano.js +19 -19
- package/lib/styles/variants/accordion.js +82 -0
- package/lib/{components/ComboBox/ComboBox.styles.js → styles/variants/bidirectionalIconButton.js} +19 -26
- package/lib/styles/variants/boxes.js +418 -0
- package/lib/styles/variants/buttons.js +792 -0
- package/lib/{components/CodeView/CodeView.styles.js → styles/variants/codeView.js} +0 -0
- package/lib/{components/CollapsiblePanel/CollapsiblePanel.styles.js → styles/variants/collapsiblePanel.js} +11 -65
- package/lib/styles/variants/imageUpload.js +19 -0
- package/lib/{components/Image/Image.styles.js → styles/variants/images.js} +0 -0
- package/lib/styles/variants/index.js +6 -25
- package/lib/{components/Link/Link.styles.js → styles/variants/links.js} +1 -1
- package/lib/{components/ListBox/ListBox.styles.js → styles/variants/listBox.js} +1 -9
- package/lib/{components/Loader/Loader.styles.js → styles/variants/loader.js} +0 -0
- package/lib/{components/Menu/Menu.styles.js → styles/variants/menu.js} +0 -0
- package/lib/{components/MenuItem/MenuItem.styles.js → styles/variants/menuItem.js} +0 -0
- package/lib/styles/variants/messages.js +43 -0
- package/lib/{components/Modal/Modal.styles.js → styles/variants/modal.js} +14 -10
- package/lib/{components/NavBar/NavBar.styles.js → styles/variants/navBar.js} +10 -94
- package/lib/{components/NumberField/NumberField.styles.js → styles/variants/numberField.js} +3 -12
- package/lib/{components/OverlayPanel/OverlayPanel.styles.js → styles/variants/overlayPanel.js} +6 -6
- package/lib/{components/PopoverMenu/PopoverMenu.styles.js → styles/variants/popoverMenu.js} +0 -0
- package/lib/styles/variants/rockerbutton.js +15 -0
- package/lib/{components/Separator/Separator.styles.js → styles/variants/separator.js} +0 -0
- package/lib/{components/Stepper/Stepper.styles.js → styles/variants/stepper.js} +3 -3
- package/lib/{components/Table/Table.styles.js → styles/variants/table.js} +15 -15
- package/lib/{components/Tabs/Tabs.style.js → styles/variants/tabs.js} +2 -12
- package/lib/{components/Text/Text.styles.js → styles/variants/text.js} +196 -3
- package/lib/styles/variants/tooltip.js +6 -0
- package/lib/styles/variants/variants.js +31 -47
- package/lib/utils/devUtils/constants/variants.js +2 -2
- package/package.json +54 -24
- package/lib/cjs/components/AccordionGridGroup/AccordionGrid.styles.js +0 -85
- package/lib/cjs/components/AccordionGroup/Accordion.styles.js +0 -86
- package/lib/cjs/components/Badge/Badge.styles.js +0 -191
- package/lib/cjs/components/Bracket/Bracket.styles.js +0 -19
- package/lib/cjs/components/Breadcrumbs/Breadcrumb.styles.js +0 -65
- package/lib/cjs/components/Button/Buttons.styles.js +0 -276
- package/lib/cjs/components/Card/Card.styles.js +0 -23
- package/lib/cjs/components/CopyText/CopyText.styles.js +0 -69
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +0 -69
- package/lib/cjs/components/FileInputField/FileInputField.styles.js +0 -78
- package/lib/cjs/components/HelpHint/HelpHint.styles.js +0 -74
- package/lib/cjs/components/IconButton/IconButton.styles.js +0 -194
- package/lib/cjs/components/ImageUploadField/imageUpload.js +0 -69
- package/lib/cjs/components/ListItem/ListItem.styles.js +0 -31
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +0 -88
- package/lib/cjs/components/Messages/Message.styles.js +0 -110
- package/lib/cjs/components/Radio/Radio.styles.js +0 -75
- package/lib/cjs/components/RockerButton/RockerButton.styles.js +0 -72
- package/lib/cjs/components/ScrollBox/ScrollBox.styles.js +0 -53
- package/lib/cjs/components/TextArea/TextArea.styles.js +0 -69
- package/lib/cjs/components/TimeZonePicker/TimeZone.styles.js +0 -40
- package/lib/cjs/components/TooltipTrigger/Tooltip.styles.js +0 -93
- package/lib/cjs/styles/theme-ui/ThemeView.js +0 -27
- package/lib/cjs/styles/themeOverrides/stories/AccordionGroup.chromatic.stories.js +0 -37
- package/lib/cjs/styles/themeOverrides/stories/Button.chromatic.stories.js +0 -72
- package/lib/cjs/styles/themeOverrides/stories/EnvironmentBreadcrumb.chromatic.stories.js +0 -145
- package/lib/cjs/styles/themeOverrides/stories/IconButton.chromatic.stories.js +0 -49
- package/lib/cjs/styles/themeOverrides/stories/Label.chromatic.stories.js +0 -32
- package/lib/cjs/styles/themeOverrides/stories/Link.chromatic.stories.js +0 -34
- package/lib/cjs/styles/themeOverrides/stories/NavBar.chromatic.stories.js +0 -395
- package/lib/cjs/styles/themeOverrides/stories/NumberField.chromatic.stories.js +0 -32
- package/lib/cjs/styles/themeOverrides/stories/RockerButtonGroup.chromatic.stories.js +0 -41
- package/lib/cjs/styles/themeOverrides/stories/SearchField.chromatic.stories.js +0 -40
- package/lib/cjs/styles/themeOverrides/stories/SelectField.chromatic.stories.js +0 -42
- package/lib/cjs/utils/devUtils/props/fieldAttributes.js +0 -74
- package/lib/components/AccordionGridGroup/AccordionGrid.styles.js +0 -65
- package/lib/components/AccordionGroup/Accordion.styles.js +0 -66
- package/lib/components/Badge/Badge.styles.js +0 -163
- package/lib/components/Badge/index.js +0 -1
- package/lib/components/Box/Box.styles.js +0 -6
- package/lib/components/Bracket/Bracket.styles.js +0 -9
- package/lib/components/Breadcrumbs/Breadcrumb.styles.js +0 -45
- package/lib/components/Button/Buttons.styles.js +0 -246
- package/lib/components/Card/Card.styles.js +0 -13
- package/lib/components/CopyText/CopyText.styles.js +0 -48
- package/lib/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +0 -49
- package/lib/components/FileInputField/FileInputField.styles.js +0 -58
- package/lib/components/HelpHint/HelpHint.styles.js +0 -53
- package/lib/components/IconButton/IconButton.styles.js +0 -164
- package/lib/components/ImageUploadField/imageUpload.js +0 -49
- package/lib/components/ListItem/ListItem.styles.js +0 -21
- package/lib/components/ListViewItem/ListViewItem.styles.js +0 -69
- package/lib/components/Messages/Message.styles.js +0 -99
- package/lib/components/Radio/Radio.styles.js +0 -55
- package/lib/components/RockerButton/RockerButton.styles.js +0 -52
- package/lib/components/ScrollBox/ScrollBox.styles.js +0 -43
- package/lib/components/TextArea/TextArea.styles.js +0 -47
- package/lib/components/TimeZonePicker/TimeZone.styles.js +0 -30
- package/lib/components/TooltipTrigger/Tooltip.styles.js +0 -71
- package/lib/styles/theme-ui/ThemeView.js +0 -9
- package/lib/styles/themeOverrides/stories/AccordionGroup.chromatic.stories.js +0 -17
- package/lib/styles/themeOverrides/stories/Button.chromatic.stories.js +0 -37
- package/lib/styles/themeOverrides/stories/EnvironmentBreadcrumb.chromatic.stories.js +0 -108
- package/lib/styles/themeOverrides/stories/IconButton.chromatic.stories.js +0 -25
- package/lib/styles/themeOverrides/stories/Label.chromatic.stories.js +0 -12
- package/lib/styles/themeOverrides/stories/Link.chromatic.stories.js +0 -14
- package/lib/styles/themeOverrides/stories/NavBar.chromatic.stories.js +0 -367
- package/lib/styles/themeOverrides/stories/NumberField.chromatic.stories.js +0 -12
- package/lib/styles/themeOverrides/stories/RockerButtonGroup.chromatic.stories.js +0 -21
- package/lib/styles/themeOverrides/stories/SearchField.chromatic.stories.js +0 -19
- package/lib/styles/themeOverrides/stories/SelectField.chromatic.stories.js +0 -21
- package/lib/styles/themeOverrides/withUiLibraryCss.js +0 -28
- package/lib/utils/devUtils/props/fieldAttributes.js +0 -52
@@ -16,12 +16,12 @@ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-st
|
|
16
16
|
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
17
17
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
18
18
|
import React, { useMemo, forwardRef, useImperativeHandle, useRef } from 'react';
|
19
|
-
import PropTypes from 'prop-types';
|
20
|
-
import { mergeProps } from 'react-aria';
|
21
19
|
import { GridCollection, useGridState } from '@react-stately/grid';
|
22
20
|
import { GridKeyboardDelegate, useGrid } from '@react-aria/grid';
|
23
|
-
import {
|
21
|
+
import { mergeProps } from '@react-aria/utils';
|
24
22
|
import { useListState } from '@react-stately/list';
|
23
|
+
import PropTypes from 'prop-types';
|
24
|
+
import { useCollator, useLocale } from '@react-aria/i18n';
|
25
25
|
import { AccordionGridContext } from '../../context/AccordionGridContext';
|
26
26
|
import AccordionGridItem from '../AccordionGridItem';
|
27
27
|
import Box from '../Box';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
2
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
3
3
|
import React, { useState } from 'react';
|
4
|
-
import { Item } from 'react-stately';
|
4
|
+
import { Item } from '@react-stately/collections';
|
5
5
|
import CreateIcon from 'mdi-react/CreateIcon';
|
6
6
|
import MoreVertIcon from 'mdi-react/MoreVertIcon';
|
7
7
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
@@ -273,7 +273,30 @@ export var Controlled = function Controlled() {
|
|
273
273
|
}) : null);
|
274
274
|
}))
|
275
275
|
);
|
276
|
-
};
|
276
|
+
}; // const items = [
|
277
|
+
// { id: 1, name: "Aardvark", key: "Aardvark" },
|
278
|
+
// { id: 2, name: "Kangaroo", key: "Kangaroo" },
|
279
|
+
// { id: 3, name: "Snake", key: "Snake" },
|
280
|
+
// { id: 4, name: "Frog", key: "Frog" },
|
281
|
+
// { id: 5, name: "Seal", key: "Seal" },
|
282
|
+
// { id: 6, name: "Orangutan", key: "Orangutan" },
|
283
|
+
// { id: 7, name: "Shark", key: "Shark" }
|
284
|
+
// ];
|
285
|
+
// const data = [
|
286
|
+
// {
|
287
|
+
// name: "Client Application Developer",
|
288
|
+
// key: "Client"
|
289
|
+
// },
|
290
|
+
// {
|
291
|
+
// name: "Environment Admin",
|
292
|
+
// key: "Environment"
|
293
|
+
// },
|
294
|
+
// {
|
295
|
+
// name: "Organization Admin",
|
296
|
+
// key: "Organization"
|
297
|
+
// }
|
298
|
+
// ];
|
299
|
+
|
277
300
|
export var AccordionWithInputs = function AccordionWithInputs() {
|
278
301
|
return ___EmotionJSX(AccordionGridGroup, {
|
279
302
|
items: data,
|
@@ -2,7 +2,7 @@ import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerat
|
|
2
2
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
3
3
|
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
4
4
|
import React from 'react';
|
5
|
-
import { Item } from 'react-stately';
|
5
|
+
import { Item } from '@react-stately/collections';
|
6
6
|
import userEvent from '@testing-library/user-event';
|
7
7
|
import axeTest from '../../utils/testUtils/testAxe';
|
8
8
|
import { act, fireEvent, render, screen, waitFor } from '../../utils/testUtils/testWrapper';
|
@@ -6,8 +6,8 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
6
6
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
7
7
|
import React, { useEffect, useRef } from 'react';
|
8
8
|
import PropTypes from 'prop-types';
|
9
|
-
import { mergeProps } from 'react-aria';
|
10
9
|
import { useGridRow } from '@react-aria/grid';
|
10
|
+
import { mergeProps } from '@react-aria/utils';
|
11
11
|
import { useAccordionGridContext } from '../../context/AccordionGridContext';
|
12
12
|
import Box from '../Box';
|
13
13
|
import AccordionGridItemHeader from './AccordionGridItemHeader';
|
@@ -76,7 +76,7 @@ var AccordionGridItem = function AccordionGridItem(props) {
|
|
76
76
|
"aria-selected": isSelected,
|
77
77
|
"aria-expanded": isSelected,
|
78
78
|
className: classNames,
|
79
|
-
variant: "
|
79
|
+
variant: "accordion.accordionGridItem",
|
80
80
|
ref: rowRef
|
81
81
|
}), ___EmotionJSX(AccordionGridItemHeader, _extends({
|
82
82
|
item: item,
|
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectW
|
|
3
3
|
var _excluded = ["item", "className", "children", "isSelected", "navigationMode"];
|
4
4
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
5
5
|
import React, { forwardRef } from 'react';
|
6
|
+
import { mergeProps } from '@react-aria/utils';
|
6
7
|
import PropTypes from 'prop-types';
|
7
|
-
import { mergeProps } from 'react-aria';
|
8
8
|
import { useGridCell } from '@react-aria/grid';
|
9
9
|
import { useHover } from '@react-aria/interactions';
|
10
10
|
import { useAccordionGridContext } from '../../context/AccordionGridContext';
|
@@ -64,7 +64,7 @@ var AccordionGridItemBody = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
64
64
|
|
65
65
|
return ___EmotionJSX(Box, _extends({
|
66
66
|
as: "div",
|
67
|
-
variant: "
|
67
|
+
variant: "accordion.accordionGridBody",
|
68
68
|
role: "gridcell",
|
69
69
|
ref: ref
|
70
70
|
}, mergedProps, {
|
@@ -3,8 +3,9 @@ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectW
|
|
3
3
|
var _excluded = ["item", "className", "children", "isSelected", "hasCaret", "navigationMode"];
|
4
4
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
5
5
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
6
|
+
import { mergeProps } from '@react-aria/utils';
|
7
|
+
import { useFocusRing } from '@react-aria/focus';
|
6
8
|
import PropTypes from 'prop-types';
|
7
|
-
import { mergeProps, useFocusRing } from 'react-aria';
|
8
9
|
import { useGridCell } from '@react-aria/grid';
|
9
10
|
import { useHover, usePress } from '@react-aria/interactions';
|
10
11
|
import MenuDown from 'mdi-react/MenuDownIcon';
|
@@ -93,7 +94,7 @@ var AccordionGridItemHeader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
93
94
|
as: "div",
|
94
95
|
ref: cellRef
|
95
96
|
}, mergedProps, {
|
96
|
-
variant: "
|
97
|
+
variant: "accordion.accordionGridHeader",
|
97
98
|
isFocused: isFocusVisible,
|
98
99
|
isSelected: isSelected,
|
99
100
|
className: classNames
|
@@ -20,9 +20,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
20
20
|
|
21
21
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
22
22
|
import { useAccordion } from '@react-aria/accordion';
|
23
|
+
import { useTreeState } from '@react-stately/tree';
|
23
24
|
import { mergeProps } from '@react-aria/utils';
|
24
25
|
import PropTypes from 'prop-types';
|
25
|
-
import { useTreeState } from 'react-stately';
|
26
26
|
import { Box } from '../../index';
|
27
27
|
import AccordionItem from '../AccordionItem';
|
28
28
|
import { AccordionContext } from '../../context/AccordionContext';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
2
|
import React, { useState } from 'react';
|
3
|
-
import { Item } from 'react-stately';
|
3
|
+
import { Item } from '@react-stately/collections';
|
4
4
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
5
5
|
import Text from '../Text';
|
6
6
|
import Button from '../Button';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
2
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
3
3
|
import React from 'react';
|
4
|
-
import { Item } from 'react-stately';
|
4
|
+
import { Item } from '@react-stately/collections';
|
5
5
|
import userEvent from '@testing-library/user-event';
|
6
6
|
import axeTest from '../../utils/testUtils/testAxe';
|
7
7
|
import { act, fireEvent, render, screen } from '../../utils/testUtils/testWrapper';
|
@@ -5,10 +5,11 @@ import React, { forwardRef, useRef, useContext, useImperativeHandle } from 'reac
|
|
5
5
|
import PropTypes from 'prop-types';
|
6
6
|
import MenuDown from 'mdi-react/MenuDownIcon';
|
7
7
|
import MenuUp from 'mdi-react/MenuUpIcon';
|
8
|
-
import { mergeProps, useButton } from 'react-aria';
|
9
8
|
import { Button as ThemeUIButton } from 'theme-ui';
|
10
|
-
import { useAccordionItem } from '@react-aria/accordion';
|
11
9
|
import { useHover } from '@react-aria/interactions';
|
10
|
+
import { mergeProps } from '@react-aria/utils';
|
11
|
+
import { useAccordionItem } from '@react-aria/accordion';
|
12
|
+
import { useButton } from '@react-aria/button';
|
12
13
|
import { useFocusRing } from '@react-aria/focus';
|
13
14
|
import { Text, Icon, Box } from '../../index';
|
14
15
|
import { useStatusClasses } from '../../hooks';
|
@@ -83,18 +84,18 @@ var AccordionItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
83
84
|
px: '0',
|
84
85
|
height: 'unset'
|
85
86
|
},
|
86
|
-
variant: "
|
87
|
+
variant: "accordionHeader",
|
87
88
|
className: buttonClasses
|
88
89
|
}, mergeProps(hoverProps, accordionButtonProps, raButtonProps, buttonProps, focusProps)), ___EmotionJSX(Text, {
|
89
90
|
className: buttonClasses,
|
90
|
-
variant: "accordion.
|
91
|
+
variant: "accordion.accordionTitle"
|
91
92
|
}, item.props.label), ___EmotionJSX(Box, {
|
92
93
|
as: "span",
|
93
94
|
ml: "5px"
|
94
95
|
}, ___EmotionJSX(Icon, {
|
95
96
|
icon: isOpen ? MenuUp : MenuDown
|
96
97
|
}))), isOpen && ___EmotionJSX(Box, _extends({
|
97
|
-
variant: "accordion.
|
98
|
+
variant: "accordion.accordionBody"
|
98
99
|
}, accordionRegionProps, regionProps, {
|
99
100
|
className: itemClasses
|
100
101
|
}), item.rendered));
|
@@ -21,11 +21,13 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
21
21
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
22
22
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
23
23
|
import React, { useCallback, useState } from 'react';
|
24
|
+
import { useLabel } from '@react-aria/label';
|
25
|
+
import { mergeProps } from '@react-aria/utils';
|
24
26
|
import PropTypes from 'prop-types';
|
25
|
-
import { mergeProps, useLabel } from 'react-aria';
|
26
27
|
import { v4 as uuid } from 'uuid';
|
27
28
|
import { Box, Button, FieldHelperText, Label, Text } from '../../';
|
28
29
|
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/devUtils/props/ariaAttributes';
|
30
|
+
import ArrayFieldItem from './ArrayFieldItem';
|
29
31
|
import isValidPositiveInt from '../../utils/devUtils/props/isValidPositiveInt';
|
30
32
|
import statuses from '../../utils/devUtils/constants/statuses';
|
31
33
|
/**
|
@@ -128,14 +130,6 @@ var ArrayField = function ArrayField(props) {
|
|
128
130
|
raLabelProps = _useLabel.labelProps;
|
129
131
|
|
130
132
|
var isLimitReached = !!maxSize && (value || fieldValues).length >= maxSize;
|
131
|
-
var isDisabled = (value || fieldValues).length === 1;
|
132
|
-
var renderedItem = useCallback(function (id, fieldValue, otherFieldProps, onComponentRender) {
|
133
|
-
if (onComponentRender) {
|
134
|
-
return onComponentRender(id, fieldValue, onFieldValueChange, onFieldDelete, isDisabled, otherFieldProps);
|
135
|
-
}
|
136
|
-
|
137
|
-
return renderField(id, fieldValue, onFieldValueChange, onFieldDelete, isDisabled, otherFieldProps);
|
138
|
-
}, [onFieldValueChange, onFieldDelete, renderField, isDisabled]);
|
139
133
|
|
140
134
|
var _getAriaAttributeProp = getAriaAttributeProps(others),
|
141
135
|
ariaProps = _getAriaAttributeProp.ariaProps,
|
@@ -152,18 +146,24 @@ var ArrayField = function ArrayField(props) {
|
|
152
146
|
fieldValue = _ref2.fieldValue,
|
153
147
|
otherFieldProps = _objectWithoutProperties(_ref2, _excluded2);
|
154
148
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
149
|
+
var isDisabled = (value || fieldValues).length === 1;
|
150
|
+
return ___EmotionJSX(ArrayFieldItem, _extends({
|
151
|
+
key: id,
|
152
|
+
id: id,
|
153
|
+
isDisabled: isDisabled,
|
154
|
+
fieldValue: fieldValue,
|
155
|
+
onComponentRender: onComponentRender,
|
156
|
+
onFieldValueChange: onFieldValueChange,
|
157
|
+
onFieldDelete: onFieldDelete,
|
158
|
+
renderField: renderField
|
159
|
+
}, otherFieldProps));
|
160
160
|
})), helperText && ___EmotionJSX(FieldHelperText, {
|
161
161
|
status: status
|
162
162
|
}, helperText), isLimitReached && ___EmotionJSX(FieldHelperText, {
|
163
163
|
status: statuses.DEFAULT
|
164
164
|
}, maxSizeText || "Maximum ".concat(maxSize, " items.")), !isLimitReached && ___EmotionJSX(Button, {
|
165
165
|
"aria-label": "Add field",
|
166
|
-
variant: "
|
166
|
+
variant: "text",
|
167
167
|
onPress: onFieldAdd,
|
168
168
|
sx: {
|
169
169
|
width: 'fit-content',
|
@@ -16,7 +16,7 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
16
16
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
17
17
|
|
18
18
|
import React from 'react';
|
19
|
-
import { OverlayProvider } from 'react-aria';
|
19
|
+
import { OverlayProvider } from '@react-aria/overlays';
|
20
20
|
import { v4 as uuid } from 'uuid';
|
21
21
|
import { ArrayField, ArrayFieldDeleteButton, Item, SelectField, TextField } from '../../';
|
22
22
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
2
|
+
var _excluded = ["id", "onComponentRender", "fieldValue", "isDisabled", "onFieldDelete", "onFieldValueChange", "renderField"];
|
3
|
+
import React from 'react';
|
4
|
+
import PropTypes from 'prop-types';
|
5
|
+
import Box from '../Box';
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
|
+
var ArrayFieldItem = /*#__PURE__*/React.memo(function (_ref) {
|
8
|
+
var id = _ref.id,
|
9
|
+
onComponentRender = _ref.onComponentRender,
|
10
|
+
fieldValue = _ref.fieldValue,
|
11
|
+
isDisabled = _ref.isDisabled,
|
12
|
+
onFieldDelete = _ref.onFieldDelete,
|
13
|
+
onFieldValueChange = _ref.onFieldValueChange,
|
14
|
+
renderField = _ref.renderField,
|
15
|
+
otherFieldProps = _objectWithoutProperties(_ref, _excluded);
|
16
|
+
|
17
|
+
return ___EmotionJSX(Box, {
|
18
|
+
as: "li",
|
19
|
+
mb: "xs"
|
20
|
+
}, onComponentRender ? onComponentRender(id, fieldValue, onFieldValueChange, onFieldDelete, isDisabled, otherFieldProps) : renderField(id, fieldValue, onFieldValueChange, onFieldDelete, isDisabled, otherFieldProps));
|
21
|
+
});
|
22
|
+
ArrayFieldItem.propTypes = {
|
23
|
+
id: PropTypes.string,
|
24
|
+
onComponentRender: PropTypes.func,
|
25
|
+
fieldValue: PropTypes.string,
|
26
|
+
isDisabled: PropTypes.bool,
|
27
|
+
onFieldDelete: PropTypes.func,
|
28
|
+
onFieldValueChange: PropTypes.func,
|
29
|
+
renderField: PropTypes.func
|
30
|
+
};
|
31
|
+
export default ArrayFieldItem;
|
@@ -31,7 +31,7 @@ var ExtendedBox = /*#__PURE__*/_styled(ThemeUIBox, process.env.NODE_ENV === "pro
|
|
31
31
|
} : {
|
32
32
|
target: "e146bxl90",
|
33
33
|
label: "ExtendedBox"
|
34
|
-
})(layout, flexbox, typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JveC9Cb3guanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBU29CIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JveC9Cb3guanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgZm9yd2FyZFJlZiwgdXNlTWVtbyB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBsYXlvdXQsIGZsZXhib3gsIHR5cG9ncmFwaHkgfSBmcm9tICdzdHlsZWQtc3lzdGVtJztcbmltcG9ydCB7IEJveCBhcyBUaGVtZVVJQm94IH0gZnJvbSAndGhlbWUtdWknO1xuaW1wb3J0IHsgcHJvcFR5cGUgYXMgc3R5bGVQcm9wVHlwZSB9IGZyb20gJ0BzdHlsZWQtc3lzdGVtL3Byb3AtdHlwZXMnO1xuaW1wb3J0IHsgdG9OdW1iZXIgfSBmcm9tICdsb2Rhc2gnO1xuaW1wb3J0IHsgdXNlU3RhdHVzQ2xhc3NlcywgdXNlUHJvcFdhcm5pbmcgfSBmcm9tICcuLi8uLi9ob29rcyc7XG5cbmNvbnN0IEV4dGVuZGVkQm94ID0gc3R5bGVkKFRoZW1lVUlCb3gpKGxheW91dCwgZmxleGJveCwgdHlwb2dyYXBoeSk7XG5cbmNvbnN0IEJveCA9IGZvcndhcmRSZWYoKHByb3BzLCByZWYpID0+
|
34
|
+
})(layout, flexbox, typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JveC9Cb3guanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBU29CIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JveC9Cb3guanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgZm9yd2FyZFJlZiwgdXNlTWVtbyB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBsYXlvdXQsIGZsZXhib3gsIHR5cG9ncmFwaHkgfSBmcm9tICdzdHlsZWQtc3lzdGVtJztcbmltcG9ydCB7IEJveCBhcyBUaGVtZVVJQm94IH0gZnJvbSAndGhlbWUtdWknO1xuaW1wb3J0IHsgcHJvcFR5cGUgYXMgc3R5bGVQcm9wVHlwZSB9IGZyb20gJ0BzdHlsZWQtc3lzdGVtL3Byb3AtdHlwZXMnO1xuaW1wb3J0IHsgdG9OdW1iZXIgfSBmcm9tICdsb2Rhc2gnO1xuaW1wb3J0IHsgdXNlU3RhdHVzQ2xhc3NlcywgdXNlUHJvcFdhcm5pbmcgfSBmcm9tICcuLi8uLi9ob29rcyc7XG5cbmNvbnN0IEV4dGVuZGVkQm94ID0gc3R5bGVkKFRoZW1lVUlCb3gpKGxheW91dCwgZmxleGJveCwgdHlwb2dyYXBoeSk7XG5cbmNvbnN0IEJveCA9IGZvcndhcmRSZWYoKHByb3BzLCByZWYpID0+IHtcbiAgY29uc3Qge1xuICAgIGZsZXhEaXJlY3Rpb24sIC8vIGVzbGludC1kaXNhYmxlLWxpbmVcbiAgICBnYXAsXG4gICAgaXNSb3csXG4gICAgaXNEaXNhYmxlZCxcbiAgICBjbGFzc05hbWUsXG4gICAgZm9udFNpemUsXG4gICAgc3gsIC8vIGVzbGludC1kaXNhYmxlLWxpbmVcbiAgICAuLi5vdGhlcnNcbiAgfSA9IHByb3BzO1xuICBjb25zdCBmZCA9IGZsZXhEaXJlY3Rpb24gfHwgaXNSb3cgPyAncm93JyA6ICdjb2x1bW4nO1xuICBjb25zdCBjdXN0b20gPSB7IC4uLnN4IH07XG5cbiAgY29uc3QgeyBjbGFzc05hbWVzIH0gPSB1c2VTdGF0dXNDbGFzc2VzKGNsYXNzTmFtZSwgeyBpc0Rpc2FibGVkIH0pO1xuICB1c2VQcm9wV2FybmluZyhwcm9wcywgJ2Rpc2FibGVkJywgJ2lzRGlzYWJsZWQnKTtcblxuICBpZiAoZ2FwKSB7XG4gICAgY3VzdG9tWycmID4gKiArICo6bm90KDpmaXJzdC1jaGlsZCkgLyogZW1vdGlvbi1kaXNhYmxlLXNlcnZlci1yZW5kZXJpbmctdW5zYWZlLXNlbGVjdG9yLXdhcm5pbmctcGxlYXNlLWRvLW5vdC11c2UtdGhpcy10aGUtd2FybmluZy1leGlzdHMtZm9yLWEtcmVhc29uICovJ10gPSB7XG4gICAgICBbZmQgPT09ICdyb3cnID8gJ21hcmdpbkxlZnQnIDogJ21hcmdpblRvcCddOiBnYXAsXG4gICAgfTtcbiAgfVxuXG4gIGNvbnN0IGN1c3RvbUZvbnRTaXplID0gdXNlTWVtbygoKSA9PiB7XG4gICAgY29uc3QgbnVtZXJpY2FsRm9udFNpemUgPSB0b051bWJlcihmb250U2l6ZSk7XG4gICAgaWYgKE51bWJlci5pc05hTihudW1lcmljYWxGb250U2l6ZSkpIHtcbiAgICAgIHJldHVybiBmb250U2l6ZTtcbiAgICB9XG4gICAgcmV0dXJuIG51bWVyaWNhbEZvbnRTaXplO1xuICB9LCBbZm9udFNpemVdKTtcblxuICByZXR1cm4gKFxuICAgIDxFeHRlbmRlZEJveFxuICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWVzfVxuICAgICAgcmVmPXtyZWZ9XG4gICAgICBkaXNwbGF5PVwiZmxleFwiXG4gICAgICBmbGV4RGlyZWN0aW9uPXtmZH1cbiAgICAgIHZhcmlhbnQ9XCJib3hlcy5iYXNlXCJcbiAgICAgIGZvbnRTaXplPXtjdXN0b21Gb250U2l6ZX1cbiAgICAgIHsuLi5vdGhlcnN9XG4gICAgICBzeD17Y3VzdG9tfVxuICAgIC8+XG4gICk7XG59KTtcblxuQm94LnByb3BUeXBlcyA9IHtcbiAgLyoqIFRoZSBiYWNrZ3JvdW5kIGNvbG9yIG9mIHRoZSBib3guICovXG4gIGJnOiBQcm9wVHlwZXMuc3RyaW5nLFxuICAvKiogV2hldGhlciB0aGUgYm94IGlzIGRpc2FibGVkLiAqL1xuICBpc0Rpc2FibGVkOiBQcm9wVHlwZXMub25lT2ZUeXBlKFtQcm9wVHlwZXMuYm9vbCwgUHJvcFR5cGVzLm9iamVjdF0pLFxuICAvKiogVGhlIGJhc2UgSFRNTCB0YWcgbmFtZSBvciBSZWFjdCBjb21wb25lbnQgdHlwZSB0byByZW5kZXIgKi9cbiAgYXM6IFByb3BUeXBlcy5vbmVPZlR5cGUoW1Byb3BUeXBlcy5zdHJpbmcsIFByb3BUeXBlcy5lbGVtZW50VHlwZV0pLFxuICAvKiogV2hlbiB0cnVlLCBkaXNwbGF5IGFzIGEgcm93IHJhdGhlciB0aGFuIGEgY29sdW1uLiAqL1xuICBpc1JvdzogUHJvcFR5cGVzLmJvb2wsXG4gIC8qKiBHYXAgYmV0d2VlbiBpdGVtcywgd2hldGhlciBpbiBhIHJvdyBvciBjb2x1bW4uICovXG4gIGdhcDogc3R5bGVQcm9wVHlwZSxcbiAgZm9udFNpemU6IFByb3BUeXBlcy5vbmVPZlR5cGUoW1Byb3BUeXBlcy5zdHJpbmcsIFByb3BUeXBlcy5udW1iZXJdKSxcbn07XG5cbkJveC5kZWZhdWx0UHJvcHMgPSB7XG4gIGFzOiAnZGl2JyxcbiAgaXNSb3c6IGZhbHNlLFxuICBpc0Rpc2FibGVkOiBmYWxzZSxcbn07XG5cbkJveC5kaXNwbGF5TmFtZSA9ICdCb3gnO1xuXG5leHBvcnQgZGVmYXVsdCBCb3g7XG4iXX0= */");
|
35
35
|
|
36
36
|
var Box = /*#__PURE__*/forwardRef(function (props, ref) {
|
37
37
|
var flexDirection = props.flexDirection,
|
@@ -72,7 +72,7 @@ var Box = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
72
72
|
ref: ref,
|
73
73
|
display: "flex",
|
74
74
|
flexDirection: fd,
|
75
|
-
variant: "
|
75
|
+
variant: "boxes.base",
|
76
76
|
fontSize: customFontSize
|
77
77
|
}, others, {
|
78
78
|
sx: custom
|
@@ -18,7 +18,7 @@ var Bracket = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
18
18
|
return bracketRef.current;
|
19
19
|
});
|
20
20
|
return ___EmotionJSX(Box, _extends({
|
21
|
-
variant: "
|
21
|
+
variant: "boxes.bracketBase"
|
22
22
|
}, others), !isLast && ___EmotionJSX(Box, {
|
23
23
|
width: 15,
|
24
24
|
sx: {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
2
2
|
import React from 'react';
|
3
|
-
import { Box, Bracket,
|
3
|
+
import { Box, Bracket, Chip, Text } from '../../index';
|
4
4
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
5
5
|
import BracketReadme from './Bracket.mdx';
|
6
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -28,7 +28,7 @@ export var Default = function Default() {
|
|
28
28
|
field3: 'UX Team',
|
29
29
|
key: 'Group2Field'
|
30
30
|
}];
|
31
|
-
var
|
31
|
+
var customChipStyles = {
|
32
32
|
'& > span': {
|
33
33
|
textTransform: 'none',
|
34
34
|
fontWeight: '500'
|
@@ -42,11 +42,11 @@ export var Default = function Default() {
|
|
42
42
|
bg: "background"
|
43
43
|
}, ___EmotionJSX(Box, {
|
44
44
|
isRow: true
|
45
|
-
}, ___EmotionJSX(
|
45
|
+
}, ___EmotionJSX(Chip, {
|
46
46
|
label: "Any",
|
47
47
|
bg: "neutral.20",
|
48
48
|
mr: "sm",
|
49
|
-
sx:
|
49
|
+
sx: customChipStyles,
|
50
50
|
alignSelf: "center"
|
51
51
|
}), ___EmotionJSX(Text, null, " of the conditions are true")), _mapInstanceProperty(anyConditions).call(anyConditions, function (item, index) {
|
52
52
|
return ___EmotionJSX(Box, {
|
@@ -56,8 +56,7 @@ export var Default = function Default() {
|
|
56
56
|
isLast: index === anyConditions.length - 1
|
57
57
|
}), ___EmotionJSX(Box, {
|
58
58
|
mt: "md",
|
59
|
-
|
60
|
-
variant: "forms.input.fieldControlWrapper",
|
59
|
+
variant: "forms.input.container",
|
61
60
|
bg: "white",
|
62
61
|
isRow: true,
|
63
62
|
alignItems: "center",
|
@@ -71,11 +70,11 @@ export var Default = function Default() {
|
|
71
70
|
}, ___EmotionJSX(Text, {
|
72
71
|
pl: "md",
|
73
72
|
pr: "sm"
|
74
|
-
}, item.field1), ___EmotionJSX(
|
73
|
+
}, item.field1), ___EmotionJSX(Chip, {
|
75
74
|
label: "Equals",
|
76
75
|
bg: "accent.90",
|
77
76
|
textColor: "neutral.10",
|
78
|
-
sx:
|
77
|
+
sx: customChipStyles,
|
79
78
|
mr: "sm",
|
80
79
|
alignSelf: "center"
|
81
80
|
}), ___EmotionJSX(Text, null, item.field3)));
|
@@ -15,9 +15,10 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
15
15
|
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
16
|
|
17
17
|
import React, { forwardRef, Fragment, useCallback, useImperativeHandle, useMemo, useRef } from 'react';
|
18
|
-
import {
|
18
|
+
import { useBreadcrumbItem } from '@react-aria/breadcrumbs';
|
19
19
|
import PropTypes from 'prop-types';
|
20
|
-
import { mergeProps
|
20
|
+
import { mergeProps } from '@react-aria/utils';
|
21
|
+
import { omit } from 'lodash/object';
|
21
22
|
import { usePropWarning } from '../../hooks/';
|
22
23
|
import { Button, IconButton, Text, Link } from '../../index';
|
23
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -5,8 +5,9 @@ import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array
|
|
5
5
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
6
6
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
7
7
|
import React, { forwardRef, useRef, useImperativeHandle, useCallback } from 'react';
|
8
|
+
import { useBreadcrumbs } from '@react-aria/breadcrumbs';
|
8
9
|
import PropTypes from 'prop-types';
|
9
|
-
import { mergeProps
|
10
|
+
import { mergeProps } from '@react-aria/utils';
|
10
11
|
import { Box, Icon } from '../../index';
|
11
12
|
import { usePropWarning } from '../../hooks/';
|
12
13
|
import BreadcrumbItem from './BreadcrumbItem';
|
@@ -43,13 +44,13 @@ var Breadcrumbs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
43
44
|
},
|
44
45
|
as: "li",
|
45
46
|
key: "li-".concat(child.key),
|
46
|
-
variant: "
|
47
|
+
variant: "text.breadcrumbLi"
|
47
48
|
}, ___EmotionJSX(BreadcrumbItem, _extends({
|
48
49
|
"data-id": child['data-id'],
|
49
50
|
isCurrent: isCurrentItem,
|
50
51
|
onAction: onAction,
|
51
52
|
actionKey: child.key,
|
52
|
-
variant: "
|
53
|
+
variant: "text.breadcrumbLink"
|
53
54
|
}, child.props), child.props.children), icon && !isCurrentItem && ___EmotionJSX(Icon, _extends({
|
54
55
|
"aria-hidden": "true",
|
55
56
|
icon: icon,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import React from 'react';
|
3
|
-
import ChevronRightIcon from 'mdi-react/ChevronRightIcon';
|
4
|
-
import { Item } from 'react-stately';
|
5
3
|
import { action } from '@storybook/addon-actions';
|
4
|
+
import { Item } from '@react-stately/collections';
|
5
|
+
import ChevronRightIcon from 'mdi-react/ChevronRightIcon';
|
6
6
|
import Breadcrumbs from './Breadcrumbs';
|
7
7
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
8
8
|
import BreadcrumbsReadme from './Breadcrumbs.mdx';
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
3
3
|
import React from 'react';
|
4
|
-
import
|
4
|
+
import { mergeProps } from '@react-aria/utils';
|
5
5
|
import CreateIcon from 'mdi-react/CreateIcon';
|
6
|
-
import {
|
7
|
-
import
|
6
|
+
import { Item } from '@react-stately/collections';
|
7
|
+
import ChevronRightIcon from 'mdi-react/ChevronRightIcon';
|
8
8
|
import userEvent from '@testing-library/user-event';
|
9
9
|
import Breadcrumbs from './Breadcrumbs';
|
10
10
|
import axeTest from '../../utils/testUtils/testAxe';
|
@@ -17,10 +17,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
17
17
|
|
18
18
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
19
19
|
import PropTypes from 'prop-types';
|
20
|
-
import { mergeProps, useButton, useFocusRing } from 'react-aria';
|
21
20
|
import { Button as ThemeUIButton } from 'theme-ui';
|
21
|
+
import { useButton } from '@react-aria/button';
|
22
22
|
import { useHover } from '@react-aria/interactions';
|
23
|
-
import {
|
23
|
+
import { useFocusRing } from '@react-aria/focus';
|
24
|
+
import { mergeProps } from '@react-aria/utils';
|
25
|
+
import { useStatusClasses, usePropWarning, useAriaLabelWarning, useDeprecationWarning } from '../../hooks';
|
24
26
|
import Loader from '../Loader';
|
25
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
26
28
|
var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
@@ -70,6 +72,15 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
70
72
|
}),
|
71
73
|
classNames = _useStatusClasses.classNames;
|
72
74
|
|
75
|
+
useDeprecationWarning('The "icon" variant for `Button` is deprecated in Astro-UI 1.0.0, use the `IconButton` component instead.', {
|
76
|
+
isActive: props.variant === 'icon'
|
77
|
+
});
|
78
|
+
useDeprecationWarning('The "danger" variant for `Button` will be deprecated in Astro-UI 2.0.0, use the `critical` variant instead.', {
|
79
|
+
isActive: props.variant === 'danger'
|
80
|
+
});
|
81
|
+
useDeprecationWarning('The "text" variant for `Button` will be deprecated in Astro-UI 2.0.0, use the `link` variant instead.', {
|
82
|
+
isActive: props.variant === 'text'
|
83
|
+
});
|
73
84
|
var ariaLabel = props['aria-label'];
|
74
85
|
useAriaLabelWarning('Button', ariaLabel, variant === 'filter');
|
75
86
|
return ___EmotionJSX(ThemeUIButton, _extends({
|
@@ -16,7 +16,7 @@ delete variants.ICON;
|
|
16
16
|
delete variants.ICON_BUTTON;
|
17
17
|
delete variants.INVERTED; // add designer approved variants for devs to use here
|
18
18
|
|
19
|
-
var variantOptions = ['critical', 'default', 'inline', 'inlinePrimary', 'link', 'primary', 'success'];
|
19
|
+
var variantOptions = ['critical', 'danger', 'default', 'inline', 'inlinePrimary', 'link', 'primary', 'success', 'text'];
|
20
20
|
export default {
|
21
21
|
title: 'Components/Button',
|
22
22
|
component: Button,
|
@@ -14,15 +14,14 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
14
14
|
|
15
15
|
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
16
|
|
17
|
-
import React, { forwardRef, useRef, useImperativeHandle,
|
18
|
-
import { useCheckbox } from 'react-aria';
|
19
|
-
import { useToggleState } from 'react-stately';
|
17
|
+
import React, { forwardRef, useRef, useImperativeHandle, useEffect } from 'react';
|
18
|
+
import { useCheckbox } from '@react-aria/checkbox';
|
19
|
+
import { useToggleState } from '@react-stately/toggle';
|
20
20
|
import { usePress } from '@react-aria/interactions';
|
21
21
|
import PropTypes from 'prop-types';
|
22
22
|
import { v4 as uuid } from 'uuid';
|
23
23
|
import { Box, Checkbox, FieldHelperText, Label } from '../../';
|
24
24
|
import { ariaAttributesBasePropTypes } from '../../utils/devUtils/props/ariaAttributes';
|
25
|
-
import { inputFieldAttributesBasePropTypes } from '../../utils/devUtils/props/fieldAttributes';
|
26
25
|
import { useField, usePropWarning } from '../../hooks';
|
27
26
|
import statuses from '../../utils/devUtils/constants/statuses';
|
28
27
|
/**
|
@@ -78,18 +77,16 @@ var CheckboxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
78
77
|
controlProps: _objectSpread(_objectSpread({}, controlProps), inputProps)
|
79
78
|
})),
|
80
79
|
fieldContainerProps = _useField.fieldContainerProps,
|
81
|
-
|
80
|
+
fieldControlProps = _useField.fieldControlProps,
|
82
81
|
fieldLabelProps = _useField.fieldLabelProps;
|
83
82
|
|
84
|
-
var helperTextId =
|
85
|
-
return uuid();
|
86
|
-
}, []);
|
83
|
+
var helperTextId = uuid();
|
87
84
|
return ___EmotionJSX(Box, fieldContainerProps, ___EmotionJSX(Label, _extends({
|
88
85
|
variant: "forms.label.checkbox"
|
89
86
|
}, fieldLabelProps), ___EmotionJSX(Checkbox, _extends({
|
90
87
|
ref: checkboxRef,
|
91
88
|
"aria-describedby": helperText && helperTextId
|
92
|
-
},
|
89
|
+
}, fieldControlProps)), label), helperText && ___EmotionJSX(FieldHelperText, {
|
93
90
|
status: status,
|
94
91
|
sx: {
|
95
92
|
pt: 7
|
@@ -97,7 +94,7 @@ var CheckboxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
97
94
|
id: helperTextId
|
98
95
|
}, helperText));
|
99
96
|
});
|
100
|
-
CheckboxField.propTypes = _objectSpread(
|
97
|
+
CheckboxField.propTypes = _objectSpread({
|
101
98
|
/** Whether the element should receive focus on render. */
|
102
99
|
hasAutoFocus: PropTypes.bool,
|
103
100
|
|
@@ -159,7 +156,16 @@ CheckboxField.propTypes = _objectSpread(_objectSpread({
|
|
159
156
|
onKeyDown: PropTypes.func,
|
160
157
|
|
161
158
|
/** Handler that is called when a key is released. */
|
162
|
-
onKeyUp: PropTypes.func
|
163
|
-
|
159
|
+
onKeyUp: PropTypes.func,
|
160
|
+
|
161
|
+
/** Props object that is spread directly into the root (top-level) element. */
|
162
|
+
containerProps: PropTypes.shape({}),
|
163
|
+
|
164
|
+
/** Props object that is spread directly into the input element. */
|
165
|
+
controlProps: PropTypes.shape({}),
|
166
|
+
|
167
|
+
/** Props object that is spread directly into the label element. */
|
168
|
+
labelProps: PropTypes.shape({})
|
169
|
+
}, ariaAttributesBasePropTypes);
|
164
170
|
CheckboxField.displayName = 'CheckboxField';
|
165
171
|
export default CheckboxField;
|
@@ -18,7 +18,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
18
18
|
|
19
19
|
import React, { useEffect, useState } from 'react';
|
20
20
|
import { ariaAttributeBaseArgTypes } from '../../utils/devUtils/props/ariaAttributes';
|
21
|
-
import { inputFieldAttributeBaseArgTypes } from '../../utils/devUtils/props/fieldAttributes';
|
22
21
|
import CheckboxField from './CheckboxField';
|
23
22
|
import Link from '../Link';
|
24
23
|
import Text from '../Text';
|
@@ -35,7 +34,7 @@ export default {
|
|
35
34
|
}
|
36
35
|
}
|
37
36
|
},
|
38
|
-
argTypes: _objectSpread(
|
37
|
+
argTypes: _objectSpread({
|
39
38
|
label: {
|
40
39
|
control: {
|
41
40
|
type: 'text'
|
@@ -72,8 +71,23 @@ export default {
|
|
72
71
|
hasAutoFocus: {},
|
73
72
|
isIndeterminate: {},
|
74
73
|
isDefaultSelected: {},
|
75
|
-
isSelected: {}
|
76
|
-
|
74
|
+
isSelected: {},
|
75
|
+
containerProps: {
|
76
|
+
control: {
|
77
|
+
type: 'none'
|
78
|
+
}
|
79
|
+
},
|
80
|
+
controlProps: {
|
81
|
+
control: {
|
82
|
+
type: 'none'
|
83
|
+
}
|
84
|
+
},
|
85
|
+
labelProps: {
|
86
|
+
control: {
|
87
|
+
type: 'none'
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}, ariaAttributeBaseArgTypes)
|
77
91
|
};
|
78
92
|
export var Default = function Default(args) {
|
79
93
|
return ___EmotionJSX(CheckboxField, args);
|
@@ -62,7 +62,7 @@ var Badge = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
62
62
|
}, ___EmotionJSX(ThemeUIBadge, _extends({
|
63
63
|
isRow: true
|
64
64
|
}, badgeProps, {
|
65
|
-
variant: props.variant ? fixedVariant : '
|
65
|
+
variant: props.variant ? fixedVariant : 'variants.boxes.chip'
|
66
66
|
}), (slots === null || slots === void 0 ? void 0 : slots.leftIcon) && ___EmotionJSX(Box, {
|
67
67
|
mr: "xs"
|
68
68
|
}, slots.leftIcon), ___EmotionJSX(Text, _extends({
|