@sanity/ui 3.0.12-canary.2 → 3.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks-cjs/_visual-editing.js +656 -852
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +658 -854
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +144 -183
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +145 -184
- package/dist/index.mjs.map +1 -1
- package/package.json +40 -26
- package/src/core/components/autocomplete/autocomplete.tsx +14 -10
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +2 -3
- package/src/core/components/dialog/dialog.tsx +14 -10
- package/src/core/components/hotkeys/hotkeys.tsx +2 -2
- package/src/core/components/menu/menuGroup.tsx +4 -2
- package/src/core/components/menu/menuItem.tsx +4 -4
- package/src/core/components/skeleton/skeleton.tsx +4 -4
- package/src/core/components/skeleton/textSkeleton.tsx +5 -5
- package/src/core/components/tree/tree.tsx +1 -0
- package/src/core/hooks/index.ts +1 -1
- package/src/core/hooks/useArrayProp.ts +17 -5
- package/src/core/hooks/useClickOutside.ts +1 -0
- package/src/core/primitives/avatar/avatar.tsx +17 -14
- package/src/core/primitives/avatar/avatarCounter.tsx +16 -14
- package/src/core/primitives/avatar/avatarStack.tsx +2 -2
- package/src/core/primitives/badge/badge.tsx +3 -3
- package/src/core/primitives/box/box.tsx +26 -26
- package/src/core/primitives/button/button.tsx +11 -11
- package/src/core/primitives/card/card.tsx +8 -8
- package/src/core/primitives/code/code.tsx +2 -2
- package/src/core/primitives/container/container.tsx +2 -2
- package/src/core/primitives/flex/flex.tsx +6 -6
- package/src/core/primitives/grid/grid.tsx +9 -9
- package/src/core/primitives/heading/heading.tsx +3 -3
- package/src/core/primitives/inline/inline.tsx +2 -2
- package/src/core/primitives/kbd/kbd.tsx +2 -2
- package/src/core/primitives/label/label.tsx +3 -3
- package/src/core/primitives/popover/popover.tsx +6 -7
- package/src/core/primitives/select/select.tsx +5 -6
- package/src/core/primitives/stack/stack.tsx +2 -2
- package/src/core/primitives/text/text.tsx +3 -3
- package/src/core/primitives/textArea/textArea.tsx +5 -6
- package/src/core/primitives/textInput/textInput.tsx +5 -6
- package/src/core/primitives/tooltip/tooltip.tsx +3 -3
- package/src/core/utils/layer/layerProvider.tsx +2 -3
- package/src/core/utils/virtualList/virtualList.tsx +2 -0
package/dist/index.d.mts
CHANGED
|
@@ -2750,7 +2750,7 @@ export declare interface TreeState {
|
|
|
2750
2750
|
}
|
|
2751
2751
|
|
|
2752
2752
|
/**
|
|
2753
|
-
*
|
|
2753
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2754
2754
|
* @beta
|
|
2755
2755
|
*/
|
|
2756
2756
|
export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
|
package/dist/index.d.ts
CHANGED
|
@@ -2750,7 +2750,7 @@ export declare interface TreeState {
|
|
|
2750
2750
|
}
|
|
2751
2751
|
|
|
2752
2752
|
/**
|
|
2753
|
-
*
|
|
2753
|
+
* This API might change. DO NOT USE IN PRODUCTION.
|
|
2754
2754
|
* @beta
|
|
2755
2755
|
*/
|
|
2756
2756
|
export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
|
package/dist/index.js
CHANGED
|
@@ -47,11 +47,6 @@ function focusLastDescendant(element) {
|
|
|
47
47
|
}
|
|
48
48
|
return !1;
|
|
49
49
|
}
|
|
50
|
-
function useArrayProp(val, defaultVal) {
|
|
51
|
-
const $ = reactCompilerRuntime.c(3);
|
|
52
|
-
let t0;
|
|
53
|
-
return $[0] !== defaultVal || $[1] !== val ? (t0 = _visualEditing._getArrayProp(val, defaultVal), $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2], t0;
|
|
54
|
-
}
|
|
55
50
|
function _getElements(element, elementsArg) {
|
|
56
51
|
const ret = [element];
|
|
57
52
|
for (const el of elementsArg)
|
|
@@ -214,7 +209,7 @@ function autocompleteReducer(state, msg) {
|
|
|
214
209
|
} : state;
|
|
215
210
|
}
|
|
216
211
|
const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "Home", "End", "PageUp", "PageDown", "Meta", "Tab", "CapsLock"], AUTOCOMPLETE_POPOVER_PLACEMENT = "bottom-start", 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, InnerAutocomplete = react.forwardRef(function(props, forwardedRef) {
|
|
217
|
-
const $ = reactCompilerRuntime.c(
|
|
212
|
+
const $ = reactCompilerRuntime.c(179);
|
|
218
213
|
let customValidity, disabled, filterOptionProp, 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;
|
|
219
214
|
$[0] !== props ? ({
|
|
220
215
|
border: t0,
|
|
@@ -275,7 +270,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
275
270
|
$[36] !== inputElement ? (t11 = () => inputElement, t12 = [inputElement], $[36] = inputElement, $[37] = t11, $[38] = t12) : (t11 = $[37], t12 = $[38]), react.useImperativeHandle(inputElementRef, t11, t12);
|
|
276
271
|
let t13, t14;
|
|
277
272
|
$[39] !== inputElement ? (t13 = () => inputElement, t14 = [inputElement], $[39] = inputElement, $[40] = t13, $[41] = t14) : (t13 = $[40], t14 = $[41]), react.useImperativeHandle(forwardedRef, t13, t14);
|
|
278
|
-
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : _visualEditing.EMPTY_ARRAY, padding = _visualEditing.
|
|
273
|
+
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : _visualEditing.EMPTY_ARRAY, padding = _visualEditing.useArrayProp(paddingProp);
|
|
279
274
|
let t15;
|
|
280
275
|
$[42] !== options || $[43] !== value ? (t15 = value !== null ? options.find((o) => o.value === value) : void 0, $[42] = options, $[43] = value, $[44] = t15) : t15 = $[44];
|
|
281
276
|
const currentOption = t15;
|
|
@@ -456,82 +451,88 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
456
451
|
}
|
|
457
452
|
t34 = void 0;
|
|
458
453
|
}
|
|
459
|
-
const clearButton = t34
|
|
454
|
+
const clearButton = t34;
|
|
460
455
|
let t35;
|
|
461
|
-
$[94] !==
|
|
462
|
-
|
|
463
|
-
}, $[94] = dispatchOpen, $[95] = openButtonProps, $[96] = t35) : t35 = $[96];
|
|
464
|
-
const handleOpenClick = t35;
|
|
456
|
+
$[94] !== padding ? (t35 = padding.map(_temp$3), $[94] = padding, $[95] = t35) : t35 = $[95];
|
|
457
|
+
const openButtonBoxPadding = t35;
|
|
465
458
|
let t36;
|
|
466
|
-
$[
|
|
467
|
-
const
|
|
459
|
+
$[96] !== padding ? (t36 = padding.map(_temp2$1), $[96] = padding, $[97] = t36) : t36 = $[97];
|
|
460
|
+
const openButtonPadding = t36, openButtonProps = typeof openButton == "object" ? openButton : _visualEditing.EMPTY_RECORD;
|
|
468
461
|
let t37;
|
|
462
|
+
$[98] !== dispatchOpen || $[99] !== openButtonProps ? (t37 = (event_4) => {
|
|
463
|
+
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
464
|
+
}, $[98] = dispatchOpen, $[99] = openButtonProps, $[100] = t37) : t37 = $[100];
|
|
465
|
+
const handleOpenClick = t37;
|
|
466
|
+
let t38;
|
|
467
|
+
$[101] !== disabled || $[102] !== expanded || $[103] !== fontSize || $[104] !== handleOpenClick || $[105] !== openButton || $[106] !== openButtonBoxPadding || $[107] !== openButtonPadding || $[108] !== openButtonProps || $[109] !== readOnly ? (t38 = !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { "aria-label": "Open", disabled: expanded, fontSize, icon: icons.ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, $[101] = disabled, $[102] = expanded, $[103] = fontSize, $[104] = handleOpenClick, $[105] = openButton, $[106] = openButtonBoxPadding, $[107] = openButtonPadding, $[108] = openButtonProps, $[109] = readOnly, $[110] = t38) : t38 = $[110];
|
|
468
|
+
const openButtonNode = t38;
|
|
469
|
+
let t39;
|
|
469
470
|
bb1: {
|
|
470
471
|
if (query === null) {
|
|
471
472
|
if (value !== null) {
|
|
472
|
-
let
|
|
473
|
-
$[
|
|
473
|
+
let t402;
|
|
474
|
+
$[111] !== currentOption || $[112] !== renderValue || $[113] !== value ? (t402 = renderValue(value, currentOption), $[111] = currentOption, $[112] = renderValue, $[113] = value, $[114] = t402) : t402 = $[114], t39 = t402;
|
|
474
475
|
break bb1;
|
|
475
476
|
}
|
|
476
|
-
|
|
477
|
+
t39 = "";
|
|
477
478
|
break bb1;
|
|
478
479
|
}
|
|
479
|
-
|
|
480
|
+
t39 = query;
|
|
480
481
|
}
|
|
481
|
-
const inputValue =
|
|
482
|
-
let
|
|
483
|
-
$[
|
|
482
|
+
const inputValue = t39;
|
|
483
|
+
let t40;
|
|
484
|
+
$[115] !== listFocused ? (t40 = (event_5) => {
|
|
484
485
|
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
485
|
-
}, $[
|
|
486
|
-
const handleListBoxKeyDown =
|
|
487
|
-
let
|
|
486
|
+
}, $[115] = listFocused, $[116] = t40) : t40 = $[116];
|
|
487
|
+
const handleListBoxKeyDown = t40;
|
|
488
|
+
let t41;
|
|
488
489
|
bb2: {
|
|
489
490
|
if (filteredOptions.length === 0) {
|
|
490
|
-
|
|
491
|
+
t41 = null;
|
|
491
492
|
break bb2;
|
|
492
493
|
}
|
|
493
|
-
let
|
|
494
|
-
if ($[
|
|
495
|
-
let
|
|
496
|
-
$[
|
|
494
|
+
let t422;
|
|
495
|
+
if ($[117] !== activeValue || $[118] !== currentOption || $[119] !== filteredOptions || $[120] !== handleOptionSelect || $[121] !== id || $[122] !== listFocused || $[123] !== loading || $[124] !== renderOption) {
|
|
496
|
+
let t433;
|
|
497
|
+
$[126] !== activeValue || $[127] !== currentOption || $[128] !== handleOptionSelect || $[129] !== id || $[130] !== listFocused || $[131] !== loading || $[132] !== renderOption ? (t433 = (option_0) => {
|
|
497
498
|
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
498
499
|
return /* @__PURE__ */ jsxRuntime.jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: react.cloneElement(renderOption(option_0), {
|
|
499
500
|
disabled: loading,
|
|
500
501
|
selected: active,
|
|
501
502
|
tabIndex: listFocused && active ? 0 : -1
|
|
502
503
|
}) }, option_0.value);
|
|
503
|
-
}, $[
|
|
504
|
+
}, $[126] = activeValue, $[127] = currentOption, $[128] = handleOptionSelect, $[129] = id, $[130] = listFocused, $[131] = loading, $[132] = renderOption, $[133] = t433) : t433 = $[133], t422 = filteredOptions.map(t433), $[117] = activeValue, $[118] = currentOption, $[119] = filteredOptions, $[120] = handleOptionSelect, $[121] = id, $[122] = listFocused, $[123] = loading, $[124] = renderOption, $[125] = t422;
|
|
504
505
|
} else
|
|
505
|
-
|
|
506
|
-
let
|
|
507
|
-
$[
|
|
508
|
-
let
|
|
509
|
-
$[
|
|
506
|
+
t422 = $[125];
|
|
507
|
+
let t432;
|
|
508
|
+
$[134] !== listBoxId || $[135] !== t422 ? (t432 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: t422 }), $[134] = listBoxId, $[135] = t422, $[136] = t432) : t432 = $[136];
|
|
509
|
+
let t442;
|
|
510
|
+
$[137] !== handleListBoxKeyDown || $[138] !== listBox || $[139] !== t432 ? (t442 = /* @__PURE__ */ jsxRuntime.jsx(ListBox, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: t432 }), $[137] = handleListBoxKeyDown, $[138] = listBox, $[139] = t432, $[140] = t442) : t442 = $[140], t41 = t442;
|
|
510
511
|
}
|
|
511
|
-
const content2 =
|
|
512
|
-
let
|
|
512
|
+
const content2 = t41;
|
|
513
|
+
let t42;
|
|
513
514
|
bb3: {
|
|
514
515
|
if (renderPopover) {
|
|
515
|
-
const
|
|
516
|
-
let
|
|
517
|
-
$[
|
|
516
|
+
const t433 = !expanded;
|
|
517
|
+
let t442;
|
|
518
|
+
$[141] !== content2 || $[142] !== inputElement || $[143] !== renderPopover || $[144] !== t433 ? (t442 = /* @__PURE__ */ jsxRuntime.jsx(RenderPopover, { content: content2, hidden: t433, inputElement, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, resultsPopoverElementRef, renderPopover }), $[141] = content2, $[142] = inputElement, $[143] = renderPopover, $[144] = t433, $[145] = t442) : t442 = $[145], t42 = t442;
|
|
518
519
|
break bb3;
|
|
519
520
|
}
|
|
520
521
|
if (filteredOptionsLen === 0) {
|
|
521
|
-
|
|
522
|
+
t42 = null;
|
|
522
523
|
break bb3;
|
|
523
524
|
}
|
|
524
|
-
let
|
|
525
|
-
$[
|
|
525
|
+
let t432;
|
|
526
|
+
$[146] !== content2 || $[147] !== expanded || $[148] !== inputElement || $[149] !== popover || $[150] !== radius ? (t432 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { arrow: !1, constrainSize: !0, content: content2, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius, ref: resultsPopoverElementRef, referenceElement: inputElement, ...popover }), $[146] = content2, $[147] = expanded, $[148] = inputElement, $[149] = popover, $[150] = radius, $[151] = t432) : t432 = $[151], t42 = t432;
|
|
526
527
|
}
|
|
527
|
-
const results =
|
|
528
|
-
let
|
|
529
|
-
$[152] !== activeItemId || $[153] !== border || $[154] !== clearButton || $[155] !== customValidity || $[156] !== disabled || $[157] !== expanded || $[158] !== fontSize || $[159] !== handleClearButtonClick || $[160] !== handleInputChange || $[161] !== handleInputFocus || $[162] !== icon || $[163] !== id || $[164] !== inputValue || $[165] !== listBoxId || $[166] !== padding || $[167] !== prefix || $[168] !== radius || $[169] !== readOnly || $[170] !== restProps || $[171] !==
|
|
530
|
-
let
|
|
531
|
-
return $[174] !== handleRootBlur || $[175] !==
|
|
532
|
-
|
|
528
|
+
const results = t42, t43 = loading && AnimatedSpinnerIcon, t44 = suffix || openButtonNode;
|
|
529
|
+
let t45;
|
|
530
|
+
$[152] !== activeItemId || $[153] !== border || $[154] !== clearButton || $[155] !== customValidity || $[156] !== disabled || $[157] !== expanded || $[158] !== fontSize || $[159] !== handleClearButtonClick || $[160] !== handleInputChange || $[161] !== handleInputFocus || $[162] !== icon || $[163] !== id || $[164] !== inputValue || $[165] !== listBoxId || $[166] !== padding || $[167] !== prefix || $[168] !== radius || $[169] !== readOnly || $[170] !== restProps || $[171] !== t43 || $[172] !== t44 ? (t45 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.TextInput, { ...restProps, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", border, clearButton, customValidity, disabled, fontSize, icon, iconRight: t43, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: setInputElement, role: "combobox", spellCheck: !1, suffix: t44, value: inputValue }), $[152] = activeItemId, $[153] = border, $[154] = clearButton, $[155] = customValidity, $[156] = disabled, $[157] = expanded, $[158] = fontSize, $[159] = handleClearButtonClick, $[160] = handleInputChange, $[161] = handleInputFocus, $[162] = icon, $[163] = id, $[164] = inputValue, $[165] = listBoxId, $[166] = padding, $[167] = prefix, $[168] = radius, $[169] = readOnly, $[170] = restProps, $[171] = t43, $[172] = t44, $[173] = t45) : t45 = $[173];
|
|
531
|
+
let t46;
|
|
532
|
+
return $[174] !== handleRootBlur || $[175] !== handleRootKeyDown || $[176] !== results || $[177] !== t45 ? (t46 = /* @__PURE__ */ jsxRuntime.jsxs(StyledAutocomplete, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
|
|
533
|
+
t45,
|
|
533
534
|
results
|
|
534
|
-
] }), $[174] = handleRootBlur, $[175] =
|
|
535
|
+
] }), $[174] = handleRootBlur, $[175] = handleRootKeyDown, $[176] = results, $[177] = t45, $[178] = t46) : t46 = $[178], t46;
|
|
535
536
|
});
|
|
536
537
|
function RenderPopover({
|
|
537
538
|
renderPopover,
|
|
@@ -565,7 +566,7 @@ const StyledBreadcrumbs = styledComponents.styled.ol.withConfig({
|
|
|
565
566
|
displayName: "ExpandButton",
|
|
566
567
|
componentId: "sc-1es8h8q-1"
|
|
567
568
|
})`appearance:none;margin:-4px;`, Breadcrumbs = react.forwardRef(function(props, ref) {
|
|
568
|
-
const $ = reactCompilerRuntime.c(
|
|
569
|
+
const $ = reactCompilerRuntime.c(27);
|
|
569
570
|
let children, maxLength, restProps, separator, t0;
|
|
570
571
|
$[0] !== props ? ({
|
|
571
572
|
children,
|
|
@@ -574,23 +575,20 @@ const StyledBreadcrumbs = styledComponents.styled.ol.withConfig({
|
|
|
574
575
|
space: t0,
|
|
575
576
|
...restProps
|
|
576
577
|
} = props, $[0] = props, $[1] = children, $[2] = maxLength, $[3] = restProps, $[4] = separator, $[5] = t0) : (children = $[1], maxLength = $[2], restProps = $[3], separator = $[4], t0 = $[5]);
|
|
577
|
-
const
|
|
578
|
+
const space = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0), [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null);
|
|
578
579
|
let t1;
|
|
579
|
-
$[6]
|
|
580
|
-
const
|
|
580
|
+
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => setOpen(!1), $[6] = t1) : t1 = $[6];
|
|
581
|
+
const collapse = t1;
|
|
581
582
|
let t2;
|
|
582
|
-
$[
|
|
583
|
-
const
|
|
583
|
+
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => setOpen(!0), $[7] = t2) : t2 = $[7];
|
|
584
|
+
const expand = t2;
|
|
584
585
|
let t3;
|
|
585
|
-
$[
|
|
586
|
-
const expand = t3;
|
|
586
|
+
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => [expandElementRef.current, popoverElementRef.current], $[8] = t3) : t3 = $[8], _visualEditing.useClickOutsideEvent(collapse, t3);
|
|
587
587
|
let t4;
|
|
588
|
-
$[
|
|
588
|
+
$[9] !== children ? (t4 = react.Children.toArray(children).filter(react.isValidElement), $[9] = children, $[10] = t4) : t4 = $[10];
|
|
589
|
+
const rawItems = t4;
|
|
589
590
|
let t5;
|
|
590
|
-
$[11] !==
|
|
591
|
-
const rawItems = t5;
|
|
592
|
-
let t6;
|
|
593
|
-
$[13] !== maxLength || $[14] !== open || $[15] !== rawItems || $[16] !== space ? (t6 = {
|
|
591
|
+
$[11] !== maxLength || $[12] !== open || $[13] !== rawItems || $[14] !== space ? (t5 = {
|
|
594
592
|
collapse,
|
|
595
593
|
expand,
|
|
596
594
|
expandElementRef,
|
|
@@ -599,19 +597,19 @@ const StyledBreadcrumbs = styledComponents.styled.ol.withConfig({
|
|
|
599
597
|
popoverElementRef,
|
|
600
598
|
rawItems,
|
|
601
599
|
space
|
|
602
|
-
}, $[
|
|
603
|
-
const items = useItems(
|
|
604
|
-
let
|
|
605
|
-
if ($[
|
|
606
|
-
let
|
|
607
|
-
$[
|
|
600
|
+
}, $[11] = maxLength, $[12] = open, $[13] = rawItems, $[14] = space, $[15] = t5) : t5 = $[15];
|
|
601
|
+
const items = useItems(t5);
|
|
602
|
+
let t6;
|
|
603
|
+
if ($[16] !== items || $[17] !== separator || $[18] !== space) {
|
|
604
|
+
let t72;
|
|
605
|
+
$[20] !== separator || $[21] !== space ? (t72 = (item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
|
|
608
606
|
itemIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "aria-hidden": !0, as: "li", paddingX: space, children: separator || /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted: !0, children: "/" }) }),
|
|
609
607
|
/* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { as: "li", children: item })
|
|
610
|
-
] }, itemIndex), $[
|
|
608
|
+
] }, itemIndex), $[20] = separator, $[21] = space, $[22] = t72) : t72 = $[22], t6 = items.map(t72), $[16] = items, $[17] = separator, $[18] = space, $[19] = t6;
|
|
611
609
|
} else
|
|
612
|
-
|
|
613
|
-
let
|
|
614
|
-
return $[
|
|
610
|
+
t6 = $[19];
|
|
611
|
+
let t7;
|
|
612
|
+
return $[23] !== ref || $[24] !== restProps || $[25] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(StyledBreadcrumbs, { "data-ui": "Breadcrumbs", ...restProps, ref, children: t6 }), $[23] = ref, $[24] = restProps, $[25] = t6, $[26] = t7) : t7 = $[26], t7;
|
|
615
613
|
});
|
|
616
614
|
Breadcrumbs.displayName = "ForwardRef(Breadcrumbs)";
|
|
617
615
|
function useItems(t0) {
|
|
@@ -734,7 +732,7 @@ const StyledDialog = /* @__PURE__ */ styledComponents.styled(_visualEditing.Laye
|
|
|
734
732
|
displayName: "DialogFooter",
|
|
735
733
|
componentId: "sc-4n4xb3-6"
|
|
736
734
|
})`position:relative;z-index:3;`, DialogCard = react.forwardRef(function(props, forwardedRef) {
|
|
737
|
-
const $ = reactCompilerRuntime.c(
|
|
735
|
+
const $ = reactCompilerRuntime.c(38), {
|
|
738
736
|
__unstable_autoFocus: autoFocus,
|
|
739
737
|
__unstable_hideCloseButton: hideCloseButton,
|
|
740
738
|
children,
|
|
@@ -749,63 +747,54 @@ const StyledDialog = /* @__PURE__ */ styledComponents.styled(_visualEditing.Laye
|
|
|
749
747
|
scheme,
|
|
750
748
|
shadow: shadowProp,
|
|
751
749
|
width: widthProp
|
|
752
|
-
} = props, portal = _visualEditing.usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = _visualEditing.useBoundaryElement().element
|
|
753
|
-
let t0;
|
|
754
|
-
$[0] !== radiusProp ? (t0 = _visualEditing._getArrayProp(radiusProp), $[0] = radiusProp, $[1] = t0) : t0 = $[1];
|
|
755
|
-
const radius = t0;
|
|
756
|
-
let t1;
|
|
757
|
-
$[2] !== shadowProp ? (t1 = _visualEditing._getArrayProp(shadowProp), $[2] = shadowProp, $[3] = t1) : t1 = $[3];
|
|
758
|
-
const shadow = t1;
|
|
759
|
-
let t2;
|
|
760
|
-
$[4] !== widthProp ? (t2 = _visualEditing._getArrayProp(widthProp), $[4] = widthProp, $[5] = t2) : t2 = $[5];
|
|
761
|
-
const width = t2, ref = react.useRef(null), contentRef = react.useRef(null), layer = _visualEditing.useLayer(), {
|
|
750
|
+
} = props, portal = _visualEditing.usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = _visualEditing.useBoundaryElement().element, radius = _visualEditing.useArrayProp(radiusProp), shadow = _visualEditing.useArrayProp(shadowProp), width = _visualEditing.useArrayProp(widthProp), ref = react.useRef(null), contentRef = react.useRef(null), layer = _visualEditing.useLayer(), {
|
|
762
751
|
isTopLayer
|
|
763
752
|
} = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton;
|
|
764
|
-
let
|
|
765
|
-
$[
|
|
766
|
-
let
|
|
767
|
-
$[
|
|
768
|
-
let
|
|
769
|
-
$[
|
|
753
|
+
let t0;
|
|
754
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[0] = t0) : t0 = $[0], react.useImperativeHandle(forwardedRef, t0);
|
|
755
|
+
let t1;
|
|
756
|
+
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => contentRef.current, $[1] = t1) : t1 = $[1], react.useImperativeHandle(forwardedContentRef, t1);
|
|
757
|
+
let t2, t3;
|
|
758
|
+
$[2] !== autoFocus ? (t2 = () => {
|
|
770
759
|
autoFocus && ref.current && focusFirstDescendant(ref.current);
|
|
771
|
-
},
|
|
772
|
-
let
|
|
773
|
-
$[
|
|
760
|
+
}, t3 = [autoFocus, ref], $[2] = autoFocus, $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]), react.useEffect(t2, t3);
|
|
761
|
+
let t4;
|
|
762
|
+
$[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (t4 = (event) => {
|
|
774
763
|
if (!isTopLayer || !onClose)
|
|
775
764
|
return;
|
|
776
765
|
const target = document.activeElement;
|
|
777
766
|
target && !isTargetWithinScope(boundaryElement, portalElement, target) || event.key === "Escape" && (event.preventDefault(), event.stopPropagation(), onClose());
|
|
778
|
-
}, $[
|
|
779
|
-
let
|
|
780
|
-
$[
|
|
767
|
+
}, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] = t4) : t4 = $[9], _visualEditing.useGlobalKeyDown(t4);
|
|
768
|
+
let t5;
|
|
769
|
+
$[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (t5 = isTopLayer && onClickOutside && ((event_0) => {
|
|
781
770
|
const target_0 = event_0.target;
|
|
782
771
|
target_0 && !isTargetWithinScope(boundaryElement, portalElement, target_0) || onClickOutside();
|
|
783
|
-
}), $[
|
|
784
|
-
let
|
|
785
|
-
$[
|
|
786
|
-
let
|
|
787
|
-
$[
|
|
772
|
+
}), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] = t5) : t5 = $[14];
|
|
773
|
+
let t6;
|
|
774
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => [ref.current], $[15] = t6) : t6 = $[15], _visualEditing.useClickOutsideEvent(t5, t6);
|
|
775
|
+
let t7;
|
|
776
|
+
$[16] !== header || $[17] !== labelId || $[18] !== onClose || $[19] !== showCloseButton || $[20] !== showHeader ? (t7 = showHeader && /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { align: "flex-start", padding: 3, children: [
|
|
788
777
|
/* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
|
|
789
778
|
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { "aria-label": "Close dialog", disabled: !onClose, icon: icons.CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
|
|
790
|
-
] }) }), $[
|
|
779
|
+
] }) }), $[16] = header, $[17] = labelId, $[18] = onClose, $[19] = showCloseButton, $[20] = showHeader, $[21] = t7) : t7 = $[21];
|
|
780
|
+
let t8;
|
|
781
|
+
$[22] !== children ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { flex: 1, ref: contentRef, tabIndex: -1, children }), $[22] = children, $[23] = t8) : t8 = $[23];
|
|
782
|
+
let t9;
|
|
783
|
+
$[24] !== footer ? (t9 = footer && /* @__PURE__ */ jsxRuntime.jsx(DialogFooter, { children: footer }), $[24] = footer, $[25] = t9) : t9 = $[25];
|
|
784
|
+
let t10;
|
|
785
|
+
$[26] !== t7 || $[27] !== t8 || $[28] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(DialogLayout, { direction: "column", children: [
|
|
786
|
+
t7,
|
|
787
|
+
t8,
|
|
788
|
+
t9
|
|
789
|
+
] }), $[26] = t7, $[27] = t8, $[28] = t9, $[29] = t10) : t10 = $[29];
|
|
791
790
|
let t11;
|
|
792
|
-
$[
|
|
791
|
+
$[30] !== radius || $[31] !== scheme || $[32] !== shadow || $[33] !== t10 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(DialogCardRoot, { radius, ref, scheme, shadow, children: t10 }), $[30] = radius, $[31] = scheme, $[32] = shadow, $[33] = t10, $[34] = t11) : t11 = $[34];
|
|
793
792
|
let t12;
|
|
794
|
-
$[
|
|
795
|
-
let t13;
|
|
796
|
-
$[32] !== t10 || $[33] !== t11 || $[34] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(DialogLayout, { direction: "column", children: [
|
|
797
|
-
t10,
|
|
798
|
-
t11,
|
|
799
|
-
t12
|
|
800
|
-
] }), $[32] = t10, $[33] = t11, $[34] = t12, $[35] = t13) : t13 = $[35];
|
|
801
|
-
let t14;
|
|
802
|
-
$[36] !== radius || $[37] !== scheme || $[38] !== shadow || $[39] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(DialogCardRoot, { radius, ref, scheme, shadow, children: t13 }), $[36] = radius, $[37] = scheme, $[38] = shadow, $[39] = t13, $[40] = t14) : t14 = $[40];
|
|
803
|
-
let t15;
|
|
804
|
-
return $[41] !== t14 || $[42] !== width ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(DialogContainer, { "data-ui": "DialogCard", width, children: t14 }), $[41] = t14, $[42] = width, $[43] = t15) : t15 = $[43], t15;
|
|
793
|
+
return $[35] !== t11 || $[36] !== width ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(DialogContainer, { "data-ui": "DialogCard", width, children: t11 }), $[35] = t11, $[36] = width, $[37] = t12) : t12 = $[37], t12;
|
|
805
794
|
});
|
|
806
795
|
DialogCard.displayName = "ForwardRef(DialogCard)";
|
|
807
796
|
const Dialog = react.forwardRef(function(props, ref) {
|
|
808
|
-
const $ = reactCompilerRuntime.c(
|
|
797
|
+
const $ = reactCompilerRuntime.c(60), dialog = useDialog(), {
|
|
809
798
|
layer
|
|
810
799
|
} = _visualEditing.useTheme_v2();
|
|
811
800
|
let _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
|
|
@@ -832,24 +821,9 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
832
821
|
animate: t6,
|
|
833
822
|
...restProps
|
|
834
823
|
} = 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] = restProps, $[14] = scheme, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6) : (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], contentRef = $[4], footer = $[5], header = $[6], id = $[7], onActivate = $[8], onClickOutside = $[9], onClose = $[10], onFocus = $[11], portalProp = $[12], restProps = $[13], scheme = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21]);
|
|
835
|
-
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : 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 ? !1 : t6, positionProp = _positionProp ?? (dialog.position || "fixed"), zOffsetProp = _zOffsetProp ?? (dialog.zOffset || layer.dialog.zOffset), animate = _visualEditing.usePrefersReducedMotion() ? !1 : _animate, portal = _visualEditing.usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = _visualEditing.useBoundaryElement().element;
|
|
824
|
+
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : 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 ? !1 : t6, positionProp = _positionProp ?? (dialog.position || "fixed"), zOffsetProp = _zOffsetProp ?? (dialog.zOffset || layer.dialog.zOffset), animate = _visualEditing.usePrefersReducedMotion() ? !1 : _animate, portal = _visualEditing.usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = _visualEditing.useBoundaryElement().element, cardRadius = _visualEditing.useArrayProp(cardRadiusProp), padding = _visualEditing.useArrayProp(paddingProp), position = _visualEditing.useArrayProp(positionProp), width = _visualEditing.useArrayProp(widthProp), zOffset = _visualEditing.useArrayProp(zOffsetProp), preDivRef = react.useRef(null), postDivRef = react.useRef(null), cardRef = react.useRef(null), focusedElementRef = react.useRef(null);
|
|
836
825
|
let t7;
|
|
837
|
-
$[22] !==
|
|
838
|
-
const cardRadius = t7;
|
|
839
|
-
let t8;
|
|
840
|
-
$[24] !== paddingProp ? (t8 = _visualEditing._getArrayProp(paddingProp), $[24] = paddingProp, $[25] = t8) : t8 = $[25];
|
|
841
|
-
const padding = t8;
|
|
842
|
-
let t9;
|
|
843
|
-
$[26] !== positionProp ? (t9 = _visualEditing._getArrayProp(positionProp), $[26] = positionProp, $[27] = t9) : t9 = $[27];
|
|
844
|
-
const position = t9;
|
|
845
|
-
let t10;
|
|
846
|
-
$[28] !== widthProp ? (t10 = _visualEditing._getArrayProp(widthProp), $[28] = widthProp, $[29] = t10) : t10 = $[29];
|
|
847
|
-
const width = t10;
|
|
848
|
-
let t11;
|
|
849
|
-
$[30] !== zOffsetProp ? (t11 = _visualEditing._getArrayProp(zOffsetProp), $[30] = zOffsetProp, $[31] = t11) : t11 = $[31];
|
|
850
|
-
const zOffset = t11, preDivRef = react.useRef(null), postDivRef = react.useRef(null), cardRef = react.useRef(null), focusedElementRef = react.useRef(null);
|
|
851
|
-
let t12;
|
|
852
|
-
$[32] !== onFocus ? (t12 = (event) => {
|
|
826
|
+
$[22] !== onFocus ? (t7 = (event) => {
|
|
853
827
|
onFocus?.(event);
|
|
854
828
|
const target = event.target, cardElement = cardRef.current;
|
|
855
829
|
if (cardElement && target === preDivRef.current) {
|
|
@@ -861,10 +835,10 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
861
835
|
return;
|
|
862
836
|
}
|
|
863
837
|
_visualEditing.isHTMLElement(event.target) && (focusedElementRef.current = event.target);
|
|
864
|
-
}, $[
|
|
865
|
-
const handleFocus =
|
|
866
|
-
let
|
|
867
|
-
$[
|
|
838
|
+
}, $[22] = onFocus, $[23] = t7) : t7 = $[23];
|
|
839
|
+
const handleFocus = t7, labelId = `${id}_label`, rootClickTimeoutRef = react.useRef(void 0);
|
|
840
|
+
let t8;
|
|
841
|
+
$[24] !== boundaryElement || $[25] !== portalElement ? (t8 = () => {
|
|
868
842
|
rootClickTimeoutRef.current && clearTimeout(rootClickTimeoutRef.current), rootClickTimeoutRef.current = setTimeout(() => {
|
|
869
843
|
const activeElement = document.activeElement;
|
|
870
844
|
if (activeElement && !isTargetWithinScope(boundaryElement, portalElement, activeElement)) {
|
|
@@ -877,22 +851,22 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
877
851
|
target_0.focus();
|
|
878
852
|
}
|
|
879
853
|
}, 0);
|
|
880
|
-
}, $[
|
|
881
|
-
const handleRootClick =
|
|
882
|
-
let
|
|
883
|
-
$[
|
|
884
|
-
let
|
|
885
|
-
$[
|
|
886
|
-
let
|
|
887
|
-
$[
|
|
888
|
-
let
|
|
889
|
-
$[
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
] }), $[
|
|
894
|
-
let
|
|
895
|
-
return $[
|
|
854
|
+
}, $[24] = boundaryElement, $[25] = portalElement, $[26] = t8) : t8 = $[26];
|
|
855
|
+
const handleRootClick = t8;
|
|
856
|
+
let t9;
|
|
857
|
+
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: preDivRef, tabIndex: 0 }), $[27] = t9) : t9 = $[27];
|
|
858
|
+
let t10;
|
|
859
|
+
$[28] !== autoFocus || $[29] !== cardRadius || $[30] !== cardShadow || $[31] !== children || $[32] !== contentRef || $[33] !== footer || $[34] !== header || $[35] !== hideCloseButton || $[36] !== id || $[37] !== onClickOutside || $[38] !== onClose || $[39] !== portalProp || $[40] !== scheme || $[41] !== width ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(DialogCard, { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, contentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: cardRadius, ref: cardRef, scheme, shadow: cardShadow, width, children }), $[28] = autoFocus, $[29] = cardRadius, $[30] = cardShadow, $[31] = children, $[32] = contentRef, $[33] = footer, $[34] = header, $[35] = hideCloseButton, $[36] = id, $[37] = onClickOutside, $[38] = onClose, $[39] = portalProp, $[40] = scheme, $[41] = width, $[42] = t10) : t10 = $[42];
|
|
860
|
+
let t11;
|
|
861
|
+
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: postDivRef, tabIndex: 0 }), $[43] = t11) : t11 = $[43];
|
|
862
|
+
let t12;
|
|
863
|
+
$[44] !== animate || $[45] !== handleFocus || $[46] !== handleRootClick || $[47] !== id || $[48] !== labelId || $[49] !== onActivate || $[50] !== padding || $[51] !== position || $[52] !== ref || $[53] !== restProps || $[54] !== t10 || $[55] !== zOffset ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(StyledDialog, { ...restProps, $animate: animate, $padding: padding, $position: position, "aria-labelledby": labelId, "aria-modal": !0, "data-ui": "Dialog", id, onActivate, onClick: handleRootClick, onFocus: handleFocus, ref, role: "dialog", zOffset, children: [
|
|
864
|
+
t9,
|
|
865
|
+
t10,
|
|
866
|
+
t11
|
|
867
|
+
] }), $[44] = animate, $[45] = handleFocus, $[46] = handleRootClick, $[47] = id, $[48] = labelId, $[49] = onActivate, $[50] = padding, $[51] = position, $[52] = ref, $[53] = restProps, $[54] = t10, $[55] = zOffset, $[56] = t12) : t12 = $[56];
|
|
868
|
+
let t13;
|
|
869
|
+
return $[57] !== portalProp || $[58] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Portal, { __unstable_name: portalProp, children: t12 }), $[57] = portalProp, $[58] = t12, $[59] = t13) : t13 = $[59], t13;
|
|
896
870
|
});
|
|
897
871
|
Dialog.displayName = "ForwardRef(Dialog)";
|
|
898
872
|
function DialogProvider(props) {
|
|
@@ -1094,7 +1068,7 @@ const keyframe = styledComponents.keyframes`
|
|
|
1094
1068
|
displayName: "StyledSkeleton",
|
|
1095
1069
|
componentId: "sc-ebtpni-0"
|
|
1096
1070
|
})(_visualEditing.responsiveRadiusStyle, skeletonStyle), Skeleton = react.forwardRef(function(props, ref) {
|
|
1097
|
-
const $ = reactCompilerRuntime.c(
|
|
1071
|
+
const $ = reactCompilerRuntime.c(14);
|
|
1098
1072
|
let delay, radius, restProps, t0;
|
|
1099
1073
|
$[0] !== props ? ({
|
|
1100
1074
|
animated: t0,
|
|
@@ -1106,7 +1080,7 @@ const keyframe = styledComponents.keyframes`
|
|
|
1106
1080
|
let t1, t2;
|
|
1107
1081
|
$[5] !== delay ? (t1 = () => {
|
|
1108
1082
|
if (!delay)
|
|
1109
|
-
return
|
|
1083
|
+
return;
|
|
1110
1084
|
const timeout = setTimeout(() => {
|
|
1111
1085
|
setVisible(!0);
|
|
1112
1086
|
}, delay);
|
|
@@ -1114,10 +1088,9 @@ const keyframe = styledComponents.keyframes`
|
|
|
1114
1088
|
clearTimeout(timeout);
|
|
1115
1089
|
};
|
|
1116
1090
|
}, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), react.useEffect(t1, t2);
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
return $[10] !== animated || $[11] !== ref || $[12] !== restProps || $[13] !== t3 || $[14] !== visible ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton$1, { ...restProps, $animated: animated, $radius: t3, $visible: visible, ref }), $[10] = animated, $[11] = ref, $[12] = restProps, $[13] = t3, $[14] = visible, $[15] = t4) : t4 = $[15], t4;
|
|
1091
|
+
const t3 = _visualEditing.useArrayProp(radius), t4 = delay ? visible : !0;
|
|
1092
|
+
let t5;
|
|
1093
|
+
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton$1, { ...restProps, $animated: animated, $radius: t3, $visible: t4, ref }), $[8] = animated, $[9] = ref, $[10] = restProps, $[11] = t3, $[12] = t4, $[13] = t5) : t5 = $[13], t5;
|
|
1121
1094
|
});
|
|
1122
1095
|
Skeleton.displayName = "ForwardRef(Skeleton)";
|
|
1123
1096
|
const StyledSkeleton = /* @__PURE__ */ styledComponents.styled(Skeleton).withConfig({
|
|
@@ -1138,63 +1111,51 @@ const StyledSkeleton = /* @__PURE__ */ styledComponents.styled(Skeleton).withCon
|
|
|
1138
1111
|
};
|
|
1139
1112
|
});
|
|
1140
1113
|
}), TextSkeleton = react.forwardRef(function(props, ref) {
|
|
1141
|
-
const $ = reactCompilerRuntime.c(
|
|
1114
|
+
const $ = reactCompilerRuntime.c(7);
|
|
1142
1115
|
let restProps, t0;
|
|
1143
1116
|
$[0] !== props ? ({
|
|
1144
1117
|
size: t0,
|
|
1145
1118
|
...restProps
|
|
1146
1119
|
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
1147
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
1120
|
+
const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
|
|
1148
1121
|
let t1;
|
|
1149
|
-
$[3] !== size ? (t1 =
|
|
1150
|
-
const $size = t1;
|
|
1151
|
-
let t2;
|
|
1152
|
-
return $[5] !== $size || $[6] !== ref || $[7] !== restProps ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "text" }), $[5] = $size, $[6] = ref, $[7] = restProps, $[8] = t2) : t2 = $[8], t2;
|
|
1122
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "text" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
1153
1123
|
});
|
|
1154
1124
|
TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
|
|
1155
1125
|
const LabelSkeleton = react.forwardRef(function(props, ref) {
|
|
1156
|
-
const $ = reactCompilerRuntime.c(
|
|
1126
|
+
const $ = reactCompilerRuntime.c(7);
|
|
1157
1127
|
let restProps, t0;
|
|
1158
1128
|
$[0] !== props ? ({
|
|
1159
1129
|
size: t0,
|
|
1160
1130
|
...restProps
|
|
1161
1131
|
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
1162
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
1132
|
+
const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
|
|
1163
1133
|
let t1;
|
|
1164
|
-
$[3] !== size ? (t1 =
|
|
1165
|
-
const $size = t1;
|
|
1166
|
-
let t2;
|
|
1167
|
-
return $[5] !== $size || $[6] !== ref || $[7] !== restProps ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "label" }), $[5] = $size, $[6] = ref, $[7] = restProps, $[8] = t2) : t2 = $[8], t2;
|
|
1134
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "label" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
1168
1135
|
});
|
|
1169
1136
|
LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
|
|
1170
1137
|
const HeadingSkeleton = react.forwardRef(function(props, ref) {
|
|
1171
|
-
const $ = reactCompilerRuntime.c(
|
|
1138
|
+
const $ = reactCompilerRuntime.c(7);
|
|
1172
1139
|
let restProps, t0;
|
|
1173
1140
|
$[0] !== props ? ({
|
|
1174
1141
|
size: t0,
|
|
1175
1142
|
...restProps
|
|
1176
1143
|
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
1177
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
1144
|
+
const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
|
|
1178
1145
|
let t1;
|
|
1179
|
-
$[3] !== size ? (t1 =
|
|
1180
|
-
const $size = t1;
|
|
1181
|
-
let t2;
|
|
1182
|
-
return $[5] !== $size || $[6] !== ref || $[7] !== restProps ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "heading" }), $[5] = $size, $[6] = ref, $[7] = restProps, $[8] = t2) : t2 = $[8], t2;
|
|
1146
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "heading" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
1183
1147
|
});
|
|
1184
1148
|
HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
|
|
1185
1149
|
const CodeSkeleton = react.forwardRef(function(props, ref) {
|
|
1186
|
-
const $ = reactCompilerRuntime.c(
|
|
1150
|
+
const $ = reactCompilerRuntime.c(7);
|
|
1187
1151
|
let restProps, t0;
|
|
1188
1152
|
$[0] !== props ? ({
|
|
1189
1153
|
size: t0,
|
|
1190
1154
|
...restProps
|
|
1191
1155
|
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
1192
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
1156
|
+
const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
|
|
1193
1157
|
let t1;
|
|
1194
|
-
$[3] !== size ? (t1 =
|
|
1195
|
-
const $size = t1;
|
|
1196
|
-
let t2;
|
|
1197
|
-
return $[5] !== $size || $[6] !== ref || $[7] !== restProps ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "code" }), $[5] = $size, $[6] = ref, $[7] = restProps, $[8] = t2) : t2 = $[8], t2;
|
|
1158
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "code" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
1198
1159
|
});
|
|
1199
1160
|
CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
|
|
1200
1161
|
const TabPanel = react.forwardRef(function(props, ref) {
|
|
@@ -1973,6 +1934,7 @@ exports.rgbToHsl = _visualEditing.rgbToHsl;
|
|
|
1973
1934
|
exports.rgba = _visualEditing.rgba;
|
|
1974
1935
|
exports.screen = _visualEditing.screen;
|
|
1975
1936
|
exports.studioTheme = _visualEditing.studioTheme;
|
|
1937
|
+
exports.useArrayProp = _visualEditing.useArrayProp;
|
|
1976
1938
|
exports.useBoundaryElement = _visualEditing.useBoundaryElement;
|
|
1977
1939
|
exports.useClickOutsideEvent = _visualEditing.useClickOutsideEvent;
|
|
1978
1940
|
exports.useCustomValidity = _visualEditing.useCustomValidity;
|
|
@@ -2012,7 +1974,6 @@ exports.attemptFocus = attemptFocus;
|
|
|
2012
1974
|
exports.focusFirstDescendant = focusFirstDescendant;
|
|
2013
1975
|
exports.focusLastDescendant = focusLastDescendant;
|
|
2014
1976
|
exports.isFocusable = isFocusable;
|
|
2015
|
-
exports.useArrayProp = useArrayProp;
|
|
2016
1977
|
exports.useClickOutside = useClickOutside;
|
|
2017
1978
|
exports.useDialog = useDialog;
|
|
2018
1979
|
exports.useElementRect = useElementRect;
|