@sanity/ui 4.4.1 → 4.4.3
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/{arrow-A3jQ7LS0.js → arrow-MMVAW3Ew.js} +2 -2
- package/dist/{arrow-A3jQ7LS0.js.map → arrow-MMVAW3Ew.js.map} +1 -1
- package/dist/autocomplete.d.ts +5 -1
- package/dist/autocomplete.d.ts.map +1 -1
- package/dist/autocomplete.js +96 -99
- package/dist/autocomplete.js.map +1 -1
- package/dist/breadcrumbs.js +4 -4
- package/dist/{button-dhq4ViVg.js → button-Btcy6IOp.js} +48 -46
- package/dist/button-Btcy6IOp.js.map +1 -0
- package/dist/button-dnqMFkWg.d.ts.map +1 -1
- package/dist/code.d.ts.map +1 -1
- package/dist/code.js +12 -6
- package/dist/code.js.map +1 -1
- package/dist/{flex-BqQXaSxS.js → flex-ohP2jG9d.js} +2 -2
- package/dist/{flex-BqQXaSxS.js.map → flex-ohP2jG9d.js.map} +1 -1
- package/dist/{getElementRef-Jw7gY0eV.js → getElementRef-BLVMlHTn.js} +78 -3
- package/dist/getElementRef-BLVMlHTn.js.map +1 -0
- package/dist/{grid-Bpb2bIJ6.js → grid-D-gOpN8z.js} +2 -2
- package/dist/{grid-Bpb2bIJ6.js.map → grid-D-gOpN8z.js.map} +1 -1
- package/dist/{hotkeys-sG9yO97K.js → hotkeys-BPJuQ-gO.js} +10 -11
- package/dist/{hotkeys-sG9yO97K.js.map → hotkeys-BPJuQ-gO.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +133 -81
- package/dist/index.js.map +1 -1
- package/dist/{layer-AWzYcY_j.js → layer-DP8gT1ex.js} +2 -2
- package/dist/{layer-AWzYcY_j.js.map → layer-DP8gT1ex.js.map} +1 -1
- package/dist/menu.d.ts +5 -0
- package/dist/menu.d.ts.map +1 -1
- package/dist/menu.js +184 -153
- package/dist/menu.js.map +1 -1
- package/dist/{popover-B0kvwaep.js → popover-BVbv1K3z.js} +143 -146
- package/dist/popover-BVbv1K3z.js.map +1 -0
- package/dist/popover-HDVgZg5e.d.ts.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/responsiveFont-Cyvxxz-G.js +81 -0
- package/dist/responsiveFont-Cyvxxz-G.js.map +1 -0
- package/dist/{stack-Cv-WM-7p.js → stack-CPdFknrG.js} +22 -16
- package/dist/stack-CPdFknrG.js.map +1 -0
- package/dist/{textInput-Ddxi4mkC.js → textInput-nVtAHeX8.js} +38 -17
- package/dist/textInput-nVtAHeX8.js.map +1 -0
- package/dist/toast.js +5 -5
- package/dist/tooltip.js +72 -84
- package/dist/tooltip.js.map +1 -1
- package/dist/{useLayer-B0i19TTM.js → useLayer-D_TnC6On.js} +43 -28
- package/dist/useLayer-D_TnC6On.js.map +1 -0
- package/package.json +1 -1
- package/dist/button-dhq4ViVg.js.map +0 -1
- package/dist/codeFontStyle-B-bhR3hF.js +0 -11
- package/dist/codeFontStyle-B-bhR3hF.js.map +0 -1
- package/dist/getElementRef-Jw7gY0eV.js.map +0 -1
- package/dist/popover-B0kvwaep.js.map +0 -1
- package/dist/responsiveFont-B08q0jwm.js +0 -57
- package/dist/responsiveFont-B08q0jwm.js.map +0 -1
- package/dist/stack-Cv-WM-7p.js.map +0 -1
- package/dist/textInput-Ddxi4mkC.js.map +0 -1
- package/dist/useLayer-B0i19TTM.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { a as _ruleSet, c as EMPTY_RECORD, i as _responsive, n as _getArrayProp, o as rem, r as _getResponsiveSpace, t as _fillCSSObject } from "./helpers-XThPpWje.js";
|
|
3
|
-
import { a as
|
|
3
|
+
import { _ as isFocusable, a as textInputColorStyle, c as textInputRepresentationColorStyle, d as responsiveInputPaddingStyle, f as useCustomValidity, g as focusLastDescendant, h as focusFirstDescendant, i as textInputBaseStyle, l as textInputRepresentationStyle, m as attemptFocus, n as inputRoot, o as textInputFontSizeStyle, p as _hasFocus, r as textAreaRoot, s as textInputFontStyle, t as TextInput, u as responsiveInputPaddingIconRightStyle, v as _raf, y as _raf2 } from "./textInput-nVtAHeX8.js";
|
|
4
4
|
import { a as isHTMLElement, c as isHTMLTextAreaElement, i as isHTMLButtonElement, n as containsOrEqualsElement, o as isHTMLInputElement, r as isHTMLAnchorElement, s as isHTMLSelectElement, t as _isEnterToClickElement } from "./element-BYgCE_iK.js";
|
|
5
5
|
import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
|
|
6
|
-
import { _ as useTheme_v2, a as useMatchMedia, b as responsivePaddingStyle, c as ThemeColorProvider, d as createGlobalScopedContext, g as useTheme, h as _cardColorStyle, i as usePrefersReducedMotion, l as useRootTheme, m as focusRingStyle, n as LayerProvider, o as useMediaIndex, p as focusRingBorderStyle, s as Card, t as useLayer, u as ThemeProvider, v as responsiveRadiusStyle, y as Box } from "./useLayer-
|
|
7
|
-
import { t as Flex } from "./flex-
|
|
8
|
-
import { a as
|
|
9
|
-
import {
|
|
10
|
-
import { n as Spinner, t as Button } from "./button-
|
|
6
|
+
import { _ as useTheme_v2, a as useMatchMedia, b as responsivePaddingStyle, c as ThemeColorProvider, d as createGlobalScopedContext, g as useTheme, h as _cardColorStyle, i as usePrefersReducedMotion, l as useRootTheme, m as focusRingStyle, n as LayerProvider, o as useMediaIndex, p as focusRingBorderStyle, s as Card, t as useLayer, u as ThemeProvider, v as responsiveRadiusStyle, y as Box } from "./useLayer-D_TnC6On.js";
|
|
7
|
+
import { t as Flex } from "./flex-ohP2jG9d.js";
|
|
8
|
+
import { a as fontColorStyle, i as responsiveTextAlignStyle, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-CPdFknrG.js";
|
|
9
|
+
import { i as responsiveFont, n as _fontWeight, r as _responsiveFontSize, t as _fontBase } from "./responsiveFont-Cyvxxz-G.js";
|
|
10
|
+
import { n as Spinner, t as Button } from "./button-Btcy6IOp.js";
|
|
11
11
|
import { t as _elementSizeObserver } from "./elementSizeObserver-pevZfdGa.js";
|
|
12
|
-
import { a as resolvePortalElement, i as PortalContext, n as Portal, o as useBoundaryElement, r as usePortal, s as BoundaryElementContext, t as Arrow } from "./arrow-
|
|
12
|
+
import { a as resolvePortalElement, i as PortalContext, n as Portal, o as useBoundaryElement, r as usePortal, s as BoundaryElementContext, t as Arrow } from "./arrow-MMVAW3Ew.js";
|
|
13
13
|
import { t as useClickOutsideEvent } from "./useClickOutsideEvent-CC1zgOmv.js";
|
|
14
|
-
import { t as responsiveCodeFontStyle } from "./codeFontStyle-B-bhR3hF.js";
|
|
15
14
|
import { a as rgba$1, c as hslToRgb$1, i as multiply$1, l as rgbToHex$1, n as buildTheme, o as parseColor$1, r as screen$1, s as hexToRgb$1, t as createColorTheme$1, u as rgbToHsl$1 } from "./factory-BzXTX8_Q.js";
|
|
16
|
-
import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-
|
|
17
|
-
import { t as Layer } from "./layer-
|
|
18
|
-
import { t as Grid } from "./grid-
|
|
15
|
+
import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-BPJuQ-gO.js";
|
|
16
|
+
import { t as Layer } from "./layer-DP8gT1ex.js";
|
|
17
|
+
import { t as Grid } from "./grid-D-gOpN8z.js";
|
|
19
18
|
import { c } from "react/compiler-runtime";
|
|
20
19
|
import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
|
|
21
20
|
import { clsx } from "clsx/lite";
|
|
@@ -706,7 +705,7 @@ function Tree(props) {
|
|
|
706
705
|
}
|
|
707
706
|
function treeItemRootColorStyle(props) {
|
|
708
707
|
let { color } = getTheme_v2(props.theme), tone = color.selectable.default;
|
|
709
|
-
return css`&[role='none']
|
|
708
|
+
return css`&[role='none'] > [role='treeitem'],&[role='treeitem'] > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.enabled)}}&[role='none'][data-selected] > [role='treeitem'],&[role='treeitem'][data-selected] > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.pressed)}}@media (hover:hover){&[role='none']:not([data-selected]) > [role='treeitem']:not(:focus):hover,&[role='treeitem']:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover{${_cardColorStyle(color, tone.hovered)}}&[role='none'] > [role='treeitem']:focus,&[role='treeitem']:focus > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.selected)}}}`;
|
|
710
709
|
}
|
|
711
710
|
function treeItemBoxStyle(props) {
|
|
712
711
|
let { $level } = props, { space } = getTheme_v2(props.theme);
|
|
@@ -979,21 +978,20 @@ function usePrefersDark(t0) {
|
|
|
979
978
|
function _temp$3() {
|
|
980
979
|
return !1;
|
|
981
980
|
}
|
|
982
|
-
/**
|
|
983
|
-
* Get responsive CSS for the `label` font style.
|
|
984
|
-
* @internal
|
|
985
|
-
*/
|
|
986
|
-
function responsiveLabelFont(props) {
|
|
987
|
-
return responsiveFont("label", props);
|
|
988
|
-
}
|
|
989
981
|
function labelBaseStyle(props) {
|
|
990
|
-
let {
|
|
991
|
-
return css
|
|
992
|
-
}
|
|
993
|
-
const StyledLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
982
|
+
let { font } = getTheme_v2(props.theme);
|
|
983
|
+
return css`${_fontBase("label", props)} text-transform:uppercase;& code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}`;
|
|
984
|
+
}
|
|
985
|
+
const StyledLabel = /* @__PURE__ */ styled(/* @__PURE__ */ styled(/* @__PURE__ */ styled.div.withConfig({
|
|
986
|
+
displayName: "LabelBase",
|
|
987
|
+
componentId: "sc-juabwe-0"
|
|
988
|
+
})(labelBaseStyle)).withConfig({
|
|
989
|
+
displayName: "LabelSize",
|
|
990
|
+
componentId: "sc-juabwe-1"
|
|
991
|
+
})((props) => _responsiveFontSize("label", props))).withConfig({
|
|
994
992
|
displayName: "StyledLabel",
|
|
995
|
-
componentId: "sc-
|
|
996
|
-
})(
|
|
993
|
+
componentId: "sc-juabwe-2"
|
|
994
|
+
})((props) => _fontWeight("label", props), responsiveTextAlignStyle, fontColorStyle);
|
|
997
995
|
function LabelComponent(props) {
|
|
998
996
|
let $ = c(27), accent, align, childrenProp, ref, restProps, t0, t1, textOverflow, weight;
|
|
999
997
|
$[0] === props ? (accent = $[1], align = $[2], childrenProp = $[3], ref = $[4], restProps = $[5], t0 = $[6], t1 = $[7], textOverflow = $[8], weight = $[9]) : ({accent, align, children: childrenProp, muted: t0, ref, size: t1, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = ref, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = textOverflow, $[9] = weight);
|
|
@@ -1028,11 +1026,16 @@ function LabelComponent(props) {
|
|
|
1028
1026
|
* @public
|
|
1029
1027
|
*/
|
|
1030
1028
|
const Label = LabelComponent;
|
|
1031
|
-
function
|
|
1032
|
-
let { $color } = props
|
|
1029
|
+
function avatarColorStyle(props) {
|
|
1030
|
+
let { $color } = props;
|
|
1033
1031
|
return {
|
|
1034
1032
|
"--avatar-bg-color": `var(--card-avatar-${$color}-bg-color)`,
|
|
1035
|
-
"--avatar-fg-color": `var(--card-avatar-${$color}-fg-color)
|
|
1033
|
+
"--avatar-fg-color": `var(--card-avatar-${$color}-fg-color)`
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
function avatarRootStyle(props) {
|
|
1037
|
+
let { avatar } = getTheme_v2(props.theme);
|
|
1038
|
+
return {
|
|
1036
1039
|
width: "var(--avatar-size)",
|
|
1037
1040
|
height: "var(--avatar-size)",
|
|
1038
1041
|
borderRadius: "calc(var(--avatar-size) / 2)",
|
|
@@ -1069,12 +1072,15 @@ function responsiveAvatarSizeStyle(props) {
|
|
|
1069
1072
|
});
|
|
1070
1073
|
}
|
|
1071
1074
|
var avatarArrow = "_1jezl1b0", avatarStack = "_1jezl1b5";
|
|
1072
|
-
const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
|
|
1075
|
+
const StyledAvatar = /* @__PURE__ */ styled(/* @__PURE__ */ styled.div.withConfig({
|
|
1076
|
+
displayName: "AvatarBase",
|
|
1077
|
+
componentId: "sc-mdpy4s-0"
|
|
1078
|
+
})(avatarRootStyle)).withConfig({
|
|
1073
1079
|
displayName: "StyledAvatar",
|
|
1074
|
-
componentId: "sc-
|
|
1075
|
-
})(responsiveAvatarSizeStyle,
|
|
1080
|
+
componentId: "sc-mdpy4s-1"
|
|
1081
|
+
})(responsiveAvatarSizeStyle, avatarColorStyle), InitialsLabel = /* @__PURE__ */ styled(Label).withConfig({
|
|
1076
1082
|
displayName: "InitialsLabel",
|
|
1077
|
-
componentId: "sc-
|
|
1083
|
+
componentId: "sc-mdpy4s-2"
|
|
1078
1084
|
})({ color: "inherit" });
|
|
1079
1085
|
function AvatarComponent(props) {
|
|
1080
1086
|
let $ = c(42), __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, ref, restProps, src, t0, t1, t2, title;
|
|
@@ -1261,23 +1267,21 @@ function AvatarStack(props) {
|
|
|
1261
1267
|
]
|
|
1262
1268
|
}), $[35] = T0, $[36] = t2, $[37] = t3, $[38] = t4, $[39] = t5, $[40] = t6, $[41] = t7, $[42] = t8, $[43] = t9, $[44] = t10) : t10 = $[44], t10;
|
|
1263
1269
|
}
|
|
1264
|
-
|
|
1270
|
+
const badgeBaseStyle = css`background-color:var(--card-bg-color);cursor:default;&:not([hidden]){display:inline-block;vertical-align:top;}`;
|
|
1271
|
+
function badgeToneStyle(props) {
|
|
1265
1272
|
let { $tone } = props;
|
|
1266
1273
|
return {
|
|
1267
1274
|
"--card-bg-color": `var(--card-badge-${$tone}-bg-color)`,
|
|
1268
|
-
"--card-fg-color": `var(--card-badge-${$tone}-fg-color)
|
|
1269
|
-
backgroundColor: "var(--card-bg-color)",
|
|
1270
|
-
cursor: "default",
|
|
1271
|
-
"&:not([hidden])": {
|
|
1272
|
-
display: "inline-block",
|
|
1273
|
-
verticalAlign: "top"
|
|
1274
|
-
}
|
|
1275
|
+
"--card-fg-color": `var(--card-badge-${$tone}-fg-color)`
|
|
1275
1276
|
};
|
|
1276
1277
|
}
|
|
1277
|
-
const
|
|
1278
|
+
const BadgeBase = styled(Box).withConfig({
|
|
1279
|
+
displayName: "BadgeBase",
|
|
1280
|
+
componentId: "sc-1b0zh7-0"
|
|
1281
|
+
})`${badgeBaseStyle}`, StyledBadge = /* @__PURE__ */ styled(BadgeBase).withConfig({
|
|
1278
1282
|
displayName: "StyledBadge",
|
|
1279
|
-
componentId: "sc-
|
|
1280
|
-
})(responsiveRadiusStyle,
|
|
1283
|
+
componentId: "sc-1b0zh7-1"
|
|
1284
|
+
})(responsiveRadiusStyle, badgeToneStyle), Badge = function Badge(props) {
|
|
1281
1285
|
let $ = c(22), children, ref, restProps, t0, t1, t2, t3;
|
|
1282
1286
|
$[0] === props ? (children = $[1], ref = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7]) : ({children, fontSize: t0, padding: t1, radius: t2, ref, tone: t3, ...restProps} = props, $[0] = props, $[1] = children, $[2] = ref, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3);
|
|
1283
1287
|
let fontSize = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? "full" : t2, tone = t3 === void 0 ? "default" : t3, t4;
|
|
@@ -1301,17 +1305,21 @@ const StyledBadge = /* @__PURE__ */ styled(Box).withConfig({
|
|
|
1301
1305
|
}), $[15] = ref, $[16] = restProps, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = tone, $[21] = t7) : t7 = $[21], t7;
|
|
1302
1306
|
};
|
|
1303
1307
|
function inputElementStyles(props) {
|
|
1304
|
-
let {
|
|
1305
|
-
return css`position:absolute;top:0;left:0;width:100%;height:100%;outline:none;opacity:0;z-index:1;padding:0;margin:0;& + span{position:relative;display:block;height:${rem(input.checkbox.size)};width:${rem(input.checkbox.size)};box-sizing:border-box;box-shadow:${
|
|
1308
|
+
let { input, radius } = getTheme_v2(props.theme), { focusRing } = input.checkbox;
|
|
1309
|
+
return css`position:absolute;top:0;left:0;width:100%;height:100%;outline:none;opacity:0;z-index:1;padding:0;margin:0;& + span{position:relative;display:block;height:${rem(input.checkbox.size)};width:${rem(input.checkbox.size)};box-sizing:border-box;border-radius:${rem(radius[2])};line-height:1;& > svg{display:block;position:absolute;opacity:0;height:100%;width:100%;& > path{vector-effect:non-scaling-stroke;stroke-width:1.5px !important;}}}&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({ focusRing })};}&:not(:disabled):focus:focus-visible&:checked + span{box-shadow:${focusRingStyle({ focusRing: {
|
|
1310
|
+
width: 1,
|
|
1311
|
+
offset: 1
|
|
1312
|
+
} })};}&:checked + span > svg:first-child{opacity:1;}&:indeterminate + span > svg:last-child{opacity:1;}`;
|
|
1313
|
+
}
|
|
1314
|
+
function inputElementColorStyles(props) {
|
|
1315
|
+
let { color, input } = getTheme_v2(props.theme);
|
|
1316
|
+
return css`& + span{box-shadow:${focusRingBorderStyle({
|
|
1306
1317
|
color: color.input.default.enabled.border,
|
|
1307
1318
|
width: input.border.width
|
|
1308
|
-
})};
|
|
1319
|
+
})};background-color:${color.input.default.enabled.bg};}&:checked + span{background:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
|
|
1309
1320
|
color: color.input.default.enabled.fg,
|
|
1310
1321
|
width: input.border.width
|
|
1311
|
-
})};color:${color.input.default.enabled.bg};}
|
|
1312
|
-
width: 1,
|
|
1313
|
-
offset: 1
|
|
1314
|
-
} })};}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({
|
|
1322
|
+
})};color:${color.input.default.enabled.bg};}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({
|
|
1315
1323
|
width: input.border.width,
|
|
1316
1324
|
color: color.input.invalid.enabled.muted.bg
|
|
1317
1325
|
})};color:${color.input.default.disabled.fg};}&[data-error]&:checked + span{background-color:${color.input.invalid.enabled.muted.bg};color:${color.input.default.enabled.bg};}&[data-error]&:checked&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({
|
|
@@ -1329,13 +1337,16 @@ function inputElementStyles(props) {
|
|
|
1329
1337
|
})};color:${color.input.default.disabled.fg};}&:disabled&:checked + span{background-color:${color.input.default.disabled.muted.bg};}&[data-read-only] + span{background-color:${color.input.default.readOnly.bg};box-shadow:${focusRingBorderStyle({
|
|
1330
1338
|
width: input.border.width,
|
|
1331
1339
|
color: color.input.default.readOnly.border
|
|
1332
|
-
})};color:${color.input.default.readOnly.fg};}&[data-read-only]&:checked + span{background-color:${color.input.default.readOnly.muted.bg};}
|
|
1340
|
+
})};color:${color.input.default.readOnly.fg};}&[data-read-only]&:checked + span{background-color:${color.input.default.readOnly.muted.bg};}`;
|
|
1333
1341
|
}
|
|
1334
1342
|
var checkbox = "ycv36y0";
|
|
1335
|
-
const Input$3 = /* @__PURE__ */ styled.input.withConfig({
|
|
1343
|
+
const Input$3 = /* @__PURE__ */ styled(/* @__PURE__ */ styled.input.withConfig({
|
|
1344
|
+
displayName: "InputBase",
|
|
1345
|
+
componentId: "sc-13r9vw-0"
|
|
1346
|
+
})(inputElementStyles)).withConfig({
|
|
1336
1347
|
displayName: "Input",
|
|
1337
|
-
componentId: "sc-
|
|
1338
|
-
})(
|
|
1348
|
+
componentId: "sc-13r9vw-1"
|
|
1349
|
+
})(inputElementColorStyles);
|
|
1339
1350
|
/**
|
|
1340
1351
|
* Checkboxes allow the user to select one or more items from a set.
|
|
1341
1352
|
*
|
|
@@ -1374,21 +1385,20 @@ function Checkbox(props) {
|
|
|
1374
1385
|
children: [t7, t8]
|
|
1375
1386
|
}), $[24] = style, $[25] = t3, $[26] = t7, $[27] = t9) : t9 = $[27], t9;
|
|
1376
1387
|
}
|
|
1377
|
-
/**
|
|
1378
|
-
* Get responsive CSS for the `heading` font style.
|
|
1379
|
-
* @internal
|
|
1380
|
-
*/
|
|
1381
|
-
function responsiveHeadingFont(props) {
|
|
1382
|
-
return responsiveFont("heading", props);
|
|
1383
|
-
}
|
|
1384
1388
|
function headingBaseStyle(props) {
|
|
1385
|
-
let {
|
|
1386
|
-
return css
|
|
1387
|
-
}
|
|
1388
|
-
const StyledHeading = /* @__PURE__ */ styled.div.withConfig({
|
|
1389
|
+
let { font } = getTheme_v2(props.theme);
|
|
1390
|
+
return css`& code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.heading.weights.bold};}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}${_fontBase("heading", props)}`;
|
|
1391
|
+
}
|
|
1392
|
+
const StyledHeading = /* @__PURE__ */ styled(/* @__PURE__ */ styled(/* @__PURE__ */ styled.div.withConfig({
|
|
1393
|
+
displayName: "HeadingBase",
|
|
1394
|
+
componentId: "sc-oiepxi-0"
|
|
1395
|
+
})(headingBaseStyle)).withConfig({
|
|
1396
|
+
displayName: "HeadingSize",
|
|
1397
|
+
componentId: "sc-oiepxi-1"
|
|
1398
|
+
})((props) => _responsiveFontSize("heading", props))).withConfig({
|
|
1389
1399
|
displayName: "StyledHeading",
|
|
1390
|
-
componentId: "sc-
|
|
1391
|
-
})(
|
|
1400
|
+
componentId: "sc-oiepxi-2"
|
|
1401
|
+
})(fontColorStyle, responsiveTextAlignStyle, (props) => _fontWeight("heading", props));
|
|
1392
1402
|
function HeadingComponent(props) {
|
|
1393
1403
|
let $ = c(27), align, childrenProp, ref, restProps, t0, t1, t2, textOverflow, weight;
|
|
1394
1404
|
$[0] === props ? (align = $[1], childrenProp = $[2], ref = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7], textOverflow = $[8], weight = $[9]) : ({accent: t0, align, children: childrenProp, muted: t1, ref, size: t2, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = ref, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2, $[8] = textOverflow, $[9] = weight);
|
|
@@ -1479,13 +1489,10 @@ function Radio(props) {
|
|
|
1479
1489
|
children: [t5, t6]
|
|
1480
1490
|
}), $[18] = style, $[19] = t1, $[20] = t5, $[21] = t7) : t7 = $[21], t7;
|
|
1481
1491
|
}
|
|
1482
|
-
|
|
1483
|
-
let { font } = getTheme_v2(props.theme);
|
|
1484
|
-
return css`-webkit-font-smoothing:antialiased;appearance:none;border:0;font-family:${font.text.family};color:inherit;width:100%;outline:none;margin:0;&:disabled{opacity:1;}`;
|
|
1485
|
-
}
|
|
1492
|
+
const INPUT_BASE_STYLE = css`-webkit-font-smoothing:antialiased;appearance:none;border:0;color:inherit;width:100%;outline:none;margin:0;&:disabled{opacity:1;}`;
|
|
1486
1493
|
function inputColorStyle(props) {
|
|
1487
|
-
let { color, input } = getTheme_v2(props.theme);
|
|
1488
|
-
return css`background-color:${color.input.default.enabled.bg};color:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
|
|
1494
|
+
let { color, font, input } = getTheme_v2(props.theme);
|
|
1495
|
+
return css`font-family:${font.text.family};background-color:${color.input.default.enabled.bg};color:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
|
|
1489
1496
|
color: color.input.default.enabled.border,
|
|
1490
1497
|
width: input.border.width
|
|
1491
1498
|
})};@media (hover:hover){&:not(:disabled):hover{background-color:${color.input.default.hovered.bg};color:${color.input.default.hovered.fg};box-shadow:${focusRingBorderStyle({
|
|
@@ -1515,7 +1522,7 @@ function inputTextSizeStyle(props) {
|
|
|
1515
1522
|
let { $fontSize } = props, { font, media } = getTheme_v2(props.theme);
|
|
1516
1523
|
return _responsive(media, $fontSize, (sizeIndex) => textSize(font.text.sizes[sizeIndex] || font.text.sizes[2]));
|
|
1517
1524
|
}
|
|
1518
|
-
const INPUT_RULES = _ruleSet(responsiveRadiusStyle,
|
|
1525
|
+
const INPUT_RULES = _ruleSet(responsiveRadiusStyle, inputTextSizeStyle, responsiveInputPaddingIconRightStyle);
|
|
1519
1526
|
function inputStyle() {
|
|
1520
1527
|
return INPUT_RULES;
|
|
1521
1528
|
}
|
|
@@ -1524,16 +1531,24 @@ function iconBoxStyle(props) {
|
|
|
1524
1531
|
return css`pointer-events:none;position:absolute;top:0;right:0;--card-fg-color:${color.input.default.enabled.fg};@media (hover:hover){select:not(disabled):not(:read-only):hover + &&{--card-fg-color:${color.input.default.hovered.fg};}}select:disabled + &&{--card-fg-color:${color.input.default.disabled.fg};}select[data-read-only] + &&{--card-fg-color:${color.input.default.readOnly.fg};}`;
|
|
1525
1532
|
}
|
|
1526
1533
|
const selectStyle = {
|
|
1534
|
+
inputBase: INPUT_BASE_STYLE,
|
|
1535
|
+
inputColor: inputColorStyle,
|
|
1527
1536
|
input: inputStyle,
|
|
1528
1537
|
iconBox: iconBoxStyle
|
|
1529
1538
|
};
|
|
1530
1539
|
var select = "_14ngdrn0";
|
|
1531
|
-
const
|
|
1540
|
+
const InputBase$1 = styled.select.withConfig({
|
|
1541
|
+
displayName: "InputBase",
|
|
1542
|
+
componentId: "sc-0h3t7m-0"
|
|
1543
|
+
})`${selectStyle.inputBase}`, InputColor = /* @__PURE__ */ styled(InputBase$1).withConfig({
|
|
1544
|
+
displayName: "InputColor",
|
|
1545
|
+
componentId: "sc-0h3t7m-1"
|
|
1546
|
+
})(selectStyle.inputColor), Input$1 = /* @__PURE__ */ styled(InputColor).withConfig({
|
|
1532
1547
|
displayName: "Input",
|
|
1533
|
-
componentId: "sc-
|
|
1548
|
+
componentId: "sc-0h3t7m-2"
|
|
1534
1549
|
})(selectStyle.input), IconBox = /* @__PURE__ */ styled(Box).withConfig({
|
|
1535
1550
|
displayName: "IconBox",
|
|
1536
|
-
componentId: "sc-
|
|
1551
|
+
componentId: "sc-0h3t7m-3"
|
|
1537
1552
|
})(selectStyle.iconBox);
|
|
1538
1553
|
/**
|
|
1539
1554
|
* The `Select` component provides control of options.
|
|
@@ -1657,12 +1672,21 @@ function Switch(props) {
|
|
|
1657
1672
|
children: [t7, t9]
|
|
1658
1673
|
}), $[24] = style, $[25] = t3, $[26] = t7, $[27] = t9, $[28] = t10) : t10 = $[28], t10;
|
|
1659
1674
|
}
|
|
1660
|
-
const
|
|
1675
|
+
const InputBase = styled.textarea.withConfig({
|
|
1676
|
+
displayName: "InputBase",
|
|
1677
|
+
componentId: "sc-qld3n1-0"
|
|
1678
|
+
})`${textInputBaseStyle}`, Input = /* @__PURE__ */ styled(/* @__PURE__ */ styled(InputBase).withConfig({
|
|
1679
|
+
displayName: "InputColor",
|
|
1680
|
+
componentId: "sc-qld3n1-1"
|
|
1681
|
+
})(textInputColorStyle)).withConfig({
|
|
1661
1682
|
displayName: "Input",
|
|
1662
|
-
componentId: "sc-
|
|
1663
|
-
})(responsiveInputPaddingStyle,
|
|
1683
|
+
componentId: "sc-qld3n1-2"
|
|
1684
|
+
})(responsiveInputPaddingStyle, textInputFontStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled(/* @__PURE__ */ styled.div.withConfig({
|
|
1685
|
+
displayName: "PresentationColor",
|
|
1686
|
+
componentId: "sc-qld3n1-3"
|
|
1687
|
+
})(textInputRepresentationColorStyle)).withConfig({
|
|
1664
1688
|
displayName: "Presentation",
|
|
1665
|
-
componentId: "sc-
|
|
1689
|
+
componentId: "sc-qld3n1-4"
|
|
1666
1690
|
})(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
1667
1691
|
/**
|
|
1668
1692
|
* A multiline text input.
|
|
@@ -1721,6 +1745,34 @@ function TextArea(props) {
|
|
|
1721
1745
|
}), $[33] = t12, $[34] = t15, $[35] = t16) : t16 = $[35], t16;
|
|
1722
1746
|
}
|
|
1723
1747
|
/**
|
|
1748
|
+
* Get responsive CSS for the `code` font style.
|
|
1749
|
+
* @internal
|
|
1750
|
+
*/
|
|
1751
|
+
function responsiveCodeFontStyle(props) {
|
|
1752
|
+
return responsiveFont("code", props);
|
|
1753
|
+
}
|
|
1754
|
+
/**
|
|
1755
|
+
* Get responsive CSS for the `heading` font style.
|
|
1756
|
+
* @internal
|
|
1757
|
+
*/
|
|
1758
|
+
function responsiveHeadingFont(props) {
|
|
1759
|
+
return responsiveFont("heading", props);
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* Get responsive CSS for the `label` font style.
|
|
1763
|
+
* @internal
|
|
1764
|
+
*/
|
|
1765
|
+
function responsiveLabelFont(props) {
|
|
1766
|
+
return responsiveFont("label", props);
|
|
1767
|
+
}
|
|
1768
|
+
/**
|
|
1769
|
+
* Get responsive CSS for the `text` font style.
|
|
1770
|
+
* @internal
|
|
1771
|
+
*/
|
|
1772
|
+
function responsiveTextFont(props) {
|
|
1773
|
+
return responsiveFont("text", props);
|
|
1774
|
+
}
|
|
1775
|
+
/**
|
|
1724
1776
|
* @public
|
|
1725
1777
|
*/
|
|
1726
1778
|
function BoundaryElementProvider(props) {
|