@sanity/ui 3.0.0-static.10 → 3.0.0-static.12

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 (275) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +1300 -1269
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-cjs/buildCommand.js +28 -10
  4. package/dist/_chunks-cjs/buildCommand.js.map +1 -1
  5. package/dist/_chunks-es/_visual-editing.mjs +1298 -1263
  6. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  7. package/dist/_visual-editing.d.mts +516 -360
  8. package/dist/_visual-editing.d.ts +516 -360
  9. package/dist/cli.js +1 -1
  10. package/dist/css.d.mts +258 -75
  11. package/dist/css.d.ts +258 -75
  12. package/dist/css.js +746 -752
  13. package/dist/css.js.map +1 -1
  14. package/dist/css.mjs +748 -754
  15. package/dist/css.mjs.map +1 -1
  16. package/dist/index.d.mts +1342 -871
  17. package/dist/index.d.ts +1342 -871
  18. package/dist/index.js +433 -325
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +429 -321
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/sanity-palette.css +105 -1
  23. package/dist/sanity-palette.min.css +1 -0
  24. package/dist/sanity-theme.css +4571 -1
  25. package/dist/sanity-theme.min.css +1 -0
  26. package/dist/system.css +22053 -21710
  27. package/dist/system.min.css +1 -0
  28. package/dist/theme.d.mts +51 -106
  29. package/dist/theme.d.ts +51 -106
  30. package/dist/theme.js +19 -20
  31. package/dist/theme.js.map +1 -1
  32. package/dist/theme.mjs +19 -20
  33. package/dist/theme.mjs.map +1 -1
  34. package/package.json +10 -5
  35. package/src/cli/buildCommand.ts +46 -19
  36. package/src/css/_comp.ts +2 -2
  37. package/src/css/{compile/compileStyle.ts → _compileStyle.ts} +7 -7
  38. package/src/css/_resp.ts +0 -1
  39. package/src/css/{system.style.ts → _system.style.ts} +3 -2
  40. package/src/css/aspects/display/display.ts +1 -0
  41. package/src/css/aspects/display/types.ts +2 -3
  42. package/src/css/aspects/flex/types.ts +4 -12
  43. package/src/css/aspects/flexItem/types.ts +1 -3
  44. package/src/css/aspects/font/font.style.ts +7 -66
  45. package/src/css/aspects/font/types.ts +1 -3
  46. package/src/css/aspects/grid/grid.ts +1 -0
  47. package/src/css/aspects/grid/types.ts +5 -9
  48. package/src/css/aspects/gridItem/gridItem.ts +1 -1
  49. package/src/css/aspects/gridItem/types.ts +7 -18
  50. package/src/css/aspects/height/height.ts +3 -4
  51. package/src/css/aspects/inset/inset.ts +1 -0
  52. package/src/css/aspects/margin/margin.ts +1 -0
  53. package/src/css/aspects/margin/types.ts +1 -0
  54. package/src/css/aspects/maxWidth/maxWidth.ts +1 -0
  55. package/src/css/aspects/maxWidth/types.ts +1 -0
  56. package/src/css/aspects/minWidth/minWidth.ts +1 -0
  57. package/src/css/aspects/minWidth/types.ts +2 -0
  58. package/src/css/aspects/overflow/overflow.ts +1 -0
  59. package/src/css/aspects/padding/padding.ts +1 -0
  60. package/src/css/aspects/pointerEvents/pointerEvents.ts +1 -0
  61. package/src/css/aspects/position/position.ts +1 -0
  62. package/src/css/aspects/shadow/shadow.style.ts +16 -41
  63. package/src/css/aspects/shadow/shadow.ts +1 -0
  64. package/src/css/aspects/textOverflow/textOverflow.ts +1 -0
  65. package/src/css/aspects/textOverflow/types.ts +1 -0
  66. package/src/css/aspects/width/types.ts +2 -0
  67. package/src/css/aspects/width/width.ts +1 -0
  68. package/src/css/compilePalette.ts +32 -0
  69. package/src/css/compileSystem.ts +7 -0
  70. package/src/css/{compile/compileTheme.ts → compileTheme.ts} +1 -0
  71. package/src/css/compileTheme_v3.ts +434 -0
  72. package/src/css/components/breadcrumbs/breadcrumbs.ts +1 -0
  73. package/src/css/components/dialog/dialog.ts +7 -0
  74. package/src/css/components/menu/menu.ts +2 -0
  75. package/src/css/components/skeleton/skeleton.style.ts +8 -4
  76. package/src/css/components/skeleton/skeleton.ts +4 -0
  77. package/src/css/components/skeleton/types.ts +4 -0
  78. package/src/css/components/toast/toast.ts +5 -0
  79. package/src/css/components/tree/tree.ts +1 -0
  80. package/src/css/composeClassNames.ts +4 -2
  81. package/src/css/constants.ts +11 -0
  82. package/src/css/index.ts +4 -3
  83. package/src/css/primitives/_arrow/_arrow.style.ts +6 -8
  84. package/src/css/primitives/_arrow/_arrow.ts +7 -0
  85. package/src/css/primitives/_input/input.ts +2 -0
  86. package/src/css/primitives/_selectable/_selectable.style.ts +24 -25
  87. package/src/css/primitives/_selectable/selectable.ts +1 -2
  88. package/src/css/primitives/avatar/avatar.style.ts +5 -8
  89. package/src/css/primitives/avatar/avatar.ts +6 -0
  90. package/src/css/primitives/avatar/types.ts +1 -0
  91. package/src/css/primitives/box/types.ts +1 -3
  92. package/src/css/primitives/button/button.style.ts +48 -15
  93. package/src/css/primitives/button/button.ts +4 -21
  94. package/src/css/primitives/button/index.ts +1 -0
  95. package/src/css/primitives/button/types.ts +18 -0
  96. package/src/css/primitives/card/card.style.ts +4 -7
  97. package/src/css/primitives/card/card.ts +2 -2
  98. package/src/css/primitives/card/types.ts +2 -2
  99. package/src/css/primitives/checkbox/checkbox.ts +2 -0
  100. package/src/css/primitives/container/container.ts +1 -0
  101. package/src/css/primitives/container/types.ts +1 -0
  102. package/src/css/primitives/kbd/kbd.ts +1 -0
  103. package/src/css/primitives/label/types.ts +7 -2
  104. package/src/css/primitives/popover/popover.ts +2 -0
  105. package/src/css/primitives/radio/radio.ts +1 -0
  106. package/src/css/primitives/select/select.ts +2 -0
  107. package/src/css/primitives/spinner/spinner.ts +2 -0
  108. package/src/css/primitives/switch/switch.ts +5 -0
  109. package/src/css/primitives/text/types.ts +4 -0
  110. package/src/css/primitives/textArea/textArea.ts +1 -0
  111. package/src/css/primitives/textInput/textInput.ts +1 -0
  112. package/src/css/primitives/token/token.style.ts +37 -36
  113. package/src/css/primitives/tooltip/tooltip.ts +2 -0
  114. package/src/css/responsiveRules.ts +12 -19
  115. package/src/css/scopeClassName.ts +1 -0
  116. package/src/css/types.ts +115 -15
  117. package/src/css/util.ts +5 -0
  118. package/src/css/utils/srOnly/srOnly.ts +1 -0
  119. package/src/css/varNames.ts +230 -143
  120. package/src/css/vars.ts +53 -22
  121. package/src/theme/palette/constants.ts +2 -0
  122. package/src/theme/palette/types.ts +3 -0
  123. package/src/theme/types.ts +2 -6
  124. package/src/theme/v0/focusRing.ts +1 -3
  125. package/src/theme/v0/font.ts +6 -18
  126. package/src/theme/v0/layer.ts +1 -3
  127. package/src/theme/v0/shadow.ts +2 -6
  128. package/src/theme/v2/avatar.ts +1 -3
  129. package/src/theme/v2/color/_system.ts +1 -3
  130. package/src/theme/v2/color/avatar.ts +2 -6
  131. package/src/theme/v2/color/badge.ts +2 -6
  132. package/src/theme/v2/color/button.ts +3 -9
  133. package/src/theme/v2/color/color.ts +3 -9
  134. package/src/theme/v2/color/input.ts +3 -9
  135. package/src/theme/v2/color/kbd.ts +1 -3
  136. package/src/theme/v2/color/selectable.ts +2 -6
  137. package/src/theme/v2/color/state.ts +1 -3
  138. package/src/theme/v2/color/syntax.ts +1 -3
  139. package/src/theme/v2/input.ts +1 -3
  140. package/src/theme/v2/theme.ts +2 -6
  141. package/src/theme/v3/buildTheme_v3.ts +2 -1
  142. package/src/theme/v3/color/color.ts +6 -4
  143. package/src/theme/v3/color/renderColor.ts +4 -1
  144. package/src/theme/v3/{defaults.ts → defaultTokens.ts} +2 -2
  145. package/src/theme/v3/index.ts +1 -1
  146. package/src/theme/v3/resolveTokens.ts +18 -18
  147. package/src/ui/RootClassNames.tsx +44 -0
  148. package/src/ui/StyleTags.tsx +3 -1
  149. package/src/ui/_compat/helpers.ts +72 -0
  150. package/src/ui/_compat/index.ts +2 -6
  151. package/src/ui/_compat/studioTheme.ts +7 -0
  152. package/src/ui/_compat/theme/themeColorProvider.tsx +2 -6
  153. package/src/ui/_compat/theme/themeProvider.tsx +2 -6
  154. package/src/ui/_compat/theme/types.ts +1 -3
  155. package/src/ui/_compat/theme/useRootTheme.ts +1 -3
  156. package/src/ui/_compat/theme/useTheme.ts +2 -6
  157. package/src/ui/_compat/types.ts +0 -83
  158. package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
  159. package/src/ui/components/autocomplete/autocomplete.tsx +86 -114
  160. package/src/ui/components/autocomplete/autocompleteOption.tsx +2 -0
  161. package/src/ui/components/autocomplete/types.ts +3 -8
  162. package/src/ui/components/breadcrumbs/breadcrumbs.tsx +27 -21
  163. package/src/ui/components/dialog/dialog.tsx +89 -291
  164. package/src/ui/components/dialog/dialogCard.tsx +183 -0
  165. package/src/ui/components/dialog/isTargetWithinScope.ts +14 -0
  166. package/src/ui/components/hotkeys/hotkeys.tsx +33 -15
  167. package/src/ui/components/menu/__workshop__/asComponent.tsx +6 -6
  168. package/src/ui/components/menu/menu.tsx +27 -33
  169. package/src/ui/components/menu/menuButton.tsx +10 -14
  170. package/src/ui/components/menu/menuDivider.tsx +25 -13
  171. package/src/ui/components/menu/menuGroup.tsx +34 -26
  172. package/src/ui/components/menu/menuItem.tsx +51 -40
  173. package/src/ui/components/skeleton/codeSkeleton.tsx +53 -0
  174. package/src/ui/components/skeleton/headingSkeleton.tsx +52 -0
  175. package/src/ui/components/skeleton/index.ts +3 -0
  176. package/src/ui/components/skeleton/labelSkeleton.tsx +51 -0
  177. package/src/ui/components/skeleton/skeleton.tsx +39 -16
  178. package/src/ui/components/skeleton/textSkeleton.tsx +31 -110
  179. package/src/ui/components/tab/tab.tsx +23 -19
  180. package/src/ui/components/tab/tabList.tsx +34 -33
  181. package/src/ui/components/tab/tabPanel.tsx +25 -19
  182. package/src/ui/components/toast/toast.tsx +21 -16
  183. package/src/ui/components/toast/toastLayer.tsx +28 -10
  184. package/src/ui/components/toast/toastProvider.tsx +2 -6
  185. package/src/ui/components/toast/types.ts +2 -6
  186. package/src/ui/components/toast/useToast.ts +1 -3
  187. package/src/ui/components/tree/tree.tsx +194 -187
  188. package/src/ui/components/tree/treeGroup.tsx +25 -5
  189. package/src/ui/components/tree/treeItem.tsx +35 -23
  190. package/src/ui/hooks/useClickOutside.ts +2 -6
  191. package/src/ui/hooks/useClickOutsideEvent.ts +3 -9
  192. package/src/ui/index.ts +1 -0
  193. package/src/ui/primitives/_selectable/selectable.tsx +33 -20
  194. package/src/ui/primitives/avatar/avatar.tsx +28 -31
  195. package/src/ui/primitives/avatar/avatarCounter.tsx +33 -25
  196. package/src/ui/primitives/avatar/avatarStack.tsx +31 -24
  197. package/src/ui/primitives/avatar/types.ts +2 -0
  198. package/src/ui/primitives/badge/__workshop__/props.tsx +1 -9
  199. package/src/ui/primitives/badge/__workshop__/tones.tsx +1 -6
  200. package/src/ui/primitives/badge/badge.tsx +33 -32
  201. package/src/ui/primitives/badge/types.ts +2 -1
  202. package/src/ui/primitives/box/box.tsx +59 -29
  203. package/src/ui/primitives/button/__workshop__/sanityUploadButton.tsx +3 -3
  204. package/src/ui/primitives/button/__workshop__/uploadButton.tsx +2 -1
  205. package/src/ui/primitives/button/button.test.tsx +1 -15
  206. package/src/ui/primitives/button/button.tsx +63 -70
  207. package/src/ui/primitives/card/__workshop__/asComponent.tsx +3 -3
  208. package/src/ui/primitives/card/card.tsx +22 -22
  209. package/src/ui/primitives/card/cardProvider.tsx +2 -0
  210. package/src/ui/primitives/checkbox/checkbox.tsx +26 -15
  211. package/src/ui/primitives/code/code.tsx +24 -22
  212. package/src/ui/primitives/container/container.tsx +26 -15
  213. package/src/ui/primitives/flex/flex.tsx +21 -19
  214. package/src/ui/primitives/grid/grid.tsx +21 -16
  215. package/src/ui/primitives/heading/heading.tsx +42 -19
  216. package/src/ui/primitives/inline/inline.tsx +26 -23
  217. package/src/ui/primitives/kbd/kbd.tsx +25 -23
  218. package/src/ui/primitives/label/label.tsx +29 -26
  219. package/src/ui/primitives/popover/popover.tsx +293 -271
  220. package/src/ui/primitives/popover/popoverCard.tsx +122 -120
  221. package/src/ui/primitives/radio/radio.tsx +30 -14
  222. package/src/ui/primitives/select/select.tsx +24 -16
  223. package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +4 -2
  224. package/src/ui/primitives/spinner/spinner.tsx +24 -12
  225. package/src/ui/primitives/stack/stack.tsx +27 -18
  226. package/src/ui/primitives/switch/switch.tsx +31 -14
  227. package/src/ui/primitives/text/text.tsx +30 -24
  228. package/src/ui/primitives/textArea/textArea.tsx +33 -18
  229. package/src/ui/primitives/textInput/textInput.tsx +28 -40
  230. package/src/ui/primitives/tooltip/constants.ts +1 -1
  231. package/src/ui/primitives/tooltip/tooltip.tsx +85 -61
  232. package/src/ui/primitives/tooltip/tooltipCard.tsx +89 -82
  233. package/src/ui/primitives/types.ts +1 -3
  234. package/src/ui/types/avatar.ts +3 -6
  235. package/src/ui/types/badge.ts +1 -3
  236. package/src/ui/types/button.ts +1 -3
  237. package/src/ui/types/card.ts +1 -3
  238. package/src/ui/types/dialog.ts +1 -3
  239. package/src/ui/types/props.ts +20 -10
  240. package/src/ui/utils/arrow/arrow.tsx +43 -25
  241. package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +2 -6
  242. package/src/ui/utils/boundaryElement/types.ts +1 -3
  243. package/src/ui/utils/boundaryElement/useBoundaryElement.ts +1 -3
  244. package/src/ui/utils/elementQuery/elementQuery.tsx +43 -19
  245. package/src/ui/utils/errorBoundary.tsx +2 -0
  246. package/src/ui/utils/index.ts +0 -1
  247. package/src/ui/utils/layer/layer.tsx +23 -93
  248. package/src/ui/utils/layer/layerCard.tsx +92 -0
  249. package/src/ui/utils/layer/layerProvider.tsx +2 -6
  250. package/src/ui/utils/layer/useLayer.ts +1 -3
  251. package/src/ui/utils/portal/portal.ts +2 -6
  252. package/src/ui/utils/portal/portalProvider.tsx +2 -6
  253. package/src/ui/utils/portal/types.ts +1 -3
  254. package/src/ui/utils/portal/usePortal.ts +1 -3
  255. package/src/ui/utils/srOnly/srOnly.tsx +25 -20
  256. package/src/ui/utils/virtualList/virtualList.tsx +69 -50
  257. package/src/css/compile/compilePalette.ts +0 -27
  258. package/src/css/compile/compileRule.ts +0 -97
  259. package/src/css/compile/compileRules.test.ts +0 -36
  260. package/src/css/compile/compileRules.ts +0 -43
  261. package/src/css/compile/compileSystem.ts +0 -10
  262. package/src/css/compile/compileTheme_v3.ts +0 -401
  263. package/src/css/compile/types.ts +0 -6
  264. package/src/css/components/breadcrumbs/rules.ts +0 -25
  265. package/src/css/components/dialog/rules.ts +0 -78
  266. package/src/css/components/skeleton/rules.ts +0 -113
  267. package/src/css/components/toast/rules.ts +0 -18
  268. package/src/css/components/tree/rules.ts +0 -168
  269. package/src/css/primitives/_selectable/_contants.ts +0 -11
  270. package/src/css/primitives/card/_constants.ts +0 -13
  271. package/src/css/primitives/popover/rules.ts +0 -5
  272. package/src/css/primitives/spinner/rules.ts +0 -21
  273. package/src/css/primitives/token/rules.ts +0 -45
  274. package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
  275. package/src/ui/utils/conditionalWrapper/index.ts +0 -1
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
- var jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), theme = require("@sanity/ui/theme"), react = require("react"), styledComponents = require("styled-components"), css = require("@sanity/ui/css"), ReactIs = require("react-is"), icons = require("@sanity/icons"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), resizeObserver = require("@juggle/resize-observer"), useEffectEvent = require("use-effect-event"), reactDom = require("react-dom");
3
- function _interopDefaultCompat(e) {
4
- return e && typeof e == "object" && "default" in e ? e : { default: e };
5
- }
6
- var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs);
2
+ var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), react = require("react"), styledComponents = require("styled-components"), css = require("@sanity/ui/css"), reactIs = require("react-is"), icons = require("@sanity/icons"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), resizeObserver = require("@juggle/resize-observer"), useEffectEvent = require("use-effect-event"), reactDom = require("react-dom");
3
+ const studioTheme = theme.buildTheme();
7
4
  function getGlobalScope() {
8
5
  if (typeof globalThis < "u") return globalThis;
9
6
  if (typeof window < "u") return window;
@@ -34,6 +31,7 @@ function CardProvider(props) {
34
31
  let t3;
35
32
  return $[4] !== children || $[5] !== context ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(CardContext.Provider, { value: context, children }), $[4] = children, $[5] = context, $[6] = t3) : t3 = $[6], t3;
36
33
  }
34
+ CardProvider.displayName = "CardProvider";
37
35
  const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
38
36
  function ThemeProvider(props) {
39
37
  const $ = reactCompilerRuntime.c(19), parentTheme = react.useContext(ThemeContext), {
@@ -100,14 +98,7 @@ function useTheme_v2() {
100
98
  let t1;
101
99
  return $[0] !== t0 ? (t1 = theme.getTheme_v2(t0), $[0] = t0, $[1] = t1) : t1 = $[1], t1;
102
100
  }
103
- const createColorTheme = theme.createColorTheme, hexToRgb = theme.hexToRgb, hslToRgb = theme.hslToRgb, multiply = theme.multiply, parseColor = theme.parseColor, rgbToHex = theme.rgbToHex, rgbToHsl = theme.rgbToHsl, rgba = theme.rgba, screen = theme.screen, studioTheme = /* @__PURE__ */ (() => {
104
- let theme$1;
105
- return {
106
- get value() {
107
- return theme$1 || (theme$1 = theme.buildTheme()), theme$1;
108
- }
109
- };
110
- })(), EMPTY_ARRAY = [], EMPTY_RECORD = {}, POPOVER_MOTION_PROPS = {
101
+ const EMPTY_ARRAY = [], EMPTY_RECORD = {}, POPOVER_MOTION_PROPS = {
111
102
  card: {
112
103
  initial: {
113
104
  scale: 0.97,
@@ -180,7 +171,7 @@ function useArrayProp(val, defaultVal) {
180
171
  return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
181
172
  }
182
173
  function useClickOutsideEvent(listener, t0, boundaryElement) {
183
- const $ = reactCompilerRuntime.c(9), elementsArg = t0 === void 0 ? _temp$8 : t0;
174
+ const $ = reactCompilerRuntime.c(9), elementsArg = t0 === void 0 ? _temp$7 : t0;
184
175
  let t1;
185
176
  $[0] !== boundaryElement || $[1] !== elementsArg || $[2] !== listener ? (t1 = (evt) => {
186
177
  if (!listener)
@@ -210,7 +201,7 @@ function useClickOutsideEvent(listener, t0, boundaryElement) {
210
201
  let t3;
211
202
  $[7] !== hasListener ? (t3 = [hasListener], $[7] = hasListener, $[8] = t3) : t3 = $[8], react.useEffect(t2, t3), react.useDebugValue(listener ? "MouseDown On" : "MouseDown Off");
212
203
  }
213
- function _temp$8() {
204
+ function _temp$7() {
214
205
  return EMPTY_ARRAY;
215
206
  }
216
207
  function useCustomValidity(ref, customValidity) {
@@ -350,38 +341,40 @@ function useMediaIndex() {
350
341
  return react.useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);
351
342
  }
352
343
  function usePrefersDark(t0) {
353
- return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$7 : t0);
344
+ return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$6 : t0);
354
345
  }
355
- function _temp$7() {
346
+ function _temp$6() {
356
347
  return !1;
357
348
  }
358
349
  function usePrefersReducedMotion(t0) {
359
- return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$6 : t0);
350
+ return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$5 : t0);
360
351
  }
361
- function _temp$6() {
352
+ function _temp$5() {
362
353
  return !1;
363
354
  }
364
- const Box = react.forwardRef(function(props, ref) {
365
- const $ = reactCompilerRuntime.c(120);
366
- let align, autoCols, autoFlow, autoRows, borderBottom, borderLeft, borderRight, borderTop, className, column, columnEnd, columnStart, columns, direction, flex, gap, gapX, gapY, height, inset, insetBottom, insetLeft, insetRight, insetTop, justify, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, muted, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pointerEvents, position, radius, restProps, row, rowEnd, rowStart, rows, t0, t1, t2, t3, t4, t5, t6, width, wrap;
367
- $[0] !== props ? ({
355
+ const DEFAULT_BOX_ELEMENT = "div";
356
+ function Box(props) {
357
+ const $ = reactCompilerRuntime.c(126), t0 = props;
358
+ let align, autoCols, autoFlow, autoRows, borderBottom, borderLeft, borderRight, borderTop, children, className, column, columnEnd, columnStart, columns, direction, flex, gap, gapX, gapY, height, inset, insetBottom, insetLeft, insetRight, insetTop, justify, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, muted, outline, overflow, overflowX, overflowY, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pointerEvents, position, radius, rest, row, rowEnd, rowStart, rows, t1, t2, t3, t4, t5, t6, t7, width, wrap;
359
+ $[0] !== t0 ? ({
368
360
  align,
369
- as: t0,
361
+ as: t1,
370
362
  autoCols,
371
363
  autoFlow,
372
364
  autoRows,
373
- border: t1,
365
+ border: t2,
374
366
  borderTop,
375
367
  borderRight,
376
368
  borderBottom,
377
369
  borderLeft,
378
370
  className,
371
+ children,
379
372
  column,
380
373
  columnStart,
381
374
  columnEnd,
382
375
  columns,
383
376
  direction,
384
- display: t2,
377
+ display: t3,
385
378
  flex,
386
379
  gap,
387
380
  gapX,
@@ -393,7 +386,7 @@ const Box = react.forwardRef(function(props, ref) {
393
386
  insetRight,
394
387
  insetTop,
395
388
  justify,
396
- margin: t3,
389
+ margin: t4,
397
390
  marginX,
398
391
  marginY,
399
392
  marginTop,
@@ -401,9 +394,13 @@ const Box = react.forwardRef(function(props, ref) {
401
394
  marginBottom,
402
395
  marginLeft,
403
396
  maxWidth,
404
- minWidth: t4,
397
+ minWidth: t5,
398
+ muted,
399
+ outline,
405
400
  overflow,
406
- padding: t5,
401
+ overflowX,
402
+ overflowY,
403
+ padding: t6,
407
404
  paddingX,
408
405
  paddingY,
409
406
  paddingTop,
@@ -412,20 +409,19 @@ const Box = react.forwardRef(function(props, ref) {
412
409
  paddingLeft,
413
410
  pointerEvents,
414
411
  position,
415
- muted,
416
412
  radius,
417
413
  row,
418
414
  rows,
419
415
  rowStart,
420
416
  rowEnd,
421
- sizing: t6,
417
+ sizing: t7,
422
418
  width,
423
419
  wrap,
424
- ...restProps
425
- } = props, $[0] = props, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = borderBottom, $[6] = borderLeft, $[7] = borderRight, $[8] = borderTop, $[9] = className, $[10] = column, $[11] = columnEnd, $[12] = columnStart, $[13] = columns, $[14] = direction, $[15] = flex, $[16] = gap, $[17] = gapX, $[18] = gapY, $[19] = height, $[20] = inset, $[21] = insetBottom, $[22] = insetLeft, $[23] = insetRight, $[24] = insetTop, $[25] = justify, $[26] = marginBottom, $[27] = marginLeft, $[28] = marginRight, $[29] = marginTop, $[30] = marginX, $[31] = marginY, $[32] = maxWidth, $[33] = muted, $[34] = overflow, $[35] = paddingBottom, $[36] = paddingLeft, $[37] = paddingRight, $[38] = paddingTop, $[39] = paddingX, $[40] = paddingY, $[41] = pointerEvents, $[42] = position, $[43] = radius, $[44] = restProps, $[45] = row, $[46] = rowEnd, $[47] = rowStart, $[48] = rows, $[49] = t0, $[50] = t1, $[51] = t2, $[52] = t3, $[53] = t4, $[54] = t5, $[55] = t6, $[56] = width, $[57] = wrap) : (align = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], borderBottom = $[5], borderLeft = $[6], borderRight = $[7], borderTop = $[8], className = $[9], column = $[10], columnEnd = $[11], columnStart = $[12], columns = $[13], direction = $[14], flex = $[15], gap = $[16], gapX = $[17], gapY = $[18], height = $[19], inset = $[20], insetBottom = $[21], insetLeft = $[22], insetRight = $[23], insetTop = $[24], justify = $[25], marginBottom = $[26], marginLeft = $[27], marginRight = $[28], marginTop = $[29], marginX = $[30], marginY = $[31], maxWidth = $[32], muted = $[33], overflow = $[34], paddingBottom = $[35], paddingLeft = $[36], paddingRight = $[37], paddingTop = $[38], paddingX = $[39], paddingY = $[40], pointerEvents = $[41], position = $[42], radius = $[43], restProps = $[44], row = $[45], rowEnd = $[46], rowStart = $[47], rows = $[48], t0 = $[49], t1 = $[50], t2 = $[51], t3 = $[52], t4 = $[53], t5 = $[54], t6 = $[55], width = $[56], wrap = $[57]);
426
- const As = t0 === void 0 ? "div" : t0, border = t1 === void 0 ? !1 : t1, display = t2 === void 0 ? "block" : t2, margin = t3 === void 0 ? 0 : t3, minWidth = t4 === void 0 ? 0 : t4, padding = t5 === void 0 ? 0 : t5, sizing = t6 === void 0 ? "border" : t6;
427
- let t7;
428
- $[58] !== align || $[59] !== autoCols || $[60] !== autoFlow || $[61] !== autoRows || $[62] !== border || $[63] !== borderBottom || $[64] !== borderLeft || $[65] !== borderRight || $[66] !== borderTop || $[67] !== className || $[68] !== column || $[69] !== columnEnd || $[70] !== columnStart || $[71] !== columns || $[72] !== direction || $[73] !== display || $[74] !== flex || $[75] !== gap || $[76] !== gapX || $[77] !== gapY || $[78] !== height || $[79] !== inset || $[80] !== insetBottom || $[81] !== insetLeft || $[82] !== insetRight || $[83] !== insetTop || $[84] !== justify || $[85] !== margin || $[86] !== marginBottom || $[87] !== marginLeft || $[88] !== marginRight || $[89] !== marginTop || $[90] !== marginX || $[91] !== marginY || $[92] !== maxWidth || $[93] !== minWidth || $[94] !== muted || $[95] !== overflow || $[96] !== padding || $[97] !== paddingBottom || $[98] !== paddingLeft || $[99] !== paddingRight || $[100] !== paddingTop || $[101] !== paddingX || $[102] !== paddingY || $[103] !== pointerEvents || $[104] !== position || $[105] !== radius || $[106] !== row || $[107] !== rowEnd || $[108] !== rowStart || $[109] !== rows || $[110] !== sizing || $[111] !== width || $[112] !== wrap ? (t7 = css.composeClassNames(className, css.box({
420
+ ...rest
421
+ } = t0, $[0] = t0, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = borderBottom, $[6] = borderLeft, $[7] = borderRight, $[8] = borderTop, $[9] = children, $[10] = className, $[11] = column, $[12] = columnEnd, $[13] = columnStart, $[14] = columns, $[15] = direction, $[16] = flex, $[17] = gap, $[18] = gapX, $[19] = gapY, $[20] = height, $[21] = inset, $[22] = insetBottom, $[23] = insetLeft, $[24] = insetRight, $[25] = insetTop, $[26] = justify, $[27] = marginBottom, $[28] = marginLeft, $[29] = marginRight, $[30] = marginTop, $[31] = marginX, $[32] = marginY, $[33] = maxWidth, $[34] = muted, $[35] = outline, $[36] = overflow, $[37] = overflowX, $[38] = overflowY, $[39] = paddingBottom, $[40] = paddingLeft, $[41] = paddingRight, $[42] = paddingTop, $[43] = paddingX, $[44] = paddingY, $[45] = pointerEvents, $[46] = position, $[47] = radius, $[48] = rest, $[49] = row, $[50] = rowEnd, $[51] = rowStart, $[52] = rows, $[53] = t1, $[54] = t2, $[55] = t3, $[56] = t4, $[57] = t5, $[58] = t6, $[59] = t7, $[60] = width, $[61] = wrap) : (align = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], borderBottom = $[5], borderLeft = $[6], borderRight = $[7], borderTop = $[8], children = $[9], className = $[10], column = $[11], columnEnd = $[12], columnStart = $[13], columns = $[14], direction = $[15], flex = $[16], gap = $[17], gapX = $[18], gapY = $[19], height = $[20], inset = $[21], insetBottom = $[22], insetLeft = $[23], insetRight = $[24], insetTop = $[25], justify = $[26], marginBottom = $[27], marginLeft = $[28], marginRight = $[29], marginTop = $[30], marginX = $[31], marginY = $[32], maxWidth = $[33], muted = $[34], outline = $[35], overflow = $[36], overflowX = $[37], overflowY = $[38], paddingBottom = $[39], paddingLeft = $[40], paddingRight = $[41], paddingTop = $[42], paddingX = $[43], paddingY = $[44], pointerEvents = $[45], position = $[46], radius = $[47], rest = $[48], row = $[49], rowEnd = $[50], rowStart = $[51], rows = $[52], t1 = $[53], t2 = $[54], t3 = $[55], t4 = $[56], t5 = $[57], t6 = $[58], t7 = $[59], width = $[60], wrap = $[61]);
422
+ const Element2 = t1 === void 0 ? DEFAULT_BOX_ELEMENT : t1, border = t2 === void 0 ? !1 : t2, display = t3 === void 0 ? "block" : t3, margin = t4 === void 0 ? 0 : t4, minWidth = t5 === void 0 ? 0 : t5, padding = t6 === void 0 ? 0 : t6, sizing = t7 === void 0 ? "border" : t7;
423
+ let t8;
424
+ $[62] !== align || $[63] !== autoCols || $[64] !== autoFlow || $[65] !== autoRows || $[66] !== border || $[67] !== borderBottom || $[68] !== borderLeft || $[69] !== borderRight || $[70] !== borderTop || $[71] !== className || $[72] !== column || $[73] !== columnEnd || $[74] !== columnStart || $[75] !== columns || $[76] !== direction || $[77] !== display || $[78] !== flex || $[79] !== gap || $[80] !== gapX || $[81] !== gapY || $[82] !== height || $[83] !== inset || $[84] !== insetBottom || $[85] !== insetLeft || $[86] !== insetRight || $[87] !== insetTop || $[88] !== justify || $[89] !== margin || $[90] !== marginBottom || $[91] !== marginLeft || $[92] !== marginRight || $[93] !== marginTop || $[94] !== marginX || $[95] !== marginY || $[96] !== maxWidth || $[97] !== minWidth || $[98] !== muted || $[99] !== outline || $[100] !== overflow || $[101] !== overflowX || $[102] !== overflowY || $[103] !== padding || $[104] !== paddingBottom || $[105] !== paddingLeft || $[106] !== paddingRight || $[107] !== paddingTop || $[108] !== paddingX || $[109] !== paddingY || $[110] !== pointerEvents || $[111] !== position || $[112] !== radius || $[113] !== row || $[114] !== rowEnd || $[115] !== rowStart || $[116] !== rows || $[117] !== sizing || $[118] !== width || $[119] !== wrap ? (t8 = css.composeClassNames(className, css.box({
429
425
  align,
430
426
  autoCols,
431
427
  autoFlow,
@@ -452,7 +448,6 @@ const Box = react.forwardRef(function(props, ref) {
452
448
  insetRight,
453
449
  insetTop,
454
450
  justify,
455
- overflow,
456
451
  margin,
457
452
  marginX,
458
453
  marginY,
@@ -463,6 +458,10 @@ const Box = react.forwardRef(function(props, ref) {
463
458
  maxWidth,
464
459
  minWidth,
465
460
  muted,
461
+ outline,
462
+ overflow,
463
+ overflowX,
464
+ overflowY,
466
465
  padding,
467
466
  paddingX,
468
467
  paddingY,
@@ -480,14 +479,15 @@ const Box = react.forwardRef(function(props, ref) {
480
479
  sizing,
481
480
  width,
482
481
  wrap
483
- })), $[58] = align, $[59] = autoCols, $[60] = autoFlow, $[61] = autoRows, $[62] = border, $[63] = borderBottom, $[64] = borderLeft, $[65] = borderRight, $[66] = borderTop, $[67] = className, $[68] = column, $[69] = columnEnd, $[70] = columnStart, $[71] = columns, $[72] = direction, $[73] = display, $[74] = flex, $[75] = gap, $[76] = gapX, $[77] = gapY, $[78] = height, $[79] = inset, $[80] = insetBottom, $[81] = insetLeft, $[82] = insetRight, $[83] = insetTop, $[84] = justify, $[85] = margin, $[86] = marginBottom, $[87] = marginLeft, $[88] = marginRight, $[89] = marginTop, $[90] = marginX, $[91] = marginY, $[92] = maxWidth, $[93] = minWidth, $[94] = muted, $[95] = overflow, $[96] = padding, $[97] = paddingBottom, $[98] = paddingLeft, $[99] = paddingRight, $[100] = paddingTop, $[101] = paddingX, $[102] = paddingY, $[103] = pointerEvents, $[104] = position, $[105] = radius, $[106] = row, $[107] = rowEnd, $[108] = rowStart, $[109] = rows, $[110] = sizing, $[111] = width, $[112] = wrap, $[113] = t7) : t7 = $[113];
484
- let t8;
485
- return $[114] !== As || $[115] !== props.children || $[116] !== ref || $[117] !== restProps || $[118] !== t7 ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(As, { "data-ui": "Box", ...restProps, className: t7, ref, children: props.children }), $[114] = As, $[115] = props.children, $[116] = ref, $[117] = restProps, $[118] = t7, $[119] = t8) : t8 = $[119], t8;
486
- });
487
- Box.displayName = "ForwardRef(Box)";
488
- const Label = react.forwardRef(function(props, ref) {
489
- const $ = reactCompilerRuntime.c(29);
490
- let accent, align, children, className, restProps, t0, t1, t2, t3, textOverflowProp;
482
+ })), $[62] = align, $[63] = autoCols, $[64] = autoFlow, $[65] = autoRows, $[66] = border, $[67] = borderBottom, $[68] = borderLeft, $[69] = borderRight, $[70] = borderTop, $[71] = className, $[72] = column, $[73] = columnEnd, $[74] = columnStart, $[75] = columns, $[76] = direction, $[77] = display, $[78] = flex, $[79] = gap, $[80] = gapX, $[81] = gapY, $[82] = height, $[83] = inset, $[84] = insetBottom, $[85] = insetLeft, $[86] = insetRight, $[87] = insetTop, $[88] = justify, $[89] = margin, $[90] = marginBottom, $[91] = marginLeft, $[92] = marginRight, $[93] = marginTop, $[94] = marginX, $[95] = marginY, $[96] = maxWidth, $[97] = minWidth, $[98] = muted, $[99] = outline, $[100] = overflow, $[101] = overflowX, $[102] = overflowY, $[103] = padding, $[104] = paddingBottom, $[105] = paddingLeft, $[106] = paddingRight, $[107] = paddingTop, $[108] = paddingX, $[109] = paddingY, $[110] = pointerEvents, $[111] = position, $[112] = radius, $[113] = row, $[114] = rowEnd, $[115] = rowStart, $[116] = rows, $[117] = sizing, $[118] = width, $[119] = wrap, $[120] = t8) : t8 = $[120];
483
+ let t9;
484
+ return $[121] !== Element2 || $[122] !== children || $[123] !== rest || $[124] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Box", ...rest, className: t8, children }), $[121] = Element2, $[122] = children, $[123] = rest, $[124] = t8, $[125] = t9) : t9 = $[125], t9;
485
+ }
486
+ Box.displayName = "Box";
487
+ const DEFAULT_LABEL_ELEMENT = "div";
488
+ function Label(props) {
489
+ const $ = reactCompilerRuntime.c(28);
490
+ let accent, align, children, className, rest, t0, t1, t2, t3, textOverflowProp;
491
491
  $[0] !== props ? ({
492
492
  accent,
493
493
  align,
@@ -498,9 +498,9 @@ const Label = react.forwardRef(function(props, ref) {
498
498
  size: t2,
499
499
  textOverflow: textOverflowProp,
500
500
  weight: t3,
501
- ...restProps
502
- } = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = children, $[4] = className, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = textOverflowProp) : (accent = $[1], align = $[2], children = $[3], className = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], textOverflowProp = $[10]);
503
- const As = t0 === void 0 ? "div" : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 1 : t2, weight = t3 === void 0 ? "medium" : t3;
501
+ ...rest
502
+ } = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = children, $[4] = className, $[5] = rest, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = textOverflowProp) : (accent = $[1], align = $[2], children = $[3], className = $[4], rest = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], textOverflowProp = $[10]);
503
+ const Element2 = t0 === void 0 ? DEFAULT_LABEL_ELEMENT : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 1 : t2, weight = t3 === void 0 ? "medium" : t3;
504
504
  let t4;
505
505
  $[11] !== accent || $[12] !== align || $[13] !== className || $[14] !== muted || $[15] !== size2 || $[16] !== weight ? (t4 = css.composeClassNames(className, css.label({
506
506
  accent,
@@ -516,232 +516,235 @@ const Label = react.forwardRef(function(props, ref) {
516
516
  let t6;
517
517
  $[20] !== children || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t5, children }), $[20] = children, $[21] = t5, $[22] = t6) : t6 = $[22];
518
518
  let t7;
519
- return $[23] !== As || $[24] !== ref || $[25] !== restProps || $[26] !== t4 || $[27] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(As, { "data-ui": "Label", ...restProps, className: t4, ref, children: t6 }), $[23] = As, $[24] = ref, $[25] = restProps, $[26] = t4, $[27] = t6, $[28] = t7) : t7 = $[28], t7;
520
- });
521
- Label.displayName = "ForwardRef(Label)";
522
- const Avatar = react.forwardRef(function(props, ref) {
523
- const $ = reactCompilerRuntime.c(54);
524
- let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, className, initials, onImageLoadError, restProps, src, t0, t1, t2, title;
525
- $[0] !== props ? ({
519
+ return $[23] !== Element2 || $[24] !== rest || $[25] !== t4 || $[26] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Label", ...rest, className: t4, children: t6 }), $[23] = Element2, $[24] = rest, $[25] = t4, $[26] = t6, $[27] = t7) : t7 = $[27], t7;
520
+ }
521
+ Label.displayName = "Label";
522
+ const DEFAULT_AVATAR_ELEMENT = "div";
523
+ function Avatar(props) {
524
+ const $ = reactCompilerRuntime.c(51), t0 = props;
525
+ let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, className, initials, onImageLoadError, rest, src, t1, t2, t3, t4, title;
526
+ $[0] !== t0 ? ({
526
527
  __unstable_hideInnerStroke,
527
- as: asProp,
528
+ as: t1,
528
529
  className,
529
- color: t0,
530
+ color: t2,
530
531
  src,
531
532
  title,
532
533
  initials,
533
534
  onImageLoadError,
534
535
  arrowPosition: arrowPositionProp,
535
536
  animateArrowFrom,
536
- status: t1,
537
- size: t2,
538
- ...restProps
539
- } = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = className, $[6] = initials, $[7] = onImageLoadError, $[8] = restProps, $[9] = src, $[10] = t0, $[11] = t1, $[12] = t2, $[13] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], className = $[5], initials = $[6], onImageLoadError = $[7], restProps = $[8], src = $[9], t0 = $[10], t1 = $[11], t2 = $[12], title = $[13]);
540
- const color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, As = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div", size2 = useArrayProp(sizeProp), [arrowPosition, setArrowPosition] = react.useState(animateArrowFrom || arrowPositionProp || "inside"), [imageError, setImageError] = react.useState(!1);
541
- let t3, t4;
542
- $[14] !== arrowPosition || $[15] !== arrowPositionProp ? (t3 = () => {
537
+ status: t3,
538
+ size: t4,
539
+ ...rest
540
+ } = t0, $[0] = t0, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = className, $[5] = initials, $[6] = onImageLoadError, $[7] = rest, $[8] = src, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], className = $[4], initials = $[5], onImageLoadError = $[6], rest = $[7], src = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], title = $[13]);
541
+ const Element2 = t1 === void 0 ? DEFAULT_AVATAR_ELEMENT : t1, color = t2 === void 0 ? "gray" : t2, sizeProp = t4 === void 0 ? 1 : t4, size2 = useArrayProp(sizeProp), [arrowPosition, setArrowPosition] = react.useState(animateArrowFrom || arrowPositionProp || "inside"), [imageError, setImageError] = react.useState(!1);
542
+ let t5, t6;
543
+ $[14] !== arrowPosition || $[15] !== arrowPositionProp ? (t5 = () => {
543
544
  if (arrowPosition === arrowPositionProp)
544
545
  return;
545
546
  const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
546
547
  return () => cancelAnimationFrame(raf);
547
- }, t4 = [arrowPosition, arrowPositionProp], $[14] = arrowPosition, $[15] = arrowPositionProp, $[16] = t3, $[17] = t4) : (t3 = $[16], t4 = $[17]), react.useEffect(t3, t4);
548
- let t5, t6;
549
- $[18] !== src ? (t5 = () => {
548
+ }, t6 = [arrowPosition, arrowPositionProp], $[14] = arrowPosition, $[15] = arrowPositionProp, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), react.useEffect(t5, t6);
549
+ let t7, t8;
550
+ $[18] !== src ? (t7 = () => {
550
551
  src && setImageError(!1);
551
- }, t6 = [src], $[18] = src, $[19] = t5, $[20] = t6) : (t5 = $[19], t6 = $[20]), react.useEffect(t5, t6);
552
- let t7;
553
- $[21] !== onImageLoadError ? (t7 = () => {
552
+ }, t8 = [src], $[18] = src, $[19] = t7, $[20] = t8) : (t7 = $[19], t8 = $[20]), react.useEffect(t7, t8);
553
+ let t9;
554
+ $[21] !== onImageLoadError ? (t9 = () => {
554
555
  setImageError(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
555
- }, $[21] = onImageLoadError, $[22] = t7) : t7 = $[22];
556
- const handleImageError = t7;
557
- let t8, t9;
558
- $[23] !== size2 ? (t9 = size2.map(_temp$5), $[23] = size2, $[24] = t9) : t9 = $[24], t8 = t9;
559
- const initialsSize = t8, t10 = __unstable_hideInnerStroke ? "" : void 0;
560
- let t11;
561
- $[25] !== className || $[26] !== color || $[27] !== sizeProp ? (t11 = css.composeClassNames(className, css.avatar({
556
+ }, $[21] = onImageLoadError, $[22] = t9) : t9 = $[22];
557
+ const handleImageError = t9;
558
+ let t10, t11;
559
+ $[23] !== size2 ? (t11 = size2.map(_temp$4), $[23] = size2, $[24] = t11) : t11 = $[24], t10 = t11;
560
+ const initialsSize = t10, t12 = __unstable_hideInnerStroke ? "" : void 0;
561
+ let t13;
562
+ $[25] !== className || $[26] !== color || $[27] !== sizeProp ? (t13 = css.composeClassNames(className, css.avatar({
562
563
  color,
563
564
  size: sizeProp
564
- })), $[25] = className, $[26] = color, $[27] = sizeProp, $[28] = t11) : t11 = $[28];
565
- const t12 = imageError ? "" : void 0;
566
- let t13;
567
- $[29] === Symbol.for("react.memo_cache_sentinel") ? (t13 = css.avatarArrow(), $[29] = t13) : t13 = $[29];
568
- let t14;
569
- $[30] !== color ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t13, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[30] = color, $[31] = t14) : t14 = $[31];
565
+ })), $[25] = className, $[26] = color, $[27] = sizeProp, $[28] = t13) : t13 = $[28];
566
+ const t14 = imageError ? "" : void 0;
570
567
  let t15;
571
- $[32] === Symbol.for("react.memo_cache_sentinel") ? (t15 = css.avatarInitials(), $[32] = t15) : t15 = $[32];
568
+ $[29] === Symbol.for("react.memo_cache_sentinel") ? (t15 = css.avatarArrow(), $[29] = t15) : t15 = $[29];
572
569
  let t16;
573
- $[33] === Symbol.for("react.memo_cache_sentinel") ? (t16 = {
574
- color: "inherit"
575
- }, $[33] = t16) : t16 = $[33];
570
+ $[30] !== color ? (t16 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t15, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[30] = color, $[31] = t16) : t16 = $[31];
576
571
  let t17;
577
- $[34] !== initials || $[35] !== initialsSize ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(Box, { align: "center", as: "span", className: t15, display: "flex", justify: "center", position: "absolute", inset: 0, children: /* @__PURE__ */ jsxRuntime.jsx(Label, { align: "center", as: "span", size: initialsSize, style: t16, weight: "medium", children: initials }) }), $[34] = initials, $[35] = initialsSize, $[36] = t17) : t17 = $[36];
572
+ $[32] === Symbol.for("react.memo_cache_sentinel") ? (t17 = css.avatarInitials(), $[32] = t17) : t17 = $[32];
578
573
  let t18;
579
- $[37] !== handleImageError || $[38] !== initials || $[39] !== src ? (t18 = src && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: css.avatarImage(), inset: 0, position: "absolute", children: [
574
+ $[33] !== initials || $[34] !== initialsSize ? (t18 = /* @__PURE__ */ jsxRuntime.jsx(Box, { align: "center", as: "span", className: t17, display: "flex", justify: "center", position: "absolute", inset: 0, children: /* @__PURE__ */ jsxRuntime.jsx(Label, { align: "center", as: "span", size: initialsSize, weight: "medium", children: initials }) }), $[33] = initials, $[34] = initialsSize, $[35] = t18) : t18 = $[35];
575
+ let t19;
576
+ $[36] !== handleImageError || $[37] !== initials || $[38] !== src ? (t19 = src && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: css.avatarImage(), inset: 0, position: "absolute", children: [
580
577
  /* @__PURE__ */ jsxRuntime.jsx("img", { alt: initials, onError: handleImageError, src }),
581
578
  /* @__PURE__ */ jsxRuntime.jsx("span", {})
582
- ] }), $[37] = handleImageError, $[38] = initials, $[39] = src, $[40] = t18) : t18 = $[40];
583
- let t19;
584
- return $[41] !== As || $[42] !== arrowPosition || $[43] !== ref || $[44] !== restProps || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t14 || $[50] !== t17 || $[51] !== t18 || $[52] !== title ? (t19 = /* @__PURE__ */ jsxRuntime.jsxs(As, { "data-hide-inner-stroke": t10, "data-ui": "Avatar", ...restProps, "aria-label": title, className: t11, "data-arrow-position": arrowPosition, "data-image-error": t12, "data-status": status, ref, title, children: [
585
- t14,
586
- t17,
587
- t18
588
- ] }), $[41] = As, $[42] = arrowPosition, $[43] = ref, $[44] = restProps, $[45] = status, $[46] = t10, $[47] = t11, $[48] = t12, $[49] = t14, $[50] = t17, $[51] = t18, $[52] = title, $[53] = t19) : t19 = $[53], t19;
589
- });
590
- Avatar.displayName = "ForwardRef(Avatar)";
591
- function _temp$5(s) {
579
+ ] }), $[36] = handleImageError, $[37] = initials, $[38] = src, $[39] = t19) : t19 = $[39];
580
+ let t20;
581
+ return $[40] !== Element2 || $[41] !== arrowPosition || $[42] !== rest || $[43] !== t12 || $[44] !== t13 || $[45] !== t14 || $[46] !== t16 || $[47] !== t18 || $[48] !== t19 || $[49] !== title ? (t20 = /* @__PURE__ */ jsxRuntime.jsxs(Element2, { "data-hide-inner-stroke": t12, "data-ui": "Avatar", ...rest, "aria-label": title, className: t13, "data-arrow-position": arrowPosition, "data-image-error": t14, title, children: [
582
+ t16,
583
+ t18,
584
+ t19
585
+ ] }), $[40] = Element2, $[41] = arrowPosition, $[42] = rest, $[43] = t12, $[44] = t13, $[45] = t14, $[46] = t16, $[47] = t18, $[48] = t19, $[49] = title, $[50] = t20) : t20 = $[50], t20;
586
+ }
587
+ function _temp$4(s) {
592
588
  return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
593
589
  }
594
- const AvatarCounter = react.forwardRef(function(props, ref) {
595
- const $ = reactCompilerRuntime.c(18);
596
- let className, count, restProps, t0;
597
- $[0] !== props ? ({
590
+ Avatar.displayName = "Avatar";
591
+ const DEFAULT_AVATAR_COUNTER_ELEMENT = "div";
592
+ function AvatarCounter(props) {
593
+ const $ = reactCompilerRuntime.c(19), t0 = props;
594
+ let className, count, rest, t1, t2;
595
+ $[0] !== t0 ? ({
596
+ as: t1,
598
597
  className,
599
598
  count,
600
- size: t0,
601
- ...restProps
602
- } = props, $[0] = props, $[1] = className, $[2] = count, $[3] = restProps, $[4] = t0) : (className = $[1], count = $[2], restProps = $[3], t0 = $[4]);
603
- const size2 = useArrayProp(t0 === void 0 ? 1 : t0);
604
- let t1, t2;
605
- $[5] !== size2 ? (t2 = size2.map(_temp$4), $[5] = size2, $[6] = t2) : t2 = $[6], t1 = t2;
606
- const fontSize = t1;
607
- let t3;
608
- $[7] !== className || $[8] !== size2 ? (t3 = css.composeClassNames(className, css.avatarCounter({
609
- size: size2
610
- })), $[7] = className, $[8] = size2, $[9] = t3) : t3 = $[9];
611
- let t4;
612
- $[10] !== count || $[11] !== fontSize ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Label, { align: "center", as: "span", size: fontSize, weight: "medium", children: count }), $[10] = count, $[11] = fontSize, $[12] = t4) : t4 = $[12];
599
+ size: t2,
600
+ ...rest
601
+ } = t0, $[0] = t0, $[1] = className, $[2] = count, $[3] = rest, $[4] = t1, $[5] = t2) : (className = $[1], count = $[2], rest = $[3], t1 = $[4], t2 = $[5]);
602
+ const as = t1 === void 0 ? DEFAULT_AVATAR_COUNTER_ELEMENT : t1, size2 = useArrayProp(t2 === void 0 ? 1 : t2);
603
+ let t3, t4;
604
+ $[6] !== size2 ? (t4 = size2.map(_temp$3), $[6] = size2, $[7] = t4) : t4 = $[7], t3 = t4;
605
+ const labelSize = t3;
613
606
  let t5;
614
- return $[13] !== ref || $[14] !== restProps || $[15] !== t3 || $[16] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "AvatarCounter", ...restProps, align: "center", className: t3, display: "flex", justify: "center", paddingX: 2, ref, sizing: "border", children: t4 }), $[13] = ref, $[14] = restProps, $[15] = t3, $[16] = t4, $[17] = t5) : t5 = $[17], t5;
615
- });
616
- AvatarCounter.displayName = "ForwardRef(AvatarCounter)";
617
- function _temp$4(s) {
607
+ $[8] !== className || $[9] !== size2 ? (t5 = css.composeClassNames(className, css.avatarCounter({
608
+ size: size2
609
+ })), $[8] = className, $[9] = size2, $[10] = t5) : t5 = $[10];
610
+ let t6;
611
+ $[11] !== count || $[12] !== labelSize ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Label, { align: "center", as: "span", size: labelSize, weight: "medium", children: count }), $[11] = count, $[12] = labelSize, $[13] = t6) : t6 = $[13];
612
+ let t7;
613
+ return $[14] !== as || $[15] !== rest || $[16] !== t5 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "AvatarCounter", ...rest, align: "center", as, className: t5, display: "flex", justify: "center", paddingX: 2, sizing: "border", children: t6 }), $[14] = as, $[15] = rest, $[16] = t5, $[17] = t6, $[18] = t7) : t7 = $[18], t7;
614
+ }
615
+ function _temp$3(s) {
618
616
  return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
619
617
  }
620
- const AvatarStack = react.forwardRef(function(props, ref) {
621
- const $ = reactCompilerRuntime.c(19);
622
- let childrenProp, className, restProps, t0, t1;
623
- $[0] !== props ? ({
618
+ AvatarCounter.displayName = "AvatarCounter";
619
+ const DEFAULT_AVATAR_STACK_ELEMENT = "div";
620
+ function AvatarStack(props) {
621
+ const $ = reactCompilerRuntime.c(20), t0 = props;
622
+ let childrenProp, className, rest, t1, t2, t3;
623
+ $[0] !== t0 ? ({
624
+ as: t1,
624
625
  children: childrenProp,
625
626
  className,
626
- maxLength: t0,
627
- size: t1,
628
- ...restProps
629
- } = props, $[0] = props, $[1] = childrenProp, $[2] = className, $[3] = restProps, $[4] = t0, $[5] = t1) : (childrenProp = $[1], className = $[2], restProps = $[3], t0 = $[4], t1 = $[5]);
630
- const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, children = react.Children.toArray(childrenProp).filter(react.isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = Box, t2 = "AvatarStack", t3 = "center";
631
- let t4;
632
- $[6] !== className || $[7] !== size2 ? (t4 = css.composeClassNames(className, css.avatarStack({
633
- size: size2
634
- })), $[6] = className, $[7] = size2, $[8] = t4) : t4 = $[8];
635
- const t5 = "flex", t6 = len === 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: len, size: size2 }) }), t7 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) });
636
- let t8;
637
- $[9] !== size2 ? (t8 = (child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: react.cloneElement(child, {
627
+ maxLength: t2,
628
+ size: t3,
629
+ ...rest
630
+ } = t0, $[0] = t0, $[1] = childrenProp, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3) : (childrenProp = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6]);
631
+ const as = t1 === void 0 ? DEFAULT_AVATAR_STACK_ELEMENT : t1, maxLengthProp = t2 === void 0 ? 4 : t2, sizeProp = t3 === void 0 ? 1 : t3, children = react.Children.toArray(childrenProp).filter(react.isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = Box, t4 = "AvatarStack", t5 = "center";
632
+ let t6;
633
+ $[7] !== className || $[8] !== size2 ? (t6 = css.composeClassNames(className, css.avatarStack({
638
634
  size: size2
639
- }) }, String(childIndex)), $[9] = size2, $[10] = t8) : t8 = $[10];
640
- const t9 = visibleChildren.map(t8);
635
+ })), $[7] = className, $[8] = size2, $[9] = t6) : t6 = $[9];
636
+ const t7 = "flex", t8 = len === 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: len, size: size2 }) }), t9 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) });
641
637
  let t10;
642
- return $[11] !== T0 || $[12] !== ref || $[13] !== restProps || $[14] !== t4 || $[15] !== t6 || $[16] !== t7 || $[17] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(T0, { "data-ui": t2, ...restProps, align: t3, className: t4, display: t5, ref, children: [
643
- t6,
644
- t7,
645
- t9
646
- ] }), $[11] = T0, $[12] = ref, $[13] = restProps, $[14] = t4, $[15] = t6, $[16] = t7, $[17] = t9, $[18] = t10) : t10 = $[18], t10;
647
- });
648
- AvatarStack.displayName = "ForwardRef(AvatarStack)";
649
- const Text = react.forwardRef(function(props, ref) {
650
- const $ = reactCompilerRuntime.c(31);
651
- let align, children, className, flex, restProps, t0, t1, t2, t3, textOverflowProp, weight;
652
- $[0] !== props ? ({
653
- accent: t0,
638
+ $[10] !== size2 ? (t10 = (child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: react.cloneElement(child, {
639
+ size: size2
640
+ }) }, String(childIndex)), $[10] = size2, $[11] = t10) : t10 = $[11];
641
+ const t11 = visibleChildren.map(t10);
642
+ let t12;
643
+ return $[12] !== T0 || $[13] !== as || $[14] !== rest || $[15] !== t11 || $[16] !== t6 || $[17] !== t8 || $[18] !== t9 ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(T0, { "data-ui": t4, ...rest, align: t5, as, className: t6, display: t7, children: [
644
+ t8,
645
+ t9,
646
+ t11
647
+ ] }), $[12] = T0, $[13] = as, $[14] = rest, $[15] = t11, $[16] = t6, $[17] = t8, $[18] = t9, $[19] = t12) : t12 = $[19], t12;
648
+ }
649
+ AvatarStack.displayName = "AvatarStack";
650
+ const DEFAULT_TEXT_ELEMENT = "div";
651
+ function Text(props) {
652
+ const $ = reactCompilerRuntime.c(30), t0 = props;
653
+ let accent, align, children, className, flex, muted, rest, t1, t2, textOverflowProp, weight;
654
+ $[0] !== t0 ? ({
655
+ accent,
654
656
  align,
655
657
  as: t1,
656
658
  children,
657
659
  className,
658
660
  flex,
659
- muted: t2,
660
- size: t3,
661
+ muted,
662
+ size: t2,
661
663
  textOverflow: textOverflowProp,
662
664
  weight,
663
- ...restProps
664
- } = props, $[0] = props, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = textOverflowProp, $[11] = weight) : (align = $[1], children = $[2], className = $[3], flex = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], textOverflowProp = $[10], weight = $[11]);
665
- const accent = t0 === void 0 ? !1 : t0, As = t1 === void 0 ? "div" : t1, muted = t2 === void 0 ? !1 : t2, size2 = t3 === void 0 ? 2 : t3;
666
- let t4;
667
- $[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (t4 = css.composeClassNames(className, css.text({
665
+ ...rest
666
+ } = t0, $[0] = t0, $[1] = accent, $[2] = align, $[3] = children, $[4] = className, $[5] = flex, $[6] = muted, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = textOverflowProp, $[11] = weight) : (accent = $[1], align = $[2], children = $[3], className = $[4], flex = $[5], muted = $[6], rest = $[7], t1 = $[8], t2 = $[9], textOverflowProp = $[10], weight = $[11]);
667
+ const Element2 = t1 === void 0 ? DEFAULT_TEXT_ELEMENT : t1, size2 = t2 === void 0 ? 2 : t2;
668
+ let t3;
669
+ $[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (t3 = css.composeClassNames(className, css.text({
668
670
  accent,
669
671
  align,
670
672
  flex,
671
673
  muted,
672
674
  size: size2,
673
675
  weight
674
- })), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] = t4) : t4 = $[19];
675
- let t5;
676
- $[20] !== textOverflowProp ? (t5 = css.textOverflow({
676
+ })), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] = t3) : t3 = $[19];
677
+ let t4;
678
+ $[20] !== textOverflowProp ? (t4 = css.textOverflow({
677
679
  textOverflow: textOverflowProp
678
- }), $[20] = textOverflowProp, $[21] = t5) : t5 = $[21];
679
- let t6;
680
- $[22] !== children || $[23] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t5, children }), $[22] = children, $[23] = t5, $[24] = t6) : t6 = $[24];
681
- let t7;
682
- return $[25] !== As || $[26] !== ref || $[27] !== restProps || $[28] !== t4 || $[29] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(As, { "data-ui": "Text", ...restProps, ref, className: t4, children: t6 }), $[25] = As, $[26] = ref, $[27] = restProps, $[28] = t4, $[29] = t6, $[30] = t7) : t7 = $[30], t7;
683
- });
684
- Text.displayName = "ForwardRef(Text)";
685
- const Badge = react.forwardRef(function(props, ref) {
686
- const $ = reactCompilerRuntime.c(25);
687
- let children, className, restProps, t0, t1, t2, t3, t4, textAlign;
688
- if ($[0] !== props) {
689
- const {
690
- children: t52,
691
- className: t62,
692
- display: t72,
693
- fontSize: t8,
694
- mode: _deprecated_mode,
695
- padding: t9,
696
- radius: t10,
697
- textAlign: t11,
698
- tone: t12,
699
- ...t13
700
- } = props;
701
- children = t52, className = t62, t0 = t72, t1 = t8, t2 = t9, t3 = t10, textAlign = t11, t4 = t12, restProps = t13, $[0] = props, $[1] = children, $[2] = className, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = textAlign;
702
- } else
703
- children = $[1], className = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], textAlign = $[9];
704
- const display = t0 === void 0 ? "inline-block" : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 1 : t2, radius = t3 === void 0 ? 2 : t3, tone = t4 === void 0 ? "default" : t4;
680
+ }), $[20] = textOverflowProp, $[21] = t4) : t4 = $[21];
705
681
  let t5;
706
- $[10] !== className || $[11] !== radius || $[12] !== tone ? (t5 = css.composeClassNames(className, css.badge({
682
+ $[22] !== children || $[23] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t4, children }), $[22] = children, $[23] = t4, $[24] = t5) : t5 = $[24];
683
+ let t6;
684
+ return $[25] !== Element2 || $[26] !== rest || $[27] !== t3 || $[28] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Text", ...rest, className: t3, children: t5 }), $[25] = Element2, $[26] = rest, $[27] = t3, $[28] = t5, $[29] = t6) : t6 = $[29], t6;
685
+ }
686
+ Text.displayName = "Text";
687
+ const DEFAULT_BADGE_ELEMENT = "span";
688
+ function Badge(props) {
689
+ const $ = reactCompilerRuntime.c(22), t0 = props;
690
+ let children, className, rest, t1, t2, t3, t4, t5;
691
+ $[0] !== t0 ? ({
692
+ as: t1,
693
+ children,
694
+ className,
695
+ fontSize: t2,
696
+ padding: t3,
697
+ radius: t4,
698
+ tone: t5,
699
+ ...rest
700
+ } = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5) : (children = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8]);
701
+ const as = t1 === void 0 ? DEFAULT_BADGE_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 1 : t3, radius = t4 === void 0 ? 2 : t4, tone = t5 === void 0 ? "default" : t5;
702
+ let t6;
703
+ $[9] !== className || $[10] !== radius || $[11] !== tone ? (t6 = css.composeClassNames(className, css.badge({
707
704
  radius,
708
705
  tone
709
- })), $[10] = className, $[11] = radius, $[12] = tone, $[13] = t5) : t5 = $[13];
710
- let t6;
711
- $[14] !== children || $[15] !== fontSize || $[16] !== textAlign ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { align: textAlign, size: fontSize, children }), $[14] = children, $[15] = fontSize, $[16] = textAlign, $[17] = t6) : t6 = $[17];
706
+ })), $[9] = className, $[10] = radius, $[11] = tone, $[12] = t6) : t6 = $[12];
712
707
  let t7;
713
- return $[18] !== display || $[19] !== padding || $[20] !== ref || $[21] !== restProps || $[22] !== t5 || $[23] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Badge", ...restProps, className: t5, display, padding, ref, children: t6 }), $[18] = display, $[19] = padding, $[20] = ref, $[21] = restProps, $[22] = t5, $[23] = t6, $[24] = t7) : t7 = $[24], t7;
714
- });
715
- Badge.displayName = "ForwardRef(Badge)";
708
+ $[13] !== children || $[14] !== fontSize ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, children }), $[13] = children, $[14] = fontSize, $[15] = t7) : t7 = $[15];
709
+ let t8;
710
+ return $[16] !== as || $[17] !== padding || $[18] !== rest || $[19] !== t6 || $[20] !== t7 ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Badge", ...rest, as, className: t6, display: "inline-flex", maxWidth: "fill", padding, children: t7 }), $[16] = as, $[17] = padding, $[18] = rest, $[19] = t6, $[20] = t7, $[21] = t8) : t8 = $[21], t8;
711
+ }
712
+ Badge.displayName = "Badge";
716
713
  function AnimatedSpinnerIcon(props) {
717
714
  const $ = reactCompilerRuntime.c(8);
718
- let className, restProps;
715
+ let className, rest;
719
716
  $[0] !== props ? ({
720
717
  className,
721
- ...restProps
722
- } = props, $[0] = props, $[1] = className, $[2] = restProps) : (className = $[1], restProps = $[2]);
718
+ ...rest
719
+ } = props, $[0] = props, $[1] = className, $[2] = rest) : (className = $[1], rest = $[2]);
723
720
  let t0;
724
721
  $[3] !== className ? (t0 = css.composeClassNames(className, css.animatedSpinnerIcon()), $[3] = className, $[4] = t0) : t0 = $[4];
725
722
  let t1;
726
- return $[5] !== restProps || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(icons.SpinnerIcon, { ...restProps, "data-sanity-icon": "animated-spinner", className: t0 }), $[5] = restProps, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
723
+ return $[5] !== rest || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(icons.SpinnerIcon, { ...rest, "data-sanity-icon": "animated-spinner", className: t0 }), $[5] = rest, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
724
+ }
725
+ AnimatedSpinnerIcon.displayName = "AnimatedSpinnerIcon";
726
+ const DEFAULT_SPINNER_ELEMENT = "div";
727
+ function Spinner(props) {
728
+ const $ = reactCompilerRuntime.c(8), t0 = props;
729
+ let rest, t1;
730
+ $[0] !== t0 ? ({
731
+ as: t1,
732
+ ...rest
733
+ } = t0, $[0] = t0, $[1] = rest, $[2] = t1) : (rest = $[1], t1 = $[2]);
734
+ const as = t1 === void 0 ? DEFAULT_SPINNER_ELEMENT : t1;
735
+ let t2, t3;
736
+ $[3] === Symbol.for("react.memo_cache_sentinel") ? (t2 = css.spinner(), t3 = /* @__PURE__ */ jsxRuntime.jsx(AnimatedSpinnerIcon, {}), $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]);
737
+ let t4;
738
+ return $[5] !== as || $[6] !== rest ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as, "data-ui": "Spinner", ...rest, className: t2, children: t3 }), $[5] = as, $[6] = rest, $[7] = t4) : t4 = $[7], t4;
727
739
  }
728
- const Spinner = react.forwardRef(function(props, ref) {
729
- const $ = reactCompilerRuntime.c(5);
730
- let t0;
731
- $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = css.spinner(), $[0] = t0) : t0 = $[0];
732
- let t1;
733
- $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(AnimatedSpinnerIcon, {}), $[1] = t1) : t1 = $[1];
734
- let t2;
735
- return $[2] !== props || $[3] !== ref ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Text, { "data-ui": "Spinner", ...props, className: t0, ref, children: t1 }), $[2] = props, $[3] = ref, $[4] = t2) : t2 = $[4], t2;
736
- });
737
- Spinner.displayName = "ForwardRef(Spinner)";
738
- const Button = react.forwardRef(function(props, ref) {
740
+ Spinner.displayName = "Spinner";
741
+ const DEFAULT_BUTTON_ELEMENT = "button";
742
+ function Button(props) {
739
743
  const {
740
744
  align = "center",
741
- as: As = "button",
745
+ as: Element2 = DEFAULT_BUTTON_ELEMENT,
742
746
  children,
743
747
  className,
744
- direction,
745
748
  disabled,
746
749
  display = "inline-flex",
747
750
  flex,
@@ -749,7 +752,6 @@ const Button = react.forwardRef(function(props, ref) {
749
752
  gap = props.space ?? props.padding ?? 3,
750
753
  gapX,
751
754
  gapY,
752
- href,
753
755
  icon: IconComponent,
754
756
  iconRight: IconRightComponent,
755
757
  justify = "center",
@@ -774,318 +776,299 @@ const Button = react.forwardRef(function(props, ref) {
774
776
  type = "button",
775
777
  muted = !1,
776
778
  width,
777
- wrap,
778
- ...restProps
779
+ ...rest
779
780
  } = props;
780
- return /* @__PURE__ */ jsxRuntime.jsxs(As, { "data-ui": "Button", ...restProps, className: css.composeClassNames(className, css.button({
781
- display,
782
- flex,
783
- mode,
784
- radius,
785
- tone,
786
- width
787
- })), "data-disabled": loading || disabled ? "" : void 0, "data-selected": selected ? "" : void 0, disabled: !!(loading || disabled), href: disabled ? void 0 : href, ref, type, children: [
788
- !!loading && /* @__PURE__ */ jsxRuntime.jsx(Box, { align: "center", as: "span", className: css.buttonLoadingBox(), display: "flex", flex: 1, justify: "center", width: "fill", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: fontSize }) }),
789
- (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(
790
- Box,
791
- {
792
- as: "span",
793
- direction,
794
- display: "flex",
795
- flex: 1,
796
- gap,
797
- gapX,
798
- gapY,
799
- justify,
800
- padding,
801
- paddingX,
802
- paddingY,
803
- paddingTop,
804
- paddingBottom,
805
- paddingLeft,
806
- paddingRight,
807
- children: [
781
+ let href;
782
+ return "href" in rest && (href = typeof rest.href == "string" ? rest.href : href, delete rest.href), /* @__PURE__ */ jsxRuntime.jsxs(
783
+ Element2,
784
+ {
785
+ "data-ui": "Button",
786
+ ...rest,
787
+ className: css.composeClassNames(className, css.button({
788
+ display,
789
+ flex,
790
+ mode,
791
+ radius,
792
+ tone,
793
+ width
794
+ })),
795
+ "data-disabled": loading || disabled ? "" : void 0,
796
+ "data-selected": selected ? "" : void 0,
797
+ disabled: !!(loading || disabled),
798
+ href: disabled ? void 0 : href,
799
+ type,
800
+ children: [
801
+ !!loading && /* @__PURE__ */ jsxRuntime.jsx(Box, { align: "center", as: "span", className: css.buttonLoadingBox(), display: "flex", flex: 1, justify: "center", width: "fill", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: fontSize }) }),
802
+ (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Box, { align, as: "span", display: "flex", flex: 1, gap, gapX, gapY, justify, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, children: [
808
803
  IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { as: "span", flex: "none", muted: !0, size: fontSize, children: [
809
804
  react.isValidElement(IconComponent) && IconComponent,
810
- ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
805
+ reactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
811
806
  ] }),
812
807
  text && /* @__PURE__ */ jsxRuntime.jsx(Text, { align: textAlign, as: "span", flex: "none", muted, size: fontSize, textOverflow, weight: textWeight, children: text }),
813
808
  IconRightComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { as: "span", flex: "none", muted: !0, size: fontSize, children: [
814
809
  react.isValidElement(IconRightComponent) && IconRightComponent,
815
- ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
810
+ reactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
816
811
  ] })
817
- ]
818
- }
819
- ),
820
- children && /* @__PURE__ */ jsxRuntime.jsx(
821
- Box,
822
- {
823
- as: "span",
824
- flex: 1,
825
- gap,
826
- gapX,
827
- gapY,
828
- padding,
829
- paddingX,
830
- paddingY,
831
- paddingTop,
832
- paddingBottom,
833
- paddingLeft,
834
- paddingRight,
835
- children
836
- }
837
- )
838
- ] });
839
- });
840
- Button.displayName = "ForwardRef(Button)";
812
+ ] }),
813
+ children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", flex: 1, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, children })
814
+ ]
815
+ }
816
+ );
817
+ }
818
+ Button.displayName = "Button";
841
819
  function useCard() {
842
820
  return react.useContext(CardContext);
843
821
  }
844
- const Card = react.forwardRef(function(props, ref) {
845
- const $ = reactCompilerRuntime.c(42);
846
- let asProp, className, pressed, restProps, schemeProp, selected, shadow, style, t0, t1, t2, t3;
847
- $[0] !== props ? ({
848
- __unstable_checkered: t0,
849
- __unstable_focusRing: t1,
850
- as: asProp,
822
+ const DEFAULT_CARD_ELEMENT = "div";
823
+ function Card(props) {
824
+ const $ = reactCompilerRuntime.c(43), t0 = props;
825
+ let className, disabled, pressed, rest, schemeProp, selected, shadow, style, t1, t2, t3, t4, t5;
826
+ $[0] !== t0 ? ({
827
+ __unstable_checkered: t1,
828
+ __unstable_focusRing: t2,
829
+ as: t3,
851
830
  className,
831
+ disabled,
852
832
  pressed,
853
- radius: t2,
833
+ radius: t4,
854
834
  scheme: schemeProp,
855
835
  selected,
856
836
  shadow,
857
837
  style,
858
- tone: t3,
859
- ...restProps
860
- } = props, $[0] = props, $[1] = asProp, $[2] = className, $[3] = pressed, $[4] = restProps, $[5] = schemeProp, $[6] = selected, $[7] = shadow, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2, $[12] = t3) : (asProp = $[1], className = $[2], pressed = $[3], restProps = $[4], schemeProp = $[5], selected = $[6], shadow = $[7], style = $[8], t0 = $[9], t1 = $[10], t2 = $[11], t3 = $[12]);
861
- const checkered = t0 === void 0 ? !1 : t0, focusRing = t1 === void 0 ? !1 : t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = ReactIs.isValidElementType(asProp) ? asProp : "div", parent = useCard(), t4 = parent?.tone ?? "default", t5 = parent?.scheme ?? "light";
862
- let t6;
863
- $[13] !== t4 || $[14] !== t5 ? (t6 = {
864
- tone: t4,
865
- scheme: t5
866
- }, $[13] = t4, $[14] = t5, $[15] = t6) : t6 = $[15];
867
- const context = t6, tone = toneProp === "inherit" ? context.tone : toneProp, scheme = schemeProp === void 0 ? context.scheme : schemeProp, t7 = scheme === context.scheme ? void 0 : scheme;
838
+ tone: t5,
839
+ ...rest
840
+ } = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = pressed, $[4] = rest, $[5] = schemeProp, $[6] = selected, $[7] = shadow, $[8] = style, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = t5) : (className = $[1], disabled = $[2], pressed = $[3], rest = $[4], schemeProp = $[5], selected = $[6], shadow = $[7], style = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], t5 = $[13]);
841
+ const checkered = t1 === void 0 ? !1 : t1, focusRing = t2 === void 0 ? !1 : t2, as = t3 === void 0 ? DEFAULT_CARD_ELEMENT : t3, radius = t4 === void 0 ? 0 : t4, toneProp = t5 === void 0 ? "default" : t5, parent = useCard(), t6 = parent?.tone ?? "default", t7 = parent?.scheme ?? "light";
868
842
  let t8;
869
- $[16] !== className || $[17] !== shadow || $[18] !== t7 || $[19] !== tone ? (t8 = css.composeClassNames(className, css.card({
870
- scheme: t7,
843
+ $[14] !== t6 || $[15] !== t7 ? (t8 = {
844
+ tone: t6,
845
+ scheme: t7
846
+ }, $[14] = t6, $[15] = t7, $[16] = t8) : t8 = $[16];
847
+ const context = t8, tone = toneProp === "inherit" ? context.tone : toneProp, scheme = schemeProp === void 0 ? context.scheme : schemeProp, t9 = scheme === context.scheme ? void 0 : scheme;
848
+ let t10;
849
+ $[17] !== className || $[18] !== shadow || $[19] !== t9 || $[20] !== tone ? (t10 = css.composeClassNames(className, css.card({
850
+ scheme: t9,
871
851
  shadow,
872
852
  tone
873
- })), $[16] = className, $[17] = shadow, $[18] = t7, $[19] = tone, $[20] = t8) : t8 = $[20];
874
- const t9 = checkered ? "" : void 0, t10 = focusRing ? "" : void 0, t11 = pressed ? "" : void 0, t12 = selected ? "" : void 0;
875
- let t13;
876
- $[21] !== as || $[22] !== radius || $[23] !== ref || $[24] !== restProps || $[25] !== style || $[26] !== t10 || $[27] !== t11 || $[28] !== t12 || $[29] !== t8 || $[30] !== t9 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Card", ...restProps, as, className: t8, "data-checkered": t9, "data-focus-ring": t10, "data-pressed": t11, "data-selected": t12, radius, ref, style }), $[21] = as, $[22] = radius, $[23] = ref, $[24] = restProps, $[25] = style, $[26] = t10, $[27] = t11, $[28] = t12, $[29] = t8, $[30] = t9, $[31] = t13) : t13 = $[31];
877
- let node = t13;
853
+ })), $[17] = className, $[18] = shadow, $[19] = t9, $[20] = tone, $[21] = t10) : t10 = $[21];
854
+ const t11 = checkered ? "" : void 0, t12 = disabled ? "" : void 0, t13 = focusRing ? "" : void 0, t14 = pressed ? "" : void 0, t15 = selected ? "" : void 0;
855
+ let t16;
856
+ $[22] !== as || $[23] !== radius || $[24] !== rest || $[25] !== style || $[26] !== t10 || $[27] !== t11 || $[28] !== t12 || $[29] !== t13 || $[30] !== t14 || $[31] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Card", ...rest, as, className: t10, "data-checkered": t11, "data-disabled": t12, "data-focus-ring": t13, "data-pressed": t14, "data-selected": t15, radius, style }), $[22] = as, $[23] = radius, $[24] = rest, $[25] = style, $[26] = t10, $[27] = t11, $[28] = t12, $[29] = t13, $[30] = t14, $[31] = t15, $[32] = t16) : t16 = $[32];
857
+ let node = t16;
878
858
  if (scheme === context.scheme && tone === context.tone)
879
859
  return node;
880
- const t14 = parent?.compat_provider, t15 = tone ?? context.tone;
881
- let t16;
882
- if ($[32] !== node || $[33] !== scheme || $[34] !== t14 || $[35] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { compat_provider: t14, rendered: !0, scheme, tone: t15, children: node }), $[32] = node, $[33] = scheme, $[34] = t14, $[35] = t15, $[36] = t16) : t16 = $[36], node = t16, parent?.compat_provider) {
883
- const t17 = tone ?? context.tone;
884
- let t18;
885
- return $[37] !== node || $[38] !== parent.compat_provider || $[39] !== scheme || $[40] !== t17 ? (t18 = react.createElement(parent.compat_provider, {
860
+ const t17 = parent?.compat_provider, t18 = tone ?? context.tone;
861
+ let t19;
862
+ if ($[33] !== node || $[34] !== scheme || $[35] !== t17 || $[36] !== t18 ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { compat_provider: t17, rendered: !0, scheme, tone: t18, children: node }), $[33] = node, $[34] = scheme, $[35] = t17, $[36] = t18, $[37] = t19) : t19 = $[37], node = t19, parent?.compat_provider) {
863
+ const t20 = tone ?? context.tone;
864
+ let t21;
865
+ return $[38] !== node || $[39] !== parent.compat_provider || $[40] !== scheme || $[41] !== t20 ? (t21 = react.createElement(parent.compat_provider, {
886
866
  children: node,
887
867
  scheme,
888
- tone: t17
889
- }), $[37] = node, $[38] = parent.compat_provider, $[39] = scheme, $[40] = t17, $[41] = t18) : t18 = $[41], t18;
868
+ tone: t20
869
+ }), $[38] = node, $[39] = parent.compat_provider, $[40] = scheme, $[41] = t20, $[42] = t21) : t21 = $[42], t21;
890
870
  }
891
871
  return node;
892
- });
893
- Card.displayName = "ForwardRef(Card)";
894
- const Checkbox = react.forwardRef(function(props, forwardedRef) {
895
- const $ = reactCompilerRuntime.c(31);
896
- let checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;
897
- $[0] !== props ? ({
872
+ }
873
+ Card.displayName = "Card";
874
+ const DEFAULT_CHECKBOX_ELEMENT = "input";
875
+ function Checkbox(props) {
876
+ const $ = reactCompilerRuntime.c(34), t0 = props;
877
+ let checked, className, customValidity, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
878
+ $[0] !== t0 ? ({
879
+ as: t1,
898
880
  checked,
899
881
  className,
900
882
  disabled,
901
883
  indeterminate,
902
884
  customValidity,
903
885
  readOnly,
886
+ ref: forwardedRef,
904
887
  style,
905
- ...restProps
906
- } = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = indeterminate, $[6] = readOnly, $[7] = restProps, $[8] = style) : (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], indeterminate = $[5], readOnly = $[6], restProps = $[7], style = $[8]);
907
- const ref = react.useRef(null);
908
- let t0;
909
- $[9] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], react.useImperativeHandle(forwardedRef, t0);
910
- let t1, t2;
911
- $[10] !== indeterminate ? (t1 = () => {
888
+ ...rest
889
+ } = t0, $[0] = t0, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = forwardedRef, $[6] = indeterminate, $[7] = readOnly, $[8] = rest, $[9] = style, $[10] = t1) : (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], forwardedRef = $[5], indeterminate = $[6], readOnly = $[7], rest = $[8], style = $[9], t1 = $[10]);
890
+ const Element2 = t1 === void 0 ? DEFAULT_CHECKBOX_ELEMENT : t1, ref = react.useRef(null);
891
+ let t2;
892
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], react.useImperativeHandle(forwardedRef, t2);
893
+ let t3, t4;
894
+ $[12] !== indeterminate ? (t3 = () => {
912
895
  ref.current && (ref.current.indeterminate = indeterminate || !1);
913
- }, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2) : (t1 = $[11], t2 = $[12]), react.useEffect(t1, t2), useCustomValidity(ref, customValidity);
914
- let t3;
915
- $[13] !== className ? (t3 = css.composeClassNames(className, css.checkbox()), $[13] = className, $[14] = t3) : t3 = $[14];
916
- let t4;
917
- $[15] !== className ? (t4 = css.composeClassNames(className, css.checkboxInput()), $[15] = className, $[16] = t4) : t4 = $[16];
918
- const t5 = disabled ? "" : void 0, t6 = !disabled && readOnly ? "" : void 0, t7 = customValidity ? "" : void 0, t8 = disabled || readOnly;
919
- let t9;
920
- $[17] !== checked || $[18] !== readOnly || $[19] !== restProps || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx("input", { ...restProps, checked, className: t4, "data-disabled": t5, "data-read-only": t6, "data-error": t7, disabled: t8, type: "checkbox", readOnly, ref }), $[17] = checked, $[18] = readOnly, $[19] = restProps, $[20] = t4, $[21] = t5, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25];
921
- let t10;
922
- $[26] === Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
896
+ }, t4 = [indeterminate], $[12] = indeterminate, $[13] = t3, $[14] = t4) : (t3 = $[13], t4 = $[14]), react.useEffect(t3, t4), useCustomValidity(ref, customValidity);
897
+ let t5;
898
+ $[15] !== className ? (t5 = css.composeClassNames(className, css.checkbox()), $[15] = className, $[16] = t5) : t5 = $[16];
899
+ let t6;
900
+ $[17] !== className ? (t6 = css.composeClassNames(className, css.checkboxInput()), $[17] = className, $[18] = t6) : t6 = $[18];
901
+ const t7 = disabled ? "" : void 0, t8 = !disabled && readOnly ? "" : void 0, t9 = customValidity ? "" : void 0, t10 = disabled || readOnly;
902
+ let t11;
903
+ $[19] !== Element2 || $[20] !== checked || $[21] !== readOnly || $[22] !== rest || $[23] !== t10 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, checked, className: t6, "data-disabled": t7, "data-read-only": t8, "data-error": t9, disabled: t10, type: "checkbox", readOnly, ref }), $[19] = Element2, $[20] = checked, $[21] = readOnly, $[22] = rest, $[23] = t10, $[24] = t6, $[25] = t7, $[26] = t8, $[27] = t9, $[28] = t11) : t11 = $[28];
904
+ let t12;
905
+ $[29] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
923
906
  /* @__PURE__ */ jsxRuntime.jsx(icons.CheckmarkIcon, {}),
924
907
  /* @__PURE__ */ jsxRuntime.jsx(icons.RemoveIcon, {})
925
- ] }), $[26] = t10) : t10 = $[26];
926
- let t11;
927
- return $[27] !== style || $[28] !== t3 || $[29] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: t3, "data-ui": "Checkbox", style, children: [
928
- t9,
929
- t10
930
- ] }), $[27] = style, $[28] = t3, $[29] = t9, $[30] = t11) : t11 = $[30], t11;
931
- });
932
- Checkbox.displayName = "ForwardRef(Checkbox)";
908
+ ] }), $[29] = t12) : t12 = $[29];
909
+ let t13;
910
+ return $[30] !== style || $[31] !== t11 || $[32] !== t5 ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: t5, "data-ui": "Checkbox", style, children: [
911
+ t11,
912
+ t12
913
+ ] }), $[30] = style, $[31] = t11, $[32] = t5, $[33] = t13) : t13 = $[33], t13;
914
+ }
915
+ Checkbox.displayName = "Checkbox";
933
916
  const LazyRefractor = react.lazy(() => Promise.resolve().then(function() {
934
917
  return require("./refractor.js");
935
- })), Code = react.forwardRef(function(props, ref) {
936
- const $ = reactCompilerRuntime.c(26);
937
- let children, className, languageProp, restProps, t0, t1, weight;
938
- $[0] !== props ? ({
939
- as: t0,
918
+ })), DEFAULT_CODE_ELEMENT = "pre";
919
+ function Code(props) {
920
+ const $ = reactCompilerRuntime.c(25), t0 = props;
921
+ let children, className, languageProp, rest, t1, t2, weight;
922
+ $[0] !== t0 ? ({
923
+ as: t1,
940
924
  children,
941
925
  className,
942
926
  language: languageProp,
943
- size: t1,
927
+ size: t2,
944
928
  weight,
945
- ...restProps
946
- } = props, $[0] = props, $[1] = children, $[2] = className, $[3] = languageProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = weight) : (children = $[1], className = $[2], languageProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], weight = $[7]);
947
- const As = t0 === void 0 ? "pre" : t0, size2 = t1 === void 0 ? 2 : t1, language = typeof languageProp == "string" ? languageProp : void 0;
948
- let t2;
949
- $[8] !== className || $[9] !== size2 || $[10] !== weight ? (t2 = css.composeClassNames(className, css.code({
929
+ ...rest
930
+ } = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = languageProp, $[4] = rest, $[5] = t1, $[6] = t2, $[7] = weight) : (children = $[1], className = $[2], languageProp = $[3], rest = $[4], t1 = $[5], t2 = $[6], weight = $[7]);
931
+ const Element2 = t1 === void 0 ? DEFAULT_CODE_ELEMENT : t1, size2 = t2 === void 0 ? 2 : t2, language = typeof languageProp == "string" ? languageProp : void 0;
932
+ let t3;
933
+ $[8] !== className || $[9] !== size2 || $[10] !== weight ? (t3 = css.composeClassNames(className, css.code({
950
934
  size: size2,
951
935
  weight
952
- })), $[8] = className, $[9] = size2, $[10] = weight, $[11] = t2) : t2 = $[11];
953
- let t3;
954
- $[12] !== children ? (t3 = /* @__PURE__ */ jsxRuntime.jsx("code", { children }), $[12] = children, $[13] = t3) : t3 = $[13];
936
+ })), $[8] = className, $[9] = size2, $[10] = weight, $[11] = t3) : t3 = $[11];
955
937
  let t4;
956
- $[14] !== children || $[15] !== language ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(LazyRefractor, { language, value: children }), $[14] = children, $[15] = language, $[16] = t4) : t4 = $[16];
938
+ $[12] !== children ? (t4 = /* @__PURE__ */ jsxRuntime.jsx("code", { children }), $[12] = children, $[13] = t4) : t4 = $[13];
957
939
  let t5;
958
- $[17] !== t3 || $[18] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: t3, children: t4 }), $[17] = t3, $[18] = t4, $[19] = t5) : t5 = $[19];
940
+ $[14] !== children || $[15] !== language ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(LazyRefractor, { language, value: children }), $[14] = children, $[15] = language, $[16] = t5) : t5 = $[16];
959
941
  let t6;
960
- return $[20] !== As || $[21] !== ref || $[22] !== restProps || $[23] !== t2 || $[24] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(As, { "data-ui": "Code", ...restProps, className: t2, ref, children: t5 }), $[20] = As, $[21] = ref, $[22] = restProps, $[23] = t2, $[24] = t5, $[25] = t6) : t6 = $[25], t6;
961
- });
962
- Code.displayName = "ForwardRef(Code)";
963
- const Container = react.forwardRef(function(props, ref) {
964
- const $ = reactCompilerRuntime.c(15);
965
- let as, className, restProps, t0, t1;
966
- $[0] !== props ? ({
967
- as,
942
+ $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: t4, children: t5 }), $[17] = t4, $[18] = t5, $[19] = t6) : t6 = $[19];
943
+ let t7;
944
+ return $[20] !== Element2 || $[21] !== rest || $[22] !== t3 || $[23] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Code", ...rest, className: t3, children: t6 }), $[20] = Element2, $[21] = rest, $[22] = t3, $[23] = t6, $[24] = t7) : t7 = $[24], t7;
945
+ }
946
+ Code.displayName = "Code";
947
+ const DEFAULT_CONTAINER_ELEMENT = "div";
948
+ function Container(props) {
949
+ const $ = reactCompilerRuntime.c(12), t0 = props;
950
+ let className, rest, t1, t2;
951
+ $[0] !== t0 ? ({
952
+ as: t1,
968
953
  className,
969
- sizing: t0,
970
- width: t1,
971
- ...restProps
972
- } = props, $[0] = props, $[1] = as, $[2] = className, $[3] = restProps, $[4] = t0, $[5] = t1) : (as = $[1], className = $[2], restProps = $[3], t0 = $[4], t1 = $[5]);
973
- const sizing = t0 === void 0 ? "border" : t0, width = t1 === void 0 ? 2 : t1;
974
- let t2;
975
- $[6] !== className || $[7] !== width ? (t2 = css.composeClassNames(className, css.container({
954
+ width: t2,
955
+ ...rest
956
+ } = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1, $[4] = t2) : (className = $[1], rest = $[2], t1 = $[3], t2 = $[4]);
957
+ const as = t1 === void 0 ? DEFAULT_CONTAINER_ELEMENT : t1, width = t2 === void 0 ? 2 : t2;
958
+ let t3;
959
+ $[5] !== className || $[6] !== width ? (t3 = css.composeClassNames(className, css.container({
976
960
  width
977
- })), $[6] = className, $[7] = width, $[8] = t2) : t2 = $[8];
961
+ })), $[5] = className, $[6] = width, $[7] = t3) : t3 = $[7];
962
+ let t4;
963
+ return $[8] !== as || $[9] !== rest || $[10] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Container", ...rest, as, className: t3 }), $[8] = as, $[9] = rest, $[10] = t3, $[11] = t4) : t4 = $[11], t4;
964
+ }
965
+ Container.displayName = "Container";
966
+ const DEFAULT_FLEX_ELEMENT = "div";
967
+ function Flex(props) {
968
+ const $ = reactCompilerRuntime.c(8), t0 = props;
969
+ let rest, t1, t2;
970
+ $[0] !== t0 ? ({
971
+ as: t1,
972
+ direction: t2,
973
+ ...rest
974
+ } = t0, $[0] = t0, $[1] = rest, $[2] = t1, $[3] = t2) : (rest = $[1], t1 = $[2], t2 = $[3]);
975
+ const as = t1 === void 0 ? DEFAULT_FLEX_ELEMENT : t1, direction = t2 === void 0 ? "row" : t2;
978
976
  let t3;
979
- return $[9] !== as || $[10] !== ref || $[11] !== restProps || $[12] !== sizing || $[13] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Container", ...restProps, as, className: t2, ref, sizing }), $[9] = as, $[10] = ref, $[11] = restProps, $[12] = sizing, $[13] = t2, $[14] = t3) : t3 = $[14], t3;
980
- });
981
- Container.displayName = "ForwardRef(Container)";
982
- const Flex = react.forwardRef(function(props, ref) {
983
- const $ = reactCompilerRuntime.c(9);
984
- let as, restProps, t0;
985
- $[0] !== props ? ({
986
- as,
987
- direction: t0,
988
- ...restProps
989
- } = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
990
- const direction = t0 === void 0 ? "row" : t0;
991
- let t1;
992
- return $[4] !== as || $[5] !== direction || $[6] !== ref || $[7] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Flex", ...restProps, as, direction, display: "flex", ref }), $[4] = as, $[5] = direction, $[6] = ref, $[7] = restProps, $[8] = t1) : t1 = $[8], t1;
993
- });
994
- Flex.displayName = "ForwardRef(Flex)";
995
- const Grid = react.forwardRef(function(props, ref) {
996
- const $ = reactCompilerRuntime.c(9);
997
- let as, children, restProps;
998
- $[0] !== props ? ({
999
- as,
977
+ return $[4] !== as || $[5] !== direction || $[6] !== rest ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Flex", ...rest, as, direction, display: "flex" }), $[4] = as, $[5] = direction, $[6] = rest, $[7] = t3) : t3 = $[7], t3;
978
+ }
979
+ Flex.displayName = "Flex";
980
+ const DEFAULT_GRID_ELEMENT = "div";
981
+ function Grid(props) {
982
+ const $ = reactCompilerRuntime.c(8), t0 = props;
983
+ let children, rest, t1;
984
+ $[0] !== t0 ? ({
985
+ as: t1,
1000
986
  children,
1001
- ...restProps
1002
- } = props, $[0] = props, $[1] = as, $[2] = children, $[3] = restProps) : (as = $[1], children = $[2], restProps = $[3]);
1003
- let t0;
1004
- return $[4] !== as || $[5] !== children || $[6] !== ref || $[7] !== restProps ? (t0 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Grid", ...restProps, as, display: "grid", ref, children }), $[4] = as, $[5] = children, $[6] = ref, $[7] = restProps, $[8] = t0) : t0 = $[8], t0;
1005
- });
1006
- Grid.displayName = "ForwardRef(Grid)";
1007
- const Heading = react.forwardRef(function(props, ref) {
1008
- const $ = reactCompilerRuntime.c(31);
1009
- let align, children, className, flex, restProps, t0, t1, t2, t3, textOverflowProp, weight;
1010
- $[0] !== props ? ({
1011
- accent: t0,
987
+ ...rest
988
+ } = t0, $[0] = t0, $[1] = children, $[2] = rest, $[3] = t1) : (children = $[1], rest = $[2], t1 = $[3]);
989
+ const as = t1 === void 0 ? DEFAULT_GRID_ELEMENT : t1;
990
+ let t2;
991
+ return $[4] !== as || $[5] !== children || $[6] !== rest ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Grid", ...rest, as, display: "grid", children }), $[4] = as, $[5] = children, $[6] = rest, $[7] = t2) : t2 = $[7], t2;
992
+ }
993
+ Grid.displayName = "Grid";
994
+ const DEFAULT_HEADING_ELEMENT = "div";
995
+ function Heading(props) {
996
+ const $ = reactCompilerRuntime.c(30), t0 = props;
997
+ let align, children, className, flex, rest, t1, t2, t3, t4, textOverflowProp, weight;
998
+ $[0] !== t0 ? ({
999
+ accent: t1,
1012
1000
  align,
1013
- as: t1,
1001
+ as: t2,
1014
1002
  children,
1015
1003
  className,
1016
1004
  flex,
1017
- muted: t2,
1018
- size: t3,
1005
+ muted: t3,
1006
+ size: t4,
1019
1007
  textOverflow: textOverflowProp,
1020
1008
  weight,
1021
- ...restProps
1022
- } = props, $[0] = props, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = textOverflowProp, $[11] = weight) : (align = $[1], children = $[2], className = $[3], flex = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], textOverflowProp = $[10], weight = $[11]);
1023
- const accent = t0 === void 0 ? !1 : t0, As = t1 === void 0 ? "div" : t1, muted = t2 === void 0 ? !1 : t2, size2 = t3 === void 0 ? 2 : t3;
1024
- let t4;
1025
- $[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (t4 = css.composeClassNames(className, css.heading({
1009
+ ...rest
1010
+ } = t0, $[0] = t0, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3, $[9] = t4, $[10] = textOverflowProp, $[11] = weight) : (align = $[1], children = $[2], className = $[3], flex = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8], t4 = $[9], textOverflowProp = $[10], weight = $[11]);
1011
+ const accent = t1 === void 0 ? !1 : t1, Element2 = t2 === void 0 ? DEFAULT_HEADING_ELEMENT : t2, muted = t3 === void 0 ? !1 : t3, size2 = t4 === void 0 ? 2 : t4;
1012
+ let t5;
1013
+ $[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (t5 = css.composeClassNames(className, css.heading({
1026
1014
  accent,
1027
1015
  align,
1028
1016
  flex,
1029
1017
  muted,
1030
1018
  size: size2,
1031
1019
  weight
1032
- })), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] = t4) : t4 = $[19];
1033
- let t5;
1034
- $[20] !== textOverflowProp ? (t5 = css.textOverflow({
1035
- textOverflow: textOverflowProp
1036
- }), $[20] = textOverflowProp, $[21] = t5) : t5 = $[21];
1020
+ })), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] = t5) : t5 = $[19];
1037
1021
  let t6;
1038
- $[22] !== children || $[23] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t5, children }), $[22] = children, $[23] = t5, $[24] = t6) : t6 = $[24];
1022
+ $[20] !== textOverflowProp ? (t6 = css.textOverflow({
1023
+ textOverflow: textOverflowProp
1024
+ }), $[20] = textOverflowProp, $[21] = t6) : t6 = $[21];
1039
1025
  let t7;
1040
- return $[25] !== As || $[26] !== ref || $[27] !== restProps || $[28] !== t4 || $[29] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(As, { "data-ui": "Heading", ...restProps, className: t4, ref, children: t6 }), $[25] = As, $[26] = ref, $[27] = restProps, $[28] = t4, $[29] = t6, $[30] = t7) : t7 = $[30], t7;
1041
- });
1042
- Heading.displayName = "ForwardRef(Heading)";
1043
- const Inline = react.forwardRef(function(props, ref) {
1044
- const $ = reactCompilerRuntime.c(18);
1045
- let as, childrenProp, gap, gapX, gapY, restProps, space;
1046
- $[0] !== props ? ({
1047
- as,
1048
- children: childrenProp,
1026
+ $[22] !== children || $[23] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t6, children }), $[22] = children, $[23] = t6, $[24] = t7) : t7 = $[24];
1027
+ let t8;
1028
+ return $[25] !== Element2 || $[26] !== rest || $[27] !== t5 || $[28] !== t7 ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Heading", ...rest, className: t5, children: t7 }), $[25] = Element2, $[26] = rest, $[27] = t5, $[28] = t7, $[29] = t8) : t8 = $[29], t8;
1029
+ }
1030
+ Heading.displayName = "Heading";
1031
+ const DEFAULT_INLINE_ELEMENT = "div";
1032
+ function Inline(props) {
1033
+ const $ = reactCompilerRuntime.c(11), t0 = props;
1034
+ let children, gap, rest, space, t1;
1035
+ $[0] !== t0 ? ({
1036
+ as: t1,
1037
+ children,
1049
1038
  gap,
1050
- gapX,
1051
- gapY,
1052
1039
  space,
1053
- ...restProps
1054
- } = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = gap, $[4] = gapX, $[5] = gapY, $[6] = restProps, $[7] = space) : (as = $[1], childrenProp = $[2], gap = $[3], gapX = $[4], gapY = $[5], restProps = $[6], space = $[7]);
1055
- let t0, t1;
1056
- $[8] !== childrenProp ? (t1 = react.Children.map(childrenProp, _temp$3), $[8] = childrenProp, $[9] = t1) : t1 = $[9], t0 = t1;
1057
- const children = t0, t2 = gap ?? space;
1040
+ ...rest
1041
+ } = t0, $[0] = t0, $[1] = children, $[2] = gap, $[3] = rest, $[4] = space, $[5] = t1) : (children = $[1], gap = $[2], rest = $[3], space = $[4], t1 = $[5]);
1042
+ const as = t1 === void 0 ? DEFAULT_INLINE_ELEMENT : t1, t2 = gap ?? space;
1058
1043
  let t3;
1059
- return $[10] !== as || $[11] !== children || $[12] !== gapX || $[13] !== gapY || $[14] !== ref || $[15] !== restProps || $[16] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Inline", ...restProps, align: "center", as, display: "flex", gap: t2, gapX, gapY, ref, wrap: "wrap", children }), $[10] = as, $[11] = children, $[12] = gapX, $[13] = gapY, $[14] = ref, $[15] = restProps, $[16] = t2, $[17] = t3) : t3 = $[17], t3;
1060
- });
1061
- Inline.displayName = "ForwardRef(Inline)";
1062
- function _temp$3(child) {
1063
- return child && /* @__PURE__ */ jsxRuntime.jsx(Box, { maxWidth: "fill", children: child });
1064
- }
1065
- const KBD = react.forwardRef(function(props, ref) {
1066
- const $ = reactCompilerRuntime.c(23);
1067
- let children, className, restProps, t0, t1, t2, t3, t4;
1068
- $[0] !== props ? ({
1069
- as: t0,
1044
+ return $[6] !== as || $[7] !== children || $[8] !== rest || $[9] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Inline", ...rest, align: "center", as, display: "flex", gap: t2, wrap: "wrap", children }), $[6] = as, $[7] = children, $[8] = rest, $[9] = t2, $[10] = t3) : t3 = $[10], t3;
1045
+ }
1046
+ Inline.displayName = "Inline";
1047
+ const DEFAULT_KBD_ELEMENT = "kbd";
1048
+ function KBD(props) {
1049
+ const $ = reactCompilerRuntime.c(22), t0 = props;
1050
+ let children, className, rest, t1, t2, t3, t4, t5;
1051
+ $[0] !== t0 ? ({
1052
+ as: t1,
1070
1053
  children,
1071
1054
  className,
1072
- display: t1,
1073
- fontSize: t2,
1074
- padding: t3,
1075
- radius: t4,
1076
- ...restProps
1077
- } = props, $[0] = props, $[1] = children, $[2] = className, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4) : (children = $[1], className = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8]);
1078
- const as = t0 === void 0 ? "kbd" : t0, display = t1 === void 0 ? "inline-block" : t1, fontSize = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 1 : t3, radius = t4 === void 0 ? 2 : t4;
1079
- let t5;
1080
- $[9] !== className || $[10] !== radius ? (t5 = css.composeClassNames(className, css.kbd({
1081
- radius
1082
- })), $[9] = className, $[10] = radius, $[11] = t5) : t5 = $[11];
1083
- let t6;
1084
- $[12] !== children || $[13] !== fontSize ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", muted: !0, size: fontSize, weight: "semibold", children }), $[12] = children, $[13] = fontSize, $[14] = t6) : t6 = $[14];
1055
+ display: t2,
1056
+ fontSize: t3,
1057
+ padding: t4,
1058
+ radius: t5,
1059
+ ...rest
1060
+ } = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5) : (children = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8]);
1061
+ const as = t1 === void 0 ? DEFAULT_KBD_ELEMENT : t1, display = t2 === void 0 ? "inline-block" : t2, fontSize = t3 === void 0 ? 0 : t3, padding = t4 === void 0 ? 1 : t4, radius = t5 === void 0 ? 2 : t5, t6 = as;
1085
1062
  let t7;
1086
- return $[15] !== as || $[16] !== display || $[17] !== padding || $[18] !== ref || $[19] !== restProps || $[20] !== t5 || $[21] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "KBD", ...restProps, as, className: t5, display, muted: !0, padding, ref, children: t6 }), $[15] = as, $[16] = display, $[17] = padding, $[18] = ref, $[19] = restProps, $[20] = t5, $[21] = t6, $[22] = t7) : t7 = $[22], t7;
1087
- });
1088
- KBD.displayName = "ForwardRef(KBD)";
1063
+ $[9] !== className || $[10] !== radius ? (t7 = css.composeClassNames(className, css.kbd({
1064
+ radius
1065
+ })), $[9] = className, $[10] = radius, $[11] = t7) : t7 = $[11];
1066
+ let t8;
1067
+ $[12] !== children || $[13] !== fontSize ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", muted: !0, size: fontSize, weight: "semibold", children }), $[12] = children, $[13] = fontSize, $[14] = t8) : t8 = $[14];
1068
+ let t9;
1069
+ return $[15] !== display || $[16] !== padding || $[17] !== rest || $[18] !== t6 || $[19] !== t7 || $[20] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "KBD", ...rest, as: t6, className: t7, display, muted: !0, padding, children: t8 }), $[15] = display, $[16] = padding, $[17] = rest, $[18] = t6, $[19] = t7, $[20] = t8, $[21] = t9) : t9 = $[21], t9;
1070
+ }
1071
+ KBD.displayName = "KBD";
1089
1072
  const origin = {
1090
1073
  name: "@sanity/ui/origin",
1091
1074
  fn({
@@ -1153,20 +1136,20 @@ function getRoundedCommands(points) {
1153
1136
  function compileCommands(cmds) {
1154
1137
  return cmds.map((n, idx) => n.type === "point" ? `${idx === 0 ? "M" : "L"} ${n.x} ${n.y}` : n.type === "curve" ? `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}` : "").join(" ");
1155
1138
  }
1156
- const Arrow = react.forwardRef(function(props, ref) {
1157
- const $ = reactCompilerRuntime.c(31);
1158
- let h, restProps, style, t0, w;
1159
- $[0] !== props ? ({
1139
+ const DEFAULT_ARROW_ELEMENT = "div";
1140
+ function Arrow(props) {
1141
+ const $ = reactCompilerRuntime.c(31), t0 = props;
1142
+ let h, rest, style, t1, t2, w;
1143
+ $[0] !== t0 ? ({
1144
+ as: t1,
1160
1145
  width: w,
1161
1146
  height: h,
1162
- radius: t0,
1147
+ radius: t2,
1163
1148
  style,
1164
- ...restProps
1165
- } = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = style, $[4] = t0, $[5] = w) : (h = $[1], restProps = $[2], style = $[3], t0 = $[4], w = $[5]);
1166
- const radius = t0 === void 0 ? 0 : t0, {
1167
- card
1168
- } = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2;
1169
- let t1;
1149
+ ...rest
1150
+ } = t0, $[0] = t0, $[1] = h, $[2] = rest, $[3] = style, $[4] = t1, $[5] = t2, $[6] = w) : (h = $[1], rest = $[2], style = $[3], t1 = $[4], t2 = $[5], w = $[6]);
1151
+ const Element2 = t1 === void 0 ? DEFAULT_ARROW_ELEMENT : t1, radius = t2 === void 0 ? 0 : t2, center = w / 2;
1152
+ let t3;
1170
1153
  const points = [{
1171
1154
  x: 0,
1172
1155
  y: 0
@@ -1186,38 +1169,39 @@ const Arrow = react.forwardRef(function(props, ref) {
1186
1169
  x: w,
1187
1170
  y: 0
1188
1171
  }], cmds = getRoundedCommands(points);
1189
- t1 = compileCommands(cmds);
1190
- const path = t1, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`;
1191
- let t2;
1192
- $[6] === Symbol.for("react.memo_cache_sentinel") ? (t2 = css._arrow(), $[6] = t2) : t2 = $[6];
1193
- const t3 = `${w}px`;
1172
+ t3 = compileCommands(cmds);
1173
+ const path = t3, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`;
1194
1174
  let t4;
1195
- $[7] !== style || $[8] !== t3 ? (t4 = {
1175
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = css._arrow(), $[7] = t4) : t4 = $[7];
1176
+ const t5 = `${w}px`;
1177
+ let t6;
1178
+ $[8] !== style || $[9] !== t5 ? (t6 = {
1196
1179
  ...style,
1197
- "--arrow-size": t3
1198
- }, $[7] = style, $[8] = t3, $[9] = t4) : t4 = $[9];
1199
- const t5 = t4, t6 = `0 0 ${w} ${w}`;
1200
- let t7;
1201
- $[10] !== strokeWidth || $[11] !== w ? (t7 = /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: strokeWidth, width: w, height: w, fill: "white" }) }), $[10] = strokeWidth, $[11] = w, $[12] = t7) : t7 = $[12];
1202
- let t8;
1203
- $[13] === Symbol.for("react.memo_cache_sentinel") ? (t8 = css._arrowStroke(), $[13] = t8) : t8 = $[13];
1204
- const t9 = strokeWidth * 2;
1180
+ "--arrow-size": t5
1181
+ }, $[8] = style, $[9] = t5, $[10] = t6) : t6 = $[10];
1182
+ const t7 = t6, t8 = `0 0 ${w} ${w}`;
1183
+ let t9;
1184
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css._arrowStrokeMask(), $[11] = t9) : t9 = $[11];
1205
1185
  let t10;
1206
- $[14] !== strokePath || $[15] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsx("path", { className: t8, d: strokePath, mask: "url(#stroke-mask)", strokeWidth: t9 }), $[14] = strokePath, $[15] = t9, $[16] = t10) : t10 = $[16];
1186
+ $[12] !== w ? (t10 = /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { className: t9, x: 0, width: w, height: w, fill: "white" }) }), $[12] = w, $[13] = t10) : t10 = $[13];
1207
1187
  let t11;
1208
- $[17] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css._arrowShape(), $[17] = t11) : t11 = $[17];
1188
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css._arrowStroke(), $[14] = t11) : t11 = $[14];
1209
1189
  let t12;
1210
- $[18] !== fillPath ? (t12 = /* @__PURE__ */ jsxRuntime.jsx("path", { className: t11, d: fillPath }), $[18] = fillPath, $[19] = t12) : t12 = $[19];
1190
+ $[15] !== strokePath ? (t12 = /* @__PURE__ */ jsxRuntime.jsx("path", { className: t11, d: strokePath, mask: "url(#stroke-mask)" }), $[15] = strokePath, $[16] = t12) : t12 = $[16];
1211
1191
  let t13;
1212
- $[20] !== t10 || $[21] !== t12 || $[22] !== t6 || $[23] !== t7 || $[24] !== w ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: w, height: w, viewBox: t6, children: [
1213
- t7,
1214
- t10,
1215
- t12
1216
- ] }), $[20] = t10, $[21] = t12, $[22] = t6, $[23] = t7, $[24] = w, $[25] = t13) : t13 = $[25];
1192
+ $[17] === Symbol.for("react.memo_cache_sentinel") ? (t13 = css._arrowShape(), $[17] = t13) : t13 = $[17];
1217
1193
  let t14;
1218
- return $[26] !== ref || $[27] !== restProps || $[28] !== t13 || $[29] !== t5 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("div", { ...restProps, className: t2, ref, style: t5, children: t13 }), $[26] = ref, $[27] = restProps, $[28] = t13, $[29] = t5, $[30] = t14) : t14 = $[30], t14;
1219
- });
1220
- Arrow.displayName = "ForwardRef(Arrow)";
1194
+ $[18] !== fillPath ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("path", { className: t13, d: fillPath }), $[18] = fillPath, $[19] = t14) : t14 = $[19];
1195
+ let t15;
1196
+ $[20] !== t10 || $[21] !== t12 || $[22] !== t14 || $[23] !== t8 || $[24] !== w ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: w, height: w, viewBox: t8, children: [
1197
+ t10,
1198
+ t12,
1199
+ t14
1200
+ ] }), $[20] = t10, $[21] = t12, $[22] = t14, $[23] = t8, $[24] = w, $[25] = t15) : t15 = $[25];
1201
+ let t16;
1202
+ return $[26] !== Element2 || $[27] !== rest || $[28] !== t15 || $[29] !== t7 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, className: t4, style: t7, children: t15 }), $[26] = Element2, $[27] = rest, $[28] = t15, $[29] = t7, $[30] = t16) : t16 = $[30], t16;
1203
+ }
1204
+ Arrow.displayName = "Arrow";
1221
1205
  const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
1222
1206
  function BoundaryElementProvider(props) {
1223
1207
  const $ = reactCompilerRuntime.c(5), {
@@ -1247,14 +1231,6 @@ function useBoundaryElement() {
1247
1231
  throw new Error("useBoundaryElement(): the context value is not compatible");
1248
1232
  return value || DEFAULT_VALUE;
1249
1233
  }
1250
- function ConditionalWrapper({
1251
- children,
1252
- condition,
1253
- wrapper
1254
- }) {
1255
- return condition ? wrapper(children) : children;
1256
- }
1257
- ConditionalWrapper.displayName = "ConditionalWrapper";
1258
1234
  function findMaxBreakpoints(media2, width) {
1259
1235
  const ret = [];
1260
1236
  for (let i = 0; i < media2.length; i += 1)
@@ -1267,40 +1243,43 @@ function findMinBreakpoints(media2, width) {
1267
1243
  media2[i] <= width && ret.push(i);
1268
1244
  return ret;
1269
1245
  }
1270
- const ElementQuery = react.forwardRef(function(props, forwardedRef) {
1271
- const $ = reactCompilerRuntime.c(18), theme2 = useTheme_v2();
1272
- let _media, children, restProps;
1273
- $[0] !== props ? ({
1246
+ const DEFAULT_ELEMENT_QUERY_ELEMENT = "div", DEFAULT_BREAKPOINTS = Object.values(css.BREAKPOINTS);
1247
+ function ElementQuery(props) {
1248
+ const $ = reactCompilerRuntime.c(21), t0 = props;
1249
+ let children, forwardedRef, mediaProp, rest, t1;
1250
+ $[0] !== t0 ? ({
1251
+ as: t1,
1274
1252
  children,
1275
- media: _media,
1276
- ...restProps
1277
- } = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
1278
- const media2 = _media ?? theme2.media, [element, setElement] = react.useState(null), elementSize = useElementSize(element);
1279
- let t0;
1280
- t0 = elementSize?.border.width ?? window.innerWidth;
1281
- const width = t0;
1282
- let t1, t2;
1283
- if ($[4] !== media2 || $[5] !== width) {
1284
- const eq = findMaxBreakpoints(media2, width);
1285
- t2 = eq.length ? eq.join(" ") : void 0, $[4] = media2, $[5] = width, $[6] = t2;
1286
- } else
1287
- t2 = $[6];
1288
- t1 = t2;
1289
- const max = t1;
1253
+ media: mediaProp,
1254
+ ref: forwardedRef,
1255
+ ...rest
1256
+ } = t0, $[0] = t0, $[1] = children, $[2] = forwardedRef, $[3] = mediaProp, $[4] = rest, $[5] = t1) : (children = $[1], forwardedRef = $[2], mediaProp = $[3], rest = $[4], t1 = $[5]);
1257
+ const Element2 = t1 === void 0 ? DEFAULT_ELEMENT_QUERY_ELEMENT : t1, breakpoints = mediaProp ?? DEFAULT_BREAKPOINTS, [element, setElement] = react.useState(null), elementSize = useElementSize(element);
1258
+ let t2;
1259
+ t2 = elementSize?.border.width ?? window.innerWidth;
1260
+ const width = t2;
1290
1261
  let t3, t4;
1291
- if ($[7] !== media2 || $[8] !== width) {
1292
- const eq_0 = findMinBreakpoints(media2, width);
1293
- t4 = eq_0.length ? eq_0.join(" ") : void 0, $[7] = media2, $[8] = width, $[9] = t4;
1262
+ if ($[6] !== breakpoints || $[7] !== width) {
1263
+ const eq = findMaxBreakpoints(breakpoints, width);
1264
+ t4 = eq.length ? eq.join(" ") : void 0, $[6] = breakpoints, $[7] = width, $[8] = t4;
1294
1265
  } else
1295
- t4 = $[9];
1266
+ t4 = $[8];
1296
1267
  t3 = t4;
1297
- const min = t3;
1268
+ const max = t3;
1298
1269
  let t5, t6;
1299
- $[10] !== element ? (t5 = () => element, t6 = [element], $[10] = element, $[11] = t5, $[12] = t6) : (t5 = $[11], t6 = $[12]), react.useImperativeHandle(forwardedRef, t5, t6);
1300
- let t7;
1301
- return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[13] = children, $[14] = max, $[15] = min, $[16] = restProps, $[17] = t7) : t7 = $[17], t7;
1302
- });
1303
- ElementQuery.displayName = "ForwardRef(ElementQuery)";
1270
+ if ($[9] !== breakpoints || $[10] !== width) {
1271
+ const eq_0 = findMinBreakpoints(breakpoints, width);
1272
+ t6 = eq_0.length ? eq_0.join(" ") : void 0, $[9] = breakpoints, $[10] = width, $[11] = t6;
1273
+ } else
1274
+ t6 = $[11];
1275
+ t5 = t6;
1276
+ const min = t5;
1277
+ let t7, t8;
1278
+ $[12] !== element ? (t7 = () => element, t8 = [element], $[12] = element, $[13] = t7, $[14] = t8) : (t7 = $[13], t8 = $[14]), react.useImperativeHandle(forwardedRef, t7, t8);
1279
+ let t9;
1280
+ return $[15] !== Element2 || $[16] !== children || $[17] !== max || $[18] !== min || $[19] !== rest ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "ElementQuery", ...rest, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[15] = Element2, $[16] = children, $[17] = max, $[18] = min, $[19] = rest, $[20] = t9) : t9 = $[20], t9;
1281
+ }
1282
+ ElementQuery.displayName = "ElementQuery";
1304
1283
  function getLayerContext(contextValue) {
1305
1284
  if (!isRecord(contextValue) || contextValue.version !== 0)
1306
1285
  throw new Error("the context value is not compatible");
@@ -1311,6 +1290,60 @@ function getLayerContext(contextValue) {
1311
1290
  throw new Error("could not get layer context");
1312
1291
  }
1313
1292
  const LayerContext = createGlobalScopedContext("@sanity/ui/context/layer", null);
1293
+ function useLayer() {
1294
+ const $ = reactCompilerRuntime.c(2), value = react.useContext(LayerContext);
1295
+ if (!value)
1296
+ throw new Error("useLayer(): missing context value");
1297
+ try {
1298
+ let t1;
1299
+ return $[0] !== value ? (t1 = getLayerContext(value), $[0] = value, $[1] = t1) : t1 = $[1], t1;
1300
+ } catch (t0) {
1301
+ const err = t0;
1302
+ throw err instanceof Error ? new Error(`useLayer(): ${err.message}`) : new Error(`useLayer(): ${err}`);
1303
+ }
1304
+ }
1305
+ const DEFAULT_LAYER_CARD_ELEMENT = "div";
1306
+ function LayerCard(props) {
1307
+ const $ = reactCompilerRuntime.c(27), t0 = props;
1308
+ let children, forwardedRef, onActivate, onFocus, rest, t1, t2, t3;
1309
+ $[0] !== t0 ? ({
1310
+ as: t1,
1311
+ children,
1312
+ onActivate,
1313
+ onFocus,
1314
+ position: t2,
1315
+ ref: forwardedRef,
1316
+ style: t3,
1317
+ ...rest
1318
+ } = t0, $[0] = t0, $[1] = children, $[2] = forwardedRef, $[3] = onActivate, $[4] = onFocus, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3) : (children = $[1], forwardedRef = $[2], onActivate = $[3], onFocus = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8]);
1319
+ const as = t1 === void 0 ? DEFAULT_LAYER_CARD_ELEMENT : t1, position = t2 === void 0 ? "relative" : t2, style = t3 === void 0 ? EMPTY_RECORD : t3, {
1320
+ zIndex,
1321
+ isTopLayer
1322
+ } = useLayer(), lastFocusedRef = react.useRef(null), ref = react.useRef(null), isTopLayerRef = react.useRef(isTopLayer);
1323
+ let t4;
1324
+ $[9] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[9] = t4) : t4 = $[9], react.useImperativeHandle(forwardedRef, t4);
1325
+ let t5, t6;
1326
+ $[10] !== isTopLayer || $[11] !== onActivate ? (t5 = () => {
1327
+ isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({
1328
+ activeElement: lastFocusedRef.current
1329
+ }), isTopLayerRef.current = isTopLayer;
1330
+ }, t6 = [isTopLayer, onActivate], $[10] = isTopLayer, $[11] = onActivate, $[12] = t5, $[13] = t6) : (t5 = $[12], t6 = $[13]), react.useEffect(t5, t6);
1331
+ let t7;
1332
+ $[14] !== isTopLayer || $[15] !== onFocus ? (t7 = (event) => {
1333
+ onFocus?.(event);
1334
+ const rootElement = ref.current, target = document.activeElement;
1335
+ !isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
1336
+ }, $[14] = isTopLayer, $[15] = onFocus, $[16] = t7) : t7 = $[16];
1337
+ const handleFocus = t7, t8 = as;
1338
+ let t9;
1339
+ $[17] !== style || $[18] !== zIndex ? (t9 = {
1340
+ ...style,
1341
+ zIndex
1342
+ }, $[17] = style, $[18] = zIndex, $[19] = t9) : t9 = $[19];
1343
+ let t10;
1344
+ return $[20] !== children || $[21] !== handleFocus || $[22] !== position || $[23] !== rest || $[24] !== t8 || $[25] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(Card, { "data-ui": "Layer", ...rest, as: t8, onFocus: handleFocus, position, ref, style: t9, children }), $[20] = children, $[21] = handleFocus, $[22] = position, $[23] = rest, $[24] = t8, $[25] = t9, $[26] = t10) : t10 = $[26], t10;
1345
+ }
1346
+ LayerCard.displayName = "LayerCard";
1314
1347
  function LayerProvider(props) {
1315
1348
  const $ = reactCompilerRuntime.c(19), {
1316
1349
  children,
@@ -1363,70 +1396,23 @@ function _temp$2(v) {
1363
1396
  return v + 1;
1364
1397
  }
1365
1398
  LayerProvider.displayName = "LayerProvider";
1366
- function useLayer() {
1367
- const $ = reactCompilerRuntime.c(2), value = react.useContext(LayerContext);
1368
- if (!value)
1369
- throw new Error("useLayer(): missing context value");
1370
- try {
1371
- let t1;
1372
- return $[0] !== value ? (t1 = getLayerContext(value), $[0] = value, $[1] = t1) : t1 = $[1], t1;
1373
- } catch (t0) {
1374
- const err = t0;
1375
- throw err instanceof Error ? new Error(`useLayer(): ${err.message}`) : new Error(`useLayer(): ${err}`);
1376
- }
1377
- }
1378
- const LayerChildren = react.forwardRef(function(props, forwardedRef) {
1379
- const $ = reactCompilerRuntime.c(24);
1380
- let children, onActivate, onFocus, restProps, t0, t1;
1381
- $[0] !== props ? ({
1382
- children,
1383
- onActivate,
1384
- onFocus,
1385
- position: t0,
1386
- style: t1,
1387
- ...restProps
1388
- } = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0, $[6] = t1) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5], t1 = $[6]);
1389
- const position = t0 === void 0 ? "relative" : t0, style = t1 === void 0 ? EMPTY_RECORD : t1, {
1390
- zIndex,
1391
- isTopLayer
1392
- } = useLayer(), lastFocusedRef = react.useRef(null), ref = react.useRef(null), isTopLayerRef = react.useRef(isTopLayer);
1393
- let t2;
1394
- $[7] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[7] = t2) : t2 = $[7], react.useImperativeHandle(forwardedRef, t2);
1395
- let t3, t4;
1396
- $[8] !== isTopLayer || $[9] !== onActivate ? (t3 = () => {
1397
- isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({
1398
- activeElement: lastFocusedRef.current
1399
- }), isTopLayerRef.current = isTopLayer;
1400
- }, t4 = [isTopLayer, onActivate], $[8] = isTopLayer, $[9] = onActivate, $[10] = t3, $[11] = t4) : (t3 = $[10], t4 = $[11]), react.useEffect(t3, t4);
1401
- let t5;
1402
- $[12] !== isTopLayer || $[13] !== onFocus ? (t5 = (event) => {
1403
- onFocus?.(event);
1404
- const rootElement = ref.current, target = document.activeElement;
1405
- !isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
1406
- }, $[12] = isTopLayer, $[13] = onFocus, $[14] = t5) : t5 = $[14];
1407
- const handleFocus = t5;
1408
- let t6;
1409
- $[15] !== style || $[16] !== zIndex ? (t6 = {
1410
- ...style,
1411
- zIndex
1412
- }, $[15] = style, $[16] = zIndex, $[17] = t6) : t6 = $[17];
1413
- let t7;
1414
- return $[18] !== children || $[19] !== handleFocus || $[20] !== position || $[21] !== restProps || $[22] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Layer", ...restProps, onFocus: handleFocus, position, ref, style: t6, children }), $[18] = children, $[19] = handleFocus, $[20] = position, $[21] = restProps, $[22] = t6, $[23] = t7) : t7 = $[23], t7;
1415
- }), Layer = react.forwardRef(function(props, ref) {
1416
- const $ = reactCompilerRuntime.c(11);
1417
- let children, restProps, t0;
1418
- $[0] !== props ? ({
1399
+ const DEFAULT_LAYER_ELEMENT = "div";
1400
+ function Layer(props) {
1401
+ const $ = reactCompilerRuntime.c(12), t0 = props;
1402
+ let children, rest, t1, t2;
1403
+ $[0] !== t0 ? ({
1404
+ as: t1,
1419
1405
  children,
1420
- zOffset: t0,
1421
- ...restProps
1422
- } = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
1423
- const zOffset = t0 === void 0 ? 1 : t0;
1424
- let t1;
1425
- $[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(LayerChildren, { ...restProps, ref, children }), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];
1426
- let t2;
1427
- return $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: t1 }), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;
1428
- });
1429
- Layer.displayName = "ForwardRef(Layer)";
1406
+ zOffset: t2,
1407
+ ...rest
1408
+ } = t0, $[0] = t0, $[1] = children, $[2] = rest, $[3] = t1, $[4] = t2) : (children = $[1], rest = $[2], t1 = $[3], t2 = $[4]);
1409
+ const as = t1 === void 0 ? DEFAULT_LAYER_ELEMENT : t1, zOffset = t2 === void 0 ? 1 : t2;
1410
+ let t3;
1411
+ $[5] !== as || $[6] !== children || $[7] !== rest ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(LayerCard, { ...rest, as, children }), $[5] = as, $[6] = children, $[7] = rest, $[8] = t3) : t3 = $[8];
1412
+ let t4;
1413
+ return $[9] !== t3 || $[10] !== zOffset ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: t3 }), $[9] = t3, $[10] = zOffset, $[11] = t4) : t4 = $[11], t4;
1414
+ }
1415
+ Layer.displayName = "Layer";
1430
1416
  const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`);
1431
1417
  globalScope[elementKey] = null;
1432
1418
  const defaultContextValue = {
@@ -1499,53 +1485,45 @@ function _isEqual(objA, objB) {
1499
1485
  const keysA = Object.keys(objA), keysB = Object.keys(objB);
1500
1486
  return keysA.length !== keysB.length ? !1 : keysA.every((key2) => objA[key2] === objB[key2]);
1501
1487
  }
1502
- const SrOnly = react.forwardRef(function(props, ref) {
1503
- const $ = reactCompilerRuntime.c(13);
1504
- let children, className, rest, t0;
1505
- $[0] !== props ? ({
1506
- as: t0,
1488
+ const DEFAULT_SR_ONLY_ELEMENT = "span";
1489
+ function SrOnly(props) {
1490
+ const $ = reactCompilerRuntime.c(12), t0 = props;
1491
+ let children, className, rest, t1;
1492
+ $[0] !== t0 ? ({
1493
+ as: t1,
1507
1494
  children,
1508
1495
  className,
1509
1496
  ...rest
1510
- } = props, $[0] = props, $[1] = children, $[2] = className, $[3] = rest, $[4] = t0) : (children = $[1], className = $[2], rest = $[3], t0 = $[4]);
1511
- const As = t0 === void 0 ? "div" : t0;
1512
- let t1;
1513
- $[5] !== className ? (t1 = css.composeClassNames(className, css.srOnly()), $[5] = className, $[6] = t1) : t1 = $[6];
1497
+ } = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1) : (children = $[1], className = $[2], rest = $[3], t1 = $[4]);
1498
+ const Element2 = t1 === void 0 ? DEFAULT_SR_ONLY_ELEMENT : t1;
1514
1499
  let t2;
1515
- return $[7] !== As || $[8] !== children || $[9] !== ref || $[10] !== rest || $[11] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(As, { "data-ui": "SrOnly", ...rest, "aria-hidden": !0, className: t1, ref, children }), $[7] = As, $[8] = children, $[9] = ref, $[10] = rest, $[11] = t1, $[12] = t2) : t2 = $[12], t2;
1516
- });
1517
- SrOnly.displayName = "ForwardRef(SrOnly)";
1518
- const VirtualList = react.forwardRef(function(props, forwardedRef) {
1519
- const $ = reactCompilerRuntime.c(56);
1520
- let getItemKey, onChange, renderItem, restProps, t0, t1, t2;
1521
- $[0] !== props ? ({
1522
- as: t0,
1523
- gap: t1,
1500
+ $[5] !== className ? (t2 = css.composeClassNames(className, css.srOnly()), $[5] = className, $[6] = t2) : t2 = $[6];
1501
+ let t3;
1502
+ return $[7] !== Element2 || $[8] !== children || $[9] !== rest || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "SrOnly", ...rest, "aria-hidden": !0, className: t2, children }), $[7] = Element2, $[8] = children, $[9] = rest, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
1503
+ }
1504
+ SrOnly.displayName = "SrOnly";
1505
+ const DEFAULT_VIRTUAL_LIST_ELEMENT = "div";
1506
+ function VirtualList(props) {
1507
+ const $ = reactCompilerRuntime.c(58), t0 = props;
1508
+ let forwardedRef, getItemKey, onChange, renderItem, rest, t1, t2, t3;
1509
+ $[0] !== t0 ? ({
1510
+ as: t1,
1511
+ gap: t2,
1524
1512
  getItemKey,
1525
- items: t2,
1513
+ items: t3,
1526
1514
  onChange,
1527
1515
  renderItem,
1528
- ...restProps
1529
- } = props, $[0] = props, $[1] = getItemKey, $[2] = onChange, $[3] = renderItem, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2) : (getItemKey = $[1], onChange = $[2], renderItem = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7]);
1530
- const as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1;
1531
- let t3;
1532
- $[8] !== t2 ? (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3) : t3 = $[9];
1533
- const items = t3, {
1534
- space
1535
- } = useTheme_v2(), ref = react.useRef(null), wrapperRef = react.useRef(null), [scrollTop, setScrollTop] = react.useState(0), [scrollHeight, setScrollHeight] = react.useState(0), [itemHeight, setItemHeight] = react.useState(-1);
1516
+ ref: forwardedRef,
1517
+ ...rest
1518
+ } = t0, $[0] = t0, $[1] = forwardedRef, $[2] = getItemKey, $[3] = onChange, $[4] = renderItem, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3) : (forwardedRef = $[1], getItemKey = $[2], onChange = $[3], renderItem = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8]);
1519
+ const as = t1 === void 0 ? DEFAULT_VIRTUAL_LIST_ELEMENT : t1, gap = t2 === void 0 ? 0 : t2;
1536
1520
  let t4;
1537
- $[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], react.useImperativeHandle(forwardedRef, t4);
1521
+ $[9] !== t3 ? (t4 = t3 === void 0 ? [] : t3, $[9] = t3, $[10] = t4) : t4 = $[10];
1522
+ const items = t4, ref = react.useRef(null), wrapperRef = react.useRef(null), [scrollTop, setScrollTop] = react.useState(0), [scrollHeight, setScrollHeight] = react.useState(0), [itemHeight, setItemHeight] = react.useState(-1), [gapValue, setGapValue] = react.useState(0);
1538
1523
  let t5;
1539
- $[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => {
1540
- if (!wrapperRef.current)
1541
- return;
1542
- const firstElement = wrapperRef.current.firstChild;
1543
- firstElement instanceof HTMLElement && setItemHeight(firstElement.offsetHeight);
1544
- }, $[11] = t5) : t5 = $[11];
1545
- let t6;
1546
- $[12] !== renderItem ? (t6 = [renderItem], $[12] = renderItem, $[13] = t6) : t6 = $[13], react.useEffect(t5, t6);
1547
- let t7, t8;
1548
- $[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => {
1524
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[11] = t5) : t5 = $[11], react.useImperativeHandle(forwardedRef, t5);
1525
+ let t6, t7;
1526
+ $[12] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => {
1549
1527
  if (!ref.current)
1550
1528
  return;
1551
1529
  const scrollEl = findScrollable(ref.current.parentNode);
@@ -1575,57 +1553,71 @@ const VirtualList = react.forwardRef(function(props, forwardedRef) {
1575
1553
  }), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
1576
1554
  window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
1577
1555
  };
1578
- }, t8 = [], $[14] = t7, $[15] = t8) : (t7 = $[14], t8 = $[15]), react.useEffect(t7, t8);
1579
- const len = items.length, height = itemHeight ? len * (itemHeight + space[gap]) - space[gap] : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
1580
- let t10, t9;
1581
- $[16] !== fromIndex || $[17] !== gap || $[18] !== itemHeight || $[19] !== onChange || $[20] !== scrollHeight || $[21] !== scrollTop || $[22] !== space || $[23] !== toIndex ? (t9 = () => {
1582
- onChange && onChange({
1556
+ }, t7 = [], $[12] = t6, $[13] = t7) : (t6 = $[12], t7 = $[13]), react.useEffect(t6, t7);
1557
+ const len = items.length, height = itemHeight ? len * (itemHeight + gapValue) - gapValue : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
1558
+ let t8, t9;
1559
+ $[14] !== fromIndex || $[15] !== gapValue || $[16] !== itemHeight || $[17] !== onChange || $[18] !== scrollHeight || $[19] !== scrollTop || $[20] !== toIndex ? (t8 = () => {
1560
+ onChange?.({
1583
1561
  fromIndex,
1584
- gap: space[gap],
1562
+ gap: gapValue,
1585
1563
  itemHeight,
1586
1564
  scrollHeight,
1587
1565
  scrollTop,
1588
1566
  toIndex
1589
1567
  });
1590
- }, t10 = [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex], $[16] = fromIndex, $[17] = gap, $[18] = itemHeight, $[19] = onChange, $[20] = scrollHeight, $[21] = scrollTop, $[22] = space, $[23] = toIndex, $[24] = t10, $[25] = t9) : (t10 = $[24], t9 = $[25]), react.useEffect(t9, t10);
1591
- let t11;
1568
+ }, t9 = [fromIndex, gapValue, itemHeight, onChange, scrollHeight, scrollTop, toIndex], $[14] = fromIndex, $[15] = gapValue, $[16] = itemHeight, $[17] = onChange, $[18] = scrollHeight, $[19] = scrollTop, $[20] = toIndex, $[21] = t8, $[22] = t9) : (t8 = $[21], t9 = $[22]), react.useEffect(t8, t9);
1569
+ let t10;
1592
1570
  bb0: {
1593
1571
  if (!renderItem || items.length === 0) {
1594
- t11 = null;
1572
+ t10 = null;
1595
1573
  break bb0;
1596
1574
  }
1597
1575
  if (itemHeight === -1) {
1598
- let t123;
1599
- $[26] !== items[0] || $[27] !== renderItem ? (t123 = renderItem(items[0]), $[26] = items[0], $[27] = renderItem, $[28] = t123) : t123 = $[28];
1576
+ let t113;
1577
+ $[23] === Symbol.for("react.memo_cache_sentinel") ? (t113 = (el) => el ? setItemHeight(el.offsetHeight) : void 0, $[23] = t113) : t113 = $[23];
1578
+ let t122;
1579
+ $[24] !== items[0] || $[25] !== renderItem ? (t122 = renderItem(items[0]), $[24] = items[0], $[25] = renderItem, $[26] = t122) : t122 = $[26];
1600
1580
  let t132;
1601
- $[29] !== t123 ? (t132 = [/* @__PURE__ */ jsxRuntime.jsx(Box, { insetTop: 0, insetLeft: 0, insetRight: 0, position: "absolute", children: t123 }, 0)], $[29] = t123, $[30] = t132) : t132 = $[30], t11 = t132;
1581
+ $[27] !== t122 ? (t132 = /* @__PURE__ */ jsxRuntime.jsx(Box, { ref: t113, insetTop: 0, insetLeft: 0, insetRight: 0, position: "absolute", children: t122 }, 0), $[27] = t122, $[28] = t132) : t132 = $[28];
1582
+ let t142;
1583
+ $[29] === Symbol.for("react.memo_cache_sentinel") ? (t142 = (el_0) => el_0 ? setGapValue(el_0.offsetHeight) : void 0, $[29] = t142) : t142 = $[29];
1584
+ const t15 = css.vars.space[gap];
1585
+ let t16;
1586
+ $[30] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: t142, style: {
1587
+ height: t15
1588
+ } }), $[30] = t15, $[31] = t16) : t16 = $[31];
1589
+ let t17;
1590
+ $[32] !== t132 || $[33] !== t16 ? (t17 = [/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1591
+ t132,
1592
+ t16
1593
+ ] })], $[32] = t132, $[33] = t16, $[34] = t17) : t17 = $[34], t10 = t17;
1602
1594
  break bb0;
1603
1595
  }
1604
- let t122;
1605
- if ($[31] !== fromIndex || $[32] !== gap || $[33] !== getItemKey || $[34] !== itemHeight || $[35] !== items || $[36] !== renderItem || $[37] !== space || $[38] !== toIndex) {
1606
- let t132;
1607
- $[40] !== fromIndex || $[41] !== gap || $[42] !== getItemKey || $[43] !== itemHeight || $[44] !== renderItem || $[45] !== space ? (t132 = (item, _itemIndex) => {
1596
+ let t112;
1597
+ if ($[35] !== fromIndex || $[36] !== gapValue || $[37] !== getItemKey || $[38] !== itemHeight || $[39] !== items || $[40] !== renderItem || $[41] !== toIndex) {
1598
+ let t122;
1599
+ $[43] !== fromIndex || $[44] !== gapValue || $[45] !== getItemKey || $[46] !== itemHeight || $[47] !== renderItem ? (t122 = (item, _itemIndex) => {
1608
1600
  const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
1609
1601
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { insetLeft: 0, insetRight: 0, position: "absolute", style: {
1610
- top: itemIndex * (itemHeight + space[gap])
1602
+ top: itemIndex * (itemHeight + gapValue) - gapValue
1611
1603
  }, children: node }, key2);
1612
- }, $[40] = fromIndex, $[41] = gap, $[42] = getItemKey, $[43] = itemHeight, $[44] = renderItem, $[45] = space, $[46] = t132) : t132 = $[46], t122 = items.slice(fromIndex, toIndex).map(t132), $[31] = fromIndex, $[32] = gap, $[33] = getItemKey, $[34] = itemHeight, $[35] = items, $[36] = renderItem, $[37] = space, $[38] = toIndex, $[39] = t122;
1604
+ }, $[43] = fromIndex, $[44] = gapValue, $[45] = getItemKey, $[46] = itemHeight, $[47] = renderItem, $[48] = t122) : t122 = $[48], t112 = items.slice(fromIndex, toIndex).map(t122), $[35] = fromIndex, $[36] = gapValue, $[37] = getItemKey, $[38] = itemHeight, $[39] = items, $[40] = renderItem, $[41] = toIndex, $[42] = t112;
1613
1605
  } else
1614
- t122 = $[39];
1615
- t11 = t122;
1606
+ t112 = $[42];
1607
+ t10 = t112;
1616
1608
  }
1617
- const children = t11;
1618
- let t12, t13;
1619
- $[47] !== height ? (t13 = {
1609
+ const children = t10;
1610
+ let t11, t12;
1611
+ $[49] !== height ? (t12 = {
1620
1612
  height
1621
- }, $[47] = height, $[48] = t13) : t13 = $[48], t12 = t13;
1622
- const wrapperStyle = t12;
1613
+ }, $[49] = height, $[50] = t12) : t12 = $[50], t11 = t12;
1614
+ const wrapperStyle = t11;
1615
+ let t13;
1616
+ $[51] !== children || $[52] !== wrapperStyle ? (t13 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[51] = children, $[52] = wrapperStyle, $[53] = t13) : t13 = $[53];
1623
1617
  let t14;
1624
- $[49] !== children || $[50] !== wrapperStyle ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[49] = children, $[50] = wrapperStyle, $[51] = t14) : t14 = $[51];
1625
- let t15;
1626
- return $[52] !== as || $[53] !== restProps || $[54] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Box, { as, "data-ui": "VirtualList", ...restProps, position: "relative", ref, children: t14 }), $[52] = as, $[53] = restProps, $[54] = t14, $[55] = t15) : t15 = $[55], t15;
1627
- });
1628
- VirtualList.displayName = "ForwardRef(VirtualList)";
1618
+ return $[54] !== as || $[55] !== rest || $[56] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "VirtualList", ...rest, as, position: "relative", ref, children: t13 }), $[54] = as, $[55] = rest, $[56] = t13, $[57] = t14) : t14 = $[57], t14;
1619
+ }
1620
+ VirtualList.displayName = "VirtualList";
1629
1621
  function findScrollable(parentNode) {
1630
1622
  let _scrollEl = parentNode;
1631
1623
  for (; _scrollEl && !_isScrollable(_scrollEl); )
@@ -1687,16 +1679,18 @@ function size(options) {
1687
1679
  }
1688
1680
  };
1689
1681
  }
1690
- const MotionCard$1 = framerMotion.motion.create(Card), PopoverCard = react.memo(react.forwardRef(function(props, ref) {
1691
- const $ = reactCompilerRuntime.c(74);
1692
- let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, maxWidth, originX, originY, overflow, padding, placement, radius, referenceWidth, restProps, scheme, shadow, strategy, style, tone, xProp, yProp;
1693
- $[0] !== props ? ({
1682
+ const DEFAULT_POPOVER_CARD_ELEMENT = "div", MotionCard$1 = framerMotion.motion.create(Card);
1683
+ function PopoverCard(props) {
1684
+ const $ = reactCompilerRuntime.c(68), t0 = props;
1685
+ let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, maxWidth, originX, originY, overflow, padding, placement, radius, referenceWidth, rest, shadow, strategy, style, t1, t2, xProp, yProp;
1686
+ $[0] !== t0 ? ({
1694
1687
  __unstable_margins: marginsProp,
1695
1688
  animate,
1696
1689
  arrow,
1697
1690
  arrowRef,
1698
1691
  arrowX,
1699
1692
  arrowY,
1693
+ as: t1,
1700
1694
  children,
1701
1695
  maxWidth,
1702
1696
  padding,
@@ -1706,85 +1700,84 @@ const MotionCard$1 = framerMotion.motion.create(Card), PopoverCard = react.memo(
1706
1700
  overflow,
1707
1701
  radius,
1708
1702
  referenceWidth,
1709
- scheme,
1710
1703
  shadow,
1711
1704
  strategy,
1712
1705
  style,
1713
- tone,
1706
+ tone: t2,
1714
1707
  x: xProp,
1715
1708
  y: yProp,
1716
- ...restProps
1717
- } = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = maxWidth, $[9] = originX, $[10] = originY, $[11] = overflow, $[12] = padding, $[13] = placement, $[14] = radius, $[15] = referenceWidth, $[16] = restProps, $[17] = scheme, $[18] = shadow, $[19] = strategy, $[20] = style, $[21] = tone, $[22] = xProp, $[23] = yProp) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], maxWidth = $[8], originX = $[9], originY = $[10], overflow = $[11], padding = $[12], placement = $[13], radius = $[14], referenceWidth = $[15], restProps = $[16], scheme = $[17], shadow = $[18], strategy = $[19], style = $[20], tone = $[21], xProp = $[22], yProp = $[23]);
1718
- const card = useCard(), layer = useLayer();
1719
- let t0;
1720
- t0 = marginsProp || DEFAULT_POPOVER_MARGINS;
1721
- const margins = t0, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
1722
- let t1;
1723
- const t2 = layer.zIndex ?? 100, t3 = animate ? "transform" : void 0;
1709
+ ...rest
1710
+ } = t0, $[0] = t0, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = maxWidth, $[9] = originX, $[10] = originY, $[11] = overflow, $[12] = padding, $[13] = placement, $[14] = radius, $[15] = referenceWidth, $[16] = rest, $[17] = shadow, $[18] = strategy, $[19] = style, $[20] = t1, $[21] = t2, $[22] = xProp, $[23] = yProp) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], maxWidth = $[8], originX = $[9], originY = $[10], overflow = $[11], padding = $[12], placement = $[13], radius = $[14], referenceWidth = $[15], rest = $[16], shadow = $[17], strategy = $[18], style = $[19], t1 = $[20], t2 = $[21], xProp = $[22], yProp = $[23]);
1711
+ const as = t1 === void 0 ? DEFAULT_POPOVER_CARD_ELEMENT : t1, tone = t2 === void 0 ? "inherit" : t2, layer = useLayer();
1712
+ let t3;
1713
+ t3 = marginsProp || DEFAULT_POPOVER_MARGINS;
1714
+ const margins = t3, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
1724
1715
  let t4;
1725
- $[24] !== originX || $[25] !== originY || $[26] !== referenceWidth || $[27] !== strategy || $[28] !== style || $[29] !== t2 || $[30] !== t3 || $[31] !== x || $[32] !== y ? (t4 = {
1716
+ const t5 = layer.zIndex ?? 100, t6 = animate ? "transform" : void 0;
1717
+ let t7;
1718
+ $[24] !== originX || $[25] !== originY || $[26] !== referenceWidth || $[27] !== strategy || $[28] !== style || $[29] !== t5 || $[30] !== t6 || $[31] !== x || $[32] !== y ? (t7 = {
1726
1719
  left: x,
1727
1720
  originX,
1728
1721
  originY,
1729
1722
  position: strategy,
1730
1723
  top: y,
1731
1724
  width: referenceWidth,
1732
- zIndex: t2,
1733
- willChange: t3,
1725
+ zIndex: t5,
1726
+ willChange: t6,
1734
1727
  ...style
1735
- }, $[24] = originX, $[25] = originY, $[26] = referenceWidth, $[27] = strategy, $[28] = style, $[29] = t2, $[30] = t3, $[31] = x, $[32] = y, $[33] = t4) : t4 = $[33], t1 = t4;
1736
- const rootStyle = t1;
1737
- let t5;
1738
- const t6 = arrowX !== null ? arrowX : void 0, t7 = arrowY !== null ? arrowY : void 0;
1728
+ }, $[24] = originX, $[25] = originY, $[26] = referenceWidth, $[27] = strategy, $[28] = style, $[29] = t5, $[30] = t6, $[31] = x, $[32] = y, $[33] = t7) : t7 = $[33], t4 = t7;
1729
+ const rootStyle = t4;
1739
1730
  let t8;
1740
- $[34] !== t6 || $[35] !== t7 ? (t8 = {
1741
- left: t6,
1742
- top: t7,
1731
+ const t9 = arrowX !== null ? arrowX : void 0, t10 = arrowY !== null ? arrowY : void 0;
1732
+ let t11;
1733
+ $[34] !== t10 || $[35] !== t9 ? (t11 = {
1734
+ left: t9,
1735
+ top: t10,
1743
1736
  right: void 0,
1744
1737
  bottom: void 0
1745
- }, $[34] = t6, $[35] = t7, $[36] = t8) : t8 = $[36], t5 = t8;
1746
- const arrowStyle = t5, t9 = card?.tone ?? "transparent", t10 = card?.scheme ?? "light";
1747
- let t11;
1748
- $[37] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css.popoverCard(), $[37] = t11) : t11 = $[37];
1749
- const t12 = restProps, t13 = card?.tone ?? "transparent";
1738
+ }, $[34] = t10, $[35] = t9, $[36] = t11) : t11 = $[36], t8 = t11;
1739
+ const arrowStyle = t8;
1740
+ let t12;
1741
+ $[37] === Symbol.for("react.memo_cache_sentinel") ? (t12 = css.popoverCard(), $[37] = t12) : t12 = $[37];
1742
+ let t13;
1743
+ $[38] !== animate ? (t13 = animate ? ["hidden", "initial"] : void 0, $[38] = animate, $[39] = t13) : t13 = $[39];
1750
1744
  let t14;
1751
- $[38] !== animate ? (t14 = animate ? ["hidden", "initial"] : void 0, $[38] = animate, $[39] = t14) : t14 = $[39];
1745
+ $[40] !== animate ? (t14 = animate ? ["visible", "scaleIn"] : void 0, $[40] = animate, $[41] = t14) : t14 = $[41];
1752
1746
  let t15;
1753
- $[40] !== animate ? (t15 = animate ? ["visible", "scaleIn"] : void 0, $[40] = animate, $[41] = t15) : t15 = $[41];
1747
+ $[42] !== animate ? (t15 = animate ? ["hidden", "scaleOut"] : void 0, $[42] = animate, $[43] = t15) : t15 = $[43];
1754
1748
  let t16;
1755
- $[42] !== animate ? (t16 = animate ? ["hidden", "scaleOut"] : void 0, $[42] = animate, $[43] = t16) : t16 = $[43];
1749
+ $[44] !== children || $[45] !== padding ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[44] = children, $[45] = padding, $[46] = t16) : t16 = $[46];
1756
1750
  let t17;
1757
- $[44] !== children || $[45] !== padding ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[44] = children, $[45] = padding, $[46] = t17) : t17 = $[46];
1751
+ $[47] !== maxWidth || $[48] !== overflow || $[49] !== t16 ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t16 }), $[47] = maxWidth, $[48] = overflow, $[49] = t16, $[50] = t17) : t17 = $[50];
1758
1752
  let t18;
1759
- $[47] !== maxWidth || $[48] !== overflow || $[49] !== t17 ? (t18 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t17 }), $[47] = maxWidth, $[48] = overflow, $[49] = t17, $[50] = t18) : t18 = $[50];
1753
+ $[51] !== arrow || $[52] !== arrowRef || $[53] !== arrowStyle ? (t18 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[51] = arrow, $[52] = arrowRef, $[53] = arrowStyle, $[54] = t18) : t18 = $[54];
1760
1754
  let t19;
1761
- $[51] !== arrow || $[52] !== arrowRef || $[53] !== arrowStyle ? (t19 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[51] = arrow, $[52] = arrowRef, $[53] = arrowStyle, $[54] = t19) : t19 = $[54];
1762
- let t20;
1763
- $[55] !== placement || $[56] !== radius || $[57] !== ref || $[58] !== rootStyle || $[59] !== scheme || $[60] !== shadow || $[61] !== t12 || $[62] !== t13 || $[63] !== t14 || $[64] !== t15 || $[65] !== t16 || $[66] !== t18 || $[67] !== t19 || $[68] !== tone ? (t20 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { className: t11, "data-ui": "Popover", ...t12, "data-context-tone": t13, "data-placement": placement, direction: "column", display: "flex", radius, ref, scheme, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t14, animate: t15, exit: t16, children: [
1764
- t18,
1765
- t19
1766
- ] }), $[55] = placement, $[56] = radius, $[57] = ref, $[58] = rootStyle, $[59] = scheme, $[60] = shadow, $[61] = t12, $[62] = t13, $[63] = t14, $[64] = t15, $[65] = t16, $[66] = t18, $[67] = t19, $[68] = tone, $[69] = t20) : t20 = $[69];
1767
- let t21;
1768
- return $[70] !== t10 || $[71] !== t20 || $[72] !== t9 ? (t21 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: t9, scheme: t10, children: t20 }), $[70] = t10, $[71] = t20, $[72] = t9, $[73] = t21) : t21 = $[73], t21;
1769
- }));
1770
- PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
1771
- const ViewportOverlay = () => {
1755
+ return $[55] !== as || $[56] !== placement || $[57] !== radius || $[58] !== rest || $[59] !== rootStyle || $[60] !== shadow || $[61] !== t13 || $[62] !== t14 || $[63] !== t15 || $[64] !== t17 || $[65] !== t18 || $[66] !== tone ? (t19 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { className: t12, "data-ui": "Popover", ...rest, as, "data-context-tone": tone, "data-placement": placement, direction: "column", display: "flex", radius, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t13, animate: t14, exit: t15, children: [
1756
+ t17,
1757
+ t18
1758
+ ] }), $[55] = as, $[56] = placement, $[57] = radius, $[58] = rest, $[59] = rootStyle, $[60] = shadow, $[61] = t13, $[62] = t14, $[63] = t15, $[64] = t17, $[65] = t18, $[66] = tone, $[67] = t19) : t19 = $[67], t19;
1759
+ }
1760
+ PopoverCard.displayName = "PopoverCard";
1761
+ const DEFAULT_POPOVER_ELEMENT = "div";
1762
+ function ViewportOverlay() {
1772
1763
  const $ = reactCompilerRuntime.c(2), {
1773
1764
  zIndex
1774
1765
  } = useLayer();
1775
1766
  let t0;
1776
1767
  return $[0] !== zIndex ? (t0 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
1777
- height: "100vh",
1778
- inset: 0,
1779
1768
  position: "fixed",
1769
+ inset: 0,
1780
1770
  width: "100vw",
1771
+ height: "100vh",
1781
1772
  zIndex
1782
1773
  } }), $[0] = zIndex, $[1] = t0) : t0 = $[1], t0;
1783
- }, Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
1774
+ }
1775
+ function Popover(props) {
1784
1776
  const boundaryElementContext = useBoundaryElement(), {
1785
1777
  __unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
1786
1778
  animate: _animate = !1,
1787
1779
  arrow: arrowProp = !1,
1780
+ as = DEFAULT_POPOVER_ELEMENT,
1788
1781
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1789
1782
  boundaryElement = boundaryElementContext.element,
1790
1783
  children: childProp,
@@ -1804,17 +1797,17 @@ const ViewportOverlay = () => {
1804
1797
  portal,
1805
1798
  preventOverflow = !0,
1806
1799
  radius = 3,
1800
+ ref: forwardedRef,
1807
1801
  referenceBoundary = props.boundaryElement ?? boundaryElementContext.element,
1808
1802
  referenceElement,
1809
1803
  scheme,
1810
1804
  shadow = 3,
1811
1805
  tone = "inherit",
1812
1806
  width: widthProp = "auto",
1813
- // zOffset: zOffsetProp = layer.popover.zOffset,
1814
1807
  zOffset: zOffsetProp = Z_OFFSETS.popover,
1815
1808
  updateRef,
1816
- ...restProps
1817
- } = props, animate = usePrefersReducedMotion() ? !1 : _animate, zOffset = useArrayProp(zOffsetProp), ref = react.useRef(null), arrowRef = react.useRef(null), rootBoundary = "viewport";
1809
+ ...rest
1810
+ } = props, card = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate, zOffset = useArrayProp(zOffsetProp), ref = react.useRef(null), arrowRef = react.useRef(null), rootBoundary = "viewport";
1818
1811
  react.useImperativeHandle(forwardedRef, () => ref.current);
1819
1812
  const referenceWidthRef = react.useRef(void 0), middleware = react.useMemo(() => {
1820
1813
  const ret = [];
@@ -1881,337 +1874,333 @@ const ViewportOverlay = () => {
1881
1874
  return childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
1882
1875
  const popover = /* @__PURE__ */ jsxRuntime.jsxs(LayerProvider, { zOffset, children: [
1883
1876
  modal && /* @__PURE__ */ jsxRuntime.jsx(ViewportOverlay, {}),
1884
- /* @__PURE__ */ jsxRuntime.jsx(
1885
- PopoverCard,
1886
- {
1887
- ...restProps,
1888
- __unstable_margins: margins,
1889
- animate,
1890
- arrow: arrowProp,
1891
- arrowRef: setArrow,
1892
- arrowX,
1893
- arrowY,
1894
- hidden: referenceHidden,
1895
- maxWidth: widthProp,
1896
- overflow,
1897
- padding,
1898
- placement,
1899
- radius,
1900
- ref: setFloating,
1901
- scheme,
1902
- shadow,
1903
- originX,
1904
- originY,
1905
- strategy,
1906
- tone,
1907
- x,
1908
- y,
1909
- children: content
1910
- }
1911
- )
1912
- ] }), children = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover);
1877
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...rest, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, hidden: referenceHidden, maxWidth: widthProp, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, x, y, children: content })
1878
+ ] }), children = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: tone === "inherit" ? card?.tone ?? "default" : tone, scheme: scheme ?? "light", children: popover }) }) : popover);
1913
1879
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1914
1880
  animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
1915
1881
  child
1916
1882
  ] });
1917
- }));
1918
- Popover.displayName = "Memo(ForwardRef(Popover))";
1883
+ }
1884
+ Popover.displayName = "Popover";
1919
1885
  function getElementRef$1(element) {
1920
1886
  let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1921
1887
  return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
1922
1888
  }
1923
- const Radio = react.forwardRef(function(props, forwardedRef) {
1924
- const $ = reactCompilerRuntime.c(21);
1925
- let className, customValidity, disabled, readOnly, restProps, style;
1926
- $[0] !== props ? ({
1889
+ const DEFAULT_RADIO_ELEMENT = "input";
1890
+ function Radio(props) {
1891
+ const $ = reactCompilerRuntime.c(24), t0 = props;
1892
+ let className, customValidity, disabled, forwardedRef, readOnly, rest, style, t1;
1893
+ $[0] !== t0 ? ({
1894
+ as: t1,
1927
1895
  className,
1928
1896
  disabled,
1929
1897
  style,
1930
1898
  customValidity,
1931
1899
  readOnly,
1932
- ...restProps
1933
- } = props, $[0] = props, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = style) : (className = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], style = $[6]);
1934
- const ref = react.useRef(null);
1935
- let t0;
1936
- $[7] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[7] = t0) : t0 = $[7], react.useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);
1937
- let t1;
1938
- $[8] !== className ? (t1 = css.composeClassNames(className, css.radio()), $[8] = className, $[9] = t1) : t1 = $[9];
1939
- const t2 = !disabled && readOnly ? "" : void 0, t3 = customValidity ? "" : void 0, t4 = disabled || readOnly;
1940
- let t5;
1941
- $[10] !== readOnly || $[11] !== restProps || $[12] !== t2 || $[13] !== t3 || $[14] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("input", { "data-read-only": t2, "data-error": t3, ...restProps, disabled: t4, readOnly, ref, type: "radio" }), $[10] = readOnly, $[11] = restProps, $[12] = t2, $[13] = t3, $[14] = t4, $[15] = t5) : t5 = $[15];
1942
- let t6;
1943
- $[16] === Symbol.for("react.memo_cache_sentinel") ? (t6 = /* @__PURE__ */ jsxRuntime.jsx("span", {}), $[16] = t6) : t6 = $[16];
1900
+ ref: forwardedRef,
1901
+ ...rest
1902
+ } = t0, $[0] = t0, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = readOnly, $[6] = rest, $[7] = style, $[8] = t1) : (className = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], readOnly = $[5], rest = $[6], style = $[7], t1 = $[8]);
1903
+ const Element2 = t1 === void 0 ? DEFAULT_RADIO_ELEMENT : t1, ref = react.useRef(null);
1904
+ let t2;
1905
+ $[9] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[9] = t2) : t2 = $[9], react.useImperativeHandle(forwardedRef, t2), useCustomValidity(ref, customValidity);
1906
+ let t3;
1907
+ $[10] !== className ? (t3 = css.composeClassNames(className, css.radio()), $[10] = className, $[11] = t3) : t3 = $[11];
1908
+ const t4 = !disabled && readOnly ? "" : void 0, t5 = customValidity ? "" : void 0, t6 = disabled || readOnly;
1944
1909
  let t7;
1945
- return $[17] !== style || $[18] !== t1 || $[19] !== t5 ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t1, "data-ui": "Radio", style, children: [
1946
- t5,
1947
- t6
1948
- ] }), $[17] = style, $[18] = t1, $[19] = t5, $[20] = t7) : t7 = $[20], t7;
1949
- });
1950
- Radio.displayName = "ForwardRef(Radio)";
1951
- const Select = react.forwardRef(function(props, forwardedRef) {
1952
- const $ = reactCompilerRuntime.c(36);
1953
- let children, customValidity, disabled, gap, readOnly, restProps, t0, t1, t2, t3, t4;
1954
- $[0] !== props ? ({
1955
- border: t0,
1910
+ $[12] !== Element2 || $[13] !== readOnly || $[14] !== rest || $[15] !== t4 || $[16] !== t5 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-read-only": t4, "data-error": t5, ...rest, disabled: t6, readOnly, ref, type: "radio" }), $[12] = Element2, $[13] = readOnly, $[14] = rest, $[15] = t4, $[16] = t5, $[17] = t6, $[18] = t7) : t7 = $[18];
1911
+ let t8;
1912
+ $[19] === Symbol.for("react.memo_cache_sentinel") ? (t8 = /* @__PURE__ */ jsxRuntime.jsx("span", {}), $[19] = t8) : t8 = $[19];
1913
+ let t9;
1914
+ return $[20] !== style || $[21] !== t3 || $[22] !== t7 ? (t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t3, "data-ui": "Radio", style, children: [
1915
+ t7,
1916
+ t8
1917
+ ] }), $[20] = style, $[21] = t3, $[22] = t7, $[23] = t9) : t9 = $[23], t9;
1918
+ }
1919
+ Radio.displayName = "Radio";
1920
+ const DEFAULT_SELECT_ELEMENT = "select";
1921
+ function Select(props) {
1922
+ const $ = reactCompilerRuntime.c(39), t0 = props;
1923
+ let children, customValidity, disabled, forwardedRef, gap, readOnly, rest, t1, t2, t3, t4, t5, t6;
1924
+ $[0] !== t0 ? ({
1925
+ as: t1,
1926
+ border: t2,
1956
1927
  children,
1957
1928
  customValidity,
1958
1929
  disabled,
1959
- fontSize: t1,
1930
+ fontSize: t3,
1960
1931
  gap,
1961
- padding: t2,
1962
- radius: t3,
1932
+ padding: t4,
1933
+ radius: t5,
1963
1934
  readOnly,
1964
- space: t4,
1965
- ...restProps
1966
- } = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = gap, $[5] = readOnly, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4) : (children = $[1], customValidity = $[2], disabled = $[3], gap = $[4], readOnly = $[5], restProps = $[6], t0 = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11]);
1967
- const border = t0 === void 0 ? !0 : t0, fontSize = t1 === void 0 ? 2 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 1 : t3, space = t4 === void 0 ? 2 : t4, ref = react.useRef(null);
1968
- let t5;
1969
- $[12] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[12] = t5) : t5 = $[12], react.useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
1970
- const t6 = gap ?? space;
1935
+ ref: forwardedRef,
1936
+ space: t6,
1937
+ ...rest
1938
+ } = t0, $[0] = t0, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = gap, $[6] = readOnly, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = t6) : (children = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], gap = $[5], readOnly = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], t6 = $[13]);
1939
+ const Element2 = t1 === void 0 ? DEFAULT_SELECT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, fontSize = t3 === void 0 ? 2 : t3, padding = t4 === void 0 ? 3 : t4, radius = t5 === void 0 ? 1 : t5, space = t6 === void 0 ? 2 : t6, ref = react.useRef(null);
1971
1940
  let t7;
1972
- $[13] !== border || $[14] !== fontSize || $[15] !== padding || $[16] !== radius || $[17] !== t6 ? (t7 = css.select({
1941
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[14] = t7) : t7 = $[14], react.useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
1942
+ const t8 = gap ?? space;
1943
+ let t9;
1944
+ $[15] !== border || $[16] !== fontSize || $[17] !== padding || $[18] !== radius || $[19] !== t8 ? (t9 = css.select({
1973
1945
  border,
1974
1946
  fontSize,
1975
1947
  padding,
1976
1948
  radius,
1977
- gap: t6
1978
- }), $[13] = border, $[14] = fontSize, $[15] = padding, $[16] = radius, $[17] = t6, $[18] = t7) : t7 = $[18];
1979
- const t8 = !disabled && readOnly ? "" : void 0;
1980
- let t9;
1981
- $[19] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css._inputElement(), $[19] = t9) : t9 = $[19];
1982
- const t10 = disabled || readOnly;
1949
+ gap: t8
1950
+ }), $[15] = border, $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t8, $[20] = t9) : t9 = $[20];
1951
+ const t10 = !disabled && readOnly ? "" : void 0;
1983
1952
  let t11;
1984
- $[20] !== children || $[21] !== restProps || $[22] !== t10 || $[23] !== t8 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("select", { "data-read-only": t8, ...restProps, className: t9, disabled: t10, ref, children }), $[20] = children, $[21] = restProps, $[22] = t10, $[23] = t8, $[24] = t11) : t11 = $[24];
1985
- let t12;
1986
- $[25] === Symbol.for("react.memo_cache_sentinel") ? (t12 = css.selectPresentation(), $[25] = t12) : t12 = $[25];
1953
+ $[21] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css._inputElement(), $[21] = t11) : t11 = $[21];
1954
+ const t12 = disabled || readOnly;
1987
1955
  let t13;
1988
- $[26] === Symbol.for("react.memo_cache_sentinel") ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}), $[26] = t13) : t13 = $[26];
1956
+ $[22] !== Element2 || $[23] !== children || $[24] !== rest || $[25] !== t10 || $[26] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-read-only": t10, ...rest, className: t11, disabled: t12, ref, children }), $[22] = Element2, $[23] = children, $[24] = rest, $[25] = t10, $[26] = t12, $[27] = t13) : t13 = $[27];
1989
1957
  let t14;
1990
- $[27] !== fontSize ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, children: t13 }), $[27] = fontSize, $[28] = t14) : t14 = $[28];
1958
+ $[28] === Symbol.for("react.memo_cache_sentinel") ? (t14 = css.selectPresentation(), $[28] = t14) : t14 = $[28];
1991
1959
  let t15;
1992
- $[29] !== padding || $[30] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t12, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", display: "inline-block", padding, children: t14 }) }), $[29] = padding, $[30] = t14, $[31] = t15) : t15 = $[31];
1960
+ $[29] === Symbol.for("react.memo_cache_sentinel") ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}), $[29] = t15) : t15 = $[29];
1993
1961
  let t16;
1994
- return $[32] !== t11 || $[33] !== t15 || $[34] !== t7 ? (t16 = /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-ui": "Select", className: t7, "data-icon-right": "", children: [
1995
- t11,
1996
- t15
1997
- ] }), $[32] = t11, $[33] = t15, $[34] = t7, $[35] = t16) : t16 = $[35], t16;
1998
- });
1999
- Select.displayName = "ForwardRef(Select)";
2000
- const Stack = react.forwardRef(function(props, ref) {
2001
- const $ = reactCompilerRuntime.c(14);
2002
- let as, className, gap, restProps, space;
2003
- $[0] !== props ? ({
2004
- as,
1962
+ $[30] !== fontSize ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, children: t15 }), $[30] = fontSize, $[31] = t16) : t16 = $[31];
1963
+ let t17;
1964
+ $[32] !== padding || $[33] !== t16 ? (t17 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t14, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", display: "inline-block", padding, children: t16 }) }), $[32] = padding, $[33] = t16, $[34] = t17) : t17 = $[34];
1965
+ let t18;
1966
+ return $[35] !== t13 || $[36] !== t17 || $[37] !== t9 ? (t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-ui": "Select", className: t9, "data-icon-right": "", children: [
1967
+ t13,
1968
+ t17
1969
+ ] }), $[35] = t13, $[36] = t17, $[37] = t9, $[38] = t18) : t18 = $[38], t18;
1970
+ }
1971
+ Select.displayName = "Select";
1972
+ const DEFAULT_STACK_ELEMENT = "div";
1973
+ function Stack(props) {
1974
+ const $ = reactCompilerRuntime.c(13), t0 = props;
1975
+ let className, gap, rest, space, t1;
1976
+ $[0] !== t0 ? ({
1977
+ as: t1,
2005
1978
  className,
2006
1979
  gap,
2007
1980
  space,
2008
- ...restProps
2009
- } = props, $[0] = props, $[1] = as, $[2] = className, $[3] = gap, $[4] = restProps, $[5] = space) : (as = $[1], className = $[2], gap = $[3], restProps = $[4], space = $[5]);
2010
- let t0;
2011
- $[6] !== className ? (t0 = css.composeClassNames(className, css.stack()), $[6] = className, $[7] = t0) : t0 = $[7];
2012
- const t1 = gap ?? space;
1981
+ ...rest
1982
+ } = t0, $[0] = t0, $[1] = className, $[2] = gap, $[3] = rest, $[4] = space, $[5] = t1) : (className = $[1], gap = $[2], rest = $[3], space = $[4], t1 = $[5]);
1983
+ const as = t1 === void 0 ? DEFAULT_STACK_ELEMENT : t1;
2013
1984
  let t2;
2014
- return $[8] !== as || $[9] !== ref || $[10] !== restProps || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Stack", ...restProps, as, autoRows: "min", className: t0, display: "grid", gap: t1, ref }), $[8] = as, $[9] = ref, $[10] = restProps, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
2015
- });
2016
- Stack.displayName = "ForwardRef(Stack)";
2017
- const Switch = react.forwardRef(function(props, forwardedRef) {
2018
- const $ = reactCompilerRuntime.c(28);
2019
- let checked, className, disabled, indeterminate, readOnly, restProps, style;
2020
- $[0] !== props ? ({
1985
+ $[6] !== className ? (t2 = css.composeClassNames(className, css.stack()), $[6] = className, $[7] = t2) : t2 = $[7];
1986
+ const t3 = gap ?? space;
1987
+ let t4;
1988
+ return $[8] !== as || $[9] !== rest || $[10] !== t2 || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Stack", ...rest, as, autoRows: "min", className: t2, display: "grid", gap: t3 }), $[8] = as, $[9] = rest, $[10] = t2, $[11] = t3, $[12] = t4) : t4 = $[12], t4;
1989
+ }
1990
+ Stack.displayName = "Stack";
1991
+ const DEFAULT_SWITCH_ELEMENT = "input";
1992
+ function Switch(props) {
1993
+ const $ = reactCompilerRuntime.c(31), t0 = props;
1994
+ let checked, className, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
1995
+ $[0] !== t0 ? ({
1996
+ as: t1,
2021
1997
  checked,
2022
1998
  className,
2023
1999
  disabled,
2024
2000
  indeterminate,
2025
2001
  readOnly,
2002
+ ref: forwardedRef,
2026
2003
  style,
2027
- ...restProps
2028
- } = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = indeterminate, $[5] = readOnly, $[6] = restProps, $[7] = style) : (checked = $[1], className = $[2], disabled = $[3], indeterminate = $[4], readOnly = $[5], restProps = $[6], style = $[7]);
2029
- const ref = react.useRef(null);
2030
- let t0;
2031
- $[8] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], react.useImperativeHandle(forwardedRef, t0);
2032
- let t1, t2;
2033
- $[9] !== indeterminate ? (t1 = () => {
2004
+ ...rest
2005
+ } = t0, $[0] = t0, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = forwardedRef, $[5] = indeterminate, $[6] = readOnly, $[7] = rest, $[8] = style, $[9] = t1) : (checked = $[1], className = $[2], disabled = $[3], forwardedRef = $[4], indeterminate = $[5], readOnly = $[6], rest = $[7], style = $[8], t1 = $[9]);
2006
+ const Element2 = t1 === void 0 ? DEFAULT_SWITCH_ELEMENT : t1, ref = react.useRef(null);
2007
+ let t2;
2008
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[10] = t2) : t2 = $[10], react.useImperativeHandle(forwardedRef, t2);
2009
+ let t3, t4;
2010
+ $[11] !== indeterminate ? (t3 = () => {
2034
2011
  ref.current && (ref.current.indeterminate = indeterminate || !1);
2035
- }, t2 = [indeterminate], $[9] = indeterminate, $[10] = t1, $[11] = t2) : (t1 = $[10], t2 = $[11]), react.useEffect(t1, t2);
2036
- let t3;
2037
- $[12] !== className ? (t3 = css.composeClassNames(className, css._switch()), $[12] = className, $[13] = t3) : t3 = $[13];
2038
- const t4 = checked ? "" : void 0, t5 = indeterminate ? "" : void 0, t6 = indeterminate !== !0 && checked;
2039
- let t7;
2040
- $[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = css._switchElement(), $[14] = t7) : t7 = $[14];
2041
- const t8 = disabled ? "" : void 0, t9 = !disabled && readOnly ? "" : void 0, t10 = disabled || readOnly;
2042
- let t11;
2043
- $[15] !== restProps || $[16] !== t10 || $[17] !== t6 || $[18] !== t8 || $[19] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("input", { ...restProps, checked: t6, className: t7, "data-disabled": t8, "data-read-only": t9, disabled: t10, type: "checkbox", ref }), $[15] = restProps, $[16] = t10, $[17] = t6, $[18] = t8, $[19] = t9, $[20] = t11) : t11 = $[20];
2044
- let t12;
2045
- $[21] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs("span", { "aria-hidden": !0, className: css._switchPresentation(), children: [
2012
+ }, t4 = [indeterminate], $[11] = indeterminate, $[12] = t3, $[13] = t4) : (t3 = $[12], t4 = $[13]), react.useEffect(t3, t4);
2013
+ let t5;
2014
+ $[14] !== className ? (t5 = css.composeClassNames(className, css._switch()), $[14] = className, $[15] = t5) : t5 = $[15];
2015
+ const t6 = checked ? "" : void 0, t7 = indeterminate ? "" : void 0, t8 = indeterminate !== !0 && checked;
2016
+ let t9;
2017
+ $[16] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css._switchElement(), $[16] = t9) : t9 = $[16];
2018
+ const t10 = disabled ? "" : void 0, t11 = !disabled && readOnly ? "" : void 0, t12 = disabled || readOnly;
2019
+ let t13;
2020
+ $[17] !== Element2 || $[18] !== rest || $[19] !== t10 || $[20] !== t11 || $[21] !== t12 || $[22] !== t8 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, checked: t8, className: t9, "data-disabled": t10, "data-read-only": t11, disabled: t12, type: "checkbox", ref }), $[17] = Element2, $[18] = rest, $[19] = t10, $[20] = t11, $[21] = t12, $[22] = t8, $[23] = t13) : t13 = $[23];
2021
+ let t14;
2022
+ $[24] === Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs("span", { "aria-hidden": !0, className: css._switchPresentation(), children: [
2046
2023
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: css._switchTrack() }),
2047
2024
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: css._switchThumb() })
2048
- ] }), $[21] = t12) : t12 = $[21];
2049
- let t13;
2050
- return $[22] !== style || $[23] !== t11 || $[24] !== t3 || $[25] !== t4 || $[26] !== t5 ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: t3, "data-checked": t4, "data-indeterminate": t5, "data-ui": "Switch", display: "inline-block", position: "relative", style, children: [
2051
- t11,
2052
- t12
2053
- ] }), $[22] = style, $[23] = t11, $[24] = t3, $[25] = t4, $[26] = t5, $[27] = t13) : t13 = $[27], t13;
2054
- });
2055
- Switch.displayName = "ForwardRef(Switch)";
2056
- const TextArea = react.forwardRef(function(props, forwardedRef) {
2057
- const $ = reactCompilerRuntime.c(25);
2058
- let customValidity, gap, restProps, t0, t1, t2, t3, t4, t5;
2059
- $[0] !== props ? ({
2060
- border: t0,
2061
- customValidity,
2062
- disabled: t1,
2063
- fontSize: t2,
2064
- gap,
2065
- padding: t3,
2066
- radius: t4,
2067
- space: t5,
2068
- ...restProps
2069
- } = props, $[0] = props, $[1] = customValidity, $[2] = gap, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = t5) : (customValidity = $[1], gap = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], t5 = $[9]);
2070
- const border = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, space = t5 === void 0 ? 3 : t5, ref = react.useRef(null);
2071
- let t6;
2072
- $[10] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[10] = t6) : t6 = $[10], react.useImperativeHandle(forwardedRef, t6), useCustomValidity(ref, customValidity);
2073
- const t7 = gap ?? space;
2025
+ ] }), $[24] = t14) : t14 = $[24];
2026
+ let t15;
2027
+ return $[25] !== style || $[26] !== t13 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: t5, "data-checked": t6, "data-indeterminate": t7, "data-ui": "Switch", display: "inline-block", position: "relative", style, children: [
2028
+ t13,
2029
+ t14
2030
+ ] }), $[25] = style, $[26] = t13, $[27] = t5, $[28] = t6, $[29] = t7, $[30] = t15) : t15 = $[30], t15;
2031
+ }
2032
+ Switch.displayName = "Switch";
2033
+ const DEFAULT_TEXT_AREA_ELEMENT = "textarea";
2034
+ function TextArea(props) {
2035
+ const $ = reactCompilerRuntime.c(28), t0 = props;
2036
+ let customValidity, forwardedRef, gap, rest, t1, t2, t3, t4, t5, t6, t7;
2037
+ if ($[0] !== t0) {
2038
+ const {
2039
+ as: t82,
2040
+ border: t92,
2041
+ customValidity: t102,
2042
+ disabled: t112,
2043
+ fontSize: t122,
2044
+ gap: t132,
2045
+ padding: t142,
2046
+ radius: t15,
2047
+ ref: t16,
2048
+ space: t17,
2049
+ weight,
2050
+ __unstable_disableFocusRing,
2051
+ ...t18
2052
+ } = t0;
2053
+ t1 = t82, t2 = t92, customValidity = t102, t3 = t112, t4 = t122, gap = t132, t5 = t142, t6 = t15, forwardedRef = t16, t7 = t17, rest = t18, $[0] = t0, $[1] = customValidity, $[2] = forwardedRef, $[3] = gap, $[4] = rest, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = t5, $[10] = t6, $[11] = t7;
2054
+ } else
2055
+ customValidity = $[1], forwardedRef = $[2], gap = $[3], rest = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], t5 = $[9], t6 = $[10], t7 = $[11];
2056
+ const Element2 = t1 === void 0 ? DEFAULT_TEXT_AREA_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, padding = t5 === void 0 ? 3 : t5, radius = t6 === void 0 ? 2 : t6, space = t7 === void 0 ? 3 : t7, ref = react.useRef(null);
2074
2057
  let t8;
2075
- $[11] !== border || $[12] !== fontSize || $[13] !== padding || $[14] !== radius || $[15] !== t7 ? (t8 = css.textArea({
2058
+ $[12] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => ref.current, $[12] = t8) : t8 = $[12], react.useImperativeHandle(forwardedRef, t8), useCustomValidity(ref, customValidity);
2059
+ const t9 = gap ?? space;
2060
+ let t10;
2061
+ $[13] !== border || $[14] !== fontSize || $[15] !== padding || $[16] !== radius || $[17] !== t9 ? (t10 = css.textArea({
2076
2062
  border,
2077
2063
  fontSize,
2078
2064
  padding,
2079
2065
  radius,
2080
- gap: t7
2081
- }), $[11] = border, $[12] = fontSize, $[13] = padding, $[14] = radius, $[15] = t7, $[16] = t8) : t8 = $[16];
2082
- let t9;
2083
- $[17] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css._inputElement(), $[17] = t9) : t9 = $[17];
2084
- let t10;
2085
- $[18] !== disabled || $[19] !== restProps ? (t10 = /* @__PURE__ */ jsxRuntime.jsx("textarea", { ...restProps, className: t9, disabled, ref }), $[18] = disabled, $[19] = restProps, $[20] = t10) : t10 = $[20];
2066
+ gap: t9
2067
+ }), $[13] = border, $[14] = fontSize, $[15] = padding, $[16] = radius, $[17] = t9, $[18] = t10) : t10 = $[18];
2086
2068
  let t11;
2087
- $[21] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: css._inputPresentation() }), $[21] = t11) : t11 = $[21];
2069
+ $[19] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css._inputElement(), $[19] = t11) : t11 = $[19];
2088
2070
  let t12;
2089
- return $[22] !== t10 || $[23] !== t8 ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: t8, "data-ui": "TextArea", children: [
2090
- t10,
2091
- t11
2092
- ] }), $[22] = t10, $[23] = t8, $[24] = t12) : t12 = $[24], t12;
2093
- });
2094
- TextArea.displayName = "ForwardRef(TextArea)";
2095
- const CLEAR_BUTTON_BOX_STYLE = {
2071
+ $[20] !== Element2 || $[21] !== disabled || $[22] !== rest ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, className: t11, disabled, ref }), $[20] = Element2, $[21] = disabled, $[22] = rest, $[23] = t12) : t12 = $[23];
2072
+ let t13;
2073
+ $[24] === Symbol.for("react.memo_cache_sentinel") ? (t13 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: css._inputPresentation() }), $[24] = t13) : t13 = $[24];
2074
+ let t14;
2075
+ return $[25] !== t10 || $[26] !== t12 ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: t10, "data-ui": "TextArea", children: [
2076
+ t12,
2077
+ t13
2078
+ ] }), $[25] = t10, $[26] = t12, $[27] = t14) : t14 = $[27], t14;
2079
+ }
2080
+ TextArea.displayName = "TextArea";
2081
+ const DEFAULT_TEXT_INPUT_ELEMENT = "input", CLEAR_BUTTON_BOX_STYLE = {
2096
2082
  backgroundColor: "transparent",
2097
2083
  top: 0,
2098
2084
  right: 0,
2099
2085
  zIndex: 2
2100
- }, TextInput = react.forwardRef(function(props, forwardedRef) {
2101
- const $ = reactCompilerRuntime.c(83);
2102
- let IconComponent, IconRightComponent, __unstable_disableFocusRing, className, clearButton, customValidity, gap, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, width;
2103
- if ($[0] !== props) {
2086
+ };
2087
+ function TextInput(props) {
2088
+ const $ = reactCompilerRuntime.c(86), t0 = props;
2089
+ let IconComponent, IconRightComponent, __unstable_disableFocusRing, className, clearButton, customValidity, forwardedRef, gap, onClear, prefix, readOnly, rest, suffix, t1, t2, t3, t4, t5, t6, t7, t8, width;
2090
+ if ($[0] !== t0) {
2104
2091
  const {
2105
- __unstable_disableFocusRing: t72,
2106
- border: t82,
2107
- className: t92,
2108
- clearButton: t102,
2109
- disabled: t112,
2110
- fontSize: t122,
2111
- gap: t132,
2112
- icon: t142,
2113
- iconRight: t152,
2114
- onClear: t162,
2115
- padding: t172,
2116
- prefix: t182,
2117
- radius: t192,
2118
- readOnly: t202,
2119
- space: t212,
2120
- suffix: t222,
2121
- customValidity: t232,
2122
- type: t242,
2092
+ __unstable_disableFocusRing: t92,
2093
+ as: t102,
2094
+ border: t112,
2095
+ className: t122,
2096
+ clearButton: t132,
2097
+ disabled: t142,
2098
+ fontSize: t152,
2099
+ gap: t162,
2100
+ icon: t172,
2101
+ iconRight: t182,
2102
+ onClear: t192,
2103
+ padding: t202,
2104
+ prefix: t212,
2105
+ radius: t222,
2106
+ readOnly: t232,
2107
+ ref: t242,
2108
+ space: t252,
2109
+ suffix: t262,
2110
+ customValidity: t272,
2111
+ type: t282,
2123
2112
  weight: _width,
2124
- width: t252,
2125
- ...t262
2126
- } = props;
2127
- __unstable_disableFocusRing = t72, t0 = t82, className = t92, clearButton = t102, t1 = t112, t2 = t122, gap = t132, IconComponent = t142, IconRightComponent = t152, onClear = t162, t3 = t172, prefix = t182, t4 = t192, readOnly = t202, t5 = t212, suffix = t222, customValidity = t232, t6 = t242, width = t252, restProps = t262, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = className, $[5] = clearButton, $[6] = customValidity, $[7] = gap, $[8] = onClear, $[9] = prefix, $[10] = readOnly, $[11] = restProps, $[12] = suffix, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = width;
2113
+ width: t292,
2114
+ ...t302
2115
+ } = t0;
2116
+ __unstable_disableFocusRing = t92, t1 = t102, t2 = t112, className = t122, clearButton = t132, t3 = t142, t4 = t152, gap = t162, IconComponent = t172, IconRightComponent = t182, onClear = t192, t5 = t202, prefix = t212, t6 = t222, readOnly = t232, forwardedRef = t242, t7 = t252, suffix = t262, customValidity = t272, t8 = t282, width = t292, rest = t302, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = className, $[5] = clearButton, $[6] = customValidity, $[7] = forwardedRef, $[8] = gap, $[9] = onClear, $[10] = prefix, $[11] = readOnly, $[12] = rest, $[13] = suffix, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = t7, $[21] = t8, $[22] = width;
2128
2117
  } else
2129
- IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6], gap = $[7], onClear = $[8], prefix = $[9], readOnly = $[10], restProps = $[11], suffix = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], width = $[20];
2130
- const border = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, space = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = react.useRef(null), paddingArray = useArrayProp(padding), withClearButton = !!clearButton;
2131
- let t7;
2132
- $[21] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[21] = t7) : t7 = $[21], react.useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
2118
+ IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6], forwardedRef = $[7], gap = $[8], onClear = $[9], prefix = $[10], readOnly = $[11], rest = $[12], suffix = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], t7 = $[20], t8 = $[21], width = $[22];
2119
+ const Element2 = t1 === void 0 ? DEFAULT_TEXT_INPUT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, padding = t5 === void 0 ? 3 : t5, radius = t6 === void 0 ? 2 : t6, space = t7 === void 0 ? 3 : t7, type = t8 === void 0 ? "text" : t8, ref = react.useRef(null), paddingArray = useArrayProp(padding), withClearButton = !!clearButton;
2120
+ let t9;
2121
+ $[23] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => ref.current, $[23] = t9) : t9 = $[23], react.useImperativeHandle(forwardedRef, t9), useCustomValidity(ref, customValidity);
2133
2122
  const handleClearMouseDown = _temp;
2134
- let t8;
2135
- $[22] !== onClear ? (t8 = (event_0) => {
2123
+ let t10;
2124
+ $[24] !== onClear ? (t10 = (event_0) => {
2136
2125
  event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
2137
- }, $[22] = onClear, $[23] = t8) : t8 = $[23];
2138
- const handleClearClick = t8;
2139
- let t9, t10;
2140
- $[24] !== paddingArray ? (t10 = paddingArray.map(_temp2), $[24] = paddingArray, $[25] = t10) : t10 = $[25], t9 = t10;
2141
- const clearButtonBoxPadding = t9;
2126
+ }, $[24] = onClear, $[25] = t10) : t10 = $[25];
2127
+ const handleClearClick = t10;
2142
2128
  let t11, t12;
2143
- $[26] !== paddingArray ? (t12 = paddingArray.map(_temp3), $[26] = paddingArray, $[27] = t12) : t12 = $[27], t11 = t12;
2144
- const clearButtonPadding = t11;
2145
- let t13;
2146
- t13 = isRecord(clearButton) ? clearButton : EMPTY_RECORD;
2147
- const clearButtonProps = t13, t14 = gap ?? space;
2129
+ $[26] !== paddingArray ? (t12 = paddingArray.map(_temp2), $[26] = paddingArray, $[27] = t12) : t12 = $[27], t11 = t12;
2130
+ const clearButtonBoxPadding = t11;
2131
+ let t13, t14;
2132
+ $[28] !== paddingArray ? (t14 = paddingArray.map(_temp3), $[28] = paddingArray, $[29] = t14) : t14 = $[29], t13 = t14;
2133
+ const clearButtonPadding = t13;
2148
2134
  let t15;
2149
- $[28] !== border || $[29] !== className || $[30] !== fontSize || $[31] !== padding || $[32] !== radius || $[33] !== t14 || $[34] !== width ? (t15 = css.composeClassNames(className, css.textInput({
2135
+ t15 = isRecord(clearButton) ? clearButton : EMPTY_RECORD;
2136
+ const clearButtonProps = t15, t16 = gap ?? space;
2137
+ let t17;
2138
+ $[30] !== border || $[31] !== className || $[32] !== fontSize || $[33] !== padding || $[34] !== radius || $[35] !== t16 || $[36] !== width ? (t17 = css.composeClassNames(className, css.textInput({
2150
2139
  border,
2151
2140
  fontSize,
2152
2141
  padding,
2153
2142
  radius,
2154
- gap: t14,
2143
+ gap: t16,
2155
2144
  width
2156
- })), $[28] = border, $[29] = className, $[30] = fontSize, $[31] = padding, $[32] = radius, $[33] = t14, $[34] = width, $[35] = t15) : t15 = $[35];
2157
- const t16 = IconComponent ? "" : void 0, t17 = IconRightComponent ? "" : void 0, t18 = prefix ? "" : void 0, t19 = suffix ? "" : void 0;
2158
- let t20;
2159
- $[36] !== prefix ? (t20 = prefix && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", className: "text-input-prefix", sizing: "border", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: prefix }) }), $[36] = prefix, $[37] = t20) : t20 = $[37];
2160
- let t21;
2161
- $[38] === Symbol.for("react.memo_cache_sentinel") ? (t21 = css._inputElement(), $[38] = t21) : t21 = $[38];
2145
+ })), $[30] = border, $[31] = className, $[32] = fontSize, $[33] = padding, $[34] = radius, $[35] = t16, $[36] = width, $[37] = t17) : t17 = $[37];
2146
+ const t18 = IconComponent ? "" : void 0, t19 = IconRightComponent ? "" : void 0, t20 = prefix ? "" : void 0, t21 = suffix ? "" : void 0;
2162
2147
  let t22;
2163
- $[39] !== disabled || $[40] !== readOnly || $[41] !== restProps || $[42] !== type ? (t22 = /* @__PURE__ */ jsxRuntime.jsx("input", { ...restProps, className: t21, disabled, readOnly, ref, type }), $[39] = disabled, $[40] = readOnly, $[41] = restProps, $[42] = type, $[43] = t22) : t22 = $[43];
2148
+ $[38] !== prefix ? (t22 = prefix && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", className: "text-input-prefix", sizing: "border", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: prefix }) }), $[38] = prefix, $[39] = t22) : t22 = $[39];
2164
2149
  let t23;
2165
- $[44] === Symbol.for("react.memo_cache_sentinel") ? (t23 = css._inputPresentation(), $[44] = t23) : t23 = $[44];
2166
- const t24 = __unstable_disableFocusRing ? "" : void 0;
2150
+ $[40] === Symbol.for("react.memo_cache_sentinel") ? (t23 = css._inputElement(), $[40] = t23) : t23 = $[40];
2151
+ let t24;
2152
+ $[41] !== Element2 || $[42] !== disabled || $[43] !== readOnly || $[44] !== rest || $[45] !== type ? (t24 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, className: t23, disabled, readOnly, ref, type }), $[41] = Element2, $[42] = disabled, $[43] = readOnly, $[44] = rest, $[45] = type, $[46] = t24) : t24 = $[46];
2167
2153
  let t25;
2168
- $[45] !== IconComponent || $[46] !== fontSize || $[47] !== padding ? (t25 = IconComponent && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, position: "absolute", style: {
2154
+ $[47] === Symbol.for("react.memo_cache_sentinel") ? (t25 = css._inputPresentation(), $[47] = t25) : t25 = $[47];
2155
+ const t26 = __unstable_disableFocusRing ? "" : void 0;
2156
+ let t27;
2157
+ $[48] !== IconComponent || $[49] !== fontSize || $[50] !== padding ? (t27 = IconComponent && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, position: "absolute", style: {
2169
2158
  top: 0,
2170
2159
  left: 0
2171
2160
  }, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize, children: [
2172
2161
  react.isValidElement(IconComponent) && IconComponent,
2173
- ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
2174
- ] }) }), $[45] = IconComponent, $[46] = fontSize, $[47] = padding, $[48] = t25) : t25 = $[48];
2175
- let t26;
2176
- $[49] !== IconRightComponent || $[50] !== fontSize || $[51] !== padding || $[52] !== withClearButton ? (t26 = !withClearButton && IconRightComponent && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, position: "absolute", style: {
2162
+ reactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
2163
+ ] }) }), $[48] = IconComponent, $[49] = fontSize, $[50] = padding, $[51] = t27) : t27 = $[51];
2164
+ let t28;
2165
+ $[52] !== IconRightComponent || $[53] !== fontSize || $[54] !== padding || $[55] !== withClearButton ? (t28 = !withClearButton && IconRightComponent && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, position: "absolute", style: {
2177
2166
  top: 0,
2178
2167
  right: 0
2179
2168
  }, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize, children: [
2180
2169
  react.isValidElement(IconRightComponent) && IconRightComponent,
2181
- ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
2182
- ] }) }), $[49] = IconRightComponent, $[50] = fontSize, $[51] = padding, $[52] = withClearButton, $[53] = t26) : t26 = $[53];
2183
- let t27;
2184
- $[54] !== t24 || $[55] !== t25 || $[56] !== t26 ? (t27 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { as: "span", className: t23, "data-disable-focus-ring": t24, position: "absolute", children: [
2185
- t25,
2186
- t26
2187
- ] }), $[54] = t24, $[55] = t25, $[56] = t26, $[57] = t27) : t27 = $[57];
2188
- let t28;
2189
- $[58] !== clearButton || $[59] !== clearButtonBoxPadding || $[60] !== clearButtonPadding || $[61] !== clearButtonProps || $[62] !== disabled || $[63] !== fontSize || $[64] !== handleClearClick || $[65] !== radius || $[66] !== readOnly ? (t28 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding: clearButtonBoxPadding, position: "absolute", style: CLEAR_BUTTON_BOX_STYLE, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Clear", "data-qa": "clear-button", display: "block", fontSize, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[58] = clearButton, $[59] = clearButtonBoxPadding, $[60] = clearButtonPadding, $[61] = clearButtonProps, $[62] = disabled, $[63] = fontSize, $[64] = handleClearClick, $[65] = radius, $[66] = readOnly, $[67] = t28) : t28 = $[67];
2170
+ reactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
2171
+ ] }) }), $[52] = IconRightComponent, $[53] = fontSize, $[54] = padding, $[55] = withClearButton, $[56] = t28) : t28 = $[56];
2190
2172
  let t29;
2191
- $[68] !== t22 || $[69] !== t27 || $[70] !== t28 ? (t29 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { as: "span", flex: 1, position: "relative", children: [
2192
- t22,
2173
+ $[57] !== t26 || $[58] !== t27 || $[59] !== t28 ? (t29 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { as: "span", className: t25, "data-disable-focus-ring": t26, position: "absolute", children: [
2193
2174
  t27,
2194
2175
  t28
2195
- ] }), $[68] = t22, $[69] = t27, $[70] = t28, $[71] = t29) : t29 = $[71];
2176
+ ] }), $[57] = t26, $[58] = t27, $[59] = t28, $[60] = t29) : t29 = $[60];
2196
2177
  let t30;
2197
- $[72] !== suffix ? (t30 = suffix && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", className: "text-input-suffix", sizing: "border", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: suffix }) }), $[72] = suffix, $[73] = t30) : t30 = $[73];
2178
+ $[61] !== clearButton || $[62] !== clearButtonBoxPadding || $[63] !== clearButtonPadding || $[64] !== clearButtonProps || $[65] !== disabled || $[66] !== fontSize || $[67] !== handleClearClick || $[68] !== radius || $[69] !== readOnly ? (t30 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding: clearButtonBoxPadding, position: "absolute", style: CLEAR_BUTTON_BOX_STYLE, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Clear", "data-qa": "clear-button", display: "block", fontSize, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[61] = clearButton, $[62] = clearButtonBoxPadding, $[63] = clearButtonPadding, $[64] = clearButtonProps, $[65] = disabled, $[66] = fontSize, $[67] = handleClearClick, $[68] = radius, $[69] = readOnly, $[70] = t30) : t30 = $[70];
2198
2179
  let t31;
2199
- return $[74] !== t15 || $[75] !== t16 || $[76] !== t17 || $[77] !== t18 || $[78] !== t19 || $[79] !== t20 || $[80] !== t29 || $[81] !== t30 ? (t31 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { align: "center", as: "span", className: t15, "data-icon-left": t16, "data-icon-right": t17, "data-prefix": t18, "data-suffix": t19, "data-ui": "TextInput", display: "flex", children: [
2200
- t20,
2180
+ $[71] !== t24 || $[72] !== t29 || $[73] !== t30 ? (t31 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { as: "span", flex: 1, position: "relative", children: [
2181
+ t24,
2201
2182
  t29,
2202
2183
  t30
2203
- ] }), $[74] = t15, $[75] = t16, $[76] = t17, $[77] = t18, $[78] = t19, $[79] = t20, $[80] = t29, $[81] = t30, $[82] = t31) : t31 = $[82], t31;
2204
- });
2205
- TextInput.displayName = "ForwardRef(TextInput)";
2206
- function _temp(event) {
2207
- event.preventDefault(), event.stopPropagation();
2184
+ ] }), $[71] = t24, $[72] = t29, $[73] = t30, $[74] = t31) : t31 = $[74];
2185
+ let t32;
2186
+ $[75] !== suffix ? (t32 = suffix && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", className: "text-input-suffix", sizing: "border", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: suffix }) }), $[75] = suffix, $[76] = t32) : t32 = $[76];
2187
+ let t33;
2188
+ return $[77] !== t17 || $[78] !== t18 || $[79] !== t19 || $[80] !== t20 || $[81] !== t21 || $[82] !== t22 || $[83] !== t31 || $[84] !== t32 ? (t33 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { align: "center", as: "span", className: t17, "data-icon-left": t18, "data-icon-right": t19, "data-prefix": t20, "data-suffix": t21, "data-ui": "TextInput", display: "flex", children: [
2189
+ t22,
2190
+ t31,
2191
+ t32
2192
+ ] }), $[77] = t17, $[78] = t18, $[79] = t19, $[80] = t20, $[81] = t21, $[82] = t22, $[83] = t31, $[84] = t32, $[85] = t33) : t33 = $[85], t33;
2193
+ }
2194
+ function _temp3(v_0) {
2195
+ return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : typeof v_0 == "number" ? v_0 - 1 : 0;
2208
2196
  }
2209
2197
  function _temp2(v) {
2210
2198
  return v === 0 ? 0 : v === 1 || v === 2 ? 1 : typeof v == "number" ? v - 2 : 0;
2211
2199
  }
2212
- function _temp3(v_0) {
2213
- return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : typeof v_0 == "number" ? v_0 - 1 : 0;
2200
+ function _temp(event) {
2201
+ event.preventDefault(), event.stopPropagation();
2214
2202
  }
2203
+ TextInput.displayName = "TextInput";
2215
2204
  function useDelayedState(initialState) {
2216
2205
  const $ = reactCompilerRuntime.c(3), [state, setState] = react.useState(initialState), delayedAction = react.useRef(void 0);
2217
2206
  let t0;
@@ -2244,15 +2233,17 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
2244
2233
  right: ["right-end", "right-start", "left", "top", "bottom"],
2245
2234
  "right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
2246
2235
  "right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
2247
- }, MotionCard = framerMotion.motion.create(Card), TooltipCard = react.memo(react.forwardRef(function(props, ref) {
2248
- const $ = reactCompilerRuntime.c(52);
2249
- let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style, tone;
2250
- $[0] !== props ? ({
2236
+ }, DEFAULT_TOOLTIP_CARD_ELEMENT = "div", MotionCard = framerMotion.motion.create(Card);
2237
+ function TooltipCard(props) {
2238
+ const $ = reactCompilerRuntime.c(53), t0 = props;
2239
+ let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, rest, scheme, shadow, style, t1, t2;
2240
+ $[0] !== t0 ? ({
2251
2241
  animate,
2252
2242
  arrow,
2253
2243
  arrowRef,
2254
2244
  arrowX,
2255
2245
  arrowY,
2246
+ as: t1,
2256
2247
  children,
2257
2248
  originX,
2258
2249
  originY,
@@ -2262,46 +2253,48 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
2262
2253
  scheme,
2263
2254
  shadow,
2264
2255
  style,
2265
- tone,
2266
- ...restProps
2267
- } = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style, $[16] = tone) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15], tone = $[16]);
2268
- let t0;
2269
- const t1 = animate ? "transform" : void 0;
2270
- let t2;
2271
- $[17] !== originX || $[18] !== originY || $[19] !== style || $[20] !== t1 ? (t2 = {
2256
+ tone: t2,
2257
+ ...rest
2258
+ } = t0, $[0] = t0, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = rest, $[13] = scheme, $[14] = shadow, $[15] = style, $[16] = t1, $[17] = t2) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], rest = $[12], scheme = $[13], shadow = $[14], style = $[15], t1 = $[16], t2 = $[17]);
2259
+ const as = t1 === void 0 ? DEFAULT_TOOLTIP_CARD_ELEMENT : t1, tone = t2 === void 0 ? "inherit" : t2;
2260
+ let t3;
2261
+ const t4 = animate ? "transform" : void 0;
2262
+ let t5;
2263
+ $[18] !== originX || $[19] !== originY || $[20] !== style || $[21] !== t4 ? (t5 = {
2272
2264
  originX,
2273
2265
  originY,
2274
- willChange: t1,
2266
+ willChange: t4,
2275
2267
  ...style
2276
- }, $[17] = originX, $[18] = originY, $[19] = style, $[20] = t1, $[21] = t2) : t2 = $[21], t0 = t2;
2277
- const rootStyle = t0;
2278
- let t3;
2279
- const t4 = arrowX !== null ? arrowX : void 0, t5 = arrowY !== null ? arrowY : void 0;
2268
+ }, $[18] = originX, $[19] = originY, $[20] = style, $[21] = t4, $[22] = t5) : t5 = $[22], t3 = t5;
2269
+ const rootStyle = t3;
2280
2270
  let t6;
2281
- $[22] !== t4 || $[23] !== t5 ? (t6 = {
2282
- left: t4,
2283
- top: t5,
2271
+ const t7 = arrowX !== null ? arrowX : void 0, t8 = arrowY !== null ? arrowY : void 0;
2272
+ let t9;
2273
+ $[23] !== t7 || $[24] !== t8 ? (t9 = {
2274
+ left: t7,
2275
+ top: t8,
2284
2276
  right: void 0,
2285
2277
  bottom: void 0
2286
- }, $[22] = t4, $[23] = t5, $[24] = t6) : t6 = $[24], t3 = t6;
2287
- const arrowStyle = t3, t7 = animate ? "" : void 0;
2288
- let t8;
2289
- $[25] === Symbol.for("react.memo_cache_sentinel") ? (t8 = css.tooltipCard(), $[25] = t8) : t8 = $[25];
2290
- let t9;
2291
- $[26] !== animate ? (t9 = animate ? ["hidden", "initial"] : void 0, $[26] = animate, $[27] = t9) : t9 = $[27];
2278
+ }, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25], t6 = t9;
2279
+ const arrowStyle = t6;
2292
2280
  let t10;
2293
- $[28] !== animate ? (t10 = animate ? ["visible", "scaleIn"] : void 0, $[28] = animate, $[29] = t10) : t10 = $[29];
2294
- let t11;
2295
- $[30] !== animate ? (t11 = animate ? ["hidden", "scaleOut"] : void 0, $[30] = animate, $[31] = t11) : t11 = $[31];
2281
+ $[26] === Symbol.for("react.memo_cache_sentinel") ? (t10 = css.tooltipCard(), $[26] = t10) : t10 = $[26];
2282
+ const t11 = animate ? "" : void 0;
2296
2283
  let t12;
2297
- $[32] !== arrow || $[33] !== arrowRef || $[34] !== arrowStyle ? (t12 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[32] = arrow, $[33] = arrowRef, $[34] = arrowStyle, $[35] = t12) : t12 = $[35];
2284
+ $[27] !== animate ? (t12 = animate ? ["hidden", "initial"] : void 0, $[27] = animate, $[28] = t12) : t12 = $[28];
2298
2285
  let t13;
2299
- return $[36] !== children || $[37] !== padding || $[38] !== placement || $[39] !== radius || $[40] !== ref || $[41] !== restProps || $[42] !== rootStyle || $[43] !== scheme || $[44] !== shadow || $[45] !== t10 || $[46] !== t11 || $[47] !== t12 || $[48] !== t7 || $[49] !== t9 || $[50] !== tone ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { "data-ui": "Tooltip__card", ...restProps, "data-animate": t7, className: t8, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t9, animate: t10, exit: t11, tone, children: [
2286
+ $[29] !== animate ? (t13 = animate ? ["visible", "scaleIn"] : void 0, $[29] = animate, $[30] = t13) : t13 = $[30];
2287
+ let t14;
2288
+ $[31] !== animate ? (t14 = animate ? ["hidden", "scaleOut"] : void 0, $[31] = animate, $[32] = t14) : t14 = $[32];
2289
+ let t15;
2290
+ $[33] !== arrow || $[34] !== arrowRef || $[35] !== arrowStyle ? (t15 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[33] = arrow, $[34] = arrowRef, $[35] = arrowStyle, $[36] = t15) : t15 = $[36];
2291
+ let t16;
2292
+ return $[37] !== as || $[38] !== children || $[39] !== padding || $[40] !== placement || $[41] !== radius || $[42] !== rest || $[43] !== rootStyle || $[44] !== scheme || $[45] !== shadow || $[46] !== t11 || $[47] !== t12 || $[48] !== t13 || $[49] !== t14 || $[50] !== t15 || $[51] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { "data-ui": "Tooltip__card", ...rest, as, className: t10, "data-animate": t11, "data-placement": placement, padding, radius, scheme, shadow, style: rootStyle, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t12, animate: t13, exit: t14, tone, children: [
2300
2293
  children,
2301
- t12
2302
- ] }), $[36] = children, $[37] = padding, $[38] = placement, $[39] = radius, $[40] = ref, $[41] = restProps, $[42] = rootStyle, $[43] = scheme, $[44] = shadow, $[45] = t10, $[46] = t11, $[47] = t12, $[48] = t7, $[49] = t9, $[50] = tone, $[51] = t13) : t13 = $[51], t13;
2303
- }));
2304
- TooltipCard.displayName = "Memo(ForwardRef(TooltipCard))";
2294
+ t15
2295
+ ] }), $[37] = as, $[38] = children, $[39] = padding, $[40] = placement, $[41] = radius, $[42] = rest, $[43] = rootStyle, $[44] = scheme, $[45] = shadow, $[46] = t11, $[47] = t12, $[48] = t13, $[49] = t14, $[50] = t15, $[51] = tone, $[52] = t16) : t16 = $[52], t16;
2296
+ }
2297
+ TooltipCard.displayName = "TooltipCard";
2305
2298
  const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
2306
2299
  function TooltipDelayGroupProvider(props) {
2307
2300
  const $ = reactCompilerRuntime.c(9), {
@@ -2326,10 +2319,12 @@ TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
2326
2319
  function useTooltipDelayGroup() {
2327
2320
  return react.useContext(TooltipDelayGroupContext);
2328
2321
  }
2329
- const Tooltip = react.forwardRef(function(props, forwardedRef) {
2322
+ const DEFAULT_TOOLTIP_ELEMENT = "div";
2323
+ function Tooltip(props) {
2330
2324
  const boundaryElementContext = useBoundaryElement(), {
2331
2325
  animate: _animate = !1,
2332
2326
  arrow: arrowProp = !1,
2327
+ as = DEFAULT_TOOLTIP_ELEMENT,
2333
2328
  boundaryElement = boundaryElementContext?.element,
2334
2329
  children: childProp,
2335
2330
  className,
@@ -2341,12 +2336,13 @@ const Tooltip = react.forwardRef(function(props, forwardedRef) {
2341
2336
  placement: placementProp = "bottom",
2342
2337
  portal: portalProp,
2343
2338
  radius = 3,
2339
+ ref: forwardedRef,
2344
2340
  scheme,
2345
2341
  shadow = 2,
2346
2342
  zOffset = Z_OFFSETS.tooltip,
2347
- tone,
2348
- ...restProps
2349
- } = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
2343
+ tone = "inherit",
2344
+ ...rest
2345
+ } = props, card = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
2350
2346
  react.useImperativeHandle(forwardedRef, () => ref.current);
2351
2347
  const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, middleware = react.useMemo(() => {
2352
2348
  const ret = [];
@@ -2441,26 +2437,15 @@ const Tooltip = react.forwardRef(function(props, forwardedRef) {
2441
2437
  }) : null, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave]);
2442
2438
  if (react.useImperativeHandle(childProp ? getElementRef(childProp) : null, () => referenceElement, [referenceElement]), !child) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
2443
2439
  if (disabled) return child;
2444
- const node_0 = /* @__PURE__ */ jsxRuntime.jsx(
2445
- Layer,
2446
- {
2447
- "data-ui": "Tooltip",
2448
- className: css.composeClassNames(className, css.tooltip()),
2449
- ref: setFloating,
2450
- style: {
2451
- ...floatingStyles,
2452
- maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
2453
- },
2454
- zOffset,
2455
- children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...restProps, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, tone, children: content })
2456
- }
2457
- ), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: node_0 }) : node_0);
2440
+ const node_0 = /* @__PURE__ */ jsxRuntime.jsx(Layer, { "data-ui": "Tooltip", className: css.composeClassNames(className, css.tooltip()), ref: setFloating, style: {
2441
+ ...floatingStyles,
2442
+ maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
2443
+ }, zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...rest, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, tone, children: content }) }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: tone === "inherit" ? card?.tone ?? "default" : tone, scheme: scheme ?? "light", children: node_0 }) }) : node_0);
2458
2444
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2459
2445
  animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
2460
2446
  child
2461
2447
  ] });
2462
- });
2463
- Tooltip.displayName = "ForwardRef(Tooltip)";
2448
+ }
2464
2449
  function useCloseOnMouseLeave(t0) {
2465
2450
  const $ = reactCompilerRuntime.c(10), {
2466
2451
  handleIsOpenChange,
@@ -2485,10 +2470,13 @@ function useCloseOnMouseLeave(t0) {
2485
2470
  let t3;
2486
2471
  $[7] !== isInsideGroup || $[8] !== showTooltip ? (t3 = [isInsideGroup, showTooltip], $[7] = isInsideGroup, $[8] = showTooltip, $[9] = t3) : t3 = $[9], react.useEffect(t2, t3);
2487
2472
  }
2488
- const Hotkeys = react.forwardRef(function(props, ref) {
2489
- const $ = reactCompilerRuntime.c(26);
2490
- let fontSize, gap, gapX, gapY, keys, padding, radius, restProps, t0;
2491
- $[0] !== props ? ({
2473
+ Tooltip.displayName = "Tooltip";
2474
+ const DEFAULT_HOTKEYS_ELEMENT = "kbd";
2475
+ function Hotkeys(props) {
2476
+ const $ = reactCompilerRuntime.c(27), t0 = props;
2477
+ let fontSize, gap, gapX, gapY, keys, padding, radius, rest, t1, t2;
2478
+ $[0] !== t0 ? ({
2479
+ as: t1,
2492
2480
  fontSize,
2493
2481
  gap,
2494
2482
  gapX,
@@ -2496,23 +2484,23 @@ const Hotkeys = react.forwardRef(function(props, ref) {
2496
2484
  keys,
2497
2485
  padding,
2498
2486
  radius,
2499
- space: t0,
2500
- ...restProps
2501
- } = props, $[0] = props, $[1] = fontSize, $[2] = gap, $[3] = gapX, $[4] = gapY, $[5] = keys, $[6] = padding, $[7] = radius, $[8] = restProps, $[9] = t0) : (fontSize = $[1], gap = $[2], gapX = $[3], gapY = $[4], keys = $[5], padding = $[6], radius = $[7], restProps = $[8], t0 = $[9]);
2502
- const space = t0 === void 0 ? 0.5 : t0;
2487
+ space: t2,
2488
+ ...rest
2489
+ } = t0, $[0] = t0, $[1] = fontSize, $[2] = gap, $[3] = gapX, $[4] = gapY, $[5] = keys, $[6] = padding, $[7] = radius, $[8] = rest, $[9] = t1, $[10] = t2) : (fontSize = $[1], gap = $[2], gapX = $[3], gapY = $[4], keys = $[5], padding = $[6], radius = $[7], rest = $[8], t1 = $[9], t2 = $[10]);
2490
+ const as = t1 === void 0 ? DEFAULT_HOTKEYS_ELEMENT : t1, space = t2 === void 0 ? 0.5 : t2;
2503
2491
  if (!keys || keys.length === 0)
2504
2492
  return;
2505
- const t1 = gap ?? space;
2506
- let t2;
2507
- if ($[10] !== fontSize || $[11] !== keys || $[12] !== padding || $[13] !== radius) {
2508
- let t32;
2509
- $[15] !== fontSize || $[16] !== padding || $[17] !== radius ? (t32 = (key2, i) => /* @__PURE__ */ jsxRuntime.jsx(KBD, { fontSize, padding, radius, children: key2 }, i), $[15] = fontSize, $[16] = padding, $[17] = radius, $[18] = t32) : t32 = $[18], t2 = keys.map(t32), $[10] = fontSize, $[11] = keys, $[12] = padding, $[13] = radius, $[14] = t2;
2493
+ const t3 = gap ?? space;
2494
+ let t4;
2495
+ if ($[11] !== fontSize || $[12] !== keys || $[13] !== padding || $[14] !== radius) {
2496
+ let t52;
2497
+ $[16] !== fontSize || $[17] !== padding || $[18] !== radius ? (t52 = (key2, i) => /* @__PURE__ */ jsxRuntime.jsx(KBD, { fontSize, padding, radius, children: key2 }, i), $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t52) : t52 = $[19], t4 = keys.map(t52), $[11] = fontSize, $[12] = keys, $[13] = padding, $[14] = radius, $[15] = t4;
2510
2498
  } else
2511
- t2 = $[14];
2512
- let t3;
2513
- return $[19] !== gapX || $[20] !== gapY || $[21] !== ref || $[22] !== restProps || $[23] !== t1 || $[24] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "kbd", "data-ui": "Hotkeys", ...restProps, display: "flex", gap: t1, gapX, gapY, ref, children: t2 }), $[19] = gapX, $[20] = gapY, $[21] = ref, $[22] = restProps, $[23] = t1, $[24] = t2, $[25] = t3) : t3 = $[25], t3;
2514
- });
2515
- Hotkeys.displayName = "ForwardRef(Hotkeys)";
2499
+ t4 = $[15];
2500
+ let t5;
2501
+ return $[20] !== as || $[21] !== gapX || $[22] !== gapY || $[23] !== rest || $[24] !== t3 || $[25] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(Box, { as, "data-ui": "Hotkeys", ...rest, display: "flex", gap: t3, gapX, gapY, children: t4 }), $[20] = as, $[21] = gapX, $[22] = gapY, $[23] = rest, $[24] = t3, $[25] = t4, $[26] = t5) : t5 = $[26], t5;
2502
+ }
2503
+ Hotkeys.displayName = "Hotkeys";
2516
2504
  const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
2517
2505
  function _isFocusable(element) {
2518
2506
  return isHTMLAnchorElement(element) && element.getAttribute("data-disabled") !== "true" || isHTMLButtonElement(element) && !element.disabled;
@@ -2651,44 +2639,47 @@ function useMenuController(props) {
2651
2639
  mount
2652
2640
  };
2653
2641
  }
2654
- const Menu = react.forwardRef(function(props, forwardedRef) {
2655
- const $ = reactCompilerRuntime.c(55);
2656
- let _shouldFocus, children, className, gap, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
2657
- if ($[0] !== props) {
2642
+ const DEFAULT_MENU_ELEMENT = "div";
2643
+ function Menu(props) {
2644
+ const $ = reactCompilerRuntime.c(58), t0 = props;
2645
+ let _shouldFocus, children, className, forwardedRef, gap, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, rest, t1, t2, t3;
2646
+ if ($[0] !== t0) {
2658
2647
  const {
2659
- children: t22,
2660
- className: t32,
2648
+ as: t42,
2649
+ children: t52,
2650
+ className: t62,
2661
2651
  focusFirst,
2662
2652
  focusLast,
2663
- gap: t42,
2664
- onClickOutside: t52,
2665
- onEscape: t62,
2666
- onItemClick: t72,
2667
- onItemSelect: t82,
2668
- onKeyDown: t92,
2669
- originElement: t102,
2670
- padding: t112,
2671
- registerElement: t122,
2672
- shouldFocus: t132,
2673
- space: t142,
2674
- ...t152
2675
- } = props;
2676
- children = t22, className = t32, gap = t42, onClickOutside = t52, onEscape = t62, onItemClick = t72, onItemSelect = t82, onKeyDown = t92, originElement = t102, t0 = t112, registerElement = t122, _shouldFocus = t132, t1 = t142, restProps = t152, $[0] = props, $[1] = _shouldFocus, $[2] = children, $[3] = className, $[4] = gap, $[5] = onClickOutside, $[6] = onEscape, $[7] = onItemClick, $[8] = onItemSelect, $[9] = onKeyDown, $[10] = originElement, $[11] = registerElement, $[12] = restProps, $[13] = t0, $[14] = t1;
2653
+ gap: t72,
2654
+ onClickOutside: t82,
2655
+ onEscape: t92,
2656
+ onItemClick: t102,
2657
+ onItemSelect: t112,
2658
+ onKeyDown: t122,
2659
+ originElement: t132,
2660
+ padding: t142,
2661
+ ref: t152,
2662
+ registerElement: t162,
2663
+ shouldFocus: t172,
2664
+ space: t18,
2665
+ ...t19
2666
+ } = t0;
2667
+ t1 = t42, children = t52, className = t62, gap = t72, onClickOutside = t82, onEscape = t92, onItemClick = t102, onItemSelect = t112, onKeyDown = t122, originElement = t132, t2 = t142, forwardedRef = t152, registerElement = t162, _shouldFocus = t172, t3 = t18, rest = t19, $[0] = t0, $[1] = _shouldFocus, $[2] = children, $[3] = className, $[4] = forwardedRef, $[5] = gap, $[6] = onClickOutside, $[7] = onEscape, $[8] = onItemClick, $[9] = onItemSelect, $[10] = onKeyDown, $[11] = originElement, $[12] = registerElement, $[13] = rest, $[14] = t1, $[15] = t2, $[16] = t3;
2677
2668
  } else
2678
- _shouldFocus = $[1], children = $[2], className = $[3], gap = $[4], onClickOutside = $[5], onEscape = $[6], onItemClick = $[7], onItemSelect = $[8], onKeyDown = $[9], originElement = $[10], registerElement = $[11], restProps = $[12], t0 = $[13], t1 = $[14];
2679
- const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = react.useRef(null);
2680
- let t2;
2681
- $[15] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[15] = t2) : t2 = $[15], react.useImperativeHandle(forwardedRef, t2);
2669
+ _shouldFocus = $[1], children = $[2], className = $[3], forwardedRef = $[4], gap = $[5], onClickOutside = $[6], onEscape = $[7], onItemClick = $[8], onItemSelect = $[9], onKeyDown = $[10], originElement = $[11], registerElement = $[12], rest = $[13], t1 = $[14], t2 = $[15], t3 = $[16];
2670
+ const as = t1 === void 0 ? DEFAULT_MENU_ELEMENT : t1, padding = t2 === void 0 ? 1 : t2, space = t3 === void 0 ? 1 : t3, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = react.useRef(null);
2671
+ let t4;
2672
+ $[17] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[17] = t4) : t4 = $[17], react.useImperativeHandle(forwardedRef, t4);
2682
2673
  const {
2683
2674
  isTopLayer
2684
2675
  } = useLayer();
2685
- let t3;
2686
- $[16] !== onKeyDown || $[17] !== originElement || $[18] !== shouldFocus ? (t3 = {
2676
+ let t5;
2677
+ $[18] !== onKeyDown || $[19] !== originElement || $[20] !== shouldFocus ? (t5 = {
2687
2678
  onKeyDown,
2688
2679
  originElement,
2689
2680
  shouldFocus,
2690
2681
  rootElementRef: ref
2691
- }, $[16] = onKeyDown, $[17] = originElement, $[18] = shouldFocus, $[19] = t3) : t3 = $[19];
2682
+ }, $[18] = onKeyDown, $[19] = originElement, $[20] = shouldFocus, $[21] = t5) : t5 = $[21];
2692
2683
  const {
2693
2684
  activeElement,
2694
2685
  activeIndex,
@@ -2696,24 +2687,24 @@ const Menu = react.forwardRef(function(props, forwardedRef) {
2696
2687
  handleItemMouseLeave,
2697
2688
  handleKeyDown,
2698
2689
  mount
2699
- } = useMenuController(t3), unregisterElementRef = react.useRef(null);
2700
- let t4;
2701
- $[20] !== registerElement ? (t4 = (el) => {
2690
+ } = useMenuController(t5), unregisterElementRef = react.useRef(null);
2691
+ let t6;
2692
+ $[22] !== registerElement ? (t6 = (el) => {
2702
2693
  unregisterElementRef.current && (unregisterElementRef.current(), unregisterElementRef.current = null), ref.current = el, ref.current && registerElement && (unregisterElementRef.current = registerElement(ref.current));
2703
- }, $[20] = registerElement, $[21] = t4) : t4 = $[21];
2704
- const handleRefChange = t4;
2705
- let t5, t6;
2706
- $[22] !== activeIndex || $[23] !== onItemSelect ? (t5 = () => {
2694
+ }, $[22] = registerElement, $[23] = t6) : t6 = $[23];
2695
+ const handleRefChange = t6;
2696
+ let t7, t8;
2697
+ $[24] !== activeIndex || $[25] !== onItemSelect ? (t7 = () => {
2707
2698
  onItemSelect && onItemSelect(activeIndex);
2708
- }, t6 = [activeIndex, onItemSelect], $[22] = activeIndex, $[23] = onItemSelect, $[24] = t5, $[25] = t6) : (t5 = $[24], t6 = $[25]), react.useEffect(t5, t6);
2709
- let t7;
2710
- $[26] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => [ref.current], $[26] = t7) : t7 = $[26], useClickOutsideEvent(isTopLayer && onClickOutside, t7);
2711
- let t8;
2712
- $[27] !== isTopLayer || $[28] !== onEscape ? (t8 = (event) => {
2699
+ }, t8 = [activeIndex, onItemSelect], $[24] = activeIndex, $[25] = onItemSelect, $[26] = t7, $[27] = t8) : (t7 = $[26], t8 = $[27]), react.useEffect(t7, t8);
2700
+ let t9;
2701
+ $[28] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => [ref.current], $[28] = t9) : t9 = $[28], useClickOutsideEvent(isTopLayer && onClickOutside, t9);
2702
+ let t10;
2703
+ $[29] !== isTopLayer || $[30] !== onEscape ? (t10 = (event) => {
2713
2704
  isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
2714
- }, $[27] = isTopLayer, $[28] = onEscape, $[29] = t8) : t8 = $[29], useGlobalKeyDown(t8);
2715
- let t9, t10;
2716
- $[30] !== activeElement || $[31] !== activeIndex || $[32] !== handleItemMouseEnter || $[33] !== handleItemMouseLeave || $[34] !== mount || $[35] !== onClickOutside || $[36] !== onEscape || $[37] !== onItemClick || $[38] !== registerElement ? (t10 = {
2705
+ }, $[29] = isTopLayer, $[30] = onEscape, $[31] = t10) : t10 = $[31], useGlobalKeyDown(t10);
2706
+ let t11, t12;
2707
+ $[32] !== activeElement || $[33] !== activeIndex || $[34] !== handleItemMouseEnter || $[35] !== handleItemMouseLeave || $[36] !== mount || $[37] !== onClickOutside || $[38] !== onEscape || $[39] !== onItemClick || $[40] !== registerElement ? (t12 = {
2717
2708
  version: 0,
2718
2709
  activeElement,
2719
2710
  activeIndex,
@@ -2726,50 +2717,56 @@ const Menu = react.forwardRef(function(props, forwardedRef) {
2726
2717
  registerElement,
2727
2718
  onMouseEnter: handleItemMouseEnter,
2728
2719
  onMouseLeave: handleItemMouseLeave
2729
- }, $[30] = activeElement, $[31] = activeIndex, $[32] = handleItemMouseEnter, $[33] = handleItemMouseLeave, $[34] = mount, $[35] = onClickOutside, $[36] = onEscape, $[37] = onItemClick, $[38] = registerElement, $[39] = t10) : t10 = $[39], t9 = t10;
2730
- const value = t9;
2731
- let t11;
2732
- $[40] !== className ? (t11 = css.composeClassNames(className, css.menu()), $[40] = className, $[41] = t11) : t11 = $[41];
2733
- const t12 = gap ?? space;
2720
+ }, $[32] = activeElement, $[33] = activeIndex, $[34] = handleItemMouseEnter, $[35] = handleItemMouseLeave, $[36] = mount, $[37] = onClickOutside, $[38] = onEscape, $[39] = onItemClick, $[40] = registerElement, $[41] = t12) : t12 = $[41], t11 = t12;
2721
+ const value = t11;
2734
2722
  let t13;
2735
- $[42] !== children || $[43] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: t12, children }), $[42] = children, $[43] = t12, $[44] = t13) : t13 = $[44];
2736
- let t14;
2737
- $[45] !== handleKeyDown || $[46] !== handleRefChange || $[47] !== padding || $[48] !== restProps || $[49] !== t11 || $[50] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Menu", ...restProps, className: t11, onKeyDown: handleKeyDown, overflow: "auto", outline: "none", padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t13 }), $[45] = handleKeyDown, $[46] = handleRefChange, $[47] = padding, $[48] = restProps, $[49] = t11, $[50] = t13, $[51] = t14) : t14 = $[51];
2723
+ $[42] !== className ? (t13 = css.composeClassNames(className, css.menu()), $[42] = className, $[43] = t13) : t13 = $[43];
2724
+ const t14 = gap ?? space;
2738
2725
  let t15;
2739
- return $[52] !== t14 || $[53] !== value ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t14 }), $[52] = t14, $[53] = value, $[54] = t15) : t15 = $[54], t15;
2740
- });
2741
- Menu.displayName = "ForwardRef(Menu)";
2742
- const MenuDivider = react.forwardRef(function(props, ref) {
2743
- const $ = reactCompilerRuntime.c(9);
2744
- let className, restProps;
2745
- $[0] !== props ? ({
2726
+ $[44] !== children || $[45] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: t14, children }), $[44] = children, $[45] = t14, $[46] = t15) : t15 = $[46];
2727
+ let t16;
2728
+ $[47] !== as || $[48] !== handleKeyDown || $[49] !== handleRefChange || $[50] !== padding || $[51] !== rest || $[52] !== t13 || $[53] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Menu", ...rest, as, className: t13, onKeyDown: handleKeyDown, overflow: "auto", outline: "none", padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t15 }), $[47] = as, $[48] = handleKeyDown, $[49] = handleRefChange, $[50] = padding, $[51] = rest, $[52] = t13, $[53] = t15, $[54] = t16) : t16 = $[54];
2729
+ let t17;
2730
+ return $[55] !== t16 || $[56] !== value ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t16 }), $[55] = t16, $[56] = value, $[57] = t17) : t17 = $[57], t17;
2731
+ }
2732
+ Menu.displayName = "Menu";
2733
+ const DEFAULT_MENU_DIVIDER_ELEMENT = "hr";
2734
+ function MenuDivider(props) {
2735
+ const $ = reactCompilerRuntime.c(10), t0 = props;
2736
+ let className, rest, t1;
2737
+ $[0] !== t0 ? ({
2738
+ as: t1,
2746
2739
  className,
2747
- ...restProps
2748
- } = props, $[0] = props, $[1] = className, $[2] = restProps) : (className = $[1], restProps = $[2]);
2749
- let t0;
2750
- $[3] !== className ? (t0 = css.composeClassNames(className, css.menuDivider()), $[3] = className, $[4] = t0) : t0 = $[4];
2751
- let t1;
2752
- return $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx("hr", { ...restProps, className: t0, ref }), $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = t1) : t1 = $[8], t1;
2753
- });
2740
+ ...rest
2741
+ } = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
2742
+ const Element2 = t1 === void 0 ? DEFAULT_MENU_DIVIDER_ELEMENT : t1;
2743
+ let t2;
2744
+ $[4] !== className ? (t2 = css.composeClassNames(className, css.menuDivider()), $[4] = className, $[5] = t2) : t2 = $[5];
2745
+ let t3;
2746
+ return $[6] !== Element2 || $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, className: t2 }), $[6] = Element2, $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
2747
+ }
2754
2748
  MenuDivider.displayName = "MenuDivider";
2755
- const Selectable = react.forwardRef(function(props, ref) {
2756
- const $ = reactCompilerRuntime.c(13);
2757
- let className, radius, restProps, tone;
2758
- $[0] !== props ? ({
2749
+ const DEFAULT_SELECTABLE_ELEMENT = "button";
2750
+ function Selectable(props) {
2751
+ const $ = reactCompilerRuntime.c(14), t0 = props;
2752
+ let className, radius, rest, t1, tone;
2753
+ $[0] !== t0 ? ({
2754
+ as: t1,
2759
2755
  className,
2760
2756
  radius,
2761
2757
  tone,
2762
- ...restProps
2763
- } = props, $[0] = props, $[1] = className, $[2] = radius, $[3] = restProps, $[4] = tone) : (className = $[1], radius = $[2], restProps = $[3], tone = $[4]);
2764
- let t0;
2765
- $[5] !== className || $[6] !== radius || $[7] !== tone ? (t0 = css.composeClassNames(className, css._selectable({
2758
+ ...rest
2759
+ } = t0, $[0] = t0, $[1] = className, $[2] = radius, $[3] = rest, $[4] = t1, $[5] = tone) : (className = $[1], radius = $[2], rest = $[3], t1 = $[4], tone = $[5]);
2760
+ const as = t1 === void 0 ? DEFAULT_SELECTABLE_ELEMENT : t1;
2761
+ let t2;
2762
+ $[6] !== className || $[7] !== radius || $[8] !== tone ? (t2 = css.composeClassNames(className, css._selectable({
2766
2763
  radius,
2767
2764
  tone
2768
- })), $[5] = className, $[6] = radius, $[7] = tone, $[8] = t0) : t0 = $[8];
2769
- let t1;
2770
- return $[9] !== ref || $[10] !== restProps || $[11] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Box, { ...restProps, className: t0, ref }), $[9] = ref, $[10] = restProps, $[11] = t0, $[12] = t1) : t1 = $[12], t1;
2771
- });
2772
- Selectable.displayName = "ForwardRef(Selectable)";
2765
+ })), $[6] = className, $[7] = radius, $[8] = tone, $[9] = t2) : t2 = $[9];
2766
+ let t3;
2767
+ return $[10] !== as || $[11] !== rest || $[12] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Box, { ...rest, as, className: t2 }), $[10] = as, $[11] = rest, $[12] = t2, $[13] = t3) : t3 = $[13], t3;
2768
+ }
2769
+ Selectable.displayName = "Selectable";
2773
2770
  function useMenu() {
2774
2771
  const value = react.useContext(MenuContext);
2775
2772
  if (!value)
@@ -2778,28 +2775,27 @@ function useMenu() {
2778
2775
  throw new Error("useMenu(): the context value is not compatible");
2779
2776
  return value;
2780
2777
  }
2778
+ const DEFAULT_MENU_GROUP_ELEMENT = "button";
2781
2779
  function MenuGroup(props) {
2782
- const $ = reactCompilerRuntime.c(83);
2783
- let IconComponent, children, gap, gapX, gapY, menuProps, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
2784
- $[0] !== props ? ({
2785
- as: t0,
2780
+ const $ = reactCompilerRuntime.c(79), t0 = props;
2781
+ let IconComponent, children, gap, menuProps, onClick, popover, rest, t1, t2, t3, t4, t5, t6, text;
2782
+ $[0] !== t0 ? ({
2783
+ as: t1,
2786
2784
  children,
2787
- fontSize: t1,
2785
+ fontSize: t2,
2788
2786
  gap,
2789
- gapX,
2790
- gapY,
2791
2787
  icon: IconComponent,
2792
2788
  menu: menuProps,
2793
2789
  onClick,
2794
- padding: t2,
2790
+ padding: t3,
2795
2791
  popover,
2796
- radius: t3,
2797
- space: t4,
2792
+ radius: t4,
2793
+ space: t5,
2798
2794
  text,
2799
- tone: t5,
2800
- ...restProps
2801
- } = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = gap, $[4] = gapX, $[5] = gapY, $[6] = menuProps, $[7] = onClick, $[8] = popover, $[9] = restProps, $[10] = t0, $[11] = t1, $[12] = t2, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = text) : (IconComponent = $[1], children = $[2], gap = $[3], gapX = $[4], gapY = $[5], menuProps = $[6], onClick = $[7], popover = $[8], restProps = $[9], t0 = $[10], t1 = $[11], t2 = $[12], t3 = $[13], t4 = $[14], t5 = $[15], text = $[16]);
2802
- const as = t0 === void 0 ? "button" : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, menu = useMenu(), {
2795
+ tone: t6,
2796
+ ...rest
2797
+ } = t0, $[0] = t0, $[1] = IconComponent, $[2] = children, $[3] = gap, $[4] = menuProps, $[5] = onClick, $[6] = popover, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = t6, $[14] = text) : (IconComponent = $[1], children = $[2], gap = $[3], menuProps = $[4], onClick = $[5], popover = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], t6 = $[13], text = $[14]);
2798
+ const as = t1 === void 0 ? DEFAULT_MENU_GROUP_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, menu = useMenu(), {
2803
2799
  activeElement,
2804
2800
  mount,
2805
2801
  onClickOutside,
@@ -2808,91 +2804,92 @@ function MenuGroup(props) {
2808
2804
  onItemMouseEnter: _onItemMouseEnter,
2809
2805
  registerElement
2810
2806
  } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onMouseEnter, [rootElement, setRootElement] = react.useState(null), [open, setOpen] = react.useState(!1), [shouldFocus, setShouldFocus] = react.useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = react.useState(!1);
2811
- let t6;
2812
- $[17] !== onItemMouseEnter ? (t6 = (event) => {
2813
- setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
2814
- }, $[17] = onItemMouseEnter, $[18] = t6) : t6 = $[18];
2815
- const handleMouseEnter = t6;
2816
2807
  let t7;
2817
- $[19] !== rootElement ? (t7 = (event_0) => {
2808
+ $[15] !== onItemMouseEnter ? (t7 = (event) => {
2809
+ setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
2810
+ }, $[15] = onItemMouseEnter, $[16] = t7) : t7 = $[16];
2811
+ const handleMouseEnter = t7;
2812
+ let t8;
2813
+ $[17] !== rootElement ? (t8 = (event_0) => {
2818
2814
  event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
2819
2815
  rootElement?.focus();
2820
2816
  }));
2821
- }, $[19] = rootElement, $[20] = t7) : t7 = $[20];
2822
- const handleMenuKeyDown = t7;
2823
- let t8;
2824
- $[21] !== onClick ? (t8 = (event_1) => {
2825
- onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
2826
- }, $[21] = onClick, $[22] = t8) : t8 = $[22];
2827
- const handleClick = t8;
2817
+ }, $[17] = rootElement, $[18] = t8) : t8 = $[18];
2818
+ const handleMenuKeyDown = t8;
2828
2819
  let t9;
2829
- $[23] !== onItemClick ? (t9 = () => {
2830
- setOpen(!1), onItemClick?.();
2831
- }, $[23] = onItemClick, $[24] = t9) : t9 = $[24];
2832
- const handleChildItemClick = t9;
2820
+ $[19] !== onClick ? (t9 = (event_1) => {
2821
+ onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
2822
+ }, $[19] = onClick, $[20] = t9) : t9 = $[20];
2823
+ const handleClick = t9;
2833
2824
  let t10;
2834
- $[25] === Symbol.for("react.memo_cache_sentinel") ? (t10 = () => setWithinMenu(!0), $[25] = t10) : t10 = $[25];
2835
- const handleMenuMouseEnter = t10;
2836
- let t11, t12;
2837
- $[26] !== mount || $[27] !== rootElement ? (t11 = () => mount(rootElement), t12 = [mount, rootElement], $[26] = mount, $[27] = rootElement, $[28] = t11, $[29] = t12) : (t11 = $[28], t12 = $[29]), react.useEffect(t11, t12);
2838
- let t13, t14;
2839
- $[30] !== active ? (t13 = () => {
2825
+ $[21] !== onItemClick ? (t10 = () => {
2826
+ setOpen(!1), onItemClick?.();
2827
+ }, $[21] = onItemClick, $[22] = t10) : t10 = $[22];
2828
+ const handleChildItemClick = t10;
2829
+ let t11;
2830
+ $[23] === Symbol.for("react.memo_cache_sentinel") ? (t11 = () => setWithinMenu(!0), $[23] = t11) : t11 = $[23];
2831
+ const handleMenuMouseEnter = t11;
2832
+ let t12, t13;
2833
+ $[24] !== mount || $[25] !== rootElement ? (t12 = () => mount(rootElement), t13 = [mount, rootElement], $[24] = mount, $[25] = rootElement, $[26] = t12, $[27] = t13) : (t12 = $[26], t13 = $[27]), react.useEffect(t12, t13);
2834
+ let t14, t15;
2835
+ $[28] !== active ? (t14 = () => {
2840
2836
  active || setOpen(!1);
2841
- }, t14 = [active], $[30] = active, $[31] = t13, $[32] = t14) : (t13 = $[31], t14 = $[32]), react.useEffect(t13, t14);
2842
- let t15, t16;
2843
- $[33] !== open ? (t15 = () => {
2837
+ }, t15 = [active], $[28] = active, $[29] = t14, $[30] = t15) : (t14 = $[29], t15 = $[30]), react.useEffect(t14, t15);
2838
+ let t16, t17;
2839
+ $[31] !== open ? (t16 = () => {
2844
2840
  open || setWithinMenu(!1);
2845
- }, t16 = [open], $[33] = open, $[34] = t15, $[35] = t16) : (t15 = $[34], t16 = $[35]), react.useEffect(t15, t16);
2846
- let t17, t18;
2847
- $[36] !== shouldFocus ? (t17 = () => {
2841
+ }, t17 = [open], $[31] = open, $[32] = t16, $[33] = t17) : (t16 = $[32], t17 = $[33]), react.useEffect(t16, t17);
2842
+ let t18, t19;
2843
+ $[34] !== shouldFocus ? (t18 = () => {
2848
2844
  if (!shouldFocus)
2849
2845
  return;
2850
2846
  const rafId = requestAnimationFrame(() => setShouldFocus(null));
2851
2847
  return () => cancelAnimationFrame(rafId);
2852
- }, t18 = [shouldFocus], $[36] = shouldFocus, $[37] = t17, $[38] = t18) : (t17 = $[37], t18 = $[38]), react.useEffect(t17, t18);
2853
- let t19;
2854
- $[39] !== children || $[40] !== handleChildItemClick || $[41] !== handleMenuKeyDown || $[42] !== menuProps || $[43] !== onClickOutside || $[44] !== onEscape || $[45] !== registerElement || $[46] !== shouldFocus ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Menu, { ...menuProps, onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), $[39] = children, $[40] = handleChildItemClick, $[41] = handleMenuKeyDown, $[42] = menuProps, $[43] = onClickOutside, $[44] = onEscape, $[45] = registerElement, $[46] = shouldFocus, $[47] = t19) : t19 = $[47];
2855
- const childMenu = t19;
2848
+ }, t19 = [shouldFocus], $[34] = shouldFocus, $[35] = t18, $[36] = t19) : (t18 = $[35], t19 = $[36]), react.useEffect(t18, t19);
2856
2849
  let t20;
2857
- $[48] === Symbol.for("react.memo_cache_sentinel") ? (t20 = (event_2) => {
2850
+ $[37] !== children || $[38] !== handleChildItemClick || $[39] !== handleMenuKeyDown || $[40] !== menuProps || $[41] !== onClickOutside || $[42] !== onEscape || $[43] !== registerElement || $[44] !== shouldFocus ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(Menu, { ...menuProps, onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), $[37] = children, $[38] = handleChildItemClick, $[39] = handleMenuKeyDown, $[40] = menuProps, $[41] = onClickOutside, $[42] = onEscape, $[43] = registerElement, $[44] = shouldFocus, $[45] = t20) : t20 = $[45];
2851
+ const childMenu = t20;
2852
+ let t21;
2853
+ $[46] === Symbol.for("react.memo_cache_sentinel") ? (t21 = (event_2) => {
2858
2854
  const target = event_2.currentTarget;
2859
2855
  if (document.activeElement === target && event_2.key === "ArrowRight") {
2860
2856
  setShouldFocus("first"), setOpen(!0), setWithinMenu(!0);
2861
2857
  return;
2862
2858
  }
2863
- }, $[48] = t20) : t20 = $[48];
2864
- const handleKeyDown = t20, t21 = as === "button" ? withinMenu : void 0, t22 = as !== "button" ? withinMenu : void 0, t23 = !withinMenu && active ? "" : void 0, t24 = as === "button" ? "button" : void 0, t25 = gap ?? space;
2865
- let t26;
2866
- $[49] !== IconComponent || $[50] !== fontSize ? (t26 = IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize, children: [
2867
- react.isValidElement(IconComponent) && IconComponent,
2868
- ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
2869
- ] }), $[49] = IconComponent, $[50] = fontSize, $[51] = t26) : t26 = $[51];
2859
+ }, $[46] = t21) : t21 = $[46];
2860
+ const handleKeyDown = t21, t22 = as === "button" ? withinMenu : void 0, t23 = as !== "button" ? withinMenu : void 0, t24 = !withinMenu && active ? "" : void 0, t25 = as === "button" ? "button" : void 0, t26 = gap ?? space;
2870
2861
  let t27;
2871
- $[52] !== fontSize || $[53] !== text ? (t27 = /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, textOverflow: "ellipsis", weight: "medium", children: text }) }), $[52] = fontSize, $[53] = text, $[54] = t27) : t27 = $[54];
2862
+ $[47] !== IconComponent || $[48] !== fontSize ? (t27 = IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize, children: [
2863
+ react.isValidElement(IconComponent) && IconComponent,
2864
+ reactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
2865
+ ] }), $[47] = IconComponent, $[48] = fontSize, $[49] = t27) : t27 = $[49];
2872
2866
  let t28;
2873
- $[55] === Symbol.for("react.memo_cache_sentinel") ? (t28 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronRightIcon, {}), $[55] = t28) : t28 = $[55];
2867
+ $[50] !== fontSize || $[51] !== text ? (t28 = /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, textOverflow: "ellipsis", weight: "medium", children: text }) }), $[50] = fontSize, $[51] = text, $[52] = t28) : t28 = $[52];
2874
2868
  let t29;
2875
- $[56] !== fontSize ? (t29 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, children: t28 }), $[56] = fontSize, $[57] = t29) : t29 = $[57];
2869
+ $[53] === Symbol.for("react.memo_cache_sentinel") ? (t29 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronRightIcon, {}), $[53] = t29) : t29 = $[53];
2876
2870
  let t30;
2877
- $[58] !== gapX || $[59] !== gapY || $[60] !== padding || $[61] !== t25 || $[62] !== t26 || $[63] !== t27 || $[64] !== t29 ? (t30 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: t25, gapX, gapY, padding, children: [
2878
- t26,
2879
- t27,
2880
- t29
2881
- ] }), $[58] = gapX, $[59] = gapY, $[60] = padding, $[61] = t25, $[62] = t26, $[63] = t27, $[64] = t29, $[65] = t30) : t30 = $[65];
2871
+ $[54] !== fontSize ? (t30 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, children: t29 }), $[54] = fontSize, $[55] = t30) : t30 = $[55];
2882
2872
  let t31;
2883
- $[66] !== as || $[67] !== handleClick || $[68] !== handleMouseEnter || $[69] !== radius || $[70] !== restProps || $[71] !== t21 || $[72] !== t22 || $[73] !== t23 || $[74] !== t24 || $[75] !== t30 || $[76] !== tone ? (t31 = /* @__PURE__ */ jsxRuntime.jsx(Selectable, { "data-ui": "MenuGroup", ...restProps, "aria-pressed": t21, as, "data-pressed": t22, "data-selected": t23, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, radius, ref: setRootElement, tabIndex: -1, tone, type: t24, children: t30 }), $[66] = as, $[67] = handleClick, $[68] = handleMouseEnter, $[69] = radius, $[70] = restProps, $[71] = t21, $[72] = t22, $[73] = t23, $[74] = t24, $[75] = t30, $[76] = tone, $[77] = t31) : t31 = $[77];
2873
+ $[56] !== padding || $[57] !== t26 || $[58] !== t27 || $[59] !== t28 || $[60] !== t30 ? (t31 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: t26, padding, children: [
2874
+ t27,
2875
+ t28,
2876
+ t30
2877
+ ] }), $[56] = padding, $[57] = t26, $[58] = t27, $[59] = t28, $[60] = t30, $[61] = t31) : t31 = $[61];
2884
2878
  let t32;
2885
- return $[78] !== childMenu || $[79] !== open || $[80] !== popover || $[81] !== t31 ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: t31 }), $[78] = childMenu, $[79] = open, $[80] = popover, $[81] = t31, $[82] = t32) : t32 = $[82], t32;
2879
+ $[62] !== as || $[63] !== handleClick || $[64] !== handleMouseEnter || $[65] !== radius || $[66] !== rest || $[67] !== t22 || $[68] !== t23 || $[69] !== t24 || $[70] !== t25 || $[71] !== t31 || $[72] !== tone ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(Selectable, { "data-ui": "MenuGroup", ...rest, "aria-pressed": t22, as, "data-pressed": t23, "data-selected": t24, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, radius, ref: setRootElement, tabIndex: -1, tone, type: t25, children: t31 }), $[62] = as, $[63] = handleClick, $[64] = handleMouseEnter, $[65] = radius, $[66] = rest, $[67] = t22, $[68] = t23, $[69] = t24, $[70] = t25, $[71] = t31, $[72] = tone, $[73] = t32) : t32 = $[73];
2880
+ let t33;
2881
+ return $[74] !== childMenu || $[75] !== open || $[76] !== popover || $[77] !== t32 ? (t33 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: t32 }), $[74] = childMenu, $[75] = open, $[76] = popover, $[77] = t32, $[78] = t33) : t33 = $[78], t33;
2886
2882
  }
2887
2883
  MenuGroup.displayName = "MenuGroup";
2888
- const MenuItem = react.forwardRef(function(props, forwardedRef) {
2889
- const $ = reactCompilerRuntime.c(74);
2890
- let IconComponent, IconRightComponent, children, disabled, gap, gapX, gapY, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
2891
- $[0] !== props ? ({
2892
- as: t0,
2884
+ const DEFAULT_MENU_ITEM_ELEMENT = "button";
2885
+ function MenuItem(props) {
2886
+ const $ = reactCompilerRuntime.c(75), t0 = props;
2887
+ let IconComponent, IconRightComponent, children, disabled, forwardedRef, gap, gapX, gapY, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, rest, selectedProp, t1, t2, t3, t4, t5, t6, text;
2888
+ $[0] !== t0 ? ({
2889
+ as: t1,
2893
2890
  children,
2894
2891
  disabled,
2895
- fontSize: t1,
2892
+ fontSize: t2,
2896
2893
  gap,
2897
2894
  gapX,
2898
2895
  gapY,
@@ -2900,7 +2897,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
2900
2897
  icon: IconComponent,
2901
2898
  iconRight: IconRightComponent,
2902
2899
  onClick,
2903
- padding: t2,
2900
+ padding: t3,
2904
2901
  paddingX,
2905
2902
  paddingY,
2906
2903
  paddingTop,
@@ -2908,31 +2905,32 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
2908
2905
  paddingBottom,
2909
2906
  paddingLeft,
2910
2907
  pressed,
2911
- radius: t3,
2908
+ radius: t4,
2909
+ ref: forwardedRef,
2912
2910
  selected: selectedProp,
2913
- space: t4,
2911
+ space: t5,
2914
2912
  text,
2915
- tone: t5,
2916
- ...restProps
2917
- } = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = gap, $[6] = gapX, $[7] = gapY, $[8] = hotkeys, $[9] = onClick, $[10] = paddingBottom, $[11] = paddingLeft, $[12] = paddingRight, $[13] = paddingTop, $[14] = paddingX, $[15] = paddingY, $[16] = pressed, $[17] = restProps, $[18] = selectedProp, $[19] = t0, $[20] = t1, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = text) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], gap = $[5], gapX = $[6], gapY = $[7], hotkeys = $[8], onClick = $[9], paddingBottom = $[10], paddingLeft = $[11], paddingRight = $[12], paddingTop = $[13], paddingX = $[14], paddingY = $[15], pressed = $[16], restProps = $[17], selectedProp = $[18], t0 = $[19], t1 = $[20], t2 = $[21], t3 = $[22], t4 = $[23], t5 = $[24], text = $[25]);
2918
- const as = t0 === void 0 ? "button" : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, menu = useMenu(), {
2913
+ tone: t6,
2914
+ ...rest
2915
+ } = t0, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = forwardedRef, $[6] = gap, $[7] = gapX, $[8] = gapY, $[9] = hotkeys, $[10] = onClick, $[11] = paddingBottom, $[12] = paddingLeft, $[13] = paddingRight, $[14] = paddingTop, $[15] = paddingX, $[16] = paddingY, $[17] = pressed, $[18] = rest, $[19] = selectedProp, $[20] = t1, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = t6, $[26] = text) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], forwardedRef = $[5], gap = $[6], gapX = $[7], gapY = $[8], hotkeys = $[9], onClick = $[10], paddingBottom = $[11], paddingLeft = $[12], paddingRight = $[13], paddingTop = $[14], paddingX = $[15], paddingY = $[16], pressed = $[17], rest = $[18], selectedProp = $[19], t1 = $[20], t2 = $[21], t3 = $[22], t4 = $[23], t5 = $[24], t6 = $[25], text = $[26]);
2916
+ const as = t1 === void 0 ? DEFAULT_MENU_ITEM_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, menu = useMenu(), {
2919
2917
  activeElement,
2920
2918
  mount,
2921
2919
  onItemClick,
2922
2920
  onItemMouseEnter: _onItemMouseEnter,
2923
2921
  onItemMouseLeave: _onItemMouseLeave
2924
2922
  } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onMouseLeave, [rootElement, setRootElement] = react.useState(null), active = !!activeElement && activeElement === rootElement, ref = react.useRef(null);
2925
- let t6;
2926
- $[26] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[26] = t6) : t6 = $[26], react.useImperativeHandle(forwardedRef, t6);
2927
- let t7, t8;
2928
- $[27] !== mount || $[28] !== rootElement || $[29] !== selectedProp ? (t7 = () => mount(rootElement, selectedProp), t8 = [mount, rootElement, selectedProp], $[27] = mount, $[28] = rootElement, $[29] = selectedProp, $[30] = t7, $[31] = t8) : (t7 = $[30], t8 = $[31]), react.useEffect(t7, t8);
2929
- let t9;
2930
- $[32] !== disabled || $[33] !== onClick || $[34] !== onItemClick ? (t9 = (event) => {
2923
+ let t7;
2924
+ $[27] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[27] = t7) : t7 = $[27], react.useImperativeHandle(forwardedRef, t7);
2925
+ let t8, t9;
2926
+ $[28] !== mount || $[29] !== rootElement || $[30] !== selectedProp ? (t8 = () => mount(rootElement, selectedProp), t9 = [mount, rootElement, selectedProp], $[28] = mount, $[29] = rootElement, $[30] = selectedProp, $[31] = t8, $[32] = t9) : (t8 = $[31], t9 = $[32]), react.useEffect(t8, t9);
2927
+ let t10;
2928
+ $[33] !== disabled || $[34] !== onClick || $[35] !== onItemClick ? (t10 = (event) => {
2931
2929
  disabled || (onClick && onClick(event), onItemClick && onItemClick());
2932
- }, $[32] = disabled, $[33] = onClick, $[34] = onItemClick, $[35] = t9) : t9 = $[35];
2933
- const handleClick = t9;
2934
- let t10, t11;
2935
- $[36] !== padding || $[37] !== paddingBottom || $[38] !== paddingLeft || $[39] !== paddingRight || $[40] !== paddingTop || $[41] !== paddingX || $[42] !== paddingY ? (t11 = {
2930
+ }, $[33] = disabled, $[34] = onClick, $[35] = onItemClick, $[36] = t10) : t10 = $[36];
2931
+ const handleClick = t10;
2932
+ let t11, t12;
2933
+ $[37] !== padding || $[38] !== paddingBottom || $[39] !== paddingLeft || $[40] !== paddingRight || $[41] !== paddingTop || $[42] !== paddingX || $[43] !== paddingY ? (t12 = {
2936
2934
  padding,
2937
2935
  paddingX,
2938
2936
  paddingY,
@@ -2940,18 +2938,18 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
2940
2938
  paddingRight,
2941
2939
  paddingBottom,
2942
2940
  paddingLeft
2943
- }, $[36] = padding, $[37] = paddingBottom, $[38] = paddingLeft, $[39] = paddingRight, $[40] = paddingTop, $[41] = paddingX, $[42] = paddingY, $[43] = t11) : t11 = $[43], t10 = t11;
2944
- const paddingProps = t10;
2945
- let t12;
2946
- $[44] === Symbol.for("react.memo_cache_sentinel") ? (t12 = (el) => {
2941
+ }, $[37] = padding, $[38] = paddingBottom, $[39] = paddingLeft, $[40] = paddingRight, $[41] = paddingTop, $[42] = paddingX, $[43] = paddingY, $[44] = t12) : t12 = $[44], t11 = t12;
2942
+ const paddingProps = t11;
2943
+ let t13;
2944
+ $[45] === Symbol.for("react.memo_cache_sentinel") ? (t13 = (el) => {
2947
2945
  ref.current = el, setRootElement(el);
2948
- }, $[44] = t12) : t12 = $[44];
2949
- const setRef = t12, t13 = pressed ? "" : void 0, t14 = active ? "" : void 0, t15 = disabled ? "" : void 0, t16 = as === "button" ? "button" : void 0;
2950
- let t17;
2951
- $[45] !== IconComponent || $[46] !== IconRightComponent || $[47] !== fontSize || $[48] !== gap || $[49] !== gapX || $[50] !== gapY || $[51] !== hotkeys || $[52] !== paddingProps || $[53] !== space || $[54] !== text ? (t17 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", gap: gap ?? space, gapX, gapY, align: "center", ...paddingProps, children: [
2946
+ }, $[45] = t13) : t13 = $[45];
2947
+ const setRef = t13, t14 = pressed ? "" : void 0, t15 = active ? "" : void 0, t16 = disabled ? "" : void 0, t17 = as === "button" ? "button" : void 0;
2948
+ let t18;
2949
+ $[46] !== IconComponent || $[47] !== IconRightComponent || $[48] !== fontSize || $[49] !== gap || $[50] !== gapX || $[51] !== gapY || $[52] !== hotkeys || $[53] !== paddingProps || $[54] !== space || $[55] !== text ? (t18 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", gap: gap ?? space, gapX, gapY, align: "center", ...paddingProps, children: [
2952
2950
  IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { muted: !0, size: fontSize, children: [
2953
2951
  react.isValidElement(IconComponent) && IconComponent,
2954
- ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
2952
+ reactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
2955
2953
  ] }),
2956
2954
  text && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, textOverflow: "ellipsis", weight: "medium", children: text }) }),
2957
2955
  hotkeys && /* @__PURE__ */ jsxRuntime.jsx(Hotkeys, { gap: 0.5, keys: hotkeys, style: {
@@ -2960,87 +2958,92 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
2960
2958
  } }),
2961
2959
  IconRightComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { muted: !0, size: fontSize, children: [
2962
2960
  react.isValidElement(IconRightComponent) && IconRightComponent,
2963
- ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
2961
+ reactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
2964
2962
  ] })
2965
- ] }), $[45] = IconComponent, $[46] = IconRightComponent, $[47] = fontSize, $[48] = gap, $[49] = gapX, $[50] = gapY, $[51] = hotkeys, $[52] = paddingProps, $[53] = space, $[54] = text, $[55] = t17) : t17 = $[55];
2966
- let t18;
2967
- $[56] !== children || $[57] !== paddingProps ? (t18 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children }), $[56] = children, $[57] = paddingProps, $[58] = t18) : t18 = $[58];
2963
+ ] }), $[46] = IconComponent, $[47] = IconRightComponent, $[48] = fontSize, $[49] = gap, $[50] = gapX, $[51] = gapY, $[52] = hotkeys, $[53] = paddingProps, $[54] = space, $[55] = text, $[56] = t18) : t18 = $[56];
2968
2964
  let t19;
2969
- return $[59] !== as || $[60] !== disabled || $[61] !== handleClick || $[62] !== onItemMouseEnter || $[63] !== onItemMouseLeave || $[64] !== radius || $[65] !== restProps || $[66] !== t13 || $[67] !== t14 || $[68] !== t15 || $[69] !== t16 || $[70] !== t17 || $[71] !== t18 || $[72] !== tone ? (t19 = /* @__PURE__ */ jsxRuntime.jsxs(Selectable, { "data-ui": "MenuItem", role: "menuitem", ...restProps, as, "data-pressed": t13, "data-selected": t14, "data-disabled": t15, radius, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, tabIndex: -1, tone, type: t16, children: [
2970
- t17,
2971
- t18
2972
- ] }), $[59] = as, $[60] = disabled, $[61] = handleClick, $[62] = onItemMouseEnter, $[63] = onItemMouseLeave, $[64] = radius, $[65] = restProps, $[66] = t13, $[67] = t14, $[68] = t15, $[69] = t16, $[70] = t17, $[71] = t18, $[72] = tone, $[73] = t19) : t19 = $[73], t19;
2973
- });
2974
- MenuItem.displayName = "ForwardRef(MenuItem)";
2975
- const Tab = react.forwardRef(function(props, forwardedRef) {
2976
- const $ = reactCompilerRuntime.c(30);
2977
- let focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
2978
- $[0] !== props ? ({
2965
+ $[57] !== children || $[58] !== paddingProps ? (t19 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children }), $[57] = children, $[58] = paddingProps, $[59] = t19) : t19 = $[59];
2966
+ let t20;
2967
+ return $[60] !== as || $[61] !== disabled || $[62] !== handleClick || $[63] !== onItemMouseEnter || $[64] !== onItemMouseLeave || $[65] !== radius || $[66] !== rest || $[67] !== t14 || $[68] !== t15 || $[69] !== t16 || $[70] !== t17 || $[71] !== t18 || $[72] !== t19 || $[73] !== tone ? (t20 = /* @__PURE__ */ jsxRuntime.jsxs(Selectable, { "data-ui": "MenuItem", ...rest, as, "data-pressed": t14, "data-selected": t15, "data-disabled": t16, radius, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, role: "menuitem", tabIndex: -1, tone, type: t17, children: [
2968
+ t18,
2969
+ t19
2970
+ ] }), $[60] = as, $[61] = disabled, $[62] = handleClick, $[63] = onItemMouseEnter, $[64] = onItemMouseLeave, $[65] = radius, $[66] = rest, $[67] = t14, $[68] = t15, $[69] = t16, $[70] = t17, $[71] = t18, $[72] = t19, $[73] = tone, $[74] = t20) : t20 = $[74], t20;
2971
+ }
2972
+ MenuItem.displayName = "MenuItem";
2973
+ const DEFAULT_TAB_ELEMENT = "button";
2974
+ function Tab(props) {
2975
+ const $ = reactCompilerRuntime.c(33), t0 = props;
2976
+ let focused, forwardedRef, icon, id, label, onClick, onFocus, rest, selected, t1, t2, t3;
2977
+ $[0] !== t0 ? ({
2978
+ as: t1,
2979
2979
  icon,
2980
2980
  id,
2981
2981
  focused,
2982
- fontSize: t0,
2982
+ fontSize: t2,
2983
2983
  label,
2984
2984
  onClick,
2985
2985
  onFocus,
2986
- padding: t1,
2986
+ padding: t3,
2987
+ ref: forwardedRef,
2987
2988
  selected,
2988
- ...restProps
2989
- } = props, $[0] = props, $[1] = focused, $[2] = icon, $[3] = id, $[4] = label, $[5] = onClick, $[6] = onFocus, $[7] = restProps, $[8] = selected, $[9] = t0, $[10] = t1) : (focused = $[1], icon = $[2], id = $[3], label = $[4], onClick = $[5], onFocus = $[6], restProps = $[7], selected = $[8], t0 = $[9], t1 = $[10]);
2990
- const fontSize = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = react.useRef(null), focusedRef = react.useRef(!1);
2991
- let t2;
2992
- $[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], react.useImperativeHandle(forwardedRef, t2);
2993
- let t3;
2994
- $[12] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
2995
- focusedRef.current = !1;
2996
- }, $[12] = t3) : t3 = $[12];
2997
- const handleBlur = t3;
2989
+ ...rest
2990
+ } = t0, $[0] = t0, $[1] = focused, $[2] = forwardedRef, $[3] = icon, $[4] = id, $[5] = label, $[6] = onClick, $[7] = onFocus, $[8] = rest, $[9] = selected, $[10] = t1, $[11] = t2, $[12] = t3) : (focused = $[1], forwardedRef = $[2], icon = $[3], id = $[4], label = $[5], onClick = $[6], onFocus = $[7], rest = $[8], selected = $[9], t1 = $[10], t2 = $[11], t3 = $[12]);
2991
+ const as = t1 === void 0 ? DEFAULT_TAB_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 2 : t3, ref = react.useRef(null), focusedRef = react.useRef(!1);
2998
2992
  let t4;
2999
- $[13] !== onFocus ? (t4 = (event) => {
2993
+ $[13] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[13] = t4) : t4 = $[13], react.useImperativeHandle(forwardedRef, t4);
2994
+ let t5;
2995
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => {
2996
+ focusedRef.current = !1;
2997
+ }, $[14] = t5) : t5 = $[14];
2998
+ const handleBlur = t5;
2999
+ let t6;
3000
+ $[15] !== onFocus ? (t6 = (event) => {
3000
3001
  focusedRef.current = !0, onFocus && onFocus(event);
3001
- }, $[13] = onFocus, $[14] = t4) : t4 = $[14];
3002
- const handleFocus = t4;
3003
- let t5, t6;
3004
- $[15] !== focused ? (t5 = () => {
3002
+ }, $[15] = onFocus, $[16] = t6) : t6 = $[16];
3003
+ const handleFocus = t6;
3004
+ let t7, t8;
3005
+ $[17] !== focused ? (t7 = () => {
3005
3006
  focused && !focusedRef.current && (ref.current && ref.current.focus(), focusedRef.current = !0);
3006
- }, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), react.useEffect(t5, t6);
3007
- const t7 = selected ? "true" : "false", t8 = selected ? 0 : -1;
3008
- let t9;
3009
- return $[18] !== fontSize || $[19] !== handleFocus || $[20] !== icon || $[21] !== id || $[22] !== label || $[23] !== onClick || $[24] !== padding || $[25] !== restProps || $[26] !== selected || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Button, { "data-ui": "Tab", ...restProps, "aria-selected": t7, fontSize, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: t8, text: label, type: "button" }), $[18] = fontSize, $[19] = handleFocus, $[20] = icon, $[21] = id, $[22] = label, $[23] = onClick, $[24] = padding, $[25] = restProps, $[26] = selected, $[27] = t7, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
3010
- });
3011
- Tab.displayName = "ForwardRef(Tab)";
3012
- function _isReactElement(node) {
3013
- return !!node;
3014
- }
3015
- const TabList = react.forwardRef(function(props, ref) {
3016
- const $ = reactCompilerRuntime.c(15);
3017
- let childrenProp, restProps;
3018
- $[0] !== props ? ({
3007
+ }, t8 = [focused], $[17] = focused, $[18] = t7, $[19] = t8) : (t7 = $[18], t8 = $[19]), react.useEffect(t7, t8);
3008
+ const t9 = selected ? "true" : "false", t10 = selected ? 0 : -1;
3009
+ let t11;
3010
+ return $[20] !== as || $[21] !== fontSize || $[22] !== handleFocus || $[23] !== icon || $[24] !== id || $[25] !== label || $[26] !== onClick || $[27] !== padding || $[28] !== rest || $[29] !== selected || $[30] !== t10 || $[31] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Button, { "data-ui": "Tab", ...rest, "aria-selected": t9, as, fontSize, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: t10, text: label, type: "button" }), $[20] = as, $[21] = fontSize, $[22] = handleFocus, $[23] = icon, $[24] = id, $[25] = label, $[26] = onClick, $[27] = padding, $[28] = rest, $[29] = selected, $[30] = t10, $[31] = t9, $[32] = t11) : t11 = $[32], t11;
3011
+ }
3012
+ Tab.displayName = "Tab";
3013
+ const DEFAULT_TAB_LIST_ELEMENT = "div";
3014
+ function TabList(props) {
3015
+ const $ = reactCompilerRuntime.c(16), t0 = props;
3016
+ let childrenProp, rest, t1;
3017
+ $[0] !== t0 ? ({
3018
+ as: t1,
3019
3019
  children: childrenProp,
3020
- ...restProps
3021
- } = props, $[0] = props, $[1] = childrenProp, $[2] = restProps) : (childrenProp = $[1], restProps = $[2]);
3022
- const [focusedIndex, setFocusedIndex] = react.useState(-1);
3023
- let t0;
3024
- if ($[3] !== childrenProp || $[4] !== focusedIndex) {
3020
+ ...rest
3021
+ } = t0, $[0] = t0, $[1] = childrenProp, $[2] = rest, $[3] = t1) : (childrenProp = $[1], rest = $[2], t1 = $[3]);
3022
+ const as = t1 === void 0 ? DEFAULT_TAB_LIST_ELEMENT : t1, [focusedIndex, setFocusedIndex] = react.useState(-1);
3023
+ let t2;
3024
+ if ($[4] !== childrenProp || $[5] !== focusedIndex) {
3025
3025
  const children = react.Children.toArray(childrenProp).filter(_isReactElement);
3026
- let t12;
3027
- $[6] !== focusedIndex ? (t12 = (child, childIndex) => react.cloneElement(child, {
3026
+ let t32;
3027
+ $[7] !== focusedIndex ? (t32 = (child, childIndex) => react.cloneElement(child, {
3028
3028
  focused: focusedIndex === childIndex,
3029
3029
  key: childIndex,
3030
3030
  onFocus: () => setFocusedIndex(childIndex)
3031
- }), $[6] = focusedIndex, $[7] = t12) : t12 = $[7], t0 = children.map(t12), $[3] = childrenProp, $[4] = focusedIndex, $[5] = t0;
3031
+ }), $[7] = focusedIndex, $[8] = t32) : t32 = $[8], t2 = children.map(t32), $[4] = childrenProp, $[5] = focusedIndex, $[6] = t2;
3032
3032
  } else
3033
- t0 = $[5];
3034
- const tabs = t0, numTabs = tabs.length;
3035
- let t1;
3036
- $[8] !== numTabs ? (t1 = (event) => {
3033
+ t2 = $[6];
3034
+ const tabs = t2, numTabs = tabs.length;
3035
+ let t3;
3036
+ $[9] !== numTabs ? (t3 = (event) => {
3037
3037
  event.key === "ArrowLeft" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === "ArrowRight" && setFocusedIndex((prevIndex_0) => (prevIndex_0 + 1) % numTabs);
3038
- }, $[8] = numTabs, $[9] = t1) : t1 = $[9];
3039
- const handleKeyDown = t1;
3040
- let t2;
3041
- return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Inline, { "data-ui": "TabList", ...restProps, onKeyDown: handleKeyDown, ref, role: "tablist", children: tabs }), $[10] = handleKeyDown, $[11] = ref, $[12] = restProps, $[13] = tabs, $[14] = t2) : t2 = $[14], t2;
3042
- });
3043
- TabList.displayName = "ForwardRef(TabList)";
3038
+ }, $[9] = numTabs, $[10] = t3) : t3 = $[10];
3039
+ const handleKeyDown = t3;
3040
+ let t4;
3041
+ return $[11] !== as || $[12] !== handleKeyDown || $[13] !== rest || $[14] !== tabs ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Inline, { "data-ui": "TabList", ...rest, as, onKeyDown: handleKeyDown, role: "tablist", children: tabs }), $[11] = as, $[12] = handleKeyDown, $[13] = rest, $[14] = tabs, $[15] = t4) : t4 = $[15], t4;
3042
+ }
3043
+ TabList.displayName = "TabList";
3044
+ function _isReactElement(node) {
3045
+ return !!node;
3046
+ }
3044
3047
  exports.AnimatedSpinnerIcon = AnimatedSpinnerIcon;
3045
3048
  exports.Arrow = Arrow;
3046
3049
  exports.Avatar = Avatar;
@@ -3054,8 +3057,45 @@ exports.Card = Card;
3054
3057
  exports.CardProvider = CardProvider;
3055
3058
  exports.Checkbox = Checkbox;
3056
3059
  exports.Code = Code;
3057
- exports.ConditionalWrapper = ConditionalWrapper;
3058
3060
  exports.Container = Container;
3061
+ exports.DEFAULT_ARROW_ELEMENT = DEFAULT_ARROW_ELEMENT;
3062
+ exports.DEFAULT_AVATAR_COUNTER_ELEMENT = DEFAULT_AVATAR_COUNTER_ELEMENT;
3063
+ exports.DEFAULT_AVATAR_ELEMENT = DEFAULT_AVATAR_ELEMENT;
3064
+ exports.DEFAULT_AVATAR_STACK_ELEMENT = DEFAULT_AVATAR_STACK_ELEMENT;
3065
+ exports.DEFAULT_BADGE_ELEMENT = DEFAULT_BADGE_ELEMENT;
3066
+ exports.DEFAULT_BOX_ELEMENT = DEFAULT_BOX_ELEMENT;
3067
+ exports.DEFAULT_BUTTON_ELEMENT = DEFAULT_BUTTON_ELEMENT;
3068
+ exports.DEFAULT_CARD_ELEMENT = DEFAULT_CARD_ELEMENT;
3069
+ exports.DEFAULT_CHECKBOX_ELEMENT = DEFAULT_CHECKBOX_ELEMENT;
3070
+ exports.DEFAULT_CODE_ELEMENT = DEFAULT_CODE_ELEMENT;
3071
+ exports.DEFAULT_CONTAINER_ELEMENT = DEFAULT_CONTAINER_ELEMENT;
3072
+ exports.DEFAULT_ELEMENT_QUERY_ELEMENT = DEFAULT_ELEMENT_QUERY_ELEMENT;
3073
+ exports.DEFAULT_FLEX_ELEMENT = DEFAULT_FLEX_ELEMENT;
3074
+ exports.DEFAULT_GRID_ELEMENT = DEFAULT_GRID_ELEMENT;
3075
+ exports.DEFAULT_HEADING_ELEMENT = DEFAULT_HEADING_ELEMENT;
3076
+ exports.DEFAULT_HOTKEYS_ELEMENT = DEFAULT_HOTKEYS_ELEMENT;
3077
+ exports.DEFAULT_INLINE_ELEMENT = DEFAULT_INLINE_ELEMENT;
3078
+ exports.DEFAULT_KBD_ELEMENT = DEFAULT_KBD_ELEMENT;
3079
+ exports.DEFAULT_LABEL_ELEMENT = DEFAULT_LABEL_ELEMENT;
3080
+ exports.DEFAULT_LAYER_ELEMENT = DEFAULT_LAYER_ELEMENT;
3081
+ exports.DEFAULT_MENU_DIVIDER_ELEMENT = DEFAULT_MENU_DIVIDER_ELEMENT;
3082
+ exports.DEFAULT_MENU_ELEMENT = DEFAULT_MENU_ELEMENT;
3083
+ exports.DEFAULT_MENU_GROUP_ELEMENT = DEFAULT_MENU_GROUP_ELEMENT;
3084
+ exports.DEFAULT_MENU_ITEM_ELEMENT = DEFAULT_MENU_ITEM_ELEMENT;
3085
+ exports.DEFAULT_POPOVER_ELEMENT = DEFAULT_POPOVER_ELEMENT;
3086
+ exports.DEFAULT_RADIO_ELEMENT = DEFAULT_RADIO_ELEMENT;
3087
+ exports.DEFAULT_SELECT_ELEMENT = DEFAULT_SELECT_ELEMENT;
3088
+ exports.DEFAULT_SPINNER_ELEMENT = DEFAULT_SPINNER_ELEMENT;
3089
+ exports.DEFAULT_SR_ONLY_ELEMENT = DEFAULT_SR_ONLY_ELEMENT;
3090
+ exports.DEFAULT_STACK_ELEMENT = DEFAULT_STACK_ELEMENT;
3091
+ exports.DEFAULT_SWITCH_ELEMENT = DEFAULT_SWITCH_ELEMENT;
3092
+ exports.DEFAULT_TAB_ELEMENT = DEFAULT_TAB_ELEMENT;
3093
+ exports.DEFAULT_TAB_LIST_ELEMENT = DEFAULT_TAB_LIST_ELEMENT;
3094
+ exports.DEFAULT_TEXT_AREA_ELEMENT = DEFAULT_TEXT_AREA_ELEMENT;
3095
+ exports.DEFAULT_TEXT_ELEMENT = DEFAULT_TEXT_ELEMENT;
3096
+ exports.DEFAULT_TEXT_INPUT_ELEMENT = DEFAULT_TEXT_INPUT_ELEMENT;
3097
+ exports.DEFAULT_TOOLTIP_ELEMENT = DEFAULT_TOOLTIP_ELEMENT;
3098
+ exports.DEFAULT_VIRTUAL_LIST_ELEMENT = DEFAULT_VIRTUAL_LIST_ELEMENT;
3059
3099
  exports.EMPTY_ARRAY = EMPTY_ARRAY;
3060
3100
  exports.EMPTY_RECORD = EMPTY_RECORD;
3061
3101
  exports.ElementQuery = ElementQuery;
@@ -3100,10 +3140,7 @@ exports._getArrayProp = _getArrayProp;
3100
3140
  exports._isEnterToClickElement = _isEnterToClickElement;
3101
3141
  exports._isScrollable = _isScrollable;
3102
3142
  exports.containsOrEqualsElement = containsOrEqualsElement;
3103
- exports.createColorTheme = createColorTheme;
3104
3143
  exports.createGlobalScopedContext = createGlobalScopedContext;
3105
- exports.hexToRgb = hexToRgb;
3106
- exports.hslToRgb = hslToRgb;
3107
3144
  exports.isHTMLAnchorElement = isHTMLAnchorElement;
3108
3145
  exports.isHTMLButtonElement = isHTMLButtonElement;
3109
3146
  exports.isHTMLElement = isHTMLElement;
@@ -3111,12 +3148,6 @@ exports.isHTMLInputElement = isHTMLInputElement;
3111
3148
  exports.isHTMLSelectElement = isHTMLSelectElement;
3112
3149
  exports.isHTMLTextAreaElement = isHTMLTextAreaElement;
3113
3150
  exports.isRecord = isRecord;
3114
- exports.multiply = multiply;
3115
- exports.parseColor = parseColor;
3116
- exports.rgbToHex = rgbToHex;
3117
- exports.rgbToHsl = rgbToHsl;
3118
- exports.rgba = rgba;
3119
- exports.screen = screen;
3120
3151
  exports.studioTheme = studioTheme;
3121
3152
  exports.useArrayProp = useArrayProp;
3122
3153
  exports.useBoundaryElement = useBoundaryElement;