neo-lite 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 (52) hide show
  1. package/README.md +332 -0
  2. package/package-dist/assets/icons/Icon.d.ts +23 -0
  3. package/package-dist/assets/icons/Icon.d.ts.map +1 -0
  4. package/package-dist/components/badge/Badge.d.ts +8 -0
  5. package/package-dist/components/badge/Badge.d.ts.map +1 -0
  6. package/package-dist/components/badge/index.d.ts +3 -0
  7. package/package-dist/components/badge/index.d.ts.map +1 -0
  8. package/package-dist/components/button/Button.d.ts +11 -0
  9. package/package-dist/components/button/Button.d.ts.map +1 -0
  10. package/package-dist/components/button/index.d.ts +3 -0
  11. package/package-dist/components/button/index.d.ts.map +1 -0
  12. package/package-dist/components/card/Card.d.ts +11 -0
  13. package/package-dist/components/card/Card.d.ts.map +1 -0
  14. package/package-dist/components/card/index.d.ts +3 -0
  15. package/package-dist/components/card/index.d.ts.map +1 -0
  16. package/package-dist/components/checkbox/Checkbox.d.ts +7 -0
  17. package/package-dist/components/checkbox/Checkbox.d.ts.map +1 -0
  18. package/package-dist/components/checkbox/index.d.ts +3 -0
  19. package/package-dist/components/checkbox/index.d.ts.map +1 -0
  20. package/package-dist/components/dialog/Dialog.d.ts +12 -0
  21. package/package-dist/components/dialog/Dialog.d.ts.map +1 -0
  22. package/package-dist/components/dialog/index.d.ts +3 -0
  23. package/package-dist/components/dialog/index.d.ts.map +1 -0
  24. package/package-dist/components/input/Input.d.ts +11 -0
  25. package/package-dist/components/input/Input.d.ts.map +1 -0
  26. package/package-dist/components/input/index.d.ts +3 -0
  27. package/package-dist/components/input/index.d.ts.map +1 -0
  28. package/package-dist/components/menu/Menu.d.ts +6 -0
  29. package/package-dist/components/menu/Menu.d.ts.map +1 -0
  30. package/package-dist/components/menu/MenuItem.d.ts +7 -0
  31. package/package-dist/components/menu/MenuItem.d.ts.map +1 -0
  32. package/package-dist/components/menu/index.d.ts +5 -0
  33. package/package-dist/components/menu/index.d.ts.map +1 -0
  34. package/package-dist/components/menu/styles.d.ts +6 -0
  35. package/package-dist/components/menu/styles.d.ts.map +1 -0
  36. package/package-dist/components/selection/Selection.d.ts +21 -0
  37. package/package-dist/components/selection/Selection.d.ts.map +1 -0
  38. package/package-dist/components/selection/index.d.ts +3 -0
  39. package/package-dist/components/selection/index.d.ts.map +1 -0
  40. package/package-dist/components/tabs/Tab.d.ts +7 -0
  41. package/package-dist/components/tabs/Tab.d.ts.map +1 -0
  42. package/package-dist/components/tabs/Tabs.d.ts +23 -0
  43. package/package-dist/components/tabs/Tabs.d.ts.map +1 -0
  44. package/package-dist/components/tabs/index.d.ts +5 -0
  45. package/package-dist/components/tabs/index.d.ts.map +1 -0
  46. package/package-dist/index.d.ts +19 -0
  47. package/package-dist/index.d.ts.map +1 -0
  48. package/package-dist/index.js +879 -0
  49. package/package-dist/neo-lite.css +1 -0
  50. package/package-dist/utils/cn.d.ts +2 -0
  51. package/package-dist/utils/cn.d.ts.map +1 -0
  52. package/package.json +69 -0
@@ -0,0 +1,879 @@
1
+ import { jsxs as x, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as U, useRef as z, useImperativeHandle as W, useEffect as D, useId as F, useState as A, useMemo as S, useCallback as R, useContext as r1, createContext as o1 } from "react";
3
+ import { createPortal as s1 } from "react-dom";
4
+ function u(...e) {
5
+ return e.filter(Boolean).join(" ");
6
+ }
7
+ const i1 = {
8
+ accent: "border border-border bg-accent text-foreground",
9
+ secondary: "border border-border bg-secondary text-foreground",
10
+ primary: "border border-border bg-primary text-primary-foreground",
11
+ destructive: "border border-destructive-border bg-destructive text-foreground"
12
+ };
13
+ function A1({
14
+ variant: e = "accent",
15
+ leadingIcon: n,
16
+ className: l,
17
+ children: i,
18
+ ...d
19
+ }) {
20
+ return /* @__PURE__ */ x(
21
+ "span",
22
+ {
23
+ className: u(
24
+ "inline-flex w-fit items-center justify-center px-2 py-1 font-sans text-xs font-normal leading-[160%] [&_svg]:shrink-0 [&_[data-neo-lite-icon]]:shrink-0 [&_[data-neo-lite-icon]]:size-4",
25
+ i1[e],
26
+ l
27
+ ),
28
+ ...d,
29
+ children: [
30
+ n ? /* @__PURE__ */ r("span", { className: "inline-flex size-4 shrink-0 items-center justify-center", children: n }) : null,
31
+ /* @__PURE__ */ r("span", { className: n ? "px-2" : void 0, children: i })
32
+ ]
33
+ }
34
+ );
35
+ }
36
+ const l1 = {
37
+ accent: "bg-accent text-accent-foreground border-border",
38
+ primary: "bg-primary text-primary-foreground border-border group-hover/button:bg-primary-hover",
39
+ secondary: "bg-secondary text-secondary-foreground border-border",
40
+ destructive: "bg-destructive text-destructive-foreground border-destructive-border"
41
+ }, a1 = {
42
+ accent: "focus-visible:shadow-focus",
43
+ primary: "focus-visible:shadow-focus",
44
+ secondary: "focus-visible:shadow-focus",
45
+ destructive: "focus-visible:shadow-destructive-focus"
46
+ }, d1 = {
47
+ xs: "h-[var(--button-height-xs)] px-2 gap-1 rounded-sm text-sm [&:has(>svg:only-child)]:w-[var(--button-height-xs)] [&:has(>[data-neo-lite-icon]:only-child)]:w-[var(--button-height-xs)]",
48
+ sm: "h-[var(--button-height-sm)] px-3 gap-2 rounded-sm text-base [&:has(>svg:only-child)]:w-[var(--button-height-sm)] [&:has(>[data-neo-lite-icon]:only-child)]:w-[var(--button-height-sm)]",
49
+ lg: "h-[var(--button-height-lg)] px-4 gap-3 rounded-sm text-xl [&:has(>svg:only-child)]:w-[var(--button-height-lg)] [&:has(>[data-neo-lite-icon]:only-child)]:w-[var(--button-height-lg)]"
50
+ }, V = {
51
+ xs: "size-5",
52
+ sm: "size-6",
53
+ lg: "size-6"
54
+ }, c1 = {
55
+ xs: "[&_svg]:size-5 [&_[data-neo-lite-icon]]:size-5",
56
+ sm: "[&_svg]:size-6 [&_[data-neo-lite-icon]]:size-6",
57
+ lg: "[&_svg]:size-6 [&_[data-neo-lite-icon]]:size-6"
58
+ };
59
+ function B1({
60
+ variant: e = "accent",
61
+ size: n = "xs",
62
+ type: l = "button",
63
+ leadingIcon: i,
64
+ trailingIcon: d,
65
+ className: b,
66
+ children: h,
67
+ ...c
68
+ }) {
69
+ return /* @__PURE__ */ r(
70
+ "button",
71
+ {
72
+ type: l,
73
+ className: u(
74
+ "group/button inline-flex w-fit rounded-sm focus-visible:outline-none disabled:pointer-events-none disabled:opacity-[var(--disabled-opacity)]",
75
+ a1[e],
76
+ b
77
+ ),
78
+ ...c,
79
+ children: /* @__PURE__ */ x(
80
+ "span",
81
+ {
82
+ className: u(
83
+ "pointer-events-none inline-flex items-center justify-center border font-sans font-normal leading-none transition-[background-color,box-shadow,transform] duration-[var(--duration)] ease-[var(--easing)] group-hover/button:translate-y-[var(--transform-hover-offset)] group-hover/button:shadow-md motion-reduce:transition-none motion-reduce:group-hover/button:translate-y-0 [&_svg]:shrink-0 [&_[data-neo-lite-icon]]:shrink-0",
84
+ d1[n],
85
+ c1[n],
86
+ l1[e]
87
+ ),
88
+ children: [
89
+ i ? /* @__PURE__ */ r(
90
+ "span",
91
+ {
92
+ "aria-hidden": "true",
93
+ className: u("inline-flex items-center justify-center", V[n]),
94
+ children: i
95
+ }
96
+ ) : null,
97
+ h,
98
+ d ? /* @__PURE__ */ r(
99
+ "span",
100
+ {
101
+ "aria-hidden": "true",
102
+ className: u("inline-flex items-center justify-center", V[n]),
103
+ children: d
104
+ }
105
+ ) : null
106
+ ]
107
+ }
108
+ )
109
+ }
110
+ );
111
+ }
112
+ function H1({
113
+ image: e,
114
+ badges: n,
115
+ subtitle: l,
116
+ title: i,
117
+ children: d,
118
+ footer: b,
119
+ className: h,
120
+ ...c
121
+ }) {
122
+ return /* @__PURE__ */ r(
123
+ "div",
124
+ {
125
+ className: u(
126
+ "group/card w-full rounded-sm",
127
+ h
128
+ ),
129
+ ...c,
130
+ children: /* @__PURE__ */ x(
131
+ "div",
132
+ {
133
+ className: u(
134
+ "flex w-full overflow-hidden rounded-sm border border-border bg-card text-card-foreground transition-[box-shadow,transform] duration-[var(--duration)] ease-[var(--easing)] group-hover/card:translate-y-[var(--transform-hover-offset)] group-hover/card:shadow-md motion-reduce:transition-none motion-reduce:group-hover/card:translate-y-0",
135
+ "flex-col"
136
+ ),
137
+ children: [
138
+ e ? /* @__PURE__ */ r(
139
+ "div",
140
+ {
141
+ className: u(
142
+ "overflow-hidden bg-muted [&>img]:size-full [&>img]:object-cover",
143
+ "aspect-[343/206] w-full border-b border-border"
144
+ ),
145
+ children: e
146
+ }
147
+ ) : null,
148
+ /* @__PURE__ */ x("div", { className: "flex min-w-0 flex-1 flex-col", children: [
149
+ /* @__PURE__ */ x("div", { className: "grid w-full gap-2 px-4 pt-4", children: [
150
+ n ? /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2", children: n }) : null,
151
+ l ? /* @__PURE__ */ r("div", { className: "font-sans text-base font-light leading-[160%] text-card-foreground", children: l }) : null,
152
+ /* @__PURE__ */ r("div", { className: "font-sans text-lg font-medium leading-[140%] text-card-foreground", children: i })
153
+ ] }),
154
+ d ? /* @__PURE__ */ r(
155
+ "div",
156
+ {
157
+ className: u(
158
+ "w-full px-4 pb-4 pt-2 font-sans text-base font-normal leading-[160%] text-card-foreground",
159
+ "flex-1"
160
+ ),
161
+ children: d
162
+ }
163
+ ) : null,
164
+ b ? /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-end gap-2 p-4", children: b }) : null
165
+ ] })
166
+ ]
167
+ }
168
+ )
169
+ }
170
+ );
171
+ }
172
+ const u1 = U(
173
+ ({
174
+ indeterminate: e = !1,
175
+ error: n = !1,
176
+ disabled: l,
177
+ className: i,
178
+ "aria-invalid": d,
179
+ ...b
180
+ }, h) => {
181
+ const c = z(null);
182
+ return W(h, () => c.current, []), D(() => {
183
+ c.current && (c.current.indeterminate = e);
184
+ }, [e]), /* @__PURE__ */ x(
185
+ "span",
186
+ {
187
+ className: u(
188
+ "relative inline-grid size-4 place-items-center align-middle",
189
+ l && "opacity-[var(--disabled-opacity)]",
190
+ i
191
+ ),
192
+ "data-indeterminate": e || void 0,
193
+ "data-error": n || void 0,
194
+ children: [
195
+ /* @__PURE__ */ r(
196
+ "input",
197
+ {
198
+ ...b,
199
+ ref: c,
200
+ type: "checkbox",
201
+ disabled: l,
202
+ "aria-invalid": d ?? (n ? !0 : void 0),
203
+ className: "peer absolute inset-0 z-10 size-4 cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed"
204
+ }
205
+ ),
206
+ /* @__PURE__ */ r(
207
+ "span",
208
+ {
209
+ "aria-hidden": "true",
210
+ className: u(
211
+ "pointer-events-none absolute m-px size-3.5 border bg-background",
212
+ n ? "border-destructive-border" : "border-border",
213
+ "peer-checked:m-0 peer-checked:size-4 peer-checked:border-border peer-checked:bg-accent peer-checked:shadow-sm peer-focus-visible:shadow-focus",
214
+ "peer-checked:peer-focus-visible:shadow-[var(--selected-focus-shadow)]",
215
+ n && "peer-checked:border-destructive-border peer-checked:bg-destructive peer-focus-visible:shadow-destructive-focus peer-checked:peer-focus-visible:shadow-[var(--selected-destructive-focus-shadow)]",
216
+ e && "m-0 size-4 border-border bg-accent shadow-sm peer-focus-visible:shadow-[var(--selected-focus-shadow)]",
217
+ !e && "[&_svg]:hidden peer-checked:[&_svg]:block"
218
+ ),
219
+ children: /* @__PURE__ */ r(
220
+ "svg",
221
+ {
222
+ viewBox: "0 0 14 14",
223
+ fill: "none",
224
+ className: u("size-3.5 text-foreground", e && "block"),
225
+ children: e ? /* @__PURE__ */ r(
226
+ "path",
227
+ {
228
+ d: "M3 7h8",
229
+ stroke: "currentColor",
230
+ strokeWidth: "2",
231
+ strokeLinecap: "square"
232
+ }
233
+ ) : /* @__PURE__ */ r(
234
+ "path",
235
+ {
236
+ d: "M3 7.25 5.75 10 11 4",
237
+ stroke: "currentColor",
238
+ strokeWidth: "2",
239
+ strokeLinecap: "square",
240
+ strokeLinejoin: "miter"
241
+ }
242
+ )
243
+ }
244
+ )
245
+ }
246
+ )
247
+ ]
248
+ }
249
+ );
250
+ }
251
+ );
252
+ u1.displayName = "Checkbox";
253
+ const f1 = `<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
254
+ <g id="Icon">
255
+ <g id="Vector">
256
+ <path d="M11.6465 3.64648C11.8417 3.45122 12.1583 3.45122 12.3535 3.64648C12.5488 3.84175 12.5488 4.15825 12.3535 4.35352L4.35352 12.3535C4.15825 12.5488 3.84175 12.5488 3.64648 12.3535C3.45122 12.1583 3.45122 11.8417 3.64648 11.6465L11.6465 3.64648Z" fill="black"/>
257
+ <path d="M3.64648 3.64648C3.84175 3.45122 4.15825 3.45122 4.35352 3.64648L12.3535 11.6465C12.5488 11.8417 12.5488 12.1583 12.3535 12.3535C12.1583 12.5488 11.8417 12.5488 11.6465 12.3535L3.64648 4.35352C3.45122 4.15825 3.45122 3.84175 3.64648 3.64648Z" fill="black"/>
258
+ </g>
259
+ </g>
260
+ </svg>
261
+ `, h1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
262
+ <path d="M19 11.25C19.4142 11.25 19.75 11.5858 19.75 12C19.75 12.4142 19.4142 12.75 19 12.75H5C4.58579 12.75 4.25 12.4142 4.25 12C4.25 11.5858 4.58579 11.25 5 11.25H19Z" fill="black"/>
263
+ <path d="M11.4697 4.46973C11.7626 4.17684 12.2374 4.17684 12.5303 4.46973L19.5303 11.4697C19.8232 11.7626 19.8232 12.2374 19.5303 12.5303L12.5303 19.5303C12.2374 19.8232 11.7626 19.8232 11.4697 19.5303C11.1768 19.2374 11.1768 18.7626 11.4697 18.4697L17.9395 12L11.4697 5.53028C11.1768 5.23738 11.1768 4.76262 11.4697 4.46973Z" fill="black"/>
264
+ </svg>
265
+ `, b1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
266
+ <path d="M8.23077 1C7.37392 1 6.55216 1.34768 5.94627 1.96655C5.34038 2.58542 5 3.42479 5 4.3C5 5.17521 5.34038 6.01458 5.94627 6.63345C6.55216 7.25232 7.37392 7.6 8.23077 7.6H15.7692C16.6261 7.6 17.4478 7.25232 18.0537 6.63345C18.6596 6.01458 19 5.17521 19 4.3C19 3.42479 18.6596 2.58542 18.0537 1.96655C17.4478 1.34768 16.6261 1 15.7692 1H8.23077ZM15.7692 8.7C14.9124 8.7 14.0906 9.04768 13.4847 9.66655C12.8788 10.2854 12.5385 11.1248 12.5385 12C12.5385 12.8752 12.8788 13.7146 13.4847 14.3335C14.0906 14.9523 14.9124 15.3 15.7692 15.3C16.6261 15.3 17.4478 14.9523 18.0537 14.3335C18.6596 13.7146 19 12.8752 19 12C19 11.1248 18.6596 10.2854 18.0537 9.66655C17.4478 9.04768 16.6261 8.7 15.7692 8.7ZM5 12C5 11.1248 5.34038 10.2854 5.94627 9.66655C6.55216 9.04768 7.37392 8.7 8.23077 8.7H11.4615V15.3H8.23077C7.37392 15.3 6.55216 14.9523 5.94627 14.3335C5.34038 13.7146 5 12.8752 5 12ZM8.23077 16.4C7.59178 16.4 6.96715 16.5935 6.43585 16.9561C5.90455 17.3188 5.49046 17.8341 5.24593 18.4371C5.0014 19.0401 4.93742 19.7037 5.06208 20.3438C5.18674 20.9839 5.49444 21.5719 5.94627 22.0335C6.3981 22.495 6.97377 22.8093 7.60048 22.9366C8.22719 23.0639 8.87679 22.9986 9.46713 22.7488C10.0575 22.499 10.5621 22.0761 10.9171 21.5334C11.2721 20.9907 11.4615 20.3527 11.4615 19.7V16.4H8.23077Z" fill="black"/>
267
+ </svg>
268
+ `, g1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
269
+ <g clip-path="url(#clip0_2114_3492)">
270
+ <mask id="mask0_2114_3492" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
271
+ <path d="M0 0H24V24H0V0Z" fill="white"/>
272
+ </mask>
273
+ <g mask="url(#mask0_2114_3492)">
274
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.37 0 0 5.37 0 12C0 17.31 3.435 21.795 8.205 23.385C8.805 23.49 9.03 23.13 9.03 22.815C9.03 22.53 9.015 21.585 9.015 20.58C6 21.135 5.22 19.845 4.98 19.17C4.845 18.825 4.26 17.76 3.75 17.475C3.33 17.25 2.73 16.695 3.735 16.68C4.68 16.665 5.355 17.55 5.58 17.91C6.66 19.725 8.385 19.215 9.075 18.9C9.18 18.12 9.495 17.595 9.84 17.295C7.17 16.995 4.38 15.96 4.38 11.37C4.38 10.065 4.845 8.985 5.61 8.145C5.49 7.845 5.07 6.615 5.73 4.965C5.73 4.965 6.735 4.65 9.03 6.195C9.99 5.925 11.01 5.79 12.03 5.79C13.05 5.79 14.07 5.925 15.03 6.195C17.325 4.635 18.33 4.965 18.33 4.965C18.99 6.615 18.57 7.845 18.45 8.145C19.215 8.985 19.68 10.05 19.68 11.37C19.68 15.975 16.875 16.995 14.205 17.295C14.64 17.67 15.015 18.39 15.015 19.515C15.015 21.12 15 22.41 15 22.815C15 23.13 15.225 23.505 15.825 23.385C18.2072 22.5807 20.2772 21.0497 21.7437 19.0074C23.2101 16.965 23.9993 14.5143 24 12C24 5.37 18.63 0 12 0Z" fill="black"/>
275
+ </g>
276
+ </g>
277
+ <defs>
278
+ <clipPath id="clip0_2114_3492">
279
+ <rect width="24" height="24" fill="white"/>
280
+ </clipPath>
281
+ </defs>
282
+ </svg>
283
+ `, C1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
284
+ <path d="M19.6031 8.30624C19.35 8.22187 19.0969 8.14218 18.8438 8.06718C18.8859 7.89374 18.9234 7.72031 18.9609 7.54687C19.5375 4.75312 19.1578 2.50781 17.8781 1.76718C16.6453 1.05937 14.6344 1.79531 12.6 3.56718C12.3984 3.74062 12.2016 3.92343 12.0141 4.10624C11.8875 3.98437 11.7562 3.86249 11.625 3.74531C9.49219 1.85156 7.35469 1.05468 6.075 1.79999C4.84688 2.51249 4.48125 4.62656 4.99687 7.27031C5.04844 7.53281 5.10469 7.79062 5.17031 8.05312C4.87031 8.13749 4.575 8.23124 4.29844 8.32968C1.79531 9.19687 0 10.5656 0 11.9812C0 13.4437 1.9125 14.9109 4.51406 15.8016C4.725 15.8719 4.93594 15.9422 5.15156 16.0031C5.08125 16.2844 5.02031 16.5609 4.96406 16.8469C4.47188 19.4484 4.85625 21.5109 6.08438 22.2187C7.35 22.95 9.47812 22.2 11.55 20.3859C11.7141 20.2406 11.8781 20.0906 12.0422 19.9312C12.2484 20.1328 12.4641 20.325 12.6797 20.5125C14.6859 22.2375 16.6688 22.9359 17.8922 22.2281C19.1578 21.4969 19.5703 19.2797 19.0359 16.5797C18.9938 16.3734 18.9469 16.1625 18.8953 15.9469C19.0453 15.9047 19.1906 15.8578 19.3359 15.8109C22.0406 14.9156 24 13.4672 24 11.9812C24 10.5609 22.1531 9.18281 19.6031 8.30624ZM13.2609 4.32656C15.0047 2.80781 16.6313 2.21249 17.3719 2.63906C18.1641 3.09374 18.4687 4.93124 17.9719 7.34531C17.9391 7.50468 17.9063 7.65937 17.8641 7.81406C16.8234 7.57968 15.7687 7.41093 14.7094 7.31718C14.1 6.44531 13.4344 5.61093 12.7125 4.82812C12.8953 4.65468 13.0734 4.49062 13.2609 4.32656ZM7.8375 14.4141C8.07656 14.8219 8.32031 15.2297 8.57812 15.6281C7.84687 15.5484 7.12031 15.4312 6.40313 15.2766C6.60938 14.6016 6.86719 13.9031 7.16719 13.1906C7.38281 13.6031 7.60312 14.0109 7.8375 14.4141ZM6.41719 8.77499C7.09219 8.62499 7.80938 8.50312 8.55469 8.40937C8.30625 8.79843 8.0625 9.19687 7.83281 9.59999C7.60313 9.99843 7.37812 10.4062 7.16719 10.8187C6.87187 10.1203 6.62344 9.43593 6.41719 8.77499ZM7.70156 12.0047C8.01094 11.3578 8.34844 10.725 8.70469 10.1016C9.06094 9.47812 9.44531 8.87343 9.84844 8.27812C10.5516 8.22656 11.2687 8.19843 12 8.19843C12.7313 8.19843 13.4531 8.22656 14.1516 8.27812C14.55 8.86874 14.9297 9.47343 15.2906 10.0922C15.832 11.0203 15.9891 11.3437 16.3078 11.9859C15.9937 12.6328 15.6562 13.2703 15.2953 13.8984C14.9391 14.5219 14.5594 15.1266 14.1609 15.7266C13.4625 15.7781 12.7359 15.8016 12 15.8016C11.2641 15.8016 10.5516 15.7781 9.8625 15.7359C9.45469 15.1406 9.07031 14.5312 8.70938 13.9078C8.16797 12.9727 8.01563 12.6516 7.70156 12.0047ZM16.1672 14.4047C16.4062 13.9922 16.6313 13.575 16.8516 13.1531C17.1516 13.8328 17.4141 14.5219 17.6437 15.2297C16.9172 15.3937 16.1812 15.5203 15.4406 15.6047C15.6937 15.2109 15.9328 14.8078 16.1672 14.4047ZM16.8422 10.8187C16.6219 10.4062 16.3969 9.99374 16.1625 9.59062C15.9328 9.19218 15.6938 8.79843 15.4453 8.40937C16.2 8.50312 16.9219 8.62968 17.5969 8.78437C17.3812 9.47812 17.1281 10.1531 16.8422 10.8187ZM12.0094 5.54531C12.5016 6.07968 12.9656 6.64218 13.3969 7.22343C12.4687 7.18124 11.5359 7.18124 10.6078 7.22343C11.0672 6.61874 11.5406 6.05624 12.0094 5.54531ZM6.57187 2.67187C7.35937 2.21249 9.10781 2.86874 10.95 4.49999C11.0672 4.60312 11.1844 4.71562 11.3062 4.82812C10.5797 5.61093 9.90938 6.44531 9.29531 7.31718C8.23594 7.41093 7.18594 7.57499 6.14531 7.80468C6.08438 7.56562 6.03281 7.32187 5.98125 7.07812C5.54062 4.80937 5.83125 3.09843 6.57187 2.67187ZM5.42344 15.0281C5.22656 14.9719 5.03438 14.9109 4.84219 14.8453C3.84375 14.5312 2.70937 14.0344 1.88906 13.3828C1.41562 13.0547 1.09687 12.5484 1.00781 11.9812C1.00781 11.1234 2.48906 10.0266 4.62656 9.28124C4.89375 9.18749 5.16562 9.10312 5.4375 9.02343C5.75625 10.0406 6.14062 11.0391 6.58594 12.0047C6.13594 12.9844 5.74687 13.9969 5.42344 15.0281ZM10.8891 19.6219C10.1156 20.3297 9.22031 20.8922 8.24531 21.2766C7.725 21.525 7.125 21.5484 6.59063 21.3375C5.84531 20.9062 5.53594 19.2516 5.95781 17.025C6.00937 16.7625 6.06563 16.5 6.13125 16.2422C7.18125 16.4672 8.24062 16.6219 9.31406 16.7016C9.93281 17.5781 10.6125 18.4172 11.3391 19.2047C11.1891 19.35 11.0391 19.4906 10.8891 19.6219ZM12.0375 18.4828C11.5594 17.9672 11.0812 17.3953 10.6172 16.7812C11.0672 16.8 11.5312 16.8094 12 16.8094C12.4828 16.8094 12.9562 16.8 13.425 16.7766C12.9937 17.3719 12.5297 17.9391 12.0375 18.4828ZM18.1641 19.8891C18.1219 20.4609 17.8406 20.9953 17.3906 21.3562C16.6453 21.7875 15.0563 21.225 13.3406 19.7531C13.1438 19.5844 12.9469 19.4016 12.7453 19.2141C13.4625 18.4219 14.1234 17.5828 14.7234 16.7016C15.7969 16.6125 16.8656 16.4484 17.9203 16.2094C17.9672 16.4016 18.0094 16.5937 18.0469 16.7812C18.2766 17.7937 18.3141 18.8484 18.1641 19.8891ZM19.0172 14.85C18.8859 14.8922 18.7547 14.9344 18.6188 14.9719C18.2906 13.95 17.8875 12.9516 17.4234 11.9812C17.8734 11.025 18.2531 10.0406 18.5719 9.03281C18.8156 9.10312 19.05 9.17812 19.275 9.25312C21.4594 10.0031 22.9922 11.1187 22.9922 11.9719C22.9922 12.8906 21.3563 14.0766 19.0172 14.85ZM12 14.1469C13.1859 14.1469 14.1469 13.1859 14.1469 12C14.1469 10.8141 13.1859 9.85312 12 9.85312C10.8141 9.85312 9.85312 10.8141 9.85312 12C9.85312 13.1859 10.8141 14.1469 12 14.1469Z" fill="black"/>
285
+ </svg>
286
+ `, v1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
287
+ <path d="M12 1C12 1 13.0613 8.45358 15 10.3804C16.9387 12.3073 23 12.25 23 12.25C23 12.25 16.5 13.1848 15 15.0543C13.5 16.9239 12 23 12 23C12 23 10.6838 17.1455 8.5 15.0543C6.31616 12.9632 1 12.25 1 12.25C1 12.25 6.99999 12.25 9 10.3804C11 8.51087 12 1 12 1Z" fill="black"/>
288
+ </svg>
289
+ `, p1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
290
+ <g clip-path="url(#clip0_2114_3491)">
291
+ <path d="M16.3395 0.23849L16.2187 2.94974C16.215 3.10199 16.3905 3.19574 16.512 3.10199L17.5702 2.30099L18.4687 2.99999C18.4953 3.01807 18.5261 3.02873 18.5581 3.03088C18.5901 3.03302 18.6222 3.02657 18.6508 3.01219C18.6795 2.99781 18.7038 2.97603 18.7213 2.94909C18.7387 2.92215 18.7486 2.89105 18.75 2.85899L18.6487 0.10124L19.9808 -9.50508e-06C20.145 -0.0111187 20.3097 0.011667 20.4647 0.0669312C20.6197 0.122195 20.7617 0.208756 20.8819 0.321233C21.002 0.43371 21.0977 0.569698 21.1631 0.720744C21.2284 0.871789 21.262 1.03466 21.2618 1.19924V22.8007C21.2619 22.9636 21.2288 23.1247 21.1647 23.2744C21.1005 23.4241 21.0066 23.5591 20.8885 23.6713C20.7705 23.7835 20.6309 23.8705 20.4782 23.927C20.3255 23.9835 20.1629 24.0083 20.0002 24L3.8985 23.2815C3.59605 23.2686 3.30964 23.1419 3.0967 22.9267C2.88375 22.7115 2.76 22.4238 2.75025 22.1212L2.00025 2.32049C1.99041 2.16288 2.01186 2.00487 2.06336 1.85559C2.11485 1.7063 2.19538 1.56867 2.30031 1.45065C2.40523 1.33262 2.53247 1.23652 2.67469 1.16789C2.81692 1.09925 2.97132 1.05944 3.129 1.05074L16.3282 0.21899L16.3395 0.23849ZM13.2698 9.30074C13.2698 9.76949 16.4302 9.53924 16.8592 9.21899C16.8592 6.01949 15.1402 4.32824 12 4.32824C8.8515 4.32824 7.10175 6.05099 7.10175 8.62124C7.10175 13.0702 13.1017 13.1482 13.1017 15.5782C13.1017 16.2817 12.7815 16.68 12.051 16.68C11.0903 16.68 10.6995 16.1917 10.7505 14.52C10.7505 14.1607 7.10175 14.0392 6.981 14.52C6.71175 18.5512 9.2115 19.719 12.0787 19.719C14.8717 19.719 17.0512 18.231 17.0512 15.5392C17.0512 10.77 10.95 10.8982 10.95 8.53949C10.95 7.57049 11.673 7.44149 12.0787 7.44149C12.5317 7.44149 13.329 7.51199 13.2705 9.30899L13.2698 9.30074Z" fill="black"/>
292
+ </g>
293
+ <defs>
294
+ <clipPath id="clip0_2114_3491">
295
+ <rect width="24" height="24" fill="white"/>
296
+ </clipPath>
297
+ </defs>
298
+ </svg>
299
+ `, m1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
300
+ <path d="M12 4.79999C8.80125 4.79999 6.79875 6.40124 6 9.59999C7.2 7.99874 8.59875 7.39874 10.2 7.79999C11.1113 8.02874 11.7638 8.69249 12.4875 9.42374C13.665 10.6162 15.0263 12 18 12C21.1988 12 23.2013 10.3987 24 7.19999C22.8 8.80124 21.4013 9.40124 19.8 8.99999C18.8888 8.77124 18.2363 8.10749 17.5125 7.37624C16.335 6.18374 14.9738 4.79999 12 4.79999ZM6 12C2.80125 12 0.79875 13.6012 0 16.8C1.2 15.1987 2.59875 14.5987 4.2 15C5.11125 15.2287 5.76375 15.8925 6.4875 16.6237C7.665 17.8162 9.02625 19.2 12 19.2C15.1988 19.2 17.2013 17.5987 18 14.4C16.8 16.0012 15.4013 16.6012 13.8 16.2C12.8888 15.9712 12.2363 15.3075 11.5125 14.5762C10.335 13.3837 8.97375 12 6 12Z" fill="black"/>
301
+ </svg>
302
+ `, w1 = {
303
+ "arrow-right": h1,
304
+ figma: b1,
305
+ github: g1,
306
+ react: C1,
307
+ star: v1,
308
+ storybook: p1,
309
+ "tailwind-css": m1
310
+ };
311
+ function x1(e) {
312
+ return e.replaceAll('fill="black"', 'fill="currentColor"').replaceAll("fill='black'", "fill='currentColor'").replaceAll('stroke="black"', 'stroke="currentColor"').replaceAll("stroke='black'", "stroke='currentColor'");
313
+ }
314
+ function K({ svg: e, name: n, className: l, ariaLabel: i }) {
315
+ return /* @__PURE__ */ r(
316
+ "span",
317
+ {
318
+ "aria-hidden": i ? void 0 : !0,
319
+ "aria-label": i,
320
+ "data-neo-lite-icon": !0,
321
+ role: i ? "img" : void 0,
322
+ className: u(
323
+ "inline-block size-4 shrink-0 text-current [&_svg]:block [&_svg]:size-full",
324
+ l
325
+ ),
326
+ dangerouslySetInnerHTML: { __html: x1(n ? w1[n] : e) }
327
+ }
328
+ );
329
+ }
330
+ const y1 = [
331
+ "a[href]",
332
+ "button:not([disabled])",
333
+ "textarea:not([disabled])",
334
+ "input:not([disabled])",
335
+ "select:not([disabled])",
336
+ "[tabindex]:not([tabindex='-1'])"
337
+ ].join(",");
338
+ function k1(e) {
339
+ return Array.from(
340
+ e.querySelectorAll(y1)
341
+ ).filter((n) => !n.hasAttribute("disabled") && !n.getAttribute("aria-hidden"));
342
+ }
343
+ function R1({
344
+ open: e,
345
+ onOpenChange: n,
346
+ title: l,
347
+ children: i,
348
+ footer: d,
349
+ closeLabel: b = "Close dialog",
350
+ className: h
351
+ }) {
352
+ const c = F(), m = z(null), w = z(null), y = z(null);
353
+ D(() => {
354
+ if (!e)
355
+ return;
356
+ y.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
357
+ const a = document.body.style.overflow;
358
+ return document.body.style.overflow = "hidden", requestAnimationFrame(() => {
359
+ var s;
360
+ (s = w.current) == null || s.focus();
361
+ }), () => {
362
+ var s;
363
+ document.body.style.overflow = a, (s = y.current) == null || s.focus();
364
+ };
365
+ }, [e]), D(() => {
366
+ if (!e)
367
+ return;
368
+ function a(s) {
369
+ s.key === "Escape" && (s.preventDefault(), n(!1));
370
+ }
371
+ return document.addEventListener("keydown", a), () => {
372
+ document.removeEventListener("keydown", a);
373
+ };
374
+ }, [n, e]);
375
+ function C(a) {
376
+ if (a.key !== "Tab" || !m.current)
377
+ return;
378
+ const s = k1(m.current);
379
+ if (s.length === 0) {
380
+ a.preventDefault(), m.current.focus();
381
+ return;
382
+ }
383
+ const v = s[0], p = s[s.length - 1];
384
+ a.shiftKey && document.activeElement === v ? (a.preventDefault(), p.focus()) : !a.shiftKey && document.activeElement === p && (a.preventDefault(), v.focus());
385
+ }
386
+ return !e || typeof document > "u" ? null : s1(
387
+ /* @__PURE__ */ r(
388
+ "div",
389
+ {
390
+ className: "fixed inset-0 z-50 grid place-items-center bg-[rgba(0,0,0,0.2)] p-4",
391
+ onMouseDown: (a) => {
392
+ a.target === a.currentTarget && n(!1);
393
+ },
394
+ children: /* @__PURE__ */ x(
395
+ "div",
396
+ {
397
+ ref: m,
398
+ role: "dialog",
399
+ "aria-modal": "true",
400
+ "aria-labelledby": c,
401
+ tabIndex: -1,
402
+ className: u(
403
+ "flex max-h-[calc(100vh-32px)] w-[min(640px,calc(100vw-32px))] flex-col overflow-hidden rounded-md border border-border bg-card text-card-foreground shadow-md",
404
+ h
405
+ ),
406
+ onKeyDown: C,
407
+ onMouseDown: (a) => a.stopPropagation(),
408
+ children: [
409
+ /* @__PURE__ */ x("div", { className: "flex w-full items-center justify-between border-b border-border p-4", children: [
410
+ /* @__PURE__ */ r(
411
+ "h2",
412
+ {
413
+ id: c,
414
+ className: "font-sans text-xl font-bold leading-[140%] text-card-foreground",
415
+ children: l
416
+ }
417
+ ),
418
+ /* @__PURE__ */ r(
419
+ "button",
420
+ {
421
+ ref: w,
422
+ type: "button",
423
+ "aria-label": b,
424
+ className: "inline-flex shrink-0 items-center justify-center rounded-full border-2 border-transparent p-[2px] text-card-foreground outline-none transition-[background-color,border-color] duration-[var(--duration)] ease-[var(--easing)] hover:bg-hover focus-visible:border-focus-ring focus-visible:hover:bg-hover [&_[data-neo-lite-icon]]:size-6",
425
+ onClick: () => n(!1),
426
+ children: /* @__PURE__ */ r(K, { svg: f1 })
427
+ }
428
+ )
429
+ ] }),
430
+ /* @__PURE__ */ r(
431
+ "div",
432
+ {
433
+ className: u(
434
+ "w-full overflow-y-auto p-4",
435
+ d ? "border-b border-border" : void 0
436
+ ),
437
+ children: i
438
+ }
439
+ ),
440
+ d ? /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-end gap-2 p-4", children: d }) : null
441
+ ]
442
+ }
443
+ )
444
+ }
445
+ ),
446
+ document.body
447
+ );
448
+ }
449
+ function P1({
450
+ id: e,
451
+ label: n,
452
+ hint: l,
453
+ error: i,
454
+ leadingDecoration: d,
455
+ trailingDecoration: b,
456
+ containerClassName: h,
457
+ className: c,
458
+ disabled: m,
459
+ "aria-describedby": w,
460
+ "aria-invalid": y,
461
+ ...C
462
+ }) {
463
+ const a = F(), s = e ?? a, v = i ?? l, p = v ? `${s}-${i ? "error" : "hint"}` : void 0, L = [w, p].filter(Boolean).join(" "), N = !!i;
464
+ return /* @__PURE__ */ x(
465
+ "div",
466
+ {
467
+ className: u(
468
+ "grid w-full gap-1 font-sans text-sm font-normal leading-[160%]",
469
+ m && "opacity-[var(--disabled-opacity)]",
470
+ h
471
+ ),
472
+ children: [
473
+ n ? /* @__PURE__ */ r(
474
+ "label",
475
+ {
476
+ htmlFor: s,
477
+ className: N ? "text-error" : "text-foreground",
478
+ children: n
479
+ }
480
+ ) : null,
481
+ /* @__PURE__ */ x(
482
+ "div",
483
+ {
484
+ className: u(
485
+ "flex w-full items-center gap-2 rounded-sm border bg-background p-2 text-foreground",
486
+ N ? "border-destructive-border [&:has(input:focus-visible)]:shadow-destructive-focus" : "border-border [&:has(input:focus-visible)]:shadow-focus"
487
+ ),
488
+ children: [
489
+ d ? /* @__PURE__ */ r("span", { className: "flex min-w-5 shrink-0 items-center justify-center p-0.5 text-foreground [&_svg]:size-4 [&_svg]:shrink-0", children: d }) : null,
490
+ /* @__PURE__ */ r(
491
+ "input",
492
+ {
493
+ id: s,
494
+ className: u(
495
+ "min-w-0 flex-1 bg-transparent px-1 text-foreground outline-none placeholder:text-placeholder disabled:cursor-not-allowed",
496
+ c
497
+ ),
498
+ disabled: m,
499
+ "aria-describedby": L || void 0,
500
+ "aria-invalid": N ? !0 : y,
501
+ ...C
502
+ }
503
+ ),
504
+ b ? /* @__PURE__ */ r("span", { className: "flex min-w-5 shrink-0 items-center justify-center p-0.5 text-foreground [&_svg]:size-4 [&_svg]:shrink-0", children: b }) : null
505
+ ]
506
+ }
507
+ ),
508
+ v ? /* @__PURE__ */ r(
509
+ "p",
510
+ {
511
+ id: p,
512
+ className: N ? "text-error" : "text-muted-foreground",
513
+ children: v
514
+ }
515
+ ) : null
516
+ ]
517
+ }
518
+ );
519
+ }
520
+ const N1 = "w-full rounded-sm border border-border bg-background p-2 shadow-sm";
521
+ function M1({
522
+ selected: e = !1,
523
+ className: n
524
+ }) {
525
+ return u(
526
+ "flex min-h-9 w-full items-center gap-2 rounded-sm px-3 py-2 text-left font-sans text-sm font-normal leading-[160%] outline-none focus-visible:shadow-focus disabled:pointer-events-none disabled:opacity-[var(--disabled-opacity)] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-[var(--disabled-opacity)]",
527
+ e ? "bg-selected text-selected-foreground" : "bg-background text-foreground hover:bg-hover data-[disabled=true]:hover:bg-background",
528
+ n
529
+ );
530
+ }
531
+ function L1({ className: e, children: n, ...l }) {
532
+ return /* @__PURE__ */ r(
533
+ "div",
534
+ {
535
+ className: u(N1, e),
536
+ ...l,
537
+ children: n
538
+ }
539
+ );
540
+ }
541
+ const G = U(
542
+ ({
543
+ selected: e = !1,
544
+ leadingDecoration: n,
545
+ type: l = "button",
546
+ className: i,
547
+ children: d,
548
+ ...b
549
+ }, h) => /* @__PURE__ */ x(
550
+ "button",
551
+ {
552
+ ref: h,
553
+ type: l,
554
+ className: M1({ selected: e, className: i }),
555
+ ...b,
556
+ children: [
557
+ n ? /* @__PURE__ */ r("span", { className: "flex w-5 shrink-0 items-center justify-center p-0.5 [&_svg]:size-4 [&_svg]:shrink-0", children: n }) : null,
558
+ /* @__PURE__ */ r("span", { className: "min-w-0 flex-1", children: d })
559
+ ]
560
+ }
561
+ )
562
+ );
563
+ G.displayName = "MenuItem";
564
+ const _1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
565
+ <path d="M19.4697 5.46973C19.7626 5.17684 20.2374 5.17684 20.5303 5.46973C20.8232 5.76262 20.8232 6.23738 20.5303 6.53028L9.53028 17.5303C9.23738 17.8232 8.76262 17.8232 8.46973 17.5303L3.46973 12.5303C3.17684 12.2374 3.17684 11.7626 3.46973 11.4697C3.76262 11.1768 4.23738 11.1768 4.53028 11.4697L9 15.9395L19.4697 5.46973Z" fill="black"/>
566
+ </svg>
567
+ `, I1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
568
+ <path d="M17.4697 8.46973C17.7626 8.17684 18.2374 8.17684 18.5303 8.46973C18.8232 8.76262 18.8232 9.23738 18.5303 9.53028L12.5303 15.5303C12.2374 15.8232 11.7626 15.8232 11.4697 15.5303L5.46973 9.53028C5.17684 9.23738 5.17684 8.76262 5.46973 8.46973C5.76262 8.17684 6.23738 8.17684 6.53028 8.46973L12 13.9395L17.4697 8.46973Z" fill="black"/>
569
+ </svg>
570
+ `, Z1 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
571
+ <path d="M11.5264 8.41796C11.821 8.17765 12.2557 8.19512 12.5303 8.46972L18.5303 14.4697C18.8232 14.7626 18.8232 15.2374 18.5303 15.5303C18.2374 15.8232 17.7626 15.8232 17.4697 15.5303L12 10.0605L6.53028 15.5303C6.23738 15.8232 5.76262 15.8232 5.46973 15.5303C5.17684 15.2374 5.17684 14.7626 5.46973 14.4697L11.4697 8.46972L11.5264 8.41796Z" fill="black"/>
572
+ </svg>
573
+ `;
574
+ function $1({
575
+ options: e,
576
+ value: n,
577
+ defaultValue: l,
578
+ onValueChange: i,
579
+ label: d,
580
+ placeholder: b = "Select an option",
581
+ error: h = !1,
582
+ disabled: c = !1,
583
+ name: m,
584
+ required: w = !1,
585
+ className: y
586
+ }) {
587
+ const C = F(), a = `${C}-trigger`, s = d ? `${C}-label` : void 0, v = `${C}-value`, p = `${C}-listbox`, L = z(null), N = z(null), E = z([]), [o, g] = A(!1), [M, I] = A(l ?? ""), [_, j] = A(-1), P = n ?? M, T = e.findIndex((t) => t.value === P), $ = T >= 0 ? e[T] : void 0, Q = n !== void 0, k = S(
588
+ () => e.flatMap(
589
+ (t, f) => t.disabled ? [] : [f]
590
+ ),
591
+ [e]
592
+ );
593
+ function X(t = "first") {
594
+ var f;
595
+ return T >= 0 && !((f = e[T]) != null && f.disabled) ? T : t === "last" ? k[k.length - 1] ?? -1 : k[0] ?? -1;
596
+ }
597
+ function B(t = "first") {
598
+ c || k.length === 0 || (j(X(t)), g(!0));
599
+ }
600
+ function H({ focusTrigger: t = !0 } = {}) {
601
+ var f;
602
+ g(!1), t && ((f = L.current) == null || f.focus());
603
+ }
604
+ function q(t) {
605
+ if (k.length === 0)
606
+ return;
607
+ const f = k.indexOf(_), Z = f === -1 ? t === 1 ? 0 : k.length - 1 : (f + t + k.length) % k.length;
608
+ j(k[Z]);
609
+ }
610
+ function O(t) {
611
+ const f = e[t];
612
+ !f || f.disabled || (Q || I(f.value), i == null || i(f.value), H());
613
+ }
614
+ function Y(t) {
615
+ c || ((t.key === "Enter" || t.key === " ") && (t.preventDefault(), o ? H() : B()), t.key === "ArrowDown" && (t.preventDefault(), B("first")), t.key === "ArrowUp" && (t.preventDefault(), B("last")));
616
+ }
617
+ function e1(t) {
618
+ t.key === "Escape" && (t.preventDefault(), H()), t.key === "ArrowDown" && (t.preventDefault(), q(1)), t.key === "ArrowUp" && (t.preventDefault(), q(-1)), t.key === "Home" && (t.preventDefault(), j(k[0] ?? -1)), t.key === "End" && (t.preventDefault(), j(k[k.length - 1] ?? -1)), (t.key === "Enter" || t.key === " ") && (t.preventDefault(), O(_)), t.key === "Tab" && g(!1);
619
+ }
620
+ return D(() => {
621
+ var t;
622
+ o && ((t = E.current[_]) == null || t.focus());
623
+ }, [_, o]), D(() => {
624
+ if (!o)
625
+ return;
626
+ function t(f) {
627
+ var Z;
628
+ (Z = N.current) != null && Z.contains(f.target) || g(!1);
629
+ }
630
+ return document.addEventListener("pointerdown", t), () => {
631
+ document.removeEventListener("pointerdown", t);
632
+ };
633
+ }, [o]), /* @__PURE__ */ x(
634
+ "div",
635
+ {
636
+ ref: N,
637
+ className: u(
638
+ "relative grid w-full gap-1 font-sans text-sm font-normal leading-[160%]",
639
+ c && "opacity-[var(--disabled-opacity)]",
640
+ y
641
+ ),
642
+ children: [
643
+ d ? /* @__PURE__ */ r(
644
+ "span",
645
+ {
646
+ id: s,
647
+ className: h ? "text-error" : "text-foreground",
648
+ children: d
649
+ }
650
+ ) : null,
651
+ /* @__PURE__ */ x(
652
+ "button",
653
+ {
654
+ ref: L,
655
+ id: a,
656
+ type: "button",
657
+ disabled: c,
658
+ "aria-haspopup": "listbox",
659
+ "aria-expanded": o,
660
+ "aria-controls": o ? p : void 0,
661
+ "aria-labelledby": s ? `${s} ${v}` : void 0,
662
+ "aria-invalid": h || void 0,
663
+ "aria-required": w || void 0,
664
+ onClick: () => {
665
+ o ? H({ focusTrigger: !1 }) : B();
666
+ },
667
+ onKeyDown: Y,
668
+ className: u(
669
+ "flex w-full items-center gap-2 rounded-sm border bg-background p-2 text-foreground outline-none disabled:cursor-not-allowed",
670
+ h ? "border-destructive-border focus-visible:shadow-destructive-focus" : "border-border focus-visible:shadow-focus",
671
+ o && (h ? "shadow-destructive-focus" : "shadow-focus")
672
+ ),
673
+ children: [
674
+ /* @__PURE__ */ r(
675
+ "span",
676
+ {
677
+ id: v,
678
+ className: u(
679
+ "min-w-0 flex-1 px-1 text-left",
680
+ $ ? "text-foreground" : "text-placeholder"
681
+ ),
682
+ children: $ ? $.label : b
683
+ }
684
+ ),
685
+ /* @__PURE__ */ r("span", { className: "flex w-5 shrink-0 items-center justify-center p-0.5 text-foreground", children: /* @__PURE__ */ r(K, { svg: o ? Z1 : I1 }) })
686
+ ]
687
+ }
688
+ ),
689
+ m ? /* @__PURE__ */ r(
690
+ "input",
691
+ {
692
+ type: "hidden",
693
+ name: m,
694
+ value: P,
695
+ required: w,
696
+ disabled: c
697
+ }
698
+ ) : null,
699
+ o ? /* @__PURE__ */ r(
700
+ L1,
701
+ {
702
+ id: p,
703
+ role: "listbox",
704
+ "aria-labelledby": s,
705
+ className: "absolute top-full z-50 mt-1",
706
+ children: e.map((t, f) => {
707
+ const Z = t.value === P, t1 = `${C}-option-${f}`;
708
+ return /* @__PURE__ */ r(
709
+ G,
710
+ {
711
+ ref: (n1) => {
712
+ E.current[f] = n1;
713
+ },
714
+ id: t1,
715
+ role: "option",
716
+ selected: Z,
717
+ leadingDecoration: Z ? /* @__PURE__ */ r(K, { svg: _1 }) : void 0,
718
+ disabled: t.disabled,
719
+ "aria-selected": Z,
720
+ "aria-disabled": t.disabled || void 0,
721
+ "data-disabled": t.disabled ? "true" : void 0,
722
+ tabIndex: f === _ && !t.disabled ? 0 : -1,
723
+ onClick: () => O(f),
724
+ onKeyDown: e1,
725
+ onMouseEnter: () => {
726
+ t.disabled || j(f);
727
+ },
728
+ children: t.label
729
+ },
730
+ t.value
731
+ );
732
+ })
733
+ }
734
+ ) : null
735
+ ]
736
+ }
737
+ );
738
+ }
739
+ const J = o1(null);
740
+ function z1() {
741
+ const e = r1(J);
742
+ if (!e)
743
+ throw new Error("Tab must be used inside Tabs.");
744
+ return e;
745
+ }
746
+ function S1({
747
+ value: e,
748
+ defaultValue: n,
749
+ onValueChange: l,
750
+ children: i,
751
+ className: d,
752
+ role: b,
753
+ ...h
754
+ }) {
755
+ const [c, m] = A(n), [w, y] = A([]), C = e ?? c, a = e !== void 0, s = S(
756
+ () => w.filter((o) => !o.disabled),
757
+ [w]
758
+ ), v = R(
759
+ (o) => {
760
+ const g = w.find((M) => M.value === o);
761
+ !g || g.disabled || (a || m(o), l == null || l(o));
762
+ },
763
+ [a, l, w]
764
+ ), p = R((o) => {
765
+ y((g) => {
766
+ const M = g.findIndex(
767
+ (I) => I.value === o.value
768
+ );
769
+ return M === -1 ? [...g, o] : g.map(
770
+ (I, _) => _ === M ? o : I
771
+ );
772
+ });
773
+ }, []), L = R((o) => {
774
+ y(
775
+ (g) => g.filter((M) => M.value !== o)
776
+ );
777
+ }, []), N = R(
778
+ (o, g) => {
779
+ var I;
780
+ if (s.length === 0)
781
+ return;
782
+ const M = g === "first" ? s[0] : g === "last" ? s[s.length - 1] : s[(s.findIndex((_) => _.value === o) + g + s.length) % s.length];
783
+ M && ((I = M.ref.current) == null || I.focus(), v(M.value));
784
+ },
785
+ [s, v]
786
+ );
787
+ D(() => {
788
+ a || C !== void 0 || s.length === 0 || m(s[0].value);
789
+ }, [s, a, C]);
790
+ const E = S(
791
+ () => ({
792
+ value: C,
793
+ registerTab: p,
794
+ unregisterTab: L,
795
+ selectTab: v,
796
+ moveFocus: N
797
+ }),
798
+ [N, p, v, C, L]
799
+ );
800
+ return /* @__PURE__ */ r(J.Provider, { value: E, children: /* @__PURE__ */ r(
801
+ "div",
802
+ {
803
+ role: b ?? "tablist",
804
+ className: u(
805
+ "inline-flex w-fit items-center gap-1 rounded-sm border border-foreground bg-background p-1",
806
+ d
807
+ ),
808
+ ...h,
809
+ children: i
810
+ }
811
+ ) });
812
+ }
813
+ const D1 = U(
814
+ ({
815
+ value: e,
816
+ leadingIcon: n,
817
+ type: l = "button",
818
+ disabled: i = !1,
819
+ className: d,
820
+ children: b,
821
+ onClick: h,
822
+ onKeyDown: c,
823
+ ...m
824
+ }, w) => {
825
+ const y = z(null), {
826
+ value: C,
827
+ registerTab: a,
828
+ unregisterTab: s,
829
+ selectTab: v,
830
+ moveFocus: p
831
+ } = z1(), L = C === e;
832
+ W(w, () => y.current, []), D(() => (a({ value: e, disabled: i, ref: y }), () => {
833
+ s(e);
834
+ }), [i, a, s, e]);
835
+ function N(o) {
836
+ h == null || h(o), !(o.defaultPrevented || i) && v(e);
837
+ }
838
+ function E(o) {
839
+ c == null || c(o), !(o.defaultPrevented || i) && (o.key === "ArrowRight" && (o.preventDefault(), p(e, 1)), o.key === "ArrowLeft" && (o.preventDefault(), p(e, -1)), o.key === "Home" && (o.preventDefault(), p(e, "first")), o.key === "End" && (o.preventDefault(), p(e, "last")));
840
+ }
841
+ return /* @__PURE__ */ x(
842
+ "button",
843
+ {
844
+ ref: y,
845
+ type: l,
846
+ role: "tab",
847
+ "aria-selected": L,
848
+ disabled: i,
849
+ tabIndex: L ? 0 : -1,
850
+ className: u(
851
+ "inline-flex items-center justify-center gap-1 rounded-sm p-2 font-sans text-sm font-normal leading-[160%] outline-none focus-visible:shadow-focus disabled:pointer-events-none disabled:opacity-[var(--disabled-opacity)] [&_svg]:shrink-0 [&_[data-neo-lite-icon]]:shrink-0",
852
+ L ? "bg-selected text-selected-foreground" : "bg-background text-foreground hover:bg-hover",
853
+ d
854
+ ),
855
+ onClick: N,
856
+ onKeyDown: E,
857
+ ...m,
858
+ children: [
859
+ n ? /* @__PURE__ */ r("span", { className: "inline-flex size-5 shrink-0 items-center justify-center [&_svg]:size-5 [&_[data-neo-lite-icon]]:size-5", children: n }) : null,
860
+ b
861
+ ]
862
+ }
863
+ );
864
+ }
865
+ );
866
+ D1.displayName = "Tab";
867
+ export {
868
+ A1 as Badge,
869
+ B1 as Button,
870
+ H1 as Card,
871
+ u1 as Checkbox,
872
+ R1 as Dialog,
873
+ P1 as Input,
874
+ L1 as Menu,
875
+ G as MenuItem,
876
+ $1 as Selection,
877
+ D1 as Tab,
878
+ S1 as Tabs
879
+ };