@sanity/ui 4.2.0 → 4.2.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 (46) hide show
  1. package/dist/{arrow-BmX6qbAS.js → arrow-CZ-Lw1QO.js} +2 -2
  2. package/dist/{arrow-BmX6qbAS.js.map → arrow-CZ-Lw1QO.js.map} +1 -1
  3. package/dist/autocomplete.d.ts.map +1 -1
  4. package/dist/autocomplete.js +119 -123
  5. package/dist/autocomplete.js.map +1 -1
  6. package/dist/breadcrumbs.js +4 -4
  7. package/dist/{button-BNyKSDyA.js → button-Wii-24Xu.js} +6 -6
  8. package/dist/button-Wii-24Xu.js.map +1 -0
  9. package/dist/button-dnqMFkWg.d.ts.map +1 -1
  10. package/dist/code.d.ts.map +1 -1
  11. package/dist/code.js +1 -1
  12. package/dist/code.js.map +1 -1
  13. package/dist/{flex-DmbDG2ks.js → flex-CpiAc-4D.js} +2 -2
  14. package/dist/{flex-DmbDG2ks.js.map → flex-CpiAc-4D.js.map} +1 -1
  15. package/dist/getScopedTheme-C-sZsyAz.js.map +1 -1
  16. package/dist/{grid-6JSgMj1O.js → grid-BVZEj_Xe.js} +3 -3
  17. package/dist/{grid-6JSgMj1O.js.map → grid-BVZEj_Xe.js.map} +1 -1
  18. package/dist/{hotkeys-CaHsQlsO.js → hotkeys-DEMStMQ5.js} +4 -4
  19. package/dist/hotkeys-DEMStMQ5.js.map +1 -0
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +109 -115
  22. package/dist/index.js.map +1 -1
  23. package/dist/{layer-Bl5R3uNR.js → layer-B0tlPeLT.js} +2 -2
  24. package/dist/{layer-Bl5R3uNR.js.map → layer-B0tlPeLT.js.map} +1 -1
  25. package/dist/menu.d.ts.map +1 -1
  26. package/dist/menu.js +5 -5
  27. package/dist/menu.js.map +1 -1
  28. package/dist/{popover-B7-28L8y.js → popover-DR6UQQvq.js} +4 -4
  29. package/dist/{popover-B7-28L8y.js.map → popover-DR6UQQvq.js.map} +1 -1
  30. package/dist/popover.js +1 -1
  31. package/dist/{stack-rsNFPq2-.js → stack-SbGBZ0x3.js} +3 -3
  32. package/dist/{stack-rsNFPq2-.js.map → stack-SbGBZ0x3.js.map} +1 -1
  33. package/dist/styles.css +21 -12
  34. package/dist/{textInput-pSfQjkmx.js → textInput-fGZVEKGs.js} +4 -4
  35. package/dist/{textInput-pSfQjkmx.js.map → textInput-fGZVEKGs.js.map} +1 -1
  36. package/dist/toast.js +37 -43
  37. package/dist/toast.js.map +1 -1
  38. package/dist/tooltip.js +53 -49
  39. package/dist/tooltip.js.map +1 -1
  40. package/dist/useClickOutsideEvent-wGLGWBZN.js.map +1 -1
  41. package/dist/{useLayer-D1usxIE0.js → useLayer-CUKYjJYq.js} +56 -35
  42. package/dist/useLayer-CUKYjJYq.js.map +1 -0
  43. package/package.json +18 -17
  44. package/dist/button-BNyKSDyA.js.map +0 -1
  45. package/dist/hotkeys-CaHsQlsO.js.map +0 -1
  46. package/dist/useLayer-D1usxIE0.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,25 +1,25 @@
1
1
  "use client";
2
2
  import { a as rem, i as _responsive, n as _getArrayProp, r as _getResponsiveSpace, s as EMPTY_RECORD, t as _fillCSSObject } from "./helpers-C8xxXAQC.js";
3
- import { a as textInputFontSizeStyle, c as responsiveInputPaddingStyle, d as attemptFocus, f as focusFirstDescendant, g as _raf2, h as _raf, i as textInputBaseStyle, l as useCustomValidity, m as isFocusable, n as inputRoot, o as textInputRepresentationStyle, p as focusLastDescendant, r as textAreaRoot, s as responsiveInputPaddingIconRightStyle, t as TextInput, u as _hasFocus } from "./textInput-pSfQjkmx.js";
3
+ import { a as textInputFontSizeStyle, c as responsiveInputPaddingStyle, d as attemptFocus, f as focusFirstDescendant, g as _raf2, h as _raf, i as textInputBaseStyle, l as useCustomValidity, m as isFocusable, n as inputRoot, o as textInputRepresentationStyle, p as focusLastDescendant, r as textAreaRoot, s as responsiveInputPaddingIconRightStyle, t as TextInput, u as _hasFocus } from "./textInput-fGZVEKGs.js";
4
4
  import { a as isHTMLElement, c as isHTMLTextAreaElement, i as isHTMLButtonElement, n as containsOrEqualsElement, o as isHTMLInputElement, r as isHTMLAnchorElement, s as isHTMLSelectElement, t as _isEnterToClickElement } from "./element-BYgCE_iK.js";
5
5
  import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
6
- import { _ as useTheme_v2, a as useMatchMedia, b as responsivePaddingStyle, c as ThemeColorProvider, d as createGlobalScopedContext, g as useTheme, h as _cardColorStyle, i as usePrefersReducedMotion, l as useRootTheme, m as focusRingStyle, n as LayerProvider, o as useMediaIndex, p as focusRingBorderStyle, s as Card, t as useLayer, u as ThemeProvider, v as responsiveRadiusStyle, y as Box } from "./useLayer-D1usxIE0.js";
7
- import { t as Flex } from "./flex-DmbDG2ks.js";
8
- import { a as responsiveTextAlignStyle, i as responsiveTextFont, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-rsNFPq2-.js";
6
+ import { _ as useTheme_v2, a as useMatchMedia, b as responsivePaddingStyle, c as ThemeColorProvider, d as createGlobalScopedContext, g as useTheme, h as _cardColorStyle, i as usePrefersReducedMotion, l as useRootTheme, m as focusRingStyle, n as LayerProvider, o as useMediaIndex, p as focusRingBorderStyle, s as Card, t as useLayer, u as ThemeProvider, v as responsiveRadiusStyle, y as Box } from "./useLayer-CUKYjJYq.js";
7
+ import { t as Flex } from "./flex-CpiAc-4D.js";
8
+ import { a as responsiveTextAlignStyle, i as responsiveTextFont, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-SbGBZ0x3.js";
9
9
  import { t as responsiveFont } from "./responsiveFont-CilwaORG.js";
10
- import { n as Spinner, t as Button } from "./button-BNyKSDyA.js";
10
+ import { n as Spinner, t as Button } from "./button-Wii-24Xu.js";
11
11
  import { n as _elementSizeObserver, t as useElementSize } from "./useElementSize-BJvbGHq8.js";
12
- import { a as useBoundaryElement, i as PortalContext, n as Portal, o as BoundaryElementContext, r as usePortal, t as Arrow } from "./arrow-BmX6qbAS.js";
12
+ import { a as useBoundaryElement, i as PortalContext, n as Portal, o as BoundaryElementContext, r as usePortal, t as Arrow } from "./arrow-CZ-Lw1QO.js";
13
13
  import { t as useClickOutsideEvent } from "./useClickOutsideEvent-wGLGWBZN.js";
14
14
  import { t as responsiveCodeFontStyle } from "./codeFontStyle-84SMhFtI.js";
15
15
  import { a as rgba$1, c as hslToRgb$1, i as multiply$1, l as rgbToHex$1, n as buildTheme, o as parseColor$1, r as screen$1, s as hexToRgb$1, t as createColorTheme$1, u as rgbToHsl$1 } from "./factory-BzXTX8_Q.js";
16
- import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-CaHsQlsO.js";
17
- import { t as Layer } from "./layer-Bl5R3uNR.js";
18
- import { t as Grid } from "./grid-6JSgMj1O.js";
16
+ import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-DEMStMQ5.js";
17
+ import { t as Layer } from "./layer-B0tlPeLT.js";
18
+ import { t as Grid } from "./grid-BVZEj_Xe.js";
19
19
  import { c } from "react/compiler-runtime";
20
20
  import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
21
21
  import { clsx } from "clsx/lite";
22
- import { Children, Component, cloneElement, isValidElement, startTransition, useContext, useEffect, useId, useImperativeHandle, useRef, useState, useSyncExternalStore } from "react";
22
+ import { Children, Component, cloneElement, isValidElement, useContext, useEffect, useId, useImperativeHandle, useRef, useState, useSyncExternalStore } from "react";
23
23
  import { css, styled } from "styled-components";
24
24
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
25
25
  import ReactIs from "react-is";
@@ -44,7 +44,7 @@ function responsiveContainerWidthStyle(props) {
44
44
  }
45
45
  const StyledContainer = /* @__PURE__ */ styled(Box).withConfig({
46
46
  displayName: "StyledContainer",
47
- componentId: "sc-bmdunn-0"
47
+ componentId: "sc-c2h24p-0"
48
48
  })(containerBaseStyle, responsiveContainerWidthStyle);
49
49
  function ContainerComponent(props) {
50
50
  let $ = c(12), as, ref, restProps, t0;
@@ -749,67 +749,63 @@ function TreeGroup(props) {
749
749
  var treeItem = "_14vatmh0";
750
750
  const StyledTreeItem = /* @__PURE__ */ styled.li.withConfig({
751
751
  displayName: "StyledTreeItem",
752
- componentId: "sc-inyvr0-0"
752
+ componentId: "sc-mgt2q1-0"
753
753
  })(treeItemRootColorStyle), TreeItemBox = /* @__PURE__ */ styled.a.withConfig({
754
754
  displayName: "TreeItemBox",
755
- componentId: "sc-inyvr0-1"
755
+ componentId: "sc-mgt2q1-1"
756
756
  })(treeItemBoxStyle);
757
757
  /**
758
758
  * This API might change. DO NOT USE IN PRODUCTION.
759
759
  * @beta
760
760
  */
761
761
  function TreeItem(props) {
762
- let $ = c(94), { children, expanded: t0, fontSize: t1, href, icon: IconComponent, id: idProp, linkAs, linkProps, muted, onClick, padding: t2, selected: t3, gap: t4, text, weight, ...restProps } = props, expandedProp = t0 !== void 0 && t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 2 : t2, selected = t3 !== void 0 && t3, gap = t4 === void 0 ? 2 : t4, [rootElement, _setRootElement] = useState(null), t5;
763
- $[0] === Symbol.for("react.memo_cache_sentinel") ? (t5 = (node) => {
764
- startTransition(() => _setRootElement(node));
765
- }, $[0] = t5) : t5 = $[0];
766
- let setRootElement = t5, treeitemRef = useRef(null), tree = useTree(), { path, registerItem, setExpanded, setFocusedElement } = tree, _id = useId(), id = idProp || _id, t6, t7;
767
- if ($[1] !== id || $[2] !== path) {
762
+ let $ = c(93), { children, expanded: t0, fontSize: t1, href, icon: IconComponent, id: idProp, linkAs, linkProps, muted, onClick, padding: t2, selected: t3, gap: t4, text, weight, ...restProps } = props, expandedProp = t0 !== void 0 && t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 2 : t2, selected = t3 !== void 0 && t3, gap = t4 === void 0 ? 2 : t4, [rootElement, setRootElement] = useState(null), treeitemRef = useRef(null), tree = useTree(), { path, registerItem, setExpanded, setFocusedElement } = tree, _id = useId(), id = idProp || _id, t5, t6;
763
+ if ($[0] !== id || $[1] !== path) {
768
764
  let itemPath = path.concat([id || ""]);
769
- t6 = itemPath, t7 = itemPath.join("/"), $[1] = id, $[2] = path, $[3] = t6, $[4] = t7;
770
- } else t6 = $[3], t7 = $[4];
771
- let t8;
772
- $[5] !== t6 || $[6] !== t7 ? (t8 = [t6, t7], $[5] = t6, $[6] = t7, $[7] = t8) : t8 = $[7];
773
- let [itemPath_0, itemKey] = t8, itemState = tree.state[itemKey], focused = tree.focusedElement === rootElement, expanded = itemState?.expanded === void 0 ? expandedProp : itemState?.expanded || !1, tabIndex = tree.focusedElement && tree.focusedElement === rootElement ? 0 : -1, t9 = tree.level + 1, t10;
774
- $[8] !== itemPath_0 || $[9] !== t9 || $[10] !== tree ? (t10 = {
765
+ t5 = itemPath, t6 = itemPath.join("/"), $[0] = id, $[1] = path, $[2] = t5, $[3] = t6;
766
+ } else t5 = $[2], t6 = $[3];
767
+ let t7;
768
+ $[4] !== t5 || $[5] !== t6 ? (t7 = [t5, t6], $[4] = t5, $[5] = t6, $[6] = t7) : t7 = $[6];
769
+ let [itemPath_0, itemKey] = t7, itemState = tree.state[itemKey], focused = tree.focusedElement === rootElement, expanded = itemState?.expanded === void 0 ? expandedProp : itemState?.expanded || !1, tabIndex = tree.focusedElement && tree.focusedElement === rootElement ? 0 : -1, t8 = tree.level + 1, t9;
770
+ $[7] !== itemPath_0 || $[8] !== t8 || $[9] !== tree ? (t9 = {
775
771
  ...tree,
776
- level: t9,
772
+ level: t8,
777
773
  path: itemPath_0
778
- }, $[8] = itemPath_0, $[9] = t9, $[10] = tree, $[11] = t10) : t10 = $[11];
779
- let contextValue = t10, t11;
780
- $[12] !== expanded || $[13] !== itemKey || $[14] !== onClick || $[15] !== rootElement || $[16] !== setExpanded || $[17] !== setFocusedElement ? (t11 = (event) => {
774
+ }, $[7] = itemPath_0, $[8] = t8, $[9] = tree, $[10] = t9) : t9 = $[10];
775
+ let contextValue = t9, t10;
776
+ $[11] !== expanded || $[12] !== itemKey || $[13] !== onClick || $[14] !== rootElement || $[15] !== setExpanded || $[16] !== setFocusedElement ? (t10 = (event) => {
781
777
  onClick && onClick(event);
782
778
  let target = event.target;
783
779
  target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem" || target.closest("[data-ui=\"TreeItem__box\"]")) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(rootElement));
784
- }, $[12] = expanded, $[13] = itemKey, $[14] = onClick, $[15] = rootElement, $[16] = setExpanded, $[17] = setFocusedElement, $[18] = t11) : t11 = $[18];
785
- let handleClick = t11, t12;
786
- $[19] !== focused || $[20] !== rootElement ? (t12 = (event_0) => {
780
+ }, $[11] = expanded, $[12] = itemKey, $[13] = onClick, $[14] = rootElement, $[15] = setExpanded, $[16] = setFocusedElement, $[17] = t10) : t10 = $[17];
781
+ let handleClick = t10, t11;
782
+ $[18] !== focused || $[19] !== rootElement ? (t11 = (event_0) => {
787
783
  focused && event_0.key === "Enter" && (treeitemRef.current || rootElement)?.click();
788
- }, $[19] = focused, $[20] = rootElement, $[21] = t12) : t12 = $[21];
789
- let handleKeyDown = t12, t13, t14;
790
- $[22] !== expanded || $[23] !== itemKey || $[24] !== registerItem || $[25] !== rootElement || $[26] !== selected ? (t13 = () => {
784
+ }, $[18] = focused, $[19] = rootElement, $[20] = t11) : t11 = $[20];
785
+ let handleKeyDown = t11, t12, t13;
786
+ $[21] !== expanded || $[22] !== itemKey || $[23] !== registerItem || $[24] !== rootElement || $[25] !== selected ? (t12 = () => {
791
787
  if (rootElement) return registerItem(rootElement, itemKey, expanded, selected);
792
- }, t14 = [
788
+ }, t13 = [
793
789
  expanded,
794
790
  itemKey,
795
791
  registerItem,
796
792
  rootElement,
797
793
  selected
798
- ], $[22] = expanded, $[23] = itemKey, $[24] = registerItem, $[25] = rootElement, $[26] = selected, $[27] = t13, $[28] = t14) : (t13 = $[27], t14 = $[28]), useEffect(t13, t14);
799
- let t15 = IconComponent || children ? "visible" : "hidden", t16;
800
- $[29] === t15 ? t16 = $[30] : (t16 = {
801
- visibility: t15,
794
+ ], $[21] = expanded, $[22] = itemKey, $[23] = registerItem, $[24] = rootElement, $[25] = selected, $[26] = t12, $[27] = t13) : (t12 = $[26], t13 = $[27]), useEffect(t12, t13);
795
+ let t14 = IconComponent || children ? "visible" : "hidden", t15;
796
+ $[28] === t14 ? t15 = $[29] : (t15 = {
797
+ visibility: t14,
802
798
  pointerEvents: "none"
803
- }, $[29] = t15, $[30] = t16);
804
- let t17;
805
- $[31] !== IconComponent || $[32] !== fontSize || $[33] !== muted || $[34] !== weight ? (t17 = IconComponent && /* @__PURE__ */ jsx(Text, {
799
+ }, $[28] = t14, $[29] = t15);
800
+ let t16;
801
+ $[30] !== IconComponent || $[31] !== fontSize || $[32] !== muted || $[33] !== weight ? (t16 = IconComponent && /* @__PURE__ */ jsx(Text, {
806
802
  muted,
807
803
  size: fontSize,
808
804
  weight,
809
805
  children: /* @__PURE__ */ jsx(IconComponent, {})
810
- }), $[31] = IconComponent, $[32] = fontSize, $[33] = muted, $[34] = weight, $[35] = t17) : t17 = $[35];
811
- let t18;
812
- $[36] !== IconComponent || $[37] !== expanded || $[38] !== fontSize || $[39] !== muted || $[40] !== weight ? (t18 = !IconComponent && /* @__PURE__ */ jsx(Text, {
806
+ }), $[30] = IconComponent, $[31] = fontSize, $[32] = muted, $[33] = weight, $[34] = t16) : t16 = $[34];
807
+ let t17;
808
+ $[35] !== IconComponent || $[36] !== expanded || $[37] !== fontSize || $[38] !== muted || $[39] !== weight ? (t17 = !IconComponent && /* @__PURE__ */ jsx(Text, {
813
809
  muted,
814
810
  size: fontSize,
815
811
  weight,
@@ -817,15 +813,15 @@ function TreeItem(props) {
817
813
  className: "_14vatmh1",
818
814
  style: { transform: expanded ? "rotate(90deg)" : void 0 }
819
815
  })
820
- }), $[36] = IconComponent, $[37] = expanded, $[38] = fontSize, $[39] = muted, $[40] = weight, $[41] = t18) : t18 = $[41];
821
- let t19;
822
- $[42] !== gap || $[43] !== t16 || $[44] !== t17 || $[45] !== t18 ? (t19 = /* @__PURE__ */ jsxs(Box, {
816
+ }), $[35] = IconComponent, $[36] = expanded, $[37] = fontSize, $[38] = muted, $[39] = weight, $[40] = t17) : t17 = $[40];
817
+ let t18;
818
+ $[41] !== gap || $[42] !== t15 || $[43] !== t16 || $[44] !== t17 ? (t18 = /* @__PURE__ */ jsxs(Box, {
823
819
  marginRight: gap,
824
- style: t16,
825
- children: [t17, t18]
826
- }), $[42] = gap, $[43] = t16, $[44] = t17, $[45] = t18, $[46] = t19) : t19 = $[46];
827
- let t20;
828
- $[47] !== fontSize || $[48] !== muted || $[49] !== text || $[50] !== weight ? (t20 = /* @__PURE__ */ jsx(Box, {
820
+ style: t15,
821
+ children: [t16, t17]
822
+ }), $[41] = gap, $[42] = t15, $[43] = t16, $[44] = t17, $[45] = t18) : t18 = $[45];
823
+ let t19;
824
+ $[46] !== fontSize || $[47] !== muted || $[48] !== text || $[49] !== weight ? (t19 = /* @__PURE__ */ jsx(Box, {
829
825
  flex: 1,
830
826
  children: /* @__PURE__ */ jsx(Text, {
831
827
  muted,
@@ -834,38 +830,38 @@ function TreeItem(props) {
834
830
  weight,
835
831
  children: text
836
832
  })
837
- }), $[47] = fontSize, $[48] = muted, $[49] = text, $[50] = weight, $[51] = t20) : t20 = $[51];
838
- let t21;
839
- $[52] !== padding || $[53] !== t19 || $[54] !== t20 ? (t21 = /* @__PURE__ */ jsxs(Flex, {
833
+ }), $[46] = fontSize, $[47] = muted, $[48] = text, $[49] = weight, $[50] = t19) : t19 = $[50];
834
+ let t20;
835
+ $[51] !== padding || $[52] !== t18 || $[53] !== t19 ? (t20 = /* @__PURE__ */ jsxs(Flex, {
840
836
  padding,
841
- children: [t19, t20]
842
- }), $[52] = padding, $[53] = t19, $[54] = t20, $[55] = t21) : t21 = $[55];
843
- let content = t21;
837
+ children: [t18, t19]
838
+ }), $[51] = padding, $[52] = t18, $[53] = t19, $[54] = t20) : t20 = $[54];
839
+ let content = t20;
844
840
  if (href) {
845
- let t22 = typeof linkAs == "string" ? linkAs : "a", t23;
846
- $[56] !== content || $[57] !== expanded || $[58] !== href || $[59] !== linkAs || $[60] !== linkProps || $[61] !== t22 || $[62] !== tabIndex || $[63] !== tree.level ? (t23 = /* @__PURE__ */ jsx(TreeItemBox, {
841
+ let t21 = typeof linkAs == "string" ? linkAs : "a", t22;
842
+ $[55] !== content || $[56] !== expanded || $[57] !== href || $[58] !== linkAs || $[59] !== linkProps || $[60] !== t21 || $[61] !== tabIndex || $[62] !== tree.level ? (t22 = /* @__PURE__ */ jsx(TreeItemBox, {
847
843
  ...linkProps,
848
844
  $level: tree.level,
849
845
  "aria-expanded": expanded,
850
846
  as: linkAs,
851
- "data-as": t22,
847
+ "data-as": t21,
852
848
  "data-ui": "TreeItem__box",
853
849
  href,
854
850
  ref: treeitemRef,
855
851
  role: "treeitem",
856
852
  tabIndex,
857
853
  children: content
858
- }), $[56] = content, $[57] = expanded, $[58] = href, $[59] = linkAs, $[60] = linkProps, $[61] = t22, $[62] = tabIndex, $[63] = tree.level, $[64] = t23) : t23 = $[64];
859
- let t24;
860
- $[65] !== children || $[66] !== expanded ? (t24 = children && /* @__PURE__ */ jsx(TreeGroup, {
854
+ }), $[55] = content, $[56] = expanded, $[57] = href, $[58] = linkAs, $[59] = linkProps, $[60] = t21, $[61] = tabIndex, $[62] = tree.level, $[63] = t22) : t22 = $[63];
855
+ let t23;
856
+ $[64] !== children || $[65] !== expanded ? (t23 = children && /* @__PURE__ */ jsx(TreeGroup, {
861
857
  hidden: !expanded,
862
858
  children
863
- }), $[65] = children, $[66] = expanded, $[67] = t24) : t24 = $[67];
864
- let t25;
865
- return $[68] !== contextValue || $[69] !== t24 ? (t25 = /* @__PURE__ */ jsx(TreeContext.Provider, {
859
+ }), $[64] = children, $[65] = expanded, $[66] = t23) : t23 = $[66];
860
+ let t24;
861
+ return $[67] !== contextValue || $[68] !== t23 ? (t24 = /* @__PURE__ */ jsx(TreeContext.Provider, {
866
862
  value: contextValue,
867
- children: t24
868
- }), $[68] = contextValue, $[69] = t24, $[70] = t25) : t25 = $[70], /* @__PURE__ */ jsxs(StyledTreeItem, {
863
+ children: t23
864
+ }), $[67] = contextValue, $[68] = t23, $[69] = t24) : t24 = $[69], /* @__PURE__ */ jsxs(StyledTreeItem, {
869
865
  "data-selected": selected ? "" : void 0,
870
866
  "data-tree-id": id,
871
867
  "data-tree-key": itemKey,
@@ -875,42 +871,42 @@ function TreeItem(props) {
875
871
  onClick: handleClick,
876
872
  ref: setRootElement,
877
873
  role: "none",
878
- children: [t23, t25]
874
+ children: [t22, t24]
879
875
  });
880
876
  }
881
- let T0 = StyledTreeItem, t22 = selected ? "" : void 0, t24 = clsx(treeItem, restProps.className), t25;
882
- $[71] !== content || $[72] !== tree.level ? (t25 = /* @__PURE__ */ jsx(TreeItemBox, {
877
+ let T0 = StyledTreeItem, t21 = selected ? "" : void 0, t23 = clsx(treeItem, restProps.className), t24;
878
+ $[70] !== content || $[71] !== tree.level ? (t24 = /* @__PURE__ */ jsx(TreeItemBox, {
883
879
  $level: tree.level,
884
880
  as: "div",
885
881
  "data-ui": "TreeItem__box",
886
882
  children: content
887
- }), $[71] = content, $[72] = tree.level, $[73] = t25) : t25 = $[73];
888
- let t26;
889
- $[74] !== children || $[75] !== expanded ? (t26 = children && /* @__PURE__ */ jsx(TreeGroup, {
883
+ }), $[70] = content, $[71] = tree.level, $[72] = t24) : t24 = $[72];
884
+ let t25;
885
+ $[73] !== children || $[74] !== expanded ? (t25 = children && /* @__PURE__ */ jsx(TreeGroup, {
890
886
  expanded,
891
887
  children
892
- }), $[74] = children, $[75] = expanded, $[76] = t26) : t26 = $[76];
893
- let t27;
894
- $[77] !== contextValue || $[78] !== t26 ? (t27 = /* @__PURE__ */ jsx(TreeContext.Provider, {
888
+ }), $[73] = children, $[74] = expanded, $[75] = t25) : t25 = $[75];
889
+ let t26;
890
+ $[76] !== contextValue || $[77] !== t25 ? (t26 = /* @__PURE__ */ jsx(TreeContext.Provider, {
895
891
  value: contextValue,
896
- children: t26
897
- }), $[77] = contextValue, $[78] = t26, $[79] = t27) : t27 = $[79];
898
- let t28;
899
- return $[80] !== T0 || $[81] !== expanded || $[82] !== handleClick || $[83] !== handleKeyDown || $[84] !== id || $[85] !== itemKey || $[86] !== restProps || $[87] !== setRootElement || $[88] !== t22 || $[89] !== t24 || $[90] !== t25 || $[91] !== t27 || $[92] !== tabIndex ? (t28 = /* @__PURE__ */ jsxs(T0, {
900
- "data-selected": t22,
892
+ children: t25
893
+ }), $[76] = contextValue, $[77] = t25, $[78] = t26) : t26 = $[78];
894
+ let t27;
895
+ return $[79] !== T0 || $[80] !== expanded || $[81] !== handleClick || $[82] !== handleKeyDown || $[83] !== id || $[84] !== itemKey || $[85] !== restProps || $[86] !== setRootElement || $[87] !== t21 || $[88] !== t23 || $[89] !== t24 || $[90] !== t26 || $[91] !== tabIndex ? (t27 = /* @__PURE__ */ jsxs(T0, {
896
+ "data-selected": t21,
901
897
  "data-ui": "TreeItem",
902
898
  "data-tree-id": id,
903
899
  "data-tree-key": itemKey,
904
900
  ...restProps,
905
901
  "aria-expanded": expanded,
906
- className: t24,
902
+ className: t23,
907
903
  onClick: handleClick,
908
904
  onKeyDown: handleKeyDown,
909
905
  ref: setRootElement,
910
906
  role: "treeitem",
911
907
  tabIndex,
912
- children: [t25, t27]
913
- }), $[80] = T0, $[81] = expanded, $[82] = handleClick, $[83] = handleKeyDown, $[84] = id, $[85] = itemKey, $[86] = restProps, $[87] = setRootElement, $[88] = t22, $[89] = t24, $[90] = t25, $[91] = t27, $[92] = tabIndex, $[93] = t28) : t28 = $[93], t28;
908
+ children: [t24, t26]
909
+ }), $[79] = T0, $[80] = expanded, $[81] = handleClick, $[82] = handleKeyDown, $[83] = id, $[84] = itemKey, $[85] = restProps, $[86] = setRootElement, $[87] = t21, $[88] = t23, $[89] = t24, $[90] = t26, $[91] = tabIndex, $[92] = t27) : t27 = $[92], t27;
914
910
  }
915
911
  /**
916
912
  * @internal
@@ -997,7 +993,7 @@ function labelBaseStyle(props) {
997
993
  }
998
994
  const StyledLabel = /* @__PURE__ */ styled.div.withConfig({
999
995
  displayName: "StyledLabel",
1000
- componentId: "sc-43585o-0"
996
+ componentId: "sc-ws9v9t-0"
1001
997
  })(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
1002
998
  function LabelComponent(props) {
1003
999
  let $ = c(27), accent, align, childrenProp, ref, restProps, t0, t1, textOverflow, weight;
@@ -1078,30 +1074,28 @@ function responsiveAvatarSizeStyle(props) {
1078
1074
  var avatarArrow = "_1jezl1b0", avatarStack = "_1jezl1b4";
1079
1075
  const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
1080
1076
  displayName: "StyledAvatar",
1081
- componentId: "sc-3dcnr0-0"
1077
+ componentId: "sc-2lyi68-0"
1082
1078
  })(responsiveAvatarSizeStyle, avatarRootStyle), InitialsLabel = /* @__PURE__ */ styled(Label).withConfig({
1083
1079
  displayName: "InitialsLabel",
1084
- componentId: "sc-3dcnr0-1"
1080
+ componentId: "sc-2lyi68-1"
1085
1081
  })({ color: "inherit" });
1086
1082
  function AvatarComponent(props) {
1087
- let $ = c(47), __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, ref, restProps, src, t0, t1, t2, title;
1083
+ let $ = c(44), __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, ref, restProps, src, t0, t1, t2, title;
1088
1084
  $[0] === props ? (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], ref = $[7], restProps = $[8], src = $[9], t0 = $[10], t1 = $[11], t2 = $[12], title = $[13]) : ({__unstable_hideInnerStroke, as: asProp, color: t0, src, title, initials, onImageLoadError, arrowPosition: arrowPositionProp, animateArrowFrom, ref, status: t1, size: t2, ...restProps} = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = ref, $[8] = restProps, $[9] = src, $[10] = t0, $[11] = t1, $[12] = t2, $[13] = title);
1089
- let color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, { avatar } = useTheme_v2(), as = ReactIs.isValidElementType(asProp) ? asProp : "div", size = _getArrayProp(sizeProp), _sizeRem = (avatar.sizes[size[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = useId(), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = useState(!1), imageId = `avatar-image-${elementId}`, t3, t4;
1085
+ let color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, { avatar } = useTheme_v2(), as = ReactIs.isValidElementType(asProp) ? asProp : "div", size = _getArrayProp(sizeProp), _sizeRem = (avatar.sizes[size[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = useId(), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = useState(!1), [prevSrc, setPrevSrc] = useState(src);
1086
+ prevSrc !== src && (setPrevSrc(src), src && setImageFailed(!1));
1087
+ let imageId = `avatar-image-${elementId}`, t3, t4;
1090
1088
  $[14] !== arrowPosition || $[15] !== arrowPositionProp ? (t3 = () => {
1091
1089
  if (arrowPosition === arrowPositionProp) return;
1092
1090
  let raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
1093
1091
  return () => cancelAnimationFrame(raf);
1094
1092
  }, t4 = [arrowPosition, arrowPositionProp], $[14] = arrowPosition, $[15] = arrowPositionProp, $[16] = t3, $[17] = t4) : (t3 = $[16], t4 = $[17]), useEffect(t3, t4);
1095
- let t5, t6;
1096
- $[18] === src ? (t5 = $[19], t6 = $[20]) : (t5 = () => {
1097
- src && setImageFailed(!1);
1098
- }, t6 = [src], $[18] = src, $[19] = t5, $[20] = t6), useEffect(t5, t6);
1099
- let t7;
1100
- $[21] === onImageLoadError ? t7 = $[22] : (t7 = () => {
1093
+ let t5;
1094
+ $[18] === onImageLoadError ? t5 = $[19] : (t5 = () => {
1101
1095
  setImageFailed(!0), onImageLoadError && onImageLoadError(/* @__PURE__ */ Error("Avatar: the image failed to load"));
1102
- }, $[21] = onImageLoadError, $[22] = t7);
1103
- let handleImageError = t7, T0 = StyledAvatar, t8 = typeof as == "string" ? as : void 0, t10;
1104
- $[23] === color ? t10 = $[24] : (t10 = /* @__PURE__ */ jsx("div", {
1096
+ }, $[18] = onImageLoadError, $[19] = t5);
1097
+ let handleImageError = t5, T0 = StyledAvatar, t6 = typeof as == "string" ? as : void 0, t8;
1098
+ $[20] === color ? t8 = $[21] : (t8 = /* @__PURE__ */ jsx("div", {
1105
1099
  className: avatarArrow,
1106
1100
  children: /* @__PURE__ */ jsx("svg", {
1107
1101
  width: "11",
@@ -1113,9 +1107,9 @@ function AvatarComponent(props) {
1113
1107
  fill: color
1114
1108
  })
1115
1109
  })
1116
- }), $[23] = color, $[24] = t10);
1117
- let t11;
1118
- $[25] !== __unstable_hideInnerStroke || $[26] !== _radius || $[27] !== _sizeRem || $[28] !== handleImageError || $[29] !== imageFailed || $[30] !== imageId || $[31] !== src ? (t11 = !imageFailed && src && /* @__PURE__ */ jsxs("svg", {
1110
+ }), $[20] = color, $[21] = t8);
1111
+ let t9;
1112
+ $[22] !== __unstable_hideInnerStroke || $[23] !== _radius || $[24] !== _sizeRem || $[25] !== handleImageError || $[26] !== imageFailed || $[27] !== imageId || $[28] !== src ? (t9 = !imageFailed && src && /* @__PURE__ */ jsxs("svg", {
1119
1113
  className: "_1jezl1b1",
1120
1114
  viewBox: `0 0 ${_sizeRem} ${_sizeRem}`,
1121
1115
  fill: "none",
@@ -1155,8 +1149,8 @@ function AvatarComponent(props) {
1155
1149
  vectorEffect: "non-scaling-stroke"
1156
1150
  })
1157
1151
  ]
1158
- }), $[25] = __unstable_hideInnerStroke, $[26] = _radius, $[27] = _sizeRem, $[28] = handleImageError, $[29] = imageFailed, $[30] = imageId, $[31] = src, $[32] = t11) : t11 = $[32];
1159
- let t12 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("div", {
1152
+ }), $[22] = __unstable_hideInnerStroke, $[23] = _radius, $[24] = _sizeRem, $[25] = handleImageError, $[26] = imageFailed, $[27] = imageId, $[28] = src, $[29] = t9) : t9 = $[29];
1153
+ let t10 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("div", {
1160
1154
  className: "_1jezl1b5",
1161
1155
  children: /* @__PURE__ */ jsx(InitialsLabel, {
1162
1156
  forwardedAs: "span",
@@ -1164,10 +1158,10 @@ function AvatarComponent(props) {
1164
1158
  weight: "medium",
1165
1159
  children: initials
1166
1160
  })
1167
- }) }), t13;
1168
- return $[33] !== T0 || $[34] !== arrowPosition || $[35] !== as || $[36] !== color || $[37] !== ref || $[38] !== restProps || $[39] !== size || $[40] !== status || $[41] !== t10 || $[42] !== t11 || $[43] !== t12 || $[44] !== t8 || $[45] !== title ? (t13 = /* @__PURE__ */ jsxs(T0, {
1161
+ }) }), t11;
1162
+ return $[30] !== T0 || $[31] !== arrowPosition || $[32] !== as || $[33] !== color || $[34] !== ref || $[35] !== restProps || $[36] !== size || $[37] !== status || $[38] !== t10 || $[39] !== t6 || $[40] !== t8 || $[41] !== t9 || $[42] !== title ? (t11 = /* @__PURE__ */ jsxs(T0, {
1169
1163
  as,
1170
- "data-as": t8,
1164
+ "data-as": t6,
1171
1165
  "data-ui": "Avatar",
1172
1166
  ...restProps,
1173
1167
  $color: color,
@@ -1178,11 +1172,11 @@ function AvatarComponent(props) {
1178
1172
  ref,
1179
1173
  title,
1180
1174
  children: [
1181
- t10,
1182
- t11,
1183
- t12
1175
+ t8,
1176
+ t9,
1177
+ t10
1184
1178
  ]
1185
- }), $[33] = T0, $[34] = arrowPosition, $[35] = as, $[36] = color, $[37] = ref, $[38] = restProps, $[39] = size, $[40] = status, $[41] = t10, $[42] = t11, $[43] = t12, $[44] = t8, $[45] = title, $[46] = t13) : t13 = $[46], t13;
1179
+ }), $[30] = T0, $[31] = arrowPosition, $[32] = as, $[33] = color, $[34] = ref, $[35] = restProps, $[36] = size, $[37] = status, $[38] = t10, $[39] = t6, $[40] = t8, $[41] = t9, $[42] = title, $[43] = t11) : t11 = $[43], t11;
1186
1180
  }
1187
1181
  function _temp$2(s) {
1188
1182
  return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
@@ -1410,7 +1404,7 @@ function headingBaseStyle(props) {
1410
1404
  }
1411
1405
  const StyledHeading = /* @__PURE__ */ styled.div.withConfig({
1412
1406
  displayName: "StyledHeading",
1413
- componentId: "sc-95f8ng-0"
1407
+ componentId: "sc-r76jut-0"
1414
1408
  })(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
1415
1409
  function HeadingComponent(props) {
1416
1410
  let $ = c(27), align, childrenProp, ref, restProps, t0, t1, t2, textOverflow, weight;