@sanity/ui 4.0.0-next.3 → 4.0.0-next.4
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/index.d.ts +36 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +941 -890
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
import { a as createColorTheme$1, c as multiply$1, d as hexToRgb$1, f as hslToRgb$1, i as getTheme_v2, l as rgba$1, m as rgbToHsl$1, o as buildTheme, p as rgbToHex$1, s as screen$1, t as getScopedTheme, u as parseColor$1 } from "./getScopedTheme-CqaSCfTH.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
|
|
5
|
-
import { Children, Component, Fragment, Suspense, cloneElement, createContext,
|
|
5
|
+
import { Activity, Children, Component, Fragment, Suspense, cloneElement, createContext, isValidElement, lazy, startTransition, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
6
6
|
import { ThemeProvider as ThemeProvider$1, css, keyframes, styled, useTheme as useTheme$1 } from "styled-components";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import ReactIs, { isValidElementType } from "react-is";
|
|
9
9
|
import { SpinnerIcon } from "@sanity/icons/Spinner";
|
|
10
10
|
import { arrow, autoPlacement, autoUpdate, detectOverflow, flip, hide, offset, shift, useFloating } from "@floating-ui/react-dom";
|
|
11
|
-
import { AnimatePresence, motion, stagger } from "motion/react";
|
|
12
|
-
import { ResizeObserver } from "@juggle/resize-observer";
|
|
11
|
+
import { AnimatePresence, PresenceChild, invariant, motion, stagger } from "motion/react";
|
|
13
12
|
import { createPortal } from "react-dom";
|
|
14
13
|
import { CloseIcon } from "@sanity/icons/Close";
|
|
15
14
|
import { useEffectEvent } from "use-effect-event";
|
|
@@ -303,62 +302,62 @@ function responsivePaddingStyle(props) {
|
|
|
303
302
|
}
|
|
304
303
|
const StyledBox = /* @__PURE__ */ styled.div.withConfig({
|
|
305
304
|
displayName: "StyledBox",
|
|
306
|
-
componentId: "sc-
|
|
307
|
-
})(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box =
|
|
308
|
-
let $ = c(
|
|
309
|
-
$[0] === props ? (flex = $[1], gridColumn = $[2], gridColumnEnd = $[3], gridColumnStart = $[4], gridRow = $[5], gridRowEnd = $[6], gridRowStart = $[7], height = $[8], marginBottom = $[9], marginLeft = $[10], marginRight = $[11], marginTop = $[12], marginX = $[13], marginY = $[14], overflow = $[15], paddingBottom = $[16], paddingLeft = $[17], paddingRight = $[18], paddingTop = $[19], paddingX = $[20], paddingY = $[21],
|
|
305
|
+
componentId: "sc-w5d1un-0"
|
|
306
|
+
})(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = function Box(props) {
|
|
307
|
+
let $ = c(110), flex, gridColumn, gridColumnEnd, gridColumnStart, gridRow, gridRowEnd, gridRowStart, height, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, ref, restProps, sizing, t0, t1, t2, t3;
|
|
308
|
+
$[0] === props ? (flex = $[1], gridColumn = $[2], gridColumnEnd = $[3], gridColumnStart = $[4], gridRow = $[5], gridRowEnd = $[6], gridRowStart = $[7], height = $[8], marginBottom = $[9], marginLeft = $[10], marginRight = $[11], marginTop = $[12], marginX = $[13], marginY = $[14], overflow = $[15], paddingBottom = $[16], paddingLeft = $[17], paddingRight = $[18], paddingTop = $[19], paddingX = $[20], paddingY = $[21], ref = $[22], restProps = $[23], sizing = $[24], t0 = $[25], t1 = $[26], t2 = $[27], t3 = $[28]) : ({as: t0, ref, gridColumn, gridColumnStart, gridColumnEnd, display: t1, flex, height, margin: t2, marginX, marginY, marginTop, marginRight, marginBottom, marginLeft, overflow, padding: t3, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, gridRow, gridRowStart, gridRowEnd, sizing, ...restProps} = props, $[0] = props, $[1] = flex, $[2] = gridColumn, $[3] = gridColumnEnd, $[4] = gridColumnStart, $[5] = gridRow, $[6] = gridRowEnd, $[7] = gridRowStart, $[8] = height, $[9] = marginBottom, $[10] = marginLeft, $[11] = marginRight, $[12] = marginTop, $[13] = marginX, $[14] = marginY, $[15] = overflow, $[16] = paddingBottom, $[17] = paddingLeft, $[18] = paddingRight, $[19] = paddingTop, $[20] = paddingX, $[21] = paddingY, $[22] = ref, $[23] = restProps, $[24] = sizing, $[25] = t0, $[26] = t1, $[27] = t2, $[28] = t3);
|
|
310
309
|
let asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, t4 = typeof asProp == "string" ? asProp : void 0, t5;
|
|
311
|
-
$[
|
|
310
|
+
$[29] === gridColumn ? t5 = $[30] : (t5 = _getArrayProp(gridColumn), $[29] = gridColumn, $[30] = t5);
|
|
312
311
|
let t6;
|
|
313
|
-
$[
|
|
312
|
+
$[31] === gridColumnStart ? t6 = $[32] : (t6 = _getArrayProp(gridColumnStart), $[31] = gridColumnStart, $[32] = t6);
|
|
314
313
|
let t7;
|
|
315
|
-
$[
|
|
314
|
+
$[33] === gridColumnEnd ? t7 = $[34] : (t7 = _getArrayProp(gridColumnEnd), $[33] = gridColumnEnd, $[34] = t7);
|
|
316
315
|
let t8;
|
|
317
|
-
$[
|
|
316
|
+
$[35] === display ? t8 = $[36] : (t8 = _getArrayProp(display), $[35] = display, $[36] = t8);
|
|
318
317
|
let t9;
|
|
319
|
-
$[
|
|
318
|
+
$[37] === flex ? t9 = $[38] : (t9 = _getArrayProp(flex), $[37] = flex, $[38] = t9);
|
|
320
319
|
let t10;
|
|
321
|
-
$[
|
|
320
|
+
$[39] === height ? t10 = $[40] : (t10 = _getArrayProp(height), $[39] = height, $[40] = t10);
|
|
322
321
|
let t11;
|
|
323
|
-
$[
|
|
322
|
+
$[41] === margin ? t11 = $[42] : (t11 = _getArrayProp(margin), $[41] = margin, $[42] = t11);
|
|
324
323
|
let t12;
|
|
325
|
-
$[
|
|
324
|
+
$[43] === marginX ? t12 = $[44] : (t12 = _getArrayProp(marginX), $[43] = marginX, $[44] = t12);
|
|
326
325
|
let t13;
|
|
327
|
-
$[
|
|
326
|
+
$[45] === marginY ? t13 = $[46] : (t13 = _getArrayProp(marginY), $[45] = marginY, $[46] = t13);
|
|
328
327
|
let t14;
|
|
329
|
-
$[
|
|
328
|
+
$[47] === marginTop ? t14 = $[48] : (t14 = _getArrayProp(marginTop), $[47] = marginTop, $[48] = t14);
|
|
330
329
|
let t15;
|
|
331
|
-
$[
|
|
330
|
+
$[49] === marginRight ? t15 = $[50] : (t15 = _getArrayProp(marginRight), $[49] = marginRight, $[50] = t15);
|
|
332
331
|
let t16;
|
|
333
|
-
$[
|
|
332
|
+
$[51] === marginBottom ? t16 = $[52] : (t16 = _getArrayProp(marginBottom), $[51] = marginBottom, $[52] = t16);
|
|
334
333
|
let t17;
|
|
335
|
-
$[
|
|
334
|
+
$[53] === marginLeft ? t17 = $[54] : (t17 = _getArrayProp(marginLeft), $[53] = marginLeft, $[54] = t17);
|
|
336
335
|
let t18;
|
|
337
|
-
$[
|
|
336
|
+
$[55] === overflow ? t18 = $[56] : (t18 = _getArrayProp(overflow), $[55] = overflow, $[56] = t18);
|
|
338
337
|
let t19;
|
|
339
|
-
$[
|
|
338
|
+
$[57] === padding ? t19 = $[58] : (t19 = _getArrayProp(padding), $[57] = padding, $[58] = t19);
|
|
340
339
|
let t20;
|
|
341
|
-
$[
|
|
340
|
+
$[59] === paddingX ? t20 = $[60] : (t20 = _getArrayProp(paddingX), $[59] = paddingX, $[60] = t20);
|
|
342
341
|
let t21;
|
|
343
|
-
$[
|
|
342
|
+
$[61] === paddingY ? t21 = $[62] : (t21 = _getArrayProp(paddingY), $[61] = paddingY, $[62] = t21);
|
|
344
343
|
let t22;
|
|
345
|
-
$[
|
|
344
|
+
$[63] === paddingTop ? t22 = $[64] : (t22 = _getArrayProp(paddingTop), $[63] = paddingTop, $[64] = t22);
|
|
346
345
|
let t23;
|
|
347
|
-
$[
|
|
346
|
+
$[65] === paddingRight ? t23 = $[66] : (t23 = _getArrayProp(paddingRight), $[65] = paddingRight, $[66] = t23);
|
|
348
347
|
let t24;
|
|
349
|
-
$[
|
|
348
|
+
$[67] === paddingBottom ? t24 = $[68] : (t24 = _getArrayProp(paddingBottom), $[67] = paddingBottom, $[68] = t24);
|
|
350
349
|
let t25;
|
|
351
|
-
$[
|
|
350
|
+
$[69] === paddingLeft ? t25 = $[70] : (t25 = _getArrayProp(paddingLeft), $[69] = paddingLeft, $[70] = t25);
|
|
352
351
|
let t26;
|
|
353
|
-
$[
|
|
352
|
+
$[71] === gridRow ? t26 = $[72] : (t26 = _getArrayProp(gridRow), $[71] = gridRow, $[72] = t26);
|
|
354
353
|
let t27;
|
|
355
|
-
$[
|
|
354
|
+
$[73] === gridRowStart ? t27 = $[74] : (t27 = _getArrayProp(gridRowStart), $[73] = gridRowStart, $[74] = t27);
|
|
356
355
|
let t28;
|
|
357
|
-
$[
|
|
356
|
+
$[75] === gridRowEnd ? t28 = $[76] : (t28 = _getArrayProp(gridRowEnd), $[75] = gridRowEnd, $[76] = t28);
|
|
358
357
|
let t29;
|
|
359
|
-
$[
|
|
358
|
+
$[77] === sizing ? t29 = $[78] : (t29 = _getArrayProp(sizing), $[77] = sizing, $[78] = t29);
|
|
360
359
|
let t30;
|
|
361
|
-
return $[
|
|
360
|
+
return $[79] !== asProp || $[80] !== props.children || $[81] !== ref || $[82] !== restProps || $[83] !== t10 || $[84] !== t11 || $[85] !== t12 || $[86] !== t13 || $[87] !== t14 || $[88] !== t15 || $[89] !== t16 || $[90] !== t17 || $[91] !== t18 || $[92] !== t19 || $[93] !== t20 || $[94] !== t21 || $[95] !== t22 || $[96] !== t23 || $[97] !== t24 || $[98] !== t25 || $[99] !== t26 || $[100] !== t27 || $[101] !== t28 || $[102] !== t29 || $[103] !== t4 || $[104] !== t5 || $[105] !== t6 || $[106] !== t7 || $[107] !== t8 || $[108] !== t9 ? (t30 = /* @__PURE__ */ jsx(StyledBox, {
|
|
362
361
|
"data-as": t4,
|
|
363
362
|
"data-ui": "Box",
|
|
364
363
|
...restProps,
|
|
@@ -390,8 +389,8 @@ const StyledBox = /* @__PURE__ */ styled.div.withConfig({
|
|
|
390
389
|
as: asProp,
|
|
391
390
|
ref,
|
|
392
391
|
children: props.children
|
|
393
|
-
}), $[
|
|
394
|
-
}
|
|
392
|
+
}), $[79] = asProp, $[80] = props.children, $[81] = ref, $[82] = restProps, $[83] = t10, $[84] = t11, $[85] = t12, $[86] = t13, $[87] = t14, $[88] = t15, $[89] = t16, $[90] = t17, $[91] = t18, $[92] = t19, $[93] = t20, $[94] = t21, $[95] = t22, $[96] = t23, $[97] = t24, $[98] = t25, $[99] = t26, $[100] = t27, $[101] = t28, $[102] = t29, $[103] = t4, $[104] = t5, $[105] = t6, $[106] = t7, $[107] = t8, $[108] = t9, $[109] = t30) : t30 = $[109], t30;
|
|
393
|
+
};
|
|
395
394
|
function responsiveRadiusStyle(props) {
|
|
396
395
|
let { media, radius } = getTheme_v2(props.theme);
|
|
397
396
|
return _responsive(media, props.$radius, (value) => {
|
|
@@ -445,22 +444,22 @@ function responsiveFlexDirectionStyle(props) {
|
|
|
445
444
|
}
|
|
446
445
|
const StyledFlex = /* @__PURE__ */ styled(Box).withConfig({
|
|
447
446
|
displayName: "StyledFlex",
|
|
448
|
-
componentId: "sc-
|
|
449
|
-
})(flexItemStyle, responsiveFlexStyle), Flex =
|
|
450
|
-
let $ = c(
|
|
451
|
-
$[0] === props ? (align = $[1], as = $[2], gap = $[3], justify = $[4],
|
|
447
|
+
componentId: "sc-ggyczz-0"
|
|
448
|
+
})(flexItemStyle, responsiveFlexStyle), Flex = function Flex(props) {
|
|
449
|
+
let $ = c(28), align, as, gap, justify, ref, restProps, t0, wrap;
|
|
450
|
+
$[0] === props ? (align = $[1], as = $[2], gap = $[3], justify = $[4], ref = $[5], restProps = $[6], t0 = $[7], wrap = $[8]) : ({align, as, direction: t0, gap, justify, ref, wrap, ...restProps} = props, $[0] = props, $[1] = align, $[2] = as, $[3] = gap, $[4] = justify, $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = wrap);
|
|
452
451
|
let direction = t0 === void 0 ? "row" : t0, t1;
|
|
453
|
-
$[
|
|
452
|
+
$[9] === align ? t1 = $[10] : (t1 = _getArrayProp(align), $[9] = align, $[10] = t1);
|
|
454
453
|
let t2;
|
|
455
|
-
$[
|
|
454
|
+
$[11] === direction ? t2 = $[12] : (t2 = _getArrayProp(direction), $[11] = direction, $[12] = t2);
|
|
456
455
|
let t3;
|
|
457
|
-
$[
|
|
456
|
+
$[13] === gap ? t3 = $[14] : (t3 = _getArrayProp(gap), $[13] = gap, $[14] = t3);
|
|
458
457
|
let t4;
|
|
459
|
-
$[
|
|
458
|
+
$[15] === justify ? t4 = $[16] : (t4 = _getArrayProp(justify), $[15] = justify, $[16] = t4);
|
|
460
459
|
let t5;
|
|
461
|
-
$[
|
|
460
|
+
$[17] === wrap ? t5 = $[18] : (t5 = _getArrayProp(wrap), $[17] = wrap, $[18] = t5);
|
|
462
461
|
let t6;
|
|
463
|
-
return $[
|
|
462
|
+
return $[19] !== as || $[20] !== ref || $[21] !== restProps || $[22] !== t1 || $[23] !== t2 || $[24] !== t3 || $[25] !== t4 || $[26] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledFlex, {
|
|
464
463
|
"data-ui": "Flex",
|
|
465
464
|
...restProps,
|
|
466
465
|
$align: t1,
|
|
@@ -470,8 +469,8 @@ const StyledFlex = /* @__PURE__ */ styled(Box).withConfig({
|
|
|
470
469
|
$wrap: t5,
|
|
471
470
|
forwardedAs: as,
|
|
472
471
|
ref
|
|
473
|
-
}), $[
|
|
474
|
-
}
|
|
472
|
+
}), $[19] = as, $[20] = ref, $[21] = restProps, $[22] = t1, $[23] = t2, $[24] = t3, $[25] = t4, $[26] = t5, $[27] = t6) : t6 = $[27], t6;
|
|
473
|
+
};
|
|
475
474
|
/**
|
|
476
475
|
* Get responsive text align styles.
|
|
477
476
|
* @internal
|
|
@@ -548,23 +547,23 @@ function textBaseStyle(props) {
|
|
|
548
547
|
}
|
|
549
548
|
const StyledText = /* @__PURE__ */ styled.div.withConfig({
|
|
550
549
|
displayName: "StyledText",
|
|
551
|
-
componentId: "sc-
|
|
552
|
-
})(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), Text =
|
|
553
|
-
let $ = c(
|
|
554
|
-
$[0] === props ? (align = $[1], childrenProp = $[2],
|
|
550
|
+
componentId: "sc-b3ymr4-0"
|
|
551
|
+
})(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), Text = function Text(props) {
|
|
552
|
+
let $ = c(27), align, childrenProp, ref, restProps, t0, t1, t2, textOverflow, weight;
|
|
553
|
+
$[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);
|
|
555
554
|
let accent = t0 !== void 0 && t0, muted = t1 !== void 0 && t1, size = t2 === void 0 ? 2 : t2, children = childrenProp;
|
|
556
555
|
if (textOverflow === "ellipsis") {
|
|
557
556
|
let t3;
|
|
558
|
-
$[
|
|
557
|
+
$[10] === children ? t3 = $[11] : (t3 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[10] = children, $[11] = t3), children = t3;
|
|
559
558
|
}
|
|
560
559
|
let t3;
|
|
561
|
-
$[
|
|
560
|
+
$[12] === align ? t3 = $[13] : (t3 = _getArrayProp(align), $[12] = align, $[13] = t3);
|
|
562
561
|
let t4;
|
|
563
|
-
$[
|
|
562
|
+
$[14] === size ? t4 = $[15] : (t4 = _getArrayProp(size), $[14] = size, $[15] = t4);
|
|
564
563
|
let t5;
|
|
565
|
-
$[
|
|
564
|
+
$[16] === children ? t5 = $[17] : (t5 = /* @__PURE__ */ jsx("span", { children }), $[16] = children, $[17] = t5);
|
|
566
565
|
let t6;
|
|
567
|
-
return $[
|
|
566
|
+
return $[18] !== accent || $[19] !== muted || $[20] !== ref || $[21] !== restProps || $[22] !== t3 || $[23] !== t4 || $[24] !== t5 || $[25] !== weight ? (t6 = /* @__PURE__ */ jsx(StyledText, {
|
|
568
567
|
"data-ui": "Text",
|
|
569
568
|
...restProps,
|
|
570
569
|
$accent: accent,
|
|
@@ -574,21 +573,20 @@ const StyledText = /* @__PURE__ */ styled.div.withConfig({
|
|
|
574
573
|
$size: t4,
|
|
575
574
|
$weight: weight,
|
|
576
575
|
children: t5
|
|
577
|
-
}), $[
|
|
578
|
-
}
|
|
576
|
+
}), $[18] = accent, $[19] = muted, $[20] = ref, $[21] = restProps, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = weight, $[26] = t6) : t6 = $[26], t6;
|
|
577
|
+
}, rotate$1 = keyframes`from{transform:rotate(0deg);}to{transform:rotate(360deg);}`, StyledSpinner = styled(Text).withConfig({
|
|
579
578
|
displayName: "StyledSpinner",
|
|
580
|
-
componentId: "sc-
|
|
581
|
-
})`& > span > svg{animation:${rotate$1} 500ms linear infinite;}`, Spinner =
|
|
582
|
-
let $ = c(
|
|
579
|
+
componentId: "sc-2umvqs-0"
|
|
580
|
+
})`& > span > svg{animation:${rotate$1} 500ms linear infinite;}`, Spinner = function Spinner(props) {
|
|
581
|
+
let $ = c(3), t0;
|
|
583
582
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx(SpinnerIcon, {}), $[0] = t0) : t0 = $[0];
|
|
584
583
|
let t1;
|
|
585
|
-
return $[1]
|
|
584
|
+
return $[1] === props ? t1 = $[2] : (t1 = /* @__PURE__ */ jsx(StyledSpinner, {
|
|
586
585
|
"data-ui": "Spinner",
|
|
587
586
|
...props,
|
|
588
|
-
ref,
|
|
589
587
|
children: t0
|
|
590
|
-
}), $[1] = props, $[2] =
|
|
591
|
-
}
|
|
588
|
+
}), $[1] = props, $[2] = t1), t1;
|
|
589
|
+
};
|
|
592
590
|
/**
|
|
593
591
|
* @internal
|
|
594
592
|
*/
|
|
@@ -731,35 +729,35 @@ function buttonColorStyles(props) {
|
|
|
731
729
|
}
|
|
732
730
|
const StyledButton = /* @__PURE__ */ styled.button.withConfig({
|
|
733
731
|
displayName: "StyledButton",
|
|
734
|
-
componentId: "sc-
|
|
732
|
+
componentId: "sc-7pa0ky-0"
|
|
735
733
|
})(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styled.div.withConfig({
|
|
736
734
|
displayName: "LoadingBox",
|
|
737
|
-
componentId: "sc-
|
|
738
|
-
})`position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;`, Button =
|
|
739
|
-
let $ = c(
|
|
740
|
-
$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], loading = $[5], paddingBottomProp = $[6], paddingLeftProp = $[7], paddingRightProp = $[8], paddingTopProp = $[9], paddingXProp = $[10], paddingYProp = $[11],
|
|
735
|
+
componentId: "sc-7pa0ky-1"
|
|
736
|
+
})`position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;`, Button = function Button(props) {
|
|
737
|
+
let $ = c(87), IconComponent, IconRightComponent, children, disabled, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, ref, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, textWeight, width;
|
|
738
|
+
$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], loading = $[5], paddingBottomProp = $[6], paddingLeftProp = $[7], paddingRightProp = $[8], paddingTopProp = $[9], paddingXProp = $[10], paddingYProp = $[11], ref = $[12], restProps = $[13], selected = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21], t7 = $[22], t8 = $[23], text = $[24], textAlign = $[25], textWeight = $[26], width = $[27]) : ({children, disabled, ref, fontSize: t0, icon: IconComponent, iconRight: IconRightComponent, justify: t1, loading, mode: t2, padding: t3, paddingX: paddingXProp, paddingY: paddingYProp, paddingTop: paddingTopProp, paddingBottom: paddingBottomProp, paddingLeft: paddingLeftProp, paddingRight: paddingRightProp, radius: t4, selected, gap: t5, text, textAlign, textWeight, tone: t6, type: t7, muted: t8, width, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = loading, $[6] = paddingBottomProp, $[7] = paddingLeftProp, $[8] = paddingRightProp, $[9] = paddingTopProp, $[10] = paddingXProp, $[11] = paddingYProp, $[12] = ref, $[13] = restProps, $[14] = selected, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = t8, $[24] = text, $[25] = textAlign, $[26] = textWeight, $[27] = width);
|
|
741
739
|
let fontSize = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, gap = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8 !== void 0 && t8, { button } = useTheme_v2(), t9;
|
|
742
|
-
$[
|
|
740
|
+
$[28] === justifyProp ? t9 = $[29] : (t9 = _getArrayProp(justifyProp), $[28] = justifyProp, $[29] = t9);
|
|
743
741
|
let justify = t9, t10;
|
|
744
|
-
$[
|
|
742
|
+
$[30] === paddingProp ? t10 = $[31] : (t10 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t10);
|
|
745
743
|
let padding = t10, t11;
|
|
746
|
-
$[
|
|
744
|
+
$[32] === paddingXProp ? t11 = $[33] : (t11 = _getArrayProp(paddingXProp), $[32] = paddingXProp, $[33] = t11);
|
|
747
745
|
let paddingX = t11, t12;
|
|
748
|
-
$[
|
|
746
|
+
$[34] === paddingYProp ? t12 = $[35] : (t12 = _getArrayProp(paddingYProp), $[34] = paddingYProp, $[35] = t12);
|
|
749
747
|
let paddingY = t12, t13;
|
|
750
|
-
$[
|
|
748
|
+
$[36] === paddingTopProp ? t13 = $[37] : (t13 = _getArrayProp(paddingTopProp), $[36] = paddingTopProp, $[37] = t13);
|
|
751
749
|
let paddingTop = t13, t14;
|
|
752
|
-
$[
|
|
750
|
+
$[38] === paddingBottomProp ? t14 = $[39] : (t14 = _getArrayProp(paddingBottomProp), $[38] = paddingBottomProp, $[39] = t14);
|
|
753
751
|
let paddingBottom = t14, t15;
|
|
754
|
-
$[
|
|
752
|
+
$[40] === paddingLeftProp ? t15 = $[41] : (t15 = _getArrayProp(paddingLeftProp), $[40] = paddingLeftProp, $[41] = t15);
|
|
755
753
|
let paddingLeft = t15, t16;
|
|
756
|
-
$[
|
|
754
|
+
$[42] === paddingRightProp ? t16 = $[43] : (t16 = _getArrayProp(paddingRightProp), $[42] = paddingRightProp, $[43] = t16);
|
|
757
755
|
let paddingRight = t16, t17;
|
|
758
|
-
$[
|
|
756
|
+
$[44] === radiusProp ? t17 = $[45] : (t17 = _getArrayProp(radiusProp), $[44] = radiusProp, $[45] = t17);
|
|
759
757
|
let radius = t17, t18;
|
|
760
|
-
$[
|
|
758
|
+
$[46] === gap ? t18 = $[47] : (t18 = _getArrayProp(gap), $[46] = gap, $[47] = t18);
|
|
761
759
|
let spacing = t18, t19;
|
|
762
|
-
$[
|
|
760
|
+
$[48] !== padding || $[49] !== paddingBottom || $[50] !== paddingLeft || $[51] !== paddingRight || $[52] !== paddingTop || $[53] !== paddingX || $[54] !== paddingY ? (t19 = {
|
|
763
761
|
padding,
|
|
764
762
|
paddingX,
|
|
765
763
|
paddingY,
|
|
@@ -767,11 +765,11 @@ const StyledButton = /* @__PURE__ */ styled.button.withConfig({
|
|
|
767
765
|
paddingBottom,
|
|
768
766
|
paddingLeft,
|
|
769
767
|
paddingRight
|
|
770
|
-
}, $[
|
|
768
|
+
}, $[48] = padding, $[49] = paddingBottom, $[50] = paddingLeft, $[51] = paddingRight, $[52] = paddingTop, $[53] = paddingX, $[54] = paddingY, $[55] = t19) : t19 = $[55];
|
|
771
769
|
let boxProps = t19, t20 = !!(loading || disabled), t21 = selected ? "" : void 0, t22 = !!(loading || disabled), t23;
|
|
772
|
-
$[
|
|
770
|
+
$[56] === loading ? t23 = $[57] : (t23 = !!loading && /* @__PURE__ */ jsx(LoadingBox, { children: /* @__PURE__ */ jsx(Spinner, {}) }), $[56] = loading, $[57] = t23);
|
|
773
771
|
let t24;
|
|
774
|
-
$[
|
|
772
|
+
$[58] !== IconComponent || $[59] !== IconRightComponent || $[60] !== boxProps || $[61] !== button || $[62] !== fontSize || $[63] !== justify || $[64] !== muted || $[65] !== spacing || $[66] !== text || $[67] !== textAlign || $[68] !== textWeight ? (t24 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsx(Box, {
|
|
775
773
|
as: "span",
|
|
776
774
|
...boxProps,
|
|
777
775
|
children: /* @__PURE__ */ jsxs(Flex, {
|
|
@@ -797,15 +795,15 @@ const StyledButton = /* @__PURE__ */ styled.button.withConfig({
|
|
|
797
795
|
})
|
|
798
796
|
]
|
|
799
797
|
})
|
|
800
|
-
}), $[
|
|
798
|
+
}), $[58] = IconComponent, $[59] = IconRightComponent, $[60] = boxProps, $[61] = button, $[62] = fontSize, $[63] = justify, $[64] = muted, $[65] = spacing, $[66] = text, $[67] = textAlign, $[68] = textWeight, $[69] = t24) : t24 = $[69];
|
|
801
799
|
let t25;
|
|
802
|
-
$[
|
|
800
|
+
$[70] !== boxProps || $[71] !== children ? (t25 = children && /* @__PURE__ */ jsx(Box, {
|
|
803
801
|
as: "span",
|
|
804
802
|
...boxProps,
|
|
805
803
|
children
|
|
806
|
-
}), $[
|
|
804
|
+
}), $[70] = boxProps, $[71] = children, $[72] = t25) : t25 = $[72];
|
|
807
805
|
let t26;
|
|
808
|
-
return $[
|
|
806
|
+
return $[73] !== mode || $[74] !== radius || $[75] !== ref || $[76] !== restProps || $[77] !== t20 || $[78] !== t21 || $[79] !== t22 || $[80] !== t23 || $[81] !== t24 || $[82] !== t25 || $[83] !== tone || $[84] !== type || $[85] !== width ? (t26 = /* @__PURE__ */ jsxs(StyledButton, {
|
|
809
807
|
"data-ui": "Button",
|
|
810
808
|
...restProps,
|
|
811
809
|
$mode: mode,
|
|
@@ -822,8 +820,8 @@ const StyledButton = /* @__PURE__ */ styled.button.withConfig({
|
|
|
822
820
|
t24,
|
|
823
821
|
t25
|
|
824
822
|
]
|
|
825
|
-
}), $[
|
|
826
|
-
}
|
|
823
|
+
}), $[73] = mode, $[74] = radius, $[75] = ref, $[76] = restProps, $[77] = t20, $[78] = t21, $[79] = t22, $[80] = t23, $[81] = t24, $[82] = t25, $[83] = tone, $[84] = type, $[85] = width, $[86] = t26) : t26 = $[86], t26;
|
|
824
|
+
};
|
|
827
825
|
function responsiveBorderStyle() {
|
|
828
826
|
return [
|
|
829
827
|
border,
|
|
@@ -991,26 +989,26 @@ function cardColorStyle(props) {
|
|
|
991
989
|
}
|
|
992
990
|
const StyledCard = /* @__PURE__ */ styled(Box).withConfig({
|
|
993
991
|
displayName: "StyledCard",
|
|
994
|
-
componentId: "sc-
|
|
995
|
-
})(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card =
|
|
996
|
-
let $ = c(
|
|
997
|
-
$[0] === props ? (asProp = $[1], border = $[2], borderBottom = $[3], borderLeft = $[4], borderRight = $[5], borderTop = $[6], muted = $[7], pressed = $[8],
|
|
992
|
+
componentId: "sc-46g0j2-0"
|
|
993
|
+
})(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = function Card(props) {
|
|
994
|
+
let $ = c(57), asProp, border, borderBottom, borderLeft, borderRight, borderTop, muted, pressed, ref, restProps, scheme, selected, shadow, t0, t1, t2, t3;
|
|
995
|
+
$[0] === props ? (asProp = $[1], border = $[2], borderBottom = $[3], borderLeft = $[4], borderRight = $[5], borderTop = $[6], muted = $[7], pressed = $[8], ref = $[9], restProps = $[10], scheme = $[11], selected = $[12], shadow = $[13], t0 = $[14], t1 = $[15], t2 = $[16], t3 = $[17]) : ({__unstable_checkered: t0, __unstable_focusRing: t1, as: asProp, border, borderTop, borderRight, borderBottom, borderLeft, muted, pressed, radius: t2, ref, scheme, selected, shadow, tone: t3, ...restProps} = props, $[0] = props, $[1] = asProp, $[2] = border, $[3] = borderBottom, $[4] = borderLeft, $[5] = borderRight, $[6] = borderTop, $[7] = muted, $[8] = pressed, $[9] = ref, $[10] = restProps, $[11] = scheme, $[12] = selected, $[13] = shadow, $[14] = t0, $[15] = t1, $[16] = t2, $[17] = t3);
|
|
998
996
|
let checkered = t0 !== void 0 && t0, focusRing = t1 !== void 0 && t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp, t4 = typeof as == "string" ? as : void 0, t5 = rootTheme.scheme, t6;
|
|
999
|
-
$[
|
|
997
|
+
$[18] === border ? t6 = $[19] : (t6 = _getArrayProp(border), $[18] = border, $[19] = t6);
|
|
1000
998
|
let t7;
|
|
1001
|
-
$[
|
|
999
|
+
$[20] === borderTop ? t7 = $[21] : (t7 = _getArrayProp(borderTop), $[20] = borderTop, $[21] = t7);
|
|
1002
1000
|
let t8;
|
|
1003
|
-
$[
|
|
1001
|
+
$[22] === borderRight ? t8 = $[23] : (t8 = _getArrayProp(borderRight), $[22] = borderRight, $[23] = t8);
|
|
1004
1002
|
let t9;
|
|
1005
|
-
$[
|
|
1003
|
+
$[24] === borderBottom ? t9 = $[25] : (t9 = _getArrayProp(borderBottom), $[24] = borderBottom, $[25] = t9);
|
|
1006
1004
|
let t10;
|
|
1007
|
-
$[
|
|
1005
|
+
$[26] === borderLeft ? t10 = $[27] : (t10 = _getArrayProp(borderLeft), $[26] = borderLeft, $[27] = t10);
|
|
1008
1006
|
let t11;
|
|
1009
|
-
$[
|
|
1007
|
+
$[28] === radius ? t11 = $[29] : (t11 = _getArrayProp(radius), $[28] = radius, $[29] = t11);
|
|
1010
1008
|
let t12;
|
|
1011
|
-
$[
|
|
1009
|
+
$[30] === shadow ? t12 = $[31] : (t12 = _getArrayProp(shadow), $[30] = shadow, $[31] = t12);
|
|
1012
1010
|
let t13 = checkered ? "" : void 0, t14 = pressed ? "" : void 0, t15 = selected ? "" : void 0, t16;
|
|
1013
|
-
$[
|
|
1011
|
+
$[32] !== as || $[33] !== checkered || $[34] !== focusRing || $[35] !== muted || $[36] !== ref || $[37] !== restProps || $[38] !== rootTheme.scheme || $[39] !== selected || $[40] !== t10 || $[41] !== t11 || $[42] !== t12 || $[43] !== t13 || $[44] !== t14 || $[45] !== t15 || $[46] !== t4 || $[47] !== t6 || $[48] !== t7 || $[49] !== t8 || $[50] !== t9 || $[51] !== tone ? (t16 = /* @__PURE__ */ jsx(StyledCard, {
|
|
1014
1012
|
"data-as": t4,
|
|
1015
1013
|
"data-scheme": t5,
|
|
1016
1014
|
"data-ui": "Card",
|
|
@@ -1033,17 +1031,17 @@ const StyledCard = /* @__PURE__ */ styled(Box).withConfig({
|
|
|
1033
1031
|
forwardedAs: as,
|
|
1034
1032
|
ref,
|
|
1035
1033
|
selected
|
|
1036
|
-
}), $[
|
|
1034
|
+
}), $[32] = as, $[33] = checkered, $[34] = focusRing, $[35] = muted, $[36] = ref, $[37] = restProps, $[38] = rootTheme.scheme, $[39] = selected, $[40] = t10, $[41] = t11, $[42] = t12, $[43] = t13, $[44] = t14, $[45] = t15, $[46] = t4, $[47] = t6, $[48] = t7, $[49] = t8, $[50] = t9, $[51] = tone, $[52] = t16) : t16 = $[52];
|
|
1037
1035
|
let t17;
|
|
1038
|
-
return $[
|
|
1036
|
+
return $[53] !== scheme || $[54] !== t16 || $[55] !== tone ? (t17 = /* @__PURE__ */ jsx(ThemeColorProvider, {
|
|
1039
1037
|
scheme,
|
|
1040
1038
|
tone,
|
|
1041
1039
|
children: t16
|
|
1042
|
-
}), $[
|
|
1043
|
-
}
|
|
1040
|
+
}), $[53] = scheme, $[54] = t16, $[55] = tone, $[56] = t17) : t17 = $[56], t17;
|
|
1041
|
+
}, _elementSizeObserver = _createElementSizeObserver();
|
|
1044
1042
|
function _createElementRectValueListener() {
|
|
1045
1043
|
return { subscribe(element, subscriber) {
|
|
1046
|
-
let resizeObserver = new
|
|
1044
|
+
let resizeObserver = new ResizeObserver(([entry]) => {
|
|
1047
1045
|
subscriber({
|
|
1048
1046
|
_contentRect: entry.contentRect,
|
|
1049
1047
|
border: {
|
|
@@ -1204,6 +1202,56 @@ const origin = {
|
|
|
1204
1202
|
function clamp(num, min, max) {
|
|
1205
1203
|
return Math.min(Math.max(num, min), max);
|
|
1206
1204
|
}
|
|
1205
|
+
/**
|
|
1206
|
+
* MIT License
|
|
1207
|
+
*
|
|
1208
|
+
* Copyright (c) 2024 Motion One
|
|
1209
|
+
*
|
|
1210
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1211
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
1212
|
+
* in the Software without restriction, including without limitation the rights
|
|
1213
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1214
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
1215
|
+
* furnished to do so, subject to the following conditions:
|
|
1216
|
+
*
|
|
1217
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
1218
|
+
* copies or substantial portions of the Software.
|
|
1219
|
+
*
|
|
1220
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1221
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1222
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1223
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1224
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1225
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1226
|
+
* SOFTWARE.
|
|
1227
|
+
*/
|
|
1228
|
+
/**
|
|
1229
|
+
* Animated version of React's `Activity` that defers `mode="hidden"` until
|
|
1230
|
+
* child exit animations have finished.
|
|
1231
|
+
*
|
|
1232
|
+
* @internal
|
|
1233
|
+
*/
|
|
1234
|
+
function AnimateActivity(t0) {
|
|
1235
|
+
let $ = c(9), { mode: modeFromProps, layoutMode, children } = t0, [mode, setMode] = useState(modeFromProps), isPresent = modeFromProps === "visible";
|
|
1236
|
+
if (isPresent && mode !== "visible") return setMode("visible"), null;
|
|
1237
|
+
let t1;
|
|
1238
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => setMode("hidden"), $[0] = t1) : t1 = $[0];
|
|
1239
|
+
let onExitComplete = t1;
|
|
1240
|
+
invariant(!!Activity, "Activity component not found - upgrade to React 19.2.0 or higher");
|
|
1241
|
+
let t2 = isPresent ? void 0 : onExitComplete, t3 = layoutMode === "pop" ? "popLayout" : "sync", t4 = children, t5;
|
|
1242
|
+
$[1] !== isPresent || $[2] !== t2 || $[3] !== t3 || $[4] !== t4 ? (t5 = /* @__PURE__ */ jsx(PresenceChild, {
|
|
1243
|
+
isPresent,
|
|
1244
|
+
onExitComplete: t2,
|
|
1245
|
+
presenceAffectsLayout: !1,
|
|
1246
|
+
mode: t3,
|
|
1247
|
+
children: t4
|
|
1248
|
+
}), $[1] = isPresent, $[2] = t2, $[3] = t3, $[4] = t4, $[5] = t5) : t5 = $[5];
|
|
1249
|
+
let t6;
|
|
1250
|
+
return $[6] !== mode || $[7] !== t5 ? (t6 = /* @__PURE__ */ jsx(Activity, {
|
|
1251
|
+
mode,
|
|
1252
|
+
children: t5
|
|
1253
|
+
}), $[6] = mode, $[7] = t5, $[8] = t6) : t6 = $[8], t6;
|
|
1254
|
+
}
|
|
1207
1255
|
function isRecord(value) {
|
|
1208
1256
|
return !!(value && typeof value == "object" && !Array.isArray(value));
|
|
1209
1257
|
}
|
|
@@ -1452,18 +1500,18 @@ function compileCommands(cmds) {
|
|
|
1452
1500
|
}
|
|
1453
1501
|
const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
1454
1502
|
displayName: "StyledArrow",
|
|
1455
|
-
componentId: "sc-
|
|
1503
|
+
componentId: "sc-gl2lu8-0"
|
|
1456
1504
|
})(({ $w: w }) => css`position:absolute;width:${w}px;height:${w}px;:empty + &{display:none;}& > svg{display:block;line-height:0;transform-origin:${w / 2}px ${w / 2}px;}[data-placement^='top'] > &{bottom:-${w}px;& > svg{transform:rotate(0);}}[data-placement^='right'] > &{left:-${w}px;& > svg{transform:rotate(90deg);}}[data-placement^='left'] > &{right:-${w}px;& > svg{transform:rotate(-90deg);}}[data-placement^='bottom'] > &{top:-${w}px;& > svg{transform:rotate(180deg);}}`), StrokePath = styled.path.withConfig({
|
|
1457
1505
|
displayName: "StrokePath",
|
|
1458
|
-
componentId: "sc-
|
|
1506
|
+
componentId: "sc-gl2lu8-1"
|
|
1459
1507
|
})`stroke:var(--card-shadow-outline-color);`, ShapePath = styled.path.withConfig({
|
|
1460
1508
|
displayName: "ShapePath",
|
|
1461
|
-
componentId: "sc-
|
|
1462
|
-
})`fill:var(--card-bg-color);`, Arrow =
|
|
1463
|
-
let $ = c(
|
|
1464
|
-
$[0] === props ? (h = $[1],
|
|
1509
|
+
componentId: "sc-gl2lu8-2"
|
|
1510
|
+
})`fill:var(--card-bg-color);`, Arrow = function Arrow(props) {
|
|
1511
|
+
let $ = c(30), h, ref, restProps, t0, w;
|
|
1512
|
+
$[0] === props ? (h = $[1], ref = $[2], restProps = $[3], t0 = $[4], w = $[5]) : ({width: w, height: h, radius: t0, ref, ...restProps} = props, $[0] = props, $[1] = h, $[2] = ref, $[3] = restProps, $[4] = t0, $[5] = w);
|
|
1465
1513
|
let radius = t0 === void 0 ? 0 : t0, { card } = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, t1;
|
|
1466
|
-
$[
|
|
1514
|
+
$[6] !== center || $[7] !== h || $[8] !== radius || $[9] !== w ? (t1 = compileCommands(getRoundedCommands([
|
|
1467
1515
|
{
|
|
1468
1516
|
x: 0,
|
|
1469
1517
|
y: 0
|
|
@@ -1487,9 +1535,9 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1487
1535
|
x: w,
|
|
1488
1536
|
y: 0
|
|
1489
1537
|
}
|
|
1490
|
-
])), $[
|
|
1538
|
+
])), $[6] = center, $[7] = h, $[8] = radius, $[9] = w, $[10] = t1) : t1 = $[10];
|
|
1491
1539
|
let path = t1, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`, t2 = `0 0 ${w} ${w}`, t3;
|
|
1492
|
-
$[
|
|
1540
|
+
$[11] !== strokeWidth || $[12] !== w ? (t3 = /* @__PURE__ */ jsx("mask", {
|
|
1493
1541
|
id: "stroke-mask",
|
|
1494
1542
|
children: /* @__PURE__ */ jsx("rect", {
|
|
1495
1543
|
x: 0,
|
|
@@ -1498,17 +1546,17 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1498
1546
|
height: w,
|
|
1499
1547
|
fill: "white"
|
|
1500
1548
|
})
|
|
1501
|
-
}), $[
|
|
1549
|
+
}), $[11] = strokeWidth, $[12] = w, $[13] = t3) : t3 = $[13];
|
|
1502
1550
|
let t4 = strokeWidth * 2, t5;
|
|
1503
|
-
$[
|
|
1551
|
+
$[14] !== strokePath || $[15] !== t4 ? (t5 = /* @__PURE__ */ jsx(StrokePath, {
|
|
1504
1552
|
d: strokePath,
|
|
1505
1553
|
mask: "url(#stroke-mask)",
|
|
1506
1554
|
strokeWidth: t4
|
|
1507
|
-
}), $[
|
|
1555
|
+
}), $[14] = strokePath, $[15] = t4, $[16] = t5) : t5 = $[16];
|
|
1508
1556
|
let t6;
|
|
1509
|
-
$[
|
|
1557
|
+
$[17] === fillPath ? t6 = $[18] : (t6 = /* @__PURE__ */ jsx(ShapePath, { d: fillPath }), $[17] = fillPath, $[18] = t6);
|
|
1510
1558
|
let t7;
|
|
1511
|
-
$[
|
|
1559
|
+
$[19] !== t2 || $[20] !== t3 || $[21] !== t5 || $[22] !== t6 || $[23] !== w ? (t7 = /* @__PURE__ */ jsxs("svg", {
|
|
1512
1560
|
width: w,
|
|
1513
1561
|
height: w,
|
|
1514
1562
|
viewBox: t2,
|
|
@@ -1517,25 +1565,25 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1517
1565
|
t5,
|
|
1518
1566
|
t6
|
|
1519
1567
|
]
|
|
1520
|
-
}), $[
|
|
1568
|
+
}), $[19] = t2, $[20] = t3, $[21] = t5, $[22] = t6, $[23] = w, $[24] = t7) : t7 = $[24];
|
|
1521
1569
|
let t8;
|
|
1522
|
-
return $[
|
|
1570
|
+
return $[25] !== ref || $[26] !== restProps || $[27] !== t7 || $[28] !== w ? (t8 = /* @__PURE__ */ jsx(StyledArrow, {
|
|
1523
1571
|
...restProps,
|
|
1524
1572
|
$w: w,
|
|
1525
1573
|
ref,
|
|
1526
1574
|
children: t7
|
|
1527
|
-
}), $[
|
|
1528
|
-
}
|
|
1575
|
+
}), $[25] = ref, $[26] = restProps, $[27] = t7, $[28] = w, $[29] = t8) : t8 = $[29], t8;
|
|
1576
|
+
}, MotionCard$1 = styled(motion.create(Card)).withConfig({
|
|
1529
1577
|
displayName: "MotionCard",
|
|
1530
|
-
componentId: "sc-
|
|
1578
|
+
componentId: "sc-go15t4-0"
|
|
1531
1579
|
})`&:not([hidden]){display:flex;}flex-direction:column;width:max-content;min-width:min-content;will-change:transform;`, MotionFlex$1 = styled(motion.create(Flex)).withConfig({
|
|
1532
1580
|
displayName: "MotionFlex",
|
|
1533
|
-
componentId: "sc-
|
|
1534
|
-
})`will-change:opacity;`, PopoverCard =
|
|
1535
|
-
let $ = c(
|
|
1536
|
-
$[0] === props ? (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13],
|
|
1581
|
+
componentId: "sc-go15t4-1"
|
|
1582
|
+
})`will-change:opacity;`, PopoverCard = function PopoverCard(props) {
|
|
1583
|
+
let $ = c(67), animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, ref, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
|
|
1584
|
+
$[0] === props ? (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], ref = $[14], restProps = $[15], scheme = $[16], shadow = $[17], strategy = $[18], style = $[19], tone = $[20], width = $[21], xProp = $[22], yProp = $[23]) : ({__unstable_margins: marginsProp, animate, arrow, arrowRef, arrowX, arrowY, children, padding, placement, originX, originY, overflow, radius, ref, scheme, shadow, strategy, style, tone, width, x: xProp, y: yProp, ...restProps} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = ref, $[15] = restProps, $[16] = scheme, $[17] = shadow, $[18] = strategy, $[19] = style, $[20] = tone, $[21] = width, $[22] = xProp, $[23] = yProp);
|
|
1537
1585
|
let { zIndex } = useLayer(), margins = marginsProp || DEFAULT_POPOVER_MARGINS, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], t0 = animate ? "transform" : void 0, t1;
|
|
1538
|
-
$[
|
|
1586
|
+
$[24] !== originX || $[25] !== originY || $[26] !== strategy || $[27] !== style || $[28] !== t0 || $[29] !== width || $[30] !== x || $[31] !== y || $[32] !== zIndex ? (t1 = {
|
|
1539
1587
|
left: x,
|
|
1540
1588
|
originX,
|
|
1541
1589
|
originY,
|
|
@@ -1545,29 +1593,29 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1545
1593
|
zIndex,
|
|
1546
1594
|
willChange: t0,
|
|
1547
1595
|
...style
|
|
1548
|
-
}, $[
|
|
1596
|
+
}, $[24] = originX, $[25] = originY, $[26] = strategy, $[27] = style, $[28] = t0, $[29] = width, $[30] = x, $[31] = y, $[32] = zIndex, $[33] = t1) : t1 = $[33];
|
|
1549
1597
|
let rootStyle = t1, t2 = arrowX === null ? void 0 : arrowX, t3 = arrowY === null ? void 0 : arrowY, t4;
|
|
1550
|
-
$[
|
|
1598
|
+
$[34] !== t2 || $[35] !== t3 ? (t4 = {
|
|
1551
1599
|
left: t2,
|
|
1552
1600
|
top: t3,
|
|
1553
1601
|
right: void 0,
|
|
1554
1602
|
bottom: void 0
|
|
1555
|
-
}, $[
|
|
1603
|
+
}, $[34] = t2, $[35] = t3, $[36] = t4) : t4 = $[36];
|
|
1556
1604
|
let arrowStyle = t4, t5 = restProps, t6;
|
|
1557
|
-
$[
|
|
1605
|
+
$[37] === animate ? t6 = $[38] : (t6 = animate ? ["hidden", "initial"] : void 0, $[37] = animate, $[38] = t6);
|
|
1558
1606
|
let t7;
|
|
1559
|
-
$[
|
|
1607
|
+
$[39] === animate ? t7 = $[40] : (t7 = animate ? ["visible", "scaleIn"] : void 0, $[39] = animate, $[40] = t7);
|
|
1560
1608
|
let t8;
|
|
1561
|
-
$[
|
|
1609
|
+
$[41] === animate ? t8 = $[42] : (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[41] = animate, $[42] = t8);
|
|
1562
1610
|
let t9;
|
|
1563
|
-
$[
|
|
1611
|
+
$[43] !== children || $[44] !== padding ? (t9 = /* @__PURE__ */ jsx(Flex, {
|
|
1564
1612
|
direction: "column",
|
|
1565
1613
|
flex: 1,
|
|
1566
1614
|
padding,
|
|
1567
1615
|
children
|
|
1568
|
-
}), $[
|
|
1616
|
+
}), $[43] = children, $[44] = padding, $[45] = t9) : t9 = $[45];
|
|
1569
1617
|
let t10;
|
|
1570
|
-
$[
|
|
1618
|
+
$[46] !== overflow || $[47] !== t9 ? (t10 = /* @__PURE__ */ jsx(MotionFlex$1, {
|
|
1571
1619
|
"data-ui": "Popover__wrapper",
|
|
1572
1620
|
direction: "column",
|
|
1573
1621
|
flex: 1,
|
|
@@ -1575,17 +1623,17 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1575
1623
|
variants: POPOVER_MOTION_PROPS.children,
|
|
1576
1624
|
transition: POPOVER_MOTION_PROPS.transition,
|
|
1577
1625
|
children: t9
|
|
1578
|
-
}), $[
|
|
1626
|
+
}), $[46] = overflow, $[47] = t9, $[48] = t10) : t10 = $[48];
|
|
1579
1627
|
let t11;
|
|
1580
|
-
$[
|
|
1628
|
+
$[49] !== arrow || $[50] !== arrowRef || $[51] !== arrowStyle ? (t11 = arrow && /* @__PURE__ */ jsx(Arrow, {
|
|
1581
1629
|
ref: arrowRef,
|
|
1582
1630
|
style: arrowStyle,
|
|
1583
1631
|
width: 19,
|
|
1584
1632
|
height: 8,
|
|
1585
1633
|
radius: 2
|
|
1586
|
-
}), $[
|
|
1634
|
+
}), $[49] = arrow, $[50] = arrowRef, $[51] = arrowStyle, $[52] = t11) : t11 = $[52];
|
|
1587
1635
|
let t12;
|
|
1588
|
-
return $[
|
|
1636
|
+
return $[53] !== placement || $[54] !== radius || $[55] !== ref || $[56] !== rootStyle || $[57] !== scheme || $[58] !== shadow || $[59] !== t10 || $[60] !== t11 || $[61] !== t5 || $[62] !== t6 || $[63] !== t7 || $[64] !== t8 || $[65] !== tone ? (t12 = /* @__PURE__ */ jsxs(MotionCard$1, {
|
|
1589
1637
|
"data-ui": "Popover",
|
|
1590
1638
|
...t5,
|
|
1591
1639
|
"data-placement": placement,
|
|
@@ -1602,8 +1650,8 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1602
1650
|
animate: t7,
|
|
1603
1651
|
exit: t8,
|
|
1604
1652
|
children: [t10, t11]
|
|
1605
|
-
}), $[
|
|
1606
|
-
}
|
|
1653
|
+
}), $[53] = placement, $[54] = radius, $[55] = ref, $[56] = rootStyle, $[57] = scheme, $[58] = shadow, $[59] = t10, $[60] = t11, $[61] = t5, $[62] = t6, $[63] = t7, $[64] = t8, $[65] = tone, $[66] = t12) : t12 = $[66], t12;
|
|
1654
|
+
}, ViewportOverlay = () => {
|
|
1607
1655
|
let $ = c(2), { zIndex } = useLayer(), t0;
|
|
1608
1656
|
return $[0] === zIndex ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx("div", { style: {
|
|
1609
1657
|
height: "100vh",
|
|
@@ -1612,41 +1660,41 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1612
1660
|
width: "100vw",
|
|
1613
1661
|
zIndex
|
|
1614
1662
|
} }), $[0] = zIndex, $[1] = t0), t0;
|
|
1615
|
-
}, Popover =
|
|
1616
|
-
let $ = c(
|
|
1663
|
+
}, Popover = function Popover(props) {
|
|
1664
|
+
let $ = c(126), { container, layer } = useTheme_v2(), boundaryElementContext = useBoundaryElement(), _fallbackPlacements, _floatingBoundary, _referenceBoundary, _zOffsetProp, childProp, content, disabled, forwardedRef, matchReferenceWidth, modal, open, paddingProp, portal, referenceElement, restProps, scheme, t0, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8, t9, updateRef;
|
|
1617
1665
|
if ($[0] !== props) {
|
|
1618
|
-
let { __unstable_margins: t12, animate: t13, arrow: t14, children: t15, constrainSize: t16, content: t17, disabled: t18, fallbackPlacements: t19, matchReferenceWidth: t20, floatingBoundary: t21, modal: t22, onActivate, open: t23, overflow: t24, padding: t25, placement: t26, placementStrategy: t27, portal: t28, preventOverflow: t29, radius: t30,
|
|
1619
|
-
t0 = t12, t1 = t13, t2 = t14, childProp = t15, t3 = t16, content = t17, disabled = t18, _fallbackPlacements = t19, matchReferenceWidth = t20, _floatingBoundary = t21, modal = t22, open = t23, t4 = t24, paddingProp = t25, t5 = t26, t6 = t27, portal = t28, t7 = t29, t8 = t30,
|
|
1620
|
-
} else _fallbackPlacements = $[1], _floatingBoundary = $[2], _referenceBoundary = $[3], _zOffsetProp = $[4], childProp = $[5], content = $[6], disabled = $[7],
|
|
1666
|
+
let { __unstable_margins: t12, animate: t13, arrow: t14, children: t15, constrainSize: t16, content: t17, disabled: t18, fallbackPlacements: t19, matchReferenceWidth: t20, floatingBoundary: t21, modal: t22, onActivate, open: t23, overflow: t24, padding: t25, placement: t26, placementStrategy: t27, portal: t28, preventOverflow: t29, radius: t30, ref: t31, referenceBoundary: t32, referenceElement: t33, scheme: t34, shadow: t35, tone: t36, width: t37, zOffset: t38, updateRef: t39, ...t40 } = props;
|
|
1667
|
+
t0 = t12, t1 = t13, t2 = t14, childProp = t15, t3 = t16, content = t17, disabled = t18, _fallbackPlacements = t19, matchReferenceWidth = t20, _floatingBoundary = t21, modal = t22, open = t23, t4 = t24, paddingProp = t25, t5 = t26, t6 = t27, portal = t28, t7 = t29, t8 = t30, forwardedRef = t31, _referenceBoundary = t32, referenceElement = t33, scheme = t34, t9 = t35, t10 = t36, t11 = t37, _zOffsetProp = t38, updateRef = t39, restProps = t40, $[0] = props, $[1] = _fallbackPlacements, $[2] = _floatingBoundary, $[3] = _referenceBoundary, $[4] = _zOffsetProp, $[5] = childProp, $[6] = content, $[7] = disabled, $[8] = forwardedRef, $[9] = matchReferenceWidth, $[10] = modal, $[11] = open, $[12] = paddingProp, $[13] = portal, $[14] = referenceElement, $[15] = restProps, $[16] = scheme, $[17] = t0, $[18] = t1, $[19] = t10, $[20] = t11, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = t6, $[26] = t7, $[27] = t8, $[28] = t9, $[29] = updateRef;
|
|
1668
|
+
} else _fallbackPlacements = $[1], _floatingBoundary = $[2], _referenceBoundary = $[3], _zOffsetProp = $[4], childProp = $[5], content = $[6], disabled = $[7], forwardedRef = $[8], matchReferenceWidth = $[9], modal = $[10], open = $[11], paddingProp = $[12], portal = $[13], referenceElement = $[14], restProps = $[15], scheme = $[16], t0 = $[17], t1 = $[18], t10 = $[19], t11 = $[20], t2 = $[21], t3 = $[22], t4 = $[23], t5 = $[24], t6 = $[25], t7 = $[26], t8 = $[27], t9 = $[28], updateRef = $[29];
|
|
1621
1669
|
let margins = t0 === void 0 ? DEFAULT_POPOVER_MARGINS : t0, _animate = t1 !== void 0 && t1, arrowProp = t2 !== void 0 && t2, constrainSize = t3 !== void 0 && t3, overflow = t4 === void 0 ? "hidden" : t4, placementProp = t5 === void 0 ? "bottom" : t5, placementStrategy = t6 === void 0 ? "flip" : t6, preventOverflow = t7 === void 0 || t7, radiusProp = t8 === void 0 ? 3 : t8, shadowProp = t9 === void 0 ? 3 : t9, tone = t10 === void 0 ? "inherit" : t10, widthProp = t11 === void 0 ? "auto" : t11, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"], floatingBoundary = _floatingBoundary ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? boundaryElementContext.element, boundaryElement = boundaryElementContext.element ?? floatingBoundary, zOffsetProp = _zOffsetProp ?? layer.popover.zOffset, animate = !usePrefersReducedMotion() && _animate, boundarySize = useElementSize(boundaryElement)?.border, t12;
|
|
1622
|
-
$[
|
|
1670
|
+
$[30] === paddingProp ? t12 = $[31] : (t12 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t12);
|
|
1623
1671
|
let padding = t12, t13;
|
|
1624
|
-
$[
|
|
1672
|
+
$[32] === radiusProp ? t13 = $[33] : (t13 = _getArrayProp(radiusProp), $[32] = radiusProp, $[33] = t13);
|
|
1625
1673
|
let radius = t13, t14;
|
|
1626
|
-
$[
|
|
1674
|
+
$[34] === shadowProp ? t14 = $[35] : (t14 = _getArrayProp(shadowProp), $[34] = shadowProp, $[35] = t14);
|
|
1627
1675
|
let shadow = t14, widthArrayProp = _getArrayProp(widthProp), t15;
|
|
1628
|
-
$[
|
|
1676
|
+
$[36] === zOffsetProp ? t15 = $[37] : (t15 = _getArrayProp(zOffsetProp), $[36] = zOffsetProp, $[37] = t15);
|
|
1629
1677
|
let zOffset = t15, ref = useRef(null), arrowRef = useRef(null), t16;
|
|
1630
|
-
$[
|
|
1678
|
+
$[38] === Symbol.for("react.memo_cache_sentinel") ? (t16 = () => ref.current, $[38] = t16) : t16 = $[38], useImperativeHandle(forwardedRef, t16);
|
|
1631
1679
|
let mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : void 0, width = calcCurrentWidth({
|
|
1632
1680
|
container,
|
|
1633
1681
|
mediaIndex,
|
|
1634
1682
|
width: widthArrayProp
|
|
1635
1683
|
}), widthRef = useRef(width), t17, t18;
|
|
1636
|
-
$[
|
|
1684
|
+
$[39] === width ? (t17 = $[40], t18 = $[41]) : (t17 = () => {
|
|
1637
1685
|
widthRef.current = width;
|
|
1638
|
-
}, t18 = [width], $[
|
|
1686
|
+
}, t18 = [width], $[39] = width, $[40] = t17, $[41] = t18), useEffect(t17, t18);
|
|
1639
1687
|
let t19;
|
|
1640
|
-
$[
|
|
1688
|
+
$[42] !== boundaryWidth || $[43] !== width ? (t19 = calcMaxWidth({
|
|
1641
1689
|
boundaryWidth,
|
|
1642
1690
|
currentWidth: width
|
|
1643
|
-
}), $[
|
|
1691
|
+
}), $[42] = boundaryWidth, $[43] = width, $[44] = t19) : t19 = $[44];
|
|
1644
1692
|
let maxWidth = t19, maxWidthRef = useRef(maxWidth), t20, t21;
|
|
1645
|
-
$[
|
|
1693
|
+
$[45] === maxWidth ? (t20 = $[46], t21 = $[47]) : (t20 = () => {
|
|
1646
1694
|
maxWidthRef.current = maxWidth;
|
|
1647
|
-
}, t21 = [maxWidth], $[
|
|
1695
|
+
}, t21 = [maxWidth], $[45] = maxWidth, $[46] = t20, $[47] = t21), useEffect(t20, t21);
|
|
1648
1696
|
let referenceWidthRef = useRef(void 0), t22, t23;
|
|
1649
|
-
$[
|
|
1697
|
+
$[48] !== matchReferenceWidth || $[49] !== maxWidth || $[50] !== open || $[51] !== width ? (t22 = () => {
|
|
1650
1698
|
let floatingElement = ref.current;
|
|
1651
1699
|
if (!open || !floatingElement) return;
|
|
1652
1700
|
let referenceWidth = referenceWidthRef.current;
|
|
@@ -1656,9 +1704,9 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1656
1704
|
matchReferenceWidth,
|
|
1657
1705
|
maxWidth,
|
|
1658
1706
|
open
|
|
1659
|
-
], $[
|
|
1707
|
+
], $[48] = matchReferenceWidth, $[49] = maxWidth, $[50] = open, $[51] = width, $[52] = t22, $[53] = t23) : (t22 = $[52], t23 = $[53]), useEffect(t22, t23);
|
|
1660
1708
|
let [referenceWidth_0, setReferenceWidth] = useState(void 0), t24;
|
|
1661
|
-
$[
|
|
1709
|
+
$[54] !== animate || $[55] !== arrowProp || $[56] !== constrainSize || $[57] !== fallbackPlacements || $[58] !== floatingBoundary || $[59] !== margins || $[60] !== matchReferenceWidth || $[61] !== placementProp || $[62] !== placementStrategy || $[63] !== preventOverflow || $[64] !== referenceBoundary ? (t24 = {
|
|
1662
1710
|
animate,
|
|
1663
1711
|
arrowProp,
|
|
1664
1712
|
arrowRef,
|
|
@@ -1676,28 +1724,28 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1676
1724
|
rootBoundary: "viewport",
|
|
1677
1725
|
setReferenceWidth,
|
|
1678
1726
|
widthRef
|
|
1679
|
-
}, $[
|
|
1727
|
+
}, $[54] = animate, $[55] = arrowProp, $[56] = constrainSize, $[57] = fallbackPlacements, $[58] = floatingBoundary, $[59] = margins, $[60] = matchReferenceWidth, $[61] = placementProp, $[62] = placementStrategy, $[63] = preventOverflow, $[64] = referenceBoundary, $[65] = t24) : t24 = $[65];
|
|
1680
1728
|
let middleware = useMiddleware$1(t24), t25;
|
|
1681
|
-
$[
|
|
1729
|
+
$[66] === referenceElement ? t25 = $[67] : (t25 = referenceElement ? { reference: referenceElement } : void 0, $[66] = referenceElement, $[67] = t25);
|
|
1682
1730
|
let t26;
|
|
1683
|
-
$[
|
|
1731
|
+
$[68] !== middleware || $[69] !== placementProp || $[70] !== t25 ? (t26 = {
|
|
1684
1732
|
middleware,
|
|
1685
1733
|
placement: placementProp,
|
|
1686
1734
|
whileElementsMounted: autoUpdate,
|
|
1687
1735
|
elements: t25
|
|
1688
|
-
}, $[
|
|
1736
|
+
}, $[68] = middleware, $[69] = placementProp, $[70] = t25, $[71] = t26) : t26 = $[71];
|
|
1689
1737
|
let { x, y, middlewareData, placement, refs, strategy, update } = useFloating(t26), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, t27;
|
|
1690
|
-
$[
|
|
1738
|
+
$[72] === Symbol.for("react.memo_cache_sentinel") ? (t27 = (arrowEl) => {
|
|
1691
1739
|
arrowRef.current = arrowEl;
|
|
1692
|
-
}, $[
|
|
1740
|
+
}, $[72] = t27) : t27 = $[72];
|
|
1693
1741
|
let setArrow = t27, t28;
|
|
1694
|
-
$[
|
|
1742
|
+
$[73] === refs ? t28 = $[74] : (t28 = (node) => {
|
|
1695
1743
|
ref.current = node, refs.setFloating(node);
|
|
1696
|
-
}, $[
|
|
1744
|
+
}, $[73] = refs, $[74] = t28);
|
|
1697
1745
|
let setFloating = t28, t29;
|
|
1698
|
-
$[
|
|
1746
|
+
$[75] === childProp ? t29 = $[76] : (t29 = childProp ? getElementRef(childProp) : null, $[75] = childProp, $[76] = t29);
|
|
1699
1747
|
let t30;
|
|
1700
|
-
$[
|
|
1748
|
+
$[77] === refs.reference.current ? t30 = $[78] : (t30 = () => refs.reference.current, $[77] = refs.reference.current, $[78] = t30), useImperativeHandle(t29, t30);
|
|
1701
1749
|
let t31;
|
|
1702
1750
|
bb0: {
|
|
1703
1751
|
if (referenceElement) {
|
|
@@ -1709,17 +1757,17 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1709
1757
|
break bb0;
|
|
1710
1758
|
}
|
|
1711
1759
|
let t32;
|
|
1712
|
-
$[
|
|
1760
|
+
$[79] !== childProp || $[80] !== refs.setReference ? (t32 = cloneElement(childProp, { ref: refs.setReference }), $[79] = childProp, $[80] = refs.setReference, $[81] = t32) : t32 = $[81], t31 = t32;
|
|
1713
1761
|
}
|
|
1714
1762
|
let child = t31, t32, t33;
|
|
1715
|
-
if ($[
|
|
1763
|
+
if ($[82] === update ? (t32 = $[83], t33 = $[84]) : (t32 = () => update, t33 = [update], $[82] = update, $[83] = t32, $[84] = t33), useImperativeHandle(updateRef, t32, t33), disabled) {
|
|
1716
1764
|
let t34;
|
|
1717
|
-
return $[
|
|
1765
|
+
return $[85] === childProp ? t34 = $[86] : (t34 = childProp || /* @__PURE__ */ jsx(Fragment$1, {}), $[85] = childProp, $[86] = t34), t34;
|
|
1718
1766
|
}
|
|
1719
1767
|
let t34;
|
|
1720
|
-
$[
|
|
1768
|
+
$[87] === modal ? t34 = $[88] : (t34 = modal && /* @__PURE__ */ jsx(ViewportOverlay, {}), $[87] = modal, $[88] = t34);
|
|
1721
1769
|
let t35 = matchReferenceWidth ? referenceWidth_0 : width, t36;
|
|
1722
|
-
$[
|
|
1770
|
+
$[89] !== animate || $[90] !== arrowProp || $[91] !== arrowX || $[92] !== arrowY || $[93] !== content || $[94] !== margins || $[95] !== originX || $[96] !== originY || $[97] !== overflow || $[98] !== padding || $[99] !== placement || $[100] !== radius || $[101] !== referenceHidden || $[102] !== restProps || $[103] !== scheme || $[104] !== setFloating || $[105] !== shadow || $[106] !== strategy || $[107] !== t35 || $[108] !== tone || $[109] !== x || $[110] !== y ? (t36 = /* @__PURE__ */ jsx(PopoverCard, {
|
|
1723
1771
|
...restProps,
|
|
1724
1772
|
__unstable_margins: margins,
|
|
1725
1773
|
animate,
|
|
@@ -1743,22 +1791,29 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1743
1791
|
x,
|
|
1744
1792
|
y,
|
|
1745
1793
|
children: content
|
|
1746
|
-
}), $[
|
|
1794
|
+
}), $[89] = animate, $[90] = arrowProp, $[91] = arrowX, $[92] = arrowY, $[93] = content, $[94] = margins, $[95] = originX, $[96] = originY, $[97] = overflow, $[98] = padding, $[99] = placement, $[100] = radius, $[101] = referenceHidden, $[102] = restProps, $[103] = scheme, $[104] = setFloating, $[105] = shadow, $[106] = strategy, $[107] = t35, $[108] = tone, $[109] = x, $[110] = y, $[111] = t36) : t36 = $[111];
|
|
1747
1795
|
let t37;
|
|
1748
|
-
$[
|
|
1796
|
+
$[112] !== t34 || $[113] !== t36 || $[114] !== zOffset ? (t37 = /* @__PURE__ */ jsxs(LayerProvider, {
|
|
1749
1797
|
zOffset,
|
|
1750
1798
|
children: [t34, t36]
|
|
1751
|
-
}), $[
|
|
1799
|
+
}), $[112] = t34, $[113] = t36, $[114] = zOffset, $[115] = t37) : t37 = $[115];
|
|
1752
1800
|
let popover = t37, t38;
|
|
1753
|
-
$[
|
|
1801
|
+
$[116] !== popover || $[117] !== portal ? (t38 = portal ? /* @__PURE__ */ jsx(Portal, {
|
|
1754
1802
|
__unstable_name: typeof portal == "string" ? portal : void 0,
|
|
1755
1803
|
children: popover
|
|
1756
|
-
}) : popover
|
|
1757
|
-
let
|
|
1758
|
-
$[119] !== animate || $[120] !==
|
|
1804
|
+
}) : popover, $[116] = popover, $[117] = portal, $[118] = t38) : t38 = $[118];
|
|
1805
|
+
let popoverNode = t38, t39;
|
|
1806
|
+
$[119] !== animate || $[120] !== open || $[121] !== popoverNode ? (t39 = animate ? /* @__PURE__ */ jsx(AnimateActivity, {
|
|
1807
|
+
layoutMode: "default",
|
|
1808
|
+
mode: open ? "visible" : "hidden",
|
|
1809
|
+
children: popoverNode
|
|
1810
|
+
}) : /* @__PURE__ */ jsx(Activity, {
|
|
1811
|
+
mode: open ? "visible" : "hidden",
|
|
1812
|
+
children: popoverNode
|
|
1813
|
+
}), $[119] = animate, $[120] = open, $[121] = popoverNode, $[122] = t39) : t39 = $[122];
|
|
1759
1814
|
let t40;
|
|
1760
|
-
return $[
|
|
1761
|
-
}
|
|
1815
|
+
return $[123] !== child || $[124] !== t39 ? (t40 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t39, child] }), $[123] = child, $[124] = t39, $[125] = t40) : t40 = $[125], t40;
|
|
1816
|
+
};
|
|
1762
1817
|
function useMiddleware$1(t0) {
|
|
1763
1818
|
let $ = c(42), { animate, arrowProp, arrowRef, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, maxWidthRef, placementProp, placementStrategy, preventOverflow, referenceBoundary, referenceWidthRef, rootBoundary, setReferenceWidth, widthRef } = t0, ret;
|
|
1764
1819
|
if ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== constrainSize || $[4] !== fallbackPlacements || $[5] !== floatingBoundary || $[6] !== margins || $[7] !== matchReferenceWidth || $[8] !== maxWidthRef || $[9] !== placementProp || $[10] !== placementStrategy || $[11] !== preventOverflow || $[12] !== referenceBoundary || $[13] !== referenceWidthRef || $[14] !== rootBoundary || $[15] !== setReferenceWidth || $[16] !== widthRef) {
|
|
@@ -1829,22 +1884,22 @@ function responsiveStackSpaceStyle(props) {
|
|
|
1829
1884
|
}
|
|
1830
1885
|
const StyledStack = /* @__PURE__ */ styled(Box).withConfig({
|
|
1831
1886
|
displayName: "StyledStack",
|
|
1832
|
-
componentId: "sc-
|
|
1833
|
-
})(stackBaseStyle, responsiveStackSpaceStyle), Stack =
|
|
1834
|
-
let $ = c(
|
|
1835
|
-
$[0] === props ? (as = $[1], gap = $[2],
|
|
1887
|
+
componentId: "sc-9rj35p-0"
|
|
1888
|
+
})(stackBaseStyle, responsiveStackSpaceStyle), Stack = function Stack(props) {
|
|
1889
|
+
let $ = c(13), as, gap, ref, restProps;
|
|
1890
|
+
$[0] === props ? (as = $[1], gap = $[2], ref = $[3], restProps = $[4]) : ({as, gap, ref, ...restProps} = props, $[0] = props, $[1] = as, $[2] = gap, $[3] = ref, $[4] = restProps);
|
|
1836
1891
|
let t0 = typeof as == "string" ? as : void 0, t1;
|
|
1837
|
-
$[
|
|
1892
|
+
$[5] === gap ? t1 = $[6] : (t1 = _getArrayProp(gap), $[5] = gap, $[6] = t1);
|
|
1838
1893
|
let t2;
|
|
1839
|
-
return $[
|
|
1894
|
+
return $[7] !== as || $[8] !== ref || $[9] !== restProps || $[10] !== t0 || $[11] !== t1 ? (t2 = /* @__PURE__ */ jsx(StyledStack, {
|
|
1840
1895
|
"data-as": t0,
|
|
1841
1896
|
"data-ui": "Stack",
|
|
1842
1897
|
...restProps,
|
|
1843
1898
|
$space: t1,
|
|
1844
1899
|
forwardedAs: as,
|
|
1845
1900
|
ref
|
|
1846
|
-
}), $[
|
|
1847
|
-
}
|
|
1901
|
+
}), $[7] = as, $[8] = ref, $[9] = restProps, $[10] = t0, $[11] = t1, $[12] = t2) : t2 = $[12], t2;
|
|
1902
|
+
};
|
|
1848
1903
|
/**
|
|
1849
1904
|
* @beta
|
|
1850
1905
|
*/
|
|
@@ -1921,53 +1976,53 @@ function textInputRepresentationStyle(props) {
|
|
|
1921
1976
|
}
|
|
1922
1977
|
const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */ styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
1923
1978
|
displayName: "StyledTextInput",
|
|
1924
|
-
componentId: "sc-
|
|
1979
|
+
componentId: "sc-jgyv6p-0"
|
|
1925
1980
|
})(textInputRootStyle), InputRoot$1 = styled.span.withConfig({
|
|
1926
1981
|
displayName: "InputRoot",
|
|
1927
|
-
componentId: "sc-
|
|
1982
|
+
componentId: "sc-jgyv6p-1"
|
|
1928
1983
|
})`flex:1;min-width:0;display:block;position:relative;`, Prefix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
1929
1984
|
displayName: "Prefix",
|
|
1930
|
-
componentId: "sc-
|
|
1985
|
+
componentId: "sc-jgyv6p-2"
|
|
1931
1986
|
})`border-top-right-radius:0;border-bottom-right-radius:0;& > span{display:block;margin:-1px;}`, Suffix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
1932
1987
|
displayName: "Suffix",
|
|
1933
|
-
componentId: "sc-
|
|
1988
|
+
componentId: "sc-jgyv6p-3"
|
|
1934
1989
|
})`border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}`, Input$5 = /* @__PURE__ */ styled.input.withConfig({
|
|
1935
1990
|
displayName: "Input",
|
|
1936
|
-
componentId: "sc-
|
|
1991
|
+
componentId: "sc-jgyv6p-4"
|
|
1937
1992
|
})(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation$1 = /* @__PURE__ */ styled.span.withConfig({
|
|
1938
1993
|
displayName: "Presentation",
|
|
1939
|
-
componentId: "sc-
|
|
1994
|
+
componentId: "sc-jgyv6p-5"
|
|
1940
1995
|
})(responsiveRadiusStyle, textInputRepresentationStyle), LeftBox = styled(Box).withConfig({
|
|
1941
1996
|
displayName: "LeftBox",
|
|
1942
|
-
componentId: "sc-
|
|
1997
|
+
componentId: "sc-jgyv6p-6"
|
|
1943
1998
|
})`position:absolute;top:0;left:0;`, RightBox = styled(Box).withConfig({
|
|
1944
1999
|
displayName: "RightBox",
|
|
1945
|
-
componentId: "sc-
|
|
2000
|
+
componentId: "sc-jgyv6p-7"
|
|
1946
2001
|
})`position:absolute;top:0;right:0;`, RightCard = styled(Card).withConfig({
|
|
1947
2002
|
displayName: "RightCard",
|
|
1948
|
-
componentId: "sc-
|
|
2003
|
+
componentId: "sc-jgyv6p-8"
|
|
1949
2004
|
})`background-color:transparent;position:absolute;top:0;right:0;`, TextInputClearButton = /* @__PURE__ */ styled(Button).withConfig({
|
|
1950
2005
|
displayName: "TextInputClearButton",
|
|
1951
|
-
componentId: "sc-
|
|
1952
|
-
})({ "&:not([hidden])": { display: "block" } }), TextInput =
|
|
1953
|
-
let $ = c(
|
|
1954
|
-
$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5],
|
|
2006
|
+
componentId: "sc-jgyv6p-9"
|
|
2007
|
+
})({ "&:not([hidden])": { display: "block" } }), TextInput = function TextInput(props) {
|
|
2008
|
+
let $ = c(93), IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, forwardedRef, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
2009
|
+
$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], forwardedRef = $[6], onClear = $[7], prefix = $[8], readOnly = $[9], restProps = $[10], suffix = $[11], t0 = $[12], t1 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17], t6 = $[18], weight = $[19]) : ({__unstable_disableFocusRing, border: t0, clearButton, disabled: t1, fontSize: t2, gap: t3, icon: IconComponent, iconRight: IconRightComponent, onClear, padding: t4, prefix, radius: t5, readOnly, ref: forwardedRef, suffix, customValidity, type: t6, weight, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[6] = forwardedRef, $[7] = onClear, $[8] = prefix, $[9] = readOnly, $[10] = restProps, $[11] = suffix, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = weight);
|
|
1955
2010
|
let border = t0 === void 0 || t0, disabled = t1 !== void 0 && t1, fontSizeProp = t2 === void 0 ? 2 : t2, gap = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, radiusProp = t5 === void 0 ? 2 : t5, type = t6 === void 0 ? "text" : t6, ref = useRef(null), rootTheme = useRootTheme(), t7;
|
|
1956
|
-
$[
|
|
2011
|
+
$[20] === fontSizeProp ? t7 = $[21] : (t7 = _getArrayProp(fontSizeProp), $[20] = fontSizeProp, $[21] = t7);
|
|
1957
2012
|
let fontSize = t7, t8;
|
|
1958
|
-
$[
|
|
2013
|
+
$[22] === paddingProp ? t8 = $[23] : (t8 = _getArrayProp(paddingProp), $[22] = paddingProp, $[23] = t8);
|
|
1959
2014
|
let padding = t8, t9;
|
|
1960
|
-
$[
|
|
2015
|
+
$[24] === radiusProp ? t9 = $[25] : (t9 = _getArrayProp(radiusProp), $[24] = radiusProp, $[25] = t9);
|
|
1961
2016
|
let radius = t9, t10;
|
|
1962
|
-
$[
|
|
2017
|
+
$[26] === gap ? t10 = $[27] : (t10 = _getArrayProp(gap), $[26] = gap, $[27] = t10);
|
|
1963
2018
|
let space = t10, $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix, t11;
|
|
1964
|
-
$[
|
|
2019
|
+
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t11 = () => ref.current, $[28] = t11) : t11 = $[28], useImperativeHandle(forwardedRef, t11), useCustomValidity(ref, customValidity);
|
|
1965
2020
|
let handleClearMouseDown = _temp$12, t12;
|
|
1966
|
-
$[
|
|
2021
|
+
$[29] === onClear ? t12 = $[30] : (t12 = (event_0) => {
|
|
1967
2022
|
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
1968
|
-
}, $[
|
|
2023
|
+
}, $[29] = onClear, $[30] = t12);
|
|
1969
2024
|
let handleClearClick = t12, t13;
|
|
1970
|
-
$[
|
|
2025
|
+
$[31] !== prefix || $[32] !== radius ? (t13 = prefix && /* @__PURE__ */ jsx(Prefix, {
|
|
1971
2026
|
borderTop: !0,
|
|
1972
2027
|
borderLeft: !0,
|
|
1973
2028
|
borderBottom: !0,
|
|
@@ -1975,25 +2030,25 @@ const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */
|
|
|
1975
2030
|
sizing: "border",
|
|
1976
2031
|
tone: "inherit",
|
|
1977
2032
|
children: /* @__PURE__ */ jsx("span", { children: prefix })
|
|
1978
|
-
}), $[
|
|
2033
|
+
}), $[31] = prefix, $[32] = radius, $[33] = t13) : t13 = $[33];
|
|
1979
2034
|
let prefixNode = t13, t14 = border ? "" : void 0, t15;
|
|
1980
|
-
$[
|
|
2035
|
+
$[34] !== IconComponent || $[35] !== fontSize || $[36] !== padding ? (t15 = IconComponent && /* @__PURE__ */ jsx(LeftBox, {
|
|
1981
2036
|
padding,
|
|
1982
2037
|
children: /* @__PURE__ */ jsxs(Text, {
|
|
1983
2038
|
size: fontSize,
|
|
1984
2039
|
children: [isValidElement(IconComponent) && IconComponent, isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})]
|
|
1985
2040
|
})
|
|
1986
|
-
}), $[
|
|
2041
|
+
}), $[34] = IconComponent, $[35] = fontSize, $[36] = padding, $[37] = t15) : t15 = $[37];
|
|
1987
2042
|
let t16;
|
|
1988
|
-
$[
|
|
2043
|
+
$[38] !== $hasClearButton || $[39] !== IconRightComponent || $[40] !== fontSize || $[41] !== padding ? (t16 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsx(RightBox, {
|
|
1989
2044
|
padding,
|
|
1990
2045
|
children: /* @__PURE__ */ jsxs(Text, {
|
|
1991
2046
|
size: fontSize,
|
|
1992
2047
|
children: [isValidElement(IconRightComponent) && IconRightComponent, isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})]
|
|
1993
2048
|
})
|
|
1994
|
-
}), $[
|
|
2049
|
+
}), $[38] = $hasClearButton, $[39] = IconRightComponent, $[40] = fontSize, $[41] = padding, $[42] = t16) : t16 = $[42];
|
|
1995
2050
|
let t17;
|
|
1996
|
-
$[
|
|
2051
|
+
$[43] !== $hasPrefix || $[44] !== $hasSuffix || $[45] !== __unstable_disableFocusRing || $[46] !== radius || $[47] !== rootTheme.scheme || $[48] !== rootTheme.tone || $[49] !== t14 || $[50] !== t15 || $[51] !== t16 ? (t17 = /* @__PURE__ */ jsxs(Presentation$1, {
|
|
1997
2052
|
$hasPrefix,
|
|
1998
2053
|
$unstableDisableFocusRing: __unstable_disableFocusRing,
|
|
1999
2054
|
$hasSuffix,
|
|
@@ -2004,13 +2059,13 @@ const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */
|
|
|
2004
2059
|
"data-scheme": rootTheme.scheme,
|
|
2005
2060
|
"data-tone": rootTheme.tone,
|
|
2006
2061
|
children: [t15, t16]
|
|
2007
|
-
}), $[
|
|
2062
|
+
}), $[43] = $hasPrefix, $[44] = $hasSuffix, $[45] = __unstable_disableFocusRing, $[46] = radius, $[47] = rootTheme.scheme, $[48] = rootTheme.tone, $[49] = t14, $[50] = t15, $[51] = t16, $[52] = t17) : t17 = $[52];
|
|
2008
2063
|
let presentationNode = t17, t18;
|
|
2009
|
-
$[
|
|
2064
|
+
$[53] === padding ? t18 = $[54] : (t18 = padding.map(_temp2$3), $[53] = padding, $[54] = t18);
|
|
2010
2065
|
let clearButtonBoxPadding = t18, t19;
|
|
2011
|
-
$[
|
|
2066
|
+
$[55] === padding ? t19 = $[56] : (t19 = padding.map(_temp3), $[55] = padding, $[56] = t19);
|
|
2012
2067
|
let clearButtonPadding = t19, clearButtonProps = typeof clearButton == "object" ? clearButton : EMPTY_RECORD, t20;
|
|
2013
|
-
$[
|
|
2068
|
+
$[57] !== clearButton || $[58] !== clearButtonBoxPadding || $[59] !== clearButtonPadding || $[60] !== clearButtonProps || $[61] !== customValidity || $[62] !== disabled || $[63] !== fontSize || $[64] !== handleClearClick || $[65] !== radius || $[66] !== readOnly ? (t20 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, {
|
|
2014
2069
|
forwardedAs: "span",
|
|
2015
2070
|
padding: clearButtonBoxPadding,
|
|
2016
2071
|
style: CLEAR_BUTTON_BOX_STYLE,
|
|
@@ -2027,9 +2082,9 @@ const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */
|
|
|
2027
2082
|
onClick: handleClearClick,
|
|
2028
2083
|
onMouseDown: handleClearMouseDown
|
|
2029
2084
|
})
|
|
2030
|
-
}), $[
|
|
2085
|
+
}), $[57] = clearButton, $[58] = clearButtonBoxPadding, $[59] = clearButtonPadding, $[60] = clearButtonProps, $[61] = customValidity, $[62] = disabled, $[63] = fontSize, $[64] = handleClearClick, $[65] = radius, $[66] = readOnly, $[67] = t20) : t20 = $[67];
|
|
2031
2086
|
let clearButtonNode = t20, t21;
|
|
2032
|
-
$[
|
|
2087
|
+
$[68] !== radius || $[69] !== suffix ? (t21 = suffix && /* @__PURE__ */ jsx(Suffix, {
|
|
2033
2088
|
borderTop: !0,
|
|
2034
2089
|
borderRight: !0,
|
|
2035
2090
|
borderBottom: !0,
|
|
@@ -2037,9 +2092,9 @@ const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */
|
|
|
2037
2092
|
sizing: "border",
|
|
2038
2093
|
tone: "inherit",
|
|
2039
2094
|
children: /* @__PURE__ */ jsx("span", { children: suffix })
|
|
2040
|
-
}), $[
|
|
2095
|
+
}), $[68] = radius, $[69] = suffix, $[70] = t21) : t21 = $[70];
|
|
2041
2096
|
let suffixNode = t21, t22 = $hasIconRight || $hasClearButton, t23;
|
|
2042
|
-
$[
|
|
2097
|
+
$[71] !== $hasIcon || $[72] !== disabled || $[73] !== fontSize || $[74] !== padding || $[75] !== readOnly || $[76] !== restProps || $[77] !== rootTheme.scheme || $[78] !== rootTheme.tone || $[79] !== space || $[80] !== t22 || $[81] !== type || $[82] !== weight ? (t23 = /* @__PURE__ */ jsx(Input$5, {
|
|
2043
2098
|
"data-as": "input",
|
|
2044
2099
|
"data-scheme": rootTheme.scheme,
|
|
2045
2100
|
"data-tone": rootTheme.tone,
|
|
@@ -2056,15 +2111,15 @@ const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */
|
|
|
2056
2111
|
readOnly,
|
|
2057
2112
|
ref,
|
|
2058
2113
|
type
|
|
2059
|
-
}), $[
|
|
2114
|
+
}), $[71] = $hasIcon, $[72] = disabled, $[73] = fontSize, $[74] = padding, $[75] = readOnly, $[76] = restProps, $[77] = rootTheme.scheme, $[78] = rootTheme.tone, $[79] = space, $[80] = t22, $[81] = type, $[82] = weight, $[83] = t23) : t23 = $[83];
|
|
2060
2115
|
let t24;
|
|
2061
|
-
$[
|
|
2116
|
+
$[84] !== clearButtonNode || $[85] !== presentationNode || $[86] !== t23 ? (t24 = /* @__PURE__ */ jsxs(InputRoot$1, { children: [
|
|
2062
2117
|
t23,
|
|
2063
2118
|
presentationNode,
|
|
2064
2119
|
clearButtonNode
|
|
2065
|
-
] }), $[
|
|
2120
|
+
] }), $[84] = clearButtonNode, $[85] = presentationNode, $[86] = t23, $[87] = t24) : t24 = $[87];
|
|
2066
2121
|
let t25;
|
|
2067
|
-
return $[
|
|
2122
|
+
return $[88] !== prefixNode || $[89] !== rootTheme.tone || $[90] !== suffixNode || $[91] !== t24 ? (t25 = /* @__PURE__ */ jsxs(StyledTextInput, {
|
|
2068
2123
|
"data-ui": "TextInput",
|
|
2069
2124
|
tone: rootTheme.tone,
|
|
2070
2125
|
children: [
|
|
@@ -2072,8 +2127,8 @@ const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */
|
|
|
2072
2127
|
t24,
|
|
2073
2128
|
suffixNode
|
|
2074
2129
|
]
|
|
2075
|
-
}), $[
|
|
2076
|
-
}
|
|
2130
|
+
}), $[88] = prefixNode, $[89] = rootTheme.tone, $[90] = suffixNode, $[91] = t24, $[92] = t25) : t25 = $[92], t25;
|
|
2131
|
+
};
|
|
2077
2132
|
function _temp$12(event) {
|
|
2078
2133
|
event.preventDefault(), event.stopPropagation();
|
|
2079
2134
|
}
|
|
@@ -2175,19 +2230,19 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2175
2230
|
"Meta",
|
|
2176
2231
|
"Tab",
|
|
2177
2232
|
"CapsLock"
|
|
2178
|
-
], AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = ["bottom-start", "top-start"], DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1,
|
|
2179
|
-
let $ = c(
|
|
2180
|
-
$[0] === props ? (customValidity = $[1], disabled = $[2], filterOptionProp = $[3],
|
|
2233
|
+
], AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = ["bottom-start", "top-start"], DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1, Autocomplete = function Autocomplete(props) {
|
|
2234
|
+
let $ = c(182), customValidity, disabled, filterOptionProp, forwardedRef, icon, id, loading, onBlur, onChange, onFocus, onQueryChange, onSelect, openButton, openOnFocus, optionsProp, prefix, readOnly, relatedElements, renderOptionProp, renderPopover, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, valueProp;
|
|
2235
|
+
$[0] === props ? (customValidity = $[1], disabled = $[2], filterOptionProp = $[3], forwardedRef = $[4], icon = $[5], id = $[6], loading = $[7], onBlur = $[8], onChange = $[9], onFocus = $[10], onQueryChange = $[11], onSelect = $[12], openButton = $[13], openOnFocus = $[14], optionsProp = $[15], prefix = $[16], readOnly = $[17], relatedElements = $[18], renderOptionProp = $[19], renderPopover = $[20], restProps = $[21], suffix = $[22], t0 = $[23], t1 = $[24], t2 = $[25], t3 = $[26], t4 = $[27], t5 = $[28], t6 = $[29], valueProp = $[30]) : ({border: t0, customValidity, disabled, filterOption: filterOptionProp, fontSize: t1, icon, id, listBox: t2, loading, onBlur, onChange, onFocus, onQueryChange, onSelect, openButton, openOnFocus, options: optionsProp, padding: t3, popover: t4, prefix, radius: t5, readOnly, ref: forwardedRef, relatedElements, renderOption: renderOptionProp, renderPopover, renderValue: t6, suffix, value: valueProp, ...restProps} = props, $[0] = props, $[1] = customValidity, $[2] = disabled, $[3] = filterOptionProp, $[4] = forwardedRef, $[5] = icon, $[6] = id, $[7] = loading, $[8] = onBlur, $[9] = onChange, $[10] = onFocus, $[11] = onQueryChange, $[12] = onSelect, $[13] = openButton, $[14] = openOnFocus, $[15] = optionsProp, $[16] = prefix, $[17] = readOnly, $[18] = relatedElements, $[19] = renderOptionProp, $[20] = renderPopover, $[21] = restProps, $[22] = suffix, $[23] = t0, $[24] = t1, $[25] = t2, $[26] = t3, $[27] = t4, $[28] = t5, $[29] = t6, $[30] = valueProp);
|
|
2181
2236
|
let border = t0 === void 0 || t0, fontSize = t1 === void 0 ? 2 : t1, listBox = t2 === void 0 ? EMPTY_RECORD : t2, paddingProp = t3 === void 0 ? 3 : t3, popover = t4 === void 0 ? EMPTY_RECORD : t4, radius = t5 === void 0 ? 2 : t5, renderValue = t6 === void 0 ? DEFAULT_RENDER_VALUE : t6, t7 = valueProp || null, t8 = valueProp || null, t9;
|
|
2182
|
-
$[
|
|
2237
|
+
$[31] !== t7 || $[32] !== t8 ? (t9 = {
|
|
2183
2238
|
activeValue: t7,
|
|
2184
2239
|
focused: !1,
|
|
2185
2240
|
listFocused: !1,
|
|
2186
2241
|
query: null,
|
|
2187
2242
|
value: t8
|
|
2188
|
-
}, $[
|
|
2243
|
+
}, $[31] = t7, $[32] = t8, $[33] = t9) : t9 = $[33];
|
|
2189
2244
|
let [state, dispatch] = useReducer(autocompleteReducer, t9), { activeValue, focused, listFocused, query, value } = state, t10;
|
|
2190
|
-
$[
|
|
2245
|
+
$[34] !== fontSize || $[35] !== paddingProp ? (t10 = (t11) => {
|
|
2191
2246
|
let { value: value_0 } = t11;
|
|
2192
2247
|
return /* @__PURE__ */ jsx(Card, {
|
|
2193
2248
|
"data-as": "button",
|
|
@@ -2200,24 +2255,24 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2200
2255
|
children: value_0
|
|
2201
2256
|
})
|
|
2202
2257
|
});
|
|
2203
|
-
}, $[
|
|
2258
|
+
}, $[34] = fontSize, $[35] = paddingProp, $[36] = t10) : t10 = $[36];
|
|
2204
2259
|
let renderOption = typeof renderOptionProp == "function" ? renderOptionProp : t10, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, rootElementRef = useRef(null), resultsPopoverElementRef = useRef(null), inputElementRef = useRef(null), listBoxElementRef = useRef(null), [inputElement, _setInputElement] = useState(null), t11;
|
|
2205
|
-
$[
|
|
2260
|
+
$[37] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (node) => {
|
|
2206
2261
|
startTransition(() => _setInputElement(node));
|
|
2207
|
-
}, $[
|
|
2262
|
+
}, $[37] = t11) : t11 = $[37];
|
|
2208
2263
|
let setInputElement = t11, listFocusedRef = useRef(!1), valueRef = useRef(value), valuePropRef = useRef(valueProp), popoverMouseWithinRef = useRef(!1), t12, t13;
|
|
2209
|
-
$[
|
|
2264
|
+
$[38] === inputElement ? (t12 = $[39], t13 = $[40]) : (t12 = () => inputElement, t13 = [inputElement], $[38] = inputElement, $[39] = t12, $[40] = t13), useImperativeHandle(inputElementRef, t12, t13);
|
|
2210
2265
|
let t14, t15;
|
|
2211
|
-
$[
|
|
2266
|
+
$[41] === inputElement ? (t14 = $[42], t15 = $[43]) : (t14 = () => inputElement, t15 = [inputElement], $[41] = inputElement, $[42] = t14, $[43] = t15), useImperativeHandle(forwardedRef, t14, t15);
|
|
2212
2267
|
let listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = _getArrayProp(paddingProp), t16;
|
|
2213
|
-
$[
|
|
2268
|
+
$[44] !== options || $[45] !== value ? (t16 = value === null ? void 0 : options.find((o) => o.value === value), $[44] = options, $[45] = value, $[46] = t16) : t16 = $[46];
|
|
2214
2269
|
let currentOption = t16, t17;
|
|
2215
|
-
if ($[
|
|
2270
|
+
if ($[47] !== filterOption || $[48] !== options || $[49] !== query) {
|
|
2216
2271
|
let t18;
|
|
2217
|
-
$[
|
|
2218
|
-
} else t17 = $[
|
|
2272
|
+
$[51] !== filterOption || $[52] !== query ? (t18 = (option) => !query || filterOption(query, option), $[51] = filterOption, $[52] = query, $[53] = t18) : t18 = $[53], t17 = options.filter(t18), $[47] = filterOption, $[48] = options, $[49] = query, $[50] = t17;
|
|
2273
|
+
} else t17 = $[50];
|
|
2219
2274
|
let filteredOptions = t17, filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null, t18;
|
|
2220
|
-
$[
|
|
2275
|
+
$[54] !== onBlur || $[55] !== onQueryChange || $[56] !== relatedElements ? (t18 = (event) => {
|
|
2221
2276
|
setTimeout(() => {
|
|
2222
2277
|
if (popoverMouseWithinRef.current) return;
|
|
2223
2278
|
let elements = (relatedElements || []).concat(rootElementRef.current ? [rootElementRef.current] : [], resultsPopoverElementRef.current ? [resultsPopoverElementRef.current] : []), focusInside = !1;
|
|
@@ -2229,24 +2284,24 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2229
2284
|
}
|
|
2230
2285
|
focusInside === !1 && (dispatch({ type: "root/blur" }), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), onBlur && onBlur(event));
|
|
2231
2286
|
}, 0);
|
|
2232
|
-
}, $[
|
|
2287
|
+
}, $[54] = onBlur, $[55] = onQueryChange, $[56] = relatedElements, $[57] = t18) : t18 = $[57];
|
|
2233
2288
|
let handleRootBlur = t18, t19;
|
|
2234
|
-
$[
|
|
2289
|
+
$[58] === Symbol.for("react.memo_cache_sentinel") ? (t19 = (event_0) => {
|
|
2235
2290
|
let listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement?.contains(focusedElement) || !1;
|
|
2236
2291
|
listFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({
|
|
2237
2292
|
type: "root/setListFocused",
|
|
2238
2293
|
listFocused: listFocused_0
|
|
2239
2294
|
}));
|
|
2240
|
-
}, $[
|
|
2295
|
+
}, $[58] = t19) : t19 = $[58];
|
|
2241
2296
|
let handleRootFocus = t19, t20;
|
|
2242
|
-
$[
|
|
2297
|
+
$[59] !== onChange || $[60] !== onQueryChange || $[61] !== onSelect ? (t20 = (v) => {
|
|
2243
2298
|
dispatch({
|
|
2244
2299
|
type: "value/change",
|
|
2245
2300
|
value: v
|
|
2246
2301
|
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
2247
|
-
}, $[
|
|
2302
|
+
}, $[59] = onChange, $[60] = onQueryChange, $[61] = onSelect, $[62] = t20) : t20 = $[62];
|
|
2248
2303
|
let handleOptionSelect = t20, t21;
|
|
2249
|
-
$[
|
|
2304
|
+
$[63] !== activeValue || $[64] !== filteredOptions || $[65] !== filteredOptionsLen || $[66] !== onQueryChange ? (t21 = (event_1) => {
|
|
2250
2305
|
if (event_1.key === "ArrowDown") {
|
|
2251
2306
|
if (event_1.preventDefault(), !filteredOptionsLen) return;
|
|
2252
2307
|
let activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];
|
|
@@ -2276,44 +2331,44 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2276
2331
|
inputElementRef.current?.focus();
|
|
2277
2332
|
return;
|
|
2278
2333
|
}
|
|
2279
|
-
}, $[
|
|
2334
|
+
}, $[63] = activeValue, $[64] = filteredOptions, $[65] = filteredOptionsLen, $[66] = onQueryChange, $[67] = t21) : t21 = $[67];
|
|
2280
2335
|
let handleRootKeyDown = t21, t22;
|
|
2281
|
-
$[
|
|
2336
|
+
$[68] === onQueryChange ? t22 = $[69] : (t22 = (event_2) => {
|
|
2282
2337
|
let nextQuery = event_2.currentTarget.value;
|
|
2283
2338
|
dispatch({
|
|
2284
2339
|
type: "input/change",
|
|
2285
2340
|
query: nextQuery
|
|
2286
2341
|
}), onQueryChange && onQueryChange(nextQuery);
|
|
2287
|
-
}, $[
|
|
2342
|
+
}, $[68] = onQueryChange, $[69] = t22);
|
|
2288
2343
|
let handleInputChange = t22, t23;
|
|
2289
|
-
$[
|
|
2344
|
+
$[70] !== currentOption || $[71] !== renderValue || $[72] !== value ? (t23 = () => {
|
|
2290
2345
|
dispatch({
|
|
2291
2346
|
type: "root/open",
|
|
2292
2347
|
query: value ? renderValue(value, currentOption) : ""
|
|
2293
2348
|
});
|
|
2294
|
-
}, $[
|
|
2349
|
+
}, $[70] = currentOption, $[71] = renderValue, $[72] = value, $[73] = t23) : t23 = $[73];
|
|
2295
2350
|
let dispatchOpen = t23, t24;
|
|
2296
|
-
$[
|
|
2351
|
+
$[74] !== dispatchOpen || $[75] !== focused || $[76] !== onFocus || $[77] !== openOnFocus ? (t24 = (event_3) => {
|
|
2297
2352
|
focused || (dispatch({ type: "input/focus" }), onFocus && onFocus(event_3), openOnFocus && dispatchOpen());
|
|
2298
|
-
}, $[
|
|
2353
|
+
}, $[74] = dispatchOpen, $[75] = focused, $[76] = onFocus, $[77] = openOnFocus, $[78] = t24) : t24 = $[78];
|
|
2299
2354
|
let handleInputFocus = t24, t25;
|
|
2300
|
-
$[
|
|
2355
|
+
$[79] === Symbol.for("react.memo_cache_sentinel") ? (t25 = () => {
|
|
2301
2356
|
popoverMouseWithinRef.current = !0;
|
|
2302
|
-
}, $[
|
|
2357
|
+
}, $[79] = t25) : t25 = $[79];
|
|
2303
2358
|
let handlePopoverMouseEnter = t25, t26;
|
|
2304
|
-
$[
|
|
2359
|
+
$[80] === Symbol.for("react.memo_cache_sentinel") ? (t26 = () => {
|
|
2305
2360
|
popoverMouseWithinRef.current = !1;
|
|
2306
|
-
}, $[
|
|
2361
|
+
}, $[80] = t26) : t26 = $[80];
|
|
2307
2362
|
let handlePopoverMouseLeave = t26, t27;
|
|
2308
|
-
$[
|
|
2363
|
+
$[81] !== onChange || $[82] !== onQueryChange ? (t27 = () => {
|
|
2309
2364
|
dispatch({ type: "root/clear" }), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
2310
|
-
}, $[
|
|
2365
|
+
}, $[81] = onChange, $[82] = onQueryChange, $[83] = t27) : t27 = $[83];
|
|
2311
2366
|
let handleClearButtonClick = t27, t28;
|
|
2312
|
-
$[
|
|
2367
|
+
$[84] === Symbol.for("react.memo_cache_sentinel") ? (t28 = () => {
|
|
2313
2368
|
dispatch({ type: "input/focus" });
|
|
2314
|
-
}, $[
|
|
2369
|
+
}, $[84] = t28) : t28 = $[84];
|
|
2315
2370
|
let handleClearButtonFocus = t28, t29, t30;
|
|
2316
|
-
$[
|
|
2371
|
+
$[85] === valueProp ? (t29 = $[86], t30 = $[87]) : (t29 = () => {
|
|
2317
2372
|
if (valueProp !== valuePropRef.current) {
|
|
2318
2373
|
valuePropRef.current = valueProp, valueProp !== void 0 && (dispatch({
|
|
2319
2374
|
type: "value/change",
|
|
@@ -2325,16 +2380,16 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2325
2380
|
type: "value/change",
|
|
2326
2381
|
value: valueProp || null
|
|
2327
2382
|
}));
|
|
2328
|
-
}, t30 = [valueProp], $[
|
|
2383
|
+
}, t30 = [valueProp], $[85] = valueProp, $[86] = t29, $[87] = t30), useEffect(t29, t30);
|
|
2329
2384
|
let t31, t32;
|
|
2330
|
-
$[
|
|
2385
|
+
$[88] === focused ? (t31 = $[89], t32 = $[90]) : (t31 = () => {
|
|
2331
2386
|
!focused && valueRef.current && dispatch({
|
|
2332
2387
|
type: "root/setActiveValue",
|
|
2333
2388
|
value: valueRef.current
|
|
2334
2389
|
});
|
|
2335
|
-
}, t32 = [focused], $[
|
|
2390
|
+
}, t32 = [focused], $[88] = focused, $[89] = t31, $[90] = t32), useEffect(t31, t32);
|
|
2336
2391
|
let t33, t34;
|
|
2337
|
-
$[
|
|
2392
|
+
$[91] !== activeValue || $[92] !== filteredOptions ? (t33 = () => {
|
|
2338
2393
|
let listElement = listBoxElementRef.current;
|
|
2339
2394
|
if (!listElement) return;
|
|
2340
2395
|
let activeOption_1 = filteredOptions.find((o_2) => o_2.value === activeValue);
|
|
@@ -2345,25 +2400,25 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2345
2400
|
focusFirstDescendant(activeItemElement);
|
|
2346
2401
|
}
|
|
2347
2402
|
}
|
|
2348
|
-
}, t34 = [activeValue, filteredOptions], $[
|
|
2403
|
+
}, t34 = [activeValue, filteredOptions], $[91] = activeValue, $[92] = filteredOptions, $[93] = t33, $[94] = t34) : (t33 = $[93], t34 = $[94]), useEffect(t33, t34);
|
|
2349
2404
|
let t35;
|
|
2350
2405
|
bb0: {
|
|
2351
2406
|
if (!loading && !disabled && value) {
|
|
2352
2407
|
let t36;
|
|
2353
|
-
$[
|
|
2408
|
+
$[95] === Symbol.for("react.memo_cache_sentinel") ? (t36 = {
|
|
2354
2409
|
"aria-label": "Clear",
|
|
2355
2410
|
onFocus: handleClearButtonFocus
|
|
2356
|
-
}, $[
|
|
2411
|
+
}, $[95] = t36) : t36 = $[95], t35 = t36;
|
|
2357
2412
|
break bb0;
|
|
2358
2413
|
}
|
|
2359
2414
|
t35 = void 0;
|
|
2360
2415
|
}
|
|
2361
2416
|
let clearButton = t35, openButtonBoxPadding = padding.map(_temp$11), openButtonPadding = padding.map(_temp2$2), openButtonProps = typeof openButton == "object" ? openButton : EMPTY_RECORD, t36;
|
|
2362
|
-
$[
|
|
2417
|
+
$[96] !== dispatchOpen || $[97] !== openButtonProps ? (t36 = (event_4) => {
|
|
2363
2418
|
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
2364
|
-
}, $[
|
|
2419
|
+
}, $[96] = dispatchOpen, $[97] = openButtonProps, $[98] = t36) : t36 = $[98];
|
|
2365
2420
|
let handleOpenClick = t36, t37;
|
|
2366
|
-
$[
|
|
2421
|
+
$[99] !== disabled || $[100] !== expanded || $[101] !== fontSize || $[102] !== handleOpenClick || $[103] !== openButton || $[104] !== openButtonBoxPadding || $[105] !== openButtonPadding || $[106] !== openButtonProps || $[107] !== readOnly ? (t37 = !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, {
|
|
2367
2422
|
"aria-hidden": expanded,
|
|
2368
2423
|
padding: openButtonBoxPadding,
|
|
2369
2424
|
children: /* @__PURE__ */ jsx(Button, {
|
|
@@ -2376,13 +2431,13 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2376
2431
|
...openButtonProps,
|
|
2377
2432
|
onClick: handleOpenClick
|
|
2378
2433
|
})
|
|
2379
|
-
}) : void 0, $[
|
|
2434
|
+
}) : void 0, $[99] = disabled, $[100] = expanded, $[101] = fontSize, $[102] = handleOpenClick, $[103] = openButton, $[104] = openButtonBoxPadding, $[105] = openButtonPadding, $[106] = openButtonProps, $[107] = readOnly, $[108] = t37) : t37 = $[108];
|
|
2380
2435
|
let openButtonNode = t37, t38;
|
|
2381
2436
|
bb1: {
|
|
2382
2437
|
if (query === null) {
|
|
2383
2438
|
if (value !== null) {
|
|
2384
2439
|
let t39;
|
|
2385
|
-
$[
|
|
2440
|
+
$[109] !== currentOption || $[110] !== renderValue || $[111] !== value ? (t39 = renderValue(value, currentOption), $[109] = currentOption, $[110] = renderValue, $[111] = value, $[112] = t39) : t39 = $[112], t38 = t39;
|
|
2386
2441
|
break bb1;
|
|
2387
2442
|
}
|
|
2388
2443
|
t38 = "";
|
|
@@ -2391,9 +2446,9 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2391
2446
|
t38 = query;
|
|
2392
2447
|
}
|
|
2393
2448
|
let inputValue = t38, t39;
|
|
2394
|
-
$[
|
|
2449
|
+
$[113] === listFocused ? t39 = $[114] : (t39 = (event_5) => {
|
|
2395
2450
|
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
2396
|
-
}, $[
|
|
2451
|
+
}, $[113] = listFocused, $[114] = t39);
|
|
2397
2452
|
let handleListBoxKeyDown = t39, t40;
|
|
2398
2453
|
bb2: {
|
|
2399
2454
|
if (filteredOptions.length === 0) {
|
|
@@ -2401,9 +2456,9 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2401
2456
|
break bb2;
|
|
2402
2457
|
}
|
|
2403
2458
|
let t41;
|
|
2404
|
-
if ($[
|
|
2459
|
+
if ($[115] !== activeValue || $[116] !== currentOption || $[117] !== filteredOptions || $[118] !== handleOptionSelect || $[119] !== id || $[120] !== listFocused || $[121] !== loading || $[122] !== renderOption) {
|
|
2405
2460
|
let t42;
|
|
2406
|
-
$[
|
|
2461
|
+
$[124] !== activeValue || $[125] !== currentOption || $[126] !== handleOptionSelect || $[127] !== id || $[128] !== listFocused || $[129] !== loading || $[130] !== renderOption ? (t42 = (option_0) => {
|
|
2407
2462
|
let active = activeValue === null ? currentOption === option_0 : option_0.value === activeValue;
|
|
2408
2463
|
return /* @__PURE__ */ jsx(AutocompleteOption, {
|
|
2409
2464
|
id: `${id}-option-${option_0.value}`,
|
|
@@ -2416,10 +2471,10 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2416
2471
|
tabIndex: listFocused && active ? 0 : -1
|
|
2417
2472
|
})
|
|
2418
2473
|
}, option_0.value);
|
|
2419
|
-
}, $[
|
|
2420
|
-
} else t41 = $[
|
|
2474
|
+
}, $[124] = activeValue, $[125] = currentOption, $[126] = handleOptionSelect, $[127] = id, $[128] = listFocused, $[129] = loading, $[130] = renderOption, $[131] = t42) : t42 = $[131], t41 = filteredOptions.map(t42), $[115] = activeValue, $[116] = currentOption, $[117] = filteredOptions, $[118] = handleOptionSelect, $[119] = id, $[120] = listFocused, $[121] = loading, $[122] = renderOption, $[123] = t41;
|
|
2475
|
+
} else t41 = $[123];
|
|
2421
2476
|
let t42;
|
|
2422
|
-
$[
|
|
2477
|
+
$[132] !== listBoxId || $[133] !== t41 ? (t42 = /* @__PURE__ */ jsx(Stack, {
|
|
2423
2478
|
as: "ul",
|
|
2424
2479
|
"aria-multiselectable": !1,
|
|
2425
2480
|
"data-ui": "AutoComplete__resultsList",
|
|
@@ -2428,22 +2483,22 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2428
2483
|
role: "listbox",
|
|
2429
2484
|
gap: 1,
|
|
2430
2485
|
children: t41
|
|
2431
|
-
}), $[
|
|
2486
|
+
}), $[132] = listBoxId, $[133] = t41, $[134] = t42) : t42 = $[134];
|
|
2432
2487
|
let t43;
|
|
2433
|
-
$[
|
|
2488
|
+
$[135] !== handleListBoxKeyDown || $[136] !== listBox || $[137] !== t42 ? (t43 = /* @__PURE__ */ jsx(ListBox, {
|
|
2434
2489
|
"data-ui": "AutoComplete__results",
|
|
2435
2490
|
onKeyDown: handleListBoxKeyDown,
|
|
2436
2491
|
padding: 1,
|
|
2437
2492
|
...listBox,
|
|
2438
2493
|
tabIndex: -1,
|
|
2439
2494
|
children: t42
|
|
2440
|
-
}), $[
|
|
2495
|
+
}), $[135] = handleListBoxKeyDown, $[136] = listBox, $[137] = t42, $[138] = t43) : t43 = $[138], t40 = t43;
|
|
2441
2496
|
}
|
|
2442
2497
|
let content = t40, t41;
|
|
2443
2498
|
bb3: {
|
|
2444
2499
|
if (renderPopover) {
|
|
2445
2500
|
let t42 = !expanded, t43;
|
|
2446
|
-
$[
|
|
2501
|
+
$[139] !== content || $[140] !== handlePopoverMouseEnter || $[141] !== handlePopoverMouseLeave || $[142] !== inputElement || $[143] !== renderPopover || $[144] !== t42 ? (t43 = /* @__PURE__ */ jsx(RenderPopover, {
|
|
2447
2502
|
content,
|
|
2448
2503
|
hidden: t42,
|
|
2449
2504
|
inputElement,
|
|
@@ -2451,7 +2506,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2451
2506
|
onMouseLeave: handlePopoverMouseLeave,
|
|
2452
2507
|
resultsPopoverElementRef,
|
|
2453
2508
|
renderPopover
|
|
2454
|
-
}), $[
|
|
2509
|
+
}), $[139] = content, $[140] = handlePopoverMouseEnter, $[141] = handlePopoverMouseLeave, $[142] = inputElement, $[143] = renderPopover, $[144] = t42, $[145] = t43) : t43 = $[145], t41 = t43;
|
|
2455
2510
|
break bb3;
|
|
2456
2511
|
}
|
|
2457
2512
|
if (filteredOptionsLen === 0) {
|
|
@@ -2459,7 +2514,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2459
2514
|
break bb3;
|
|
2460
2515
|
}
|
|
2461
2516
|
let t42;
|
|
2462
|
-
$[
|
|
2517
|
+
$[146] !== content || $[147] !== expanded || $[148] !== handlePopoverMouseEnter || $[149] !== handlePopoverMouseLeave || $[150] !== inputElement || $[151] !== popover || $[152] !== radius ? (t42 = /* @__PURE__ */ jsx(Popover, {
|
|
2463
2518
|
arrow: !1,
|
|
2464
2519
|
constrainSize: !0,
|
|
2465
2520
|
content,
|
|
@@ -2475,10 +2530,10 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2475
2530
|
ref: resultsPopoverElementRef,
|
|
2476
2531
|
referenceElement: inputElement,
|
|
2477
2532
|
...popover
|
|
2478
|
-
}), $[
|
|
2533
|
+
}), $[146] = content, $[147] = expanded, $[148] = handlePopoverMouseEnter, $[149] = handlePopoverMouseLeave, $[150] = inputElement, $[151] = popover, $[152] = radius, $[153] = t42) : t42 = $[153], t41 = t42;
|
|
2479
2534
|
}
|
|
2480
2535
|
let results = t41, t42 = loading && AnimatedSpinnerIcon, t43 = suffix || openButtonNode, t44;
|
|
2481
|
-
$[
|
|
2536
|
+
$[154] !== activeItemId || $[155] !== border || $[156] !== clearButton || $[157] !== customValidity || $[158] !== disabled || $[159] !== expanded || $[160] !== fontSize || $[161] !== handleClearButtonClick || $[162] !== handleInputChange || $[163] !== handleInputFocus || $[164] !== icon || $[165] !== id || $[166] !== inputValue || $[167] !== listBoxId || $[168] !== padding || $[169] !== prefix || $[170] !== radius || $[171] !== readOnly || $[172] !== restProps || $[173] !== t42 || $[174] !== t43 ? (t44 = /* @__PURE__ */ jsx(TextInput, {
|
|
2482
2537
|
...restProps,
|
|
2483
2538
|
"aria-activedescendant": activeItemId,
|
|
2484
2539
|
"aria-autocomplete": "list",
|
|
@@ -2508,17 +2563,17 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
2508
2563
|
spellCheck: !1,
|
|
2509
2564
|
suffix: t43,
|
|
2510
2565
|
value: inputValue
|
|
2511
|
-
}), $[
|
|
2566
|
+
}), $[154] = activeItemId, $[155] = border, $[156] = clearButton, $[157] = customValidity, $[158] = disabled, $[159] = expanded, $[160] = fontSize, $[161] = handleClearButtonClick, $[162] = handleInputChange, $[163] = handleInputFocus, $[164] = icon, $[165] = id, $[166] = inputValue, $[167] = listBoxId, $[168] = padding, $[169] = prefix, $[170] = radius, $[171] = readOnly, $[172] = restProps, $[173] = t42, $[174] = t43, $[175] = t44) : t44 = $[175];
|
|
2512
2567
|
let t45;
|
|
2513
|
-
return $[
|
|
2568
|
+
return $[176] !== handleRootBlur || $[177] !== handleRootFocus || $[178] !== handleRootKeyDown || $[179] !== results || $[180] !== t44 ? (t45 = /* @__PURE__ */ jsxs(StyledAutocomplete, {
|
|
2514
2569
|
"data-ui": "Autocomplete",
|
|
2515
2570
|
onBlur: handleRootBlur,
|
|
2516
2571
|
onFocus: handleRootFocus,
|
|
2517
2572
|
onKeyDown: handleRootKeyDown,
|
|
2518
2573
|
ref: rootElementRef,
|
|
2519
2574
|
children: [t44, results]
|
|
2520
|
-
}), $[
|
|
2521
|
-
}
|
|
2575
|
+
}), $[176] = handleRootBlur, $[177] = handleRootFocus, $[178] = handleRootKeyDown, $[179] = results, $[180] = t44, $[181] = t45) : t45 = $[181], t45;
|
|
2576
|
+
};
|
|
2522
2577
|
function RenderPopover({ renderPopover, content, hidden, inputElement, onMouseEnter, onMouseLeave, resultsPopoverElementRef }) {
|
|
2523
2578
|
return renderPopover({
|
|
2524
2579
|
content,
|
|
@@ -2528,13 +2583,6 @@ function RenderPopover({ renderPopover, content, hidden, inputElement, onMouseEn
|
|
|
2528
2583
|
onMouseLeave
|
|
2529
2584
|
}, resultsPopoverElementRef);
|
|
2530
2585
|
}
|
|
2531
|
-
/**
|
|
2532
|
-
* The Autocomplete component is typically used for search components.
|
|
2533
|
-
* It consists of a text input for writing a query, and properties for rendering suggestions.
|
|
2534
|
-
*
|
|
2535
|
-
* @public
|
|
2536
|
-
*/
|
|
2537
|
-
const Autocomplete = InnerAutocomplete;
|
|
2538
2586
|
function _temp$11(v_0) {
|
|
2539
2587
|
return v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2;
|
|
2540
2588
|
}
|
|
@@ -2576,21 +2624,21 @@ const StyledBreadcrumbs = styled.ol.withConfig({
|
|
|
2576
2624
|
})`margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;`, ExpandButton = styled(Button).withConfig({
|
|
2577
2625
|
displayName: "ExpandButton",
|
|
2578
2626
|
componentId: "sc-s3y9xo-1"
|
|
2579
|
-
})`appearance:none;margin:-4px;`, Breadcrumbs =
|
|
2580
|
-
let $ = c(
|
|
2581
|
-
$[0] === props ? (children = $[1], maxLength = $[2],
|
|
2627
|
+
})`appearance:none;margin:-4px;`, Breadcrumbs = function Breadcrumbs(props) {
|
|
2628
|
+
let $ = c(30), children, maxLength, ref, restProps, separator, t0;
|
|
2629
|
+
$[0] === props ? (children = $[1], maxLength = $[2], ref = $[3], restProps = $[4], separator = $[5], t0 = $[6]) : ({children, gap: t0, maxLength, ref, separator, ...restProps} = props, $[0] = props, $[1] = children, $[2] = maxLength, $[3] = ref, $[4] = restProps, $[5] = separator, $[6] = t0);
|
|
2582
2630
|
let gap = t0 === void 0 ? 2 : t0, t1;
|
|
2583
|
-
$[
|
|
2631
|
+
$[7] === gap ? t1 = $[8] : (t1 = _getArrayProp(gap), $[7] = gap, $[8] = t1);
|
|
2584
2632
|
let space = t1, [open, setOpen] = useState(!1), expandElementRef = useRef(null), popoverElementRef = useRef(null), t2;
|
|
2585
|
-
$[
|
|
2633
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => setOpen(!1), $[9] = t2) : t2 = $[9];
|
|
2586
2634
|
let collapse = t2, t3;
|
|
2587
|
-
$[
|
|
2635
|
+
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => setOpen(!0), $[10] = t3) : t3 = $[10];
|
|
2588
2636
|
let expand = t3, t4;
|
|
2589
|
-
$[
|
|
2637
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => [expandElementRef.current, popoverElementRef.current], $[11] = t4) : t4 = $[11], useClickOutsideEvent(collapse, t4);
|
|
2590
2638
|
let t5;
|
|
2591
|
-
$[
|
|
2639
|
+
$[12] === children ? t5 = $[13] : (t5 = Children.toArray(children).filter(isValidElement), $[12] = children, $[13] = t5);
|
|
2592
2640
|
let rawItems = t5, t6;
|
|
2593
|
-
$[
|
|
2641
|
+
$[14] !== maxLength || $[15] !== open || $[16] !== rawItems || $[17] !== space ? (t6 = {
|
|
2594
2642
|
collapse,
|
|
2595
2643
|
expand,
|
|
2596
2644
|
expandElementRef,
|
|
@@ -2599,11 +2647,11 @@ const StyledBreadcrumbs = styled.ol.withConfig({
|
|
|
2599
2647
|
popoverElementRef,
|
|
2600
2648
|
rawItems,
|
|
2601
2649
|
space
|
|
2602
|
-
}, $[
|
|
2650
|
+
}, $[14] = maxLength, $[15] = open, $[16] = rawItems, $[17] = space, $[18] = t6) : t6 = $[18];
|
|
2603
2651
|
let items = useItems(t6), t7;
|
|
2604
|
-
if ($[
|
|
2652
|
+
if ($[19] !== items || $[20] !== separator || $[21] !== space) {
|
|
2605
2653
|
let t8;
|
|
2606
|
-
$[
|
|
2654
|
+
$[23] !== separator || $[24] !== space ? (t8 = (item, itemIndex) => /* @__PURE__ */ jsxs(Fragment, { children: [itemIndex > 0 && /* @__PURE__ */ jsx(Box, {
|
|
2607
2655
|
"aria-hidden": !0,
|
|
2608
2656
|
as: "li",
|
|
2609
2657
|
paddingX: space,
|
|
@@ -2614,16 +2662,16 @@ const StyledBreadcrumbs = styled.ol.withConfig({
|
|
|
2614
2662
|
}), /* @__PURE__ */ jsx(Box, {
|
|
2615
2663
|
as: "li",
|
|
2616
2664
|
children: item
|
|
2617
|
-
})] }, itemIndex), $[
|
|
2618
|
-
} else t7 = $[
|
|
2665
|
+
})] }, itemIndex), $[23] = separator, $[24] = space, $[25] = t8) : t8 = $[25], t7 = items.map(t8), $[19] = items, $[20] = separator, $[21] = space, $[22] = t7;
|
|
2666
|
+
} else t7 = $[22];
|
|
2619
2667
|
let t8;
|
|
2620
|
-
return $[
|
|
2668
|
+
return $[26] !== ref || $[27] !== restProps || $[28] !== t7 ? (t8 = /* @__PURE__ */ jsx(StyledBreadcrumbs, {
|
|
2621
2669
|
"data-ui": "Breadcrumbs",
|
|
2622
2670
|
...restProps,
|
|
2623
2671
|
ref,
|
|
2624
2672
|
children: t7
|
|
2625
|
-
}), $[
|
|
2626
|
-
}
|
|
2673
|
+
}), $[26] = ref, $[27] = restProps, $[28] = t7, $[29] = t8) : t8 = $[29], t8;
|
|
2674
|
+
};
|
|
2627
2675
|
function useItems(t0) {
|
|
2628
2676
|
let $ = c(28), { collapse, expand, expandElementRef, maxLength, open, popoverElementRef, rawItems, space } = t0, len = rawItems.length;
|
|
2629
2677
|
if (maxLength && len > maxLength) {
|
|
@@ -2699,67 +2747,66 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2699
2747
|
}
|
|
2700
2748
|
const StyledContainer = /* @__PURE__ */ styled(Box).withConfig({
|
|
2701
2749
|
displayName: "StyledContainer",
|
|
2702
|
-
componentId: "sc-
|
|
2703
|
-
})(containerBaseStyle, responsiveContainerWidthStyle), Container =
|
|
2704
|
-
let $ = c(
|
|
2705
|
-
$[0] === props ? (as = $[1],
|
|
2750
|
+
componentId: "sc-7akhcd-0"
|
|
2751
|
+
})(containerBaseStyle, responsiveContainerWidthStyle), Container = function Container(props) {
|
|
2752
|
+
let $ = c(12), as, ref, restProps, t0;
|
|
2753
|
+
$[0] === props ? (as = $[1], ref = $[2], restProps = $[3], t0 = $[4]) : ({as, ref, width: t0, ...restProps} = props, $[0] = props, $[1] = as, $[2] = ref, $[3] = restProps, $[4] = t0);
|
|
2706
2754
|
let width = t0 === void 0 ? 2 : t0, t1;
|
|
2707
|
-
$[
|
|
2755
|
+
$[5] === width ? t1 = $[6] : (t1 = _getArrayProp(width), $[5] = width, $[6] = t1);
|
|
2708
2756
|
let t2;
|
|
2709
|
-
return $[
|
|
2757
|
+
return $[7] !== as || $[8] !== ref || $[9] !== restProps || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(StyledContainer, {
|
|
2710
2758
|
"data-ui": "Container",
|
|
2711
2759
|
...restProps,
|
|
2712
2760
|
$width: t1,
|
|
2713
2761
|
forwardedAs: as,
|
|
2714
2762
|
ref
|
|
2715
|
-
}), $[
|
|
2716
|
-
}
|
|
2763
|
+
}), $[7] = as, $[8] = ref, $[9] = restProps, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
2764
|
+
}, StyledLayer$1 = /* @__PURE__ */ styled.div.withConfig({
|
|
2717
2765
|
displayName: "StyledLayer",
|
|
2718
|
-
componentId: "sc-
|
|
2719
|
-
})({ position: "relative" }), LayerChildren =
|
|
2720
|
-
let $ = c(
|
|
2721
|
-
$[0] === props ? (children = $[1],
|
|
2766
|
+
componentId: "sc-omj35q-0"
|
|
2767
|
+
})({ position: "relative" }), LayerChildren = function LayerChildren(props) {
|
|
2768
|
+
let $ = c(23), children, forwardedRef, onActivate, onFocus, restProps, t0;
|
|
2769
|
+
$[0] === props ? (children = $[1], forwardedRef = $[2], onActivate = $[3], onFocus = $[4], restProps = $[5], t0 = $[6]) : ({children, onActivate, onFocus, ref: forwardedRef, style: t0, ...restProps} = props, $[0] = props, $[1] = children, $[2] = forwardedRef, $[3] = onActivate, $[4] = onFocus, $[5] = restProps, $[6] = t0);
|
|
2722
2770
|
let style = t0 === void 0 ? EMPTY_RECORD : t0, { zIndex, isTopLayer } = useLayer(), lastFocusedRef = useRef(null), ref = useRef(null), isTopLayerRef = useRef(isTopLayer), t1;
|
|
2723
|
-
$[
|
|
2771
|
+
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[7] = t1) : t1 = $[7], useImperativeHandle(forwardedRef, t1);
|
|
2724
2772
|
let t2, t3;
|
|
2725
|
-
$[
|
|
2773
|
+
$[8] !== isTopLayer || $[9] !== onActivate ? (t2 = () => {
|
|
2726
2774
|
isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({ activeElement: lastFocusedRef.current }), isTopLayerRef.current = isTopLayer;
|
|
2727
|
-
}, t3 = [isTopLayer, onActivate], $[
|
|
2775
|
+
}, t3 = [isTopLayer, onActivate], $[8] = isTopLayer, $[9] = onActivate, $[10] = t2, $[11] = t3) : (t2 = $[10], t3 = $[11]), useEffect(t2, t3);
|
|
2728
2776
|
let t4;
|
|
2729
|
-
$[
|
|
2777
|
+
$[12] !== isTopLayer || $[13] !== onFocus ? (t4 = (event) => {
|
|
2730
2778
|
onFocus?.(event);
|
|
2731
2779
|
let rootElement = ref.current, target = document.activeElement;
|
|
2732
2780
|
!isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
|
|
2733
|
-
}, $[
|
|
2781
|
+
}, $[12] = isTopLayer, $[13] = onFocus, $[14] = t4) : t4 = $[14];
|
|
2734
2782
|
let handleFocus = t4, t5;
|
|
2735
|
-
$[
|
|
2783
|
+
$[15] !== style || $[16] !== zIndex ? (t5 = {
|
|
2736
2784
|
...style,
|
|
2737
2785
|
zIndex
|
|
2738
|
-
}, $[
|
|
2786
|
+
}, $[15] = style, $[16] = zIndex, $[17] = t5) : t5 = $[17];
|
|
2739
2787
|
let t6;
|
|
2740
|
-
return $[
|
|
2788
|
+
return $[18] !== children || $[19] !== handleFocus || $[20] !== restProps || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledLayer$1, {
|
|
2741
2789
|
...restProps,
|
|
2742
2790
|
"data-ui": "Layer",
|
|
2743
2791
|
onFocus: handleFocus,
|
|
2744
2792
|
ref,
|
|
2745
2793
|
style: t5,
|
|
2746
2794
|
children
|
|
2747
|
-
}), $[
|
|
2748
|
-
}
|
|
2749
|
-
let $ = c(
|
|
2795
|
+
}), $[18] = children, $[19] = handleFocus, $[20] = restProps, $[21] = t5, $[22] = t6) : t6 = $[22], t6;
|
|
2796
|
+
}, Layer = function Layer(props) {
|
|
2797
|
+
let $ = c(10), children, restProps, t0;
|
|
2750
2798
|
$[0] === props ? (children = $[1], restProps = $[2], t0 = $[3]) : ({children, zOffset: t0, ...restProps} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0);
|
|
2751
2799
|
let zOffset = t0 === void 0 ? 1 : t0, t1;
|
|
2752
|
-
$[4] !== children || $[5] !==
|
|
2800
|
+
$[4] !== children || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(LayerChildren, {
|
|
2753
2801
|
...restProps,
|
|
2754
|
-
ref,
|
|
2755
2802
|
children
|
|
2756
|
-
}), $[4] = children, $[5] =
|
|
2803
|
+
}), $[4] = children, $[5] = restProps, $[6] = t1) : t1 = $[6];
|
|
2757
2804
|
let t2;
|
|
2758
|
-
return $[
|
|
2805
|
+
return $[7] !== t1 || $[8] !== zOffset ? (t2 = /* @__PURE__ */ jsx(LayerProvider, {
|
|
2759
2806
|
zOffset,
|
|
2760
2807
|
children: t1
|
|
2761
|
-
}), $[
|
|
2762
|
-
}
|
|
2808
|
+
}), $[7] = t1, $[8] = zOffset, $[9] = t2) : t2 = $[9], t2;
|
|
2809
|
+
};
|
|
2763
2810
|
function dialogStyle({ theme }) {
|
|
2764
2811
|
let { color } = getTheme_v2(theme);
|
|
2765
2812
|
return {
|
|
@@ -2797,27 +2844,27 @@ function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
|
2797
2844
|
}
|
|
2798
2845
|
const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
2799
2846
|
displayName: "StyledDialog",
|
|
2800
|
-
componentId: "sc-
|
|
2847
|
+
componentId: "sc-f4qz6x-0"
|
|
2801
2848
|
})(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styled(Container).withConfig({
|
|
2802
2849
|
displayName: "DialogContainer",
|
|
2803
|
-
componentId: "sc-
|
|
2850
|
+
componentId: "sc-f4qz6x-1"
|
|
2804
2851
|
})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`, DialogCardRoot = styled(Card).withConfig({
|
|
2805
2852
|
displayName: "DialogCardRoot",
|
|
2806
|
-
componentId: "sc-
|
|
2853
|
+
componentId: "sc-f4qz6x-2"
|
|
2807
2854
|
})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`, DialogLayout = styled(Flex).withConfig({
|
|
2808
2855
|
displayName: "DialogLayout",
|
|
2809
|
-
componentId: "sc-
|
|
2856
|
+
componentId: "sc-f4qz6x-3"
|
|
2810
2857
|
})`flex:1;min-height:0;width:100%;`, DialogHeader = styled(Box).withConfig({
|
|
2811
2858
|
displayName: "DialogHeader",
|
|
2812
|
-
componentId: "sc-
|
|
2859
|
+
componentId: "sc-f4qz6x-4"
|
|
2813
2860
|
})`position:relative;z-index:2;`, DialogContent = styled(Box).withConfig({
|
|
2814
2861
|
displayName: "DialogContent",
|
|
2815
|
-
componentId: "sc-
|
|
2862
|
+
componentId: "sc-f4qz6x-5"
|
|
2816
2863
|
})`position:relative;z-index:1;overflow:auto;outline:none;`, DialogFooter = styled(Box).withConfig({
|
|
2817
2864
|
displayName: "DialogFooter",
|
|
2818
|
-
componentId: "sc-
|
|
2819
|
-
})`position:relative;z-index:3;`, DialogCard =
|
|
2820
|
-
let $ = c(44), { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, children, contentRef: forwardedContentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: radiusProp, scheme, shadow: shadowProp, width: widthProp } = props, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, t0;
|
|
2865
|
+
componentId: "sc-f4qz6x-6"
|
|
2866
|
+
})`position:relative;z-index:3;`, DialogCard = function DialogCard(props) {
|
|
2867
|
+
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;
|
|
2821
2868
|
$[0] === radiusProp ? t0 = $[1] : (t0 = _getArrayProp(radiusProp), $[0] = radiusProp, $[1] = t0);
|
|
2822
2869
|
let radius = t0, t1;
|
|
2823
2870
|
$[2] === shadowProp ? t1 = $[3] : (t1 = _getArrayProp(shadowProp), $[2] = shadowProp, $[3] = t1);
|
|
@@ -2901,21 +2948,21 @@ const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
|
2901
2948
|
width,
|
|
2902
2949
|
children: t14
|
|
2903
2950
|
}), $[41] = t14, $[42] = width, $[43] = t15) : t15 = $[43], t15;
|
|
2904
|
-
}
|
|
2905
|
-
let $ = c(
|
|
2906
|
-
$[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],
|
|
2951
|
+
}, Dialog = function Dialog(props) {
|
|
2952
|
+
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;
|
|
2953
|
+
$[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);
|
|
2907
2954
|
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;
|
|
2908
|
-
$[
|
|
2955
|
+
$[23] === cardRadiusProp ? t7 = $[24] : (t7 = _getArrayProp(cardRadiusProp), $[23] = cardRadiusProp, $[24] = t7);
|
|
2909
2956
|
let cardRadius = t7, t8;
|
|
2910
|
-
$[
|
|
2957
|
+
$[25] === paddingProp ? t8 = $[26] : (t8 = _getArrayProp(paddingProp), $[25] = paddingProp, $[26] = t8);
|
|
2911
2958
|
let padding = t8, t9;
|
|
2912
|
-
$[
|
|
2959
|
+
$[27] === positionProp ? t9 = $[28] : (t9 = _getArrayProp(positionProp), $[27] = positionProp, $[28] = t9);
|
|
2913
2960
|
let position = t9, t10;
|
|
2914
|
-
$[
|
|
2961
|
+
$[29] === widthProp ? t10 = $[30] : (t10 = _getArrayProp(widthProp), $[29] = widthProp, $[30] = t10);
|
|
2915
2962
|
let width = t10, t11;
|
|
2916
|
-
$[
|
|
2963
|
+
$[31] === zOffsetProp ? t11 = $[32] : (t11 = _getArrayProp(zOffsetProp), $[31] = zOffsetProp, $[32] = t11);
|
|
2917
2964
|
let zOffset = t11, preDivRef = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null), t12;
|
|
2918
|
-
$[
|
|
2965
|
+
$[33] === onFocus ? t12 = $[34] : (t12 = (event) => {
|
|
2919
2966
|
onFocus?.(event);
|
|
2920
2967
|
let target = event.target, cardElement = cardRef.current;
|
|
2921
2968
|
if (cardElement && target === preDivRef.current) {
|
|
@@ -2927,9 +2974,9 @@ const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
|
2927
2974
|
return;
|
|
2928
2975
|
}
|
|
2929
2976
|
isHTMLElement(event.target) && (focusedElementRef.current = event.target);
|
|
2930
|
-
}, $[
|
|
2977
|
+
}, $[33] = onFocus, $[34] = t12);
|
|
2931
2978
|
let handleFocus = t12, labelId = `${id}_label`, rootClickTimeoutRef = useRef(void 0), t13;
|
|
2932
|
-
$[
|
|
2979
|
+
$[35] !== boundaryElement || $[36] !== portalElement ? (t13 = () => {
|
|
2933
2980
|
rootClickTimeoutRef.current && clearTimeout(rootClickTimeoutRef.current), rootClickTimeoutRef.current = setTimeout(() => {
|
|
2934
2981
|
let activeElement = document.activeElement;
|
|
2935
2982
|
if (activeElement && !isTargetWithinScope(boundaryElement, portalElement, activeElement)) {
|
|
@@ -2942,14 +2989,14 @@ const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
|
2942
2989
|
target_0.focus();
|
|
2943
2990
|
}
|
|
2944
2991
|
}, 0);
|
|
2945
|
-
}, $[
|
|
2992
|
+
}, $[35] = boundaryElement, $[36] = portalElement, $[37] = t13) : t13 = $[37];
|
|
2946
2993
|
let handleRootClick = t13, t14;
|
|
2947
|
-
$[
|
|
2994
|
+
$[38] === Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsx("div", {
|
|
2948
2995
|
ref: preDivRef,
|
|
2949
2996
|
tabIndex: 0
|
|
2950
|
-
}), $[
|
|
2997
|
+
}), $[38] = t14) : t14 = $[38];
|
|
2951
2998
|
let t15;
|
|
2952
|
-
$[
|
|
2999
|
+
$[39] !== autoFocus || $[40] !== cardRadius || $[41] !== cardShadow || $[42] !== children || $[43] !== contentRef || $[44] !== footer || $[45] !== header || $[46] !== hideCloseButton || $[47] !== id || $[48] !== onClickOutside || $[49] !== onClose || $[50] !== portalProp || $[51] !== scheme || $[52] !== width ? (t15 = /* @__PURE__ */ jsx(DialogCard, {
|
|
2953
3000
|
__unstable_autoFocus: autoFocus,
|
|
2954
3001
|
__unstable_hideCloseButton: hideCloseButton,
|
|
2955
3002
|
contentRef,
|
|
@@ -2965,14 +3012,14 @@ const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
|
2965
3012
|
shadow: cardShadow,
|
|
2966
3013
|
width,
|
|
2967
3014
|
children
|
|
2968
|
-
}), $[
|
|
3015
|
+
}), $[39] = autoFocus, $[40] = cardRadius, $[41] = cardShadow, $[42] = children, $[43] = contentRef, $[44] = footer, $[45] = header, $[46] = hideCloseButton, $[47] = id, $[48] = onClickOutside, $[49] = onClose, $[50] = portalProp, $[51] = scheme, $[52] = width, $[53] = t15) : t15 = $[53];
|
|
2969
3016
|
let t16;
|
|
2970
|
-
$[
|
|
3017
|
+
$[54] === Symbol.for("react.memo_cache_sentinel") ? (t16 = /* @__PURE__ */ jsx("div", {
|
|
2971
3018
|
ref: postDivRef,
|
|
2972
3019
|
tabIndex: 0
|
|
2973
|
-
}), $[
|
|
3020
|
+
}), $[54] = t16) : t16 = $[54];
|
|
2974
3021
|
let t17;
|
|
2975
|
-
$[
|
|
3022
|
+
$[55] !== animate || $[56] !== handleFocus || $[57] !== handleRootClick || $[58] !== id || $[59] !== labelId || $[60] !== onActivate || $[61] !== padding || $[62] !== position || $[63] !== ref || $[64] !== restProps || $[65] !== t15 || $[66] !== zOffset ? (t17 = /* @__PURE__ */ jsxs(StyledDialog, {
|
|
2976
3023
|
...restProps,
|
|
2977
3024
|
$animate: animate,
|
|
2978
3025
|
$padding: padding,
|
|
@@ -2992,13 +3039,13 @@ const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
|
2992
3039
|
t15,
|
|
2993
3040
|
t16
|
|
2994
3041
|
]
|
|
2995
|
-
}), $[
|
|
3042
|
+
}), $[55] = animate, $[56] = handleFocus, $[57] = handleRootClick, $[58] = id, $[59] = labelId, $[60] = onActivate, $[61] = padding, $[62] = position, $[63] = ref, $[64] = restProps, $[65] = t15, $[66] = zOffset, $[67] = t17) : t17 = $[67];
|
|
2996
3043
|
let t18;
|
|
2997
|
-
return $[
|
|
3044
|
+
return $[68] !== portalProp || $[69] !== t17 ? (t18 = /* @__PURE__ */ jsx(Portal, {
|
|
2998
3045
|
__unstable_name: portalProp,
|
|
2999
3046
|
children: t17
|
|
3000
|
-
}), $[
|
|
3001
|
-
}
|
|
3047
|
+
}), $[68] = portalProp, $[69] = t17, $[70] = t18) : t18 = $[70], t18;
|
|
3048
|
+
};
|
|
3002
3049
|
/**
|
|
3003
3050
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
3004
3051
|
* @beta
|
|
@@ -3038,24 +3085,24 @@ function inlineSpaceStyle(props) {
|
|
|
3038
3085
|
}
|
|
3039
3086
|
const StyledInline = /* @__PURE__ */ styled(Box).withConfig({
|
|
3040
3087
|
displayName: "StyledInline",
|
|
3041
|
-
componentId: "sc-
|
|
3042
|
-
})(inlineBaseStyle, inlineSpaceStyle), Inline =
|
|
3043
|
-
let $ = c(
|
|
3044
|
-
$[0] === props ? (as = $[1], childrenProp = $[2], gap = $[3],
|
|
3088
|
+
componentId: "sc-3t6t7g-0"
|
|
3089
|
+
})(inlineBaseStyle, inlineSpaceStyle), Inline = function Inline(props) {
|
|
3090
|
+
let $ = c(16), as, childrenProp, gap, ref, restProps;
|
|
3091
|
+
$[0] === props ? (as = $[1], childrenProp = $[2], gap = $[3], ref = $[4], restProps = $[5]) : ({as, children: childrenProp, gap, ref, ...restProps} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = gap, $[4] = ref, $[5] = restProps);
|
|
3045
3092
|
let t0;
|
|
3046
|
-
$[
|
|
3093
|
+
$[6] === childrenProp ? t0 = $[7] : (t0 = Children.map(childrenProp, _temp$9), $[6] = childrenProp, $[7] = t0);
|
|
3047
3094
|
let children = t0, t1;
|
|
3048
|
-
$[
|
|
3049
|
-
let t2
|
|
3050
|
-
return $[
|
|
3095
|
+
$[8] === gap ? t1 = $[9] : (t1 = _getArrayProp(gap), $[8] = gap, $[9] = t1);
|
|
3096
|
+
let t2;
|
|
3097
|
+
return $[10] !== as || $[11] !== children || $[12] !== ref || $[13] !== restProps || $[14] !== t1 ? (t2 = /* @__PURE__ */ jsx(StyledInline, {
|
|
3051
3098
|
"data-ui": "Inline",
|
|
3052
3099
|
...restProps,
|
|
3053
3100
|
$space: t1,
|
|
3054
3101
|
forwardedAs: as,
|
|
3055
|
-
ref
|
|
3102
|
+
ref,
|
|
3056
3103
|
children
|
|
3057
|
-
}), $[
|
|
3058
|
-
}
|
|
3104
|
+
}), $[10] = as, $[11] = children, $[12] = ref, $[13] = restProps, $[14] = t1, $[15] = t2) : t2 = $[15], t2;
|
|
3105
|
+
};
|
|
3059
3106
|
function _temp$9(child) {
|
|
3060
3107
|
return child && /* @__PURE__ */ jsx("div", { children: child });
|
|
3061
3108
|
}
|
|
@@ -3064,73 +3111,73 @@ function kbdStyle() {
|
|
|
3064
3111
|
}
|
|
3065
3112
|
const StyledKBD = /* @__PURE__ */ styled.kbd.withConfig({
|
|
3066
3113
|
displayName: "StyledKBD",
|
|
3067
|
-
componentId: "sc-
|
|
3068
|
-
})(responsiveRadiusStyle, kbdStyle), KBD =
|
|
3069
|
-
let $ = c(
|
|
3070
|
-
$[0] === props ? (children = $[1],
|
|
3114
|
+
componentId: "sc-yqxdiu-0"
|
|
3115
|
+
})(responsiveRadiusStyle, kbdStyle), KBD = function KBD(props) {
|
|
3116
|
+
let $ = c(20), children, ref, restProps, t0, t1, t2;
|
|
3117
|
+
$[0] === props ? (children = $[1], ref = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6]) : ({children, fontSize: t0, padding: t1, radius: t2, ref, ...restProps} = props, $[0] = props, $[1] = children, $[2] = ref, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2);
|
|
3071
3118
|
let fontSize = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? 2 : t2, t3;
|
|
3072
|
-
$[
|
|
3119
|
+
$[7] === radius ? t3 = $[8] : (t3 = _getArrayProp(radius), $[7] = radius, $[8] = t3);
|
|
3073
3120
|
let t4;
|
|
3074
|
-
$[
|
|
3121
|
+
$[9] !== children || $[10] !== fontSize ? (t4 = /* @__PURE__ */ jsx(Text, {
|
|
3075
3122
|
as: "span",
|
|
3076
3123
|
size: fontSize,
|
|
3077
3124
|
weight: "semibold",
|
|
3078
3125
|
children
|
|
3079
|
-
}), $[
|
|
3126
|
+
}), $[9] = children, $[10] = fontSize, $[11] = t4) : t4 = $[11];
|
|
3080
3127
|
let t5;
|
|
3081
|
-
$[
|
|
3128
|
+
$[12] !== padding || $[13] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, {
|
|
3082
3129
|
as: "span",
|
|
3083
3130
|
padding,
|
|
3084
3131
|
children: t4
|
|
3085
|
-
}), $[
|
|
3132
|
+
}), $[12] = padding, $[13] = t4, $[14] = t5) : t5 = $[14];
|
|
3086
3133
|
let t6;
|
|
3087
|
-
return $[
|
|
3134
|
+
return $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledKBD, {
|
|
3088
3135
|
"data-ui": "KBD",
|
|
3089
3136
|
...restProps,
|
|
3090
3137
|
$radius: t3,
|
|
3091
3138
|
ref,
|
|
3092
3139
|
children: t5
|
|
3093
|
-
}), $[
|
|
3094
|
-
}
|
|
3140
|
+
}), $[15] = ref, $[16] = restProps, $[17] = t3, $[18] = t5, $[19] = t6) : t6 = $[19], t6;
|
|
3141
|
+
}, StyledHotkeys = styled.kbd.withConfig({
|
|
3095
3142
|
displayName: "StyledHotkeys",
|
|
3096
|
-
componentId: "sc-
|
|
3143
|
+
componentId: "sc-qvwif3-0"
|
|
3097
3144
|
})`font:inherit;padding:1px;&:not([hidden]){display:block;}`, Key = styled(KBD).withConfig({
|
|
3098
3145
|
displayName: "Key",
|
|
3099
|
-
componentId: "sc-
|
|
3100
|
-
})`&:not([hidden]){display:block;}`, Hotkeys =
|
|
3101
|
-
let $ = c(
|
|
3102
|
-
$[0] === props ? (fontSize = $[1], keys = $[2], padding = $[3], radius = $[4],
|
|
3146
|
+
componentId: "sc-qvwif3-1"
|
|
3147
|
+
})`&:not([hidden]){display:block;}`, Hotkeys = function Hotkeys(props) {
|
|
3148
|
+
let $ = c(27), fontSize, keys, padding, radius, ref, restProps, t0;
|
|
3149
|
+
$[0] === props ? (fontSize = $[1], keys = $[2], padding = $[3], radius = $[4], ref = $[5], restProps = $[6], t0 = $[7]) : ({fontSize, gap: t0, keys, padding, radius, ref, ...restProps} = props, $[0] = props, $[1] = fontSize, $[2] = keys, $[3] = padding, $[4] = radius, $[5] = ref, $[6] = restProps, $[7] = t0);
|
|
3103
3150
|
let gap = t0 === void 0 ? .5 : t0, t1;
|
|
3104
|
-
$[
|
|
3151
|
+
$[8] === gap ? t1 = $[9] : (t1 = _getArrayProp(gap), $[8] = gap, $[9] = t1);
|
|
3105
3152
|
let spacing = t1;
|
|
3106
3153
|
if (!keys || keys.length === 0) {
|
|
3107
3154
|
let t2;
|
|
3108
|
-
return $[
|
|
3155
|
+
return $[10] === Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ jsx(Fragment$1, {}), $[10] = t2) : t2 = $[10], t2;
|
|
3109
3156
|
}
|
|
3110
3157
|
let t2;
|
|
3111
|
-
if ($[
|
|
3158
|
+
if ($[11] !== fontSize || $[12] !== keys || $[13] !== padding || $[14] !== radius) {
|
|
3112
3159
|
let t3;
|
|
3113
|
-
$[
|
|
3160
|
+
$[16] !== fontSize || $[17] !== padding || $[18] !== radius ? (t3 = (key, i) => /* @__PURE__ */ jsx(Key, {
|
|
3114
3161
|
fontSize,
|
|
3115
3162
|
padding,
|
|
3116
3163
|
radius,
|
|
3117
3164
|
children: key
|
|
3118
|
-
}, i), $[
|
|
3119
|
-
} else t2 = $[
|
|
3165
|
+
}, i), $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t3) : t3 = $[19], t2 = keys.map(t3), $[11] = fontSize, $[12] = keys, $[13] = padding, $[14] = radius, $[15] = t2;
|
|
3166
|
+
} else t2 = $[15];
|
|
3120
3167
|
let t3;
|
|
3121
|
-
$[
|
|
3168
|
+
$[20] !== spacing || $[21] !== t2 ? (t3 = /* @__PURE__ */ jsx(Inline, {
|
|
3122
3169
|
as: "span",
|
|
3123
3170
|
gap: spacing,
|
|
3124
3171
|
children: t2
|
|
3125
|
-
}), $[
|
|
3172
|
+
}), $[20] = spacing, $[21] = t2, $[22] = t3) : t3 = $[22];
|
|
3126
3173
|
let t4;
|
|
3127
|
-
return $[
|
|
3174
|
+
return $[23] !== ref || $[24] !== restProps || $[25] !== t3 ? (t4 = /* @__PURE__ */ jsx(StyledHotkeys, {
|
|
3128
3175
|
"data-ui": "Hotkeys",
|
|
3129
3176
|
...restProps,
|
|
3130
3177
|
ref,
|
|
3131
3178
|
children: t3
|
|
3132
|
-
}), $[
|
|
3133
|
-
}
|
|
3179
|
+
}), $[23] = ref, $[24] = restProps, $[25] = t3, $[26] = t4) : t4 = $[26], t4;
|
|
3180
|
+
}, MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
|
|
3134
3181
|
/**
|
|
3135
3182
|
* @internal
|
|
3136
3183
|
*/
|
|
@@ -3178,7 +3225,7 @@ function _sortElements(rootElement, elements) {
|
|
|
3178
3225
|
* @internal
|
|
3179
3226
|
*/
|
|
3180
3227
|
function useMenuController(props) {
|
|
3181
|
-
let $ = c(
|
|
3228
|
+
let $ = c(23), { onKeyDown, originElement, shouldFocus, rootElementRef } = props, t0;
|
|
3182
3229
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = [], $[0] = t0) : t0 = $[0];
|
|
3183
3230
|
let elementsRef = useRef(t0), [activeIndex, _setActiveIndex] = useState(-1), activeIndexRef = useRef(activeIndex), [activeElement, setActiveElement] = useState(null), t1;
|
|
3184
3231
|
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = (nextActiveIndex) => {
|
|
@@ -3196,8 +3243,10 @@ function useMenuController(props) {
|
|
|
3196
3243
|
idx > -1 && elementsRef.current.splice(idx, 1);
|
|
3197
3244
|
};
|
|
3198
3245
|
}, $[2] = rootElementRef, $[3] = t2);
|
|
3199
|
-
let mount = t2, t3;
|
|
3200
|
-
$[4]
|
|
3246
|
+
let mount = t2, t3, t4;
|
|
3247
|
+
$[4] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => () => setActiveIndex(-1), t4 = [setActiveIndex], $[4] = t3, $[5] = t4) : (t3 = $[4], t4 = $[5]), useEffect(t3, t4);
|
|
3248
|
+
let t5;
|
|
3249
|
+
$[6] !== onKeyDown || $[7] !== originElement ? (t5 = (event) => {
|
|
3201
3250
|
if (event.key === "Tab") {
|
|
3202
3251
|
originElement && originElement.focus();
|
|
3203
3252
|
return;
|
|
@@ -3239,18 +3288,18 @@ function useMenuController(props) {
|
|
|
3239
3288
|
return;
|
|
3240
3289
|
}
|
|
3241
3290
|
onKeyDown && onKeyDown(event);
|
|
3242
|
-
}, $[
|
|
3243
|
-
let handleKeyDown =
|
|
3244
|
-
$[
|
|
3291
|
+
}, $[6] = onKeyDown, $[7] = originElement, $[8] = t5) : t5 = $[8];
|
|
3292
|
+
let handleKeyDown = t5, t6;
|
|
3293
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t6 = (event_0) => {
|
|
3245
3294
|
let element_0 = event_0.currentTarget, currentIndex_3 = elementsRef.current.indexOf(element_0);
|
|
3246
3295
|
setActiveIndex(currentIndex_3);
|
|
3247
|
-
}, $[
|
|
3248
|
-
let handleItemMouseEnter =
|
|
3249
|
-
$[
|
|
3296
|
+
}, $[9] = t6) : t6 = $[9];
|
|
3297
|
+
let handleItemMouseEnter = t6, t7;
|
|
3298
|
+
$[10] === rootElementRef ? t7 = $[11] : (t7 = () => {
|
|
3250
3299
|
setActiveIndex(-2), rootElementRef.current?.focus();
|
|
3251
|
-
}, $[
|
|
3252
|
-
let handleItemMouseLeave =
|
|
3253
|
-
$[
|
|
3300
|
+
}, $[10] = rootElementRef, $[11] = t7);
|
|
3301
|
+
let handleItemMouseLeave = t7, t8, t9;
|
|
3302
|
+
$[12] !== activeIndex || $[13] !== rootElementRef || $[14] !== shouldFocus ? (t8 = () => {
|
|
3254
3303
|
if (!rootElementRef.current) return;
|
|
3255
3304
|
let rafId = requestAnimationFrame(() => {
|
|
3256
3305
|
if (activeIndex === -1) {
|
|
@@ -3273,54 +3322,54 @@ function useMenuController(props) {
|
|
|
3273
3322
|
(elementsRef.current[activeIndex] || null)?.focus();
|
|
3274
3323
|
});
|
|
3275
3324
|
return () => cancelAnimationFrame(rafId);
|
|
3276
|
-
},
|
|
3325
|
+
}, t9 = [
|
|
3277
3326
|
activeIndex,
|
|
3278
3327
|
rootElementRef,
|
|
3279
3328
|
setActiveIndex,
|
|
3280
3329
|
shouldFocus
|
|
3281
|
-
], $[
|
|
3282
|
-
let
|
|
3283
|
-
return $[
|
|
3330
|
+
], $[12] = activeIndex, $[13] = rootElementRef, $[14] = shouldFocus, $[15] = t8, $[16] = t9) : (t8 = $[15], t9 = $[16]), useEffect(t8, t9);
|
|
3331
|
+
let t10;
|
|
3332
|
+
return $[17] !== activeElement || $[18] !== activeIndex || $[19] !== handleItemMouseLeave || $[20] !== handleKeyDown || $[21] !== mount ? (t10 = {
|
|
3284
3333
|
activeElement,
|
|
3285
3334
|
activeIndex,
|
|
3286
3335
|
handleItemMouseEnter,
|
|
3287
3336
|
handleItemMouseLeave,
|
|
3288
3337
|
handleKeyDown,
|
|
3289
3338
|
mount
|
|
3290
|
-
}, $[
|
|
3339
|
+
}, $[17] = activeElement, $[18] = activeIndex, $[19] = handleItemMouseLeave, $[20] = handleKeyDown, $[21] = mount, $[22] = t10) : t10 = $[22], t10;
|
|
3291
3340
|
}
|
|
3292
3341
|
function _temp$8() {}
|
|
3293
3342
|
const StyledMenu = styled(Box).withConfig({
|
|
3294
3343
|
displayName: "StyledMenu",
|
|
3295
|
-
componentId: "sc-
|
|
3296
|
-
})`outline:none;overflow:auto;`, Menu =
|
|
3297
|
-
let $ = c(
|
|
3298
|
-
$[0] === props ? (children = $[1],
|
|
3344
|
+
componentId: "sc-1dh4ar-0"
|
|
3345
|
+
})`outline:none;overflow:auto;`, Menu = function Menu(props) {
|
|
3346
|
+
let $ = c(50), children, forwardedRef, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1, t2;
|
|
3347
|
+
$[0] === props ? (children = $[1], forwardedRef = $[2], onClickOutside = $[3], onEscape = $[4], onItemClick = $[5], onItemSelect = $[6], onKeyDown = $[7], originElement = $[8], registerElement = $[9], restProps = $[10], t0 = $[11], t1 = $[12], t2 = $[13]) : ({children, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, padding: t0, ref: forwardedRef, registerElement, shouldFocus: t1, gap: t2, ...restProps} = props, $[0] = props, $[1] = children, $[2] = forwardedRef, $[3] = onClickOutside, $[4] = onEscape, $[5] = onItemClick, $[6] = onItemSelect, $[7] = onKeyDown, $[8] = originElement, $[9] = registerElement, $[10] = restProps, $[11] = t0, $[12] = t1, $[13] = t2);
|
|
3299
3348
|
let padding = t0 === void 0 ? 1 : t0, shouldFocus = t1 === void 0 ? null : t1, gap = t2 === void 0 ? 1 : t2, ref = useRef(null), t3;
|
|
3300
|
-
$[
|
|
3349
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => ref.current, $[14] = t3) : t3 = $[14], useImperativeHandle(forwardedRef, t3);
|
|
3301
3350
|
let { isTopLayer } = useLayer(), t4;
|
|
3302
|
-
$[
|
|
3351
|
+
$[15] !== onKeyDown || $[16] !== originElement || $[17] !== shouldFocus ? (t4 = {
|
|
3303
3352
|
onKeyDown,
|
|
3304
3353
|
originElement,
|
|
3305
3354
|
shouldFocus,
|
|
3306
3355
|
rootElementRef: ref
|
|
3307
|
-
}, $[
|
|
3356
|
+
}, $[15] = onKeyDown, $[16] = originElement, $[17] = shouldFocus, $[18] = t4) : t4 = $[18];
|
|
3308
3357
|
let { activeElement, activeIndex, handleItemMouseEnter, handleItemMouseLeave, handleKeyDown, mount } = useMenuController(t4), unregisterElementRef = useRef(null), t5;
|
|
3309
|
-
$[
|
|
3358
|
+
$[19] === registerElement ? t5 = $[20] : (t5 = (el) => {
|
|
3310
3359
|
unregisterElementRef.current &&= (unregisterElementRef.current(), null), ref.current = el, ref.current && registerElement && (unregisterElementRef.current = registerElement(ref.current));
|
|
3311
|
-
}, $[
|
|
3360
|
+
}, $[19] = registerElement, $[20] = t5);
|
|
3312
3361
|
let handleRefChange = t5, t6, t7;
|
|
3313
|
-
$[
|
|
3362
|
+
$[21] !== activeIndex || $[22] !== onItemSelect ? (t6 = () => {
|
|
3314
3363
|
onItemSelect && onItemSelect(activeIndex);
|
|
3315
|
-
}, t7 = [activeIndex, onItemSelect], $[
|
|
3364
|
+
}, t7 = [activeIndex, onItemSelect], $[21] = activeIndex, $[22] = onItemSelect, $[23] = t6, $[24] = t7) : (t6 = $[23], t7 = $[24]), useEffect(t6, t7);
|
|
3316
3365
|
let t8;
|
|
3317
|
-
$[
|
|
3366
|
+
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => [ref.current], $[25] = t8) : t8 = $[25], useClickOutsideEvent(isTopLayer && onClickOutside, t8);
|
|
3318
3367
|
let t9;
|
|
3319
|
-
$[
|
|
3368
|
+
$[26] !== isTopLayer || $[27] !== onEscape ? (t9 = (event) => {
|
|
3320
3369
|
isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
|
|
3321
|
-
}, $[
|
|
3370
|
+
}, $[26] = isTopLayer, $[27] = onEscape, $[28] = t9) : t9 = $[28], useGlobalKeyDown(t9);
|
|
3322
3371
|
let t10;
|
|
3323
|
-
$[
|
|
3372
|
+
$[29] !== activeElement || $[30] !== handleItemMouseEnter || $[31] !== handleItemMouseLeave || $[32] !== mount || $[33] !== onClickOutside || $[34] !== onEscape || $[35] !== onItemClick || $[36] !== registerElement ? (t10 = {
|
|
3324
3373
|
version: 2,
|
|
3325
3374
|
activeElement,
|
|
3326
3375
|
mount,
|
|
@@ -3330,14 +3379,14 @@ const StyledMenu = styled(Box).withConfig({
|
|
|
3330
3379
|
onItemMouseEnter: handleItemMouseEnter,
|
|
3331
3380
|
onItemMouseLeave: handleItemMouseLeave,
|
|
3332
3381
|
registerElement
|
|
3333
|
-
}, $[
|
|
3382
|
+
}, $[29] = activeElement, $[30] = handleItemMouseEnter, $[31] = handleItemMouseLeave, $[32] = mount, $[33] = onClickOutside, $[34] = onEscape, $[35] = onItemClick, $[36] = registerElement, $[37] = t10) : t10 = $[37];
|
|
3334
3383
|
let value = t10, t11;
|
|
3335
|
-
$[
|
|
3384
|
+
$[38] !== children || $[39] !== gap ? (t11 = /* @__PURE__ */ jsx(Stack, {
|
|
3336
3385
|
gap,
|
|
3337
3386
|
children
|
|
3338
|
-
}), $[
|
|
3387
|
+
}), $[38] = children, $[39] = gap, $[40] = t11) : t11 = $[40];
|
|
3339
3388
|
let t12;
|
|
3340
|
-
$[
|
|
3389
|
+
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t11 ? (t12 = /* @__PURE__ */ jsx(StyledMenu, {
|
|
3341
3390
|
"data-ui": "Menu",
|
|
3342
3391
|
...restProps,
|
|
3343
3392
|
onKeyDown: handleKeyDown,
|
|
@@ -3346,14 +3395,14 @@ const StyledMenu = styled(Box).withConfig({
|
|
|
3346
3395
|
role: "menu",
|
|
3347
3396
|
tabIndex: -1,
|
|
3348
3397
|
children: t11
|
|
3349
|
-
}), $[
|
|
3398
|
+
}), $[41] = handleKeyDown, $[42] = handleRefChange, $[43] = padding, $[44] = restProps, $[45] = t11, $[46] = t12) : t12 = $[46];
|
|
3350
3399
|
let t13;
|
|
3351
|
-
return $[
|
|
3400
|
+
return $[47] !== t12 || $[48] !== value ? (t13 = /* @__PURE__ */ jsx(MenuContext.Provider, {
|
|
3352
3401
|
value,
|
|
3353
3402
|
children: t12
|
|
3354
|
-
}), $[
|
|
3355
|
-
}
|
|
3356
|
-
let $ = c(56), { __unstable_disableRestoreFocusOnClose: t0, button: buttonProp, id, menu: menuProp, onClose, onOpen, popover } = props, disableRestoreFocusOnClose = t0 !== void 0 && t0, [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), [buttonElement, setButtonElement] = useState(null), t1;
|
|
3403
|
+
}), $[47] = t12, $[48] = value, $[49] = t13) : t13 = $[49], t13;
|
|
3404
|
+
}, MenuButton = function MenuButton(props) {
|
|
3405
|
+
let $ = c(56), { __unstable_disableRestoreFocusOnClose: t0, button: buttonProp, id, menu: menuProp, onClose, onOpen, popover, ref: forwardedRef } = props, disableRestoreFocusOnClose = t0 !== void 0 && t0, [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), [buttonElement, setButtonElement] = useState(null), t1;
|
|
3357
3406
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = [], $[0] = t1) : t1 = $[0];
|
|
3358
3407
|
let [menuElements, setChildMenuElements] = useState(t1), openRef = useRef(open), t2, t3;
|
|
3359
3408
|
$[1] !== onOpen || $[2] !== open ? (t2 = () => {
|
|
@@ -3455,7 +3504,7 @@ const StyledMenu = styled(Box).withConfig({
|
|
|
3455
3504
|
open,
|
|
3456
3505
|
children: t22
|
|
3457
3506
|
}), $[51] = menu, $[52] = open, $[53] = popoverProps, $[54] = t22, $[55] = t23) : t23 = $[55], t23;
|
|
3458
|
-
}
|
|
3507
|
+
};
|
|
3459
3508
|
function _temp$7(v) {
|
|
3460
3509
|
return !v;
|
|
3461
3510
|
}
|
|
@@ -3610,23 +3659,23 @@ const MenuGroup = function MenuGroup(props) {
|
|
|
3610
3659
|
open,
|
|
3611
3660
|
children: t31
|
|
3612
3661
|
}), $[76] = childMenu, $[77] = open, $[78] = popover, $[79] = t31, $[80] = t32) : t32 = $[80], t32;
|
|
3613
|
-
}, MenuItem =
|
|
3614
|
-
let $ = c(
|
|
3615
|
-
$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4],
|
|
3662
|
+
}, MenuItem = function MenuItem(props) {
|
|
3663
|
+
let $ = c(76), IconComponent, IconRightComponent, children, disabled, forwardedRef, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
|
|
3664
|
+
$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], forwardedRef = $[5], hotkeys = $[6], onClick = $[7], paddingBottom = $[8], paddingLeft = $[9], paddingRight = $[10], paddingTop = $[11], paddingX = $[12], paddingY = $[13], pressed = $[14], restProps = $[15], selectedProp = $[16], t0 = $[17], t1 = $[18], t2 = $[19], t3 = $[20], t4 = $[21], t5 = $[22], text = $[23]) : ({as: t0, children, disabled, fontSize: t1, hotkeys, icon: IconComponent, iconRight: IconRightComponent, onClick, padding: t2, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, pressed, radius: t3, ref: forwardedRef, selected: selectedProp, gap: t4, text, tone: t5, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = forwardedRef, $[6] = hotkeys, $[7] = onClick, $[8] = paddingBottom, $[9] = paddingLeft, $[10] = paddingRight, $[11] = paddingTop, $[12] = paddingX, $[13] = paddingY, $[14] = pressed, $[15] = restProps, $[16] = selectedProp, $[17] = t0, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4, $[22] = t5, $[23] = text);
|
|
3616
3665
|
let as = t0 === void 0 ? "button" : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, gap = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, { scheme } = useRootTheme(), menu = useMenu(), { activeElement, mount, onItemClick, onItemMouseEnter: _onItemMouseEnter, onItemMouseLeave: _onItemMouseLeave } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onItemMouseLeave, [rootElement, setRootElement] = useState(null), active = !!activeElement && activeElement === rootElement, ref = useRef(null), t6;
|
|
3617
|
-
$[
|
|
3666
|
+
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[24] = t6) : t6 = $[24], useImperativeHandle(forwardedRef, t6);
|
|
3618
3667
|
let t7, t8;
|
|
3619
|
-
$[
|
|
3668
|
+
$[25] !== mount || $[26] !== rootElement || $[27] !== selectedProp ? (t7 = () => mount(rootElement, selectedProp), t8 = [
|
|
3620
3669
|
mount,
|
|
3621
3670
|
rootElement,
|
|
3622
3671
|
selectedProp
|
|
3623
|
-
], $[
|
|
3672
|
+
], $[25] = mount, $[26] = rootElement, $[27] = selectedProp, $[28] = t7, $[29] = t8) : (t7 = $[28], t8 = $[29]), useEffect(t7, t8);
|
|
3624
3673
|
let t9;
|
|
3625
|
-
$[
|
|
3674
|
+
$[30] !== disabled || $[31] !== onClick || $[32] !== onItemClick ? (t9 = (event) => {
|
|
3626
3675
|
disabled || (onClick && onClick(event), onItemClick && onItemClick());
|
|
3627
|
-
}, $[
|
|
3676
|
+
}, $[30] = disabled, $[31] = onClick, $[32] = onItemClick, $[33] = t9) : t9 = $[33];
|
|
3628
3677
|
let handleClick = t9, t10;
|
|
3629
|
-
$[
|
|
3678
|
+
$[34] !== padding || $[35] !== paddingBottom || $[36] !== paddingLeft || $[37] !== paddingRight || $[38] !== paddingTop || $[39] !== paddingX || $[40] !== paddingY ? (t10 = {
|
|
3630
3679
|
padding,
|
|
3631
3680
|
paddingX,
|
|
3632
3681
|
paddingY,
|
|
@@ -3634,19 +3683,19 @@ const MenuGroup = function MenuGroup(props) {
|
|
|
3634
3683
|
paddingRight,
|
|
3635
3684
|
paddingBottom,
|
|
3636
3685
|
paddingLeft
|
|
3637
|
-
}, $[
|
|
3686
|
+
}, $[34] = padding, $[35] = paddingBottom, $[36] = paddingLeft, $[37] = paddingRight, $[38] = paddingTop, $[39] = paddingX, $[40] = paddingY, $[41] = t10) : t10 = $[41];
|
|
3638
3687
|
let paddingProps = t10, t11;
|
|
3639
|
-
$[
|
|
3688
|
+
$[42] === fontSize ? t11 = $[43] : (t11 = _getArrayProp(fontSize).map(_temp$6), $[42] = fontSize, $[43] = t11);
|
|
3640
3689
|
let hotkeysFontSize = t11, t12;
|
|
3641
|
-
$[
|
|
3690
|
+
$[44] === Symbol.for("react.memo_cache_sentinel") ? (t12 = (el) => {
|
|
3642
3691
|
ref.current = el, setRootElement(el);
|
|
3643
|
-
}, $[
|
|
3692
|
+
}, $[44] = t12) : t12 = $[44];
|
|
3644
3693
|
let setRef = t12, t13 = as !== "button" && pressed ? "" : void 0, t14 = active ? "" : void 0, t15 = disabled ? "" : void 0, t16;
|
|
3645
|
-
$[
|
|
3694
|
+
$[45] === radius ? t16 = $[46] : (t16 = _getArrayProp(radius), $[45] = radius, $[46] = t16);
|
|
3646
3695
|
let t17;
|
|
3647
|
-
$[
|
|
3696
|
+
$[47] === Symbol.for("react.memo_cache_sentinel") ? (t17 = _getArrayProp(0), $[47] = t17) : t17 = $[47];
|
|
3648
3697
|
let t18 = disabled ? "default" : tone, t19 = as === "button" ? "button" : void 0, t20;
|
|
3649
|
-
$[
|
|
3698
|
+
$[48] !== IconComponent || $[49] !== IconRightComponent || $[50] !== fontSize || $[51] !== gap || $[52] !== hotkeys || $[53] !== hotkeysFontSize || $[54] !== paddingProps || $[55] !== text ? (t20 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, {
|
|
3650
3699
|
as: "span",
|
|
3651
3700
|
gap,
|
|
3652
3701
|
align: "center",
|
|
@@ -3678,15 +3727,15 @@ const MenuGroup = function MenuGroup(props) {
|
|
|
3678
3727
|
children: [isValidElement(IconRightComponent) && IconRightComponent, isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})]
|
|
3679
3728
|
})
|
|
3680
3729
|
]
|
|
3681
|
-
}), $[
|
|
3730
|
+
}), $[48] = IconComponent, $[49] = IconRightComponent, $[50] = fontSize, $[51] = gap, $[52] = hotkeys, $[53] = hotkeysFontSize, $[54] = paddingProps, $[55] = text, $[56] = t20) : t20 = $[56];
|
|
3682
3731
|
let t21;
|
|
3683
|
-
$[
|
|
3732
|
+
$[57] !== children || $[58] !== paddingProps ? (t21 = children && /* @__PURE__ */ jsx(Box, {
|
|
3684
3733
|
as: "span",
|
|
3685
3734
|
...paddingProps,
|
|
3686
3735
|
children
|
|
3687
|
-
}), $[
|
|
3736
|
+
}), $[57] = children, $[58] = paddingProps, $[59] = t21) : t21 = $[59];
|
|
3688
3737
|
let t22;
|
|
3689
|
-
return $[
|
|
3738
|
+
return $[60] !== as || $[61] !== disabled || $[62] !== handleClick || $[63] !== onItemMouseEnter || $[64] !== onItemMouseLeave || $[65] !== restProps || $[66] !== scheme || $[67] !== t13 || $[68] !== t14 || $[69] !== t15 || $[70] !== t16 || $[71] !== t18 || $[72] !== t19 || $[73] !== t20 || $[74] !== t21 ? (t22 = /* @__PURE__ */ jsxs(Selectable, {
|
|
3690
3739
|
"data-ui": "MenuItem",
|
|
3691
3740
|
role: "menuitem",
|
|
3692
3741
|
...restProps,
|
|
@@ -3706,19 +3755,19 @@ const MenuGroup = function MenuGroup(props) {
|
|
|
3706
3755
|
tabIndex: -1,
|
|
3707
3756
|
type: t19,
|
|
3708
3757
|
children: [t20, t21]
|
|
3709
|
-
}), $[
|
|
3710
|
-
}
|
|
3758
|
+
}), $[60] = as, $[61] = disabled, $[62] = handleClick, $[63] = onItemMouseEnter, $[64] = onItemMouseLeave, $[65] = restProps, $[66] = scheme, $[67] = t13, $[68] = t14, $[69] = t15, $[70] = t16, $[71] = t18, $[72] = t19, $[73] = t20, $[74] = t21, $[75] = t22) : t22 = $[75], t22;
|
|
3759
|
+
};
|
|
3711
3760
|
function _temp$6(s) {
|
|
3712
3761
|
return s - 1;
|
|
3713
3762
|
}
|
|
3714
3763
|
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({
|
|
3715
3764
|
displayName: "StyledSkeleton",
|
|
3716
|
-
componentId: "sc-
|
|
3717
|
-
})(responsiveRadiusStyle, skeletonStyle), Skeleton =
|
|
3718
|
-
let $ = c(
|
|
3719
|
-
$[0] === props ? (delay = $[1], radius = $[2],
|
|
3765
|
+
componentId: "sc-59oe48-0"
|
|
3766
|
+
})(responsiveRadiusStyle, skeletonStyle), Skeleton = function Skeleton(props) {
|
|
3767
|
+
let $ = c(17), delay, radius, ref, restProps, t0;
|
|
3768
|
+
$[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);
|
|
3720
3769
|
let animated = t0 !== void 0 && t0, [visible, setVisible] = useState(!delay), t1, t2;
|
|
3721
|
-
$[
|
|
3770
|
+
$[6] === delay ? (t1 = $[7], t2 = $[8]) : (t1 = () => {
|
|
3722
3771
|
if (!delay) return;
|
|
3723
3772
|
let timeout = setTimeout(() => {
|
|
3724
3773
|
setVisible(!0);
|
|
@@ -3726,96 +3775,92 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
3726
3775
|
return () => {
|
|
3727
3776
|
clearTimeout(timeout);
|
|
3728
3777
|
};
|
|
3729
|
-
}, t2 = [delay], $[
|
|
3778
|
+
}, t2 = [delay], $[6] = delay, $[7] = t1, $[8] = t2), useEffect(t1, t2);
|
|
3730
3779
|
let t3;
|
|
3731
|
-
$[
|
|
3780
|
+
$[9] === radius ? t3 = $[10] : (t3 = _getArrayProp(radius), $[9] = radius, $[10] = t3);
|
|
3732
3781
|
let t4 = !delay || visible, t5;
|
|
3733
|
-
return $[
|
|
3782
|
+
return $[11] !== animated || $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t4 ? (t5 = /* @__PURE__ */ jsx(StyledSkeleton$1, {
|
|
3734
3783
|
...restProps,
|
|
3735
3784
|
$animated: animated,
|
|
3736
3785
|
$radius: t3,
|
|
3737
3786
|
$visible: t4,
|
|
3738
3787
|
ref
|
|
3739
|
-
}), $[
|
|
3740
|
-
}
|
|
3788
|
+
}), $[11] = animated, $[12] = ref, $[13] = restProps, $[14] = t3, $[15] = t4, $[16] = t5) : t5 = $[16], t5;
|
|
3789
|
+
}, StyledSkeleton = /* @__PURE__ */ styled(Skeleton).withConfig({
|
|
3741
3790
|
displayName: "StyledSkeleton",
|
|
3742
|
-
componentId: "sc-
|
|
3791
|
+
componentId: "sc-67ip5v-0"
|
|
3743
3792
|
})((props) => {
|
|
3744
3793
|
let { $size, $style } = props, { font, media } = getTheme_v2(props.theme), fontStyle = font[$style];
|
|
3745
3794
|
return _responsive(media, $size, (sizeIndex) => {
|
|
3746
3795
|
let fontSize = fontStyle.sizes[sizeIndex];
|
|
3747
3796
|
return { height: fontSize.lineHeight - fontSize.ascenderHeight - fontSize.descenderHeight };
|
|
3748
3797
|
});
|
|
3749
|
-
}), TextSkeleton =
|
|
3750
|
-
let $ = c(
|
|
3798
|
+
}), TextSkeleton = function TextSkeleton(props) {
|
|
3799
|
+
let $ = c(8), restProps, t0;
|
|
3751
3800
|
$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);
|
|
3752
3801
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
3753
3802
|
$[3] === size ? t1 = $[4] : (t1 = _getArrayProp(size), $[3] = size, $[4] = t1);
|
|
3754
3803
|
let $size = t1, t2;
|
|
3755
|
-
return $[5] !== $size || $[6] !==
|
|
3804
|
+
return $[5] !== $size || $[6] !== restProps ? (t2 = /* @__PURE__ */ jsx(StyledSkeleton, {
|
|
3756
3805
|
...restProps,
|
|
3757
3806
|
$size,
|
|
3758
|
-
ref,
|
|
3759
3807
|
$style: "text"
|
|
3760
|
-
}), $[5] = $size, $[6] =
|
|
3761
|
-
}
|
|
3762
|
-
let $ = c(
|
|
3808
|
+
}), $[5] = $size, $[6] = restProps, $[7] = t2) : t2 = $[7], t2;
|
|
3809
|
+
}, LabelSkeleton = function LabelSkeleton(props) {
|
|
3810
|
+
let $ = c(8), restProps, t0;
|
|
3763
3811
|
$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);
|
|
3764
3812
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
3765
3813
|
$[3] === size ? t1 = $[4] : (t1 = _getArrayProp(size), $[3] = size, $[4] = t1);
|
|
3766
3814
|
let $size = t1, t2;
|
|
3767
|
-
return $[5] !== $size || $[6] !==
|
|
3815
|
+
return $[5] !== $size || $[6] !== restProps ? (t2 = /* @__PURE__ */ jsx(StyledSkeleton, {
|
|
3768
3816
|
...restProps,
|
|
3769
3817
|
$size,
|
|
3770
|
-
ref,
|
|
3771
3818
|
$style: "label"
|
|
3772
|
-
}), $[5] = $size, $[6] =
|
|
3773
|
-
}
|
|
3774
|
-
let $ = c(
|
|
3819
|
+
}), $[5] = $size, $[6] = restProps, $[7] = t2) : t2 = $[7], t2;
|
|
3820
|
+
}, HeadingSkeleton = function HeadingSkeleton(props) {
|
|
3821
|
+
let $ = c(8), restProps, t0;
|
|
3775
3822
|
$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);
|
|
3776
3823
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
3777
3824
|
$[3] === size ? t1 = $[4] : (t1 = _getArrayProp(size), $[3] = size, $[4] = t1);
|
|
3778
3825
|
let $size = t1, t2;
|
|
3779
|
-
return $[5] !== $size || $[6] !==
|
|
3826
|
+
return $[5] !== $size || $[6] !== restProps ? (t2 = /* @__PURE__ */ jsx(StyledSkeleton, {
|
|
3780
3827
|
...restProps,
|
|
3781
3828
|
$size,
|
|
3782
|
-
ref,
|
|
3783
3829
|
$style: "heading"
|
|
3784
|
-
}), $[5] = $size, $[6] =
|
|
3785
|
-
}
|
|
3786
|
-
let $ = c(
|
|
3830
|
+
}), $[5] = $size, $[6] = restProps, $[7] = t2) : t2 = $[7], t2;
|
|
3831
|
+
}, CodeSkeleton = function CodeSkeleton(props) {
|
|
3832
|
+
let $ = c(8), restProps, t0;
|
|
3787
3833
|
$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);
|
|
3788
3834
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
3789
3835
|
$[3] === size ? t1 = $[4] : (t1 = _getArrayProp(size), $[3] = size, $[4] = t1);
|
|
3790
3836
|
let $size = t1, t2;
|
|
3791
|
-
return $[5] !== $size || $[6] !==
|
|
3837
|
+
return $[5] !== $size || $[6] !== restProps ? (t2 = /* @__PURE__ */ jsx(StyledSkeleton, {
|
|
3792
3838
|
...restProps,
|
|
3793
3839
|
$size,
|
|
3794
|
-
ref,
|
|
3795
3840
|
$style: "code"
|
|
3796
|
-
}), $[5] = $size, $[6] =
|
|
3797
|
-
}
|
|
3841
|
+
}), $[5] = $size, $[6] = restProps, $[7] = t2) : t2 = $[7], t2;
|
|
3842
|
+
}, CustomButton = styled(Button).withConfig({
|
|
3798
3843
|
displayName: "CustomButton",
|
|
3799
|
-
componentId: "sc-
|
|
3800
|
-
})`max-width:100%;`, Tab =
|
|
3801
|
-
let $ = c(
|
|
3802
|
-
$[0] === props ? (focused = $[1],
|
|
3844
|
+
componentId: "sc-c5oqtq-0"
|
|
3845
|
+
})`max-width:100%;`, Tab = function Tab(props) {
|
|
3846
|
+
let $ = c(31), focused, forwardedRef, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
|
|
3847
|
+
$[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);
|
|
3803
3848
|
let fontSize = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = useRef(null), focusedRef = useRef(!1), t2;
|
|
3804
|
-
$[
|
|
3849
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[12] = t2) : t2 = $[12], useImperativeHandle(forwardedRef, t2);
|
|
3805
3850
|
let t3;
|
|
3806
|
-
$[
|
|
3851
|
+
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
3807
3852
|
focusedRef.current = !1;
|
|
3808
|
-
}, $[
|
|
3853
|
+
}, $[13] = t3) : t3 = $[13];
|
|
3809
3854
|
let handleBlur = t3, t4;
|
|
3810
|
-
$[
|
|
3855
|
+
$[14] === onFocus ? t4 = $[15] : (t4 = (event) => {
|
|
3811
3856
|
focusedRef.current = !0, onFocus && onFocus(event);
|
|
3812
|
-
}, $[
|
|
3857
|
+
}, $[14] = onFocus, $[15] = t4);
|
|
3813
3858
|
let handleFocus = t4, t5, t6;
|
|
3814
|
-
$[
|
|
3859
|
+
$[16] === focused ? (t5 = $[17], t6 = $[18]) : (t5 = () => {
|
|
3815
3860
|
focused && !focusedRef.current && (ref.current && ref.current.focus(), focusedRef.current = !0);
|
|
3816
|
-
}, t6 = [focused], $[
|
|
3861
|
+
}, t6 = [focused], $[16] = focused, $[17] = t5, $[18] = t6), useEffect(t5, t6);
|
|
3817
3862
|
let t7 = selected ? "true" : "false", t8 = selected ? 0 : -1, t9;
|
|
3818
|
-
return $[
|
|
3863
|
+
return $[19] !== fontSize || $[20] !== handleFocus || $[21] !== icon || $[22] !== id || $[23] !== label || $[24] !== onClick || $[25] !== padding || $[26] !== restProps || $[27] !== selected || $[28] !== t7 || $[29] !== t8 ? (t9 = /* @__PURE__ */ jsx(CustomButton, {
|
|
3819
3864
|
"data-ui": "Tab",
|
|
3820
3865
|
...restProps,
|
|
3821
3866
|
"aria-selected": t7,
|
|
@@ -3833,49 +3878,48 @@ const animation = css`background-image:linear-gradient( to right,var(--card-skel
|
|
|
3833
3878
|
tabIndex: t8,
|
|
3834
3879
|
text: label,
|
|
3835
3880
|
type: "button"
|
|
3836
|
-
}), $[
|
|
3837
|
-
}
|
|
3881
|
+
}), $[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;
|
|
3882
|
+
}, CustomInline = styled(Inline).withConfig({
|
|
3838
3883
|
displayName: "CustomInline",
|
|
3839
|
-
componentId: "sc-
|
|
3840
|
-
})`& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}`, TabList =
|
|
3841
|
-
let $ = c(
|
|
3842
|
-
$[0] === props ? (childrenProp = $[1],
|
|
3884
|
+
componentId: "sc-dib7x4-0"
|
|
3885
|
+
})`& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}`, TabList = function TabList(props) {
|
|
3886
|
+
let $ = c(16), childrenProp, ref, restProps;
|
|
3887
|
+
$[0] === props ? (childrenProp = $[1], ref = $[2], restProps = $[3]) : ({children: childrenProp, ref, ...restProps} = props, $[0] = props, $[1] = childrenProp, $[2] = ref, $[3] = restProps);
|
|
3843
3888
|
let [focusedIndex, setFocusedIndex] = useState(-1), t0;
|
|
3844
|
-
if ($[
|
|
3889
|
+
if ($[4] !== childrenProp || $[5] !== focusedIndex) {
|
|
3845
3890
|
let children = Children.toArray(childrenProp).filter(isValidElement), t1;
|
|
3846
|
-
$[
|
|
3891
|
+
$[7] === focusedIndex ? t1 = $[8] : (t1 = (child, childIndex) => cloneElement(child, {
|
|
3847
3892
|
focused: focusedIndex === childIndex,
|
|
3848
3893
|
key: childIndex,
|
|
3849
3894
|
onFocus: () => setFocusedIndex(childIndex)
|
|
3850
|
-
}), $[
|
|
3851
|
-
} else t0 = $[
|
|
3895
|
+
}), $[7] = focusedIndex, $[8] = t1), t0 = children.map(t1), $[4] = childrenProp, $[5] = focusedIndex, $[6] = t0;
|
|
3896
|
+
} else t0 = $[6];
|
|
3852
3897
|
let tabs = t0, numTabs = tabs.length, t1;
|
|
3853
|
-
$[
|
|
3898
|
+
$[9] === numTabs ? t1 = $[10] : (t1 = (event) => {
|
|
3854
3899
|
event.key === "ArrowLeft" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === "ArrowRight" && setFocusedIndex((prevIndex_0) => (prevIndex_0 + 1) % numTabs);
|
|
3855
|
-
}, $[
|
|
3900
|
+
}, $[9] = numTabs, $[10] = t1);
|
|
3856
3901
|
let handleKeyDown = t1, t2;
|
|
3857
|
-
return $[
|
|
3902
|
+
return $[11] !== handleKeyDown || $[12] !== ref || $[13] !== restProps || $[14] !== tabs ? (t2 = /* @__PURE__ */ jsx(CustomInline, {
|
|
3858
3903
|
"data-ui": "TabList",
|
|
3859
3904
|
...restProps,
|
|
3860
3905
|
onKeyDown: handleKeyDown,
|
|
3861
3906
|
ref,
|
|
3862
3907
|
role: "tablist",
|
|
3863
3908
|
children: tabs
|
|
3864
|
-
}), $[
|
|
3865
|
-
}
|
|
3866
|
-
let $ = c(
|
|
3909
|
+
}), $[11] = handleKeyDown, $[12] = ref, $[13] = restProps, $[14] = tabs, $[15] = t2) : t2 = $[15], t2;
|
|
3910
|
+
}, TabPanel = function TabPanel(props) {
|
|
3911
|
+
let $ = c(8), flex, restProps;
|
|
3867
3912
|
$[0] === props ? (flex = $[1], restProps = $[2]) : ({flex, ...restProps} = props, $[0] = props, $[1] = flex, $[2] = restProps);
|
|
3868
3913
|
let t0 = props.tabIndex === void 0 ? 0 : props.tabIndex, t1;
|
|
3869
|
-
return $[3] !== flex || $[4] !== props.children || $[5] !==
|
|
3914
|
+
return $[3] !== flex || $[4] !== props.children || $[5] !== restProps || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsx(Box, {
|
|
3870
3915
|
"data-ui": "TabPanel",
|
|
3871
3916
|
...restProps,
|
|
3872
3917
|
flex,
|
|
3873
|
-
ref,
|
|
3874
3918
|
role: "tabpanel",
|
|
3875
3919
|
tabIndex: t0,
|
|
3876
3920
|
children: props.children
|
|
3877
|
-
}), $[3] = flex, $[4] = props.children, $[5] =
|
|
3878
|
-
}
|
|
3921
|
+
}), $[3] = flex, $[4] = props.children, $[5] = restProps, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
|
|
3922
|
+
}, STATUS_CARD_TONE = {
|
|
3879
3923
|
error: "critical",
|
|
3880
3924
|
warning: "caution",
|
|
3881
3925
|
success: "positive",
|
|
@@ -4115,28 +4159,28 @@ function responsiveGridGapYStyle(props) {
|
|
|
4115
4159
|
}
|
|
4116
4160
|
const StyledGrid = /* @__PURE__ */ styled(Box).withConfig({
|
|
4117
4161
|
displayName: "StyledGrid",
|
|
4118
|
-
componentId: "sc-
|
|
4119
|
-
})(responsiveGridStyle), Grid =
|
|
4120
|
-
let $ = c(
|
|
4121
|
-
$[0] === props ? (as = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], children = $[5], gap = $[6], gapX = $[7], gapY = $[8], gridTemplateColumns = $[9], gridTemplateRows = $[10],
|
|
4162
|
+
componentId: "sc-47qdzn-0"
|
|
4163
|
+
})(responsiveGridStyle), Grid = function Grid(props) {
|
|
4164
|
+
let $ = c(43), as, autoCols, autoFlow, autoRows, children, gap, gapX, gapY, gridTemplateColumns, gridTemplateRows, ref, restProps;
|
|
4165
|
+
$[0] === props ? (as = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], children = $[5], gap = $[6], gapX = $[7], gapY = $[8], gridTemplateColumns = $[9], gridTemplateRows = $[10], ref = $[11], restProps = $[12]) : ({as, autoRows, autoCols, autoFlow, gridTemplateColumns, gap, gapX, gapY, gridTemplateRows, children, ref, ...restProps} = props, $[0] = props, $[1] = as, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = children, $[6] = gap, $[7] = gapX, $[8] = gapY, $[9] = gridTemplateColumns, $[10] = gridTemplateRows, $[11] = ref, $[12] = restProps);
|
|
4122
4166
|
let t0 = typeof as == "string" ? as : void 0, t1;
|
|
4123
|
-
$[
|
|
4167
|
+
$[13] === autoRows ? t1 = $[14] : (t1 = _getArrayProp(autoRows), $[13] = autoRows, $[14] = t1);
|
|
4124
4168
|
let t2;
|
|
4125
|
-
$[
|
|
4169
|
+
$[15] === autoCols ? t2 = $[16] : (t2 = _getArrayProp(autoCols), $[15] = autoCols, $[16] = t2);
|
|
4126
4170
|
let t3;
|
|
4127
|
-
$[
|
|
4171
|
+
$[17] === autoFlow ? t3 = $[18] : (t3 = _getArrayProp(autoFlow), $[17] = autoFlow, $[18] = t3);
|
|
4128
4172
|
let t4;
|
|
4129
|
-
$[
|
|
4173
|
+
$[19] === gridTemplateColumns ? t4 = $[20] : (t4 = _getArrayProp(gridTemplateColumns), $[19] = gridTemplateColumns, $[20] = t4);
|
|
4130
4174
|
let t5;
|
|
4131
|
-
$[
|
|
4175
|
+
$[21] === gap ? t5 = $[22] : (t5 = _getArrayProp(gap), $[21] = gap, $[22] = t5);
|
|
4132
4176
|
let t6;
|
|
4133
|
-
$[
|
|
4177
|
+
$[23] === gapX ? t6 = $[24] : (t6 = _getArrayProp(gapX), $[23] = gapX, $[24] = t6);
|
|
4134
4178
|
let t7;
|
|
4135
|
-
$[
|
|
4179
|
+
$[25] === gapY ? t7 = $[26] : (t7 = _getArrayProp(gapY), $[25] = gapY, $[26] = t7);
|
|
4136
4180
|
let t8;
|
|
4137
|
-
$[
|
|
4181
|
+
$[27] === gridTemplateRows ? t8 = $[28] : (t8 = _getArrayProp(gridTemplateRows), $[27] = gridTemplateRows, $[28] = t8);
|
|
4138
4182
|
let t9;
|
|
4139
|
-
return $[
|
|
4183
|
+
return $[29] !== as || $[30] !== children || $[31] !== ref || $[32] !== restProps || $[33] !== t0 || $[34] !== t1 || $[35] !== t2 || $[36] !== t3 || $[37] !== t4 || $[38] !== t5 || $[39] !== t6 || $[40] !== t7 || $[41] !== t8 ? (t9 = /* @__PURE__ */ jsx(StyledGrid, {
|
|
4140
4184
|
"data-as": t0,
|
|
4141
4185
|
"data-ui": "Grid",
|
|
4142
4186
|
...restProps,
|
|
@@ -4151,8 +4195,8 @@ const StyledGrid = /* @__PURE__ */ styled(Box).withConfig({
|
|
|
4151
4195
|
forwardedAs: as,
|
|
4152
4196
|
ref,
|
|
4153
4197
|
children
|
|
4154
|
-
}), $[
|
|
4155
|
-
}
|
|
4198
|
+
}), $[29] = as, $[30] = children, $[31] = ref, $[32] = restProps, $[33] = t0, $[34] = t1, $[35] = t2, $[36] = t3, $[37] = t4, $[38] = t5, $[39] = t6, $[40] = t7, $[41] = t8, $[42] = t9) : t9 = $[42], t9;
|
|
4199
|
+
};
|
|
4156
4200
|
/**
|
|
4157
4201
|
* @internal
|
|
4158
4202
|
*/
|
|
@@ -4296,27 +4340,27 @@ function _focusItemElement(el) {
|
|
|
4296
4340
|
/**
|
|
4297
4341
|
* @internal
|
|
4298
4342
|
*/
|
|
4299
|
-
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null), Tree =
|
|
4300
|
-
let $ = c(
|
|
4301
|
-
$[0] === props ? (children = $[1],
|
|
4343
|
+
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null), Tree = function Tree(props) {
|
|
4344
|
+
let $ = c(38), children, forwardedRef, onFocus, restProps, t0;
|
|
4345
|
+
$[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);
|
|
4302
4346
|
let gap = t0 === void 0 ? 1 : t0, ref = useRef(null), [focusedElement, setFocusedElement] = useState(null), focusedElementRef = useRef(focusedElement), t1;
|
|
4303
|
-
$[
|
|
4347
|
+
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t1 = [], $[6] = t1) : t1 = $[6];
|
|
4304
4348
|
let path = t1, t2;
|
|
4305
|
-
$[
|
|
4349
|
+
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[7] = t2) : t2 = $[7];
|
|
4306
4350
|
let [itemElements, setItemElements] = useState(t2), t3;
|
|
4307
|
-
$[
|
|
4351
|
+
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t3 = {}, $[8] = t3) : t3 = $[8];
|
|
4308
4352
|
let [state, setState] = useState(t3), stateRef = useRef(state), t4;
|
|
4309
|
-
$[
|
|
4353
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[9] = t4) : t4 = $[9], useImperativeHandle(forwardedRef, t4);
|
|
4310
4354
|
let t5, t6;
|
|
4311
|
-
$[
|
|
4355
|
+
$[10] === focusedElement ? (t5 = $[11], t6 = $[12]) : (t5 = () => {
|
|
4312
4356
|
focusedElementRef.current = focusedElement;
|
|
4313
|
-
}, t6 = [focusedElement], $[
|
|
4357
|
+
}, t6 = [focusedElement], $[10] = focusedElement, $[11] = t5, $[12] = t6), useEffect(t5, t6);
|
|
4314
4358
|
let t7, t8;
|
|
4315
|
-
$[
|
|
4359
|
+
$[13] === state ? (t7 = $[14], t8 = $[15]) : (t7 = () => {
|
|
4316
4360
|
stateRef.current = state;
|
|
4317
|
-
}, t8 = [state], $[
|
|
4361
|
+
}, t8 = [state], $[13] = state, $[14] = t7, $[15] = t8), useEffect(t7, t8);
|
|
4318
4362
|
let t9;
|
|
4319
|
-
$[
|
|
4363
|
+
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t9 = (element, path_0, expanded, selected) => (setState((s) => ({
|
|
4320
4364
|
...s,
|
|
4321
4365
|
[path_0]: {
|
|
4322
4366
|
element,
|
|
@@ -4327,9 +4371,9 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
4327
4371
|
let newState = { ...s_0 };
|
|
4328
4372
|
return delete newState[path_0], newState;
|
|
4329
4373
|
});
|
|
4330
|
-
}), $[
|
|
4374
|
+
}), $[16] = t9) : t9 = $[16];
|
|
4331
4375
|
let registerItem = t9, t10;
|
|
4332
|
-
$[
|
|
4376
|
+
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (path_1, expanded_0) => {
|
|
4333
4377
|
setState((s_1) => {
|
|
4334
4378
|
let itemState = s_1[path_1];
|
|
4335
4379
|
return itemState ? {
|
|
@@ -4340,9 +4384,9 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
4340
4384
|
}
|
|
4341
4385
|
} : s_1;
|
|
4342
4386
|
});
|
|
4343
|
-
}, $[
|
|
4387
|
+
}, $[17] = t10) : t10 = $[17];
|
|
4344
4388
|
let setExpanded = t10, t11 = focusedElement || itemElements[0] || null, t12;
|
|
4345
|
-
$[
|
|
4389
|
+
$[18] !== gap || $[19] !== state || $[20] !== t11 ? (t12 = {
|
|
4346
4390
|
version: 0,
|
|
4347
4391
|
focusedElement: t11,
|
|
4348
4392
|
level: 0,
|
|
@@ -4352,9 +4396,9 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
4352
4396
|
setFocusedElement,
|
|
4353
4397
|
gap,
|
|
4354
4398
|
state
|
|
4355
|
-
}, $[
|
|
4399
|
+
}, $[18] = gap, $[19] = state, $[20] = t11, $[21] = t12) : t12 = $[21];
|
|
4356
4400
|
let contextValue = t12, t13;
|
|
4357
|
-
$[
|
|
4401
|
+
$[22] === itemElements ? t13 = $[23] : (t13 = (event) => {
|
|
4358
4402
|
if (focusedElementRef.current) {
|
|
4359
4403
|
if (event.key === "ArrowDown") {
|
|
4360
4404
|
event.preventDefault();
|
|
@@ -4409,21 +4453,21 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
4409
4453
|
return;
|
|
4410
4454
|
}
|
|
4411
4455
|
}
|
|
4412
|
-
}, $[
|
|
4456
|
+
}, $[22] = itemElements, $[23] = t13);
|
|
4413
4457
|
let handleKeyDown = t13, t14;
|
|
4414
|
-
$[
|
|
4458
|
+
$[24] === onFocus ? t14 = $[25] : (t14 = (event_0) => {
|
|
4415
4459
|
setFocusedElement(event_0.target), onFocus?.(event_0);
|
|
4416
|
-
}, $[
|
|
4460
|
+
}, $[24] = onFocus, $[25] = t14);
|
|
4417
4461
|
let handleFocus = t14, t15;
|
|
4418
|
-
$[
|
|
4462
|
+
$[26] === Symbol.for("react.memo_cache_sentinel") ? (t15 = () => {
|
|
4419
4463
|
if (!ref.current) return;
|
|
4420
4464
|
let _itemElements = Array.from(ref.current.querySelectorAll("[data-ui=\"TreeItem\"]"));
|
|
4421
4465
|
setItemElements(_itemElements);
|
|
4422
|
-
}, $[
|
|
4466
|
+
}, $[26] = t15) : t15 = $[26];
|
|
4423
4467
|
let t16;
|
|
4424
|
-
$[
|
|
4468
|
+
$[27] === children ? t16 = $[28] : (t16 = [children], $[27] = children, $[28] = t16), useEffect(t15, t16);
|
|
4425
4469
|
let t17;
|
|
4426
|
-
$[
|
|
4470
|
+
$[29] !== children || $[30] !== gap || $[31] !== handleFocus || $[32] !== handleKeyDown || $[33] !== restProps ? (t17 = /* @__PURE__ */ jsx(Stack, {
|
|
4427
4471
|
as: "ul",
|
|
4428
4472
|
"data-ui": "Tree",
|
|
4429
4473
|
...restProps,
|
|
@@ -4433,13 +4477,13 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
4433
4477
|
role: "tree",
|
|
4434
4478
|
gap,
|
|
4435
4479
|
children
|
|
4436
|
-
}), $[
|
|
4480
|
+
}), $[29] = children, $[30] = gap, $[31] = handleFocus, $[32] = handleKeyDown, $[33] = restProps, $[34] = t17) : t17 = $[34];
|
|
4437
4481
|
let t18;
|
|
4438
|
-
return $[
|
|
4482
|
+
return $[35] !== contextValue || $[36] !== t17 ? (t18 = /* @__PURE__ */ jsx(TreeContext.Provider, {
|
|
4439
4483
|
value: contextValue,
|
|
4440
4484
|
children: t17
|
|
4441
|
-
}), $[
|
|
4442
|
-
}
|
|
4485
|
+
}), $[35] = contextValue, $[36] = t17, $[37] = t18) : t18 = $[37], t18;
|
|
4486
|
+
};
|
|
4443
4487
|
function treeItemRootStyle() {
|
|
4444
4488
|
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;}}`;
|
|
4445
4489
|
}
|
|
@@ -4726,24 +4770,24 @@ function labelBaseStyle(props) {
|
|
|
4726
4770
|
}
|
|
4727
4771
|
const StyledLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
4728
4772
|
displayName: "StyledLabel",
|
|
4729
|
-
componentId: "sc-
|
|
4730
|
-
})(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), Label =
|
|
4731
|
-
let $ = c(
|
|
4732
|
-
$[0] === props ? (accent = $[1], align = $[2], childrenProp = $[3],
|
|
4773
|
+
componentId: "sc-49vcvo-0"
|
|
4774
|
+
})(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), Label = function Label(props) {
|
|
4775
|
+
let $ = c(27), accent, align, childrenProp, ref, restProps, t0, t1, textOverflow, weight;
|
|
4776
|
+
$[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);
|
|
4733
4777
|
let muted = t0 !== void 0 && t0, size = t1 === void 0 ? 2 : t1, children = childrenProp;
|
|
4734
4778
|
if (textOverflow === "ellipsis") {
|
|
4735
4779
|
let t2;
|
|
4736
|
-
$[
|
|
4780
|
+
$[10] === children ? t2 = $[11] : (t2 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[10] = children, $[11] = t2), children = t2;
|
|
4737
4781
|
} else {
|
|
4738
4782
|
let t2;
|
|
4739
|
-
$[
|
|
4783
|
+
$[12] === children ? t2 = $[13] : (t2 = /* @__PURE__ */ jsx("span", { children }), $[12] = children, $[13] = t2), children = t2;
|
|
4740
4784
|
}
|
|
4741
4785
|
let t2;
|
|
4742
|
-
$[
|
|
4786
|
+
$[14] === align ? t2 = $[15] : (t2 = _getArrayProp(align), $[14] = align, $[15] = t2);
|
|
4743
4787
|
let t3;
|
|
4744
|
-
$[
|
|
4788
|
+
$[16] === size ? t3 = $[17] : (t3 = _getArrayProp(size), $[16] = size, $[17] = t3);
|
|
4745
4789
|
let t4;
|
|
4746
|
-
return $[
|
|
4790
|
+
return $[18] !== accent || $[19] !== children || $[20] !== muted || $[21] !== ref || $[22] !== restProps || $[23] !== t2 || $[24] !== t3 || $[25] !== weight ? (t4 = /* @__PURE__ */ jsx(StyledLabel, {
|
|
4747
4791
|
"data-ui": "Label",
|
|
4748
4792
|
...restProps,
|
|
4749
4793
|
$accent: accent,
|
|
@@ -4753,8 +4797,8 @@ const StyledLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
|
4753
4797
|
$weight: weight,
|
|
4754
4798
|
ref,
|
|
4755
4799
|
children
|
|
4756
|
-
}), $[
|
|
4757
|
-
}
|
|
4800
|
+
}), $[18] = accent, $[19] = children, $[20] = muted, $[21] = ref, $[22] = restProps, $[23] = t2, $[24] = t3, $[25] = weight, $[26] = t4) : t4 = $[26], t4;
|
|
4801
|
+
}, avatarStyle = {
|
|
4758
4802
|
root: avatarRootStyle,
|
|
4759
4803
|
arrow: avatarArrowStyle,
|
|
4760
4804
|
bgStroke: avatarBgStrokeStyle,
|
|
@@ -4873,44 +4917,44 @@ function avatarStrokeStyle() {
|
|
|
4873
4917
|
}
|
|
4874
4918
|
const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
|
|
4875
4919
|
displayName: "StyledAvatar",
|
|
4876
|
-
componentId: "sc-
|
|
4920
|
+
componentId: "sc-jmuqs0-0"
|
|
4877
4921
|
})(responsiveAvatarSizeStyle, avatarStyle.root), Arrow$1 = /* @__PURE__ */ styled.div.withConfig({
|
|
4878
4922
|
displayName: "Arrow",
|
|
4879
|
-
componentId: "sc-
|
|
4923
|
+
componentId: "sc-jmuqs0-1"
|
|
4880
4924
|
})(avatarStyle.arrow), BgStroke = /* @__PURE__ */ styled.ellipse.withConfig({
|
|
4881
4925
|
displayName: "BgStroke",
|
|
4882
|
-
componentId: "sc-
|
|
4926
|
+
componentId: "sc-jmuqs0-2"
|
|
4883
4927
|
})(avatarStyle.bgStroke), Stroke = /* @__PURE__ */ styled.ellipse.withConfig({
|
|
4884
4928
|
displayName: "Stroke",
|
|
4885
|
-
componentId: "sc-
|
|
4929
|
+
componentId: "sc-jmuqs0-3"
|
|
4886
4930
|
})(avatarStyle.stroke), Initials = /* @__PURE__ */ styled.div.withConfig({
|
|
4887
4931
|
displayName: "Initials",
|
|
4888
|
-
componentId: "sc-
|
|
4932
|
+
componentId: "sc-jmuqs0-4"
|
|
4889
4933
|
})(avatarStyle.initials), InitialsLabel = /* @__PURE__ */ styled(Label).withConfig({
|
|
4890
4934
|
displayName: "InitialsLabel",
|
|
4891
|
-
componentId: "sc-
|
|
4935
|
+
componentId: "sc-jmuqs0-5"
|
|
4892
4936
|
})({ color: "inherit" }), AvatarImage = /* @__PURE__ */ styled.svg.withConfig({
|
|
4893
4937
|
displayName: "AvatarImage",
|
|
4894
|
-
componentId: "sc-
|
|
4895
|
-
})(avatarStyle.image), Avatar =
|
|
4896
|
-
let $ = c(
|
|
4897
|
-
$[0] === props ? (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6],
|
|
4938
|
+
componentId: "sc-jmuqs0-6"
|
|
4939
|
+
})(avatarStyle.image), Avatar = function Avatar(props) {
|
|
4940
|
+
let $ = c(47), __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, ref, restProps, src, t0, t1, t2, title;
|
|
4941
|
+
$[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);
|
|
4898
4942
|
let color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, { avatar } = useTheme_v2(), as = ReactIs.isValidElementType(asProp) ? asProp : "div", size = _getArrayProp(sizeProp), _sizeRem = (avatar.sizes[size[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = useId(), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = useState(!1), imageId = `avatar-image-${elementId}`, t3, t4;
|
|
4899
|
-
$[
|
|
4943
|
+
$[14] !== arrowPosition || $[15] !== arrowPositionProp ? (t3 = () => {
|
|
4900
4944
|
if (arrowPosition === arrowPositionProp) return;
|
|
4901
4945
|
let raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
|
|
4902
4946
|
return () => cancelAnimationFrame(raf);
|
|
4903
|
-
}, t4 = [arrowPosition, arrowPositionProp], $[
|
|
4947
|
+
}, t4 = [arrowPosition, arrowPositionProp], $[14] = arrowPosition, $[15] = arrowPositionProp, $[16] = t3, $[17] = t4) : (t3 = $[16], t4 = $[17]), useEffect(t3, t4);
|
|
4904
4948
|
let t5, t6;
|
|
4905
|
-
$[
|
|
4949
|
+
$[18] === src ? (t5 = $[19], t6 = $[20]) : (t5 = () => {
|
|
4906
4950
|
src && setImageFailed(!1);
|
|
4907
|
-
}, t6 = [src], $[
|
|
4951
|
+
}, t6 = [src], $[18] = src, $[19] = t5, $[20] = t6), useEffect(t5, t6);
|
|
4908
4952
|
let t7;
|
|
4909
|
-
$[
|
|
4953
|
+
$[21] === onImageLoadError ? t7 = $[22] : (t7 = () => {
|
|
4910
4954
|
setImageFailed(!0), onImageLoadError && onImageLoadError(/* @__PURE__ */ Error("Avatar: the image failed to load"));
|
|
4911
|
-
}, $[
|
|
4955
|
+
}, $[21] = onImageLoadError, $[22] = t7);
|
|
4912
4956
|
let handleImageError = t7, T0 = StyledAvatar, t8 = typeof as == "string" ? as : void 0, t10;
|
|
4913
|
-
$[
|
|
4957
|
+
$[23] === color ? t10 = $[24] : (t10 = /* @__PURE__ */ jsx(Arrow$1, { children: /* @__PURE__ */ jsx("svg", {
|
|
4914
4958
|
width: "11",
|
|
4915
4959
|
height: "7",
|
|
4916
4960
|
viewBox: "0 0 11 7",
|
|
@@ -4919,9 +4963,9 @@ const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
|
|
|
4919
4963
|
d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z",
|
|
4920
4964
|
fill: color
|
|
4921
4965
|
})
|
|
4922
|
-
}) }), $[
|
|
4966
|
+
}) }), $[23] = color, $[24] = t10);
|
|
4923
4967
|
let t11;
|
|
4924
|
-
$[
|
|
4968
|
+
$[25] !== __unstable_hideInnerStroke || $[26] !== _radius || $[27] !== _sizeRem || $[28] !== handleImageError || $[29] !== imageFailed || $[30] !== imageId || $[31] !== src ? (t11 = !imageFailed && src && /* @__PURE__ */ jsxs(AvatarImage, {
|
|
4925
4969
|
viewBox: `0 0 ${_sizeRem} ${_sizeRem}`,
|
|
4926
4970
|
fill: "none",
|
|
4927
4971
|
children: [
|
|
@@ -4958,14 +5002,14 @@ const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
|
|
|
4958
5002
|
vectorEffect: "non-scaling-stroke"
|
|
4959
5003
|
})
|
|
4960
5004
|
]
|
|
4961
|
-
}), $[
|
|
5005
|
+
}), $[25] = __unstable_hideInnerStroke, $[26] = _radius, $[27] = _sizeRem, $[28] = handleImageError, $[29] = imageFailed, $[30] = imageId, $[31] = src, $[32] = t11) : t11 = $[32];
|
|
4962
5006
|
let t12 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Initials, { children: /* @__PURE__ */ jsx(InitialsLabel, {
|
|
4963
5007
|
forwardedAs: "span",
|
|
4964
5008
|
size: size.map(_temp$2),
|
|
4965
5009
|
weight: "medium",
|
|
4966
5010
|
children: initials
|
|
4967
5011
|
}) }) }), t13;
|
|
4968
|
-
return $[
|
|
5012
|
+
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, {
|
|
4969
5013
|
as,
|
|
4970
5014
|
"data-as": t8,
|
|
4971
5015
|
"data-ui": "Avatar",
|
|
@@ -4982,8 +5026,8 @@ const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
|
|
|
4982
5026
|
t11,
|
|
4983
5027
|
t12
|
|
4984
5028
|
]
|
|
4985
|
-
}), $[
|
|
4986
|
-
}
|
|
5029
|
+
}), $[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, $[46] = t13) : t13 = $[46], t13;
|
|
5030
|
+
};
|
|
4987
5031
|
function _temp$2(s) {
|
|
4988
5032
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
4989
5033
|
}
|
|
@@ -5004,9 +5048,9 @@ function _avatarCounterBaseStyle(props) {
|
|
|
5004
5048
|
}
|
|
5005
5049
|
const StyledAvatarCounter = /* @__PURE__ */ styled.div.withConfig({
|
|
5006
5050
|
displayName: "StyledAvatarCounter",
|
|
5007
|
-
componentId: "sc-
|
|
5008
|
-
})(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle), AvatarCounter =
|
|
5009
|
-
let $ = c(20), { count, size: t0 } = props, sizeProp = t0 === void 0 ? 1 : t0, T0, T1, t1, t2, t3, t4, t5;
|
|
5051
|
+
componentId: "sc-yu8lrc-0"
|
|
5052
|
+
})(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle), AvatarCounter = function AvatarCounter(props) {
|
|
5053
|
+
let $ = c(20), { count, ref, size: t0 } = props, sizeProp = t0 === void 0 ? 1 : t0, T0, T1, t1, t2, t3, t4, t5;
|
|
5010
5054
|
if ($[0] !== ref || $[1] !== sizeProp) {
|
|
5011
5055
|
let size = _getArrayProp(sizeProp);
|
|
5012
5056
|
T1 = StyledAvatarCounter, t3 = size, t4 = "AvatarCounter", t5 = ref, T0 = Label, t1 = "span", t2 = size.map(_temp$1), $[0] = ref, $[1] = sizeProp, $[2] = T0, $[3] = T1, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5;
|
|
@@ -5025,7 +5069,7 @@ const StyledAvatarCounter = /* @__PURE__ */ styled.div.withConfig({
|
|
|
5025
5069
|
ref: t5,
|
|
5026
5070
|
children: t6
|
|
5027
5071
|
}), $[14] = T1, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19], t7;
|
|
5028
|
-
}
|
|
5072
|
+
};
|
|
5029
5073
|
function _temp$1(s) {
|
|
5030
5074
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
5031
5075
|
}
|
|
@@ -5042,27 +5086,27 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
5042
5086
|
}
|
|
5043
5087
|
const StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({
|
|
5044
5088
|
displayName: "StyledAvatarStack",
|
|
5045
|
-
componentId: "sc-
|
|
5046
|
-
})(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack =
|
|
5047
|
-
let $ = c(
|
|
5048
|
-
$[0] === props ? (childrenProp = $[1],
|
|
5089
|
+
componentId: "sc-qgrvgi-0"
|
|
5090
|
+
})(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = function AvatarStack(props) {
|
|
5091
|
+
let $ = c(39), childrenProp, ref, restProps, t0, t1;
|
|
5092
|
+
$[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);
|
|
5049
5093
|
let maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, T0, t2, t3, t4, t5, t6, t7, t8;
|
|
5050
|
-
if ($[
|
|
5094
|
+
if ($[6] !== childrenProp || $[7] !== maxLengthProp || $[8] !== ref || $[9] !== restProps || $[10] !== sizeProp) {
|
|
5051
5095
|
let children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), t9;
|
|
5052
|
-
$[
|
|
5096
|
+
$[19] === sizeProp ? t9 = $[20] : (t9 = _getArrayProp(sizeProp), $[19] = sizeProp, $[20] = t9);
|
|
5053
5097
|
let size = t9, len = children.length, extraCount = len - (maxLength - 1), visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
|
|
5054
|
-
T0 = StyledAvatarStack, t2 = "AvatarStack", t3 = restProps, t4 = ref, t5 = size, $[
|
|
5098
|
+
T0 = StyledAvatarStack, t2 = "AvatarStack", t3 = restProps, t4 = ref, t5 = size, $[21] !== len || $[22] !== size ? (t6 = len === 0 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, {
|
|
5055
5099
|
count: len,
|
|
5056
5100
|
size
|
|
5057
|
-
}) }), $[
|
|
5101
|
+
}) }), $[21] = len, $[22] = size, $[23] = t6) : t6 = $[23], $[24] !== extraCount || $[25] !== len || $[26] !== size ? (t7 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, {
|
|
5058
5102
|
count: extraCount,
|
|
5059
5103
|
size
|
|
5060
|
-
}) }), $[
|
|
5104
|
+
}) }), $[24] = extraCount, $[25] = len, $[26] = size, $[27] = t7) : t7 = $[27];
|
|
5061
5105
|
let t10;
|
|
5062
|
-
$[
|
|
5063
|
-
} else T0 = $[
|
|
5106
|
+
$[28] === size ? t10 = $[29] : (t10 = (child, childIndex) => /* @__PURE__ */ jsx("div", { children: cloneElement(child, { size }) }, String(childIndex)), $[28] = size, $[29] = t10), t8 = visibleChildren.map(t10), $[6] = childrenProp, $[7] = maxLengthProp, $[8] = ref, $[9] = restProps, $[10] = sizeProp, $[11] = T0, $[12] = t2, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = t6, $[17] = t7, $[18] = t8;
|
|
5107
|
+
} else T0 = $[11], t2 = $[12], t3 = $[13], t4 = $[14], t5 = $[15], t6 = $[16], t7 = $[17], t8 = $[18];
|
|
5064
5108
|
let t9;
|
|
5065
|
-
return $[
|
|
5109
|
+
return $[30] !== T0 || $[31] !== t2 || $[32] !== t3 || $[33] !== t4 || $[34] !== t5 || $[35] !== t6 || $[36] !== t7 || $[37] !== t8 ? (t9 = /* @__PURE__ */ jsxs(T0, {
|
|
5066
5110
|
"data-ui": t2,
|
|
5067
5111
|
...t3,
|
|
5068
5112
|
ref: t4,
|
|
@@ -5072,8 +5116,8 @@ const StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({
|
|
|
5072
5116
|
t7,
|
|
5073
5117
|
t8
|
|
5074
5118
|
]
|
|
5075
|
-
}), $[
|
|
5076
|
-
}
|
|
5119
|
+
}), $[30] = T0, $[31] = t2, $[32] = t3, $[33] = t4, $[34] = t5, $[35] = t6, $[36] = t7, $[37] = t8, $[38] = t9) : t9 = $[38], t9;
|
|
5120
|
+
};
|
|
5077
5121
|
function badgeStyle(props) {
|
|
5078
5122
|
let { $tone } = props;
|
|
5079
5123
|
return {
|
|
@@ -5089,21 +5133,21 @@ function badgeStyle(props) {
|
|
|
5089
5133
|
}
|
|
5090
5134
|
const StyledBadge = /* @__PURE__ */ styled(Box).withConfig({
|
|
5091
5135
|
displayName: "StyledBadge",
|
|
5092
|
-
componentId: "sc-
|
|
5093
|
-
})(responsiveRadiusStyle, badgeStyle), Badge =
|
|
5094
|
-
let $ = c(
|
|
5095
|
-
$[0] === props ? (children = $[1],
|
|
5136
|
+
componentId: "sc-vbjdyi-0"
|
|
5137
|
+
})(responsiveRadiusStyle, badgeStyle), Badge = function Badge(props) {
|
|
5138
|
+
let $ = c(22), children, ref, restProps, t0, t1, t2, t3;
|
|
5139
|
+
$[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);
|
|
5096
5140
|
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;
|
|
5097
|
-
$[
|
|
5141
|
+
$[8] === radius ? t4 = $[9] : (t4 = _getArrayProp(radius), $[8] = radius, $[9] = t4);
|
|
5098
5142
|
let t5;
|
|
5099
|
-
$[
|
|
5143
|
+
$[10] === padding ? t5 = $[11] : (t5 = _getArrayProp(padding), $[10] = padding, $[11] = t5);
|
|
5100
5144
|
let t6;
|
|
5101
|
-
$[
|
|
5145
|
+
$[12] !== children || $[13] !== fontSize ? (t6 = /* @__PURE__ */ jsx(Text, {
|
|
5102
5146
|
size: fontSize,
|
|
5103
5147
|
children
|
|
5104
|
-
}), $[
|
|
5148
|
+
}), $[12] = children, $[13] = fontSize, $[14] = t6) : t6 = $[14];
|
|
5105
5149
|
let t7;
|
|
5106
|
-
return $[
|
|
5150
|
+
return $[15] !== ref || $[16] !== restProps || $[17] !== t4 || $[18] !== t5 || $[19] !== t6 || $[20] !== tone ? (t7 = /* @__PURE__ */ jsx(StyledBadge, {
|
|
5107
5151
|
"data-ui": "Badge",
|
|
5108
5152
|
...restProps,
|
|
5109
5153
|
$tone: tone,
|
|
@@ -5111,8 +5155,8 @@ const StyledBadge = /* @__PURE__ */ styled(Box).withConfig({
|
|
|
5111
5155
|
padding: t5,
|
|
5112
5156
|
ref,
|
|
5113
5157
|
children: t6
|
|
5114
|
-
}), $[
|
|
5115
|
-
}
|
|
5158
|
+
}), $[15] = ref, $[16] = restProps, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = tone, $[21] = t7) : t7 = $[21], t7;
|
|
5159
|
+
};
|
|
5116
5160
|
function checkboxBaseStyles() {
|
|
5117
5161
|
return css`position:relative;display:inline-block;`;
|
|
5118
5162
|
}
|
|
@@ -5149,21 +5193,21 @@ function inputElementStyles(props) {
|
|
|
5149
5193
|
}
|
|
5150
5194
|
const StyledCheckbox = /* @__PURE__ */ styled.div.withConfig({
|
|
5151
5195
|
displayName: "StyledCheckbox",
|
|
5152
|
-
componentId: "sc-
|
|
5196
|
+
componentId: "sc-5kl5pw-0"
|
|
5153
5197
|
})(checkboxBaseStyles), Input$4 = /* @__PURE__ */ styled.input.withConfig({
|
|
5154
5198
|
displayName: "Input",
|
|
5155
|
-
componentId: "sc-
|
|
5156
|
-
})(inputElementStyles), Checkbox =
|
|
5157
|
-
let $ = c(
|
|
5158
|
-
$[0] === props ? (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4],
|
|
5199
|
+
componentId: "sc-5kl5pw-1"
|
|
5200
|
+
})(inputElementStyles), Checkbox = function Checkbox(props) {
|
|
5201
|
+
let $ = c(26), checked, className, customValidity, disabled, forwardedRef, indeterminate, readOnly, restProps, style;
|
|
5202
|
+
$[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);
|
|
5159
5203
|
let ref = useRef(null), t0;
|
|
5160
|
-
$[
|
|
5204
|
+
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[10] = t0) : t0 = $[10], useImperativeHandle(forwardedRef, t0);
|
|
5161
5205
|
let t1, t2;
|
|
5162
|
-
$[
|
|
5206
|
+
$[11] === indeterminate ? (t1 = $[12], t2 = $[13]) : (t1 = () => {
|
|
5163
5207
|
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
5164
|
-
}, t2 = [indeterminate], $[
|
|
5208
|
+
}, t2 = [indeterminate], $[11] = indeterminate, $[12] = t1, $[13] = t2), useEffect(t1, t2), useCustomValidity(ref, customValidity);
|
|
5165
5209
|
let t3 = !disabled && readOnly ? "" : void 0, t4 = customValidity ? "" : void 0, t5 = disabled || readOnly, t6;
|
|
5166
|
-
$[
|
|
5210
|
+
$[14] !== checked || $[15] !== readOnly || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 ? (t6 = /* @__PURE__ */ jsx(Input$4, {
|
|
5167
5211
|
"data-read-only": t3,
|
|
5168
5212
|
"data-error": t4,
|
|
5169
5213
|
...restProps,
|
|
@@ -5172,17 +5216,17 @@ const StyledCheckbox = /* @__PURE__ */ styled.div.withConfig({
|
|
|
5172
5216
|
type: "checkbox",
|
|
5173
5217
|
readOnly,
|
|
5174
5218
|
ref
|
|
5175
|
-
}), $[
|
|
5219
|
+
}), $[14] = checked, $[15] = readOnly, $[16] = restProps, $[17] = t3, $[18] = t4, $[19] = t5, $[20] = t6) : t6 = $[20];
|
|
5176
5220
|
let t7;
|
|
5177
|
-
$[
|
|
5221
|
+
$[21] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx(CheckmarkIcon, {}), /* @__PURE__ */ jsx(RemoveIcon, {})] }), $[21] = t7) : t7 = $[21];
|
|
5178
5222
|
let t8;
|
|
5179
|
-
return $[
|
|
5223
|
+
return $[22] !== className || $[23] !== style || $[24] !== t6 ? (t8 = /* @__PURE__ */ jsxs(StyledCheckbox, {
|
|
5180
5224
|
className,
|
|
5181
5225
|
"data-ui": "Checkbox",
|
|
5182
5226
|
style,
|
|
5183
5227
|
children: [t6, t7]
|
|
5184
|
-
}), $[
|
|
5185
|
-
}
|
|
5228
|
+
}), $[22] = className, $[23] = style, $[24] = t6, $[25] = t8) : t8 = $[25], t8;
|
|
5229
|
+
};
|
|
5186
5230
|
/**
|
|
5187
5231
|
* Get responsive CSS for the `code` font style.
|
|
5188
5232
|
* @internal
|
|
@@ -5236,34 +5280,34 @@ function codeBaseStyle() {
|
|
|
5236
5280
|
}
|
|
5237
5281
|
const LazyRefractor = lazy(() => import("./refractor-CC48DwHi.js")), StyledCode = /* @__PURE__ */ styled.pre.withConfig({
|
|
5238
5282
|
displayName: "StyledCode",
|
|
5239
|
-
componentId: "sc-
|
|
5240
|
-
})(codeBaseStyle, responsiveCodeFontStyle), Code =
|
|
5241
|
-
let $ = c(
|
|
5242
|
-
$[0] === props ? (children = $[1], language = $[2],
|
|
5283
|
+
componentId: "sc-o5lc7q-0"
|
|
5284
|
+
})(codeBaseStyle, responsiveCodeFontStyle), Code = function Code(props) {
|
|
5285
|
+
let $ = c(23), children, language, ref, restProps, t0, weight;
|
|
5286
|
+
$[0] === props ? (children = $[1], language = $[2], ref = $[3], restProps = $[4], t0 = $[5], weight = $[6]) : ({children, language, ref, size: t0, weight, ...restProps} = props, $[0] = props, $[1] = children, $[2] = language, $[3] = ref, $[4] = restProps, $[5] = t0, $[6] = weight);
|
|
5243
5287
|
let size = t0 === void 0 ? 2 : t0, t1;
|
|
5244
|
-
$[
|
|
5288
|
+
$[7] === size ? t1 = $[8] : (t1 = _getArrayProp(size), $[7] = size, $[8] = t1);
|
|
5245
5289
|
let t2 = weight, t3;
|
|
5246
|
-
$[
|
|
5290
|
+
$[9] === children ? t3 = $[10] : (t3 = /* @__PURE__ */ jsx("code", { children }), $[9] = children, $[10] = t3);
|
|
5247
5291
|
let t4;
|
|
5248
|
-
$[
|
|
5292
|
+
$[11] !== children || $[12] !== language ? (t4 = /* @__PURE__ */ jsx(LazyRefractor, {
|
|
5249
5293
|
language,
|
|
5250
5294
|
value: children
|
|
5251
|
-
}), $[
|
|
5295
|
+
}), $[11] = children, $[12] = language, $[13] = t4) : t4 = $[13];
|
|
5252
5296
|
let t5;
|
|
5253
|
-
$[
|
|
5297
|
+
$[14] !== t3 || $[15] !== t4 ? (t5 = /* @__PURE__ */ jsx(Suspense, {
|
|
5254
5298
|
fallback: t3,
|
|
5255
5299
|
children: t4
|
|
5256
|
-
}), $[
|
|
5300
|
+
}), $[14] = t3, $[15] = t4, $[16] = t5) : t5 = $[16];
|
|
5257
5301
|
let t6;
|
|
5258
|
-
return $[
|
|
5302
|
+
return $[17] !== ref || $[18] !== restProps || $[19] !== t1 || $[20] !== t2 || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledCode, {
|
|
5259
5303
|
"data-ui": "Code",
|
|
5260
5304
|
...restProps,
|
|
5261
5305
|
$size: t1,
|
|
5262
5306
|
$weight: t2,
|
|
5263
5307
|
ref,
|
|
5264
5308
|
children: t5
|
|
5265
|
-
}), $[
|
|
5266
|
-
}
|
|
5309
|
+
}), $[17] = ref, $[18] = restProps, $[19] = t1, $[20] = t2, $[21] = t5, $[22] = t6) : t6 = $[22], t6;
|
|
5310
|
+
};
|
|
5267
5311
|
/**
|
|
5268
5312
|
* Get responsive CSS for the `heading` font style.
|
|
5269
5313
|
* @internal
|
|
@@ -5277,23 +5321,23 @@ function headingBaseStyle(props) {
|
|
|
5277
5321
|
}
|
|
5278
5322
|
const StyledHeading = /* @__PURE__ */ styled.div.withConfig({
|
|
5279
5323
|
displayName: "StyledHeading",
|
|
5280
|
-
componentId: "sc-
|
|
5281
|
-
})(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), Heading =
|
|
5282
|
-
let $ = c(
|
|
5283
|
-
$[0] === props ? (align = $[1], childrenProp = $[2],
|
|
5324
|
+
componentId: "sc-2zsnox-0"
|
|
5325
|
+
})(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), Heading = function Heading(props) {
|
|
5326
|
+
let $ = c(27), align, childrenProp, ref, restProps, t0, t1, t2, textOverflow, weight;
|
|
5327
|
+
$[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);
|
|
5284
5328
|
let accent = t0 !== void 0 && t0, muted = t1 !== void 0 && t1, size = t2 === void 0 ? 2 : t2, children = childrenProp;
|
|
5285
5329
|
if (textOverflow === "ellipsis") {
|
|
5286
5330
|
let t3;
|
|
5287
|
-
$[
|
|
5331
|
+
$[10] === children ? t3 = $[11] : (t3 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[10] = children, $[11] = t3), children = t3;
|
|
5288
5332
|
}
|
|
5289
5333
|
let t3;
|
|
5290
|
-
$[
|
|
5334
|
+
$[12] === align ? t3 = $[13] : (t3 = _getArrayProp(align), $[12] = align, $[13] = t3);
|
|
5291
5335
|
let t4;
|
|
5292
|
-
$[
|
|
5336
|
+
$[14] === size ? t4 = $[15] : (t4 = _getArrayProp(size), $[14] = size, $[15] = t4);
|
|
5293
5337
|
let t5;
|
|
5294
|
-
$[
|
|
5338
|
+
$[16] === children ? t5 = $[17] : (t5 = /* @__PURE__ */ jsx("span", { children }), $[16] = children, $[17] = t5);
|
|
5295
5339
|
let t6;
|
|
5296
|
-
return $[
|
|
5340
|
+
return $[18] !== accent || $[19] !== muted || $[20] !== ref || $[21] !== restProps || $[22] !== t3 || $[23] !== t4 || $[24] !== t5 || $[25] !== weight ? (t6 = /* @__PURE__ */ jsx(StyledHeading, {
|
|
5297
5341
|
"data-ui": "Heading",
|
|
5298
5342
|
...restProps,
|
|
5299
5343
|
$accent: accent,
|
|
@@ -5303,8 +5347,8 @@ const StyledHeading = /* @__PURE__ */ styled.div.withConfig({
|
|
|
5303
5347
|
$weight: weight,
|
|
5304
5348
|
ref,
|
|
5305
5349
|
children: t5
|
|
5306
|
-
}), $[
|
|
5307
|
-
}
|
|
5350
|
+
}), $[18] = accent, $[19] = muted, $[20] = ref, $[21] = restProps, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = weight, $[26] = t6) : t6 = $[26], t6;
|
|
5351
|
+
};
|
|
5308
5352
|
function radioBaseStyle() {
|
|
5309
5353
|
return css`position:relative;&:not([hidden]){display:inline-block;}&[data-read-only]{outline:1px solid red;}`;
|
|
5310
5354
|
}
|
|
@@ -5329,17 +5373,17 @@ function inputElementStyle(props) {
|
|
|
5329
5373
|
}
|
|
5330
5374
|
const StyledRadio = /* @__PURE__ */ styled.div.withConfig({
|
|
5331
5375
|
displayName: "StyledRadio",
|
|
5332
|
-
componentId: "sc-
|
|
5376
|
+
componentId: "sc-e0cih5-0"
|
|
5333
5377
|
})(radioBaseStyle), Input$3 = /* @__PURE__ */ styled.input.withConfig({
|
|
5334
5378
|
displayName: "Input",
|
|
5335
|
-
componentId: "sc-
|
|
5336
|
-
})(inputElementStyle), Radio =
|
|
5337
|
-
let $ = c(
|
|
5338
|
-
$[0] === props ? (className = $[1], customValidity = $[2], disabled = $[3],
|
|
5379
|
+
componentId: "sc-e0cih5-1"
|
|
5380
|
+
})(inputElementStyle), Radio = function Radio(props) {
|
|
5381
|
+
let $ = c(20), className, customValidity, disabled, forwardedRef, readOnly, restProps, style;
|
|
5382
|
+
$[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);
|
|
5339
5383
|
let ref = useRef(null), t0;
|
|
5340
|
-
$[
|
|
5384
|
+
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);
|
|
5341
5385
|
let t1 = !disabled && readOnly ? "" : void 0, t2 = customValidity ? "" : void 0, t3 = disabled || readOnly, t4;
|
|
5342
|
-
$[
|
|
5386
|
+
$[9] !== readOnly || $[10] !== restProps || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 ? (t4 = /* @__PURE__ */ jsx(Input$3, {
|
|
5343
5387
|
"data-read-only": t1,
|
|
5344
5388
|
"data-error": t2,
|
|
5345
5389
|
...restProps,
|
|
@@ -5347,17 +5391,17 @@ const StyledRadio = /* @__PURE__ */ styled.div.withConfig({
|
|
|
5347
5391
|
readOnly,
|
|
5348
5392
|
ref,
|
|
5349
5393
|
type: "radio"
|
|
5350
|
-
}), $[
|
|
5394
|
+
}), $[9] = readOnly, $[10] = restProps, $[11] = t1, $[12] = t2, $[13] = t3, $[14] = t4) : t4 = $[14];
|
|
5351
5395
|
let t5;
|
|
5352
|
-
$[
|
|
5396
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsx("span", {}), $[15] = t5) : t5 = $[15];
|
|
5353
5397
|
let t6;
|
|
5354
|
-
return $[
|
|
5398
|
+
return $[16] !== className || $[17] !== style || $[18] !== t4 ? (t6 = /* @__PURE__ */ jsxs(StyledRadio, {
|
|
5355
5399
|
className,
|
|
5356
5400
|
"data-ui": "Radio",
|
|
5357
5401
|
style,
|
|
5358
5402
|
children: [t4, t5]
|
|
5359
|
-
}), $[
|
|
5360
|
-
}
|
|
5403
|
+
}), $[16] = className, $[17] = style, $[18] = t4, $[19] = t6) : t6 = $[19], t6;
|
|
5404
|
+
};
|
|
5361
5405
|
function rootStyle() {
|
|
5362
5406
|
return css`position:relative;width:-moz-available;width:-webkit-fill-available;width:stretch;&:not([hidden]){display:inline-block;}`;
|
|
5363
5407
|
}
|
|
@@ -5416,28 +5460,28 @@ const selectStyle = {
|
|
|
5416
5460
|
iconBox: iconBoxStyle
|
|
5417
5461
|
}, StyledSelect = /* @__PURE__ */ styled.div.withConfig({
|
|
5418
5462
|
displayName: "StyledSelect",
|
|
5419
|
-
componentId: "sc-
|
|
5463
|
+
componentId: "sc-2oiwac-0"
|
|
5420
5464
|
})(selectStyle.root), Input$2 = /* @__PURE__ */ styled.select.withConfig({
|
|
5421
5465
|
displayName: "Input",
|
|
5422
|
-
componentId: "sc-
|
|
5466
|
+
componentId: "sc-2oiwac-1"
|
|
5423
5467
|
})(selectStyle.input), IconBox = /* @__PURE__ */ styled(Box).withConfig({
|
|
5424
5468
|
displayName: "IconBox",
|
|
5425
|
-
componentId: "sc-
|
|
5426
|
-
})(selectStyle.iconBox), Select =
|
|
5427
|
-
let $ = c(
|
|
5428
|
-
$[0] === props ? (children = $[1], customValidity = $[2], disabled = $[3],
|
|
5469
|
+
componentId: "sc-2oiwac-2"
|
|
5470
|
+
})(selectStyle.iconBox), Select = function Select(props) {
|
|
5471
|
+
let $ = c(38), children, customValidity, disabled, forwardedRef, readOnly, restProps, t0, t1, t2, t3;
|
|
5472
|
+
$[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);
|
|
5429
5473
|
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;
|
|
5430
|
-
$[
|
|
5474
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[11] = t4) : t4 = $[11], useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
|
|
5431
5475
|
let t5 = !disabled && readOnly ? "" : void 0, t6;
|
|
5432
|
-
$[
|
|
5476
|
+
$[12] === fontSize ? t6 = $[13] : (t6 = _getArrayProp(fontSize), $[12] = fontSize, $[13] = t6);
|
|
5433
5477
|
let t7;
|
|
5434
|
-
$[
|
|
5478
|
+
$[14] === padding ? t7 = $[15] : (t7 = _getArrayProp(padding), $[14] = padding, $[15] = t7);
|
|
5435
5479
|
let t8;
|
|
5436
|
-
$[
|
|
5480
|
+
$[16] === radius ? t8 = $[17] : (t8 = _getArrayProp(radius), $[16] = radius, $[17] = t8);
|
|
5437
5481
|
let t9;
|
|
5438
|
-
$[
|
|
5482
|
+
$[18] === gap ? t9 = $[19] : (t9 = _getArrayProp(gap), $[18] = gap, $[19] = t9);
|
|
5439
5483
|
let t10 = disabled || readOnly, t11;
|
|
5440
|
-
$[
|
|
5484
|
+
$[20] !== children || $[21] !== restProps || $[22] !== t10 || $[23] !== t5 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9 ? (t11 = /* @__PURE__ */ jsx(Input$2, {
|
|
5441
5485
|
"data-read-only": t5,
|
|
5442
5486
|
"data-ui": "Select",
|
|
5443
5487
|
...restProps,
|
|
@@ -5448,25 +5492,25 @@ const selectStyle = {
|
|
|
5448
5492
|
disabled: t10,
|
|
5449
5493
|
ref,
|
|
5450
5494
|
children
|
|
5451
|
-
}), $[
|
|
5495
|
+
}), $[20] = children, $[21] = restProps, $[22] = t10, $[23] = t5, $[24] = t6, $[25] = t7, $[26] = t8, $[27] = t9, $[28] = t11) : t11 = $[28];
|
|
5452
5496
|
let t12;
|
|
5453
|
-
$[
|
|
5497
|
+
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[29] = t12) : t12 = $[29];
|
|
5454
5498
|
let t13;
|
|
5455
|
-
$[
|
|
5499
|
+
$[30] === fontSize ? t13 = $[31] : (t13 = /* @__PURE__ */ jsx(Text, {
|
|
5456
5500
|
size: fontSize,
|
|
5457
5501
|
children: t12
|
|
5458
|
-
}), $[
|
|
5502
|
+
}), $[30] = fontSize, $[31] = t13);
|
|
5459
5503
|
let t14;
|
|
5460
|
-
$[
|
|
5504
|
+
$[32] !== padding || $[33] !== t13 ? (t14 = /* @__PURE__ */ jsx(IconBox, {
|
|
5461
5505
|
padding,
|
|
5462
5506
|
children: t13
|
|
5463
|
-
}), $[
|
|
5507
|
+
}), $[32] = padding, $[33] = t13, $[34] = t14) : t14 = $[34];
|
|
5464
5508
|
let t15;
|
|
5465
|
-
return $[
|
|
5509
|
+
return $[35] !== t11 || $[36] !== t14 ? (t15 = /* @__PURE__ */ jsxs(StyledSelect, {
|
|
5466
5510
|
"data-ui": "Select",
|
|
5467
5511
|
children: [t11, t14]
|
|
5468
|
-
}), $[
|
|
5469
|
-
}
|
|
5512
|
+
}), $[35] = t11, $[36] = t14, $[37] = t15) : t15 = $[37], t15;
|
|
5513
|
+
};
|
|
5470
5514
|
function switchBaseStyles() {
|
|
5471
5515
|
return css`position:relative;&:not([hidden]){display:inline-block;}`;
|
|
5472
5516
|
}
|
|
@@ -5487,80 +5531,80 @@ function switchThumbStyles(props) {
|
|
|
5487
5531
|
}
|
|
5488
5532
|
const StyledSwitch = /* @__PURE__ */ styled.span.withConfig({
|
|
5489
5533
|
displayName: "StyledSwitch",
|
|
5490
|
-
componentId: "sc-
|
|
5534
|
+
componentId: "sc-izcn12-0"
|
|
5491
5535
|
})(switchBaseStyles), Input$1 = /* @__PURE__ */ styled.input.withConfig({
|
|
5492
5536
|
displayName: "Input",
|
|
5493
|
-
componentId: "sc-
|
|
5537
|
+
componentId: "sc-izcn12-1"
|
|
5494
5538
|
})(switchInputStyles), Representation = /* @__PURE__ */ styled.span.withConfig({
|
|
5495
5539
|
displayName: "Representation",
|
|
5496
|
-
componentId: "sc-
|
|
5540
|
+
componentId: "sc-izcn12-2"
|
|
5497
5541
|
})(switchRepresentationStyles), Track = /* @__PURE__ */ styled.span.withConfig({
|
|
5498
5542
|
displayName: "Track",
|
|
5499
|
-
componentId: "sc-
|
|
5543
|
+
componentId: "sc-izcn12-3"
|
|
5500
5544
|
})(switchTrackStyles), Thumb = /* @__PURE__ */ styled.span.withConfig({
|
|
5501
5545
|
displayName: "Thumb",
|
|
5502
|
-
componentId: "sc-
|
|
5503
|
-
})(switchThumbStyles), Switch =
|
|
5504
|
-
let $ = c(
|
|
5505
|
-
$[0] === props ? (checked = $[1], className = $[2], disabled = $[3],
|
|
5546
|
+
componentId: "sc-izcn12-4"
|
|
5547
|
+
})(switchThumbStyles), Switch = function Switch(props) {
|
|
5548
|
+
let $ = c(27), checked, className, disabled, forwardedRef, indeterminate, readOnly, restProps, style;
|
|
5549
|
+
$[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);
|
|
5506
5550
|
let ref = useRef(null), t0;
|
|
5507
|
-
$[
|
|
5551
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], useImperativeHandle(forwardedRef, t0);
|
|
5508
5552
|
let t1, t2;
|
|
5509
|
-
$[
|
|
5553
|
+
$[10] === indeterminate ? (t1 = $[11], t2 = $[12]) : (t1 = () => {
|
|
5510
5554
|
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
5511
|
-
}, t2 = [indeterminate], $[
|
|
5555
|
+
}, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2), useEffect(t1, t2);
|
|
5512
5556
|
let t3 = !disabled && readOnly ? "" : void 0, t4 = indeterminate !== !0 && checked, t5 = disabled || readOnly, t6;
|
|
5513
|
-
$[
|
|
5557
|
+
$[13] !== restProps || $[14] !== t3 || $[15] !== t4 || $[16] !== t5 ? (t6 = /* @__PURE__ */ jsx(Input$1, {
|
|
5514
5558
|
"data-read-only": t3,
|
|
5515
5559
|
...restProps,
|
|
5516
5560
|
checked: t4,
|
|
5517
5561
|
disabled: t5,
|
|
5518
5562
|
type: "checkbox",
|
|
5519
5563
|
ref
|
|
5520
|
-
}), $[
|
|
5564
|
+
}), $[13] = restProps, $[14] = t3, $[15] = t4, $[16] = t5, $[17] = t6) : t6 = $[17];
|
|
5521
5565
|
let t7;
|
|
5522
|
-
$[
|
|
5566
|
+
$[18] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsx(Track, {}), $[18] = t7) : t7 = $[18];
|
|
5523
5567
|
let t8;
|
|
5524
|
-
$[
|
|
5568
|
+
$[19] !== checked || $[20] !== indeterminate ? (t8 = /* @__PURE__ */ jsxs(Representation, {
|
|
5525
5569
|
"aria-hidden": !0,
|
|
5526
5570
|
"data-name": "representation",
|
|
5527
5571
|
children: [t7, /* @__PURE__ */ jsx(Thumb, {
|
|
5528
5572
|
$checked: checked,
|
|
5529
5573
|
$indeterminate: indeterminate
|
|
5530
5574
|
})]
|
|
5531
|
-
}), $[
|
|
5575
|
+
}), $[19] = checked, $[20] = indeterminate, $[21] = t8) : t8 = $[21];
|
|
5532
5576
|
let t9;
|
|
5533
|
-
return $[
|
|
5577
|
+
return $[22] !== className || $[23] !== style || $[24] !== t6 || $[25] !== t8 ? (t9 = /* @__PURE__ */ jsxs(StyledSwitch, {
|
|
5534
5578
|
className,
|
|
5535
5579
|
"data-ui": "Switch",
|
|
5536
5580
|
style,
|
|
5537
5581
|
children: [t6, t8]
|
|
5538
|
-
}), $[
|
|
5539
|
-
}
|
|
5582
|
+
}), $[22] = className, $[23] = style, $[24] = t6, $[25] = t8, $[26] = t9) : t9 = $[26], t9;
|
|
5583
|
+
}, StyledTextArea = /* @__PURE__ */ styled.span.withConfig({
|
|
5540
5584
|
displayName: "StyledTextArea",
|
|
5541
|
-
componentId: "sc-
|
|
5585
|
+
componentId: "sc-x52v3e-0"
|
|
5542
5586
|
})(textInputRootStyle), InputRoot = styled.span.withConfig({
|
|
5543
5587
|
displayName: "InputRoot",
|
|
5544
|
-
componentId: "sc-
|
|
5588
|
+
componentId: "sc-x52v3e-1"
|
|
5545
5589
|
})`flex:1;min-width:0;display:block;position:relative;`, Input = /* @__PURE__ */ styled.textarea.withConfig({
|
|
5546
5590
|
displayName: "Input",
|
|
5547
|
-
componentId: "sc-
|
|
5591
|
+
componentId: "sc-x52v3e-2"
|
|
5548
5592
|
})(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled.div.withConfig({
|
|
5549
5593
|
displayName: "Presentation",
|
|
5550
|
-
componentId: "sc-
|
|
5551
|
-
})(responsiveRadiusStyle, textInputRepresentationStyle), TextArea =
|
|
5552
|
-
let $ = c(
|
|
5553
|
-
$[0] === props ? (__unstable_disableFocusRing = $[1], customValidity = $[2],
|
|
5594
|
+
componentId: "sc-x52v3e-3"
|
|
5595
|
+
})(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = function TextArea(props) {
|
|
5596
|
+
let $ = c(36), __unstable_disableFocusRing, customValidity, forwardedRef, restProps, t0, t1, t2, t3, t4, weight;
|
|
5597
|
+
$[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);
|
|
5554
5598
|
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;
|
|
5555
|
-
$[
|
|
5599
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[11] = t5) : t5 = $[11], useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
|
|
5556
5600
|
let t6 = rootTheme.scheme, t7 = rootTheme.tone, t8;
|
|
5557
|
-
$[
|
|
5601
|
+
$[12] === fontSize ? t8 = $[13] : (t8 = _getArrayProp(fontSize), $[12] = fontSize, $[13] = t8);
|
|
5558
5602
|
let t9;
|
|
5559
|
-
$[
|
|
5603
|
+
$[14] === padding ? t9 = $[15] : (t9 = _getArrayProp(padding), $[14] = padding, $[15] = t9);
|
|
5560
5604
|
let t10 = rootTheme.scheme, t11;
|
|
5561
|
-
$[
|
|
5605
|
+
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t11 = _getArrayProp(0), $[16] = t11) : t11 = $[16];
|
|
5562
5606
|
let t12;
|
|
5563
|
-
$[
|
|
5607
|
+
$[17] !== disabled || $[18] !== restProps || $[19] !== rootTheme.scheme || $[20] !== rootTheme.tone || $[21] !== t8 || $[22] !== t9 || $[23] !== weight ? (t12 = /* @__PURE__ */ jsx(Input, {
|
|
5564
5608
|
"data-as": "textarea",
|
|
5565
5609
|
"data-scheme": t6,
|
|
5566
5610
|
"data-tone": t7,
|
|
@@ -5573,11 +5617,11 @@ const StyledSwitch = /* @__PURE__ */ styled.span.withConfig({
|
|
|
5573
5617
|
$weight: weight,
|
|
5574
5618
|
disabled,
|
|
5575
5619
|
ref
|
|
5576
|
-
}), $[
|
|
5620
|
+
}), $[17] = disabled, $[18] = restProps, $[19] = rootTheme.scheme, $[20] = rootTheme.tone, $[21] = t8, $[22] = t9, $[23] = weight, $[24] = t12) : t12 = $[24];
|
|
5577
5621
|
let t13;
|
|
5578
|
-
$[
|
|
5622
|
+
$[25] === radius ? t13 = $[26] : (t13 = _getArrayProp(radius), $[25] = radius, $[26] = t13);
|
|
5579
5623
|
let t14 = border ? "" : void 0, t15;
|
|
5580
|
-
$[
|
|
5624
|
+
$[27] !== __unstable_disableFocusRing || $[28] !== rootTheme.scheme || $[29] !== rootTheme.tone || $[30] !== t13 || $[31] !== t14 ? (t15 = /* @__PURE__ */ jsx(Presentation, {
|
|
5581
5625
|
$radius: t13,
|
|
5582
5626
|
$unstableDisableFocusRing: __unstable_disableFocusRing,
|
|
5583
5627
|
$scheme: rootTheme.scheme,
|
|
@@ -5585,13 +5629,13 @@ const StyledSwitch = /* @__PURE__ */ styled.span.withConfig({
|
|
|
5585
5629
|
"data-border": t14,
|
|
5586
5630
|
"data-scheme": rootTheme.scheme,
|
|
5587
5631
|
"data-tone": rootTheme.tone
|
|
5588
|
-
}), $[
|
|
5632
|
+
}), $[27] = __unstable_disableFocusRing, $[28] = rootTheme.scheme, $[29] = rootTheme.tone, $[30] = t13, $[31] = t14, $[32] = t15) : t15 = $[32];
|
|
5589
5633
|
let t16;
|
|
5590
|
-
return $[
|
|
5634
|
+
return $[33] !== t12 || $[34] !== t15 ? (t16 = /* @__PURE__ */ jsx(StyledTextArea, {
|
|
5591
5635
|
"data-ui": "TextArea",
|
|
5592
5636
|
children: /* @__PURE__ */ jsxs(InputRoot, { children: [t12, t15] })
|
|
5593
|
-
}), $[
|
|
5594
|
-
}
|
|
5637
|
+
}), $[33] = t12, $[34] = t15, $[35] = t16) : t16 = $[35], t16;
|
|
5638
|
+
};
|
|
5595
5639
|
/**
|
|
5596
5640
|
* @beta
|
|
5597
5641
|
*/
|
|
@@ -5698,40 +5742,40 @@ const DEFAULT_FALLBACK_PLACEMENTS = {
|
|
|
5698
5742
|
]
|
|
5699
5743
|
}, MotionCard = styled(motion.create(Card)).withConfig({
|
|
5700
5744
|
displayName: "MotionCard",
|
|
5701
|
-
componentId: "sc-
|
|
5702
|
-
})`will-change:transform;`, TooltipCard =
|
|
5703
|
-
let $ = c(
|
|
5704
|
-
$[0] === props ? (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11],
|
|
5745
|
+
componentId: "sc-qzzn8n-0"
|
|
5746
|
+
})`will-change:transform;`, TooltipCard = function TooltipCard(props) {
|
|
5747
|
+
let $ = c(49), animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, ref, restProps, scheme, shadow, style;
|
|
5748
|
+
$[0] === props ? (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], ref = $[12], restProps = $[13], scheme = $[14], shadow = $[15], style = $[16]) : ({animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, ref, scheme, shadow, style, ...restProps} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = ref, $[13] = restProps, $[14] = scheme, $[15] = shadow, $[16] = style);
|
|
5705
5749
|
let t0 = animate ? "transform" : void 0, t1;
|
|
5706
|
-
$[
|
|
5750
|
+
$[17] !== originX || $[18] !== originY || $[19] !== style || $[20] !== t0 ? (t1 = {
|
|
5707
5751
|
originX,
|
|
5708
5752
|
originY,
|
|
5709
5753
|
willChange: t0,
|
|
5710
5754
|
...style
|
|
5711
|
-
}, $[
|
|
5755
|
+
}, $[17] = originX, $[18] = originY, $[19] = style, $[20] = t0, $[21] = t1) : t1 = $[21];
|
|
5712
5756
|
let rootStyle = t1, t2 = arrowX === null ? void 0 : arrowX, t3 = arrowY === null ? void 0 : arrowY, t4;
|
|
5713
|
-
$[
|
|
5757
|
+
$[22] !== t2 || $[23] !== t3 ? (t4 = {
|
|
5714
5758
|
left: t2,
|
|
5715
5759
|
top: t3,
|
|
5716
5760
|
right: void 0,
|
|
5717
5761
|
bottom: void 0
|
|
5718
|
-
}, $[
|
|
5762
|
+
}, $[22] = t2, $[23] = t3, $[24] = t4) : t4 = $[24];
|
|
5719
5763
|
let arrowStyle = t4, t5 = restProps, t6;
|
|
5720
|
-
$[
|
|
5764
|
+
$[25] === animate ? t6 = $[26] : (t6 = animate ? ["hidden", "initial"] : void 0, $[25] = animate, $[26] = t6);
|
|
5721
5765
|
let t7;
|
|
5722
|
-
$[
|
|
5766
|
+
$[27] === animate ? t7 = $[28] : (t7 = animate ? ["visible", "scaleIn"] : void 0, $[27] = animate, $[28] = t7);
|
|
5723
5767
|
let t8;
|
|
5724
|
-
$[
|
|
5768
|
+
$[29] === animate ? t8 = $[30] : (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[29] = animate, $[30] = t8);
|
|
5725
5769
|
let t9;
|
|
5726
|
-
$[
|
|
5770
|
+
$[31] !== arrow || $[32] !== arrowRef || $[33] !== arrowStyle ? (t9 = arrow && /* @__PURE__ */ jsx(Arrow, {
|
|
5727
5771
|
ref: arrowRef,
|
|
5728
5772
|
style: arrowStyle,
|
|
5729
5773
|
width: 15,
|
|
5730
5774
|
height: 6,
|
|
5731
5775
|
radius: 2
|
|
5732
|
-
}), $[
|
|
5776
|
+
}), $[31] = arrow, $[32] = arrowRef, $[33] = arrowStyle, $[34] = t9) : t9 = $[34];
|
|
5733
5777
|
let t10;
|
|
5734
|
-
return $[
|
|
5778
|
+
return $[35] !== children || $[36] !== padding || $[37] !== placement || $[38] !== radius || $[39] !== ref || $[40] !== rootStyle || $[41] !== scheme || $[42] !== shadow || $[43] !== t5 || $[44] !== t6 || $[45] !== t7 || $[46] !== t8 || $[47] !== t9 ? (t10 = /* @__PURE__ */ jsxs(MotionCard, {
|
|
5735
5779
|
"data-ui": "Tooltip__card",
|
|
5736
5780
|
...t5,
|
|
5737
5781
|
"data-placement": placement,
|
|
@@ -5747,8 +5791,8 @@ const DEFAULT_FALLBACK_PLACEMENTS = {
|
|
|
5747
5791
|
animate: t7,
|
|
5748
5792
|
exit: t8,
|
|
5749
5793
|
children: [children, t9]
|
|
5750
|
-
}), $[
|
|
5751
|
-
}
|
|
5794
|
+
}), $[35] = children, $[36] = padding, $[37] = placement, $[38] = radius, $[39] = ref, $[40] = rootStyle, $[41] = scheme, $[42] = shadow, $[43] = t5, $[44] = t6, $[45] = t7, $[46] = t8, $[47] = t9, $[48] = t10) : t10 = $[48], t10;
|
|
5795
|
+
}, TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
|
|
5752
5796
|
/**
|
|
5753
5797
|
* @beta
|
|
5754
5798
|
*/
|
|
@@ -5757,91 +5801,91 @@ function useTooltipDelayGroup() {
|
|
|
5757
5801
|
}
|
|
5758
5802
|
const StyledTooltip = styled(Layer).withConfig({
|
|
5759
5803
|
displayName: "StyledTooltip",
|
|
5760
|
-
componentId: "sc-
|
|
5761
|
-
})`pointer-events:none;`, Tooltip =
|
|
5762
|
-
let $ = c(
|
|
5763
|
-
$[0] === props ? (_boundaryElement = $[1], _fallbackPlacementsProp = $[2], _zOffset = $[3], childProp = $[4], content = $[5], delay = $[6], disabled = $[7],
|
|
5804
|
+
componentId: "sc-yxng5e-0"
|
|
5805
|
+
})`pointer-events:none;`, Tooltip = function Tooltip(props) {
|
|
5806
|
+
let $ = c(138), boundaryElementContext = useBoundaryElement(), { layer } = useTheme_v2(), _boundaryElement, _fallbackPlacementsProp, _zOffset, childProp, content, delay, disabled, forwardedRef, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5;
|
|
5807
|
+
$[0] === props ? (_boundaryElement = $[1], _fallbackPlacementsProp = $[2], _zOffset = $[3], childProp = $[4], content = $[5], delay = $[6], disabled = $[7], forwardedRef = $[8], portalProp = $[9], restProps = $[10], scheme = $[11], t0 = $[12], t1 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17]) : ({animate: t0, arrow: t1, boundaryElement: _boundaryElement, children: childProp, content, disabled, fallbackPlacements: _fallbackPlacementsProp, padding: t2, placement: t3, portal: portalProp, radius: t4, ref: forwardedRef, scheme, shadow: t5, zOffset: _zOffset, delay, ...restProps} = props, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacementsProp, $[3] = _zOffset, $[4] = childProp, $[5] = content, $[6] = delay, $[7] = disabled, $[8] = forwardedRef, $[9] = portalProp, $[10] = restProps, $[11] = scheme, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5);
|
|
5764
5808
|
let _animate = t0 !== void 0 && t0, arrowProp = t1 !== void 0 && t1, padding = t2 === void 0 ? 2 : t2, placementProp = t3 === void 0 ? "bottom" : t3, radius = t4 === void 0 ? 2 : t4, shadow = t5 === void 0 ? 2 : t5, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacementsProp = _fallbackPlacementsProp ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"], zOffset = _zOffset ?? layer.tooltip.zOffset, animate = !usePrefersReducedMotion() && _animate, t6;
|
|
5765
|
-
$[
|
|
5809
|
+
$[18] === fallbackPlacementsProp ? t6 = $[19] : (t6 = _getArrayProp(fallbackPlacementsProp), $[18] = fallbackPlacementsProp, $[19] = t6);
|
|
5766
5810
|
let fallbackPlacements = t6, ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), [tooltipMaxWidth, setTooltipMaxWidth] = useState(0), t7;
|
|
5767
|
-
$[
|
|
5811
|
+
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[20] = t7) : t7 = $[20], useImperativeHandle(forwardedRef, t7);
|
|
5768
5812
|
let portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, t8;
|
|
5769
|
-
$[
|
|
5813
|
+
$[21] !== animate || $[22] !== arrowProp || $[23] !== boundaryElement || $[24] !== fallbackPlacements ? (t8 = {
|
|
5770
5814
|
animate,
|
|
5771
5815
|
arrowProp,
|
|
5772
5816
|
arrowRef,
|
|
5773
5817
|
boundaryElement,
|
|
5774
5818
|
fallbackPlacements,
|
|
5775
5819
|
rootBoundary: "viewport"
|
|
5776
|
-
}, $[
|
|
5820
|
+
}, $[21] = animate, $[22] = arrowProp, $[23] = boundaryElement, $[24] = fallbackPlacements, $[25] = t8) : t8 = $[25];
|
|
5777
5821
|
let middleware = useMiddleware(t8), t9;
|
|
5778
|
-
$[
|
|
5822
|
+
$[26] === referenceElement ? t9 = $[27] : (t9 = { reference: referenceElement }, $[26] = referenceElement, $[27] = t9);
|
|
5779
5823
|
let t10;
|
|
5780
|
-
$[
|
|
5824
|
+
$[28] !== middleware || $[29] !== placementProp || $[30] !== t9 ? (t10 = {
|
|
5781
5825
|
middleware,
|
|
5782
5826
|
placement: placementProp,
|
|
5783
5827
|
whileElementsMounted: autoUpdate,
|
|
5784
5828
|
elements: t9
|
|
5785
|
-
}, $[
|
|
5829
|
+
}, $[28] = middleware, $[29] = placementProp, $[30] = t9, $[31] = t10) : t10 = $[31];
|
|
5786
5830
|
let { floatingStyles, placement, middlewareData, refs, update } = useFloating(t10), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = useId(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup(), t11;
|
|
5787
|
-
$[
|
|
5831
|
+
$[32] === delayGroupContext ? t11 = $[33] : (t11 = delayGroupContext || {}, $[32] = delayGroupContext, $[33] = t11);
|
|
5788
5832
|
let { setIsGroupActive, setOpenTooltipId } = t11, showTooltip = isOpen || delayGroupContext?.openTooltipId === tooltipId, isInsideGroup = delayGroupContext !== null, openDelayProp = typeof delay == "number" ? delay : delay?.open || 0, closeDelayProp = typeof delay == "number" ? delay : delay?.close || 0, openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp, closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp, t12;
|
|
5789
|
-
$[
|
|
5833
|
+
$[34] !== closeDelay || $[35] !== isInsideGroup || $[36] !== openDelay || $[37] !== setIsGroupActive || $[38] !== setIsOpen || $[39] !== setOpenTooltipId || $[40] !== tooltipId ? (t12 = (open, immediate) => {
|
|
5790
5834
|
if (isInsideGroup) if (open) {
|
|
5791
5835
|
let groupedOpenDelay = immediate ? 0 : openDelay;
|
|
5792
5836
|
setIsGroupActive?.(open, groupedOpenDelay), setOpenTooltipId?.(tooltipId, groupedOpenDelay);
|
|
5793
5837
|
} else setIsGroupActive?.(open, closeDelay > 200 ? closeDelay : 200), setOpenTooltipId?.(null, immediate ? 0 : closeDelay);
|
|
5794
5838
|
else setIsOpen(open, immediate ? 0 : open ? openDelay : closeDelay);
|
|
5795
|
-
}, $[
|
|
5839
|
+
}, $[34] = closeDelay, $[35] = isInsideGroup, $[36] = openDelay, $[37] = setIsGroupActive, $[38] = setIsOpen, $[39] = setOpenTooltipId, $[40] = tooltipId, $[41] = t12) : t12 = $[41];
|
|
5796
5840
|
let handleIsOpenChange = t12, t13;
|
|
5797
|
-
$[
|
|
5841
|
+
$[42] !== childProp?.props || $[43] !== handleIsOpenChange ? (t13 = (e) => {
|
|
5798
5842
|
handleIsOpenChange(!1), childProp?.props?.onBlur?.(e);
|
|
5799
|
-
}, $[
|
|
5843
|
+
}, $[42] = childProp?.props, $[43] = handleIsOpenChange, $[44] = t13) : t13 = $[44], childProp?.props;
|
|
5800
5844
|
let handleBlur = t13, t14;
|
|
5801
|
-
$[
|
|
5845
|
+
$[45] !== childProp?.props || $[46] !== handleIsOpenChange ? (t14 = (e_0) => {
|
|
5802
5846
|
handleIsOpenChange(!1, !0), childProp?.props.onClick?.(e_0);
|
|
5803
|
-
}, $[
|
|
5847
|
+
}, $[45] = childProp?.props, $[46] = handleIsOpenChange, $[47] = t14) : t14 = $[47], childProp?.props;
|
|
5804
5848
|
let handleClick = t14, t15;
|
|
5805
|
-
$[
|
|
5849
|
+
$[48] !== childProp?.props || $[49] !== handleIsOpenChange ? (t15 = (e_1) => {
|
|
5806
5850
|
handleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e_1);
|
|
5807
|
-
}, $[
|
|
5851
|
+
}, $[48] = childProp?.props, $[49] = handleIsOpenChange, $[50] = t15) : t15 = $[50], childProp?.props;
|
|
5808
5852
|
let handleContextMenu = t15, t16;
|
|
5809
|
-
$[
|
|
5853
|
+
$[51] !== childProp?.props || $[52] !== handleIsOpenChange ? (t16 = (e_2) => {
|
|
5810
5854
|
handleIsOpenChange(!0), childProp?.props?.onFocus?.(e_2);
|
|
5811
|
-
}, $[
|
|
5855
|
+
}, $[51] = childProp?.props, $[52] = handleIsOpenChange, $[53] = t16) : t16 = $[53], childProp?.props;
|
|
5812
5856
|
let handleFocus = t16, t17;
|
|
5813
|
-
$[
|
|
5857
|
+
$[54] !== childProp?.props || $[55] !== handleIsOpenChange ? (t17 = (e_3) => {
|
|
5814
5858
|
handleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e_3);
|
|
5815
|
-
}, $[
|
|
5859
|
+
}, $[54] = childProp?.props, $[55] = handleIsOpenChange, $[56] = t17) : t17 = $[56], childProp?.props;
|
|
5816
5860
|
let handleMouseEnter = t17, t18;
|
|
5817
|
-
$[
|
|
5861
|
+
$[57] !== childProp?.props || $[58] !== handleIsOpenChange ? (t18 = (e_4) => {
|
|
5818
5862
|
handleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e_4);
|
|
5819
|
-
}, $[
|
|
5863
|
+
}, $[57] = childProp?.props, $[58] = handleIsOpenChange, $[59] = t18) : t18 = $[59], childProp?.props;
|
|
5820
5864
|
let handleMouseLeave = t18, t19;
|
|
5821
|
-
$[
|
|
5865
|
+
$[60] !== handleIsOpenChange || $[61] !== isInsideGroup || $[62] !== referenceElement || $[63] !== showTooltip ? (t19 = {
|
|
5822
5866
|
handleIsOpenChange,
|
|
5823
5867
|
referenceElement,
|
|
5824
5868
|
showTooltip,
|
|
5825
5869
|
isInsideGroup
|
|
5826
|
-
}, $[
|
|
5870
|
+
}, $[60] = handleIsOpenChange, $[61] = isInsideGroup, $[62] = referenceElement, $[63] = showTooltip, $[64] = t19) : t19 = $[64], useCloseOnMouseLeave(t19);
|
|
5827
5871
|
let t20, t21;
|
|
5828
|
-
$[
|
|
5872
|
+
$[65] !== disabled || $[66] !== handleIsOpenChange || $[67] !== showTooltip ? (t20 = () => {
|
|
5829
5873
|
disabled && showTooltip && handleIsOpenChange(!1);
|
|
5830
5874
|
}, t21 = [
|
|
5831
5875
|
disabled,
|
|
5832
5876
|
handleIsOpenChange,
|
|
5833
5877
|
showTooltip
|
|
5834
|
-
], $[
|
|
5878
|
+
], $[65] = disabled, $[66] = handleIsOpenChange, $[67] = showTooltip, $[68] = t20, $[69] = t21) : (t20 = $[68], t21 = $[69]), useEffect(t20, t21);
|
|
5835
5879
|
let t22, t23;
|
|
5836
|
-
$[
|
|
5880
|
+
$[70] !== content || $[71] !== handleIsOpenChange || $[72] !== showTooltip ? (t22 = () => {
|
|
5837
5881
|
!content && showTooltip && handleIsOpenChange(!1);
|
|
5838
5882
|
}, t23 = [
|
|
5839
5883
|
content,
|
|
5840
5884
|
handleIsOpenChange,
|
|
5841
5885
|
showTooltip
|
|
5842
|
-
], $[
|
|
5886
|
+
], $[70] = content, $[71] = handleIsOpenChange, $[72] = showTooltip, $[73] = t22, $[74] = t23) : (t22 = $[73], t23 = $[74]), useEffect(t22, t23);
|
|
5843
5887
|
let t24, t25;
|
|
5844
|
-
$[
|
|
5888
|
+
$[75] !== handleIsOpenChange || $[76] !== showTooltip ? (t24 = () => {
|
|
5845
5889
|
if (!showTooltip) return;
|
|
5846
5890
|
let handleWindowKeyDown = function handleWindowKeyDown(event) {
|
|
5847
5891
|
event.key === "Escape" && handleIsOpenChange(!1, !0);
|
|
@@ -5849,22 +5893,22 @@ const StyledTooltip = styled(Layer).withConfig({
|
|
|
5849
5893
|
return window.addEventListener("keydown", handleWindowKeyDown), () => {
|
|
5850
5894
|
window.removeEventListener("keydown", handleWindowKeyDown);
|
|
5851
5895
|
};
|
|
5852
|
-
}, t25 = [handleIsOpenChange, showTooltip], $[
|
|
5896
|
+
}, t25 = [handleIsOpenChange, showTooltip], $[75] = handleIsOpenChange, $[76] = showTooltip, $[77] = t24, $[78] = t25) : (t24 = $[77], t25 = $[78]), useEffect(t24, t25);
|
|
5853
5897
|
let t26;
|
|
5854
|
-
$[
|
|
5898
|
+
$[79] !== boundaryElement || $[80] !== portalElement?.offsetWidth ? (t26 = () => {
|
|
5855
5899
|
let availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], portalElement?.offsetWidth || document.body.offsetWidth];
|
|
5856
5900
|
setTooltipMaxWidth(Math.min(...availableWidths) - 8);
|
|
5857
|
-
}, $[
|
|
5901
|
+
}, $[79] = boundaryElement, $[80] = portalElement?.offsetWidth, $[81] = t26) : t26 = $[81];
|
|
5858
5902
|
let t27;
|
|
5859
|
-
$[
|
|
5903
|
+
$[82] !== boundaryElement || $[83] !== portalElement ? (t27 = [boundaryElement, portalElement], $[82] = boundaryElement, $[83] = portalElement, $[84] = t27) : t27 = $[84], useLayoutEffect(t26, t27);
|
|
5860
5904
|
let t28;
|
|
5861
|
-
$[
|
|
5905
|
+
$[85] === update ? t28 = $[86] : (t28 = (arrowEl) => {
|
|
5862
5906
|
arrowRef.current = arrowEl, update();
|
|
5863
|
-
}, $[
|
|
5907
|
+
}, $[85] = update, $[86] = t28);
|
|
5864
5908
|
let setArrow = t28, t29;
|
|
5865
|
-
$[
|
|
5909
|
+
$[87] === refs ? t29 = $[88] : (t29 = (node) => {
|
|
5866
5910
|
ref.current = node, refs.setFloating(node);
|
|
5867
|
-
}, $[
|
|
5911
|
+
}, $[87] = refs, $[88] = t29);
|
|
5868
5912
|
let setFloating = t29, t30;
|
|
5869
5913
|
bb0: {
|
|
5870
5914
|
if (!childProp) {
|
|
@@ -5872,7 +5916,7 @@ const StyledTooltip = styled(Layer).withConfig({
|
|
|
5872
5916
|
break bb0;
|
|
5873
5917
|
}
|
|
5874
5918
|
let t31;
|
|
5875
|
-
$[
|
|
5919
|
+
$[89] !== childProp || $[90] !== handleBlur || $[91] !== handleClick || $[92] !== handleContextMenu || $[93] !== handleFocus || $[94] !== handleMouseEnter || $[95] !== handleMouseLeave ? (t31 = cloneElement(childProp, {
|
|
5876
5920
|
onBlur: handleBlur,
|
|
5877
5921
|
onFocus: handleFocus,
|
|
5878
5922
|
onMouseEnter: handleMouseEnter,
|
|
@@ -5880,23 +5924,23 @@ const StyledTooltip = styled(Layer).withConfig({
|
|
|
5880
5924
|
onClick: handleClick,
|
|
5881
5925
|
onContextMenu: handleContextMenu,
|
|
5882
5926
|
ref: setReferenceElement
|
|
5883
|
-
}), $[
|
|
5927
|
+
}), $[89] = childProp, $[90] = handleBlur, $[91] = handleClick, $[92] = handleContextMenu, $[93] = handleFocus, $[94] = handleMouseEnter, $[95] = handleMouseLeave, $[96] = t31) : t31 = $[96], t30 = t31;
|
|
5884
5928
|
}
|
|
5885
5929
|
let child = t30, t31;
|
|
5886
|
-
$[
|
|
5930
|
+
$[97] === childProp ? t31 = $[98] : (t31 = childProp ? getElementRef(childProp) : null, $[97] = childProp, $[98] = t31);
|
|
5887
5931
|
let t32, t33;
|
|
5888
|
-
if ($[
|
|
5932
|
+
if ($[99] === referenceElement ? (t32 = $[100], t33 = $[101]) : (t32 = () => referenceElement, t33 = [referenceElement], $[99] = referenceElement, $[100] = t32, $[101] = t33), useImperativeHandle(t31, t32, t33), !child) {
|
|
5889
5933
|
let t34;
|
|
5890
|
-
return $[
|
|
5934
|
+
return $[102] === Symbol.for("react.memo_cache_sentinel") ? (t34 = /* @__PURE__ */ jsx(Fragment$1, {}), $[102] = t34) : t34 = $[102], t34;
|
|
5891
5935
|
}
|
|
5892
5936
|
if (disabled) return child;
|
|
5893
5937
|
let t34 = tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0, t35;
|
|
5894
|
-
$[
|
|
5938
|
+
$[103] !== floatingStyles || $[104] !== t34 ? (t35 = {
|
|
5895
5939
|
...floatingStyles,
|
|
5896
5940
|
maxWidth: t34
|
|
5897
|
-
}, $[
|
|
5941
|
+
}, $[103] = floatingStyles, $[104] = t34, $[105] = t35) : t35 = $[105];
|
|
5898
5942
|
let t36;
|
|
5899
|
-
$[
|
|
5943
|
+
$[106] !== animate || $[107] !== arrowProp || $[108] !== arrowX || $[109] !== arrowY || $[110] !== content || $[111] !== originX || $[112] !== originY || $[113] !== padding || $[114] !== placement || $[115] !== radius || $[116] !== restProps || $[117] !== scheme || $[118] !== setArrow || $[119] !== setFloating || $[120] !== shadow ? (t36 = /* @__PURE__ */ jsx(TooltipCard, {
|
|
5900
5944
|
...restProps,
|
|
5901
5945
|
animate,
|
|
5902
5946
|
arrow: arrowProp,
|
|
@@ -5912,26 +5956,33 @@ const StyledTooltip = styled(Layer).withConfig({
|
|
|
5912
5956
|
scheme,
|
|
5913
5957
|
shadow,
|
|
5914
5958
|
children: content
|
|
5915
|
-
}), $[
|
|
5959
|
+
}), $[106] = animate, $[107] = arrowProp, $[108] = arrowX, $[109] = arrowY, $[110] = content, $[111] = originX, $[112] = originY, $[113] = padding, $[114] = placement, $[115] = radius, $[116] = restProps, $[117] = scheme, $[118] = setArrow, $[119] = setFloating, $[120] = shadow, $[121] = t36) : t36 = $[121];
|
|
5916
5960
|
let t37;
|
|
5917
|
-
$[
|
|
5961
|
+
$[122] !== restProps || $[123] !== setFloating || $[124] !== t35 || $[125] !== t36 || $[126] !== zOffset ? (t37 = /* @__PURE__ */ jsx(StyledTooltip, {
|
|
5918
5962
|
"data-ui": "Tooltip",
|
|
5919
5963
|
...restProps,
|
|
5920
5964
|
ref: setFloating,
|
|
5921
5965
|
style: t35,
|
|
5922
5966
|
zOffset,
|
|
5923
5967
|
children: t36
|
|
5924
|
-
}), $[
|
|
5968
|
+
}), $[122] = restProps, $[123] = setFloating, $[124] = t35, $[125] = t36, $[126] = zOffset, $[127] = t37) : t37 = $[127];
|
|
5925
5969
|
let tooltip = t37, t38;
|
|
5926
|
-
$[
|
|
5970
|
+
$[128] !== portalProp || $[129] !== tooltip ? (t38 = portalProp ? /* @__PURE__ */ jsx(Portal, {
|
|
5927
5971
|
__unstable_name: typeof portalProp == "string" ? portalProp : void 0,
|
|
5928
5972
|
children: tooltip
|
|
5929
|
-
}) : tooltip
|
|
5930
|
-
let
|
|
5931
|
-
$[131] !== animate || $[132] !==
|
|
5973
|
+
}) : tooltip, $[128] = portalProp, $[129] = tooltip, $[130] = t38) : t38 = $[130];
|
|
5974
|
+
let tooltipNode = t38, t39;
|
|
5975
|
+
$[131] !== animate || $[132] !== showTooltip || $[133] !== tooltipNode ? (t39 = animate ? /* @__PURE__ */ jsx(AnimateActivity, {
|
|
5976
|
+
layoutMode: "default",
|
|
5977
|
+
mode: showTooltip ? "visible" : "hidden",
|
|
5978
|
+
children: tooltipNode
|
|
5979
|
+
}) : /* @__PURE__ */ jsx(Activity, {
|
|
5980
|
+
mode: showTooltip ? "visible" : "hidden",
|
|
5981
|
+
children: tooltipNode
|
|
5982
|
+
}), $[131] = animate, $[132] = showTooltip, $[133] = tooltipNode, $[134] = t39) : t39 = $[134];
|
|
5932
5983
|
let t40;
|
|
5933
|
-
return $[
|
|
5934
|
-
}
|
|
5984
|
+
return $[135] !== child || $[136] !== t39 ? (t40 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t39, child] }), $[135] = child, $[136] = t39, $[137] = t40) : t40 = $[137], t40;
|
|
5985
|
+
};
|
|
5935
5986
|
function useMiddleware(t0) {
|
|
5936
5987
|
let $ = c(17), { animate, arrowProp, arrowRef, boundaryElement, fallbackPlacements, rootBoundary } = t0, ret;
|
|
5937
5988
|
if ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== boundaryElement || $[4] !== fallbackPlacements || $[5] !== rootBoundary) {
|
|
@@ -6037,31 +6088,31 @@ function findMinBreakpoints(media, width) {
|
|
|
6037
6088
|
* DO NOT USE IN PRODUCTION.
|
|
6038
6089
|
* @beta
|
|
6039
6090
|
*/
|
|
6040
|
-
const ElementQuery =
|
|
6041
|
-
let $ = c(
|
|
6042
|
-
$[0] === props ? (_media = $[1], children = $[2],
|
|
6091
|
+
const ElementQuery = function ElementQuery(props) {
|
|
6092
|
+
let $ = c(19), theme = useTheme_v2(), _media, children, forwardedRef, restProps;
|
|
6093
|
+
$[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);
|
|
6043
6094
|
let media = _media ?? theme.media, [element, setElement] = useState(null), width = useElementSize(element)?.border.width ?? window.innerWidth, t0;
|
|
6044
|
-
if ($[
|
|
6095
|
+
if ($[5] !== media || $[6] !== width) {
|
|
6045
6096
|
let eq = findMaxBreakpoints(media, width);
|
|
6046
|
-
t0 = eq.length ? eq.join(" ") : void 0, $[
|
|
6047
|
-
} else t0 = $[
|
|
6097
|
+
t0 = eq.length ? eq.join(" ") : void 0, $[5] = media, $[6] = width, $[7] = t0;
|
|
6098
|
+
} else t0 = $[7];
|
|
6048
6099
|
let max = t0, t1;
|
|
6049
|
-
if ($[
|
|
6100
|
+
if ($[8] !== media || $[9] !== width) {
|
|
6050
6101
|
let eq_0 = findMinBreakpoints(media, width);
|
|
6051
|
-
t1 = eq_0.length ? eq_0.join(" ") : void 0, $[
|
|
6052
|
-
} else t1 = $[
|
|
6102
|
+
t1 = eq_0.length ? eq_0.join(" ") : void 0, $[8] = media, $[9] = width, $[10] = t1;
|
|
6103
|
+
} else t1 = $[10];
|
|
6053
6104
|
let min = t1, t2, t3;
|
|
6054
|
-
$[
|
|
6105
|
+
$[11] === element ? (t2 = $[12], t3 = $[13]) : (t2 = () => element, t3 = [element], $[11] = element, $[12] = t2, $[13] = t3), useImperativeHandle(forwardedRef, t2, t3);
|
|
6055
6106
|
let t4;
|
|
6056
|
-
return $[
|
|
6107
|
+
return $[14] !== children || $[15] !== max || $[16] !== min || $[17] !== restProps ? (t4 = /* @__PURE__ */ jsx("div", {
|
|
6057
6108
|
"data-ui": "ElementQuery",
|
|
6058
6109
|
...restProps,
|
|
6059
6110
|
"data-eq-max": max,
|
|
6060
6111
|
"data-eq-min": min,
|
|
6061
6112
|
ref: setElement,
|
|
6062
6113
|
children
|
|
6063
|
-
}), $[
|
|
6064
|
-
}
|
|
6114
|
+
}), $[14] = children, $[15] = max, $[16] = min, $[17] = restProps, $[18] = t4) : t4 = $[18], t4;
|
|
6115
|
+
};
|
|
6065
6116
|
/**
|
|
6066
6117
|
* DO NOT USE IN PRODUCTION
|
|
6067
6118
|
* @beta
|
|
@@ -6107,9 +6158,9 @@ function _temp() {
|
|
|
6107
6158
|
}
|
|
6108
6159
|
const emptySubscribe = () => () => {}, StyledSrOnly = styled.div.withConfig({
|
|
6109
6160
|
displayName: "StyledSrOnly",
|
|
6110
|
-
componentId: "sc-
|
|
6111
|
-
})`display:block;width:0;height:0;position:absolute;overflow:hidden;overflow:clip;`, SrOnly =
|
|
6112
|
-
let $ = c(4), { as, children } = props, t0;
|
|
6161
|
+
componentId: "sc-vau3g1-0"
|
|
6162
|
+
})`display:block;width:0;height:0;position:absolute;overflow:hidden;overflow:clip;`, SrOnly = function SrOnly(props) {
|
|
6163
|
+
let $ = c(4), { as, children, ref } = props, t0;
|
|
6113
6164
|
return $[0] !== as || $[1] !== children || $[2] !== ref ? (t0 = /* @__PURE__ */ jsx(StyledSrOnly, {
|
|
6114
6165
|
"aria-hidden": !0,
|
|
6115
6166
|
as,
|
|
@@ -6117,29 +6168,29 @@ const emptySubscribe = () => () => {}, StyledSrOnly = styled.div.withConfig({
|
|
|
6117
6168
|
ref,
|
|
6118
6169
|
children
|
|
6119
6170
|
}), $[0] = as, $[1] = children, $[2] = ref, $[3] = t0) : t0 = $[3], t0;
|
|
6120
|
-
}
|
|
6171
|
+
}, StyledVirtualList = styled.div.withConfig({
|
|
6121
6172
|
displayName: "StyledVirtualList",
|
|
6122
|
-
componentId: "sc-
|
|
6173
|
+
componentId: "sc-ltnren-0"
|
|
6123
6174
|
})`position:relative;`, ItemWrapper = styled.div.withConfig({
|
|
6124
6175
|
displayName: "ItemWrapper",
|
|
6125
|
-
componentId: "sc-
|
|
6126
|
-
})`position:absolute;left:0;right:0;`, VirtualList =
|
|
6127
|
-
let $ = c(
|
|
6128
|
-
$[0] === props ? (
|
|
6176
|
+
componentId: "sc-ltnren-1"
|
|
6177
|
+
})`position:absolute;left:0;right:0;`, VirtualList = function VirtualList(props) {
|
|
6178
|
+
let $ = c(45), forwardedRef, getItemKey, onChange, renderItem, restProps, t0, t1, t2;
|
|
6179
|
+
$[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);
|
|
6129
6180
|
let as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1, t3;
|
|
6130
|
-
$[
|
|
6181
|
+
$[9] === t2 ? t3 = $[10] : (t3 = t2 === void 0 ? [] : t2, $[9] = t2, $[10] = t3);
|
|
6131
6182
|
let items = t3, { space } = useTheme_v2(), ref = useRef(null), wrapperRef = useRef(null), [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), [itemHeight, setItemHeight] = useState(-1), t4;
|
|
6132
|
-
$[
|
|
6183
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[11] = t4) : t4 = $[11], useImperativeHandle(forwardedRef, t4);
|
|
6133
6184
|
let t5;
|
|
6134
|
-
$[
|
|
6185
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => {
|
|
6135
6186
|
if (!wrapperRef.current) return;
|
|
6136
6187
|
let firstElement = wrapperRef.current.firstChild;
|
|
6137
6188
|
firstElement instanceof HTMLElement && setItemHeight(firstElement.offsetHeight);
|
|
6138
|
-
}, $[
|
|
6189
|
+
}, $[12] = t5) : t5 = $[12];
|
|
6139
6190
|
let t6;
|
|
6140
|
-
$[
|
|
6191
|
+
$[13] === renderItem ? t6 = $[14] : (t6 = [renderItem], $[13] = renderItem, $[14] = t6), useEffect(t5, t6);
|
|
6141
6192
|
let t7, t8;
|
|
6142
|
-
$[
|
|
6193
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => {
|
|
6143
6194
|
if (!ref.current) return;
|
|
6144
6195
|
let scrollEl = findScrollable(ref.current.parentNode);
|
|
6145
6196
|
if (scrollEl) {
|
|
@@ -6148,7 +6199,7 @@ const emptySubscribe = () => () => {}, StyledSrOnly = styled.div.withConfig({
|
|
|
6148
6199
|
setScrollTop(scrollEl.scrollTop);
|
|
6149
6200
|
};
|
|
6150
6201
|
scrollEl.addEventListener("scroll", handleScroll, { passive: !0 });
|
|
6151
|
-
let ro = new
|
|
6202
|
+
let ro = new ResizeObserver((entries) => {
|
|
6152
6203
|
setScrollHeight(entries[0].contentRect.height);
|
|
6153
6204
|
});
|
|
6154
6205
|
return ro.observe(scrollEl), handleScroll(), () => {
|
|
@@ -6163,9 +6214,9 @@ const emptySubscribe = () => () => {}, StyledSrOnly = styled.div.withConfig({
|
|
|
6163
6214
|
return window.addEventListener("scroll", handleScroll_0, { passive: !0 }), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
|
|
6164
6215
|
window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
|
|
6165
6216
|
};
|
|
6166
|
-
}, t8 = [], $[
|
|
6217
|
+
}, t8 = [], $[15] = t7, $[16] = t8) : (t7 = $[15], t8 = $[16]), useEffect(t7, t8);
|
|
6167
6218
|
let len = items.length, height = itemHeight ? len * (itemHeight + space[gap]) - space[gap] : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0, t10, t9;
|
|
6168
|
-
$[
|
|
6219
|
+
$[17] !== fromIndex || $[18] !== gap || $[19] !== itemHeight || $[20] !== onChange || $[21] !== scrollHeight || $[22] !== scrollTop || $[23] !== space || $[24] !== toIndex ? (t9 = () => {
|
|
6169
6220
|
onChange && onChange({
|
|
6170
6221
|
fromIndex,
|
|
6171
6222
|
gap: space[gap],
|
|
@@ -6183,9 +6234,9 @@ const emptySubscribe = () => () => {}, StyledSrOnly = styled.div.withConfig({
|
|
|
6183
6234
|
scrollTop,
|
|
6184
6235
|
space,
|
|
6185
6236
|
toIndex
|
|
6186
|
-
], $[
|
|
6237
|
+
], $[17] = fromIndex, $[18] = gap, $[19] = itemHeight, $[20] = onChange, $[21] = scrollHeight, $[22] = scrollTop, $[23] = space, $[24] = toIndex, $[25] = t10, $[26] = t9) : (t10 = $[25], t9 = $[26]), useEffect(t9, t10);
|
|
6187
6238
|
let t11;
|
|
6188
|
-
$[
|
|
6239
|
+
$[27] !== fromIndex || $[28] !== gap || $[29] !== getItemKey || $[30] !== itemHeight || $[31] !== items || $[32] !== renderItem || $[33] !== space || $[34] !== toIndex ? (t11 = {
|
|
6189
6240
|
fromIndex,
|
|
6190
6241
|
gap,
|
|
6191
6242
|
itemHeight,
|
|
@@ -6194,24 +6245,24 @@ const emptySubscribe = () => () => {}, StyledSrOnly = styled.div.withConfig({
|
|
|
6194
6245
|
getItemKey,
|
|
6195
6246
|
items,
|
|
6196
6247
|
renderItem
|
|
6197
|
-
}, $[
|
|
6248
|
+
}, $[27] = fromIndex, $[28] = gap, $[29] = getItemKey, $[30] = itemHeight, $[31] = items, $[32] = renderItem, $[33] = space, $[34] = toIndex, $[35] = t11) : t11 = $[35];
|
|
6198
6249
|
let children = useChildren(t11), t12;
|
|
6199
|
-
$[
|
|
6250
|
+
$[36] === height ? t12 = $[37] : (t12 = { height }, $[36] = height, $[37] = t12);
|
|
6200
6251
|
let t13;
|
|
6201
|
-
$[
|
|
6252
|
+
$[38] !== children || $[39] !== t12 ? (t13 = /* @__PURE__ */ jsx("div", {
|
|
6202
6253
|
ref: wrapperRef,
|
|
6203
6254
|
style: t12,
|
|
6204
6255
|
children
|
|
6205
|
-
}), $[
|
|
6256
|
+
}), $[38] = children, $[39] = t12, $[40] = t13) : t13 = $[40];
|
|
6206
6257
|
let t14;
|
|
6207
|
-
return $[
|
|
6258
|
+
return $[41] !== as || $[42] !== restProps || $[43] !== t13 ? (t14 = /* @__PURE__ */ jsx(StyledVirtualList, {
|
|
6208
6259
|
as,
|
|
6209
6260
|
"data-ui": "VirtualList",
|
|
6210
6261
|
...restProps,
|
|
6211
6262
|
ref,
|
|
6212
6263
|
children: t13
|
|
6213
|
-
}), $[
|
|
6214
|
-
}
|
|
6264
|
+
}), $[41] = as, $[42] = restProps, $[43] = t13, $[44] = t14) : t14 = $[44], t14;
|
|
6265
|
+
};
|
|
6215
6266
|
function useChildren(t0) {
|
|
6216
6267
|
let $ = c(21), { fromIndex, gap, getItemKey, itemHeight, items, renderItem, space, toIndex } = t0;
|
|
6217
6268
|
if (!renderItem || items.length === 0) return null;
|
|
@@ -6239,6 +6290,6 @@ function findScrollable(parentNode) {
|
|
|
6239
6290
|
for (; _scrollEl && !_isScrollable(_scrollEl);) _scrollEl = _scrollEl.parentNode;
|
|
6240
6291
|
return _scrollEl;
|
|
6241
6292
|
}
|
|
6242
|
-
export { Arrow, Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, ConditionalWrapper, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, Tree, TreeItem, VirtualList,
|
|
6293
|
+
export { Arrow, Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, ConditionalWrapper, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, Tree, TreeItem, VirtualList, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useClickOutsideEvent, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMatchMedia, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };
|
|
6243
6294
|
|
|
6244
6295
|
//# sourceMappingURL=index.js.map
|