@sanity/ui 3.3.3 → 3.3.5
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/_chunks/refractor.mjs.map +1 -0
- package/dist/{tabList.js → _chunks/tabList.js} +3 -3
- package/dist/{tabList.mjs → _chunks/tabList.mjs} +3 -3
- package/dist/_chunks/tabList.mjs.map +1 -0
- package/dist/_chunks/theme.d.mts +1206 -0
- package/dist/_chunks/theme.d.mts.map +1 -0
- package/dist/_chunks/theme.d.ts +1206 -0
- package/dist/_chunks/theme.d.ts.map +1 -0
- package/dist/{theme2.mjs → _chunks/theme.mjs} +1 -1
- package/dist/_chunks/theme.mjs.map +1 -0
- package/dist/{useTheme.d.mts → _chunks/useTheme.d.mts} +2 -2
- package/dist/_chunks/useTheme.d.mts.map +1 -0
- package/dist/{useTheme.d.ts → _chunks/useTheme.d.ts} +2 -2
- package/dist/_chunks/useTheme.d.ts.map +1 -0
- package/dist/_visual-editing.d.mts +1 -1
- package/dist/_visual-editing.d.ts +1 -1
- package/dist/_visual-editing.js +1 -1
- package/dist/_visual-editing.mjs +1 -1
- package/dist/index.d.mts +10 -10
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -18
- package/dist/index.mjs +19 -19
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +2 -1206
- package/dist/theme.d.ts +2 -1206
- package/dist/theme.js +1 -1
- package/dist/theme.mjs +1 -1
- package/package.json +4 -4
- package/dist/refractor.mjs.map +0 -1
- package/dist/tabList.mjs.map +0 -1
- package/dist/theme.d.mts.map +0 -1
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme2.d.mts +0 -2
- package/dist/theme2.d.ts +0 -2
- package/dist/theme2.mjs.map +0 -1
- package/dist/useTheme.d.mts.map +0 -1
- package/dist/useTheme.d.ts.map +0 -1
- /package/dist/{refractor.js → _chunks/refractor.js} +0 -0
- /package/dist/{refractor.mjs → _chunks/refractor.mjs} +0 -0
- /package/dist/{theme2.js → _chunks/theme.js} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { X as getTheme_v2 } from "./
|
|
2
|
-
import { $ as responsiveInputPaddingStyle, A as useMediaIndex, At as parseColor, B as _cardColorStyle, C as BoundaryElementContext, Ct as isHTMLTextAreaElement, D as Grid, Dt as hexToRgb, E as Inline, Et as createColorTheme, F as _ResizeObserver, Ft as studioTheme, G as SpanWithTextOverflow, H as Flex, I as useCustomValidity, J as textInputBaseStyle, K as responsiveRadiusStyle, L as useClickOutsideEvent, M as useGlobalKeyDown, Mt as rgbToHsl, N as useElementSize, Nt as rgba, O as usePrefersReducedMotion, Ot as hslToRgb, P as _elementSizeObserver, Pt as screen, Q as responsiveInputPaddingIconRightStyle, R as Card, S as isRecord, St as isHTMLSelectElement, T as KBD, Tt as EMPTY_RECORD, U as Text, V as Spinner, W as Box, X as textInputRepresentationStyle, Y as textInputFontSizeStyle, Z as textInputRootStyle, _ as usePortal, _t as containsOrEqualsElement, a as MenuDivider, at as useRootTheme, b as LayerProvider, bt as isHTMLElement, c as Tooltip, ct as responsiveTextFont, d as useDelayedState, dt as _fillCSSObject, et as focusRingBorderStyle, f as TextInput, ft as _getArrayProp, g as Portal, gt as _isEnterToClickElement, h as PortalProvider, ht as rem, i as MenuGroup, it as ThemeColorProvider, j as useMatchMedia, jt as rgbToHex, k as usePrefersDark, kt as multiply, l as useTooltipDelayGroup, lt as responsiveTextAlignStyle, m as Popover, mt as _responsive, n as Tab, nt as useTheme, o as Menu, ot as ThemeProvider, p as Stack, pt as _getResponsiveSpace, q as responsivePaddingStyle, r as MenuItem, rt as useTheme_v2, s as Hotkeys, st as createGlobalScopedContext, t as TabList, tt as focusRingStyle, u as TooltipDelayGroupContext, ut as responsiveFont, v as Layer, vt as isHTMLAnchorElement, w as Arrow, wt as EMPTY_ARRAY, x as useBoundaryElement, xt as isHTMLInputElement, y as useLayer, yt as isHTMLButtonElement, z as Button } from "./tabList.mjs";
|
|
1
|
+
import { X as getTheme_v2 } from "./_chunks/theme.mjs";
|
|
2
|
+
import { $ as responsiveInputPaddingStyle, A as useMediaIndex, At as parseColor, B as _cardColorStyle, C as BoundaryElementContext, Ct as isHTMLTextAreaElement, D as Grid, Dt as hexToRgb, E as Inline, Et as createColorTheme, F as _ResizeObserver, Ft as studioTheme, G as SpanWithTextOverflow, H as Flex, I as useCustomValidity, J as textInputBaseStyle, K as responsiveRadiusStyle, L as useClickOutsideEvent, M as useGlobalKeyDown, Mt as rgbToHsl, N as useElementSize, Nt as rgba, O as usePrefersReducedMotion, Ot as hslToRgb, P as _elementSizeObserver, Pt as screen, Q as responsiveInputPaddingIconRightStyle, R as Card, S as isRecord, St as isHTMLSelectElement, T as KBD, Tt as EMPTY_RECORD, U as Text, V as Spinner, W as Box, X as textInputRepresentationStyle, Y as textInputFontSizeStyle, Z as textInputRootStyle, _ as usePortal, _t as containsOrEqualsElement, a as MenuDivider, at as useRootTheme, b as LayerProvider, bt as isHTMLElement, c as Tooltip, ct as responsiveTextFont, d as useDelayedState, dt as _fillCSSObject, et as focusRingBorderStyle, f as TextInput, ft as _getArrayProp, g as Portal, gt as _isEnterToClickElement, h as PortalProvider, ht as rem, i as MenuGroup, it as ThemeColorProvider, j as useMatchMedia, jt as rgbToHex, k as usePrefersDark, kt as multiply, l as useTooltipDelayGroup, lt as responsiveTextAlignStyle, m as Popover, mt as _responsive, n as Tab, nt as useTheme, o as Menu, ot as ThemeProvider, p as Stack, pt as _getResponsiveSpace, q as responsivePaddingStyle, r as MenuItem, rt as useTheme_v2, s as Hotkeys, st as createGlobalScopedContext, t as TabList, tt as focusRingStyle, u as TooltipDelayGroupContext, ut as responsiveFont, v as Layer, vt as isHTMLAnchorElement, w as Arrow, wt as EMPTY_ARRAY, x as useBoundaryElement, xt as isHTMLInputElement, y as useLayer, yt as isHTMLButtonElement, z as Button } from "./_chunks/tabList.mjs";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { CheckmarkIcon, ChevronDownIcon, CloseIcon, RemoveIcon, SpinnerIcon, ToggleArrowRightIcon } from "@sanity/icons";
|
|
5
5
|
import { Children, Component, Fragment, Suspense, cloneElement, forwardRef, isValidElement, lazy, startTransition, useContext, useEffect, useId, useImperativeHandle, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -104,7 +104,7 @@ function labelBaseStyle(props) {
|
|
|
104
104
|
}
|
|
105
105
|
const StyledLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
106
106
|
displayName: "StyledLabel",
|
|
107
|
-
componentId: "sc-
|
|
107
|
+
componentId: "sc-cvgwlt-0"
|
|
108
108
|
})(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), LabelComponent = forwardRef(function(props, ref) {
|
|
109
109
|
let $ = c(26), accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;
|
|
110
110
|
$[0] === props ? (accent = $[1], align = $[2], childrenProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], textOverflow = $[7], weight = $[8]) : ({accent, align, children: childrenProp, muted: t0, size: t1, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = textOverflow, $[8] = weight);
|
|
@@ -716,35 +716,35 @@ function codeSyntaxHighlightingStyle({ theme }) {
|
|
|
716
716
|
function codeBaseStyle() {
|
|
717
717
|
return css`color:var(--card-code-fg-color);& code{font-family:inherit;&.refractor .token{${codeSyntaxHighlightingStyle}}}& a{color:inherit;text-decoration:underline;border-radius:1px;}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;}`;
|
|
718
718
|
}
|
|
719
|
-
const LazyRefractor = lazy(() => import("./refractor.mjs")), StyledCode = /* @__PURE__ */ styled.pre.withConfig({
|
|
719
|
+
const LazyRefractor = lazy(() => import("./_chunks/refractor.mjs")), StyledCode = /* @__PURE__ */ styled.pre.withConfig({
|
|
720
720
|
displayName: "StyledCode",
|
|
721
|
-
componentId: "sc-
|
|
721
|
+
componentId: "sc-botxhl-0"
|
|
722
722
|
})(codeBaseStyle, responsiveCodeFontStyle), CodeComponent = forwardRef(function(props, ref) {
|
|
723
723
|
let $ = c(22), children, language, restProps, t0, weight;
|
|
724
724
|
$[0] === props ? (children = $[1], language = $[2], restProps = $[3], t0 = $[4], weight = $[5]) : ({children, language, size: t0, weight, ...restProps} = props, $[0] = props, $[1] = children, $[2] = language, $[3] = restProps, $[4] = t0, $[5] = weight);
|
|
725
725
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
726
726
|
$[6] === size ? t1 = $[7] : (t1 = _getArrayProp(size), $[6] = size, $[7] = t1);
|
|
727
|
-
let t2;
|
|
728
|
-
$[8] === children ?
|
|
729
|
-
let
|
|
730
|
-
$[10] !== children || $[11] !== language ? (
|
|
727
|
+
let t2 = weight, t3;
|
|
728
|
+
$[8] === children ? t3 = $[9] : (t3 = /* @__PURE__ */ jsx("code", { children }), $[8] = children, $[9] = t3);
|
|
729
|
+
let t4;
|
|
730
|
+
$[10] !== children || $[11] !== language ? (t4 = /* @__PURE__ */ jsx(LazyRefractor, {
|
|
731
731
|
language,
|
|
732
732
|
value: children
|
|
733
|
-
}), $[10] = children, $[11] = language, $[12] =
|
|
734
|
-
let t4;
|
|
735
|
-
$[13] !== t2 || $[14] !== t3 ? (t4 = /* @__PURE__ */ jsx(Suspense, {
|
|
736
|
-
fallback: t2,
|
|
737
|
-
children: t3
|
|
738
|
-
}), $[13] = t2, $[14] = t3, $[15] = t4) : t4 = $[15];
|
|
733
|
+
}), $[10] = children, $[11] = language, $[12] = t4) : t4 = $[12];
|
|
739
734
|
let t5;
|
|
740
|
-
|
|
735
|
+
$[13] !== t3 || $[14] !== t4 ? (t5 = /* @__PURE__ */ jsx(Suspense, {
|
|
736
|
+
fallback: t3,
|
|
737
|
+
children: t4
|
|
738
|
+
}), $[13] = t3, $[14] = t4, $[15] = t5) : t5 = $[15];
|
|
739
|
+
let t6;
|
|
740
|
+
return $[16] !== ref || $[17] !== restProps || $[18] !== t1 || $[19] !== t2 || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledCode, {
|
|
741
741
|
"data-ui": "Code",
|
|
742
742
|
...restProps,
|
|
743
743
|
$size: t1,
|
|
744
|
-
$weight:
|
|
744
|
+
$weight: t2,
|
|
745
745
|
ref,
|
|
746
|
-
children:
|
|
747
|
-
}), $[16] = ref, $[17] = restProps, $[18] = t1, $[19] =
|
|
746
|
+
children: t5
|
|
747
|
+
}), $[16] = ref, $[17] = restProps, $[18] = t1, $[19] = t2, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
|
|
748
748
|
});
|
|
749
749
|
CodeComponent.displayName = "ForwardRef(Code)";
|
|
750
750
|
/**
|