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