@sanity/ui 3.0.0-static.5 → 3.0.0-static.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +60 -56
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-es/_visual-editing.mjs +61 -57
  4. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  5. package/dist/_visual-editing.d.mts +10 -10
  6. package/dist/_visual-editing.d.ts +10 -10
  7. package/dist/cli.js +1 -1
  8. package/dist/css.d.mts +11 -1
  9. package/dist/css.d.ts +11 -1
  10. package/dist/css.js +324 -309
  11. package/dist/css.js.map +1 -1
  12. package/dist/css.mjs +324 -309
  13. package/dist/css.mjs.map +1 -1
  14. package/dist/index.d.mts +10 -10
  15. package/dist/index.d.ts +10 -10
  16. package/dist/index.js +5 -17
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +7 -19
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/sanity-theme.css +1 -1
  21. package/dist/system.css +229 -10
  22. package/dist/theme.js +1 -1
  23. package/dist/theme.js.map +1 -1
  24. package/dist/theme.mjs +1 -1
  25. package/dist/theme.mjs.map +1 -1
  26. package/package.json +2 -2
  27. package/src/css/aspects/index.ts +1 -0
  28. package/src/css/aspects/minWidth/index.ts +2 -0
  29. package/src/css/aspects/minWidth/minWidth.style.ts +13 -0
  30. package/src/css/aspects/minWidth/minWidth.ts +6 -0
  31. package/src/css/aspects/minWidth/types.ts +7 -0
  32. package/src/css/compile/compileRule.ts +1 -0
  33. package/src/css/compile/compileStyle.ts +1 -1
  34. package/src/css/primitives/_input/__workshop__/index.ts +1 -1
  35. package/src/css/primitives/box/box.style.ts +1 -1
  36. package/src/css/primitives/box/box.ts +2 -3
  37. package/src/css/primitives/box/types.ts +2 -0
  38. package/src/css/primitives/card/card.style.ts +69 -3
  39. package/src/css/primitives/card/types.ts +0 -1
  40. package/src/css/primitives/popover/popover.ts +4 -0
  41. package/src/css/primitives/switch/switch.style.ts +8 -83
  42. package/src/css/system.style.ts +2 -0
  43. package/src/theme/v3/defaults.ts +1 -1
  44. package/src/ui/components/autocomplete/__workshop__/index.ts +1 -1
  45. package/src/ui/components/autocomplete/autocomplete.tsx +2 -11
  46. package/src/ui/components/dialog/dialog.tsx +3 -4
  47. package/src/ui/constants.ts +6 -0
  48. package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -2
  49. package/src/ui/primitives/box/box.tsx +3 -2
  50. package/src/ui/primitives/card/card.tsx +2 -6
  51. package/src/ui/primitives/code/code.tsx +1 -1
  52. package/src/ui/primitives/kbd/kbd.tsx +2 -2
  53. package/src/ui/primitives/popover/popover.tsx +5 -75
  54. package/src/ui/primitives/popover/popoverCard.tsx +45 -39
  55. package/src/ui/primitives/textInput/textInput.tsx +1 -1
  56. package/src/ui/primitives/tooltip/tooltip.tsx +2 -3
  57. package/src/css/primitives/card/rules.ts +0 -473
@@ -3,7 +3,7 @@ import { c } from "react-compiler-runtime";
3
3
  import { getScopedTheme, getTheme_v2, createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1, buildTheme } from "@sanity/ui/theme";
4
4
  import { createContext, useContext, useState, useEffect, useDebugValue, useSyncExternalStore, forwardRef, Children, isValidElement, cloneElement, createElement, useRef, useImperativeHandle, lazy, Suspense, memo, useMemo, useCallback, useId, useLayoutEffect } from "react";
5
5
  import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1 } from "styled-components";
6
- import { composeClassNames, box, label, textOverflow, avatar, avatarArrow, avatarInitials, avatarImage, avatarCounter, avatarStack, text, badge, animatedSpinnerIcon, spinner, buttonLoadingBox, button, _selectable, card, checkbox, checkboxInput, code, container, heading, kbd, _arrow, _arrowStroke, _arrowShape, srOnly, radio, select, _inputElement, selectPresentation, stack, _switch, _switchElement, _switchPresentation, _switchTrack, _switchThumb, textArea, _inputPresentation, textInput, tooltipCard, tooltip, menu, menuDivider } from "@sanity/ui/css";
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, _arrowStroke, _arrowShape, srOnly, popoverCard, radio, select, _inputElement, selectPresentation, stack, _switch, _switchElement, _switchPresentation, _switchTrack, _switchThumb, textArea, _inputPresentation, textInput, tooltipCard, tooltip, menu, menuDivider, _selectable } from "@sanity/ui/css";
7
7
  import ReactIs, { 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";
@@ -142,6 +142,10 @@ const createColorTheme = createColorTheme$1, hexToRgb = hexToRgb$1, hslToRgb = h
142
142
  visualDuration: 0.2,
143
143
  bounce: 0.25
144
144
  }
145
+ }, Z_OFFSETS = {
146
+ dialog: 600,
147
+ popover: 400,
148
+ tooltip: 200
145
149
  };
146
150
  function _isEnterToClickElement(element) {
147
151
  return isHTMLAnchorElement(element) || isHTMLButtonElement(element);
@@ -365,8 +369,8 @@ function _temp$6() {
365
369
  return !1;
366
370
  }
367
371
  const Box = forwardRef(function(props, ref) {
368
- const $ = c(118);
369
- let align, autoCols, autoFlow, autoRows, border, 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, width, wrap;
372
+ const $ = c(120);
373
+ let align, autoCols, autoFlow, autoRows, border, 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, width, wrap;
370
374
  $[0] !== props ? ({
371
375
  align,
372
376
  as: t0,
@@ -404,8 +408,9 @@ const Box = forwardRef(function(props, ref) {
404
408
  marginBottom,
405
409
  marginLeft,
406
410
  maxWidth,
411
+ minWidth: t3,
407
412
  overflow,
408
- padding: t3,
413
+ padding: t4,
409
414
  paddingX,
410
415
  paddingY,
411
416
  paddingTop,
@@ -420,14 +425,14 @@ const Box = forwardRef(function(props, ref) {
420
425
  rows,
421
426
  rowStart,
422
427
  rowEnd,
423
- sizing: t4,
428
+ sizing: t5,
424
429
  width,
425
430
  wrap,
426
431
  ...restProps
427
- } = props, $[0] = props, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = border, $[6] = borderBottom, $[7] = borderLeft, $[8] = borderRight, $[9] = borderTop, $[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] = overflow, $[36] = paddingBottom, $[37] = paddingLeft, $[38] = paddingRight, $[39] = paddingTop, $[40] = paddingX, $[41] = paddingY, $[42] = pointerEvents, $[43] = position, $[44] = radius, $[45] = restProps, $[46] = row, $[47] = rowEnd, $[48] = rowStart, $[49] = rows, $[50] = t0, $[51] = t1, $[52] = t2, $[53] = t3, $[54] = t4, $[55] = width, $[56] = wrap) : (align = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], border = $[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], width = $[55], wrap = $[56]);
428
- const As = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, sizing = t4 === void 0 ? "border" : t4;
429
- let t5;
430
- $[57] !== align || $[58] !== autoCols || $[59] !== autoFlow || $[60] !== autoRows || $[61] !== border || $[62] !== borderBottom || $[63] !== borderLeft || $[64] !== borderRight || $[65] !== borderTop || $[66] !== className || $[67] !== column || $[68] !== columnEnd || $[69] !== columnStart || $[70] !== columns || $[71] !== direction || $[72] !== display || $[73] !== flex || $[74] !== gap || $[75] !== gapX || $[76] !== gapY || $[77] !== height || $[78] !== inset || $[79] !== insetBottom || $[80] !== insetLeft || $[81] !== insetRight || $[82] !== insetTop || $[83] !== justify || $[84] !== margin || $[85] !== marginBottom || $[86] !== marginLeft || $[87] !== marginRight || $[88] !== marginTop || $[89] !== marginX || $[90] !== marginY || $[91] !== maxWidth || $[92] !== muted || $[93] !== overflow || $[94] !== padding || $[95] !== paddingBottom || $[96] !== paddingLeft || $[97] !== paddingRight || $[98] !== paddingTop || $[99] !== paddingX || $[100] !== paddingY || $[101] !== pointerEvents || $[102] !== position || $[103] !== radius || $[104] !== row || $[105] !== rowEnd || $[106] !== rowStart || $[107] !== rows || $[108] !== sizing || $[109] !== width || $[110] !== wrap ? (t5 = composeClassNames(className, box({
432
+ } = props, $[0] = props, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = border, $[6] = borderBottom, $[7] = borderLeft, $[8] = borderRight, $[9] = borderTop, $[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] = overflow, $[36] = paddingBottom, $[37] = paddingLeft, $[38] = paddingRight, $[39] = paddingTop, $[40] = paddingX, $[41] = paddingY, $[42] = pointerEvents, $[43] = position, $[44] = radius, $[45] = restProps, $[46] = row, $[47] = rowEnd, $[48] = rowStart, $[49] = rows, $[50] = t0, $[51] = t1, $[52] = t2, $[53] = t3, $[54] = t4, $[55] = t5, $[56] = width, $[57] = wrap) : (align = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], border = $[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], width = $[56], wrap = $[57]);
433
+ const As = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, minWidth = t3 === void 0 ? 0 : t3, padding = t4 === void 0 ? 0 : t4, sizing = t5 === void 0 ? "content" : t5;
434
+ let t6;
435
+ $[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 ? (t6 = composeClassNames(className, box({
431
436
  align,
432
437
  autoCols,
433
438
  autoFlow,
@@ -463,6 +468,7 @@ const Box = forwardRef(function(props, ref) {
463
468
  marginBottom,
464
469
  marginLeft,
465
470
  maxWidth,
471
+ minWidth,
466
472
  muted,
467
473
  padding,
468
474
  paddingX,
@@ -481,9 +487,9 @@ const Box = forwardRef(function(props, ref) {
481
487
  sizing,
482
488
  width,
483
489
  wrap
484
- })), $[57] = align, $[58] = autoCols, $[59] = autoFlow, $[60] = autoRows, $[61] = border, $[62] = borderBottom, $[63] = borderLeft, $[64] = borderRight, $[65] = borderTop, $[66] = className, $[67] = column, $[68] = columnEnd, $[69] = columnStart, $[70] = columns, $[71] = direction, $[72] = display, $[73] = flex, $[74] = gap, $[75] = gapX, $[76] = gapY, $[77] = height, $[78] = inset, $[79] = insetBottom, $[80] = insetLeft, $[81] = insetRight, $[82] = insetTop, $[83] = justify, $[84] = margin, $[85] = marginBottom, $[86] = marginLeft, $[87] = marginRight, $[88] = marginTop, $[89] = marginX, $[90] = marginY, $[91] = maxWidth, $[92] = muted, $[93] = overflow, $[94] = padding, $[95] = paddingBottom, $[96] = paddingLeft, $[97] = paddingRight, $[98] = paddingTop, $[99] = paddingX, $[100] = paddingY, $[101] = pointerEvents, $[102] = position, $[103] = radius, $[104] = row, $[105] = rowEnd, $[106] = rowStart, $[107] = rows, $[108] = sizing, $[109] = width, $[110] = wrap, $[111] = t5) : t5 = $[111];
485
- let t6;
486
- return $[112] !== As || $[113] !== props.children || $[114] !== ref || $[115] !== restProps || $[116] !== t5 ? (t6 = /* @__PURE__ */ jsx(As, { "data-ui": "Box", ...restProps, className: t5, ref, children: props.children }), $[112] = As, $[113] = props.children, $[114] = ref, $[115] = restProps, $[116] = t5, $[117] = t6) : t6 = $[117], t6;
490
+ })), $[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] = t6) : t6 = $[113];
491
+ let t7;
492
+ return $[114] !== As || $[115] !== props.children || $[116] !== ref || $[117] !== restProps || $[118] !== t6 ? (t7 = /* @__PURE__ */ jsx(As, { "data-ui": "Box", ...restProps, className: t6, ref, children: props.children }), $[114] = As, $[115] = props.children, $[116] = ref, $[117] = restProps, $[118] = t6, $[119] = t7) : t7 = $[119], t7;
487
493
  });
488
494
  Box.displayName = "ForwardRef(Box)";
489
495
  const Label = forwardRef(function(props, ref) {
@@ -843,8 +849,8 @@ function useCard() {
843
849
  return useContext(CardContext);
844
850
  }
845
851
  const Card = forwardRef(function(props, ref) {
846
- const $ = c(51);
847
- let asProp, className, pressed, restProps, schemeProp, selectable, selected, shadow, style, t0, t1, t2, t3;
852
+ const $ = c(42);
853
+ let asProp, className, pressed, restProps, schemeProp, selected, shadow, style, t0, t1, t2, t3;
848
854
  $[0] !== props ? ({
849
855
  __unstable_checkered: t0,
850
856
  __unstable_focusRing: t1,
@@ -853,48 +859,41 @@ const Card = forwardRef(function(props, ref) {
853
859
  pressed,
854
860
  radius: t2,
855
861
  scheme: schemeProp,
856
- selectable,
857
862
  selected,
858
863
  shadow,
859
864
  style,
860
865
  tone: t3,
861
866
  ...restProps
862
- } = props, $[0] = props, $[1] = asProp, $[2] = className, $[3] = pressed, $[4] = restProps, $[5] = schemeProp, $[6] = selectable, $[7] = selected, $[8] = shadow, $[9] = style, $[10] = t0, $[11] = t1, $[12] = t2, $[13] = t3) : (asProp = $[1], className = $[2], pressed = $[3], restProps = $[4], schemeProp = $[5], selectable = $[6], selected = $[7], shadow = $[8], style = $[9], t0 = $[10], t1 = $[11], t2 = $[12], t3 = $[13]);
867
+ } = 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]);
863
868
  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";
864
869
  let t6;
865
- $[14] !== t4 || $[15] !== t5 ? (t6 = {
870
+ $[13] !== t4 || $[14] !== t5 ? (t6 = {
866
871
  tone: t4,
867
872
  scheme: t5
868
- }, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16];
873
+ }, $[13] = t4, $[14] = t5, $[15] = t6) : t6 = $[15];
869
874
  const context = t6, tone = toneProp === "inherit" ? context.tone : toneProp, scheme = schemeProp === void 0 ? context.scheme : schemeProp, t7 = scheme === context.scheme ? void 0 : scheme;
870
875
  let t8;
871
- if ($[17] !== className || $[18] !== radius || $[19] !== selectable || $[20] !== shadow || $[21] !== t7 || $[22] !== tone) {
872
- let t92;
873
- $[24] !== radius || $[25] !== selectable ? (t92 = selectable && _selectable({
874
- radius
875
- }), $[24] = radius, $[25] = selectable, $[26] = t92) : t92 = $[26], t8 = composeClassNames(className, card({
876
- scheme: t7,
877
- shadow,
878
- tone
879
- }), t92), $[17] = className, $[18] = radius, $[19] = selectable, $[20] = shadow, $[21] = t7, $[22] = tone, $[23] = t8;
880
- } else
881
- t8 = $[23];
876
+ $[16] !== className || $[17] !== shadow || $[18] !== t7 || $[19] !== tone ? (t8 = composeClassNames(className, card({
877
+ scheme: t7,
878
+ shadow,
879
+ tone
880
+ })), $[16] = className, $[17] = shadow, $[18] = t7, $[19] = tone, $[20] = t8) : t8 = $[20];
882
881
  const t9 = checkered ? "" : void 0, t10 = focusRing ? "" : void 0, t11 = pressed ? "" : void 0, t12 = selected ? "" : void 0;
883
882
  let t13;
884
- $[27] !== as || $[28] !== context.scheme || $[29] !== context.tone || $[30] !== radius || $[31] !== ref || $[32] !== restProps || $[33] !== style || $[34] !== t10 || $[35] !== t11 || $[36] !== t12 || $[37] !== t8 || $[38] !== t9 || $[39] !== tone ? (t13 = /* @__PURE__ */ jsx(Box, { "data-ui": "Card", ...restProps, as, className: t8, "data-context-tone": context.tone, "data-context-scheme": context.scheme, "data-checkered": t9, "data-focus-ring": t10, "data-pressed": t11, "data-selected": t12, "data-tone": tone, radius, ref, style }), $[27] = as, $[28] = context.scheme, $[29] = context.tone, $[30] = radius, $[31] = ref, $[32] = restProps, $[33] = style, $[34] = t10, $[35] = t11, $[36] = t12, $[37] = t8, $[38] = t9, $[39] = tone, $[40] = t13) : t13 = $[40];
883
+ $[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];
885
884
  let node = t13;
886
885
  if (scheme === context.scheme && tone === context.tone)
887
886
  return node;
888
887
  const t14 = parent?.compat_provider, t15 = tone ?? context.tone;
889
888
  let t16;
890
- if ($[41] !== node || $[42] !== scheme || $[43] !== t14 || $[44] !== t15 ? (t16 = /* @__PURE__ */ jsx(CardProvider, { compat_provider: t14, rendered: !0, scheme, tone: t15, children: node }), $[41] = node, $[42] = scheme, $[43] = t14, $[44] = t15, $[45] = t16) : t16 = $[45], node = t16, parent?.compat_provider) {
889
+ 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) {
891
890
  const t17 = tone ?? context.tone;
892
891
  let t18;
893
- return $[46] !== node || $[47] !== parent.compat_provider || $[48] !== scheme || $[49] !== t17 ? (t18 = createElement(parent.compat_provider, {
892
+ return $[37] !== node || $[38] !== parent.compat_provider || $[39] !== scheme || $[40] !== t17 ? (t18 = createElement(parent.compat_provider, {
894
893
  children: node,
895
894
  scheme,
896
895
  tone: t17
897
- }), $[46] = node, $[47] = parent.compat_provider, $[48] = scheme, $[49] = t17, $[50] = t18) : t18 = $[50], t18;
896
+ }), $[37] = node, $[38] = parent.compat_provider, $[39] = scheme, $[40] = t17, $[41] = t18) : t18 = $[41], t18;
898
897
  }
899
898
  return node;
900
899
  });
@@ -950,7 +949,7 @@ const LazyRefractor = lazy(() => import("./refractor.mjs")), Code = forwardRef(f
950
949
  weight,
951
950
  ...restProps
952
951
  } = 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]);
953
- const As = t0 === void 0 ? "pre" : t0, size2 = t1 === void 0 ? 1 : t1, language = typeof languageProp == "string" ? languageProp : void 0;
952
+ const As = t0 === void 0 ? "pre" : t0, size2 = t1 === void 0 ? 2 : t1, language = typeof languageProp == "string" ? languageProp : void 0;
954
953
  let t2;
955
954
  $[8] !== className || $[9] !== size2 || $[10] !== weight ? (t2 = composeClassNames(className, code({
956
955
  size: size2,
@@ -1081,13 +1080,13 @@ const KBD = forwardRef(function(props, ref) {
1081
1080
  radius: t4,
1082
1081
  ...restProps
1083
1082
  } = 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]);
1084
- const as = t0 === void 0 ? "kbd" : t0, display = t1 === void 0 ? "inline-block" : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 1 : t3, radius = t4 === void 0 ? 2 : t4;
1083
+ 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;
1085
1084
  let t5;
1086
1085
  $[9] !== className || $[10] !== radius ? (t5 = composeClassNames(className, kbd({
1087
1086
  radius
1088
1087
  })), $[9] = className, $[10] = radius, $[11] = t5) : t5 = $[11];
1089
1088
  let t6;
1090
- $[12] !== children || $[13] !== fontSize ? (t6 = /* @__PURE__ */ jsx(Text, { as: "span", muted: !0, size: fontSize, children }), $[12] = children, $[13] = fontSize, $[14] = t6) : t6 = $[14];
1089
+ $[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];
1091
1090
  let t7;
1092
1091
  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;
1093
1092
  });
@@ -1694,7 +1693,7 @@ function size(options) {
1694
1693
  };
1695
1694
  }
1696
1695
  const MotionCard$1 = motion.create(Card), PopoverCard = memo(forwardRef(function(props, ref) {
1697
- const $ = c(68);
1696
+ const $ = c(74);
1698
1697
  let animate, arrow2, arrowRef, arrowX, arrowY, children, marginsProp, maxWidth, originX, originY, overflow, padding, placement, radius, referenceWidth, restProps, scheme, shadow, strategy, style, tone, xProp, yProp;
1699
1698
  $[0] !== props ? ({
1700
1699
  __unstable_margins: marginsProp,
@@ -1721,7 +1720,7 @@ const MotionCard$1 = motion.create(Card), PopoverCard = memo(forwardRef(function
1721
1720
  y: yProp,
1722
1721
  ...restProps
1723
1722
  } = 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] = scheme, $[18] = shadow, $[19] = strategy, $[20] = style, $[21] = tone, $[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], restProps = $[16], scheme = $[17], shadow = $[18], strategy = $[19], style = $[20], tone = $[21], xProp = $[22], yProp = $[23]);
1724
- const layer = useLayer();
1723
+ const card2 = useCard(), layer = useLayer();
1725
1724
  let t0;
1726
1725
  t0 = marginsProp || DEFAULT_POPOVER_MARGINS;
1727
1726
  const margins = t0, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
@@ -1749,24 +1748,29 @@ const MotionCard$1 = motion.create(Card), PopoverCard = memo(forwardRef(function
1749
1748
  right: void 0,
1750
1749
  bottom: void 0
1751
1750
  }, $[34] = t6, $[35] = t7, $[36] = t8) : t8 = $[36], t5 = t8;
1752
- const arrowStyle = t5, t9 = restProps;
1753
- let t10;
1754
- $[37] !== animate ? (t10 = animate ? ["hidden", "initial"] : void 0, $[37] = animate, $[38] = t10) : t10 = $[38];
1751
+ const arrowStyle = t5, t9 = card2?.tone ?? "transparent", t10 = card2?.scheme ?? "light";
1755
1752
  let t11;
1756
- $[39] !== animate ? (t11 = animate ? ["visible", "scaleIn"] : void 0, $[39] = animate, $[40] = t11) : t11 = $[40];
1757
- let t12;
1758
- $[41] !== animate ? (t12 = animate ? ["hidden", "scaleOut"] : void 0, $[41] = animate, $[42] = t12) : t12 = $[42];
1759
- let t13;
1760
- $[43] !== children || $[44] !== padding ? (t13 = /* @__PURE__ */ jsx(Flex, { direction: "column", flex: 1, padding, children }), $[43] = children, $[44] = padding, $[45] = t13) : t13 = $[45];
1753
+ $[37] === Symbol.for("react.memo_cache_sentinel") ? (t11 = popoverCard(), $[37] = t11) : t11 = $[37];
1754
+ const t12 = restProps, t13 = card2?.tone ?? "transparent";
1761
1755
  let t14;
1762
- $[46] !== maxWidth || $[47] !== overflow || $[48] !== t13 ? (t14 = /* @__PURE__ */ jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t13 }), $[46] = maxWidth, $[47] = overflow, $[48] = t13, $[49] = t14) : t14 = $[49];
1756
+ $[38] !== animate ? (t14 = animate ? ["hidden", "initial"] : void 0, $[38] = animate, $[39] = t14) : t14 = $[39];
1763
1757
  let t15;
1764
- $[50] !== arrow2 || $[51] !== arrowRef || $[52] !== arrowStyle ? (t15 = 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] = t15) : t15 = $[53];
1758
+ $[40] !== animate ? (t15 = animate ? ["visible", "scaleIn"] : void 0, $[40] = animate, $[41] = t15) : t15 = $[41];
1765
1759
  let t16;
1766
- return $[54] !== placement || $[55] !== radius || $[56] !== ref || $[57] !== rootStyle || $[58] !== scheme || $[59] !== shadow || $[60] !== t10 || $[61] !== t11 || $[62] !== t12 || $[63] !== t14 || $[64] !== t15 || $[65] !== t9 || $[66] !== tone ? (t16 = /* @__PURE__ */ jsxs(MotionCard$1, { className: "popover-card", "data-ui": "Popover", ...t9, "data-placement": placement, direction: "column", display: "flex", radius, ref, scheme, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t10, animate: t11, exit: t12, children: [
1767
- t14,
1768
- t15
1769
- ] }), $[54] = placement, $[55] = radius, $[56] = ref, $[57] = rootStyle, $[58] = scheme, $[59] = shadow, $[60] = t10, $[61] = t11, $[62] = t12, $[63] = t14, $[64] = t15, $[65] = t9, $[66] = tone, $[67] = t16) : t16 = $[67], t16;
1760
+ $[42] !== animate ? (t16 = animate ? ["hidden", "scaleOut"] : void 0, $[42] = animate, $[43] = t16) : t16 = $[43];
1761
+ let t17;
1762
+ $[44] !== children || $[45] !== padding ? (t17 = /* @__PURE__ */ jsx(Flex, { direction: "column", flex: 1, padding, children }), $[44] = children, $[45] = padding, $[46] = t17) : t17 = $[46];
1763
+ let t18;
1764
+ $[47] !== maxWidth || $[48] !== overflow || $[49] !== t17 ? (t18 = /* @__PURE__ */ jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t17 }), $[47] = maxWidth, $[48] = overflow, $[49] = t17, $[50] = t18) : t18 = $[50];
1765
+ let t19;
1766
+ $[51] !== arrow2 || $[52] !== arrowRef || $[53] !== arrowStyle ? (t19 = 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] = t19) : t19 = $[54];
1767
+ let t20;
1768
+ $[55] !== placement || $[56] !== radius || $[57] !== ref || $[58] !== rootStyle || $[59] !== scheme || $[60] !== shadow || $[61] !== t12 || $[62] !== t13 || $[63] !== t14 || $[64] !== t15 || $[65] !== t16 || $[66] !== t18 || $[67] !== t19 || $[68] !== tone ? (t20 = /* @__PURE__ */ jsxs(MotionCard$1, { className: t11, "data-ui": "Popover", ...t12, "data-context-tone": t13, "data-placement": placement, direction: "column", display: "flex", radius, ref, scheme, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t14, animate: t15, exit: t16, children: [
1769
+ t18,
1770
+ t19
1771
+ ] }), $[55] = placement, $[56] = radius, $[57] = ref, $[58] = rootStyle, $[59] = scheme, $[60] = shadow, $[61] = t12, $[62] = t13, $[63] = t14, $[64] = t15, $[65] = t16, $[66] = t18, $[67] = t19, $[68] = tone, $[69] = t20) : t20 = $[69];
1772
+ let t21;
1773
+ return $[70] !== t10 || $[71] !== t20 || $[72] !== t9 ? (t21 = /* @__PURE__ */ jsx(CardProvider, { tone: t9, scheme: t10, children: t20 }), $[70] = t10, $[71] = t20, $[72] = t9, $[73] = t21) : t21 = $[73], t21;
1770
1774
  }));
1771
1775
  PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
1772
1776
  const ViewportOverlay = () => {
@@ -1786,6 +1790,7 @@ const ViewportOverlay = () => {
1786
1790
  __unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
1787
1791
  animate: _animate = !1,
1788
1792
  arrow: arrowProp = !1,
1793
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1789
1794
  boundaryElement = boundaryElementContext.element,
1790
1795
  children: childProp,
1791
1796
  constrainSize = !1,
@@ -1811,7 +1816,7 @@ const ViewportOverlay = () => {
1811
1816
  tone = "inherit",
1812
1817
  width: widthProp = "auto",
1813
1818
  // zOffset: zOffsetProp = layer.popover.zOffset,
1814
- zOffset: zOffsetProp,
1819
+ zOffset: zOffsetProp = Z_OFFSETS.popover,
1815
1820
  updateRef,
1816
1821
  ...restProps
1817
1822
  } = props, animate = usePrefersReducedMotion() ? !1 : _animate, zOffset = useArrayProp(zOffsetProp), ref = useRef(null), arrowRef = useRef(null), rootBoundary = "viewport";
@@ -2127,7 +2132,7 @@ const CLEAR_BUTTON_BOX_STYLE = {
2127
2132
  __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;
2128
2133
  } else
2129
2134
  IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6], gap = $[7], onClear = $[8], prefix = $[9], readOnly = $[10], restProps = $[11], suffix = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], width = $[20];
2130
- const border = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize = t2 === void 0 ? 1 : 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;
2135
+ 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;
2131
2136
  let t7;
2132
2137
  $[21] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[21] = t7) : t7 = $[21], useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
2133
2138
  const handleClearMouseDown = _temp;
@@ -2328,8 +2333,6 @@ function useTooltipDelayGroup() {
2328
2333
  }
2329
2334
  const Tooltip = forwardRef(function(props, forwardedRef) {
2330
2335
  const boundaryElementContext = useBoundaryElement(), {
2331
- layer
2332
- } = useTheme_v2(), {
2333
2336
  animate: _animate = !1,
2334
2337
  arrow: arrowProp = !1,
2335
2338
  boundaryElement = boundaryElementContext?.element,
@@ -2345,7 +2348,7 @@ const Tooltip = forwardRef(function(props, forwardedRef) {
2345
2348
  radius = 3,
2346
2349
  scheme,
2347
2350
  shadow = 2,
2348
- zOffset = layer.tooltip.zOffset,
2351
+ zOffset = Z_OFFSETS.tooltip,
2349
2352
  tone,
2350
2353
  ...restProps
2351
2354
  } = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = useState(0);
@@ -3096,6 +3099,7 @@ export {
3096
3099
  TooltipDelayGroupContext,
3097
3100
  TooltipDelayGroupProvider,
3098
3101
  VirtualList,
3102
+ Z_OFFSETS,
3099
3103
  _ResizeObserver,
3100
3104
  _elementSizeObserver,
3101
3105
  _getArrayProp,