@primer/react 38.0.0-rc.6 → 38.0.0-rc.7

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 (320) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/ActionBar/ActionBar.d.ts +15 -1
  3. package/dist/ActionBar/ActionBar.d.ts.map +1 -1
  4. package/dist/ActionBar/ActionBar.js +381 -217
  5. package/dist/ActionBar/index.d.ts +1 -1
  6. package/dist/ActionList/Description.d.ts +4 -3
  7. package/dist/ActionList/Description.d.ts.map +1 -1
  8. package/dist/ActionList/Description.js +5 -5
  9. package/dist/ActionList/Divider.d.ts +5 -4
  10. package/dist/ActionList/Divider.d.ts.map +1 -1
  11. package/dist/ActionList/Divider.js +6 -7
  12. package/dist/ActionList/Group.d.ts +4 -5
  13. package/dist/ActionList/Group.d.ts.map +1 -1
  14. package/dist/ActionList/Group.js +9 -16
  15. package/dist/ActionList/Heading.d.ts +3 -2
  16. package/dist/ActionList/Heading.d.ts.map +1 -1
  17. package/dist/ActionList/Heading.js +1 -0
  18. package/dist/ActionList/Item.d.ts +5 -2
  19. package/dist/ActionList/Item.d.ts.map +1 -1
  20. package/dist/ActionList/Item.js +4 -8
  21. package/dist/ActionList/LinkItem.d.ts +1 -1
  22. package/dist/ActionList/LinkItem.d.ts.map +1 -1
  23. package/dist/ActionList/LinkItem.js +1 -2
  24. package/dist/ActionList/List.d.ts +1 -1
  25. package/dist/ActionList/List.d.ts.map +1 -1
  26. package/dist/ActionList/List.js +1 -3
  27. package/dist/ActionList/TrailingAction.d.ts +1 -0
  28. package/dist/ActionList/TrailingAction.d.ts.map +1 -1
  29. package/dist/ActionList/TrailingAction.js +3 -0
  30. package/dist/ActionList/Visuals.d.ts +4 -4
  31. package/dist/ActionList/Visuals.d.ts.map +1 -1
  32. package/dist/ActionList/Visuals.js +3 -3
  33. package/dist/ActionList/index.d.ts +12 -9
  34. package/dist/ActionList/index.d.ts.map +1 -1
  35. package/dist/ActionList/shared.d.ts +2 -3
  36. package/dist/ActionList/shared.d.ts.map +1 -1
  37. package/dist/ActionMenu/ActionMenu.d.ts +6 -5
  38. package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
  39. package/dist/ActionMenu/ActionMenu.js +11 -6
  40. package/dist/Autocomplete/Autocomplete.d.ts +6 -4
  41. package/dist/Autocomplete/Autocomplete.d.ts.map +1 -1
  42. package/dist/Autocomplete/Autocomplete.js +1 -0
  43. package/dist/Autocomplete/AutocompleteInput.js +1 -0
  44. package/dist/Autocomplete/AutocompleteMenu.d.ts +1 -0
  45. package/dist/Autocomplete/AutocompleteMenu.d.ts.map +1 -1
  46. package/dist/Autocomplete/AutocompleteMenu.js +1 -0
  47. package/dist/Autocomplete/AutocompleteOverlay.d.ts +1 -0
  48. package/dist/Autocomplete/AutocompleteOverlay.d.ts.map +1 -1
  49. package/dist/Autocomplete/AutocompleteOverlay.js +1 -0
  50. package/dist/AvatarStack/AvatarStack.d.ts.map +1 -1
  51. package/dist/AvatarStack/AvatarStack.js +1 -3
  52. package/dist/BranchName/BranchName.d.ts +9 -10
  53. package/dist/BranchName/BranchName.d.ts.map +1 -1
  54. package/dist/BranchName/BranchName.js +1 -8
  55. package/dist/Button/Button.d.ts +1 -5
  56. package/dist/Button/Button.d.ts.map +1 -1
  57. package/dist/Button/Button.js +2 -85
  58. package/dist/Button/ButtonBase.d.ts.map +1 -1
  59. package/dist/Button/ButtonBase.js +8 -93
  60. package/dist/Button/IconButton.d.ts.map +1 -1
  61. package/dist/Button/IconButton.js +0 -16
  62. package/dist/Button/LinkButton.d.ts +1 -1
  63. package/dist/Button/LinkButton.d.ts.map +1 -1
  64. package/dist/Button/types.d.ts +1 -3
  65. package/dist/Button/types.d.ts.map +1 -1
  66. package/dist/Checkbox/Checkbox.d.ts +3 -1
  67. package/dist/Checkbox/Checkbox.d.ts.map +1 -1
  68. package/dist/Checkbox/Checkbox.js +1 -0
  69. package/dist/CheckboxGroup/CheckboxGroup.d.ts +8 -7
  70. package/dist/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
  71. package/dist/CheckboxGroup/CheckboxGroup.js +4 -2
  72. package/dist/ConfirmationDialog/ConfirmationDialog-87ccf595.css +2 -0
  73. package/dist/ConfirmationDialog/ConfirmationDialog-87ccf595.css.map +1 -0
  74. package/dist/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
  75. package/dist/ConfirmationDialog/ConfirmationDialog.js +4 -1
  76. package/dist/ConfirmationDialog/ConfirmationDialog.module.css.js +1 -1
  77. package/dist/DataTable/Table.d.ts +3 -3
  78. package/dist/DataTable/Table.d.ts.map +1 -1
  79. package/dist/DataTable/Table.js +24 -19
  80. package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
  81. package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
  82. package/dist/FilteredActionList/FilteredActionList-f6c2dc7a.css +2 -0
  83. package/dist/FilteredActionList/FilteredActionList-f6c2dc7a.css.map +1 -0
  84. package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
  85. package/dist/FilteredActionList/FilteredActionList.js +2 -7
  86. package/dist/FilteredActionList/FilteredActionList.module.css.js +2 -2
  87. package/dist/FilteredActionList/types.d.ts +5 -2
  88. package/dist/FilteredActionList/types.d.ts.map +1 -1
  89. package/dist/FormControl/FormControl.d.ts +8 -36
  90. package/dist/FormControl/FormControl.d.ts.map +1 -1
  91. package/dist/FormControl/FormControl.js +64 -66
  92. package/dist/FormControl/FormControlCaption.d.ts +6 -4
  93. package/dist/FormControl/FormControlCaption.d.ts.map +1 -1
  94. package/dist/FormControl/FormControlCaption.js +9 -13
  95. package/dist/FormControl/FormControlLabel.d.ts +3 -3
  96. package/dist/FormControl/FormControlLabel.d.ts.map +1 -1
  97. package/dist/FormControl/FormControlLabel.js +25 -31
  98. package/dist/FormControl/FormControlLeadingVisual-e217df71.css +2 -0
  99. package/dist/FormControl/FormControlLeadingVisual-e217df71.css.map +1 -0
  100. package/dist/FormControl/FormControlLeadingVisual.d.ts +2 -2
  101. package/dist/FormControl/FormControlLeadingVisual.d.ts.map +1 -1
  102. package/dist/FormControl/FormControlLeadingVisual.js +10 -17
  103. package/dist/FormControl/FormControlLeadingVisual.module.css.js +5 -0
  104. package/dist/FormControl/_FormControlContext.js +1 -1
  105. package/dist/FormControl/_FormControlValidation.d.ts +3 -3
  106. package/dist/FormControl/_FormControlValidation.d.ts.map +1 -1
  107. package/dist/FormControl/_FormControlValidation.js +7 -9
  108. package/dist/FormControl/index.d.ts +4 -0
  109. package/dist/FormControl/index.d.ts.map +1 -1
  110. package/dist/LabelGroup/LabelGroup-7d19205a.css +2 -0
  111. package/dist/LabelGroup/LabelGroup-7d19205a.css.map +1 -0
  112. package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
  113. package/dist/LabelGroup/LabelGroup.js +14 -27
  114. package/dist/LabelGroup/LabelGroup.module.css.js +2 -2
  115. package/dist/NavList/NavList.d.ts +3 -3
  116. package/dist/NavList/NavList.d.ts.map +1 -1
  117. package/dist/NavList/NavList.js +2 -1
  118. package/dist/Octicon/Octicon.d.ts +7 -6
  119. package/dist/Octicon/Octicon.d.ts.map +1 -1
  120. package/dist/Octicon/Octicon.js +4 -23
  121. package/dist/Overlay/Overlay.d.ts.map +1 -1
  122. package/dist/Overlay/Overlay.js +63 -85
  123. package/dist/PageHeader/PageHeader.d.ts +3 -3
  124. package/dist/PageHeader/PageHeader.d.ts.map +1 -1
  125. package/dist/PageHeader/PageHeader.js +5 -2
  126. package/dist/PageLayout/{PageLayout-8a294e74.css → PageLayout-a276fa3b.css} +2 -2
  127. package/dist/PageLayout/PageLayout-a276fa3b.css.map +1 -0
  128. package/dist/PageLayout/PageLayout.d.ts +14 -58
  129. package/dist/PageLayout/PageLayout.d.ts.map +1 -1
  130. package/dist/PageLayout/PageLayout.js +216 -245
  131. package/dist/PageLayout/PageLayout.module.css.js +2 -2
  132. package/dist/Radio/Radio.d.ts +3 -1
  133. package/dist/Radio/Radio.d.ts.map +1 -1
  134. package/dist/Radio/Radio.js +1 -0
  135. package/dist/RadioGroup/RadioGroup.d.ts +6 -5
  136. package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
  137. package/dist/RadioGroup/RadioGroup.js +1 -0
  138. package/dist/SegmentedControl/SegmentedControl.d.ts +3 -2
  139. package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  140. package/dist/SegmentedControl/SegmentedControl.js +11 -14
  141. package/dist/SegmentedControl/SegmentedControlButton.d.ts +2 -1
  142. package/dist/SegmentedControl/SegmentedControlButton.d.ts.map +1 -1
  143. package/dist/SegmentedControl/SegmentedControlButton.js +1 -0
  144. package/dist/SegmentedControl/SegmentedControlIconButton.d.ts +2 -1
  145. package/dist/SegmentedControl/SegmentedControlIconButton.d.ts.map +1 -1
  146. package/dist/SegmentedControl/SegmentedControlIconButton.js +1 -0
  147. package/dist/Select/Select.d.ts +1 -0
  148. package/dist/Select/Select.d.ts.map +1 -1
  149. package/dist/Select/Select.js +1 -0
  150. package/dist/SelectPanel/SelectPanel.d.ts +2 -1
  151. package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
  152. package/dist/SelectPanel/SelectPanel.js +1 -0
  153. package/dist/Skeleton/SkeletonBox.d.ts.map +1 -1
  154. package/dist/Skeleton/SkeletonBox.js +26 -20
  155. package/dist/SkeletonAvatar/SkeletonAvatar.d.ts.map +1 -1
  156. package/dist/SkeletonAvatar/SkeletonAvatar.js +53 -62
  157. package/dist/StateLabel/{StateLabel-aaa1d148.css → StateLabel-b586b0bc.css} +2 -2
  158. package/dist/StateLabel/StateLabel-b586b0bc.css.map +1 -0
  159. package/dist/StateLabel/StateLabel.d.ts.map +1 -1
  160. package/dist/StateLabel/StateLabel.js +28 -39
  161. package/dist/StateLabel/StateLabel.module.css.js +1 -1
  162. package/dist/SubNav/SubNav.d.ts +4 -1
  163. package/dist/SubNav/SubNav.d.ts.map +1 -1
  164. package/dist/SubNav/SubNav.js +3 -1
  165. package/dist/Text/Text.d.ts +16 -8
  166. package/dist/Text/Text.d.ts.map +1 -1
  167. package/dist/Text/Text.js +34 -31
  168. package/dist/TextInput/TextInput.d.ts +3 -2
  169. package/dist/TextInput/TextInput.d.ts.map +1 -1
  170. package/dist/TextInput/TextInput.js +2 -3
  171. package/dist/TextInput/index.d.ts +1 -0
  172. package/dist/TextInput/index.d.ts.map +1 -1
  173. package/dist/TextInputWithTokens/TextInputWithTokens.d.ts +3 -1
  174. package/dist/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
  175. package/dist/TextInputWithTokens/TextInputWithTokens.js +205 -211
  176. package/dist/Textarea/Textarea.d.ts +5 -4
  177. package/dist/Textarea/Textarea.d.ts.map +1 -1
  178. package/dist/Textarea/Textarea.js +40 -45
  179. package/dist/Tooltip/Tooltip-fffa9948.css +2 -0
  180. package/dist/Tooltip/Tooltip-fffa9948.css.map +1 -0
  181. package/dist/Tooltip/Tooltip.d.ts +6 -8
  182. package/dist/Tooltip/Tooltip.d.ts.map +1 -1
  183. package/dist/Tooltip/Tooltip.js +44 -118
  184. package/dist/Tooltip/Tooltip.module.css.js +5 -0
  185. package/dist/TooltipV2/Tooltip.d.ts +3 -16
  186. package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
  187. package/dist/TooltipV2/Tooltip.js +1 -0
  188. package/dist/TreeView/TreeView.d.ts +4 -1
  189. package/dist/TreeView/TreeView.d.ts.map +1 -1
  190. package/dist/TreeView/TreeView.js +42 -9
  191. package/dist/Truncate/Truncate.d.ts +2 -2
  192. package/dist/Truncate/Truncate.d.ts.map +1 -1
  193. package/dist/UnderlineNav/UnderlineNav-4344d9b0.css +2 -0
  194. package/dist/UnderlineNav/UnderlineNav-4344d9b0.css.map +1 -0
  195. package/dist/UnderlineNav/UnderlineNav.d.ts +0 -1
  196. package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
  197. package/dist/UnderlineNav/UnderlineNav.js +45 -17
  198. package/dist/UnderlineNav/UnderlineNav.module.css.js +2 -2
  199. package/dist/UnderlineNav/UnderlineNavContext.d.ts +0 -2
  200. package/dist/UnderlineNav/UnderlineNavContext.d.ts.map +1 -1
  201. package/dist/UnderlineNav/UnderlineNavContext.js +0 -1
  202. package/dist/UnderlineNav/styles.d.ts +1 -23
  203. package/dist/UnderlineNav/styles.d.ts.map +1 -1
  204. package/dist/UnderlineNav/styles.js +4 -59
  205. package/dist/constants.js +3 -3
  206. package/dist/deprecated/ActionList/Divider-7c6b656a.css +2 -0
  207. package/dist/deprecated/ActionList/Divider-7c6b656a.css.map +1 -0
  208. package/dist/deprecated/ActionList/Divider.d.ts +1 -2
  209. package/dist/deprecated/ActionList/Divider.d.ts.map +1 -1
  210. package/dist/deprecated/ActionList/Divider.js +6 -12
  211. package/dist/deprecated/ActionList/Divider.module.css.js +5 -0
  212. package/dist/deprecated/ActionList/Group.d.ts +1 -2
  213. package/dist/deprecated/ActionList/Group.d.ts.map +1 -1
  214. package/dist/deprecated/ActionList/Group.js +1 -8
  215. package/dist/deprecated/ActionList/Header-493b1d76.css +2 -0
  216. package/dist/deprecated/ActionList/Header-493b1d76.css.map +1 -0
  217. package/dist/deprecated/ActionList/Header.d.ts +2 -6
  218. package/dist/deprecated/ActionList/Header.d.ts.map +1 -1
  219. package/dist/deprecated/ActionList/Header.js +46 -37
  220. package/dist/deprecated/ActionList/Header.module.css.js +5 -0
  221. package/dist/deprecated/ActionList/Item-cf87f98a.css +3 -0
  222. package/dist/deprecated/ActionList/Item-cf87f98a.css.map +1 -0
  223. package/dist/deprecated/ActionList/Item.d.ts +1 -5
  224. package/dist/deprecated/ActionList/Item.d.ts.map +1 -1
  225. package/dist/deprecated/ActionList/Item.js +182 -271
  226. package/dist/deprecated/ActionList/Item.module.css.js +5 -0
  227. package/dist/deprecated/ActionList/List-1ec9d6d9.css +2 -0
  228. package/dist/deprecated/ActionList/List-1ec9d6d9.css.map +1 -0
  229. package/dist/deprecated/ActionList/List.d.ts +1 -0
  230. package/dist/deprecated/ActionList/List.d.ts.map +1 -1
  231. package/dist/deprecated/ActionList/List.js +92 -82
  232. package/dist/deprecated/ActionList/List.module.css.js +5 -0
  233. package/dist/deprecated/UnderlineNav/UnderlineNav-0c1e0dff.css +2 -0
  234. package/dist/deprecated/UnderlineNav/UnderlineNav-0c1e0dff.css.map +1 -0
  235. package/dist/deprecated/UnderlineNav/UnderlineNav.d.ts +6 -8
  236. package/dist/deprecated/UnderlineNav/UnderlineNav.d.ts.map +1 -1
  237. package/dist/deprecated/UnderlineNav/UnderlineNav.js +90 -49
  238. package/dist/deprecated/UnderlineNav/UnderlineNav.module.css.js +5 -0
  239. package/dist/experimental/SelectPanel2/SelectPanel.d.ts +11 -7
  240. package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
  241. package/dist/experimental/SelectPanel2/SelectPanel.js +6 -1
  242. package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts +6 -6
  243. package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
  244. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +8 -4
  245. package/dist/hooks/useSlots.d.ts.map +1 -1
  246. package/dist/hooks/useSlots.js +3 -2
  247. package/dist/hooks/useSyncedState.js +1 -1
  248. package/dist/index.d.ts +5 -1
  249. package/dist/index.d.ts.map +1 -1
  250. package/dist/index.js +3 -1
  251. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts +6 -7
  252. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
  253. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +7 -9
  254. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.d.ts +4 -4
  255. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.d.ts.map +1 -1
  256. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -0
  257. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts +2 -1
  258. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts.map +1 -1
  259. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +1 -0
  260. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.d.ts +3 -3
  261. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.d.ts.map +1 -1
  262. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +2 -3
  263. package/dist/internal/components/InputLabel.d.ts +2 -3
  264. package/dist/internal/components/InputLabel.d.ts.map +1 -1
  265. package/dist/internal/components/InputLabel.js +29 -36
  266. package/dist/internal/components/InputValidation.d.ts +1 -2
  267. package/dist/internal/components/InputValidation.d.ts.map +1 -1
  268. package/dist/internal/components/TextInputInnerAction.d.ts +16 -2
  269. package/dist/internal/components/TextInputInnerAction.d.ts.map +1 -1
  270. package/dist/internal/components/TextInputInnerAction.js +46 -60
  271. package/dist/internal/components/TextInputWrapper.d.ts +10 -32
  272. package/dist/internal/components/TextInputWrapper.d.ts.map +1 -1
  273. package/dist/internal/components/TextInputWrapper.js +87 -58
  274. package/dist/internal/components/UnstyledTextInput.d.ts +1 -2
  275. package/dist/internal/components/UnstyledTextInput.d.ts.map +1 -1
  276. package/dist/internal/components/UnstyledTextInput.js +1 -3
  277. package/dist/internal/components/ValidationAnimationContainer-04125429.css +2 -0
  278. package/dist/internal/components/ValidationAnimationContainer-04125429.css.map +1 -0
  279. package/dist/internal/components/ValidationAnimationContainer.d.ts.map +1 -1
  280. package/dist/internal/components/ValidationAnimationContainer.js +4 -9
  281. package/dist/internal/components/ValidationAnimationContainer.module.css.js +5 -0
  282. package/dist/utils/form-story-helpers.d.ts.map +1 -1
  283. package/dist/utils/is-slot.d.ts +6 -0
  284. package/dist/utils/is-slot.d.ts.map +1 -0
  285. package/dist/utils/is-slot.js +15 -0
  286. package/dist/utils/polymorphic.d.ts +2 -1
  287. package/dist/utils/polymorphic.d.ts.map +1 -1
  288. package/dist/utils/types/Slots.d.ts +7 -0
  289. package/dist/utils/types/Slots.d.ts.map +1 -0
  290. package/dist/utils/types/index.d.ts +1 -0
  291. package/dist/utils/types/index.d.ts.map +1 -1
  292. package/generated/components.json +21 -119
  293. package/package.json +2 -1
  294. package/dist/Button/styles.d.ts +0 -431
  295. package/dist/Button/styles.d.ts.map +0 -1
  296. package/dist/Button/styles.js +0 -5
  297. package/dist/ConfirmationDialog/ConfirmationDialog-de0401ff.css +0 -2
  298. package/dist/ConfirmationDialog/ConfirmationDialog-de0401ff.css.map +0 -1
  299. package/dist/FilteredActionList/FilteredActionList-e1eb1b75.css +0 -2
  300. package/dist/FilteredActionList/FilteredActionList-e1eb1b75.css.map +0 -1
  301. package/dist/LabelGroup/LabelGroup-eda75c0f.css +0 -2
  302. package/dist/LabelGroup/LabelGroup-eda75c0f.css.map +0 -1
  303. package/dist/PageLayout/PageLayout-8a294e74.css.map +0 -1
  304. package/dist/StateLabel/StateLabel-aaa1d148.css.map +0 -1
  305. package/dist/UnderlineNav/UnderlineNav-78db938f.css +0 -2
  306. package/dist/UnderlineNav/UnderlineNav-78db938f.css.map +0 -1
  307. package/dist/internal/components/BoxWithFallback.d.ts +0 -6
  308. package/dist/internal/components/BoxWithFallback.d.ts.map +0 -1
  309. package/dist/internal/components/BoxWithFallback.js +0 -70
  310. package/dist/internal/utils/getGlobalFocusStyles.d.ts +0 -4
  311. package/dist/internal/utils/getGlobalFocusStyles.d.ts.map +0 -1
  312. package/dist/internal/utils/getGlobalFocusStyles.js +0 -7
  313. package/dist/internal/utils/sharedCheckboxAndRadioStyles.d.ts +0 -2
  314. package/dist/internal/utils/sharedCheckboxAndRadioStyles.d.ts.map +0 -1
  315. package/dist/utils/defaultSxProp.d.ts +0 -3
  316. package/dist/utils/defaultSxProp.d.ts.map +0 -1
  317. package/dist/utils/defaultSxProp.js +0 -3
  318. package/dist/utils/includeSystemProps.d.ts +0 -7
  319. package/dist/utils/includeSystemProps.d.ts.map +0 -1
  320. package/dist/utils/includeSystemProps.js +0 -14
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import type { MaxWidthProps } from 'styled-system';
3
2
  import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
4
3
  type TruncateProps = React.HTMLAttributes<HTMLElement> & {
5
4
  title: string;
6
5
  inline?: boolean;
7
6
  expandable?: boolean;
8
- } & MaxWidthProps;
7
+ maxWidth?: number | string;
8
+ };
9
9
  declare const Truncate: PolymorphicForwardRefComponent<"div", TruncateProps>;
10
10
  export type { TruncateProps };
11
11
  export default Truncate;
@@ -1 +1 @@
1
- {"version":3,"file":"Truncate.d.ts","sourceRoot":"","sources":["../../src/Truncate/Truncate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAG/F,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IACvD,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,aAAa,CAAA;AAEjB,QAAA,MAAM,QAAQ,EAuBR,8BAA8B,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;AAM1D,YAAY,EAAC,aAAa,EAAC,CAAA;AAC3B,eAAe,QAAQ,CAAA"}
1
+ {"version":3,"file":"Truncate.d.ts","sourceRoot":"","sources":["../../src/Truncate/Truncate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAG/F,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IACvD,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B,CAAA;AAED,QAAA,MAAM,QAAQ,EAuBR,8BAA8B,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;AAM1D,YAAY,EAAC,aAAa,EAAC,CAAA;AAC3B,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,2 @@
1
+ .prc-UnderlineNav-MenuItemContent-k4WNL{align-items:center;display:flex;justify-content:space-between}.prc-UnderlineNav-MoreButton-smema{background:transparent;border:0;box-shadow:none;font-weight:var(--base-text-weight-normal,400);margin:0;padding:var(--base-size-4,.25rem) var(--base-size-8,.5rem)}.prc-UnderlineNav-MoreButton-smema>[data-component=trailingVisual]{margin-left:0}
2
+ /*# sourceMappingURL=UnderlineNav-4344d9b0.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/UnderlineNav/UnderlineNav.module.css"],"names":[],"mappings":"AAAA,wCAEE,kBAAmB,CADnB,YAAa,CAEb,6BACF,CAGA,mCAGE,sBAAuB,CADvB,QAAS,CAGT,eAAgB,CADhB,8CAA2C,CAH3C,QAAS,CAQT,0DAKF,CAHE,mEACE,aACF","file":"UnderlineNav-4344d9b0.css","sourcesContent":[".MenuItemContent {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n/* More button styles migrated from styles.ts (was moreBtnStyles) */\n.MoreButton {\n margin: 0; /* reset Safari extra margin */\n border: 0;\n background: transparent;\n font-weight: var(--base-text-weight-normal);\n box-shadow: none;\n padding-top: var(--base-size-4);\n padding-bottom: var(--base-size-4);\n padding-left: var(--base-size-8);\n padding-right: var(--base-size-8);\n\n & > [data-component='trailingVisual'] {\n margin-left: 0;\n }\n}\n"]}
@@ -16,7 +16,6 @@ export type UnderlineNavProps = {
16
16
  variant?: 'inset' | 'flush';
17
17
  };
18
18
  export declare const MORE_BTN_WIDTH = 86;
19
- export declare const MoreMenuListItem: import("styled-components").StyledComponent<"li", any, {}, never>;
20
19
  export declare const getValidChildren: (children: React.ReactNode) => React.ReactElement[];
21
20
  export declare const UnderlineNav: React.ForwardRefExoticComponent<UnderlineNavProps & React.RefAttributes<unknown>>;
22
21
  //# sourceMappingURL=UnderlineNav.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnderlineNav.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6D,MAAM,OAAO,CAAA;AAoBjF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,cAAc,KAAK,CAAA;AAIhC,eAAO,MAAM,gBAAgB,mEAI5B,CAAA;AAkED,eAAO,MAAM,gBAAgB,GAAI,UAAU,KAAK,CAAC,SAAS,KACgC,KAAK,CAAC,YAAY,EAC3G,CAAA;AAkBD,eAAO,MAAM,YAAY,mFAiRxB,CAAA"}
1
+ {"version":3,"file":"UnderlineNav.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6D,MAAM,OAAO,CAAA;AAmBjF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,cAAc,KAAK,CAAA;AAoEhC,eAAO,MAAM,gBAAgB,GAAI,UAAU,KAAK,CAAC,SAAS,KACgC,KAAK,CAAC,YAAY,EAC3G,CAAA;AAgCD,eAAO,MAAM,YAAY,mFA8RxB,CAAA"}
@@ -1,11 +1,9 @@
1
1
  import React, { forwardRef, useRef, useState, useEffect, useCallback } from 'react';
2
2
  import { UnderlineNavContext } from './UnderlineNavContext.js';
3
3
  import { useResizeObserver } from '../hooks/useResizeObserver.js';
4
- import { useTheme } from '../ThemeProvider.js';
5
4
  import VisuallyHidden from '../_VisuallyHidden.js';
6
- import { getDividerStyle, moreBtnStyles, baseMenuStyles, menuStyles, menuItemStyles, baseMenuMinWidth } from './styles.js';
5
+ import { dividerStyles, baseMenuMinWidth, menuItemStyles } from './styles.js';
7
6
  import { UnderlineWrapper, UnderlineItemList, LoadingCounter, GAP } from '../internal/components/UnderlineTabbedInterface.js';
8
- import styled from 'styled-components';
9
7
  import { TriangleDownIcon } from '@primer/octicons-react';
10
8
  import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
11
9
  import { useOnOutsideClick } from '../hooks/useOnOutsideClick.js';
@@ -13,6 +11,7 @@ import { useId } from '../hooks/useId.js';
13
11
  import { ActionList } from '../ActionList/index.js';
14
12
  import { invariant } from '../utils/invariant.js';
15
13
  import classes from './UnderlineNav.module.css.js';
14
+ import { getAnchoredPosition } from '@primer/behaviors';
16
15
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
17
16
  import { ButtonComponent } from '../Button/Button.js';
18
17
  import CounterLabel from '../CounterLabel/CounterLabel.js';
@@ -22,10 +21,6 @@ import CounterLabel from '../CounterLabel/CounterLabel.js';
22
21
  const MORE_BTN_WIDTH = 86;
23
22
  // The height is needed to make sure we don't have a layout shift when the more button is the only item in the nav.
24
23
  const MORE_BTN_HEIGHT = 45;
25
- const MoreMenuListItem = styled.li.withConfig({
26
- displayName: "UnderlineNav__MoreMenuListItem",
27
- componentId: "sc-1jfr31k-0"
28
- })(["display:flex;align-items:center;height:", "px;"], MORE_BTN_HEIGHT);
29
24
  const overflowEffect = (navWidth, moreMenuWidth, childArray, childWidthArray, noIconChildWidthArray, updateListAndMenu) => {
30
25
  let iconsVisible = true;
31
26
  if (childWidthArray.length === 0) {
@@ -101,6 +96,20 @@ const calculatePossibleItems = (childWidthArray, navWidth, moreMenuWidth = 0) =>
101
96
  }
102
97
  return breakpoint;
103
98
  };
99
+
100
+ // Inline styles converted from baseMenuStyles for use as CSSProperties
101
+ const baseMenuInlineStyles = {
102
+ position: 'absolute',
103
+ zIndex: 1,
104
+ top: '90%',
105
+ boxShadow: '0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)',
106
+ borderRadius: 12,
107
+ background: 'var(--overlay-bgColor)',
108
+ listStyle: 'none',
109
+ minWidth: `${baseMenuMinWidth}px`,
110
+ maxWidth: '640px',
111
+ right: 0
112
+ };
104
113
  const UnderlineNav = /*#__PURE__*/forwardRef(({
105
114
  as = 'nav',
106
115
  'aria-label': ariaLabel,
@@ -117,9 +126,6 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
117
126
  const moreMenuBtnRef = useRef(null);
118
127
  const containerRef = React.useRef(null);
119
128
  const disclosureWidgetId = useId();
120
- const {
121
- theme
122
- } = useTheme();
123
129
  const [isWidgetOpen, setIsWidgetOpen] = useState(false);
124
130
  const [iconsVisible, setIconsVisible] = useState(true);
125
131
  const [childWidthArray, setChildWidthArray] = useState([]);
@@ -246,9 +252,26 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
246
252
  const moreMenuWidth = (_moreMenuRef$current$ = (_moreMenuRef$current = moreMenuRef.current) === null || _moreMenuRef$current === void 0 ? void 0 : _moreMenuRef$current.getBoundingClientRect().width) !== null && _moreMenuRef$current$ !== void 0 ? _moreMenuRef$current$ : 0;
247
253
  navWidth !== 0 && overflowEffect(navWidth, moreMenuWidth, validChildren, childWidthArray, noIconChildWidthArray, updateListAndMenu);
248
254
  }, navRef);
255
+
256
+ // Compute menuInlineStyles if needed
257
+ let menuInlineStyles = {
258
+ ...baseMenuInlineStyles
259
+ };
260
+ if (containerRef.current && listRef.current) {
261
+ const {
262
+ left
263
+ } = getAnchoredPosition(containerRef.current, listRef.current, {
264
+ align: 'start',
265
+ side: 'outside-bottom'
266
+ });
267
+ menuInlineStyles = {
268
+ ...baseMenuInlineStyles,
269
+ right: undefined,
270
+ left
271
+ };
272
+ }
249
273
  return /*#__PURE__*/jsxs(UnderlineNavContext.Provider, {
250
274
  value: {
251
- theme,
252
275
  setChildrenWidth,
253
276
  setNoIconChildrenWidth,
254
277
  loadingCounters,
@@ -266,13 +289,18 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
266
289
  children: /*#__PURE__*/jsxs(UnderlineItemList, {
267
290
  ref: listRef,
268
291
  role: "list",
269
- children: [listItems, menuItems.length > 0 && /*#__PURE__*/jsxs(MoreMenuListItem, {
292
+ children: [listItems, menuItems.length > 0 && /*#__PURE__*/jsxs("li", {
270
293
  ref: moreMenuRef,
294
+ style: {
295
+ display: 'flex',
296
+ alignItems: 'center',
297
+ height: `${MORE_BTN_HEIGHT}px`
298
+ },
271
299
  children: [!onlyMenuVisible && /*#__PURE__*/jsx("div", {
272
- style: getDividerStyle(theme)
300
+ style: dividerStyles
273
301
  }), /*#__PURE__*/jsx(ButtonComponent, {
274
302
  ref: moreMenuBtnRef,
275
- sx: moreBtnStyles,
303
+ className: classes.MoreButton,
276
304
  "aria-controls": disclosureWidgetId,
277
305
  "aria-expanded": isWidgetOpen,
278
306
  onClick: onAnchorClick,
@@ -294,8 +322,8 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
294
322
  selectionVariant: "single",
295
323
  ref: containerRef,
296
324
  id: disclosureWidgetId,
297
- sx: (_listRef$current2 = listRef.current) !== null && _listRef$current2 !== void 0 && _listRef$current2.clientWidth && listRef.current.clientWidth >= baseMenuMinWidth ? baseMenuStyles : menuStyles(containerRef.current, listRef.current),
298
325
  style: {
326
+ ...((_listRef$current2 = listRef.current) !== null && _listRef$current2 !== void 0 && _listRef$current2.clientWidth && listRef.current.clientWidth >= baseMenuMinWidth ? baseMenuInlineStyles : menuInlineStyles),
299
327
  display: isWidgetOpen ? 'block' : 'none'
300
328
  },
301
329
  children: menuItems.map((menuItem, index) => {
@@ -315,7 +343,7 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
315
343
  event, updateListAndMenu);
316
344
  }
317
345
  return /*#__PURE__*/jsx(ActionList.LinkItem, {
318
- sx: menuItemStyles,
346
+ style: menuItemStyles,
319
347
  onClick: event => {
320
348
  // When there are no items in the list, do not run the swap function as we want to keep everything in the menu.
321
349
  !onlyMenuVisible && swapMenuItemWithListItem(menuItem, index, event, updateListAndMenu);
@@ -344,4 +372,4 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
344
372
  });
345
373
  UnderlineNav.displayName = 'UnderlineNav';
346
374
 
347
- export { MORE_BTN_WIDTH, MoreMenuListItem, UnderlineNav, getValidChildren };
375
+ export { MORE_BTN_WIDTH, UnderlineNav, getValidChildren };
@@ -1,5 +1,5 @@
1
- import './UnderlineNav-78db938f.css';
1
+ import './UnderlineNav-4344d9b0.css';
2
2
 
3
- var classes = {"MenuItemContent":"prc-UnderlineNav-MenuItemContent-k4WNL"};
3
+ var classes = {"MenuItemContent":"prc-UnderlineNav-MenuItemContent-k4WNL","MoreButton":"prc-UnderlineNav-MoreButton-smema"};
4
4
 
5
5
  export { classes as default };
@@ -1,7 +1,5 @@
1
1
  import type React from 'react';
2
- import type { Theme } from '../ThemeProvider';
3
2
  export declare const UnderlineNavContext: React.Context<{
4
- theme: Theme | undefined;
5
3
  setChildrenWidth: React.Dispatch<{
6
4
  text: string;
7
5
  width: number;
@@ -1 +1 @@
1
- {"version":3,"file":"UnderlineNavContext.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNavContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAA;AAE3C,eAAO,MAAM,mBAAmB;WACvB,KAAK,GAAG,SAAS;sBACN,KAAK,CAAC,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;4BACvC,KAAK,CAAC,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;qBACpD,OAAO;kBACV,OAAO;EAOrB,CAAA"}
1
+ {"version":3,"file":"UnderlineNavContext.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNavContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,eAAO,MAAM,mBAAmB;sBACZ,KAAK,CAAC,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;4BACvC,KAAK,CAAC,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;qBACpD,OAAO;kBACV,OAAO;EAMrB,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { createContext } from 'react';
2
2
 
3
3
  const UnderlineNavContext = /*#__PURE__*/createContext({
4
- theme: {},
5
4
  setChildrenWidth: () => null,
6
5
  setNoIconChildrenWidth: () => null,
7
6
  loadingCounters: false,
@@ -1,6 +1,4 @@
1
- import type { Theme } from '../ThemeProvider';
2
- import type { BetterSystemStyleObject } from '../sx';
3
- export declare const getDividerStyle: (theme?: Theme) => {
1
+ export declare const dividerStyles: {
4
2
  display: string;
5
3
  borderLeft: string;
6
4
  width: string;
@@ -8,18 +6,6 @@ export declare const getDividerStyle: (theme?: Theme) => {
8
6
  marginRight: string;
9
7
  height: string;
10
8
  };
11
- export declare const moreBtnStyles: {
12
- margin: number;
13
- border: number;
14
- background: string;
15
- fontWeight: string;
16
- boxShadow: string;
17
- paddingY: number;
18
- paddingX: number;
19
- '& > span[data-component="trailingVisual"]': {
20
- marginLeft: number;
21
- };
22
- };
23
9
  export declare const menuItemStyles: {
24
10
  '& > span': {
25
11
  display: string;
@@ -27,12 +13,4 @@ export declare const menuItemStyles: {
27
13
  textDecoration: string;
28
14
  };
29
15
  export declare const baseMenuMinWidth = 192;
30
- export declare const baseMenuStyles: BetterSystemStyleObject;
31
- /**
32
- *
33
- * @param containerRef The Menu List Container Reference.
34
- * @param listRef The Underline Nav Container Reference.
35
- * @description This calculates the position of the menu
36
- */
37
- export declare const menuStyles: (containerRef: Element | null, listRef: Element | null) => BetterSystemStyleObject;
38
16
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,OAAO,CAAA;AAGlD,eAAO,MAAM,eAAe,GAAI,QAAQ,KAAK;;;;;;;CAO3C,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;CAYzB,CAAA;AAED,eAAO,MAAM,cAAc;;;;;CAO1B,CAAA;AAED,eAAO,MAAM,gBAAgB,MAAM,CAAA;AACnC,eAAO,MAAM,cAAc,EAAE,uBAY5B,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,cAAc,OAAO,GAAG,IAAI,EAAE,SAAS,OAAO,GAAG,IAAI,KAAG,uBASlF,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;CAOzB,CAAA;AAED,eAAO,MAAM,cAAc;;;;;CAO1B,CAAA;AAED,eAAO,MAAM,gBAAgB,MAAM,CAAA"}
@@ -1,25 +1,10 @@
1
- import { getAnchoredPosition } from '@primer/behaviors';
2
-
3
- const getDividerStyle = theme => ({
1
+ const dividerStyles = {
4
2
  display: 'inline-block',
5
3
  borderLeft: '1px solid',
6
4
  width: '1px',
7
- borderLeftColor: `${theme === null || theme === void 0 ? void 0 : theme.colors.border.muted}`,
8
- marginRight: '4px',
5
+ borderLeftColor: 'var(--borderColor-muted)',
6
+ marginRight: 'var(--base-size-4)',
9
7
  height: '24px' // The height of the divider - reference from Figma
10
- });
11
- const moreBtnStyles = {
12
- //set margin 0 here because safari puts extra margin around the button, rest is to reset style to make it look like a list element
13
- margin: 0,
14
- border: 0,
15
- background: 'transparent',
16
- fontWeight: 'normal',
17
- boxShadow: 'none',
18
- paddingY: 1,
19
- paddingX: 2,
20
- '& > span[data-component="trailingVisual"]': {
21
- marginLeft: 0
22
- }
23
8
  };
24
9
  const menuItemStyles = {
25
10
  // This is needed to hide the selected check icon on the menu item. https://github.com/primer/react/tree/main/packages/react/src/ActionList/Selection.tsx#L32
@@ -30,45 +15,5 @@ const menuItemStyles = {
30
15
  textDecoration: 'none'
31
16
  };
32
17
  const baseMenuMinWidth = 192;
33
- const baseMenuStyles = {
34
- position: 'absolute',
35
- zIndex: 1,
36
- top: '90%',
37
- boxShadow: '0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)',
38
- borderRadius: '12px',
39
- backgroundColor: 'canvas.overlay',
40
- listStyle: 'none',
41
- // Values are from ActionMenu
42
- minWidth: `${baseMenuMinWidth}px`,
43
- maxWidth: '640px',
44
- right: '0'
45
- };
46
-
47
- /**
48
- *
49
- * @param containerRef The Menu List Container Reference.
50
- * @param listRef The Underline Nav Container Reference.
51
- * @description This calculates the position of the menu
52
- */
53
- const menuStyles = (containerRef, listRef) => {
54
- if (containerRef && listRef) {
55
- const {
56
- left
57
- } = getAnchoredPosition(containerRef, listRef, {
58
- align: 'start',
59
- side: 'outside-bottom'
60
- });
61
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
62
- const {
63
- right,
64
- ...rest
65
- } = baseMenuStyles;
66
- return {
67
- ...rest,
68
- left
69
- };
70
- }
71
- return baseMenuStyles;
72
- };
73
18
 
74
- export { baseMenuMinWidth, baseMenuStyles, getDividerStyle, menuItemStyles, menuStyles, moreBtnStyles };
19
+ export { baseMenuMinWidth, dividerStyles, menuItemStyles };
package/dist/constants.js CHANGED
@@ -11,7 +11,7 @@ const get = key => themeGet(key, getKey(theme, key));
11
11
 
12
12
  // Common props
13
13
 
14
- const COMMON = compose(styledSystem.space, styledSystem.color, styledSystem.display);
14
+ compose(styledSystem.space, styledSystem.color, styledSystem.display);
15
15
  // Typography props
16
16
 
17
17
  const whiteSpace = system({
@@ -20,9 +20,9 @@ const whiteSpace = system({
20
20
  // cssProperty: 'whiteSpace',
21
21
  }
22
22
  });
23
- const TYPOGRAPHY = compose(styledSystem.typography, whiteSpace);
23
+ compose(styledSystem.typography, whiteSpace);
24
24
  // Border props
25
25
 
26
26
  compose(styledSystem.border, styledSystem.shadow);
27
27
 
28
- export { COMMON, TYPOGRAPHY, get };
28
+ export { get };
@@ -0,0 +1,2 @@
1
+ .prc-ActionList-Divider-e9gCq{background:var(--borderColor-muted,var(--color-border-muted));height:var(--borderWidth-thin,.0625rem);margin-bottom:var(--base-size-8,.5rem);margin-top:calc(var(--base-size-8,.5rem) - 1px)}
2
+ /*# sourceMappingURL=Divider-7c6b656a.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/deprecated/ActionList/Divider.module.css"],"names":[],"mappings":"AAAA,8BAGE,6DAAoC,CAFpC,uCAA+B,CAK/B,sCAAiC,CADjC,+CAEF","file":"Divider-7c6b656a.css","sourcesContent":[".Divider {\n height: var(--borderWidth-thin);\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n /* stylelint-disable-next-line primer/spacing */\n margin-top: calc(var(--base-size-8) - 1px);\n margin-bottom: var(--base-size-8);\n}\n"]}
@@ -1,6 +1,5 @@
1
- export declare const StyledDivider: import("styled-components").StyledComponent<"div", any, {}, never>;
2
1
  /**
3
- * Visually separates `Item`s or `Group`s in an `ActionList`.
2
+ * Visually separates `Items or `Groups in an `ActionList`.
4
3
  */
5
4
  export declare function Divider(): JSX.Element;
6
5
  export declare namespace Divider {
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/Divider.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,oEAKzB,CAAA;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,GAAG,CAAC,OAAO,CAErC;yBAFe,OAAO"}
1
+ {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/Divider.tsx"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,OAAO,IAAI,GAAG,CAAC,OAAO,CAErC;yBAFe,OAAO"}
@@ -1,21 +1,15 @@
1
1
  import { c } from 'react-compiler-runtime';
2
- import styled from 'styled-components';
3
- import { get } from '../../constants.js';
2
+ import classes from './Divider.module.css.js';
4
3
  import { jsx } from 'react/jsx-runtime';
5
4
 
6
- const StyledDivider = styled.div.withConfig({
7
- displayName: "Divider__StyledDivider",
8
- componentId: "sc-1s7tlfq-0"
9
- })(["height:1px;background:", ";margin-top:calc(", " - 1px);margin-bottom:", ";"], get('colors.border.muted'), get('space.2'), get('space.2'));
10
-
11
- /**
12
- * Visually separates `Item`s or `Group`s in an `ActionList`.
13
- */
14
5
  function Divider() {
15
6
  const $ = c(1);
16
7
  let t0;
17
8
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
18
- t0 = /*#__PURE__*/jsx(StyledDivider, {});
9
+ t0 = /*#__PURE__*/jsx("div", {
10
+ "data-component": "ActionList.Divider",
11
+ className: classes.Divider
12
+ });
19
13
  $[0] = t0;
20
14
  } else {
21
15
  t0 = $[0];
@@ -31,4 +25,4 @@ function Divider() {
31
25
  */
32
26
  Divider.renderItem = Divider;
33
27
 
34
- export { Divider, StyledDivider };
28
+ export { Divider };
@@ -0,0 +1,5 @@
1
+ import './Divider-7c6b656a.css';
2
+
3
+ var classes = {"Divider":"prc-ActionList-Divider-e9gCq"};
4
+
5
+ export { classes as default };
@@ -1,10 +1,9 @@
1
1
  import type React from 'react';
2
- import type { SxProp } from '../../sx';
3
2
  import type { HeaderProps } from './Header';
4
3
  /**
5
4
  * Contract for props passed to the `Group` component.
6
5
  */
7
- export interface GroupProps extends React.ComponentPropsWithoutRef<'div'>, SxProp {
6
+ export interface GroupProps extends React.ComponentPropsWithoutRef<'div'> {
8
7
  /**
9
8
  * Props for a `Header` to render in the `Group`.
10
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/Group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAEpC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAGzC;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM;IAC/E;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,CAAA;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAMD;;GAEG;AACH,wBAAgB,KAAK,CAAC,EAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAC,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAOxE"}
1
+ {"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/Group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAGzC;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACvE;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,CAAA;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,EAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAC,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAOxE"}
@@ -1,14 +1,7 @@
1
1
  import { c } from 'react-compiler-runtime';
2
- import styled from 'styled-components';
3
- import sx from '../../sx.js';
4
2
  import { Header } from './Header.js';
5
3
  import { jsx, jsxs } from 'react/jsx-runtime';
6
4
 
7
- const StyledGroup = styled.div.withConfig({
8
- displayName: "Group__StyledGroup",
9
- componentId: "sc-1s2aw76-0"
10
- })(["", ""], sx);
11
-
12
5
  /**
13
6
  * Collects related `Items` in an `ActionList`.
14
7
  */
@@ -44,7 +37,7 @@ function Group(t0) {
44
37
  }
45
38
  let t2;
46
39
  if ($[6] !== items || $[7] !== props || $[8] !== t1) {
47
- t2 = /*#__PURE__*/jsxs(StyledGroup, {
40
+ t2 = /*#__PURE__*/jsxs("div", {
48
41
  ...props,
49
42
  children: [t1, items]
50
43
  });
@@ -0,0 +1,2 @@
1
+ .prc-ActionList-Header-tbTgu{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-small,.75rem);font-weight:var(--text-title-weight-large,600);padding:6px var(--base-size-16,1rem)}.prc-ActionList-Header-tbTgu:where([data-filled]){background:var(--bgColor-muted,var(--color-canvas-subtle));border-bottom:var(--borderWidth-thin,.0625rem) solid var(--bgColor-neutral-muted,var(--color-neutral-subtle));border-top:var(--borderWidth-thin,.0625rem) solid var(--bgColor-neutral-muted,var(--color-neutral-subtle));margin:var(--base-size-8,.5rem) 0}.prc-ActionList-Header-tbTgu:where([data-filled]):first-child{margin-top:0}
2
+ /*# sourceMappingURL=Header-493b1d76.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/deprecated/ActionList/Header.module.css"],"names":[],"mappings":"AAAA,6BAUE,gDAA2B,CAF3B,4CAAsC,CACtC,8CAA2C,CAF3C,oCAiBF,CAZE,kDACE,0DAAgC,CAKhC,6GAAyE,CAFzE,0GAAsE,CAFtE,iCASF,CAHE,8DACE,YACF","file":"Header-493b1d76.css","sourcesContent":[".Header {\n /* 6px vertical padding + 20px line height = 32px total height\n *\n * TODO: When rem-based spacing on a 4px scale lands, replace\n * hardcoded '6px' with 'calc((${get('space.s32')} - ${get('space.20')}) / 2)'.\n */\n /* stylelint-disable-next-line primer/spacing */\n padding: 6px var(--base-size-16);\n font-size: var(--text-body-size-small);\n font-weight: var(--text-title-weight-large);\n color: var(--fgColor-muted);\n\n &:where([data-filled]) {\n background: var(--bgColor-muted);\n margin: var(--base-size-8) 0;\n /* stylelint-disable-next-line primer/colors */\n border-top: var(--borderWidth-thin) solid var(--bgColor-neutral-muted);\n /* stylelint-disable-next-line primer/colors */\n border-bottom: var(--borderWidth-thin) solid var(--bgColor-neutral-muted);\n\n &:first-child {\n margin-top: 0;\n }\n }\n}\n"]}
@@ -1,9 +1,8 @@
1
1
  import type React from 'react';
2
- import type { SxProp } from '../../sx';
3
2
  /**
4
3
  * Contract for props passed to the `Header` component.
5
4
  */
6
- export interface HeaderProps extends React.ComponentPropsWithoutRef<'div'>, SxProp {
5
+ export interface HeaderProps extends React.ComponentPropsWithoutRef<'div'> {
7
6
  /**
8
7
  * Style variations. Usage is discretionary.
9
8
  *
@@ -20,11 +19,8 @@ export interface HeaderProps extends React.ComponentPropsWithoutRef<'div'>, SxPr
20
19
  */
21
20
  auxiliaryText?: string;
22
21
  }
23
- export declare const StyledHeader: import("styled-components").StyledComponent<"div", any, {
24
- variant: HeaderProps["variant"];
25
- } & SxProp, never>;
26
22
  /**
27
23
  * Displays the name and description of a `Group`.
28
24
  */
29
- export declare function Header({ variant, title, auxiliaryText, children: _children, ...props }: HeaderProps): JSX.Element;
25
+ export declare function Header({ variant, title, auxiliaryText, children: _children, className, ...props }: HeaderProps): JSX.Element;
30
26
  //# sourceMappingURL=Header.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAGpC;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM;IAChF;;;;;OAKG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAE7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,eAAO,MAAM,YAAY;aAAwB,WAAW,CAAC,SAAS,CAAC;kBA2BtE,CAAA;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACrB,OAAkB,EAClB,KAAK,EACL,aAAa,EACb,QAAQ,EAAE,SAAS,EACnB,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAO3B"}
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACxE;;;;;OAKG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAE7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACrB,OAAkB,EAClB,KAAK,EACL,aAAa,EACb,QAAQ,EAAE,SAAS,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAa3B"}
@@ -1,22 +1,15 @@
1
1
  import { c } from 'react-compiler-runtime';
2
- import styled, { css } from 'styled-components';
3
- import { get } from '../../constants.js';
4
- import sx from '../../sx.js';
2
+ import { clsx } from 'clsx';
3
+ import classes from './Header.module.css.js';
5
4
  import { jsxs, jsx } from 'react/jsx-runtime';
6
5
 
7
- const StyledHeader = styled.div.withConfig({
8
- displayName: "Header__StyledHeader",
9
- componentId: "sc-cjezay-0"
10
- })(["{}padding:6px ", ";font-size:", ";font-weight:", ";color:", ";", " ", ""], get('space.3'), get('fontSizes.0'), get('fontWeights.bold'), get('colors.fg.muted'), ({
11
- variant
12
- }) => variant === 'filled' && css(["background:", ";margin:", " 0;border-top:1px solid ", ";border-bottom:1px solid ", ";&:first-child{margin-top:0;}"], get('colors.canvas.subtle'), get('space.2'), get('colors.neutral.muted'), get('colors.neutral.muted')), sx);
13
-
14
6
  /**
15
7
  * Displays the name and description of a `Group`.
16
8
  */
17
9
  function Header(t0) {
18
- const $ = c(12);
10
+ const $ = c(16);
19
11
  let auxiliaryText;
12
+ let className;
20
13
  let props;
21
14
  let t1;
22
15
  let title;
@@ -26,51 +19,67 @@ function Header(t0) {
26
19
  title: t3,
27
20
  auxiliaryText: t4,
28
21
  children: _children,
29
- ...t5
22
+ className: t5,
23
+ ...t6
30
24
  } = t0;
31
25
  t1 = t2;
32
26
  title = t3;
33
27
  auxiliaryText = t4;
34
- props = t5;
28
+ className = t5;
29
+ props = t6;
35
30
  $[0] = t0;
36
31
  $[1] = auxiliaryText;
37
- $[2] = props;
38
- $[3] = t1;
39
- $[4] = title;
32
+ $[2] = className;
33
+ $[3] = props;
34
+ $[4] = t1;
35
+ $[5] = title;
40
36
  } else {
41
37
  auxiliaryText = $[1];
42
- props = $[2];
43
- t1 = $[3];
44
- title = $[4];
38
+ className = $[2];
39
+ props = $[3];
40
+ t1 = $[4];
41
+ title = $[5];
45
42
  }
46
43
  const variant = t1 === undefined ? "subtle" : t1;
47
44
  let t2;
48
- if ($[5] !== auxiliaryText) {
49
- t2 = auxiliaryText && /*#__PURE__*/jsx("span", {
45
+ if ($[6] !== className) {
46
+ t2 = clsx(className, classes.Header);
47
+ $[6] = className;
48
+ $[7] = t2;
49
+ } else {
50
+ t2 = $[7];
51
+ }
52
+ const t3 = variant === "filled" ? "" : undefined;
53
+ let t4;
54
+ if ($[8] !== auxiliaryText) {
55
+ t4 = auxiliaryText && /*#__PURE__*/jsx("span", {
50
56
  children: auxiliaryText
51
57
  });
52
- $[5] = auxiliaryText;
53
- $[6] = t2;
58
+ $[8] = auxiliaryText;
59
+ $[9] = t4;
54
60
  } else {
55
- t2 = $[6];
61
+ t4 = $[9];
56
62
  }
57
- let t3;
58
- if ($[7] !== props || $[8] !== t2 || $[9] !== title || $[10] !== variant) {
59
- t3 = /*#__PURE__*/jsxs(StyledHeader, {
63
+ let t5;
64
+ if ($[10] !== props || $[11] !== t2 || $[12] !== t3 || $[13] !== t4 || $[14] !== title) {
65
+ t5 = /*#__PURE__*/jsxs("div", {
60
66
  role: "heading",
61
- variant: variant,
67
+ className: t2,
68
+ "data-filled": t3,
69
+ "data-component": "ActionList.Header",
62
70
  ...props,
63
- children: [title, t2]
71
+ children: [title, t4]
64
72
  });
65
- $[7] = props;
66
- $[8] = t2;
67
- $[9] = title;
68
- $[10] = variant;
69
- $[11] = t3;
73
+ $[10] = props;
74
+ $[11] = t2;
75
+ $[12] = t3;
76
+ $[13] = t4;
77
+ $[14] = title;
78
+ $[15] = t5;
70
79
  } else {
71
- t3 = $[11];
80
+ t5 = $[15];
72
81
  }
73
- return t3;
82
+ return t5;
74
83
  }
75
84
 
76
- export { Header, StyledHeader };
85
+ export { Header };
@@ -0,0 +1,5 @@
1
+ import './Header-493b1d76.css';
2
+
3
+ var classes = {"Header":"prc-ActionList-Header-tbTgu"};
4
+
5
+ export { classes as default };