@sanity/ui 4.1.1 → 4.2.0
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-DKn5YKdy.js → arrow-BmX6qbAS.js} +56 -48
- package/dist/arrow-BmX6qbAS.js.map +1 -0
- package/dist/autocomplete.js +3 -3
- package/dist/breadcrumbs.js +8 -3
- package/dist/breadcrumbs.js.map +1 -1
- package/dist/{button-Dh_M2fYx.js → button-BNyKSDyA.js} +3 -2
- package/dist/button-BNyKSDyA.js.map +1 -0
- package/dist/{hotkeys-uSArGPzR.js → hotkeys-CaHsQlsO.js} +7 -4
- package/dist/hotkeys-CaHsQlsO.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +76 -152
- package/dist/index.js.map +1 -1
- package/dist/{layer-BfwisMR6.js → layer-Bl5R3uNR.js} +2 -2
- package/dist/{layer-BfwisMR6.js.map → layer-Bl5R3uNR.js.map} +1 -1
- package/dist/menu.js +2 -2
- package/dist/{popover-myCXZV_F.js → popover-B7-28L8y.js} +12 -9
- package/dist/popover-B7-28L8y.js.map +1 -0
- package/dist/popover-CMlQeKn0.d.ts.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/styles.css +135 -24
- package/dist/{textInput-DAaORuky.js → textInput-pSfQjkmx.js} +21 -17
- package/dist/textInput-pSfQjkmx.js.map +1 -0
- package/dist/toast.js +2 -1
- package/dist/toast.js.map +1 -1
- package/dist/tooltip.js +2 -2
- package/package.json +4 -3
- package/dist/arrow-DKn5YKdy.js.map +0 -1
- package/dist/button-Dh_M2fYx.js.map +0 -1
- package/dist/hotkeys-uSArGPzR.js.map +0 -1
- package/dist/popover-myCXZV_F.js.map +0 -1
- package/dist/textInput-DAaORuky.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { a as rem, i as _responsive, n as _getArrayProp, r as _getResponsiveSpace, s as EMPTY_RECORD, t as _fillCSSObject } from "./helpers-C8xxXAQC.js";
|
|
3
|
-
import { a as textInputFontSizeStyle, c as responsiveInputPaddingStyle, d as attemptFocus, f as focusFirstDescendant, g as _raf2, h as _raf, i as textInputBaseStyle, l as useCustomValidity, m as isFocusable, n as inputRoot, o as textInputRepresentationStyle, p as focusLastDescendant, r as
|
|
3
|
+
import { a as textInputFontSizeStyle, c as responsiveInputPaddingStyle, d as attemptFocus, f as focusFirstDescendant, g as _raf2, h as _raf, i as textInputBaseStyle, l as useCustomValidity, m as isFocusable, n as inputRoot, o as textInputRepresentationStyle, p as focusLastDescendant, r as textAreaRoot, s as responsiveInputPaddingIconRightStyle, t as TextInput, u as _hasFocus } from "./textInput-pSfQjkmx.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
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-D1usxIE0.js";
|
|
7
7
|
import { t as Flex } from "./flex-DmbDG2ks.js";
|
|
8
8
|
import { a as responsiveTextAlignStyle, i as responsiveTextFont, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-rsNFPq2-.js";
|
|
9
9
|
import { t as responsiveFont } from "./responsiveFont-CilwaORG.js";
|
|
10
|
-
import { n as Spinner, t as Button } from "./button-
|
|
10
|
+
import { n as Spinner, t as Button } from "./button-BNyKSDyA.js";
|
|
11
11
|
import { n as _elementSizeObserver, t as useElementSize } from "./useElementSize-BJvbGHq8.js";
|
|
12
|
-
import { a as useBoundaryElement, i as PortalContext, n as Portal, o as BoundaryElementContext, r as usePortal, t as Arrow } from "./arrow-
|
|
12
|
+
import { a as useBoundaryElement, i as PortalContext, n as Portal, o as BoundaryElementContext, r as usePortal, t as Arrow } from "./arrow-BmX6qbAS.js";
|
|
13
13
|
import { t as useClickOutsideEvent } from "./useClickOutsideEvent-wGLGWBZN.js";
|
|
14
14
|
import { t as responsiveCodeFontStyle } from "./codeFontStyle-84SMhFtI.js";
|
|
15
15
|
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-
|
|
16
|
+
import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-CaHsQlsO.js";
|
|
17
|
+
import { t as Layer } from "./layer-Bl5R3uNR.js";
|
|
18
18
|
import { t as Grid } from "./grid-6JSgMj1O.js";
|
|
19
19
|
import { c } from "react/compiler-runtime";
|
|
20
20
|
import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
|
|
@@ -91,7 +91,7 @@ function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
|
91
91
|
}
|
|
92
92
|
const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
93
93
|
displayName: "StyledDialog",
|
|
94
|
-
componentId: "sc-
|
|
94
|
+
componentId: "sc-drvqzp-0"
|
|
95
95
|
})(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle);
|
|
96
96
|
function DialogCard(props) {
|
|
97
97
|
let $ = c(44), { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, children, contentRef: forwardedContentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: radiusProp, ref: forwardedRef, scheme, shadow: shadowProp, width: widthProp } = props, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, t0;
|
|
@@ -124,6 +124,7 @@ function DialogCard(props) {
|
|
|
124
124
|
let t10;
|
|
125
125
|
$[22] !== header || $[23] !== labelId || $[24] !== onClose || $[25] !== showCloseButton || $[26] !== showHeader ? (t10 = showHeader && /* @__PURE__ */ jsx(Box, {
|
|
126
126
|
className: "_1a85unk7",
|
|
127
|
+
"data-ui": "DialogHeader",
|
|
127
128
|
children: /* @__PURE__ */ jsxs(Flex, {
|
|
128
129
|
align: "flex-start",
|
|
129
130
|
padding: 3,
|
|
@@ -152,6 +153,7 @@ function DialogCard(props) {
|
|
|
152
153
|
let t11;
|
|
153
154
|
$[28] === children ? t11 = $[29] : (t11 = /* @__PURE__ */ jsx(Box, {
|
|
154
155
|
className: dialogContent,
|
|
156
|
+
"data-ui": "DialogContent",
|
|
155
157
|
flex: 1,
|
|
156
158
|
ref: contentRef,
|
|
157
159
|
tabIndex: -1,
|
|
@@ -160,6 +162,7 @@ function DialogCard(props) {
|
|
|
160
162
|
let t12;
|
|
161
163
|
$[30] === footer ? t12 = $[31] : (t12 = footer && /* @__PURE__ */ jsx(Box, {
|
|
162
164
|
className: "_1a85unk9",
|
|
165
|
+
"data-ui": "DialogFooter",
|
|
163
166
|
children: footer
|
|
164
167
|
}), $[30] = footer, $[31] = t12);
|
|
165
168
|
let t13;
|
|
@@ -746,10 +749,10 @@ function TreeGroup(props) {
|
|
|
746
749
|
var treeItem = "_14vatmh0";
|
|
747
750
|
const StyledTreeItem = /* @__PURE__ */ styled.li.withConfig({
|
|
748
751
|
displayName: "StyledTreeItem",
|
|
749
|
-
componentId: "sc-
|
|
752
|
+
componentId: "sc-inyvr0-0"
|
|
750
753
|
})(treeItemRootColorStyle), TreeItemBox = /* @__PURE__ */ styled.a.withConfig({
|
|
751
754
|
displayName: "TreeItemBox",
|
|
752
|
-
componentId: "sc-
|
|
755
|
+
componentId: "sc-inyvr0-1"
|
|
753
756
|
})(treeItemBoxStyle);
|
|
754
757
|
/**
|
|
755
758
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
@@ -810,7 +813,10 @@ function TreeItem(props) {
|
|
|
810
813
|
muted,
|
|
811
814
|
size: fontSize,
|
|
812
815
|
weight,
|
|
813
|
-
children: /* @__PURE__ */ jsx(ToggleArrowRightIcon, {
|
|
816
|
+
children: /* @__PURE__ */ jsx(ToggleArrowRightIcon, {
|
|
817
|
+
className: "_14vatmh1",
|
|
818
|
+
style: { transform: expanded ? "rotate(90deg)" : void 0 }
|
|
819
|
+
})
|
|
814
820
|
}), $[36] = IconComponent, $[37] = expanded, $[38] = fontSize, $[39] = muted, $[40] = weight, $[41] = t18) : t18 = $[41];
|
|
815
821
|
let t19;
|
|
816
822
|
$[42] !== gap || $[43] !== t16 || $[44] !== t17 || $[45] !== t18 ? (t19 = /* @__PURE__ */ jsxs(Box, {
|
|
@@ -1026,49 +1032,7 @@ function LabelComponent(props) {
|
|
|
1026
1032
|
*
|
|
1027
1033
|
* @public
|
|
1028
1034
|
*/
|
|
1029
|
-
const Label = LabelComponent
|
|
1030
|
-
root: avatarRootStyle,
|
|
1031
|
-
arrow: avatarArrowStyle,
|
|
1032
|
-
bgStroke: avatarBgStrokeStyle,
|
|
1033
|
-
stroke: avatarStrokeStyle,
|
|
1034
|
-
initials: avatarInitialsStyle,
|
|
1035
|
-
image: avatarImageStyle
|
|
1036
|
-
};
|
|
1037
|
-
function avatarArrowStyle() {
|
|
1038
|
-
return {
|
|
1039
|
-
position: "absolute",
|
|
1040
|
-
boxSizing: "border-box",
|
|
1041
|
-
zIndex: "0",
|
|
1042
|
-
opacity: "0",
|
|
1043
|
-
transition: "all 0.2s linear",
|
|
1044
|
-
transform: "rotate(-90deg) translate3d(0, 6px, 0)",
|
|
1045
|
-
left: 0,
|
|
1046
|
-
right: 0,
|
|
1047
|
-
top: 0,
|
|
1048
|
-
bottom: 0,
|
|
1049
|
-
"& > svg": {
|
|
1050
|
-
width: "11px",
|
|
1051
|
-
height: "7px",
|
|
1052
|
-
position: "absolute",
|
|
1053
|
-
top: "-5px",
|
|
1054
|
-
left: "50%",
|
|
1055
|
-
transform: "translateX(-6px)",
|
|
1056
|
-
"&:not([hidden])": { display: "block" }
|
|
1057
|
-
},
|
|
1058
|
-
"[data-arrow-position='inside'] > &": {
|
|
1059
|
-
transform: "rotate(-90deg) translate3d(0, 6px, 0)",
|
|
1060
|
-
opacity: "0"
|
|
1061
|
-
},
|
|
1062
|
-
"[data-arrow-position='top'] > &": {
|
|
1063
|
-
opacity: "1",
|
|
1064
|
-
transform: "rotate(0deg)"
|
|
1065
|
-
},
|
|
1066
|
-
"[data-arrow-position='bottom'] > &": {
|
|
1067
|
-
opacity: "1",
|
|
1068
|
-
transform: "rotate(-180deg)"
|
|
1069
|
-
}
|
|
1070
|
-
};
|
|
1071
|
-
}
|
|
1035
|
+
const Label = LabelComponent;
|
|
1072
1036
|
function avatarRootStyle(props) {
|
|
1073
1037
|
let { $color } = props, { avatar } = getTheme_v2(props.theme);
|
|
1074
1038
|
return {
|
|
@@ -1111,60 +1075,14 @@ function responsiveAvatarSizeStyle(props) {
|
|
|
1111
1075
|
};
|
|
1112
1076
|
});
|
|
1113
1077
|
}
|
|
1114
|
-
|
|
1115
|
-
return { position: "relative" };
|
|
1116
|
-
}
|
|
1117
|
-
function avatarInitialsStyle() {
|
|
1118
|
-
return {
|
|
1119
|
-
width: "100%",
|
|
1120
|
-
height: "100%",
|
|
1121
|
-
color: "var(--avatar-fg-color)",
|
|
1122
|
-
alignItems: "center",
|
|
1123
|
-
justifyContent: "center",
|
|
1124
|
-
textTransform: "uppercase",
|
|
1125
|
-
textAlign: "center",
|
|
1126
|
-
borderRadius: "50%",
|
|
1127
|
-
"&:not([hidden])": { display: "flex" }
|
|
1128
|
-
};
|
|
1129
|
-
}
|
|
1130
|
-
function avatarBgStrokeStyle() {
|
|
1131
|
-
return {
|
|
1132
|
-
strokeWidth: "4px",
|
|
1133
|
-
stroke: "var(--card-bg-color)"
|
|
1134
|
-
};
|
|
1135
|
-
}
|
|
1136
|
-
function avatarStrokeStyle() {
|
|
1137
|
-
return {
|
|
1138
|
-
strokeWidth: "2px",
|
|
1139
|
-
stroke: "var(--avatar-bg-color)",
|
|
1140
|
-
"[data-status=\"editing\"] &": {
|
|
1141
|
-
strokeDasharray: "2 4",
|
|
1142
|
-
strokeLinecap: "round"
|
|
1143
|
-
}
|
|
1144
|
-
};
|
|
1145
|
-
}
|
|
1078
|
+
var avatarArrow = "_1jezl1b0", avatarStack = "_1jezl1b4";
|
|
1146
1079
|
const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
|
|
1147
1080
|
displayName: "StyledAvatar",
|
|
1148
|
-
componentId: "sc-
|
|
1149
|
-
})(responsiveAvatarSizeStyle,
|
|
1150
|
-
displayName: "Arrow",
|
|
1151
|
-
componentId: "sc-myyy04-1"
|
|
1152
|
-
})(avatarStyle.arrow), BgStroke = /* @__PURE__ */ styled.ellipse.withConfig({
|
|
1153
|
-
displayName: "BgStroke",
|
|
1154
|
-
componentId: "sc-myyy04-2"
|
|
1155
|
-
})(avatarStyle.bgStroke), Stroke = /* @__PURE__ */ styled.ellipse.withConfig({
|
|
1156
|
-
displayName: "Stroke",
|
|
1157
|
-
componentId: "sc-myyy04-3"
|
|
1158
|
-
})(avatarStyle.stroke), Initials = /* @__PURE__ */ styled.div.withConfig({
|
|
1159
|
-
displayName: "Initials",
|
|
1160
|
-
componentId: "sc-myyy04-4"
|
|
1161
|
-
})(avatarStyle.initials), InitialsLabel = /* @__PURE__ */ styled(Label).withConfig({
|
|
1081
|
+
componentId: "sc-3dcnr0-0"
|
|
1082
|
+
})(responsiveAvatarSizeStyle, avatarRootStyle), InitialsLabel = /* @__PURE__ */ styled(Label).withConfig({
|
|
1162
1083
|
displayName: "InitialsLabel",
|
|
1163
|
-
componentId: "sc-
|
|
1164
|
-
})({ color: "inherit" })
|
|
1165
|
-
displayName: "AvatarImage",
|
|
1166
|
-
componentId: "sc-myyy04-6"
|
|
1167
|
-
})(avatarStyle.image);
|
|
1084
|
+
componentId: "sc-3dcnr0-1"
|
|
1085
|
+
})({ color: "inherit" });
|
|
1168
1086
|
function AvatarComponent(props) {
|
|
1169
1087
|
let $ = c(47), __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, ref, restProps, src, t0, t1, t2, title;
|
|
1170
1088
|
$[0] === props ? (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], ref = $[7], restProps = $[8], src = $[9], t0 = $[10], t1 = $[11], t2 = $[12], title = $[13]) : ({__unstable_hideInnerStroke, as: asProp, color: t0, src, title, initials, onImageLoadError, arrowPosition: arrowPositionProp, animateArrowFrom, ref, status: t1, size: t2, ...restProps} = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = ref, $[8] = restProps, $[9] = src, $[10] = t0, $[11] = t1, $[12] = t2, $[13] = title);
|
|
@@ -1183,18 +1101,22 @@ function AvatarComponent(props) {
|
|
|
1183
1101
|
setImageFailed(!0), onImageLoadError && onImageLoadError(/* @__PURE__ */ Error("Avatar: the image failed to load"));
|
|
1184
1102
|
}, $[21] = onImageLoadError, $[22] = t7);
|
|
1185
1103
|
let handleImageError = t7, T0 = StyledAvatar, t8 = typeof as == "string" ? as : void 0, t10;
|
|
1186
|
-
$[23] === color ? t10 = $[24] : (t10 = /* @__PURE__ */ jsx(
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1104
|
+
$[23] === color ? t10 = $[24] : (t10 = /* @__PURE__ */ jsx("div", {
|
|
1105
|
+
className: avatarArrow,
|
|
1106
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
1107
|
+
width: "11",
|
|
1108
|
+
height: "7",
|
|
1109
|
+
viewBox: "0 0 11 7",
|
|
1110
|
+
fill: "none",
|
|
1111
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
1112
|
+
d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z",
|
|
1113
|
+
fill: color
|
|
1114
|
+
})
|
|
1194
1115
|
})
|
|
1195
|
-
})
|
|
1116
|
+
}), $[23] = color, $[24] = t10);
|
|
1196
1117
|
let t11;
|
|
1197
|
-
$[25] !== __unstable_hideInnerStroke || $[26] !== _radius || $[27] !== _sizeRem || $[28] !== handleImageError || $[29] !== imageFailed || $[30] !== imageId || $[31] !== src ? (t11 = !imageFailed && src && /* @__PURE__ */ jsxs(
|
|
1118
|
+
$[25] !== __unstable_hideInnerStroke || $[26] !== _radius || $[27] !== _sizeRem || $[28] !== handleImageError || $[29] !== imageFailed || $[30] !== imageId || $[31] !== src ? (t11 = !imageFailed && src && /* @__PURE__ */ jsxs("svg", {
|
|
1119
|
+
className: "_1jezl1b1",
|
|
1198
1120
|
viewBox: `0 0 ${_sizeRem} ${_sizeRem}`,
|
|
1199
1121
|
fill: "none",
|
|
1200
1122
|
children: [
|
|
@@ -1216,14 +1138,16 @@ function AvatarComponent(props) {
|
|
|
1216
1138
|
r: _radius,
|
|
1217
1139
|
fill: `url(#${imageId})`
|
|
1218
1140
|
}),
|
|
1219
|
-
!__unstable_hideInnerStroke && /* @__PURE__ */ jsx(
|
|
1141
|
+
!__unstable_hideInnerStroke && /* @__PURE__ */ jsx("ellipse", {
|
|
1142
|
+
className: "_1jezl1b2",
|
|
1220
1143
|
cx: _radius,
|
|
1221
1144
|
cy: _radius,
|
|
1222
1145
|
rx: _radius,
|
|
1223
1146
|
ry: _radius,
|
|
1224
1147
|
vectorEffect: "non-scaling-stroke"
|
|
1225
1148
|
}),
|
|
1226
|
-
/* @__PURE__ */ jsx(
|
|
1149
|
+
/* @__PURE__ */ jsx("ellipse", {
|
|
1150
|
+
className: "_1jezl1b3",
|
|
1227
1151
|
cx: _radius,
|
|
1228
1152
|
cy: _radius,
|
|
1229
1153
|
rx: _radius,
|
|
@@ -1232,12 +1156,15 @@ function AvatarComponent(props) {
|
|
|
1232
1156
|
})
|
|
1233
1157
|
]
|
|
1234
1158
|
}), $[25] = __unstable_hideInnerStroke, $[26] = _radius, $[27] = _sizeRem, $[28] = handleImageError, $[29] = imageFailed, $[30] = imageId, $[31] = src, $[32] = t11) : t11 = $[32];
|
|
1235
|
-
let t12 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1159
|
+
let t12 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("div", {
|
|
1160
|
+
className: "_1jezl1b5",
|
|
1161
|
+
children: /* @__PURE__ */ jsx(InitialsLabel, {
|
|
1162
|
+
forwardedAs: "span",
|
|
1163
|
+
size: size.map(_temp$2),
|
|
1164
|
+
weight: "medium",
|
|
1165
|
+
children: initials
|
|
1166
|
+
})
|
|
1167
|
+
}) }), t13;
|
|
1241
1168
|
return $[33] !== T0 || $[34] !== arrowPosition || $[35] !== as || $[36] !== color || $[37] !== ref || $[38] !== restProps || $[39] !== size || $[40] !== status || $[41] !== t10 || $[42] !== t11 || $[43] !== t12 || $[44] !== t8 || $[45] !== title ? (t13 = /* @__PURE__ */ jsxs(T0, {
|
|
1242
1169
|
as,
|
|
1243
1170
|
"data-as": t8,
|
|
@@ -1312,10 +1239,6 @@ function AvatarCounter(props) {
|
|
|
1312
1239
|
function _temp$1(s) {
|
|
1313
1240
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1314
1241
|
}
|
|
1315
|
-
const BASE_STYLES = css`white-space:nowrap;& > div{vertical-align:top;&:not([hidden]){display:inline-block;}}`;
|
|
1316
|
-
function avatarStackStyle() {
|
|
1317
|
-
return BASE_STYLES;
|
|
1318
|
-
}
|
|
1319
1242
|
function responsiveAvatarStackSizeStyle(props) {
|
|
1320
1243
|
let { avatar, media } = getTheme_v2(props.theme);
|
|
1321
1244
|
return _responsive(media, props.$size, (size) => {
|
|
@@ -1325,41 +1248,42 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1325
1248
|
}
|
|
1326
1249
|
const StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({
|
|
1327
1250
|
displayName: "StyledAvatarStack",
|
|
1328
|
-
componentId: "sc-
|
|
1329
|
-
})(responsiveAvatarStackSizeStyle
|
|
1251
|
+
componentId: "sc-cw2hpz-0"
|
|
1252
|
+
})(responsiveAvatarStackSizeStyle);
|
|
1330
1253
|
/**
|
|
1331
1254
|
* @public
|
|
1332
1255
|
*/
|
|
1333
1256
|
function AvatarStack(props) {
|
|
1334
|
-
let $ = c(
|
|
1335
|
-
$[0] === props ? (childrenProp = $[1],
|
|
1336
|
-
let maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, T0, t2, t3, t4, t5, t6, t7, t8;
|
|
1337
|
-
if ($[
|
|
1338
|
-
let children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0),
|
|
1339
|
-
$[
|
|
1340
|
-
let size =
|
|
1341
|
-
T0 = StyledAvatarStack, t2 = "AvatarStack",
|
|
1257
|
+
let $ = c(45), childrenProp, className, ref, restProps, t0, t1;
|
|
1258
|
+
$[0] === props ? (childrenProp = $[1], className = $[2], ref = $[3], restProps = $[4], t0 = $[5], t1 = $[6]) : ({children: childrenProp, className, maxLength: t0, ref, size: t1, ...restProps} = props, $[0] = props, $[1] = childrenProp, $[2] = className, $[3] = ref, $[4] = restProps, $[5] = t0, $[6] = t1);
|
|
1259
|
+
let maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, T0, t2, t3, t4, t5, t6, t7, t8, t9;
|
|
1260
|
+
if ($[7] !== childrenProp || $[8] !== className || $[9] !== maxLengthProp || $[10] !== ref || $[11] !== restProps || $[12] !== sizeProp) {
|
|
1261
|
+
let children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), t10;
|
|
1262
|
+
$[22] === sizeProp ? t10 = $[23] : (t10 = _getArrayProp(sizeProp), $[22] = sizeProp, $[23] = t10);
|
|
1263
|
+
let size = t10, len = children.length, extraCount = len - (maxLength - 1), visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
|
|
1264
|
+
T0 = StyledAvatarStack, $[24] === className ? t2 = $[25] : (t2 = clsx(avatarStack, className), $[24] = className, $[25] = t2), t3 = "AvatarStack", t4 = restProps, t5 = ref, t6 = size, $[26] !== len || $[27] !== size ? (t7 = len === 0 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, {
|
|
1342
1265
|
count: len,
|
|
1343
1266
|
size
|
|
1344
|
-
}) }), $[
|
|
1267
|
+
}) }), $[26] = len, $[27] = size, $[28] = t7) : t7 = $[28], $[29] !== extraCount || $[30] !== len || $[31] !== size ? (t8 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, {
|
|
1345
1268
|
count: extraCount,
|
|
1346
1269
|
size
|
|
1347
|
-
}) }), $[
|
|
1348
|
-
let
|
|
1349
|
-
$[
|
|
1350
|
-
} else T0 = $[
|
|
1351
|
-
let
|
|
1352
|
-
return $[
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1270
|
+
}) }), $[29] = extraCount, $[30] = len, $[31] = size, $[32] = t8) : t8 = $[32];
|
|
1271
|
+
let t11;
|
|
1272
|
+
$[33] === size ? t11 = $[34] : (t11 = (child, childIndex) => /* @__PURE__ */ jsx("div", { children: cloneElement(child, { size }) }, String(childIndex)), $[33] = size, $[34] = t11), t9 = visibleChildren.map(t11), $[7] = childrenProp, $[8] = className, $[9] = maxLengthProp, $[10] = ref, $[11] = restProps, $[12] = sizeProp, $[13] = T0, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7, $[20] = t8, $[21] = t9;
|
|
1273
|
+
} else T0 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17], t6 = $[18], t7 = $[19], t8 = $[20], t9 = $[21];
|
|
1274
|
+
let t10;
|
|
1275
|
+
return $[35] !== T0 || $[36] !== t2 || $[37] !== t3 || $[38] !== t4 || $[39] !== t5 || $[40] !== t6 || $[41] !== t7 || $[42] !== t8 || $[43] !== t9 ? (t10 = /* @__PURE__ */ jsxs(T0, {
|
|
1276
|
+
className: t2,
|
|
1277
|
+
"data-ui": t3,
|
|
1278
|
+
...t4,
|
|
1279
|
+
ref: t5,
|
|
1280
|
+
$size: t6,
|
|
1357
1281
|
children: [
|
|
1358
|
-
t6,
|
|
1359
1282
|
t7,
|
|
1360
|
-
t8
|
|
1283
|
+
t8,
|
|
1284
|
+
t9
|
|
1361
1285
|
]
|
|
1362
|
-
}), $[
|
|
1286
|
+
}), $[35] = T0, $[36] = t2, $[37] = t3, $[38] = t4, $[39] = t5, $[40] = t6, $[41] = t7, $[42] = t8, $[43] = t9, $[44] = t10) : t10 = $[44], t10;
|
|
1363
1287
|
}
|
|
1364
1288
|
function badgeStyle(props) {
|
|
1365
1289
|
let { $tone } = props;
|
|
@@ -1760,10 +1684,10 @@ function Switch(props) {
|
|
|
1760
1684
|
}
|
|
1761
1685
|
const Input = /* @__PURE__ */ styled.textarea.withConfig({
|
|
1762
1686
|
displayName: "Input",
|
|
1763
|
-
componentId: "sc-
|
|
1687
|
+
componentId: "sc-gtnobm-0"
|
|
1764
1688
|
})(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled.div.withConfig({
|
|
1765
1689
|
displayName: "Presentation",
|
|
1766
|
-
componentId: "sc-
|
|
1690
|
+
componentId: "sc-gtnobm-1"
|
|
1767
1691
|
})(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
1768
1692
|
/**
|
|
1769
1693
|
* A multiline text input.
|
|
@@ -1811,7 +1735,7 @@ function TextArea(props) {
|
|
|
1811
1735
|
}), $[27] = __unstable_disableFocusRing, $[28] = rootTheme.scheme, $[29] = rootTheme.tone, $[30] = t13, $[31] = t14, $[32] = t15) : t15 = $[32];
|
|
1812
1736
|
let t16;
|
|
1813
1737
|
return $[33] !== t12 || $[34] !== t15 ? (t16 = /* @__PURE__ */ jsx("span", {
|
|
1814
|
-
className:
|
|
1738
|
+
className: textAreaRoot,
|
|
1815
1739
|
"data-ui": "TextArea",
|
|
1816
1740
|
children: /* @__PURE__ */ jsxs("span", {
|
|
1817
1741
|
className: inputRoot,
|