@pingux/astro 2.221.6 → 2.234.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.
Files changed (374) hide show
  1. package/lib/cjs/components/AccordionGridGroup/AccordionGrid.styles.d.ts +50 -0
  2. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.d.ts +14 -0
  3. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.js +6 -56
  4. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +2 -1
  5. package/lib/cjs/components/AccordionGridGroup/index.d.ts +1 -0
  6. package/lib/cjs/components/AccordionGridItem/AccordionGridItem.d.ts +3 -0
  7. package/lib/cjs/components/AccordionGridItem/AccordionGridItem.js +12 -20
  8. package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.d.ts +4 -0
  9. package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +9 -15
  10. package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.d.ts +4 -0
  11. package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +10 -23
  12. package/lib/cjs/components/AccordionGridItem/index.d.ts +1 -0
  13. package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +12 -1
  14. package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +43 -1
  15. package/lib/cjs/components/AccordionItem/AccordionItem.d.ts +3 -0
  16. package/lib/cjs/components/AccordionItem/AccordionItem.js +4 -2
  17. package/lib/cjs/components/ArrayField/ArrayField.js +30 -13
  18. package/lib/cjs/components/ArrayField/ArrayField.mdx +5 -1
  19. package/lib/cjs/components/ArrayField/ArrayField.stories.js +127 -90
  20. package/lib/cjs/components/ArrayField/ArrayField.styles.d.ts +9 -0
  21. package/lib/cjs/components/ArrayField/ArrayField.styles.js +41 -0
  22. package/lib/cjs/components/ArrayField/ArrayField.test.js +202 -30
  23. package/lib/cjs/components/ArrayField/ArrayFieldDeleteButton.js +21 -8
  24. package/lib/cjs/components/ArrayField/ArrayFieldDeleteButton.styles.d.ts +5 -0
  25. package/lib/cjs/components/ArrayField/ArrayFieldDeleteButton.styles.js +21 -0
  26. package/lib/cjs/components/ArrayField/arrayFieldAttributes.d.ts +1 -99
  27. package/lib/cjs/components/ArrayField/arrayFieldAttributes.js +3 -2
  28. package/lib/cjs/components/AstroProvider/AstroProvider.d.ts +16 -0
  29. package/lib/cjs/components/AstroProvider/AstroProvider.js +10 -34
  30. package/lib/cjs/components/AstroProvider/PageWrapper.test.js +49 -4
  31. package/lib/cjs/components/AstroProvider/index.d.ts +2 -0
  32. package/lib/cjs/components/Badge/Badge.js +20 -11
  33. package/lib/cjs/components/Badge/Badge.mdx +6 -0
  34. package/lib/cjs/components/Badge/Badge.stories.js +64 -19
  35. package/lib/cjs/components/Badge/Badge.styles.d.ts +266 -0
  36. package/lib/cjs/components/Badge/Badge.styles.js +24 -4
  37. package/lib/cjs/components/Badge/Badge.test.js +165 -1
  38. package/lib/cjs/components/Badge/BadgeHelpHint.d.ts +8 -0
  39. package/lib/cjs/components/Badge/BadgeHelpHint.js +84 -0
  40. package/lib/cjs/components/Badge/Convenience/DefaultBadge.js +5 -2
  41. package/lib/cjs/components/Badge/Convenience/ErrorCalloutBadge.js +5 -4
  42. package/lib/cjs/components/Badge/Convenience/InfoCalloutBadge.js +5 -4
  43. package/lib/cjs/components/Badge/Convenience/SuccessCalloutBadge.js +5 -4
  44. package/lib/cjs/components/Badge/Convenience/WarningCalloutBadge.js +5 -4
  45. package/lib/cjs/components/Checkbox/Checkbox.d.ts +9 -0
  46. package/lib/cjs/components/Checkbox/Checkbox.styles.d.ts +15 -0
  47. package/lib/cjs/components/Checkbox/CheckboxBase.d.ts +4 -0
  48. package/lib/cjs/components/Checkbox/CheckboxBase.js +100 -49
  49. package/lib/cjs/components/Checkbox/CheckboxIcons.d.ts +15 -0
  50. package/lib/cjs/components/Checkbox/CheckboxIcons.js +122 -0
  51. package/lib/cjs/components/Checkbox/index.d.ts +1 -0
  52. package/lib/cjs/components/CheckboxField/CheckboxField.js +5 -1
  53. package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +1 -1
  54. package/lib/cjs/components/CheckboxField/CheckboxField.test.js +41 -5
  55. package/lib/cjs/components/CheckboxFieldGroup/CheckboxFieldGroup.d.ts +4 -0
  56. package/lib/cjs/components/CheckboxFieldGroup/CheckboxFieldGroup.js +89 -0
  57. package/lib/cjs/components/CheckboxFieldGroup/CheckboxFieldGroup.mdx +69 -0
  58. package/lib/cjs/components/CheckboxFieldGroup/CheckboxFieldGroup.stories.js +118 -0
  59. package/lib/cjs/components/CheckboxFieldGroup/CheckboxFieldGroup.styles.d.ts +8 -0
  60. package/lib/cjs/components/CheckboxFieldGroup/CheckboxFieldGroup.styles.js +40 -0
  61. package/lib/cjs/components/CheckboxFieldGroup/CheckboxFieldGroup.test.js +485 -0
  62. package/lib/cjs/components/CheckboxFieldGroup/CheckboxFieldGroupItem.d.ts +4 -0
  63. package/lib/cjs/components/CheckboxFieldGroup/CheckboxFieldGroupItem.js +112 -0
  64. package/lib/cjs/components/CheckboxFieldGroup/checkboxFieldGroupAttributes.d.ts +2 -0
  65. package/lib/cjs/components/CheckboxFieldGroup/checkboxFieldGroupAttributes.js +108 -0
  66. package/lib/cjs/components/CheckboxFieldGroup/index.d.ts +3 -0
  67. package/lib/cjs/components/CheckboxFieldGroup/index.js +27 -0
  68. package/lib/cjs/components/CodeView/CodeView.js +3 -2
  69. package/lib/cjs/components/CodeView/CodeView.stories.js +44 -1
  70. package/lib/cjs/components/CodeView/CodeView.test.js +84 -0
  71. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +18 -1
  72. package/lib/cjs/components/CopyText/CopyButton.js +1 -2
  73. package/lib/cjs/components/DatePicker/DatePicker.test.js +1 -1
  74. package/lib/cjs/components/EmptyState/EmptyState.d.ts +4 -0
  75. package/lib/cjs/components/EmptyState/EmptyState.js +66 -0
  76. package/lib/cjs/components/EmptyState/EmptyState.mdx +44 -0
  77. package/lib/cjs/components/EmptyState/EmptyState.stories.js +88 -0
  78. package/lib/cjs/components/EmptyState/EmptyState.styles.d.ts +13 -0
  79. package/lib/cjs/components/EmptyState/EmptyState.styles.js +22 -0
  80. package/lib/cjs/components/EmptyState/EmptyState.test.js +223 -0
  81. package/lib/cjs/components/EmptyState/emptyStateAttributes.d.ts +99 -0
  82. package/lib/cjs/components/EmptyState/emptyStateAttributes.js +49 -0
  83. package/lib/cjs/components/EmptyState/index.d.ts +1 -0
  84. package/lib/cjs/components/EmptyState/index.js +14 -0
  85. package/lib/cjs/components/HelpHint/HelpHint.js +38 -83
  86. package/lib/cjs/components/IconBadge/IconBadge.d.ts +2 -0
  87. package/lib/cjs/components/IconBadge/IconBadge.js +39 -20
  88. package/lib/cjs/components/IconBadge/IconBadge.mdx +5 -1
  89. package/lib/cjs/components/IconBadge/IconBadge.stories.js +50 -7
  90. package/lib/cjs/components/IconBadge/IconBadge.styles.d.ts +19 -0
  91. package/lib/cjs/components/IconBadge/IconBadge.styles.js +27 -0
  92. package/lib/cjs/components/IconBadge/IconBadge.test.js +67 -14
  93. package/lib/cjs/components/IconButton/IconButton.styles.d.ts +3 -0
  94. package/lib/cjs/components/IconButton/IconButton.styles.js +4 -0
  95. package/lib/cjs/components/LabelValuePairs/LabelValuePairs.stories.js +1 -0
  96. package/lib/cjs/components/LabelValuePairs/LabelValuePairs.test.js +18 -1
  97. package/lib/cjs/components/LabelValuePairs/LabelValuePairsLabel.js +1 -2
  98. package/lib/cjs/components/ListView/ListView.js +28 -4
  99. package/lib/cjs/components/ListView/ListView.stories.js +110 -62
  100. package/lib/cjs/components/ListView/ListView.test.js +80 -0
  101. package/lib/cjs/components/ListView/ListViewTypes.d.ts +5 -0
  102. package/lib/cjs/components/ListViewItem/ListViewItem.js +28 -7
  103. package/lib/cjs/components/ListViewItem/ListViewItem.stories.js +2 -5
  104. package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +7 -0
  105. package/lib/cjs/components/ListViewItem/ListViewItem.test.js +36 -5
  106. package/lib/cjs/components/ListViewItem/listViewItemAttributes.js +9 -1
  107. package/lib/cjs/components/MultivaluesField/DefaultMultivaluesField.js +8 -0
  108. package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +23 -1
  109. package/lib/cjs/components/NavBar/NavBar.styles.d.ts +11 -1
  110. package/lib/cjs/components/PageHeader/PageHeader.js +9 -4
  111. package/lib/cjs/components/PageHeader/PageHeader.mdx +3 -0
  112. package/lib/cjs/components/PageHeader/PageHeader.stories.js +14 -4
  113. package/lib/cjs/components/PageHeader/PageHeader.test.js +57 -3
  114. package/lib/cjs/components/PanelHeader/PanelHeader.js +36 -8
  115. package/lib/cjs/components/PanelHeader/PanelHeader.stories.js +2 -5
  116. package/lib/cjs/components/PanelHeader/PanelHeader.test.js +46 -4
  117. package/lib/cjs/components/RangeCalendar/RangeCalendar.js +1 -1
  118. package/lib/cjs/components/RangeCalendar/RangeCalendar.mdx +4 -0
  119. package/lib/cjs/components/RangeCalendar/RangeCalendar.test.js +30 -0
  120. package/lib/cjs/components/RangeCalendar/RangeCalendarGrid.js +1 -0
  121. package/lib/cjs/components/SelectField/SelectField.stories.js +14 -1
  122. package/lib/cjs/components/Tab/Tab.js +38 -6
  123. package/lib/cjs/components/Tab/getSlotText.d.ts +6 -0
  124. package/lib/cjs/components/Tab/getSlotText.js +21 -0
  125. package/lib/cjs/components/Tab/getSlotText.test.js +23 -0
  126. package/lib/cjs/components/TabPicker/TabPicker.js +9 -4
  127. package/lib/cjs/components/Tabs/Tabs.stories.js +63 -14
  128. package/lib/cjs/components/Tabs/Tabs.storyData.d.ts +1 -0
  129. package/lib/cjs/components/Tabs/Tabs.storyData.js +8 -0
  130. package/lib/cjs/components/Tabs/Tabs.style.d.ts +5 -0
  131. package/lib/cjs/components/Tabs/Tabs.style.js +7 -2
  132. package/lib/cjs/components/Tabs/Tabs.test.js +85 -37
  133. package/lib/cjs/context/CheckboxFieldGroupContext/index.d.ts +10 -0
  134. package/lib/cjs/context/CheckboxFieldGroupContext/index.js +17 -0
  135. package/lib/cjs/hooks/index.d.ts +1 -0
  136. package/lib/cjs/hooks/index.js +7 -0
  137. package/lib/cjs/hooks/useField/useField.d.ts +78 -78
  138. package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +14 -0
  139. package/lib/cjs/hooks/useHelpHintPopover/index.d.ts +2 -0
  140. package/lib/cjs/hooks/useHelpHintPopover/index.js +32 -0
  141. package/lib/cjs/hooks/useHelpHintPopover/useHelpHintPopover.d.ts +25 -0
  142. package/lib/cjs/hooks/useHelpHintPopover/useHelpHintPopover.js +137 -0
  143. package/lib/cjs/hooks/usePagination/usePagination.d.ts +94 -94
  144. package/lib/cjs/index.d.ts +4 -0
  145. package/lib/cjs/index.js +114 -69
  146. package/lib/cjs/styles/forms/index.js +23 -2
  147. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.d.ts +17 -0
  148. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +18 -1
  149. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/icons.d.ts +6 -0
  150. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +7 -0
  151. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/badges.d.ts +90 -0
  152. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/badges.js +76 -29
  153. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/box.d.ts +14 -0
  154. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/box.js +22 -0
  155. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +20 -0
  156. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +20 -0
  157. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/comboBox.d.ts +3 -0
  158. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/comboBox.js +4 -0
  159. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/forms.d.ts +45 -8
  160. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/forms.js +34 -10
  161. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/listview.d.ts +29 -0
  162. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/listview.js +30 -0
  163. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.d.ts +5 -2
  164. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.js +5 -2
  165. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +52 -1
  166. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +12 -1
  167. package/lib/cjs/styles/themeOverrides/onyxSideNav.d.ts +6 -0
  168. package/lib/cjs/styles/themes/astro/customProperties/icons.d.ts +6 -0
  169. package/lib/cjs/styles/themes/astro/customProperties/icons.js +3 -1
  170. package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +7 -0
  171. package/lib/cjs/styles/themes/astro/customProperties/index.js +3 -0
  172. package/lib/cjs/styles/themes/next-gen/codeView/codeView.d.ts +9 -0
  173. package/lib/cjs/styles/themes/next-gen/codeView/codeView.js +5 -2
  174. package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +17 -0
  175. package/lib/cjs/styles/themes/next-gen/colors/twoTone.d.ts +18 -0
  176. package/lib/cjs/styles/themes/next-gen/colors/twoTone.js +21 -1
  177. package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +2 -0
  178. package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +5 -3
  179. package/lib/cjs/styles/themes/next-gen/customProperties/icons.d.ts +6 -0
  180. package/lib/cjs/styles/themes/next-gen/customProperties/icons.js +5 -1
  181. package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +7 -0
  182. package/lib/cjs/styles/themes/next-gen/customProperties/index.js +3 -1
  183. package/lib/cjs/styles/themes/next-gen/forms.d.ts +83 -4
  184. package/lib/cjs/styles/themes/next-gen/forms.js +51 -8
  185. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +472 -72
  186. package/lib/cjs/styles/themes/next-gen/spacing.d.ts +1 -0
  187. package/lib/cjs/styles/themes/next-gen/spacing.js +2 -1
  188. package/lib/cjs/styles/themes/next-gen/variants/arrayField.d.ts +9 -0
  189. package/lib/cjs/styles/themes/next-gen/variants/arrayField.js +71 -0
  190. package/lib/cjs/styles/themes/next-gen/variants/arrayFieldDeleteButton.d.ts +5 -0
  191. package/lib/cjs/styles/themes/next-gen/variants/arrayFieldDeleteButton.js +44 -0
  192. package/lib/cjs/styles/themes/next-gen/variants/badges.d.ts +243 -33
  193. package/lib/cjs/styles/themes/next-gen/variants/badges.js +77 -28
  194. package/lib/cjs/styles/themes/next-gen/variants/box.d.ts +2 -0
  195. package/lib/cjs/styles/themes/next-gen/variants/box.js +7 -4
  196. package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +41 -29
  197. package/lib/cjs/styles/themes/next-gen/variants/button.js +25 -2
  198. package/lib/cjs/styles/themes/next-gen/variants/images.d.ts +6 -1
  199. package/lib/cjs/styles/themes/next-gen/variants/images.js +8 -1
  200. package/lib/cjs/styles/themes/next-gen/variants/label.js +33 -1
  201. package/lib/cjs/styles/themes/next-gen/variants/listview.d.ts +33 -0
  202. package/lib/cjs/styles/themes/next-gen/variants/listview.js +36 -1
  203. package/lib/cjs/styles/themes/next-gen/variants/rangeCalendar.d.ts +10 -0
  204. package/lib/cjs/styles/themes/next-gen/variants/rangeCalendar.js +15 -4
  205. package/lib/cjs/styles/themes/next-gen/variants/tabs.d.ts +9 -0
  206. package/lib/cjs/styles/themes/next-gen/variants/tabs.js +12 -3
  207. package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +5 -1
  208. package/lib/cjs/styles/themes/next-gen/variants/text.js +6 -2
  209. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +103 -6
  210. package/lib/cjs/styles/themes/next-gen/variants/variants.js +30 -4
  211. package/lib/cjs/styles/variants/variants.js +8 -0
  212. package/lib/cjs/types/AccordionGridGroup.d.ts +36 -0
  213. package/lib/cjs/types/AccordionGridGroup.js +6 -0
  214. package/lib/cjs/types/AccordionGridItem.d.ts +52 -0
  215. package/lib/cjs/types/AccordionGridItem.js +6 -0
  216. package/lib/cjs/types/AstroProvider.d.ts +32 -0
  217. package/lib/cjs/types/AstroProvider.js +6 -0
  218. package/lib/cjs/types/Checkbox.d.ts +44 -0
  219. package/lib/cjs/types/Checkbox.js +6 -0
  220. package/lib/cjs/types/badge.d.ts +6 -0
  221. package/lib/cjs/types/checkboxFieldGroup.d.ts +48 -0
  222. package/lib/cjs/types/checkboxFieldGroup.js +6 -0
  223. package/lib/cjs/types/codeView.d.ts +3 -0
  224. package/lib/cjs/types/emptyState.d.ts +27 -0
  225. package/lib/cjs/types/emptyState.js +6 -0
  226. package/lib/cjs/types/iconBadge.d.ts +6 -0
  227. package/lib/cjs/types/index.d.ts +7 -0
  228. package/lib/cjs/types/index.js +147 -70
  229. package/lib/cjs/types/item.d.ts +5 -0
  230. package/lib/cjs/types/listView.d.ts +3 -0
  231. package/lib/cjs/types/table.d.ts +2 -0
  232. package/lib/cjs/utils/designUtils/figmaLinks.d.ts +3 -0
  233. package/lib/cjs/utils/designUtils/figmaLinks.js +4 -1
  234. package/lib/components/AccordionGridGroup/AccordionGridGroup.js +6 -56
  235. package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +2 -1
  236. package/lib/components/AccordionGridItem/AccordionGridItem.js +12 -20
  237. package/lib/components/AccordionGridItem/AccordionGridItemBody.js +9 -15
  238. package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +10 -23
  239. package/lib/components/AccordionGroup/AccordionGroup.stories.js +11 -0
  240. package/lib/components/AccordionGroup/AccordionGroup.test.js +43 -1
  241. package/lib/components/AccordionItem/AccordionItem.js +5 -3
  242. package/lib/components/ArrayField/ArrayField.js +30 -13
  243. package/lib/components/ArrayField/ArrayField.mdx +5 -1
  244. package/lib/components/ArrayField/ArrayField.stories.js +126 -89
  245. package/lib/components/ArrayField/ArrayField.styles.js +34 -0
  246. package/lib/components/ArrayField/ArrayField.test.js +202 -30
  247. package/lib/components/ArrayField/ArrayFieldDeleteButton.js +21 -8
  248. package/lib/components/ArrayField/ArrayFieldDeleteButton.styles.js +14 -0
  249. package/lib/components/ArrayField/arrayFieldAttributes.js +3 -2
  250. package/lib/components/AstroProvider/AstroProvider.js +10 -34
  251. package/lib/components/AstroProvider/PageWrapper.test.js +46 -0
  252. package/lib/components/Badge/Badge.js +20 -11
  253. package/lib/components/Badge/Badge.mdx +6 -0
  254. package/lib/components/Badge/Badge.stories.js +64 -19
  255. package/lib/components/Badge/Badge.styles.js +25 -5
  256. package/lib/components/Badge/Badge.test.js +166 -2
  257. package/lib/components/Badge/BadgeHelpHint.js +74 -0
  258. package/lib/components/Badge/Convenience/DefaultBadge.js +5 -2
  259. package/lib/components/Badge/Convenience/ErrorCalloutBadge.js +5 -4
  260. package/lib/components/Badge/Convenience/InfoCalloutBadge.js +5 -4
  261. package/lib/components/Badge/Convenience/SuccessCalloutBadge.js +5 -4
  262. package/lib/components/Badge/Convenience/WarningCalloutBadge.js +5 -4
  263. package/lib/components/Checkbox/CheckboxBase.js +99 -48
  264. package/lib/components/Checkbox/CheckboxIcons.js +114 -0
  265. package/lib/components/CheckboxField/CheckboxField.js +6 -2
  266. package/lib/components/CheckboxField/CheckboxField.stories.js +1 -1
  267. package/lib/components/CheckboxField/CheckboxField.test.js +41 -5
  268. package/lib/components/CheckboxFieldGroup/CheckboxFieldGroup.js +79 -0
  269. package/lib/components/CheckboxFieldGroup/CheckboxFieldGroup.mdx +69 -0
  270. package/lib/components/CheckboxFieldGroup/CheckboxFieldGroup.stories.js +111 -0
  271. package/lib/components/CheckboxFieldGroup/CheckboxFieldGroup.styles.js +33 -0
  272. package/lib/components/CheckboxFieldGroup/CheckboxFieldGroup.test.js +481 -0
  273. package/lib/components/CheckboxFieldGroup/CheckboxFieldGroupItem.js +101 -0
  274. package/lib/components/CheckboxFieldGroup/checkboxFieldGroupAttributes.js +101 -0
  275. package/lib/components/CheckboxFieldGroup/index.js +3 -0
  276. package/lib/components/CodeView/CodeView.js +3 -2
  277. package/lib/components/CodeView/CodeView.stories.js +44 -1
  278. package/lib/components/CodeView/CodeView.test.js +85 -1
  279. package/lib/components/ComboBoxField/ComboBoxField.stories.js +18 -1
  280. package/lib/components/CopyText/CopyButton.js +1 -2
  281. package/lib/components/DatePicker/DatePicker.test.js +1 -1
  282. package/lib/components/EmptyState/EmptyState.js +54 -0
  283. package/lib/components/EmptyState/EmptyState.mdx +44 -0
  284. package/lib/components/EmptyState/EmptyState.stories.js +81 -0
  285. package/lib/components/EmptyState/EmptyState.styles.js +15 -0
  286. package/lib/components/EmptyState/EmptyState.test.js +220 -0
  287. package/lib/components/EmptyState/emptyStateAttributes.js +42 -0
  288. package/lib/components/EmptyState/index.js +1 -0
  289. package/lib/components/HelpHint/HelpHint.js +41 -86
  290. package/lib/components/IconBadge/IconBadge.js +43 -24
  291. package/lib/components/IconBadge/IconBadge.mdx +5 -1
  292. package/lib/components/IconBadge/IconBadge.stories.js +50 -7
  293. package/lib/components/IconBadge/IconBadge.styles.js +20 -0
  294. package/lib/components/IconBadge/IconBadge.test.js +54 -1
  295. package/lib/components/IconButton/IconButton.styles.js +4 -0
  296. package/lib/components/LabelValuePairs/LabelValuePairs.stories.js +1 -0
  297. package/lib/components/LabelValuePairs/LabelValuePairs.test.js +19 -2
  298. package/lib/components/LabelValuePairs/LabelValuePairsLabel.js +1 -2
  299. package/lib/components/ListView/ListView.js +28 -4
  300. package/lib/components/ListView/ListView.stories.js +106 -58
  301. package/lib/components/ListView/ListView.test.js +80 -0
  302. package/lib/components/ListViewItem/ListViewItem.js +28 -5
  303. package/lib/components/ListViewItem/ListViewItem.stories.js +3 -6
  304. package/lib/components/ListViewItem/ListViewItem.styles.js +7 -0
  305. package/lib/components/ListViewItem/ListViewItem.test.js +33 -2
  306. package/lib/components/ListViewItem/listViewItemAttributes.js +9 -1
  307. package/lib/components/MultivaluesField/DefaultMultivaluesField.js +8 -0
  308. package/lib/components/MultivaluesField/MultivaluesField.stories.js +23 -1
  309. package/lib/components/PageHeader/PageHeader.js +9 -4
  310. package/lib/components/PageHeader/PageHeader.mdx +3 -0
  311. package/lib/components/PageHeader/PageHeader.stories.js +15 -5
  312. package/lib/components/PageHeader/PageHeader.test.js +58 -4
  313. package/lib/components/PanelHeader/PanelHeader.js +37 -9
  314. package/lib/components/PanelHeader/PanelHeader.stories.js +3 -6
  315. package/lib/components/PanelHeader/PanelHeader.test.js +47 -5
  316. package/lib/components/RangeCalendar/RangeCalendar.js +1 -1
  317. package/lib/components/RangeCalendar/RangeCalendar.mdx +4 -0
  318. package/lib/components/RangeCalendar/RangeCalendar.test.js +30 -0
  319. package/lib/components/RangeCalendar/RangeCalendarGrid.js +1 -0
  320. package/lib/components/SelectField/SelectField.stories.js +13 -0
  321. package/lib/components/Tab/Tab.js +39 -3
  322. package/lib/components/Tab/getSlotText.js +15 -0
  323. package/lib/components/Tab/getSlotText.test.js +21 -0
  324. package/lib/components/TabPicker/TabPicker.js +10 -5
  325. package/lib/components/Tabs/Tabs.stories.js +62 -11
  326. package/lib/components/Tabs/Tabs.storyData.js +1 -0
  327. package/lib/components/Tabs/Tabs.style.js +6 -1
  328. package/lib/components/Tabs/Tabs.test.js +85 -37
  329. package/lib/context/CheckboxFieldGroupContext/index.js +10 -0
  330. package/lib/hooks/index.js +1 -0
  331. package/lib/hooks/useHelpHintPopover/index.js +2 -0
  332. package/lib/hooks/useHelpHintPopover/useHelpHintPopover.js +130 -0
  333. package/lib/index.js +4 -0
  334. package/lib/styles/forms/index.js +22 -2
  335. package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +18 -1
  336. package/lib/styles/themeOverrides/nextGenDarkMode/variants/badges.js +76 -29
  337. package/lib/styles/themeOverrides/nextGenDarkMode/variants/box.js +15 -0
  338. package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +20 -0
  339. package/lib/styles/themeOverrides/nextGenDarkMode/variants/comboBox.js +4 -0
  340. package/lib/styles/themeOverrides/nextGenDarkMode/variants/forms.js +33 -9
  341. package/lib/styles/themeOverrides/nextGenDarkMode/variants/listview.js +30 -0
  342. package/lib/styles/themeOverrides/nextGenDarkMode/variants/text.js +5 -2
  343. package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +12 -1
  344. package/lib/styles/themes/astro/customProperties/icons.js +3 -1
  345. package/lib/styles/themes/astro/customProperties/index.js +3 -0
  346. package/lib/styles/themes/next-gen/codeView/codeView.js +5 -2
  347. package/lib/styles/themes/next-gen/colors/twoTone.js +19 -0
  348. package/lib/styles/themes/next-gen/convertedComponentList.js +5 -3
  349. package/lib/styles/themes/next-gen/customProperties/icons.js +5 -1
  350. package/lib/styles/themes/next-gen/customProperties/index.js +3 -1
  351. package/lib/styles/themes/next-gen/forms.js +50 -7
  352. package/lib/styles/themes/next-gen/spacing.js +2 -1
  353. package/lib/styles/themes/next-gen/variants/arrayField.js +64 -0
  354. package/lib/styles/themes/next-gen/variants/arrayFieldDeleteButton.js +37 -0
  355. package/lib/styles/themes/next-gen/variants/badges.js +77 -28
  356. package/lib/styles/themes/next-gen/variants/box.js +7 -4
  357. package/lib/styles/themes/next-gen/variants/button.js +25 -2
  358. package/lib/styles/themes/next-gen/variants/images.js +7 -1
  359. package/lib/styles/themes/next-gen/variants/label.js +33 -1
  360. package/lib/styles/themes/next-gen/variants/listview.js +35 -1
  361. package/lib/styles/themes/next-gen/variants/rangeCalendar.js +15 -4
  362. package/lib/styles/themes/next-gen/variants/tabs.js +11 -2
  363. package/lib/styles/themes/next-gen/variants/text.js +6 -2
  364. package/lib/styles/themes/next-gen/variants/variants.js +31 -5
  365. package/lib/styles/variants/variants.js +8 -0
  366. package/lib/types/AccordionGridGroup.js +1 -0
  367. package/lib/types/AccordionGridItem.js +1 -0
  368. package/lib/types/AstroProvider.js +1 -0
  369. package/lib/types/Checkbox.js +1 -0
  370. package/lib/types/checkboxFieldGroup.js +1 -0
  371. package/lib/types/emptyState.js +1 -0
  372. package/lib/types/index.js +7 -0
  373. package/lib/utils/designUtils/figmaLinks.js +4 -1
  374. package/package.json +2 -2
@@ -1,17 +1,18 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
2
  import React from 'react';
3
- import CheckCircle from '@pingux/mdi-react/CheckCircleIcon';
4
3
  import { Badge, Icon } from '../../..';
4
+ import { useGetTheme } from '../../../hooks';
5
5
  import { jsx as ___EmotionJSX } from "@emotion/react";
6
6
  var SuccessCalloutBadge = /*#__PURE__*/React.forwardRef(function (props, ref) {
7
+ var _useGetTheme = useGetTheme(),
8
+ icons = _useGetTheme.icons;
7
9
  return ___EmotionJSX(Badge, _extends({
8
10
  ref: ref,
9
11
  variant: "successCalloutBadge",
10
12
  slots: {
11
13
  leftIcon: ___EmotionJSX(Icon, {
12
- icon: CheckCircle,
13
- size: 15,
14
- color: "success.bright"
14
+ icon: icons.successCalloutBadge,
15
+ size: "xs"
15
16
  })
16
17
  }
17
18
  }, props));
@@ -1,17 +1,18 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
2
  import React from 'react';
3
- import Alert from '@pingux/mdi-react/AlertIcon';
4
3
  import { Badge, Icon } from '../../..';
4
+ import { useGetTheme } from '../../../hooks';
5
5
  import { jsx as ___EmotionJSX } from "@emotion/react";
6
6
  var WarningCalloutBadge = /*#__PURE__*/React.forwardRef(function (props, ref) {
7
+ var _useGetTheme = useGetTheme(),
8
+ icons = _useGetTheme.icons;
7
9
  return ___EmotionJSX(Badge, _extends({
8
10
  ref: ref,
9
11
  variant: "warningCalloutBadge",
10
12
  slots: {
11
13
  leftIcon: ___EmotionJSX(Icon, {
12
- icon: Alert,
13
- size: 15,
14
- color: "#E86900"
14
+ icon: icons.warningCalloutBadge,
15
+ size: "xs"
15
16
  })
16
17
  }
17
18
  }, props));
@@ -1,80 +1,131 @@
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 _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
1
10
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
11
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
12
+ var _excluded = ["checked", "defaultChecked", "sx", "variant", "children"];
13
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
14
+ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
2
16
  import React, { forwardRef } from 'react';
3
17
  import { VisuallyHidden } from '@react-aria/visually-hidden';
4
18
  import { omit } from 'lodash';
5
- import PropTypes from 'prop-types';
6
19
  import { Checkbox as ThemeUICheckbox } from 'theme-ui';
20
+ import useGetTheme from '../../hooks/useGetTheme';
7
21
  import Box from '../Box';
22
+ import { AstroIndeterminateCheckboxIcon, OnyxDefaultCheckboxIcon, OnyxIndeterminateCheckboxIcon } from './CheckboxIcons';
23
+ import { jsx as ___EmotionJSX } from "@emotion/react";
24
+ var VISUALLY_HIDDEN_INPUT_STYLE = {
25
+ position: 'absolute',
26
+ opacity: 0,
27
+ width: 1,
28
+ height: 1,
29
+ overflow: 'hidden'
30
+ };
31
+
32
+ // Props from react-aria/useField that must not reach a native <input>
33
+ var NON_DOM_PROPS = ['isIndeterminate', 'isFocused', 'isDisabled', 'isReadOnly', 'isRequired', 'defaultSelected', '__css', '__themeKey', 'variant', 'tabIndex', 'sx', 'mr', 'opacity'];
34
+
35
+ // ─── Astro theme: original ThemeUI implementation ────────────────────────────
36
+
37
+ // theme-ui's CheckboxProps name is aliased to avoid clashing with our own.
8
38
 
9
39
  /**
10
- * Checkbox component from Theme UI, renders a visually hidden input + svg icons for the
11
- * checked and unchecked states.
40
+ * Internal props for AstroDefaultCheckbox. theme-ui's exported CheckboxProps
41
+ * omits the internal `__css`/`__themeKey` keys this component needs to receive.
12
42
  */
13
- import { jsx as ___EmotionJSX } from "@emotion/react";
14
- var DefaultCheckbox = /*#__PURE__*/forwardRef(function (props, ref) {
43
+
44
+ var AstroDefaultCheckbox = /*#__PURE__*/forwardRef(function (props, ref) {
15
45
  return ___EmotionJSX(ThemeUICheckbox, _extends({
16
- ref: ref,
46
+ ref: ref
47
+ }, _objectSpread({
17
48
  __css: {
18
49
  top: 0,
19
50
  left: 0
20
51
  }
21
- }, props));
52
+ }, props)));
53
+ });
54
+ var AstroIndeterminateCheckbox = /*#__PURE__*/forwardRef(function (props, ref) {
55
+ /* eslint-disable no-param-reassign */
56
+ if (ref && typeof ref !== 'function' && ref.current) ref.current.indeterminate = true;
57
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(VisuallyHidden, null, ___EmotionJSX(AstroDefaultCheckbox, _extends({
58
+ ref: ref
59
+ }, props))), ___EmotionJSX(Box, _extends({
60
+ as: AstroIndeterminateCheckboxIcon,
61
+ variant: "variants.box.indeterminateCheckboxIcon",
62
+ mr: 2
63
+ }, props, {
64
+ opacity: 1,
65
+ tabIndex: -1
66
+ })));
67
+ });
68
+
69
+ // ─── Onyx theme: Figma SVG implementation ────────────────────────────────────
70
+
71
+ var OnyxDefaultCheckbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
72
+ var checked = _ref.checked,
73
+ defaultChecked = _ref.defaultChecked,
74
+ sx = _ref.sx,
75
+ variant = _ref.variant,
76
+ children = _ref.children,
77
+ props = _objectWithoutProperties(_ref, _excluded);
78
+ var isChecked = checked !== undefined ? checked : defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : false;
79
+ var inputProps = omit(props, NON_DOM_PROPS);
80
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("input", _extends({
81
+ ref: ref,
82
+ type: "checkbox",
83
+ checked: checked,
84
+ defaultChecked: defaultChecked,
85
+ style: VISUALLY_HIDDEN_INPUT_STYLE
86
+ }, inputProps)), ___EmotionJSX(OnyxDefaultCheckboxIcon, {
87
+ isChecked: isChecked,
88
+ variant: variant,
89
+ sx: sx
90
+ }), children);
22
91
  });
23
- var IndeterminateCheckboxIcon = function IndeterminateCheckboxIcon(props) {
24
- console.log('🚀 ~ IndeterminateCheckboxIcon ~ props:', props);
25
- return ___EmotionJSX("svg", _extends({
26
- viewBox: "0 0 24 24",
27
- fill: "none",
28
- xmlns: "http://www.w3.org/2000/svg",
29
- "aria-labelledby": "checkbox-icon-title",
30
- "data-testid": "checkbox-icon-indeterminate"
31
- }, omit(props, 'id', 'aria-checked', 'data-testid', 'onFocus')), ___EmotionJSX("title", {
32
- id: "checkbox-icon-title"
33
- }, "Indeterminate Checkbox Icon"), ___EmotionJSX("rect", {
34
- x: "3.5",
35
- y: "3.5",
36
- width: "17",
37
- height: "17",
38
- rx: "1.5",
39
- id: "indeterminate-checkbox-icon-wrapper"
40
- }), ___EmotionJSX("rect", {
41
- x: "6.5",
42
- y: "11",
43
- width: "11",
44
- height: "2",
45
- fill: "white"
46
- }));
47
- };
48
- IndeterminateCheckboxIcon.propTypes = {
49
- // TODO: [Astro 3.0.0] Remove this boolean in favor of the proper naming convention - isDisabled
50
- // eslint-disable-next-line react/boolean-prop-naming
51
- disabled: PropTypes.bool,
52
- isDisabled: PropTypes.bool
53
- };
54
92
 
55
93
  /**
56
94
  * Renders a visually hidden default checkbox since the Theme UI checkbox does not support
57
95
  * indeterminism. This allows us to have the necessary ARIA attributes and visual presentation.
58
96
  */
59
- var IndeterminateCheckbox = /*#__PURE__*/forwardRef(function (props, ref) {
97
+ var OnyxIndeterminateCheckbox = /*#__PURE__*/forwardRef(function (props, ref) {
98
+ var _context;
60
99
  /* eslint-disable no-param-reassign */
61
- if (ref !== null && ref !== void 0 && ref.current) ref.current.indeterminate = true;
62
- return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(VisuallyHidden, null, ___EmotionJSX(DefaultCheckbox, _extends({
63
- ref: ref
64
- }, props))), ___EmotionJSX(Box, _extends({
65
- as: IndeterminateCheckboxIcon,
100
+ if (ref && typeof ref !== 'function' && ref.current) ref.current.indeterminate = true;
101
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("input", _extends({
102
+ ref: ref,
103
+ type: "checkbox",
104
+ style: VISUALLY_HIDDEN_INPUT_STYLE
105
+ }, omit(props, _concatInstanceProperty(_context = []).call(_context, NON_DOM_PROPS, ['isIndeterminate'])))), ___EmotionJSX(Box, _extends({
106
+ as: OnyxIndeterminateCheckboxIcon,
66
107
  variant: "variants.box.indeterminateCheckboxIcon",
67
108
  mr: 2
68
109
  }, props, {
69
- opacity: 1,
70
110
  tabIndex: -1
71
111
  })));
72
112
  });
113
+
114
+ // ─── CheckboxBase: delegates to Onyx or Astro implementation ─────────────────
115
+
73
116
  var CheckboxBase = /*#__PURE__*/forwardRef(function (props, ref) {
74
- /* eslint-disable react/prop-types */
75
- return props.isIndeterminate ? ___EmotionJSX(IndeterminateCheckbox, _extends({
117
+ var _useGetTheme = useGetTheme(),
118
+ isOnyx = _useGetTheme.themeState.isOnyx;
119
+ if (isOnyx) {
120
+ return props.isIndeterminate ? ___EmotionJSX(OnyxIndeterminateCheckbox, _extends({
121
+ ref: ref
122
+ }, props)) : ___EmotionJSX(OnyxDefaultCheckbox, _extends({
123
+ ref: ref
124
+ }, props));
125
+ }
126
+ return props.isIndeterminate ? ___EmotionJSX(AstroIndeterminateCheckbox, _extends({
76
127
  ref: ref
77
- }, props)) : ___EmotionJSX(DefaultCheckbox, _extends({
128
+ }, props)) : ___EmotionJSX(AstroDefaultCheckbox, _extends({
78
129
  ref: ref
79
130
  }, props));
80
131
  });
@@ -0,0 +1,114 @@
1
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["children"];
4
+ import React from 'react';
5
+ import { omit } from 'lodash';
6
+ import Box from '../Box';
7
+ import { jsx as ___EmotionJSX } from "@emotion/react";
8
+ /** Renders a Box component pre-configured as an `<svg>` element. */
9
+ var BoxAsSvg = function BoxAsSvg(_ref) {
10
+ var children = _ref.children,
11
+ props = _objectWithoutProperties(_ref, _excluded);
12
+ return ___EmotionJSX(Box, _extends({
13
+ as: "svg"
14
+ }, props), children);
15
+ };
16
+
17
+ // These are valid DOM/SVG attributes that should not be inherited by icon elements
18
+ // when spread from a parent checkbox component's prop bag.
19
+ var OMITTED_PROPS = ['id', 'aria-checked', 'data-testid', 'onFocus'];
20
+ export var AstroIndeterminateCheckboxIcon = function AstroIndeterminateCheckboxIcon(props) {
21
+ return ___EmotionJSX(BoxAsSvg, _extends({
22
+ viewBox: "0 0 24 24",
23
+ fill: "none",
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ "aria-labelledby": "checkbox-icon-title",
26
+ "data-testid": "checkbox-icon-indeterminate"
27
+ }, omit(props, OMITTED_PROPS)), ___EmotionJSX("title", {
28
+ id: "checkbox-icon-title"
29
+ }, "Indeterminate Checkbox Icon"), ___EmotionJSX("rect", {
30
+ x: "3.5",
31
+ y: "3.5",
32
+ width: "17",
33
+ height: "17",
34
+ rx: "1.5",
35
+ id: "indeterminate-checkbox-icon-wrapper"
36
+ }), ___EmotionJSX("rect", {
37
+ x: "6.5",
38
+ y: "11",
39
+ width: "11",
40
+ height: "2",
41
+ fill: "white"
42
+ }));
43
+ };
44
+ export var OnyxCheckedIcon = function OnyxCheckedIcon() {
45
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("rect", {
46
+ id: "checked-bg",
47
+ width: "16",
48
+ height: "16",
49
+ rx: "4",
50
+ fill: "currentColor"
51
+ }), ___EmotionJSX("path", {
52
+ d: "M7.10536 11.7932L7.08774 11.8108L2.6879 7.41096L4.12057 5.97829L7.10542 8.96313L11.8794 4.18912L13.3121 5.62179L7.12304 11.8109L7.10536 11.7932Z",
53
+ fill: "white"
54
+ }));
55
+ };
56
+ export var OnyxUncheckedIcon = function OnyxUncheckedIcon() {
57
+ return (
58
+ // Dark mode overrides this fill via theme variant CSS on rect[id="unchecked-bg"]
59
+ ___EmotionJSX("rect", {
60
+ id: "unchecked-bg",
61
+ x: "0.5",
62
+ y: "0.5",
63
+ width: "15",
64
+ height: "15",
65
+ rx: "3.5",
66
+ fill: "white",
67
+ stroke: "currentColor"
68
+ })
69
+ );
70
+ };
71
+ export var OnyxIndeterminateCheckboxIcon = function OnyxIndeterminateCheckboxIcon(props) {
72
+ return ___EmotionJSX(BoxAsSvg, _extends({
73
+ viewBox: "0 0 16 16",
74
+ fill: "none",
75
+ xmlns: "http://www.w3.org/2000/svg",
76
+ "aria-labelledby": "checkbox-icon-title",
77
+ "data-testid": "checkbox-icon-indeterminate"
78
+ }, omit(props, OMITTED_PROPS)), ___EmotionJSX("title", {
79
+ id: "checkbox-icon-title"
80
+ }, "Indeterminate Checkbox Icon"), ___EmotionJSX("rect", {
81
+ id: "indeterminate-checkbox-icon-wrapper",
82
+ width: "16",
83
+ height: "16",
84
+ rx: "4",
85
+ fill: "currentColor",
86
+ stroke: "currentColor"
87
+ }), ___EmotionJSX("rect", {
88
+ x: "4",
89
+ y: "7",
90
+ width: "8",
91
+ height: "2",
92
+ fill: "white"
93
+ }));
94
+ };
95
+ export var OnyxDefaultCheckboxIcon = function OnyxDefaultCheckboxIcon(_ref2) {
96
+ var isChecked = _ref2.isChecked,
97
+ variant = _ref2.variant,
98
+ sx = _ref2.sx;
99
+ return ___EmotionJSX(BoxAsSvg, {
100
+ viewBox: "0 0 16 16",
101
+ fill: "none",
102
+ xmlns: "http://www.w3.org/2000/svg",
103
+ "aria-hidden": "true",
104
+ __themeKey: "forms",
105
+ variant: variant || 'checkbox',
106
+ sx: sx,
107
+ __css: {
108
+ mr: 2,
109
+ borderRadius: 4,
110
+ flexShrink: 0
111
+ },
112
+ tabIndex: -1
113
+ }, isChecked ? ___EmotionJSX(OnyxCheckedIcon, null) : ___EmotionJSX(OnyxUncheckedIcon, null));
114
+ };
@@ -18,7 +18,7 @@ import { useToggleState } from 'react-stately';
18
18
  import { usePress } from '@react-aria/interactions';
19
19
  import { v4 as uuid } from 'uuid';
20
20
  import { Box, Checkbox, FieldHelperText, Label } from '../..';
21
- import { useField, useLocalOrForwardRef, usePropWarning } from '../../hooks';
21
+ import { useField, useGetTheme, useLocalOrForwardRef, usePropWarning } from '../../hooks';
22
22
  import { getPendoID } from '../../utils/devUtils/constants/pendoID';
23
23
  import statuses from '../../utils/devUtils/constants/statuses';
24
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -72,6 +72,8 @@ var CheckboxField = /*#__PURE__*/forwardRef(function (props, ref) {
72
72
  }, [isIndeterminate]);
73
73
  var _useCheckbox = useCheckbox(checkboxProps, state, checkboxRef),
74
74
  inputProps = _useCheckbox.inputProps;
75
+ var _useGetTheme = useGetTheme(),
76
+ isOnyx = _useGetTheme.themeState.isOnyx;
75
77
  var _useField = useField(_objectSpread(_objectSpread(_objectSpread({}, safeContainerPressProps), props), {}, {
76
78
  statusClasses: {
77
79
  isIndeterminate: isIndeterminate
@@ -84,7 +86,9 @@ var CheckboxField = /*#__PURE__*/forwardRef(function (props, ref) {
84
86
  var helperTextId = useMemo(function () {
85
87
  return uuid();
86
88
  }, []);
87
- return ___EmotionJSX(Box, _extends({}, getPendoID(displayName), fieldContainerProps), ___EmotionJSX(Box, {
89
+ return ___EmotionJSX(Box, _extends({}, getPendoID(displayName), fieldContainerProps, {
90
+ variant: isOnyx && 'forms.checkboxField.container' || undefined
91
+ }), ___EmotionJSX(Box, {
88
92
  isRow: true
89
93
  }, ___EmotionJSX(Label, _extends({
90
94
  variant: "forms.label.checkbox"
@@ -265,7 +265,7 @@ export var Indeterminate = function Indeterminate() {
265
265
  }, [isIndeterminate, subCheckboxes]);
266
266
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(CheckboxField, {
267
267
  label: "Fruit Salad Recipe",
268
- isIndeterminate: isIndeterminate,
268
+ isIndeterminate: true,
269
269
  isSelected: isCompleted,
270
270
  onChange: handleParentCheckboxChange
271
271
  }), ___EmotionJSX(Box, {
@@ -23,6 +23,9 @@ function _regeneratorDefine2(e, r, n, t) { var i = _Object$defineProperty; try {
23
23
  function _OverloadYield(e, d) { this.v = e, this.k = d; }
24
24
  import React from 'react';
25
25
  import userEvent from '@testing-library/user-event';
26
+ import astroTheme from '../../styles/theme';
27
+ import onyxDarkTheme from '../../styles/themeOverrides/nextGenDarkMode';
28
+ import onyxTheme from '../../styles/themes/next-gen';
26
29
  import statuses from '../../utils/devUtils/constants/statuses';
27
30
  import { act, fireEvent, render, screen } from '../../utils/testUtils/testWrapper';
28
31
  import { universalComponentTests } from '../../utils/testUtils/universalComponentTest';
@@ -334,10 +337,43 @@ test('indeterminate checkbox, clicking svg', /*#__PURE__*/_asyncToGenerator(/*#_
334
337
  }
335
338
  }, _callee8);
336
339
  })));
337
- test('controlled indeterminate checkbox retains focus and toggles correctly across keyboard Space presses', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
340
+ test.each([['Astro', astroTheme], ['Onyx', onyxTheme], ['Onyx dark', onyxDarkTheme]])('%s checkbox receives focus when tabbed to', /*#__PURE__*/function () {
341
+ var _ref0 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_themeName, providerTheme) {
342
+ var input;
343
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
344
+ while (1) switch (_context9.prev = _context9.next) {
345
+ case 0:
346
+ render(___EmotionJSX(React.Fragment, null, ___EmotionJSX("button", {
347
+ type: "button"
348
+ }, "Before checkbox"), ___EmotionJSX(CheckboxField, defaultProps)), {
349
+ providerTheme: providerTheme
350
+ });
351
+ input = screen.getByRole('checkbox');
352
+ _context9.next = 4;
353
+ return userEvent.tab();
354
+ case 4:
355
+ expect(screen.getByRole('button', {
356
+ name: 'Before checkbox'
357
+ })).toHaveFocus();
358
+ _context9.next = 7;
359
+ return userEvent.tab();
360
+ case 7:
361
+ expect(input).toHaveFocus();
362
+ expect(input.closest('label')).toHaveClass('is-focused');
363
+ case 9:
364
+ case "end":
365
+ return _context9.stop();
366
+ }
367
+ }, _callee9);
368
+ }));
369
+ return function (_x, _x2) {
370
+ return _ref0.apply(this, arguments);
371
+ };
372
+ }());
373
+ test('controlled indeterminate checkbox retains focus and toggles correctly across keyboard Space presses', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee0() {
338
374
  var onChange, IndeterminateParent, input, input2;
339
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
340
- while (1) switch (_context9.prev = _context9.next) {
375
+ return _regeneratorRuntime().wrap(function _callee0$(_context0) {
376
+ while (1) switch (_context0.prev = _context0.next) {
341
377
  case 0:
342
378
  onChange = jest.fn();
343
379
  IndeterminateParent = function IndeterminateParent() {
@@ -411,7 +447,7 @@ test('controlled indeterminate checkbox retains focus and toggles correctly acro
411
447
  expect(screen.getByRole('checkbox')).not.toBeChecked();
412
448
  case 20:
413
449
  case "end":
414
- return _context9.stop();
450
+ return _context0.stop();
415
451
  }
416
- }, _callee9);
452
+ }, _callee0);
417
453
  })));
@@ -0,0 +1,79 @@
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 _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
+ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
13
+ import React, { forwardRef } from 'react';
14
+ import { useCheckboxGroup } from 'react-aria';
15
+ import { useCheckboxGroupState } from 'react-stately';
16
+ import { Box, FieldHelperText, Label } from '../..';
17
+ import { CheckboxFieldGroupContext } from '../../context/CheckboxFieldGroupContext';
18
+ import { usePropWarning, useStatusClasses } from '../../hooks';
19
+ import { getPendoID } from '../../utils/devUtils/constants/pendoID';
20
+ import { jsx as ___EmotionJSX } from "@emotion/react";
21
+ var displayName = 'CheckboxFieldGroup';
22
+ var CheckboxFieldGroup = /*#__PURE__*/forwardRef(function (props, ref) {
23
+ var children = props.children,
24
+ className = props.className,
25
+ errorMessage = props.errorMessage,
26
+ helperText = props.helperText,
27
+ hintText = props.hintText,
28
+ helpHintProps = props.helpHintProps,
29
+ isDisabled = props.isDisabled,
30
+ isRequired = props.isRequired,
31
+ label = props.label,
32
+ _props$orientation = props.orientation,
33
+ orientation = _props$orientation === void 0 ? 'vertical' : _props$orientation,
34
+ status = props.status;
35
+ var state = useCheckboxGroupState(props);
36
+ var checkboxGroupProps = _objectSpread(_objectSpread({}, props), {}, {
37
+ description: helperText
38
+ });
39
+ var _useCheckboxGroup = useCheckboxGroup(checkboxGroupProps, state),
40
+ groupProps = _useCheckboxGroup.groupProps,
41
+ labelProps = _useCheckboxGroup.labelProps,
42
+ descriptionProps = _useCheckboxGroup.descriptionProps,
43
+ errorMessageProps = _useCheckboxGroup.errorMessageProps,
44
+ isInvalid = _useCheckboxGroup.isInvalid;
45
+ var _useStatusClasses = useStatusClasses(className, {
46
+ 'is-horizontal': orientation === 'horizontal',
47
+ 'is-invalid': isInvalid
48
+ }),
49
+ classNames = _useStatusClasses.classNames;
50
+ usePropWarning(props, 'disabled', 'isDisabled');
51
+ var renderedErrorMessage = typeof errorMessage === 'function' ? errorMessage({
52
+ isInvalid: isInvalid,
53
+ validationErrors: state.displayValidation.validationErrors,
54
+ validationDetails: state.displayValidation.validationDetails
55
+ }) : errorMessage;
56
+ return ___EmotionJSX(Box, _extends({
57
+ ref: ref,
58
+ className: classNames,
59
+ variant: "forms.checkboxFieldGroup.container"
60
+ }, getPendoID(displayName), groupProps), label && ___EmotionJSX(Label, _extends({
61
+ as: "span",
62
+ variant: "forms.label.checkboxFieldGroup",
63
+ isDisabled: isDisabled,
64
+ isRequired: isRequired,
65
+ hintText: hintText,
66
+ helpHintProps: helpHintProps
67
+ }, labelProps), label), ___EmotionJSX(Box, {
68
+ variant: "forms.checkboxFieldGroup.items",
69
+ className: orientation === 'horizontal' ? 'is-horizontal' : undefined
70
+ }, ___EmotionJSX(CheckboxFieldGroupContext.Provider, {
71
+ value: state
72
+ }, children)), helperText && ___EmotionJSX(FieldHelperText, _extends({
73
+ status: status
74
+ }, descriptionProps), helperText), renderedErrorMessage && ___EmotionJSX(FieldHelperText, _extends({
75
+ status: "error"
76
+ }, errorMessageProps), renderedErrorMessage));
77
+ });
78
+ CheckboxFieldGroup.displayName = displayName;
79
+ export default CheckboxFieldGroup;
@@ -0,0 +1,69 @@
1
+ import { Meta } from '@storybook/addon-docs/blocks';
2
+ import * as CheckboxFieldGroupStories from './CheckboxFieldGroup.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
5
+
6
+ <Meta of={CheckboxFieldGroupStories} isTemplate />
7
+
8
+ # CheckboxFieldGroup
9
+
10
+ `CheckboxFieldGroup` combines a labelled React Aria checkbox group with independently selectable `CheckboxFieldGroupItem` children. Use it when users can choose more than one value from a related set of options.
11
+
12
+ The group owns the selected string array. Use `defaultValue` for an uncontrolled group, or `value` with `onChange` for a controlled group.
13
+
14
+ ```tsx
15
+ import { CheckboxFieldGroup, CheckboxFieldGroupItem } from '@pingux/astro';
16
+
17
+ <CheckboxFieldGroup label="Notification channels" defaultValue={['email']}>
18
+ <CheckboxFieldGroupItem value="email" label="Email" />
19
+ <CheckboxFieldGroupItem value="sms" label="SMS" />
20
+ <CheckboxFieldGroupItem value="push" label="Push notification" />
21
+ </CheckboxFieldGroup>;
22
+ ```
23
+
24
+ ## Required child API
25
+
26
+ Every option must be a `CheckboxFieldGroupItem` with a unique string `value` and an accessible `label`. Do not use raw `Checkbox` children: they do not consume the group's React Stately selection context.
27
+
28
+ ### `CheckboxFieldGroup`
29
+
30
+ The group API includes:
31
+
32
+ - `label`, `helperText`, and `errorMessage` for field content and validation feedback.
33
+ - `value` / `defaultValue` and `onChange` for controlled or uncontrolled selected string arrays.
34
+ - `orientation` for vertical (default) or horizontal layout.
35
+ - `name` and `form` for native input metadata.
36
+ - `isRequired`, `isDisabled`, `isReadOnly`, and `isInvalid` for validation and interaction state.
37
+
38
+ ### `CheckboxFieldGroupItem`
39
+
40
+ Each item accepts:
41
+
42
+ - `value` and `label` for group selection and accessible naming.
43
+ - `helperText` for item-specific description.
44
+ - `isDisabled` and `isReadOnly`, combined with the group state.
45
+ - `isIndeterminate` for a mixed visual presentation; the item value still participates in group selection when toggled.
46
+ - `controlProps` / `checkBoxProps` for the input or checkbox visual primitive.
47
+ - `hasAutoFocus` to focus the item on initial render.
48
+
49
+ ## Accessibility and keyboard behavior
50
+
51
+ The group uses React Aria's [`useCheckboxGroup`](https://react-spectrum.adobe.com/react-aria/useCheckboxGroup.html) and each child uses [`useCheckboxGroupItem`](https://react-spectrum.adobe.com/react-aria/useCheckboxGroupItem). The wrapper has `role="group"`; its visible label supplies the accessible group name, and helper/error content is connected through generated description and error IDs. Each item remains an independently named checkbox, with group validation and descriptions propagated to its native input.
52
+
53
+ <AccessibilityTable keyboardRows={[
54
+ KeyboardRows.tabField,
55
+ KeyboardRows.shiftTabFocusPrevious,
56
+ { key: 'Space', description: 'Toggles the focused checkbox item.' },
57
+ ]} screenReaderRows={[
58
+ 'The group uses **`role="group"`** and **`aria-labelledby`** to expose its visible label.',
59
+ 'Each item is a checkbox with its own accessible label and checked state.',
60
+ 'Helper and error content is referenced through **`aria-describedby`** and React Aria validation metadata.',
61
+ ]} />
62
+
63
+ Tab and Shift+Tab move between checkbox items in normal page order. Space toggles the focused item. Disabled items cannot be focused or changed. Read-only items remain focusable so their selection can be inspected, but Space and pointer interaction do not change selection.
64
+
65
+ ## Indeterminate presentation
66
+
67
+ `isIndeterminate` is a mixed visual/native presentation; it does not create a second selection model. The item's ordinary `value` still participates in the group's selected string array and `onChange` when the item is toggled, so callers should clear or update `isIndeterminate` as appropriate after handling the partial state.
68
+
69
+ The component inherits the active Astro, Onyx, or Onyx Dark theme's checkbox and field tokens.