@sanity/ui 3.0.0-static.11 → 3.0.0-static.13

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