@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.
Files changed (484) hide show
  1. package/CHANGELOG.md +0 -24
  2. package/lib/cjs/components/AccordionGridGroup/AccordionGrid.styles.js +85 -0
  3. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.js +6 -6
  4. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +5 -28
  5. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +8 -8
  6. package/lib/cjs/components/AccordionGridItem/AccordionGridItem.js +4 -4
  7. package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +4 -4
  8. package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +6 -8
  9. package/lib/cjs/components/AccordionGroup/Accordion.styles.js +86 -0
  10. package/lib/cjs/components/AccordionGroup/AccordionGroup.js +3 -3
  11. package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +7 -7
  12. package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +15 -15
  13. package/lib/cjs/components/AccordionItem/AccordionItem.js +8 -10
  14. package/lib/cjs/components/ArrayField/ArrayField.js +18 -20
  15. package/lib/cjs/components/ArrayField/ArrayField.stories.js +4 -4
  16. package/lib/cjs/components/{Chip → Badge}/Badge.js +1 -1
  17. package/lib/cjs/components/{Chip → Badge}/Badge.stories.js +29 -26
  18. package/lib/cjs/components/Badge/Badge.styles.js +191 -0
  19. package/lib/cjs/components/{Chip → Badge}/Badge.test.js +6 -6
  20. package/lib/cjs/components/{Chip → Badge}/index.js +2 -2
  21. package/lib/cjs/components/Box/Box.js +2 -2
  22. package/lib/cjs/{styles/variants/tooltip.js → components/Box/Box.styles.js} +3 -3
  23. package/lib/cjs/components/Bracket/Bracket.js +1 -1
  24. package/lib/cjs/components/Bracket/Bracket.stories.js +7 -6
  25. package/lib/cjs/components/Bracket/Bracket.styles.js +19 -0
  26. package/lib/cjs/components/Breadcrumbs/Breadcrumb.styles.js +65 -0
  27. package/lib/cjs/components/Breadcrumbs/BreadcrumbItem.js +4 -6
  28. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +5 -7
  29. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +6 -6
  30. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.test.js +6 -6
  31. package/lib/cjs/components/Button/Button.js +5 -18
  32. package/lib/cjs/components/Button/Button.stories.js +1 -1
  33. package/lib/cjs/components/Button/Buttons.styles.js +276 -0
  34. package/lib/cjs/components/Card/Card.styles.js +23 -0
  35. package/lib/cjs/{styles/forms/checkbox.js → components/Checkbox/Checkbox.styles.js} +0 -0
  36. package/lib/cjs/components/CheckboxField/CheckboxField.js +14 -19
  37. package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +5 -18
  38. package/lib/cjs/components/CodeView/CodeView.js +2 -2
  39. package/lib/cjs/components/CodeView/CodeView.stories.js +1 -1
  40. package/lib/cjs/{styles/variants/codeView.js → components/CodeView/CodeView.styles.js} +0 -0
  41. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.js +7 -9
  42. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +2 -2
  43. package/lib/cjs/{styles/variants/collapsiblePanel.js → components/CollapsiblePanel/CollapsiblePanel.styles.js} +72 -13
  44. package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelBadge.js +2 -2
  45. package/lib/cjs/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +4 -4
  46. package/lib/cjs/components/CollapsiblePanelItem/CollapsiblePanelItem.js +1 -1
  47. package/lib/cjs/components/ColorField/ColorField.js +23 -31
  48. package/lib/cjs/components/ColorField/ColorField.stories.js +4 -17
  49. package/lib/cjs/{styles/forms/comboBox.js → components/ColorField/ColorField.styles.js} +9 -9
  50. package/lib/cjs/{styles/forms/radio.js → components/ComboBox/ComboBox.styles.js} +27 -19
  51. package/lib/cjs/components/ComboBox/ComboBoxInput.js +20 -24
  52. package/lib/cjs/components/ComboBoxField/ComboBoxField.js +10 -14
  53. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +3 -3
  54. package/lib/cjs/components/CopyText/CopyButton.js +2 -3
  55. package/lib/cjs/components/CopyText/CopyText.js +8 -10
  56. package/lib/cjs/components/CopyText/CopyText.styles.js +69 -0
  57. package/lib/cjs/components/DataTable/DataTable.js +46 -26
  58. package/lib/cjs/components/DataTable/DataTable.stories.js +7 -7
  59. package/lib/cjs/components/DataTable/DataTable.styles.js +3 -3
  60. package/lib/cjs/components/DataTable/DataTable.test.js +8 -8
  61. package/lib/cjs/components/DataTable/{DataTableChip.js → DataTableBadge.js} +4 -4
  62. package/lib/cjs/components/DataTable/{DataTableChip.test.js → DataTableBadge.test.js} +1 -1
  63. package/lib/cjs/components/DataTable/index.js +3 -3
  64. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +14 -18
  65. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +23 -23
  66. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +3 -5
  67. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +69 -0
  68. package/lib/cjs/components/FieldHelperText/FieldHelperText.js +1 -1
  69. package/lib/cjs/{styles/variants/bidirectionalIconButton.js → components/FieldHelperText/FieldHelperText.styles.js} +21 -17
  70. package/lib/cjs/components/FileInputField/FileInputField.js +16 -13
  71. package/lib/cjs/components/FileInputField/FileInputField.stories.js +4 -2
  72. package/lib/cjs/components/FileInputField/FileInputField.styles.js +78 -0
  73. package/lib/cjs/components/FileInputField/FileItem.js +7 -7
  74. package/lib/cjs/components/FileInputField/FileSelect.js +1 -1
  75. package/lib/cjs/components/HelpHint/HelpHint.js +3 -4
  76. package/lib/cjs/components/HelpHint/HelpHint.styles.js +74 -0
  77. package/lib/cjs/components/IconButton/IconButton.js +9 -11
  78. package/lib/cjs/components/IconButton/IconButton.stories.js +2 -2
  79. package/lib/cjs/components/IconButton/IconButton.styles.js +194 -0
  80. package/lib/cjs/{styles/variants/images.js → components/Image/Image.styles.js} +0 -0
  81. package/lib/cjs/components/ImageUploadField/ImagePreviewButton.js +6 -8
  82. package/lib/cjs/components/ImageUploadField/ImageUploadField.js +4 -2
  83. package/lib/cjs/components/ImageUploadField/ImageUploadField.stories.js +4 -2
  84. package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +8 -7
  85. package/lib/cjs/components/ImageUploadField/imageUpload.js +69 -0
  86. package/lib/cjs/{styles/forms/input.js → components/Input/Input.styles.js} +21 -15
  87. package/lib/cjs/{styles/forms/label.js → components/Label/Label.styles.js} +4 -4
  88. package/lib/cjs/components/Link/Link.js +5 -9
  89. package/lib/cjs/components/Link/Link.stories.js +2 -2
  90. package/lib/cjs/{styles/variants/links.js → components/Link/Link.styles.js} +3 -3
  91. package/lib/cjs/components/LinkSelectField/LinkSelectField.js +10 -19
  92. package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +10 -9
  93. package/lib/cjs/components/ListBox/ListBox.js +6 -6
  94. package/lib/cjs/{styles/variants/listBox.js → components/ListBox/ListBox.styles.js} +11 -3
  95. package/lib/cjs/components/ListBox/ListBox.test.js +3 -3
  96. package/lib/cjs/components/ListBox/ListBoxSection.js +3 -3
  97. package/lib/cjs/components/ListBox/Option.js +2 -2
  98. package/lib/cjs/components/ListItem/ListItem.js +1 -1
  99. package/lib/cjs/components/ListItem/ListItem.styles.js +31 -0
  100. package/lib/cjs/components/ListView/ListView.stories.js +8 -10
  101. package/lib/cjs/components/ListView/ListView.test.js +8 -8
  102. package/lib/cjs/components/ListViewItem/ListViewItem.js +7 -9
  103. package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +88 -0
  104. package/lib/cjs/{styles/variants/loader.js → components/Loader/Loader.styles.js} +0 -0
  105. package/lib/cjs/components/Menu/Menu.js +7 -9
  106. package/lib/cjs/components/Menu/Menu.stories.js +4 -4
  107. package/lib/cjs/{styles/variants/menu.js → components/Menu/Menu.styles.js} +0 -0
  108. package/lib/cjs/components/MenuItem/MenuItem.js +3 -5
  109. package/lib/cjs/{styles/variants/menuItem.js → components/MenuItem/MenuItem.styles.js} +0 -0
  110. package/lib/cjs/components/Messages/Message.js +3 -3
  111. package/lib/cjs/components/Messages/Message.styles.js +110 -0
  112. package/lib/cjs/components/Messages/Messages.js +1 -1
  113. package/lib/cjs/components/Messages/Messages.stories.js +14 -14
  114. package/lib/cjs/components/Messages/Messages.test.js +4 -4
  115. package/lib/cjs/components/Modal/Modal.js +9 -24
  116. package/lib/cjs/{styles/variants/modal.js → components/Modal/Modal.styles.js} +13 -16
  117. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +15 -18
  118. package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +10 -8
  119. package/lib/cjs/components/MultivaluesField/MultivaluesField.test.js +14 -14
  120. package/lib/cjs/components/NavBar/NavBar.stories.js +1 -1
  121. package/lib/cjs/{styles/variants/navBar.js → components/NavBar/NavBar.styles.js} +96 -10
  122. package/lib/cjs/components/NavBarSection/NavBarItem.js +7 -9
  123. package/lib/cjs/components/NavBarSection/NavBarItemBody.js +1 -1
  124. package/lib/cjs/components/NavBarSection/NavBarItemButton.js +1 -1
  125. package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +1 -1
  126. package/lib/cjs/components/NavBarSection/NavBarItemLink.js +1 -1
  127. package/lib/cjs/components/NavBarSection/NavBarSection.js +2 -2
  128. package/lib/cjs/components/NumberField/NumberField.js +31 -29
  129. package/lib/cjs/components/NumberField/NumberField.stories.js +4 -2
  130. package/lib/cjs/{styles/variants/numberField.js → components/NumberField/NumberField.styles.js} +13 -3
  131. package/lib/cjs/components/OverlayPanel/OverlayPanel.js +4 -4
  132. package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +23 -22
  133. package/lib/cjs/{styles/variants/overlayPanel.js → components/OverlayPanel/OverlayPanel.styles.js} +6 -6
  134. package/lib/cjs/components/PasswordField/PasswordField.js +20 -25
  135. package/lib/cjs/components/PasswordField/PasswordField.stories.js +4 -2
  136. package/lib/cjs/components/PopoverContainer/PopoverContainer.js +7 -31
  137. package/lib/cjs/components/PopoverMenu/PopoverMenu.js +8 -12
  138. package/lib/cjs/{styles/variants/popoverMenu.js → components/PopoverMenu/PopoverMenu.styles.js} +0 -0
  139. package/lib/cjs/components/Radio/Radio.styles.js +75 -0
  140. package/lib/cjs/components/RadioField/RadioField.js +15 -19
  141. package/lib/cjs/components/RadioGroupField/RadioGroupField.js +12 -8
  142. package/lib/cjs/components/RockerButton/RockerButton.js +5 -5
  143. package/lib/cjs/components/RockerButton/RockerButton.styles.js +72 -0
  144. package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.js +6 -6
  145. package/lib/cjs/components/ScrollBox/ScrollBox.js +3 -3
  146. package/lib/cjs/components/ScrollBox/ScrollBox.styles.js +53 -0
  147. package/lib/cjs/{styles/forms/search.js → components/SearchField/Search.styles.js} +4 -4
  148. package/lib/cjs/components/SearchField/SearchField.js +16 -22
  149. package/lib/cjs/components/SearchField/SearchField.stories.js +4 -5
  150. package/lib/cjs/{styles/forms/select.js → components/SelectField/Select.styles.js} +6 -6
  151. package/lib/cjs/components/SelectField/SelectField.js +5 -9
  152. package/lib/cjs/components/SelectField/SelectField.stories.js +12 -11
  153. package/lib/cjs/components/SelectField/SelectField.test.js +2 -2
  154. package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +19 -16
  155. package/lib/cjs/components/Separator/Separator.js +2 -2
  156. package/lib/cjs/{styles/variants/separator.js → components/Separator/Separator.styles.js} +0 -0
  157. package/lib/cjs/components/Stepper/Step.js +4 -4
  158. package/lib/cjs/{styles/variants/stepper.js → components/Stepper/Stepper.styles.js} +4 -4
  159. package/lib/cjs/components/Switch/Switch.js +2 -2
  160. package/lib/cjs/{styles/forms/switch.js → components/Switch/Switch.styles.js} +2 -2
  161. package/lib/cjs/components/SwitchField/SwitchField.js +17 -23
  162. package/lib/cjs/components/SwitchField/SwitchField.stories.js +4 -5
  163. package/lib/cjs/components/Tab/Tab.js +7 -11
  164. package/lib/cjs/components/TabPicker/TabPicker.js +5 -5
  165. package/lib/cjs/components/Table/Table.js +1 -1
  166. package/lib/cjs/{styles/variants/table.js → components/Table/Table.styles.js} +15 -15
  167. package/lib/cjs/components/TableBody/TableBody.js +1 -1
  168. package/lib/cjs/components/TableCaption/TableCaption.js +1 -1
  169. package/lib/cjs/components/TableCell/TableCell.js +1 -1
  170. package/lib/cjs/components/TableRow/TableRow.js +1 -1
  171. package/lib/cjs/components/Tabs/Tabs.js +5 -5
  172. package/lib/cjs/components/Tabs/Tabs.stories.js +1 -1
  173. package/lib/cjs/{styles/variants/tabs.js → components/Tabs/Tabs.style.js} +17 -4
  174. package/lib/cjs/{styles/variants/text.js → components/Text/Text.styles.js} +4 -195
  175. package/lib/cjs/{styles/forms/textarea.js → components/TextArea/TextArea.styles.js} +27 -4
  176. package/lib/cjs/components/TextAreaField/TextAreaField.js +18 -24
  177. package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +4 -5
  178. package/lib/cjs/components/TextField/TextField.js +11 -19
  179. package/lib/cjs/components/TextField/TextField.stories.js +4 -2
  180. package/lib/cjs/components/TimeZonePicker/TimeZone.styles.js +40 -0
  181. package/lib/cjs/components/TimeZonePicker/TimeZonePicker.js +4 -4
  182. package/lib/cjs/components/TooltipTrigger/Tooltip.js +4 -4
  183. package/lib/cjs/components/TooltipTrigger/Tooltip.styles.js +93 -0
  184. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +6 -8
  185. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +6 -6
  186. package/lib/cjs/hooks/useField/useField.js +43 -20
  187. package/lib/cjs/hooks/useField/useField.test.js +55 -16
  188. package/lib/cjs/hooks/useModalState/useModalState.js +2 -2
  189. package/lib/cjs/hooks/useOverlayPanelState/useOverlayPanelState.js +2 -2
  190. package/lib/cjs/hooks/useOverlayPanelState/useOverlayPanelState.test.js +2 -1
  191. package/lib/cjs/hooks/useSelectField/useSelectField.js +12 -14
  192. package/lib/cjs/index.js +82 -119
  193. package/lib/cjs/recipes/ApplicationSearchDropdown.stories.js +7 -7
  194. package/lib/cjs/recipes/AttributeMappingReadOnlyField.stories.js +4 -4
  195. package/lib/cjs/recipes/CollapsiblePanel.stories.js +3 -3
  196. package/lib/cjs/recipes/ConditionalFilter.stories.js +21 -21
  197. package/lib/cjs/recipes/CountryPicker.stories.js +3 -3
  198. package/lib/cjs/recipes/DatePicker.stories.js +48 -5
  199. package/lib/cjs/recipes/FlippableCaretMenuButton.stories.js +2 -2
  200. package/lib/cjs/recipes/LinkedListView.stories.js +26 -15
  201. package/lib/cjs/recipes/ListAndPanel.stories.js +9 -9
  202. package/lib/cjs/recipes/LogoTabs.stories.js +2 -2
  203. package/lib/cjs/recipes/MaskedValue.stories.js +12 -1
  204. package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +2 -2
  205. package/lib/cjs/recipes/RowLineChart.stories.js +184 -99
  206. package/lib/cjs/recipes/ScrollableListView.stories.js +4 -4
  207. package/lib/cjs/recipes/Slider.stories.js +13 -19
  208. package/lib/cjs/styles/ColorDocumentation.js +2 -2
  209. package/lib/cjs/styles/forms/index.js +25 -13
  210. package/lib/cjs/styles/theme-ui/ThemeView.js +27 -0
  211. package/lib/cjs/styles/theme.js +3 -3
  212. package/lib/cjs/styles/themeOverrides/stories/AccordionGroup.chromatic.stories.js +37 -0
  213. package/lib/cjs/styles/themeOverrides/stories/Button.chromatic.stories.js +72 -0
  214. package/lib/cjs/styles/themeOverrides/stories/EnvironmentBreadcrumb.chromatic.stories.js +145 -0
  215. package/lib/cjs/styles/themeOverrides/stories/IconButton.chromatic.stories.js +49 -0
  216. package/lib/cjs/styles/themeOverrides/stories/Label.chromatic.stories.js +32 -0
  217. package/lib/cjs/styles/themeOverrides/stories/Link.chromatic.stories.js +34 -0
  218. package/lib/cjs/styles/themeOverrides/stories/NavBar.chromatic.stories.js +395 -0
  219. package/lib/cjs/styles/themeOverrides/stories/NumberField.chromatic.stories.js +32 -0
  220. package/lib/cjs/styles/themeOverrides/stories/RockerButtonGroup.chromatic.stories.js +41 -0
  221. package/lib/cjs/styles/themeOverrides/stories/SearchField.chromatic.stories.js +40 -0
  222. package/lib/cjs/styles/themeOverrides/stories/SelectField.chromatic.stories.js +42 -0
  223. package/lib/cjs/styles/themeOverrides/uiLibraryOverride.js +69 -52
  224. package/lib/cjs/{components/List/List.js → styles/themeOverrides/withUiLibraryCss.js} +26 -24
  225. package/lib/cjs/styles/themes/astro-nano/astro-nano.js +19 -19
  226. package/lib/cjs/styles/variants/index.js +51 -22
  227. package/lib/cjs/styles/variants/variants.js +70 -46
  228. package/lib/cjs/utils/devUtils/constants/variants.js +4 -4
  229. package/lib/cjs/utils/devUtils/props/fieldAttributes.js +74 -0
  230. package/lib/components/AccordionGridGroup/AccordionGrid.styles.js +65 -0
  231. package/lib/components/AccordionGridGroup/AccordionGridGroup.js +3 -3
  232. package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +2 -25
  233. package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +1 -1
  234. package/lib/components/AccordionGridItem/AccordionGridItem.js +2 -2
  235. package/lib/components/AccordionGridItem/AccordionGridItemBody.js +2 -2
  236. package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +2 -3
  237. package/lib/components/AccordionGroup/Accordion.styles.js +66 -0
  238. package/lib/components/AccordionGroup/AccordionGroup.js +1 -1
  239. package/lib/components/AccordionGroup/AccordionGroup.stories.js +1 -1
  240. package/lib/components/AccordionGroup/AccordionGroup.test.js +1 -1
  241. package/lib/components/AccordionItem/AccordionItem.js +5 -6
  242. package/lib/components/ArrayField/ArrayField.js +15 -15
  243. package/lib/components/ArrayField/ArrayField.stories.js +1 -1
  244. package/lib/components/{Chip → Badge}/Badge.js +1 -1
  245. package/lib/components/{Chip → Badge}/Badge.stories.js +34 -31
  246. package/lib/components/Badge/Badge.styles.js +163 -0
  247. package/lib/components/{Chip → Badge}/Badge.test.js +6 -6
  248. package/lib/components/Badge/index.js +1 -0
  249. package/lib/components/Box/Box.js +2 -2
  250. package/lib/components/Box/Box.styles.js +6 -0
  251. package/lib/components/Bracket/Bracket.js +1 -1
  252. package/lib/components/Bracket/Bracket.stories.js +8 -7
  253. package/lib/components/Bracket/Bracket.styles.js +9 -0
  254. package/lib/{styles/variants/bidirectionalIconButton.js → components/Breadcrumbs/Breadcrumb.styles.js} +26 -15
  255. package/lib/components/Breadcrumbs/BreadcrumbItem.js +2 -3
  256. package/lib/components/Breadcrumbs/Breadcrumbs.js +3 -4
  257. package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +2 -2
  258. package/lib/components/Breadcrumbs/Breadcrumbs.test.js +3 -3
  259. package/lib/components/Button/Button.js +2 -13
  260. package/lib/components/Button/Button.stories.js +1 -1
  261. package/lib/components/Button/Buttons.styles.js +246 -0
  262. package/lib/components/Card/Card.styles.js +13 -0
  263. package/lib/{styles/forms/checkbox.js → components/Checkbox/Checkbox.styles.js} +0 -0
  264. package/lib/components/CheckboxField/CheckboxField.js +12 -18
  265. package/lib/components/CheckboxField/CheckboxField.stories.js +4 -18
  266. package/lib/components/CodeView/CodeView.js +2 -2
  267. package/lib/components/CodeView/CodeView.stories.js +1 -1
  268. package/lib/{styles/variants/codeView.js → components/CodeView/CodeView.styles.js} +0 -0
  269. package/lib/components/CollapsiblePanel/CollapsiblePanel.js +4 -5
  270. package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +3 -3
  271. package/lib/{styles/variants/collapsiblePanel.js → components/CollapsiblePanel/CollapsiblePanel.styles.js} +65 -11
  272. package/lib/components/CollapsiblePanelContainer/CollapsiblePanelBadge.js +2 -2
  273. package/lib/components/CollapsiblePanelContainer/CollapsiblePanelContainer.js +3 -3
  274. package/lib/components/CollapsiblePanelItem/CollapsiblePanelItem.js +1 -1
  275. package/lib/components/ColorField/ColorField.js +15 -22
  276. package/lib/components/ColorField/ColorField.stories.js +3 -17
  277. package/lib/{styles/forms/comboBox.js → components/ColorField/ColorField.styles.js} +8 -9
  278. package/lib/{styles/forms/radio.js → components/ComboBox/ComboBox.styles.js} +24 -16
  279. package/lib/components/ComboBox/ComboBoxInput.js +17 -20
  280. package/lib/components/ComboBoxField/ComboBoxField.js +4 -6
  281. package/lib/components/ComboBoxField/ComboBoxField.stories.js +2 -2
  282. package/lib/components/CopyText/CopyButton.js +2 -3
  283. package/lib/components/CopyText/CopyText.js +3 -4
  284. package/lib/components/CopyText/CopyText.styles.js +48 -0
  285. package/lib/components/DataTable/DataTable.js +31 -8
  286. package/lib/components/DataTable/DataTable.stories.js +6 -6
  287. package/lib/components/DataTable/DataTable.styles.js +1 -1
  288. package/lib/components/DataTable/DataTable.test.js +1 -1
  289. package/lib/components/DataTable/{DataTableChip.js → DataTableBadge.js} +5 -5
  290. package/lib/components/DataTable/{DataTableChip.test.js → DataTableBadge.test.js} +2 -2
  291. package/lib/components/DataTable/index.js +1 -1
  292. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +8 -10
  293. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +22 -22
  294. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +2 -3
  295. package/lib/components/EnvironmentBreadcrumb/EnvironmentalBreadcrumb.styles.js +49 -0
  296. package/lib/components/FieldHelperText/FieldHelperText.js +1 -1
  297. package/lib/{styles/forms/textarea.js → components/FieldHelperText/FieldHelperText.styles.js} +22 -8
  298. package/lib/components/FileInputField/FileInputField.js +13 -10
  299. package/lib/components/FileInputField/FileInputField.stories.js +3 -2
  300. package/lib/components/FileInputField/FileInputField.styles.js +58 -0
  301. package/lib/components/FileInputField/FileItem.js +5 -5
  302. package/lib/components/FileInputField/FileSelect.js +1 -1
  303. package/lib/components/HelpHint/HelpHint.js +3 -4
  304. package/lib/components/HelpHint/HelpHint.styles.js +53 -0
  305. package/lib/components/IconButton/IconButton.js +5 -5
  306. package/lib/components/IconButton/IconButton.stories.js +2 -2
  307. package/lib/components/IconButton/IconButton.styles.js +164 -0
  308. package/lib/{styles/variants/images.js → components/Image/Image.styles.js} +0 -0
  309. package/lib/components/ImageUploadField/ImagePreviewButton.js +4 -5
  310. package/lib/components/ImageUploadField/ImageUploadField.js +3 -2
  311. package/lib/components/ImageUploadField/ImageUploadField.stories.js +3 -2
  312. package/lib/components/ImageUploadField/ImageUploadFieldBase.js +6 -5
  313. package/lib/components/ImageUploadField/imageUpload.js +49 -0
  314. package/lib/{styles/forms/input.js → components/Input/Input.styles.js} +18 -12
  315. package/lib/{styles/forms/label.js → components/Label/Label.styles.js} +1 -1
  316. package/lib/components/Link/Link.js +1 -3
  317. package/lib/components/Link/Link.stories.js +1 -1
  318. package/lib/{styles/variants/links.js → components/Link/Link.styles.js} +1 -1
  319. package/lib/components/LinkSelectField/LinkSelectField.js +9 -19
  320. package/lib/components/LinkSelectField/LinkSelectField.stories.js +5 -5
  321. package/lib/components/ListBox/ListBox.js +3 -3
  322. package/lib/{styles/variants/listBox.js → components/ListBox/ListBox.styles.js} +9 -1
  323. package/lib/components/ListBox/ListBox.test.js +1 -1
  324. package/lib/components/ListBox/ListBoxSection.js +2 -2
  325. package/lib/components/ListBox/Option.js +1 -1
  326. package/lib/components/ListItem/ListItem.js +1 -1
  327. package/lib/components/ListItem/ListItem.styles.js +21 -0
  328. package/lib/components/ListView/ListView.stories.js +3 -4
  329. package/lib/components/ListView/ListView.test.js +2 -2
  330. package/lib/components/ListViewItem/ListViewItem.js +3 -4
  331. package/lib/components/ListViewItem/ListViewItem.styles.js +69 -0
  332. package/lib/{styles/variants/loader.js → components/Loader/Loader.styles.js} +0 -0
  333. package/lib/components/Menu/Menu.js +3 -4
  334. package/lib/components/Menu/Menu.stories.js +1 -1
  335. package/lib/{styles/variants/menu.js → components/Menu/Menu.styles.js} +0 -0
  336. package/lib/components/MenuItem/MenuItem.js +1 -2
  337. package/lib/{styles/variants/menuItem.js → components/MenuItem/MenuItem.styles.js} +0 -0
  338. package/lib/components/Messages/Message.js +3 -3
  339. package/lib/components/Messages/Message.styles.js +99 -0
  340. package/lib/components/Messages/Messages.js +1 -1
  341. package/lib/components/Messages/Messages.stories.js +1 -1
  342. package/lib/components/Messages/Messages.test.js +1 -1
  343. package/lib/components/Modal/Modal.js +2 -14
  344. package/lib/{styles/variants/modal.js → components/Modal/Modal.styles.js} +10 -14
  345. package/lib/components/MultivaluesField/MultivaluesField.js +11 -14
  346. package/lib/components/MultivaluesField/MultivaluesField.stories.js +9 -8
  347. package/lib/components/MultivaluesField/MultivaluesField.test.js +14 -14
  348. package/lib/components/NavBar/NavBar.stories.js +1 -1
  349. package/lib/{styles/variants/navBar.js → components/NavBar/NavBar.styles.js} +94 -10
  350. package/lib/components/NavBarSection/NavBarItem.js +3 -4
  351. package/lib/components/NavBarSection/NavBarItemBody.js +1 -1
  352. package/lib/components/NavBarSection/NavBarItemButton.js +1 -1
  353. package/lib/components/NavBarSection/NavBarItemHeader.js +1 -1
  354. package/lib/components/NavBarSection/NavBarItemLink.js +1 -1
  355. package/lib/components/NavBarSection/NavBarSection.js +2 -2
  356. package/lib/components/NumberField/NumberField.js +25 -23
  357. package/lib/components/NumberField/NumberField.stories.js +3 -2
  358. package/lib/{styles/variants/numberField.js → components/NumberField/NumberField.styles.js} +12 -3
  359. package/lib/components/OverlayPanel/OverlayPanel.js +3 -3
  360. package/lib/components/OverlayPanel/OverlayPanel.stories.js +21 -18
  361. package/lib/{styles/variants/overlayPanel.js → components/OverlayPanel/OverlayPanel.styles.js} +6 -6
  362. package/lib/components/PasswordField/PasswordField.js +18 -24
  363. package/lib/components/PasswordField/PasswordField.stories.js +3 -2
  364. package/lib/components/PopoverContainer/PopoverContainer.js +3 -26
  365. package/lib/components/PopoverMenu/PopoverMenu.js +2 -4
  366. package/lib/{styles/variants/popoverMenu.js → components/PopoverMenu/PopoverMenu.styles.js} +0 -0
  367. package/lib/components/Radio/Radio.styles.js +55 -0
  368. package/lib/components/RadioField/RadioField.js +13 -18
  369. package/lib/components/RadioGroupField/RadioGroupField.js +9 -6
  370. package/lib/components/RockerButton/RockerButton.js +3 -3
  371. package/lib/components/RockerButton/RockerButton.styles.js +52 -0
  372. package/lib/components/RockerButtonGroup/RockerButtonGroup.js +4 -4
  373. package/lib/components/ScrollBox/ScrollBox.js +3 -3
  374. package/lib/components/ScrollBox/ScrollBox.styles.js +43 -0
  375. package/lib/{styles/forms/search.js → components/SearchField/Search.styles.js} +2 -2
  376. package/lib/components/SearchField/SearchField.js +11 -18
  377. package/lib/components/SearchField/SearchField.stories.js +3 -5
  378. package/lib/{styles/forms/select.js → components/SelectField/Select.styles.js} +3 -3
  379. package/lib/components/SelectField/SelectField.js +4 -9
  380. package/lib/components/SelectField/SelectField.stories.js +5 -5
  381. package/lib/components/SelectField/SelectField.test.js +1 -1
  382. package/lib/components/SelectFieldBase/SelectFieldBase.js +18 -15
  383. package/lib/components/Separator/Separator.js +1 -1
  384. package/lib/{styles/variants/separator.js → components/Separator/Separator.styles.js} +0 -0
  385. package/lib/components/Stepper/Step.js +2 -2
  386. package/lib/{styles/variants/stepper.js → components/Stepper/Stepper.styles.js} +3 -3
  387. package/lib/components/Switch/Switch.js +1 -1
  388. package/lib/{styles/forms/switch.js → components/Switch/Switch.styles.js} +1 -1
  389. package/lib/components/SwitchField/SwitchField.js +13 -20
  390. package/lib/components/SwitchField/SwitchField.stories.js +3 -5
  391. package/lib/components/Tab/Tab.js +2 -4
  392. package/lib/components/TabPicker/TabPicker.js +3 -3
  393. package/lib/components/Table/Table.js +1 -1
  394. package/lib/{styles/variants/table.js → components/Table/Table.styles.js} +15 -15
  395. package/lib/components/TableBody/TableBody.js +1 -1
  396. package/lib/components/TableCaption/TableCaption.js +1 -1
  397. package/lib/components/TableCell/TableCell.js +1 -1
  398. package/lib/components/TableRow/TableRow.js +1 -1
  399. package/lib/components/Tabs/Tabs.js +2 -2
  400. package/lib/components/Tabs/Tabs.stories.js +2 -2
  401. package/lib/{styles/variants/tabs.js → components/Tabs/Tabs.style.js} +12 -2
  402. package/lib/{styles/variants/text.js → components/Text/Text.styles.js} +3 -196
  403. package/lib/components/TextArea/TextArea.styles.js +47 -0
  404. package/lib/components/TextAreaField/TextAreaField.js +17 -24
  405. package/lib/components/TextAreaField/TextAreaField.stories.js +3 -5
  406. package/lib/components/TextField/TextField.js +10 -19
  407. package/lib/components/TextField/TextField.stories.js +3 -2
  408. package/lib/components/TimeZonePicker/TimeZone.styles.js +30 -0
  409. package/lib/components/TimeZonePicker/TimeZonePicker.js +4 -4
  410. package/lib/components/TooltipTrigger/Tooltip.js +3 -3
  411. package/lib/components/TooltipTrigger/Tooltip.styles.js +71 -0
  412. package/lib/components/TooltipTrigger/TooltipTrigger.js +2 -3
  413. package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +4 -4
  414. package/lib/hooks/useField/useField.js +39 -14
  415. package/lib/hooks/useField/useField.test.js +55 -16
  416. package/lib/hooks/useModalState/useModalState.js +1 -1
  417. package/lib/hooks/useOverlayPanelState/useOverlayPanelState.js +1 -1
  418. package/lib/hooks/useOverlayPanelState/useOverlayPanelState.test.js +2 -1
  419. package/lib/hooks/useSelectField/useSelectField.js +6 -6
  420. package/lib/index.js +5 -9
  421. package/lib/recipes/ApplicationSearchDropdown.stories.js +4 -4
  422. package/lib/recipes/AttributeMappingReadOnlyField.stories.js +5 -5
  423. package/lib/recipes/CollapsiblePanel.stories.js +4 -4
  424. package/lib/recipes/ConditionalFilter.stories.js +22 -22
  425. package/lib/recipes/CountryPicker.stories.js +3 -3
  426. package/lib/recipes/DatePicker.stories.js +47 -5
  427. package/lib/recipes/FlippableCaretMenuButton.stories.js +1 -1
  428. package/lib/recipes/LinkedListView.stories.js +22 -10
  429. package/lib/recipes/ListAndPanel.stories.js +2 -2
  430. package/lib/recipes/LogoTabs.stories.js +1 -1
  431. package/lib/recipes/MaskedValue.stories.js +12 -1
  432. package/lib/recipes/OneWayToBidirectionalArrow.stories.js +2 -2
  433. package/lib/recipes/RowLineChart.stories.js +176 -95
  434. package/lib/recipes/ScrollableListView.stories.js +2 -2
  435. package/lib/recipes/Slider.stories.js +4 -7
  436. package/lib/styles/ColorDocumentation.js +1 -1
  437. package/lib/styles/forms/index.js +21 -12
  438. package/lib/styles/theme-ui/ThemeView.js +9 -0
  439. package/lib/styles/theme.js +4 -4
  440. package/lib/styles/themeOverrides/stories/AccordionGroup.chromatic.stories.js +17 -0
  441. package/lib/styles/themeOverrides/stories/Button.chromatic.stories.js +37 -0
  442. package/lib/styles/themeOverrides/stories/EnvironmentBreadcrumb.chromatic.stories.js +108 -0
  443. package/lib/styles/themeOverrides/stories/IconButton.chromatic.stories.js +25 -0
  444. package/lib/styles/themeOverrides/stories/Label.chromatic.stories.js +12 -0
  445. package/lib/styles/themeOverrides/stories/Link.chromatic.stories.js +14 -0
  446. package/lib/styles/themeOverrides/stories/NavBar.chromatic.stories.js +367 -0
  447. package/lib/styles/themeOverrides/stories/NumberField.chromatic.stories.js +12 -0
  448. package/lib/styles/themeOverrides/stories/RockerButtonGroup.chromatic.stories.js +21 -0
  449. package/lib/styles/themeOverrides/stories/SearchField.chromatic.stories.js +19 -0
  450. package/lib/styles/themeOverrides/stories/SelectField.chromatic.stories.js +21 -0
  451. package/lib/styles/themeOverrides/uiLibraryOverride.js +69 -52
  452. package/lib/styles/themeOverrides/withUiLibraryCss.js +28 -0
  453. package/lib/styles/themes/astro-nano/astro-nano.js +19 -19
  454. package/lib/styles/variants/index.js +25 -6
  455. package/lib/styles/variants/variants.js +47 -31
  456. package/lib/utils/devUtils/constants/variants.js +2 -2
  457. package/lib/utils/devUtils/props/fieldAttributes.js +52 -0
  458. package/package.json +24 -54
  459. package/NOTICE +0 -2481
  460. package/lib/cjs/components/ArrayField/ArrayFieldItem.js +0 -50
  461. package/lib/cjs/components/Chip/Chip.js +0 -58
  462. package/lib/cjs/components/List/List.stories.js +0 -66
  463. package/lib/cjs/components/List/List.test.js +0 -36
  464. package/lib/cjs/components/List/index.js +0 -18
  465. package/lib/cjs/styles/variants/accordion.js +0 -92
  466. package/lib/cjs/styles/variants/boxes.js +0 -439
  467. package/lib/cjs/styles/variants/buttons.js +0 -815
  468. package/lib/cjs/styles/variants/imageUpload.js +0 -29
  469. package/lib/cjs/styles/variants/messages.js +0 -53
  470. package/lib/cjs/styles/variants/rockerbutton.js +0 -25
  471. package/lib/components/ArrayField/ArrayFieldItem.js +0 -31
  472. package/lib/components/Chip/Chip.js +0 -38
  473. package/lib/components/Chip/index.js +0 -1
  474. package/lib/components/List/List.js +0 -26
  475. package/lib/components/List/List.stories.js +0 -43
  476. package/lib/components/List/List.test.js +0 -24
  477. package/lib/components/List/index.js +0 -1
  478. package/lib/styles/variants/accordion.js +0 -82
  479. package/lib/styles/variants/boxes.js +0 -418
  480. package/lib/styles/variants/buttons.js +0 -792
  481. package/lib/styles/variants/imageUpload.js +0 -19
  482. package/lib/styles/variants/messages.js +0 -43
  483. package/lib/styles/variants/rockerbutton.js +0 -15
  484. package/lib/styles/variants/tooltip.js +0 -6
@@ -33,7 +33,7 @@ var ListItem = /*#__PURE__*/forwardRef(function (props, ref) {
33
33
  role: "listitem",
34
34
  ref: ref,
35
35
  as: "li",
36
- variant: "boxes.listItem",
36
+ variant: "listItem.container",
37
37
  isRow: true
38
38
  }, hoverProps, others), children);
39
39
  });
@@ -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 { Item } from '@react-stately/collections';
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 { useAsyncList } from '@react-stately/data';
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
+ };
@@ -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 '@react-aria/menu';
23
- import { useTreeState } from '@react-stately/tree';
24
- import { useFocusRing } from '@react-aria/focus';
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 '@react-stately/collections';
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";
@@ -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 '@react-aria/utils';
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';
@@ -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: "messages.transition",
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: "messages.item",
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: "close",
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: "messages.wrapper"
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 '@react-stately/collections';
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 '../variants/text';
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
- dark: dark,
64
- title: title
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 { FocusScope } from '@react-aria/focus';
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, Chip, Icon, IconButton, PopoverContainer, ScrollBox, Text, TextField } from '../../';
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(Chip, {
350
+ return ___EmotionJSX(Badge, {
351
351
  key: item.key,
352
352
  role: "presentation",
353
353
  label: item.name,
354
- variant: "variants.boxes.readOnlyChip",
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(Chip, _extends({
368
+ return ___EmotionJSX(Badge, _extends({
369
369
  key: item.key,
370
370
  role: "presentation",
371
- variant: "variants.boxes.selectedItemChip",
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: "buttons.chipDeleteButton"
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: 'variants.boxes.itemChipWithSlot',
218
+ variant: 'itemBadgeWithSlot',
218
219
  bg: 'white'
219
220
  },
220
221
  buttonProps: {
221
- variant: 'buttons.chipWithSlotDeleteButton'
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: 'variants.boxes.itemChipWithSlot',
235
+ variant: 'itemBadgeWithSlot',
235
236
  bg: 'white'
236
237
  },
237
238
  buttonProps: {
238
- variant: 'buttons.chipWithSlotDeleteButton'
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: 'variants.boxes.itemChipWithSlot',
252
+ variant: 'itemBadgeWithSlot',
252
253
  bg: 'white'
253
254
  },
254
255
  buttonProps: {
255
- variant: 'buttons.chipWithSlotDeleteButton'
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 firstChip = screen.getByText(items[1].name);
471
- expect(firstChip).toBeInTheDocument();
472
- var secondChip = screen.getByText(items[2].name);
473
- expect(secondChip).toBeInTheDocument();
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 firstChip = screen.getByText(items[1].name);
482
- expect(firstChip).toBeInTheDocument();
483
- var secondChip = screen.getByText(items[2].name);
484
- expect(secondChip).toBeInTheDocument();
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 firstChip = screen.getByText(items[1].name);
516
- var deleteButton1 = firstChip.nextSibling;
517
- expect(firstChip).toBeInTheDocument();
515
+ var firstBadge = screen.getByText(items[1].name);
516
+ var deleteButton1 = firstBadge.nextSibling;
517
+ expect(firstBadge).toBeInTheDocument();
518
518
  expect(deleteButton1).toBeNull();
519
- var secondChip = screen.getByText(items[2].name);
520
- expect(secondChip).toBeInTheDocument();
521
- var deleteButton2 = firstChip.nextSibling;
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: "buttons.navItemButton",
115
+ variant: "variants.navBar.itemButton",
116
116
  href: "https://pingidentity.com/"
117
117
  }, "Group"), ___EmotionJSX(NavBarItemButton, {
118
118
  key: "Dashboard Link Populations",