@oblkf/oui-react 0.0.0-stage → 0.1.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 (61) hide show
  1. package/README.md +75 -2
  2. package/dist/cn.d.ts +7 -0
  3. package/dist/components/OuAccordion.d.ts +12 -0
  4. package/dist/components/OuAlert.d.ts +10 -0
  5. package/dist/components/OuAvatar.d.ts +11 -0
  6. package/dist/components/OuAvatarGroup.d.ts +5 -0
  7. package/dist/components/OuBadge.d.ts +9 -0
  8. package/dist/components/OuBanner.d.ts +5 -0
  9. package/dist/components/OuBreadcrumb.d.ts +9 -0
  10. package/dist/components/OuButton.d.ts +9 -0
  11. package/dist/components/OuButtonGroup.d.ts +5 -0
  12. package/dist/components/OuCard.d.ts +9 -0
  13. package/dist/components/OuCheckbox.d.ts +9 -0
  14. package/dist/components/OuCheckboxGroup.d.ts +13 -0
  15. package/dist/components/OuCode.d.ts +5 -0
  16. package/dist/components/OuDropdown.d.ts +8 -0
  17. package/dist/components/OuDropdownItem.d.ts +6 -0
  18. package/dist/components/OuEmptyState.d.ts +8 -0
  19. package/dist/components/OuInput.d.ts +10 -0
  20. package/dist/components/OuKbd.d.ts +5 -0
  21. package/dist/components/OuLabel.d.ts +6 -0
  22. package/dist/components/OuLink.d.ts +10 -0
  23. package/dist/components/OuList.d.ts +5 -0
  24. package/dist/components/OuListItem.d.ts +10 -0
  25. package/dist/components/OuMeter.d.ts +9 -0
  26. package/dist/components/OuModal.d.ts +11 -0
  27. package/dist/components/OuNumberInput.d.ts +10 -0
  28. package/dist/components/OuPagination.d.ts +7 -0
  29. package/dist/components/OuPopover.d.ts +8 -0
  30. package/dist/components/OuProgress.d.ts +9 -0
  31. package/dist/components/OuProgressRing.d.ts +12 -0
  32. package/dist/components/OuRadioGroup.d.ts +14 -0
  33. package/dist/components/OuRating.d.ts +8 -0
  34. package/dist/components/OuSegmented.d.ts +12 -0
  35. package/dist/components/OuSelect.d.ts +6 -0
  36. package/dist/components/OuSeparator.d.ts +5 -0
  37. package/dist/components/OuSheet.d.ts +14 -0
  38. package/dist/components/OuSkeleton.d.ts +4 -0
  39. package/dist/components/OuSlider.d.ts +10 -0
  40. package/dist/components/OuSpinner.d.ts +8 -0
  41. package/dist/components/OuStat.d.ts +10 -0
  42. package/dist/components/OuSteps.d.ts +10 -0
  43. package/dist/components/OuSwitch.d.ts +9 -0
  44. package/dist/components/OuTable.d.ts +13 -0
  45. package/dist/components/OuTabs.d.ts +13 -0
  46. package/dist/components/OuTag.d.ts +7 -0
  47. package/dist/components/OuTagInput.d.ts +7 -0
  48. package/dist/components/OuTextarea.d.ts +5 -0
  49. package/dist/components/OuTimeline.d.ts +13 -0
  50. package/dist/components/OuToast.d.ts +10 -0
  51. package/dist/components/OuToaster.d.ts +6 -0
  52. package/dist/components/OuToggle.d.ts +8 -0
  53. package/dist/components/OuTooltip.d.ts +10 -0
  54. package/dist/components/button-variants.d.ts +12 -0
  55. package/dist/index.d.ts +54 -0
  56. package/dist/index.js +1726 -0
  57. package/dist/styles.css +2 -0
  58. package/dist/useToast.d.ts +30 -0
  59. package/dist/utils/cn.d.ts +7 -0
  60. package/package.json +50 -3
  61. package/tokens.css +136 -0
package/dist/index.js ADDED
@@ -0,0 +1,1726 @@
1
+ import { clsx as e } from "clsx";
2
+ import { twMerge as t } from "tailwind-merge";
3
+ import { Fragment as n, forwardRef as r, useCallback as i, useEffect as a, useId as o, useRef as s, useState as c, useSyncExternalStore as l } from "react";
4
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
5
+ import { createPortal as p } from "react-dom";
6
+ //#region src/utils/cn.ts
7
+ function m(...n) {
8
+ return t(e(n));
9
+ }
10
+ //#endregion
11
+ //#region src/components/button-variants.ts
12
+ var h = "inline-flex items-center justify-center gap-2 rounded-md font-medium whitespace-nowrap transition-[background-color,box-shadow,filter,color] select-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50", g = {
13
+ primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
14
+ brand: "bg-gradient-to-r from-[var(--brand-from)] to-[var(--brand-to)] text-white shadow-[var(--shadow-float)] hover:brightness-[1.06]",
15
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
16
+ outline: "border border-border bg-transparent hover:bg-accent hover:text-accent-foreground",
17
+ ghost: "bg-transparent hover:bg-accent hover:text-accent-foreground",
18
+ soft: "bg-primary/10 text-primary hover:bg-primary/15",
19
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90"
20
+ }, _ = {
21
+ sm: "h-8 px-3 text-sm",
22
+ md: "h-10 px-4 text-sm",
23
+ lg: "h-11 px-6 text-base",
24
+ icon: "size-10"
25
+ };
26
+ function v(e = {}) {
27
+ return m(h, g[e.variant ?? "primary"], _[e.size ?? "md"], e.class);
28
+ }
29
+ //#endregion
30
+ //#region src/useToast.ts
31
+ var y = [], b = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Map(), ee = 0;
32
+ function S() {
33
+ y = y.slice(), b.forEach((e) => e());
34
+ }
35
+ function C(e, t) {
36
+ return t.duration === void 0 ? e === "loading" ? 0 : 4e3 : t.duration;
37
+ }
38
+ function w(e) {
39
+ let t = x.get(e.id);
40
+ t && clearTimeout(t), e.duration > 0 && typeof window < "u" && x.set(e.id, setTimeout(() => E(e.id), e.duration));
41
+ }
42
+ function T(e, t, n = {}) {
43
+ let r = C(t, n);
44
+ if (n.id != null) {
45
+ let i = y.find((e) => e.id === n.id);
46
+ if (i) return Object.assign(i, {
47
+ title: e,
48
+ variant: t,
49
+ duration: r,
50
+ description: n.description,
51
+ action: n.action
52
+ }), w(i), S(), i.id;
53
+ }
54
+ let i = n.id ?? ++ee, a = {
55
+ id: i,
56
+ title: e,
57
+ variant: t,
58
+ duration: r,
59
+ description: n.description,
60
+ action: n.action
61
+ };
62
+ return y = [...y, a], w(a), S(), i;
63
+ }
64
+ function E(e) {
65
+ let t = x.get(e);
66
+ t && (clearTimeout(t), x.delete(e)), y.some((t) => t.id === e) && (y = y.filter((t) => t.id !== e), S());
67
+ }
68
+ var D = Object.assign((e, t) => T(e, "default", t), {
69
+ success: (e, t) => T(e, "success", t),
70
+ error: (e, t) => T(e, "error", t),
71
+ warning: (e, t) => T(e, "warning", t),
72
+ info: (e, t) => T(e, "info", t),
73
+ loading: (e, t) => T(e, "loading", t),
74
+ dismiss: E
75
+ });
76
+ function O() {
77
+ return l((e) => (b.add(e), () => b.delete(e)), () => y, () => y);
78
+ }
79
+ //#endregion
80
+ //#region src/components/OuButton.tsx
81
+ var te = r(function({ variant: e = "primary", size: t = "md", loading: n, disabled: r, className: i, children: a, type: o = "button", ...s }, c) {
82
+ return /* @__PURE__ */ f("button", {
83
+ ref: c,
84
+ type: o,
85
+ className: v({
86
+ variant: e,
87
+ size: t,
88
+ class: i
89
+ }),
90
+ disabled: r || n,
91
+ ...s,
92
+ children: [n && /* @__PURE__ */ f("svg", {
93
+ className: "size-4 animate-spin",
94
+ viewBox: "0 0 24 24",
95
+ fill: "none",
96
+ "aria-hidden": "true",
97
+ children: [/* @__PURE__ */ d("circle", {
98
+ className: "opacity-25",
99
+ cx: "12",
100
+ cy: "12",
101
+ r: "10",
102
+ stroke: "currentColor",
103
+ strokeWidth: "3"
104
+ }), /* @__PURE__ */ d("path", {
105
+ className: "opacity-90",
106
+ fill: "currentColor",
107
+ d: "M12 2a10 10 0 0 1 10 10h-3a7 7 0 0 0-7-7V2z"
108
+ })]
109
+ }), a]
110
+ });
111
+ });
112
+ //#endregion
113
+ //#region src/components/OuButtonGroup.tsx
114
+ function ne({ className: e, children: t, ...n }) {
115
+ return /* @__PURE__ */ d("div", {
116
+ role: "group",
117
+ className: m("inline-flex isolate [&>button]:rounded-none [&>button]:shadow-none", "[&>button:first-child]:rounded-l-md [&>button:last-child]:rounded-r-md", "[&>button:not(:first-child)]:-ml-px [&>button:focus-visible]:z-10", e),
118
+ ...n,
119
+ children: t
120
+ });
121
+ }
122
+ //#endregion
123
+ //#region src/components/OuToggle.tsx
124
+ function re({ pressed: e = !1, onPressedChange: t, disabled: n, className: r, children: i, onClick: a, ...o }) {
125
+ return /* @__PURE__ */ d("button", {
126
+ type: "button",
127
+ "aria-pressed": e,
128
+ disabled: n,
129
+ className: m("inline-flex h-9 items-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50", e ? "border-primary/30 bg-primary/12 text-primary" : "border-border bg-background text-foreground hover:bg-accent hover:text-accent-foreground", r),
130
+ onClick: (n) => {
131
+ a?.(n), t?.(!e);
132
+ },
133
+ ...o,
134
+ children: i
135
+ });
136
+ }
137
+ //#endregion
138
+ //#region src/components/OuLink.tsx
139
+ var ie = {
140
+ default: "text-primary hover:underline underline-offset-4",
141
+ muted: "text-muted-foreground hover:text-foreground",
142
+ underline: "text-foreground underline underline-offset-4 decoration-border hover:decoration-foreground"
143
+ };
144
+ function ae({ href: e, variant: t = "default", external: n, className: r, children: i, ...a }) {
145
+ return /* @__PURE__ */ f("a", {
146
+ href: e,
147
+ target: n ? "_blank" : void 0,
148
+ rel: n ? "noreferrer noopener" : void 0,
149
+ className: m("inline-flex items-center gap-1 rounded-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", ie[t], r),
150
+ ...a,
151
+ children: [i, n && /* @__PURE__ */ d("svg", {
152
+ className: "size-3.5",
153
+ viewBox: "0 0 24 24",
154
+ fill: "none",
155
+ stroke: "currentColor",
156
+ strokeWidth: "2",
157
+ "aria-hidden": "true",
158
+ children: /* @__PURE__ */ d("path", {
159
+ d: "M7 17 17 7M9 7h8v8",
160
+ strokeLinecap: "round",
161
+ strokeLinejoin: "round"
162
+ })
163
+ })]
164
+ });
165
+ }
166
+ //#endregion
167
+ //#region src/components/OuLabel.tsx
168
+ function k({ className: e, children: t, ...n }) {
169
+ return /* @__PURE__ */ d("label", {
170
+ className: m("text-sm font-medium text-foreground select-none peer-disabled:cursor-not-allowed peer-disabled:opacity-60", e),
171
+ ...n,
172
+ children: t
173
+ });
174
+ }
175
+ //#endregion
176
+ //#region src/components/OuBadge.tsx
177
+ var A = {
178
+ default: "bg-secondary text-secondary-foreground",
179
+ primary: "bg-primary/12 text-primary",
180
+ success: "bg-success/15 text-success",
181
+ warning: "bg-warning/15 text-warning",
182
+ destructive: "bg-destructive/12 text-destructive",
183
+ outline: "border border-border text-foreground"
184
+ }, j = {
185
+ default: "bg-muted-foreground",
186
+ primary: "bg-primary",
187
+ success: "bg-success",
188
+ warning: "bg-warning",
189
+ destructive: "bg-destructive",
190
+ outline: "bg-foreground"
191
+ };
192
+ function M({ variant: e = "default", dot: t, className: n, children: r, ...i }) {
193
+ return /* @__PURE__ */ f("span", {
194
+ className: m("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium whitespace-nowrap", A[e], n),
195
+ ...i,
196
+ children: [t && /* @__PURE__ */ d("span", {
197
+ className: m("size-1.5 rounded-full", j[e]),
198
+ "aria-hidden": "true"
199
+ }), r]
200
+ });
201
+ }
202
+ //#endregion
203
+ //#region src/components/OuTag.tsx
204
+ function N({ removable: e, onRemove: t, className: n, children: r, ...i }) {
205
+ return /* @__PURE__ */ f("span", {
206
+ className: m("inline-flex items-center gap-1.5 rounded-md border border-border bg-muted/60 py-1 pl-2.5 text-sm text-foreground", e ? "pr-1" : "pr-2.5", n),
207
+ ...i,
208
+ children: [r, e && /* @__PURE__ */ d("button", {
209
+ type: "button",
210
+ className: "grid size-4 place-items-center rounded-sm text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
211
+ "aria-label": "Удалить",
212
+ onClick: () => t?.(),
213
+ children: /* @__PURE__ */ d("svg", {
214
+ viewBox: "0 0 24 24",
215
+ className: "size-3",
216
+ fill: "none",
217
+ stroke: "currentColor",
218
+ strokeWidth: "2.5",
219
+ children: /* @__PURE__ */ d("path", {
220
+ d: "M6 6l12 12M18 6L6 18",
221
+ strokeLinecap: "round"
222
+ })
223
+ })
224
+ })]
225
+ });
226
+ }
227
+ //#endregion
228
+ //#region src/components/OuCard.tsx
229
+ function P({ hover: e, padded: t = !0, header: n, footer: r, className: i, children: a, ...o }) {
230
+ return /* @__PURE__ */ f("div", {
231
+ className: m("rounded-xl border border-border bg-card text-card-foreground shadow-[var(--shadow-soft)]", e && "transition-[box-shadow,transform] hover:-translate-y-0.5 hover:shadow-[var(--shadow-float)]", i),
232
+ ...o,
233
+ children: [
234
+ n && /* @__PURE__ */ d("div", {
235
+ className: "border-b border-border px-5 py-4",
236
+ children: n
237
+ }),
238
+ /* @__PURE__ */ d("div", {
239
+ className: m(t && "p-5"),
240
+ children: a
241
+ }),
242
+ r && /* @__PURE__ */ d("div", {
243
+ className: "border-t border-border px-5 py-4",
244
+ children: r
245
+ })
246
+ ]
247
+ });
248
+ }
249
+ //#endregion
250
+ //#region src/components/OuList.tsx
251
+ function F({ className: e, children: t, ...n }) {
252
+ return /* @__PURE__ */ d("ul", {
253
+ className: m("divide-y divide-border overflow-hidden rounded-xl border border-border bg-card", e),
254
+ ...n,
255
+ children: t
256
+ });
257
+ }
258
+ //#endregion
259
+ //#region src/components/OuListItem.tsx
260
+ function I({ title: e, subtitle: t, clickable: n, leading: r, trailing: i, className: a, children: o, ...s }) {
261
+ return /* @__PURE__ */ f("li", {
262
+ className: m("flex items-center gap-3 px-4 py-3", n && "cursor-pointer transition-colors hover:bg-muted/50", a),
263
+ ...s,
264
+ children: [
265
+ r && /* @__PURE__ */ d("span", {
266
+ className: "shrink-0",
267
+ children: r
268
+ }),
269
+ /* @__PURE__ */ d("div", {
270
+ className: "min-w-0 flex-1",
271
+ children: o ?? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("p", {
272
+ className: "truncate text-sm font-medium text-foreground",
273
+ children: e
274
+ }), t && /* @__PURE__ */ d("p", {
275
+ className: "truncate text-xs text-muted-foreground",
276
+ children: t
277
+ })] })
278
+ }),
279
+ i && /* @__PURE__ */ d("span", {
280
+ className: "shrink-0",
281
+ children: i
282
+ })
283
+ ]
284
+ });
285
+ }
286
+ //#endregion
287
+ //#region src/components/OuSeparator.tsx
288
+ function L({ orientation: e = "horizontal", className: t, ...n }) {
289
+ return /* @__PURE__ */ d("div", {
290
+ role: "separator",
291
+ "aria-orientation": e,
292
+ className: m("bg-border", e === "vertical" ? "h-full w-px" : "h-px w-full", t),
293
+ ...n
294
+ });
295
+ }
296
+ //#endregion
297
+ //#region src/components/OuKbd.tsx
298
+ function R({ className: e, children: t, ...n }) {
299
+ return /* @__PURE__ */ d("kbd", {
300
+ className: m("inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-sans text-[11px] font-medium text-muted-foreground shadow-[0_1px_0_0_var(--border)]", e),
301
+ ...n,
302
+ children: t
303
+ });
304
+ }
305
+ //#endregion
306
+ //#region src/components/OuCode.tsx
307
+ function z({ className: e, children: t, ...n }) {
308
+ return /* @__PURE__ */ d("code", {
309
+ className: m("rounded-md border border-border bg-muted px-1.5 py-0.5 font-mono text-[0.85em] text-foreground", e),
310
+ ...n,
311
+ children: t
312
+ });
313
+ }
314
+ //#endregion
315
+ //#region src/components/OuInput.tsx
316
+ var B = {
317
+ sm: "h-9 text-sm",
318
+ md: "h-10 text-sm",
319
+ lg: "h-11 text-base"
320
+ };
321
+ function V({ invalid: e, size: t = "md", leading: n, trailing: r, className: i, ...a }) {
322
+ return /* @__PURE__ */ f("div", {
323
+ className: "relative w-full",
324
+ children: [
325
+ n && /* @__PURE__ */ d("span", {
326
+ className: "pointer-events-none absolute inset-y-0 left-3 flex items-center text-muted-foreground",
327
+ children: n
328
+ }),
329
+ /* @__PURE__ */ d("input", {
330
+ ...a,
331
+ className: m("flex w-full rounded-md border bg-background px-3 py-2 text-foreground placeholder:text-muted-foreground transition-[color,box-shadow,border-color] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50", B[t], e && "border-destructive focus-visible:ring-destructive", !e && "border-input", n && "pl-10", r && "pr-10", i)
332
+ }),
333
+ r && /* @__PURE__ */ d("span", {
334
+ className: "absolute inset-y-0 right-3 flex items-center text-muted-foreground",
335
+ children: r
336
+ })
337
+ ]
338
+ });
339
+ }
340
+ //#endregion
341
+ //#region src/components/OuTextarea.tsx
342
+ function H({ invalid: e, rows: t = 4, className: n, ...r }) {
343
+ return /* @__PURE__ */ d("textarea", {
344
+ rows: t,
345
+ ...r,
346
+ className: m("flex w-full rounded-md border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground transition-[color,box-shadow,border-color] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 resize-y", e ? "border-destructive focus-visible:ring-destructive" : "border-input", n)
347
+ });
348
+ }
349
+ //#endregion
350
+ //#region src/components/OuSelect.tsx
351
+ function U({ invalid: e, className: t, children: n, ...r }) {
352
+ return /* @__PURE__ */ f("div", {
353
+ className: "relative w-full",
354
+ children: [/* @__PURE__ */ d("select", {
355
+ ...r,
356
+ className: m("h-10 w-full appearance-none rounded-md border bg-background pr-9 pl-3 text-sm text-foreground transition-[color,box-shadow,border-color] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50", e ? "border-destructive focus-visible:ring-destructive" : "border-input", t),
357
+ children: n
358
+ }), /* @__PURE__ */ d("svg", {
359
+ className: "pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 text-muted-foreground",
360
+ viewBox: "0 0 24 24",
361
+ fill: "none",
362
+ stroke: "currentColor",
363
+ strokeWidth: "2",
364
+ "aria-hidden": "true",
365
+ children: /* @__PURE__ */ d("path", {
366
+ d: "m6 9 6 6 6-6",
367
+ strokeLinecap: "round",
368
+ strokeLinejoin: "round"
369
+ })
370
+ })]
371
+ });
372
+ }
373
+ //#endregion
374
+ //#region src/components/OuNumberInput.tsx
375
+ var W = "grid w-10 shrink-0 place-items-center text-lg leading-none text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring";
376
+ function G({ value: e = 0, onValueChange: t, min: n, max: r, step: i = 1, disabled: a, className: o }) {
377
+ function s(e) {
378
+ return n !== void 0 && (e = Math.max(n, e)), r !== void 0 && (e = Math.min(r, e)), e;
379
+ }
380
+ function c(n) {
381
+ t?.(s(e + n * i));
382
+ }
383
+ return /* @__PURE__ */ f("div", {
384
+ className: m("inline-flex h-10 items-stretch overflow-hidden rounded-md border border-input bg-background", a && "opacity-50", o),
385
+ children: [
386
+ /* @__PURE__ */ d("button", {
387
+ type: "button",
388
+ className: W,
389
+ disabled: a || n !== void 0 && e <= n,
390
+ "aria-label": "Уменьшить",
391
+ onClick: () => c(-1),
392
+ children: "−"
393
+ }),
394
+ /* @__PURE__ */ d("input", {
395
+ type: "number",
396
+ value: e,
397
+ min: n,
398
+ max: r,
399
+ step: i,
400
+ disabled: a,
401
+ onChange: (e) => {
402
+ let n = e.target.valueAsNumber;
403
+ t?.(Number.isNaN(n) ? 0 : n);
404
+ },
405
+ className: "w-14 border-x border-input bg-transparent text-center text-sm tabular-nums focus:outline-none [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none"
406
+ }),
407
+ /* @__PURE__ */ d("button", {
408
+ type: "button",
409
+ className: W,
410
+ disabled: a || r !== void 0 && e >= r,
411
+ "aria-label": "Увеличить",
412
+ onClick: () => c(1),
413
+ children: "+"
414
+ })
415
+ ]
416
+ });
417
+ }
418
+ //#endregion
419
+ //#region src/components/OuCheckbox.tsx
420
+ function K({ checked: e, onCheckedChange: t, disabled: n, className: r, children: i }) {
421
+ let a = e ?? !1;
422
+ return /* @__PURE__ */ f("label", {
423
+ className: m("inline-flex cursor-pointer items-center gap-2.5 select-none", n && "cursor-not-allowed opacity-60", r),
424
+ children: [
425
+ /* @__PURE__ */ d("input", {
426
+ type: "checkbox",
427
+ className: "peer sr-only",
428
+ checked: a,
429
+ disabled: n,
430
+ onChange: (e) => t?.(e.target.checked)
431
+ }),
432
+ /* @__PURE__ */ d("span", {
433
+ className: m("grid size-5 place-items-center rounded-[6px] border transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background", a ? "border-primary bg-primary" : "border-input bg-background"),
434
+ children: a && /* @__PURE__ */ d("svg", {
435
+ className: "size-3.5 text-primary-foreground",
436
+ viewBox: "0 0 24 24",
437
+ fill: "none",
438
+ stroke: "currentColor",
439
+ strokeWidth: "3",
440
+ "aria-hidden": "true",
441
+ children: /* @__PURE__ */ d("path", {
442
+ d: "M20 6 9 17l-5-5",
443
+ strokeLinecap: "round",
444
+ strokeLinejoin: "round"
445
+ })
446
+ })
447
+ }),
448
+ i && /* @__PURE__ */ d("span", {
449
+ className: "text-sm text-foreground",
450
+ children: i
451
+ })
452
+ ]
453
+ });
454
+ }
455
+ //#endregion
456
+ //#region src/components/OuCheckboxGroup.tsx
457
+ function q({ options: e, value: t, onValueChange: n, className: r }) {
458
+ function i(e) {
459
+ n?.(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
460
+ }
461
+ return /* @__PURE__ */ d("div", {
462
+ className: m("flex flex-col gap-2.5", r),
463
+ children: e.map((e) => {
464
+ let n = t.includes(e.value);
465
+ return /* @__PURE__ */ f("label", {
466
+ className: m("inline-flex cursor-pointer items-center gap-2.5 select-none", e.disabled && "cursor-not-allowed opacity-60"),
467
+ children: [
468
+ /* @__PURE__ */ d("input", {
469
+ type: "checkbox",
470
+ className: "peer sr-only",
471
+ checked: n,
472
+ disabled: e.disabled,
473
+ onChange: () => i(e.value)
474
+ }),
475
+ /* @__PURE__ */ d("span", {
476
+ className: m("grid size-5 place-items-center rounded-[6px] border transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background", n ? "border-primary bg-primary" : "border-input bg-background"),
477
+ children: n && /* @__PURE__ */ d("svg", {
478
+ className: "size-3.5 text-primary-foreground",
479
+ viewBox: "0 0 24 24",
480
+ fill: "none",
481
+ stroke: "currentColor",
482
+ strokeWidth: "3",
483
+ "aria-hidden": "true",
484
+ children: /* @__PURE__ */ d("path", {
485
+ d: "M20 6 9 17l-5-5",
486
+ strokeLinecap: "round",
487
+ strokeLinejoin: "round"
488
+ })
489
+ })
490
+ }),
491
+ /* @__PURE__ */ d("span", {
492
+ className: "text-sm text-foreground",
493
+ children: e.label
494
+ })
495
+ ]
496
+ }, e.value);
497
+ })
498
+ });
499
+ }
500
+ //#endregion
501
+ //#region src/components/OuRadioGroup.tsx
502
+ function J({ options: e, value: t, onValueChange: n, name: r, className: i }) {
503
+ let a = o(), s = r ?? a;
504
+ return /* @__PURE__ */ d("div", {
505
+ role: "radiogroup",
506
+ className: m("flex flex-col gap-2.5", i),
507
+ children: e.map((e) => /* @__PURE__ */ f("label", {
508
+ className: m("inline-flex cursor-pointer items-center gap-2.5 select-none", e.disabled && "cursor-not-allowed opacity-60"),
509
+ children: [
510
+ /* @__PURE__ */ d("input", {
511
+ type: "radio",
512
+ className: "peer sr-only",
513
+ name: s,
514
+ value: e.value,
515
+ checked: t === e.value,
516
+ disabled: e.disabled,
517
+ onChange: () => n?.(e.value)
518
+ }),
519
+ /* @__PURE__ */ d("span", {
520
+ className: m("grid size-5 place-items-center rounded-full border transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background", t === e.value ? "border-primary" : "border-input bg-background"),
521
+ children: t === e.value && /* @__PURE__ */ d("span", { className: "size-2.5 rounded-full bg-primary" })
522
+ }),
523
+ /* @__PURE__ */ d("span", {
524
+ className: "text-sm text-foreground",
525
+ children: e.label
526
+ })
527
+ ]
528
+ }, e.value))
529
+ });
530
+ }
531
+ //#endregion
532
+ //#region src/components/OuSwitch.tsx
533
+ function oe({ checked: e, onCheckedChange: t, disabled: n, className: r, children: i }) {
534
+ let a = e ?? !1;
535
+ return /* @__PURE__ */ f("label", {
536
+ className: m("inline-flex cursor-pointer items-center gap-2.5 select-none", n && "cursor-not-allowed opacity-60", r),
537
+ children: [
538
+ /* @__PURE__ */ d("input", {
539
+ type: "checkbox",
540
+ role: "switch",
541
+ className: "peer sr-only",
542
+ checked: a,
543
+ disabled: n,
544
+ onChange: (e) => t?.(e.target.checked)
545
+ }),
546
+ /* @__PURE__ */ d("span", {
547
+ className: m("relative h-6 w-11 shrink-0 rounded-full transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background", a ? "bg-primary" : "bg-input"),
548
+ children: /* @__PURE__ */ d("span", { className: m("absolute top-0.5 left-0.5 size-5 rounded-full bg-white shadow-sm transition-transform", a && "translate-x-5") })
549
+ }),
550
+ i && /* @__PURE__ */ d("span", {
551
+ className: "text-sm text-foreground",
552
+ children: i
553
+ })
554
+ ]
555
+ });
556
+ }
557
+ //#endregion
558
+ //#region src/components/OuSlider.tsx
559
+ function se({ value: e = 0, onValueChange: t, min: n = 0, max: r = 100, step: i = 1, disabled: a, className: o }) {
560
+ return /* @__PURE__ */ d("div", {
561
+ className: m("flex w-full items-center gap-3", o),
562
+ children: /* @__PURE__ */ d("input", {
563
+ type: "range",
564
+ value: e,
565
+ min: n,
566
+ max: r,
567
+ step: i,
568
+ disabled: a,
569
+ onChange: (e) => t?.(e.target.valueAsNumber),
570
+ className: "h-1.5 w-full cursor-pointer appearance-none rounded-full bg-muted accent-primary disabled:opacity-50"
571
+ })
572
+ });
573
+ }
574
+ //#endregion
575
+ //#region src/components/OuSegmented.tsx
576
+ function ce({ options: e, value: t, onValueChange: n, className: r }) {
577
+ return /* @__PURE__ */ d("div", {
578
+ role: "tablist",
579
+ className: m("inline-flex gap-1 rounded-lg bg-muted p-1", r),
580
+ children: e.map((e) => /* @__PURE__ */ d("button", {
581
+ type: "button",
582
+ role: "tab",
583
+ "aria-selected": t === e.value,
584
+ className: m("rounded-md px-3 py-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", t === e.value ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"),
585
+ onClick: () => n?.(e.value),
586
+ children: e.label
587
+ }, e.value))
588
+ });
589
+ }
590
+ //#endregion
591
+ //#region src/components/OuTagInput.tsx
592
+ function le({ value: e, onValueChange: t, placeholder: n = "Добавьте и нажмите Enter…", className: r }) {
593
+ let [i, a] = c("");
594
+ function o() {
595
+ let n = i.trim();
596
+ n && !e.includes(n) && t?.([...e, n]), a("");
597
+ }
598
+ function s(n) {
599
+ t?.(e.filter((e, t) => t !== n));
600
+ }
601
+ function l(t) {
602
+ t.key === "Enter" ? (t.preventDefault(), o()) : t.key === "Backspace" && !i && e.length && s(e.length - 1);
603
+ }
604
+ return /* @__PURE__ */ f("div", {
605
+ className: m("flex flex-wrap items-center gap-1.5 rounded-md border border-input bg-background p-1.5 focus-within:border-ring focus-within:ring-2 focus-within:ring-ring", r),
606
+ children: [e.map((e, t) => /* @__PURE__ */ f("span", {
607
+ className: "inline-flex items-center gap-1 rounded-md bg-primary/10 py-0.5 pr-1 pl-2 text-sm text-primary",
608
+ children: [e, /* @__PURE__ */ d("button", {
609
+ type: "button",
610
+ className: "grid size-4 place-items-center rounded-sm hover:bg-primary/20",
611
+ "aria-label": "Удалить",
612
+ onClick: () => s(t),
613
+ children: /* @__PURE__ */ d("svg", {
614
+ viewBox: "0 0 24 24",
615
+ className: "size-3",
616
+ fill: "none",
617
+ stroke: "currentColor",
618
+ strokeWidth: "2.5",
619
+ children: /* @__PURE__ */ d("path", {
620
+ d: "M6 6l12 12M18 6L6 18",
621
+ strokeLinecap: "round"
622
+ })
623
+ })
624
+ })]
625
+ }, t)), /* @__PURE__ */ d("input", {
626
+ value: i,
627
+ placeholder: e.length ? "" : n,
628
+ className: "min-w-24 flex-1 bg-transparent px-1.5 py-0.5 text-sm focus:outline-none",
629
+ onChange: (e) => a(e.target.value),
630
+ onKeyDown: l
631
+ })]
632
+ });
633
+ }
634
+ //#endregion
635
+ //#region src/components/OuRating.tsx
636
+ function ue({ value: e = 0, onValueChange: t, max: n = 5, readonly: r, className: i }) {
637
+ function a(e) {
638
+ r || t?.(e);
639
+ }
640
+ return /* @__PURE__ */ d("div", {
641
+ className: m("inline-flex items-center gap-0.5", i),
642
+ children: Array.from({ length: n }, (e, t) => t + 1).map((t) => /* @__PURE__ */ d("button", {
643
+ type: "button",
644
+ disabled: r,
645
+ className: m("rounded-sm transition-transform focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", r ? "cursor-default" : "cursor-pointer hover:scale-110"),
646
+ "aria-label": `Оценка ${t} из ${n}`,
647
+ onClick: () => a(t),
648
+ children: /* @__PURE__ */ d("svg", {
649
+ className: m("size-6", t <= e ? "fill-warning text-warning" : "fill-transparent text-muted-foreground/40"),
650
+ viewBox: "0 0 24 24",
651
+ stroke: "currentColor",
652
+ strokeWidth: "1.5",
653
+ "aria-hidden": "true",
654
+ children: /* @__PURE__ */ d("path", {
655
+ d: "m12 3 2.6 5.3 5.9.9-4.3 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L3.5 9.2l5.9-.9z",
656
+ strokeLinejoin: "round"
657
+ })
658
+ })
659
+ }, t))
660
+ });
661
+ }
662
+ //#endregion
663
+ //#region src/components/OuAvatar.tsx
664
+ var de = {
665
+ sm: "size-8 text-xs",
666
+ md: "size-10 text-sm",
667
+ lg: "size-12 text-base",
668
+ xl: "size-16 text-lg"
669
+ }, fe = {
670
+ sm: "size-2",
671
+ md: "size-2.5",
672
+ lg: "size-3",
673
+ xl: "size-3.5"
674
+ }, pe = {
675
+ online: "bg-success",
676
+ offline: "bg-muted-foreground",
677
+ away: "bg-warning"
678
+ };
679
+ function me({ src: e, name: t, size: n = "md", status: r, className: i, ...a }) {
680
+ let o = (t ?? "").split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("");
681
+ return /* @__PURE__ */ f("span", {
682
+ className: m("relative inline-flex shrink-0", i),
683
+ ...a,
684
+ children: [/* @__PURE__ */ d("span", {
685
+ className: m("grid place-items-center overflow-hidden rounded-full bg-primary/12 font-medium text-primary", de[n]),
686
+ children: e ? /* @__PURE__ */ d("img", {
687
+ src: e,
688
+ alt: t ?? "",
689
+ className: "size-full object-cover"
690
+ }) : /* @__PURE__ */ d("span", { children: o || "?" })
691
+ }), r && /* @__PURE__ */ d("span", {
692
+ className: m("absolute right-0 bottom-0 rounded-full ring-2 ring-card", fe[n], pe[r]),
693
+ "aria-hidden": "true"
694
+ })]
695
+ });
696
+ }
697
+ //#endregion
698
+ //#region src/components/OuAvatarGroup.tsx
699
+ function he({ className: e, children: t, ...n }) {
700
+ return /* @__PURE__ */ d("div", {
701
+ className: m("flex -space-x-2 [&>*]:rounded-full [&>*]:ring-2 [&>*]:ring-card", e),
702
+ ...n,
703
+ children: t
704
+ });
705
+ }
706
+ //#endregion
707
+ //#region src/components/OuStat.tsx
708
+ function ge({ label: e, value: t, hint: n, delta: r, trend: i, icon: a, className: o, ...s }) {
709
+ return /* @__PURE__ */ f("div", {
710
+ className: m("rounded-xl border border-border bg-card p-5 shadow-[var(--shadow-soft)]", o),
711
+ ...s,
712
+ children: [
713
+ /* @__PURE__ */ f("div", {
714
+ className: "flex items-center justify-between gap-3",
715
+ children: [/* @__PURE__ */ d("p", {
716
+ className: "text-sm text-muted-foreground",
717
+ children: e
718
+ }), a && /* @__PURE__ */ d("span", {
719
+ className: "text-muted-foreground",
720
+ children: a
721
+ })]
722
+ }),
723
+ /* @__PURE__ */ f("div", {
724
+ className: "mt-1.5 flex items-baseline gap-2",
725
+ children: [/* @__PURE__ */ d("span", {
726
+ className: "font-display text-3xl font-bold tracking-tight text-foreground",
727
+ children: t
728
+ }), r && /* @__PURE__ */ f("span", {
729
+ className: m("text-sm font-medium", i === "down" ? "text-destructive" : "text-success"),
730
+ children: [
731
+ i === "down" ? "↓" : "↑",
732
+ " ",
733
+ r
734
+ ]
735
+ })]
736
+ }),
737
+ n && /* @__PURE__ */ d("p", {
738
+ className: "mt-1 text-xs text-muted-foreground",
739
+ children: n
740
+ })
741
+ ]
742
+ });
743
+ }
744
+ //#endregion
745
+ //#region src/components/OuMeter.tsx
746
+ var Y = (e) => Number.isInteger(e) ? String(e) : e.toFixed(1);
747
+ function _e({ value: e, max: t, unit: n, label: r = "Использовано", showValue: i = !0, className: a, ...o }) {
748
+ let s = t > 0 ? Math.max(0, Math.min(100, e / t * 100)) : 0, c = s >= 90 ? "bg-destructive" : s >= 75 ? "bg-warning" : "bg-gradient-to-r from-[var(--brand-from)] to-[var(--brand-to)]";
749
+ return /* @__PURE__ */ f("div", {
750
+ className: m("rounded-xl border border-border bg-card p-4 shadow-[var(--shadow-soft)]", a),
751
+ ...o,
752
+ children: [
753
+ /* @__PURE__ */ f("div", {
754
+ className: "flex items-center justify-between gap-3",
755
+ children: [/* @__PURE__ */ d("span", {
756
+ className: "text-sm font-medium text-foreground",
757
+ children: r
758
+ }), i && /* @__PURE__ */ f("span", {
759
+ className: "text-sm text-muted-foreground tabular-nums",
760
+ children: [
761
+ Y(e),
762
+ " / ",
763
+ Y(t),
764
+ n ? ` ${n}` : null
765
+ ]
766
+ })]
767
+ }),
768
+ /* @__PURE__ */ d("div", {
769
+ className: "mt-3 h-2.5 w-full overflow-hidden rounded-full bg-muted",
770
+ children: /* @__PURE__ */ d("div", {
771
+ className: m("h-full rounded-full transition-[width] duration-500", c),
772
+ style: { width: `${s}%` }
773
+ })
774
+ }),
775
+ /* @__PURE__ */ f("p", {
776
+ className: "mt-2 text-xs text-muted-foreground",
777
+ children: [Math.round(s), "%"]
778
+ })
779
+ ]
780
+ });
781
+ }
782
+ //#endregion
783
+ //#region src/components/OuProgress.tsx
784
+ var ve = {
785
+ primary: "bg-primary",
786
+ brand: "bg-gradient-to-r from-[var(--brand-from)] to-[var(--brand-to)]",
787
+ success: "bg-success",
788
+ warning: "bg-warning",
789
+ destructive: "bg-destructive"
790
+ };
791
+ function ye({ value: e = 0, max: t = 100, variant: n = "primary", className: r, ...i }) {
792
+ let a = Math.max(0, Math.min(100, e / t * 100));
793
+ return /* @__PURE__ */ d("div", {
794
+ className: m("h-2 w-full overflow-hidden rounded-full bg-muted", r),
795
+ role: "progressbar",
796
+ "aria-valuenow": Math.round(a),
797
+ "aria-valuemin": 0,
798
+ "aria-valuemax": 100,
799
+ ...i,
800
+ children: /* @__PURE__ */ d("div", {
801
+ className: m("h-full rounded-full transition-[width] duration-500", ve[n]),
802
+ style: { width: `${a}%` }
803
+ })
804
+ });
805
+ }
806
+ //#endregion
807
+ //#region src/components/OuProgressRing.tsx
808
+ var be = {
809
+ primary: "text-primary",
810
+ success: "text-success",
811
+ warning: "text-warning",
812
+ destructive: "text-destructive"
813
+ };
814
+ function xe({ value: e = 0, max: t = 100, size: n = 72, stroke: r = 8, variant: i = "primary", showLabel: a = !0, className: o, ...s }) {
815
+ let c = Math.max(0, Math.min(100, e / t * 100)), l = (n - r) / 2, u = 2 * Math.PI * l, p = u * (1 - c / 100);
816
+ return /* @__PURE__ */ f("div", {
817
+ className: m("relative inline-grid place-items-center", o),
818
+ style: {
819
+ width: `${n}px`,
820
+ height: `${n}px`
821
+ },
822
+ ...s,
823
+ children: [/* @__PURE__ */ f("svg", {
824
+ width: n,
825
+ height: n,
826
+ className: "-rotate-90",
827
+ children: [/* @__PURE__ */ d("circle", {
828
+ cx: n / 2,
829
+ cy: n / 2,
830
+ r: l,
831
+ fill: "none",
832
+ stroke: "currentColor",
833
+ strokeWidth: r,
834
+ className: "text-muted"
835
+ }), /* @__PURE__ */ d("circle", {
836
+ cx: n / 2,
837
+ cy: n / 2,
838
+ r: l,
839
+ fill: "none",
840
+ stroke: "currentColor",
841
+ strokeWidth: r,
842
+ strokeLinecap: "round",
843
+ strokeDasharray: u,
844
+ strokeDashoffset: p,
845
+ className: m("transition-[stroke-dashoffset] duration-500", be[i])
846
+ })]
847
+ }), a && /* @__PURE__ */ f("span", {
848
+ className: "absolute text-sm font-semibold text-foreground tabular-nums",
849
+ children: [Math.round(c), "%"]
850
+ })]
851
+ });
852
+ }
853
+ //#endregion
854
+ //#region src/components/OuTable.tsx
855
+ var X = (e) => e === "right" ? "text-right" : e === "center" ? "text-center" : "text-left";
856
+ function Se({ columns: e, rows: t, cells: n, className: r }) {
857
+ return /* @__PURE__ */ d("div", {
858
+ className: m("overflow-x-auto rounded-xl border border-border", r),
859
+ children: /* @__PURE__ */ f("table", {
860
+ className: "w-full text-sm",
861
+ children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", {
862
+ className: "border-b border-border bg-muted/50 text-xs font-medium text-muted-foreground",
863
+ children: e.map((e) => /* @__PURE__ */ d("th", {
864
+ className: m("px-4 py-3", X(e.align)),
865
+ children: e.label
866
+ }, e.key))
867
+ }) }), /* @__PURE__ */ d("tbody", {
868
+ className: "divide-y divide-border",
869
+ children: t.map((t, r) => /* @__PURE__ */ d("tr", {
870
+ className: "transition-colors hover:bg-muted/40",
871
+ children: e.map((e) => {
872
+ let r = t[e.key], i = n?.[e.key];
873
+ return /* @__PURE__ */ d("td", {
874
+ className: m("px-4 py-3 text-foreground", X(e.align)),
875
+ children: i ? i(r, t) : r == null ? "" : String(r)
876
+ }, e.key);
877
+ })
878
+ }, r))
879
+ })]
880
+ })
881
+ });
882
+ }
883
+ //#endregion
884
+ //#region src/components/OuTimeline.tsx
885
+ var Ce = {
886
+ default: "bg-muted-foreground",
887
+ primary: "bg-primary",
888
+ success: "bg-success",
889
+ warning: "bg-warning",
890
+ destructive: "bg-destructive"
891
+ };
892
+ function we({ items: e, className: t }) {
893
+ return /* @__PURE__ */ d("ol", {
894
+ className: m("relative flex flex-col", t),
895
+ children: e.map((t, n) => /* @__PURE__ */ f("li", {
896
+ className: "relative flex gap-4 pb-6 last:pb-0",
897
+ children: [
898
+ n < e.length - 1 && /* @__PURE__ */ d("span", {
899
+ className: "absolute top-4 left-[7px] h-full w-px -translate-x-1/2 bg-border",
900
+ "aria-hidden": "true"
901
+ }),
902
+ /* @__PURE__ */ d("span", { className: m("relative z-10 mt-1 size-3.5 shrink-0 rounded-full ring-4 ring-background", Ce[t.variant ?? "primary"]) }),
903
+ /* @__PURE__ */ f("div", {
904
+ className: "min-w-0 flex-1",
905
+ children: [/* @__PURE__ */ f("div", {
906
+ className: "flex items-baseline justify-between gap-3",
907
+ children: [/* @__PURE__ */ d("p", {
908
+ className: "text-sm font-medium text-foreground",
909
+ children: t.title
910
+ }), t.time && /* @__PURE__ */ d("span", {
911
+ className: "shrink-0 text-xs text-muted-foreground",
912
+ children: t.time
913
+ })]
914
+ }), t.description && /* @__PURE__ */ d("p", {
915
+ className: "mt-0.5 text-sm text-muted-foreground",
916
+ children: t.description
917
+ })]
918
+ })
919
+ ]
920
+ }, n))
921
+ });
922
+ }
923
+ //#endregion
924
+ //#region src/components/OuAlert.tsx
925
+ var Te = {
926
+ info: "border-primary/25 bg-primary/8",
927
+ success: "border-success/30 bg-success/10",
928
+ warning: "border-warning/30 bg-warning/10",
929
+ destructive: "border-destructive/30 bg-destructive/8"
930
+ }, Ee = {
931
+ info: "text-primary",
932
+ success: "text-success",
933
+ warning: "text-warning",
934
+ destructive: "text-destructive"
935
+ };
936
+ function De({ variant: e = "info", title: t, className: n, children: r }) {
937
+ return /* @__PURE__ */ f("div", {
938
+ role: "alert",
939
+ className: m("flex gap-3 rounded-lg border p-4", Te[e], n),
940
+ children: [/* @__PURE__ */ f("svg", {
941
+ className: m("mt-0.5 size-5 shrink-0", Ee[e]),
942
+ viewBox: "0 0 24 24",
943
+ fill: "none",
944
+ stroke: "currentColor",
945
+ strokeWidth: "2",
946
+ "aria-hidden": "true",
947
+ children: [
948
+ /* @__PURE__ */ d("circle", {
949
+ cx: "12",
950
+ cy: "12",
951
+ r: "9"
952
+ }),
953
+ e === "success" && /* @__PURE__ */ d("path", {
954
+ d: "m8.5 12 2.5 2.5 4.5-5",
955
+ strokeLinecap: "round",
956
+ strokeLinejoin: "round"
957
+ }),
958
+ e === "warning" && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("path", {
959
+ d: "M12 8v5",
960
+ strokeLinecap: "round"
961
+ }), /* @__PURE__ */ d("path", {
962
+ d: "M12 16h.01",
963
+ strokeLinecap: "round"
964
+ })] }),
965
+ e === "destructive" && /* @__PURE__ */ d("path", {
966
+ d: "m9 9 6 6M15 9l-6 6",
967
+ strokeLinecap: "round"
968
+ }),
969
+ e === "info" && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("path", {
970
+ d: "M12 11v5",
971
+ strokeLinecap: "round"
972
+ }), /* @__PURE__ */ d("path", {
973
+ d: "M12 8h.01",
974
+ strokeLinecap: "round"
975
+ })] })
976
+ ]
977
+ }), /* @__PURE__ */ f("div", {
978
+ className: "min-w-0 flex-1",
979
+ children: [t && /* @__PURE__ */ d("p", {
980
+ className: "font-medium text-foreground",
981
+ children: t
982
+ }), r && /* @__PURE__ */ d("div", {
983
+ className: m("text-sm text-muted-foreground", t && "mt-0.5"),
984
+ children: r
985
+ })]
986
+ })]
987
+ });
988
+ }
989
+ //#endregion
990
+ //#region src/components/OuToast.tsx
991
+ var Oe = {
992
+ info: "text-primary",
993
+ success: "text-success",
994
+ warning: "text-warning",
995
+ destructive: "text-destructive"
996
+ };
997
+ function ke({ variant: e = "info", title: t, description: n, onClose: r, className: i }) {
998
+ return /* @__PURE__ */ f("div", {
999
+ role: "status",
1000
+ className: m("flex w-full max-w-sm items-start gap-3 rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-[var(--shadow-lift)]", i),
1001
+ children: [
1002
+ /* @__PURE__ */ f("svg", {
1003
+ className: m("mt-0.5 size-5 shrink-0", Oe[e]),
1004
+ viewBox: "0 0 24 24",
1005
+ fill: "none",
1006
+ stroke: "currentColor",
1007
+ strokeWidth: "2",
1008
+ "aria-hidden": "true",
1009
+ children: [
1010
+ /* @__PURE__ */ d("circle", {
1011
+ cx: "12",
1012
+ cy: "12",
1013
+ r: "9"
1014
+ }),
1015
+ e === "success" && /* @__PURE__ */ d("path", {
1016
+ d: "m8.5 12 2.5 2.5 4.5-5",
1017
+ strokeLinecap: "round",
1018
+ strokeLinejoin: "round"
1019
+ }),
1020
+ e === "destructive" && /* @__PURE__ */ d("path", {
1021
+ d: "m9 9 6 6M15 9l-6 6",
1022
+ strokeLinecap: "round"
1023
+ }),
1024
+ e === "warning" && /* @__PURE__ */ d("path", {
1025
+ d: "M12 8v5M12 16h.01",
1026
+ strokeLinecap: "round"
1027
+ }),
1028
+ e === "info" && /* @__PURE__ */ d("path", {
1029
+ d: "M12 11v5M12 8h.01",
1030
+ strokeLinecap: "round"
1031
+ })
1032
+ ]
1033
+ }),
1034
+ /* @__PURE__ */ f("div", {
1035
+ className: "min-w-0 flex-1",
1036
+ children: [/* @__PURE__ */ d("p", {
1037
+ className: "text-sm font-medium",
1038
+ children: t
1039
+ }), n && /* @__PURE__ */ d("p", {
1040
+ className: "mt-0.5 text-sm text-muted-foreground",
1041
+ children: n
1042
+ })]
1043
+ }),
1044
+ /* @__PURE__ */ d("button", {
1045
+ type: "button",
1046
+ className: "grid size-6 shrink-0 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1047
+ "aria-label": "Закрыть",
1048
+ onClick: r,
1049
+ children: /* @__PURE__ */ d("svg", {
1050
+ viewBox: "0 0 24 24",
1051
+ className: "size-4",
1052
+ fill: "none",
1053
+ stroke: "currentColor",
1054
+ strokeWidth: "2",
1055
+ children: /* @__PURE__ */ d("path", {
1056
+ d: "M6 6l12 12M18 6L6 18",
1057
+ strokeLinecap: "round"
1058
+ })
1059
+ })
1060
+ })
1061
+ ]
1062
+ });
1063
+ }
1064
+ //#endregion
1065
+ //#region src/components/OuBanner.tsx
1066
+ function Ae({ className: e, children: t, ...n }) {
1067
+ return /* @__PURE__ */ d("div", {
1068
+ className: m("rounded-2xl bg-gradient-to-br from-[var(--brand-from)] to-[var(--brand-to)] p-6 text-white shadow-[var(--shadow-float)]", e),
1069
+ ...n,
1070
+ children: t
1071
+ });
1072
+ }
1073
+ //#endregion
1074
+ //#region src/components/OuEmptyState.tsx
1075
+ function je({ title: e, description: t, icon: n, action: r, className: i, ...a }) {
1076
+ return /* @__PURE__ */ f("div", {
1077
+ className: m("flex flex-col items-center px-6 py-12 text-center", i),
1078
+ ...a,
1079
+ children: [
1080
+ /* @__PURE__ */ d("div", {
1081
+ className: "grid size-14 place-items-center rounded-2xl bg-primary/10 text-primary",
1082
+ children: n ?? /* @__PURE__ */ f("svg", {
1083
+ className: "size-7",
1084
+ viewBox: "0 0 24 24",
1085
+ fill: "none",
1086
+ stroke: "currentColor",
1087
+ strokeWidth: "1.8",
1088
+ "aria-hidden": "true",
1089
+ children: [/* @__PURE__ */ d("path", {
1090
+ d: "M22 12h-5l-2 3H9l-2-3H2",
1091
+ strokeLinecap: "round",
1092
+ strokeLinejoin: "round"
1093
+ }), /* @__PURE__ */ d("path", {
1094
+ d: "M5.4 5.1 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.4-6.9A2 2 0 0 0 16.8 4H7.2a2 2 0 0 0-1.8 1.1z",
1095
+ strokeLinejoin: "round"
1096
+ })]
1097
+ })
1098
+ }),
1099
+ /* @__PURE__ */ d("h3", {
1100
+ className: "mt-4 font-display text-base font-semibold text-foreground",
1101
+ children: e
1102
+ }),
1103
+ t && /* @__PURE__ */ d("p", {
1104
+ className: "mt-1 max-w-sm text-sm text-muted-foreground",
1105
+ children: t
1106
+ }),
1107
+ r && /* @__PURE__ */ d("div", {
1108
+ className: "mt-5",
1109
+ children: r
1110
+ })
1111
+ ]
1112
+ });
1113
+ }
1114
+ //#endregion
1115
+ //#region src/components/OuSpinner.tsx
1116
+ var Me = {
1117
+ sm: "size-4",
1118
+ md: "size-6",
1119
+ lg: "size-8"
1120
+ };
1121
+ function Ne({ size: e = "md", label: t = "Загрузка", className: n, ...r }) {
1122
+ return /* @__PURE__ */ f("svg", {
1123
+ className: m("animate-spin text-primary", Me[e], n),
1124
+ viewBox: "0 0 24 24",
1125
+ fill: "none",
1126
+ role: "status",
1127
+ "aria-label": t,
1128
+ ...r,
1129
+ children: [/* @__PURE__ */ d("circle", {
1130
+ className: "opacity-20",
1131
+ cx: "12",
1132
+ cy: "12",
1133
+ r: "10",
1134
+ stroke: "currentColor",
1135
+ strokeWidth: "3"
1136
+ }), /* @__PURE__ */ d("path", {
1137
+ className: "opacity-90",
1138
+ fill: "currentColor",
1139
+ d: "M12 2a10 10 0 0 1 10 10h-3a7 7 0 0 0-7-7V2z"
1140
+ })]
1141
+ });
1142
+ }
1143
+ //#endregion
1144
+ //#region src/components/OuSkeleton.tsx
1145
+ function Pe({ className: e, ...t }) {
1146
+ return /* @__PURE__ */ d("div", {
1147
+ className: m("animate-pulse rounded-md bg-muted", e),
1148
+ "aria-hidden": "true",
1149
+ ...t
1150
+ });
1151
+ }
1152
+ //#endregion
1153
+ //#region src/components/OuToaster.tsx
1154
+ var Fe = {
1155
+ "bottom-right": "bottom-4 right-4 items-end",
1156
+ "bottom-left": "bottom-4 left-4 items-start",
1157
+ "top-right": "top-4 right-4 items-end",
1158
+ "top-left": "top-4 left-4 items-start"
1159
+ }, Z = {
1160
+ default: "text-primary",
1161
+ success: "text-success",
1162
+ error: "text-destructive",
1163
+ warning: "text-warning",
1164
+ info: "text-primary",
1165
+ loading: "text-muted-foreground"
1166
+ };
1167
+ function Ie({ position: e = "bottom-right" }) {
1168
+ let t = O();
1169
+ return typeof document > "u" ? null : p(/* @__PURE__ */ d("div", {
1170
+ className: m("pointer-events-none fixed z-[100] flex max-w-[calc(100vw-2rem)] flex-col gap-2", Fe[e]),
1171
+ children: t.map((e) => /* @__PURE__ */ f("div", {
1172
+ role: "status",
1173
+ className: "pointer-events-auto flex w-80 max-w-full items-start gap-3 rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-[var(--shadow-lift)]",
1174
+ children: [
1175
+ e.variant === "loading" ? /* @__PURE__ */ f("svg", {
1176
+ className: m("mt-0.5 size-5 shrink-0 animate-spin", Z[e.variant]),
1177
+ viewBox: "0 0 24 24",
1178
+ fill: "none",
1179
+ "aria-hidden": "true",
1180
+ children: [/* @__PURE__ */ d("circle", {
1181
+ className: "opacity-25",
1182
+ cx: "12",
1183
+ cy: "12",
1184
+ r: "9",
1185
+ stroke: "currentColor",
1186
+ strokeWidth: "3"
1187
+ }), /* @__PURE__ */ d("path", {
1188
+ className: "opacity-90",
1189
+ fill: "currentColor",
1190
+ d: "M12 3a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6V3z"
1191
+ })]
1192
+ }) : /* @__PURE__ */ f("svg", {
1193
+ className: m("mt-0.5 size-5 shrink-0", Z[e.variant]),
1194
+ viewBox: "0 0 24 24",
1195
+ fill: "none",
1196
+ stroke: "currentColor",
1197
+ strokeWidth: "2",
1198
+ "aria-hidden": "true",
1199
+ children: [
1200
+ /* @__PURE__ */ d("circle", {
1201
+ cx: "12",
1202
+ cy: "12",
1203
+ r: "9"
1204
+ }),
1205
+ e.variant === "success" && /* @__PURE__ */ d("path", {
1206
+ d: "m8.5 12 2.5 2.5 4.5-5",
1207
+ strokeLinecap: "round",
1208
+ strokeLinejoin: "round"
1209
+ }),
1210
+ e.variant === "error" && /* @__PURE__ */ d("path", {
1211
+ d: "m9 9 6 6M15 9l-6 6",
1212
+ strokeLinecap: "round"
1213
+ }),
1214
+ e.variant === "warning" && /* @__PURE__ */ d("path", {
1215
+ d: "M12 8v5M12 16h.01",
1216
+ strokeLinecap: "round"
1217
+ }),
1218
+ (e.variant === "default" || e.variant === "info") && /* @__PURE__ */ d("path", {
1219
+ d: "M12 11v5M12 8h.01",
1220
+ strokeLinecap: "round"
1221
+ })
1222
+ ]
1223
+ }),
1224
+ /* @__PURE__ */ f("div", {
1225
+ className: "min-w-0 flex-1",
1226
+ children: [
1227
+ /* @__PURE__ */ d("p", {
1228
+ className: "text-sm font-medium",
1229
+ children: e.title
1230
+ }),
1231
+ e.description && /* @__PURE__ */ d("p", {
1232
+ className: "mt-0.5 text-sm break-words text-muted-foreground",
1233
+ children: e.description
1234
+ }),
1235
+ e.action && /* @__PURE__ */ d("button", {
1236
+ type: "button",
1237
+ className: "mt-2 text-sm font-medium text-primary hover:underline focus-visible:outline-none",
1238
+ onClick: () => {
1239
+ e.action?.onClick(), D.dismiss(e.id);
1240
+ },
1241
+ children: e.action.label
1242
+ })
1243
+ ]
1244
+ }),
1245
+ /* @__PURE__ */ d("button", {
1246
+ type: "button",
1247
+ className: "grid size-6 shrink-0 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1248
+ "aria-label": "Закрыть",
1249
+ onClick: () => D.dismiss(e.id),
1250
+ children: /* @__PURE__ */ d("svg", {
1251
+ viewBox: "0 0 24 24",
1252
+ className: "size-4",
1253
+ fill: "none",
1254
+ stroke: "currentColor",
1255
+ strokeWidth: "2",
1256
+ children: /* @__PURE__ */ d("path", {
1257
+ d: "M6 6l12 12M18 6L6 18",
1258
+ strokeLinecap: "round"
1259
+ })
1260
+ })
1261
+ })
1262
+ ]
1263
+ }, e.id))
1264
+ }), document.body);
1265
+ }
1266
+ //#endregion
1267
+ //#region src/components/OuModal.tsx
1268
+ function Le({ open: e, onOpenChange: t, title: n, header: r, footer: i, className: o, children: s }) {
1269
+ return a(() => {
1270
+ if (!e) return;
1271
+ let n = (e) => {
1272
+ e.key === "Escape" && t(!1);
1273
+ };
1274
+ return window.addEventListener("keydown", n), document.body.style.overflow = "hidden", () => {
1275
+ window.removeEventListener("keydown", n), document.body.style.overflow = "";
1276
+ };
1277
+ }, [e, t]), !e || typeof document > "u" ? null : p(/* @__PURE__ */ f("div", {
1278
+ className: "fixed inset-0 z-50 flex items-center justify-center p-4",
1279
+ children: [/* @__PURE__ */ d("div", {
1280
+ className: "absolute inset-0 bg-black/50 backdrop-blur-sm",
1281
+ onClick: () => t(!1)
1282
+ }), /* @__PURE__ */ f("div", {
1283
+ role: "dialog",
1284
+ "aria-modal": !0,
1285
+ className: m("relative z-10 w-full max-w-lg rounded-2xl border border-border bg-card p-6 text-card-foreground shadow-[var(--shadow-lift)]", o),
1286
+ children: [
1287
+ (n || r) && /* @__PURE__ */ f("div", {
1288
+ className: "mb-4 flex items-start justify-between gap-4",
1289
+ children: [r ?? /* @__PURE__ */ d("h2", {
1290
+ className: "font-display text-lg font-semibold",
1291
+ children: n
1292
+ }), /* @__PURE__ */ d("button", {
1293
+ type: "button",
1294
+ className: "-mt-1 -mr-1 grid size-8 shrink-0 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1295
+ "aria-label": "Закрыть",
1296
+ onClick: () => t(!1),
1297
+ children: /* @__PURE__ */ d("svg", {
1298
+ viewBox: "0 0 24 24",
1299
+ className: "size-4",
1300
+ fill: "none",
1301
+ stroke: "currentColor",
1302
+ strokeWidth: "2",
1303
+ children: /* @__PURE__ */ d("path", {
1304
+ d: "M6 6l12 12M18 6L6 18",
1305
+ strokeLinecap: "round"
1306
+ })
1307
+ })
1308
+ })]
1309
+ }),
1310
+ /* @__PURE__ */ d("div", {
1311
+ className: "text-sm text-muted-foreground",
1312
+ children: s
1313
+ }),
1314
+ i && /* @__PURE__ */ d("div", {
1315
+ className: "mt-6 flex justify-end gap-2",
1316
+ children: i
1317
+ })
1318
+ ]
1319
+ })]
1320
+ }), document.body);
1321
+ }
1322
+ //#endregion
1323
+ //#region src/components/OuSheet.tsx
1324
+ var Re = {
1325
+ right: "inset-y-0 right-0 h-full w-80 max-w-[90vw] border-l",
1326
+ left: "inset-y-0 left-0 h-full w-80 max-w-[90vw] border-r",
1327
+ top: "inset-x-0 top-0 max-h-[90vh] w-full border-b",
1328
+ bottom: "inset-x-0 bottom-0 max-h-[90vh] w-full border-t"
1329
+ };
1330
+ function ze({ open: e, onOpenChange: t, side: n = "right", title: r, header: i, footer: o, className: s, children: c }) {
1331
+ return a(() => {
1332
+ if (!e) return;
1333
+ let n = (e) => {
1334
+ e.key === "Escape" && t(!1);
1335
+ };
1336
+ return window.addEventListener("keydown", n), document.body.style.overflow = "hidden", () => {
1337
+ window.removeEventListener("keydown", n), document.body.style.overflow = "";
1338
+ };
1339
+ }, [e, t]), !e || typeof document > "u" ? null : p(/* @__PURE__ */ f("div", {
1340
+ className: "fixed inset-0 z-50",
1341
+ children: [/* @__PURE__ */ d("div", {
1342
+ className: "absolute inset-0 bg-black/50 backdrop-blur-sm",
1343
+ onClick: () => t(!1)
1344
+ }), /* @__PURE__ */ f("div", {
1345
+ role: "dialog",
1346
+ "aria-modal": !0,
1347
+ className: m("absolute flex flex-col gap-4 border-border bg-card p-6 text-card-foreground shadow-[var(--shadow-lift)]", Re[n], s),
1348
+ children: [
1349
+ (r || i) && /* @__PURE__ */ f("div", {
1350
+ className: "flex items-start justify-between gap-4",
1351
+ children: [i ?? /* @__PURE__ */ d("h2", {
1352
+ className: "font-display text-lg font-semibold",
1353
+ children: r
1354
+ }), /* @__PURE__ */ d("button", {
1355
+ type: "button",
1356
+ className: "-mt-1 -mr-1 grid size-8 shrink-0 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1357
+ "aria-label": "Закрыть",
1358
+ onClick: () => t(!1),
1359
+ children: /* @__PURE__ */ d("svg", {
1360
+ viewBox: "0 0 24 24",
1361
+ className: "size-4",
1362
+ fill: "none",
1363
+ stroke: "currentColor",
1364
+ strokeWidth: "2",
1365
+ children: /* @__PURE__ */ d("path", {
1366
+ d: "M6 6l12 12M18 6L6 18",
1367
+ strokeLinecap: "round"
1368
+ })
1369
+ })
1370
+ })]
1371
+ }),
1372
+ /* @__PURE__ */ d("div", {
1373
+ className: "min-h-0 flex-1 overflow-y-auto",
1374
+ children: c
1375
+ }),
1376
+ o && /* @__PURE__ */ d("div", {
1377
+ className: "flex justify-end gap-2",
1378
+ children: o
1379
+ })
1380
+ ]
1381
+ })]
1382
+ }), document.body);
1383
+ }
1384
+ //#endregion
1385
+ //#region src/components/OuDropdown.tsx
1386
+ function Be({ trigger: e, align: t = "start", className: n, children: r }) {
1387
+ let [o, l] = c(!1), u = s(null), h = s(null), [g, _] = c({ top: 0 }), v = i(() => {
1388
+ let e = u.current;
1389
+ if (!e) return;
1390
+ let n = e.getBoundingClientRect();
1391
+ _(t === "end" ? {
1392
+ top: n.bottom + 8,
1393
+ right: window.innerWidth - n.right
1394
+ } : {
1395
+ top: n.bottom + 8,
1396
+ left: n.left
1397
+ });
1398
+ }, [t]);
1399
+ return a(() => {
1400
+ if (!o) return;
1401
+ v();
1402
+ let e = (e) => {
1403
+ let t = e.target;
1404
+ !u.current?.contains(t) && !h.current?.contains(t) && l(!1);
1405
+ }, t = (e) => {
1406
+ e.key === "Escape" && l(!1);
1407
+ };
1408
+ return document.addEventListener("mousedown", e), window.addEventListener("keydown", t), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), () => {
1409
+ document.removeEventListener("mousedown", e), window.removeEventListener("keydown", t), window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
1410
+ };
1411
+ }, [o, v]), /* @__PURE__ */ f("div", {
1412
+ ref: u,
1413
+ className: "relative inline-block text-left",
1414
+ children: [/* @__PURE__ */ d("div", {
1415
+ onClick: () => l((e) => !e),
1416
+ children: e
1417
+ }), o && typeof document < "u" && p(/* @__PURE__ */ d("div", {
1418
+ ref: h,
1419
+ role: "menu",
1420
+ onClick: (e) => {
1421
+ e.target.closest("[role=\"menuitem\"]") && l(!1);
1422
+ },
1423
+ style: {
1424
+ position: "fixed",
1425
+ top: g.top,
1426
+ left: g.left,
1427
+ right: g.right
1428
+ },
1429
+ className: m("z-[60] min-w-44 origin-top rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-[var(--shadow-lift)]", n),
1430
+ children: r
1431
+ }), document.body)]
1432
+ });
1433
+ }
1434
+ //#endregion
1435
+ //#region src/components/OuDropdownItem.tsx
1436
+ function Ve({ destructive: e, className: t, children: n, ...r }) {
1437
+ return /* @__PURE__ */ d("button", {
1438
+ type: "button",
1439
+ role: "menuitem",
1440
+ className: m("flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-left text-sm transition-colors focus-visible:outline-none", e ? "text-destructive hover:bg-destructive/10" : "text-foreground hover:bg-accent hover:text-accent-foreground", t),
1441
+ ...r,
1442
+ children: n
1443
+ });
1444
+ }
1445
+ //#endregion
1446
+ //#region src/components/OuPopover.tsx
1447
+ function He({ trigger: e, align: t = "start", className: n, children: r }) {
1448
+ let [o, l] = c(!1), u = s(null), h = s(null), [g, _] = c({ top: 0 }), v = i(() => {
1449
+ let e = u.current;
1450
+ if (!e) return;
1451
+ let n = e.getBoundingClientRect();
1452
+ _(t === "end" ? {
1453
+ top: n.bottom + 8,
1454
+ right: window.innerWidth - n.right
1455
+ } : {
1456
+ top: n.bottom + 8,
1457
+ left: n.left
1458
+ });
1459
+ }, [t]);
1460
+ return a(() => {
1461
+ if (!o) return;
1462
+ v();
1463
+ let e = (e) => {
1464
+ let t = e.target;
1465
+ !u.current?.contains(t) && !h.current?.contains(t) && l(!1);
1466
+ }, t = (e) => {
1467
+ e.key === "Escape" && l(!1);
1468
+ };
1469
+ return document.addEventListener("mousedown", e), window.addEventListener("keydown", t), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), () => {
1470
+ document.removeEventListener("mousedown", e), window.removeEventListener("keydown", t), window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
1471
+ };
1472
+ }, [o, v]), /* @__PURE__ */ f("div", {
1473
+ ref: u,
1474
+ className: "relative inline-block",
1475
+ children: [/* @__PURE__ */ d("div", {
1476
+ onClick: () => l((e) => !e),
1477
+ children: e
1478
+ }), o && typeof document < "u" && p(/* @__PURE__ */ d("div", {
1479
+ ref: h,
1480
+ style: {
1481
+ position: "fixed",
1482
+ top: g.top,
1483
+ left: g.left,
1484
+ right: g.right
1485
+ },
1486
+ className: m("z-[60] w-64 rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-[var(--shadow-lift)]", n),
1487
+ children: r
1488
+ }), document.body)]
1489
+ });
1490
+ }
1491
+ //#endregion
1492
+ //#region src/components/OuTooltip.tsx
1493
+ var Q = {
1494
+ top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
1495
+ bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
1496
+ left: "right-full top-1/2 -translate-y-1/2 mr-2",
1497
+ right: "left-full top-1/2 -translate-y-1/2 ml-2"
1498
+ };
1499
+ function Ue({ text: e, side: t = "top", className: n, children: r }) {
1500
+ let [i, a] = c(!1);
1501
+ return /* @__PURE__ */ f("span", {
1502
+ className: "relative inline-flex",
1503
+ onMouseEnter: () => a(!0),
1504
+ onMouseLeave: () => a(!1),
1505
+ onFocus: () => a(!0),
1506
+ onBlur: () => a(!1),
1507
+ children: [r, i && /* @__PURE__ */ d("span", {
1508
+ role: "tooltip",
1509
+ className: m("absolute z-50 whitespace-nowrap rounded-md bg-foreground px-2 py-1 text-xs font-medium text-background shadow-md", Q[t], n),
1510
+ children: e
1511
+ })]
1512
+ });
1513
+ }
1514
+ //#endregion
1515
+ //#region src/components/OuTabs.tsx
1516
+ function We({ tabs: e, value: t, onValueChange: n, panels: r, className: i }) {
1517
+ let a = t !== void 0, [o, s] = c(() => t ?? e[0]?.value), l = a ? t : o, u = (e) => {
1518
+ a || s(e), n?.(e);
1519
+ };
1520
+ return /* @__PURE__ */ f("div", {
1521
+ className: i,
1522
+ children: [/* @__PURE__ */ d("div", {
1523
+ role: "tablist",
1524
+ className: "flex gap-1 border-b border-border",
1525
+ children: e.map((e) => /* @__PURE__ */ d("button", {
1526
+ type: "button",
1527
+ role: "tab",
1528
+ "aria-selected": l === e.value,
1529
+ className: m("relative px-3.5 py-2.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", l === e.value ? "text-foreground after:absolute after:-bottom-px after:left-0 after:h-0.5 after:w-full after:rounded-full after:bg-primary" : "text-muted-foreground hover:text-foreground"),
1530
+ onClick: () => u(e.value),
1531
+ children: e.label
1532
+ }, e.value))
1533
+ }), /* @__PURE__ */ d("div", {
1534
+ className: "pt-4",
1535
+ children: /* @__PURE__ */ d("div", {
1536
+ role: "tabpanel",
1537
+ children: l == null ? null : r?.[l]
1538
+ })
1539
+ })]
1540
+ });
1541
+ }
1542
+ //#endregion
1543
+ //#region src/components/OuSteps.tsx
1544
+ function Ge({ steps: e, current: t = 0, className: r }) {
1545
+ return /* @__PURE__ */ d("ol", {
1546
+ className: m("flex items-start", r),
1547
+ children: e.map((r, i) => /* @__PURE__ */ f(n, { children: [/* @__PURE__ */ f("li", {
1548
+ className: "flex flex-col items-center gap-2 text-center",
1549
+ children: [/* @__PURE__ */ d("span", {
1550
+ className: m("grid size-8 shrink-0 place-items-center rounded-full border-2 text-sm font-semibold transition-colors", i < t ? "border-primary bg-primary text-primary-foreground" : i === t ? "border-primary text-primary" : "border-border text-muted-foreground"),
1551
+ children: i < t ? /* @__PURE__ */ d("svg", {
1552
+ className: "size-4",
1553
+ viewBox: "0 0 24 24",
1554
+ fill: "none",
1555
+ stroke: "currentColor",
1556
+ strokeWidth: "3",
1557
+ "aria-hidden": "true",
1558
+ children: /* @__PURE__ */ d("path", {
1559
+ d: "M20 6 9 17l-5-5",
1560
+ strokeLinecap: "round",
1561
+ strokeLinejoin: "round"
1562
+ })
1563
+ }) : i + 1
1564
+ }), /* @__PURE__ */ f("div", {
1565
+ className: "px-1",
1566
+ children: [/* @__PURE__ */ d("p", {
1567
+ className: m("text-sm font-medium", i <= t ? "text-foreground" : "text-muted-foreground"),
1568
+ children: r.label
1569
+ }), r.description && /* @__PURE__ */ d("p", {
1570
+ className: "mt-0.5 text-xs text-muted-foreground",
1571
+ children: r.description
1572
+ })]
1573
+ })]
1574
+ }), i < e.length - 1 && /* @__PURE__ */ d("span", { className: m("mt-4 h-0.5 min-w-6 flex-1 rounded-full", i < t ? "bg-primary" : "bg-border") })] }, i))
1575
+ });
1576
+ }
1577
+ //#endregion
1578
+ //#region src/components/OuAccordion.tsx
1579
+ function Ke({ items: e, multiple: t, className: n }) {
1580
+ let [r, i] = c([]), a = (e) => {
1581
+ i((n) => n.includes(e) ? n.filter((t) => t !== e) : t ? [...n, e] : [e]);
1582
+ };
1583
+ return /* @__PURE__ */ d("div", {
1584
+ className: m("divide-y divide-border overflow-hidden rounded-xl border border-border", n),
1585
+ children: e.map((e) => {
1586
+ let t = r.includes(e.value);
1587
+ return /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("button", {
1588
+ type: "button",
1589
+ "aria-expanded": t,
1590
+ className: "flex w-full items-center justify-between gap-3 px-4 py-3.5 text-left text-sm font-medium text-foreground transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
1591
+ onClick: () => a(e.value),
1592
+ children: [e.title, /* @__PURE__ */ d("svg", {
1593
+ className: m("size-4 shrink-0 text-muted-foreground transition-transform", t && "rotate-180"),
1594
+ viewBox: "0 0 24 24",
1595
+ fill: "none",
1596
+ stroke: "currentColor",
1597
+ strokeWidth: "2",
1598
+ "aria-hidden": "true",
1599
+ children: /* @__PURE__ */ d("path", {
1600
+ d: "m6 9 6 6 6-6",
1601
+ strokeLinecap: "round",
1602
+ strokeLinejoin: "round"
1603
+ })
1604
+ })]
1605
+ }), t && /* @__PURE__ */ d("div", {
1606
+ className: "px-4 pb-4 text-sm text-muted-foreground",
1607
+ children: e.content
1608
+ })] }, e.value);
1609
+ })
1610
+ });
1611
+ }
1612
+ //#endregion
1613
+ //#region src/components/OuBreadcrumb.tsx
1614
+ function qe({ items: e, className: t }) {
1615
+ return /* @__PURE__ */ d("nav", {
1616
+ "aria-label": "Навигационная цепочка",
1617
+ className: t,
1618
+ children: /* @__PURE__ */ d("ol", {
1619
+ className: "flex flex-wrap items-center gap-1.5 text-sm",
1620
+ children: e.map((t, n) => {
1621
+ let r = n === e.length - 1;
1622
+ return /* @__PURE__ */ f("li", {
1623
+ className: "flex items-center gap-1.5",
1624
+ children: [t.href && !r ? /* @__PURE__ */ d("a", {
1625
+ href: t.href,
1626
+ className: "text-muted-foreground transition-colors hover:text-foreground",
1627
+ children: t.label
1628
+ }) : /* @__PURE__ */ d("span", {
1629
+ className: m(r ? "font-medium text-foreground" : "text-muted-foreground"),
1630
+ "aria-current": r ? "page" : void 0,
1631
+ children: t.label
1632
+ }), !r && /* @__PURE__ */ d("svg", {
1633
+ className: "size-4 text-muted-foreground/50",
1634
+ viewBox: "0 0 24 24",
1635
+ fill: "none",
1636
+ stroke: "currentColor",
1637
+ strokeWidth: "2",
1638
+ "aria-hidden": "true",
1639
+ children: /* @__PURE__ */ d("path", {
1640
+ d: "m9 18 6-6-6-6",
1641
+ strokeLinecap: "round",
1642
+ strokeLinejoin: "round"
1643
+ })
1644
+ })]
1645
+ }, n);
1646
+ })
1647
+ })
1648
+ });
1649
+ }
1650
+ //#endregion
1651
+ //#region src/components/OuPagination.tsx
1652
+ var $ = "grid h-9 min-w-9 place-items-center rounded-md border border-border bg-background px-2 text-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
1653
+ function Je(e, t) {
1654
+ let n = e;
1655
+ if (n <= 7) return Array.from({ length: n }, (e, t) => t + 1);
1656
+ let r = [.../* @__PURE__ */ new Set([
1657
+ 1,
1658
+ n,
1659
+ t,
1660
+ t - 1,
1661
+ t + 1
1662
+ ])].filter((e) => e >= 1 && e <= n).sort((e, t) => e - t), i = [], a = 0;
1663
+ for (let e of r) e - a > 1 && i.push("…"), i.push(e), a = e;
1664
+ return i;
1665
+ }
1666
+ function Ye({ total: e, page: t, onPageChange: n, className: r }) {
1667
+ let i = t ?? 1, a = Je(e, i), o = (t) => {
1668
+ n?.(Math.max(1, Math.min(e, t)));
1669
+ };
1670
+ return /* @__PURE__ */ f("nav", {
1671
+ className: m("flex items-center gap-1.5", r),
1672
+ "aria-label": "Пагинация",
1673
+ children: [
1674
+ /* @__PURE__ */ d("button", {
1675
+ type: "button",
1676
+ className: $,
1677
+ disabled: i <= 1,
1678
+ "aria-label": "Назад",
1679
+ onClick: () => o(i - 1),
1680
+ children: /* @__PURE__ */ d("svg", {
1681
+ className: "size-4",
1682
+ viewBox: "0 0 24 24",
1683
+ fill: "none",
1684
+ stroke: "currentColor",
1685
+ strokeWidth: "2",
1686
+ children: /* @__PURE__ */ d("path", {
1687
+ d: "m15 18-6-6 6-6",
1688
+ strokeLinecap: "round",
1689
+ strokeLinejoin: "round"
1690
+ })
1691
+ })
1692
+ }),
1693
+ a.map((e, t) => e === "…" ? /* @__PURE__ */ d("span", {
1694
+ className: "grid h-9 w-9 place-items-center text-sm text-muted-foreground",
1695
+ children: "…"
1696
+ }, t) : /* @__PURE__ */ d("button", {
1697
+ type: "button",
1698
+ "aria-current": i === e ? "page" : void 0,
1699
+ className: m("grid h-9 min-w-9 place-items-center rounded-md px-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", i === e ? "bg-primary text-primary-foreground" : "border border-border bg-background hover:bg-accent hover:text-accent-foreground"),
1700
+ onClick: () => o(e),
1701
+ children: e
1702
+ }, t)),
1703
+ /* @__PURE__ */ d("button", {
1704
+ type: "button",
1705
+ className: $,
1706
+ disabled: i >= e,
1707
+ "aria-label": "Вперёд",
1708
+ onClick: () => o(i + 1),
1709
+ children: /* @__PURE__ */ d("svg", {
1710
+ className: "size-4",
1711
+ viewBox: "0 0 24 24",
1712
+ fill: "none",
1713
+ stroke: "currentColor",
1714
+ strokeWidth: "2",
1715
+ children: /* @__PURE__ */ d("path", {
1716
+ d: "m9 18 6-6-6-6",
1717
+ strokeLinecap: "round",
1718
+ strokeLinejoin: "round"
1719
+ })
1720
+ })
1721
+ })
1722
+ ]
1723
+ });
1724
+ }
1725
+ //#endregion
1726
+ export { Ke as OuAccordion, De as OuAlert, me as OuAvatar, he as OuAvatarGroup, M as OuBadge, Ae as OuBanner, qe as OuBreadcrumb, te as OuButton, ne as OuButtonGroup, P as OuCard, K as OuCheckbox, q as OuCheckboxGroup, z as OuCode, Be as OuDropdown, Ve as OuDropdownItem, je as OuEmptyState, V as OuInput, R as OuKbd, k as OuLabel, ae as OuLink, F as OuList, I as OuListItem, _e as OuMeter, Le as OuModal, G as OuNumberInput, Ye as OuPagination, He as OuPopover, ye as OuProgress, xe as OuProgressRing, J as OuRadioGroup, ue as OuRating, ce as OuSegmented, U as OuSelect, L as OuSeparator, ze as OuSheet, Pe as OuSkeleton, se as OuSlider, Ne as OuSpinner, ge as OuStat, Ge as OuSteps, oe as OuSwitch, Se as OuTable, We as OuTabs, N as OuTag, le as OuTagInput, H as OuTextarea, we as OuTimeline, ke as OuToast, Ie as OuToaster, re as OuToggle, Ue as OuTooltip, m as cn, v as ouButtonClasses, D as ouToast, O as useOuToasts };