@sanity/ui 4.0.0-static.15 → 4.0.0-static.17
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/css/index.css +1 -1
- package/dist/css/index.css.map +1 -1
- package/dist/css/index.d.ts +4 -0
- package/dist/css/index.js +5986 -5974
- package/dist/css/index.js.map +1 -1
- package/dist/index.js +9 -10
- package/dist/index.js.map +1 -1
- package/package.json +6 -15
- package/src/core/components/autocomplete/__workshop__/custom.tsx +14 -1
- package/src/core/components/autocomplete/__workshop__/example.tsx +12 -1
- package/src/core/components/dialog/__workshop__/position.tsx +9 -1
- package/src/core/components/dialog/__workshop__/props.tsx +2 -0
- package/src/core/components/menu/__workshop__/menuButton.tsx +6 -1
- package/src/core/components/menu/__workshop__/tones.tsx +7 -1
- package/src/core/components/toast/__workshop__/toast.tsx +2 -0
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +8 -1
- package/src/core/primitives/avatar/__workshop__/stack.tsx +5 -1
- package/src/core/primitives/badge/__workshop__/props.tsx +12 -1
- package/src/core/primitives/box/__workshop__/props.tsx +6 -1
- package/src/core/primitives/button/__workshop__/props.tsx +22 -0
- package/src/core/primitives/button/__workshop__/stacked.tsx +16 -0
- package/src/core/primitives/card/__workshop__/props.tsx +10 -0
- package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
- package/src/core/primitives/card/card.tsx +2 -2
- package/src/core/primitives/code/__workshop__/props.tsx +6 -1
- package/src/core/primitives/container/__workshop__/example.tsx +6 -1
- package/src/core/primitives/flex/__workshop__/example.tsx +7 -1
- package/src/core/primitives/heading/__workshop__/plain.tsx +12 -1
- package/src/core/primitives/inline/__workshop__/plain.tsx +5 -1
- package/src/core/primitives/label/__workshop__/plain.tsx +15 -1
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +13 -1
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +2 -0
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +8 -0
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +7 -1
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +6 -0
- package/src/core/primitives/select/__workshop__/plain.tsx +4 -0
- package/src/core/primitives/skeleton/__workshop__/delay.tsx +9 -1
- package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +9 -1
- package/src/core/primitives/spinner/__workshop__/Props.tsx +6 -1
- package/src/core/primitives/stack/__workshop__/plain.tsx +4 -1
- package/src/core/primitives/text/__workshop__/colored.tsx +8 -1
- package/src/core/primitives/text/__workshop__/example.tsx +15 -1
- package/src/core/primitives/textArea/__workshop__/plain.tsx +8 -0
- package/src/core/primitives/textInput/__workshop__/plain.tsx +34 -4
- package/src/core/primitives/textInput/__workshop__/typed.tsx +7 -1
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +2 -0
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +2 -0
- package/src/core/primitives/tooltip/__workshop__/props.tsx +12 -0
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +5 -0
- package/src/css/primitives/card/__workshop__/color.tsx +9 -1
- package/src/css/primitives/card/card.css.ts +10 -0
- package/src/css/theme/buildCSSTheme.ts +4 -0
- package/src/css/types.ts +4 -0
- 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(
|
|
746
|
-
let className,
|
|
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] =
|
|
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
|
-
$[
|
|
762
|
+
$[12] !== className || $[13] !== t6 || $[14] !== tone ? (t7 = card({
|
|
764
763
|
className,
|
|
765
764
|
scheme: t6,
|
|
766
765
|
tone
|
|
767
|
-
}), $[
|
|
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
|
-
$[
|
|
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 ($[
|
|
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 $[
|
|
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
|
}
|