twenty-ui 2.47.0 → 2.48.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 (216) hide show
  1. package/dist/{AllIcons-DrlkKKQf.cjs → AllIcons-Cyd7721G.cjs} +1 -1
  2. package/dist/{AllIcons-G3nKeM41.js → AllIcons-D132B8_i.js} +1 -1
  3. package/dist/{Button-Cs07psdD.js → Button-D5enZ0Qz.js} +1 -1
  4. package/dist/{Button-COxEKIHL.cjs → Button-Dbi5P05r.cjs} +1 -1
  5. package/dist/Dropdown-BKjAaZS0.cjs +1 -0
  6. package/dist/Dropdown-C2hXrjvD.js +820 -0
  7. package/dist/{ListItem-q6DHGlev.cjs → ListItem-CHTR-GLd.cjs} +1 -1
  8. package/dist/{ListItem-CXu35dzp.js → ListItem-CjnrSbka.js} +4 -4
  9. package/dist/ListItem.module-BJ9Ttjrc.js +34 -0
  10. package/dist/ListItem.module-CO4u2oeF.cjs +1 -0
  11. package/dist/OverflowingTextWithTooltip-BmUROIah.js +90 -0
  12. package/dist/OverflowingTextWithTooltip-Z2daM0_x.cjs +1 -0
  13. package/dist/{ProgressBar-D_3Gia0E.js → ProgressBar-BvT1dyFo.js} +1 -1
  14. package/dist/{ProgressBar-oF1qVHFx.cjs → ProgressBar-DfFz0fFB.cjs} +1 -1
  15. package/dist/{Radio-BMoQHDe7.js → Radio-DMI1B7o5.js} +1 -1
  16. package/dist/{Radio-D_YUizSv.cjs → Radio-xmHgGHQO.cjs} +1 -1
  17. package/dist/{ResizeHandle-Bjg4R0c-.js → ResizeHandle-C1kQ3MYR.js} +1 -0
  18. package/dist/ResizeHandle-DI4LHIQm.cjs +1 -0
  19. package/dist/Shortcut-BvWUZ3pb.js +72 -0
  20. package/dist/Shortcut-CgrdLv_L.cjs +1 -0
  21. package/dist/TabsTabContent-Co27Y2TU.cjs +1 -0
  22. package/dist/TabsTabContent-DVcObDp6.js +39 -0
  23. package/dist/Tooltip-Bg9Uk01p.cjs +1 -0
  24. package/dist/Tooltip-cLCgtFBF.js +124 -0
  25. package/dist/components/code-editor/CodeEditor/CodeEditor.d.ts +1 -1
  26. package/dist/components/code-editor/CodeEditor/__stories__/ControlledCodeEditor.d.ts +2 -0
  27. package/dist/components/code-editor/CodeEditor/__stories__/ModelCodeEditor.d.ts +2 -0
  28. package/dist/components/code-editor/CodeEditor/__stories__/ResizableCodeEditor.d.ts +2 -0
  29. package/dist/components/code-editor/CodeEditor/__stories__/ThemedCodeEditor.d.ts +2 -0
  30. package/dist/components/code-editor/CodeEditor/__stories__/UnmountingCodeEditor.d.ts +2 -0
  31. package/dist/components/code-editor/CodeEditor/__stories__/waitForCodeEditorContent.d.ts +4 -1
  32. package/dist/components/code-editor/CodeEditor/internal/CodeEditorAutoHeightEffect.d.ts +9 -0
  33. package/dist/components/code-editor/CodeEditor/internal/CodeEditorLifecycleEffect.d.ts +11 -0
  34. package/dist/components/code-editor/CodeEditor/internal/CodeEditorLoaderConfigurationEffect.d.ts +7 -0
  35. package/dist/components/code-editor/CodeEditor/internal/CodeEditorMarkersEffect.d.ts +10 -0
  36. package/dist/components/code-editor/CodeEditor/internal/CodeEditorResizableHeightEffect.d.ts +11 -0
  37. package/dist/components/code-editor/CodeEditor/internal/CodeEditorThemeEffect.d.ts +10 -0
  38. package/dist/components/code-editor/CodeEditor/internal/constants/CodeEditorDefaultHeight.d.ts +1 -0
  39. package/dist/components/code-editor/CodeEditor/internal/types/ResizedCodeEditorHeight.d.ts +4 -0
  40. package/dist/components/code-editor/CodeEditor/internal/useCodeEditorHeight.d.ts +13 -0
  41. package/dist/components/code-editor/CodeEditor/internal/utils/defineCodeEditorDefaultTheme.d.ts +7 -0
  42. package/dist/components/code-editor/CodeEditor/internal/utils/getBaseCodeEditorTheme.d.ts +4 -1
  43. package/dist/components/code-editor/CodeEditor/internal/utils/getBoundedCodeEditorHeight.d.ts +1 -0
  44. package/dist/components/code-editor/CodeEditor/internal/utils/getCurrentCodeEditorHeight.d.ts +7 -0
  45. package/dist/components/code-editor/CodeEditor/internal/utils/getResizableCodeEditorHeight.d.ts +5 -0
  46. package/dist/components/code-editor/CodeEditor/types/CodeEditorProps.d.ts +4 -2
  47. package/dist/components/code-editor.cjs +1 -1
  48. package/dist/components/code-editor.mjs +267 -155
  49. package/dist/components/data-display.mjs +1 -1
  50. package/dist/components/feedback/Toast/internal/components/ToastCountdownEffect.d.ts +4 -3
  51. package/dist/components/feedback/Toast/internal/components/ToastProviderLifecycleEffect.d.ts +3 -0
  52. package/dist/components/feedback/Toast/internal/constants/DefaultToastDuration.d.ts +1 -0
  53. package/dist/components/feedback/Toast/internal/contexts/ToastContext.d.ts +60 -1
  54. package/dist/components/feedback/Toast/internal/contexts/ToastTimingContext.d.ts +12 -2
  55. package/dist/components/feedback/Toast/internal/hooks/useToastContext.d.ts +60 -1
  56. package/dist/components/feedback/Toast/internal/hooks/useToastCountdown.d.ts +26 -0
  57. package/dist/components/feedback/Toast/internal/stores/createToastStore.d.ts +60 -1
  58. package/dist/components/feedback/Toast/internal/utils/assertValidToastLimit.d.ts +1 -0
  59. package/dist/components/feedback/Toast/internal/utils/completeToastExit.d.ts +3 -2
  60. package/dist/components/feedback/Toast/internal/utils/createToastCountdownStore.d.ts +22 -0
  61. package/dist/components/feedback/Toast/internal/utils/createToastLifecycle.d.ts +62 -0
  62. package/dist/components/feedback/Toast/internal/utils/dismissToasts.d.ts +3 -2
  63. package/dist/components/feedback/Toast/internal/utils/updateToastLimit.d.ts +5 -0
  64. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleControls.d.ts +7 -0
  65. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleExample.d.ts +2 -0
  66. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleExampleProps.d.ts +7 -0
  67. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleTimingOverrideExample.d.ts +9 -0
  68. package/dist/components/feedback/Toaster/__stories__/ToasterLifecycleUnrelatedNotificationActions.d.ts +5 -0
  69. package/dist/components/feedback/Toaster/__stories__/ToasterPortalExample.d.ts +5 -0
  70. package/dist/components/feedback/Toaster/__stories__/ToasterProviderLayoutReplayEffect.d.ts +4 -0
  71. package/dist/components/feedback/Toaster/__stories__/ToasterProviderPassiveReplayEffect.d.ts +4 -0
  72. package/dist/components/feedback/Toaster/__stories__/ToasterProviderReplayExample.d.ts +6 -0
  73. package/dist/components/feedback/Toaster/__stories__/ToasterProviderSuspenseExample.d.ts +4 -0
  74. package/dist/components/feedback/Toaster/__stories__/ToasterProviderSuspension.d.ts +5 -0
  75. package/dist/components/feedback/Toaster/internal/ToasterItemExitEffect.d.ts +2 -1
  76. package/dist/components/feedback.cjs +1 -1
  77. package/dist/components/feedback.mjs +1 -1
  78. package/dist/components/input/SearchInput/SearchInput.d.ts +1 -1
  79. package/dist/components/input/SearchInput/types/SearchInputProps.d.ts +2 -3
  80. package/dist/components/input/SegmentedControl/SegmentedControl.d.ts +1 -1
  81. package/dist/components/input/SegmentedControl/types/SegmentedControlProps.d.ts +2 -0
  82. package/dist/components/input/SegmentedControl/types/SegmentedControlSize.d.ts +1 -0
  83. package/dist/components/input/index.d.ts +1 -0
  84. package/dist/components/input.cjs +1 -1
  85. package/dist/components/input.mjs +2 -2
  86. package/dist/components/layout/OverflowingList/OverflowingList.d.ts +1 -1
  87. package/dist/components/layout/OverflowingList/__stories__/OverflowingListActionsExample.d.ts +7 -0
  88. package/dist/components/layout/OverflowingList/__stories__/OverflowingListCanceledCloseExample.d.ts +1 -0
  89. package/dist/components/layout/OverflowingList/__stories__/OverflowingListControlledExample.d.ts +1 -0
  90. package/dist/components/layout/OverflowingList/__stories__/OverflowingListControlledStateExample.d.ts +1 -0
  91. package/dist/components/layout/OverflowingList/__stories__/OverflowingListDisabledTriggerFocusExample.d.ts +1 -0
  92. package/dist/components/layout/OverflowingList/__stories__/OverflowingListEventBlockingExample.d.ts +7 -0
  93. package/dist/components/layout/OverflowingList/__stories__/OverflowingListFocusExample.d.ts +1 -0
  94. package/dist/components/layout/OverflowingList/__stories__/OverflowingListInstanceCleanupExample.d.ts +1 -0
  95. package/dist/components/layout/OverflowingList/__stories__/OverflowingListStateExample.d.ts +1 -0
  96. package/dist/components/layout/OverflowingList/__stories__/OverflowingListTriggerRefExample.d.ts +1 -0
  97. package/dist/components/layout/OverflowingList/internal/OverflowingListItem.d.ts +8 -2
  98. package/dist/components/layout/OverflowingList/internal/OverflowingListItemFocusEffect.d.ts +8 -0
  99. package/dist/components/layout/OverflowingList/internal/OverflowingListLayoutEffect.d.ts +16 -0
  100. package/dist/components/layout/OverflowingList/internal/OverflowingListPopupTarget.d.ts +10 -0
  101. package/dist/components/layout/OverflowingList/internal/focusOverflowingListFallback.d.ts +8 -0
  102. package/dist/components/layout/OverflowingList/internal/measureOverflowingListLayout.d.ts +10 -0
  103. package/dist/components/layout/OverflowingList/internal/types/OverflowingListLayout.d.ts +4 -0
  104. package/dist/components/layout/OverflowingList/internal/useFocusedElementUnmountRef.d.ts +1 -1
  105. package/dist/components/layout/OverflowingList/internal/useOverflowingListFocus.d.ts +30 -0
  106. package/dist/components/layout/OverflowingList/internal/useOverflowingListLayout.d.ts +6 -6
  107. package/dist/components/layout/OverflowingList/types/OverflowingListProps.d.ts +7 -2
  108. package/dist/components/layout.cjs +1 -1
  109. package/dist/components/layout.mjs +1 -1
  110. package/dist/components/navigation/Dropdown/Dropdown.d.ts +4 -4
  111. package/dist/components/navigation/Dropdown/internal/DropdownActionItem.d.ts +1 -1
  112. package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +1 -1
  113. package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +6 -5
  114. package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
  115. package/dist/components/navigation/Dropdown/internal/DropdownRowFocus.d.ts +5 -0
  116. package/dist/components/navigation/Dropdown/internal/DropdownRowsEffect.d.ts +5 -0
  117. package/dist/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.d.ts +1 -1
  118. package/dist/components/navigation/Dropdown/internal/getDropdownItemExplicitId.d.ts +5 -0
  119. package/dist/components/navigation/Dropdown/internal/getDropdownRows.d.ts +1 -0
  120. package/dist/components/navigation/Dropdown/internal/getDropdownSearch.d.ts +1 -0
  121. package/dist/components/navigation/Dropdown/internal/getDropdownTabStopRowId.d.ts +4 -0
  122. package/dist/components/navigation/Dropdown/internal/isDropdownDismissPrevented.d.ts +2 -1
  123. package/dist/components/navigation/Dropdown/internal/isDropdownRow.d.ts +4 -0
  124. package/dist/components/navigation/Dropdown/internal/isEnabledDropdownItem.d.ts +4 -0
  125. package/dist/components/navigation/Dropdown/internal/useDropdownItemFocus.d.ts +0 -1
  126. package/dist/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.d.ts +1 -6
  127. package/dist/components/navigation.cjs +1 -1
  128. package/dist/components/navigation.mjs +2 -2
  129. package/dist/components/settings.cjs +1 -1
  130. package/dist/components/settings.mjs +1 -1
  131. package/dist/components.cjs +1 -1
  132. package/dist/components.mjs +7 -7
  133. package/dist/data-display-0QO_WDSs.js +183 -0
  134. package/dist/data-display-CPmTJAWJ.cjs +1 -0
  135. package/dist/{data-display-DU3G8ZyI.js → data-display-KyZbLLy-.js} +1 -1
  136. package/dist/feedback-CM6fatE8.js +664 -0
  137. package/dist/feedback-ybO4n69s.cjs +1 -0
  138. package/dist/icon/components/TablerIcons.d.ts +1 -1
  139. package/dist/icon/constants/TwentyIconDictionary.d.ts +7 -7
  140. package/dist/icon/index.d.ts +1 -1
  141. package/dist/{icon-JuDK6Wxr.cjs → icon-BNcdwwdl.cjs} +1 -1
  142. package/dist/{icon-BdXwnJA6.js → icon-CUE-QGQK.js} +129 -128
  143. package/dist/icon.cjs +1 -1
  144. package/dist/icon.mjs +77 -76
  145. package/dist/index.cjs +1 -1
  146. package/dist/index.mjs +222 -220
  147. package/dist/input-3D2lXywH.cjs +1 -0
  148. package/dist/{input-Bnu5kNjg.cjs → input-CJDYNwoO.cjs} +1 -1
  149. package/dist/{input-vl6yK36n.js → input-DRpDiMRi.js} +4 -4
  150. package/dist/input-TM3nUdu6.js +554 -0
  151. package/dist/layout-BszCDxAO.js +441 -0
  152. package/dist/layout-VaIq7Sjr.cjs +1 -0
  153. package/dist/{navigation-itBinyPi.js → navigation-B1SRvzKK.js} +8 -8
  154. package/dist/{navigation-Dg46Wr5m.js → navigation-CYAs2LnR.js} +1 -1
  155. package/dist/{navigation-WsiYsmaq.cjs → navigation-CthkGHJ8.cjs} +1 -1
  156. package/dist/{navigation-B1hPNYv2.cjs → navigation-DrOV5E67.cjs} +1 -1
  157. package/dist/primitives/data-display.cjs +1 -1
  158. package/dist/primitives/data-display.mjs +1 -1
  159. package/dist/primitives/feedback.cjs +1 -1
  160. package/dist/primitives/feedback.mjs +1 -1
  161. package/dist/primitives/input.cjs +1 -1
  162. package/dist/primitives/input.mjs +3 -3
  163. package/dist/primitives/layout.cjs +1 -1
  164. package/dist/primitives/layout.mjs +1 -1
  165. package/dist/primitives/navigation.cjs +1 -1
  166. package/dist/primitives/navigation.mjs +2 -2
  167. package/dist/primitives/surfaces/Tooltip/Tooltip.d.ts +1 -1
  168. package/dist/primitives/surfaces/Tooltip/internal/TooltipPopup.d.ts +1 -1
  169. package/dist/primitives/surfaces/Tooltip/types/TooltipPopupProps.d.ts +2 -0
  170. package/dist/primitives/surfaces.cjs +1 -1
  171. package/dist/primitives/surfaces.mjs +2 -2
  172. package/dist/primitives/typography/OverflowingTextWithTooltip/OverflowingTextTooltipModeProvider.d.ts +6 -0
  173. package/dist/primitives/typography/OverflowingTextWithTooltip/internal/OverflowingTextTooltipModeContext.d.ts +2 -0
  174. package/dist/primitives/typography/OverflowingTextWithTooltip/internal/isElementOverflowing.d.ts +1 -0
  175. package/dist/primitives/typography/OverflowingTextWithTooltip/types/OverflowingTextTooltipMode.d.ts +1 -0
  176. package/dist/primitives/typography/Shortcut/Shortcut.d.ts +1 -1
  177. package/dist/primitives/typography/Shortcut/internal/getShortcutPresentation.d.ts +1 -1
  178. package/dist/primitives/typography/Shortcut/types/ShortcutFormatOptions.d.ts +1 -0
  179. package/dist/primitives/typography/index.d.ts +2 -0
  180. package/dist/primitives/typography.cjs +1 -1
  181. package/dist/primitives/typography.mjs +10 -9
  182. package/dist/primitives.cjs +1 -1
  183. package/dist/primitives.mjs +37 -36
  184. package/dist/{settings-BiSAY2oN.cjs → settings-BAYsnlZJ.cjs} +1 -1
  185. package/dist/{settings-CC-2gcAx.js → settings-BjEZiHXE.js} +1 -1
  186. package/dist/style.css +1 -1
  187. package/dist/surfaces-0rL5DoHt.cjs +1 -0
  188. package/dist/{surfaces-DZ2A-Nb9.js → surfaces-BLsR5ka0.js} +54 -54
  189. package/dist/typography-B5QEuPaL.cjs +1 -0
  190. package/dist/typography-fOTFr0jS.js +11 -0
  191. package/package.json +1 -1
  192. package/dist/Dropdown-BBUGkQQV.cjs +0 -1
  193. package/dist/Dropdown-CScN_olN.js +0 -784
  194. package/dist/ListItem.module-Ar-vZ7Qu.js +0 -34
  195. package/dist/ListItem.module-B8NeDH1P.cjs +0 -1
  196. package/dist/OverflowingTextWithTooltip-Be2-wCcZ.js +0 -88
  197. package/dist/OverflowingTextWithTooltip-BlufG-6n.cjs +0 -1
  198. package/dist/ResizeHandle-CNlQ4TEE.cjs +0 -1
  199. package/dist/Shortcut-DKfB0kej.js +0 -71
  200. package/dist/Shortcut-ZuZ-KYSk.cjs +0 -1
  201. package/dist/TabsTabContent-DZUNi_iE.cjs +0 -1
  202. package/dist/TabsTabContent-s6J5bZ3R.js +0 -39
  203. package/dist/Tooltip-BMkznyoi.js +0 -120
  204. package/dist/Tooltip-JOYVeSsf.cjs +0 -1
  205. package/dist/components/navigation/Dropdown/internal/DropdownSearchTargetEffect.d.ts +0 -5
  206. package/dist/data-display-BMV-nC-9.js +0 -181
  207. package/dist/data-display-BkujQe5v.cjs +0 -1
  208. package/dist/feedback-B5x8tmnG.cjs +0 -1
  209. package/dist/feedback-DhilJ_fX.js +0 -509
  210. package/dist/input-BEKjAOjS.cjs +0 -1
  211. package/dist/input-BUgnp6eA.js +0 -559
  212. package/dist/layout-BKHabkTu.js +0 -267
  213. package/dist/layout-wuIu4rJ3.cjs +0 -1
  214. package/dist/surfaces-vyAhk2Gw.cjs +0 -1
  215. package/dist/typography-8DF9mq2w.cjs +0 -1
  216. package/dist/typography-DmY7-GzQ.js +0 -5
@@ -1,509 +0,0 @@
1
- import { t as u } from "./isDefined-fMi6eQ4r.js";
2
- import { Ta as L, hc as lt, hl as V, la as mt, nt as F } from "./icon-BdXwnJA6.js";
3
- import { a as vt, r as _t, t as ft } from "./theme-B2EaXhye.js";
4
- import { t as pt } from "./mergeClassNames-ClFMR1v0.js";
5
- import { t as B } from "./Button-Cs07psdD.js";
6
- import { n as X, r as ht, t as Tt } from "./ProgressBar-D_3Gia0E.js";
7
- import { t as C } from "./isRenderableSlot-DT_depzM.js";
8
- import { t as Ct } from "./useProvidedTextDirection-Dk8LBQeF.js";
9
- import { t as gt } from "./OverflowingTextWithTooltip-Be2-wCcZ.js";
10
- import { t as wt } from "./Separator-0LzwPfOn.js";
11
- import { useRender as O } from "@base-ui/react/use-render";
12
- import { isNonEmptyArray as G, isPositiveInteger as bt, isString as Nt, isUndefined as xt } from "@sniptt/guards";
13
- import { clsx as P } from "clsx";
14
- import { createContext as J, useCallback as At, useContext as Q, useLayoutEffect as W, useMemo as It, useRef as Pt, useState as x } from "react";
15
- import { Fragment as w, jsx as a, jsxs as p } from "react/jsx-runtime";
16
- import { Store as Wt, useStore as kt } from "@base-ui/utils/store";
17
- import { createPortal as Et } from "react-dom";
18
- var Bt = "_action_3r2bm_1", Rt = { action: Bt }, St = ({ className: t, ...e }) => /* @__PURE__ */ a(B, {
19
- ...e,
20
- size: "sm",
21
- variant: "ghost",
22
- className: pt(Rt.action, t)
23
- }), Ft = "_container_1ix4w_1", Mt = "_containerFullWidth_1ix4w_40", Ot = "_header_1ix4w_44", $t = "_iconContainer_1ix4w_53", yt = "_title_1ix4w_63", qt = "_descriptionWrapper_1ix4w_75", zt = "_descriptionWrapperWithIcon_1ix4w_82", Dt = "_descriptionWrapperWithAction_1ix4w_86", Ut = "_description_1ix4w_75", jt = "_footer_1ix4w_99", Ht = "_closeButton_1ix4w_106", v = {
24
- container: Ft,
25
- containerFullWidth: Mt,
26
- header: Ot,
27
- iconContainer: $t,
28
- title: yt,
29
- descriptionWrapper: qt,
30
- descriptionWrapperWithIcon: zt,
31
- descriptionWrapperWithAction: Dt,
32
- description: Ut,
33
- footer: jt,
34
- closeButton: Ht
35
- }, Kt = ({ status: t = "info", variant: e = "soft", color: o = ht[t], title: s, description: r, fullWidth: n = !1, icon: i = /* @__PURE__ */ a(mt, {
36
- size: vt.icon.size.md,
37
- "aria-hidden": "true"
38
- }), action: c, closeLabel: d = "Close", onDismiss: l, className: h, render: _, ref: I, ...m }) => {
39
- const g = C(i), b = C(c);
40
- return O({
41
- render: _,
42
- ref: I,
43
- state: {
44
- status: t,
45
- variant: e,
46
- color: o
47
- },
48
- props: {
49
- ...m,
50
- className: P(v.container, n && v.containerFullWidth, h),
51
- children: /* @__PURE__ */ p(w, { children: [
52
- /* @__PURE__ */ p("div", {
53
- className: v.header,
54
- children: [
55
- g && /* @__PURE__ */ a("div", {
56
- className: v.iconContainer,
57
- children: i
58
- }),
59
- /* @__PURE__ */ a("div", {
60
- className: v.title,
61
- children: s
62
- }),
63
- u(l) && /* @__PURE__ */ a(B, {
64
- type: "button",
65
- startIcon: /* @__PURE__ */ a(V, { "aria-hidden": "true" }),
66
- className: v.closeButton,
67
- variant: "ghost",
68
- size: "sm",
69
- "aria-label": d,
70
- onClick: () => l()
71
- })
72
- ]
73
- }),
74
- C(r) && /* @__PURE__ */ a("div", {
75
- className: P(v.descriptionWrapper, g && v.descriptionWrapperWithIcon, b && v.descriptionWrapperWithAction),
76
- children: /* @__PURE__ */ a("div", {
77
- className: v.description,
78
- children: r
79
- })
80
- }),
81
- b && /* @__PURE__ */ a("div", {
82
- className: v.footer,
83
- children: c
84
- })
85
- ] })
86
- }
87
- });
88
- }, Ge = Object.assign(Kt, { Action: St }), Lt = "_banner_17vm4_1", Vt = "_embedded_17vm4_6", Xt = "_bannerContent_17vm4_10", Gt = "_icon_17vm4_18", Jt = "_bannerText_17vm4_28", Qt = "_compact_17vm4_33", N = {
89
- banner: Lt,
90
- embedded: Vt,
91
- bannerContent: Xt,
92
- icon: Gt,
93
- bannerText: Jt,
94
- compact: Qt
95
- }, Yt = ({ children: t, layout: e = "standard", variant: o = "soft", embedded: s = !1, icon: r = /* @__PURE__ */ a(L, { "aria-hidden": "true" }), className: n, ...i }) => {
96
- const c = e === "compact", d = !c && Nt(t);
97
- return /* @__PURE__ */ a(X, {
98
- ...i,
99
- className: P(N.banner, c && N.compact, s && N.embedded, n),
100
- variant: o,
101
- "data-layout": e,
102
- children: /* @__PURE__ */ p("div", {
103
- className: N.bannerContent,
104
- children: [C(r) && /* @__PURE__ */ a("span", {
105
- className: N.icon,
106
- children: r
107
- }), /* @__PURE__ */ a("div", {
108
- className: N.bannerText,
109
- children: d ? /* @__PURE__ */ a(gt, {
110
- isFocusable: !0,
111
- text: /* @__PURE__ */ a(w, { children: t }),
112
- tooltipContent: t
113
- }) : t
114
- })]
115
- })
116
- });
117
- }, Je = Object.assign(Yt, { Action: X.Action }), k = (t) => t.status === "visible", Y = ({ store: t, toastsToClose: e, nextToasts: o = t.state.toasts }) => {
118
- const s = o.map((n) => e.includes(n) ? {
119
- ...n,
120
- status: "closing"
121
- } : n), r = t.state.mountedToasterCount > 0;
122
- t.set("toasts", r ? s : s.filter(k));
123
- for (const n of e) n.notification.onClose?.();
124
- }, Z = J(void 0), A = () => {
125
- const t = Q(Z);
126
- if (!u(t)) throw new Error("Toast components must be used within a ToastProvider.");
127
- return t;
128
- }, tt = () => {
129
- const t = A();
130
- return { closeToast: (o) => {
131
- const s = t.state.toasts.filter((r) => k(r) && (!u(o) || r.notification.id === o));
132
- G(s) && Y({
133
- store: t,
134
- toastsToClose: s
135
- });
136
- } };
137
- }, H = 0, Zt = () => {
138
- const t = A();
139
- return { enqueueToast: It(() => {
140
- function e(o) {
141
- if (!u(o)) return;
142
- const { dedupeKey: s, ...r } = o, { toasts: n, limit: i } = t.state, c = n.filter(k), d = u(s) ? c.find((_) => _.dedupeKey === s) : void 0;
143
- if (u(d)) return d.notification.id;
144
- H += 1;
145
- const l = `toast-${H}`, h = Math.max(0, c.length - i + 1);
146
- return Y({
147
- store: t,
148
- toastsToClose: c.slice(0, h),
149
- nextToasts: [...n, {
150
- notification: {
151
- ...r,
152
- id: l
153
- },
154
- dedupeKey: s,
155
- status: "visible"
156
- }]
157
- }), l;
158
- }
159
- return e;
160
- }, [t]) };
161
- }, te = ({ store: t, id: e, ...o }) => {
162
- const s = t.state.toasts.find((i) => i.notification.id === e && k(i)), r = Object.keys(o);
163
- if (!u(s) || !G(r)) return;
164
- const n = r.includes("duration") || u(s.notification.progress) && r.includes("progress") && !u(o.progress);
165
- t.set("toasts", t.state.toasts.map((i) => i === s ? {
166
- ...i,
167
- notification: {
168
- ...i.notification,
169
- ...o,
170
- id: e
171
- },
172
- ...n ? { durationRevision: (i.durationRevision ?? 0) + 1 } : {}
173
- } : i));
174
- }, ee = () => {
175
- const t = A();
176
- return { updateToast: At((e) => te({
177
- store: t,
178
- ...e
179
- }), [t]) };
180
- }, Qe = () => {
181
- const { closeToast: t } = tt(), { enqueueToast: e } = Zt(), { updateToast: o } = ee();
182
- return {
183
- enqueueToast: e,
184
- closeToast: t,
185
- updateToast: o
186
- };
187
- }, oe = "_root_181ka_1", se = "_progress_181ka_19", re = "_header_181ka_30", ae = "_message_181ka_40", ne = "_icon_181ka_45", ie = "_actions_181ka_50", ce = "_description_181ka_56", ue = "_footer_181ka_65", de = "_footerAction_181ka_69", le = "_closeButton_181ka_76", f = {
188
- root: oe,
189
- progress: se,
190
- header: re,
191
- message: ae,
192
- icon: ne,
193
- actions: ie,
194
- description: ce,
195
- footer: ue,
196
- footerAction: de,
197
- closeButton: le
198
- }, et = J({
199
- durationRevision: 0,
200
- isActive: !0
201
- }), me = ({ clock: t, duration: e, progress: o, isPaused: s, onClose: r }) => {
202
- const { durationRevision: n, isActive: i } = Q(et), c = u(o);
203
- return W(() => {
204
- t.update({
205
- duration: e,
206
- durationRevision: n,
207
- isPaused: s,
208
- isProgress: c,
209
- isActive: i,
210
- onClose: r
211
- });
212
- }, [
213
- t,
214
- e,
215
- n,
216
- s,
217
- c,
218
- i,
219
- r
220
- ]), W(() => () => t.stop(), [t]), null;
221
- }, ve = ({ element: t, isFocused: e, onFocusChange: o }) => (W(() => {
222
- if (!e || !u(t)) return;
223
- const s = () => {
224
- t.contains(t.ownerDocument.activeElement) || o(!1);
225
- };
226
- s();
227
- const r = new MutationObserver(s);
228
- return r.observe(t, {
229
- childList: !0,
230
- subtree: !0
231
- }), () => r.disconnect();
232
- }, [
233
- t,
234
- e,
235
- o
236
- ]), null), ot = (t) => Number.isFinite(t) && t > 0, _e = "_countdown_1vuo8_1", fe = "_toastCountdown_1vuo8_1", pe = {
237
- countdown: _e,
238
- toastCountdown: fe
239
- }, he = ({ progress: t, duration: e, remainingDuration: o, revision: s, isPaused: r, barColor: n }) => u(t) ? /* @__PURE__ */ a(Tt, {
240
- value: t,
241
- barColor: n
242
- }) : ot(e) ? /* @__PURE__ */ a("div", {
243
- className: pe.countdown,
244
- "data-paused": r || void 0,
245
- style: {
246
- "--toast-countdown-color": n,
247
- "--toast-countdown-width": `${o / e * 100}%`,
248
- "--toast-countdown-duration": `${o}ms`
249
- }
250
- }, s) : null, Te = 2 ** 31 - 1, Ce = ({ onChange: t }) => {
251
- let e, o = 0, s, r, n = 0, i = !1;
252
- const c = () => {
253
- u(s) && (o = Math.max(0, o - (performance.now() - s)), s = void 0), clearTimeout(r), r = void 0;
254
- }, d = () => {
255
- u(e) && (n += 1, t({
256
- duration: e.duration,
257
- remainingDuration: o,
258
- revision: n,
259
- isPaused: e.isPaused || !e.isActive
260
- }));
261
- }, l = () => {
262
- i || (c(), i = !0, o = 0, d(), e?.onClose?.());
263
- }, h = () => u(e) && e.isActive && !e.isPaused && !e.isProgress && ot(e.duration) && !i, _ = () => {
264
- h() && (s = performance.now(), r = setTimeout(() => {
265
- if (c(), o > 0) {
266
- _();
267
- return;
268
- }
269
- l();
270
- }, Math.min(o, Te)));
271
- };
272
- return {
273
- update: (m) => {
274
- const g = !u(e) || m.duration !== e.duration || m.durationRevision !== e.durationRevision || e.isProgress && !m.isProgress, b = g || m.isProgress !== e?.isProgress || m.isPaused !== e?.isPaused || m.isActive !== e?.isActive, R = !u(s) && h();
275
- if (!b && !R) {
276
- e = m;
277
- return;
278
- }
279
- c(), e = m, !i && (g && (o = Math.max(0, m.duration)), d(), _());
280
- },
281
- close: l,
282
- stop: c
283
- };
284
- }, ge = ({ duration: t, isPaused: e }) => {
285
- const [o, s] = x({
286
- duration: t,
287
- remainingDuration: t,
288
- revision: 0,
289
- isPaused: e
290
- }), [r] = x(() => Ce({ onChange: s }));
291
- return {
292
- countdown: o,
293
- clock: r
294
- };
295
- }, we = {
296
- neutral: F,
297
- error: F,
298
- success: lt,
299
- info: L,
300
- warning: F
301
- }, be = ({ children: t, description: e, icon: o, iconLabel: s, action: r, progress: n, duration: i = 6e3, onCancel: c, onClose: d, cancelLabel: l = "Cancel", closeLabel: h = "Close", status: _ = "neutral", role: I = "status", className: m, onMouseEnter: g, onMouseLeave: b, onFocus: R, onBlur: st, render: rt, ref: at, ...nt }) => {
302
- const $ = _t(), [it, y] = x(!1), [q, S] = x(!1), [ct, ut] = x(null), z = it || q, { countdown: E, clock: D } = ge({
303
- duration: i,
304
- isPaused: z
305
- }), dt = we[_], U = $.snackBar[_ === "neutral" ? "default" : _], j = xt(o) ? /* @__PURE__ */ a(dt, {
306
- "aria-label": s,
307
- "aria-hidden": !u(s),
308
- color: U.color,
309
- size: $.icon.size.md
310
- }) : o;
311
- return /* @__PURE__ */ p(w, { children: [
312
- O({
313
- render: rt,
314
- ref: [at ?? null, ut],
315
- props: {
316
- role: I,
317
- "aria-live": I === "alert" ? "assertive" : "polite",
318
- ...nt,
319
- className: P(f.root, m),
320
- onMouseEnter: (T) => {
321
- y(!0), g?.(T);
322
- },
323
- onMouseLeave: (T) => {
324
- y(!1), b?.(T);
325
- },
326
- onFocus: (T) => {
327
- S(!0), R?.(T);
328
- },
329
- onBlur: (T) => {
330
- T.currentTarget.contains(T.relatedTarget) || S(!1), st?.(T);
331
- },
332
- children: /* @__PURE__ */ p(w, { children: [
333
- /* @__PURE__ */ a("div", {
334
- className: f.progress,
335
- "aria-hidden": !0,
336
- children: /* @__PURE__ */ a(he, {
337
- barColor: U.backgroundColor,
338
- progress: n,
339
- duration: E.duration,
340
- remainingDuration: E.remainingDuration,
341
- revision: E.revision,
342
- isPaused: E.isPaused
343
- })
344
- }),
345
- /* @__PURE__ */ p("div", {
346
- className: f.header,
347
- children: [
348
- C(j) && /* @__PURE__ */ a("div", {
349
- className: f.icon,
350
- children: j
351
- }),
352
- /* @__PURE__ */ a("div", {
353
- className: f.message,
354
- children: t
355
- }),
356
- /* @__PURE__ */ p("div", {
357
- className: f.actions,
358
- children: [u(c) && C(l) && /* @__PURE__ */ a(B, {
359
- onClick: c,
360
- size: "sm",
361
- variant: "ghost",
362
- style: { fontWeight: "var(--t-font-weight-regular)" },
363
- children: l
364
- }), u(d) && /* @__PURE__ */ a(B, {
365
- title: h,
366
- "aria-label": h,
367
- startIcon: /* @__PURE__ */ a(V, {}),
368
- className: f.closeButton,
369
- variant: "ghost",
370
- size: "sm",
371
- onClick: D.close
372
- })]
373
- })
374
- ]
375
- }),
376
- C(e) && /* @__PURE__ */ a("div", {
377
- className: f.description,
378
- children: e
379
- }),
380
- C(r) && /* @__PURE__ */ p("div", {
381
- className: f.footer,
382
- children: [/* @__PURE__ */ a(wt, {}), /* @__PURE__ */ a("div", {
383
- className: f.footerAction,
384
- children: r
385
- })]
386
- })
387
- ] })
388
- }
389
- }),
390
- /* @__PURE__ */ a(ve, {
391
- element: ct,
392
- isFocused: q,
393
- onFocusChange: S
394
- }),
395
- /* @__PURE__ */ a(me, {
396
- clock: D,
397
- duration: i,
398
- progress: n,
399
- isPaused: z,
400
- onClose: d
401
- })
402
- ] });
403
- }, Ne = (t = 3) => {
404
- if (!bt(t)) throw new Error("Toast limit must be a positive integer.");
405
- return new Wt({
406
- toasts: [],
407
- limit: t,
408
- mountedToasterCount: 0
409
- });
410
- }, Ye = ({ children: t, limit: e = 3 }) => {
411
- const [o] = x(() => Ne(e));
412
- return /* @__PURE__ */ a(Z.Provider, {
413
- value: o,
414
- children: t
415
- });
416
- }, xe = "_root_1q2cc_1", Ae = "_item_1q2cc_20", Ie = "_itemContent_1q2cc_47", M = {
417
- root: xe,
418
- item: Ae,
419
- itemContent: Ie
420
- }, Pe = () => kt(A(), (t) => t.toasts), K = ({ store: t, toast: e }) => {
421
- const { toasts: o } = t.state;
422
- e.status === "closing" && o.includes(e) && t.set("toasts", o.filter((s) => s !== e));
423
- }, We = ({ elementRef: t, toastEntry: e }) => {
424
- const o = A();
425
- return W(() => {
426
- if (e.status === "visible") return;
427
- const s = t.current?.getAnimations?.() ?? [];
428
- if (s.length === 0) {
429
- K({
430
- store: o,
431
- toast: e
432
- });
433
- return;
434
- }
435
- let r = !1;
436
- return Promise.allSettled(s.map((n) => n.finished)).then(() => {
437
- r || K({
438
- store: o,
439
- toast: e
440
- });
441
- }), () => {
442
- r = !0;
443
- };
444
- }, [
445
- t,
446
- e,
447
- o
448
- ]), /* @__PURE__ */ a(w, {});
449
- }, ke = ({ toastEntry: t, getToastProps: e, onClose: o }) => {
450
- const { notification: s, status: r, durationRevision: n = 0 } = t, { id: i, ...c } = s, d = Pt(null);
451
- return /* @__PURE__ */ p(w, { children: [/* @__PURE__ */ a("div", {
452
- ref: d,
453
- className: M.item,
454
- "data-exiting": r === "closing" || void 0,
455
- inert: r === "closing",
456
- children: /* @__PURE__ */ a("div", {
457
- className: M.itemContent,
458
- children: /* @__PURE__ */ a(et.Provider, {
459
- value: {
460
- durationRevision: n,
461
- isActive: r === "visible"
462
- },
463
- children: /* @__PURE__ */ a(be, {
464
- ...c,
465
- ...e?.(s),
466
- id: i,
467
- onClose: () => o(i)
468
- })
469
- })
470
- })
471
- }), /* @__PURE__ */ a(We, {
472
- elementRef: d,
473
- toastEntry: t
474
- })] });
475
- }, Ee = ({ getToastProps: t }) => {
476
- const e = Pe(), { closeToast: o } = tt();
477
- return e.map((s) => /* @__PURE__ */ a(ke, {
478
- toastEntry: s,
479
- getToastProps: t,
480
- onClose: o
481
- }, s.notification.id));
482
- }, Be = () => {
483
- const t = A();
484
- return W(() => (t.set("mountedToasterCount", t.state.mountedToasterCount + 1), () => {
485
- t.set("mountedToasterCount", t.state.mountedToasterCount - 1), !(t.state.mountedToasterCount > 0) && t.set("toasts", t.state.toasts.filter(k));
486
- }), [t]), null;
487
- }, Ze = ({ container: t, getToastProps: e, className: o, render: s, ref: r, ...n }) => {
488
- const i = ft(), c = Ct(), d = t === void 0 ? i ?? (typeof document > "u" ? null : document.body) : t, l = O({
489
- render: s,
490
- ref: r,
491
- props: {
492
- role: "region",
493
- dir: c,
494
- "aria-label": "Notifications",
495
- ...n,
496
- className: P(M.root, o),
497
- children: /* @__PURE__ */ p(w, { children: [/* @__PURE__ */ a(Be, {}), /* @__PURE__ */ a(Ee, { getToastProps: e })] })
498
- }
499
- });
500
- return u(d) ? Et(l, d) : null;
501
- };
502
- export {
503
- Je as a,
504
- Qe as i,
505
- Ye as n,
506
- Ge as o,
507
- be as r,
508
- Ze as t
509
- };
@@ -1 +0,0 @@
1
- const be=require("./theme-1XkFz8Qu.cjs"),S=require("./isDefined-DS2Q42p5.cjs"),F=require("./mergeClassNames-D4lshrT6.cjs"),J=require("./preventDismissingClickActivation-DZxTSLV3.cjs"),I=require("./Button-COxEKIHL.cjs"),le=require("./isRenderableSlot-Guryb6Nf.cjs"),ce=require("./OverflowingTextWithTooltip-BlufG-6n.cjs"),m=require("./Dropdown-BBUGkQQV.cjs"),Y=require("./Input-DvL77rvu.cjs"),D=require("./Radio-D_YUizSv.cjs");let ge=require("@base-ui/react/use-render"),d=require("@sniptt/guards"),Z=require("clsx"),x=require("react"),e=require("react/jsx-runtime"),ye=require("@base-ui/utils/useMergedRefs"),Ne=require("@base-ui/utils/useStableCallback"),Se=require("@base-ui/utils/useControlled"),Ce=require("@base-ui/utils/useValueAsRef"),pe=require("@base-ui/utils/formatNumber"),Ie=require("@base-ui/react/radio-group"),j=require("@tabler/icons-react");var De="_root_1x3d7_1",we="_label_1x3d7_6",Oe="_flag_1x3d7_14",Q={root:De,label:we,flag:Oe},Ee=({disabled:r,open:t,onOpenChange:n})=>{const a=(0,Ne.useStableCallback)(n);return(0,x.useEffect)(()=>{!r||!t||a(!1)},[r,t,a]),null},Te=({countries:r,value:t,onValueChange:n,searchLabel:a,noCountryLabel:i,noResultsLabel:s})=>{const[u,c]=(0,x.useState)(""),l=J.normalizeSearchText(u.trim()),h=(0,d.isNonEmptyString)(l),g=r.filter(b=>J.normalizeSearchText(b.label).includes(l)),o=J.normalizeSearchText(i).includes(l),_=o||(0,d.isNonEmptyArray)(g),v=o&&(0,e.jsx)(m.Dropdown.OptionItem,{selected:!(0,d.isNonEmptyString)(t),startIcon:(0,e.jsx)("span",{className:Q.flag,"aria-hidden":"true",children:(0,e.jsx)(j.IconCircleOff,{})}),onSelect:()=>n(""),children:i});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(m.Dropdown.Search,{value:u,onValueChange:c,placeholder:a,"aria-label":a}),_&&(0,e.jsx)(m.Dropdown.Separator,{}),_&&(0,e.jsxs)(m.Dropdown.Section,{scrollable:!0,children:[!h&&v,g.map(b=>(0,e.jsx)(m.Dropdown.OptionItem,{selected:b.value===t,startIcon:(0,e.jsx)("span",{className:Q.flag,"aria-hidden":"true",children:b.flag}),onSelect:()=>n(b.value),children:b.label},b.value)),h&&v]}),!_&&(0,e.jsx)(m.Dropdown.Empty,{children:s})]})},Pe=({ariaLabelledBy:r,ariaLabel:t,visibleLabelId:n})=>{if((0,d.isNonEmptyString)(r))return r;if(!(0,d.isNonEmptyString)(t))return n},H=r=>r.preventBaseUIHandler?.(),qe=({countries:r,value:t,onValueChange:n,label:a,searchLabel:i="Search",noCountryLabel:s="No country",noResultsLabel:u="No results",open:c,onOpenChange:l,popupProps:h,disabled:g=!1,className:o,style:_,render:v,onClick:b,onMouseDown:w,onPointerDown:P,onKeyDown:p,onKeyUp:M,id:k,"aria-label":q,"aria-labelledby":O,"aria-describedby":$,...C})=>{const N=(0,x.useId)(),V=k??N,ee=`${N}-label`,G=`${N}-value`,L=(0,d.isNonEmptyString)(a),E=(0,d.isNonEmptyString)(q)?q:void 0,z=Pe({ariaLabelledBy:O,ariaLabel:E,visibleLabelId:L?ee:void 0}),R=[$,S.isDefined(z)||S.isDefined(E)?G:void 0].filter(d.isNonEmptyString),[ae,se]=(0,x.useState)(!1),f=g||!(0,d.isNonEmptyArray)(r),W=c??ae,B=!f&&W,[U,re]=(0,x.useState)(B),[de,he]=(0,x.useState)(0);U!==B&&(re(B),B&&he(de+1));const ie=r.find(y=>y.value===t),ve=ie?.label??s,fe=S.isDefined(ie)?ie.flag:(0,e.jsx)(j.IconCircleOff,{}),oe=y=>({...y,disabled:f}),xe=F.mergeClassNames((0,Z.clsx)(Y.Input_module_default.input,Y.Input_module_default.md,D.Select_module_default.trigger),o),me=y=>{y&&f||(se(y),l?.(y))};return(0,e.jsxs)("div",{className:Q.root,children:[(0,e.jsx)(Ee,{disabled:f,open:W,onOpenChange:me}),L&&(0,e.jsx)("label",{id:ee,className:Q.label,htmlFor:V,children:a}),(0,e.jsxs)(m.Dropdown.Root,{type:"picker",open:B,onOpenChange:me,children:[(0,e.jsxs)(m.Dropdown.Trigger,{...C,id:V,"aria-label":E,"aria-labelledby":z,"aria-describedby":(0,d.isNonEmptyArray)(R)?R.join(" "):void 0,"aria-disabled":f||void 0,"data-disabled":f?"":void 0,onClick:f?H:b,onMouseDown:f?H:w,onPointerDown:f?H:P,onKeyDown:f?H:p,onKeyUp:f?H:M,className:y=>xe(oe(y)),style:(0,d.isFunction)(_)?y=>_(oe(y)):_,render:(0,d.isFunction)(v)?(y,je)=>v(y,oe(je)):v,children:[(0,e.jsx)("span",{className:Q.flag,"aria-hidden":"true",children:fe}),(0,e.jsx)("span",{className:D.Select_module_default.value,id:G,children:(0,e.jsx)(ce.OverflowingTextWithTooltip,{text:ve})}),(0,e.jsx)("span",{className:D.Select_module_default.icon,"aria-hidden":"true",children:(0,e.jsx)(j.IconChevronDown,{})})]}),(0,e.jsx)(m.Dropdown.Content,{...h,"aria-label":E,"aria-labelledby":z,children:(0,e.jsx)(Te,{countries:r,value:t,onValueChange:n,searchLabel:i,noCountryLabel:s,noResultsLabel:u},de)})]})]})},Re="_trigger_gi29o_1",Be="_chevron_gi29o_35",Fe="_options_gi29o_40",ke="_emptyStatus_gi29o_46",ne={trigger:Re,chevron:Be,options:Fe,emptyStatus:ke},_e=({code:r,name:t})=>`${t} (${r})`,ze=({currencies:r,value:t,onValueChange:n,disabled:a=!1,searchLabel:i="Search",emptyLabel:s="No results",className:u,render:c,ref:l,...h})=>{const[g,o]=(0,x.useState)(""),_=g.trim().toLowerCase(),v=r.filter(p=>_e(p).toLowerCase().includes(_)),b=(0,d.isNonEmptyArray)(v),w=v.find(({code:p})=>p===t),P=S.isDefined(w)?[w,...v.filter(({code:p})=>p!==t)]:v;return(0,ge.useRender)({render:c,ref:l,props:{...h,className:(0,Z.clsx)(ne.options,u),children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(m.Dropdown.Search,{value:g,placeholder:i,"aria-label":i,onValueChange:o,disabled:a}),(0,e.jsx)(m.Dropdown.Separator,{}),b&&(0,e.jsx)(m.Dropdown.Section,{scrollable:!0,children:P.map(p=>(0,e.jsx)(m.Dropdown.OptionItem,{selected:p.code===t,disabled:a||p.disabled,onSelect:()=>n(p.code),children:(0,e.jsx)(ce.OverflowingTextWithTooltip,{text:_e(p)})},p.code))}),(0,e.jsx)(m.Dropdown.Empty,{className:ne.emptyStatus,children:b?null:s})]})}})},Ae=({value:r,className:t,...n})=>(0,e.jsxs)(m.Dropdown.Trigger,{...n,className:F.mergeClassNames(ne.trigger,t),children:[r,(0,e.jsx)(j.IconChevronDown,{"aria-hidden":"true",className:ne.chevron})]}),Me={Trigger:Ae,Options:ze},$e="_root_u3myi_1",Ve="_preview_u3myi_6",Ge="_image_u3myi_35",Le="_fileInput_u3myi_48",We="_content_u3myi_58",Ue="_actions_u3myi_67",He="_helperText_u3myi_73",Ke="_errorMessage_u3myi_78",T={root:$e,preview:Ve,image:Ge,fileInput:Le,content:We,actions:Ue,helperText:He,errorMessage:Ke},Xe=({src:r})=>{const t=be.useTheme(),[n,a]=(0,x.useState)(!1);return!(0,d.isNonEmptyString)(r)||n?(0,e.jsx)(j.IconPhotoUp,{size:t.icon.size.lg,"aria-hidden":!0}):(0,e.jsx)("img",{className:T.image,src:r,alt:"",onError:()=>a(!0)})},Je="image/*",Qe=({src:r,onFileSelect:t,onRemove:n,onAbort:a,disabled:i=!1,isUploading:s=!1,helperText:u,errorMessage:c,uploadLabel:l="Upload",removeLabel:h="Remove",abortLabel:g="Abort",accept:o=Je,inputRef:_,onChange:v,"aria-describedby":b,className:w,style:P,dir:p,render:M,ref:k,...q})=>{const O=(0,x.useRef)(null),$=(0,ye.useMergedRefs)(O,_),C=(0,x.useId)(),N=`${C}-helper`,V=`${C}-error`,ee=(0,d.isNonEmptyString)(r),G=(0,d.isNonEmptyString)(u),L=(0,d.isNonEmptyString)(c),E=i||!S.isDefined(t),z=i||!ee||!S.isDefined(n),R=E||s,ae=z||s,se=s&&S.isDefined(a),f=[b,G&&N,L&&V].filter(d.isNonEmptyString).join(" ")||void 0,W=()=>{R||O.current?.click()},B=U=>{const re=U.currentTarget.files?.[0];try{v?.(U)}finally{U.currentTarget.value=""}R||!S.isDefined(re)||t?.(re)};return(0,ge.useRender)({render:M,ref:k,props:{className:(0,Z.clsx)(T.root,w),style:P,dir:p,"aria-busy":s||q["aria-busy"],children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{className:T.preview,type:"button",disabled:E,"aria-disabled":s||void 0,"aria-label":l,"aria-describedby":f,onClick:W,children:(0,e.jsx)(Xe,{src:r},r)}),(0,e.jsxs)("div",{className:T.content,children:[(0,e.jsxs)("div",{className:T.actions,children:[(0,e.jsx)("input",{"aria-label":l,...q,ref:$,className:T.fileInput,dir:p,children:void 0,dangerouslySetInnerHTML:void 0,type:"file",multiple:!1,value:void 0,defaultValue:void 0,accept:o,disabled:R,"aria-describedby":f,hidden:!0,onChange:B}),se?(0,e.jsx)(I.Button,{type:"button",startIcon:(0,e.jsx)(j.IconX,{}),onClick:a,disabled:i,variant:"outline",children:g}):(0,e.jsx)(I.Button,{type:"button",startIcon:(0,e.jsx)(j.IconUpload,{}),onClick:W,disabled:R,focusableWhenDisabled:s&&!E,"aria-describedby":f,variant:"outline",children:l}),(0,e.jsx)(I.Button,{type:"button",startIcon:(0,e.jsx)(j.IconTrash,{}),onClick:n,disabled:ae,focusableWhenDisabled:s&&!z,variant:"outline",children:h})]}),G&&(0,e.jsx)("span",{className:T.helperText,id:N,children:u}),L&&(0,e.jsx)("span",{className:T.errorMessage,id:V,role:"alert",children:c})]})]})}})},Ye="_button_k3e4y_1",Ze={button:Ye},er=({className:r,emphasis:t="standard",size:n,variant:a,...i})=>{const s=(0,x.useContext)(I.ButtonGroupContext),u=n??s?.size??"sm",c=a??s?.variant??"ghost";return(0,e.jsx)(I.Button,{...i,size:u,variant:c,"data-emphasis":t,className:F.mergeClassNames(Ze.button,r)})},rr="_button_1fwx7_1",tr={button:rr},nr=({className:r,elevated:t=!0,variant:n,...a})=>{const i=(0,x.useContext)(I.ButtonGroupContext),s=n??i?.variant??"solid";return(0,e.jsx)(I.Button,{...a,elevated:t,variant:s,className:F.mergeClassNames(tr.button,r)})},ue={maximumFractionDigits:15,numberingSystem:"latn",useGrouping:"min2"},ar=({nextValue:r,currentValue:t,reason:n})=>n==="input-blur"&&(0,pe.formatNumber)(r,void 0,ue)===(0,pe.formatNumber)(t,void 0,ue),sr="_root_17bio_1",ir="_valueInput_17bio_7",or="_button_17bio_14",lr="_icon_17bio_32",A={root:sr,valueInput:ir,button:or,icon:lr},ur=({value:r,defaultValue:t,onValueChange:n,onValueCommitted:a,allowOutOfRange:i=!1,min:s,max:u,step:c=1,disabled:l,readOnly:h,required:g,name:o,form:_,id:v,showButtons:b=!0,decrementLabel:w="Decrease value",incrementLabel:P="Increase value",className:p,...M})=>{const[k,q]=(0,Se.useControlled)({controlled:r,default:t??null,name:"NumberStepper",state:"value"}),O=(0,Ce.useValueAsRef)(k),$=(C,N)=>{if(C!==O.current){if(ar({nextValue:C,currentValue:O.current,reason:N.reason})){N.cancel();return}n?.(C,N),!N.isCanceled&&(O.current=C,q(C))}};return(0,e.jsxs)(D.NumberField.Root,{value:k,onValueChange:$,onValueCommitted:a,min:s,max:u,allowOutOfRange:i,step:c,smallStep:c,largeStep:c,disabled:l,readOnly:h,required:g,name:o,form:_,id:v,format:ue,className:A.root,children:[b&&(0,e.jsx)(D.NumberField.Decrement,{"aria-label":w,render:(0,e.jsx)(I.Button,{type:"button",size:"sm",className:A.button,startIcon:(0,e.jsx)("span",{className:A.icon,children:(0,e.jsx)(j.IconMinus,{})})})}),(0,e.jsx)(D.NumberField.Input,{...M,form:_,className:F.mergeClassNames((0,Z.clsx)(Y.Input_module_default.input,Y.Input_module_default.sm,A.valueInput),p)}),b&&(0,e.jsx)(D.NumberField.Increment,{"aria-label":P,render:(0,e.jsx)(I.Button,{type:"button",size:"sm",className:A.button,startIcon:(0,e.jsx)("span",{className:A.icon,children:(0,e.jsx)(j.IconPlus,{})})})})]})},cr="_trigger_1fjn7_1",dr="_triggerFlag_1fjn7_31",mr="_optionFlag_1fjn7_32",pr="_chevron_1fjn7_52",_r="_selectedCountryLabel_1fjn7_57",X={trigger:cr,triggerFlag:dr,optionFlag:mr,chevron:pr,selectedCountryLabel:_r},br=({label:r,callingCode:t})=>`${r} (+${t})`,gr=({countries:r,value:t,onValueChange:n,searchLabel:a="Search",emptyLabel:i="No results"})=>{const[s,u]=(0,x.useState)(""),c=J.normalizeSearchText(s),l=r.filter(({label:o})=>J.normalizeSearchText(o).includes(c)),h=l.find(o=>o.value===t),g=S.isDefined(h)?[h,...l.filter(o=>o.value!==t)]:l;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(m.Dropdown.Search,{value:s,onValueChange:u,placeholder:a,"aria-label":a}),(0,e.jsx)(m.Dropdown.Separator,{}),(0,e.jsxs)(m.Dropdown.Section,{scrollable:!0,children:[!(0,d.isNonEmptyArray)(g)&&(0,e.jsx)(m.Dropdown.Empty,{children:i}),g.map(o=>{const _=br(o);return(0,e.jsx)(m.Dropdown.OptionItem,{"aria-label":_,selected:o.value===t,onSelect:()=>n(o.value),startIcon:(0,e.jsx)("span",{className:X.optionFlag,"aria-hidden":!0,children:o.flag}),children:(0,e.jsx)(ce.OverflowingTextWithTooltip,{text:(0,e.jsxs)(e.Fragment,{children:[o.label," (",(0,e.jsxs)("bdi",{dir:"ltr",children:["+",o.callingCode]}),")"]}),tooltipContent:_})},o.value)})]})]})},hr=({country:r,className:t,"aria-describedby":n,...a})=>{const i=(0,x.useId)(),s=[S.isDefined(r)&&i,n].filter(d.isNonEmptyString).join(" ")||void 0;return(0,e.jsxs)(m.Dropdown.Trigger,{...a,"aria-describedby":s,className:F.mergeClassNames(X.trigger,t),children:[(0,e.jsx)("span",{className:X.triggerFlag,"aria-hidden":!0,children:r?.flag??(0,e.jsx)(j.IconWorld,{})}),S.isDefined(r)&&(0,e.jsx)("span",{id:i,className:X.selectedCountryLabel,children:r.label}),(0,e.jsx)(j.IconChevronDown,{className:X.chevron,"aria-hidden":!0})]})},vr={Trigger:hr,Options:gr},fr="_wrapper_fz4xu_1",xr="_filterButton_fz4xu_8",jr="_inputGroup_fz4xu_17",yr="_searchIcon_fz4xu_23",te={wrapper:fr,filterButton:xr,inputGroup:jr,searchIcon:yr},Nr=({placeholder:r,filterDropdown:t,size:n="md",id:a,filterButtonAriaLabel:i="Filter","aria-label":s,"aria-labelledby":u,...c})=>{const l=be.useTheme(),h=(0,x.useId)(),g=a??h,o=(0,e.jsx)(I.Button,{variant:"outline",size:n,"aria-label":i,startIcon:(0,e.jsx)(j.IconFilter,{size:l.icon.size.md}),className:te.filterButton});return(0,e.jsxs)("div",{className:te.wrapper,children:[(0,e.jsx)(D.InputGroup,{className:te.inputGroup,size:n,startElement:(0,e.jsx)(j.IconSearch,{className:te.searchIcon,size:l.icon.size.md,"aria-hidden":!0}),children:(0,e.jsx)(Y.Input,{...c,id:g,placeholder:r,"aria-label":(0,d.isNonEmptyString)(u)?void 0:s??r,"aria-labelledby":u})}),t?.(o)]})},Sr="_container_1uovu_1",Cr="_item_1uovu_20",Ir="_iconOnly_1uovu_60",Dr="_icon_1uovu_60",wr="_label_1uovu_79",K={container:Sr,item:Cr,iconOnly:Ir,icon:Dr,label:wr},Or=({className:r,itemWidth:t="equal",options:n,...a})=>(0,e.jsx)(Ie.RadioGroup,{...a,className:F.mergeClassNames(K.container,r),"data-item-width":t,children:n.map(({"aria-label":i,disabled:s,label:u,startIcon:c,value:l})=>(0,e.jsxs)(D.Radio.Root,{value:l,disabled:s,"aria-label":i,className:(0,Z.clsx)(K.item,!le.isRenderableSlot(u)&&K.iconOnly),children:[le.isRenderableSlot(c)&&(0,e.jsx)("span",{className:K.icon,"aria-hidden":!0,children:c}),le.isRenderableSlot(u)&&(0,e.jsx)("span",{className:K.label,children:u})]},l))});Object.defineProperty(exports,"CountrySelect",{enumerable:!0,get:function(){return qe}});Object.defineProperty(exports,"CurrencyPicker",{enumerable:!0,get:function(){return Me}});Object.defineProperty(exports,"ImageInput",{enumerable:!0,get:function(){return Qe}});Object.defineProperty(exports,"LightButton",{enumerable:!0,get:function(){return er}});Object.defineProperty(exports,"MainButton",{enumerable:!0,get:function(){return nr}});Object.defineProperty(exports,"NumberStepper",{enumerable:!0,get:function(){return ur}});Object.defineProperty(exports,"PhoneCountryPicker",{enumerable:!0,get:function(){return vr}});Object.defineProperty(exports,"SearchInput",{enumerable:!0,get:function(){return Nr}});Object.defineProperty(exports,"SegmentedControl",{enumerable:!0,get:function(){return Or}});