twenty-ui 2.51.3 → 2.52.0

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 (129) hide show
  1. package/dist/{AllIcons-1tBWXXrE.cjs → AllIcons-HGLkp696.cjs} +1 -1
  2. package/dist/{AllIcons-ayl8BCtV.js → AllIcons-fCCVOqoJ.js} +1 -1
  3. package/dist/{Button-CU8BS-Yd.js → Button-Dd8cNsn1.js} +2 -2
  4. package/dist/{Button-iVyxlrwO.cjs → Button-Du8T-dOv.cjs} +1 -1
  5. package/dist/Dropdown-D3LPyrQI.js +1163 -0
  6. package/dist/Dropdown-h5-yIsU7.cjs +1 -0
  7. package/dist/Input-BKRR1xlO.js +26 -0
  8. package/dist/Input-DS19vWhl.cjs +1 -0
  9. package/dist/{ListItem-WLONJMo5.js → ListItem-DR7Xh2WV.js} +3 -3
  10. package/dist/{ListItem-B-SFWJZb.cjs → ListItem-g1B--M70.cjs} +1 -1
  11. package/dist/{Loader-Bb72CUQ9.cjs → Loader-Dau0YQpY.cjs} +1 -1
  12. package/dist/{Loader-DtHWQH8w.js → Loader-U1LuZtJf.js} +1 -1
  13. package/dist/{OverflowingTextWithTooltip-D4eZc-7P.js → OverflowingTextWithTooltip-Cky5WlIk.js} +1 -1
  14. package/dist/{OverflowingTextWithTooltip-ClpPsdpP.cjs → OverflowingTextWithTooltip-Dmsmy-9g.cjs} +1 -1
  15. package/dist/{Popover-CneCJTvD.cjs → Popover-B-VIhr5g.cjs} +1 -1
  16. package/dist/{Popover-CWeCV7X9.js → Popover-DhFCYRtv.js} +1 -1
  17. package/dist/{ProgressBar-goqxS9NE.cjs → ProgressBar-BG38LPgC.cjs} +1 -1
  18. package/dist/{ProgressBar-8pjpGrmZ.js → ProgressBar-BO0MkswY.js} +14 -14
  19. package/dist/{Radio-CpQPRHXa.cjs → Radio-BK47Ig6J.cjs} +1 -1
  20. package/dist/{Radio-VTjpEz8M.js → Radio-WuoC3hJ5.js} +4 -4
  21. package/dist/{Shortcut-N8TELGPI.cjs → Shortcut-CbbRd1uM.cjs} +1 -1
  22. package/dist/{Shortcut-Bp9iDdQg.js → Shortcut-YMhkp7f6.js} +1 -1
  23. package/dist/TablerIcons-CqzhliLC.js +462 -0
  24. package/dist/{Tooltip-08dDawT_.cjs → Tooltip-BXeUFCdb.cjs} +1 -1
  25. package/dist/{Tooltip-C7zc16gI.js → Tooltip-CT9YCDaV.js} +1 -1
  26. package/dist/components/code-editor.cjs +1 -1
  27. package/dist/components/code-editor.mjs +2 -2
  28. package/dist/components/data-display.cjs +1 -1
  29. package/dist/components/data-display.mjs +1 -1
  30. package/dist/components/feedback.cjs +1 -1
  31. package/dist/components/feedback.mjs +1 -1
  32. package/dist/components/input/SegmentedControl/SegmentedControl.d.ts +1 -1
  33. package/dist/components/input/SegmentedControl/types/SegmentedControlProps.d.ts +1 -0
  34. package/dist/components/input.cjs +1 -1
  35. package/dist/components/input.mjs +6 -6
  36. package/dist/components/layout.cjs +1 -1
  37. package/dist/components/layout.mjs +1 -1
  38. package/dist/components/navigation/Dropdown/Dropdown.d.ts +1 -1
  39. package/dist/components/navigation/Dropdown/__stories__/DropdownPlacementExample.d.ts +6 -0
  40. package/dist/components/navigation/Dropdown/hooks/useDropdownPlacementOrThrow.d.ts +1 -0
  41. package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +1 -1
  42. package/dist/components/navigation/Dropdown/internal/DropdownContentRenderer.d.ts +10 -0
  43. package/dist/components/navigation/Dropdown/internal/DropdownPlacementContext.d.ts +1 -0
  44. package/dist/components/navigation/Dropdown/internal/compareDropdownElementOrder.d.ts +4 -0
  45. package/dist/components/navigation/Dropdown/internal/getDropdownTabNavigation.d.ts +7 -0
  46. package/dist/components/navigation/Dropdown/internal/getDropdownTriggerTabTarget.d.ts +1 -0
  47. package/dist/components/navigation/index.d.ts +1 -0
  48. package/dist/components/navigation.cjs +1 -1
  49. package/dist/components/navigation.mjs +8 -7
  50. package/dist/components/settings.cjs +1 -1
  51. package/dist/components/settings.mjs +1 -1
  52. package/dist/components.cjs +1 -1
  53. package/dist/components.mjs +27 -26
  54. package/dist/{data-display-DUMj_z1t.js → data-display-B7beM2yK.js} +54 -54
  55. package/dist/{data-display-DzHM5j7j.cjs → data-display-C3Q_8G-N.cjs} +1 -1
  56. package/dist/{data-display-b-9s0RTe.js → data-display-CHKKTmH_.js} +63 -63
  57. package/dist/{data-display-D_kbXJJd.cjs → data-display-VghHkQY5.cjs} +1 -1
  58. package/dist/{feedback-BzR4ggrP.cjs → feedback-3S9S-Xi9.cjs} +1 -1
  59. package/dist/{feedback-EaZszoXf.js → feedback-DHATp8in.js} +51 -51
  60. package/dist/icon/components/TablerIcons.d.ts +1 -1
  61. package/dist/icon/index.d.ts +1 -1
  62. package/dist/{icon-ICz2_dVB.js → icon-C3fz8p3W.js} +3 -3
  63. package/dist/{icon-TSBamkxk.cjs → icon-C688lfSq.cjs} +1 -1
  64. package/dist/icon.cjs +1 -1
  65. package/dist/icon.mjs +505 -503
  66. package/dist/index.cjs +1 -1
  67. package/dist/index.mjs +658 -655
  68. package/dist/{input-CuySKbhm.js → input-BLU0vrJM.js} +585 -584
  69. package/dist/{input-ExCbk62Y.cjs → input-BLUZOGq8.cjs} +1 -1
  70. package/dist/{input-BQABEELu.cjs → input-DRIIJ4Zd.cjs} +1 -1
  71. package/dist/{input-DxoXgI5-.js → input-jkwxjdtI.js} +6 -6
  72. package/dist/{layout-B2KvJ900.js → layout-4nLOjbJA.js} +2 -2
  73. package/dist/{layout-B1Iwc9ku.cjs → layout-DEoY3Qd0.cjs} +1 -1
  74. package/dist/navigation-CSSOuhFm.cjs +1 -0
  75. package/dist/navigation-iP54gZTV.js +140 -0
  76. package/dist/primitives/data-display.cjs +1 -1
  77. package/dist/primitives/data-display.mjs +1 -1
  78. package/dist/primitives/feedback.cjs +1 -1
  79. package/dist/primitives/feedback.mjs +2 -2
  80. package/dist/primitives/input/Input/Input.d.ts +1 -1
  81. package/dist/primitives/input/Input/types/InputProps.d.ts +1 -0
  82. package/dist/primitives/input.cjs +1 -1
  83. package/dist/primitives/input.mjs +4 -4
  84. package/dist/primitives/navigation.cjs +1 -1
  85. package/dist/primitives/navigation.mjs +1 -1
  86. package/dist/primitives/surfaces/Card/Card.d.ts +1 -1
  87. package/dist/primitives/surfaces/Card/internal/CardRoot.d.ts +1 -1
  88. package/dist/primitives/surfaces/Card/types/CardRootProps.d.ts +1 -0
  89. package/dist/primitives/surfaces.cjs +1 -1
  90. package/dist/primitives/surfaces.mjs +3 -3
  91. package/dist/primitives/typography.cjs +1 -1
  92. package/dist/primitives/typography.mjs +3 -3
  93. package/dist/primitives.cjs +1 -1
  94. package/dist/primitives.mjs +14 -14
  95. package/dist/{settings-BTFAqYrD.js → settings-BmsLbd-g.js} +1 -1
  96. package/dist/{settings-D_iT1ngl.cjs → settings-DGwyi63i.cjs} +1 -1
  97. package/dist/style.css +1 -1
  98. package/dist/surfaces-C70biBA8.js +225 -0
  99. package/dist/surfaces-DcGz8LO-.cjs +1 -0
  100. package/dist/testing.cjs +1 -1
  101. package/dist/testing.mjs +1 -1
  102. package/dist/theme/constants/ThemeLight.d.ts +1 -0
  103. package/dist/theme/themeCssVariables.d.ts +1 -0
  104. package/dist/theme/themeTypes.d.ts +1 -0
  105. package/dist/theme-BJRNJNPO.cjs +1 -0
  106. package/dist/{theme-B2EaXhye.js → theme-CuGIQBsJ.js} +7 -4
  107. package/dist/theme-dark.css +1 -0
  108. package/dist/theme-light.css +1 -0
  109. package/dist/theme.cjs +1 -1
  110. package/dist/theme.mjs +1 -1
  111. package/dist/{typography-B05olPwL.cjs → typography-DeFnsH3k.cjs} +1 -1
  112. package/dist/{typography-BwyZEDDi.js → typography-sorTYmvG.js} +2 -2
  113. package/dist/{useIsMobile-D1ImfQnE.js → useIsMobile-CZeJLJJN.js} +1 -1
  114. package/dist/{useIsMobile-Byp9AIq-.cjs → useIsMobile-VmnhfE8g.cjs} +1 -1
  115. package/dist/{utilities-xZh8D2gd.cjs → utilities-Bfnz_GAC.cjs} +1 -1
  116. package/dist/{utilities-BKCMZyqZ.js → utilities-D0KcLLtO.js} +2 -2
  117. package/dist/utilities.cjs +1 -1
  118. package/dist/utilities.mjs +2 -2
  119. package/package.json +7 -7
  120. package/dist/Dropdown-D_hFndP5.cjs +0 -1
  121. package/dist/Dropdown-xXsGBv57.js +0 -1056
  122. package/dist/Input-D1sIHUZ5.js +0 -25
  123. package/dist/Input-D69M4UwD.cjs +0 -1
  124. package/dist/TablerIcons-B-5Ua_Ne.js +0 -460
  125. package/dist/navigation-DP5Edsq_.cjs +0 -1
  126. package/dist/navigation-DXMjQMPm.js +0 -134
  127. package/dist/surfaces-DtZwsfms.cjs +0 -1
  128. package/dist/surfaces-v0kQLZYO.js +0 -224
  129. package/dist/theme-1XkFz8Qu.cjs +0 -1
@@ -1,13 +1,13 @@
1
1
  import { t as m } from "./isDefined-fMi6eQ4r.js";
2
2
  import { t as z } from "./isRenderableSlot-DT_depzM.js";
3
- import { Dt as re, Et as oe, It as ne, U as K, on as ae, tc as te, za as le } from "./TablerIcons-B-5Ua_Ne.js";
4
- import { t as se } from "./doNotTranslate-BSVT8Xyd.js";
5
- import { a as T, h as ie, r as X } from "./theme-B2EaXhye.js";
3
+ import { Dt as re, Et as oe, It as ne, U as K, Va as ae, rc as te, sn as se } from "./TablerIcons-CqzhliLC.js";
4
+ import { t as le } from "./doNotTranslate-BSVT8Xyd.js";
5
+ import { a as T, h as ie, r as X } from "./theme-CuGIQBsJ.js";
6
6
  import { t as ce } from "./VisuallyHidden-CFZP7ybO.js";
7
7
  import { t as de } from "./ProgressRing-8mYV9cxE.js";
8
- import { s as _e } from "./utilities-BKCMZyqZ.js";
8
+ import { s as _e } from "./utilities-D0KcLLtO.js";
9
9
  import { useRender as N } from "@base-ui/react/use-render";
10
- import { isArray as ue, isBoolean as me, isNonEmptyArray as P, isNonEmptyString as V, isNumber as Q, isString as ve } from "@sniptt/guards";
10
+ import { isArray as ue, isBoolean as me, isNonEmptyArray as P, isNonEmptyString as D, isNumber as Q, isString as ve } from "@sniptt/guards";
11
11
  import { clsx as d } from "clsx";
12
12
  import { Children as L, createContext as he, isValidElement as pe, useContext as be, useId as Ce, useState as Ne } from "react";
13
13
  import { Fragment as y, jsx as o, jsxs as c } from "react/jsx-runtime";
@@ -17,10 +17,10 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
17
17
  itemContainer: ge,
18
18
  overflowCountContainer: Ie,
19
19
  overflowCount: xe
20
- }, we = 4, Lr = ({ avatars: e, className: r, maxVisible: n = we, total: a, renderOverflow: l, overflowShape: s = "square", overlap: t = "right", overlapOffset: i = "3px", render: h, ref: p, ..._ }) => {
21
- const u = L.toArray(e), A = Number.isNaN(n) ? 0 : Math.max(0, Math.floor(n)), g = u.slice(0, A), C = a ?? u.length, I = (Number.isFinite(C) ? Math.max(u.length, Math.floor(C)) : u.length) - g.length, S = m(l), k = I > 0 && (S ? l(I) : /* @__PURE__ */ c("span", {
20
+ }, we = 4, Lr = ({ avatars: e, className: r, maxVisible: n = we, total: a, renderOverflow: s, overflowShape: l = "square", overlap: t = "right", overlapOffset: i = "3px", render: h, ref: p, ..._ }) => {
21
+ const u = L.toArray(e), A = Number.isNaN(n) ? 0 : Math.max(0, Math.floor(n)), g = u.slice(0, A), C = a ?? u.length, I = (Number.isFinite(C) ? Math.max(u.length, Math.floor(C)) : u.length) - g.length, S = m(s), k = I > 0 && (S ? s(I) : /* @__PURE__ */ c("span", {
22
22
  className: x.overflowCount,
23
- "data-shape": s,
23
+ "data-shape": l,
24
24
  children: ["+", I]
25
25
  })), F = P(L.toArray(k)), M = { "--avatar-group-overlap-offset": i }, ee = N({
26
26
  render: h,
@@ -47,12 +47,12 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
47
47
  commands: ye,
48
48
  actions: Ae,
49
49
  prompt: Se
50
- }, jr = ({ commands: e, actions: r, render: n, ref: a, className: l, ...s }) => N({
50
+ }, jr = ({ commands: e, actions: r, render: n, ref: a, className: s, ...l }) => N({
51
51
  render: n,
52
52
  ref: a,
53
53
  props: {
54
- ...s,
55
- className: d($.container, l),
54
+ ...l,
55
+ className: d($.container, s),
56
56
  children: /* @__PURE__ */ c(y, { children: [/* @__PURE__ */ o("pre", {
57
57
  className: $.commands,
58
58
  children: /* @__PURE__ */ o("code", { children: e.map((t, i) => /* @__PURE__ */ c("span", { children: [
@@ -78,13 +78,13 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
78
78
  description: Le,
79
79
  value: je,
80
80
  action: Re
81
- }, Rr = ({ label: e, children: r, startIcon: n, action: a, labelWidth: l = "7rem", render: s, ref: t, className: i, style: h, ...p }) => {
81
+ }, Rr = ({ label: e, children: r, startIcon: n, action: a, labelWidth: s = "7rem", render: l, ref: t, className: i, style: h, ...p }) => {
82
82
  const _ = {
83
- "--details-row-label-width": Q(l) ? `${l}px` : l,
83
+ "--details-row-label-width": Q(s) ? `${s}px` : s,
84
84
  ...h
85
85
  };
86
86
  return N({
87
- render: s,
87
+ render: l,
88
88
  ref: t,
89
89
  props: {
90
90
  ...p,
@@ -115,23 +115,23 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
115
115
  }, Oe = "_list_1i4lv_1", qe = "_nested_1i4lv_8", U = {
116
116
  list: Oe,
117
117
  nested: qe
118
- }, De = ({ depth: e, className: r, children: n }) => /* @__PURE__ */ o("ul", {
118
+ }, Ve = ({ depth: e, className: r, children: n }) => /* @__PURE__ */ o("ul", {
119
119
  className: d(U.list, e > 0 && U.nested, r),
120
120
  children: n
121
121
  }), Y = he(void 0), f = () => {
122
122
  const e = be(Y);
123
- if (!m(e)) throw new Error(se("useJsonTreeContextOrThrow must be used within a JsonTreeContextProvider"));
123
+ if (!m(e)) throw new Error(le("useJsonTreeContextOrThrow must be used within a JsonTreeContextProvider"));
124
124
  return e;
125
- }, Ve = "_button_1e3ij_1", Be = "_red_1e3ij_17", Fe = "_chevron_1e3ij_22", j = {
126
- button: Ve,
125
+ }, De = "_button_1e3ij_1", Be = "_red_1e3ij_17", Fe = "_chevron_1e3ij_22", j = {
126
+ button: De,
127
127
  red: Be,
128
128
  chevron: Fe
129
129
  }, Me = ({ isOpen: e, onClick: r, variant: n }) => {
130
- const a = X(), { arrowButtonCollapsedLabel: l, arrowButtonExpandedLabel: s } = f(), t = n === "blue" ? T.color.blue : n === "red" ? T.font.color.danger : T.font.color.secondary;
130
+ const a = X(), { arrowButtonCollapsedLabel: s, arrowButtonExpandedLabel: l } = f(), t = n === "blue" ? T.color.blue : n === "red" ? T.font.color.danger : T.font.color.secondary;
131
131
  return /* @__PURE__ */ c("button", {
132
132
  className: d(j.button, n === "red" && j.red),
133
133
  onClick: r,
134
- children: [/* @__PURE__ */ o(ce, { children: e ? s : l }), /* @__PURE__ */ o("div", {
134
+ children: [/* @__PURE__ */ o(ce, { children: e ? l : s }), /* @__PURE__ */ o("div", {
135
135
  className: j.chevron,
136
136
  "data-open": e || void 0,
137
137
  children: /* @__PURE__ */ o(re, {
@@ -140,8 +140,8 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
140
140
  })
141
141
  })]
142
142
  });
143
- }, ze = ({ label: e, value: r, depth: n, keyPath: a, highlighting: l }) => {
144
- const { emptyArrayLabel: s } = f();
143
+ }, ze = ({ label: e, value: r, depth: n, keyPath: a, highlighting: s }) => {
144
+ const { emptyArrayLabel: l } = f();
145
145
  return /* @__PURE__ */ o(B, {
146
146
  elements: [...r.entries()].map(([t, i]) => ({
147
147
  id: t,
@@ -152,12 +152,12 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
152
152
  label: e,
153
153
  Icon: K,
154
154
  depth: n,
155
- emptyElementsText: s,
155
+ emptyElementsText: l,
156
156
  keyPath: a,
157
- highlighting: l
157
+ highlighting: s
158
158
  });
159
- }, Pe = ({ label: e, value: r, depth: n, keyPath: a, highlighting: l }) => {
160
- const { emptyObjectLabel: s } = f();
159
+ }, Pe = ({ label: e, value: r, depth: n, keyPath: a, highlighting: s }) => {
160
+ const { emptyObjectLabel: l } = f();
161
161
  return /* @__PURE__ */ o(B, {
162
162
  elements: Object.entries(r).map(([t, i]) => ({
163
163
  id: t,
@@ -166,11 +166,11 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
166
166
  })),
167
167
  renderElementsCount: (t) => `{${t}}`,
168
168
  label: e,
169
- Icon: ae,
169
+ Icon: se,
170
170
  depth: n,
171
- emptyElementsText: s,
171
+ emptyElementsText: l,
172
172
  keyPath: a,
173
- highlighting: l
173
+ highlighting: s
174
174
  });
175
175
  }, He = "_labelContainer_1pq94_1", Ue = "_blue_1pq94_23", Ge = "_red_1pq94_29", R = {
176
176
  labelContainer: He,
@@ -191,16 +191,16 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
191
191
  red: Qe,
192
192
  button: Ye
193
193
  }, Ze = ({ valueAsString: e, highlighting: r }) => {
194
- const { onNodeValueClick: n } = f(), a = m(n), l = () => {
194
+ const { onNodeValueClick: n } = f(), a = m(n), s = () => {
195
195
  n?.(e);
196
- }, s = d(J.text, r === "blue" && J.blue, r === "red" && J.red);
196
+ }, l = d(J.text, r === "blue" && J.blue, r === "red" && J.red);
197
197
  return a ? /* @__PURE__ */ o("button", {
198
- className: d(s, J.button),
198
+ className: d(l, J.button),
199
199
  type: "button",
200
- onClick: l,
200
+ onClick: s,
201
201
  children: e
202
202
  }) : /* @__PURE__ */ o("span", {
203
- className: s,
203
+ className: l,
204
204
  children: e
205
205
  });
206
206
  }, We = "_listItem_1i7if_1", er = { listItem: We }, w = (e) => /* @__PURE__ */ c("li", {
@@ -214,16 +214,16 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
214
214
  highlighting: e.highlighting
215
215
  })]
216
216
  }), rr = (e) => ue(e), W = ({ label: e, value: r, depth: n, keyPath: a }) => {
217
- const { getNodeHighlighting: l, emptyStringLabel: s } = f(), t = l?.(a);
217
+ const { getNodeHighlighting: s, emptyStringLabel: l } = f(), t = s?.(a);
218
218
  return m(r) ? ve(r) ? /* @__PURE__ */ o(w, {
219
219
  label: e,
220
- valueAsString: V(r) ? r : s,
220
+ valueAsString: D(r) ? r : l,
221
221
  Icon: te,
222
222
  highlighting: t
223
223
  }) : Q(r) ? /* @__PURE__ */ o(w, {
224
224
  label: e,
225
225
  valueAsString: String(r),
226
- Icon: le,
226
+ Icon: ae,
227
227
  highlighting: t
228
228
  }) : me(r) ? /* @__PURE__ */ o(w, {
229
229
  label: e,
@@ -248,29 +248,29 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
248
248
  Icon: ne,
249
249
  highlighting: t
250
250
  });
251
- }, or = "_container_d0cqx_1", nr = "_labelContainer_d0cqx_6", ar = "_elementsCount_d0cqx_12", tr = "_elementsCountRed_d0cqx_16", lr = "_panel_d0cqx_20", sr = "_list_d0cqx_30", ir = "_nested_d0cqx_37", v = {
251
+ }, or = "_container_d0cqx_1", nr = "_labelContainer_d0cqx_6", ar = "_elementsCount_d0cqx_12", tr = "_elementsCountRed_d0cqx_16", sr = "_panel_d0cqx_20", lr = "_list_d0cqx_30", ir = "_nested_d0cqx_37", v = {
252
252
  container: or,
253
253
  labelContainer: nr,
254
254
  elementsCount: ar,
255
255
  elementsCountRed: tr,
256
- panel: lr,
257
- list: sr,
256
+ panel: sr,
257
+ list: lr,
258
258
  nested: ir
259
- }, B = ({ label: e, Icon: r, elements: n, renderElementsCount: a, emptyElementsText: l, depth: s, keyPath: t, highlighting: i }) => {
259
+ }, B = ({ label: e, Icon: r, elements: n, renderElementsCount: a, emptyElementsText: s, depth: l, keyPath: t, highlighting: i }) => {
260
260
  const { shouldExpandNodeInitially: h } = f(), p = !m(e), [_, u] = Ne(h({
261
261
  keyPath: t,
262
- depth: s
262
+ depth: l
263
263
  })), A = /* @__PURE__ */ o("ul", {
264
- className: d(v.list, s > 0 && v.nested),
264
+ className: d(v.list, l > 0 && v.nested),
265
265
  children: n.length === 0 ? /* @__PURE__ */ o(w, {
266
- valueAsString: l,
266
+ valueAsString: s,
267
267
  highlighting: void 0
268
268
  }) : n.map(({ id: C, label: I, value: S }) => {
269
- const k = V(t) ? `${t}.${C}` : String(C);
269
+ const k = D(t) ? `${t}.${C}` : String(C);
270
270
  return /* @__PURE__ */ o(W, {
271
271
  label: I,
272
272
  value: S,
273
- depth: s + 1,
273
+ depth: l + 1,
274
274
  keyPath: k
275
275
  }, C);
276
276
  })
@@ -315,7 +315,7 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
315
315
  ...a,
316
316
  shouldExpandNodeInitially: n
317
317
  },
318
- children: /* @__PURE__ */ o(De, {
318
+ children: /* @__PURE__ */ o(Ve, {
319
319
  depth: 0,
320
320
  children: m(r) ? /* @__PURE__ */ o(B, {
321
321
  elements: r,
@@ -333,8 +333,8 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
333
333
  row: _r,
334
334
  label: ur,
335
335
  icon: mr
336
- }, qr = ({ children: e, startIcon: r, value: n, progress: a, progressColor: l, progressValueText: s, render: t, ref: i, className: h, ...p }) => {
337
- const _ = Ce(), u = s ?? n;
336
+ }, qr = ({ children: e, startIcon: r, value: n, progress: a, progressColor: s, progressValueText: l, render: t, ref: i, className: h, ...p }) => {
337
+ const _ = Ce(), u = l ?? n;
338
338
  return N({
339
339
  render: t,
340
340
  ref: i,
@@ -354,9 +354,9 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
354
354
  }), m(a) ? /* @__PURE__ */ o(de, {
355
355
  value: a,
356
356
  size: "sm",
357
- barColor: l,
357
+ barColor: s,
358
358
  "aria-labelledby": _,
359
- ...V(u) ? { "aria-valuetext": u } : {},
359
+ ...D(u) ? { "aria-valuetext": u } : {},
360
360
  children: n
361
361
  }) : /* @__PURE__ */ o("span", { children: n })] })
362
362
  }
@@ -364,11 +364,11 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
364
364
  }, vr = "_root_7l8sk_1", hr = "_stackedIcon_7l8sk_14", G = {
365
365
  root: vr,
366
366
  stackedIcon: hr
367
- }, Dr = ({ icon: e, stackedIcon: r, className: n, render: a, ref: l, ...s }) => N({
367
+ }, Vr = ({ icon: e, stackedIcon: r, className: n, render: a, ref: s, ...l }) => N({
368
368
  render: a,
369
- ref: l,
369
+ ref: s,
370
370
  props: {
371
- ...s,
371
+ ...l,
372
372
  className: d(G.root, n),
373
373
  children: /* @__PURE__ */ c(y, { children: [/* @__PURE__ */ o("span", {
374
374
  "aria-hidden": "true",
@@ -383,18 +383,18 @@ var fe = "_container_5cu4g_1", ge = "_itemContainer_5cu4g_6", Ie = "_overflowCou
383
383
  background: 4,
384
384
  border: 6,
385
385
  icon: 10
386
- }, D = (e, r) => T.color[`${e}${r}`] ?? T.tag.text[e], pr = (e) => {
386
+ }, V = (e, r) => T.color[`${e}${r}`] ?? T.tag.text[e], pr = (e) => {
387
387
  const r = _e(e);
388
388
  return {
389
- backgroundColor: D(r, q.background),
390
- iconColor: D(r, q.icon),
391
- borderColor: D(r, q.border)
389
+ backgroundColor: V(r, q.background),
390
+ iconColor: V(r, q.icon),
391
+ borderColor: V(r, q.border)
392
392
  };
393
- }, br = "_root_9ntdy_1", Cr = { root: br }, Vr = ({ icon: e, color: r = ie, className: n, style: a, render: l, ref: s, ...t }) => {
393
+ }, br = "_root_9ntdy_1", Cr = { root: br }, Dr = ({ icon: e, color: r = ie, className: n, style: a, render: s, ref: l, ...t }) => {
394
394
  const i = pr(r);
395
395
  return N({
396
- render: l,
397
- ref: s,
396
+ render: s,
397
+ ref: l,
398
398
  props: {
399
399
  ...t,
400
400
  className: d(Cr.root, n),
@@ -416,7 +416,7 @@ export {
416
416
  qr as i,
417
417
  pr as n,
418
418
  Rr as o,
419
- Dr as r,
419
+ Vr as r,
420
420
  jr as s,
421
- Vr as t
421
+ Dr as t
422
422
  };
@@ -1,2 +1,2 @@
1
- const x=require("./theme-1XkFz8Qu.cjs"),m=require("./isDefined-DS2Q42p5.cjs"),B=require("./isRenderableSlot-Guryb6Nf.cjs"),Y=require("./doNotTranslate-CHE7WmRS.cjs"),Z=require("./VisuallyHidden-B-n4x1KY.cjs"),W=require("./ProgressRing-g1nHGyUp.cjs"),ee=require("./utilities-xZh8D2gd.cjs");let f=require("@base-ui/react/use-render"),u=require("@sniptt/guards"),c=require("clsx"),b=require("react"),e=require("react/jsx-runtime"),M=require("@base-ui/react/collapsible"),h=require("@tabler/icons-react");var re="_container_5cu4g_1",ne="_itemContainer_5cu4g_6",te="_overflowCountContainer_5cu4g_22",se="_overflowCount_5cu4g_22",I={container:re,itemContainer:ne,overflowCountContainer:te,overflowCount:se},oe=4,ae=({avatars:r,className:n,maxVisible:t=oe,total:s,renderOverflow:a,overflowShape:l="square",overlap:o="right",overlapOffset:i="3px",render:p,ref:j,...d})=>{const _=b.Children.toArray(r),q=Number.isNaN(t)?0:Math.max(0,Math.floor(t)),y=_.slice(0,q),N=s??_.length,T=(Number.isFinite(N)?Math.max(_.length,Math.floor(N)):_.length)-y.length,A=m.isDefined(a),S=T>0&&(A?a(T):(0,e.jsxs)("span",{className:I.overflowCount,"data-shape":l,children:["+",T]})),P=(0,u.isNonEmptyArray)(b.Children.toArray(S)),F={"--avatar-group-overlap-offset":i},Q=(0,f.useRender)({render:p,ref:j,props:{...d,className:(0,c.clsx)(I.container,n),children:(0,e.jsxs)(e.Fragment,{children:[b.Children.map(y,J=>(0,e.jsx)("span",{className:I.itemContainer,"data-overlap":o,style:F,children:J},(0,b.isValidElement)(J)?J.key:void 0)),P&&(0,e.jsx)("span",{className:(0,c.clsx)(I.itemContainer,!A&&I.overflowCountContainer),"data-overlap":o,style:F,children:S})]})}});return(0,u.isNonEmptyArray)(y)||P?Q:null},le="_container_1j72k_1",ie="_commands_1j72k_13",ce="_actions_1j72k_25",de="_prompt_1j72k_32",k={container:le,commands:ie,actions:ce,prompt:de},ue=({commands:r,actions:n,render:t,ref:s,className:a,...l})=>(0,f.useRender)({render:t,ref:s,props:{...l,className:(0,c.clsx)(k.container,a),children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("pre",{className:k.commands,children:(0,e.jsx)("code",{children:r.map((o,i)=>(0,e.jsxs)("span",{children:[i>0&&`
1
+ const x=require("./theme-BJRNJNPO.cjs"),m=require("./isDefined-DS2Q42p5.cjs"),B=require("./isRenderableSlot-Guryb6Nf.cjs"),Y=require("./doNotTranslate-CHE7WmRS.cjs"),Z=require("./VisuallyHidden-B-n4x1KY.cjs"),W=require("./ProgressRing-g1nHGyUp.cjs"),ee=require("./utilities-Bfnz_GAC.cjs");let f=require("@base-ui/react/use-render"),u=require("@sniptt/guards"),c=require("clsx"),b=require("react"),e=require("react/jsx-runtime"),M=require("@base-ui/react/collapsible"),h=require("@tabler/icons-react");var re="_container_5cu4g_1",ne="_itemContainer_5cu4g_6",te="_overflowCountContainer_5cu4g_22",se="_overflowCount_5cu4g_22",I={container:re,itemContainer:ne,overflowCountContainer:te,overflowCount:se},oe=4,ae=({avatars:r,className:n,maxVisible:t=oe,total:s,renderOverflow:a,overflowShape:l="square",overlap:o="right",overlapOffset:i="3px",render:p,ref:j,...d})=>{const _=b.Children.toArray(r),q=Number.isNaN(t)?0:Math.max(0,Math.floor(t)),y=_.slice(0,q),N=s??_.length,T=(Number.isFinite(N)?Math.max(_.length,Math.floor(N)):_.length)-y.length,A=m.isDefined(a),S=T>0&&(A?a(T):(0,e.jsxs)("span",{className:I.overflowCount,"data-shape":l,children:["+",T]})),P=(0,u.isNonEmptyArray)(b.Children.toArray(S)),F={"--avatar-group-overlap-offset":i},Q=(0,f.useRender)({render:p,ref:j,props:{...d,className:(0,c.clsx)(I.container,n),children:(0,e.jsxs)(e.Fragment,{children:[b.Children.map(y,J=>(0,e.jsx)("span",{className:I.itemContainer,"data-overlap":o,style:F,children:J},(0,b.isValidElement)(J)?J.key:void 0)),P&&(0,e.jsx)("span",{className:(0,c.clsx)(I.itemContainer,!A&&I.overflowCountContainer),"data-overlap":o,style:F,children:S})]})}});return(0,u.isNonEmptyArray)(y)||P?Q:null},le="_container_1j72k_1",ie="_commands_1j72k_13",ce="_actions_1j72k_25",de="_prompt_1j72k_32",k={container:le,commands:ie,actions:ce,prompt:de},ue=({commands:r,actions:n,render:t,ref:s,className:a,...l})=>(0,f.useRender)({render:t,ref:s,props:{...l,className:(0,c.clsx)(k.container,a),children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("pre",{className:k.commands,children:(0,e.jsx)("code",{children:r.map((o,i)=>(0,e.jsxs)("span",{children:[i>0&&`
2
2
  `,(0,e.jsx)("span",{className:k.prompt,"aria-hidden":"true",children:"> "}),o]},i))})}),m.isDefined(n)&&(0,e.jsx)("div",{className:k.actions,children:n})]})}}),_e="_row_1usvs_1",me="_label_1usvs_11",ve="_labelText_1usvs_22",xe="_icon_1usvs_27",be="_description_1usvs_34",he="_value_1usvs_43",pe="_action_1usvs_54",C={row:_e,label:me,labelText:ve,icon:xe,description:be,value:he,action:pe},je=({label:r,children:n,startIcon:t,action:s,labelWidth:a="7rem",render:l,ref:o,className:i,style:p,...j})=>{const d={"--details-row-label-width":(0,u.isNumber)(a)?`${a}px`:a,...p};return(0,f.useRender)({render:l,ref:o,props:{...j,className:(0,c.clsx)(C.row,i),style:d,children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("dt",{className:C.label,children:[B.isRenderableSlot(t)&&(0,e.jsx)("span",{className:C.icon,"aria-hidden":"true",children:t}),(0,e.jsx)("span",{className:C.labelText,children:r})]}),(0,e.jsxs)("dd",{className:C.description,children:[(0,e.jsx)("div",{className:C.value,children:n}),B.isRenderableSlot(s)&&(0,e.jsx)("div",{className:C.action,children:s})]})]})}})},Ce="_list_1i4lv_1",Ne="_nested_1i4lv_8",z={list:Ce,nested:Ne},fe=({depth:r,className:n,children:t})=>(0,e.jsx)("ul",{className:(0,c.clsx)(z.list,r>0&&z.nested,n),children:t}),G=(0,b.createContext)(void 0),g=()=>{const r=(0,b.useContext)(G);if(!m.isDefined(r))throw new Error(Y.doNotTranslate("useJsonTreeContextOrThrow must be used within a JsonTreeContextProvider"));return r},ge="_button_1e3ij_1",ye="_red_1e3ij_17",Te="_chevron_1e3ij_22",O={button:ge,red:ye,chevron:Te},Ie=({isOpen:r,onClick:n,variant:t})=>{const s=x.useTheme(),{arrowButtonCollapsedLabel:a,arrowButtonExpandedLabel:l}=g(),o=t==="blue"?x.themeCssVariables.color.blue:t==="red"?x.themeCssVariables.font.color.danger:x.themeCssVariables.font.color.secondary;return(0,e.jsxs)("button",{className:(0,c.clsx)(O.button,t==="red"&&O.red),onClick:n,children:[(0,e.jsx)(Z.VisuallyHidden,{children:r?l:a}),(0,e.jsx)("div",{className:O.chevron,"data-open":r||void 0,children:(0,e.jsx)(h.IconChevronDown,{size:s.icon.size.md,color:o})})]})},we=({label:r,value:n,depth:t,keyPath:s,highlighting:a})=>{const{emptyArrayLabel:l}=g();return(0,e.jsx)(V,{elements:[...n.entries()].map(([o,i])=>({id:o,label:String(o),value:i})),renderElementsCount:o=>`[${o}]`,label:r,Icon:h.IconBrackets,depth:t,emptyElementsText:l,keyPath:s,highlighting:a})},qe=({label:r,value:n,depth:t,keyPath:s,highlighting:a})=>{const{emptyObjectLabel:l}=g();return(0,e.jsx)(V,{elements:Object.entries(n).map(([o,i])=>({id:o,label:o,value:i})),renderElementsCount:o=>`{${o}}`,label:r,Icon:h.IconCube,depth:t,emptyElementsText:l,keyPath:s,highlighting:a})},Ae="_labelContainer_1pq94_1",Se="_blue_1pq94_23",ke="_red_1pq94_29",E={labelContainer:Ae,blue:Se,red:ke},K=({label:r,Icon:n,highlighting:t})=>{const s=x.useTheme();return(0,e.jsxs)("span",{className:(0,c.clsx)(E.labelContainer,t==="blue"&&E.blue,t==="red"&&E.red),children:[(0,e.jsx)(n,{size:s.icon.size.md,color:t==="blue"?s.color.blue:t==="red"?s.font.color.danger:s.font.color.tertiary}),(0,e.jsx)("span",{children:r})]})},Re="_text_1ot24_1",Je="_blue_1ot24_10",Oe="_red_1ot24_14",Ee="_button_1ot24_18",R={text:Re,blue:Je,red:Oe,button:Ee},$e=({valueAsString:r,highlighting:n})=>{const{onNodeValueClick:t}=g(),s=m.isDefined(t),a=()=>{t?.(r)},l=(0,c.clsx)(R.text,n==="blue"&&R.blue,n==="red"&&R.red);return s?(0,e.jsx)("button",{className:(0,c.clsx)(l,R.button),type:"button",onClick:a,children:r}):(0,e.jsx)("span",{className:l,children:r})},De="_listItem_1i7if_1",Le={listItem:De},w=r=>(0,e.jsxs)("li",{className:Le.listItem,children:[r.label&&(0,e.jsx)(K,{label:r.label,Icon:r.Icon,highlighting:r.highlighting}),(0,e.jsx)($e,{valueAsString:r.valueAsString,highlighting:r.highlighting})]}),Ve=r=>(0,u.isArray)(r),U=({label:r,value:n,depth:t,keyPath:s})=>{const{getNodeHighlighting:a,emptyStringLabel:l}=g(),o=a?.(s);return m.isDefined(n)?(0,u.isString)(n)?(0,e.jsx)(w,{label:r,valueAsString:(0,u.isNonEmptyString)(n)?n:l,Icon:h.IconTypography,highlighting:o}):(0,u.isNumber)(n)?(0,e.jsx)(w,{label:r,valueAsString:String(n),Icon:h.IconNumber9,highlighting:o}):(0,u.isBoolean)(n)?(0,e.jsx)(w,{label:r,valueAsString:String(n),Icon:h.IconCheckbox,highlighting:o}):Ve(n)?(0,e.jsx)(we,{label:r,value:n,depth:t,keyPath:s,highlighting:o}):(0,e.jsx)(qe,{label:r,value:n,depth:t,keyPath:s,highlighting:o}):(0,e.jsx)(w,{label:r,valueAsString:"null",Icon:h.IconCircleOff,highlighting:o})},Pe="_container_d0cqx_1",Fe="_labelContainer_d0cqx_6",Be="_elementsCount_d0cqx_12",Me="_elementsCountRed_d0cqx_16",ze="_panel_d0cqx_20",He="_list_d0cqx_30",Ge="_nested_d0cqx_37",v={container:Pe,labelContainer:Fe,elementsCount:Be,elementsCountRed:Me,panel:ze,list:He,nested:Ge},V=({label:r,Icon:n,elements:t,renderElementsCount:s,emptyElementsText:a,depth:l,keyPath:o,highlighting:i})=>{const{shouldExpandNodeInitially:p}=g(),j=!m.isDefined(r),[d,_]=(0,b.useState)(p({keyPath:o,depth:l})),q=(0,e.jsx)("ul",{className:(0,c.clsx)(v.list,l>0&&v.nested),children:t.length===0?(0,e.jsx)(w,{valueAsString:a,highlighting:void 0}):t.map(({id:N,label:T,value:A})=>{const S=(0,u.isNonEmptyString)(o)?`${o}.${N}`:String(N);return(0,e.jsx)(U,{label:T,value:A,depth:l+1,keyPath:S},N)})}),y=()=>{_(!d)};return j?(0,e.jsx)("li",{className:v.container,children:q}):(0,e.jsxs)(M.Collapsible.Root,{className:v.container,open:d,render:(0,e.jsx)("li",{}),children:[(0,e.jsxs)("div",{className:v.labelContainer,children:[(0,e.jsx)(Ie,{isOpen:d,onClick:y,variant:i==="partial-blue"?"blue":i==="red"?i:void 0}),(0,e.jsx)(K,{label:r,Icon:n,highlighting:i==="red"?i:void 0}),s&&(0,e.jsx)("span",{className:(0,c.clsx)(v.elementsCount,i==="red"&&v.elementsCountRed),children:s(t.length)})]}),(0,e.jsx)(M.Collapsible.Panel,{className:v.panel,children:q})]})},Ke=({value:r,children:n})=>(0,e.jsx)(G.Provider,{value:r,children:n}),Ue=({depth:r})=>r<=1,Xe=({value:r,entries:n,shouldExpandNodeInitially:t=Ue,...s})=>(0,e.jsx)(Ke,{value:{...s,shouldExpandNodeInitially:t},children:(0,e.jsx)(fe,{depth:0,children:m.isDefined(n)?(0,e.jsx)(V,{elements:n,Icon:h.IconBrackets,depth:0,keyPath:"",emptyElementsText:s.emptyObjectLabel}):(0,e.jsx)(U,{value:r??null,depth:0,keyPath:""})})}),Qe="_row_1hj4l_1",Ye="_label_1hj4l_11",Ze="_icon_1hj4l_20",$={row:Qe,label:Ye,icon:Ze},We=({children:r,startIcon:n,value:t,progress:s,progressColor:a,progressValueText:l,render:o,ref:i,className:p,...j})=>{const d=(0,b.useId)(),_=l??t;return(0,f.useRender)({render:o,ref:i,props:{...j,className:(0,c.clsx)($.row,p),children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:$.label,children:[m.isDefined(n)&&(0,e.jsx)("span",{className:$.icon,"aria-hidden":"true",children:n}),(0,e.jsx)("span",{id:d,children:r})]}),m.isDefined(s)?(0,e.jsx)(W.ProgressRing,{value:s,size:"sm",barColor:a,"aria-labelledby":d,...(0,u.isNonEmptyString)(_)?{"aria-valuetext":_}:{},children:t}):(0,e.jsx)("span",{children:t})]})}})},er="_root_7l8sk_1",rr="_stackedIcon_7l8sk_14",H={root:er,stackedIcon:rr},nr=({icon:r,stackedIcon:n,className:t,render:s,ref:a,...l})=>(0,f.useRender)({render:s,ref:a,props:{...l,className:(0,c.clsx)(H.root,t),children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{"aria-hidden":"true",children:r}),(0,e.jsx)("span",{"aria-hidden":"true",className:H.stackedIcon,children:n})]})}}),D={background:4,border:6,icon:10},L=(r,n)=>x.themeCssVariables.color[`${r}${n}`]??x.themeCssVariables.tag.text[r],X=r=>{const n=ee.parseThemeColor(r);return{backgroundColor:L(n,D.background),iconColor:L(n,D.icon),borderColor:L(n,D.border)}},tr="_root_9ntdy_1",sr={root:tr},or=({icon:r,color:n=x.DEFAULT_THEME_COLOR_FALLBACK,className:t,style:s,render:a,ref:l,...o})=>{const i=X(n);return(0,f.useRender)({render:a,ref:l,props:{...o,className:(0,c.clsx)(sr.root,t),style:{backgroundColor:i.backgroundColor,color:i.iconColor,...s},children:(0,e.jsx)("span",{"aria-hidden":"true",children:r})}})};Object.defineProperty(exports,"AvatarGroup",{enumerable:!0,get:function(){return ae}});Object.defineProperty(exports,"CommandBlock",{enumerable:!0,get:function(){return ue}});Object.defineProperty(exports,"DetailsRow",{enumerable:!0,get:function(){return je}});Object.defineProperty(exports,"JsonTree",{enumerable:!0,get:function(){return Xe}});Object.defineProperty(exports,"MetricRow",{enumerable:!0,get:function(){return We}});Object.defineProperty(exports,"StackIcon",{enumerable:!0,get:function(){return nr}});Object.defineProperty(exports,"TintedIconTile",{enumerable:!0,get:function(){return or}});Object.defineProperty(exports,"getIconTileColorShades",{enumerable:!0,get:function(){return X}});
@@ -1 +1 @@
1
- const z=require("./theme-1XkFz8Qu.cjs"),d=require("./isDefined-DS2Q42p5.cjs"),y=require("./isRenderableSlot-Guryb6Nf.cjs"),P=require("./doNotTranslate-CHE7WmRS.cjs"),fe=require("./mergeClassNames-D4lshrT6.cjs"),I=require("./Button-iVyxlrwO.cjs"),O=require("./ProgressBar-goqxS9NE.cjs"),ve=require("./useProvidedTextDirection-PVaoQCLH.cjs"),_e=require("./OverflowingTextWithTooltip-ClpPsdpP.cjs"),me=require("./Separator-UJVlrTzw.cjs");let F=require("@base-ui/react/use-render"),E=require("@sniptt/guards"),R=require("clsx"),p=require("react"),r=require("react/jsx-runtime"),Q=require("@base-ui/utils/store"),pe=require("react-dom"),j=require("@tabler/icons-react");var Te="_action_3r2bm_1",xe={action:Te},he=({className:e,...t})=>(0,r.jsx)(I.Button,{...t,size:"sm",variant:"ghost",className:fe.mergeClassNames(xe.action,e)}),ge="_container_1ix4w_1",be="_containerFullWidth_1ix4w_40",Ce="_header_1ix4w_44",je="_iconContainer_1ix4w_53",we="_title_1ix4w_63",ye="_descriptionWrapper_1ix4w_75",De="_descriptionWrapperWithIcon_1ix4w_82",Ne="_descriptionWrapperWithAction_1ix4w_86",qe="_description_1ix4w_75",Pe="_footer_1ix4w_99",Ee="_closeButton_1ix4w_106",h={container:ge,containerFullWidth:be,header:Ce,iconContainer:je,title:we,descriptionWrapper:ye,descriptionWrapperWithIcon:De,descriptionWrapperWithAction:Ne,description:qe,footer:Pe,closeButton:Ee},Re=({status:e="info",variant:t="soft",color:s=O.FEEDBACK_STATUS_COLORS[e],title:n,description:o,fullWidth:c=!1,icon:i=(0,r.jsx)(j.IconHelp,{size:z.themeCssVariables.icon.size.md,"aria-hidden":"true"}),action:f,closeLabel:v=P.doNotTranslate("Close"),onDismiss:_,className:T,render:x,ref:l,...u})=>{const a=y.isRenderableSlot(i),m=y.isRenderableSlot(f);return(0,F.useRender)({render:x,ref:l,state:{status:e,variant:t,color:s},props:{...u,className:(0,R.clsx)(h.container,c&&h.containerFullWidth,T),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:h.header,children:[a&&(0,r.jsx)("div",{className:h.iconContainer,children:i}),(0,r.jsx)("div",{className:h.title,children:n}),d.isDefined(_)&&(0,r.jsx)(I.Button,{type:"button",startIcon:(0,r.jsx)(j.IconX,{"aria-hidden":"true"}),className:h.closeButton,variant:"ghost",size:"sm","aria-label":v,onClick:()=>_()})]}),y.isRenderableSlot(o)&&(0,r.jsx)("div",{className:(0,R.clsx)(h.descriptionWrapper,a&&h.descriptionWrapperWithIcon,m&&h.descriptionWrapperWithAction),children:(0,r.jsx)("div",{className:h.description,children:o})}),m&&(0,r.jsx)("div",{className:h.footer,children:f})]})}})},Ae=Object.assign(Re,{Action:he}),Se="_banner_qbpcz_1",Ie="_embedded_qbpcz_6",Oe="_bannerContent_qbpcz_10",ke="_icon_qbpcz_18",We="_bannerText_qbpcz_28",Be="_compact_qbpcz_33",ze="_fullWidth_qbpcz_58",q={banner:Se,embedded:Ie,bannerContent:Oe,icon:ke,bannerText:We,compact:Be,fullWidth:ze},Fe=({children:e,layout:t="standard",variant:s="soft",embedded:n=!1,fullWidth:o=!1,icon:c=(0,r.jsx)(j.IconInfoCircle,{"aria-hidden":"true"}),className:i,...f})=>{const v=t==="compact",_=!v&&(0,E.isString)(e);return(0,r.jsx)(O.Banner,{...f,className:(0,R.clsx)(q.banner,v&&q.compact,n&&q.embedded,o&&q.fullWidth,i),variant:s,"data-layout":t,children:(0,r.jsxs)("div",{className:q.bannerContent,children:[y.isRenderableSlot(c)&&(0,r.jsx)("span",{className:q.icon,children:c}),(0,r.jsx)("div",{className:q.bannerText,children:_?(0,r.jsx)(_e.OverflowingTextWithTooltip,{isFocusable:!0,text:(0,r.jsx)(r.Fragment,{children:e}),tooltipContent:e}):e})]})})},Me=Object.assign(Fe,{Action:O.Banner.Action}),D=e=>e.status==="visible",k=({store:e,toastsToClose:t,nextToasts:s=e.state.toasts})=>{const n=t.filter(i=>D(i)&&e.state.toasts.includes(i)),o=s.map(i=>n.includes(i)?{...i,status:"closing"}:i),c=e.state.mountedToasterCount>0;e.set("toasts",c?o:o.filter(D));for(const i of n)i.notification.onClose?.()},Y=(0,p.createContext)(void 0),N=()=>{const e=(0,p.useContext)(Y);if(!d.isDefined(e))throw new Error(P.doNotTranslate("Toast components must be used within a ToastProvider."));return e},Z=()=>{const e=N();return{closeToast:s=>{if(!e.lifecycle.isActive())return;const n=e.state.toasts.filter(o=>D(o)&&(!d.isDefined(s)||o.notification.id===s));(0,E.isNonEmptyArray)(n)&&k({store:e,toastsToClose:n})}}},G=0,J=()=>(G+=1,`toast-${G}`),Le=()=>{const e=N();return{enqueueToast:(0,p.useMemo)(()=>{function t(s){if(!d.isDefined(s))return;if(!e.lifecycle.isActive())return J();const{dedupeKey:n,...o}=s,{toasts:c,limit:i}=e.state,f=c.filter(D),v=d.isDefined(n)?f.find(x=>x.dedupeKey===n):void 0;if(d.isDefined(v))return v.notification.id;const _=J(),T=Math.max(0,f.length-i+1);return k({store:e,toastsToClose:f.slice(0,T),nextToasts:[...c,{notification:{...o,id:_},dedupeKey:n,status:"visible"}]}),_}return t},[e])}},$e=({store:e,id:t,...s})=>{if(!e.lifecycle.isActive())return;const n=e.state.toasts.find(i=>i.notification.id===t&&D(i)),o=Object.keys(s);if(!d.isDefined(n)||!(0,E.isNonEmptyArray)(o))return;const c=o.includes("duration")||d.isDefined(n.notification.progress)&&o.includes("progress")&&!d.isDefined(s.progress);e.set("toasts",e.state.toasts.map(i=>i===n?{...i,notification:{...i.notification,...s,id:t},...c?{durationRevision:(i.durationRevision??0)+1}:{}}:i))},Ue=()=>{const e=N();return{updateToast:(0,p.useCallback)(t=>$e({store:e,...t}),[e])}},Ke=()=>{const{closeToast:e}=Z(),{enqueueToast:t}=Le(),{updateToast:s}=Ue();return{enqueueToast:t,closeToast:e,updateToast:s}},He="_root_181ka_1",Ve="_progress_181ka_19",Xe="_header_181ka_30",Ge="_message_181ka_40",Je="_icon_181ka_45",Qe="_actions_181ka_50",Ye="_description_181ka_56",Ze="_footer_181ka_65",et="_footerAction_181ka_69",tt="_closeButton_181ka_76",b={root:He,progress:Ve,header:Xe,message:Ge,icon:Je,actions:Qe,description:Ye,footer:Ze,footerAction:et,closeButton:tt},M=(0,p.createContext)({durationRevision:0,isActive:!0}),st=({clock:e,onClockChange:t,duration:s,progress:n,isPaused:o,onClose:c})=>{const{durationRevision:i,isActive:f,lifecycle:v,id:_,rendererKey:T,timingOverrides:x}=(0,p.useContext)(M),l=d.isDefined(v)&&d.isDefined(_)&&d.isDefined(T),u=l?void 0:e,a=d.isDefined(n),m=d.isDefined(x)&&Object.prototype.propertyIsEnumerable.call(x,"duration"),w=d.isDefined(x)&&Object.prototype.propertyIsEnumerable.call(x,"progress");return(0,p.useLayoutEffect)(()=>{if(l){t(v.updateRenderer({id:_,key:T,configuration:{duration:m?s:void 0,isProgress:w?a:void 0,isPaused:o}}));return}u?.update({duration:s,durationRevision:i,isPaused:o,isProgress:a,isActive:f,onClose:c})},[u,t,l,s,i,o,a,f,c,v,_,T,m,w]),(0,p.useLayoutEffect)(()=>()=>{if(l){v.removeRenderer({id:_,key:T});return}u?.stop()},[u,v,_,T,l]),null},nt=({element:e,isFocused:t,onFocusChange:s})=>((0,p.useLayoutEffect)(()=>{if(!t||!d.isDefined(e))return;const n=()=>{e.contains(e.ownerDocument.activeElement)||s(!1)};n();const o=new MutationObserver(n);return o.observe(e,{childList:!0,subtree:!0}),()=>o.disconnect()},[e,t,s]),null),ee=6e3,te=e=>Number.isFinite(e)&&e>0,rt="_countdown_1vuo8_1",ot="_toastCountdown_1vuo8_1",it={countdown:rt,toastCountdown:ot},at=({progress:e,duration:t,remainingDuration:s,revision:n,isPaused:o,barColor:c})=>d.isDefined(e)?(0,r.jsx)(O.ProgressBar,{value:e,barColor:c}):te(t)?(0,r.jsx)("div",{className:it.countdown,"data-paused":o||void 0,style:{"--toast-countdown-color":c,"--toast-countdown-width":`${s/t*100}%`,"--toast-countdown-duration":`${s}ms`}},n):null,ct=2**31-1,ut=({onChange:e})=>{let t,s=0,n,o,c=0,i=0,f=!1;const v=()=>{i+=1,d.isDefined(n)&&(s=Math.max(0,s-(performance.now()-n)),n=void 0),clearTimeout(o),o=void 0},_=()=>{d.isDefined(t)&&(c+=1,e({duration:t.duration,remainingDuration:s,revision:c,isPaused:t.isPaused||!t.isActive}))},T=()=>{f||(v(),f=!0,s=0,_(),t?.onClose?.())},x=()=>d.isDefined(t)&&t.isActive&&!t.isPaused&&!t.isProgress&&te(t.duration)&&!f,l=()=>{if(!x())return;n=performance.now();const a=i;o=setTimeout(()=>{if(a===i){if(v(),s>0){l();return}T()}},Math.min(s,ct))};return{update:a=>{const m=!d.isDefined(t)||a.duration!==t.duration||a.durationRevision!==t.durationRevision||t.isProgress&&!a.isProgress,w=m||a.isProgress!==t?.isProgress||a.isPaused!==t?.isPaused||a.isActive!==t?.isActive,g=!d.isDefined(n)&&x();if(!w&&!g){t=a;return}v(),t=a,!f&&(m&&(s=Math.max(0,a.duration)),_(),l())},close:T,stop:v}},se=({duration:e,isPaused:t})=>{let s={duration:e,remainingDuration:e,revision:0,isPaused:t};const n=new Set;return{...ut({onChange:o=>{s=o;for(const c of n)c()}}),getSnapshot:()=>s,subscribe:o=>(n.add(o),()=>{n.delete(o)})}},dt=({duration:e,isPaused:t})=>{const{lifecycle:s,id:n,rendererKey:o}=(0,p.useContext)(M),[c,i]=(0,p.useState)(()=>(d.isDefined(s)&&d.isDefined(n)&&d.isDefined(o)?s.getCountdown(n):void 0)??se({duration:e,isPaused:t}));return{countdown:(0,p.useSyncExternalStore)(c.subscribe,c.getSnapshot,c.getSnapshot),clock:c,setClock:i}},lt={neutral:j.IconAlertTriangle,error:j.IconAlertTriangle,success:j.IconSquareRoundedCheck,info:j.IconInfoCircle,warning:j.IconAlertTriangle},ne=({children:e,description:t,icon:s,iconLabel:n,action:o,progress:c,duration:i=ee,onCancel:f,onClose:v,cancelLabel:_=P.doNotTranslate("Cancel"),closeLabel:T=P.doNotTranslate("Close"),status:x="neutral",role:l="status",className:u,onMouseEnter:a,onMouseLeave:m,onFocus:w,onBlur:g,render:A,ref:oe,...ie})=>{const L=z.useTheme(),[ae,$]=(0,p.useState)(!1),[U,W]=(0,p.useState)(!1),[ce,ue]=(0,p.useState)(null),K=ae||U,{countdown:S,clock:H,setClock:de}=dt({duration:i,isPaused:K}),le=lt[x],V=L.snackBar[x==="neutral"?"default":x],X=(0,E.isUndefined)(s)?(0,r.jsx)(le,{"aria-label":n,"aria-hidden":!d.isDefined(n),color:V.color,size:L.icon.size.md}):s;return(0,r.jsxs)(r.Fragment,{children:[(0,F.useRender)({render:A,ref:[oe??null,ue],props:{role:l,"aria-live":l==="alert"?"assertive":"polite",...ie,className:(0,R.clsx)(b.root,u),onMouseEnter:C=>{$(!0),a?.(C)},onMouseLeave:C=>{$(!1),m?.(C)},onFocus:C=>{W(!0),w?.(C)},onBlur:C=>{C.currentTarget.contains(C.relatedTarget)||W(!1),g?.(C)},children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:b.progress,"aria-hidden":!0,children:(0,r.jsx)(at,{barColor:V.backgroundColor,progress:c,duration:S.duration,remainingDuration:S.remainingDuration,revision:S.revision,isPaused:S.isPaused})}),(0,r.jsxs)("div",{className:b.header,children:[y.isRenderableSlot(X)&&(0,r.jsx)("div",{className:b.icon,children:X}),(0,r.jsx)("div",{className:b.message,children:e}),(0,r.jsxs)("div",{className:b.actions,children:[d.isDefined(f)&&y.isRenderableSlot(_)&&(0,r.jsx)(I.Button,{onClick:f,size:"sm",variant:"ghost",style:{fontWeight:"var(--t-font-weight-regular)"},children:_}),d.isDefined(v)&&(0,r.jsx)(I.Button,{title:T,"aria-label":T,startIcon:(0,r.jsx)(j.IconX,{}),className:b.closeButton,variant:"ghost",size:"sm",onClick:H.close})]})]}),y.isRenderableSlot(t)&&(0,r.jsx)("div",{className:b.description,children:t}),y.isRenderableSlot(o)&&(0,r.jsxs)("div",{className:b.footer,children:[(0,r.jsx)(me.Separator,{}),(0,r.jsx)("div",{className:b.footerAction,children:o})]})]})}}),(0,r.jsx)(nt,{element:ce,isFocused:U,onFocusChange:W}),(0,r.jsx)(st,{clock:H,onClockChange:de,duration:i,progress:c,isPaused:K,onClose:v})]})},re=e=>{if(!(0,E.isPositiveInteger)(e))throw new Error(P.doNotTranslate("Toast limit must be a positive integer."))},ft=({store:e,limit:t})=>{if(re(t),e.state.limit===t)return;e.set("limit",t);const s=e.state.toasts.filter(D),n=Math.max(0,s.length-t);n!==0&&k({store:e,toastsToClose:s.slice(0,n)})},vt=({limit:e})=>{const t=N();return(0,p.useEffect)(()=>t.lifecycle.mount(),[t]),(0,p.useLayoutEffect)(()=>ft({store:t,limit:e}),[t,e]),null},_t=({store:e,toast:t})=>{const{toasts:s}=e.state;t.status==="closing"&&s.includes(t)&&e.set("toasts",s.filter(n=>n!==t))},mt=e=>{const t=new Map;let s=!1,n=!1,o=0;const c=l=>{const u=t.get(l);if(d.isDefined(u))return u;const a={countdown:se({duration:ee,isPaused:!0}),renderers:new Map};return t.set(l,a),a},i=l=>{if(!s)return;const u=t.get(l);if(!d.isDefined(u?.pendingExits)||u.pendingExits.size>0)return;const a=e.state.toasts.find(m=>m.notification.id===l);d.isDefined(a)&&_t({store:e,toast:a})},f=()=>{for(const[l,u]of t){const a=e.state.toasts.find(g=>g.notification.id===l);if(!d.isDefined(a)){u.countdown.stop(),t.delete(l);continue}const m=u.renderers.values().next().value??u.lastRenderer;u.lastRenderer=m;const w=!s||u.renderers.size===0||[...u.renderers.values()].some(g=>g.isPaused);u.countdown.update({duration:m?.duration??a.notification.duration??6e3,durationRevision:a.durationRevision??0,isProgress:m?.isProgress??d.isDefined(a.notification.progress),isPaused:w,isActive:a.status==="visible",onClose:()=>{const g=e.state.toasts.find(A=>A.notification.id===l&&D(A));!s||!d.isDefined(g)||k({store:e,toastsToClose:[g]})}}),a.status!=="visible"&&(u.pendingExits??=new Set(u.renderers.keys()),i(l))}};return{mount:()=>{s=!0,n=!1,o+=1;const l=e.subscribe(f);return f(),()=>{s=!1,l();for(const a of t.values())a.countdown.stop();const u=++o;queueMicrotask(()=>{s||o!==u||(n=!0,t.clear(),e.set("toasts",[]))})}},isActive:()=>!n,getCountdown:l=>t.get(l)?.countdown,updateRenderer:({id:l,key:u,configuration:a})=>{const m=c(l);return m.renderers.has(u)||(m.countdown.stop(),m.pendingExits?.add(u)),m.renderers.set(u,a),f(),m.countdown},removeRenderer:({id:l,key:u})=>{const a=t.get(l);d.isDefined(a)&&(a.renderers.delete(u),a.pendingExits?.delete(u),f())},finishExit:({id:l,key:u})=>{t.get(l)?.pendingExits?.delete(u),i(l)}}},pt=(e=3)=>{re(e);const t=new Q.Store({toasts:[],limit:e,mountedToasterCount:0});return Object.assign(t,{lifecycle:mt(t)})},Tt=({children:e,limit:t=3})=>{const[s]=(0,p.useState)(()=>pt(t));return(0,r.jsxs)(Y.Provider,{value:s,children:[e,(0,r.jsx)(vt,{limit:t})]})},xt="_root_1q2cc_1",ht="_item_1q2cc_20",gt="_itemContent_1q2cc_47",B={root:xt,item:ht,itemContent:gt},bt=()=>(0,Q.useStore)(N(),e=>e.toasts),Ct=({elementRef:e,toastEntry:t,rendererKey:s})=>{const n=N();return(0,p.useLayoutEffect)(()=>{if(t.status==="visible")return;const o=()=>n.lifecycle.finishExit({id:t.notification.id,key:s}),c=e.current?.getAnimations?.()??[];if(!(0,E.isNonEmptyArray)(c)){o();return}let i=!1;return Promise.allSettled(c.map(f=>f.finished)).then(()=>{i||o()}),()=>{i=!0}},[e,t,n,s]),null},jt=({toastEntry:e,getToastProps:t,onClose:s})=>{const{notification:n,status:o,durationRevision:c=0}=e,{id:i,...f}=n,v=N(),_=t?.(n),[T]=(0,p.useState)(()=>Symbol()),x=(0,p.useRef)(null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:x,className:B.item,"data-exiting":o==="closing"||void 0,inert:o==="closing",children:(0,r.jsx)("div",{className:B.itemContent,children:(0,r.jsx)(M.Provider,{value:{durationRevision:c,isActive:o==="visible",lifecycle:v.lifecycle,id:i,rendererKey:T,timingOverrides:_},children:(0,r.jsx)(ne,{...f,..._,id:i,onClose:()=>s(i)})})})}),(0,r.jsx)(Ct,{elementRef:x,toastEntry:e,rendererKey:T})]})},wt=({getToastProps:e})=>{const t=bt(),{closeToast:s}=Z();return t.map(n=>(0,r.jsx)(jt,{toastEntry:n,getToastProps:e,onClose:s},n.notification.id))},yt=()=>{const e=N();return(0,p.useLayoutEffect)(()=>(e.set("mountedToasterCount",e.state.mountedToasterCount+1),()=>{e.set("mountedToasterCount",e.state.mountedToasterCount-1),!(e.state.mountedToasterCount>0)&&e.set("toasts",e.state.toasts.filter(D))}),[e]),null},Dt=({container:e,getToastProps:t,className:s,render:n,ref:o,...c})=>{const i=z.useThemeContainer(),f=ve.useProvidedTextDirection(),v=e===void 0?i??(typeof document>"u"?null:document.body):e,_=(0,F.useRender)({render:n,ref:o,props:{role:"region",dir:f,"aria-label":P.doNotTranslate("Notifications"),...c,className:(0,R.clsx)(B.root,s),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(yt,{}),(0,r.jsx)(wt,{getToastProps:t})]})}});return d.isDefined(v)?(0,pe.createPortal)(_,v):null};Object.defineProperty(exports,"Callout",{enumerable:!0,get:function(){return Ae}});Object.defineProperty(exports,"InlineBanner",{enumerable:!0,get:function(){return Me}});Object.defineProperty(exports,"Toast",{enumerable:!0,get:function(){return ne}});Object.defineProperty(exports,"ToastProvider",{enumerable:!0,get:function(){return Tt}});Object.defineProperty(exports,"Toaster",{enumerable:!0,get:function(){return Dt}});Object.defineProperty(exports,"useToast",{enumerable:!0,get:function(){return Ke}});
1
+ const z=require("./theme-BJRNJNPO.cjs"),d=require("./isDefined-DS2Q42p5.cjs"),y=require("./isRenderableSlot-Guryb6Nf.cjs"),P=require("./doNotTranslate-CHE7WmRS.cjs"),fe=require("./mergeClassNames-D4lshrT6.cjs"),I=require("./Button-Du8T-dOv.cjs"),O=require("./ProgressBar-BG38LPgC.cjs"),ve=require("./useProvidedTextDirection-PVaoQCLH.cjs"),_e=require("./OverflowingTextWithTooltip-Dmsmy-9g.cjs"),me=require("./Separator-UJVlrTzw.cjs");let F=require("@base-ui/react/use-render"),E=require("@sniptt/guards"),R=require("clsx"),p=require("react"),r=require("react/jsx-runtime"),Q=require("@base-ui/utils/store"),pe=require("react-dom"),j=require("@tabler/icons-react");var Te="_action_3r2bm_1",xe={action:Te},he=({className:e,...t})=>(0,r.jsx)(I.Button,{...t,size:"sm",variant:"ghost",className:fe.mergeClassNames(xe.action,e)}),ge="_container_1ix4w_1",be="_containerFullWidth_1ix4w_40",Ce="_header_1ix4w_44",je="_iconContainer_1ix4w_53",we="_title_1ix4w_63",ye="_descriptionWrapper_1ix4w_75",De="_descriptionWrapperWithIcon_1ix4w_82",Ne="_descriptionWrapperWithAction_1ix4w_86",qe="_description_1ix4w_75",Pe="_footer_1ix4w_99",Ee="_closeButton_1ix4w_106",h={container:ge,containerFullWidth:be,header:Ce,iconContainer:je,title:we,descriptionWrapper:ye,descriptionWrapperWithIcon:De,descriptionWrapperWithAction:Ne,description:qe,footer:Pe,closeButton:Ee},Re=({status:e="info",variant:t="soft",color:s=O.FEEDBACK_STATUS_COLORS[e],title:n,description:o,fullWidth:c=!1,icon:i=(0,r.jsx)(j.IconHelp,{size:z.themeCssVariables.icon.size.md,"aria-hidden":"true"}),action:f,closeLabel:v=P.doNotTranslate("Close"),onDismiss:_,className:T,render:x,ref:l,...u})=>{const a=y.isRenderableSlot(i),m=y.isRenderableSlot(f);return(0,F.useRender)({render:x,ref:l,state:{status:e,variant:t,color:s},props:{...u,className:(0,R.clsx)(h.container,c&&h.containerFullWidth,T),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:h.header,children:[a&&(0,r.jsx)("div",{className:h.iconContainer,children:i}),(0,r.jsx)("div",{className:h.title,children:n}),d.isDefined(_)&&(0,r.jsx)(I.Button,{type:"button",startIcon:(0,r.jsx)(j.IconX,{"aria-hidden":"true"}),className:h.closeButton,variant:"ghost",size:"sm","aria-label":v,onClick:()=>_()})]}),y.isRenderableSlot(o)&&(0,r.jsx)("div",{className:(0,R.clsx)(h.descriptionWrapper,a&&h.descriptionWrapperWithIcon,m&&h.descriptionWrapperWithAction),children:(0,r.jsx)("div",{className:h.description,children:o})}),m&&(0,r.jsx)("div",{className:h.footer,children:f})]})}})},Ae=Object.assign(Re,{Action:he}),Se="_banner_qbpcz_1",Ie="_embedded_qbpcz_6",Oe="_bannerContent_qbpcz_10",ke="_icon_qbpcz_18",We="_bannerText_qbpcz_28",Be="_compact_qbpcz_33",ze="_fullWidth_qbpcz_58",q={banner:Se,embedded:Ie,bannerContent:Oe,icon:ke,bannerText:We,compact:Be,fullWidth:ze},Fe=({children:e,layout:t="standard",variant:s="soft",embedded:n=!1,fullWidth:o=!1,icon:c=(0,r.jsx)(j.IconInfoCircle,{"aria-hidden":"true"}),className:i,...f})=>{const v=t==="compact",_=!v&&(0,E.isString)(e);return(0,r.jsx)(O.Banner,{...f,className:(0,R.clsx)(q.banner,v&&q.compact,n&&q.embedded,o&&q.fullWidth,i),variant:s,"data-layout":t,children:(0,r.jsxs)("div",{className:q.bannerContent,children:[y.isRenderableSlot(c)&&(0,r.jsx)("span",{className:q.icon,children:c}),(0,r.jsx)("div",{className:q.bannerText,children:_?(0,r.jsx)(_e.OverflowingTextWithTooltip,{isFocusable:!0,text:(0,r.jsx)(r.Fragment,{children:e}),tooltipContent:e}):e})]})})},Me=Object.assign(Fe,{Action:O.Banner.Action}),D=e=>e.status==="visible",k=({store:e,toastsToClose:t,nextToasts:s=e.state.toasts})=>{const n=t.filter(i=>D(i)&&e.state.toasts.includes(i)),o=s.map(i=>n.includes(i)?{...i,status:"closing"}:i),c=e.state.mountedToasterCount>0;e.set("toasts",c?o:o.filter(D));for(const i of n)i.notification.onClose?.()},Y=(0,p.createContext)(void 0),N=()=>{const e=(0,p.useContext)(Y);if(!d.isDefined(e))throw new Error(P.doNotTranslate("Toast components must be used within a ToastProvider."));return e},Z=()=>{const e=N();return{closeToast:s=>{if(!e.lifecycle.isActive())return;const n=e.state.toasts.filter(o=>D(o)&&(!d.isDefined(s)||o.notification.id===s));(0,E.isNonEmptyArray)(n)&&k({store:e,toastsToClose:n})}}},G=0,J=()=>(G+=1,`toast-${G}`),Le=()=>{const e=N();return{enqueueToast:(0,p.useMemo)(()=>{function t(s){if(!d.isDefined(s))return;if(!e.lifecycle.isActive())return J();const{dedupeKey:n,...o}=s,{toasts:c,limit:i}=e.state,f=c.filter(D),v=d.isDefined(n)?f.find(x=>x.dedupeKey===n):void 0;if(d.isDefined(v))return v.notification.id;const _=J(),T=Math.max(0,f.length-i+1);return k({store:e,toastsToClose:f.slice(0,T),nextToasts:[...c,{notification:{...o,id:_},dedupeKey:n,status:"visible"}]}),_}return t},[e])}},$e=({store:e,id:t,...s})=>{if(!e.lifecycle.isActive())return;const n=e.state.toasts.find(i=>i.notification.id===t&&D(i)),o=Object.keys(s);if(!d.isDefined(n)||!(0,E.isNonEmptyArray)(o))return;const c=o.includes("duration")||d.isDefined(n.notification.progress)&&o.includes("progress")&&!d.isDefined(s.progress);e.set("toasts",e.state.toasts.map(i=>i===n?{...i,notification:{...i.notification,...s,id:t},...c?{durationRevision:(i.durationRevision??0)+1}:{}}:i))},Ue=()=>{const e=N();return{updateToast:(0,p.useCallback)(t=>$e({store:e,...t}),[e])}},Ke=()=>{const{closeToast:e}=Z(),{enqueueToast:t}=Le(),{updateToast:s}=Ue();return{enqueueToast:t,closeToast:e,updateToast:s}},He="_root_181ka_1",Ve="_progress_181ka_19",Xe="_header_181ka_30",Ge="_message_181ka_40",Je="_icon_181ka_45",Qe="_actions_181ka_50",Ye="_description_181ka_56",Ze="_footer_181ka_65",et="_footerAction_181ka_69",tt="_closeButton_181ka_76",b={root:He,progress:Ve,header:Xe,message:Ge,icon:Je,actions:Qe,description:Ye,footer:Ze,footerAction:et,closeButton:tt},M=(0,p.createContext)({durationRevision:0,isActive:!0}),st=({clock:e,onClockChange:t,duration:s,progress:n,isPaused:o,onClose:c})=>{const{durationRevision:i,isActive:f,lifecycle:v,id:_,rendererKey:T,timingOverrides:x}=(0,p.useContext)(M),l=d.isDefined(v)&&d.isDefined(_)&&d.isDefined(T),u=l?void 0:e,a=d.isDefined(n),m=d.isDefined(x)&&Object.prototype.propertyIsEnumerable.call(x,"duration"),w=d.isDefined(x)&&Object.prototype.propertyIsEnumerable.call(x,"progress");return(0,p.useLayoutEffect)(()=>{if(l){t(v.updateRenderer({id:_,key:T,configuration:{duration:m?s:void 0,isProgress:w?a:void 0,isPaused:o}}));return}u?.update({duration:s,durationRevision:i,isPaused:o,isProgress:a,isActive:f,onClose:c})},[u,t,l,s,i,o,a,f,c,v,_,T,m,w]),(0,p.useLayoutEffect)(()=>()=>{if(l){v.removeRenderer({id:_,key:T});return}u?.stop()},[u,v,_,T,l]),null},nt=({element:e,isFocused:t,onFocusChange:s})=>((0,p.useLayoutEffect)(()=>{if(!t||!d.isDefined(e))return;const n=()=>{e.contains(e.ownerDocument.activeElement)||s(!1)};n();const o=new MutationObserver(n);return o.observe(e,{childList:!0,subtree:!0}),()=>o.disconnect()},[e,t,s]),null),ee=6e3,te=e=>Number.isFinite(e)&&e>0,rt="_countdown_1vuo8_1",ot="_toastCountdown_1vuo8_1",it={countdown:rt,toastCountdown:ot},at=({progress:e,duration:t,remainingDuration:s,revision:n,isPaused:o,barColor:c})=>d.isDefined(e)?(0,r.jsx)(O.ProgressBar,{value:e,barColor:c}):te(t)?(0,r.jsx)("div",{className:it.countdown,"data-paused":o||void 0,style:{"--toast-countdown-color":c,"--toast-countdown-width":`${s/t*100}%`,"--toast-countdown-duration":`${s}ms`}},n):null,ct=2**31-1,ut=({onChange:e})=>{let t,s=0,n,o,c=0,i=0,f=!1;const v=()=>{i+=1,d.isDefined(n)&&(s=Math.max(0,s-(performance.now()-n)),n=void 0),clearTimeout(o),o=void 0},_=()=>{d.isDefined(t)&&(c+=1,e({duration:t.duration,remainingDuration:s,revision:c,isPaused:t.isPaused||!t.isActive}))},T=()=>{f||(v(),f=!0,s=0,_(),t?.onClose?.())},x=()=>d.isDefined(t)&&t.isActive&&!t.isPaused&&!t.isProgress&&te(t.duration)&&!f,l=()=>{if(!x())return;n=performance.now();const a=i;o=setTimeout(()=>{if(a===i){if(v(),s>0){l();return}T()}},Math.min(s,ct))};return{update:a=>{const m=!d.isDefined(t)||a.duration!==t.duration||a.durationRevision!==t.durationRevision||t.isProgress&&!a.isProgress,w=m||a.isProgress!==t?.isProgress||a.isPaused!==t?.isPaused||a.isActive!==t?.isActive,g=!d.isDefined(n)&&x();if(!w&&!g){t=a;return}v(),t=a,!f&&(m&&(s=Math.max(0,a.duration)),_(),l())},close:T,stop:v}},se=({duration:e,isPaused:t})=>{let s={duration:e,remainingDuration:e,revision:0,isPaused:t};const n=new Set;return{...ut({onChange:o=>{s=o;for(const c of n)c()}}),getSnapshot:()=>s,subscribe:o=>(n.add(o),()=>{n.delete(o)})}},dt=({duration:e,isPaused:t})=>{const{lifecycle:s,id:n,rendererKey:o}=(0,p.useContext)(M),[c,i]=(0,p.useState)(()=>(d.isDefined(s)&&d.isDefined(n)&&d.isDefined(o)?s.getCountdown(n):void 0)??se({duration:e,isPaused:t}));return{countdown:(0,p.useSyncExternalStore)(c.subscribe,c.getSnapshot,c.getSnapshot),clock:c,setClock:i}},lt={neutral:j.IconAlertTriangle,error:j.IconAlertTriangle,success:j.IconSquareRoundedCheck,info:j.IconInfoCircle,warning:j.IconAlertTriangle},ne=({children:e,description:t,icon:s,iconLabel:n,action:o,progress:c,duration:i=ee,onCancel:f,onClose:v,cancelLabel:_=P.doNotTranslate("Cancel"),closeLabel:T=P.doNotTranslate("Close"),status:x="neutral",role:l="status",className:u,onMouseEnter:a,onMouseLeave:m,onFocus:w,onBlur:g,render:A,ref:oe,...ie})=>{const L=z.useTheme(),[ae,$]=(0,p.useState)(!1),[U,W]=(0,p.useState)(!1),[ce,ue]=(0,p.useState)(null),K=ae||U,{countdown:S,clock:H,setClock:de}=dt({duration:i,isPaused:K}),le=lt[x],V=L.snackBar[x==="neutral"?"default":x],X=(0,E.isUndefined)(s)?(0,r.jsx)(le,{"aria-label":n,"aria-hidden":!d.isDefined(n),color:V.color,size:L.icon.size.md}):s;return(0,r.jsxs)(r.Fragment,{children:[(0,F.useRender)({render:A,ref:[oe??null,ue],props:{role:l,"aria-live":l==="alert"?"assertive":"polite",...ie,className:(0,R.clsx)(b.root,u),onMouseEnter:C=>{$(!0),a?.(C)},onMouseLeave:C=>{$(!1),m?.(C)},onFocus:C=>{W(!0),w?.(C)},onBlur:C=>{C.currentTarget.contains(C.relatedTarget)||W(!1),g?.(C)},children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:b.progress,"aria-hidden":!0,children:(0,r.jsx)(at,{barColor:V.backgroundColor,progress:c,duration:S.duration,remainingDuration:S.remainingDuration,revision:S.revision,isPaused:S.isPaused})}),(0,r.jsxs)("div",{className:b.header,children:[y.isRenderableSlot(X)&&(0,r.jsx)("div",{className:b.icon,children:X}),(0,r.jsx)("div",{className:b.message,children:e}),(0,r.jsxs)("div",{className:b.actions,children:[d.isDefined(f)&&y.isRenderableSlot(_)&&(0,r.jsx)(I.Button,{onClick:f,size:"sm",variant:"ghost",style:{fontWeight:"var(--t-font-weight-regular)"},children:_}),d.isDefined(v)&&(0,r.jsx)(I.Button,{title:T,"aria-label":T,startIcon:(0,r.jsx)(j.IconX,{}),className:b.closeButton,variant:"ghost",size:"sm",onClick:H.close})]})]}),y.isRenderableSlot(t)&&(0,r.jsx)("div",{className:b.description,children:t}),y.isRenderableSlot(o)&&(0,r.jsxs)("div",{className:b.footer,children:[(0,r.jsx)(me.Separator,{}),(0,r.jsx)("div",{className:b.footerAction,children:o})]})]})}}),(0,r.jsx)(nt,{element:ce,isFocused:U,onFocusChange:W}),(0,r.jsx)(st,{clock:H,onClockChange:de,duration:i,progress:c,isPaused:K,onClose:v})]})},re=e=>{if(!(0,E.isPositiveInteger)(e))throw new Error(P.doNotTranslate("Toast limit must be a positive integer."))},ft=({store:e,limit:t})=>{if(re(t),e.state.limit===t)return;e.set("limit",t);const s=e.state.toasts.filter(D),n=Math.max(0,s.length-t);n!==0&&k({store:e,toastsToClose:s.slice(0,n)})},vt=({limit:e})=>{const t=N();return(0,p.useEffect)(()=>t.lifecycle.mount(),[t]),(0,p.useLayoutEffect)(()=>ft({store:t,limit:e}),[t,e]),null},_t=({store:e,toast:t})=>{const{toasts:s}=e.state;t.status==="closing"&&s.includes(t)&&e.set("toasts",s.filter(n=>n!==t))},mt=e=>{const t=new Map;let s=!1,n=!1,o=0;const c=l=>{const u=t.get(l);if(d.isDefined(u))return u;const a={countdown:se({duration:ee,isPaused:!0}),renderers:new Map};return t.set(l,a),a},i=l=>{if(!s)return;const u=t.get(l);if(!d.isDefined(u?.pendingExits)||u.pendingExits.size>0)return;const a=e.state.toasts.find(m=>m.notification.id===l);d.isDefined(a)&&_t({store:e,toast:a})},f=()=>{for(const[l,u]of t){const a=e.state.toasts.find(g=>g.notification.id===l);if(!d.isDefined(a)){u.countdown.stop(),t.delete(l);continue}const m=u.renderers.values().next().value??u.lastRenderer;u.lastRenderer=m;const w=!s||u.renderers.size===0||[...u.renderers.values()].some(g=>g.isPaused);u.countdown.update({duration:m?.duration??a.notification.duration??6e3,durationRevision:a.durationRevision??0,isProgress:m?.isProgress??d.isDefined(a.notification.progress),isPaused:w,isActive:a.status==="visible",onClose:()=>{const g=e.state.toasts.find(A=>A.notification.id===l&&D(A));!s||!d.isDefined(g)||k({store:e,toastsToClose:[g]})}}),a.status!=="visible"&&(u.pendingExits??=new Set(u.renderers.keys()),i(l))}};return{mount:()=>{s=!0,n=!1,o+=1;const l=e.subscribe(f);return f(),()=>{s=!1,l();for(const a of t.values())a.countdown.stop();const u=++o;queueMicrotask(()=>{s||o!==u||(n=!0,t.clear(),e.set("toasts",[]))})}},isActive:()=>!n,getCountdown:l=>t.get(l)?.countdown,updateRenderer:({id:l,key:u,configuration:a})=>{const m=c(l);return m.renderers.has(u)||(m.countdown.stop(),m.pendingExits?.add(u)),m.renderers.set(u,a),f(),m.countdown},removeRenderer:({id:l,key:u})=>{const a=t.get(l);d.isDefined(a)&&(a.renderers.delete(u),a.pendingExits?.delete(u),f())},finishExit:({id:l,key:u})=>{t.get(l)?.pendingExits?.delete(u),i(l)}}},pt=(e=3)=>{re(e);const t=new Q.Store({toasts:[],limit:e,mountedToasterCount:0});return Object.assign(t,{lifecycle:mt(t)})},Tt=({children:e,limit:t=3})=>{const[s]=(0,p.useState)(()=>pt(t));return(0,r.jsxs)(Y.Provider,{value:s,children:[e,(0,r.jsx)(vt,{limit:t})]})},xt="_root_1q2cc_1",ht="_item_1q2cc_20",gt="_itemContent_1q2cc_47",B={root:xt,item:ht,itemContent:gt},bt=()=>(0,Q.useStore)(N(),e=>e.toasts),Ct=({elementRef:e,toastEntry:t,rendererKey:s})=>{const n=N();return(0,p.useLayoutEffect)(()=>{if(t.status==="visible")return;const o=()=>n.lifecycle.finishExit({id:t.notification.id,key:s}),c=e.current?.getAnimations?.()??[];if(!(0,E.isNonEmptyArray)(c)){o();return}let i=!1;return Promise.allSettled(c.map(f=>f.finished)).then(()=>{i||o()}),()=>{i=!0}},[e,t,n,s]),null},jt=({toastEntry:e,getToastProps:t,onClose:s})=>{const{notification:n,status:o,durationRevision:c=0}=e,{id:i,...f}=n,v=N(),_=t?.(n),[T]=(0,p.useState)(()=>Symbol()),x=(0,p.useRef)(null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:x,className:B.item,"data-exiting":o==="closing"||void 0,inert:o==="closing",children:(0,r.jsx)("div",{className:B.itemContent,children:(0,r.jsx)(M.Provider,{value:{durationRevision:c,isActive:o==="visible",lifecycle:v.lifecycle,id:i,rendererKey:T,timingOverrides:_},children:(0,r.jsx)(ne,{...f,..._,id:i,onClose:()=>s(i)})})})}),(0,r.jsx)(Ct,{elementRef:x,toastEntry:e,rendererKey:T})]})},wt=({getToastProps:e})=>{const t=bt(),{closeToast:s}=Z();return t.map(n=>(0,r.jsx)(jt,{toastEntry:n,getToastProps:e,onClose:s},n.notification.id))},yt=()=>{const e=N();return(0,p.useLayoutEffect)(()=>(e.set("mountedToasterCount",e.state.mountedToasterCount+1),()=>{e.set("mountedToasterCount",e.state.mountedToasterCount-1),!(e.state.mountedToasterCount>0)&&e.set("toasts",e.state.toasts.filter(D))}),[e]),null},Dt=({container:e,getToastProps:t,className:s,render:n,ref:o,...c})=>{const i=z.useThemeContainer(),f=ve.useProvidedTextDirection(),v=e===void 0?i??(typeof document>"u"?null:document.body):e,_=(0,F.useRender)({render:n,ref:o,props:{role:"region",dir:f,"aria-label":P.doNotTranslate("Notifications"),...c,className:(0,R.clsx)(B.root,s),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(yt,{}),(0,r.jsx)(wt,{getToastProps:t})]})}});return d.isDefined(v)?(0,pe.createPortal)(_,v):null};Object.defineProperty(exports,"Callout",{enumerable:!0,get:function(){return Ae}});Object.defineProperty(exports,"InlineBanner",{enumerable:!0,get:function(){return Me}});Object.defineProperty(exports,"Toast",{enumerable:!0,get:function(){return ne}});Object.defineProperty(exports,"ToastProvider",{enumerable:!0,get:function(){return Tt}});Object.defineProperty(exports,"Toaster",{enumerable:!0,get:function(){return Dt}});Object.defineProperty(exports,"useToast",{enumerable:!0,get:function(){return Ke}});