@sanity/ui 3.0.0-static.44 → 3.0.0-static.46

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.
package/dist/index.d.cts CHANGED
@@ -419,6 +419,13 @@ export declare type BoxElementType =
419
419
  | 'section'
420
420
  | 'span'
421
421
  | 'summary'
422
+ | 'table'
423
+ | 'tbody'
424
+ | 'td'
425
+ | 'tfoot'
426
+ | 'th'
427
+ | 'thead'
428
+ | 'tr'
422
429
  | 'ul'
423
430
  | ComponentType
424
431
 
@@ -1473,9 +1480,9 @@ export declare type MenuItemOwnProps = GapStyleProps &
1473
1480
  }
1474
1481
 
1475
1482
  /** @public */
1476
- export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Omit<
1477
- Props<MenuItemOwnProps, E>,
1478
- 'role'
1483
+ export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Props<
1484
+ MenuItemOwnProps,
1485
+ E
1479
1486
  >
1480
1487
 
1481
1488
  /** @public */
@@ -2035,6 +2042,8 @@ export declare type TextElementType =
2035
2042
  | 'li'
2036
2043
  | 'p'
2037
2044
  | 'span'
2045
+ | 'summary'
2046
+ | 'time'
2038
2047
  | ComponentType
2039
2048
 
2040
2049
  /**
package/dist/index.d.ts CHANGED
@@ -419,6 +419,13 @@ export declare type BoxElementType =
419
419
  | 'section'
420
420
  | 'span'
421
421
  | 'summary'
422
+ | 'table'
423
+ | 'tbody'
424
+ | 'td'
425
+ | 'tfoot'
426
+ | 'th'
427
+ | 'thead'
428
+ | 'tr'
422
429
  | 'ul'
423
430
  | ComponentType
424
431
 
@@ -1473,9 +1480,9 @@ export declare type MenuItemOwnProps = GapStyleProps &
1473
1480
  }
1474
1481
 
1475
1482
  /** @public */
1476
- export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Omit<
1477
- Props<MenuItemOwnProps, E>,
1478
- 'role'
1483
+ export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Props<
1484
+ MenuItemOwnProps,
1485
+ E
1479
1486
  >
1480
1487
 
1481
1488
  /** @public */
@@ -2035,6 +2042,8 @@ export declare type TextElementType =
2035
2042
  | 'li'
2036
2043
  | 'p'
2037
2044
  | 'span'
2045
+ | 'summary'
2046
+ | 'time'
2038
2047
  | ComponentType
2039
2048
 
2040
2049
  /**
package/dist/index.js CHANGED
@@ -1140,7 +1140,7 @@ function Popover(props) {
1140
1140
  modal && /* @__PURE__ */ jsx(ViewportOverlay, {}),
1141
1141
  /* @__PURE__ */ jsx(PopoverLayer, { ...rest, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, className: popover({
1142
1142
  className
1143
- }), hidden: referenceHidden, maxWidth: widthProp, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, x, y, zOffset, children: content2 })
1143
+ }), hidden: referenceHidden, maxWidth: widthProp, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, tone, strategy, x, y, zOffset, children: content2 })
1144
1144
  ] }), children = open && (portal ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: /* @__PURE__ */ jsx(CardProvider, { tone: tone === "inherit" ? card2.tone : tone, scheme: scheme ?? "light", children: node_1 }) }) : node_1);
1145
1145
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1146
1146
  animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children,
@@ -2415,8 +2415,8 @@ function MenuGroup(props) {
2415
2415
  }
2416
2416
  const DEFAULT_MENU_ITEM_ELEMENT = "button";
2417
2417
  function MenuItem(props) {
2418
- const $ = c(73), t0 = props;
2419
- let IconComponent, IconRightComponent, children, disabled, forwardedRef, gapX, gapY, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, rest, selectedProp, t1, t2, t3, t4, t5, t6, text2;
2418
+ const $ = c(75), t0 = props;
2419
+ let IconComponent, IconRightComponent, children, disabled, forwardedRef, gapX, gapY, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, rest, selectedProp, t1, t2, t3, t4, t5, t6, t7, text2;
2420
2420
  $[0] !== t0 ? ({
2421
2421
  as: t1,
2422
2422
  children,
@@ -2439,29 +2439,30 @@ function MenuItem(props) {
2439
2439
  pressed,
2440
2440
  radius: t5,
2441
2441
  ref: forwardedRef,
2442
+ role: t6,
2442
2443
  selected: selectedProp,
2443
2444
  text: text2,
2444
- tone: t6,
2445
+ tone: t7,
2445
2446
  ...rest
2446
- } = t0, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = forwardedRef, $[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) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], forwardedRef = $[5], gapX = $[6], gapY = $[7], hotkeys = $[8], onClick = $[9], paddingBottom = $[10], paddingLeft = $[11], paddingRight = $[12], paddingTop = $[13], paddingX = $[14], paddingY = $[15], pressed = $[16], rest = $[17], selectedProp = $[18], t1 = $[19], t2 = $[20], t3 = $[21], t4 = $[22], t5 = $[23], t6 = $[24], text2 = $[25]);
2447
- const as = t1 === void 0 ? DEFAULT_MENU_ITEM_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, gap = t3 === void 0 ? 3 : t3, padding = t4 === void 0 ? 3 : t4, radius = t5 === void 0 ? 2 : t5, tone = t6 === void 0 ? "default" : t6, menu2 = useMenu(), {
2447
+ } = t0, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = forwardedRef, $[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] = t7, $[26] = text2) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], forwardedRef = $[5], gapX = $[6], gapY = $[7], hotkeys = $[8], onClick = $[9], paddingBottom = $[10], paddingLeft = $[11], paddingRight = $[12], paddingTop = $[13], paddingX = $[14], paddingY = $[15], pressed = $[16], rest = $[17], selectedProp = $[18], t1 = $[19], t2 = $[20], t3 = $[21], t4 = $[22], t5 = $[23], t6 = $[24], t7 = $[25], text2 = $[26]);
2448
+ const as = t1 === void 0 ? DEFAULT_MENU_ITEM_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, gap = t3 === void 0 ? 3 : t3, padding = t4 === void 0 ? 3 : t4, radius = t5 === void 0 ? 2 : t5, role = t6 === void 0 ? "menuitem" : t6, tone = t7 === void 0 ? "default" : t7, menu2 = useMenu(), {
2448
2449
  activeElement,
2449
2450
  mount,
2450
2451
  onItemClick,
2451
2452
  onItemMouseEnter,
2452
2453
  onItemMouseLeave
2453
2454
  } = menu2, [rootElement, setRootElement] = useState(null), active = !!activeElement && activeElement === rootElement, ref = useRef(null);
2454
- let t7;
2455
- $[26] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[26] = t7) : t7 = $[26], useImperativeHandle(forwardedRef, t7);
2456
- let t8, t9;
2457
- $[27] !== mount || $[28] !== rootElement || $[29] !== selectedProp ? (t8 = () => mount(rootElement, selectedProp), t9 = [mount, rootElement, selectedProp], $[27] = mount, $[28] = rootElement, $[29] = selectedProp, $[30] = t8, $[31] = t9) : (t8 = $[30], t9 = $[31]), useEffect(t8, t9);
2458
- let t10;
2459
- $[32] !== disabled || $[33] !== onClick || $[34] !== onItemClick ? (t10 = (event) => {
2455
+ let t8;
2456
+ $[27] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => ref.current, $[27] = t8) : t8 = $[27], useImperativeHandle(forwardedRef, t8);
2457
+ let t10, t9;
2458
+ $[28] !== mount || $[29] !== rootElement || $[30] !== selectedProp ? (t9 = () => mount(rootElement, selectedProp), t10 = [mount, rootElement, selectedProp], $[28] = mount, $[29] = rootElement, $[30] = selectedProp, $[31] = t10, $[32] = t9) : (t10 = $[31], t9 = $[32]), useEffect(t9, t10);
2459
+ let t11;
2460
+ $[33] !== disabled || $[34] !== onClick || $[35] !== onItemClick ? (t11 = (event) => {
2460
2461
  disabled || (onClick && onClick(event), onItemClick && onItemClick());
2461
- }, $[32] = disabled, $[33] = onClick, $[34] = onItemClick, $[35] = t10) : t10 = $[35];
2462
- const handleClick = t10;
2463
- let t11, t12;
2464
- $[36] !== padding || $[37] !== paddingBottom || $[38] !== paddingLeft || $[39] !== paddingRight || $[40] !== paddingTop || $[41] !== paddingX || $[42] !== paddingY ? (t12 = {
2462
+ }, $[33] = disabled, $[34] = onClick, $[35] = onItemClick, $[36] = t11) : t11 = $[36];
2463
+ const handleClick = t11;
2464
+ let t12, t13;
2465
+ $[37] !== padding || $[38] !== paddingBottom || $[39] !== paddingLeft || $[40] !== paddingRight || $[41] !== paddingTop || $[42] !== paddingX || $[43] !== paddingY ? (t13 = {
2465
2466
  padding,
2466
2467
  paddingX,
2467
2468
  paddingY,
@@ -2469,15 +2470,15 @@ function MenuItem(props) {
2469
2470
  paddingRight,
2470
2471
  paddingBottom,
2471
2472
  paddingLeft
2472
- }, $[36] = padding, $[37] = paddingBottom, $[38] = paddingLeft, $[39] = paddingRight, $[40] = paddingTop, $[41] = paddingX, $[42] = paddingY, $[43] = t12) : t12 = $[43], t11 = t12;
2473
- const paddingProps = t11;
2474
- let t13;
2475
- $[44] === Symbol.for("react.memo_cache_sentinel") ? (t13 = (el) => {
2473
+ }, $[37] = padding, $[38] = paddingBottom, $[39] = paddingLeft, $[40] = paddingRight, $[41] = paddingTop, $[42] = paddingX, $[43] = paddingY, $[44] = t13) : t13 = $[44], t12 = t13;
2474
+ const paddingProps = t12;
2475
+ let t14;
2476
+ $[45] === Symbol.for("react.memo_cache_sentinel") ? (t14 = (el) => {
2476
2477
  ref.current = el, setRootElement(el);
2477
- }, $[44] = t13) : t13 = $[44];
2478
- const setRef = t13, t14 = pressed ? "" : void 0, t15 = active ? "" : void 0, t16 = disabled ? "" : void 0, t17 = as === "button" ? "button" : void 0;
2479
- let t18;
2480
- $[45] !== IconComponent || $[46] !== IconRightComponent || $[47] !== fontSize || $[48] !== gap || $[49] !== gapX || $[50] !== gapY || $[51] !== hotkeys || $[52] !== paddingProps || $[53] !== text2 ? (t18 = (IconComponent || text2 || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, { as: "span", gap, gapX, gapY, align: "center", ...paddingProps, children: [
2478
+ }, $[45] = t14) : t14 = $[45];
2479
+ const setRef = t14, t15 = pressed ? "" : void 0, t16 = active ? "" : void 0, t17 = disabled ? "" : void 0, t18 = as === "button" ? "button" : void 0;
2480
+ let t19;
2481
+ $[46] !== IconComponent || $[47] !== IconRightComponent || $[48] !== fontSize || $[49] !== gap || $[50] !== gapX || $[51] !== gapY || $[52] !== hotkeys || $[53] !== paddingProps || $[54] !== text2 ? (t19 = (IconComponent || text2 || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, { as: "span", gap, gapX, gapY, align: "center", ...paddingProps, children: [
2481
2482
  IconComponent && /* @__PURE__ */ jsxs(Text, { muted: !0, size: fontSize, children: [
2482
2483
  isValidElement(IconComponent) && IconComponent,
2483
2484
  isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
@@ -2491,14 +2492,14 @@ function MenuItem(props) {
2491
2492
  isValidElement(IconRightComponent) && IconRightComponent,
2492
2493
  isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
2493
2494
  ] })
2494
- ] }), $[45] = IconComponent, $[46] = IconRightComponent, $[47] = fontSize, $[48] = gap, $[49] = gapX, $[50] = gapY, $[51] = hotkeys, $[52] = paddingProps, $[53] = text2, $[54] = t18) : t18 = $[54];
2495
- let t19;
2496
- $[55] !== children || $[56] !== paddingProps ? (t19 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...paddingProps, children }), $[55] = children, $[56] = paddingProps, $[57] = t19) : t19 = $[57];
2495
+ ] }), $[46] = IconComponent, $[47] = IconRightComponent, $[48] = fontSize, $[49] = gap, $[50] = gapX, $[51] = gapY, $[52] = hotkeys, $[53] = paddingProps, $[54] = text2, $[55] = t19) : t19 = $[55];
2497
2496
  let t20;
2498
- return $[58] !== as || $[59] !== disabled || $[60] !== handleClick || $[61] !== onItemMouseEnter || $[62] !== onItemMouseLeave || $[63] !== radius || $[64] !== rest || $[65] !== t14 || $[66] !== t15 || $[67] !== t16 || $[68] !== t17 || $[69] !== t18 || $[70] !== t19 || $[71] !== 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: [
2499
- t18,
2500
- t19
2501
- ] }), $[58] = as, $[59] = disabled, $[60] = handleClick, $[61] = onItemMouseEnter, $[62] = onItemMouseLeave, $[63] = radius, $[64] = rest, $[65] = t14, $[66] = t15, $[67] = t16, $[68] = t17, $[69] = t18, $[70] = t19, $[71] = tone, $[72] = t20) : t20 = $[72], t20;
2497
+ $[56] !== children || $[57] !== paddingProps ? (t20 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...paddingProps, children }), $[56] = children, $[57] = paddingProps, $[58] = t20) : t20 = $[58];
2498
+ let t21;
2499
+ return $[59] !== as || $[60] !== disabled || $[61] !== handleClick || $[62] !== onItemMouseEnter || $[63] !== onItemMouseLeave || $[64] !== radius || $[65] !== rest || $[66] !== role || $[67] !== t15 || $[68] !== t16 || $[69] !== t17 || $[70] !== t18 || $[71] !== t19 || $[72] !== t20 || $[73] !== tone ? (t21 = /* @__PURE__ */ jsxs(Selectable, { "data-ui": "MenuItem", ...rest, as, "data-pressed": t15, "data-selected": t16, "data-disabled": t17, radius, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, role, tabIndex: -1, tone, type: t18, children: [
2500
+ t19,
2501
+ t20
2502
+ ] }), $[59] = as, $[60] = disabled, $[61] = handleClick, $[62] = onItemMouseEnter, $[63] = onItemMouseLeave, $[64] = radius, $[65] = rest, $[66] = role, $[67] = t15, $[68] = t16, $[69] = t17, $[70] = t18, $[71] = t19, $[72] = t20, $[73] = tone, $[74] = t21) : t21 = $[74], t21;
2502
2503
  }
2503
2504
  const DEFAULT_TAB_ELEMENT = "button";
2504
2505
  function Tab(props) {