@sanity/ui 2.3.6-canary.0 → 2.3.6-canary.2

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.
Files changed (44) hide show
  1. package/dist/index.compiled.mjs +1262 -1009
  2. package/dist/index.compiled.mjs.map +1 -1
  3. package/dist/index.d.mts +10 -0
  4. package/dist/index.d.ts +10 -0
  5. package/dist/index.esm.js +960 -979
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +965 -984
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +960 -979
  10. package/dist/index.mjs.map +1 -1
  11. package/package.json +2 -2
  12. package/src/core/components/autocomplete/autocomplete.tsx +2 -2
  13. package/src/core/components/breadcrumbs/breadcrumbs.tsx +3 -2
  14. package/src/core/components/dialog/dialog.tsx +19 -10
  15. package/src/core/components/hotkeys/hotkeys.tsx +3 -3
  16. package/src/core/components/menu/menuGroup.tsx +5 -4
  17. package/src/core/components/menu/menuItem.tsx +6 -4
  18. package/src/core/components/skeleton/skeleton.tsx +5 -11
  19. package/src/core/components/skeleton/textSkeleton.tsx +6 -7
  20. package/src/core/hooks/useArrayProp.ts +11 -10
  21. package/src/core/primitives/avatar/avatar.tsx +4 -4
  22. package/src/core/primitives/avatar/avatarCounter.tsx +2 -3
  23. package/src/core/primitives/avatar/avatarStack.tsx +2 -3
  24. package/src/core/primitives/badge/badge.tsx +7 -4
  25. package/src/core/primitives/box/box.tsx +53 -27
  26. package/src/core/primitives/button/button.tsx +11 -12
  27. package/src/core/primitives/card/card.tsx +17 -9
  28. package/src/core/primitives/code/code.tsx +4 -3
  29. package/src/core/primitives/container/container.tsx +4 -11
  30. package/src/core/primitives/flex/flex.tsx +13 -7
  31. package/src/core/primitives/grid/grid.tsx +19 -10
  32. package/src/core/primitives/heading/heading.tsx +7 -4
  33. package/src/core/primitives/inline/inline.tsx +3 -2
  34. package/src/core/primitives/kbd/kbd.tsx +4 -3
  35. package/src/core/primitives/label/label.tsx +7 -4
  36. package/src/core/primitives/popover/popover.tsx +7 -6
  37. package/src/core/primitives/select/select.tsx +12 -6
  38. package/src/core/primitives/stack/stack.tsx +4 -3
  39. package/src/core/primitives/text/text.tsx +7 -4
  40. package/src/core/primitives/textArea/textArea.tsx +12 -6
  41. package/src/core/primitives/textInput/textInput.tsx +6 -5
  42. package/src/core/primitives/tooltip/tooltip.tsx +6 -2
  43. package/src/core/theme/themeProvider.tsx +4 -6
  44. package/src/core/utils/layer/layerProvider.tsx +3 -2
@@ -1,9 +1,9 @@
1
1
  import { buildTheme, createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1, getTheme_v2, getScopedTheme } from "@sanity/ui/theme";
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
- import { c } from "react/compiler-runtime";
4
- import { useMemo, useState, useRef, useEffect, createContext, useContext, useSyncExternalStore, useImperativeHandle, forwardRef, useId, Children, isValidElement, cloneElement, useCallback, Component, memo, useReducer, Fragment as Fragment$1, startTransition } from "react";
5
- import ReactIs, { isValidElementType } from "react-is";
3
+ import { createContext, useContext, forwardRef, useMemo, useId, useState, useEffect, useCallback, Children, isValidElement, cloneElement, useRef, useSyncExternalStore, useImperativeHandle, Component, memo, useReducer, Fragment as Fragment$1, startTransition } from "react";
4
+ import { isValidElementType } from "react-is";
6
5
  import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, styled, keyframes } from "styled-components";
6
+ import { c } from "react/compiler-runtime";
7
7
  import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon, ToggleArrowRightIcon } from "@sanity/icons";
8
8
  import Refractor from "react-refractor";
9
9
  import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate } from "@floating-ui/react-dom";
@@ -151,657 +151,179 @@ function responsiveTextAlignStyle(props) {
151
151
  function responsiveTextFont(props) {
152
152
  return responsiveFont("text", props);
153
153
  }
154
- function useArrayProp(val, defaultVal) {
155
- const __perf_hash__ = useMemo(() => JSON.stringify(val != null ? val : defaultVal), [defaultVal, val]);
156
- return useMemo(
157
- () => _getArrayProp(val, defaultVal),
158
- // Improve performance: Keep object identify for a given hash of the value
159
- // eslint-disable-next-line react-hooks/exhaustive-deps
160
- [__perf_hash__]
161
- );
154
+ function getGlobalScope() {
155
+ if (typeof globalThis < "u") return globalThis;
156
+ if (typeof window < "u") return window;
157
+ if (typeof self < "u") return self;
158
+ if (typeof global < "u") return global;
159
+ throw new Error("@sanity/ui: could not locate global scope");
162
160
  }
163
- function _getElements(element, elementsArg) {
164
- const ret = [element];
165
- for (const el of elementsArg)
166
- Array.isArray(el) ? ret.push(...el) : ret.push(el);
167
- return ret.filter(Boolean);
161
+ const globalScope = getGlobalScope();
162
+ function createGlobalScopedContext(key2, defaultValue) {
163
+ return typeof document > "u" ? createContext(defaultValue) : (globalScope[key2] = globalScope[key2] || createContext(defaultValue), globalScope[key2]);
168
164
  }
169
- function useClickOutside(listener, t0, boundaryElement) {
170
- const $ = c(12), elementsArg = t0 === void 0 ? EMPTY_ARRAY : t0, [element, setElement] = useState(null);
171
- let t1;
172
- $[0] !== element || $[1] !== elementsArg ? (t1 = () => _getElements(element, elementsArg), $[0] = element, $[1] = elementsArg, $[2] = t1) : t1 = $[2];
173
- const [elements, setElements] = useState(t1), elementsRef = useRef(elements);
174
- let t2, t3;
175
- $[3] !== element || $[4] !== elementsArg ? (t2 = () => {
176
- const prevElements = elementsRef.current, nextElements = _getElements(element, elementsArg);
177
- if (prevElements.length !== nextElements.length) {
178
- setElements(nextElements), elementsRef.current = nextElements;
179
- return;
165
+ const key$8 = Symbol.for("@sanity/ui/context/theme"), ThemeContext = createGlobalScopedContext(key$8, null);
166
+ function ThemeProvider(props) {
167
+ var _a;
168
+ const $ = c(15), {
169
+ children
170
+ } = props, parentTheme = useContext(ThemeContext), scheme = (_a = props.scheme) != null ? _a : (parentTheme == null ? void 0 : parentTheme.scheme) || "light", rootTheme = (parentTheme == null ? void 0 : parentTheme.theme) || null, tone = (parentTheme == null ? void 0 : parentTheme.tone) || "default";
171
+ let t0;
172
+ bb0: {
173
+ if (!rootTheme) {
174
+ t0 = null;
175
+ break bb0;
180
176
  }
181
- for (const el of prevElements)
182
- if (!nextElements.includes(el)) {
183
- setElements(nextElements), elementsRef.current = nextElements;
184
- return;
185
- }
186
- for (const el_0 of nextElements)
187
- if (!prevElements.includes(el_0)) {
188
- setElements(nextElements), elementsRef.current = nextElements;
189
- return;
190
- }
191
- }, t3 = [element, elementsArg], $[3] = element, $[4] = elementsArg, $[5] = t2, $[6] = t3) : (t2 = $[5], t3 = $[6]), useEffect(t2, t3);
192
- let t4, t5;
193
- return $[7] !== listener || $[8] !== boundaryElement || $[9] !== elements ? (t4 = () => {
194
- if (!listener)
195
- return;
196
- const handleWindowMouseDown = (evt) => {
197
- const target = evt.target;
198
- if (target instanceof Node && !(boundaryElement && !boundaryElement.contains(target))) {
199
- for (const el_1 of elements)
200
- if (target === el_1 || el_1.contains(target))
201
- return;
202
- listener(evt);
203
- }
204
- };
205
- return window.addEventListener("mousedown", handleWindowMouseDown), () => {
206
- window.removeEventListener("mousedown", handleWindowMouseDown);
207
- };
208
- }, t5 = [boundaryElement, listener, elements], $[7] = listener, $[8] = boundaryElement, $[9] = elements, $[10] = t4, $[11] = t5) : (t4 = $[10], t5 = $[11]), useEffect(t4, t5), setElement;
209
- }
210
- var resizeObservers = [], hasActiveObservations = function() {
211
- return resizeObservers.some(function(ro) {
212
- return ro.activeTargets.length > 0;
213
- });
214
- }, hasSkippedObservations = function() {
215
- return resizeObservers.some(function(ro) {
216
- return ro.skippedTargets.length > 0;
217
- });
218
- }, msg = "ResizeObserver loop completed with undelivered notifications.", deliverResizeLoopError = function() {
219
- var event;
220
- typeof ErrorEvent == "function" ? event = new ErrorEvent("error", {
221
- message: msg
222
- }) : (event = document.createEvent("Event"), event.initEvent("error", !1, !1), event.message = msg), window.dispatchEvent(event);
223
- }, ResizeObserverBoxOptions;
224
- (function(ResizeObserverBoxOptions2) {
225
- ResizeObserverBoxOptions2.BORDER_BOX = "border-box", ResizeObserverBoxOptions2.CONTENT_BOX = "content-box", ResizeObserverBoxOptions2.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
226
- })(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));
227
- var freeze = function(obj) {
228
- return Object.freeze(obj);
229
- }, ResizeObserverSize = /* @__PURE__ */ function() {
230
- function ResizeObserverSize2(inlineSize, blockSize) {
231
- this.inlineSize = inlineSize, this.blockSize = blockSize, freeze(this);
232
- }
233
- return ResizeObserverSize2;
234
- }(), DOMRectReadOnly = function() {
235
- function DOMRectReadOnly2(x, y, width, height) {
236
- return this.x = x, this.y = y, this.width = width, this.height = height, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, freeze(this);
177
+ let t12;
178
+ $[0] !== rootTheme || $[1] !== scheme || $[2] !== tone ? (t12 = {
179
+ version: 0,
180
+ theme: rootTheme,
181
+ scheme,
182
+ tone
183
+ }, $[0] = rootTheme, $[1] = scheme, $[2] = tone, $[3] = t12) : t12 = $[3], t0 = t12;
237
184
  }
238
- return DOMRectReadOnly2.prototype.toJSON = function() {
239
- var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;
240
- return {
241
- x,
242
- y,
243
- top,
244
- right,
245
- bottom,
246
- left,
247
- width,
248
- height
249
- };
250
- }, DOMRectReadOnly2.fromRect = function(rectangle) {
251
- return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
252
- }, DOMRectReadOnly2;
253
- }(), isSVG = function(target) {
254
- return target instanceof SVGElement && "getBBox" in target;
255
- }, isHidden = function(target) {
256
- if (isSVG(target)) {
257
- var _a = target.getBBox(), width = _a.width, height = _a.height;
258
- return !width && !height;
185
+ const themeContext = t0;
186
+ let t1;
187
+ bb1: {
188
+ if (!rootTheme) {
189
+ t1 = null;
190
+ break bb1;
191
+ }
192
+ let t22;
193
+ $[4] !== rootTheme || $[5] !== scheme || $[6] !== tone ? (t22 = getScopedTheme(rootTheme, scheme, tone), $[4] = rootTheme, $[5] = scheme, $[6] = tone, $[7] = t22) : t22 = $[7], t1 = t22;
259
194
  }
260
- var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;
261
- return !(offsetWidth || offsetHeight || target.getClientRects().length);
262
- }, isElement = function(obj) {
263
- var _a;
264
- if (obj instanceof Element)
265
- return !0;
266
- var scope = (_a = obj == null ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
267
- return !!(scope && obj instanceof scope.Element);
268
- }, isReplacedElement = function(target) {
269
- switch (target.tagName) {
270
- case "INPUT":
271
- if (target.type !== "image")
272
- break;
273
- case "VIDEO":
274
- case "AUDIO":
275
- case "EMBED":
276
- case "OBJECT":
277
- case "CANVAS":
278
- case "IFRAME":
279
- case "IMG":
280
- return !0;
195
+ const theme = t1;
196
+ if (!theme) {
197
+ let t22;
198
+ return $[8] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsx("pre", { children: 'ThemeProvider: no "theme" property provided' }), $[8] = t22) : t22 = $[8], t22;
281
199
  }
282
- return !1;
283
- }, global$1 = typeof window < "u" ? window : {}, cache = /* @__PURE__ */ new WeakMap(), scrollRegexp = /auto|scroll/, verticalRegexp = /^tb|vertical/, IE = /msie|trident/i.test(global$1.navigator && global$1.navigator.userAgent), parseDimension = function(pixel) {
284
- return parseFloat(pixel || "0");
285
- }, size$1 = function(inlineSize, blockSize, switchSizes) {
286
- return inlineSize === void 0 && (inlineSize = 0), blockSize === void 0 && (blockSize = 0), switchSizes === void 0 && (switchSizes = !1), new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);
287
- }, zeroBoxes = freeze({
288
- devicePixelContentBoxSize: size$1(),
289
- borderBoxSize: size$1(),
290
- contentBoxSize: size$1(),
291
- contentRect: new DOMRectReadOnly(0, 0, 0, 0)
292
- }), calculateBoxSizes = function(target, forceRecalculation) {
293
- if (forceRecalculation === void 0 && (forceRecalculation = !1), cache.has(target) && !forceRecalculation)
294
- return cache.get(target);
295
- if (isHidden(target))
296
- return cache.set(target, zeroBoxes), zeroBoxes;
297
- var cs = getComputedStyle(target), svg = isSVG(target) && target.ownerSVGElement && target.getBBox(), removePadding = !IE && cs.boxSizing === "border-box", switchSizes = verticalRegexp.test(cs.writingMode || ""), canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || ""), canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || ""), paddingTop = svg ? 0 : parseDimension(cs.paddingTop), paddingRight = svg ? 0 : parseDimension(cs.paddingRight), paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom), paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft), borderTop2 = svg ? 0 : parseDimension(cs.borderTopWidth), borderRight2 = svg ? 0 : parseDimension(cs.borderRightWidth), borderBottom2 = svg ? 0 : parseDimension(cs.borderBottomWidth), borderLeft2 = svg ? 0 : parseDimension(cs.borderLeftWidth), horizontalPadding = paddingLeft + paddingRight, verticalPadding = paddingTop + paddingBottom, horizontalBorderArea = borderLeft2 + borderRight2, verticalBorderArea = borderTop2 + borderBottom2, horizontalScrollbarThickness = canScrollHorizontally ? target.offsetHeight - verticalBorderArea - target.clientHeight : 0, verticalScrollbarThickness = canScrollVertically ? target.offsetWidth - horizontalBorderArea - target.clientWidth : 0, widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0, heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0, contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness, contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness, borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea, borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea, boxes = freeze({
298
- devicePixelContentBoxSize: size$1(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),
299
- borderBoxSize: size$1(borderBoxWidth, borderBoxHeight, switchSizes),
300
- contentBoxSize: size$1(contentWidth, contentHeight, switchSizes),
301
- contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)
200
+ let t2;
201
+ $[9] !== theme || $[10] !== children ? (t2 = /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children }), $[9] = theme, $[10] = children, $[11] = t2) : t2 = $[11];
202
+ let t3;
203
+ return $[12] !== themeContext || $[13] !== t2 ? (t3 = /* @__PURE__ */ jsx(ThemeContext.Provider, { value: themeContext, children: t2 }), $[12] = themeContext, $[13] = t2, $[14] = t3) : t3 = $[14], t3;
204
+ }
205
+ function useRootTheme() {
206
+ const value = useContext(ThemeContext);
207
+ if (!value)
208
+ throw new Error("useRootTheme(): missing context value");
209
+ return value;
210
+ }
211
+ function ThemeColorProvider(props) {
212
+ const $ = c(5), {
213
+ children,
214
+ scheme,
215
+ tone
216
+ } = props, root = useRootTheme(), t0 = scheme || root.scheme;
217
+ let t1;
218
+ return $[0] !== t0 || $[1] !== root.theme || $[2] !== tone || $[3] !== children ? (t1 = /* @__PURE__ */ jsx(ThemeProvider, { scheme: t0, theme: root.theme, tone, children }), $[0] = t0, $[1] = root.theme, $[2] = tone, $[3] = children, $[4] = t1) : t1 = $[4], t1;
219
+ }
220
+ function useTheme() {
221
+ return useTheme$1();
222
+ }
223
+ function useTheme_v2() {
224
+ const $ = c(2), t0 = useTheme$1();
225
+ let t1;
226
+ return $[0] !== t0 ? (t1 = getTheme_v2(t0), $[0] = t0, $[1] = t1) : t1 = $[1], t1;
227
+ }
228
+ function responsiveBorderStyle() {
229
+ return [border, borderTop, borderRight, borderBottom, borderLeft];
230
+ }
231
+ function border(props) {
232
+ var _a, _b;
233
+ const {
234
+ card,
235
+ media
236
+ } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
237
+ return _responsive(media, props.$border, (value) => value ? {
238
+ "&&": {
239
+ border: borderStyle
240
+ }
241
+ } : {
242
+ "&&": {
243
+ border: 0
244
+ }
302
245
  });
303
- return cache.set(target, boxes), boxes;
304
- }, calculateBoxSize = function(target, observedBox, forceRecalculation) {
305
- var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;
306
- switch (observedBox) {
307
- case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:
308
- return devicePixelContentBoxSize;
309
- case ResizeObserverBoxOptions.BORDER_BOX:
310
- return borderBoxSize;
311
- default:
312
- return contentBoxSize;
313
- }
314
- }, ResizeObserverEntry = /* @__PURE__ */ function() {
315
- function ResizeObserverEntry2(target) {
316
- var boxes = calculateBoxSizes(target);
317
- this.target = target, this.contentRect = boxes.contentRect, this.borderBoxSize = freeze([boxes.borderBoxSize]), this.contentBoxSize = freeze([boxes.contentBoxSize]), this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);
318
- }
319
- return ResizeObserverEntry2;
320
- }(), calculateDepthForNode = function(node) {
321
- if (isHidden(node))
322
- return 1 / 0;
323
- for (var depth = 0, parent = node.parentNode; parent; )
324
- depth += 1, parent = parent.parentNode;
325
- return depth;
326
- }, broadcastActiveObservations = function() {
327
- var shallowestDepth = 1 / 0, callbacks2 = [];
328
- resizeObservers.forEach(function(ro) {
329
- if (ro.activeTargets.length !== 0) {
330
- var entries = [];
331
- ro.activeTargets.forEach(function(ot) {
332
- var entry = new ResizeObserverEntry(ot.target), targetDepth = calculateDepthForNode(ot.target);
333
- entries.push(entry), ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox), targetDepth < shallowestDepth && (shallowestDepth = targetDepth);
334
- }), callbacks2.push(function() {
335
- ro.callback.call(ro.observer, entries, ro.observer);
336
- }), ro.activeTargets.splice(0, ro.activeTargets.length);
246
+ }
247
+ function borderTop(props) {
248
+ var _a, _b;
249
+ const {
250
+ card,
251
+ media
252
+ } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
253
+ return _responsive(media, props.$borderTop, (value) => value ? {
254
+ "&&": {
255
+ borderTop: borderStyle
256
+ }
257
+ } : {
258
+ "&&": {
259
+ borderTop: 0
337
260
  }
338
261
  });
339
- for (var _i = 0, callbacks_1 = callbacks2; _i < callbacks_1.length; _i++) {
340
- var callback = callbacks_1[_i];
341
- callback();
342
- }
343
- return shallowestDepth;
344
- }, gatherActiveObservationsAtDepth = function(depth) {
345
- resizeObservers.forEach(function(ro) {
346
- ro.activeTargets.splice(0, ro.activeTargets.length), ro.skippedTargets.splice(0, ro.skippedTargets.length), ro.observationTargets.forEach(function(ot) {
347
- ot.isActive() && (calculateDepthForNode(ot.target) > depth ? ro.activeTargets.push(ot) : ro.skippedTargets.push(ot));
348
- });
349
- });
350
- }, process = function() {
351
- var depth = 0;
352
- for (gatherActiveObservationsAtDepth(depth); hasActiveObservations(); )
353
- depth = broadcastActiveObservations(), gatherActiveObservationsAtDepth(depth);
354
- return hasSkippedObservations() && deliverResizeLoopError(), depth > 0;
355
- }, trigger, callbacks = [], notify = function() {
356
- return callbacks.splice(0).forEach(function(cb) {
357
- return cb();
358
- });
359
- }, queueMicroTask = function(callback) {
360
- if (!trigger) {
361
- var toggle_1 = 0, el_1 = document.createTextNode(""), config = {
362
- characterData: !0
363
- };
364
- new MutationObserver(function() {
365
- return notify();
366
- }).observe(el_1, config), trigger = function() {
367
- el_1.textContent = "".concat(toggle_1 ? toggle_1-- : toggle_1++);
368
- };
369
- }
370
- callbacks.push(callback), trigger();
371
- }, queueResizeObserver = function(cb) {
372
- queueMicroTask(function() {
373
- requestAnimationFrame(cb);
374
- });
375
- }, watching = 0, isWatching = function() {
376
- return !!watching;
377
- }, CATCH_PERIOD = 250, observerConfig = {
378
- attributes: !0,
379
- characterData: !0,
380
- childList: !0,
381
- subtree: !0
382
- }, events = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], time = function(timeout) {
383
- return timeout === void 0 && (timeout = 0), Date.now() + timeout;
384
- }, scheduled = !1, Scheduler = function() {
385
- function Scheduler2() {
386
- var _this = this;
387
- this.stopped = !0, this.listener = function() {
388
- return _this.schedule();
389
- };
390
- }
391
- return Scheduler2.prototype.run = function(timeout) {
392
- var _this = this;
393
- if (timeout === void 0 && (timeout = CATCH_PERIOD), !scheduled) {
394
- scheduled = !0;
395
- var until = time(timeout);
396
- queueResizeObserver(function() {
397
- var elementsHaveResized = !1;
398
- try {
399
- elementsHaveResized = process();
400
- } finally {
401
- if (scheduled = !1, timeout = until - time(), !isWatching())
402
- return;
403
- elementsHaveResized ? _this.run(1e3) : timeout > 0 ? _this.run(timeout) : _this.start();
404
- }
405
- });
262
+ }
263
+ function borderRight(props) {
264
+ var _a, _b;
265
+ const {
266
+ card,
267
+ media
268
+ } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
269
+ return _responsive(media, props.$borderRight, (value) => value ? {
270
+ "&&": {
271
+ borderRight: borderStyle
406
272
  }
407
- }, Scheduler2.prototype.schedule = function() {
408
- this.stop(), this.run();
409
- }, Scheduler2.prototype.observe = function() {
410
- var _this = this, cb = function() {
411
- return _this.observer && _this.observer.observe(document.body, observerConfig);
412
- };
413
- document.body ? cb() : global$1.addEventListener("DOMContentLoaded", cb);
414
- }, Scheduler2.prototype.start = function() {
415
- var _this = this;
416
- this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), events.forEach(function(name) {
417
- return global$1.addEventListener(name, _this.listener, !0);
418
- }));
419
- }, Scheduler2.prototype.stop = function() {
420
- var _this = this;
421
- this.stopped || (this.observer && this.observer.disconnect(), events.forEach(function(name) {
422
- return global$1.removeEventListener(name, _this.listener, !0);
423
- }), this.stopped = !0);
424
- }, Scheduler2;
425
- }(), scheduler = new Scheduler(), updateCount = function(n) {
426
- !watching && n > 0 && scheduler.start(), watching += n, !watching && scheduler.stop();
427
- }, skipNotifyOnElement = function(target) {
428
- return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === "inline";
429
- }, ResizeObservation = function() {
430
- function ResizeObservation2(target, observedBox) {
431
- this.target = target, this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX, this.lastReportedSize = {
432
- inlineSize: 0,
433
- blockSize: 0
434
- };
435
- }
436
- return ResizeObservation2.prototype.isActive = function() {
437
- var size2 = calculateBoxSize(this.target, this.observedBox, !0);
438
- return skipNotifyOnElement(this.target) && (this.lastReportedSize = size2), this.lastReportedSize.inlineSize !== size2.inlineSize || this.lastReportedSize.blockSize !== size2.blockSize;
439
- }, ResizeObservation2;
440
- }(), ResizeObserverDetail = /* @__PURE__ */ function() {
441
- function ResizeObserverDetail2(resizeObserver, callback) {
442
- this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = resizeObserver, this.callback = callback;
443
- }
444
- return ResizeObserverDetail2;
445
- }(), observerMap = /* @__PURE__ */ new WeakMap(), getObservationIndex = function(observationTargets, target) {
446
- for (var i = 0; i < observationTargets.length; i += 1)
447
- if (observationTargets[i].target === target)
448
- return i;
449
- return -1;
450
- }, ResizeObserverController = function() {
451
- function ResizeObserverController2() {
452
- }
453
- return ResizeObserverController2.connect = function(resizeObserver, callback) {
454
- var detail = new ResizeObserverDetail(resizeObserver, callback);
455
- observerMap.set(resizeObserver, detail);
456
- }, ResizeObserverController2.observe = function(resizeObserver, target, options) {
457
- var detail = observerMap.get(resizeObserver), firstObservation = detail.observationTargets.length === 0;
458
- getObservationIndex(detail.observationTargets, target) < 0 && (firstObservation && resizeObservers.push(detail), detail.observationTargets.push(new ResizeObservation(target, options && options.box)), updateCount(1), scheduler.schedule());
459
- }, ResizeObserverController2.unobserve = function(resizeObserver, target) {
460
- var detail = observerMap.get(resizeObserver), index = getObservationIndex(detail.observationTargets, target), lastObservation = detail.observationTargets.length === 1;
461
- index >= 0 && (lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1), detail.observationTargets.splice(index, 1), updateCount(-1));
462
- }, ResizeObserverController2.disconnect = function(resizeObserver) {
463
- var _this = this, detail = observerMap.get(resizeObserver);
464
- detail.observationTargets.slice().forEach(function(ot) {
465
- return _this.unobserve(resizeObserver, ot.target);
466
- }), detail.activeTargets.splice(0, detail.activeTargets.length);
467
- }, ResizeObserverController2;
468
- }(), ResizeObserver = function() {
469
- function ResizeObserver2(callback) {
470
- if (arguments.length === 0)
471
- throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
472
- if (typeof callback != "function")
473
- throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
474
- ResizeObserverController.connect(this, callback);
475
- }
476
- return ResizeObserver2.prototype.observe = function(target, options) {
477
- if (arguments.length === 0)
478
- throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
479
- if (!isElement(target))
480
- throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
481
- ResizeObserverController.observe(this, target, options);
482
- }, ResizeObserver2.prototype.unobserve = function(target) {
483
- if (arguments.length === 0)
484
- throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
485
- if (!isElement(target))
486
- throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
487
- ResizeObserverController.unobserve(this, target);
488
- }, ResizeObserver2.prototype.disconnect = function() {
489
- ResizeObserverController.disconnect(this);
490
- }, ResizeObserver2.toString = function() {
491
- return "function ResizeObserver () { [polyfill code] }";
492
- }, ResizeObserver2;
493
- }();
494
- const _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver, _elementSizeObserver = _createElementSizeObserver();
495
- function _createElementRectValueListener() {
496
- return {
497
- subscribe(element, subscriber) {
498
- const resizeObserver = new _ResizeObserver(([entry]) => {
499
- subscriber({
500
- _contentRect: entry.contentRect,
501
- border: {
502
- width: entry.borderBoxSize[0].inlineSize,
503
- height: entry.borderBoxSize[0].blockSize
504
- },
505
- content: {
506
- width: entry.contentRect.width,
507
- height: entry.contentRect.height
508
- }
509
- });
510
- });
511
- return resizeObserver.observe(element), () => {
512
- resizeObserver.unobserve(element), resizeObserver.disconnect();
513
- };
273
+ } : {
274
+ "&&": {
275
+ borderRight: 0
514
276
  }
515
- };
277
+ });
516
278
  }
517
- function _createElementSizeObserver() {
518
- const disposeCache = /* @__PURE__ */ new WeakMap(), subscribersCache = /* @__PURE__ */ new WeakMap();
519
- return {
520
- subscribe(element, subscriber) {
521
- const subscribers = subscribersCache.get(element) || [];
522
- let dispose = disposeCache.get(element);
523
- return subscribersCache.has(element) || (subscribersCache.set(element, subscribers), dispose = _createElementRectValueListener().subscribe(element, (elementRect) => {
524
- for (const sub of subscribers)
525
- sub(elementRect);
526
- })), subscribers.push(subscriber), () => {
527
- const idx = subscribers.indexOf(subscriber);
528
- idx > -1 && subscribers.splice(idx, 1), subscribers.length === 0 && dispose && dispose();
529
- };
279
+ function borderBottom(props) {
280
+ var _a, _b;
281
+ const {
282
+ card,
283
+ media
284
+ } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
285
+ return _responsive(media, props.$borderBottom, (value) => value ? {
286
+ "&&": {
287
+ borderBottom: borderStyle
530
288
  }
531
- };
289
+ } : {
290
+ "&&": {
291
+ borderBottom: 0
292
+ }
293
+ });
532
294
  }
533
- function useElementSize(element) {
534
- const $ = c(3), [size2, setSize] = useState(null);
535
- let t0, t1;
536
- return $[0] !== element ? (t0 = () => {
537
- if (element)
538
- return _elementSizeObserver.subscribe(element, setSize);
539
- }, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1), size2;
295
+ function borderLeft(props) {
296
+ var _a, _b;
297
+ const {
298
+ card,
299
+ media
300
+ } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
301
+ return _responsive(media, props.$borderLeft, (value) => value ? {
302
+ "&&": {
303
+ borderLeft: borderStyle
304
+ }
305
+ } : {
306
+ "&&": {
307
+ borderLeft: 0
308
+ }
309
+ });
540
310
  }
541
- function useElementRect(element) {
542
- const elementSize = useElementSize(element);
543
- return (elementSize == null ? void 0 : elementSize._contentRect) || null;
311
+ const BASE_STYLE$4 = {
312
+ '&[data-as="ul"],&[data-as="ol"]': {
313
+ listStyle: "none"
314
+ }
315
+ }, BOX_SIZING = {
316
+ content: "content-box",
317
+ border: "border-box"
318
+ }, BOX_HEIGHT = {
319
+ stretch: "stretch",
320
+ fill: "100%"
321
+ };
322
+ function boxStyle() {
323
+ return BASE_STYLE$4;
544
324
  }
545
- function useGlobalKeyDown(onKeyDown) {
546
- const $ = c(3);
547
- let t0, t1;
548
- return $[0] !== onKeyDown ? (t0 = () => (addEventListener("keydown", onKeyDown), () => removeEventListener("keydown", onKeyDown)), t1 = [onKeyDown], $[0] = onKeyDown, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1);
549
- }
550
- function getGlobalScope() {
551
- if (typeof globalThis < "u") return globalThis;
552
- if (typeof window < "u") return window;
553
- if (typeof self < "u") return self;
554
- if (typeof global < "u") return global;
555
- throw new Error("@sanity/ui: could not locate global scope");
556
- }
557
- const globalScope = getGlobalScope();
558
- function createGlobalScopedContext(key2, defaultValue) {
559
- return typeof document > "u" ? createContext(defaultValue) : (globalScope[key2] = globalScope[key2] || createContext(defaultValue), globalScope[key2]);
560
- }
561
- const key$8 = Symbol.for("@sanity/ui/context/theme"), ThemeContext = createGlobalScopedContext(key$8, null);
562
- function ThemeProvider(props) {
563
- const parentTheme = useContext(ThemeContext), {
564
- children,
565
- scheme = (parentTheme == null ? void 0 : parentTheme.scheme) || "light",
566
- theme: rootTheme = (parentTheme == null ? void 0 : parentTheme.theme) || null,
567
- tone = (parentTheme == null ? void 0 : parentTheme.tone) || "default"
568
- } = props, themeContext = useMemo(() => rootTheme ? {
569
- version: 0,
570
- theme: rootTheme,
571
- scheme,
572
- tone
573
- } : null, [rootTheme, scheme, tone]), theme = useMemo(() => rootTheme ? getScopedTheme(rootTheme, scheme, tone) : null, [scheme, rootTheme, tone]);
574
- return theme ? /* @__PURE__ */ jsx(ThemeContext.Provider, { value: themeContext, children: /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children }) }) : /* @__PURE__ */ jsx("pre", { children: 'ThemeProvider: no "theme" property provided' });
575
- }
576
- function useRootTheme() {
577
- const value = useContext(ThemeContext);
578
- if (!value)
579
- throw new Error("useRootTheme(): missing context value");
580
- return value;
581
- }
582
- function ThemeColorProvider(props) {
583
- const $ = c(5), {
584
- children,
585
- scheme,
586
- tone
587
- } = props, root = useRootTheme(), t0 = scheme || root.scheme;
588
- let t1;
589
- return $[0] !== t0 || $[1] !== root.theme || $[2] !== tone || $[3] !== children ? (t1 = /* @__PURE__ */ jsx(ThemeProvider, { scheme: t0, theme: root.theme, tone, children }), $[0] = t0, $[1] = root.theme, $[2] = tone, $[3] = children, $[4] = t1) : t1 = $[4], t1;
590
- }
591
- function useTheme() {
592
- return useTheme$1();
593
- }
594
- function useTheme_v2() {
595
- const $ = c(2), t0 = useTheme$1();
596
- let t1;
597
- return $[0] !== t0 ? (t1 = getTheme_v2(t0), $[0] = t0, $[1] = t1) : t1 = $[1], t1;
598
- }
599
- const MEDIA_STORE_CACHE = /* @__PURE__ */ new WeakMap();
600
- function _getMediaQuery(media, index) {
601
- return index === 0 ? `screen and (max-width: ${media[index] - 1}px)` : index === media.length ? `screen and (min-width: ${media[index - 1]}px)` : `screen and (min-width: ${media[index - 1]}px) and (max-width: ${media[index] - 1}px)`;
602
- }
603
- function _createMediaStore(media) {
604
- const mediaLen = media.length;
605
- let sizes;
606
- const getSizes = () => {
607
- if (!sizes) {
608
- sizes = [];
609
- for (let index = mediaLen; index > -1; index -= 1) {
610
- const mediaQuery = _getMediaQuery(media, index);
611
- sizes.push({
612
- index,
613
- mq: window.matchMedia(mediaQuery)
614
- });
615
- }
616
- }
617
- return sizes;
618
- };
619
- return {
620
- getSnapshot: () => {
621
- for (const {
622
- index,
623
- mq
624
- } of getSizes())
625
- if (mq.matches) return index;
626
- return 0;
627
- },
628
- subscribe: (onStoreChange) => {
629
- const disposeFns = [];
630
- for (const {
631
- mq
632
- } of getSizes()) {
633
- const handleChange = () => {
634
- mq.matches && onStoreChange();
635
- };
636
- mq.addEventListener("change", handleChange), disposeFns.push(() => mq.removeEventListener("change", handleChange));
637
- }
638
- return () => {
639
- for (const disposeFn of disposeFns)
640
- disposeFn();
641
- };
642
- }
643
- };
644
- }
645
- function getServerSnapshot$2() {
646
- return 0;
647
- }
648
- function useMediaIndex() {
649
- const $ = c(4), {
650
- media
651
- } = useTheme_v2();
652
- let t0;
653
- $[0] !== media ? (t0 = MEDIA_STORE_CACHE.get(media), $[0] = media, $[1] = t0) : t0 = $[1];
654
- let store = t0;
655
- return store || ($[2] !== media ? (store = _createMediaStore(media), MEDIA_STORE_CACHE.set(media, store), $[2] = media, $[3] = store) : store = $[3]), useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot$2);
656
- }
657
- let MEDIA_QUERY_CACHE$1;
658
- function getMatchMedia$1() {
659
- return MEDIA_QUERY_CACHE$1 || (MEDIA_QUERY_CACHE$1 = window.matchMedia("(prefers-color-scheme: dark)")), MEDIA_QUERY_CACHE$1;
660
- }
661
- function subscribe$2(onStoreChange) {
662
- const matchMedia = getMatchMedia$1();
663
- return matchMedia.addEventListener("change", onStoreChange), () => matchMedia.removeEventListener("change", onStoreChange);
664
- }
665
- function getSnapshot$1() {
666
- return getMatchMedia$1().matches;
667
- }
668
- function getServerSnapshot$1() {
669
- return !1;
670
- }
671
- function usePrefersDark() {
672
- return useSyncExternalStore(subscribe$2, getSnapshot$1, getServerSnapshot$1);
673
- }
674
- let MEDIA_QUERY_CACHE;
675
- function getMatchMedia() {
676
- return MEDIA_QUERY_CACHE || (MEDIA_QUERY_CACHE = window.matchMedia("(prefers-reduced-motion: reduce)")), MEDIA_QUERY_CACHE;
677
- }
678
- function subscribe$1(onStoreChange) {
679
- const matchMedia = getMatchMedia();
680
- return matchMedia.addEventListener("change", onStoreChange), () => matchMedia.removeEventListener("change", onStoreChange);
681
- }
682
- function getSnapshot() {
683
- return getMatchMedia().matches;
684
- }
685
- function getServerSnapshot() {
686
- return !1;
687
- }
688
- function usePrefersReducedMotion() {
689
- return useSyncExternalStore(subscribe$1, getSnapshot, getServerSnapshot);
690
- }
691
- function useForwardedRef(ref) {
692
- const $ = c(1), innerRef = useRef(null);
693
- let t0;
694
- return $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => innerRef.current, $[0] = t0) : t0 = $[0], useImperativeHandle(ref, t0), innerRef;
695
- }
696
- function useCustomValidity(ref, customValidity) {
697
- const $ = c(6);
698
- let t0;
699
- $[0] !== ref.current || $[1] !== customValidity ? (t0 = () => {
700
- var _a;
701
- (_a = ref.current) == null || _a.setCustomValidity(customValidity || "");
702
- }, $[0] = ref.current, $[1] = customValidity, $[2] = t0) : t0 = $[2];
703
- let t1;
704
- $[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], useEffect(t0, t1);
705
- }
706
- function responsiveBorderStyle() {
707
- return [border, borderTop, borderRight, borderBottom, borderLeft];
708
- }
709
- function border(props) {
710
- var _a, _b;
711
- const {
712
- card,
713
- media
714
- } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
715
- return _responsive(media, props.$border, (value) => value ? {
716
- "&&": {
717
- border: borderStyle
718
- }
719
- } : {
720
- "&&": {
721
- border: 0
722
- }
723
- });
724
- }
725
- function borderTop(props) {
726
- var _a, _b;
727
- const {
728
- card,
729
- media
730
- } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
731
- return _responsive(media, props.$borderTop, (value) => value ? {
732
- "&&": {
733
- borderTop: borderStyle
734
- }
735
- } : {
736
- "&&": {
737
- borderTop: 0
738
- }
739
- });
740
- }
741
- function borderRight(props) {
742
- var _a, _b;
743
- const {
744
- card,
745
- media
746
- } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
747
- return _responsive(media, props.$borderRight, (value) => value ? {
748
- "&&": {
749
- borderRight: borderStyle
750
- }
751
- } : {
752
- "&&": {
753
- borderRight: 0
754
- }
755
- });
756
- }
757
- function borderBottom(props) {
758
- var _a, _b;
759
- const {
760
- card,
761
- media
762
- } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
763
- return _responsive(media, props.$borderBottom, (value) => value ? {
764
- "&&": {
765
- borderBottom: borderStyle
766
- }
767
- } : {
768
- "&&": {
769
- borderBottom: 0
770
- }
771
- });
772
- }
773
- function borderLeft(props) {
774
- var _a, _b;
775
- const {
776
- card,
777
- media
778
- } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
779
- return _responsive(media, props.$borderLeft, (value) => value ? {
780
- "&&": {
781
- borderLeft: borderStyle
782
- }
783
- } : {
784
- "&&": {
785
- borderLeft: 0
786
- }
787
- });
788
- }
789
- const BASE_STYLE$4 = {
790
- '&[data-as="ul"],&[data-as="ol"]': {
791
- listStyle: "none"
792
- }
793
- }, BOX_SIZING = {
794
- content: "content-box",
795
- border: "border-box"
796
- }, BOX_HEIGHT = {
797
- stretch: "stretch",
798
- fill: "100%"
799
- };
800
- function boxStyle() {
801
- return BASE_STYLE$4;
802
- }
803
- function responsiveBoxStyle() {
804
- return [responsiveBoxSizingStyle, responsiveBoxHeightStyle, responsiveBoxOverflowStyle, responsiveBoxDisplayStyle];
325
+ function responsiveBoxStyle() {
326
+ return [responsiveBoxSizingStyle, responsiveBoxHeightStyle, responsiveBoxOverflowStyle, responsiveBoxDisplayStyle];
805
327
  }
806
328
  function responsiveBoxDisplayStyle(props) {
807
329
  const {
@@ -1420,8 +942,8 @@ const Root$C = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBa
1420
942
  overflow: hidden;
1421
943
  overflow: clip;
1422
944
  `, Label = forwardRef(function(props, ref) {
1423
- const $ = c(22);
1424
- let t0, t1, childrenProp, textOverflow, align, restProps, accent, weight;
945
+ const $ = c(26);
946
+ let t0, t1, align, childrenProp, textOverflow, restProps, accent, weight;
1425
947
  $[0] !== props ? ({
1426
948
  accent,
1427
949
  align,
@@ -1431,19 +953,24 @@ const Root$C = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBa
1431
953
  textOverflow,
1432
954
  weight,
1433
955
  ...restProps
1434
- } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = childrenProp, $[4] = textOverflow, $[5] = align, $[6] = restProps, $[7] = accent, $[8] = weight) : (t0 = $[1], t1 = $[2], childrenProp = $[3], textOverflow = $[4], align = $[5], restProps = $[6], accent = $[7], weight = $[8]);
956
+ } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = align, $[4] = childrenProp, $[5] = textOverflow, $[6] = restProps, $[7] = accent, $[8] = weight) : (t0 = $[1], t1 = $[2], align = $[3], childrenProp = $[4], textOverflow = $[5], restProps = $[6], accent = $[7], weight = $[8]);
1435
957
  const muted = t0 === void 0 ? !1 : t0, size2 = t1 === void 0 ? 2 : t1;
958
+ let t2, t3;
959
+ $[9] !== size2 ? (t3 = _getArrayProp(size2), $[9] = size2, $[10] = t3) : t3 = $[10], t2 = t3;
960
+ const $size = t2;
961
+ let t4, t5;
962
+ $[11] !== align ? (t5 = _getArrayProp(align), $[11] = align, $[12] = t5) : t5 = $[12], t4 = t5;
963
+ const $align = t4;
1436
964
  let children = childrenProp;
1437
965
  if (textOverflow === "ellipsis") {
1438
- let t22;
1439
- $[9] !== children ? (t22 = /* @__PURE__ */ jsx(SpanWithTextOverflow$2, { children }), $[9] = children, $[10] = t22) : t22 = $[10], children = t22;
966
+ let t62;
967
+ $[13] !== children ? (t62 = /* @__PURE__ */ jsx(SpanWithTextOverflow$2, { children }), $[13] = children, $[14] = t62) : t62 = $[14], children = t62;
1440
968
  } else {
1441
- let t22;
1442
- $[11] !== children ? (t22 = /* @__PURE__ */ jsx("span", { children }), $[11] = children, $[12] = t22) : t22 = $[12], children = t22;
969
+ let t62;
970
+ $[15] !== children ? (t62 = /* @__PURE__ */ jsx("span", { children }), $[15] = children, $[16] = t62) : t62 = $[16], children = t62;
1443
971
  }
1444
- const t2 = useArrayProp(align), t3 = useArrayProp(size2);
1445
- let t4;
1446
- return $[13] !== restProps || $[14] !== accent || $[15] !== t2 || $[16] !== muted || $[17] !== t3 || $[18] !== weight || $[19] !== ref || $[20] !== children ? (t4 = /* @__PURE__ */ jsx(Root$C, { "data-ui": "Label", ...restProps, $accent: accent, $align: t2, $muted: muted, $size: t3, $weight: weight, ref, children }), $[13] = restProps, $[14] = accent, $[15] = t2, $[16] = muted, $[17] = t3, $[18] = weight, $[19] = ref, $[20] = children, $[21] = t4) : t4 = $[21], t4;
972
+ let t6;
973
+ return $[17] !== restProps || $[18] !== accent || $[19] !== $align || $[20] !== $size || $[21] !== muted || $[22] !== weight || $[23] !== ref || $[24] !== children ? (t6 = /* @__PURE__ */ jsx(Root$C, { "data-ui": "Label", ...restProps, $accent: accent, $align, $size, $muted: muted, $weight: weight, ref, children }), $[17] = restProps, $[18] = accent, $[19] = $align, $[20] = $size, $[21] = muted, $[22] = weight, $[23] = ref, $[24] = children, $[25] = t6) : t6 = $[25], t6;
1447
974
  }), avatarStyle = {
1448
975
  root: avatarRootStyle,
1449
976
  arrow: avatarArrowStyle,
@@ -1590,66 +1117,50 @@ function avatarStrokeStyle() {
1590
1117
  const Root$B = styled.div(responsiveAvatarSizeStyle, avatarStyle.root), Arrow$1 = styled.div(avatarStyle.arrow), BgStroke = styled.ellipse(avatarStyle.bgStroke), Stroke = styled.ellipse(avatarStyle.stroke), Initials = styled.div(avatarStyle.initials), InitialsLabel = styled(Label)({
1591
1118
  color: "inherit"
1592
1119
  }), Image = styled.svg(avatarStyle.image), Avatar = forwardRef(function(props, ref) {
1593
- const $ = c(53);
1594
- let t0, t1, t2, asProp, animateArrowFrom, arrowPositionProp, src, onImageLoadError, __unstable_hideInnerStroke, initials, restProps, title;
1595
- $[0] !== props ? ({
1120
+ const {
1596
1121
  __unstable_hideInnerStroke,
1597
1122
  as: asProp,
1598
- color: t0,
1123
+ color = "gray",
1599
1124
  src,
1600
1125
  title,
1601
1126
  initials,
1602
1127
  onImageLoadError,
1603
1128
  arrowPosition: arrowPositionProp,
1604
1129
  animateArrowFrom,
1605
- status: t1,
1606
- size: t2,
1130
+ status = "online",
1131
+ size: sizeProp = 1,
1607
1132
  ...restProps
1608
- } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = asProp, $[5] = animateArrowFrom, $[6] = arrowPositionProp, $[7] = src, $[8] = onImageLoadError, $[9] = __unstable_hideInnerStroke, $[10] = initials, $[11] = restProps, $[12] = title) : (t0 = $[1], t1 = $[2], t2 = $[3], asProp = $[4], animateArrowFrom = $[5], arrowPositionProp = $[6], src = $[7], onImageLoadError = $[8], __unstable_hideInnerStroke = $[9], initials = $[10], restProps = $[11], title = $[12]);
1609
- const color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, {
1133
+ } = props, {
1610
1134
  avatar
1611
- } = useTheme_v2(), as = ReactIs.isValidElementType(asProp) ? asProp : "div", size2 = useArrayProp(sizeProp), _sizeRem = (avatar.sizes[size2[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = useId(), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = useState(!1), imageId = `avatar-image-${elementId}`;
1612
- let t3, t4;
1613
- $[13] !== arrowPosition || $[14] !== arrowPositionProp ? (t3 = () => {
1614
- if (arrowPosition === arrowPositionProp)
1615
- return;
1135
+ } = useTheme_v2(), as = isValidElementType(asProp) ? asProp : "div", size2 = useMemo(() => _getArrayProp(sizeProp), [sizeProp]), _sizeRem = (avatar.sizes[size2[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = useId(), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = useState(!1), imageId = `avatar-image-${elementId}`;
1136
+ useEffect(() => {
1137
+ if (arrowPosition === arrowPositionProp) return;
1616
1138
  const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
1617
1139
  return () => cancelAnimationFrame(raf);
1618
- }, t4 = [arrowPosition, arrowPositionProp], $[13] = arrowPosition, $[14] = arrowPositionProp, $[15] = t3, $[16] = t4) : (t3 = $[15], t4 = $[16]), useEffect(t3, t4);
1619
- let t5, t6;
1620
- $[17] !== src ? (t5 = () => {
1140
+ }, [arrowPosition, arrowPositionProp]), useEffect(() => {
1621
1141
  src && setImageFailed(!1);
1622
- }, t6 = [src], $[17] = src, $[18] = t5, $[19] = t6) : (t5 = $[18], t6 = $[19]), useEffect(t5, t6);
1623
- let t7;
1624
- $[20] !== onImageLoadError ? (t7 = () => {
1142
+ }, [src]);
1143
+ const handleImageError = useCallback(() => {
1625
1144
  setImageFailed(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
1626
- }, $[20] = onImageLoadError, $[21] = t7) : t7 = $[21];
1627
- const handleImageError = t7;
1628
- let t8, t9;
1629
- if ($[22] !== size2) {
1630
- let t102;
1631
- $[24] === Symbol.for("react.memo_cache_sentinel") ? (t102 = (s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0, $[24] = t102) : t102 = $[24], t9 = size2.map(t102), $[22] = size2, $[23] = t9;
1632
- } else
1633
- t9 = $[23];
1634
- t8 = t9;
1635
- const initialsSize = t8, t10 = typeof as == "string" ? as : void 0;
1636
- let t11;
1637
- $[25] !== color ? (t11 = /* @__PURE__ */ jsx(Arrow$1, { children: /* @__PURE__ */ jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[25] = color, $[26] = t11) : t11 = $[26];
1638
- let t12;
1639
- $[27] !== imageFailed || $[28] !== src || $[29] !== _sizeRem || $[30] !== handleImageError || $[31] !== imageId || $[32] !== _radius || $[33] !== __unstable_hideInnerStroke ? (t12 = !imageFailed && src && /* @__PURE__ */ jsxs(Image, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
1640
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: imageId, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsx("image", { href: src, width: "1", height: "1", onError: handleImageError }) }) }),
1641
- /* @__PURE__ */ jsx("circle", { cx: _radius, cy: _radius, r: _radius, fill: `url(#${imageId})` }),
1642
- !__unstable_hideInnerStroke && /* @__PURE__ */ jsx(BgStroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" }),
1643
- /* @__PURE__ */ jsx(Stroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" })
1644
- ] }), $[27] = imageFailed, $[28] = src, $[29] = _sizeRem, $[30] = handleImageError, $[31] = imageId, $[32] = _radius, $[33] = __unstable_hideInnerStroke, $[34] = t12) : t12 = $[34];
1645
- let t13;
1646
- $[35] !== imageFailed || $[36] !== src || $[37] !== initials || $[38] !== initialsSize ? (t13 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Initials, { children: /* @__PURE__ */ jsx(InitialsLabel, { forwardedAs: "span", size: initialsSize, weight: "medium", children: initials }) }) }), $[35] = imageFailed, $[36] = src, $[37] = initials, $[38] = initialsSize, $[39] = t13) : t13 = $[39];
1647
- let t14;
1648
- return $[40] !== as || $[41] !== t10 || $[42] !== restProps || $[43] !== color || $[44] !== size2 || $[45] !== title || $[46] !== arrowPosition || $[47] !== status || $[48] !== ref || $[49] !== t11 || $[50] !== t12 || $[51] !== t13 ? (t14 = /* @__PURE__ */ jsxs(Root$B, { as, "data-as": t10, "data-ui": "Avatar", ...restProps, $color: color, $size: size2, "aria-label": title, "data-arrow-position": arrowPosition, "data-status": status, ref, title, children: [
1649
- t11,
1650
- t12,
1651
- t13
1652
- ] }), $[40] = as, $[41] = t10, $[42] = restProps, $[43] = color, $[44] = size2, $[45] = title, $[46] = arrowPosition, $[47] = status, $[48] = ref, $[49] = t11, $[50] = t12, $[51] = t13, $[52] = t14) : t14 = $[52], t14;
1145
+ }, [onImageLoadError]), initialsSize = useMemo(() => size2.map((s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0), [size2]);
1146
+ return /* @__PURE__ */ jsxs(Root$B, { as, "data-as": typeof as == "string" ? as : void 0, "data-ui": "Avatar", ...restProps, $color: color, $size: size2, "aria-label": title, "data-arrow-position": arrowPosition, "data-status": status, ref, title, children: [
1147
+ /* @__PURE__ */ jsx(Arrow$1, { children: /* @__PURE__ */ jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }),
1148
+ !imageFailed && src && /* @__PURE__ */ jsxs(Image, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
1149
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: imageId, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsx(
1150
+ "image",
1151
+ {
1152
+ href: src,
1153
+ width: "1",
1154
+ height: "1",
1155
+ onError: handleImageError
1156
+ }
1157
+ ) }) }),
1158
+ /* @__PURE__ */ jsx("circle", { cx: _radius, cy: _radius, r: _radius, fill: `url(#${imageId})` }),
1159
+ !__unstable_hideInnerStroke && /* @__PURE__ */ jsx(BgStroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" }),
1160
+ /* @__PURE__ */ jsx(Stroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" })
1161
+ ] }),
1162
+ (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Initials, { children: /* @__PURE__ */ jsx(InitialsLabel, { forwardedAs: "span", size: initialsSize, weight: "medium", children: initials }) }) })
1163
+ ] });
1653
1164
  });
1654
1165
  function _responsiveAvatarCounterSizeStyle(props) {
1655
1166
  const {
@@ -1688,22 +1199,11 @@ function _avatarCounterBaseStyle(props) {
1688
1199
  `;
1689
1200
  }
1690
1201
  const Root$A = styled.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle), AvatarCounter = forwardRef(function(props, ref) {
1691
- const $ = c(10), {
1202
+ const {
1692
1203
  count,
1693
- size: t0
1694
- } = props, size2 = useArrayProp(t0 === void 0 ? 1 : t0);
1695
- let t1, t2;
1696
- if ($[0] !== size2) {
1697
- let t32;
1698
- $[2] === Symbol.for("react.memo_cache_sentinel") ? (t32 = (s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0, $[2] = t32) : t32 = $[2], t2 = size2.map(t32), $[0] = size2, $[1] = t2;
1699
- } else
1700
- t2 = $[1];
1701
- t1 = t2;
1702
- const fontSize2 = t1;
1703
- let t3;
1704
- $[3] !== fontSize2 || $[4] !== count ? (t3 = /* @__PURE__ */ jsx(Label, { as: "span", size: fontSize2, weight: "medium", children: count }), $[3] = fontSize2, $[4] = count, $[5] = t3) : t3 = $[5];
1705
- let t4;
1706
- return $[6] !== size2 || $[7] !== ref || $[8] !== t3 ? (t4 = /* @__PURE__ */ jsx(Root$A, { $size: size2, "data-ui": "AvatarCounter", ref, children: t3 }), $[6] = size2, $[7] = ref, $[8] = t3, $[9] = t4) : t4 = $[9], t4;
1204
+ size: sizeProp = 1
1205
+ } = props, size2 = useMemo(() => _getArrayProp(sizeProp), [sizeProp]), fontSize2 = useMemo(() => size2.map((s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0), [size2]);
1206
+ return /* @__PURE__ */ jsx(Root$A, { $size: size2, "data-ui": "AvatarCounter", ref, children: /* @__PURE__ */ jsx(Label, { as: "span", size: fontSize2, weight: "medium", children: count }) });
1707
1207
  }), BASE_STYLES = css`
1708
1208
  white-space: nowrap;
1709
1209
 
@@ -1738,7 +1238,7 @@ const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), Ava
1738
1238
  maxLength: maxLengthProp = 4,
1739
1239
  size: sizeProp = 1,
1740
1240
  ...restProps
1741
- } = props, children = useMemo(() => Children.toArray(childrenProp).filter(isValidElement), [childrenProp]), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
1241
+ } = props, children = useMemo(() => Children.toArray(childrenProp).filter(isValidElement), [childrenProp]), maxLength = Math.max(maxLengthProp, 0), size2 = useMemo(() => _getArrayProp(sizeProp), [sizeProp]), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
1742
1242
  return /* @__PURE__ */ jsxs(Root$z, { "data-ui": "AvatarStack", ...restProps, ref, $size: size2, children: [
1743
1243
  len === 0 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: len, size: size2 }) }),
1744
1244
  len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size: size2 }) }),
@@ -1747,7 +1247,7 @@ const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), Ava
1747
1247
  }) }, String(childIndex)))
1748
1248
  ] });
1749
1249
  }), Root$y = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = forwardRef(function(props, ref) {
1750
- const $ = c(59);
1250
+ const $ = c(109);
1751
1251
  let t0, t1, t2, t3, column, columnStart, columnEnd, flex, height, marginX, marginY, marginTop, marginRight, marginBottom, marginLeft, overflow, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, row, rowStart, rowEnd, sizing, restProps;
1752
1252
  $[0] !== props ? ({
1753
1253
  as: t0,
@@ -1778,9 +1278,84 @@ const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), Ava
1778
1278
  sizing,
1779
1279
  ...restProps
1780
1280
  } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = t3, $[5] = column, $[6] = columnStart, $[7] = columnEnd, $[8] = flex, $[9] = height, $[10] = marginX, $[11] = marginY, $[12] = marginTop, $[13] = marginRight, $[14] = marginBottom, $[15] = marginLeft, $[16] = overflow, $[17] = paddingX, $[18] = paddingY, $[19] = paddingTop, $[20] = paddingRight, $[21] = paddingBottom, $[22] = paddingLeft, $[23] = row, $[24] = rowStart, $[25] = rowEnd, $[26] = sizing, $[27] = restProps) : (t0 = $[1], t1 = $[2], t2 = $[3], t3 = $[4], column = $[5], columnStart = $[6], columnEnd = $[7], flex = $[8], height = $[9], marginX = $[10], marginY = $[11], marginTop = $[12], marginRight = $[13], marginBottom = $[14], marginLeft = $[15], overflow = $[16], paddingX = $[17], paddingY = $[18], paddingTop = $[19], paddingRight = $[20], paddingBottom = $[21], paddingLeft = $[22], row = $[23], rowStart = $[24], rowEnd = $[25], sizing = $[26], restProps = $[27]);
1781
- const asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, t4 = typeof asProp == "string" ? asProp : void 0, t5 = useArrayProp(column), t6 = useArrayProp(columnStart), t7 = useArrayProp(columnEnd), t8 = useArrayProp(display), t9 = useArrayProp(flex), t10 = useArrayProp(height), t11 = useArrayProp(margin), t12 = useArrayProp(marginX), t13 = useArrayProp(marginY), t14 = useArrayProp(marginTop), t15 = useArrayProp(marginRight), t16 = useArrayProp(marginBottom), t17 = useArrayProp(marginLeft), t18 = useArrayProp(overflow), t19 = useArrayProp(padding), t20 = useArrayProp(paddingX), t21 = useArrayProp(paddingY), t22 = useArrayProp(paddingTop), t23 = useArrayProp(paddingRight), t24 = useArrayProp(paddingBottom), t25 = useArrayProp(paddingLeft), t26 = useArrayProp(row), t27 = useArrayProp(rowStart), t28 = useArrayProp(rowEnd), t29 = useArrayProp(sizing);
1782
- let t30;
1783
- return $[28] !== t4 || $[29] !== restProps || $[30] !== t5 || $[31] !== t6 || $[32] !== t7 || $[33] !== t8 || $[34] !== t9 || $[35] !== t10 || $[36] !== t11 || $[37] !== t12 || $[38] !== t13 || $[39] !== t14 || $[40] !== t15 || $[41] !== t16 || $[42] !== t17 || $[43] !== t18 || $[44] !== t19 || $[45] !== t20 || $[46] !== t21 || $[47] !== t22 || $[48] !== t23 || $[49] !== t24 || $[50] !== t25 || $[51] !== t26 || $[52] !== t27 || $[53] !== t28 || $[54] !== t29 || $[55] !== asProp || $[56] !== ref || $[57] !== props.children ? (t30 = /* @__PURE__ */ jsx(Root$y, { "data-as": t4, "data-ui": "Box", ...restProps, $column: t5, $columnStart: t6, $columnEnd: t7, $display: t8, $flex: t9, $height: t10, $margin: t11, $marginX: t12, $marginY: t13, $marginTop: t14, $marginRight: t15, $marginBottom: t16, $marginLeft: t17, $overflow: t18, $padding: t19, $paddingX: t20, $paddingY: t21, $paddingTop: t22, $paddingRight: t23, $paddingBottom: t24, $paddingLeft: t25, $row: t26, $rowStart: t27, $rowEnd: t28, $sizing: t29, as: asProp, ref, children: props.children }), $[28] = t4, $[29] = restProps, $[30] = t5, $[31] = t6, $[32] = t7, $[33] = t8, $[34] = t9, $[35] = t10, $[36] = t11, $[37] = t12, $[38] = t13, $[39] = t14, $[40] = t15, $[41] = t16, $[42] = t17, $[43] = t18, $[44] = t19, $[45] = t20, $[46] = t21, $[47] = t22, $[48] = t23, $[49] = t24, $[50] = t25, $[51] = t26, $[52] = t27, $[53] = t28, $[54] = t29, $[55] = asProp, $[56] = ref, $[57] = props.children, $[58] = t30) : t30 = $[58], t30;
1281
+ const asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3;
1282
+ let t4, t5;
1283
+ $[28] !== column ? (t5 = _getArrayProp(column), $[28] = column, $[29] = t5) : t5 = $[29], t4 = t5;
1284
+ const $column = t4;
1285
+ let t6, t7;
1286
+ $[30] !== columnStart ? (t7 = _getArrayProp(columnStart), $[30] = columnStart, $[31] = t7) : t7 = $[31], t6 = t7;
1287
+ const $columnStart = t6;
1288
+ let t8, t9;
1289
+ $[32] !== columnEnd ? (t9 = _getArrayProp(columnEnd), $[32] = columnEnd, $[33] = t9) : t9 = $[33], t8 = t9;
1290
+ const $columnEnd = t8;
1291
+ let t10, t11;
1292
+ $[34] !== display ? (t11 = _getArrayProp(display), $[34] = display, $[35] = t11) : t11 = $[35], t10 = t11;
1293
+ const $display = t10;
1294
+ let t12, t13;
1295
+ $[36] !== flex ? (t13 = _getArrayProp(flex), $[36] = flex, $[37] = t13) : t13 = $[37], t12 = t13;
1296
+ const $flex = t12;
1297
+ let t14, t15;
1298
+ $[38] !== height ? (t15 = _getArrayProp(height), $[38] = height, $[39] = t15) : t15 = $[39], t14 = t15;
1299
+ const $height = t14;
1300
+ let t16, t17;
1301
+ $[40] !== margin ? (t17 = _getArrayProp(margin), $[40] = margin, $[41] = t17) : t17 = $[41], t16 = t17;
1302
+ const $margin = t16;
1303
+ let t18, t19;
1304
+ $[42] !== marginX ? (t19 = _getArrayProp(marginX), $[42] = marginX, $[43] = t19) : t19 = $[43], t18 = t19;
1305
+ const $marginX = t18;
1306
+ let t20, t21;
1307
+ $[44] !== marginY ? (t21 = _getArrayProp(marginY), $[44] = marginY, $[45] = t21) : t21 = $[45], t20 = t21;
1308
+ const $marginY = t20;
1309
+ let t22, t23;
1310
+ $[46] !== marginTop ? (t23 = _getArrayProp(marginTop), $[46] = marginTop, $[47] = t23) : t23 = $[47], t22 = t23;
1311
+ const $marginTop = t22;
1312
+ let t24, t25;
1313
+ $[48] !== marginRight ? (t25 = _getArrayProp(marginRight), $[48] = marginRight, $[49] = t25) : t25 = $[49], t24 = t25;
1314
+ const $marginRight = t24;
1315
+ let t26, t27;
1316
+ $[50] !== marginBottom ? (t27 = _getArrayProp(marginBottom), $[50] = marginBottom, $[51] = t27) : t27 = $[51], t26 = t27;
1317
+ const $marginBottom = t26;
1318
+ let t28, t29;
1319
+ $[52] !== marginLeft ? (t29 = _getArrayProp(marginLeft), $[52] = marginLeft, $[53] = t29) : t29 = $[53], t28 = t29;
1320
+ const $marginLeft = t28;
1321
+ let t30, t31;
1322
+ $[54] !== overflow ? (t31 = _getArrayProp(overflow), $[54] = overflow, $[55] = t31) : t31 = $[55], t30 = t31;
1323
+ const $overflow = t30;
1324
+ let t32, t33;
1325
+ $[56] !== padding ? (t33 = _getArrayProp(padding), $[56] = padding, $[57] = t33) : t33 = $[57], t32 = t33;
1326
+ const $padding = t32;
1327
+ let t34, t35;
1328
+ $[58] !== paddingX ? (t35 = _getArrayProp(paddingX), $[58] = paddingX, $[59] = t35) : t35 = $[59], t34 = t35;
1329
+ const $paddingX = t34;
1330
+ let t36, t37;
1331
+ $[60] !== paddingY ? (t37 = _getArrayProp(paddingY), $[60] = paddingY, $[61] = t37) : t37 = $[61], t36 = t37;
1332
+ const $paddingY = t36;
1333
+ let t38, t39;
1334
+ $[62] !== paddingTop ? (t39 = _getArrayProp(paddingTop), $[62] = paddingTop, $[63] = t39) : t39 = $[63], t38 = t39;
1335
+ const $paddingTop = t38;
1336
+ let t40, t41;
1337
+ $[64] !== paddingRight ? (t41 = _getArrayProp(paddingRight), $[64] = paddingRight, $[65] = t41) : t41 = $[65], t40 = t41;
1338
+ const $paddingRight = t40;
1339
+ let t42, t43;
1340
+ $[66] !== paddingBottom ? (t43 = _getArrayProp(paddingBottom), $[66] = paddingBottom, $[67] = t43) : t43 = $[67], t42 = t43;
1341
+ const $paddingBottom = t42;
1342
+ let t44, t45;
1343
+ $[68] !== paddingLeft ? (t45 = _getArrayProp(paddingLeft), $[68] = paddingLeft, $[69] = t45) : t45 = $[69], t44 = t45;
1344
+ const $paddingLeft = t44;
1345
+ let t46, t47;
1346
+ $[70] !== row ? (t47 = _getArrayProp(row), $[70] = row, $[71] = t47) : t47 = $[71], t46 = t47;
1347
+ const $row = t46;
1348
+ let t48, t49;
1349
+ $[72] !== rowStart ? (t49 = _getArrayProp(rowStart), $[72] = rowStart, $[73] = t49) : t49 = $[73], t48 = t49;
1350
+ const $rowStart = t48;
1351
+ let t50, t51;
1352
+ $[74] !== rowEnd ? (t51 = _getArrayProp(rowEnd), $[74] = rowEnd, $[75] = t51) : t51 = $[75], t50 = t51;
1353
+ const $rowEnd = t50;
1354
+ let t52, t53;
1355
+ $[76] !== sizing ? (t53 = _getArrayProp(sizing), $[76] = sizing, $[77] = t53) : t53 = $[77], t52 = t53;
1356
+ const $sizing = t52, t54 = typeof asProp == "string" ? asProp : void 0;
1357
+ let t55;
1358
+ return $[78] !== t54 || $[79] !== restProps || $[80] !== $column || $[81] !== $columnStart || $[82] !== $columnEnd || $[83] !== $display || $[84] !== $flex || $[85] !== $height || $[86] !== $margin || $[87] !== $marginX || $[88] !== $marginY || $[89] !== $marginTop || $[90] !== $marginRight || $[91] !== $marginBottom || $[92] !== $marginLeft || $[93] !== $overflow || $[94] !== $padding || $[95] !== $paddingX || $[96] !== $paddingY || $[97] !== $paddingTop || $[98] !== $paddingRight || $[99] !== $paddingBottom || $[100] !== $paddingLeft || $[101] !== $row || $[102] !== $rowStart || $[103] !== $rowEnd || $[104] !== $sizing || $[105] !== asProp || $[106] !== ref || $[107] !== props.children ? (t55 = /* @__PURE__ */ jsx(Root$y, { "data-as": t54, "data-ui": "Box", ...restProps, $column, $columnStart, $columnEnd, $display, $flex, $height, $margin, $marginX, $marginY, $marginTop, $marginRight, $marginBottom, $marginLeft, $overflow, $padding, $paddingX, $paddingY, $paddingTop, $paddingRight, $paddingBottom, $paddingLeft, $row, $rowStart, $rowEnd, $sizing, as: asProp, ref, children: props.children }), $[78] = t54, $[79] = restProps, $[80] = $column, $[81] = $columnStart, $[82] = $columnEnd, $[83] = $display, $[84] = $flex, $[85] = $height, $[86] = $margin, $[87] = $marginX, $[88] = $marginY, $[89] = $marginTop, $[90] = $marginRight, $[91] = $marginBottom, $[92] = $marginLeft, $[93] = $overflow, $[94] = $padding, $[95] = $paddingX, $[96] = $paddingY, $[97] = $paddingTop, $[98] = $paddingRight, $[99] = $paddingBottom, $[100] = $paddingLeft, $[101] = $row, $[102] = $rowStart, $[103] = $rowEnd, $[104] = $sizing, $[105] = asProp, $[106] = ref, $[107] = props.children, $[108] = t55) : t55 = $[108], t55;
1784
1359
  });
1785
1360
  function textBaseStyle(props) {
1786
1361
  const {
@@ -1857,8 +1432,8 @@ const Root$x = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBase
1857
1432
  overflow: hidden;
1858
1433
  overflow: clip;
1859
1434
  `, Text = forwardRef(function(props, ref) {
1860
- const $ = c(22);
1861
- let t0, t1, t2, childrenProp, textOverflow, align, restProps, weight;
1435
+ const $ = c(26);
1436
+ let t0, t1, t2, align, childrenProp, textOverflow, restProps, weight;
1862
1437
  $[0] !== props ? ({
1863
1438
  accent: t0,
1864
1439
  align,
@@ -1868,18 +1443,23 @@ const Root$x = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBase
1868
1443
  textOverflow,
1869
1444
  weight,
1870
1445
  ...restProps
1871
- } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = childrenProp, $[5] = textOverflow, $[6] = align, $[7] = restProps, $[8] = weight) : (t0 = $[1], t1 = $[2], t2 = $[3], childrenProp = $[4], textOverflow = $[5], align = $[6], restProps = $[7], weight = $[8]);
1446
+ } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = align, $[5] = childrenProp, $[6] = textOverflow, $[7] = restProps, $[8] = weight) : (t0 = $[1], t1 = $[2], t2 = $[3], align = $[4], childrenProp = $[5], textOverflow = $[6], restProps = $[7], weight = $[8]);
1872
1447
  const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
1448
+ let t3, t4;
1449
+ $[9] !== size2 ? (t4 = _getArrayProp(size2), $[9] = size2, $[10] = t4) : t4 = $[10], t3 = t4;
1450
+ const $size = t3;
1451
+ let t5, t6;
1452
+ $[11] !== align ? (t6 = _getArrayProp(align), $[11] = align, $[12] = t6) : t6 = $[12], t5 = t6;
1453
+ const $align = t5;
1873
1454
  let children = childrenProp;
1874
1455
  if (textOverflow === "ellipsis") {
1875
- let t32;
1876
- $[9] !== children ? (t32 = /* @__PURE__ */ jsx(SpanWithTextOverflow$1, { children }), $[9] = children, $[10] = t32) : t32 = $[10], children = t32;
1456
+ let t72;
1457
+ $[13] !== children ? (t72 = /* @__PURE__ */ jsx(SpanWithTextOverflow$1, { children }), $[13] = children, $[14] = t72) : t72 = $[14], children = t72;
1877
1458
  }
1878
- const t3 = useArrayProp(align), t4 = useArrayProp(size2);
1879
- let t5;
1880
- $[11] !== children ? (t5 = /* @__PURE__ */ jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
1881
- let t6;
1882
- return $[13] !== restProps || $[14] !== accent || $[15] !== t3 || $[16] !== muted || $[17] !== ref || $[18] !== t4 || $[19] !== weight || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx(Root$x, { "data-ui": "Text", ...restProps, $accent: accent, $align: t3, $muted: muted, ref, $size: t4, $weight: weight, children: t5 }), $[13] = restProps, $[14] = accent, $[15] = t3, $[16] = muted, $[17] = ref, $[18] = t4, $[19] = weight, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
1459
+ let t7;
1460
+ $[15] !== children ? (t7 = /* @__PURE__ */ jsx("span", { children }), $[15] = children, $[16] = t7) : t7 = $[16];
1461
+ let t8;
1462
+ return $[17] !== restProps || $[18] !== accent || $[19] !== $align || $[20] !== $size || $[21] !== muted || $[22] !== ref || $[23] !== weight || $[24] !== t7 ? (t8 = /* @__PURE__ */ jsx(Root$x, { "data-ui": "Text", ...restProps, $accent: accent, $align, $size, $muted: muted, ref, $weight: weight, children: t7 }), $[17] = restProps, $[18] = accent, $[19] = $align, $[20] = $size, $[21] = muted, $[22] = ref, $[23] = weight, $[24] = t7, $[25] = t8) : t8 = $[25], t8;
1883
1463
  });
1884
1464
  function badgeStyle(props) {
1885
1465
  const {
@@ -1897,7 +1477,7 @@ function badgeStyle(props) {
1897
1477
  };
1898
1478
  }
1899
1479
  const Root$w = styled(Box)(responsiveRadiusStyle, badgeStyle), Badge = forwardRef(function(props, ref) {
1900
- const $ = c(17);
1480
+ const $ = c(21);
1901
1481
  let t0, t1, t2, t3, children, restProps;
1902
1482
  if ($[0] !== props) {
1903
1483
  const {
@@ -1906,19 +1486,25 @@ const Root$w = styled(Box)(responsiveRadiusStyle, badgeStyle), Badge = forwardRe
1906
1486
  mode: _deprecated_mode,
1907
1487
  padding: t62,
1908
1488
  radius: t72,
1909
- tone: t8,
1910
- ...t9
1489
+ tone: t82,
1490
+ ...t92
1911
1491
  } = props;
1912
- children = t42, t0 = t52, t1 = t62, t2 = t72, t3 = t8, restProps = t9, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = t3, $[5] = children, $[6] = restProps;
1492
+ children = t42, t0 = t52, t1 = t62, t2 = t72, t3 = t82, restProps = t92, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = t3, $[5] = children, $[6] = restProps;
1913
1493
  } else
1914
1494
  t0 = $[1], t1 = $[2], t2 = $[3], t3 = $[4], children = $[5], restProps = $[6];
1915
- const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? "full" : t2, tone = t3 === void 0 ? "default" : t3, t4 = useArrayProp(radius), t5 = useArrayProp(padding);
1916
- let t6;
1917
- $[7] !== fontSize2 || $[8] !== children ? (t6 = /* @__PURE__ */ jsx(Text, { size: fontSize2, children }), $[7] = fontSize2, $[8] = children, $[9] = t6) : t6 = $[9];
1918
- let t7;
1919
- return $[10] !== restProps || $[11] !== tone || $[12] !== t4 || $[13] !== t5 || $[14] !== ref || $[15] !== t6 ? (t7 = /* @__PURE__ */ jsx(Root$w, { "data-ui": "Badge", ...restProps, $tone: tone, $radius: t4, padding: t5, ref, children: t6 }), $[10] = restProps, $[11] = tone, $[12] = t4, $[13] = t5, $[14] = ref, $[15] = t6, $[16] = t7) : t7 = $[16], t7;
1495
+ const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? "full" : t2, tone = t3 === void 0 ? "default" : t3;
1496
+ let t4, t5;
1497
+ $[7] !== radius ? (t5 = _getArrayProp(radius), $[7] = radius, $[8] = t5) : t5 = $[8], t4 = t5;
1498
+ const $radius = t4;
1499
+ let t6, t7;
1500
+ $[9] !== padding ? (t7 = _getArrayProp(padding), $[9] = padding, $[10] = t7) : t7 = $[10], t6 = t7;
1501
+ const $padding = t6;
1502
+ let t8;
1503
+ $[11] !== fontSize2 || $[12] !== children ? (t8 = /* @__PURE__ */ jsx(Text, { size: fontSize2, children }), $[11] = fontSize2, $[12] = children, $[13] = t8) : t8 = $[13];
1504
+ let t9;
1505
+ return $[14] !== restProps || $[15] !== tone || $[16] !== $radius || $[17] !== $padding || $[18] !== ref || $[19] !== t8 ? (t9 = /* @__PURE__ */ jsx(Root$w, { "data-ui": "Badge", ...restProps, $tone: tone, $radius, padding: $padding, ref, children: t8 }), $[14] = restProps, $[15] = tone, $[16] = $radius, $[17] = $padding, $[18] = ref, $[19] = t8, $[20] = t9) : t9 = $[20], t9;
1920
1506
  }), Root$v = styled(Box)(flexItemStyle, responsiveFlexStyle), Flex = forwardRef(function(props, ref) {
1921
- const $ = c(17);
1507
+ const $ = c(27);
1922
1508
  let t0, align, gap, justify, wrap, restProps, as;
1923
1509
  $[0] !== props ? ({
1924
1510
  align,
@@ -1929,9 +1515,24 @@ const Root$w = styled(Box)(responsiveRadiusStyle, badgeStyle), Badge = forwardRe
1929
1515
  wrap,
1930
1516
  ...restProps
1931
1517
  } = props, $[0] = props, $[1] = t0, $[2] = align, $[3] = gap, $[4] = justify, $[5] = wrap, $[6] = restProps, $[7] = as) : (t0 = $[1], align = $[2], gap = $[3], justify = $[4], wrap = $[5], restProps = $[6], as = $[7]);
1932
- const direction = t0 === void 0 ? "row" : t0, t1 = useArrayProp(align), t2 = useArrayProp(direction), t3 = useArrayProp(gap), t4 = useArrayProp(justify), t5 = useArrayProp(wrap);
1933
- let t6;
1934
- return $[8] !== restProps || $[9] !== t1 || $[10] !== t2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t5 || $[14] !== as || $[15] !== ref ? (t6 = /* @__PURE__ */ jsx(Root$v, { "data-ui": "Flex", ...restProps, $align: t1, $direction: t2, $gap: t3, $justify: t4, $wrap: t5, forwardedAs: as, ref }), $[8] = restProps, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = t5, $[14] = as, $[15] = ref, $[16] = t6) : t6 = $[16], t6;
1518
+ const direction = t0 === void 0 ? "row" : t0;
1519
+ let t1, t2;
1520
+ $[8] !== align ? (t2 = _getArrayProp(align), $[8] = align, $[9] = t2) : t2 = $[9], t1 = t2;
1521
+ const $align = t1;
1522
+ let t3, t4;
1523
+ $[10] !== direction ? (t4 = _getArrayProp(direction), $[10] = direction, $[11] = t4) : t4 = $[11], t3 = t4;
1524
+ const $direction = t3;
1525
+ let t5, t6;
1526
+ $[12] !== gap ? (t6 = _getArrayProp(gap), $[12] = gap, $[13] = t6) : t6 = $[13], t5 = t6;
1527
+ const $gap = t5;
1528
+ let t7, t8;
1529
+ $[14] !== justify ? (t8 = _getArrayProp(justify), $[14] = justify, $[15] = t8) : t8 = $[15], t7 = t8;
1530
+ const $justify = t7;
1531
+ let t9, t10;
1532
+ $[16] !== wrap ? (t10 = _getArrayProp(wrap), $[16] = wrap, $[17] = t10) : t10 = $[17], t9 = t10;
1533
+ const $wrap = t9;
1534
+ let t11;
1535
+ return $[18] !== restProps || $[19] !== $align || $[20] !== $direction || $[21] !== $gap || $[22] !== $justify || $[23] !== $wrap || $[24] !== as || $[25] !== ref ? (t11 = /* @__PURE__ */ jsx(Root$v, { "data-ui": "Flex", ...restProps, $align, $direction, $gap, $justify, $wrap, forwardedAs: as, ref }), $[18] = restProps, $[19] = $align, $[20] = $direction, $[21] = $gap, $[22] = $justify, $[23] = $wrap, $[24] = as, $[25] = ref, $[26] = t11) : t11 = $[26], t11;
1935
1536
  }), rotate$1 = keyframes`
1936
1537
  from {
1937
1538
  transform: rotate(0deg);
@@ -2126,7 +1727,7 @@ const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColo
2126
1727
  z-index: 1;
2127
1728
  box-shadow: inherit;
2128
1729
  `, Button = forwardRef(function(props, ref) {
2129
- const $ = c(64);
1730
+ const $ = c(84);
2130
1731
  let t0, t1, t2, t3, t4, t5, t6, t7, t8, paddingXProp, paddingYProp, paddingTopProp, paddingBottomProp, paddingLeftProp, paddingRightProp, loading, disabled, selected, IconComponent, text, IconRightComponent, textAlign, children, restProps, width;
2131
1732
  $[0] !== props ? ({
2132
1733
  children,
@@ -2157,9 +1758,39 @@ const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColo
2157
1758
  } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = t3, $[5] = t4, $[6] = t5, $[7] = t6, $[8] = t7, $[9] = t8, $[10] = paddingXProp, $[11] = paddingYProp, $[12] = paddingTopProp, $[13] = paddingBottomProp, $[14] = paddingLeftProp, $[15] = paddingRightProp, $[16] = loading, $[17] = disabled, $[18] = selected, $[19] = IconComponent, $[20] = text, $[21] = IconRightComponent, $[22] = textAlign, $[23] = children, $[24] = restProps, $[25] = width) : (t0 = $[1], t1 = $[2], t2 = $[3], t3 = $[4], t4 = $[5], t5 = $[6], t6 = $[7], t7 = $[8], t8 = $[9], paddingXProp = $[10], paddingYProp = $[11], paddingTopProp = $[12], paddingBottomProp = $[13], paddingLeftProp = $[14], paddingRightProp = $[15], loading = $[16], disabled = $[17], selected = $[18], IconComponent = $[19], text = $[20], IconRightComponent = $[21], textAlign = $[22], children = $[23], restProps = $[24], width = $[25]);
2158
1759
  const fontSize2 = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8 === void 0 ? !1 : t8, {
2159
1760
  button
2160
- } = useTheme_v2(), justify = useArrayProp(justifyProp), padding = useArrayProp(paddingProp), paddingX = useArrayProp(paddingXProp), paddingY = useArrayProp(paddingYProp), paddingTop = useArrayProp(paddingTopProp), paddingBottom = useArrayProp(paddingBottomProp), paddingLeft = useArrayProp(paddingLeftProp), paddingRight = useArrayProp(paddingRightProp), radius = useArrayProp(radiusProp), space = useArrayProp(spaceProp);
1761
+ } = useTheme_v2();
2161
1762
  let t9, t10;
2162
- $[26] !== padding || $[27] !== paddingX || $[28] !== paddingY || $[29] !== paddingTop || $[30] !== paddingBottom || $[31] !== paddingLeft || $[32] !== paddingRight ? (t10 = {
1763
+ $[26] !== justifyProp ? (t10 = _getArrayProp(justifyProp), $[26] = justifyProp, $[27] = t10) : t10 = $[27], t9 = t10;
1764
+ const justify = t9;
1765
+ let t11, t12;
1766
+ $[28] !== paddingProp ? (t12 = _getArrayProp(paddingProp), $[28] = paddingProp, $[29] = t12) : t12 = $[29], t11 = t12;
1767
+ const padding = t11;
1768
+ let t13, t14;
1769
+ $[30] !== paddingXProp ? (t14 = _getArrayProp(paddingXProp), $[30] = paddingXProp, $[31] = t14) : t14 = $[31], t13 = t14;
1770
+ const paddingX = t13;
1771
+ let t15, t16;
1772
+ $[32] !== paddingYProp ? (t16 = _getArrayProp(paddingYProp), $[32] = paddingYProp, $[33] = t16) : t16 = $[33], t15 = t16;
1773
+ const paddingY = t15;
1774
+ let t17, t18;
1775
+ $[34] !== paddingTopProp ? (t18 = _getArrayProp(paddingTopProp), $[34] = paddingTopProp, $[35] = t18) : t18 = $[35], t17 = t18;
1776
+ const paddingTop = t17;
1777
+ let t19, t20;
1778
+ $[36] !== paddingBottomProp ? (t20 = _getArrayProp(paddingBottomProp), $[36] = paddingBottomProp, $[37] = t20) : t20 = $[37], t19 = t20;
1779
+ const paddingBottom = t19;
1780
+ let t21, t22;
1781
+ $[38] !== paddingLeftProp ? (t22 = _getArrayProp(paddingLeftProp), $[38] = paddingLeftProp, $[39] = t22) : t22 = $[39], t21 = t22;
1782
+ const paddingLeft = t21;
1783
+ let t23, t24;
1784
+ $[40] !== paddingRightProp ? (t24 = _getArrayProp(paddingRightProp), $[40] = paddingRightProp, $[41] = t24) : t24 = $[41], t23 = t24;
1785
+ const paddingRight = t23;
1786
+ let t25, t26;
1787
+ $[42] !== radiusProp ? (t26 = _getArrayProp(radiusProp), $[42] = radiusProp, $[43] = t26) : t26 = $[43], t25 = t26;
1788
+ const radius = t25;
1789
+ let t27, t28;
1790
+ $[44] !== spaceProp ? (t28 = _getArrayProp(spaceProp), $[44] = spaceProp, $[45] = t28) : t28 = $[45], t27 = t28;
1791
+ const space = t27;
1792
+ let t29, t30;
1793
+ $[46] !== padding || $[47] !== paddingX || $[48] !== paddingY || $[49] !== paddingTop || $[50] !== paddingBottom || $[51] !== paddingLeft || $[52] !== paddingRight ? (t30 = {
2163
1794
  padding,
2164
1795
  paddingX,
2165
1796
  paddingY,
@@ -2167,12 +1798,12 @@ const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColo
2167
1798
  paddingBottom,
2168
1799
  paddingLeft,
2169
1800
  paddingRight
2170
- }, $[26] = padding, $[27] = paddingX, $[28] = paddingY, $[29] = paddingTop, $[30] = paddingBottom, $[31] = paddingLeft, $[32] = paddingRight, $[33] = t10) : t10 = $[33], t9 = t10;
2171
- const boxProps = t9, t11 = !!(loading || disabled), t12 = selected ? "" : void 0, t13 = !!(loading || disabled);
2172
- let t14;
2173
- $[34] !== loading ? (t14 = !!loading && /* @__PURE__ */ jsx(LoadingBox, { children: /* @__PURE__ */ jsx(Spinner, {}) }), $[34] = loading, $[35] = t14) : t14 = $[35];
2174
- let t15;
2175
- $[36] !== IconComponent || $[37] !== text || $[38] !== IconRightComponent || $[39] !== fontSize2 || $[40] !== muted || $[41] !== textAlign || $[42] !== button || $[43] !== justify || $[44] !== space || $[45] !== boxProps ? (t15 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxs(Flex, { as: "span", justify, gap: space, children: [
1801
+ }, $[46] = padding, $[47] = paddingX, $[48] = paddingY, $[49] = paddingTop, $[50] = paddingBottom, $[51] = paddingLeft, $[52] = paddingRight, $[53] = t30) : t30 = $[53], t29 = t30;
1802
+ const boxProps = t29, t31 = !!(loading || disabled), t32 = selected ? "" : void 0, t33 = !!(loading || disabled);
1803
+ let t34;
1804
+ $[54] !== loading ? (t34 = !!loading && /* @__PURE__ */ jsx(LoadingBox, { children: /* @__PURE__ */ jsx(Spinner, {}) }), $[54] = loading, $[55] = t34) : t34 = $[55];
1805
+ let t35;
1806
+ $[56] !== IconComponent || $[57] !== text || $[58] !== IconRightComponent || $[59] !== fontSize2 || $[60] !== muted || $[61] !== textAlign || $[62] !== button || $[63] !== justify || $[64] !== space || $[65] !== boxProps ? (t35 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxs(Flex, { as: "span", justify, gap: space, children: [
2176
1807
  IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
2177
1808
  isValidElement(IconComponent) && IconComponent,
2178
1809
  isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
@@ -2182,15 +1813,15 @@ const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColo
2182
1813
  isValidElement(IconRightComponent) && IconRightComponent,
2183
1814
  isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
2184
1815
  ] })
2185
- ] }) }), $[36] = IconComponent, $[37] = text, $[38] = IconRightComponent, $[39] = fontSize2, $[40] = muted, $[41] = textAlign, $[42] = button, $[43] = justify, $[44] = space, $[45] = boxProps, $[46] = t15) : t15 = $[46];
2186
- let t16;
2187
- $[47] !== children || $[48] !== boxProps ? (t16 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children }), $[47] = children, $[48] = boxProps, $[49] = t16) : t16 = $[49];
2188
- let t17;
2189
- return $[50] !== restProps || $[51] !== mode || $[52] !== radius || $[53] !== tone || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== ref || $[58] !== type || $[59] !== width || $[60] !== t14 || $[61] !== t15 || $[62] !== t16 ? (t17 = /* @__PURE__ */ jsxs(Root$t, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": t11, "data-selected": t12, disabled: t13, ref, type, $width: width, children: [
2190
- t14,
2191
- t15,
2192
- t16
2193
- ] }), $[50] = restProps, $[51] = mode, $[52] = radius, $[53] = tone, $[54] = t11, $[55] = t12, $[56] = t13, $[57] = ref, $[58] = type, $[59] = width, $[60] = t14, $[61] = t15, $[62] = t16, $[63] = t17) : t17 = $[63], t17;
1816
+ ] }) }), $[56] = IconComponent, $[57] = text, $[58] = IconRightComponent, $[59] = fontSize2, $[60] = muted, $[61] = textAlign, $[62] = button, $[63] = justify, $[64] = space, $[65] = boxProps, $[66] = t35) : t35 = $[66];
1817
+ let t36;
1818
+ $[67] !== children || $[68] !== boxProps ? (t36 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children }), $[67] = children, $[68] = boxProps, $[69] = t36) : t36 = $[69];
1819
+ let t37;
1820
+ return $[70] !== restProps || $[71] !== mode || $[72] !== radius || $[73] !== tone || $[74] !== t31 || $[75] !== t32 || $[76] !== t33 || $[77] !== ref || $[78] !== type || $[79] !== width || $[80] !== t34 || $[81] !== t35 || $[82] !== t36 ? (t37 = /* @__PURE__ */ jsxs(Root$t, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": t31, "data-selected": t32, disabled: t33, ref, type, $width: width, children: [
1821
+ t34,
1822
+ t35,
1823
+ t36
1824
+ ] }), $[70] = restProps, $[71] = mode, $[72] = radius, $[73] = tone, $[74] = t31, $[75] = t32, $[76] = t33, $[77] = ref, $[78] = type, $[79] = width, $[80] = t34, $[81] = t35, $[82] = t36, $[83] = t37) : t37 = $[83], t37;
2194
1825
  });
2195
1826
  function cardStyle(props) {
2196
1827
  return [cardBaseStyle(props), cardColorStyle(props)];
@@ -2337,37 +1968,557 @@ function cardColorStyle(props) {
2337
1968
  }
2338
1969
  }
2339
1970
  }
2340
-
2341
- ${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
2342
- `;
1971
+
1972
+ ${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
1973
+ `;
1974
+ }
1975
+ const Root$s = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = forwardRef(function(props, ref) {
1976
+ const $ = c(56);
1977
+ let t0, t1, t2, t3, asProp, border2, borderTop2, borderRight2, borderBottom2, borderLeft2, shadow, pressed, selected, restProps, muted, scheme;
1978
+ $[0] !== props ? ({
1979
+ __unstable_checkered: t0,
1980
+ __unstable_focusRing: t1,
1981
+ as: asProp,
1982
+ border: border2,
1983
+ borderTop: borderTop2,
1984
+ borderRight: borderRight2,
1985
+ borderBottom: borderBottom2,
1986
+ borderLeft: borderLeft2,
1987
+ muted,
1988
+ pressed,
1989
+ radius: t2,
1990
+ scheme,
1991
+ selected,
1992
+ shadow,
1993
+ tone: t3,
1994
+ ...restProps
1995
+ } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = t3, $[5] = asProp, $[6] = border2, $[7] = borderTop2, $[8] = borderRight2, $[9] = borderBottom2, $[10] = borderLeft2, $[11] = shadow, $[12] = pressed, $[13] = selected, $[14] = restProps, $[15] = muted, $[16] = scheme) : (t0 = $[1], t1 = $[2], t2 = $[3], t3 = $[4], asProp = $[5], border2 = $[6], borderTop2 = $[7], borderRight2 = $[8], borderBottom2 = $[9], borderLeft2 = $[10], shadow = $[11], pressed = $[12], selected = $[13], restProps = $[14], muted = $[15], scheme = $[16]);
1996
+ const checkered = t0 === void 0 ? !1 : t0, focusRing = t1 === void 0 ? !1 : t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp;
1997
+ let t4, t5;
1998
+ $[17] !== border2 ? (t5 = _getArrayProp(border2), $[17] = border2, $[18] = t5) : t5 = $[18], t4 = t5;
1999
+ const $border = t4;
2000
+ let t6, t7;
2001
+ $[19] !== borderTop2 ? (t7 = _getArrayProp(borderTop2), $[19] = borderTop2, $[20] = t7) : t7 = $[20], t6 = t7;
2002
+ const $borderTop = t6;
2003
+ let t8, t9;
2004
+ $[21] !== borderRight2 ? (t9 = _getArrayProp(borderRight2), $[21] = borderRight2, $[22] = t9) : t9 = $[22], t8 = t9;
2005
+ const $borderRight = t8;
2006
+ let t10, t11;
2007
+ $[23] !== borderBottom2 ? (t11 = _getArrayProp(borderBottom2), $[23] = borderBottom2, $[24] = t11) : t11 = $[24], t10 = t11;
2008
+ const $borderBottom = t10;
2009
+ let t12, t13;
2010
+ $[25] !== borderLeft2 ? (t13 = _getArrayProp(borderLeft2), $[25] = borderLeft2, $[26] = t13) : t13 = $[26], t12 = t13;
2011
+ const $borderLeft = t12;
2012
+ let t14, t15;
2013
+ $[27] !== radius ? (t15 = _getArrayProp(radius), $[27] = radius, $[28] = t15) : t15 = $[28], t14 = t15;
2014
+ const $radius = t14;
2015
+ let t16, t17;
2016
+ $[29] !== shadow ? (t17 = _getArrayProp(shadow), $[29] = shadow, $[30] = t17) : t17 = $[30], t16 = t17;
2017
+ const $shadow = t16, t18 = typeof as == "string" ? as : void 0, t19 = checkered ? "" : void 0, t20 = pressed ? "" : void 0, t21 = selected ? "" : void 0;
2018
+ let t22;
2019
+ $[31] !== t18 || $[32] !== rootTheme.scheme || $[33] !== tone || $[34] !== restProps || $[35] !== $border || $[36] !== $borderTop || $[37] !== $borderRight || $[38] !== $borderBottom || $[39] !== $borderLeft || $[40] !== $radius || $[41] !== $shadow || $[42] !== checkered || $[43] !== focusRing || $[44] !== muted || $[45] !== t19 || $[46] !== t20 || $[47] !== t21 || $[48] !== as || $[49] !== ref || $[50] !== selected ? (t22 = /* @__PURE__ */ jsx(Root$s, { "data-as": t18, "data-scheme": rootTheme.scheme, "data-ui": "Card", "data-tone": tone, ...restProps, $border, $borderTop, $borderRight, $borderBottom, $borderLeft, $radius, $shadow, $checkered: checkered, $focusRing: focusRing, $muted: muted, $tone: tone, "data-checkered": t19, "data-pressed": t20, "data-selected": t21, forwardedAs: as, ref, selected }), $[31] = t18, $[32] = rootTheme.scheme, $[33] = tone, $[34] = restProps, $[35] = $border, $[36] = $borderTop, $[37] = $borderRight, $[38] = $borderBottom, $[39] = $borderLeft, $[40] = $radius, $[41] = $shadow, $[42] = checkered, $[43] = focusRing, $[44] = muted, $[45] = t19, $[46] = t20, $[47] = t21, $[48] = as, $[49] = ref, $[50] = selected, $[51] = t22) : t22 = $[51];
2020
+ let t23;
2021
+ return $[52] !== scheme || $[53] !== tone || $[54] !== t22 ? (t23 = /* @__PURE__ */ jsx(ThemeColorProvider, { scheme, tone, children: t22 }), $[52] = scheme, $[53] = tone, $[54] = t22, $[55] = t23) : t23 = $[55], t23;
2022
+ });
2023
+ function useArrayProp(val, defaultVal) {
2024
+ const $ = c(3);
2025
+ let t0, t1;
2026
+ return $[0] !== val || $[1] !== defaultVal ? (t1 = _getArrayProp(val, defaultVal), $[0] = val, $[1] = defaultVal, $[2] = t1) : t1 = $[2], t0 = t1, t0;
2027
+ }
2028
+ function _getElements(element, elementsArg) {
2029
+ const ret = [element];
2030
+ for (const el of elementsArg)
2031
+ Array.isArray(el) ? ret.push(...el) : ret.push(el);
2032
+ return ret.filter(Boolean);
2033
+ }
2034
+ function useClickOutside(listener, t0, boundaryElement) {
2035
+ const $ = c(12), elementsArg = t0 === void 0 ? EMPTY_ARRAY : t0, [element, setElement] = useState(null);
2036
+ let t1;
2037
+ $[0] !== element || $[1] !== elementsArg ? (t1 = () => _getElements(element, elementsArg), $[0] = element, $[1] = elementsArg, $[2] = t1) : t1 = $[2];
2038
+ const [elements, setElements] = useState(t1), elementsRef = useRef(elements);
2039
+ let t2, t3;
2040
+ $[3] !== element || $[4] !== elementsArg ? (t2 = () => {
2041
+ const prevElements = elementsRef.current, nextElements = _getElements(element, elementsArg);
2042
+ if (prevElements.length !== nextElements.length) {
2043
+ setElements(nextElements), elementsRef.current = nextElements;
2044
+ return;
2045
+ }
2046
+ for (const el of prevElements)
2047
+ if (!nextElements.includes(el)) {
2048
+ setElements(nextElements), elementsRef.current = nextElements;
2049
+ return;
2050
+ }
2051
+ for (const el_0 of nextElements)
2052
+ if (!prevElements.includes(el_0)) {
2053
+ setElements(nextElements), elementsRef.current = nextElements;
2054
+ return;
2055
+ }
2056
+ }, t3 = [element, elementsArg], $[3] = element, $[4] = elementsArg, $[5] = t2, $[6] = t3) : (t2 = $[5], t3 = $[6]), useEffect(t2, t3);
2057
+ let t4, t5;
2058
+ return $[7] !== listener || $[8] !== boundaryElement || $[9] !== elements ? (t4 = () => {
2059
+ if (!listener)
2060
+ return;
2061
+ const handleWindowMouseDown = (evt) => {
2062
+ const target = evt.target;
2063
+ if (target instanceof Node && !(boundaryElement && !boundaryElement.contains(target))) {
2064
+ for (const el_1 of elements)
2065
+ if (target === el_1 || el_1.contains(target))
2066
+ return;
2067
+ listener(evt);
2068
+ }
2069
+ };
2070
+ return window.addEventListener("mousedown", handleWindowMouseDown), () => {
2071
+ window.removeEventListener("mousedown", handleWindowMouseDown);
2072
+ };
2073
+ }, t5 = [boundaryElement, listener, elements], $[7] = listener, $[8] = boundaryElement, $[9] = elements, $[10] = t4, $[11] = t5) : (t4 = $[10], t5 = $[11]), useEffect(t4, t5), setElement;
2074
+ }
2075
+ var resizeObservers = [], hasActiveObservations = function() {
2076
+ return resizeObservers.some(function(ro) {
2077
+ return ro.activeTargets.length > 0;
2078
+ });
2079
+ }, hasSkippedObservations = function() {
2080
+ return resizeObservers.some(function(ro) {
2081
+ return ro.skippedTargets.length > 0;
2082
+ });
2083
+ }, msg = "ResizeObserver loop completed with undelivered notifications.", deliverResizeLoopError = function() {
2084
+ var event;
2085
+ typeof ErrorEvent == "function" ? event = new ErrorEvent("error", {
2086
+ message: msg
2087
+ }) : (event = document.createEvent("Event"), event.initEvent("error", !1, !1), event.message = msg), window.dispatchEvent(event);
2088
+ }, ResizeObserverBoxOptions;
2089
+ (function(ResizeObserverBoxOptions2) {
2090
+ ResizeObserverBoxOptions2.BORDER_BOX = "border-box", ResizeObserverBoxOptions2.CONTENT_BOX = "content-box", ResizeObserverBoxOptions2.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
2091
+ })(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));
2092
+ var freeze = function(obj) {
2093
+ return Object.freeze(obj);
2094
+ }, ResizeObserverSize = /* @__PURE__ */ function() {
2095
+ function ResizeObserverSize2(inlineSize, blockSize) {
2096
+ this.inlineSize = inlineSize, this.blockSize = blockSize, freeze(this);
2097
+ }
2098
+ return ResizeObserverSize2;
2099
+ }(), DOMRectReadOnly = function() {
2100
+ function DOMRectReadOnly2(x, y, width, height) {
2101
+ return this.x = x, this.y = y, this.width = width, this.height = height, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, freeze(this);
2102
+ }
2103
+ return DOMRectReadOnly2.prototype.toJSON = function() {
2104
+ var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;
2105
+ return {
2106
+ x,
2107
+ y,
2108
+ top,
2109
+ right,
2110
+ bottom,
2111
+ left,
2112
+ width,
2113
+ height
2114
+ };
2115
+ }, DOMRectReadOnly2.fromRect = function(rectangle) {
2116
+ return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
2117
+ }, DOMRectReadOnly2;
2118
+ }(), isSVG = function(target) {
2119
+ return target instanceof SVGElement && "getBBox" in target;
2120
+ }, isHidden = function(target) {
2121
+ if (isSVG(target)) {
2122
+ var _a = target.getBBox(), width = _a.width, height = _a.height;
2123
+ return !width && !height;
2124
+ }
2125
+ var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;
2126
+ return !(offsetWidth || offsetHeight || target.getClientRects().length);
2127
+ }, isElement = function(obj) {
2128
+ var _a;
2129
+ if (obj instanceof Element)
2130
+ return !0;
2131
+ var scope = (_a = obj == null ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
2132
+ return !!(scope && obj instanceof scope.Element);
2133
+ }, isReplacedElement = function(target) {
2134
+ switch (target.tagName) {
2135
+ case "INPUT":
2136
+ if (target.type !== "image")
2137
+ break;
2138
+ case "VIDEO":
2139
+ case "AUDIO":
2140
+ case "EMBED":
2141
+ case "OBJECT":
2142
+ case "CANVAS":
2143
+ case "IFRAME":
2144
+ case "IMG":
2145
+ return !0;
2146
+ }
2147
+ return !1;
2148
+ }, global$1 = typeof window < "u" ? window : {}, cache = /* @__PURE__ */ new WeakMap(), scrollRegexp = /auto|scroll/, verticalRegexp = /^tb|vertical/, IE = /msie|trident/i.test(global$1.navigator && global$1.navigator.userAgent), parseDimension = function(pixel) {
2149
+ return parseFloat(pixel || "0");
2150
+ }, size$1 = function(inlineSize, blockSize, switchSizes) {
2151
+ return inlineSize === void 0 && (inlineSize = 0), blockSize === void 0 && (blockSize = 0), switchSizes === void 0 && (switchSizes = !1), new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);
2152
+ }, zeroBoxes = freeze({
2153
+ devicePixelContentBoxSize: size$1(),
2154
+ borderBoxSize: size$1(),
2155
+ contentBoxSize: size$1(),
2156
+ contentRect: new DOMRectReadOnly(0, 0, 0, 0)
2157
+ }), calculateBoxSizes = function(target, forceRecalculation) {
2158
+ if (forceRecalculation === void 0 && (forceRecalculation = !1), cache.has(target) && !forceRecalculation)
2159
+ return cache.get(target);
2160
+ if (isHidden(target))
2161
+ return cache.set(target, zeroBoxes), zeroBoxes;
2162
+ var cs = getComputedStyle(target), svg = isSVG(target) && target.ownerSVGElement && target.getBBox(), removePadding = !IE && cs.boxSizing === "border-box", switchSizes = verticalRegexp.test(cs.writingMode || ""), canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || ""), canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || ""), paddingTop = svg ? 0 : parseDimension(cs.paddingTop), paddingRight = svg ? 0 : parseDimension(cs.paddingRight), paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom), paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft), borderTop2 = svg ? 0 : parseDimension(cs.borderTopWidth), borderRight2 = svg ? 0 : parseDimension(cs.borderRightWidth), borderBottom2 = svg ? 0 : parseDimension(cs.borderBottomWidth), borderLeft2 = svg ? 0 : parseDimension(cs.borderLeftWidth), horizontalPadding = paddingLeft + paddingRight, verticalPadding = paddingTop + paddingBottom, horizontalBorderArea = borderLeft2 + borderRight2, verticalBorderArea = borderTop2 + borderBottom2, horizontalScrollbarThickness = canScrollHorizontally ? target.offsetHeight - verticalBorderArea - target.clientHeight : 0, verticalScrollbarThickness = canScrollVertically ? target.offsetWidth - horizontalBorderArea - target.clientWidth : 0, widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0, heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0, contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness, contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness, borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea, borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea, boxes = freeze({
2163
+ devicePixelContentBoxSize: size$1(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),
2164
+ borderBoxSize: size$1(borderBoxWidth, borderBoxHeight, switchSizes),
2165
+ contentBoxSize: size$1(contentWidth, contentHeight, switchSizes),
2166
+ contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)
2167
+ });
2168
+ return cache.set(target, boxes), boxes;
2169
+ }, calculateBoxSize = function(target, observedBox, forceRecalculation) {
2170
+ var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;
2171
+ switch (observedBox) {
2172
+ case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:
2173
+ return devicePixelContentBoxSize;
2174
+ case ResizeObserverBoxOptions.BORDER_BOX:
2175
+ return borderBoxSize;
2176
+ default:
2177
+ return contentBoxSize;
2178
+ }
2179
+ }, ResizeObserverEntry = /* @__PURE__ */ function() {
2180
+ function ResizeObserverEntry2(target) {
2181
+ var boxes = calculateBoxSizes(target);
2182
+ this.target = target, this.contentRect = boxes.contentRect, this.borderBoxSize = freeze([boxes.borderBoxSize]), this.contentBoxSize = freeze([boxes.contentBoxSize]), this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);
2183
+ }
2184
+ return ResizeObserverEntry2;
2185
+ }(), calculateDepthForNode = function(node) {
2186
+ if (isHidden(node))
2187
+ return 1 / 0;
2188
+ for (var depth = 0, parent = node.parentNode; parent; )
2189
+ depth += 1, parent = parent.parentNode;
2190
+ return depth;
2191
+ }, broadcastActiveObservations = function() {
2192
+ var shallowestDepth = 1 / 0, callbacks2 = [];
2193
+ resizeObservers.forEach(function(ro) {
2194
+ if (ro.activeTargets.length !== 0) {
2195
+ var entries = [];
2196
+ ro.activeTargets.forEach(function(ot) {
2197
+ var entry = new ResizeObserverEntry(ot.target), targetDepth = calculateDepthForNode(ot.target);
2198
+ entries.push(entry), ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox), targetDepth < shallowestDepth && (shallowestDepth = targetDepth);
2199
+ }), callbacks2.push(function() {
2200
+ ro.callback.call(ro.observer, entries, ro.observer);
2201
+ }), ro.activeTargets.splice(0, ro.activeTargets.length);
2202
+ }
2203
+ });
2204
+ for (var _i = 0, callbacks_1 = callbacks2; _i < callbacks_1.length; _i++) {
2205
+ var callback = callbacks_1[_i];
2206
+ callback();
2207
+ }
2208
+ return shallowestDepth;
2209
+ }, gatherActiveObservationsAtDepth = function(depth) {
2210
+ resizeObservers.forEach(function(ro) {
2211
+ ro.activeTargets.splice(0, ro.activeTargets.length), ro.skippedTargets.splice(0, ro.skippedTargets.length), ro.observationTargets.forEach(function(ot) {
2212
+ ot.isActive() && (calculateDepthForNode(ot.target) > depth ? ro.activeTargets.push(ot) : ro.skippedTargets.push(ot));
2213
+ });
2214
+ });
2215
+ }, process = function() {
2216
+ var depth = 0;
2217
+ for (gatherActiveObservationsAtDepth(depth); hasActiveObservations(); )
2218
+ depth = broadcastActiveObservations(), gatherActiveObservationsAtDepth(depth);
2219
+ return hasSkippedObservations() && deliverResizeLoopError(), depth > 0;
2220
+ }, trigger, callbacks = [], notify = function() {
2221
+ return callbacks.splice(0).forEach(function(cb) {
2222
+ return cb();
2223
+ });
2224
+ }, queueMicroTask = function(callback) {
2225
+ if (!trigger) {
2226
+ var toggle_1 = 0, el_1 = document.createTextNode(""), config = {
2227
+ characterData: !0
2228
+ };
2229
+ new MutationObserver(function() {
2230
+ return notify();
2231
+ }).observe(el_1, config), trigger = function() {
2232
+ el_1.textContent = "".concat(toggle_1 ? toggle_1-- : toggle_1++);
2233
+ };
2234
+ }
2235
+ callbacks.push(callback), trigger();
2236
+ }, queueResizeObserver = function(cb) {
2237
+ queueMicroTask(function() {
2238
+ requestAnimationFrame(cb);
2239
+ });
2240
+ }, watching = 0, isWatching = function() {
2241
+ return !!watching;
2242
+ }, CATCH_PERIOD = 250, observerConfig = {
2243
+ attributes: !0,
2244
+ characterData: !0,
2245
+ childList: !0,
2246
+ subtree: !0
2247
+ }, events = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], time = function(timeout) {
2248
+ return timeout === void 0 && (timeout = 0), Date.now() + timeout;
2249
+ }, scheduled = !1, Scheduler = function() {
2250
+ function Scheduler2() {
2251
+ var _this = this;
2252
+ this.stopped = !0, this.listener = function() {
2253
+ return _this.schedule();
2254
+ };
2255
+ }
2256
+ return Scheduler2.prototype.run = function(timeout) {
2257
+ var _this = this;
2258
+ if (timeout === void 0 && (timeout = CATCH_PERIOD), !scheduled) {
2259
+ scheduled = !0;
2260
+ var until = time(timeout);
2261
+ queueResizeObserver(function() {
2262
+ var elementsHaveResized = !1;
2263
+ try {
2264
+ elementsHaveResized = process();
2265
+ } finally {
2266
+ if (scheduled = !1, timeout = until - time(), !isWatching())
2267
+ return;
2268
+ elementsHaveResized ? _this.run(1e3) : timeout > 0 ? _this.run(timeout) : _this.start();
2269
+ }
2270
+ });
2271
+ }
2272
+ }, Scheduler2.prototype.schedule = function() {
2273
+ this.stop(), this.run();
2274
+ }, Scheduler2.prototype.observe = function() {
2275
+ var _this = this, cb = function() {
2276
+ return _this.observer && _this.observer.observe(document.body, observerConfig);
2277
+ };
2278
+ document.body ? cb() : global$1.addEventListener("DOMContentLoaded", cb);
2279
+ }, Scheduler2.prototype.start = function() {
2280
+ var _this = this;
2281
+ this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), events.forEach(function(name) {
2282
+ return global$1.addEventListener(name, _this.listener, !0);
2283
+ }));
2284
+ }, Scheduler2.prototype.stop = function() {
2285
+ var _this = this;
2286
+ this.stopped || (this.observer && this.observer.disconnect(), events.forEach(function(name) {
2287
+ return global$1.removeEventListener(name, _this.listener, !0);
2288
+ }), this.stopped = !0);
2289
+ }, Scheduler2;
2290
+ }(), scheduler = new Scheduler(), updateCount = function(n) {
2291
+ !watching && n > 0 && scheduler.start(), watching += n, !watching && scheduler.stop();
2292
+ }, skipNotifyOnElement = function(target) {
2293
+ return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === "inline";
2294
+ }, ResizeObservation = function() {
2295
+ function ResizeObservation2(target, observedBox) {
2296
+ this.target = target, this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX, this.lastReportedSize = {
2297
+ inlineSize: 0,
2298
+ blockSize: 0
2299
+ };
2300
+ }
2301
+ return ResizeObservation2.prototype.isActive = function() {
2302
+ var size2 = calculateBoxSize(this.target, this.observedBox, !0);
2303
+ return skipNotifyOnElement(this.target) && (this.lastReportedSize = size2), this.lastReportedSize.inlineSize !== size2.inlineSize || this.lastReportedSize.blockSize !== size2.blockSize;
2304
+ }, ResizeObservation2;
2305
+ }(), ResizeObserverDetail = /* @__PURE__ */ function() {
2306
+ function ResizeObserverDetail2(resizeObserver, callback) {
2307
+ this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = resizeObserver, this.callback = callback;
2308
+ }
2309
+ return ResizeObserverDetail2;
2310
+ }(), observerMap = /* @__PURE__ */ new WeakMap(), getObservationIndex = function(observationTargets, target) {
2311
+ for (var i = 0; i < observationTargets.length; i += 1)
2312
+ if (observationTargets[i].target === target)
2313
+ return i;
2314
+ return -1;
2315
+ }, ResizeObserverController = function() {
2316
+ function ResizeObserverController2() {
2317
+ }
2318
+ return ResizeObserverController2.connect = function(resizeObserver, callback) {
2319
+ var detail = new ResizeObserverDetail(resizeObserver, callback);
2320
+ observerMap.set(resizeObserver, detail);
2321
+ }, ResizeObserverController2.observe = function(resizeObserver, target, options) {
2322
+ var detail = observerMap.get(resizeObserver), firstObservation = detail.observationTargets.length === 0;
2323
+ getObservationIndex(detail.observationTargets, target) < 0 && (firstObservation && resizeObservers.push(detail), detail.observationTargets.push(new ResizeObservation(target, options && options.box)), updateCount(1), scheduler.schedule());
2324
+ }, ResizeObserverController2.unobserve = function(resizeObserver, target) {
2325
+ var detail = observerMap.get(resizeObserver), index = getObservationIndex(detail.observationTargets, target), lastObservation = detail.observationTargets.length === 1;
2326
+ index >= 0 && (lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1), detail.observationTargets.splice(index, 1), updateCount(-1));
2327
+ }, ResizeObserverController2.disconnect = function(resizeObserver) {
2328
+ var _this = this, detail = observerMap.get(resizeObserver);
2329
+ detail.observationTargets.slice().forEach(function(ot) {
2330
+ return _this.unobserve(resizeObserver, ot.target);
2331
+ }), detail.activeTargets.splice(0, detail.activeTargets.length);
2332
+ }, ResizeObserverController2;
2333
+ }(), ResizeObserver = function() {
2334
+ function ResizeObserver2(callback) {
2335
+ if (arguments.length === 0)
2336
+ throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
2337
+ if (typeof callback != "function")
2338
+ throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
2339
+ ResizeObserverController.connect(this, callback);
2340
+ }
2341
+ return ResizeObserver2.prototype.observe = function(target, options) {
2342
+ if (arguments.length === 0)
2343
+ throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
2344
+ if (!isElement(target))
2345
+ throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
2346
+ ResizeObserverController.observe(this, target, options);
2347
+ }, ResizeObserver2.prototype.unobserve = function(target) {
2348
+ if (arguments.length === 0)
2349
+ throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
2350
+ if (!isElement(target))
2351
+ throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
2352
+ ResizeObserverController.unobserve(this, target);
2353
+ }, ResizeObserver2.prototype.disconnect = function() {
2354
+ ResizeObserverController.disconnect(this);
2355
+ }, ResizeObserver2.toString = function() {
2356
+ return "function ResizeObserver () { [polyfill code] }";
2357
+ }, ResizeObserver2;
2358
+ }();
2359
+ const _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver, _elementSizeObserver = _createElementSizeObserver();
2360
+ function _createElementRectValueListener() {
2361
+ return {
2362
+ subscribe(element, subscriber) {
2363
+ const resizeObserver = new _ResizeObserver(([entry]) => {
2364
+ subscriber({
2365
+ _contentRect: entry.contentRect,
2366
+ border: {
2367
+ width: entry.borderBoxSize[0].inlineSize,
2368
+ height: entry.borderBoxSize[0].blockSize
2369
+ },
2370
+ content: {
2371
+ width: entry.contentRect.width,
2372
+ height: entry.contentRect.height
2373
+ }
2374
+ });
2375
+ });
2376
+ return resizeObserver.observe(element), () => {
2377
+ resizeObserver.unobserve(element), resizeObserver.disconnect();
2378
+ };
2379
+ }
2380
+ };
2381
+ }
2382
+ function _createElementSizeObserver() {
2383
+ const disposeCache = /* @__PURE__ */ new WeakMap(), subscribersCache = /* @__PURE__ */ new WeakMap();
2384
+ return {
2385
+ subscribe(element, subscriber) {
2386
+ const subscribers = subscribersCache.get(element) || [];
2387
+ let dispose = disposeCache.get(element);
2388
+ return subscribersCache.has(element) || (subscribersCache.set(element, subscribers), dispose = _createElementRectValueListener().subscribe(element, (elementRect) => {
2389
+ for (const sub of subscribers)
2390
+ sub(elementRect);
2391
+ })), subscribers.push(subscriber), () => {
2392
+ const idx = subscribers.indexOf(subscriber);
2393
+ idx > -1 && subscribers.splice(idx, 1), subscribers.length === 0 && dispose && dispose();
2394
+ };
2395
+ }
2396
+ };
2397
+ }
2398
+ function useElementSize(element) {
2399
+ const $ = c(3), [size2, setSize] = useState(null);
2400
+ let t0, t1;
2401
+ return $[0] !== element ? (t0 = () => {
2402
+ if (element)
2403
+ return _elementSizeObserver.subscribe(element, setSize);
2404
+ }, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1), size2;
2405
+ }
2406
+ function useElementRect(element) {
2407
+ const elementSize = useElementSize(element);
2408
+ return (elementSize == null ? void 0 : elementSize._contentRect) || null;
2409
+ }
2410
+ function useGlobalKeyDown(onKeyDown) {
2411
+ const $ = c(3);
2412
+ let t0, t1;
2413
+ return $[0] !== onKeyDown ? (t0 = () => (addEventListener("keydown", onKeyDown), () => removeEventListener("keydown", onKeyDown)), t1 = [onKeyDown], $[0] = onKeyDown, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1);
2414
+ }
2415
+ const MEDIA_STORE_CACHE = /* @__PURE__ */ new WeakMap();
2416
+ function _getMediaQuery(media, index) {
2417
+ return index === 0 ? `screen and (max-width: ${media[index] - 1}px)` : index === media.length ? `screen and (min-width: ${media[index - 1]}px)` : `screen and (min-width: ${media[index - 1]}px) and (max-width: ${media[index] - 1}px)`;
2418
+ }
2419
+ function _createMediaStore(media) {
2420
+ const mediaLen = media.length;
2421
+ let sizes;
2422
+ const getSizes = () => {
2423
+ if (!sizes) {
2424
+ sizes = [];
2425
+ for (let index = mediaLen; index > -1; index -= 1) {
2426
+ const mediaQuery = _getMediaQuery(media, index);
2427
+ sizes.push({
2428
+ index,
2429
+ mq: window.matchMedia(mediaQuery)
2430
+ });
2431
+ }
2432
+ }
2433
+ return sizes;
2434
+ };
2435
+ return {
2436
+ getSnapshot: () => {
2437
+ for (const {
2438
+ index,
2439
+ mq
2440
+ } of getSizes())
2441
+ if (mq.matches) return index;
2442
+ return 0;
2443
+ },
2444
+ subscribe: (onStoreChange) => {
2445
+ const disposeFns = [];
2446
+ for (const {
2447
+ mq
2448
+ } of getSizes()) {
2449
+ const handleChange = () => {
2450
+ mq.matches && onStoreChange();
2451
+ };
2452
+ mq.addEventListener("change", handleChange), disposeFns.push(() => mq.removeEventListener("change", handleChange));
2453
+ }
2454
+ return () => {
2455
+ for (const disposeFn of disposeFns)
2456
+ disposeFn();
2457
+ };
2458
+ }
2459
+ };
2460
+ }
2461
+ function getServerSnapshot$2() {
2462
+ return 0;
2463
+ }
2464
+ function useMediaIndex() {
2465
+ const $ = c(4), {
2466
+ media
2467
+ } = useTheme_v2();
2468
+ let t0;
2469
+ $[0] !== media ? (t0 = MEDIA_STORE_CACHE.get(media), $[0] = media, $[1] = t0) : t0 = $[1];
2470
+ let store = t0;
2471
+ return store || ($[2] !== media ? (store = _createMediaStore(media), MEDIA_STORE_CACHE.set(media, store), $[2] = media, $[3] = store) : store = $[3]), useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot$2);
2472
+ }
2473
+ let MEDIA_QUERY_CACHE$1;
2474
+ function getMatchMedia$1() {
2475
+ return MEDIA_QUERY_CACHE$1 || (MEDIA_QUERY_CACHE$1 = window.matchMedia("(prefers-color-scheme: dark)")), MEDIA_QUERY_CACHE$1;
2476
+ }
2477
+ function subscribe$2(onStoreChange) {
2478
+ const matchMedia = getMatchMedia$1();
2479
+ return matchMedia.addEventListener("change", onStoreChange), () => matchMedia.removeEventListener("change", onStoreChange);
2480
+ }
2481
+ function getSnapshot$1() {
2482
+ return getMatchMedia$1().matches;
2483
+ }
2484
+ function getServerSnapshot$1() {
2485
+ return !1;
2486
+ }
2487
+ function usePrefersDark() {
2488
+ return useSyncExternalStore(subscribe$2, getSnapshot$1, getServerSnapshot$1);
2489
+ }
2490
+ let MEDIA_QUERY_CACHE;
2491
+ function getMatchMedia() {
2492
+ return MEDIA_QUERY_CACHE || (MEDIA_QUERY_CACHE = window.matchMedia("(prefers-reduced-motion: reduce)")), MEDIA_QUERY_CACHE;
2493
+ }
2494
+ function subscribe$1(onStoreChange) {
2495
+ const matchMedia = getMatchMedia();
2496
+ return matchMedia.addEventListener("change", onStoreChange), () => matchMedia.removeEventListener("change", onStoreChange);
2497
+ }
2498
+ function getSnapshot() {
2499
+ return getMatchMedia().matches;
2500
+ }
2501
+ function getServerSnapshot() {
2502
+ return !1;
2503
+ }
2504
+ function usePrefersReducedMotion() {
2505
+ return useSyncExternalStore(subscribe$1, getSnapshot, getServerSnapshot);
2506
+ }
2507
+ function useForwardedRef(ref) {
2508
+ const $ = c(1), innerRef = useRef(null);
2509
+ let t0;
2510
+ return $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => innerRef.current, $[0] = t0) : t0 = $[0], useImperativeHandle(ref, t0), innerRef;
2511
+ }
2512
+ function useCustomValidity(ref, customValidity) {
2513
+ const $ = c(6);
2514
+ let t0;
2515
+ $[0] !== ref.current || $[1] !== customValidity ? (t0 = () => {
2516
+ var _a;
2517
+ (_a = ref.current) == null || _a.setCustomValidity(customValidity || "");
2518
+ }, $[0] = ref.current, $[1] = customValidity, $[2] = t0) : t0 = $[2];
2519
+ let t1;
2520
+ $[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], useEffect(t0, t1);
2343
2521
  }
2344
- const Root$s = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = forwardRef(function(props, ref) {
2345
- const $ = c(42);
2346
- let t0, t1, t2, t3, asProp, border2, borderTop2, borderRight2, borderBottom2, borderLeft2, shadow, pressed, selected, restProps, muted, scheme;
2347
- $[0] !== props ? ({
2348
- __unstable_checkered: t0,
2349
- __unstable_focusRing: t1,
2350
- as: asProp,
2351
- border: border2,
2352
- borderTop: borderTop2,
2353
- borderRight: borderRight2,
2354
- borderBottom: borderBottom2,
2355
- borderLeft: borderLeft2,
2356
- muted,
2357
- pressed,
2358
- radius: t2,
2359
- scheme,
2360
- selected,
2361
- shadow,
2362
- tone: t3,
2363
- ...restProps
2364
- } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = t3, $[5] = asProp, $[6] = border2, $[7] = borderTop2, $[8] = borderRight2, $[9] = borderBottom2, $[10] = borderLeft2, $[11] = shadow, $[12] = pressed, $[13] = selected, $[14] = restProps, $[15] = muted, $[16] = scheme) : (t0 = $[1], t1 = $[2], t2 = $[3], t3 = $[4], asProp = $[5], border2 = $[6], borderTop2 = $[7], borderRight2 = $[8], borderBottom2 = $[9], borderLeft2 = $[10], shadow = $[11], pressed = $[12], selected = $[13], restProps = $[14], muted = $[15], scheme = $[16]);
2365
- const checkered = t0 === void 0 ? !1 : t0, focusRing = t1 === void 0 ? !1 : t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp, t4 = typeof as == "string" ? as : void 0, t5 = useArrayProp(border2), t6 = useArrayProp(borderTop2), t7 = useArrayProp(borderRight2), t8 = useArrayProp(borderBottom2), t9 = useArrayProp(borderLeft2), t10 = useArrayProp(radius), t11 = useArrayProp(shadow), t12 = checkered ? "" : void 0, t13 = pressed ? "" : void 0, t14 = selected ? "" : void 0;
2366
- let t15;
2367
- $[17] !== t4 || $[18] !== rootTheme.scheme || $[19] !== tone || $[20] !== restProps || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 || $[25] !== t9 || $[26] !== checkered || $[27] !== focusRing || $[28] !== muted || $[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t13 || $[33] !== t14 || $[34] !== as || $[35] !== ref || $[36] !== selected ? (t15 = /* @__PURE__ */ jsx(Root$s, { "data-as": t4, "data-scheme": rootTheme.scheme, "data-ui": "Card", "data-tone": tone, ...restProps, $border: t5, $borderTop: t6, $borderRight: t7, $borderBottom: t8, $borderLeft: t9, $checkered: checkered, $focusRing: focusRing, $muted: muted, $radius: t10, $shadow: t11, $tone: tone, "data-checkered": t12, "data-pressed": t13, "data-selected": t14, forwardedAs: as, ref, selected }), $[17] = t4, $[18] = rootTheme.scheme, $[19] = tone, $[20] = restProps, $[21] = t5, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9, $[26] = checkered, $[27] = focusRing, $[28] = muted, $[29] = t10, $[30] = t11, $[31] = t12, $[32] = t13, $[33] = t14, $[34] = as, $[35] = ref, $[36] = selected, $[37] = t15) : t15 = $[37];
2368
- let t16;
2369
- return $[38] !== scheme || $[39] !== tone || $[40] !== t15 ? (t16 = /* @__PURE__ */ jsx(ThemeColorProvider, { scheme, tone, children: t15 }), $[38] = scheme, $[39] = tone, $[40] = t15, $[41] = t16) : t16 = $[41], t16;
2370
- });
2371
2522
  function checkboxBaseStyles() {
2372
2523
  return css`
2373
2524
  position: relative;
@@ -2691,7 +2842,7 @@ function codeBaseStyle() {
2691
2842
  `;
2692
2843
  }
2693
2844
  const Root$q = styled.pre(codeBaseStyle, responsiveCodeFontStyle), Code = forwardRef(function(props, ref) {
2694
- const $ = c(23);
2845
+ const $ = c(25);
2695
2846
  let t0, languageProp, children, restProps, weight;
2696
2847
  $[0] !== props ? ({
2697
2848
  children,
@@ -2703,16 +2854,19 @@ const Root$q = styled.pre(codeBaseStyle, responsiveCodeFontStyle), Code = forwar
2703
2854
  const size2 = t0 === void 0 ? 2 : t0, language = typeof languageProp == "string" ? languageProp : void 0;
2704
2855
  let t1;
2705
2856
  $[6] !== language ? (t1 = language ? Refractor.hasLanguage(language) : !1, $[6] = language, $[7] = t1) : t1 = $[7];
2706
- const registered = t1, t2 = useArrayProp(size2);
2707
- let t3;
2708
- $[8] !== language || $[9] !== registered || $[10] !== children ? (t3 = !(language && registered) && /* @__PURE__ */ jsx("code", { children }), $[8] = language, $[9] = registered, $[10] = children, $[11] = t3) : t3 = $[11];
2857
+ const registered = t1;
2858
+ let t2, t3;
2859
+ $[8] !== size2 ? (t3 = _getArrayProp(size2), $[8] = size2, $[9] = t3) : t3 = $[9], t2 = t3;
2860
+ const $size = t2;
2709
2861
  let t4;
2710
- $[12] !== language || $[13] !== registered || $[14] !== children ? (t4 = language && registered && /* @__PURE__ */ jsx(Refractor, { inline: !0, language, value: String(children) }), $[12] = language, $[13] = registered, $[14] = children, $[15] = t4) : t4 = $[15];
2862
+ $[10] !== language || $[11] !== registered || $[12] !== children ? (t4 = !(language && registered) && /* @__PURE__ */ jsx("code", { children }), $[10] = language, $[11] = registered, $[12] = children, $[13] = t4) : t4 = $[13];
2711
2863
  let t5;
2712
- return $[16] !== restProps || $[17] !== t2 || $[18] !== weight || $[19] !== ref || $[20] !== t3 || $[21] !== t4 ? (t5 = /* @__PURE__ */ jsxs(Root$q, { "data-ui": "Code", ...restProps, $size: t2, $weight: weight, ref, children: [
2713
- t3,
2714
- t4
2715
- ] }), $[16] = restProps, $[17] = t2, $[18] = weight, $[19] = ref, $[20] = t3, $[21] = t4, $[22] = t5) : t5 = $[22], t5;
2864
+ $[14] !== language || $[15] !== registered || $[16] !== children ? (t5 = language && registered && /* @__PURE__ */ jsx(Refractor, { inline: !0, language, value: String(children) }), $[14] = language, $[15] = registered, $[16] = children, $[17] = t5) : t5 = $[17];
2865
+ let t6;
2866
+ return $[18] !== restProps || $[19] !== $size || $[20] !== weight || $[21] !== ref || $[22] !== t4 || $[23] !== t5 ? (t6 = /* @__PURE__ */ jsxs(Root$q, { "data-ui": "Code", ...restProps, $size, $weight: weight, ref, children: [
2867
+ t4,
2868
+ t5
2869
+ ] }), $[18] = restProps, $[19] = $size, $[20] = weight, $[21] = ref, $[22] = t4, $[23] = t5, $[24] = t6) : t6 = $[24], t6;
2716
2870
  }), BASE_STYLE$1 = {
2717
2871
  width: "100%",
2718
2872
  margin: "0 auto"
@@ -2730,19 +2884,22 @@ function responsiveContainerWidthStyle(props) {
2730
2884
  }));
2731
2885
  }
2732
2886
  const Root$p = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle), Container = forwardRef(function(props, ref) {
2733
- const $ = c(9);
2887
+ const $ = c(11);
2734
2888
  let t0, restProps, as;
2735
2889
  $[0] !== props ? ({
2736
2890
  as,
2737
2891
  width: t0,
2738
2892
  ...restProps
2739
2893
  } = props, $[0] = props, $[1] = t0, $[2] = restProps, $[3] = as) : (t0 = $[1], restProps = $[2], as = $[3]);
2740
- const t1 = useArrayProp(t0 === void 0 ? 2 : t0);
2741
- let t2;
2742
- return $[4] !== restProps || $[5] !== t1 || $[6] !== as || $[7] !== ref ? (t2 = /* @__PURE__ */ jsx(Root$p, { "data-ui": "Container", ...restProps, $width: t1, forwardedAs: as, ref }), $[4] = restProps, $[5] = t1, $[6] = as, $[7] = ref, $[8] = t2) : t2 = $[8], t2;
2894
+ const width = t0 === void 0 ? 2 : t0;
2895
+ let t1, t2;
2896
+ $[4] !== width ? (t2 = _getArrayProp(width), $[4] = width, $[5] = t2) : t2 = $[5], t1 = t2;
2897
+ const $width = t1;
2898
+ let t3;
2899
+ return $[6] !== restProps || $[7] !== $width || $[8] !== as || $[9] !== ref ? (t3 = /* @__PURE__ */ jsx(Root$p, { "data-ui": "Container", ...restProps, $width, forwardedAs: as, ref }), $[6] = restProps, $[7] = $width, $[8] = as, $[9] = ref, $[10] = t3) : t3 = $[10], t3;
2743
2900
  }), Root$o = styled(Box)(responsiveGridStyle), Grid = forwardRef(function(props, ref) {
2744
- const $ = c(26);
2745
- let as, autoRows, autoCols, autoFlow, columns, gap, gapX, gapY, rows, restProps, children;
2901
+ const $ = c(42);
2902
+ let autoRows, autoCols, autoFlow, columns, gap, gapX, gapY, rows, as, restProps, children;
2746
2903
  $[0] !== props ? ({
2747
2904
  as,
2748
2905
  autoRows,
@@ -2755,10 +2912,33 @@ const Root$p = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle), C
2755
2912
  rows,
2756
2913
  children,
2757
2914
  ...restProps
2758
- } = props, $[0] = props, $[1] = as, $[2] = autoRows, $[3] = autoCols, $[4] = autoFlow, $[5] = columns, $[6] = gap, $[7] = gapX, $[8] = gapY, $[9] = rows, $[10] = restProps, $[11] = children) : (as = $[1], autoRows = $[2], autoCols = $[3], autoFlow = $[4], columns = $[5], gap = $[6], gapX = $[7], gapY = $[8], rows = $[9], restProps = $[10], children = $[11]);
2759
- const t0 = typeof as == "string" ? as : void 0, t1 = useArrayProp(autoRows), t2 = useArrayProp(autoCols), t3 = useArrayProp(autoFlow), t4 = useArrayProp(columns), t5 = useArrayProp(gap), t6 = useArrayProp(gapX), t7 = useArrayProp(gapY), t8 = useArrayProp(rows);
2760
- let t9;
2761
- return $[12] !== t0 || $[13] !== restProps || $[14] !== t1 || $[15] !== t2 || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 || $[19] !== t6 || $[20] !== t7 || $[21] !== t8 || $[22] !== as || $[23] !== ref || $[24] !== children ? (t9 = /* @__PURE__ */ jsx(Root$o, { "data-as": t0, "data-ui": "Grid", ...restProps, $autoRows: t1, $autoCols: t2, $autoFlow: t3, $columns: t4, $gap: t5, $gapX: t6, $gapY: t7, $rows: t8, forwardedAs: as, ref, children }), $[12] = t0, $[13] = restProps, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = t7, $[21] = t8, $[22] = as, $[23] = ref, $[24] = children, $[25] = t9) : t9 = $[25], t9;
2915
+ } = props, $[0] = props, $[1] = autoRows, $[2] = autoCols, $[3] = autoFlow, $[4] = columns, $[5] = gap, $[6] = gapX, $[7] = gapY, $[8] = rows, $[9] = as, $[10] = restProps, $[11] = children) : (autoRows = $[1], autoCols = $[2], autoFlow = $[3], columns = $[4], gap = $[5], gapX = $[6], gapY = $[7], rows = $[8], as = $[9], restProps = $[10], children = $[11]);
2916
+ let t0, t1;
2917
+ $[12] !== autoRows ? (t1 = _getArrayProp(autoRows), $[12] = autoRows, $[13] = t1) : t1 = $[13], t0 = t1;
2918
+ const $autoRows = t0;
2919
+ let t2, t3;
2920
+ $[14] !== autoCols ? (t3 = _getArrayProp(autoCols), $[14] = autoCols, $[15] = t3) : t3 = $[15], t2 = t3;
2921
+ const $autoCols = t2;
2922
+ let t4, t5;
2923
+ $[16] !== autoFlow ? (t5 = _getArrayProp(autoFlow), $[16] = autoFlow, $[17] = t5) : t5 = $[17], t4 = t5;
2924
+ const $autoFlow = t4;
2925
+ let t6, t7;
2926
+ $[18] !== columns ? (t7 = _getArrayProp(columns), $[18] = columns, $[19] = t7) : t7 = $[19], t6 = t7;
2927
+ const $columns = t6;
2928
+ let t8, t9;
2929
+ $[20] !== gap ? (t9 = _getArrayProp(gap), $[20] = gap, $[21] = t9) : t9 = $[21], t8 = t9;
2930
+ const $gap = t8;
2931
+ let t10, t11;
2932
+ $[22] !== gapX ? (t11 = _getArrayProp(gapX), $[22] = gapX, $[23] = t11) : t11 = $[23], t10 = t11;
2933
+ const $gapX = t10;
2934
+ let t12, t13;
2935
+ $[24] !== gapY ? (t13 = _getArrayProp(gapY), $[24] = gapY, $[25] = t13) : t13 = $[25], t12 = t13;
2936
+ const $gapY = t12;
2937
+ let t14, t15;
2938
+ $[26] !== rows ? (t15 = _getArrayProp(rows), $[26] = rows, $[27] = t15) : t15 = $[27], t14 = t15;
2939
+ const $rows = t14, t16 = typeof as == "string" ? as : void 0;
2940
+ let t17;
2941
+ return $[28] !== t16 || $[29] !== restProps || $[30] !== $autoRows || $[31] !== $autoCols || $[32] !== $autoFlow || $[33] !== $columns || $[34] !== $gap || $[35] !== $gapX || $[36] !== $gapY || $[37] !== $rows || $[38] !== as || $[39] !== ref || $[40] !== children ? (t17 = /* @__PURE__ */ jsx(Root$o, { "data-as": t16, "data-ui": "Grid", ...restProps, $autoRows, $autoCols, $autoFlow, $columns, $gap, $gapX, $gapY, $rows, forwardedAs: as, ref, children }), $[28] = t16, $[29] = restProps, $[30] = $autoRows, $[31] = $autoCols, $[32] = $autoFlow, $[33] = $columns, $[34] = $gap, $[35] = $gapX, $[36] = $gapY, $[37] = $rows, $[38] = as, $[39] = ref, $[40] = children, $[41] = t17) : t17 = $[41], t17;
2762
2942
  });
2763
2943
  function headingBaseStyle(props) {
2764
2944
  const {
@@ -2826,8 +3006,8 @@ const Root$n = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsive
2826
3006
  overflow: hidden;
2827
3007
  overflow: clip;
2828
3008
  `, Heading = forwardRef(function(props, ref) {
2829
- const $ = c(22);
2830
- let t0, t1, t2, childrenProp, textOverflow, align, restProps, weight;
3009
+ const $ = c(26);
3010
+ let t0, t1, t2, align, childrenProp, textOverflow, restProps, weight;
2831
3011
  $[0] !== props ? ({
2832
3012
  accent: t0,
2833
3013
  align,
@@ -2837,18 +3017,23 @@ const Root$n = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsive
2837
3017
  textOverflow,
2838
3018
  weight,
2839
3019
  ...restProps
2840
- } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = childrenProp, $[5] = textOverflow, $[6] = align, $[7] = restProps, $[8] = weight) : (t0 = $[1], t1 = $[2], t2 = $[3], childrenProp = $[4], textOverflow = $[5], align = $[6], restProps = $[7], weight = $[8]);
3020
+ } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = align, $[5] = childrenProp, $[6] = textOverflow, $[7] = restProps, $[8] = weight) : (t0 = $[1], t1 = $[2], t2 = $[3], align = $[4], childrenProp = $[5], textOverflow = $[6], restProps = $[7], weight = $[8]);
2841
3021
  const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
3022
+ let t3, t4;
3023
+ $[9] !== size2 ? (t4 = _getArrayProp(size2), $[9] = size2, $[10] = t4) : t4 = $[10], t3 = t4;
3024
+ const $size = t3;
3025
+ let t5, t6;
3026
+ $[11] !== align ? (t6 = _getArrayProp(align), $[11] = align, $[12] = t6) : t6 = $[12], t5 = t6;
3027
+ const $align = t5;
2842
3028
  let children = childrenProp;
2843
3029
  if (textOverflow === "ellipsis") {
2844
- let t32;
2845
- $[9] !== children ? (t32 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t32) : t32 = $[10], children = t32;
3030
+ let t72;
3031
+ $[13] !== children ? (t72 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[13] = children, $[14] = t72) : t72 = $[14], children = t72;
2846
3032
  }
2847
- const t3 = useArrayProp(align), t4 = useArrayProp(size2);
2848
- let t5;
2849
- $[11] !== children ? (t5 = /* @__PURE__ */ jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
2850
- let t6;
2851
- return $[13] !== restProps || $[14] !== accent || $[15] !== t3 || $[16] !== muted || $[17] !== t4 || $[18] !== weight || $[19] !== ref || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx(Root$n, { "data-ui": "Heading", ...restProps, $accent: accent, $align: t3, $muted: muted, $size: t4, $weight: weight, ref, children: t5 }), $[13] = restProps, $[14] = accent, $[15] = t3, $[16] = muted, $[17] = t4, $[18] = weight, $[19] = ref, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
3033
+ let t7;
3034
+ $[15] !== children ? (t7 = /* @__PURE__ */ jsx("span", { children }), $[15] = children, $[16] = t7) : t7 = $[16];
3035
+ let t8;
3036
+ return $[17] !== restProps || $[18] !== accent || $[19] !== $align || $[20] !== $size || $[21] !== muted || $[22] !== weight || $[23] !== ref || $[24] !== t7 ? (t8 = /* @__PURE__ */ jsx(Root$n, { "data-ui": "Heading", ...restProps, $accent: accent, $align, $size, $muted: muted, $weight: weight, ref, children: t7 }), $[17] = restProps, $[18] = accent, $[19] = $align, $[20] = $size, $[21] = muted, $[22] = weight, $[23] = ref, $[24] = t7, $[25] = t8) : t8 = $[25], t8;
2852
3037
  });
2853
3038
  function inlineBaseStyle() {
2854
3039
  return {
@@ -2878,24 +3063,27 @@ function inlineSpaceStyle(props) {
2878
3063
  });
2879
3064
  }
2880
3065
  const Root$m = styled(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = forwardRef(function(props, ref) {
2881
- const $ = c(14);
2882
- let childrenProp, space, restProps, as;
3066
+ const $ = c(16);
3067
+ let space, childrenProp, restProps, as;
2883
3068
  $[0] !== props ? ({
2884
3069
  as,
2885
3070
  children: childrenProp,
2886
3071
  space,
2887
3072
  ...restProps
2888
- } = props, $[0] = props, $[1] = childrenProp, $[2] = space, $[3] = restProps, $[4] = as) : (childrenProp = $[1], space = $[2], restProps = $[3], as = $[4]);
3073
+ } = props, $[0] = props, $[1] = space, $[2] = childrenProp, $[3] = restProps, $[4] = as) : (space = $[1], childrenProp = $[2], restProps = $[3], as = $[4]);
2889
3074
  let t0, t1;
2890
- if ($[5] !== childrenProp) {
2891
- let t22;
2892
- $[7] === Symbol.for("react.memo_cache_sentinel") ? (t22 = (child) => child && /* @__PURE__ */ jsx("div", { children: child }), $[7] = t22) : t22 = $[7], t1 = Children.map(childrenProp, t22), $[5] = childrenProp, $[6] = t1;
3075
+ $[5] !== space ? (t1 = _getArrayProp(space), $[5] = space, $[6] = t1) : t1 = $[6], t0 = t1;
3076
+ const $space = t0;
3077
+ let t2, t3;
3078
+ if ($[7] !== childrenProp) {
3079
+ let t42;
3080
+ $[9] === Symbol.for("react.memo_cache_sentinel") ? (t42 = (child) => child && /* @__PURE__ */ jsx("div", { children: child }), $[9] = t42) : t42 = $[9], t3 = Children.map(childrenProp, t42), $[7] = childrenProp, $[8] = t3;
2893
3081
  } else
2894
- t1 = $[6];
2895
- t0 = t1;
2896
- const children = t0, t2 = useArrayProp(space), t3 = ref;
2897
- let t4;
2898
- return $[8] !== restProps || $[9] !== t2 || $[10] !== as || $[11] !== t3 || $[12] !== children ? (t4 = /* @__PURE__ */ jsx(Root$m, { "data-ui": "Inline", ...restProps, $space: t2, forwardedAs: as, ref: t3, children }), $[8] = restProps, $[9] = t2, $[10] = as, $[11] = t3, $[12] = children, $[13] = t4) : t4 = $[13], t4;
3082
+ t3 = $[8];
3083
+ t2 = t3;
3084
+ const children = t2, t4 = ref;
3085
+ let t5;
3086
+ return $[10] !== restProps || $[11] !== $space || $[12] !== as || $[13] !== t4 || $[14] !== children ? (t5 = /* @__PURE__ */ jsx(Root$m, { "data-ui": "Inline", ...restProps, $space, forwardedAs: as, ref: t4, children }), $[10] = restProps, $[11] = $space, $[12] = as, $[13] = t4, $[14] = children, $[15] = t5) : t5 = $[15], t5;
2899
3087
  });
2900
3088
  function kbdStyle() {
2901
3089
  return css`
@@ -2915,7 +3103,7 @@ function kbdStyle() {
2915
3103
  `;
2916
3104
  }
2917
3105
  const Root$l = styled.kbd(responsiveRadiusStyle, kbdStyle), KBD = forwardRef(function(props, ref) {
2918
- const $ = c(17);
3106
+ const $ = c(19);
2919
3107
  let t0, t1, t2, children, restProps;
2920
3108
  $[0] !== props ? ({
2921
3109
  children,
@@ -2924,13 +3112,16 @@ const Root$l = styled.kbd(responsiveRadiusStyle, kbdStyle), KBD = forwardRef(fun
2924
3112
  radius: t2,
2925
3113
  ...restProps
2926
3114
  } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = children, $[5] = restProps) : (t0 = $[1], t1 = $[2], t2 = $[3], children = $[4], restProps = $[5]);
2927
- const fontSize2 = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, t3 = useArrayProp(t2 === void 0 ? 2 : t2);
2928
- let t4;
2929
- $[6] !== fontSize2 || $[7] !== children ? (t4 = /* @__PURE__ */ jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }), $[6] = fontSize2, $[7] = children, $[8] = t4) : t4 = $[8];
3115
+ const fontSize2 = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? 2 : t2;
3116
+ let t3, t4;
3117
+ $[6] !== radius ? (t4 = _getArrayProp(radius), $[6] = radius, $[7] = t4) : t4 = $[7], t3 = t4;
3118
+ const $radius = t3;
2930
3119
  let t5;
2931
- $[9] !== padding || $[10] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, { as: "span", padding, children: t4 }), $[9] = padding, $[10] = t4, $[11] = t5) : t5 = $[11];
3120
+ $[8] !== fontSize2 || $[9] !== children ? (t5 = /* @__PURE__ */ jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }), $[8] = fontSize2, $[9] = children, $[10] = t5) : t5 = $[10];
2932
3121
  let t6;
2933
- return $[12] !== restProps || $[13] !== t3 || $[14] !== ref || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsx(Root$l, { "data-ui": "KBD", ...restProps, $radius: t3, ref, children: t5 }), $[12] = restProps, $[13] = t3, $[14] = ref, $[15] = t5, $[16] = t6) : t6 = $[16], t6;
3122
+ $[11] !== padding || $[12] !== t5 ? (t6 = /* @__PURE__ */ jsx(Box, { as: "span", padding, children: t5 }), $[11] = padding, $[12] = t5, $[13] = t6) : t6 = $[13];
3123
+ let t7;
3124
+ return $[14] !== restProps || $[15] !== $radius || $[16] !== ref || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsx(Root$l, { "data-ui": "KBD", ...restProps, $radius, ref, children: t6 }), $[14] = restProps, $[15] = $radius, $[16] = ref, $[17] = t6, $[18] = t7) : t7 = $[18], t7;
2934
3125
  }), origin = {
2935
3126
  name: "@sanity/ui/origin",
2936
3127
  fn({
@@ -3289,7 +3480,7 @@ function LayerProvider(props) {
3289
3480
  const {
3290
3481
  children,
3291
3482
  zOffset: zOffsetProp = 0
3292
- } = props, parentContextValue = useContext(LayerContext), parent = parentContextValue && getLayerContext(parentContextValue), parentRegisterChild = parent == null ? void 0 : parent.registerChild, level = ((_a = parent == null ? void 0 : parent.level) != null ? _a : 0) + 1, zOffset = useArrayProp(zOffsetProp), maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex], [, setChildLayers] = useState({}), [size2, setSize] = useState(0), isTopLayer = size2 === 0, registerChild = useCallback((childLevel) => {
3483
+ } = props, parentContextValue = useContext(LayerContext), parent = parentContextValue && getLayerContext(parentContextValue), parentRegisterChild = parent == null ? void 0 : parent.registerChild, level = ((_a = parent == null ? void 0 : parent.level) != null ? _a : 0) + 1, zOffset = useMemo(() => _getArrayProp(zOffsetProp), [zOffsetProp]), maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex], [, setChildLayers] = useState({}), [size2, setSize] = useState(0), isTopLayer = size2 === 0, registerChild = useCallback((childLevel) => {
3293
3484
  const parentDispose = parentRegisterChild == null ? void 0 : parentRegisterChild(childLevel);
3294
3485
  return childLevel !== void 0 ? setChildLayers((state) => {
3295
3486
  var _a2;
@@ -3754,7 +3945,7 @@ const Popover = memo(forwardRef(function(props, forwardedRef) {
3754
3945
  zOffset: zOffsetProp = layer.popover.zOffset,
3755
3946
  updateRef,
3756
3947
  ...restProps
3757
- } = props, animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = (_e = useElementSize(boundaryElement)) == null ? void 0 : _e.border, padding = useArrayProp(paddingProp), radius = useArrayProp(radiusProp), shadow = useArrayProp(shadowProp), widthArrayProp = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), ref = useRef(null), arrowRef = useRef(null), rootBoundary = "viewport";
3948
+ } = props, animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = (_e = useElementSize(boundaryElement)) == null ? void 0 : _e.border, padding = useMemo(() => _getArrayProp(paddingProp), [paddingProp]), radius = useMemo(() => _getArrayProp(radiusProp), [radiusProp]), shadow = useMemo(() => _getArrayProp(shadowProp), [shadowProp]), widthArrayProp = useMemo(() => _getArrayProp(widthProp), [widthProp]), zOffset = useMemo(() => _getArrayProp(zOffsetProp), [zOffsetProp]), ref = useRef(null), arrowRef = useRef(null), rootBoundary = "viewport";
3758
3949
  useImperativeHandle(forwardedRef, () => ref.current);
3759
3950
  const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize == null ? void 0 : boundarySize.width : void 0, width = calcCurrentWidth({
3760
3951
  container,
@@ -4133,7 +4324,7 @@ const selectStyle = {
4133
4324
  input: inputStyle,
4134
4325
  iconBox: iconBoxStyle
4135
4326
  }, Root$f = styled.div(selectStyle.root), Input$3 = styled.select(selectStyle.input), IconBox = styled(Box)(selectStyle.iconBox), Select = forwardRef(function(props, forwardedRef) {
4136
- const $ = c(30);
4327
+ const $ = c(38);
4137
4328
  let t0, t1, t2, t3, customValidity, disabled, readOnly, restProps, children;
4138
4329
  $[0] !== props ? ({
4139
4330
  children,
@@ -4149,20 +4340,31 @@ const selectStyle = {
4149
4340
  const fontSize2 = t0 === void 0 ? 2 : t0, padding = t1 === void 0 ? 3 : t1, radius = t2 === void 0 ? 2 : t2, space = t3 === void 0 ? 3 : t3, ref = useRef(null);
4150
4341
  let t4;
4151
4342
  $[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
4152
- const t5 = !disabled && readOnly ? "" : void 0, t6 = useArrayProp(fontSize2), t7 = useArrayProp(padding), t8 = useArrayProp(radius), t9 = useArrayProp(space), t10 = disabled || readOnly;
4153
- let t11;
4154
- $[11] !== t5 || $[12] !== restProps || $[13] !== t6 || $[14] !== t7 || $[15] !== t8 || $[16] !== t9 || $[17] !== t10 || $[18] !== ref || $[19] !== children ? (t11 = /* @__PURE__ */ jsx(Input$3, { "data-read-only": t5, "data-ui": "Select", ...restProps, $fontSize: t6, $padding: t7, $radius: t8, $space: t9, disabled: t10, ref, children }), $[11] = t5, $[12] = restProps, $[13] = t6, $[14] = t7, $[15] = t8, $[16] = t9, $[17] = t10, $[18] = ref, $[19] = children, $[20] = t11) : t11 = $[20];
4155
- let t12;
4156
- $[21] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[21] = t12) : t12 = $[21];
4157
- let t13;
4158
- $[22] !== fontSize2 ? (t13 = /* @__PURE__ */ jsx(Text, { size: fontSize2, children: t12 }), $[22] = fontSize2, $[23] = t13) : t13 = $[23];
4159
- let t14;
4160
- $[24] !== padding || $[25] !== t13 ? (t14 = /* @__PURE__ */ jsx(IconBox, { padding, children: t13 }), $[24] = padding, $[25] = t13, $[26] = t14) : t14 = $[26];
4343
+ let t5, t6;
4344
+ $[11] !== fontSize2 ? (t6 = _getArrayProp(fontSize2), $[11] = fontSize2, $[12] = t6) : t6 = $[12], t5 = t6;
4345
+ const $fontSize = t5;
4346
+ let t7, t8;
4347
+ $[13] !== padding ? (t8 = _getArrayProp(padding), $[13] = padding, $[14] = t8) : t8 = $[14], t7 = t8;
4348
+ const $padding = t7;
4349
+ let t9, t10;
4350
+ $[15] !== radius ? (t10 = _getArrayProp(radius), $[15] = radius, $[16] = t10) : t10 = $[16], t9 = t10;
4351
+ const $radius = t9;
4352
+ let t11, t12;
4353
+ $[17] !== space ? (t12 = _getArrayProp(space), $[17] = space, $[18] = t12) : t12 = $[18], t11 = t12;
4354
+ const $space = t11, t13 = !disabled && readOnly ? "" : void 0, t14 = disabled || readOnly;
4161
4355
  let t15;
4162
- return $[27] !== t11 || $[28] !== t14 ? (t15 = /* @__PURE__ */ jsxs(Root$f, { "data-ui": "Select", children: [
4163
- t11,
4164
- t14
4165
- ] }), $[27] = t11, $[28] = t14, $[29] = t15) : t15 = $[29], t15;
4356
+ $[19] !== t13 || $[20] !== restProps || $[21] !== $fontSize || $[22] !== $padding || $[23] !== $radius || $[24] !== $space || $[25] !== t14 || $[26] !== ref || $[27] !== children ? (t15 = /* @__PURE__ */ jsx(Input$3, { "data-read-only": t13, "data-ui": "Select", ...restProps, $fontSize, $padding, $radius, $space, disabled: t14, ref, children }), $[19] = t13, $[20] = restProps, $[21] = $fontSize, $[22] = $padding, $[23] = $radius, $[24] = $space, $[25] = t14, $[26] = ref, $[27] = children, $[28] = t15) : t15 = $[28];
4357
+ let t16;
4358
+ $[29] === Symbol.for("react.memo_cache_sentinel") ? (t16 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[29] = t16) : t16 = $[29];
4359
+ let t17;
4360
+ $[30] !== fontSize2 ? (t17 = /* @__PURE__ */ jsx(Text, { size: fontSize2, children: t16 }), $[30] = fontSize2, $[31] = t17) : t17 = $[31];
4361
+ let t18;
4362
+ $[32] !== padding || $[33] !== t17 ? (t18 = /* @__PURE__ */ jsx(IconBox, { padding, children: t17 }), $[32] = padding, $[33] = t17, $[34] = t18) : t18 = $[34];
4363
+ let t19;
4364
+ return $[35] !== t15 || $[36] !== t18 ? (t19 = /* @__PURE__ */ jsxs(Root$f, { "data-ui": "Select", children: [
4365
+ t15,
4366
+ t18
4367
+ ] }), $[35] = t15, $[36] = t18, $[37] = t19) : t19 = $[37], t19;
4166
4368
  }), BASE_STYLE = {
4167
4369
  "&&:not([hidden])": {
4168
4370
  display: "grid"
@@ -4186,16 +4388,18 @@ function responsiveStackSpaceStyle(props) {
4186
4388
  }));
4187
4389
  }
4188
4390
  const Root$e = styled(Box)(stackBaseStyle, responsiveStackSpaceStyle), Stack = forwardRef(function(props, ref) {
4189
- const $ = c(10);
4190
- let as, space, restProps;
4391
+ const $ = c(12);
4392
+ let space, as, restProps;
4191
4393
  $[0] !== props ? ({
4192
4394
  as,
4193
4395
  space,
4194
4396
  ...restProps
4195
- } = props, $[0] = props, $[1] = as, $[2] = space, $[3] = restProps) : (as = $[1], space = $[2], restProps = $[3]);
4196
- const t0 = typeof as == "string" ? as : void 0, t1 = useArrayProp(space);
4197
- let t2;
4198
- return $[4] !== t0 || $[5] !== restProps || $[6] !== t1 || $[7] !== as || $[8] !== ref ? (t2 = /* @__PURE__ */ jsx(Root$e, { "data-as": t0, "data-ui": "Stack", ...restProps, $space: t1, forwardedAs: as, ref }), $[4] = t0, $[5] = restProps, $[6] = t1, $[7] = as, $[8] = ref, $[9] = t2) : t2 = $[9], t2;
4397
+ } = props, $[0] = props, $[1] = space, $[2] = as, $[3] = restProps) : (space = $[1], as = $[2], restProps = $[3]);
4398
+ let t0, t1;
4399
+ $[4] !== space ? (t1 = _getArrayProp(space), $[4] = space, $[5] = t1) : t1 = $[5], t0 = t1;
4400
+ const $space = t0, t2 = typeof as == "string" ? as : void 0;
4401
+ let t3;
4402
+ return $[6] !== t2 || $[7] !== restProps || $[8] !== $space || $[9] !== as || $[10] !== ref ? (t3 = /* @__PURE__ */ jsx(Root$e, { "data-as": t2, "data-ui": "Stack", ...restProps, $space, forwardedAs: as, ref }), $[6] = t2, $[7] = restProps, $[8] = $space, $[9] = as, $[10] = ref, $[11] = t3) : t3 = $[11], t3;
4199
4403
  });
4200
4404
  function switchBaseStyles() {
4201
4405
  return css`
@@ -4390,7 +4594,7 @@ const Root$d = styled.span(switchBaseStyles), Input$2 = styled.input(switchInput
4390
4594
  display: block;
4391
4595
  position: relative;
4392
4596
  `, Input$1 = styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation$1 = styled.div(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = forwardRef(function(props, forwardedRef) {
4393
- const $ = c(28);
4597
+ const $ = c(34);
4394
4598
  let t0, t1, t2, t3, t4, customValidity, restProps, weight;
4395
4599
  $[0] !== props ? ({
4396
4600
  border: t0,
@@ -4405,17 +4609,28 @@ const Root$d = styled.span(switchBaseStyles), Input$2 = styled.input(switchInput
4405
4609
  const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize2 = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, ref = useRef(null), rootTheme = useRootTheme();
4406
4610
  let t5;
4407
4611
  $[9] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[9] = t5) : t5 = $[9], useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
4408
- const t6 = useArrayProp(fontSize2), t7 = useArrayProp(padding), t8 = useArrayProp(0);
4409
- let t9;
4410
- $[10] !== rootTheme.scheme || $[11] !== rootTheme.tone || $[12] !== restProps || $[13] !== t6 || $[14] !== t7 || $[15] !== t8 || $[16] !== weight || $[17] !== disabled || $[18] !== ref ? (t9 = /* @__PURE__ */ jsx(Input$1, { "data-as": "textarea", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: t6, $padding: t7, $scheme: rootTheme.scheme, $space: t8, $tone: rootTheme.tone, $weight: weight, disabled, ref }), $[10] = rootTheme.scheme, $[11] = rootTheme.tone, $[12] = restProps, $[13] = t6, $[14] = t7, $[15] = t8, $[16] = weight, $[17] = disabled, $[18] = ref, $[19] = t9) : t9 = $[19];
4411
- const t10 = useArrayProp(radius), t11 = border2 ? "" : void 0;
4412
- let t12;
4413
- $[20] !== t10 || $[21] !== rootTheme.scheme || $[22] !== rootTheme.tone || $[23] !== t11 ? (t12 = /* @__PURE__ */ jsx(Presentation$1, { $radius: t10, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t11, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone }), $[20] = t10, $[21] = rootTheme.scheme, $[22] = rootTheme.tone, $[23] = t11, $[24] = t12) : t12 = $[24];
4414
- let t13;
4415
- return $[25] !== t9 || $[26] !== t12 ? (t13 = /* @__PURE__ */ jsx(Root$c, { "data-ui": "TextArea", children: /* @__PURE__ */ jsxs(InputRoot$1, { children: [
4416
- t9,
4417
- t12
4418
- ] }) }), $[25] = t9, $[26] = t12, $[27] = t13) : t13 = $[27], t13;
4612
+ let t6, t7;
4613
+ $[10] !== radius ? (t7 = _getArrayProp(radius), $[10] = radius, $[11] = t7) : t7 = $[11], t6 = t7;
4614
+ const $radius = t6;
4615
+ let t8, t9;
4616
+ $[12] !== fontSize2 ? (t9 = _getArrayProp(fontSize2), $[12] = fontSize2, $[13] = t9) : t9 = $[13], t8 = t9;
4617
+ const $fontSize = t8;
4618
+ let t10, t11;
4619
+ $[14] !== padding ? (t11 = _getArrayProp(padding), $[14] = padding, $[15] = t11) : t11 = $[15], t10 = t11;
4620
+ const $padding = t10;
4621
+ let t12, t13;
4622
+ $[16] === Symbol.for("react.memo_cache_sentinel") ? (t13 = _getArrayProp(0), $[16] = t13) : t13 = $[16], t12 = t13;
4623
+ const $space = t12;
4624
+ let t14;
4625
+ $[17] !== rootTheme.scheme || $[18] !== rootTheme.tone || $[19] !== restProps || $[20] !== $fontSize || $[21] !== $padding || $[22] !== weight || $[23] !== disabled || $[24] !== ref ? (t14 = /* @__PURE__ */ jsx(Input$1, { "data-as": "textarea", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize, $padding, $space, $scheme: rootTheme.scheme, $tone: rootTheme.tone, $weight: weight, disabled, ref }), $[17] = rootTheme.scheme, $[18] = rootTheme.tone, $[19] = restProps, $[20] = $fontSize, $[21] = $padding, $[22] = weight, $[23] = disabled, $[24] = ref, $[25] = t14) : t14 = $[25];
4626
+ const t15 = border2 ? "" : void 0;
4627
+ let t16;
4628
+ $[26] !== $radius || $[27] !== rootTheme.scheme || $[28] !== rootTheme.tone || $[29] !== t15 ? (t16 = /* @__PURE__ */ jsx(Presentation$1, { $radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t15, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone }), $[26] = $radius, $[27] = rootTheme.scheme, $[28] = rootTheme.tone, $[29] = t15, $[30] = t16) : t16 = $[30];
4629
+ let t17;
4630
+ return $[31] !== t14 || $[32] !== t16 ? (t17 = /* @__PURE__ */ jsx(Root$c, { "data-ui": "TextArea", children: /* @__PURE__ */ jsxs(InputRoot$1, { children: [
4631
+ t14,
4632
+ t16
4633
+ ] }) }), $[31] = t14, $[32] = t16, $[33] = t17) : t17 = $[33], t17;
4419
4634
  }), CLEAR_BUTTON_BOX_STYLE = {
4420
4635
  zIndex: 2
4421
4636
  }, Root$b = styled(Card).attrs({
@@ -4463,7 +4678,7 @@ const Root$d = styled.span(switchBaseStyles), Input$2 = styled.input(switchInput
4463
4678
  display: "block"
4464
4679
  }
4465
4680
  }), TextInput = forwardRef(function(props, forwardedRef) {
4466
- const $ = c(88);
4681
+ const $ = c(96);
4467
4682
  let t0, t1, t2, t3, t4, t5, t6, clearButton, IconComponent, IconRightComponent, suffix, prefix, customValidity, onClear, __unstable_disableFocusRing, readOnly, restProps, weight;
4468
4683
  $[0] !== props ? ({
4469
4684
  __unstable_disableFocusRing,
@@ -4485,80 +4700,92 @@ const Root$d = styled.span(switchBaseStyles), Input$2 = styled.input(switchInput
4485
4700
  weight,
4486
4701
  ...restProps
4487
4702
  } = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = t3, $[5] = t4, $[6] = t5, $[7] = t6, $[8] = clearButton, $[9] = IconComponent, $[10] = IconRightComponent, $[11] = suffix, $[12] = prefix, $[13] = customValidity, $[14] = onClear, $[15] = __unstable_disableFocusRing, $[16] = readOnly, $[17] = restProps, $[18] = weight) : (t0 = $[1], t1 = $[2], t2 = $[3], t3 = $[4], t4 = $[5], t5 = $[6], t6 = $[7], clearButton = $[8], IconComponent = $[9], IconRightComponent = $[10], suffix = $[11], prefix = $[12], customValidity = $[13], onClear = $[14], __unstable_disableFocusRing = $[15], readOnly = $[16], restProps = $[17], weight = $[18]);
4488
- const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = useRef(null), rootTheme = useRootTheme(), fontSize2 = useArrayProp(fontSizeProp), padding = useArrayProp(paddingProp), radius = useArrayProp(radiusProp), space = useArrayProp(spaceProp), $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
4489
- let t7;
4490
- $[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
4491
- let t8;
4492
- $[20] === Symbol.for("react.memo_cache_sentinel") ? (t8 = (event) => {
4703
+ const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = useRef(null), rootTheme = useRootTheme();
4704
+ let t7, t8;
4705
+ $[19] !== fontSizeProp ? (t8 = _getArrayProp(fontSizeProp), $[19] = fontSizeProp, $[20] = t8) : t8 = $[20], t7 = t8;
4706
+ const fontSize2 = t7;
4707
+ let t9, t10;
4708
+ $[21] !== paddingProp ? (t10 = _getArrayProp(paddingProp), $[21] = paddingProp, $[22] = t10) : t10 = $[22], t9 = t10;
4709
+ const padding = t9;
4710
+ let t11, t12;
4711
+ $[23] !== radiusProp ? (t12 = _getArrayProp(radiusProp), $[23] = radiusProp, $[24] = t12) : t12 = $[24], t11 = t12;
4712
+ const radius = t11;
4713
+ let t13, t14;
4714
+ $[25] !== spaceProp ? (t14 = _getArrayProp(spaceProp), $[25] = spaceProp, $[26] = t14) : t14 = $[26], t13 = t14;
4715
+ const space = t13, $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
4716
+ let t15;
4717
+ $[27] === Symbol.for("react.memo_cache_sentinel") ? (t15 = () => ref.current, $[27] = t15) : t15 = $[27], useImperativeHandle(forwardedRef, t15), useCustomValidity(ref, customValidity);
4718
+ let t16;
4719
+ $[28] === Symbol.for("react.memo_cache_sentinel") ? (t16 = (event) => {
4493
4720
  event.preventDefault(), event.stopPropagation();
4494
- }, $[20] = t8) : t8 = $[20];
4495
- const handleClearMouseDown = t8;
4496
- let t9;
4497
- $[21] !== onClear ? (t9 = (event_0) => {
4721
+ }, $[28] = t16) : t16 = $[28];
4722
+ const handleClearMouseDown = t16;
4723
+ let t17;
4724
+ $[29] !== onClear ? (t17 = (event_0) => {
4498
4725
  var _a;
4499
4726
  event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), (_a = ref.current) == null || _a.focus();
4500
- }, $[21] = onClear, $[22] = t9) : t9 = $[22];
4501
- const handleClearClick = t9;
4502
- let t10, t11;
4503
- $[23] !== prefix || $[24] !== radius ? (t11 = prefix && /* @__PURE__ */ jsx(Prefix, { borderTop: !0, borderLeft: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: prefix }) }), $[23] = prefix, $[24] = radius, $[25] = t11) : t11 = $[25], t10 = t11;
4504
- const prefixNode = t10;
4505
- let t12;
4506
- const t13 = border2 ? "" : void 0;
4507
- let t14;
4508
- $[26] !== IconComponent || $[27] !== fontSize2 || $[28] !== padding ? (t14 = IconComponent && /* @__PURE__ */ jsx(LeftBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
4727
+ }, $[29] = onClear, $[30] = t17) : t17 = $[30];
4728
+ const handleClearClick = t17;
4729
+ let t18, t19;
4730
+ $[31] !== prefix || $[32] !== radius ? (t19 = prefix && /* @__PURE__ */ jsx(Prefix, { borderTop: !0, borderLeft: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: prefix }) }), $[31] = prefix, $[32] = radius, $[33] = t19) : t19 = $[33], t18 = t19;
4731
+ const prefixNode = t18;
4732
+ let t20;
4733
+ const t21 = border2 ? "" : void 0;
4734
+ let t22;
4735
+ $[34] !== IconComponent || $[35] !== fontSize2 || $[36] !== padding ? (t22 = IconComponent && /* @__PURE__ */ jsx(LeftBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
4509
4736
  isValidElement(IconComponent) && IconComponent,
4510
4737
  isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
4511
- ] }) }), $[26] = IconComponent, $[27] = fontSize2, $[28] = padding, $[29] = t14) : t14 = $[29];
4512
- let t15;
4513
- $[30] !== $hasClearButton || $[31] !== IconRightComponent || $[32] !== fontSize2 || $[33] !== padding ? (t15 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsx(RightBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
4738
+ ] }) }), $[34] = IconComponent, $[35] = fontSize2, $[36] = padding, $[37] = t22) : t22 = $[37];
4739
+ let t23;
4740
+ $[38] !== $hasClearButton || $[39] !== IconRightComponent || $[40] !== fontSize2 || $[41] !== padding ? (t23 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsx(RightBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
4514
4741
  isValidElement(IconRightComponent) && IconRightComponent,
4515
4742
  isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
4516
- ] }) }), $[30] = $hasClearButton, $[31] = IconRightComponent, $[32] = fontSize2, $[33] = padding, $[34] = t15) : t15 = $[34];
4517
- let t16;
4518
- $[35] !== $hasPrefix || $[36] !== __unstable_disableFocusRing || $[37] !== $hasSuffix || $[38] !== radius || $[39] !== rootTheme.scheme || $[40] !== rootTheme.tone || $[41] !== t13 || $[42] !== t14 || $[43] !== t15 ? (t16 = /* @__PURE__ */ jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t13, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
4519
- t14,
4520
- t15
4521
- ] }), $[35] = $hasPrefix, $[36] = __unstable_disableFocusRing, $[37] = $hasSuffix, $[38] = radius, $[39] = rootTheme.scheme, $[40] = rootTheme.tone, $[41] = t13, $[42] = t14, $[43] = t15, $[44] = t16) : t16 = $[44], t12 = t16;
4522
- const presentationNode = t12;
4523
- let t17, t18;
4524
- if ($[45] !== padding) {
4525
- let t192;
4526
- $[47] === Symbol.for("react.memo_cache_sentinel") ? (t192 = (v) => v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2, $[47] = t192) : t192 = $[47], t18 = padding.map(t192), $[45] = padding, $[46] = t18;
4743
+ ] }) }), $[38] = $hasClearButton, $[39] = IconRightComponent, $[40] = fontSize2, $[41] = padding, $[42] = t23) : t23 = $[42];
4744
+ let t24;
4745
+ $[43] !== $hasPrefix || $[44] !== __unstable_disableFocusRing || $[45] !== $hasSuffix || $[46] !== radius || $[47] !== rootTheme.scheme || $[48] !== rootTheme.tone || $[49] !== t21 || $[50] !== t22 || $[51] !== t23 ? (t24 = /* @__PURE__ */ jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t21, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
4746
+ t22,
4747
+ t23
4748
+ ] }), $[43] = $hasPrefix, $[44] = __unstable_disableFocusRing, $[45] = $hasSuffix, $[46] = radius, $[47] = rootTheme.scheme, $[48] = rootTheme.tone, $[49] = t21, $[50] = t22, $[51] = t23, $[52] = t24) : t24 = $[52], t20 = t24;
4749
+ const presentationNode = t20;
4750
+ let t25, t26;
4751
+ if ($[53] !== padding) {
4752
+ let t272;
4753
+ $[55] === Symbol.for("react.memo_cache_sentinel") ? (t272 = (v) => v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2, $[55] = t272) : t272 = $[55], t26 = padding.map(t272), $[53] = padding, $[54] = t26;
4527
4754
  } else
4528
- t18 = $[46];
4529
- t17 = t18;
4530
- const clearButtonBoxPadding = t17;
4531
- let t19, t20;
4532
- if ($[48] !== padding) {
4533
- let t212;
4534
- $[50] === Symbol.for("react.memo_cache_sentinel") ? (t212 = (v_0) => v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1, $[50] = t212) : t212 = $[50], t20 = padding.map(t212), $[48] = padding, $[49] = t20;
4755
+ t26 = $[54];
4756
+ t25 = t26;
4757
+ const clearButtonBoxPadding = t25;
4758
+ let t27, t28;
4759
+ if ($[56] !== padding) {
4760
+ let t292;
4761
+ $[58] === Symbol.for("react.memo_cache_sentinel") ? (t292 = (v_0) => v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1, $[58] = t292) : t292 = $[58], t28 = padding.map(t292), $[56] = padding, $[57] = t28;
4535
4762
  } else
4536
- t20 = $[49];
4537
- t19 = t20;
4538
- const clearButtonPadding = t19;
4539
- let t21;
4540
- t21 = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
4541
- const clearButtonProps = t21;
4542
- let t22, t23;
4543
- $[51] !== disabled || $[52] !== readOnly || $[53] !== clearButton || $[54] !== customValidity || $[55] !== fontSize2 || $[56] !== clearButtonPadding || $[57] !== radius || $[58] !== clearButtonProps || $[59] !== handleClearClick || $[60] !== clearButtonBoxPadding ? (t23 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[51] = disabled, $[52] = readOnly, $[53] = clearButton, $[54] = customValidity, $[55] = fontSize2, $[56] = clearButtonPadding, $[57] = radius, $[58] = clearButtonProps, $[59] = handleClearClick, $[60] = clearButtonBoxPadding, $[61] = t23) : t23 = $[61], t22 = t23;
4544
- const clearButtonNode = t22;
4545
- let t24, t25;
4546
- $[62] !== suffix || $[63] !== radius ? (t25 = suffix && /* @__PURE__ */ jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[62] = suffix, $[63] = radius, $[64] = t25) : t25 = $[64], t24 = t25;
4547
- const suffixNode = t24, t26 = $hasIconRight || $hasClearButton;
4548
- let t27;
4549
- $[65] !== rootTheme.scheme || $[66] !== rootTheme.tone || $[67] !== restProps || $[68] !== fontSize2 || $[69] !== $hasIcon || $[70] !== t26 || $[71] !== padding || $[72] !== space || $[73] !== weight || $[74] !== disabled || $[75] !== readOnly || $[76] !== ref || $[77] !== type ? (t27 = /* @__PURE__ */ jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: t26, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }), $[65] = rootTheme.scheme, $[66] = rootTheme.tone, $[67] = restProps, $[68] = fontSize2, $[69] = $hasIcon, $[70] = t26, $[71] = padding, $[72] = space, $[73] = weight, $[74] = disabled, $[75] = readOnly, $[76] = ref, $[77] = type, $[78] = t27) : t27 = $[78];
4550
- let t28;
4551
- $[79] !== t27 || $[80] !== presentationNode || $[81] !== clearButtonNode ? (t28 = /* @__PURE__ */ jsxs(InputRoot, { children: [
4552
- t27,
4763
+ t28 = $[57];
4764
+ t27 = t28;
4765
+ const clearButtonPadding = t27;
4766
+ let t29;
4767
+ t29 = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
4768
+ const clearButtonProps = t29;
4769
+ let t30, t31;
4770
+ $[59] !== disabled || $[60] !== readOnly || $[61] !== clearButton || $[62] !== customValidity || $[63] !== fontSize2 || $[64] !== clearButtonPadding || $[65] !== radius || $[66] !== clearButtonProps || $[67] !== handleClearClick || $[68] !== clearButtonBoxPadding ? (t31 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[59] = disabled, $[60] = readOnly, $[61] = clearButton, $[62] = customValidity, $[63] = fontSize2, $[64] = clearButtonPadding, $[65] = radius, $[66] = clearButtonProps, $[67] = handleClearClick, $[68] = clearButtonBoxPadding, $[69] = t31) : t31 = $[69], t30 = t31;
4771
+ const clearButtonNode = t30;
4772
+ let t32, t33;
4773
+ $[70] !== suffix || $[71] !== radius ? (t33 = suffix && /* @__PURE__ */ jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[70] = suffix, $[71] = radius, $[72] = t33) : t33 = $[72], t32 = t33;
4774
+ const suffixNode = t32, t34 = $hasIconRight || $hasClearButton;
4775
+ let t35;
4776
+ $[73] !== rootTheme.scheme || $[74] !== rootTheme.tone || $[75] !== restProps || $[76] !== fontSize2 || $[77] !== $hasIcon || $[78] !== t34 || $[79] !== padding || $[80] !== space || $[81] !== weight || $[82] !== disabled || $[83] !== readOnly || $[84] !== ref || $[85] !== type ? (t35 = /* @__PURE__ */ jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: t34, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }), $[73] = rootTheme.scheme, $[74] = rootTheme.tone, $[75] = restProps, $[76] = fontSize2, $[77] = $hasIcon, $[78] = t34, $[79] = padding, $[80] = space, $[81] = weight, $[82] = disabled, $[83] = readOnly, $[84] = ref, $[85] = type, $[86] = t35) : t35 = $[86];
4777
+ let t36;
4778
+ $[87] !== t35 || $[88] !== presentationNode || $[89] !== clearButtonNode ? (t36 = /* @__PURE__ */ jsxs(InputRoot, { children: [
4779
+ t35,
4553
4780
  presentationNode,
4554
4781
  clearButtonNode
4555
- ] }), $[79] = t27, $[80] = presentationNode, $[81] = clearButtonNode, $[82] = t28) : t28 = $[82];
4556
- let t29;
4557
- return $[83] !== rootTheme.tone || $[84] !== prefixNode || $[85] !== t28 || $[86] !== suffixNode ? (t29 = /* @__PURE__ */ jsxs(Root$b, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
4782
+ ] }), $[87] = t35, $[88] = presentationNode, $[89] = clearButtonNode, $[90] = t36) : t36 = $[90];
4783
+ let t37;
4784
+ return $[91] !== rootTheme.tone || $[92] !== prefixNode || $[93] !== t36 || $[94] !== suffixNode ? (t37 = /* @__PURE__ */ jsxs(Root$b, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
4558
4785
  prefixNode,
4559
- t28,
4786
+ t36,
4560
4787
  suffixNode
4561
- ] }), $[83] = rootTheme.tone, $[84] = prefixNode, $[85] = t28, $[86] = suffixNode, $[87] = t29) : t29 = $[87], t29;
4788
+ ] }), $[91] = rootTheme.tone, $[92] = prefixNode, $[93] = t36, $[94] = suffixNode, $[95] = t37) : t37 = $[95], t37;
4562
4789
  });
4563
4790
  function useDelayedState(initialState) {
4564
4791
  const $ = c(4), [state, setState] = useState(initialState), delayedAction = useRef();
@@ -4694,7 +4921,7 @@ const Root$a = styled(Layer)`
4694
4921
  zOffset = layer.tooltip.zOffset,
4695
4922
  delay,
4696
4923
  ...restProps
4697
- } = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport";
4924
+ } = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useMemo(() => _getArrayProp(fallbackPlacementsProp), [fallbackPlacementsProp]), ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport";
4698
4925
  useImperativeHandle(forwardedRef, () => ref.current);
4699
4926
  const portal = usePortal(), portalElement = typeof portalProp == "string" ? ((_c = portal.elements) == null ? void 0 : _c[portalProp]) || null : portal.element, documentBodyOffsetWidth = useSyncExternalStore(
4700
4927
  emptySubscribe,
@@ -4933,7 +5160,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
4933
5160
  value: value_0
4934
5161
  }) => /* @__PURE__ */ jsx(Card, { "data-as": "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsx(Text, { size: fontSize2, textOverflow: "ellipsis", children: value_0 }) }), [fontSize2, paddingProp]), renderOption = typeof renderOptionProp == "function" ? renderOptionProp : defaultRenderOption, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, rootElementRef = useRef(null), resultsPopoverElementRef = useRef(null), inputElementRef = useRef(null), listBoxElementRef = useRef(null), listFocusedRef = useRef(!1), valueRef = useRef(value), valuePropRef = useRef(valueProp), popoverMouseWithinRef = useRef(!1);
4935
5162
  useImperativeHandle(forwardedRef, () => inputElementRef.current);
4936
- const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useArrayProp(paddingProp), currentOption = useMemo(() => value !== null ? options.find((o) => o.value === value) : void 0, [options, value]), filteredOptions = useMemo(() => options.filter((option) => query ? filterOption(query, option) : !0), [filterOption, options, query]), filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null, handleRootBlur = useCallback((event) => {
5163
+ const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useMemo(() => _getArrayProp(paddingProp), [paddingProp]), currentOption = useMemo(() => value !== null ? options.find((o) => o.value === value) : void 0, [options, value]), filteredOptions = useMemo(() => options.filter((option) => query ? filterOption(query, option) : !0), [filterOption, options, query]), filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null, handleRootBlur = useCallback((event) => {
4937
5164
  setTimeout(() => {
4938
5165
  if (popoverMouseWithinRef.current)
4939
5166
  return;
@@ -5102,7 +5329,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
5102
5329
  separator,
5103
5330
  space: spaceRaw = 2,
5104
5331
  ...restProps
5105
- } = props, space = useArrayProp(spaceRaw), [open, setOpen] = useState(!1), [expandElement, setExpandElement] = useState(null), [popoverElement, setPopoverElement] = useState(null), collapse = useCallback(() => setOpen(!1), []), expand = useCallback(() => setOpen(!0), []);
5332
+ } = props, space = useMemo(() => _getArrayProp(spaceRaw), [spaceRaw]), [open, setOpen] = useState(!1), [expandElement, setExpandElement] = useState(null), [popoverElement, setPopoverElement] = useState(null), collapse = useCallback(() => setOpen(!1), []), expand = useCallback(() => setOpen(!0), []);
5106
5333
  useClickOutside(collapse, [expandElement, popoverElement]);
5107
5334
  const rawItems = useMemo(() => Children.toArray(children).filter(isValidElement), [children]), items = useMemo(() => {
5108
5335
  const len = rawItems.length;
@@ -5219,7 +5446,7 @@ const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDial
5219
5446
  z-index: 3;
5220
5447
  `, DialogCard = forwardRef(function(props, forwardedRef) {
5221
5448
  var _a;
5222
- const $ = c(44), {
5449
+ const $ = c(50), {
5223
5450
  __unstable_autoFocus: autoFocus,
5224
5451
  __unstable_hideCloseButton: hideCloseButton,
5225
5452
  children,
@@ -5234,59 +5461,68 @@ const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDial
5234
5461
  scheme,
5235
5462
  shadow: shadowProp,
5236
5463
  width: widthProp
5237
- } = props, portal = usePortal(), portalElement = portalProp ? ((_a = portal.elements) == null ? void 0 : _a[portalProp]) || null : portal.element, boundaryElement = useBoundaryElement().element, radius = useArrayProp(radiusProp), shadow = useArrayProp(shadowProp), width = useArrayProp(widthProp), ref = useRef(null), [rootElement, setRootElement] = useState(null), contentRef = useRef(null), layer = useLayer(), {
5464
+ } = props, portal = usePortal(), portalElement = portalProp ? ((_a = portal.elements) == null ? void 0 : _a[portalProp]) || null : portal.element, boundaryElement = useBoundaryElement().element;
5465
+ let t0, t1;
5466
+ $[0] !== radiusProp ? (t1 = _getArrayProp(radiusProp), $[0] = radiusProp, $[1] = t1) : t1 = $[1], t0 = t1;
5467
+ const radius = t0;
5468
+ let t2, t3;
5469
+ $[2] !== shadowProp ? (t3 = _getArrayProp(shadowProp), $[2] = shadowProp, $[3] = t3) : t3 = $[3], t2 = t3;
5470
+ const shadow = t2;
5471
+ let t4, t5;
5472
+ $[4] !== widthProp ? (t5 = _getArrayProp(widthProp), $[4] = widthProp, $[5] = t5) : t5 = $[5], t4 = t5;
5473
+ const width = t4, ref = useRef(null), [rootElement, setRootElement] = useState(null), contentRef = useRef(null), layer = useLayer(), {
5238
5474
  isTopLayer
5239
5475
  } = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton;
5240
- let t0;
5241
- $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[0] = t0) : t0 = $[0], useImperativeHandle(forwardedRef, t0);
5242
- let t1;
5243
- $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => contentRef.current, $[1] = t1) : t1 = $[1], useImperativeHandle(forwardedContentRef, t1);
5244
- let t2;
5245
- $[2] !== autoFocus ? (t2 = () => {
5476
+ let t6;
5477
+ $[6] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[6] = t6) : t6 = $[6], useImperativeHandle(forwardedRef, t6);
5478
+ let t7;
5479
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => contentRef.current, $[7] = t7) : t7 = $[7], useImperativeHandle(forwardedContentRef, t7);
5480
+ let t8;
5481
+ $[8] !== autoFocus ? (t8 = () => {
5246
5482
  autoFocus && ref.current && focusFirstDescendant(ref.current);
5247
- }, $[2] = autoFocus, $[3] = t2) : t2 = $[3];
5248
- let t3;
5249
- $[4] !== autoFocus || $[5] !== ref ? (t3 = [autoFocus, ref], $[4] = autoFocus, $[5] = ref, $[6] = t3) : t3 = $[6], useEffect(t2, t3);
5250
- let t4;
5251
- $[7] !== isTopLayer || $[8] !== onClose || $[9] !== boundaryElement || $[10] !== portalElement ? (t4 = (event) => {
5483
+ }, $[8] = autoFocus, $[9] = t8) : t8 = $[9];
5484
+ let t9;
5485
+ $[10] !== autoFocus || $[11] !== ref ? (t9 = [autoFocus, ref], $[10] = autoFocus, $[11] = ref, $[12] = t9) : t9 = $[12], useEffect(t8, t9);
5486
+ let t10;
5487
+ $[13] !== isTopLayer || $[14] !== onClose || $[15] !== boundaryElement || $[16] !== portalElement ? (t10 = (event) => {
5252
5488
  if (!isTopLayer || !onClose)
5253
5489
  return;
5254
5490
  const target = document.activeElement;
5255
5491
  target && !isTargetWithinScope(boundaryElement, portalElement, target) || event.key === "Escape" && (event.preventDefault(), event.stopPropagation(), onClose());
5256
- }, $[7] = isTopLayer, $[8] = onClose, $[9] = boundaryElement, $[10] = portalElement, $[11] = t4) : t4 = $[11], useGlobalKeyDown(t4);
5257
- let t5;
5258
- $[12] !== isTopLayer || $[13] !== onClickOutside || $[14] !== boundaryElement || $[15] !== portalElement ? (t5 = (event_0) => {
5492
+ }, $[13] = isTopLayer, $[14] = onClose, $[15] = boundaryElement, $[16] = portalElement, $[17] = t10) : t10 = $[17], useGlobalKeyDown(t10);
5493
+ let t11;
5494
+ $[18] !== isTopLayer || $[19] !== onClickOutside || $[20] !== boundaryElement || $[21] !== portalElement ? (t11 = (event_0) => {
5259
5495
  if (!isTopLayer || !onClickOutside)
5260
5496
  return;
5261
5497
  const target_0 = event_0.target;
5262
5498
  target_0 && !isTargetWithinScope(boundaryElement, portalElement, target_0) || onClickOutside();
5263
- }, $[12] = isTopLayer, $[13] = onClickOutside, $[14] = boundaryElement, $[15] = portalElement, $[16] = t5) : t5 = $[16];
5264
- let t6;
5265
- $[17] !== rootElement ? (t6 = [rootElement], $[17] = rootElement, $[18] = t6) : t6 = $[18], useClickOutside(t5, t6);
5266
- let t7;
5267
- $[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = (el) => {
5499
+ }, $[18] = isTopLayer, $[19] = onClickOutside, $[20] = boundaryElement, $[21] = portalElement, $[22] = t11) : t11 = $[22];
5500
+ let t12;
5501
+ $[23] !== rootElement ? (t12 = [rootElement], $[23] = rootElement, $[24] = t12) : t12 = $[24], useClickOutside(t11, t12);
5502
+ let t13;
5503
+ $[25] === Symbol.for("react.memo_cache_sentinel") ? (t13 = (el) => {
5268
5504
  setRootElement(el), ref.current = el;
5269
- }, $[19] = t7) : t7 = $[19];
5270
- const setRef = t7;
5271
- let t8;
5272
- $[20] !== showHeader || $[21] !== header || $[22] !== labelId || $[23] !== showCloseButton || $[24] !== onClose ? (t8 = showHeader && /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsxs(Flex, { align: "center", padding: 3, children: [
5505
+ }, $[25] = t13) : t13 = $[25];
5506
+ const setRef = t13;
5507
+ let t14;
5508
+ $[26] !== showHeader || $[27] !== header || $[28] !== labelId || $[29] !== showCloseButton || $[30] !== onClose ? (t14 = showHeader && /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsxs(Flex, { align: "center", padding: 3, children: [
5273
5509
  /* @__PURE__ */ jsx(Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsx(Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
5274
5510
  showCloseButton && /* @__PURE__ */ jsx(Box, { flex: "none", children: /* @__PURE__ */ jsx(Button, { "aria-label": "Close dialog", disabled: !onClose, icon: CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
5275
- ] }) }), $[20] = showHeader, $[21] = header, $[22] = labelId, $[23] = showCloseButton, $[24] = onClose, $[25] = t8) : t8 = $[25];
5276
- let t9;
5277
- $[26] !== contentRef || $[27] !== children ? (t9 = /* @__PURE__ */ jsx(DialogContent, { flex: 1, ref: contentRef, tabIndex: -1, children }), $[26] = contentRef, $[27] = children, $[28] = t9) : t9 = $[28];
5278
- let t10;
5279
- $[29] !== footer ? (t10 = footer && /* @__PURE__ */ jsx(DialogFooter, { children: footer }), $[29] = footer, $[30] = t10) : t10 = $[30];
5280
- let t11;
5281
- $[31] !== t8 || $[32] !== t9 || $[33] !== t10 ? (t11 = /* @__PURE__ */ jsxs(DialogLayout, { direction: "column", children: [
5282
- t8,
5283
- t9,
5284
- t10
5285
- ] }), $[31] = t8, $[32] = t9, $[33] = t10, $[34] = t11) : t11 = $[34];
5286
- let t12;
5287
- $[35] !== radius || $[36] !== setRef || $[37] !== scheme || $[38] !== shadow || $[39] !== t11 ? (t12 = /* @__PURE__ */ jsx(DialogCardRoot, { radius, ref: setRef, scheme, shadow, children: t11 }), $[35] = radius, $[36] = setRef, $[37] = scheme, $[38] = shadow, $[39] = t11, $[40] = t12) : t12 = $[40];
5288
- let t13;
5289
- return $[41] !== width || $[42] !== t12 ? (t13 = /* @__PURE__ */ jsx(DialogContainer, { "data-ui": "DialogCard", width, children: t12 }), $[41] = width, $[42] = t12, $[43] = t13) : t13 = $[43], t13;
5511
+ ] }) }), $[26] = showHeader, $[27] = header, $[28] = labelId, $[29] = showCloseButton, $[30] = onClose, $[31] = t14) : t14 = $[31];
5512
+ let t15;
5513
+ $[32] !== contentRef || $[33] !== children ? (t15 = /* @__PURE__ */ jsx(DialogContent, { flex: 1, ref: contentRef, tabIndex: -1, children }), $[32] = contentRef, $[33] = children, $[34] = t15) : t15 = $[34];
5514
+ let t16;
5515
+ $[35] !== footer ? (t16 = footer && /* @__PURE__ */ jsx(DialogFooter, { children: footer }), $[35] = footer, $[36] = t16) : t16 = $[36];
5516
+ let t17;
5517
+ $[37] !== t14 || $[38] !== t15 || $[39] !== t16 ? (t17 = /* @__PURE__ */ jsxs(DialogLayout, { direction: "column", children: [
5518
+ t14,
5519
+ t15,
5520
+ t16
5521
+ ] }), $[37] = t14, $[38] = t15, $[39] = t16, $[40] = t17) : t17 = $[40];
5522
+ let t18;
5523
+ $[41] !== radius || $[42] !== setRef || $[43] !== scheme || $[44] !== shadow || $[45] !== t17 ? (t18 = /* @__PURE__ */ jsx(DialogCardRoot, { radius, ref: setRef, scheme, shadow, children: t17 }), $[41] = radius, $[42] = setRef, $[43] = scheme, $[44] = shadow, $[45] = t17, $[46] = t18) : t18 = $[46];
5524
+ let t19;
5525
+ return $[47] !== width || $[48] !== t18 ? (t19 = /* @__PURE__ */ jsx(DialogContainer, { "data-ui": "DialogCard", width, children: t18 }), $[47] = width, $[48] = t18, $[49] = t19) : t19 = $[49], t19;
5290
5526
  }), Dialog = forwardRef(function(props, ref) {
5291
5527
  var _a;
5292
5528
  const dialog = useDialog(), {
@@ -5313,7 +5549,7 @@ const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDial
5313
5549
  zOffset: zOffsetProp = dialog.zOffset || layer.dialog.zOffset,
5314
5550
  animate: _animate = !1,
5315
5551
  ...restProps
5316
- } = props, animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? ((_a = portal.elements) == null ? void 0 : _a[portalProp]) || null : portal.element, boundaryElement = useBoundaryElement().element, cardRadius = useArrayProp(cardRadiusProp), padding = useArrayProp(paddingProp), position = useArrayProp(positionProp), width = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), preDivRef = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null), handleFocus = useCallback((event) => {
5552
+ } = props, animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? ((_a = portal.elements) == null ? void 0 : _a[portalProp]) || null : portal.element, boundaryElement = useBoundaryElement().element, cardRadius = useMemo(() => _getArrayProp(cardRadiusProp), [cardRadiusProp]), padding = useMemo(() => _getArrayProp(paddingProp), [paddingProp]), position = useMemo(() => _getArrayProp(positionProp), [positionProp]), width = useMemo(() => _getArrayProp(widthProp), [widthProp]), zOffset = useMemo(() => _getArrayProp(zOffsetProp), [zOffsetProp]), preDivRef = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null), handleFocus = useCallback((event) => {
5317
5553
  onFocus == null || onFocus(event);
5318
5554
  const target = event.target, cardElement = cardRef.current;
5319
5555
  if (cardElement && target === preDivRef.current) {
@@ -5373,7 +5609,7 @@ const Root$6 = styled.kbd`
5373
5609
  display: block;
5374
5610
  }
5375
5611
  `, Hotkeys = forwardRef(function(props, ref) {
5376
- const $ = c(24);
5612
+ const $ = c(26);
5377
5613
  let t0, keys, fontSize2, padding, radius, restProps;
5378
5614
  $[0] !== props ? ({
5379
5615
  fontSize: fontSize2,
@@ -5383,21 +5619,24 @@ const Root$6 = styled.kbd`
5383
5619
  space: t0,
5384
5620
  ...restProps
5385
5621
  } = props, $[0] = props, $[1] = t0, $[2] = keys, $[3] = fontSize2, $[4] = padding, $[5] = radius, $[6] = restProps) : (t0 = $[1], keys = $[2], fontSize2 = $[3], padding = $[4], radius = $[5], restProps = $[6]);
5386
- const space = useArrayProp(t0 === void 0 ? 0.5 : t0);
5622
+ const spaceProp = t0 === void 0 ? 0.5 : t0;
5623
+ let t1, t2;
5624
+ $[7] !== spaceProp ? (t2 = _getArrayProp(spaceProp), $[7] = spaceProp, $[8] = t2) : t2 = $[8], t1 = t2;
5625
+ const space = t1;
5387
5626
  if (!keys || keys.length === 0) {
5388
- let t12;
5389
- return $[7] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx(Fragment, {}), $[7] = t12) : t12 = $[7], t12;
5627
+ let t32;
5628
+ return $[9] === Symbol.for("react.memo_cache_sentinel") ? (t32 = /* @__PURE__ */ jsx(Fragment, {}), $[9] = t32) : t32 = $[9], t32;
5390
5629
  }
5391
- let t1;
5392
- if ($[8] !== fontSize2 || $[9] !== padding || $[10] !== radius || $[11] !== keys) {
5393
- let t22;
5394
- $[13] !== fontSize2 || $[14] !== padding || $[15] !== radius ? (t22 = (key2, i) => /* @__PURE__ */ jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i), $[13] = fontSize2, $[14] = padding, $[15] = radius, $[16] = t22) : t22 = $[16], t1 = keys.map(t22), $[8] = fontSize2, $[9] = padding, $[10] = radius, $[11] = keys, $[12] = t1;
5395
- } else
5396
- t1 = $[12];
5397
- let t2;
5398
- $[17] !== space || $[18] !== t1 ? (t2 = /* @__PURE__ */ jsx(Inline, { as: "span", space, children: t1 }), $[17] = space, $[18] = t1, $[19] = t2) : t2 = $[19];
5399
5630
  let t3;
5400
- return $[20] !== restProps || $[21] !== ref || $[22] !== t2 ? (t3 = /* @__PURE__ */ jsx(Root$6, { "data-ui": "Hotkeys", ...restProps, ref, children: t2 }), $[20] = restProps, $[21] = ref, $[22] = t2, $[23] = t3) : t3 = $[23], t3;
5631
+ if ($[10] !== fontSize2 || $[11] !== padding || $[12] !== radius || $[13] !== keys) {
5632
+ let t42;
5633
+ $[15] !== fontSize2 || $[16] !== padding || $[17] !== radius ? (t42 = (key2, i) => /* @__PURE__ */ jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i), $[15] = fontSize2, $[16] = padding, $[17] = radius, $[18] = t42) : t42 = $[18], t3 = keys.map(t42), $[10] = fontSize2, $[11] = padding, $[12] = radius, $[13] = keys, $[14] = t3;
5634
+ } else
5635
+ t3 = $[14];
5636
+ let t4;
5637
+ $[19] !== space || $[20] !== t3 ? (t4 = /* @__PURE__ */ jsx(Inline, { as: "span", space, children: t3 }), $[19] = space, $[20] = t3, $[21] = t4) : t4 = $[21];
5638
+ let t5;
5639
+ return $[22] !== restProps || $[23] !== ref || $[24] !== t4 ? (t5 = /* @__PURE__ */ jsx(Root$6, { "data-ui": "Hotkeys", ...restProps, ref, children: t4 }), $[22] = restProps, $[23] = ref, $[24] = t4, $[25] = t5) : t5 = $[25], t5;
5401
5640
  }), key$2 = Symbol.for("@sanity/ui/context/menu"), MenuContext = createGlobalScopedContext(key$2, null);
5402
5641
  function _isFocusable(element) {
5403
5642
  return isHTMLAnchorElement(element) && element.getAttribute("data-disabled") !== "true" || isHTMLButtonElement(element) && !element.disabled;
@@ -5856,7 +6095,7 @@ function MenuGroup(props) {
5856
6095
  onClick,
5857
6096
  padding = 3,
5858
6097
  popover,
5859
- radius = 2,
6098
+ radius: radiusProp = 2,
5860
6099
  space = 3,
5861
6100
  text,
5862
6101
  tone = "default",
@@ -5871,7 +6110,7 @@ function MenuGroup(props) {
5871
6110
  onItemClick,
5872
6111
  onItemMouseEnter = menu.onMouseEnter,
5873
6112
  registerElement
5874
- } = menu, [rootElement, setRootElement] = useState(null), [open, setOpen] = useState(!1), shouldFocusRef = useRef(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = useState(!1), handleMouseEnter = useCallback((event) => {
6113
+ } = menu, [rootElement, setRootElement] = useState(null), [open, setOpen] = useState(!1), shouldFocusRef = useRef(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = useState(!1), radius = useMemo(() => _getArrayProp(radiusProp), [radiusProp]), handleMouseEnter = useCallback((event) => {
5875
6114
  setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
5876
6115
  }, [onItemMouseEnter]), handleMenuKeyDown = useCallback((event_0) => {
5877
6116
  event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
@@ -5898,7 +6137,7 @@ function MenuGroup(props) {
5898
6137
  return;
5899
6138
  }
5900
6139
  }, []);
5901
- return /* @__PURE__ */ jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: /* @__PURE__ */ jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as, ...restProps, "aria-pressed": as === "button" ? withinMenu : void 0, "data-pressed": as !== "button" ? withinMenu : void 0, "data-selected": !withinMenu && active ? "" : void 0, $radius: useArrayProp(radius), $tone: tone, $scheme: scheme, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, ref: setRootElement, tabIndex: -1, type: as === "button" ? "button" : void 0, children: /* @__PURE__ */ jsxs(Flex, { gap: space, padding, children: [
6140
+ return /* @__PURE__ */ jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: /* @__PURE__ */ jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as, ...restProps, "aria-pressed": as === "button" ? withinMenu : void 0, "data-pressed": as !== "button" ? withinMenu : void 0, "data-selected": !withinMenu && active ? "" : void 0, $radius: radius, $tone: tone, $scheme: scheme, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, ref: setRootElement, tabIndex: -1, type: as === "button" ? "button" : void 0, children: /* @__PURE__ */ jsxs(Flex, { gap: space, padding, children: [
5902
6141
  IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
5903
6142
  isValidElement(IconComponent) && IconComponent,
5904
6143
  isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
@@ -5951,10 +6190,10 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
5951
6190
  paddingRight,
5952
6191
  paddingBottom,
5953
6192
  paddingLeft
5954
- }), [padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft]), hotkeysFontSize = useArrayProp(fontSize2).map((s) => s - 1), setRef = useCallback((el) => {
6193
+ }), [padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft]), hotkeysFontSize = useMemo(() => _getArrayProp(fontSize2).map((s) => s - 1), [fontSize2]), $radius = useMemo(() => _getArrayProp(radius), [radius]), $padding = useMemo(() => _getArrayProp(0), []), setRef = useCallback((el) => {
5955
6194
  ref.current = el, setRootElement(el);
5956
6195
  }, []);
5957
- return /* @__PURE__ */ jsxs(Selectable, { "data-ui": "MenuItem", ...restProps, "aria-pressed": as === "button" && pressed, "data-pressed": as !== "button" && pressed ? "" : void 0, "data-selected": active ? "" : void 0, "data-disabled": disabled ? "" : void 0, forwardedAs: as, $radius: useArrayProp(radius), $padding: useArrayProp(0), $tone: disabled ? "default" : tone, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, role: "menuitem", tabIndex: -1, type: as === "button" ? "button" : void 0, children: [
6196
+ return /* @__PURE__ */ jsxs(Selectable, { "data-ui": "MenuItem", ...restProps, "aria-pressed": as === "button" && pressed, "data-pressed": as !== "button" && pressed ? "" : void 0, "data-selected": active ? "" : void 0, "data-disabled": disabled ? "" : void 0, forwardedAs: as, $radius, $padding, $tone: disabled ? "default" : tone, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, role: "menuitem", tabIndex: -1, type: as === "button" ? "button" : void 0, children: [
5958
6197
  (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, { as: "span", gap: space, align: "center", ...paddingProps, children: [
5959
6198
  IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
5960
6199
  isValidElement(IconComponent) && IconComponent,
@@ -6013,7 +6252,7 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
6013
6252
  background-color: var(--card-skeleton-color-from);
6014
6253
  }
6015
6254
  `, Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle), Skeleton = forwardRef(function(props, ref) {
6016
- const $ = c(14);
6255
+ const $ = c(16);
6017
6256
  let t0, delay, radius, restProps;
6018
6257
  $[0] !== props ? ({
6019
6258
  animated: t0,
@@ -6033,9 +6272,11 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
6033
6272
  clearTimeout(timeout);
6034
6273
  };
6035
6274
  }, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), useEffect(t1, t2);
6036
- const t3 = useArrayProp(radius);
6037
- let t4;
6038
- return $[8] !== restProps || $[9] !== animated || $[10] !== t3 || $[11] !== visible || $[12] !== ref ? (t4 = /* @__PURE__ */ jsx(Root$4, { ...restProps, $animated: animated, $radius: t3, $visible: visible, ref }), $[8] = restProps, $[9] = animated, $[10] = t3, $[11] = visible, $[12] = ref, $[13] = t4) : t4 = $[13], t4;
6275
+ let t3, t4;
6276
+ $[8] !== radius ? (t4 = _getArrayProp(radius), $[8] = radius, $[9] = t4) : t4 = $[9], t3 = t4;
6277
+ const $radius = t3;
6278
+ let t5;
6279
+ return $[10] !== restProps || $[11] !== animated || $[12] !== $radius || $[13] !== visible || $[14] !== ref ? (t5 = /* @__PURE__ */ jsx(Root$4, { ...restProps, $animated: animated, $radius, $visible: visible, ref }), $[10] = restProps, $[11] = animated, $[12] = $radius, $[13] = visible, $[14] = ref, $[15] = t5) : t5 = $[15], t5;
6039
6280
  }), Root$3 = styled(Skeleton)((props) => {
6040
6281
  const {
6041
6282
  $size,
@@ -6051,45 +6292,57 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
6051
6292
  };
6052
6293
  });
6053
6294
  }), TextSkeleton = forwardRef(function(props, ref) {
6054
- const $ = c(7);
6295
+ const $ = c(9);
6055
6296
  let t0, restProps;
6056
6297
  $[0] !== props ? ({
6057
6298
  size: t0,
6058
6299
  ...restProps
6059
6300
  } = props, $[0] = props, $[1] = t0, $[2] = restProps) : (t0 = $[1], restProps = $[2]);
6060
- const $size = useArrayProp(t0 === void 0 ? 2 : t0);
6061
- let t1;
6062
- return $[3] !== restProps || $[4] !== $size || $[5] !== ref ? (t1 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "text" }), $[3] = restProps, $[4] = $size, $[5] = ref, $[6] = t1) : t1 = $[6], t1;
6301
+ const size2 = t0 === void 0 ? 2 : t0;
6302
+ let t1, t2;
6303
+ $[3] !== size2 ? (t2 = _getArrayProp(size2), $[3] = size2, $[4] = t2) : t2 = $[4], t1 = t2;
6304
+ const $size = t1;
6305
+ let t3;
6306
+ return $[5] !== restProps || $[6] !== $size || $[7] !== ref ? (t3 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "text" }), $[5] = restProps, $[6] = $size, $[7] = ref, $[8] = t3) : t3 = $[8], t3;
6063
6307
  }), LabelSkeleton = forwardRef(function(props, ref) {
6064
- const $ = c(7);
6308
+ const $ = c(9);
6065
6309
  let t0, restProps;
6066
6310
  $[0] !== props ? ({
6067
6311
  size: t0,
6068
6312
  ...restProps
6069
6313
  } = props, $[0] = props, $[1] = t0, $[2] = restProps) : (t0 = $[1], restProps = $[2]);
6070
- const $size = useArrayProp(t0 === void 0 ? 2 : t0);
6071
- let t1;
6072
- return $[3] !== restProps || $[4] !== $size || $[5] !== ref ? (t1 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "label" }), $[3] = restProps, $[4] = $size, $[5] = ref, $[6] = t1) : t1 = $[6], t1;
6314
+ const size2 = t0 === void 0 ? 2 : t0;
6315
+ let t1, t2;
6316
+ $[3] !== size2 ? (t2 = _getArrayProp(size2), $[3] = size2, $[4] = t2) : t2 = $[4], t1 = t2;
6317
+ const $size = t1;
6318
+ let t3;
6319
+ return $[5] !== restProps || $[6] !== $size || $[7] !== ref ? (t3 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "label" }), $[5] = restProps, $[6] = $size, $[7] = ref, $[8] = t3) : t3 = $[8], t3;
6073
6320
  }), HeadingSkeleton = forwardRef(function(props, ref) {
6074
- const $ = c(7);
6321
+ const $ = c(9);
6075
6322
  let t0, restProps;
6076
6323
  $[0] !== props ? ({
6077
6324
  size: t0,
6078
6325
  ...restProps
6079
6326
  } = props, $[0] = props, $[1] = t0, $[2] = restProps) : (t0 = $[1], restProps = $[2]);
6080
- const $size = useArrayProp(t0 === void 0 ? 2 : t0);
6081
- let t1;
6082
- return $[3] !== restProps || $[4] !== $size || $[5] !== ref ? (t1 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "heading" }), $[3] = restProps, $[4] = $size, $[5] = ref, $[6] = t1) : t1 = $[6], t1;
6327
+ const size2 = t0 === void 0 ? 2 : t0;
6328
+ let t1, t2;
6329
+ $[3] !== size2 ? (t2 = _getArrayProp(size2), $[3] = size2, $[4] = t2) : t2 = $[4], t1 = t2;
6330
+ const $size = t1;
6331
+ let t3;
6332
+ return $[5] !== restProps || $[6] !== $size || $[7] !== ref ? (t3 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "heading" }), $[5] = restProps, $[6] = $size, $[7] = ref, $[8] = t3) : t3 = $[8], t3;
6083
6333
  }), CodeSkeleton = forwardRef(function(props, ref) {
6084
- const $ = c(7);
6334
+ const $ = c(9);
6085
6335
  let t0, restProps;
6086
6336
  $[0] !== props ? ({
6087
6337
  size: t0,
6088
6338
  ...restProps
6089
6339
  } = props, $[0] = props, $[1] = t0, $[2] = restProps) : (t0 = $[1], restProps = $[2]);
6090
- const $size = useArrayProp(t0 === void 0 ? 2 : t0);
6091
- let t1;
6092
- return $[3] !== restProps || $[4] !== $size || $[5] !== ref ? (t1 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "code" }), $[3] = restProps, $[4] = $size, $[5] = ref, $[6] = t1) : t1 = $[6], t1;
6340
+ const size2 = t0 === void 0 ? 2 : t0;
6341
+ let t1, t2;
6342
+ $[3] !== size2 ? (t2 = _getArrayProp(size2), $[3] = size2, $[4] = t2) : t2 = $[4], t1 = t2;
6343
+ const $size = t1;
6344
+ let t3;
6345
+ return $[5] !== restProps || $[6] !== $size || $[7] !== ref ? (t3 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "code" }), $[5] = restProps, $[6] = $size, $[7] = ref, $[8] = t3) : t3 = $[8], t3;
6093
6346
  }), CustomButton = styled(Button)`
6094
6347
  max-width: 100%;
6095
6348
  `, Tab = forwardRef(function(props, forwardedRef) {