@tomny-dev/uzi 0.2.5 → 0.2.6

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 (182) hide show
  1. package/dist/index.cjs +65 -1925
  2. package/dist/index.js +24 -1857
  3. package/dist/index10.cjs +26 -0
  4. package/dist/index10.cjs.map +1 -0
  5. package/dist/index10.js +19 -0
  6. package/dist/index10.js.map +1 -0
  7. package/dist/index11.cjs +22 -0
  8. package/dist/index11.cjs.map +1 -0
  9. package/dist/index11.js +22 -0
  10. package/dist/index11.js.map +1 -0
  11. package/dist/index12.cjs +22 -0
  12. package/dist/index12.cjs.map +1 -0
  13. package/dist/index12.js +41 -0
  14. package/dist/index12.js.map +1 -0
  15. package/dist/index13.cjs +56 -0
  16. package/dist/index13.cjs.map +1 -0
  17. package/dist/index13.js +84 -0
  18. package/dist/index13.js.map +1 -0
  19. package/dist/index14.cjs +87 -0
  20. package/dist/index14.cjs.map +1 -0
  21. package/dist/index14.js +17 -0
  22. package/dist/index14.js.map +1 -0
  23. package/dist/index15.cjs +22 -0
  24. package/dist/index15.cjs.map +1 -0
  25. package/dist/index15.js +16 -0
  26. package/dist/index15.js.map +1 -0
  27. package/dist/index16.cjs +16 -0
  28. package/dist/index16.cjs.map +1 -0
  29. package/dist/index16.js +45 -0
  30. package/dist/index16.js.map +1 -0
  31. package/dist/index17.cjs +64 -0
  32. package/dist/index17.cjs.map +1 -0
  33. package/dist/index17.js +435 -0
  34. package/dist/index17.js.map +1 -0
  35. package/dist/index18.cjs +438 -0
  36. package/dist/index18.cjs.map +1 -0
  37. package/dist/index18.js +7 -0
  38. package/dist/index18.js.map +1 -0
  39. package/dist/index19.cjs +8 -0
  40. package/dist/index19.cjs.map +1 -0
  41. package/dist/index19.js +18 -0
  42. package/dist/index19.js.map +1 -0
  43. package/dist/index2.cjs +23 -0
  44. package/dist/index20.cjs +20 -0
  45. package/dist/index20.cjs.map +1 -0
  46. package/dist/index20.js +7 -0
  47. package/dist/index20.js.map +1 -0
  48. package/dist/index21.cjs +8 -0
  49. package/dist/index21.cjs.map +1 -0
  50. package/dist/index21.js +15 -0
  51. package/dist/index21.js.map +1 -0
  52. package/dist/index22.cjs +17 -0
  53. package/dist/index22.cjs.map +1 -0
  54. package/dist/index22.js +7 -0
  55. package/dist/index22.js.map +1 -0
  56. package/dist/index23.cjs +8 -0
  57. package/dist/index23.cjs.map +1 -0
  58. package/dist/index23.js +18 -0
  59. package/dist/index23.js.map +1 -0
  60. package/dist/index24.cjs +20 -0
  61. package/dist/index24.cjs.map +1 -0
  62. package/dist/index24.js +41 -0
  63. package/dist/index24.js.map +1 -0
  64. package/dist/index25.cjs +58 -0
  65. package/dist/index25.cjs.map +1 -0
  66. package/dist/index25.js +123 -0
  67. package/dist/index25.js.map +1 -0
  68. package/dist/index26.cjs +126 -0
  69. package/dist/index26.cjs.map +1 -0
  70. package/dist/index26.js +29 -0
  71. package/dist/index26.js.map +1 -0
  72. package/dist/index27.cjs +40 -0
  73. package/dist/index27.cjs.map +1 -0
  74. package/dist/index27.js +110 -0
  75. package/dist/index27.js.map +1 -0
  76. package/dist/index28.cjs +113 -0
  77. package/dist/index28.cjs.map +1 -0
  78. package/dist/index28.js +26 -0
  79. package/dist/index28.js.map +1 -0
  80. package/dist/index29.cjs +28 -0
  81. package/dist/index29.cjs.map +1 -0
  82. package/dist/index29.js +29 -0
  83. package/dist/index29.js.map +1 -0
  84. package/dist/index3.js +8 -0
  85. package/dist/index3.js.map +1 -0
  86. package/dist/index30.cjs +40 -0
  87. package/dist/index30.cjs.map +1 -0
  88. package/dist/index30.js +118 -0
  89. package/dist/index30.js.map +1 -0
  90. package/dist/index31.cjs +134 -0
  91. package/dist/index31.cjs.map +1 -0
  92. package/dist/index31.js +20 -0
  93. package/dist/index31.js.map +1 -0
  94. package/dist/index32.cjs +23 -0
  95. package/dist/index32.cjs.map +1 -0
  96. package/dist/index32.js +114 -0
  97. package/dist/index32.js.map +1 -0
  98. package/dist/index33.cjs +115 -0
  99. package/dist/index33.cjs.map +1 -0
  100. package/dist/index33.js +7 -0
  101. package/dist/index33.js.map +1 -0
  102. package/dist/index34.cjs +8 -0
  103. package/dist/index34.cjs.map +1 -0
  104. package/dist/index34.js +66 -0
  105. package/dist/index34.js.map +1 -0
  106. package/dist/index35.cjs +66 -0
  107. package/dist/index35.cjs.map +1 -0
  108. package/dist/index35.js +25 -0
  109. package/dist/index35.js.map +1 -0
  110. package/dist/index36.cjs +34 -0
  111. package/dist/index36.cjs.map +1 -0
  112. package/dist/index36.js +55 -0
  113. package/dist/index36.js.map +1 -0
  114. package/dist/index37.cjs +55 -0
  115. package/dist/index37.cjs.map +1 -0
  116. package/dist/index37.js +35 -0
  117. package/dist/index37.js.map +1 -0
  118. package/dist/index38.cjs +49 -0
  119. package/dist/index38.cjs.map +1 -0
  120. package/dist/index38.js +150 -0
  121. package/dist/index38.js.map +1 -0
  122. package/dist/index39.cjs +150 -0
  123. package/dist/index39.cjs.map +1 -0
  124. package/dist/index39.js +43 -0
  125. package/dist/index39.js.map +1 -0
  126. package/dist/index4.cjs +8 -0
  127. package/dist/index4.cjs.map +1 -0
  128. package/dist/index4.js +29 -0
  129. package/dist/index4.js.map +1 -0
  130. package/dist/index40.cjs +61 -0
  131. package/dist/index40.cjs.map +1 -0
  132. package/dist/index40.js +173 -0
  133. package/dist/index40.js.map +1 -0
  134. package/dist/index41.cjs +173 -0
  135. package/dist/index41.cjs.map +1 -0
  136. package/dist/index41.js +14 -0
  137. package/dist/index41.js.map +1 -0
  138. package/dist/index42.cjs +15 -0
  139. package/dist/index42.cjs.map +1 -0
  140. package/dist/index42.js +21 -0
  141. package/dist/index42.js.map +1 -0
  142. package/dist/index43.cjs +21 -0
  143. package/dist/index43.cjs.map +1 -0
  144. package/dist/index43.js +15 -0
  145. package/dist/index43.js.map +1 -0
  146. package/dist/index44.cjs +17 -0
  147. package/dist/index44.cjs.map +1 -0
  148. package/dist/index44.js +24 -0
  149. package/dist/index44.js.map +1 -0
  150. package/dist/index45.cjs +24 -0
  151. package/dist/index45.cjs.map +1 -0
  152. package/dist/index45.js +13 -0
  153. package/dist/index45.js.map +1 -0
  154. package/dist/index46.cjs +16 -0
  155. package/dist/index46.cjs.map +1 -0
  156. package/dist/index46.js +96 -0
  157. package/dist/index46.js.map +1 -0
  158. package/dist/index47.cjs +98 -0
  159. package/dist/index47.cjs.map +1 -0
  160. package/dist/index5.cjs +40 -0
  161. package/dist/index5.cjs.map +1 -0
  162. package/dist/index5.js +45 -0
  163. package/dist/index5.js.map +1 -0
  164. package/dist/index6.cjs +47 -0
  165. package/dist/index6.cjs.map +1 -0
  166. package/dist/index6.js +17 -0
  167. package/dist/index6.js.map +1 -0
  168. package/dist/index7.cjs +20 -0
  169. package/dist/index7.cjs.map +1 -0
  170. package/dist/index7.js +30 -0
  171. package/dist/index7.js.map +1 -0
  172. package/dist/index8.cjs +35 -0
  173. package/dist/index8.cjs.map +1 -0
  174. package/dist/index8.js +18 -0
  175. package/dist/index8.js.map +1 -0
  176. package/dist/index9.cjs +20 -0
  177. package/dist/index9.cjs.map +1 -0
  178. package/dist/index9.js +26 -0
  179. package/dist/index9.js.map +1 -0
  180. package/package.json +1 -1
  181. package/dist/index.cjs.map +0 -1
  182. package/dist/index.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,1858 +1,25 @@
1
- import * as React from "react";
2
- import { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
3
- import { Slot } from "@radix-ui/react-slot";
4
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- import * as AvatarPrimitive from "@radix-ui/react-avatar";
6
- import * as DialogPrimitive from "@radix-ui/react-dialog";
7
- import * as ToastPrimitive from "@radix-ui/react-toast";
8
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
9
- import * as SelectPrimitive from "@radix-ui/react-select";
10
- //#region src/utils/cx.ts
11
- function cx(...values) {
12
- return values.filter(Boolean).join(" ");
13
- }
14
- var button_module_default = {
15
- button: "uzi-button-module__button__5dzDN",
16
- sizeSm: "uzi-button-module__sizeSm__jb544",
17
- sizeMd: "uzi-button-module__sizeMd__lIo8M",
18
- sizeLg: "uzi-button-module__sizeLg__QSSuW",
19
- sizeIcon: "uzi-button-module__sizeIcon__Aa9tN",
20
- variantPrimary: "uzi-button-module__variantPrimary__zp2Pg",
21
- variantSecondary: "uzi-button-module__variantSecondary__oX5CB",
22
- variantOutline: "uzi-button-module__variantOutline__uXfiP",
23
- variantGhost: "uzi-button-module__variantGhost__-OEB8",
24
- variantDestructive: "uzi-button-module__variantDestructive__5IeYA",
25
- variantLink: "uzi-button-module__variantLink__Olx4I"
26
- };
27
- //#endregion
28
- //#region src/components/button/Button.tsx
29
- var variantClass = {
30
- default: "variantPrimary",
31
- primary: "variantPrimary",
32
- secondary: "variantSecondary",
33
- outline: "variantOutline",
34
- ghost: "variantGhost",
35
- destructive: "variantDestructive",
36
- link: "variantLink"
37
- };
38
- var sizeClass = {
39
- default: "sizeMd",
40
- sm: "sizeSm",
41
- md: "sizeMd",
42
- lg: "sizeLg",
43
- icon: "sizeIcon"
44
- };
45
- function Button({ as, variant = "default", size = "default", className, children, asChild = false, ...rest }) {
46
- const classes = cx(button_module_default.button, button_module_default[variantClass[variant]], button_module_default[sizeClass[size]], className);
47
- if (asChild) return /* @__PURE__ */ jsx(Slot, {
48
- className: classes,
49
- ...rest,
50
- children
51
- });
52
- if (as === "a") return /* @__PURE__ */ jsx("a", {
53
- className: classes,
54
- ...rest,
55
- children
56
- });
57
- return /* @__PURE__ */ jsx("button", {
58
- type: "button",
59
- className: classes,
60
- ...rest,
61
- children
62
- });
63
- }
64
- var avatar_module_default = {
65
- avatar: "uzi-avatar-module__avatar__yPIOs",
66
- "size-sm": "uzi-avatar-module__size-sm__v5riJ",
67
- "size-md": "uzi-avatar-module__size-md__g7IQS",
68
- "size-lg": "uzi-avatar-module__size-lg__Ca4xk",
69
- "size-xl": "uzi-avatar-module__size-xl__K0Dfk",
70
- image: "uzi-avatar-module__image__Ngo7A",
71
- fallback: "uzi-avatar-module__fallback__Tf3oZ"
72
- };
73
- //#endregion
74
- //#region src/components/avatar/Avatar.tsx
75
- function Avatar({ className, size = "md", ...props }) {
76
- const sizeClass = size === "sm" ? avatar_module_default["size-sm"] : size === "lg" ? avatar_module_default["size-lg"] : size === "xl" ? avatar_module_default["size-xl"] : avatar_module_default["size-md"];
77
- return /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
78
- className: cx(avatar_module_default.avatar, sizeClass, className),
79
- ...props
80
- });
81
- }
82
- function AvatarImage({ className, ...props }) {
83
- return /* @__PURE__ */ jsx(AvatarPrimitive.Image, {
84
- className: cx(avatar_module_default.image, className),
85
- ...props
86
- });
87
- }
88
- function AvatarFallback({ className, ...props }) {
89
- return /* @__PURE__ */ jsx(AvatarPrimitive.Fallback, {
90
- className: cx(avatar_module_default.fallback, className),
91
- ...props
92
- });
93
- }
94
- var card_module_default = {
95
- card: "uzi-card-module__card__ZPFTz",
96
- "tone-default": "uzi-card-module__tone-default__7Ujf9",
97
- "tone-muted": "uzi-card-module__tone-muted__RQy5B",
98
- "tone-contrast": "uzi-card-module__tone-contrast__JpFxL",
99
- interactive: "uzi-card-module__interactive__zlPML",
100
- "padding-none": "uzi-card-module__padding-none__LXdx-",
101
- "padding-sm": "uzi-card-module__padding-sm__-Ub1s",
102
- "padding-md": "uzi-card-module__padding-md__kUf46",
103
- "padding-lg": "uzi-card-module__padding-lg__a5mWP"
104
- };
105
- //#endregion
106
- //#region src/components/card/Card.tsx
107
- function Card({ as, tone = "default", padding = "md", interactive = false, className, children, ...rest }) {
108
- const Component = as ?? "div";
109
- const TONE_CLASS = {
110
- default: null,
111
- muted: "tone-muted",
112
- contrast: "tone-contrast"
113
- };
114
- return /* @__PURE__ */ jsx(Component, {
115
- className: cx(card_module_default.card, TONE_CLASS[tone] ? card_module_default[TONE_CLASS[tone]] : null, card_module_default[{
116
- none: "padding-none",
117
- sm: "padding-sm",
118
- md: "padding-md",
119
- lg: "padding-lg"
120
- }[padding]], interactive && card_module_default.interactive, className),
121
- ...rest,
122
- children
123
- });
124
- }
125
- var pill_module_default = {
126
- pill: "uzi-pill-module__pill__uCKcP",
127
- "size-sm": "uzi-pill-module__size-sm__JANOQ",
128
- "size-md": "uzi-pill-module__size-md__fdsqR",
129
- "tone-success": "uzi-pill-module__tone-success__kW2Kf",
130
- "tone-warning": "uzi-pill-module__tone-warning__Rc5-s",
131
- "tone-info": "uzi-pill-module__tone-info__0vQrj",
132
- "tone-danger": "uzi-pill-module__tone-danger__gzNOa",
133
- icon: "uzi-pill-module__icon__KQ8zg",
134
- content: "uzi-pill-module__content__T7AG1"
135
- };
136
- //#endregion
137
- //#region src/components/pill/Pill.tsx
138
- function Pill({ as, tone = "neutral", size = "md", icon, className, children, ...rest }) {
139
- return /* @__PURE__ */ jsxs(as ?? "span", {
140
- className: cx(pill_module_default.pill, pill_module_default[`tone-${tone}`], pill_module_default[`size-${size}`], className),
141
- ...rest,
142
- children: [icon ? /* @__PURE__ */ jsx("span", {
143
- className: pill_module_default.icon,
144
- "aria-hidden": "true",
145
- children: icon
146
- }) : null, /* @__PURE__ */ jsx("span", {
147
- className: pill_module_default.content,
148
- children
149
- })]
150
- });
151
- }
152
- var modal_module_default = {
153
- portalLayer: "uzi-modal-module__portalLayer__t7blc",
154
- backdrop: "uzi-modal-module__backdrop__IMd3b",
155
- backdropFadeIn: "uzi-modal-module__backdropFadeIn__GNJdx",
156
- backdropFadeOut: "uzi-modal-module__backdropFadeOut__R-3K5",
157
- overlayContent: "uzi-modal-module__overlayContent__0DtbP",
158
- modalContentIn: "uzi-modal-module__modalContentIn__fub8M",
159
- modalContentOut: "uzi-modal-module__modalContentOut__elTJ3",
160
- modal: "uzi-modal-module__modal__Mao59",
161
- "size-sm": "uzi-modal-module__size-sm__Uu9je",
162
- "size-md": "uzi-modal-module__size-md__TiiWy",
163
- "size-lg": "uzi-modal-module__size-lg__BrTIO",
164
- "size-xl": "uzi-modal-module__size-xl__sj0mh",
165
- header: "uzi-modal-module__header__PmCaO",
166
- titles: "uzi-modal-module__titles__IboyQ",
167
- title: "uzi-modal-module__title__Zd7pL",
168
- subtitle: "uzi-modal-module__subtitle__t-LRK",
169
- closeButton: "uzi-modal-module__closeButton__GTiZr",
170
- body: "uzi-modal-module__body__km6FQ",
171
- footer: "uzi-modal-module__footer__jWLTv"
172
- };
173
- //#endregion
174
- //#region src/components/modal/Modal.tsx
175
- function ModalOverlay({ open, onClose, className, children }) {
176
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
177
- open,
178
- onOpenChange: (nextOpen) => {
179
- if (!nextOpen) onClose();
180
- },
181
- children: /* @__PURE__ */ jsx(DialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs("div", {
182
- className: modal_module_default.portalLayer,
183
- children: [/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cx(modal_module_default.backdrop, className) }), /* @__PURE__ */ jsx(DialogPrimitive.Content, {
184
- className: modal_module_default.overlayContent,
185
- children
186
- })]
187
- }) })
188
- });
189
- }
190
- function Modal({ open, onClose, title, subtitle, size = "md", children, footer }) {
191
- return /* @__PURE__ */ jsx(ModalOverlay, {
192
- open,
193
- onClose,
194
- children: /* @__PURE__ */ jsxs("div", {
195
- className: cx(modal_module_default.modal, modal_module_default[`size-${size}`]),
196
- children: [
197
- /* @__PURE__ */ jsxs("div", {
198
- className: modal_module_default.header,
199
- children: [/* @__PURE__ */ jsxs("div", {
200
- className: modal_module_default.titles,
201
- children: [/* @__PURE__ */ jsx(DialogPrimitive.Title, {
202
- className: modal_module_default.title,
203
- children: title
204
- }), subtitle ? /* @__PURE__ */ jsx(DialogPrimitive.Description, {
205
- className: modal_module_default.subtitle,
206
- children: subtitle
207
- }) : null]
208
- }), /* @__PURE__ */ jsx(DialogPrimitive.Close, {
209
- asChild: true,
210
- children: /* @__PURE__ */ jsx("button", {
211
- className: modal_module_default.closeButton,
212
- "aria-label": "Close",
213
- children: /* @__PURE__ */ jsxs("svg", {
214
- width: "14",
215
- height: "14",
216
- viewBox: "0 0 24 24",
217
- fill: "none",
218
- stroke: "currentColor",
219
- strokeWidth: "2.5",
220
- strokeLinecap: "round",
221
- strokeLinejoin: "round",
222
- children: [/* @__PURE__ */ jsx("line", {
223
- x1: "18",
224
- y1: "6",
225
- x2: "6",
226
- y2: "18"
227
- }), /* @__PURE__ */ jsx("line", {
228
- x1: "6",
229
- y1: "6",
230
- x2: "18",
231
- y2: "18"
232
- })]
233
- })
234
- })
235
- })]
236
- }),
237
- /* @__PURE__ */ jsx("div", {
238
- className: modal_module_default.body,
239
- children
240
- }),
241
- footer && /* @__PURE__ */ jsx("div", {
242
- className: modal_module_default.footer,
243
- children: footer
244
- })
245
- ]
246
- })
247
- });
248
- }
249
- var alert_module_default = {
250
- alert: "uzi-alert-module__alert__7Bt6c",
251
- success: "uzi-alert-module__success__apdFG",
252
- error: "uzi-alert-module__error__KLgi1",
253
- warning: "uzi-alert-module__warning__F4fpk",
254
- info: "uzi-alert-module__info__1IKHt"
255
- };
256
- //#endregion
257
- //#region src/components/alert/Alert.tsx
258
- function Alert({ tone, children, className }) {
259
- return /* @__PURE__ */ jsx("div", {
260
- className: cx(alert_module_default.alert, alert_module_default[tone], className),
261
- role: "alert",
262
- children
263
- });
264
- }
265
- var toast_module_default = {
266
- stack: "uzi-toast-module__stack__SRrda",
267
- topRight: "uzi-toast-module__topRight__WiZzM",
268
- topLeft: "uzi-toast-module__topLeft__SzFS9",
269
- topCenter: "uzi-toast-module__topCenter__X5W-x",
270
- bottomRight: "uzi-toast-module__bottomRight__DMtoS",
271
- bottomLeft: "uzi-toast-module__bottomLeft__ZZ7VF",
272
- bottomCenter: "uzi-toast-module__bottomCenter__QNJrM",
273
- toast: "uzi-toast-module__toast__HNUcj",
274
- toastSlideIn: "uzi-toast-module__toastSlideIn__BTXfm",
275
- toastSlideOut: "uzi-toast-module__toastSlideOut__mBX-G",
276
- toastSwipeOut: "uzi-toast-module__toastSwipeOut__R-jk2",
277
- icon: "uzi-toast-module__icon__LIAqr",
278
- body: "uzi-toast-module__body__9vzs7",
279
- message: "uzi-toast-module__message__TBY65",
280
- actions: "uzi-toast-module__actions__Iykd9",
281
- actionButton: "uzi-toast-module__actionButton__cvUr0",
282
- controls: "uzi-toast-module__controls__LqA4Q",
283
- iconButton: "uzi-toast-module__iconButton__FOsOp",
284
- iconButtonError: "uzi-toast-module__iconButtonError__NJsLX"
285
- };
286
- //#endregion
287
- //#region src/components/toast/ToastContext.tsx
288
- /** Default provider configuration. */
289
- var DEFAULT_CONFIG = {
290
- position: "top-right",
291
- maxToasts: 5,
292
- defaultDuration: 4e3,
293
- pauseOnHover: true,
294
- pauseOnFocusLoss: true
295
- };
296
- var ToastContext = createContext(void 0);
297
- var toastIdCounter = 0;
298
- var generateToastId = () => `toast-${++toastIdCounter}-${Date.now()}`;
299
- /**
300
- * Toast notification context provider.
301
- *
302
- * @remarks
303
- * Wrap your app (or a section) to enable `useToast` calls. Supports configurable placement,
304
- * maximum visible toasts, and pause behavior on hover or window blur.
305
- *
306
- * @param props.children - React subtree that can consume the toast context.
307
- * @param props.config - Optional provider configuration overrides.
308
- */
309
- function ToastProvider({ children, config }) {
310
- const [toasts, setToasts] = useState([]);
311
- const [isPaused, setIsPaused] = useState(false);
312
- const merged = useMemo(() => ({
313
- ...DEFAULT_CONFIG,
314
- ...config
315
- }), [config]);
316
- const push = useCallback((message, options = {}) => {
317
- const id = generateToastId();
318
- setToasts((prev) => {
319
- const next = [...prev, {
320
- id,
321
- message,
322
- type: options.type ?? "info",
323
- duration: options.duration ?? (options.type === "error" ? 6e3 : merged.defaultDuration),
324
- dismissible: options.dismissible ?? true,
325
- copyable: options.copyable ?? false,
326
- action: options.action
327
- }];
328
- if (next.length > merged.maxToasts) next.shift();
329
- return next;
330
- });
331
- return id;
332
- }, [merged.defaultDuration, merged.maxToasts]);
333
- const success = useCallback((message, options) => push(message, {
334
- ...options,
335
- type: "success"
336
- }), [push]);
337
- const error = useCallback((message, options) => push(message, {
338
- copyable: true,
339
- ...options,
340
- type: "error"
341
- }), [push]);
342
- const warning = useCallback((message, options) => push(message, {
343
- ...options,
344
- type: "warning"
345
- }), [push]);
346
- const info = useCallback((message, options) => push(message, {
347
- ...options,
348
- type: "info"
349
- }), [push]);
350
- const dismiss = useCallback((id) => {
351
- setToasts((prev) => prev.filter((t) => t.id !== id));
352
- }, []);
353
- const dismissAll = useCallback(() => setToasts([]), []);
354
- useEffect(() => {
355
- if (!merged.pauseOnFocusLoss) return;
356
- const handleVisibility = () => setIsPaused(document.visibilityState !== "visible");
357
- document.addEventListener("visibilitychange", handleVisibility);
358
- return () => document.removeEventListener("visibilitychange", handleVisibility);
359
- }, [merged.pauseOnFocusLoss]);
360
- const value = useMemo(() => ({
361
- toasts,
362
- push,
363
- success,
364
- error,
365
- warning,
366
- info,
367
- dismiss,
368
- dismissAll
369
- }), [
370
- toasts,
371
- push,
372
- success,
373
- error,
374
- warning,
375
- info,
376
- dismiss,
377
- dismissAll
378
- ]);
379
- return /* @__PURE__ */ jsx(ToastContext.Provider, {
380
- value,
381
- children: /* @__PURE__ */ jsxs(ToastPrimitive.Provider, {
382
- swipeDirection: "right",
383
- children: [children, /* @__PURE__ */ jsx(ToastContainer, {
384
- toasts,
385
- position: merged.position,
386
- pauseOnHover: merged.pauseOnHover,
387
- isPaused,
388
- onDismiss: dismiss,
389
- onPauseChange: setIsPaused
390
- })]
391
- })
392
- });
393
- }
394
- /**
395
- * Hook to access the toast API.
396
- *
397
- * @remarks
398
- * Exposes `push`, intent helpers (`success`, `error`, `warning`, `info`), and dismissal helpers.
399
- * Must be called within a `ToastProvider`.
400
- *
401
- * @throws Error if used outside of a `ToastProvider`.
402
- */
403
- function useToast() {
404
- const ctx = useContext(ToastContext);
405
- if (!ctx) throw new Error("useToast must be used within a ToastProvider");
406
- return ctx;
407
- }
408
- /** Renders the positioned toast stack. */
409
- function ToastContainer({ toasts, position, pauseOnHover, isPaused, onDismiss, onPauseChange }) {
410
- const posClass = (() => {
411
- switch (position) {
412
- case "top-left": return "topLeft";
413
- case "top-center": return "topCenter";
414
- case "bottom-right": return "bottomRight";
415
- case "bottom-left": return "bottomLeft";
416
- case "bottom-center": return "bottomCenter";
417
- default: return "topRight";
418
- }
419
- })();
420
- return /* @__PURE__ */ jsxs(Fragment, { children: [toasts.map((toast) => /* @__PURE__ */ jsx(ToastItem, {
421
- toast,
422
- isPaused,
423
- onDismiss
424
- }, toast.id)), /* @__PURE__ */ jsx(ToastPrimitive.Viewport, {
425
- className: cx(toast_module_default.stack, toast_module_default[posClass]),
426
- label: "Notifications",
427
- onMouseEnter: () => pauseOnHover && onPauseChange(true),
428
- onMouseLeave: () => pauseOnHover && onPauseChange(false)
429
- })] });
430
- }
431
- /** Individual toast item with timers and actions. */
432
- function ToastItem({ toast, isPaused, onDismiss }) {
433
- const [open, setOpen] = useState(true);
434
- const [copyState, setCopyState] = useState("idle");
435
- const copyTimerRef = useRef(null);
436
- const timerRef = useRef(null);
437
- const startRef = useRef(0);
438
- const remainingRef = useRef(toast.duration ?? 0);
439
- const closingRef = useRef(false);
440
- const palette = getPalette(toast.type);
441
- const styleVars = {
442
- ["--toast-bg"]: palette.background,
443
- ["--toast-border"]: palette.border,
444
- ["--toast-accent"]: palette.accent,
445
- ["--toast-text"]: palette.text,
446
- ["--toast-action-bg"]: palette.actionBg,
447
- ["--toast-action-border"]: palette.actionBorder
448
- };
449
- const stopTimer = () => {
450
- if (timerRef.current) {
451
- window.clearTimeout(timerRef.current);
452
- timerRef.current = null;
453
- }
454
- };
455
- const triggerDismiss = useCallback(() => {
456
- if (closingRef.current) return;
457
- closingRef.current = true;
458
- setOpen(false);
459
- stopTimer();
460
- window.setTimeout(() => onDismiss(toast.id), 160);
461
- }, [onDismiss, toast.id]);
462
- const schedule = useCallback((delay) => {
463
- if (!delay || delay <= 0) {
464
- triggerDismiss();
465
- return;
466
- }
467
- startRef.current = performance.now();
468
- stopTimer();
469
- timerRef.current = window.setTimeout(() => triggerDismiss(), delay);
470
- }, [triggerDismiss]);
471
- useEffect(() => {
472
- if (!toast.duration || toast.duration <= 0) return void 0;
473
- schedule(toast.duration);
474
- return stopTimer;
475
- }, [schedule, toast.duration]);
476
- useEffect(() => {
477
- if (!toast.duration || toast.duration <= 0) return;
478
- if (isPaused) {
479
- const elapsed = performance.now() - startRef.current;
480
- remainingRef.current = Math.max(0, remainingRef.current - elapsed);
481
- stopTimer();
482
- } else schedule(remainingRef.current);
483
- }, [
484
- isPaused,
485
- schedule,
486
- toast.duration
487
- ]);
488
- useEffect(() => {
489
- return () => {
490
- if (copyTimerRef.current) window.clearTimeout(copyTimerRef.current);
491
- };
492
- }, []);
493
- const handleCopy = useCallback(async () => {
494
- if (copyTimerRef.current) window.clearTimeout(copyTimerRef.current);
495
- try {
496
- if (!navigator.clipboard) throw new Error("Clipboard API unavailable");
497
- await navigator.clipboard.writeText(toast.message);
498
- setCopyState("copied");
499
- } catch {
500
- setCopyState("failed");
501
- }
502
- copyTimerRef.current = window.setTimeout(() => setCopyState("idle"), 1800);
503
- }, [toast.message]);
504
- const icon = getIcon(toast.type);
505
- return /* @__PURE__ */ jsxs(ToastPrimitive.Root, {
506
- open,
507
- onOpenChange: (nextOpen) => {
508
- if (!nextOpen) triggerDismiss();
509
- },
510
- duration: 2147483647,
511
- className: toast_module_default.toast,
512
- style: styleVars,
513
- children: [
514
- /* @__PURE__ */ jsx("span", {
515
- className: toast_module_default.icon,
516
- "aria-hidden": true,
517
- children: icon
518
- }),
519
- /* @__PURE__ */ jsxs("div", {
520
- className: toast_module_default.body,
521
- children: [/* @__PURE__ */ jsx(ToastPrimitive.Description, {
522
- className: toast_module_default.message,
523
- children: toast.message
524
- }), toast.action && /* @__PURE__ */ jsx("div", {
525
- className: toast_module_default.actions,
526
- children: /* @__PURE__ */ jsx(ToastPrimitive.Action, {
527
- asChild: true,
528
- altText: toast.action.label,
529
- children: /* @__PURE__ */ jsx("button", {
530
- type: "button",
531
- className: toast_module_default.actionButton,
532
- onClick: () => {
533
- toast.action?.onClick();
534
- triggerDismiss();
535
- },
536
- children: toast.action.label
537
- })
538
- })
539
- })]
540
- }),
541
- /* @__PURE__ */ jsxs("div", {
542
- className: toast_module_default.controls,
543
- children: [toast.copyable && /* @__PURE__ */ jsx("button", {
544
- type: "button",
545
- className: cx(toast_module_default.iconButton, copyState === "failed" && toast_module_default.iconButtonError),
546
- "aria-label": "Copy message",
547
- onClick: handleCopy,
548
- children: copyState === "copied" ? /* @__PURE__ */ jsx("svg", {
549
- width: "13",
550
- height: "13",
551
- viewBox: "0 0 13 13",
552
- fill: "none",
553
- "aria-hidden": true,
554
- children: /* @__PURE__ */ jsx("path", {
555
- d: "M2 6.5l3 3 6-6",
556
- stroke: "currentColor",
557
- strokeWidth: "1.5",
558
- strokeLinecap: "round",
559
- strokeLinejoin: "round"
560
- })
561
- }) : copyState === "failed" ? /* @__PURE__ */ jsx("svg", {
562
- width: "13",
563
- height: "13",
564
- viewBox: "0 0 13 13",
565
- fill: "none",
566
- "aria-hidden": true,
567
- children: /* @__PURE__ */ jsx("path", {
568
- d: "M10 3L3 10M3 3l7 7",
569
- stroke: "currentColor",
570
- strokeWidth: "1.5",
571
- strokeLinecap: "round"
572
- })
573
- }) : /* @__PURE__ */ jsxs("svg", {
574
- width: "13",
575
- height: "13",
576
- viewBox: "0 0 13 13",
577
- fill: "none",
578
- "aria-hidden": true,
579
- children: [/* @__PURE__ */ jsx("rect", {
580
- x: "4.5",
581
- y: "1.5",
582
- width: "7",
583
- height: "7",
584
- rx: "1.5",
585
- stroke: "currentColor",
586
- strokeWidth: "1.25"
587
- }), /* @__PURE__ */ jsx("path", {
588
- d: "M1.5 5.5v5a1.5 1.5 0 001.5 1.5h5",
589
- stroke: "currentColor",
590
- strokeWidth: "1.25",
591
- strokeLinecap: "round"
592
- })]
593
- })
594
- }), toast.dismissible !== false && /* @__PURE__ */ jsx(ToastPrimitive.Close, {
595
- asChild: true,
596
- children: /* @__PURE__ */ jsx("button", {
597
- type: "button",
598
- className: toast_module_default.iconButton,
599
- "aria-label": "Dismiss notification",
600
- children: /* @__PURE__ */ jsx("svg", {
601
- width: "13",
602
- height: "13",
603
- viewBox: "0 0 13 13",
604
- fill: "none",
605
- "aria-hidden": true,
606
- children: /* @__PURE__ */ jsx("path", {
607
- d: "M10 3L3 10M3 3l7 7",
608
- stroke: "currentColor",
609
- strokeWidth: "1.5",
610
- strokeLinecap: "round"
611
- })
612
- })
613
- })
614
- })]
615
- })
616
- ]
617
- });
618
- }
619
- function getPalette(type) {
620
- switch (type) {
621
- case "success": return {
622
- background: "color-mix(in srgb, var(--success) 12%, var(--popover))",
623
- border: "color-mix(in srgb, var(--success) 30%, transparent)",
624
- accent: "var(--success)",
625
- text: "var(--popover-foreground)",
626
- actionBg: "color-mix(in srgb, var(--success) 14%, transparent)",
627
- actionBorder: "color-mix(in srgb, var(--success) 35%, transparent)"
628
- };
629
- case "error": return {
630
- background: "color-mix(in srgb, var(--destructive) 12%, var(--popover))",
631
- border: "color-mix(in srgb, var(--destructive) 30%, transparent)",
632
- accent: "var(--destructive)",
633
- text: "var(--popover-foreground)",
634
- actionBg: "color-mix(in srgb, var(--destructive) 14%, transparent)",
635
- actionBorder: "color-mix(in srgb, var(--destructive) 35%, transparent)"
636
- };
637
- case "warning": return {
638
- background: "color-mix(in srgb, var(--warning) 12%, var(--popover))",
639
- border: "color-mix(in srgb, var(--warning) 30%, transparent)",
640
- accent: "var(--warning)",
641
- text: "var(--popover-foreground)",
642
- actionBg: "color-mix(in srgb, var(--warning) 14%, transparent)",
643
- actionBorder: "color-mix(in srgb, var(--warning) 35%, transparent)"
644
- };
645
- default: return {
646
- background: "color-mix(in srgb, var(--primary) 12%, var(--popover))",
647
- border: "color-mix(in srgb, var(--primary) 30%, transparent)",
648
- accent: "var(--primary)",
649
- text: "var(--popover-foreground)",
650
- actionBg: "color-mix(in srgb, var(--primary) 14%, transparent)",
651
- actionBorder: "color-mix(in srgb, var(--primary) 35%, transparent)"
652
- };
653
- }
654
- }
655
- function getIcon(type) {
656
- switch (type) {
657
- case "success": return /* @__PURE__ */ jsx("svg", {
658
- width: "16",
659
- height: "16",
660
- viewBox: "0 0 16 16",
661
- fill: "none",
662
- "aria-hidden": true,
663
- children: /* @__PURE__ */ jsx("path", {
664
- d: "M3 8l3.5 3.5L13 4.5",
665
- stroke: "currentColor",
666
- strokeWidth: "1.75",
667
- strokeLinecap: "round",
668
- strokeLinejoin: "round"
669
- })
670
- });
671
- case "error": return /* @__PURE__ */ jsx("svg", {
672
- width: "16",
673
- height: "16",
674
- viewBox: "0 0 16 16",
675
- fill: "none",
676
- "aria-hidden": true,
677
- children: /* @__PURE__ */ jsx("path", {
678
- d: "M4 4l8 8M12 4l-8 8",
679
- stroke: "currentColor",
680
- strokeWidth: "1.75",
681
- strokeLinecap: "round"
682
- })
683
- });
684
- case "warning": return /* @__PURE__ */ jsx("svg", {
685
- width: "16",
686
- height: "16",
687
- viewBox: "0 0 16 16",
688
- fill: "none",
689
- "aria-hidden": true,
690
- children: /* @__PURE__ */ jsx("path", {
691
- d: "M8 3v6M8 11.5v1",
692
- stroke: "currentColor",
693
- strokeWidth: "1.75",
694
- strokeLinecap: "round"
695
- })
696
- });
697
- default: return /* @__PURE__ */ jsx("svg", {
698
- width: "16",
699
- height: "16",
700
- viewBox: "0 0 16 16",
701
- fill: "none",
702
- "aria-hidden": true,
703
- children: /* @__PURE__ */ jsx("path", {
704
- d: "M8 7v5M8 4.5v.5",
705
- stroke: "currentColor",
706
- strokeWidth: "1.75",
707
- strokeLinecap: "round"
708
- })
709
- });
710
- }
711
- }
712
- var input_module_default = { input: "uzi-input-module__input__-ipHD" };
713
- //#endregion
714
- //#region src/components/input/Input.tsx
715
- var Input = React.forwardRef(({ className, type, ...props }, ref) => {
716
- return /* @__PURE__ */ jsx("input", {
717
- ref,
718
- type,
719
- className: cx(input_module_default.input, className),
720
- ...props
721
- });
722
- });
723
- Input.displayName = "Input";
724
- var label_module_default = { label: "uzi-label-module__label__gKflt" };
725
- //#endregion
726
- //#region src/components/label/Label.tsx
727
- var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("label", {
728
- ref,
729
- className: cx(label_module_default.label, className),
730
- ...props
731
- }));
732
- Label.displayName = "Label";
733
- var checkbox_module_default = { checkbox: "uzi-checkbox-module__checkbox__zAB1y" };
734
- //#endregion
735
- //#region src/components/checkbox/Checkbox.tsx
736
- var Checkbox = React.forwardRef(({ className, ...props }, ref) => {
737
- return /* @__PURE__ */ jsx("input", {
738
- ref,
739
- type: "checkbox",
740
- className: cx(checkbox_module_default.checkbox, className),
741
- ...props
742
- });
743
- });
744
- Checkbox.displayName = "Checkbox";
745
- var multi_select_module_default = {
746
- wrapper: "uzi-multi-select-module__wrapper__Izj2x",
747
- wrapperFullWidth: "uzi-multi-select-module__wrapperFullWidth__eH8pf",
748
- trigger: "uzi-multi-select-module__trigger__r3816",
749
- value: "uzi-multi-select-module__value__PuUmG",
750
- placeholder: "uzi-multi-select-module__placeholder__dJIU-",
751
- chip: "uzi-multi-select-module__chip__46Ms-",
752
- chipSummary: "uzi-multi-select-module__chipSummary__zLwi8",
753
- chevron: "uzi-multi-select-module__chevron__SWK5l",
754
- menu: "uzi-multi-select-module__menu__q8auA",
755
- menuFadeIn: "uzi-multi-select-module__menuFadeIn__Plo7-",
756
- option: "uzi-multi-select-module__option__-Ioqk",
757
- optionDisabled: "uzi-multi-select-module__optionDisabled__qtCi8",
758
- optionSelected: "uzi-multi-select-module__optionSelected__74IO8",
759
- optionLabel: "uzi-multi-select-module__optionLabel__cVoN7",
760
- indicator: "uzi-multi-select-module__indicator__NO-WE",
761
- indicatorSelected: "uzi-multi-select-module__indicatorSelected__9sEAy",
762
- indicatorDisabled: "uzi-multi-select-module__indicatorDisabled__vqdiH"
763
- };
764
- //#endregion
765
- //#region src/components/multi-select/MultiSelect.tsx
766
- var MultiSelect = React.forwardRef(({ options, value, onChange, placeholder = "Select options", fullWidth = true, maxVisibleValues = 2, className, disabled = false, name, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy }, ref) => {
767
- const selectedSet = React.useMemo(() => new Set(value), [value]);
768
- const selectedOptions = React.useMemo(() => options.filter((opt) => selectedSet.has(opt.value)), [options, selectedSet]);
769
- const toggleValue = React.useCallback((nextValue) => {
770
- if (selectedSet.has(nextValue)) {
771
- onChange(value.filter((entry) => entry !== nextValue));
772
- return;
773
- }
774
- onChange([...value, nextValue]);
775
- }, [
776
- onChange,
777
- selectedSet,
778
- value
779
- ]);
780
- const visibleCount = Math.max(1, maxVisibleValues);
781
- const visibleOptions = selectedOptions.slice(0, visibleCount);
782
- const overflowCount = Math.max(0, selectedOptions.length - visibleOptions.length);
783
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, {
784
- modal: false,
785
- children: /* @__PURE__ */ jsxs("div", {
786
- className: cx(multi_select_module_default.wrapper, fullWidth && multi_select_module_default.wrapperFullWidth, className),
787
- children: [
788
- /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, {
789
- asChild: true,
790
- children: /* @__PURE__ */ jsxs("button", {
791
- ref,
792
- type: "button",
793
- className: multi_select_module_default.trigger,
794
- "aria-label": ariaLabel,
795
- "aria-labelledby": ariaLabelledBy,
796
- disabled,
797
- children: [/* @__PURE__ */ jsx("span", {
798
- className: multi_select_module_default.value,
799
- children: selectedOptions.length === 0 ? /* @__PURE__ */ jsx("span", {
800
- className: multi_select_module_default.placeholder,
801
- children: placeholder
802
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [visibleOptions.map((option) => /* @__PURE__ */ jsx("span", {
803
- className: multi_select_module_default.chip,
804
- children: option.label
805
- }, option.value)), overflowCount > 0 ? /* @__PURE__ */ jsxs("span", {
806
- className: cx(multi_select_module_default.chip, multi_select_module_default.chipSummary),
807
- children: ["+", overflowCount]
808
- }) : null] })
809
- }), /* @__PURE__ */ jsx("span", {
810
- className: multi_select_module_default.chevron,
811
- "aria-hidden": "true",
812
- children: /* @__PURE__ */ jsx("svg", {
813
- viewBox: "0 0 10 10",
814
- fill: "none",
815
- xmlns: "http://www.w3.org/2000/svg",
816
- width: "10",
817
- height: "10",
818
- children: /* @__PURE__ */ jsx("path", {
819
- d: "M2 3.5L5 6.5L8 3.5",
820
- stroke: "currentColor",
821
- strokeWidth: "1.5",
822
- strokeLinecap: "round",
823
- strokeLinejoin: "round"
824
- })
825
- })
826
- })]
827
- })
828
- }),
829
- name ? value.map((entry) => /* @__PURE__ */ jsx("input", {
830
- type: "hidden",
831
- name,
832
- value: entry
833
- }, entry)) : null,
834
- /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
835
- className: multi_select_module_default.menu,
836
- sideOffset: 4,
837
- align: "start",
838
- children: options.map((option) => {
839
- const selected = selectedSet.has(option.value);
840
- return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
841
- className: cx(multi_select_module_default.option, selected && multi_select_module_default.optionSelected, option.disabled && multi_select_module_default.optionDisabled),
842
- checked: selected,
843
- disabled: option.disabled,
844
- onCheckedChange: () => toggleValue(option.value),
845
- onSelect: (event) => event.preventDefault(),
846
- children: [/* @__PURE__ */ jsx("span", {
847
- className: cx(multi_select_module_default.indicator, selected && multi_select_module_default.indicatorSelected, option.disabled && multi_select_module_default.indicatorDisabled),
848
- "aria-hidden": "true",
849
- children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, {
850
- forceMount: true,
851
- children: /* @__PURE__ */ jsx("svg", {
852
- viewBox: "0 0 16 16",
853
- width: "16",
854
- height: "16",
855
- fill: "none",
856
- xmlns: "http://www.w3.org/2000/svg",
857
- children: /* @__PURE__ */ jsx("path", {
858
- d: "M3.5 8.5 6.5 11.5 12.5 4.5",
859
- stroke: "currentColor",
860
- strokeWidth: "1.8",
861
- strokeLinecap: "round",
862
- strokeLinejoin: "round"
863
- })
864
- })
865
- })
866
- }), /* @__PURE__ */ jsx("span", {
867
- className: multi_select_module_default.optionLabel,
868
- children: option.label
869
- })]
870
- }, option.value);
871
- })
872
- }) })
873
- ]
874
- })
875
- });
876
- });
877
- MultiSelect.displayName = "MultiSelect";
878
- var select_module_default = {
879
- wrapper: "uzi-select-module__wrapper__7szq0",
880
- wrapperFullWidth: "uzi-select-module__wrapperFullWidth__IyOIG",
881
- trigger: "uzi-select-module__trigger__ldh8w",
882
- value: "uzi-select-module__value__FTUJh",
883
- chevron: "uzi-select-module__chevron__U6HXS",
884
- content: "uzi-select-module__content__pOWWy",
885
- selectFadeIn: "uzi-select-module__selectFadeIn__Z-yKX",
886
- viewport: "uzi-select-module__viewport__VGZM6",
887
- item: "uzi-select-module__item__6uM6-",
888
- indicator: "uzi-select-module__indicator__ZHcg5",
889
- indicatorIcon: "uzi-select-module__indicatorIcon__kOV2G"
890
- };
891
- //#endregion
892
- //#region src/components/select/Select.tsx
893
- var EMPTY_OPTION_VALUE = "__uzi_select_empty__";
894
- var Select = React.forwardRef(({ options, value, onChange, placeholder, allowEmptyOption = false, fullWidth = true, className, id, name, disabled, required, autoComplete, form, title, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onBlur, onFocus }, ref) => {
895
- return /* @__PURE__ */ jsx("div", {
896
- className: cx(select_module_default.wrapper, fullWidth && select_module_default.wrapperFullWidth, className),
897
- children: /* @__PURE__ */ jsxs(SelectPrimitive.Root, {
898
- value,
899
- onValueChange: (nextValue) => onChange(nextValue === EMPTY_OPTION_VALUE ? "" : nextValue),
900
- name,
901
- disabled,
902
- required,
903
- autoComplete,
904
- form,
905
- children: [/* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
906
- ref,
907
- id,
908
- className: select_module_default.trigger,
909
- title,
910
- "aria-label": ariaLabel,
911
- "aria-labelledby": ariaLabelledBy,
912
- onBlur,
913
- onFocus,
914
- children: [/* @__PURE__ */ jsx(SelectPrimitive.Value, {
915
- className: select_module_default.value,
916
- placeholder
917
- }), /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
918
- className: select_module_default.chevron,
919
- "aria-hidden": "true",
920
- children: /* @__PURE__ */ jsx("svg", {
921
- viewBox: "0 0 10 10",
922
- fill: "none",
923
- xmlns: "http://www.w3.org/2000/svg",
924
- width: "10",
925
- height: "10",
926
- children: /* @__PURE__ */ jsx("path", {
927
- d: "M2 3.5L5 6.5L8 3.5",
928
- stroke: "currentColor",
929
- strokeWidth: "1.5",
930
- strokeLinecap: "round",
931
- strokeLinejoin: "round"
932
- })
933
- })
934
- })]
935
- }), /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(SelectPrimitive.Content, {
936
- className: select_module_default.content,
937
- position: "popper",
938
- sideOffset: 4,
939
- align: "start",
940
- children: /* @__PURE__ */ jsxs(SelectPrimitive.Viewport, {
941
- className: select_module_default.viewport,
942
- children: [placeholder && allowEmptyOption ? /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
943
- value: EMPTY_OPTION_VALUE,
944
- className: select_module_default.item,
945
- children: [/* @__PURE__ */ jsx("span", {
946
- className: select_module_default.indicator,
947
- children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("svg", {
948
- viewBox: "0 0 16 16",
949
- width: "16",
950
- height: "16",
951
- "aria-hidden": "true",
952
- className: select_module_default.indicatorIcon,
953
- children: /* @__PURE__ */ jsx("path", {
954
- d: "M3.5 8.5 6.5 11.5 12.5 4.5",
955
- fill: "none",
956
- stroke: "currentColor",
957
- strokeWidth: "1.8",
958
- strokeLinecap: "round",
959
- strokeLinejoin: "round"
960
- })
961
- }) })
962
- }), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children: placeholder })]
963
- }) : null, options.map((opt) => /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
964
- value: opt.value,
965
- disabled: opt.disabled,
966
- className: select_module_default.item,
967
- children: [/* @__PURE__ */ jsx("span", {
968
- className: select_module_default.indicator,
969
- children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("svg", {
970
- viewBox: "0 0 16 16",
971
- width: "16",
972
- height: "16",
973
- "aria-hidden": "true",
974
- className: select_module_default.indicatorIcon,
975
- children: /* @__PURE__ */ jsx("path", {
976
- d: "M3.5 8.5 6.5 11.5 12.5 4.5",
977
- fill: "none",
978
- stroke: "currentColor",
979
- strokeWidth: "1.8",
980
- strokeLinecap: "round",
981
- strokeLinejoin: "round"
982
- })
983
- }) })
984
- }), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children: opt.label })]
985
- }, opt.value))]
986
- })
987
- }) })]
988
- })
989
- });
990
- });
991
- Select.displayName = "Select";
992
- //#endregion
993
- //#region src/components/dropdown/Dropdown.tsx
994
- /**
995
- * @deprecated Use Select for value selection and DropdownMenu for action menus.
996
- * Dropdown remains as a compatibility alias during migration.
997
- */
998
- var Dropdown = React.forwardRef(({ options, value, onChange, placeholder = "All", allowClear = true, ...rest }, ref) => {
999
- return /* @__PURE__ */ jsx(Select, {
1000
- ref,
1001
- options,
1002
- value,
1003
- onChange,
1004
- placeholder,
1005
- allowEmptyOption: allowClear,
1006
- fullWidth: false,
1007
- ...rest
1008
- });
1009
- });
1010
- Dropdown.displayName = "Dropdown";
1011
- var dropdown_menu_module_default = {
1012
- content: "uzi-dropdown-menu-module__content__n-ElH",
1013
- menuFadeIn: "uzi-dropdown-menu-module__menuFadeIn__ITxMo",
1014
- item: "uzi-dropdown-menu-module__item__tBNtW",
1015
- itemDestructive: "uzi-dropdown-menu-module__itemDestructive__oWmKd",
1016
- insetItem: "uzi-dropdown-menu-module__insetItem__g7ONJ",
1017
- indicator: "uzi-dropdown-menu-module__indicator__5qwFh",
1018
- indicatorIcon: "uzi-dropdown-menu-module__indicatorIcon__nhJMw",
1019
- radioDot: "uzi-dropdown-menu-module__radioDot__GWUVT",
1020
- label: "uzi-dropdown-menu-module__label__sFnNR",
1021
- separator: "uzi-dropdown-menu-module__separator__PgUob",
1022
- chevron: "uzi-dropdown-menu-module__chevron__kxfiF"
1023
- };
1024
- //#endregion
1025
- //#region src/components/dropdown-menu/DropdownMenu.tsx
1026
- function DropdownMenu(props) {
1027
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { ...props });
1028
- }
1029
- function DropdownMenuTrigger(props) {
1030
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { ...props });
1031
- }
1032
- function DropdownMenuGroup(props) {
1033
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { ...props });
1034
- }
1035
- function DropdownMenuPortal(props) {
1036
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { ...props });
1037
- }
1038
- function DropdownMenuSub(props) {
1039
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { ...props });
1040
- }
1041
- function DropdownMenuRadioGroup(props) {
1042
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.RadioGroup, { ...props });
1043
- }
1044
- function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
1045
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
1046
- sideOffset,
1047
- className: cx(dropdown_menu_module_default.content, className),
1048
- ...props
1049
- }) });
1050
- }
1051
- function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
1052
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
1053
- "data-inset": inset ? "true" : void 0,
1054
- className: cx(dropdown_menu_module_default.item, variant === "destructive" && dropdown_menu_module_default.itemDestructive, className),
1055
- ...props
1056
- });
1057
- }
1058
- function DropdownMenuCheckboxItem({ className, children, ...props }) {
1059
- return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
1060
- className: cx(dropdown_menu_module_default.item, dropdown_menu_module_default.insetItem, className),
1061
- ...props,
1062
- children: [/* @__PURE__ */ jsx("span", {
1063
- className: dropdown_menu_module_default.indicator,
1064
- children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("svg", {
1065
- viewBox: "0 0 16 16",
1066
- width: "16",
1067
- height: "16",
1068
- "aria-hidden": "true",
1069
- className: dropdown_menu_module_default.indicatorIcon,
1070
- children: /* @__PURE__ */ jsx("path", {
1071
- d: "M3.5 8.5 6.5 11.5 12.5 4.5",
1072
- fill: "none",
1073
- stroke: "currentColor",
1074
- strokeWidth: "1.8",
1075
- strokeLinecap: "round",
1076
- strokeLinejoin: "round"
1077
- })
1078
- }) })
1079
- }), children]
1080
- });
1081
- }
1082
- function DropdownMenuRadioItem({ className, children, ...props }) {
1083
- return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
1084
- className: cx(dropdown_menu_module_default.item, dropdown_menu_module_default.insetItem, className),
1085
- ...props,
1086
- children: [/* @__PURE__ */ jsx("span", {
1087
- className: dropdown_menu_module_default.indicator,
1088
- children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("span", { className: dropdown_menu_module_default.radioDot }) })
1089
- }), children]
1090
- });
1091
- }
1092
- function DropdownMenuLabel({ className, inset, ...props }) {
1093
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
1094
- "data-inset": inset ? "true" : void 0,
1095
- className: cx(dropdown_menu_module_default.label, className),
1096
- ...props
1097
- });
1098
- }
1099
- function DropdownMenuSeparator({ className, ...props }) {
1100
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
1101
- className: cx(dropdown_menu_module_default.separator, className),
1102
- ...props
1103
- });
1104
- }
1105
- function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
1106
- return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
1107
- "data-inset": inset ? "true" : void 0,
1108
- className: cx(dropdown_menu_module_default.item, className),
1109
- ...props,
1110
- children: [children, /* @__PURE__ */ jsx("svg", {
1111
- viewBox: "0 0 16 16",
1112
- width: "16",
1113
- height: "16",
1114
- "aria-hidden": "true",
1115
- className: dropdown_menu_module_default.chevron,
1116
- children: /* @__PURE__ */ jsx("path", {
1117
- d: "M6 3.5 10.5 8 6 12.5",
1118
- fill: "none",
1119
- stroke: "currentColor",
1120
- strokeWidth: "1.6",
1121
- strokeLinecap: "round",
1122
- strokeLinejoin: "round"
1123
- })
1124
- })]
1125
- });
1126
- }
1127
- function DropdownMenuSubContent({ className, ...props }) {
1128
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
1129
- className: cx(dropdown_menu_module_default.content, className),
1130
- ...props
1131
- });
1132
- }
1133
- //#endregion
1134
- //#region src/theme/constants.ts
1135
- var UZI_THEMES = [
1136
- "light",
1137
- "dark",
1138
- "system"
1139
- ];
1140
- var UZI_ACCENTS = [
1141
- "blue",
1142
- "cyan",
1143
- "violet",
1144
- "emerald",
1145
- "amber",
1146
- "rose"
1147
- ];
1148
- var THEME_STORAGE_KEY$1 = "uzi-theme";
1149
- var ACCENT_STORAGE_KEY$1 = "uzi-accent";
1150
- //#endregion
1151
- //#region src/theme/ThemeProvider.tsx
1152
- var THEME_STORAGE_KEY = THEME_STORAGE_KEY$1;
1153
- var ACCENT_STORAGE_KEY = ACCENT_STORAGE_KEY$1;
1154
- var THEME_ATTRIBUTE = "data-uzi-theme";
1155
- var ACCENT_ATTRIBUTE = "data-uzi-accent";
1156
- var ThemeContext = createContext(void 0);
1157
- function isTheme(value) {
1158
- return UZI_THEMES.includes(value);
1159
- }
1160
- function isAccent(value) {
1161
- return UZI_ACCENTS.includes(value);
1162
- }
1163
- function getSystemTheme() {
1164
- if (typeof window === "undefined") return "light";
1165
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
1166
- }
1167
- function ThemeProvider({ children, theme, defaultTheme = "system", accent, defaultAccent = "blue", onThemeChange, onAccentChange, storageKey = THEME_STORAGE_KEY, accentStorageKey = ACCENT_STORAGE_KEY, disableStorage = false, toastConfig }) {
1168
- const [internalTheme, setInternalTheme] = useState(defaultTheme);
1169
- const [internalAccent, setInternalAccent] = useState(defaultAccent);
1170
- const [systemTheme, setSystemTheme] = useState("light");
1171
- useEffect(() => {
1172
- setSystemTheme(getSystemTheme());
1173
- if (!disableStorage) {
1174
- const storedTheme = window.localStorage.getItem(storageKey);
1175
- if (isTheme(storedTheme)) setInternalTheme(storedTheme);
1176
- const storedAccent = window.localStorage.getItem(accentStorageKey);
1177
- if (isAccent(storedAccent)) setInternalAccent(storedAccent);
1178
- }
1179
- }, [
1180
- disableStorage,
1181
- storageKey,
1182
- accentStorageKey
1183
- ]);
1184
- const isThemeControlled = theme !== void 0;
1185
- const isAccentControlled = accent !== void 0;
1186
- const currentTheme = isThemeControlled ? theme : internalTheme;
1187
- const currentAccent = isAccentControlled ? accent : internalAccent;
1188
- const resolvedTheme = currentTheme === "system" ? systemTheme : currentTheme;
1189
- useEffect(() => {
1190
- if (typeof window === "undefined") return;
1191
- const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
1192
- const handleChange = () => setSystemTheme(mediaQuery.matches ? "dark" : "light");
1193
- handleChange();
1194
- mediaQuery.addEventListener("change", handleChange);
1195
- return () => mediaQuery.removeEventListener("change", handleChange);
1196
- }, []);
1197
- useEffect(() => {
1198
- if (typeof document === "undefined") return;
1199
- const root = document.documentElement;
1200
- root.setAttribute(THEME_ATTRIBUTE, resolvedTheme);
1201
- root.setAttribute(ACCENT_ATTRIBUTE, currentAccent);
1202
- root.style.colorScheme = resolvedTheme;
1203
- root.classList.toggle("dark", resolvedTheme === "dark");
1204
- }, [currentAccent, resolvedTheme]);
1205
- const setTheme = useCallback((nextTheme) => {
1206
- if (!isThemeControlled) setInternalTheme(nextTheme);
1207
- if (!disableStorage && typeof window !== "undefined") window.localStorage.setItem(storageKey, nextTheme);
1208
- onThemeChange?.(nextTheme);
1209
- }, [
1210
- disableStorage,
1211
- isThemeControlled,
1212
- onThemeChange,
1213
- storageKey
1214
- ]);
1215
- const setAccent = useCallback((nextAccent) => {
1216
- if (!isAccentControlled) setInternalAccent(nextAccent);
1217
- if (!disableStorage && typeof window !== "undefined") window.localStorage.setItem(accentStorageKey, nextAccent);
1218
- onAccentChange?.(nextAccent);
1219
- }, [
1220
- accentStorageKey,
1221
- disableStorage,
1222
- isAccentControlled,
1223
- onAccentChange
1224
- ]);
1225
- const toggleTheme = useCallback(() => {
1226
- setTheme(resolvedTheme === "dark" ? "light" : "dark");
1227
- }, [resolvedTheme, setTheme]);
1228
- const value = useMemo(() => ({
1229
- theme: currentTheme,
1230
- resolvedTheme,
1231
- accent: currentAccent,
1232
- setTheme,
1233
- setAccent,
1234
- toggleTheme
1235
- }), [
1236
- currentAccent,
1237
- currentTheme,
1238
- resolvedTheme,
1239
- setAccent,
1240
- setTheme,
1241
- toggleTheme
1242
- ]);
1243
- return /* @__PURE__ */ jsx(ThemeContext.Provider, {
1244
- value,
1245
- children: /* @__PURE__ */ jsx(ToastProvider, {
1246
- config: toastConfig,
1247
- children
1248
- })
1249
- });
1250
- }
1251
- function useTheme() {
1252
- const context = useContext(ThemeContext);
1253
- if (!context) throw new Error("useTheme must be used within a ThemeProvider");
1254
- return context;
1255
- }
1256
- var theme_toggle_button_module_default = { withLabel: "uzi-theme-toggle-button-module__withLabel__KqtDj" };
1257
- //#endregion
1258
- //#region src/components/theme-toggle-button/ThemeToggleButton.tsx
1259
- function MoonIcon() {
1260
- return /* @__PURE__ */ jsx("svg", {
1261
- viewBox: "0 0 24 24",
1262
- "aria-hidden": "true",
1263
- width: "16",
1264
- height: "16",
1265
- fill: "none",
1266
- children: /* @__PURE__ */ jsx("path", {
1267
- d: "M20 15.2A8.5 8.5 0 0 1 8.8 4 9 9 0 1 0 20 15.2Z",
1268
- stroke: "currentColor",
1269
- strokeWidth: "1.8",
1270
- strokeLinecap: "round",
1271
- strokeLinejoin: "round"
1272
- })
1273
- });
1274
- }
1275
- function SunIcon() {
1276
- return /* @__PURE__ */ jsxs("svg", {
1277
- viewBox: "0 0 24 24",
1278
- "aria-hidden": "true",
1279
- width: "16",
1280
- height: "16",
1281
- fill: "none",
1282
- children: [/* @__PURE__ */ jsx("circle", {
1283
- cx: "12",
1284
- cy: "12",
1285
- r: "4",
1286
- stroke: "currentColor",
1287
- strokeWidth: "1.8"
1288
- }), /* @__PURE__ */ jsx("path", {
1289
- d: "M12 2.75v2.5M12 18.75v2.5M21.25 12h-2.5M5.25 12h-2.5M18.54 5.46l-1.77 1.77M7.23 16.77l-1.77 1.77M18.54 18.54l-1.77-1.77M7.23 7.23 5.46 5.46",
1290
- stroke: "currentColor",
1291
- strokeWidth: "1.8",
1292
- strokeLinecap: "round"
1293
- })]
1294
- });
1295
- }
1296
- function ThemeToggleButton({ showLabel = false, lightLabel = "Light mode", darkLabel = "Dark mode", className, onClick, ...rest }) {
1297
- const { resolvedTheme, toggleTheme } = useTheme();
1298
- const nextThemeLabel = resolvedTheme === "dark" ? lightLabel : darkLabel;
1299
- return /* @__PURE__ */ jsxs(Button, {
1300
- type: "button",
1301
- variant: "ghost",
1302
- size: showLabel ? "sm" : "icon",
1303
- className: cx(showLabel && theme_toggle_button_module_default.withLabel, className),
1304
- "aria-label": `Switch to ${nextThemeLabel.toLowerCase()}`,
1305
- title: `Switch to ${nextThemeLabel.toLowerCase()}`,
1306
- onClick: (event) => {
1307
- onClick?.(event);
1308
- if (!event.defaultPrevented) toggleTheme();
1309
- },
1310
- ...rest,
1311
- children: [resolvedTheme === "dark" ? /* @__PURE__ */ jsx(SunIcon, {}) : /* @__PURE__ */ jsx(MoonIcon, {}), showLabel && /* @__PURE__ */ jsx("span", { children: nextThemeLabel })]
1312
- });
1313
- }
1314
- var top_bar_module_default = {
1315
- topBar: "uzi-top-bar-module__topBar__MJ-7S",
1316
- topBarStatic: "uzi-top-bar-module__topBarStatic__JvEwt",
1317
- topBarInner: "uzi-top-bar-module__topBarInner__PBbi8",
1318
- topBarStart: "uzi-top-bar-module__topBarStart__DrdN2",
1319
- topBarBrand: "uzi-top-bar-module__topBarBrand__80VV3",
1320
- topBarBrandContent: "uzi-top-bar-module__topBarBrandContent__O4Uto",
1321
- topBarCenter: "uzi-top-bar-module__topBarCenter__Kwxg-",
1322
- topBarCenterGroup: "uzi-top-bar-module__topBarCenterGroup__7Ishp",
1323
- topBarActions: "uzi-top-bar-module__topBarActions__mgMd8"
1324
- };
1325
- //#endregion
1326
- //#region src/components/top-bar/TopBar.tsx
1327
- function TopBar({ leading, brand, brandHref, brandingLocation = "left", start, center, actions, showThemeToggle = false, themeToggleProps, className, innerClassName, isSticky, sticky = true, children, ...rest }) {
1328
- const shouldStick = isSticky ?? sticky;
1329
- const brandNode = !brand ? null : brandHref ? /* @__PURE__ */ jsx("a", {
1330
- href: brandHref,
1331
- className: top_bar_module_default.topBarBrand,
1332
- children: /* @__PURE__ */ jsx("span", {
1333
- className: top_bar_module_default.topBarBrandContent,
1334
- children: brand
1335
- })
1336
- }) : /* @__PURE__ */ jsx("div", {
1337
- className: top_bar_module_default.topBarBrand,
1338
- children: /* @__PURE__ */ jsx("span", {
1339
- className: top_bar_module_default.topBarBrandContent,
1340
- children: brand
1341
- })
1342
- });
1343
- return /* @__PURE__ */ jsx("header", {
1344
- className: cx(top_bar_module_default.topBar, !shouldStick && top_bar_module_default.topBarStatic, className),
1345
- ...rest,
1346
- children: /* @__PURE__ */ jsxs("div", {
1347
- className: cx(top_bar_module_default.topBarInner, innerClassName),
1348
- children: [
1349
- /* @__PURE__ */ jsxs("div", {
1350
- className: top_bar_module_default.topBarStart,
1351
- children: [
1352
- leading,
1353
- brandingLocation === "left" && brandNode,
1354
- start
1355
- ]
1356
- }),
1357
- brandNode && brandingLocation === "center" || center || children ? /* @__PURE__ */ jsx("div", {
1358
- className: top_bar_module_default.topBarCenter,
1359
- children: /* @__PURE__ */ jsxs("div", {
1360
- className: top_bar_module_default.topBarCenterGroup,
1361
- children: [brandingLocation === "center" && brandNode, center ?? children]
1362
- })
1363
- }) : null,
1364
- /* @__PURE__ */ jsxs("div", {
1365
- className: top_bar_module_default.topBarActions,
1366
- children: [showThemeToggle && /* @__PURE__ */ jsx(ThemeToggleButton, { ...themeToggleProps }), actions]
1367
- })
1368
- ]
1369
- })
1370
- });
1371
- }
1372
- var app_shell_module_default = {
1373
- appShell: "uzi-app-shell-module__appShell__S0cVI",
1374
- appShellAnimated: "uzi-app-shell-module__appShellAnimated__-CRIl",
1375
- appShellOpen: "uzi-app-shell-module__appShellOpen__1rZUl",
1376
- appShellCollapsed: "uzi-app-shell-module__appShellCollapsed__fSasN",
1377
- appShellTopbar: "uzi-app-shell-module__appShellTopbar__rgXsW",
1378
- appShellTopbarLeft: "uzi-app-shell-module__appShellTopbarLeft__-EVuB",
1379
- appShellTopbarStart: "uzi-app-shell-module__appShellTopbarStart__XXQpq",
1380
- appShellTopbarRight: "uzi-app-shell-module__appShellTopbarRight__l1G57",
1381
- appShellBrand: "uzi-app-shell-module__appShellBrand__TXwyN",
1382
- appShellHamburger: "uzi-app-shell-module__appShellHamburger__BciFA",
1383
- appShellSidebar: "uzi-app-shell-module__appShellSidebar__oY7uj",
1384
- appShellMain: "uzi-app-shell-module__appShellMain__eHP2r",
1385
- appShellBackdrop: "uzi-app-shell-module__appShellBackdrop__y31xs",
1386
- appShellSidebarOpen: "uzi-app-shell-module__appShellSidebarOpen__Z5AIo"
1387
- };
1388
- //#endregion
1389
- //#region src/components/app-shell/AppShell.tsx
1390
- var DESKTOP_BREAKPOINT = 960;
1391
- function getIsDesktop() {
1392
- if (typeof window === "undefined") return false;
1393
- return window.innerWidth >= DESKTOP_BREAKPOINT;
1394
- }
1395
- /**
1396
- * Responsive application shell with a collapsible sidebar and sticky top bar.
1397
- *
1398
- * - Sidebar opens by default on desktop, collapses on mobile.
1399
- * - Closes on outside click/scroll/touch when in mobile mode.
1400
- * - Provides optional hook to close the sidebar when a prop value changes
1401
- * (e.g., route transitions).
1402
- */
1403
- function AppShell({ children, sidebar, brand, brandHref, topbarStart, topbarEnd, showThemeToggle = false, themeToggleProps, topBarBrandingLocation = "left", className, sidebarClassName, topbarClassName, mainClassName, sidebarWidth, closeSidebarOnChangeKey, hamburgerLabel = "Toggle navigation", onSidebarToggle }) {
1404
- const [isDesktop, setIsDesktop] = useState(false);
1405
- const [sidebarOpen, setSidebarOpen] = useState(false);
1406
- const [transitionsReady, setTransitionsReady] = useState(false);
1407
- const prevIsDesktopRef = useRef(false);
1408
- const closeKeyRef = useRef(closeSidebarOnChangeKey);
1409
- const sidebarRef = useRef(null);
1410
- const hamburgerRef = useRef(null);
1411
- const mainRef = useRef(null);
1412
- const sidebarId = useId();
1413
- useEffect(() => {
1414
- const desktop = getIsDesktop();
1415
- setIsDesktop(desktop);
1416
- setSidebarOpen(desktop);
1417
- prevIsDesktopRef.current = desktop;
1418
- const transitionFrame = window.requestAnimationFrame(() => {
1419
- setTransitionsReady(true);
1420
- });
1421
- const handleResize = () => {
1422
- const nowDesktop = getIsDesktop();
1423
- setIsDesktop(nowDesktop);
1424
- if (nowDesktop !== prevIsDesktopRef.current) {
1425
- setSidebarOpen(nowDesktop);
1426
- prevIsDesktopRef.current = nowDesktop;
1427
- }
1428
- };
1429
- window.addEventListener("resize", handleResize);
1430
- return () => {
1431
- window.cancelAnimationFrame(transitionFrame);
1432
- window.removeEventListener("resize", handleResize);
1433
- };
1434
- }, []);
1435
- useEffect(() => {
1436
- if (isDesktop || !sidebarOpen) return;
1437
- const mainElement = mainRef.current;
1438
- const closeSidebar = () => setSidebarOpen(false);
1439
- const onPointerDown = (e) => {
1440
- const target = e.target;
1441
- if (!target) return;
1442
- if (sidebarRef.current?.contains(target)) return;
1443
- if (hamburgerRef.current?.contains(target)) return;
1444
- closeSidebar();
1445
- };
1446
- const timeoutId = window.setTimeout(() => {
1447
- document.addEventListener("pointerdown", onPointerDown);
1448
- window.addEventListener("scroll", closeSidebar, { passive: true });
1449
- mainElement?.addEventListener("scroll", closeSidebar, { passive: true });
1450
- document.addEventListener("touchmove", closeSidebar, { passive: true });
1451
- }, 10);
1452
- return () => {
1453
- window.clearTimeout(timeoutId);
1454
- document.removeEventListener("pointerdown", onPointerDown);
1455
- window.removeEventListener("scroll", closeSidebar);
1456
- mainElement?.removeEventListener("scroll", closeSidebar);
1457
- document.removeEventListener("touchmove", closeSidebar);
1458
- };
1459
- }, [sidebarOpen, isDesktop]);
1460
- useEffect(() => {
1461
- if (!isDesktop && closeKeyRef.current !== closeSidebarOnChangeKey) setSidebarOpen(false);
1462
- closeKeyRef.current = closeSidebarOnChangeKey;
1463
- }, [closeSidebarOnChangeKey, isDesktop]);
1464
- useEffect(() => {
1465
- onSidebarToggle?.(sidebarOpen);
1466
- }, [sidebarOpen, onSidebarToggle]);
1467
- const toggleSidebar = () => setSidebarOpen((open) => !open);
1468
- const sidebarWidthValue = sidebarWidth === void 0 ? void 0 : typeof sidebarWidth === "number" ? `${sidebarWidth}px` : sidebarWidth;
1469
- const shellStyle = sidebarWidthValue ? { ["--app-shell-sidebar-width"]: sidebarWidthValue } : void 0;
1470
- const shellClasses = cx(app_shell_module_default.appShell, transitionsReady && app_shell_module_default.appShellAnimated, sidebarOpen ? app_shell_module_default.appShellOpen : app_shell_module_default.appShellCollapsed, className);
1471
- const sidebarClasses = cx(app_shell_module_default.appShellSidebar, sidebarOpen && app_shell_module_default.appShellSidebarOpen, sidebarClassName);
1472
- return /* @__PURE__ */ jsxs("div", {
1473
- className: shellClasses,
1474
- style: shellStyle,
1475
- "data-app-shell": true,
1476
- "data-desktop": isDesktop ? "true" : "false",
1477
- "data-sidebar-open": sidebarOpen ? "true" : "false",
1478
- children: [
1479
- /* @__PURE__ */ jsx(TopBar, {
1480
- className: cx(app_shell_module_default.appShellTopbar, topbarClassName),
1481
- leading: /* @__PURE__ */ jsx("button", {
1482
- ref: hamburgerRef,
1483
- type: "button",
1484
- className: app_shell_module_default.appShellHamburger,
1485
- onClick: toggleSidebar,
1486
- "aria-label": hamburgerLabel,
1487
- "aria-expanded": sidebarOpen,
1488
- "aria-controls": sidebarId,
1489
- children: /* @__PURE__ */ jsx("svg", {
1490
- viewBox: "0 0 24 24",
1491
- "aria-hidden": "true",
1492
- children: /* @__PURE__ */ jsx("path", {
1493
- d: "M3 6h18M3 12h18M3 18h18",
1494
- stroke: "currentColor",
1495
- strokeWidth: "2.5",
1496
- strokeLinecap: "round"
1497
- })
1498
- })
1499
- }),
1500
- brand,
1501
- brandHref,
1502
- brandingLocation: topBarBrandingLocation,
1503
- start: topbarStart,
1504
- actions: topbarEnd,
1505
- showThemeToggle,
1506
- themeToggleProps
1507
- }),
1508
- !isDesktop && sidebarOpen && /* @__PURE__ */ jsx("div", {
1509
- className: app_shell_module_default.appShellBackdrop,
1510
- onClick: () => setSidebarOpen(false),
1511
- onTouchStart: () => setSidebarOpen(false),
1512
- "aria-hidden": "true"
1513
- }),
1514
- /* @__PURE__ */ jsx("aside", {
1515
- ref: sidebarRef,
1516
- id: sidebarId,
1517
- className: sidebarClasses,
1518
- "aria-label": "Sidebar navigation",
1519
- children: sidebar
1520
- }),
1521
- /* @__PURE__ */ jsx("main", {
1522
- ref: mainRef,
1523
- className: cx(app_shell_module_default.appShellMain, mainClassName),
1524
- children
1525
- })
1526
- ]
1527
- });
1528
- }
1529
- var sidebar_nav_module_default = {
1530
- sidebarNav: "uzi-sidebar-nav-module__sidebarNav__eUI5c",
1531
- sidebarNavCollapsed: "uzi-sidebar-nav-module__sidebarNavCollapsed__xTM9s",
1532
- header: "uzi-sidebar-nav-module__header__Y4NLy",
1533
- footer: "uzi-sidebar-nav-module__footer__GjWky",
1534
- sections: "uzi-sidebar-nav-module__sections__mXuGQ",
1535
- section: "uzi-sidebar-nav-module__section__yjtCY",
1536
- sectionItems: "uzi-sidebar-nav-module__sectionItems__tNcph",
1537
- sectionLabel: "uzi-sidebar-nav-module__sectionLabel__Wx94m",
1538
- item: "uzi-sidebar-nav-module__item__uMHkJ",
1539
- itemActive: "uzi-sidebar-nav-module__itemActive__wBbiS",
1540
- itemCollapsed: "uzi-sidebar-nav-module__itemCollapsed__jLJN-",
1541
- itemDisabled: "uzi-sidebar-nav-module__itemDisabled__Yf8Il",
1542
- icon: "uzi-sidebar-nav-module__icon__tyrUg",
1543
- itemBody: "uzi-sidebar-nav-module__itemBody__wI0iy",
1544
- labelRow: "uzi-sidebar-nav-module__labelRow__D8sEJ",
1545
- label: "uzi-sidebar-nav-module__label__A-nt6",
1546
- description: "uzi-sidebar-nav-module__description__Xf3Si",
1547
- badge: "uzi-sidebar-nav-module__badge__-hnFd"
1548
- };
1549
- //#endregion
1550
- //#region src/components/sidebar-nav/SidebarNav.tsx
1551
- var isActivePrefix = (item, path) => {
1552
- if (item.active !== void 0) return item.active;
1553
- if (!item.href) return false;
1554
- if (!path) return false;
1555
- if (item.href === "/") return path === "/";
1556
- return path.startsWith(item.href);
1557
- };
1558
- var isActiveExact = (item, path) => {
1559
- if (item.active !== void 0) return item.active;
1560
- if (!item.href) return false;
1561
- if (!path) return false;
1562
- if (item.href === "/") return path === "/";
1563
- const normalizedHref = item.href.endsWith("/") ? item.href.slice(0, -1) : item.href;
1564
- return normalizedHref === path || path.startsWith(`${normalizedHref}/`);
1565
- };
1566
- var isNaturalPrefixMatch = (href, path) => {
1567
- if (href === "/") return path === "/";
1568
- return path.startsWith(href);
1569
- };
1570
- var isNaturalExactMatch = (href, path) => {
1571
- if (href === "/") return path === "/";
1572
- return (href.endsWith("/") ? href.slice(0, -1) : href) === path;
1573
- };
1574
- var hrefLength = (href) => href.endsWith("/") ? href.length - 1 : href.length;
1575
- var findMostSpecific = (items, currentPath) => {
1576
- const result = /* @__PURE__ */ new Set();
1577
- if (!currentPath) return result;
1578
- const matchingItems = items.filter((item) => {
1579
- if (item.disabled || !item.href) return false;
1580
- return item.exact ? isNaturalExactMatch(item.href, currentPath) : isNaturalPrefixMatch(item.href, currentPath);
1581
- });
1582
- if (matchingItems.length === 0) return result;
1583
- let maxLen = 0;
1584
- for (const item of matchingItems) {
1585
- if (!item.href) continue;
1586
- const len = hrefLength(item.href);
1587
- if (len > maxLen) maxLen = len;
1588
- }
1589
- for (const item of matchingItems) {
1590
- if (!item.href) continue;
1591
- if (hrefLength(item.href) === maxLen) result.add(item.href);
1592
- }
1593
- return result;
1594
- };
1595
- function SidebarNav({ items = [], sections, currentPath, getIsActive, matchStrategy = "prefix", onItemClick, header, footer, ariaLabel = "Sidebar navigation", collapsed = false, iconSize, className, itemClassName, sectionClassName }) {
1596
- const resolvedSections = useMemo(() => {
1597
- return sections?.length ? sections : [{
1598
- id: "default",
1599
- items
1600
- }];
1601
- }, [sections, items]);
1602
- const allItems = useMemo(() => resolvedSections.flatMap((section) => section.items), [resolvedSections]);
1603
- const defaultIsActiveFn = useMemo(() => {
1604
- if (matchStrategy === "most-specific") {
1605
- const mostSpecificHrefs = findMostSpecific(allItems, currentPath);
1606
- return (item) => {
1607
- if (item.active !== void 0) return item.active;
1608
- if (!item.href) return false;
1609
- return mostSpecificHrefs.has(item.href);
1610
- };
1611
- } else return (item, path) => {
1612
- if (item.active !== void 0) return item.active;
1613
- if (item.exact) return isActiveExact(item, path);
1614
- return isActivePrefix(item, path);
1615
- };
1616
- }, [
1617
- matchStrategy,
1618
- allItems,
1619
- currentPath
1620
- ]);
1621
- const resolvedGetIsActive = getIsActive ?? defaultIsActiveFn;
1622
- const style = iconSize !== void 0 ? { ["--sidebar-nav-icon-size"]: typeof iconSize === "number" ? `${iconSize}px` : iconSize } : void 0;
1623
- return /* @__PURE__ */ jsxs("nav", {
1624
- className: cx(sidebar_nav_module_default.sidebarNav, collapsed && sidebar_nav_module_default.sidebarNavCollapsed, className),
1625
- "aria-label": ariaLabel,
1626
- style,
1627
- children: [
1628
- header ? /* @__PURE__ */ jsx("div", {
1629
- className: sidebar_nav_module_default.header,
1630
- children: header
1631
- }) : null,
1632
- /* @__PURE__ */ jsx("div", {
1633
- className: sidebar_nav_module_default.sections,
1634
- children: resolvedSections.map((section, sectionIndex) => /* @__PURE__ */ jsxs("div", {
1635
- className: cx(sidebar_nav_module_default.section, sectionClassName),
1636
- children: [section.label && !collapsed ? /* @__PURE__ */ jsx("div", {
1637
- className: sidebar_nav_module_default.sectionLabel,
1638
- children: section.label
1639
- }) : null, /* @__PURE__ */ jsx("div", {
1640
- className: sidebar_nav_module_default.sectionItems,
1641
- children: section.items.map((item, itemIndex) => /* @__PURE__ */ jsx(SidebarNavEntry, {
1642
- item,
1643
- active: resolvedGetIsActive(item, currentPath),
1644
- collapsed,
1645
- itemClassName,
1646
- onItemClick
1647
- }, `${section.id ?? sectionIndex}-${item.href ?? item.title ?? itemIndex}`))
1648
- })]
1649
- }, section.id ?? `section-${sectionIndex}`))
1650
- }),
1651
- footer ? /* @__PURE__ */ jsx("div", {
1652
- className: sidebar_nav_module_default.footer,
1653
- children: footer
1654
- }) : null
1655
- ]
1656
- });
1657
- }
1658
- function SidebarNavEntry({ item, active, collapsed, itemClassName, onItemClick }) {
1659
- const rel = item.rel ?? (item.target === "_blank" ? "noreferrer" : void 0);
1660
- const title = item.title ?? (typeof item.label === "string" ? item.label : void 0);
1661
- const classes = cx(sidebar_nav_module_default.item, active && sidebar_nav_module_default.itemActive, collapsed && sidebar_nav_module_default.itemCollapsed, item.disabled && sidebar_nav_module_default.itemDisabled, itemClassName);
1662
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [item.icon && /* @__PURE__ */ jsx("span", {
1663
- className: sidebar_nav_module_default.icon,
1664
- children: item.icon
1665
- }), !collapsed ? /* @__PURE__ */ jsxs("span", {
1666
- className: sidebar_nav_module_default.itemBody,
1667
- children: [/* @__PURE__ */ jsxs("span", {
1668
- className: sidebar_nav_module_default.labelRow,
1669
- children: [/* @__PURE__ */ jsx("span", {
1670
- className: sidebar_nav_module_default.label,
1671
- children: item.label
1672
- }), item.badge && /* @__PURE__ */ jsx("span", {
1673
- className: sidebar_nav_module_default.badge,
1674
- children: item.badge
1675
- })]
1676
- }), item.description ? /* @__PURE__ */ jsx("span", {
1677
- className: sidebar_nav_module_default.description,
1678
- children: item.description
1679
- }) : null]
1680
- }) : null] });
1681
- const handleClick = () => {
1682
- if (item.disabled) return;
1683
- item.onClick?.();
1684
- onItemClick?.(item);
1685
- };
1686
- if (!item.href) return /* @__PURE__ */ jsx("button", {
1687
- type: "button",
1688
- className: classes,
1689
- "aria-current": active ? "page" : void 0,
1690
- "aria-disabled": item.disabled ? "true" : void 0,
1691
- disabled: item.disabled,
1692
- title: collapsed ? title : void 0,
1693
- onClick: handleClick,
1694
- children: content
1695
- });
1696
- if (item.disabled) return /* @__PURE__ */ jsx("div", {
1697
- className: classes,
1698
- "aria-current": active ? "page" : void 0,
1699
- "aria-disabled": "true",
1700
- title: collapsed ? title : void 0,
1701
- children: content
1702
- });
1703
- return /* @__PURE__ */ jsx("a", {
1704
- className: classes,
1705
- href: item.href,
1706
- target: item.target,
1707
- rel,
1708
- "aria-current": active ? "page" : void 0,
1709
- title: collapsed ? title : void 0,
1710
- onClick: handleClick,
1711
- children: content
1712
- });
1713
- }
1714
- var skeleton_module_default = {
1715
- skeleton: "uzi-skeleton-module__skeleton__fula5",
1716
- "skeleton-pulse": "uzi-skeleton-module__skeleton-pulse__Yp45W",
1717
- "radius-sm": "uzi-skeleton-module__radius-sm__FdccD",
1718
- "radius-md": "uzi-skeleton-module__radius-md__zH3RE",
1719
- "radius-lg": "uzi-skeleton-module__radius-lg__YVrHw",
1720
- "radius-full": "uzi-skeleton-module__radius-full__5o2m0"
1721
- };
1722
- //#endregion
1723
- //#region src/components/skeleton/Skeleton.tsx
1724
- function Skeleton({ width, height, radius = "md", className, style, ...rest }) {
1725
- return /* @__PURE__ */ jsx("div", {
1726
- className: cx(skeleton_module_default.skeleton, skeleton_module_default[`radius-${radius}`], className),
1727
- style: {
1728
- width,
1729
- height,
1730
- ...style
1731
- },
1732
- "aria-hidden": "true",
1733
- ...rest
1734
- });
1735
- }
1736
- var progress_module_default = {
1737
- track: "uzi-progress-module__track__gM0oV",
1738
- fill: "uzi-progress-module__fill__aLAbp",
1739
- "tone-default": "uzi-progress-module__tone-default__fhf7o",
1740
- "tone-success": "uzi-progress-module__tone-success__FsGHD",
1741
- "tone-warning": "uzi-progress-module__tone-warning__UAttL",
1742
- "tone-danger": "uzi-progress-module__tone-danger__-L-Ee"
1743
- };
1744
- //#endregion
1745
- //#region src/components/progress/Progress.tsx
1746
- function Progress({ value, tone = "default", className, "aria-label": ariaLabel, ...rest }) {
1747
- const clamped = Math.max(0, Math.min(100, value));
1748
- return /* @__PURE__ */ jsx("div", {
1749
- className: cx(progress_module_default.track, className),
1750
- role: "progressbar",
1751
- "aria-valuenow": clamped,
1752
- "aria-valuemin": 0,
1753
- "aria-valuemax": 100,
1754
- "aria-label": ariaLabel,
1755
- ...rest,
1756
- children: /* @__PURE__ */ jsx("div", {
1757
- className: cx(progress_module_default.fill, progress_module_default[`tone-${tone}`]),
1758
- style: { width: `${clamped}%` }
1759
- })
1760
- });
1761
- }
1762
- var segmented_toggle_module_default = {
1763
- track: "uzi-segmented-toggle-module__track__M4fjm",
1764
- option: "uzi-segmented-toggle-module__option__7cEZJ",
1765
- label: "uzi-segmented-toggle-module__label__bDAIv"
1766
- };
1767
- //#endregion
1768
- //#region src/components/segmented-toggle/SegmentedToggle.tsx
1769
- function SegmentedToggle({ options, value, onChange, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className }) {
1770
- const itemRefs = React.useRef([]);
1771
- const selectedIndex = options.findIndex((opt) => opt.value === value);
1772
- const fallbackIndex = options.findIndex((opt) => !opt.disabled);
1773
- let lastEnabledIndex = -1;
1774
- for (let index = options.length - 1; index >= 0; index -= 1) if (!options[index]?.disabled) {
1775
- lastEnabledIndex = index;
1776
- break;
1777
- }
1778
- const tabbableIndex = selectedIndex >= 0 && !options[selectedIndex]?.disabled ? selectedIndex : fallbackIndex;
1779
- const focusItem = (index) => {
1780
- itemRefs.current[index]?.focus();
1781
- };
1782
- const findEnabledIndex = (startIndex, direction) => {
1783
- if (options.length === 0) return -1;
1784
- let nextIndex = startIndex;
1785
- for (let i = 0; i < options.length; i += 1) {
1786
- nextIndex = (nextIndex + direction + options.length) % options.length;
1787
- if (!options[nextIndex]?.disabled) return nextIndex;
1788
- }
1789
- return startIndex;
1790
- };
1791
- const selectIndex = (index) => {
1792
- const nextOption = options[index];
1793
- if (!nextOption || nextOption.disabled || nextOption.value === value) return;
1794
- onChange(nextOption.value);
1795
- };
1796
- const handleKeyDown = (event, index) => {
1797
- switch (event.key) {
1798
- case "ArrowRight":
1799
- case "ArrowDown": {
1800
- event.preventDefault();
1801
- const nextIndex = findEnabledIndex(index, 1);
1802
- focusItem(nextIndex);
1803
- selectIndex(nextIndex);
1804
- break;
1805
- }
1806
- case "ArrowLeft":
1807
- case "ArrowUp": {
1808
- event.preventDefault();
1809
- const nextIndex = findEnabledIndex(index, -1);
1810
- focusItem(nextIndex);
1811
- selectIndex(nextIndex);
1812
- break;
1813
- }
1814
- case "Home":
1815
- event.preventDefault();
1816
- focusItem(fallbackIndex);
1817
- if (fallbackIndex >= 0) selectIndex(fallbackIndex);
1818
- break;
1819
- case "End":
1820
- event.preventDefault();
1821
- if (lastEnabledIndex >= 0) {
1822
- focusItem(lastEnabledIndex);
1823
- selectIndex(lastEnabledIndex);
1824
- }
1825
- break;
1826
- default: break;
1827
- }
1828
- };
1829
- return /* @__PURE__ */ jsx("div", {
1830
- className: cx(segmented_toggle_module_default.track, className),
1831
- role: "radiogroup",
1832
- "aria-label": ariaLabel,
1833
- "aria-labelledby": ariaLabelledBy,
1834
- children: options.map((opt, index) => /* @__PURE__ */ jsx("button", {
1835
- ref: (node) => {
1836
- itemRefs.current[index] = node;
1837
- },
1838
- type: "button",
1839
- role: "radio",
1840
- "aria-checked": opt.value === value,
1841
- disabled: opt.disabled,
1842
- tabIndex: opt.disabled ? -1 : index === tabbableIndex ? 0 : -1,
1843
- onClick: () => {
1844
- if (opt.value !== value) onChange(opt.value);
1845
- },
1846
- onKeyDown: (event) => handleKeyDown(event, index),
1847
- className: cx(segmented_toggle_module_default.option),
1848
- children: /* @__PURE__ */ jsx("span", {
1849
- className: segmented_toggle_module_default.label,
1850
- children: opt.label
1851
- })
1852
- }, opt.value))
1853
- });
1854
- }
1855
- //#endregion
1
+ /* empty css */
2
+ import { cx } from "./index3.js";
3
+ import { Button } from "./index5.js";
4
+ import { Avatar, AvatarFallback, AvatarImage } from "./index7.js";
5
+ import { Card } from "./index9.js";
6
+ import { Pill } from "./index11.js";
7
+ import { Modal, ModalOverlay } from "./index13.js";
8
+ import { Alert } from "./index15.js";
9
+ import { ToastProvider, useToast } from "./index17.js";
10
+ import { Input } from "./index19.js";
11
+ import { Label } from "./index21.js";
12
+ import { Checkbox } from "./index23.js";
13
+ import { MultiSelect } from "./index25.js";
14
+ import { Select } from "./index27.js";
15
+ import { Dropdown } from "./index28.js";
16
+ import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./index30.js";
17
+ import { ThemeProvider, useTheme } from "./index32.js";
18
+ import { ThemeToggleButton } from "./index34.js";
19
+ import { TopBar } from "./index36.js";
20
+ import { AppShell } from "./index38.js";
21
+ import { SidebarNav } from "./index40.js";
22
+ import { Skeleton } from "./index42.js";
23
+ import { Progress } from "./index44.js";
24
+ import { SegmentedToggle } from "./index46.js";
1856
25
  export { Alert, AppShell, Avatar, AvatarFallback, AvatarImage, Button, Card, Checkbox, Dropdown, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, Label, Modal, ModalOverlay, MultiSelect, Pill, Progress, SegmentedToggle, Select, SidebarNav, Skeleton, ThemeProvider, ThemeToggleButton, ToastProvider, TopBar, cx, useTheme, useToast };
1857
-
1858
- //# sourceMappingURL=index.js.map