@primer/react 38.0.0-rc.4 → 38.0.0-rc.5

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 (197) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/ActionList/Item.d.ts +47 -4
  3. package/dist/ActionList/Item.d.ts.map +1 -1
  4. package/dist/ActionList/Item.js +11 -3
  5. package/dist/ActionList/List.d.ts +23 -3
  6. package/dist/ActionList/List.d.ts.map +1 -1
  7. package/dist/ActionList/List.js +20 -13
  8. package/dist/ActionList/index.d.ts +67 -2
  9. package/dist/ActionList/index.d.ts.map +1 -1
  10. package/dist/ActionList/shared.d.ts +12 -6
  11. package/dist/ActionList/shared.d.ts.map +1 -1
  12. package/dist/ActionList/shared.js +3 -0
  13. package/dist/Autocomplete/Autocomplete.d.ts +1 -1
  14. package/dist/Autocomplete/AutocompleteMenu.d.ts.map +1 -1
  15. package/dist/Autocomplete/AutocompleteMenu.js +2 -2
  16. package/dist/Avatar/Avatar.d.ts +2 -3
  17. package/dist/Avatar/Avatar.d.ts.map +1 -1
  18. package/dist/Avatar/Avatar.js +38 -46
  19. package/dist/Breadcrumbs/Breadcrumbs.d.ts +15 -12
  20. package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  21. package/dist/Breadcrumbs/Breadcrumbs.js +35 -34
  22. package/dist/Button/ButtonBase.d.ts.map +1 -1
  23. package/dist/Button/ButtonBase.js +8 -4
  24. package/dist/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  25. package/dist/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
  26. package/dist/CheckboxGroup/index.d.ts +1 -1
  27. package/dist/CheckboxGroup/index.d.ts.map +1 -1
  28. package/dist/CircleBadge/CircleBadge-87549d20.css +2 -0
  29. package/dist/CircleBadge/CircleBadge-87549d20.css.map +1 -0
  30. package/dist/CircleBadge/CircleBadge.d.ts +14 -14
  31. package/dist/CircleBadge/CircleBadge.d.ts.map +1 -1
  32. package/dist/CircleBadge/CircleBadge.js +69 -13
  33. package/dist/CircleBadge/CircleBadge.module.css.js +5 -0
  34. package/dist/DataTable/{Table-87f4043f.css → Table-7f5cb3e4.css} +2 -2
  35. package/dist/DataTable/Table-7f5cb3e4.css.map +1 -0
  36. package/dist/DataTable/Table.js +1 -1
  37. package/dist/DataTable/Table.module.css.js +2 -2
  38. package/dist/Dialog/{Dialog-8a809d11.css → Dialog-1a61e61a.css} +2 -2
  39. package/dist/Dialog/Dialog-1a61e61a.css.map +1 -0
  40. package/dist/Dialog/Dialog.d.ts +6 -12
  41. package/dist/Dialog/Dialog.d.ts.map +1 -1
  42. package/dist/Dialog/Dialog.js +11 -26
  43. package/dist/Dialog/Dialog.module.css.js +2 -2
  44. package/dist/DialogV1/Dialog.d.ts +13 -11
  45. package/dist/DialogV1/Dialog.d.ts.map +1 -1
  46. package/dist/DialogV1/Dialog.js +71 -63
  47. package/dist/FormControl/FormControl.d.ts +6 -1
  48. package/dist/FormControl/FormControl.d.ts.map +1 -1
  49. package/dist/FormControl/FormControl.js +4 -1
  50. package/dist/FormControl/FormControlCaption.d.ts +2 -1
  51. package/dist/FormControl/FormControlCaption.d.ts.map +1 -1
  52. package/dist/FormControl/FormControlCaption.js +12 -9
  53. package/dist/FormControl/FormControlLabel.d.ts +1 -0
  54. package/dist/FormControl/FormControlLabel.d.ts.map +1 -1
  55. package/dist/FormControl/FormControlLeadingVisual.d.ts +3 -1
  56. package/dist/FormControl/FormControlLeadingVisual.d.ts.map +1 -1
  57. package/dist/FormControl/FormControlLeadingVisual.js +11 -8
  58. package/dist/FormControl/_FormControlValidation.d.ts +1 -0
  59. package/dist/FormControl/_FormControlValidation.d.ts.map +1 -1
  60. package/dist/FormControl/_FormControlValidation.js +11 -8
  61. package/dist/Heading/Heading.d.ts +4 -4
  62. package/dist/Heading/Heading.d.ts.map +1 -1
  63. package/dist/Heading/Heading.js +0 -11
  64. package/dist/KeybindingHint/components/Chord-81099645.css +2 -0
  65. package/dist/KeybindingHint/components/Chord-81099645.css.map +1 -0
  66. package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
  67. package/dist/KeybindingHint/components/Chord.js +44 -68
  68. package/dist/KeybindingHint/components/Chord.module.css.js +5 -0
  69. package/dist/Label/Label.d.ts +1 -3
  70. package/dist/Label/Label.d.ts.map +1 -1
  71. package/dist/Label/Label.js +37 -69
  72. package/dist/Label/index.d.ts +0 -1
  73. package/dist/Label/index.d.ts.map +1 -1
  74. package/dist/LabelGroup/LabelGroup-eda75c0f.css +2 -0
  75. package/dist/LabelGroup/LabelGroup-eda75c0f.css.map +1 -0
  76. package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
  77. package/dist/LabelGroup/LabelGroup.js +4 -10
  78. package/dist/LabelGroup/LabelGroup.module.css.js +5 -0
  79. package/dist/Link/Link-e01bdaee.css +2 -0
  80. package/dist/Link/Link-e01bdaee.css.map +1 -0
  81. package/dist/Link/Link.d.ts +11 -5
  82. package/dist/Link/Link.d.ts.map +1 -1
  83. package/dist/Link/Link.js +21 -29
  84. package/dist/Link/Link.module.css.js +1 -1
  85. package/dist/NavList/NavList-5dc067e3.css +2 -0
  86. package/dist/NavList/NavList-5dc067e3.css.map +1 -0
  87. package/dist/NavList/NavList.d.ts +4 -5
  88. package/dist/NavList/NavList.d.ts.map +1 -1
  89. package/dist/NavList/NavList.js +214 -420
  90. package/dist/NavList/NavList.module.css.js +5 -0
  91. package/dist/Overlay/Overlay.d.ts +1 -2
  92. package/dist/Overlay/Overlay.d.ts.map +1 -1
  93. package/dist/Overlay/Overlay.js +2 -3
  94. package/dist/Pagination/{Pagination-e98833e8.css → Pagination-1845feaa.css} +2 -2
  95. package/dist/Pagination/Pagination-1845feaa.css.map +1 -0
  96. package/dist/Pagination/Pagination.d.ts +1 -2
  97. package/dist/Pagination/Pagination.d.ts.map +1 -1
  98. package/dist/Pagination/Pagination.js +5 -13
  99. package/dist/Pagination/Pagination.module.css.js +1 -1
  100. package/dist/Placeholder.d.ts.map +1 -1
  101. package/dist/Popover/Popover.d.ts +0 -3
  102. package/dist/Popover/Popover.d.ts.map +1 -1
  103. package/dist/ScrollableRegion/ScrollableRegion-c1018dbe.css +2 -0
  104. package/dist/ScrollableRegion/ScrollableRegion-c1018dbe.css.map +1 -0
  105. package/dist/ScrollableRegion/ScrollableRegion.d.ts +1 -1
  106. package/dist/ScrollableRegion/ScrollableRegion.d.ts.map +1 -1
  107. package/dist/ScrollableRegion/ScrollableRegion.js +37 -31
  108. package/dist/ScrollableRegion/ScrollableRegion.module.css.js +5 -0
  109. package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
  110. package/dist/SelectPanel/SelectPanel.js +20 -1
  111. package/dist/Skeleton/SkeletonBox.js +2 -2
  112. package/dist/SkeletonAvatar/SkeletonAvatar.js +2 -2
  113. package/dist/StateLabel/{StateLabel-50420ff5.css → StateLabel-aaa1d148.css} +2 -2
  114. package/dist/StateLabel/{StateLabel-50420ff5.css.map → StateLabel-aaa1d148.css.map} +1 -1
  115. package/dist/StateLabel/StateLabel.module.css.js +1 -1
  116. package/dist/TabNav/TabNav.d.ts +4 -6
  117. package/dist/TabNav/TabNav.d.ts.map +1 -1
  118. package/dist/TabNav/TabNav.js +5 -7
  119. package/dist/Text/Text.d.ts +1 -2
  120. package/dist/Text/Text.d.ts.map +1 -1
  121. package/dist/Text/Text.js +1 -3
  122. package/dist/TextInput/TextInput.d.ts +1 -1
  123. package/dist/TextInputWithTokens/{TextInputWithTokens-fb9b5109.css → TextInputWithTokens-946ead3e.css} +2 -2
  124. package/dist/TextInputWithTokens/TextInputWithTokens-946ead3e.css.map +1 -0
  125. package/dist/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
  126. package/dist/TextInputWithTokens/TextInputWithTokens.js +6 -7
  127. package/dist/TextInputWithTokens/TextInputWithTokens.module.css.js +2 -2
  128. package/dist/ThemeProvider.js +3 -3
  129. package/dist/Token/Token.d.ts +1 -2
  130. package/dist/Token/Token.d.ts.map +1 -1
  131. package/dist/Token/TokenBase.d.ts +1 -2
  132. package/dist/Token/TokenBase.d.ts.map +1 -1
  133. package/dist/Token/TokenBase.js +64 -63
  134. package/dist/Token/_RemoveTokenButton.d.ts +1 -2
  135. package/dist/Token/_RemoveTokenButton.d.ts.map +1 -1
  136. package/dist/Token/_RemoveTokenButton.js +38 -104
  137. package/dist/Token/_TokenTextContainer.d.ts +1 -1
  138. package/dist/Token/_TokenTextContainer.d.ts.map +1 -1
  139. package/dist/Token/_TokenTextContainer.js +40 -20
  140. package/dist/Tooltip/Tooltip.d.ts +1 -2
  141. package/dist/Tooltip/Tooltip.d.ts.map +1 -1
  142. package/dist/Tooltip/Tooltip.js +1 -2
  143. package/dist/TooltipV2/Tooltip.d.ts +16 -3
  144. package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
  145. package/dist/TooltipV2/Tooltip.js +15 -5
  146. package/dist/UnderlineNav/UnderlineNav.js +2 -2
  147. package/dist/_VisuallyHidden.d.ts +5 -5
  148. package/dist/_VisuallyHidden.d.ts.map +1 -1
  149. package/dist/_VisuallyHidden.js +30 -32
  150. package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts +1 -2
  151. package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
  152. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +28 -13
  153. package/dist/hooks/useMnemonics.d.ts +1 -0
  154. package/dist/hooks/useMnemonics.d.ts.map +1 -1
  155. package/dist/hooks/useMnemonics.js +99 -57
  156. package/dist/index.d.ts +2 -1
  157. package/dist/index.d.ts.map +1 -1
  158. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -3
  159. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts +1 -2
  160. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts.map +1 -1
  161. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +1 -3
  162. package/dist/internal/components/ConditionalWrapper.d.ts +2 -3
  163. package/dist/internal/components/ConditionalWrapper.d.ts.map +1 -1
  164. package/dist/internal/components/ConditionalWrapper.js +21 -18
  165. package/dist/internal/components/{InputValidation-057236a4.css → InputValidation-dddeaafd.css} +2 -2
  166. package/dist/internal/components/{InputValidation-057236a4.css.map → InputValidation-dddeaafd.css.map} +1 -1
  167. package/dist/internal/components/InputValidation.d.ts +1 -0
  168. package/dist/internal/components/InputValidation.d.ts.map +1 -1
  169. package/dist/internal/components/InputValidation.js +4 -4
  170. package/dist/internal/components/InputValidation.module.css.js +1 -1
  171. package/dist/internal/components/TextInputInnerAction.d.ts +1 -1
  172. package/dist/internal/components/UnderlineTabbedInterface.d.ts +11 -12
  173. package/dist/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
  174. package/dist/internal/components/UnderlineTabbedInterface.js +68 -63
  175. package/dist/internal/components/ValidationAnimationContainer.d.ts.map +1 -1
  176. package/dist/internal/components/ValidationAnimationContainer.js +5 -4
  177. package/dist/live-region/Announce.d.ts +2 -2
  178. package/dist/live-region/Announce.d.ts.map +1 -1
  179. package/dist/live-region/AriaAlert.d.ts +3 -3
  180. package/dist/live-region/AriaAlert.d.ts.map +1 -1
  181. package/dist/live-region/AriaAlert.js +14 -33
  182. package/dist/live-region/AriaStatus.d.ts +3 -3
  183. package/dist/live-region/AriaStatus.d.ts.map +1 -1
  184. package/dist/live-region/AriaStatus.js +14 -33
  185. package/dist/utils/modern-polymorphic.d.ts +22 -0
  186. package/dist/utils/modern-polymorphic.d.ts.map +1 -0
  187. package/dist/utils/modern-polymorphic.js +26 -0
  188. package/generated/components.json +4 -98
  189. package/package.json +7 -7
  190. package/dist/DataTable/Table-87f4043f.css.map +0 -1
  191. package/dist/Dialog/Dialog-8a809d11.css.map +0 -1
  192. package/dist/Link/Link-948b910e.css +0 -2
  193. package/dist/Link/Link-948b910e.css.map +0 -1
  194. package/dist/Pagination/Pagination-e98833e8.css.map +0 -1
  195. package/dist/TextInputWithTokens/TextInputWithTokens-fb9b5109.css.map +0 -1
  196. package/dist/utils/polymorphic2.d.ts +0 -16
  197. package/dist/utils/polymorphic2.d.ts.map +0 -1
@@ -1,19 +1,16 @@
1
1
  import { c } from 'react-compiler-runtime';
2
2
  import { PlusIcon, ChevronDownIcon } from '@primer/octicons-react';
3
3
  import React, { createElement, isValidElement } from 'react';
4
+ import { clsx } from 'clsx';
4
5
  import { ActionList } from '../ActionList/index.js';
5
6
  import { SubItem } from '../ActionList/Item.js';
6
7
  import { ActionListContainerContext } from '../ActionList/ActionListContainerContext.js';
7
- import '@styled-system/css';
8
- import merge from 'deepmerge';
9
- import { defaultSxProp } from '../utils/defaultSxProp.js';
10
8
  import { useId } from '../hooks/useId.js';
11
9
  import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
12
10
  import classes from '../ActionList/ActionList.module.css.js';
11
+ import navListClasses from './NavList.module.css.js';
13
12
  import { flushSync } from 'react-dom';
14
- import { BoxWithFallback } from '../internal/components/BoxWithFallback.js';
15
13
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
16
- import Box from '../Box/Box.js';
17
14
 
18
15
  const Root = /*#__PURE__*/React.forwardRef((t0, ref) => {
19
16
  const $ = c(10);
@@ -55,8 +52,7 @@ const Root = /*#__PURE__*/React.forwardRef((t0, ref) => {
55
52
  }
56
53
  let t3;
57
54
  if ($[6] !== props || $[7] !== ref || $[8] !== t2) {
58
- t3 = /*#__PURE__*/jsx(BoxWithFallback, {
59
- as: "nav",
55
+ t3 = /*#__PURE__*/jsx("nav", {
60
56
  ...props,
61
57
  ref: ref,
62
58
  children: t2
@@ -76,18 +72,16 @@ Root.displayName = 'NavList';
76
72
  // NavList.Item
77
73
 
78
74
  const Item = /*#__PURE__*/React.forwardRef((t0, ref) => {
79
- const $ = c(31);
75
+ const $ = c(29);
80
76
  let ariaCurrent;
81
77
  let children;
82
78
  let defaultOpen;
83
79
  let props;
84
- let t1;
85
80
  if ($[0] !== t0) {
86
81
  ({
87
82
  "aria-current": ariaCurrent,
88
83
  children,
89
84
  defaultOpen,
90
- sx: t1,
91
85
  ...props
92
86
  } = t0);
93
87
  $[0] = t0;
@@ -95,113 +89,108 @@ const Item = /*#__PURE__*/React.forwardRef((t0, ref) => {
95
89
  $[2] = children;
96
90
  $[3] = defaultOpen;
97
91
  $[4] = props;
98
- $[5] = t1;
99
92
  } else {
100
93
  ariaCurrent = $[1];
101
94
  children = $[2];
102
95
  defaultOpen = $[3];
103
96
  props = $[4];
104
- t1 = $[5];
105
97
  }
106
- const sxProp = t1 === undefined ? defaultSxProp : t1;
107
98
  const {
108
99
  depth
109
100
  } = React.useContext(SubNavContext);
110
101
  let childrenWithoutSubNavOrTrailingAction;
111
102
  let subNav;
112
- let t2;
113
- if ($[6] !== children || $[7] !== defaultOpen) {
103
+ let t1;
104
+ if ($[5] !== children || $[6] !== defaultOpen) {
114
105
  subNav = React.Children.toArray(children).find(_temp);
115
- let t3;
116
- if ($[11] !== children) {
117
- t3 = React.Children.toArray(children).filter(_temp2);
118
- $[11] = children;
119
- $[12] = t3;
106
+ let t2;
107
+ if ($[10] !== children) {
108
+ t2 = React.Children.toArray(children).filter(_temp2);
109
+ $[10] = children;
110
+ $[11] = t2;
120
111
  } else {
121
- t3 = $[12];
112
+ t2 = $[11];
122
113
  }
123
- childrenWithoutSubNavOrTrailingAction = t3;
114
+ childrenWithoutSubNavOrTrailingAction = t2;
124
115
  if (! /*#__PURE__*/isValidElement(subNav) && defaultOpen) {
125
116
  console.error("NavList.Item must have a NavList.SubNav to use defaultOpen.");
126
117
  }
127
- t2 = subNav && /*#__PURE__*/isValidElement(subNav);
128
- $[6] = children;
129
- $[7] = defaultOpen;
130
- $[8] = childrenWithoutSubNavOrTrailingAction;
131
- $[9] = subNav;
132
- $[10] = t2;
118
+ t1 = subNav && /*#__PURE__*/isValidElement(subNav);
119
+ $[5] = children;
120
+ $[6] = defaultOpen;
121
+ $[7] = childrenWithoutSubNavOrTrailingAction;
122
+ $[8] = subNav;
123
+ $[9] = t1;
133
124
  } else {
134
- childrenWithoutSubNavOrTrailingAction = $[8];
135
- subNav = $[9];
136
- t2 = $[10];
137
- }
138
- if (t2) {
139
- let t3;
140
- if ($[13] !== depth) {
141
- t3 = {
125
+ childrenWithoutSubNavOrTrailingAction = $[7];
126
+ subNav = $[8];
127
+ t1 = $[9];
128
+ }
129
+ if (t1) {
130
+ let t2;
131
+ if ($[12] !== depth) {
132
+ t2 = {
142
133
  "--subitem-depth": depth
143
134
  };
144
- $[13] = depth;
145
- $[14] = t3;
135
+ $[12] = depth;
136
+ $[13] = t2;
146
137
  } else {
147
- t3 = $[14];
138
+ t2 = $[13];
148
139
  }
149
- const t4 = t3;
150
- let t5;
151
- if ($[15] !== childrenWithoutSubNavOrTrailingAction || $[16] !== defaultOpen || $[17] !== depth || $[18] !== subNav || $[19] !== sxProp || $[20] !== t4) {
152
- t5 = /*#__PURE__*/jsx(ItemWithSubNav, {
140
+ const t3 = t2;
141
+ let t4;
142
+ if ($[14] !== childrenWithoutSubNavOrTrailingAction || $[15] !== defaultOpen || $[16] !== depth || $[17] !== subNav || $[18] !== t3) {
143
+ t4 = /*#__PURE__*/jsx(ItemWithSubNav, {
153
144
  subNav: subNav,
154
145
  depth: depth,
155
146
  defaultOpen: defaultOpen,
156
- sx: sxProp,
157
- style: t4,
147
+ style: t3,
158
148
  children: childrenWithoutSubNavOrTrailingAction
159
149
  });
160
- $[15] = childrenWithoutSubNavOrTrailingAction;
161
- $[16] = defaultOpen;
162
- $[17] = depth;
163
- $[18] = subNav;
164
- $[19] = sxProp;
165
- $[20] = t4;
166
- $[21] = t5;
150
+ $[14] = childrenWithoutSubNavOrTrailingAction;
151
+ $[15] = defaultOpen;
152
+ $[16] = depth;
153
+ $[17] = subNav;
154
+ $[18] = t3;
155
+ $[19] = t4;
167
156
  } else {
168
- t5 = $[21];
157
+ t4 = $[19];
169
158
  }
170
- return t5;
159
+ return t4;
171
160
  }
172
- const t3 = Boolean(ariaCurrent) && ariaCurrent !== "false";
173
- let t4;
174
- if ($[22] !== depth) {
175
- t4 = {
161
+ const t2 = Boolean(ariaCurrent) && ariaCurrent !== "false";
162
+ let t3;
163
+ if ($[20] !== depth) {
164
+ t3 = {
176
165
  "--subitem-depth": depth
177
166
  };
178
- $[22] = depth;
179
- $[23] = t4;
167
+ $[20] = depth;
168
+ $[21] = t3;
180
169
  } else {
181
- t4 = $[23];
170
+ t3 = $[21];
182
171
  }
183
- const t5 = t4;
184
- let t6;
185
- if ($[24] !== ariaCurrent || $[25] !== children || $[26] !== props || $[27] !== ref || $[28] !== t3 || $[29] !== t5) {
186
- t6 = /*#__PURE__*/jsx(ActionList.LinkItem, {
172
+ const t4 = t3;
173
+ let t5;
174
+ if ($[22] !== ariaCurrent || $[23] !== children || $[24] !== props || $[25] !== ref || $[26] !== t2 || $[27] !== t4) {
175
+ t5 = /*#__PURE__*/jsx(ActionList.LinkItem, {
187
176
  ref: ref,
188
177
  "aria-current": ariaCurrent,
189
- active: t3,
190
- style: t5,
178
+ active: t2,
179
+ style: t4,
191
180
  ...props,
192
181
  children: children
193
182
  });
194
- $[24] = ariaCurrent;
195
- $[25] = children;
196
- $[26] = props;
197
- $[27] = ref;
198
- $[28] = t3;
199
- $[29] = t5;
200
- $[30] = t6;
183
+ $[22] = ariaCurrent;
184
+ $[23] = children;
185
+ $[24] = props;
186
+ $[25] = ref;
187
+ $[26] = t2;
188
+ $[27] = t4;
189
+ $[28] = t5;
201
190
  } else {
202
- t6 = $[30];
191
+ t5 = $[28];
203
192
  }
204
- return t6;
193
+ return t5;
205
194
  });
206
195
  Item.displayName = 'NavList.Item';
207
196
 
@@ -215,23 +204,21 @@ const ItemWithSubNavContext = /*#__PURE__*/React.createContext({
215
204
  });
216
205
  function ItemWithSubNav(t0) {
217
206
  var _ref;
218
- const $ = c(49);
207
+ const $ = c(26);
219
208
  const {
220
209
  children,
221
210
  subNav,
222
211
  defaultOpen,
223
- style,
224
- sx: t1
212
+ style
225
213
  } = t0;
226
- const sxProp = t1 === undefined ? defaultSxProp : t1;
227
214
  const buttonId = useId();
228
215
  const subNavId = useId();
229
216
  const [isOpen, setIsOpen] = React.useState((_ref = defaultOpen || null) !== null && _ref !== void 0 ? _ref : false);
230
217
  const subNavRef = React.useRef(null);
231
218
  const [containsCurrentItem, setContainsCurrentItem] = React.useState(false);
232
- let t2;
219
+ let t1;
233
220
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
234
- t2 = () => {
221
+ t1 = () => {
235
222
  if (subNavRef.current) {
236
223
  const currentItem = subNavRef.current.querySelector("[aria-current]:not([aria-current=false])");
237
224
  if (currentItem) {
@@ -240,221 +227,119 @@ function ItemWithSubNav(t0) {
240
227
  }
241
228
  }
242
229
  };
243
- $[0] = t2;
230
+ $[0] = t1;
244
231
  } else {
245
- t2 = $[0];
232
+ t1 = $[0];
246
233
  }
247
- let t3;
234
+ let t2;
248
235
  if ($[1] !== buttonId || $[2] !== subNav) {
249
- t3 = [subNav, buttonId];
236
+ t2 = [subNav, buttonId];
250
237
  $[1] = buttonId;
251
238
  $[2] = subNav;
252
- $[3] = t3;
239
+ $[3] = t2;
253
240
  } else {
254
- t3 = $[3];
255
- }
256
- useIsomorphicLayoutEffect(t2, t3);
257
- if (sxProp !== defaultSxProp) {
258
- let t4;
259
- if ($[4] !== buttonId || $[5] !== isOpen || $[6] !== subNavId) {
260
- t4 = {
261
- buttonId,
262
- subNavId,
263
- isOpen
264
- };
265
- $[4] = buttonId;
266
- $[5] = isOpen;
267
- $[6] = subNavId;
268
- $[7] = t4;
269
- } else {
270
- t4 = $[7];
271
- }
272
- const t5 = !isOpen && containsCurrentItem;
273
- let t6;
274
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
275
- t6 = () => setIsOpen(_temp3);
276
- $[8] = t6;
277
- } else {
278
- t6 = $[8];
279
- }
280
- let t7;
281
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
282
- t7 = /*#__PURE__*/jsx(ActionList.TrailingVisual, {
283
- children: /*#__PURE__*/jsx(ChevronDownIcon, {
284
- className: classes.ExpandIcon
285
- })
286
- });
287
- $[9] = t7;
288
- } else {
289
- t7 = $[9];
290
- }
291
- let t8;
292
- if ($[10] !== subNav) {
293
- let t9;
294
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
295
- t9 = {
296
- ref: subNavRef
297
- };
298
- $[12] = t9;
299
- } else {
300
- t9 = $[12];
301
- }
302
- t8 = /*#__PURE__*/React.cloneElement(subNav, t9);
303
- $[10] = subNav;
304
- $[11] = t8;
305
- } else {
306
- t8 = $[11];
307
- }
308
- let t9;
309
- if ($[13] !== t8) {
310
- t9 = /*#__PURE__*/jsx(SubItem, {
311
- children: t8
312
- });
313
- $[13] = t8;
314
- $[14] = t9;
315
- } else {
316
- t9 = $[14];
317
- }
318
- let t10;
319
- if ($[15] !== buttonId || $[16] !== children || $[17] !== isOpen || $[18] !== style || $[19] !== subNavId || $[20] !== sxProp || $[21] !== t5 || $[22] !== t9) {
320
- t10 = /*#__PURE__*/jsxs(ActionList.Item, {
321
- id: buttonId,
322
- "aria-expanded": isOpen,
323
- "aria-controls": subNavId,
324
- active: t5,
325
- onSelect: t6,
326
- style: style,
327
- sx: sxProp,
328
- children: [children, t7, t9]
329
- });
330
- $[15] = buttonId;
331
- $[16] = children;
332
- $[17] = isOpen;
333
- $[18] = style;
334
- $[19] = subNavId;
335
- $[20] = sxProp;
336
- $[21] = t5;
337
- $[22] = t9;
338
- $[23] = t10;
339
- } else {
340
- t10 = $[23];
341
- }
342
- let t11;
343
- if ($[24] !== t10 || $[25] !== t4) {
344
- t11 = /*#__PURE__*/jsx(ItemWithSubNavContext.Provider, {
345
- value: t4,
346
- children: t10
347
- });
348
- $[24] = t10;
349
- $[25] = t4;
350
- $[26] = t11;
351
- } else {
352
- t11 = $[26];
353
- }
354
- return t11;
241
+ t2 = $[3];
355
242
  }
356
- let t4;
357
- if ($[27] !== buttonId || $[28] !== isOpen || $[29] !== subNavId) {
358
- t4 = {
243
+ useIsomorphicLayoutEffect(t1, t2);
244
+ let t3;
245
+ if ($[4] !== buttonId || $[5] !== isOpen || $[6] !== subNavId) {
246
+ t3 = {
359
247
  buttonId,
360
248
  subNavId,
361
249
  isOpen
362
250
  };
363
- $[27] = buttonId;
364
- $[28] = isOpen;
365
- $[29] = subNavId;
366
- $[30] = t4;
251
+ $[4] = buttonId;
252
+ $[5] = isOpen;
253
+ $[6] = subNavId;
254
+ $[7] = t3;
367
255
  } else {
368
- t4 = $[30];
256
+ t3 = $[7];
369
257
  }
370
- const t5 = !isOpen && containsCurrentItem;
371
- let t6;
372
- if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
373
- t6 = () => setIsOpen(_temp4);
374
- $[31] = t6;
258
+ const t4 = !isOpen && containsCurrentItem;
259
+ let t5;
260
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
261
+ t5 = () => setIsOpen(_temp3);
262
+ $[8] = t5;
375
263
  } else {
376
- t6 = $[31];
264
+ t5 = $[8];
377
265
  }
378
- let t7;
379
- if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
380
- t7 = /*#__PURE__*/jsx(ActionList.TrailingVisual, {
266
+ let t6;
267
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
268
+ t6 = /*#__PURE__*/jsx(ActionList.TrailingVisual, {
381
269
  children: /*#__PURE__*/jsx(ChevronDownIcon, {
382
270
  className: classes.ExpandIcon
383
271
  })
384
272
  });
385
- $[32] = t7;
273
+ $[9] = t6;
386
274
  } else {
387
- t7 = $[32];
275
+ t6 = $[9];
388
276
  }
389
- let t8;
390
- if ($[33] !== subNav) {
391
- let t9;
392
- if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
393
- t9 = {
277
+ let t7;
278
+ if ($[10] !== subNav) {
279
+ let t8;
280
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
281
+ t8 = {
394
282
  ref: subNavRef
395
283
  };
396
- $[35] = t9;
284
+ $[12] = t8;
397
285
  } else {
398
- t9 = $[35];
286
+ t8 = $[12];
399
287
  }
400
- t8 = /*#__PURE__*/React.cloneElement(subNav, t9);
401
- $[33] = subNav;
402
- $[34] = t8;
288
+ t7 = /*#__PURE__*/React.cloneElement(subNav, t8);
289
+ $[10] = subNav;
290
+ $[11] = t7;
403
291
  } else {
404
- t8 = $[34];
292
+ t7 = $[11];
405
293
  }
406
- let t9;
407
- if ($[36] !== t8) {
408
- t9 = /*#__PURE__*/jsx(SubItem, {
409
- children: t8
294
+ let t8;
295
+ if ($[13] !== t7) {
296
+ t8 = /*#__PURE__*/jsx(SubItem, {
297
+ children: t7
410
298
  });
411
- $[36] = t8;
412
- $[37] = t9;
299
+ $[13] = t7;
300
+ $[14] = t8;
413
301
  } else {
414
- t9 = $[37];
302
+ t8 = $[14];
415
303
  }
416
- let t10;
417
- if ($[38] !== buttonId || $[39] !== children || $[40] !== isOpen || $[41] !== style || $[42] !== subNavId || $[43] !== t5 || $[44] !== t9) {
418
- t10 = /*#__PURE__*/jsxs(ActionList.Item, {
304
+ let t9;
305
+ if ($[15] !== buttonId || $[16] !== children || $[17] !== isOpen || $[18] !== style || $[19] !== subNavId || $[20] !== t4 || $[21] !== t8) {
306
+ t9 = /*#__PURE__*/jsxs(ActionList.Item, {
419
307
  id: buttonId,
420
308
  "aria-expanded": isOpen,
421
309
  "aria-controls": subNavId,
422
- active: t5,
423
- onSelect: t6,
310
+ active: t4,
311
+ onSelect: t5,
424
312
  style: style,
425
- children: [children, t7, t9]
313
+ children: [children, t6, t8]
426
314
  });
427
- $[38] = buttonId;
428
- $[39] = children;
429
- $[40] = isOpen;
430
- $[41] = style;
431
- $[42] = subNavId;
432
- $[43] = t5;
433
- $[44] = t9;
434
- $[45] = t10;
315
+ $[15] = buttonId;
316
+ $[16] = children;
317
+ $[17] = isOpen;
318
+ $[18] = style;
319
+ $[19] = subNavId;
320
+ $[20] = t4;
321
+ $[21] = t8;
322
+ $[22] = t9;
435
323
  } else {
436
- t10 = $[45];
324
+ t9 = $[22];
437
325
  }
438
- let t11;
439
- if ($[46] !== t10 || $[47] !== t4) {
440
- t11 = /*#__PURE__*/jsx(ItemWithSubNavContext.Provider, {
441
- value: t4,
442
- children: t10
326
+ let t10;
327
+ if ($[23] !== t3 || $[24] !== t9) {
328
+ t10 = /*#__PURE__*/jsx(ItemWithSubNavContext.Provider, {
329
+ value: t3,
330
+ children: t9
443
331
  });
444
- $[46] = t10;
445
- $[47] = t4;
446
- $[48] = t11;
332
+ $[23] = t3;
333
+ $[24] = t9;
334
+ $[25] = t10;
447
335
  } else {
448
- t11 = $[48];
336
+ t10 = $[25];
449
337
  }
450
- return t11;
338
+ return t10;
451
339
  }
452
340
 
453
341
  // ----------------------------------------------------------------------------
454
342
  // NavList.SubNav
455
- function _temp4(open_0) {
456
- return !open_0;
457
- }
458
343
  function _temp3(open) {
459
344
  return !open;
460
345
  }
@@ -464,12 +349,10 @@ const SubNavContext = /*#__PURE__*/React.createContext({
464
349
 
465
350
  // NOTE: SubNav must be a direct child of an Item
466
351
  const SubNav = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
467
- const $ = c(21);
352
+ const $ = c(10);
468
353
  const {
469
- children,
470
- sx: t1
354
+ children
471
355
  } = t0;
472
- const sxProp = t1 === undefined ? defaultSxProp : t1;
473
356
  const {
474
357
  buttonId,
475
358
  subNavId
@@ -484,93 +367,47 @@ const SubNav = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
484
367
  console.error("NavList.SubNav only supports four levels of nesting");
485
368
  return null;
486
369
  }
487
- if (sxProp !== defaultSxProp) {
488
- const t2 = depth + 1;
489
- let t3;
490
- if ($[0] !== t2) {
491
- t3 = {
492
- depth: t2
493
- };
494
- $[0] = t2;
495
- $[1] = t3;
496
- } else {
497
- t3 = $[1];
498
- }
499
- let t4;
500
- if ($[2] !== buttonId || $[3] !== children || $[4] !== forwardedRef || $[5] !== subNavId || $[6] !== sxProp) {
501
- t4 = /*#__PURE__*/jsx(Box, {
502
- as: "ul",
503
- id: subNavId,
504
- "aria-labelledby": buttonId,
505
- className: classes.SubGroup,
506
- ref: forwardedRef,
507
- sx: sxProp,
508
- children: children
509
- });
510
- $[2] = buttonId;
511
- $[3] = children;
512
- $[4] = forwardedRef;
513
- $[5] = subNavId;
514
- $[6] = sxProp;
515
- $[7] = t4;
516
- } else {
517
- t4 = $[7];
518
- }
519
- let t5;
520
- if ($[8] !== t3 || $[9] !== t4) {
521
- t5 = /*#__PURE__*/jsx(SubNavContext.Provider, {
522
- value: t3,
523
- children: t4
524
- });
525
- $[8] = t3;
526
- $[9] = t4;
527
- $[10] = t5;
528
- } else {
529
- t5 = $[10];
530
- }
531
- return t5;
532
- }
533
- const t2 = depth + 1;
534
- let t3;
535
- if ($[11] !== t2) {
536
- t3 = {
537
- depth: t2
370
+ const t1 = depth + 1;
371
+ let t2;
372
+ if ($[0] !== t1) {
373
+ t2 = {
374
+ depth: t1
538
375
  };
539
- $[11] = t2;
540
- $[12] = t3;
376
+ $[0] = t1;
377
+ $[1] = t2;
541
378
  } else {
542
- t3 = $[12];
379
+ t2 = $[1];
543
380
  }
544
- let t4;
545
- if ($[13] !== buttonId || $[14] !== children || $[15] !== forwardedRef || $[16] !== subNavId) {
546
- t4 = /*#__PURE__*/jsx("ul", {
381
+ let t3;
382
+ if ($[2] !== buttonId || $[3] !== children || $[4] !== forwardedRef || $[5] !== subNavId) {
383
+ t3 = /*#__PURE__*/jsx("ul", {
547
384
  className: classes.SubGroup,
548
385
  id: subNavId,
549
386
  "aria-labelledby": buttonId,
550
387
  ref: forwardedRef,
551
388
  children: children
552
389
  });
553
- $[13] = buttonId;
554
- $[14] = children;
555
- $[15] = forwardedRef;
556
- $[16] = subNavId;
557
- $[17] = t4;
390
+ $[2] = buttonId;
391
+ $[3] = children;
392
+ $[4] = forwardedRef;
393
+ $[5] = subNavId;
394
+ $[6] = t3;
558
395
  } else {
559
- t4 = $[17];
396
+ t3 = $[6];
560
397
  }
561
- let t5;
562
- if ($[18] !== t3 || $[19] !== t4) {
563
- t5 = /*#__PURE__*/jsx(SubNavContext.Provider, {
564
- value: t3,
565
- children: t4
398
+ let t4;
399
+ if ($[7] !== t2 || $[8] !== t3) {
400
+ t4 = /*#__PURE__*/jsx(SubNavContext.Provider, {
401
+ value: t2,
402
+ children: t3
566
403
  });
567
- $[18] = t3;
568
- $[19] = t4;
569
- $[20] = t5;
404
+ $[7] = t2;
405
+ $[8] = t3;
406
+ $[9] = t4;
570
407
  } else {
571
- t5 = $[20];
408
+ t4 = $[9];
572
409
  }
573
- return t5;
410
+ return t4;
574
411
  });
575
412
  SubNav.displayName = 'NavList.SubNav';
576
413
 
@@ -600,95 +437,61 @@ TrailingAction.displayName = 'NavList.TrailingAction';
600
437
  // ----------------------------------------------------------------------------
601
438
  // NavList.Group
602
439
 
603
- const defaultSx = {};
604
440
  const Group = t0 => {
605
- const $ = c(18);
441
+ const $ = c(11);
606
442
  let children;
607
443
  let props;
608
- let t1;
609
444
  let title;
610
445
  if ($[0] !== t0) {
611
446
  ({
612
447
  title,
613
448
  children,
614
- sx: t1,
615
449
  ...props
616
450
  } = t0);
617
451
  $[0] = t0;
618
452
  $[1] = children;
619
453
  $[2] = props;
620
- $[3] = t1;
621
- $[4] = title;
454
+ $[3] = title;
622
455
  } else {
623
456
  children = $[1];
624
457
  props = $[2];
625
- t1 = $[3];
626
- title = $[4];
627
- }
628
- const sxProp = t1 === undefined ? defaultSx : t1;
629
- if (sxProp !== defaultSx) {
630
- let t2;
631
- if ($[5] !== title) {
632
- t2 = title ? /*#__PURE__*/jsx(ActionList.GroupHeading, {
633
- children: title
634
- }) : null;
635
- $[5] = title;
636
- $[6] = t2;
637
- } else {
638
- t2 = $[6];
639
- }
640
- let t3;
641
- if ($[7] !== children || $[8] !== sxProp || $[9] !== t2) {
642
- t3 = /*#__PURE__*/jsxs(Box, {
643
- sx: sxProp,
644
- as: "li",
645
- "data-component": "ActionList.Group",
646
- children: [t2, children]
647
- });
648
- $[7] = children;
649
- $[8] = sxProp;
650
- $[9] = t2;
651
- $[10] = t3;
652
- } else {
653
- t3 = $[10];
654
- }
655
- return t3;
458
+ title = $[3];
656
459
  }
657
- let t2;
658
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
659
- t2 = /*#__PURE__*/jsx(ActionList.Divider, {});
660
- $[11] = t2;
460
+ let t1;
461
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
462
+ t1 = /*#__PURE__*/jsx(ActionList.Divider, {});
463
+ $[4] = t1;
661
464
  } else {
662
- t2 = $[11];
465
+ t1 = $[4];
663
466
  }
664
- let t3;
665
- if ($[12] !== title) {
666
- t3 = title ? /*#__PURE__*/jsx(ActionList.GroupHeading, {
467
+ let t2;
468
+ if ($[5] !== title) {
469
+ t2 = title ? /*#__PURE__*/jsx(ActionList.GroupHeading, {
667
470
  as: "h3",
668
471
  "data-component": "ActionList.GroupHeading",
669
472
  children: title
670
473
  }) : null;
671
- $[12] = title;
672
- $[13] = t3;
474
+ $[5] = title;
475
+ $[6] = t2;
673
476
  } else {
674
- t3 = $[13];
477
+ t2 = $[6];
675
478
  }
676
- let t4;
677
- if ($[14] !== children || $[15] !== props || $[16] !== t3) {
678
- t4 = /*#__PURE__*/jsxs(Fragment, {
679
- children: [t2, /*#__PURE__*/jsxs(ActionList.Group, {
479
+ let t3;
480
+ if ($[7] !== children || $[8] !== props || $[9] !== t2) {
481
+ t3 = /*#__PURE__*/jsxs(Fragment, {
482
+ children: [t1, /*#__PURE__*/jsxs(ActionList.Group, {
680
483
  ...props,
681
- children: [t3, children]
484
+ children: [t2, children]
682
485
  })]
683
486
  });
684
- $[14] = children;
685
- $[15] = props;
686
- $[16] = t3;
687
- $[17] = t4;
487
+ $[7] = children;
488
+ $[8] = props;
489
+ $[9] = t2;
490
+ $[10] = t3;
688
491
  } else {
689
- t4 = $[17];
492
+ t3 = $[10];
690
493
  }
691
- return t4;
494
+ return t3;
692
495
  };
693
496
  // ----------------------------------------------------------------------------
694
497
  // NavList.GroupExpand
@@ -831,59 +634,50 @@ const GroupExpand = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
831
634
  */
832
635
  const GroupHeading = t0 => {
833
636
  const $ = c(10);
637
+ let className;
834
638
  let rest;
835
639
  let t1;
836
- let t2;
837
640
  if ($[0] !== t0) {
838
641
  ({
839
642
  as: t1,
840
- sx: t2,
643
+ className,
841
644
  ...rest
842
645
  } = t0);
843
646
  $[0] = t0;
844
- $[1] = rest;
845
- $[2] = t1;
846
- $[3] = t2;
647
+ $[1] = className;
648
+ $[2] = rest;
649
+ $[3] = t1;
847
650
  } else {
848
- rest = $[1];
849
- t1 = $[2];
850
- t2 = $[3];
651
+ className = $[1];
652
+ rest = $[2];
653
+ t1 = $[3];
851
654
  }
852
655
  const as = t1 === undefined ? "h3" : t1;
853
- const sxProp = t2 === undefined ? defaultSxProp : t2;
854
- let t3;
855
- if ($[4] !== sxProp) {
856
- t3 = merge({
857
- "> a {": {
858
- color: "var(--fgColor-default)",
859
- textDecoration: "inherit",
860
- ":hover": {
861
- textDecoration: "underline"
862
- }
863
- }
864
- }, sxProp);
865
- $[4] = sxProp;
866
- $[5] = t3;
656
+ let t2;
657
+ if ($[4] !== className) {
658
+ t2 = clsx(navListClasses.GroupHeading, className);
659
+ $[4] = className;
660
+ $[5] = t2;
867
661
  } else {
868
- t3 = $[5];
662
+ t2 = $[5];
869
663
  }
870
- let t4;
871
- if ($[6] !== as || $[7] !== rest || $[8] !== t3) {
872
- t4 = /*#__PURE__*/jsx(ActionList.GroupHeading, {
664
+ let t3;
665
+ if ($[6] !== as || $[7] !== rest || $[8] !== t2) {
666
+ t3 = /*#__PURE__*/jsx(ActionList.GroupHeading, {
873
667
  as: as,
874
- sx: t3,
668
+ className: t2,
875
669
  "data-component": "NavList.GroupHeading",
876
670
  headingWrapElement: "li",
877
671
  ...rest
878
672
  });
879
673
  $[6] = as;
880
674
  $[7] = rest;
881
- $[8] = t3;
882
- $[9] = t4;
675
+ $[8] = t2;
676
+ $[9] = t3;
883
677
  } else {
884
- t4 = $[9];
678
+ t3 = $[9];
885
679
  }
886
- return t4;
680
+ return t3;
887
681
  };
888
682
 
889
683
  // ----------------------------------------------------------------------------