@sanity/ui 3.0.10 → 3.0.11
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 +77 -63
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +77 -63
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/index.js +308 -98
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +310 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/core/components/autocomplete/autocomplete.tsx +79 -47
- package/src/core/components/menu/menu.test.tsx +11 -14
- package/src/core/components/menu/menu.tsx +13 -18
- package/src/core/components/menu/menuContext.ts +3 -14
- package/src/core/components/menu/menuGroup.tsx +1 -1
- package/src/core/components/menu/menuItem.tsx +2 -2
- package/src/core/components/menu/useMenu.ts +2 -2
- package/src/core/components/menu/useMenuController.ts +5 -5
- package/src/core/components/tree/treeItem.tsx +17 -15
- package/src/core/utils/portal/portalProvider.tsx +2 -34
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
3
|
-
var _visualEditing = require("./_chunks-cjs/_visual-editing.js"), jsxRuntime = require("react/jsx-runtime"), icons = require("@sanity/icons"), react = require("react"), styledComponents = require("styled-components"),
|
|
3
|
+
var _visualEditing = require("./_chunks-cjs/_visual-editing.js"), jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), icons = require("@sanity/icons"), react = require("react"), styledComponents = require("styled-components"), theme = require("@sanity/ui/theme"), framerMotion = require("framer-motion");
|
|
4
4
|
function _raf(fn) {
|
|
5
5
|
const frameId = requestAnimationFrame(fn);
|
|
6
6
|
return () => {
|
|
@@ -209,15 +209,17 @@ function autocompleteReducer(state, msg) {
|
|
|
209
209
|
} : state;
|
|
210
210
|
}
|
|
211
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) {
|
|
212
|
-
const
|
|
213
|
-
|
|
212
|
+
const $ = reactCompilerRuntime.c(179);
|
|
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;
|
|
214
|
+
$[0] !== props ? ({
|
|
215
|
+
border: t0,
|
|
214
216
|
customValidity,
|
|
215
217
|
disabled,
|
|
216
218
|
filterOption: filterOptionProp,
|
|
217
|
-
fontSize
|
|
219
|
+
fontSize: t1,
|
|
218
220
|
icon,
|
|
219
221
|
id,
|
|
220
|
-
listBox
|
|
222
|
+
listBox: t2,
|
|
221
223
|
loading,
|
|
222
224
|
onBlur,
|
|
223
225
|
onChange,
|
|
@@ -227,35 +229,60 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
227
229
|
openButton,
|
|
228
230
|
openOnFocus,
|
|
229
231
|
options: optionsProp,
|
|
230
|
-
padding:
|
|
231
|
-
popover
|
|
232
|
+
padding: t3,
|
|
233
|
+
popover: t4,
|
|
232
234
|
prefix,
|
|
233
|
-
radius
|
|
235
|
+
radius: t5,
|
|
234
236
|
readOnly,
|
|
235
237
|
relatedElements,
|
|
236
238
|
renderOption: renderOptionProp,
|
|
237
239
|
renderPopover,
|
|
238
|
-
renderValue
|
|
240
|
+
renderValue: t6,
|
|
239
241
|
suffix,
|
|
240
242
|
value: valueProp,
|
|
241
243
|
...restProps
|
|
242
|
-
} = props, [
|
|
243
|
-
|
|
244
|
+
} = props, $[0] = props, $[1] = customValidity, $[2] = disabled, $[3] = filterOptionProp, $[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) : (customValidity = $[1], disabled = $[2], filterOptionProp = $[3], icon = $[4], id = $[5], loading = $[6], onBlur = $[7], onChange = $[8], onFocus = $[9], onQueryChange = $[10], onSelect = $[11], openButton = $[12], openOnFocus = $[13], optionsProp = $[14], prefix = $[15], readOnly = $[16], relatedElements = $[17], renderOptionProp = $[18], renderPopover = $[19], restProps = $[20], suffix = $[21], t0 = $[22], t1 = $[23], t2 = $[24], t3 = $[25], t4 = $[26], t5 = $[27], t6 = $[28], valueProp = $[29]);
|
|
245
|
+
const border = t0 === void 0 ? !0 : t0, fontSize = t1 === void 0 ? 2 : t1, listBox = t2 === void 0 ? _visualEditing.EMPTY_RECORD : t2, paddingProp = t3 === void 0 ? 3 : t3, popover = t4 === void 0 ? _visualEditing.EMPTY_RECORD : t4, radius = t5 === void 0 ? 2 : t5, renderValue = t6 === void 0 ? DEFAULT_RENDER_VALUE : t6, t7 = valueProp || null, t8 = valueProp || null;
|
|
246
|
+
let t9;
|
|
247
|
+
$[30] !== t7 || $[31] !== t8 ? (t9 = {
|
|
248
|
+
activeValue: t7,
|
|
244
249
|
focused: !1,
|
|
245
250
|
listFocused: !1,
|
|
246
251
|
query: null,
|
|
247
|
-
value:
|
|
248
|
-
}
|
|
252
|
+
value: t8
|
|
253
|
+
}, $[30] = t7, $[31] = t8, $[32] = t9) : t9 = $[32];
|
|
254
|
+
const [state, dispatch] = react.useReducer(autocompleteReducer, t9), {
|
|
249
255
|
activeValue,
|
|
250
256
|
focused,
|
|
251
257
|
listFocused,
|
|
252
258
|
query,
|
|
253
259
|
value
|
|
254
|
-
} = state
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
260
|
+
} = state;
|
|
261
|
+
let t10;
|
|
262
|
+
$[33] !== fontSize || $[34] !== paddingProp ? (t10 = (t112) => {
|
|
263
|
+
const {
|
|
264
|
+
value: value_0
|
|
265
|
+
} = t112;
|
|
266
|
+
return /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Card, { "data-as": "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { size: fontSize, textOverflow: "ellipsis", children: value_0 }) });
|
|
267
|
+
}, $[33] = fontSize, $[34] = paddingProp, $[35] = t10) : t10 = $[35];
|
|
268
|
+
const renderOption = typeof renderOptionProp == "function" ? renderOptionProp : t10, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, rootElementRef = react.useRef(null), resultsPopoverElementRef = react.useRef(null), inputElementRef = react.useRef(null), listBoxElementRef = react.useRef(null), [inputElement, setInputElement] = react.useState(null), listFocusedRef = react.useRef(!1), valueRef = react.useRef(value), valuePropRef = react.useRef(valueProp), popoverMouseWithinRef = react.useRef(!1);
|
|
269
|
+
let t11, t12;
|
|
270
|
+
$[36] !== inputElement ? (t11 = () => inputElement, t12 = [inputElement], $[36] = inputElement, $[37] = t11, $[38] = t12) : (t11 = $[37], t12 = $[38]), react.useImperativeHandle(inputElementRef, t11, t12);
|
|
271
|
+
let t13, t14;
|
|
272
|
+
$[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.useArrayProp(paddingProp);
|
|
274
|
+
let t15;
|
|
275
|
+
$[42] !== options || $[43] !== value ? (t15 = value !== null ? options.find((o) => o.value === value) : void 0, $[42] = options, $[43] = value, $[44] = t15) : t15 = $[44];
|
|
276
|
+
const currentOption = t15;
|
|
277
|
+
let t16;
|
|
278
|
+
if ($[45] !== filterOption || $[46] !== options || $[47] !== query) {
|
|
279
|
+
let t172;
|
|
280
|
+
$[49] !== filterOption || $[50] !== query ? (t172 = (option) => query ? filterOption(query, option) : !0, $[49] = filterOption, $[50] = query, $[51] = t172) : t172 = $[51], t16 = options.filter(t172), $[45] = filterOption, $[46] = options, $[47] = query, $[48] = t16;
|
|
281
|
+
} else
|
|
282
|
+
t16 = $[48];
|
|
283
|
+
const filteredOptions = t16, filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null;
|
|
284
|
+
let t17;
|
|
285
|
+
$[52] !== onBlur || $[53] !== onQueryChange || $[54] !== relatedElements ? (t17 = (event) => {
|
|
259
286
|
setTimeout(() => {
|
|
260
287
|
if (popoverMouseWithinRef.current)
|
|
261
288
|
return;
|
|
@@ -272,20 +299,30 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
272
299
|
type: "root/blur"
|
|
273
300
|
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), onBlur && onBlur(event));
|
|
274
301
|
}, 0);
|
|
275
|
-
}, [onBlur, onQueryChange, relatedElements
|
|
302
|
+
}, $[52] = onBlur, $[53] = onQueryChange, $[54] = relatedElements, $[55] = t17) : t17 = $[55];
|
|
303
|
+
const handleRootBlur = t17;
|
|
304
|
+
let t18;
|
|
305
|
+
$[56] === Symbol.for("react.memo_cache_sentinel") ? (t18 = (event_0) => {
|
|
276
306
|
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement?.contains(focusedElement) || !1;
|
|
277
307
|
listFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({
|
|
278
308
|
type: "root/setListFocused",
|
|
279
309
|
listFocused: listFocused_0
|
|
280
310
|
}));
|
|
281
|
-
}, []
|
|
311
|
+
}, $[56] = t18) : t18 = $[56];
|
|
312
|
+
const handleRootFocus = t18;
|
|
313
|
+
let t19;
|
|
314
|
+
$[57] !== onChange || $[58] !== onQueryChange || $[59] !== onSelect ? (t19 = (v) => {
|
|
282
315
|
dispatch({
|
|
283
316
|
type: "value/change",
|
|
284
317
|
value: v
|
|
285
318
|
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
286
|
-
}, [onChange,
|
|
319
|
+
}, $[57] = onChange, $[58] = onQueryChange, $[59] = onSelect, $[60] = t19) : t19 = $[60];
|
|
320
|
+
const handleOptionSelect = t19;
|
|
321
|
+
let t20;
|
|
322
|
+
$[61] !== activeValue || $[62] !== filteredOptions || $[63] !== filteredOptionsLen || $[64] !== onQueryChange ? (t20 = (event_1) => {
|
|
287
323
|
if (event_1.key === "ArrowDown") {
|
|
288
|
-
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
324
|
+
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
325
|
+
return;
|
|
289
326
|
const activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];
|
|
290
327
|
nextActiveOption && dispatch({
|
|
291
328
|
type: "root/setActiveValue",
|
|
@@ -295,7 +332,8 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
295
332
|
return;
|
|
296
333
|
}
|
|
297
334
|
if (event_1.key === "ArrowUp") {
|
|
298
|
-
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
335
|
+
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
336
|
+
return;
|
|
299
337
|
const activeOption_0 = filteredOptions.find((o_1) => o_1.value === activeValue), activeIndex_0 = activeOption_0 ? filteredOptions.indexOf(activeOption_0) : -1, nextActiveOption_0 = filteredOptions[activeIndex_0 === -1 ? filteredOptionsLen - 1 : (filteredOptionsLen + activeIndex_0 - 1) % filteredOptionsLen];
|
|
300
338
|
nextActiveOption_0 && dispatch({
|
|
301
339
|
type: "root/setActiveValue",
|
|
@@ -315,35 +353,58 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
315
353
|
inputElementRef.current?.focus();
|
|
316
354
|
return;
|
|
317
355
|
}
|
|
318
|
-
}, [activeValue, filteredOptions, filteredOptionsLen, onQueryChange
|
|
356
|
+
}, $[61] = activeValue, $[62] = filteredOptions, $[63] = filteredOptionsLen, $[64] = onQueryChange, $[65] = t20) : t20 = $[65];
|
|
357
|
+
const handleRootKeyDown = t20;
|
|
358
|
+
let t21;
|
|
359
|
+
$[66] !== onQueryChange ? (t21 = (event_2) => {
|
|
319
360
|
const nextQuery = event_2.currentTarget.value;
|
|
320
361
|
dispatch({
|
|
321
362
|
type: "input/change",
|
|
322
363
|
query: nextQuery
|
|
323
364
|
}), onQueryChange && onQueryChange(nextQuery);
|
|
324
|
-
}, [onQueryChange
|
|
365
|
+
}, $[66] = onQueryChange, $[67] = t21) : t21 = $[67];
|
|
366
|
+
const handleInputChange = t21;
|
|
367
|
+
let t22;
|
|
368
|
+
$[68] !== currentOption || $[69] !== renderValue || $[70] !== value ? (t22 = () => {
|
|
325
369
|
dispatch({
|
|
326
370
|
type: "root/open",
|
|
327
371
|
query: value ? renderValue(value, currentOption) : ""
|
|
328
372
|
});
|
|
329
|
-
}, [currentOption, renderValue, value
|
|
373
|
+
}, $[68] = currentOption, $[69] = renderValue, $[70] = value, $[71] = t22) : t22 = $[71];
|
|
374
|
+
const dispatchOpen = t22;
|
|
375
|
+
let t23;
|
|
376
|
+
$[72] !== dispatchOpen || $[73] !== focused || $[74] !== onFocus || $[75] !== openOnFocus ? (t23 = (event_3) => {
|
|
330
377
|
focused || (dispatch({
|
|
331
378
|
type: "input/focus"
|
|
332
379
|
}), onFocus && onFocus(event_3), openOnFocus && dispatchOpen());
|
|
333
|
-
}, [focused, onFocus, openOnFocus,
|
|
380
|
+
}, $[72] = dispatchOpen, $[73] = focused, $[74] = onFocus, $[75] = openOnFocus, $[76] = t23) : t23 = $[76];
|
|
381
|
+
const handleInputFocus = t23;
|
|
382
|
+
let t24;
|
|
383
|
+
$[77] === Symbol.for("react.memo_cache_sentinel") ? (t24 = () => {
|
|
334
384
|
popoverMouseWithinRef.current = !0;
|
|
335
|
-
}, []
|
|
385
|
+
}, $[77] = t24) : t24 = $[77];
|
|
386
|
+
const handlePopoverMouseEnter = t24;
|
|
387
|
+
let t25;
|
|
388
|
+
$[78] === Symbol.for("react.memo_cache_sentinel") ? (t25 = () => {
|
|
336
389
|
popoverMouseWithinRef.current = !1;
|
|
337
|
-
}, []
|
|
390
|
+
}, $[78] = t25) : t25 = $[78];
|
|
391
|
+
const handlePopoverMouseLeave = t25;
|
|
392
|
+
let t26;
|
|
393
|
+
$[79] !== onChange || $[80] !== onQueryChange ? (t26 = () => {
|
|
338
394
|
dispatch({
|
|
339
395
|
type: "root/clear"
|
|
340
396
|
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
341
|
-
}, [onChange, onQueryChange
|
|
397
|
+
}, $[79] = onChange, $[80] = onQueryChange, $[81] = t26) : t26 = $[81];
|
|
398
|
+
const handleClearButtonClick = t26;
|
|
399
|
+
let t27;
|
|
400
|
+
$[82] === Symbol.for("react.memo_cache_sentinel") ? (t27 = () => {
|
|
342
401
|
dispatch({
|
|
343
402
|
type: "input/focus"
|
|
344
403
|
});
|
|
345
|
-
}, []);
|
|
346
|
-
|
|
404
|
+
}, $[82] = t27) : t27 = $[82];
|
|
405
|
+
const handleClearButtonFocus = t27;
|
|
406
|
+
let t28, t29;
|
|
407
|
+
$[83] !== valueProp ? (t28 = () => {
|
|
347
408
|
if (valueProp !== valuePropRef.current) {
|
|
348
409
|
valuePropRef.current = valueProp, valueProp !== void 0 && (dispatch({
|
|
349
410
|
type: "value/change",
|
|
@@ -355,14 +416,19 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
355
416
|
type: "value/change",
|
|
356
417
|
value: valueProp || null
|
|
357
418
|
}));
|
|
358
|
-
}, [valueProp]), react.useEffect(
|
|
419
|
+
}, t29 = [valueProp], $[83] = valueProp, $[84] = t28, $[85] = t29) : (t28 = $[84], t29 = $[85]), react.useEffect(t28, t29);
|
|
420
|
+
let t30, t31;
|
|
421
|
+
$[86] !== focused ? (t30 = () => {
|
|
359
422
|
!focused && valueRef.current && dispatch({
|
|
360
423
|
type: "root/setActiveValue",
|
|
361
424
|
value: valueRef.current
|
|
362
425
|
});
|
|
363
|
-
}, [focused]), react.useEffect(
|
|
426
|
+
}, t31 = [focused], $[86] = focused, $[87] = t30, $[88] = t31) : (t30 = $[87], t31 = $[88]), react.useEffect(t30, t31);
|
|
427
|
+
let t32, t33;
|
|
428
|
+
$[89] !== activeValue || $[90] !== filteredOptions ? (t32 = () => {
|
|
364
429
|
const listElement = listBoxElementRef.current;
|
|
365
|
-
if (!listElement)
|
|
430
|
+
if (!listElement)
|
|
431
|
+
return;
|
|
366
432
|
const activeOption_1 = filteredOptions.find((o_2) => o_2.value === activeValue);
|
|
367
433
|
if (activeOption_1) {
|
|
368
434
|
const activeIndex_1 = filteredOptions.indexOf(activeOption_1), activeItemElement = listElement.childNodes[activeIndex_1];
|
|
@@ -372,38 +438,128 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
372
438
|
focusFirstDescendant(activeItemElement);
|
|
373
439
|
}
|
|
374
440
|
}
|
|
375
|
-
}, [activeValue, filteredOptions]);
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
441
|
+
}, t33 = [activeValue, filteredOptions], $[89] = activeValue, $[90] = filteredOptions, $[91] = t32, $[92] = t33) : (t32 = $[91], t33 = $[92]), react.useEffect(t32, t33);
|
|
442
|
+
let t34;
|
|
443
|
+
bb0: {
|
|
444
|
+
if (!loading && !disabled && value) {
|
|
445
|
+
let t352;
|
|
446
|
+
$[93] === Symbol.for("react.memo_cache_sentinel") ? (t352 = {
|
|
379
447
|
"aria-label": "Clear",
|
|
380
448
|
onFocus: handleClearButtonFocus
|
|
381
|
-
};
|
|
382
|
-
|
|
449
|
+
}, $[93] = t352) : t352 = $[93], t34 = t352;
|
|
450
|
+
break bb0;
|
|
451
|
+
}
|
|
452
|
+
t34 = void 0;
|
|
453
|
+
}
|
|
454
|
+
const clearButton = t34;
|
|
455
|
+
let t35;
|
|
456
|
+
$[94] !== padding ? (t35 = padding.map(_temp$3), $[94] = padding, $[95] = t35) : t35 = $[95];
|
|
457
|
+
const openButtonBoxPadding = t35;
|
|
458
|
+
let t36;
|
|
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;
|
|
461
|
+
let t37;
|
|
462
|
+
$[98] !== dispatchOpen || $[99] !== openButtonProps ? (t37 = (event_4) => {
|
|
383
463
|
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
384
|
-
}, [
|
|
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
|
+
bb1: {
|
|
471
|
+
if (query === null) {
|
|
472
|
+
if (value !== null) {
|
|
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;
|
|
475
|
+
break bb1;
|
|
476
|
+
}
|
|
477
|
+
t39 = "";
|
|
478
|
+
break bb1;
|
|
479
|
+
}
|
|
480
|
+
t39 = query;
|
|
481
|
+
}
|
|
482
|
+
const inputValue = t39;
|
|
483
|
+
let t40;
|
|
484
|
+
$[115] !== listFocused ? (t40 = (event_5) => {
|
|
385
485
|
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
386
|
-
}, [
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
486
|
+
}, $[115] = listFocused, $[116] = t40) : t40 = $[116];
|
|
487
|
+
const handleListBoxKeyDown = t40;
|
|
488
|
+
let t41;
|
|
489
|
+
bb2: {
|
|
490
|
+
if (filteredOptions.length === 0) {
|
|
491
|
+
t41 = null;
|
|
492
|
+
break bb2;
|
|
493
|
+
}
|
|
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) => {
|
|
498
|
+
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
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), {
|
|
500
|
+
disabled: loading,
|
|
501
|
+
selected: active,
|
|
502
|
+
tabIndex: listFocused && active ? 0 : -1
|
|
503
|
+
}) }, option_0.value);
|
|
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;
|
|
505
|
+
} else
|
|
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;
|
|
511
|
+
}
|
|
512
|
+
const content2 = t41;
|
|
513
|
+
let t42;
|
|
514
|
+
bb3: {
|
|
515
|
+
if (renderPopover) {
|
|
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;
|
|
519
|
+
break bb3;
|
|
520
|
+
}
|
|
521
|
+
if (filteredOptionsLen === 0) {
|
|
522
|
+
t42 = null;
|
|
523
|
+
break bb3;
|
|
524
|
+
}
|
|
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;
|
|
527
|
+
}
|
|
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,
|
|
402
534
|
results
|
|
403
|
-
] });
|
|
535
|
+
] }), $[174] = handleRootBlur, $[175] = handleRootKeyDown, $[176] = results, $[177] = t45, $[178] = t46) : t46 = $[178], t46;
|
|
404
536
|
});
|
|
537
|
+
function RenderPopover({
|
|
538
|
+
renderPopover,
|
|
539
|
+
content: content2,
|
|
540
|
+
hidden,
|
|
541
|
+
inputElement,
|
|
542
|
+
onMouseEnter,
|
|
543
|
+
onMouseLeave,
|
|
544
|
+
resultsPopoverElementRef
|
|
545
|
+
}) {
|
|
546
|
+
return renderPopover({
|
|
547
|
+
content: content2,
|
|
548
|
+
hidden,
|
|
549
|
+
inputElement,
|
|
550
|
+
onMouseEnter,
|
|
551
|
+
onMouseLeave
|
|
552
|
+
}, resultsPopoverElementRef);
|
|
553
|
+
}
|
|
405
554
|
InnerAutocomplete.displayName = "ForwardRef(Autocomplete)";
|
|
406
|
-
const Autocomplete = InnerAutocomplete
|
|
555
|
+
const Autocomplete = InnerAutocomplete;
|
|
556
|
+
function _temp$3(v_0) {
|
|
557
|
+
return v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2;
|
|
558
|
+
}
|
|
559
|
+
function _temp2$1(v_1) {
|
|
560
|
+
return Math.max(v_1 - 1, 0);
|
|
561
|
+
}
|
|
562
|
+
const StyledBreadcrumbs = styledComponents.styled.ol.withConfig({
|
|
407
563
|
displayName: "StyledBreadcrumbs",
|
|
408
564
|
componentId: "sc-1es8h8q-0"
|
|
409
565
|
})`margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;`, ExpandButton = styledComponents.styled(_visualEditing.Button).withConfig({
|
|
@@ -1532,61 +1688,115 @@ const TreeGroup = react.memo(function(props) {
|
|
|
1532
1688
|
displayName: "ToggleArrowText",
|
|
1533
1689
|
componentId: "sc-iiskig-2"
|
|
1534
1690
|
})`& > svg{transition:transform 100ms;}`, TreeItem = react.memo(function(props) {
|
|
1535
|
-
const
|
|
1691
|
+
const $ = reactCompilerRuntime.c(112);
|
|
1692
|
+
let IconComponent, children, href, idProp, linkAs, muted, onClick, restProps, t0, t1, t2, t3, t4, text, weight;
|
|
1693
|
+
$[0] !== props ? ({
|
|
1536
1694
|
children,
|
|
1537
|
-
expanded:
|
|
1538
|
-
fontSize
|
|
1695
|
+
expanded: t0,
|
|
1696
|
+
fontSize: t1,
|
|
1539
1697
|
href,
|
|
1540
1698
|
icon: IconComponent,
|
|
1541
1699
|
id: idProp,
|
|
1542
1700
|
linkAs,
|
|
1543
1701
|
muted,
|
|
1544
1702
|
onClick,
|
|
1545
|
-
padding
|
|
1546
|
-
selected
|
|
1547
|
-
space
|
|
1703
|
+
padding: t2,
|
|
1704
|
+
selected: t3,
|
|
1705
|
+
space: t4,
|
|
1548
1706
|
text,
|
|
1549
1707
|
weight,
|
|
1550
1708
|
...restProps
|
|
1551
|
-
} = props,
|
|
1709
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = href, $[4] = idProp, $[5] = linkAs, $[6] = muted, $[7] = onClick, $[8] = restProps, $[9] = t0, $[10] = t1, $[11] = t2, $[12] = t3, $[13] = t4, $[14] = text, $[15] = weight) : (IconComponent = $[1], children = $[2], href = $[3], idProp = $[4], linkAs = $[5], muted = $[6], onClick = $[7], restProps = $[8], t0 = $[9], t1 = $[10], t2 = $[11], t3 = $[12], t4 = $[13], text = $[14], weight = $[15]);
|
|
1710
|
+
const expandedProp = t0 === void 0 ? !1 : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 2 : t2, selected = t3 === void 0 ? !1 : t3, space = t4 === void 0 ? 2 : t4, [rootElement, setRootElement] = react.useState(null), treeitemRef = react.useRef(null), tree = useTree(), {
|
|
1552
1711
|
path,
|
|
1553
1712
|
registerItem,
|
|
1554
1713
|
setExpanded,
|
|
1555
1714
|
setFocusedElement
|
|
1556
|
-
} = tree, _id = react.useId(), id = idProp || _id
|
|
1715
|
+
} = tree, _id = react.useId(), id = idProp || _id;
|
|
1716
|
+
let t5, t6;
|
|
1717
|
+
if ($[16] !== id || $[17] !== path) {
|
|
1718
|
+
const itemPath = path.concat([id || ""]);
|
|
1719
|
+
t5 = itemPath, t6 = itemPath.join("/"), $[16] = id, $[17] = path, $[18] = t5, $[19] = t6;
|
|
1720
|
+
} else
|
|
1721
|
+
t5 = $[18], t6 = $[19];
|
|
1722
|
+
let t7;
|
|
1723
|
+
$[20] !== t5 || $[21] !== t6 ? (t7 = [t5, t6], $[20] = t5, $[21] = t6, $[22] = t7) : t7 = $[22];
|
|
1724
|
+
const [itemPath_0, itemKey] = t7, itemState = tree.state[itemKey], focused = tree.focusedElement === rootElement, expanded = itemState?.expanded === void 0 ? expandedProp : itemState?.expanded || !1, tabIndex = tree.focusedElement && tree.focusedElement === rootElement ? 0 : -1, t8 = tree.level + 1;
|
|
1725
|
+
let t9;
|
|
1726
|
+
$[23] !== itemPath_0 || $[24] !== t8 || $[25] !== tree ? (t9 = {
|
|
1557
1727
|
...tree,
|
|
1558
|
-
level:
|
|
1559
|
-
path:
|
|
1560
|
-
}
|
|
1728
|
+
level: t8,
|
|
1729
|
+
path: itemPath_0
|
|
1730
|
+
}, $[23] = itemPath_0, $[24] = t8, $[25] = tree, $[26] = t9) : t9 = $[26];
|
|
1731
|
+
const contextValue = t9;
|
|
1732
|
+
let t10;
|
|
1733
|
+
$[27] !== expanded || $[28] !== itemKey || $[29] !== onClick || $[30] !== rootElement || $[31] !== setExpanded || $[32] !== setFocusedElement ? (t10 = (event) => {
|
|
1561
1734
|
onClick && onClick(event);
|
|
1562
1735
|
const target = event.target;
|
|
1563
|
-
target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem" || target.closest('[data-ui="TreeItem__box"]')) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(
|
|
1564
|
-
}, [expanded, itemKey, onClick, setExpanded, setFocusedElement
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
]
|
|
1736
|
+
target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem" || target.closest('[data-ui="TreeItem__box"]')) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(rootElement));
|
|
1737
|
+
}, $[27] = expanded, $[28] = itemKey, $[29] = onClick, $[30] = rootElement, $[31] = setExpanded, $[32] = setFocusedElement, $[33] = t10) : t10 = $[33];
|
|
1738
|
+
const handleClick = t10;
|
|
1739
|
+
let t11;
|
|
1740
|
+
$[34] !== focused || $[35] !== rootElement ? (t11 = (event_0) => {
|
|
1741
|
+
focused && event_0.key === "Enter" && (treeitemRef.current || rootElement)?.click();
|
|
1742
|
+
}, $[34] = focused, $[35] = rootElement, $[36] = t11) : t11 = $[36];
|
|
1743
|
+
const handleKeyDown = t11;
|
|
1744
|
+
let t12, t13;
|
|
1745
|
+
$[37] !== expanded || $[38] !== itemKey || $[39] !== registerItem || $[40] !== rootElement || $[41] !== selected ? (t12 = () => {
|
|
1746
|
+
if (rootElement)
|
|
1747
|
+
return registerItem(rootElement, itemKey, expanded, selected);
|
|
1748
|
+
}, t13 = [expanded, itemKey, registerItem, rootElement, selected], $[37] = expanded, $[38] = itemKey, $[39] = registerItem, $[40] = rootElement, $[41] = selected, $[42] = t12, $[43] = t13) : (t12 = $[42], t13 = $[43]), react.useEffect(t12, t13);
|
|
1749
|
+
const t14 = IconComponent || children ? "visible" : "hidden";
|
|
1750
|
+
let t15;
|
|
1751
|
+
$[44] !== t14 ? (t15 = {
|
|
1752
|
+
visibility: t14,
|
|
1753
|
+
pointerEvents: "none"
|
|
1754
|
+
}, $[44] = t14, $[45] = t15) : t15 = $[45];
|
|
1755
|
+
let t16;
|
|
1756
|
+
$[46] !== IconComponent || $[47] !== fontSize || $[48] !== muted || $[49] !== weight ? (t16 = IconComponent && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {}) }), $[46] = IconComponent, $[47] = fontSize, $[48] = muted, $[49] = weight, $[50] = t16) : t16 = $[50];
|
|
1757
|
+
let t17;
|
|
1758
|
+
$[51] !== IconComponent || $[52] !== expanded || $[53] !== fontSize || $[54] !== muted || $[55] !== weight ? (t17 = !IconComponent && /* @__PURE__ */ jsxRuntime.jsx(ToggleArrowText, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ToggleArrowRightIcon, { style: {
|
|
1759
|
+
transform: expanded ? "rotate(90deg)" : void 0
|
|
1760
|
+
} }) }), $[51] = IconComponent, $[52] = expanded, $[53] = fontSize, $[54] = muted, $[55] = weight, $[56] = t17) : t17 = $[56];
|
|
1761
|
+
let t18;
|
|
1762
|
+
$[57] !== space || $[58] !== t15 || $[59] !== t16 || $[60] !== t17 ? (t18 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Box, { marginRight: space, style: t15, children: [
|
|
1763
|
+
t16,
|
|
1764
|
+
t17
|
|
1765
|
+
] }), $[57] = space, $[58] = t15, $[59] = t16, $[60] = t17, $[61] = t18) : t18 = $[61];
|
|
1766
|
+
let t19;
|
|
1767
|
+
$[62] !== fontSize || $[63] !== muted || $[64] !== text || $[65] !== weight ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, textOverflow: "ellipsis", weight, children: text }) }), $[62] = fontSize, $[63] = muted, $[64] = text, $[65] = weight, $[66] = t19) : t19 = $[66];
|
|
1768
|
+
let t20;
|
|
1769
|
+
$[67] !== padding || $[68] !== t18 || $[69] !== t19 ? (t20 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { padding, children: [
|
|
1770
|
+
t18,
|
|
1771
|
+
t19
|
|
1772
|
+
] }), $[67] = padding, $[68] = t18, $[69] = t19, $[70] = t20) : t20 = $[70];
|
|
1773
|
+
const content2 = t20;
|
|
1774
|
+
if (href) {
|
|
1775
|
+
const t212 = selected ? "" : void 0;
|
|
1776
|
+
let t222;
|
|
1777
|
+
$[71] !== content2 || $[72] !== expanded || $[73] !== href || $[74] !== linkAs || $[75] !== tabIndex || $[76] !== tree.level ? (t222 = /* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, "aria-expanded": expanded, as: linkAs, "data-ui": "TreeItem__box", href, ref: treeitemRef, role: "treeitem", tabIndex, children: content2 }), $[71] = content2, $[72] = expanded, $[73] = href, $[74] = linkAs, $[75] = tabIndex, $[76] = tree.level, $[77] = t222) : t222 = $[77];
|
|
1778
|
+
let t232;
|
|
1779
|
+
$[78] !== children || $[79] !== expanded ? (t232 = children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { hidden: !expanded, children }), $[78] = children, $[79] = expanded, $[80] = t232) : t232 = $[80];
|
|
1780
|
+
let t242;
|
|
1781
|
+
$[81] !== contextValue || $[82] !== t232 ? (t242 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t232 }), $[81] = contextValue, $[82] = t232, $[83] = t242) : t242 = $[83];
|
|
1782
|
+
let t252;
|
|
1783
|
+
return $[84] !== handleClick || $[85] !== id || $[86] !== itemKey || $[87] !== restProps || $[88] !== t212 || $[89] !== t222 || $[90] !== t242 ? (t252 = /* @__PURE__ */ jsxRuntime.jsxs(StyledTreeItem, { "data-selected": t212, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...restProps, onClick: handleClick, ref: setRootElement, role: "none", children: [
|
|
1784
|
+
t222,
|
|
1785
|
+
t242
|
|
1786
|
+
] }), $[84] = handleClick, $[85] = id, $[86] = itemKey, $[87] = restProps, $[88] = t212, $[89] = t222, $[90] = t242, $[91] = t252) : t252 = $[91], t252;
|
|
1787
|
+
}
|
|
1788
|
+
const t21 = selected ? "" : void 0;
|
|
1789
|
+
let t22;
|
|
1790
|
+
$[92] !== content2 || $[93] !== tree.level ? (t22 = /* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, as: "div", "data-ui": "TreeItem__box", children: content2 }), $[92] = content2, $[93] = tree.level, $[94] = t22) : t22 = $[94];
|
|
1791
|
+
let t23;
|
|
1792
|
+
$[95] !== children || $[96] !== expanded ? (t23 = children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { expanded, children }), $[95] = children, $[96] = expanded, $[97] = t23) : t23 = $[97];
|
|
1793
|
+
let t24;
|
|
1794
|
+
$[98] !== contextValue || $[99] !== t23 ? (t24 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t23 }), $[98] = contextValue, $[99] = t23, $[100] = t24) : t24 = $[100];
|
|
1795
|
+
let t25;
|
|
1796
|
+
return $[101] !== expanded || $[102] !== handleClick || $[103] !== handleKeyDown || $[104] !== id || $[105] !== itemKey || $[106] !== restProps || $[107] !== t21 || $[108] !== t22 || $[109] !== t24 || $[110] !== tabIndex ? (t25 = /* @__PURE__ */ jsxRuntime.jsxs(StyledTreeItem, { "data-selected": t21, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...restProps, "aria-expanded": expanded, onClick: handleClick, onKeyDown: handleKeyDown, ref: setRootElement, role: "treeitem", tabIndex, children: [
|
|
1797
|
+
t22,
|
|
1798
|
+
t24
|
|
1799
|
+
] }), $[101] = expanded, $[102] = handleClick, $[103] = handleKeyDown, $[104] = id, $[105] = itemKey, $[106] = restProps, $[107] = t21, $[108] = t22, $[109] = t24, $[110] = tabIndex, $[111] = t25) : t25 = $[111], t25;
|
|
1590
1800
|
});
|
|
1591
1801
|
TreeItem.displayName = "Memo(TreeItem)";
|
|
1592
1802
|
exports.Arrow = _visualEditing.Arrow;
|