@sanity/ui 4.0.0-next.5 → 4.0.0-next.7
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-BG0EMNiC.js → arrow-BaxgKzOL.js} +8 -6
- package/dist/{arrow-BG0EMNiC.js.map → arrow-BaxgKzOL.js.map} +1 -1
- package/dist/autocomplete.d.ts +4 -4
- package/dist/autocomplete.d.ts.map +1 -1
- package/dist/autocomplete.js +18 -11
- package/dist/autocomplete.js.map +1 -1
- package/dist/breadcrumbs.d.ts +1 -1
- package/dist/breadcrumbs.d.ts.map +1 -1
- package/dist/breadcrumbs.js +8 -4
- package/dist/breadcrumbs.js.map +1 -1
- package/dist/{button-DZkAQOL2.js → button-BDLRd1Rr.js} +3 -3
- package/dist/button-BDLRd1Rr.js.map +1 -0
- package/dist/{button-BzoZs3Sl.d.ts → button-dnqMFkWg.d.ts} +2 -2
- package/dist/{button-BzoZs3Sl.d.ts.map → button-dnqMFkWg.d.ts.map} +1 -1
- package/dist/{hotkeys-B08HIKNu.js → hotkeys-aHdaZFAl.js} +11 -5
- package/dist/{hotkeys-B08HIKNu.js.map → hotkeys-aHdaZFAl.js.map} +1 -1
- package/dist/index.d.ts +28 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +172 -73
- package/dist/index.js.map +1 -1
- package/dist/{layer-BQfdK7rt.d.ts → layer-ChlP9Ik6.d.ts} +2 -2
- package/dist/{layer-BQfdK7rt.d.ts.map → layer-ChlP9Ik6.d.ts.map} +1 -1
- package/dist/{layer-BdkSGATt.js → layer-DeCVQfUb.js} +10 -5
- package/dist/layer-DeCVQfUb.js.map +1 -0
- package/dist/menu.d.ts +4 -4
- package/dist/menu.d.ts.map +1 -1
- package/dist/menu.js +18 -6
- package/dist/menu.js.map +1 -1
- package/dist/{popover-DmmmSNzL.d.ts → popover-CMlQeKn0.d.ts} +3 -3
- package/dist/{popover-DmmmSNzL.d.ts.map → popover-CMlQeKn0.d.ts.map} +1 -1
- package/dist/{popover-Iy6EZEmv.js → popover-DfXz9lUl.js} +19 -8
- package/dist/popover-DfXz9lUl.js.map +1 -0
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/styles.css +28 -1
- package/dist/styles.d.ts +3 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +4 -0
- package/dist/styles.js.map +1 -0
- package/dist/{textInput-IbiDH7Jc.js → textInput-DhCo-b3N.js} +24 -18
- package/dist/{textInput-IbiDH7Jc.js.map → textInput-DhCo-b3N.js.map} +1 -1
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +2 -2
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +22 -8
- package/dist/tooltip.js.map +1 -1
- package/package.json +5 -2
- package/dist/button-DZkAQOL2.js.map +0 -1
- package/dist/layer-BdkSGATt.js.map +0 -1
- package/dist/popover-Iy6EZEmv.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-bwfx1e-Y.js";
|
|
3
|
-
import { a as textInputRootStyle, c as useCustomValidity, d as focusFirstDescendant, f as focusLastDescendant, h as _raf2, i as textInputRepresentationStyle, l as _hasFocus, m as _raf, n as textInputBaseStyle, o as responsiveInputPaddingIconRightStyle, p as isFocusable, r as textInputFontSizeStyle, s as responsiveInputPaddingStyle, t as TextInput, u as attemptFocus } from "./textInput-
|
|
3
|
+
import { a as textInputRootStyle, c as useCustomValidity, d as focusFirstDescendant, f as focusLastDescendant, h as _raf2, i as textInputRepresentationStyle, l as _hasFocus, m as _raf, n as textInputBaseStyle, o as responsiveInputPaddingIconRightStyle, p as isFocusable, r as textInputFontSizeStyle, s as responsiveInputPaddingStyle, t as TextInput, u as attemptFocus } from "./textInput-DhCo-b3N.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-9Pz-GG0r.js";
|
|
7
7
|
import { t as Flex } from "./flex-BYRpBTOc.js";
|
|
8
8
|
import { a as responsiveTextAlignStyle, i as responsiveTextFont, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-C5WV-BRh.js";
|
|
9
9
|
import { t as responsiveFont } from "./responsiveFont-hN1mZFjm.js";
|
|
10
|
-
import { n as Spinner, t as Button } from "./button-
|
|
10
|
+
import { n as Spinner, t as Button } from "./button-BDLRd1Rr.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-BaxgKzOL.js";
|
|
13
13
|
import { t as useClickOutsideEvent } from "./useClickOutsideEvent-lEVhDFCQ.js";
|
|
14
14
|
import { t as responsiveCodeFontStyle } from "./codeFontStyle-DYUujk7K.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-CvRcEQ36.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-aHdaZFAl.js";
|
|
17
|
+
import { t as Layer } from "./layer-DeCVQfUb.js";
|
|
18
18
|
import { t as Grid } from "./grid-D88j-N7f.js";
|
|
19
19
|
import { c } from "react/compiler-runtime";
|
|
20
20
|
import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
|
|
@@ -95,26 +95,27 @@ function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
|
95
95
|
}
|
|
96
96
|
const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
97
97
|
displayName: "StyledDialog",
|
|
98
|
-
componentId: "sc-
|
|
98
|
+
componentId: "sc-4a2na0-0"
|
|
99
99
|
})(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styled(Container).withConfig({
|
|
100
100
|
displayName: "DialogContainer",
|
|
101
|
-
componentId: "sc-
|
|
101
|
+
componentId: "sc-4a2na0-1"
|
|
102
102
|
})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`, DialogCardRoot = styled(Card).withConfig({
|
|
103
103
|
displayName: "DialogCardRoot",
|
|
104
|
-
componentId: "sc-
|
|
104
|
+
componentId: "sc-4a2na0-2"
|
|
105
105
|
})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`, DialogLayout = styled(Flex).withConfig({
|
|
106
106
|
displayName: "DialogLayout",
|
|
107
|
-
componentId: "sc-
|
|
107
|
+
componentId: "sc-4a2na0-3"
|
|
108
108
|
})`flex:1;min-height:0;width:100%;`, DialogHeader = styled(Box).withConfig({
|
|
109
109
|
displayName: "DialogHeader",
|
|
110
|
-
componentId: "sc-
|
|
110
|
+
componentId: "sc-4a2na0-4"
|
|
111
111
|
})`position:relative;z-index:2;`, DialogContent = styled(Box).withConfig({
|
|
112
112
|
displayName: "DialogContent",
|
|
113
|
-
componentId: "sc-
|
|
113
|
+
componentId: "sc-4a2na0-5"
|
|
114
114
|
})`position:relative;z-index:1;overflow:auto;outline:none;`, DialogFooter = styled(Box).withConfig({
|
|
115
115
|
displayName: "DialogFooter",
|
|
116
|
-
componentId: "sc-
|
|
117
|
-
})`position:relative;z-index:3
|
|
116
|
+
componentId: "sc-4a2na0-6"
|
|
117
|
+
})`position:relative;z-index:3;`;
|
|
118
|
+
function DialogCard(props) {
|
|
118
119
|
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;
|
|
119
120
|
$[0] === radiusProp ? t0 = $[1] : (t0 = _getArrayProp(radiusProp), $[0] = radiusProp, $[1] = t0);
|
|
120
121
|
let radius = t0, t1;
|
|
@@ -199,7 +200,13 @@ const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
|
199
200
|
width,
|
|
200
201
|
children: t14
|
|
201
202
|
}), $[41] = t14, $[42] = width, $[43] = t15) : t15 = $[43], t15;
|
|
202
|
-
}
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* The Dialog component.
|
|
206
|
+
*
|
|
207
|
+
* @public
|
|
208
|
+
*/
|
|
209
|
+
function Dialog(props) {
|
|
203
210
|
let $ = c(71), dialog = useDialog(), { layer } = useTheme_v2(), _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, ref, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
|
|
204
211
|
$[0] === props ? (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], contentRef = $[4], footer = $[5], header = $[6], id = $[7], onActivate = $[8], onClickOutside = $[9], onClose = $[10], onFocus = $[11], portalProp = $[12], ref = $[13], restProps = $[14], scheme = $[15], t0 = $[16], t1 = $[17], t2 = $[18], t3 = $[19], t4 = $[20], t5 = $[21], t6 = $[22]) : ({__unstable_autoFocus: t0, __unstable_hideCloseButton: t1, cardRadius: t2, cardShadow: t3, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, padding: t4, portal: portalProp, position: _positionProp, ref, scheme, width: t5, zOffset: _zOffsetProp, animate: t6, ...restProps} = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = children, $[4] = contentRef, $[5] = footer, $[6] = header, $[7] = id, $[8] = onActivate, $[9] = onClickOutside, $[10] = onClose, $[11] = onFocus, $[12] = portalProp, $[13] = ref, $[14] = restProps, $[15] = scheme, $[16] = t0, $[17] = t1, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = t6);
|
|
205
212
|
let autoFocus = t0 === void 0 || t0, hideCloseButton = t1 !== void 0 && t1, cardRadiusProp = t2 === void 0 ? 4 : t2, cardShadow = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, _animate = t6 !== void 0 && t6, positionProp = _positionProp ?? (dialog.position || "fixed"), zOffsetProp = _zOffsetProp ?? (dialog.zOffset || layer.dialog.zOffset), animate = !usePrefersReducedMotion() && _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, t7;
|
|
@@ -296,7 +303,7 @@ const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
|
296
303
|
__unstable_name: portalProp,
|
|
297
304
|
children: t17
|
|
298
305
|
}), $[68] = portalProp, $[69] = t17, $[70] = t18) : t18 = $[70], t18;
|
|
299
|
-
}
|
|
306
|
+
}
|
|
300
307
|
/**
|
|
301
308
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
302
309
|
* @beta
|
|
@@ -316,8 +323,13 @@ function DialogProvider(props) {
|
|
|
316
323
|
}
|
|
317
324
|
const animation = css`background-image:linear-gradient( to right,var(--card-skeleton-color-from),var(--card-skeleton-color-to),var(--card-skeleton-color-from),var(--card-skeleton-color-from),var(--card-skeleton-color-from) );background-position:100%;background-size:200% 100%;background-attachment:fixed;animation-name:${keyframes`0%{background-position:100%;}100%{background-position:-100%;}`};animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-duration:2000ms;`, skeletonStyle = css`opacity:${({ $visible }) => +!!$visible};transition:opacity 200ms ease-in;@media screen and (prefers-reduced-motion:no-preference){${({ $animated }) => $animated ? animation : css`background-color:var(--card-skeleton-color-from);`}}@media screen and (prefers-reduced-motion:reduce){background-color:var(--card-skeleton-color-from);}`, StyledSkeleton$1 = /* @__PURE__ */ styled(Box).withConfig({
|
|
318
325
|
displayName: "StyledSkeleton",
|
|
319
|
-
componentId: "sc-
|
|
320
|
-
})(responsiveRadiusStyle, skeletonStyle)
|
|
326
|
+
componentId: "sc-9cw2s-0"
|
|
327
|
+
})(responsiveRadiusStyle, skeletonStyle);
|
|
328
|
+
/**
|
|
329
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
330
|
+
* @beta
|
|
331
|
+
*/
|
|
332
|
+
function Skeleton(props) {
|
|
321
333
|
let $ = c(17), delay, radius, ref, restProps, t0;
|
|
322
334
|
$[0] === props ? (delay = $[1], radius = $[2], ref = $[3], restProps = $[4], t0 = $[5]) : ({animated: t0, delay, radius, ref, ...restProps} = props, $[0] = props, $[1] = delay, $[2] = radius, $[3] = ref, $[4] = restProps, $[5] = t0);
|
|
323
335
|
let animated = t0 !== void 0 && t0, [visible, setVisible] = useState(!delay), t1, t2;
|
|
@@ -340,16 +352,22 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
340
352
|
$visible: t4,
|
|
341
353
|
ref
|
|
342
354
|
}), $[11] = animated, $[12] = ref, $[13] = restProps, $[14] = t3, $[15] = t4, $[16] = t5) : t5 = $[16], t5;
|
|
343
|
-
}
|
|
355
|
+
}
|
|
356
|
+
const StyledSkeleton = /* @__PURE__ */ styled(Skeleton).withConfig({
|
|
344
357
|
displayName: "StyledSkeleton",
|
|
345
|
-
componentId: "sc-
|
|
358
|
+
componentId: "sc-dq8t4f-0"
|
|
346
359
|
})((props) => {
|
|
347
360
|
let { $size, $style } = props, { font, media } = getTheme_v2(props.theme), fontStyle = font[$style];
|
|
348
361
|
return _responsive(media, $size, (sizeIndex) => {
|
|
349
362
|
let fontSize = fontStyle.sizes[sizeIndex];
|
|
350
363
|
return { height: fontSize.lineHeight - fontSize.ascenderHeight - fontSize.descenderHeight };
|
|
351
364
|
});
|
|
352
|
-
})
|
|
365
|
+
});
|
|
366
|
+
/**
|
|
367
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
368
|
+
* @beta
|
|
369
|
+
*/
|
|
370
|
+
function TextSkeleton(props) {
|
|
353
371
|
let $ = c(8), restProps, t0;
|
|
354
372
|
$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);
|
|
355
373
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
@@ -360,7 +378,12 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
360
378
|
$size,
|
|
361
379
|
$style: "text"
|
|
362
380
|
}), $[5] = $size, $[6] = restProps, $[7] = t2) : t2 = $[7], t2;
|
|
363
|
-
}
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
384
|
+
* @beta
|
|
385
|
+
*/
|
|
386
|
+
function LabelSkeleton(props) {
|
|
364
387
|
let $ = c(8), restProps, t0;
|
|
365
388
|
$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);
|
|
366
389
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
@@ -371,7 +394,12 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
371
394
|
$size,
|
|
372
395
|
$style: "label"
|
|
373
396
|
}), $[5] = $size, $[6] = restProps, $[7] = t2) : t2 = $[7], t2;
|
|
374
|
-
}
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
400
|
+
* @beta
|
|
401
|
+
*/
|
|
402
|
+
function HeadingSkeleton(props) {
|
|
375
403
|
let $ = c(8), restProps, t0;
|
|
376
404
|
$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);
|
|
377
405
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
@@ -382,7 +410,12 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
382
410
|
$size,
|
|
383
411
|
$style: "heading"
|
|
384
412
|
}), $[5] = $size, $[6] = restProps, $[7] = t2) : t2 = $[7], t2;
|
|
385
|
-
}
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
416
|
+
* @beta
|
|
417
|
+
*/
|
|
418
|
+
function CodeSkeleton(props) {
|
|
386
419
|
let $ = c(8), restProps, t0;
|
|
387
420
|
$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);
|
|
388
421
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
@@ -393,10 +426,15 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
393
426
|
$size,
|
|
394
427
|
$style: "code"
|
|
395
428
|
}), $[5] = $size, $[6] = restProps, $[7] = t2) : t2 = $[7], t2;
|
|
396
|
-
}
|
|
429
|
+
}
|
|
430
|
+
const CustomButton = styled(Button).withConfig({
|
|
397
431
|
displayName: "CustomButton",
|
|
398
|
-
componentId: "sc-
|
|
399
|
-
})`max-width:100
|
|
432
|
+
componentId: "sc-bacfyt-0"
|
|
433
|
+
})`max-width:100%;`;
|
|
434
|
+
/**
|
|
435
|
+
* @public
|
|
436
|
+
*/
|
|
437
|
+
function Tab(props) {
|
|
400
438
|
let $ = c(31), focused, forwardedRef, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
|
|
401
439
|
$[0] === props ? (focused = $[1], forwardedRef = $[2], icon = $[3], id = $[4], label = $[5], onClick = $[6], onFocus = $[7], restProps = $[8], selected = $[9], t0 = $[10], t1 = $[11]) : ({icon, id, focused, fontSize: t0, label, onClick, onFocus, padding: t1, ref: forwardedRef, selected, ...restProps} = props, $[0] = props, $[1] = focused, $[2] = forwardedRef, $[3] = icon, $[4] = id, $[5] = label, $[6] = onClick, $[7] = onFocus, $[8] = restProps, $[9] = selected, $[10] = t0, $[11] = t1);
|
|
402
440
|
let fontSize = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = useRef(null), focusedRef = useRef(!1), t2;
|
|
@@ -433,10 +471,15 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
433
471
|
text: label,
|
|
434
472
|
type: "button"
|
|
435
473
|
}), $[19] = fontSize, $[20] = handleFocus, $[21] = icon, $[22] = id, $[23] = label, $[24] = onClick, $[25] = padding, $[26] = restProps, $[27] = selected, $[28] = t7, $[29] = t8, $[30] = t9) : t9 = $[30], t9;
|
|
436
|
-
}
|
|
474
|
+
}
|
|
475
|
+
const CustomInline = styled(Inline).withConfig({
|
|
437
476
|
displayName: "CustomInline",
|
|
438
|
-
componentId: "sc-
|
|
439
|
-
})`& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}
|
|
477
|
+
componentId: "sc-uahcjl-0"
|
|
478
|
+
})`& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}`;
|
|
479
|
+
/**
|
|
480
|
+
* @public
|
|
481
|
+
*/
|
|
482
|
+
function TabList(props) {
|
|
440
483
|
let $ = c(16), childrenProp, ref, restProps;
|
|
441
484
|
$[0] === props ? (childrenProp = $[1], ref = $[2], restProps = $[3]) : ({children: childrenProp, ref, ...restProps} = props, $[0] = props, $[1] = childrenProp, $[2] = ref, $[3] = restProps);
|
|
442
485
|
let [focusedIndex, setFocusedIndex] = useState(-1), t0;
|
|
@@ -461,7 +504,11 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
461
504
|
role: "tablist",
|
|
462
505
|
children: tabs
|
|
463
506
|
}), $[11] = handleKeyDown, $[12] = ref, $[13] = restProps, $[14] = tabs, $[15] = t2) : t2 = $[15], t2;
|
|
464
|
-
}
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* @public
|
|
510
|
+
*/
|
|
511
|
+
function TabPanel(props) {
|
|
465
512
|
let $ = c(8), flex, restProps;
|
|
466
513
|
$[0] === props ? (flex = $[1], restProps = $[2]) : ({flex, ...restProps} = props, $[0] = props, $[1] = flex, $[2] = restProps);
|
|
467
514
|
let t0 = props.tabIndex === void 0 ? 0 : props.tabIndex, t1;
|
|
@@ -473,7 +520,7 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
473
520
|
tabIndex: t0,
|
|
474
521
|
children: props.children
|
|
475
522
|
}), $[3] = flex, $[4] = props.children, $[5] = restProps, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
|
|
476
|
-
}
|
|
523
|
+
}
|
|
477
524
|
function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
478
525
|
let idx = itemElements.indexOf(focusedElement), els = itemElements.slice(0, idx), len = els.length;
|
|
479
526
|
for (let i = len - 1; i >= 0; --i) {
|
|
@@ -516,7 +563,12 @@ function _focusItemElement(el) {
|
|
|
516
563
|
/**
|
|
517
564
|
* @internal
|
|
518
565
|
*/
|
|
519
|
-
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null)
|
|
566
|
+
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null);
|
|
567
|
+
/**
|
|
568
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
569
|
+
* @beta
|
|
570
|
+
*/
|
|
571
|
+
function Tree(props) {
|
|
520
572
|
let $ = c(38), children, forwardedRef, onFocus, restProps, t0;
|
|
521
573
|
$[0] === props ? (children = $[1], forwardedRef = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]) : ({children, gap: t0, onFocus, ref: forwardedRef, ...restProps} = props, $[0] = props, $[1] = children, $[2] = forwardedRef, $[3] = onFocus, $[4] = restProps, $[5] = t0);
|
|
522
574
|
let gap = t0 === void 0 ? 1 : t0, ref = useRef(null), [focusedElement, setFocusedElement] = useState(null), focusedElementRef = useRef(focusedElement), t1;
|
|
@@ -659,7 +711,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
659
711
|
value: contextValue,
|
|
660
712
|
children: t17
|
|
661
713
|
}), $[35] = contextValue, $[36] = t17, $[37] = t18) : t18 = $[37], t18;
|
|
662
|
-
}
|
|
714
|
+
}
|
|
663
715
|
function treeItemRootStyle() {
|
|
664
716
|
return css`&[role='none'] > [role='treeitem']{outline:none;cursor:default;border-radius:3px;background-color:var(--card-bg-color);color:var(--treeitem-fg-color);&:focus{position:relative;}}&[role='treeitem']{outline:none;& > div{cursor:default;border-radius:3px;background-color:var(--card-bg-color);color:var(--treeitem-fg-color);}&:focus > div{position:relative;}}`;
|
|
665
717
|
}
|
|
@@ -1224,8 +1276,12 @@ function _avatarCounterBaseStyle(props) {
|
|
|
1224
1276
|
}
|
|
1225
1277
|
const StyledAvatarCounter = /* @__PURE__ */ styled.div.withConfig({
|
|
1226
1278
|
displayName: "StyledAvatarCounter",
|
|
1227
|
-
componentId: "sc-
|
|
1228
|
-
})(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle)
|
|
1279
|
+
componentId: "sc-tzf8eq-0"
|
|
1280
|
+
})(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
1281
|
+
/**
|
|
1282
|
+
* @public
|
|
1283
|
+
*/
|
|
1284
|
+
function AvatarCounter(props) {
|
|
1229
1285
|
let $ = c(20), { count, ref, size: t0 } = props, sizeProp = t0 === void 0 ? 1 : t0, T0, T1, t1, t2, t3, t4, t5;
|
|
1230
1286
|
if ($[0] !== ref || $[1] !== sizeProp) {
|
|
1231
1287
|
let size = _getArrayProp(sizeProp);
|
|
@@ -1245,7 +1301,7 @@ const StyledAvatarCounter = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1245
1301
|
ref: t5,
|
|
1246
1302
|
children: t6
|
|
1247
1303
|
}), $[14] = T1, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19], t7;
|
|
1248
|
-
}
|
|
1304
|
+
}
|
|
1249
1305
|
function _temp$1(s) {
|
|
1250
1306
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1251
1307
|
}
|
|
@@ -1262,8 +1318,12 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1262
1318
|
}
|
|
1263
1319
|
const StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({
|
|
1264
1320
|
displayName: "StyledAvatarStack",
|
|
1265
|
-
componentId: "sc-
|
|
1266
|
-
})(responsiveAvatarStackSizeStyle, avatarStackStyle)
|
|
1321
|
+
componentId: "sc-lhp7nq-0"
|
|
1322
|
+
})(responsiveAvatarStackSizeStyle, avatarStackStyle);
|
|
1323
|
+
/**
|
|
1324
|
+
* @public
|
|
1325
|
+
*/
|
|
1326
|
+
function AvatarStack(props) {
|
|
1267
1327
|
let $ = c(39), childrenProp, ref, restProps, t0, t1;
|
|
1268
1328
|
$[0] === props ? (childrenProp = $[1], ref = $[2], restProps = $[3], t0 = $[4], t1 = $[5]) : ({children: childrenProp, maxLength: t0, ref, size: t1, ...restProps} = props, $[0] = props, $[1] = childrenProp, $[2] = ref, $[3] = restProps, $[4] = t0, $[5] = t1);
|
|
1269
1329
|
let maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, T0, t2, t3, t4, t5, t6, t7, t8;
|
|
@@ -1293,7 +1353,7 @@ const StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1293
1353
|
t8
|
|
1294
1354
|
]
|
|
1295
1355
|
}), $[30] = T0, $[31] = t2, $[32] = t3, $[33] = t4, $[34] = t5, $[35] = t6, $[36] = t7, $[37] = t8, $[38] = t9) : t9 = $[38], t9;
|
|
1296
|
-
}
|
|
1356
|
+
}
|
|
1297
1357
|
function badgeStyle(props) {
|
|
1298
1358
|
let { $tone } = props;
|
|
1299
1359
|
return {
|
|
@@ -1369,11 +1429,17 @@ function inputElementStyles(props) {
|
|
|
1369
1429
|
}
|
|
1370
1430
|
const StyledCheckbox = /* @__PURE__ */ styled.div.withConfig({
|
|
1371
1431
|
displayName: "StyledCheckbox",
|
|
1372
|
-
componentId: "sc-
|
|
1432
|
+
componentId: "sc-zlqryb-0"
|
|
1373
1433
|
})(checkboxBaseStyles), Input$4 = /* @__PURE__ */ styled.input.withConfig({
|
|
1374
1434
|
displayName: "Input",
|
|
1375
|
-
componentId: "sc-
|
|
1376
|
-
})(inputElementStyles)
|
|
1435
|
+
componentId: "sc-zlqryb-1"
|
|
1436
|
+
})(inputElementStyles);
|
|
1437
|
+
/**
|
|
1438
|
+
* Checkboxes allow the user to select one or more items from a set.
|
|
1439
|
+
*
|
|
1440
|
+
* @public
|
|
1441
|
+
*/
|
|
1442
|
+
function Checkbox(props) {
|
|
1377
1443
|
let $ = c(26), checked, className, customValidity, disabled, forwardedRef, indeterminate, readOnly, restProps, style;
|
|
1378
1444
|
$[0] === props ? (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], forwardedRef = $[5], indeterminate = $[6], readOnly = $[7], restProps = $[8], style = $[9]) : ({checked, className, disabled, indeterminate, customValidity, readOnly, ref: forwardedRef, style, ...restProps} = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = forwardedRef, $[6] = indeterminate, $[7] = readOnly, $[8] = restProps, $[9] = style);
|
|
1379
1445
|
let ref = useRef(null), t0;
|
|
@@ -1402,7 +1468,7 @@ const StyledCheckbox = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1402
1468
|
style,
|
|
1403
1469
|
children: [t6, t7]
|
|
1404
1470
|
}), $[22] = className, $[23] = style, $[24] = t6, $[25] = t8) : t8 = $[25], t8;
|
|
1405
|
-
}
|
|
1471
|
+
}
|
|
1406
1472
|
/**
|
|
1407
1473
|
* Get responsive CSS for the `heading` font style.
|
|
1408
1474
|
* @internal
|
|
@@ -1468,11 +1534,17 @@ function inputElementStyle(props) {
|
|
|
1468
1534
|
}
|
|
1469
1535
|
const StyledRadio = /* @__PURE__ */ styled.div.withConfig({
|
|
1470
1536
|
displayName: "StyledRadio",
|
|
1471
|
-
componentId: "sc-
|
|
1537
|
+
componentId: "sc-q0nfb5-0"
|
|
1472
1538
|
})(radioBaseStyle), Input$3 = /* @__PURE__ */ styled.input.withConfig({
|
|
1473
1539
|
displayName: "Input",
|
|
1474
|
-
componentId: "sc-
|
|
1475
|
-
})(inputElementStyle)
|
|
1540
|
+
componentId: "sc-q0nfb5-1"
|
|
1541
|
+
})(inputElementStyle);
|
|
1542
|
+
/**
|
|
1543
|
+
* The `Radio` component allows the user to select one option from a set.
|
|
1544
|
+
*
|
|
1545
|
+
* @public
|
|
1546
|
+
*/
|
|
1547
|
+
function Radio(props) {
|
|
1476
1548
|
let $ = c(20), className, customValidity, disabled, forwardedRef, readOnly, restProps, style;
|
|
1477
1549
|
$[0] === props ? (className = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], readOnly = $[5], restProps = $[6], style = $[7]) : ({className, disabled, style, customValidity, readOnly, ref: forwardedRef, ...restProps} = props, $[0] = props, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = readOnly, $[6] = restProps, $[7] = style);
|
|
1478
1550
|
let ref = useRef(null), t0;
|
|
@@ -1496,7 +1568,7 @@ const StyledRadio = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1496
1568
|
style,
|
|
1497
1569
|
children: [t4, t5]
|
|
1498
1570
|
}), $[16] = className, $[17] = style, $[18] = t4, $[19] = t6) : t6 = $[19], t6;
|
|
1499
|
-
}
|
|
1571
|
+
}
|
|
1500
1572
|
function rootStyle() {
|
|
1501
1573
|
return css`position:relative;width:-moz-available;width:-webkit-fill-available;width:stretch;&:not([hidden]){display:inline-block;}`;
|
|
1502
1574
|
}
|
|
@@ -1555,14 +1627,20 @@ const selectStyle = {
|
|
|
1555
1627
|
iconBox: iconBoxStyle
|
|
1556
1628
|
}, StyledSelect = /* @__PURE__ */ styled.div.withConfig({
|
|
1557
1629
|
displayName: "StyledSelect",
|
|
1558
|
-
componentId: "sc-
|
|
1630
|
+
componentId: "sc-y93hdm-0"
|
|
1559
1631
|
})(selectStyle.root), Input$2 = /* @__PURE__ */ styled.select.withConfig({
|
|
1560
1632
|
displayName: "Input",
|
|
1561
|
-
componentId: "sc-
|
|
1633
|
+
componentId: "sc-y93hdm-1"
|
|
1562
1634
|
})(selectStyle.input), IconBox = /* @__PURE__ */ styled(Box).withConfig({
|
|
1563
1635
|
displayName: "IconBox",
|
|
1564
|
-
componentId: "sc-
|
|
1565
|
-
})(selectStyle.iconBox)
|
|
1636
|
+
componentId: "sc-y93hdm-2"
|
|
1637
|
+
})(selectStyle.iconBox);
|
|
1638
|
+
/**
|
|
1639
|
+
* The `Select` component provides control of options.
|
|
1640
|
+
*
|
|
1641
|
+
* @public
|
|
1642
|
+
*/
|
|
1643
|
+
function Select(props) {
|
|
1566
1644
|
let $ = c(38), children, customValidity, disabled, forwardedRef, readOnly, restProps, t0, t1, t2, t3;
|
|
1567
1645
|
$[0] === props ? (children = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], readOnly = $[5], restProps = $[6], t0 = $[7], t1 = $[8], t2 = $[9], t3 = $[10]) : ({children, customValidity, disabled, fontSize: t0, gap: t1, padding: t2, radius: t3, readOnly, ref: forwardedRef, ...restProps} = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = readOnly, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2, $[10] = t3);
|
|
1568
1646
|
let fontSize = t0 === void 0 ? 2 : t0, gap = t1 === void 0 ? 3 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, ref = useRef(null), t4;
|
|
@@ -1605,7 +1683,7 @@ const selectStyle = {
|
|
|
1605
1683
|
"data-ui": "Select",
|
|
1606
1684
|
children: [t11, t14]
|
|
1607
1685
|
}), $[35] = t11, $[36] = t14, $[37] = t15) : t15 = $[37], t15;
|
|
1608
|
-
}
|
|
1686
|
+
}
|
|
1609
1687
|
function switchBaseStyles() {
|
|
1610
1688
|
return css`position:relative;&:not([hidden]){display:inline-block;}`;
|
|
1611
1689
|
}
|
|
@@ -1626,20 +1704,28 @@ function switchThumbStyles(props) {
|
|
|
1626
1704
|
}
|
|
1627
1705
|
const StyledSwitch = /* @__PURE__ */ styled.span.withConfig({
|
|
1628
1706
|
displayName: "StyledSwitch",
|
|
1629
|
-
componentId: "sc-
|
|
1707
|
+
componentId: "sc-wrpexm-0"
|
|
1630
1708
|
})(switchBaseStyles), Input$1 = /* @__PURE__ */ styled.input.withConfig({
|
|
1631
1709
|
displayName: "Input",
|
|
1632
|
-
componentId: "sc-
|
|
1710
|
+
componentId: "sc-wrpexm-1"
|
|
1633
1711
|
})(switchInputStyles), Representation = /* @__PURE__ */ styled.span.withConfig({
|
|
1634
1712
|
displayName: "Representation",
|
|
1635
|
-
componentId: "sc-
|
|
1713
|
+
componentId: "sc-wrpexm-2"
|
|
1636
1714
|
})(switchRepresentationStyles), Track = /* @__PURE__ */ styled.span.withConfig({
|
|
1637
1715
|
displayName: "Track",
|
|
1638
|
-
componentId: "sc-
|
|
1716
|
+
componentId: "sc-wrpexm-3"
|
|
1639
1717
|
})(switchTrackStyles), Thumb = /* @__PURE__ */ styled.span.withConfig({
|
|
1640
1718
|
displayName: "Thumb",
|
|
1641
|
-
componentId: "sc-
|
|
1642
|
-
})(switchThumbStyles)
|
|
1719
|
+
componentId: "sc-wrpexm-4"
|
|
1720
|
+
})(switchThumbStyles);
|
|
1721
|
+
/**
|
|
1722
|
+
* The `Switch` component allows the user to toggle a setting on and off.
|
|
1723
|
+
*
|
|
1724
|
+
* Extends all properties of an `<input type="checkbox" />` element, except type.
|
|
1725
|
+
*
|
|
1726
|
+
* @public
|
|
1727
|
+
*/
|
|
1728
|
+
function Switch(props) {
|
|
1643
1729
|
let $ = c(27), checked, className, disabled, forwardedRef, indeterminate, readOnly, restProps, style;
|
|
1644
1730
|
$[0] === props ? (checked = $[1], className = $[2], disabled = $[3], forwardedRef = $[4], indeterminate = $[5], readOnly = $[6], restProps = $[7], style = $[8]) : ({checked, className, disabled, indeterminate, readOnly, ref: forwardedRef, style, ...restProps} = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = forwardedRef, $[5] = indeterminate, $[6] = readOnly, $[7] = restProps, $[8] = style);
|
|
1645
1731
|
let ref = useRef(null), t0;
|
|
@@ -1675,19 +1761,27 @@ const StyledSwitch = /* @__PURE__ */ styled.span.withConfig({
|
|
|
1675
1761
|
style,
|
|
1676
1762
|
children: [t6, t8]
|
|
1677
1763
|
}), $[22] = className, $[23] = style, $[24] = t6, $[25] = t8, $[26] = t9) : t9 = $[26], t9;
|
|
1678
|
-
}
|
|
1764
|
+
}
|
|
1765
|
+
const StyledTextArea = /* @__PURE__ */ styled.span.withConfig({
|
|
1679
1766
|
displayName: "StyledTextArea",
|
|
1680
|
-
componentId: "sc-
|
|
1767
|
+
componentId: "sc-4tncul-0"
|
|
1681
1768
|
})(textInputRootStyle), InputRoot = styled.span.withConfig({
|
|
1682
1769
|
displayName: "InputRoot",
|
|
1683
|
-
componentId: "sc-
|
|
1770
|
+
componentId: "sc-4tncul-1"
|
|
1684
1771
|
})`flex:1;min-width:0;display:block;position:relative;`, Input = /* @__PURE__ */ styled.textarea.withConfig({
|
|
1685
1772
|
displayName: "Input",
|
|
1686
|
-
componentId: "sc-
|
|
1773
|
+
componentId: "sc-4tncul-2"
|
|
1687
1774
|
})(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled.div.withConfig({
|
|
1688
1775
|
displayName: "Presentation",
|
|
1689
|
-
componentId: "sc-
|
|
1690
|
-
})(responsiveRadiusStyle, textInputRepresentationStyle)
|
|
1776
|
+
componentId: "sc-4tncul-3"
|
|
1777
|
+
})(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
1778
|
+
/**
|
|
1779
|
+
* A multiline text input.
|
|
1780
|
+
*
|
|
1781
|
+
|
|
1782
|
+
* @public
|
|
1783
|
+
*/
|
|
1784
|
+
function TextArea(props) {
|
|
1691
1785
|
let $ = c(36), __unstable_disableFocusRing, customValidity, forwardedRef, restProps, t0, t1, t2, t3, t4, weight;
|
|
1692
1786
|
$[0] === props ? (__unstable_disableFocusRing = $[1], customValidity = $[2], forwardedRef = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7], t3 = $[8], t4 = $[9], weight = $[10]) : ({border: t0, customValidity, disabled: t1, fontSize: t2, padding: t3, radius: t4, ref: forwardedRef, weight, __unstable_disableFocusRing, ...restProps} = props, $[0] = props, $[1] = __unstable_disableFocusRing, $[2] = customValidity, $[3] = forwardedRef, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2, $[8] = t3, $[9] = t4, $[10] = weight);
|
|
1693
1787
|
let border = t0 === void 0 || t0, disabled = t1 !== void 0 && t1, fontSize = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, ref = useRef(null), rootTheme = useRootTheme(), t5;
|
|
@@ -1730,7 +1824,7 @@ const StyledSwitch = /* @__PURE__ */ styled.span.withConfig({
|
|
|
1730
1824
|
"data-ui": "TextArea",
|
|
1731
1825
|
children: /* @__PURE__ */ jsxs(InputRoot, { children: [t12, t15] })
|
|
1732
1826
|
}), $[33] = t12, $[34] = t15, $[35] = t16) : t16 = $[35], t16;
|
|
1733
|
-
}
|
|
1827
|
+
}
|
|
1734
1828
|
/**
|
|
1735
1829
|
* @public
|
|
1736
1830
|
*/
|
|
@@ -1767,7 +1861,7 @@ function findMinBreakpoints(media, width) {
|
|
|
1767
1861
|
* DO NOT USE IN PRODUCTION.
|
|
1768
1862
|
* @beta
|
|
1769
1863
|
*/
|
|
1770
|
-
|
|
1864
|
+
function ElementQuery(props) {
|
|
1771
1865
|
let $ = c(19), theme = useTheme_v2(), _media, children, forwardedRef, restProps;
|
|
1772
1866
|
$[0] === props ? (_media = $[1], children = $[2], forwardedRef = $[3], restProps = $[4]) : ({children, media: _media, ref: forwardedRef, ...restProps} = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = forwardedRef, $[4] = restProps);
|
|
1773
1867
|
let media = _media ?? theme.media, [element, setElement] = useState(null), width = useElementSize(element)?.border.width ?? window.innerWidth, t0;
|
|
@@ -1791,7 +1885,7 @@ const ElementQuery = function ElementQuery(props) {
|
|
|
1791
1885
|
ref: setElement,
|
|
1792
1886
|
children
|
|
1793
1887
|
}), $[14] = children, $[15] = max, $[16] = min, $[17] = restProps, $[18] = t4) : t4 = $[18], t4;
|
|
1794
|
-
}
|
|
1888
|
+
}
|
|
1795
1889
|
/**
|
|
1796
1890
|
* DO NOT USE IN PRODUCTION
|
|
1797
1891
|
* @beta
|
|
@@ -1843,7 +1937,7 @@ var srOnly = "_1omd6w40";
|
|
|
1843
1937
|
/**
|
|
1844
1938
|
* @public
|
|
1845
1939
|
*/
|
|
1846
|
-
|
|
1940
|
+
function SrOnly(props) {
|
|
1847
1941
|
let $ = c(4), { as: t0, children, ref } = props, Component = t0 === void 0 ? "div" : t0, t1;
|
|
1848
1942
|
return $[0] !== Component || $[1] !== children || $[2] !== ref ? (t1 = /* @__PURE__ */ jsx(Component, {
|
|
1849
1943
|
"aria-hidden": !0,
|
|
@@ -1852,13 +1946,18 @@ const SrOnly = function SrOnly(props) {
|
|
|
1852
1946
|
ref,
|
|
1853
1947
|
children
|
|
1854
1948
|
}), $[0] = Component, $[1] = children, $[2] = ref, $[3] = t1) : t1 = $[3], t1;
|
|
1855
|
-
}
|
|
1949
|
+
}
|
|
1950
|
+
const StyledVirtualList = styled.div.withConfig({
|
|
1856
1951
|
displayName: "StyledVirtualList",
|
|
1857
|
-
componentId: "sc-
|
|
1952
|
+
componentId: "sc-ewb1cb-0"
|
|
1858
1953
|
})`position:relative;`, ItemWrapper = styled.div.withConfig({
|
|
1859
1954
|
displayName: "ItemWrapper",
|
|
1860
|
-
componentId: "sc-
|
|
1861
|
-
})`position:absolute;left:0;right:0
|
|
1955
|
+
componentId: "sc-ewb1cb-1"
|
|
1956
|
+
})`position:absolute;left:0;right:0;`;
|
|
1957
|
+
/**
|
|
1958
|
+
* @beta
|
|
1959
|
+
*/
|
|
1960
|
+
function VirtualList(props) {
|
|
1862
1961
|
let $ = c(45), forwardedRef, getItemKey, onChange, renderItem, restProps, t0, t1, t2;
|
|
1863
1962
|
$[0] === props ? (forwardedRef = $[1], getItemKey = $[2], onChange = $[3], renderItem = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8]) : ({as: t0, gap: t1, getItemKey, items: t2, onChange, ref: forwardedRef, renderItem, ...restProps} = props, $[0] = props, $[1] = forwardedRef, $[2] = getItemKey, $[3] = onChange, $[4] = renderItem, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2);
|
|
1864
1963
|
let as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1, t3;
|
|
@@ -1946,7 +2045,7 @@ const SrOnly = function SrOnly(props) {
|
|
|
1946
2045
|
ref,
|
|
1947
2046
|
children: t13
|
|
1948
2047
|
}), $[41] = as, $[42] = restProps, $[43] = t13, $[44] = t14) : t14 = $[44], t14;
|
|
1949
|
-
}
|
|
2048
|
+
}
|
|
1950
2049
|
function useChildren(t0) {
|
|
1951
2050
|
let $ = c(21), { fromIndex, gap, getItemKey, itemHeight, items, renderItem, space, toIndex } = t0;
|
|
1952
2051
|
if (!renderItem || items.length === 0) return null;
|