@sanity/ui 4.0.0-static.16 → 4.0.0-static.18

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 (54) hide show
  1. package/dist/css/index.css +1 -1
  2. package/dist/css/index.css.map +1 -1
  3. package/dist/css/index.d.ts +4 -0
  4. package/dist/css/index.js +5986 -5974
  5. package/dist/css/index.js.map +1 -1
  6. package/dist/index.js +9 -10
  7. package/dist/index.js.map +1 -1
  8. package/package.json +7 -7
  9. package/src/core/components/autocomplete/__workshop__/custom.tsx +14 -1
  10. package/src/core/components/autocomplete/__workshop__/example.tsx +12 -1
  11. package/src/core/components/dialog/__workshop__/position.tsx +9 -1
  12. package/src/core/components/dialog/__workshop__/props.tsx +2 -0
  13. package/src/core/components/menu/__workshop__/menuButton.tsx +6 -1
  14. package/src/core/components/menu/__workshop__/tones.tsx +7 -1
  15. package/src/core/components/toast/__workshop__/toast.tsx +2 -0
  16. package/src/core/primitives/avatar/__workshop__/asButton.tsx +8 -1
  17. package/src/core/primitives/avatar/__workshop__/stack.tsx +5 -1
  18. package/src/core/primitives/badge/__workshop__/props.tsx +12 -1
  19. package/src/core/primitives/box/__workshop__/props.tsx +6 -1
  20. package/src/core/primitives/button/__workshop__/props.tsx +22 -0
  21. package/src/core/primitives/button/__workshop__/stacked.tsx +16 -0
  22. package/src/core/primitives/card/__workshop__/props.tsx +10 -0
  23. package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
  24. package/src/core/primitives/card/card.tsx +2 -2
  25. package/src/core/primitives/code/__workshop__/props.tsx +6 -1
  26. package/src/core/primitives/container/__workshop__/example.tsx +6 -1
  27. package/src/core/primitives/flex/__workshop__/example.tsx +7 -1
  28. package/src/core/primitives/heading/__workshop__/plain.tsx +12 -1
  29. package/src/core/primitives/inline/__workshop__/plain.tsx +5 -1
  30. package/src/core/primitives/label/__workshop__/plain.tsx +15 -1
  31. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +13 -1
  32. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +2 -0
  33. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +8 -0
  34. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +7 -1
  35. package/src/core/primitives/popover/__workshop__/TestStory.tsx +6 -0
  36. package/src/core/primitives/select/__workshop__/plain.tsx +4 -0
  37. package/src/core/primitives/skeleton/__workshop__/delay.tsx +9 -1
  38. package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +9 -1
  39. package/src/core/primitives/spinner/__workshop__/Props.tsx +6 -1
  40. package/src/core/primitives/stack/__workshop__/plain.tsx +4 -1
  41. package/src/core/primitives/text/__workshop__/colored.tsx +8 -1
  42. package/src/core/primitives/text/__workshop__/example.tsx +15 -1
  43. package/src/core/primitives/textArea/__workshop__/plain.tsx +8 -0
  44. package/src/core/primitives/textInput/__workshop__/plain.tsx +34 -4
  45. package/src/core/primitives/textInput/__workshop__/typed.tsx +7 -1
  46. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +2 -0
  47. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +2 -0
  48. package/src/core/primitives/tooltip/__workshop__/props.tsx +12 -0
  49. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +5 -0
  50. package/src/css/primitives/card/__workshop__/color.tsx +9 -1
  51. package/src/css/primitives/card/card.css.ts +10 -0
  52. package/src/css/theme/buildCSSTheme.ts +4 -0
  53. package/src/css/types.ts +4 -0
  54. package/src/css/vars.css.ts +4 -0
package/dist/index.js CHANGED
@@ -742,14 +742,13 @@ function Flex(props) {
742
742
  }
743
743
  const DEFAULT_CARD_ELEMENT = "div";
744
744
  function Card(props) {
745
- const $ = c(38), t0 = props;
746
- let className, disabled, pressed, rest, schemeProp, selected, style, t1, t2, t3, t4, t5;
745
+ const $ = c(37), t0 = props;
746
+ let className, pressed, rest, schemeProp, selected, style, t1, t2, t3, t4, t5;
747
747
  $[0] !== t0 ? ({
748
748
  __unstable_checkered: t1,
749
749
  __unstable_focusRing: t2,
750
750
  as: t3,
751
751
  className,
752
- disabled,
753
752
  pressed,
754
753
  radius: t4,
755
754
  scheme: schemeProp,
@@ -757,26 +756,26 @@ function Card(props) {
757
756
  style,
758
757
  tone: t5,
759
758
  ...rest
760
- } = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = pressed, $[4] = rest, $[5] = schemeProp, $[6] = selected, $[7] = style, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5) : (className = $[1], disabled = $[2], pressed = $[3], rest = $[4], schemeProp = $[5], selected = $[6], style = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12]);
759
+ } = t0, $[0] = t0, $[1] = className, $[2] = pressed, $[3] = rest, $[4] = schemeProp, $[5] = selected, $[6] = style, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = t4, $[11] = t5) : (className = $[1], pressed = $[2], rest = $[3], schemeProp = $[4], selected = $[5], style = $[6], t1 = $[7], t2 = $[8], t3 = $[9], t4 = $[10], t5 = $[11]);
761
760
  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 = useContext(CardContext), tone = toneProp === "inherit" ? parent?.tone : toneProp, scheme = schemeProp === void 0 ? parent?.scheme : schemeProp, t6 = scheme === parent?.scheme ? void 0 : scheme;
762
761
  let t7;
763
- $[13] !== className || $[14] !== t6 || $[15] !== tone ? (t7 = card({
762
+ $[12] !== className || $[13] !== t6 || $[14] !== tone ? (t7 = card({
764
763
  className,
765
764
  scheme: t6,
766
765
  tone
767
- }), $[13] = className, $[14] = t6, $[15] = tone, $[16] = t7) : t7 = $[16];
768
- const t8 = checkered ? "" : void 0, t9 = disabled ? "" : void 0, t10 = focusRing ? "" : void 0, t11 = pressed ? "" : void 0, t12 = selected ? "" : void 0;
766
+ }), $[12] = className, $[13] = t6, $[14] = tone, $[15] = t7) : t7 = $[15];
767
+ const t8 = checkered ? "" : void 0, t9 = props.disabled ? "" : void 0, t10 = focusRing ? "" : void 0, t11 = pressed ? "" : void 0, t12 = selected ? "" : void 0;
769
768
  let t13;
770
- $[17] !== as || $[18] !== radius || $[19] !== rest || $[20] !== style || $[21] !== t10 || $[22] !== t11 || $[23] !== t12 || $[24] !== t7 || $[25] !== t8 || $[26] !== t9 ? (t13 = /* @__PURE__ */ jsx(Box, { "data-ui": "Card", ...rest, as, className: t7, "data-checkered": t8, "data-disabled": t9, "data-focus-ring": t10, "data-pressed": t11, "data-selected": t12, radius, style }), $[17] = as, $[18] = radius, $[19] = rest, $[20] = style, $[21] = t10, $[22] = t11, $[23] = t12, $[24] = t7, $[25] = t8, $[26] = t9, $[27] = t13) : t13 = $[27];
769
+ $[16] !== as || $[17] !== radius || $[18] !== rest || $[19] !== style || $[20] !== t10 || $[21] !== t11 || $[22] !== t12 || $[23] !== t7 || $[24] !== t8 || $[25] !== t9 ? (t13 = /* @__PURE__ */ jsx(Box, { "data-ui": "Card", ...rest, as, className: t7, "data-checkered": t8, "data-disabled": t9, "data-focus-ring": t10, "data-pressed": t11, "data-selected": t12, radius, style }), $[16] = as, $[17] = radius, $[18] = rest, $[19] = style, $[20] = t10, $[21] = t11, $[22] = t12, $[23] = t7, $[24] = t8, $[25] = t9, $[26] = t13) : t13 = $[26];
771
770
  let node = t13;
772
771
  if (scheme === parent?.scheme && tone === parent?.tone)
773
772
  return node;
774
773
  const t14 = scheme ?? "light", t15 = tone ?? "default", t16 = parent?.unstable_CompatProvider;
775
774
  let t17;
776
- if ($[28] !== node || $[29] !== t14 || $[30] !== t15 || $[31] !== t16 ? (t17 = /* @__PURE__ */ jsx(CardProvider, { scheme: t14, tone: t15, unstable_CompatProvider: t16, children: node }), $[28] = node, $[29] = t14, $[30] = t15, $[31] = t16, $[32] = t17) : t17 = $[32], node = t17, parent?.unstable_CompatProvider) {
775
+ if ($[27] !== node || $[28] !== t14 || $[29] !== t15 || $[30] !== t16 ? (t17 = /* @__PURE__ */ jsx(CardProvider, { scheme: t14, tone: t15, unstable_CompatProvider: t16, children: node }), $[27] = node, $[28] = t14, $[29] = t15, $[30] = t16, $[31] = t17) : t17 = $[31], node = t17, parent?.unstable_CompatProvider) {
777
776
  const CompatProvider = parent.unstable_CompatProvider, t18 = scheme ?? "light", t19 = tone ?? parent.tone;
778
777
  let t20;
779
- return $[33] !== CompatProvider || $[34] !== node || $[35] !== t18 || $[36] !== t19 ? (t20 = /* @__PURE__ */ jsx(CompatProvider, { scheme: t18, tone: t19, children: node }), $[33] = CompatProvider, $[34] = node, $[35] = t18, $[36] = t19, $[37] = t20) : t20 = $[37], t20;
778
+ return $[32] !== CompatProvider || $[33] !== node || $[34] !== t18 || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsx(CompatProvider, { scheme: t18, tone: t19, children: node }), $[32] = CompatProvider, $[33] = node, $[34] = t18, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
780
779
  }
781
780
  return node;
782
781
  }