@bzync/rui 0.0.5 → 0.0.9

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 (240) hide show
  1. package/README.md +476 -57
  2. package/dist/autocomplete-D6z5B-WU.cjs +1 -0
  3. package/dist/{autocomplete-BgKbj6M4.js → autocomplete-bgySuP8X.js} +149 -142
  4. package/dist/calendar-CQumLNgS.cjs +1 -0
  5. package/dist/{calendar-j2_zvum1.js → calendar-nkYCMEy3.js} +9 -9
  6. package/dist/charts-Cot5lCgC.cjs +1 -0
  7. package/dist/{charts-CxEy2c3M.js → charts-Dscl6UC3.js} +122 -145
  8. package/dist/cn-B6R3HKzx.cjs +1 -0
  9. package/dist/{cn-DpgY2leY.js → cn-BJyZJP-y.js} +389 -389
  10. package/dist/{component-styles-Bgy44fc8.js → component-styles-C2CbHEEA.js} +2 -2
  11. package/dist/component-styles-DY4wigiq.cjs +1 -0
  12. package/dist/components/accordion.cjs +1 -1
  13. package/dist/components/accordion.js +2 -2
  14. package/dist/components/alert.cjs +1 -1
  15. package/dist/components/alert.js +3 -3
  16. package/dist/components/aspect-ratio.cjs +1 -1
  17. package/dist/components/aspect-ratio.js +1 -1
  18. package/dist/components/auth-backdrop.cjs +1 -1
  19. package/dist/components/auth-backdrop.d.ts +4 -1
  20. package/dist/components/auth-backdrop.js +12 -8
  21. package/dist/components/autocomplete/dropdown.d.ts +4 -1
  22. package/dist/components/autocomplete/multi-trigger.d.ts +3 -1
  23. package/dist/components/autocomplete/single-trigger.d.ts +3 -1
  24. package/dist/components/autocomplete/types.d.ts +15 -0
  25. package/dist/components/autocomplete.cjs +1 -1
  26. package/dist/components/autocomplete.js +1 -1
  27. package/dist/components/avatar-group.cjs +1 -1
  28. package/dist/components/avatar-group.js +1 -1
  29. package/dist/components/avatar.cjs +1 -1
  30. package/dist/components/avatar.js +2 -2
  31. package/dist/components/badge.cjs +1 -1
  32. package/dist/components/badge.js +1 -1
  33. package/dist/components/billing-interval-toggle.cjs +1 -1
  34. package/dist/components/billing-interval-toggle.d.ts +4 -6
  35. package/dist/components/billing-interval-toggle.js +26 -19
  36. package/dist/components/blockquote.cjs +1 -1
  37. package/dist/components/blockquote.js +3 -3
  38. package/dist/components/breadcrumb.cjs +1 -1
  39. package/dist/components/breadcrumb.js +2 -2
  40. package/dist/components/button-group.cjs +1 -1
  41. package/dist/components/button-group.js +1 -1
  42. package/dist/components/button.cjs +1 -1
  43. package/dist/components/button.d.ts +2 -0
  44. package/dist/components/button.js +79 -36
  45. package/dist/components/calendar.cjs +1 -1
  46. package/dist/components/calendar.js +1 -1
  47. package/dist/components/callout.cjs +1 -1
  48. package/dist/components/callout.js +14 -14
  49. package/dist/components/card.cjs +1 -1
  50. package/dist/components/card.js +1 -1
  51. package/dist/components/charts/shared.d.ts +15 -0
  52. package/dist/components/charts.cjs +1 -1
  53. package/dist/components/charts.js +1 -1
  54. package/dist/components/checkbox.cjs +1 -1
  55. package/dist/components/checkbox.js +3 -3
  56. package/dist/components/code.cjs +3 -3
  57. package/dist/components/code.js +4 -4
  58. package/dist/components/command.cjs +1 -1
  59. package/dist/components/command.d.ts +8 -1
  60. package/dist/components/command.js +84 -83
  61. package/dist/components/confirm-dialog.cjs +1 -1
  62. package/dist/components/confirm-dialog.d.ts +8 -1
  63. package/dist/components/confirm-dialog.js +37 -31
  64. package/dist/components/copy-button.cjs +1 -1
  65. package/dist/components/copy-button.js +3 -2
  66. package/dist/components/currency.cjs +1 -1
  67. package/dist/components/currency.js +1 -1
  68. package/dist/components/datatable/types.d.ts +4 -0
  69. package/dist/components/datatable.cjs +1 -1
  70. package/dist/components/datatable.d.ts +1 -5
  71. package/dist/components/datatable.js +1 -1
  72. package/dist/components/datepicker.cjs +1 -1
  73. package/dist/components/datepicker.d.ts +3 -3
  74. package/dist/components/datepicker.js +234 -105
  75. package/dist/components/description-list.cjs +1 -1
  76. package/dist/components/description-list.js +1 -1
  77. package/dist/components/divider.cjs +1 -1
  78. package/dist/components/divider.js +1 -1
  79. package/dist/components/drawer.cjs +1 -1
  80. package/dist/components/drawer.d.ts +6 -1
  81. package/dist/components/drawer.js +128 -2
  82. package/dist/components/dropdown-menu-panel.cjs +1 -0
  83. package/dist/components/dropdown-menu-panel.d.ts +24 -0
  84. package/dist/components/dropdown-menu-panel.js +84 -0
  85. package/dist/components/dropdown-menu.cjs +1 -1
  86. package/dist/components/dropdown-menu.d.ts +5 -1
  87. package/dist/components/dropdown-menu.js +38 -93
  88. package/dist/components/empty-state.cjs +1 -1
  89. package/dist/components/empty-state.d.ts +5 -1
  90. package/dist/components/empty-state.js +9 -9
  91. package/dist/components/error-state.cjs +1 -1
  92. package/dist/components/error-state.js +2 -2
  93. package/dist/components/file-upload.cjs +1 -1
  94. package/dist/components/file-upload.js +4 -4
  95. package/dist/components/form-field.cjs +1 -1
  96. package/dist/components/form-field.d.ts +9 -0
  97. package/dist/components/form-field.js +49 -14
  98. package/dist/components/info-button.cjs +1 -1
  99. package/dist/components/info-button.d.ts +5 -3
  100. package/dist/components/info-button.js +33 -29
  101. package/dist/components/input.cjs +1 -1
  102. package/dist/components/input.js +3 -3
  103. package/dist/components/kbd.cjs +1 -1
  104. package/dist/components/kbd.js +1 -1
  105. package/dist/components/label.cjs +1 -1
  106. package/dist/components/label.js +2 -2
  107. package/dist/components/layout.cjs +1 -1
  108. package/dist/components/layout.js +1 -1
  109. package/dist/components/link.cjs +1 -1
  110. package/dist/components/link.js +1 -1
  111. package/dist/components/list.cjs +1 -1
  112. package/dist/components/list.js +1 -1
  113. package/dist/components/modal.cjs +1 -1
  114. package/dist/components/modal.d.ts +8 -1
  115. package/dist/components/modal.js +74 -120
  116. package/dist/components/navigation.cjs +1 -1
  117. package/dist/components/navigation.js +2 -2
  118. package/dist/components/number-input.cjs +1 -1
  119. package/dist/components/number-input.js +3 -3
  120. package/dist/components/otp-input.cjs +1 -1
  121. package/dist/components/otp-input.js +2 -2
  122. package/dist/components/overlay.cjs +1 -0
  123. package/dist/components/overlay.d.ts +52 -0
  124. package/dist/components/overlay.js +87 -0
  125. package/dist/components/pagination.cjs +1 -1
  126. package/dist/components/pagination.js +2 -2
  127. package/dist/components/popover.cjs +1 -1
  128. package/dist/components/popover.d.ts +2 -1
  129. package/dist/components/popover.js +41 -40
  130. package/dist/components/progressbar.cjs +1 -1
  131. package/dist/components/progressbar.js +1 -1
  132. package/dist/components/radio.cjs +1 -1
  133. package/dist/components/radio.js +3 -3
  134. package/dist/components/rating.cjs +1 -1
  135. package/dist/components/rating.js +3 -3
  136. package/dist/components/richtext.cjs +1 -1
  137. package/dist/components/richtext.js +45 -18
  138. package/dist/components/scroll-area.cjs +1 -1
  139. package/dist/components/scroll-area.js +3 -3
  140. package/dist/components/select/option-list.d.ts +3 -1
  141. package/dist/components/select/types.d.ts +4 -0
  142. package/dist/components/select.cjs +1 -1
  143. package/dist/components/select.js +1 -1
  144. package/dist/components/seo.cjs +1 -1
  145. package/dist/components/seo.js +1 -1
  146. package/dist/components/separator.cjs +1 -1
  147. package/dist/components/separator.js +1 -1
  148. package/dist/components/skeleton.cjs +1 -1
  149. package/dist/components/skeleton.d.ts +14 -1
  150. package/dist/components/skeleton.js +56 -4
  151. package/dist/components/slider.cjs +1 -1
  152. package/dist/components/slider.js +2 -2
  153. package/dist/components/slot.cjs +1 -0
  154. package/dist/components/slot.d.ts +12 -0
  155. package/dist/components/slot.js +16 -0
  156. package/dist/components/snackbar-viewport.cjs +1 -0
  157. package/dist/components/snackbar-viewport.d.ts +27 -0
  158. package/dist/components/snackbar-viewport.js +181 -0
  159. package/dist/components/snackbar.cjs +1 -1
  160. package/dist/components/snackbar.d.ts +5 -1
  161. package/dist/components/snackbar.js +36 -200
  162. package/dist/components/spinner.cjs +1 -1
  163. package/dist/components/spinner.js +1 -1
  164. package/dist/components/stat.cjs +1 -1
  165. package/dist/components/stat.js +1 -1
  166. package/dist/components/status-dot.cjs +1 -1
  167. package/dist/components/status-dot.js +1 -1
  168. package/dist/components/stepper.cjs +1 -1
  169. package/dist/components/stepper.js +5 -5
  170. package/dist/components/switch.cjs +1 -1
  171. package/dist/components/switch.js +37 -43
  172. package/dist/components/table.cjs +1 -1
  173. package/dist/components/table.js +1 -1
  174. package/dist/components/tabs.cjs +1 -1
  175. package/dist/components/tabs.d.ts +6 -4
  176. package/dist/components/tabs.js +51 -81
  177. package/dist/components/tag.cjs +1 -1
  178. package/dist/components/tag.js +1 -1
  179. package/dist/components/terminal.cjs +1 -1
  180. package/dist/components/terminal.js +1 -1
  181. package/dist/components/textarea.cjs +1 -1
  182. package/dist/components/textarea.js +3 -3
  183. package/dist/components/theme-provider.cjs +1 -1
  184. package/dist/components/theme-provider.js +1 -1
  185. package/dist/components/theme-toggle.cjs +1 -1
  186. package/dist/components/theme-toggle.js +27 -3
  187. package/dist/components/time-picker.cjs +1 -1
  188. package/dist/components/time-picker.d.ts +2 -0
  189. package/dist/components/time-picker.js +206 -148
  190. package/dist/components/timeline.cjs +1 -1
  191. package/dist/components/timeline.js +1 -1
  192. package/dist/components/toggle.cjs +1 -1
  193. package/dist/components/toggle.js +2 -2
  194. package/dist/components/tooltip.cjs +1 -1
  195. package/dist/components/tooltip.d.ts +2 -1
  196. package/dist/components/tooltip.js +37 -36
  197. package/dist/components/tree.cjs +1 -1
  198. package/dist/components/tree.js +1 -1
  199. package/dist/components/typography.cjs +1 -1
  200. package/dist/components/typography.d.ts +2 -3
  201. package/dist/components/typography.js +37 -24
  202. package/dist/components/visually-hidden.cjs +1 -0
  203. package/dist/components/visually-hidden.d.ts +16 -0
  204. package/dist/components/visually-hidden.js +13 -0
  205. package/dist/{datatable-yBN4M3UV.js → datatable-BJoZMrKI.js} +6 -6
  206. package/dist/datatable-t0U7t_xh.cjs +1 -0
  207. package/dist/icons-Dfetr1L2.cjs +1 -0
  208. package/dist/icons-Dk7VZ4Ph.js +51 -0
  209. package/dist/index.cjs +1 -1
  210. package/dist/index.d.ts +4 -0
  211. package/dist/index.js +126 -99
  212. package/dist/lib/cn.d.ts +13 -1
  213. package/dist/lib/component-styles.d.ts +14 -2
  214. package/dist/lib/icons.d.ts +12 -0
  215. package/dist/lib/motion.d.ts +58 -0
  216. package/dist/motion-B2shivEB.cjs +1 -0
  217. package/dist/motion-gnRzFS5f.js +62 -0
  218. package/dist/select-ByjnuEcE.cjs +1 -0
  219. package/dist/{select-ClWrcj3R.js → select-CiMzLhUK.js} +128 -122
  220. package/dist/styles.css +1 -1
  221. package/dist/{terminal-CpraMs50.cjs → terminal-1U0ftG3i.cjs} +2 -2
  222. package/dist/{terminal-BOR2cFi1.js → terminal-VXdxVoAv.js} +4 -4
  223. package/dist/use-focus-trap-CPLT49gN.cjs +1 -0
  224. package/dist/use-focus-trap-CS6BXJAB.js +77 -0
  225. package/dist/{utils-CQ8pvCtk.js → utils-DEw5mQrH.js} +1 -1
  226. package/dist/{utils-DOFJTw8o.cjs → utils-MnnCTelh.cjs} +1 -1
  227. package/package.json +56 -9
  228. package/dist/autocomplete-Bk4pRQ2R.cjs +0 -1
  229. package/dist/calendar-CUXpVrVE.cjs +0 -1
  230. package/dist/charts-UDqS1BH1.cjs +0 -1
  231. package/dist/cn-BdjraxxU.cjs +0 -1
  232. package/dist/component-styles-DOUctc8_.cjs +0 -1
  233. package/dist/createLucideIcon-DDY8HuQR.js +0 -42
  234. package/dist/createLucideIcon-b_X_3fj-.cjs +0 -1
  235. package/dist/datatable-rzDgQ3r6.cjs +0 -1
  236. package/dist/drawer-CTeBsYrO.cjs +0 -1
  237. package/dist/drawer-ixuzyLVS.js +0 -189
  238. package/dist/select-BFwx--uK.cjs +0 -1
  239. package/dist/theme-toggle-Bb0BYo51.js +0 -71
  240. package/dist/theme-toggle-Cld8tktJ.cjs +0 -1
@@ -1,14 +1,14 @@
1
- import { t as e } from "./cn-DpgY2leY.js";
2
- import { o as t, t as n } from "./component-styles-Bgy44fc8.js";
3
- import { a as r, i, n as a, o, r as s, t as c } from "./utils-CQ8pvCtk.js";
1
+ import { t as e } from "./cn-BJyZJP-y.js";
2
+ import { o as t, t as n } from "./component-styles-C2CbHEEA.js";
3
+ import { a as r, i, n as a, o, r as s, t as c } from "./utils-DEw5mQrH.js";
4
4
  import { t as l } from "./use-event-callback-DGkfO_uu.js";
5
5
  import { AnimatePresence as u, motion as d } from "framer-motion";
6
6
  import { forwardRef as f, useCallback as p, useEffect as m, useId as h, useMemo as g, useRef as _, useState as v } from "react";
7
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
8
- import { createPortal as S } from "react-dom";
7
+ import { Fragment as ee, jsx as y, jsxs as b } from "react/jsx-runtime";
8
+ import { createPortal as x } from "react-dom";
9
9
  //#region src/components/select/option-list.tsx
10
- function C({ listId: t, listRef: n, open: i, pos: a, options: o, flat: s, activeIdx: c, setActiveIdx: l, isSelected: f, onSelect: p, colorDot: m, multiselectable: h = !1, className: g }) {
11
- return typeof document > "u" ? null : S(/* @__PURE__ */ b(u, { children: i && a && /* @__PURE__ */ b(d.ul, {
10
+ function S({ listId: t, listRef: n, open: i, pos: a, options: o, flat: s, activeIdx: c, setActiveIdx: l, isSelected: f, onSelect: p, colorDot: m, multiselectable: h = !1, className: g, optionClassName: _, groupLabelClassName: v }) {
11
+ return typeof document > "u" ? null : x(/* @__PURE__ */ y(u, { children: i && a && /* @__PURE__ */ y(d.ul, {
12
12
  ref: n,
13
13
  id: t,
14
14
  role: "listbox",
@@ -38,12 +38,12 @@ function C({ listId: t, listRef: n, open: i, pos: a, options: o, flat: s, active
38
38
  maxHeight: a.maxHeight
39
39
  },
40
40
  className: e("z-[110] overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-surface-raised py-1 shadow-floating", g),
41
- children: o.map((e, n) => r(e) ? /* @__PURE__ */ x("li", { children: [/* @__PURE__ */ b("p", {
42
- className: "px-3 pt-2 pb-1 text-xs font-semibold text-slate-600 uppercase tracking-widest",
43
- children: e.group
44
- }), /* @__PURE__ */ b("ul", { children: e.options.map((e) => {
41
+ children: o.map((n, i) => r(n) ? /* @__PURE__ */ b("li", { children: [/* @__PURE__ */ y("p", {
42
+ className: e("px-3 pt-2 pb-1 text-xs font-semibold text-slate-600 uppercase tracking-widest", v),
43
+ children: n.group
44
+ }), /* @__PURE__ */ y("ul", { children: n.options.map((e) => {
45
45
  let n = s.find((t) => t.value === e.value);
46
- return /* @__PURE__ */ b(w, {
46
+ return /* @__PURE__ */ y(C, {
47
47
  opt: e,
48
48
  listId: t,
49
49
  flatIdx: n.flatIdx,
@@ -51,22 +51,24 @@ function C({ listId: t, listRef: n, open: i, pos: a, options: o, flat: s, active
51
51
  isSelected: f(e.value),
52
52
  onSelect: p,
53
53
  onHover: l,
54
- colorDot: m
54
+ colorDot: m,
55
+ className: _
55
56
  }, e.value);
56
- }) })] }, n) : /* @__PURE__ */ b(w, {
57
- opt: e,
57
+ }) })] }, i) : /* @__PURE__ */ y(C, {
58
+ opt: n,
58
59
  listId: t,
59
- flatIdx: s.find((t) => t.value === e.value).flatIdx,
60
- isActive: s.find((t) => t.value === e.value).flatIdx === c,
61
- isSelected: f(e.value),
60
+ flatIdx: s.find((e) => e.value === n.value).flatIdx,
61
+ isActive: s.find((e) => e.value === n.value).flatIdx === c,
62
+ isSelected: f(n.value),
62
63
  onSelect: p,
63
64
  onHover: l,
64
- colorDot: m
65
- }, e.value))
65
+ colorDot: m,
66
+ className: _
67
+ }, n.value))
66
68
  }) }), document.body);
67
69
  }
68
- function w({ opt: t, listId: n, flatIdx: r, isActive: i, isSelected: a, onSelect: o, onHover: s, colorDot: c }) {
69
- return /* @__PURE__ */ x("li", {
70
+ function C({ opt: t, listId: n, flatIdx: r, isActive: i, isSelected: a, onSelect: o, onHover: s, colorDot: c, className: l }) {
71
+ return /* @__PURE__ */ b("li", {
70
72
  id: `${n}-opt-${r}`,
71
73
  role: "option",
72
74
  "aria-selected": a,
@@ -75,24 +77,24 @@ function w({ opt: t, listId: n, flatIdx: r, isActive: i, isSelected: a, onSelect
75
77
  onMouseDown: (e) => e.preventDefault(),
76
78
  onClick: () => !t.disabled && o(t),
77
79
  onMouseEnter: () => !t.disabled && s(r),
78
- className: e("flex min-h-9 items-center gap-3 px-3 py-2 cursor-pointer transition-colors select-none", i && "bg-surface-muted", a && !i && "bg-accent-50 dark:bg-accent-500/10", t.disabled && "opacity-40 cursor-not-allowed pointer-events-none"),
80
+ className: e("flex min-h-9 items-center gap-3 px-3 py-2 cursor-pointer transition-colors select-none", i && "bg-surface-muted", a && !i && "bg-accent-50 dark:bg-accent-500/10", t.disabled && "opacity-40 cursor-not-allowed pointer-events-none", l),
79
81
  children: [
80
- t.icon && /* @__PURE__ */ b("span", {
82
+ t.icon && /* @__PURE__ */ y("span", {
81
83
  className: "shrink-0 text-slate-500 dark:text-slate-400",
82
84
  children: t.icon
83
85
  }),
84
- t.color && t.color !== "default" && /* @__PURE__ */ b("span", { className: e("w-2 h-2 rounded-full shrink-0", c[t.color]) }),
85
- /* @__PURE__ */ x("div", {
86
+ t.color && t.color !== "default" && /* @__PURE__ */ y("span", { className: e("w-2 h-2 rounded-full shrink-0", c[t.color]) }),
87
+ /* @__PURE__ */ b("div", {
86
88
  className: "min-w-0 flex-1",
87
- children: [/* @__PURE__ */ b("p", {
89
+ children: [/* @__PURE__ */ y("p", {
88
90
  className: e("text-sm leading-snug truncate", a ? "text-accent-700 dark:text-accent-300 font-medium" : "text-foreground"),
89
91
  children: t.label
90
- }), t.description && /* @__PURE__ */ b("p", {
92
+ }), t.description && /* @__PURE__ */ y("p", {
91
93
  className: "mt-0.5 truncate text-xs text-muted-foreground",
92
94
  children: t.description
93
95
  })]
94
96
  }),
95
- a && /* @__PURE__ */ b("svg", {
97
+ a && /* @__PURE__ */ y("svg", {
96
98
  "aria-hidden": "true",
97
99
  width: "14",
98
100
  height: "14",
@@ -103,19 +105,19 @@ function w({ opt: t, listId: n, flatIdx: r, isActive: i, isSelected: a, onSelect
103
105
  strokeLinecap: "round",
104
106
  strokeLinejoin: "round",
105
107
  className: "text-accent-600 shrink-0",
106
- children: /* @__PURE__ */ b("path", { d: "m20 6-11 11-5-5" })
108
+ children: /* @__PURE__ */ y("path", { d: "m20 6-11 11-5-5" })
107
109
  })
108
110
  ]
109
111
  });
110
112
  }
111
113
  //#endregion
112
114
  //#region src/components/select/select-single.tsx
113
- var T = f(({ options: r, value: u, defaultValue: d, onChange: f, placeholder: S = "Select…", label: w, hint: T, error: E, disabled: D, required: O, clearable: k = !1, className: A, wrapperClassName: j, triggerClassName: M, listClassName: N, id: P, unstyled: F = !1 }, I) => {
114
- let L = h(), R = P ?? L, z = `${R}-list`, B = `${R}-message`, [V, H] = v(!1), [U, W] = v(d ?? ""), [G, K] = v(-1), q = _(null), J = _(null), Y = l((e) => f?.(e)), X = u === void 0 ? U : u, Z = g(() => i(r), [r]), Q = g(() => Z.find((e) => e.value === X), [Z, X]), $ = p((e) => {
115
+ var w = f(({ options: r, value: u, defaultValue: d, onChange: f, placeholder: x = "Select…", label: C, hint: w, error: T, disabled: E, required: D, clearable: O = !1, className: k, wrapperClassName: A, triggerClassName: j, listClassName: M, labelClassName: te, messageClassName: N, optionClassName: ne, groupLabelClassName: P, id: re, unstyled: F = !1 }, I) => {
116
+ let L = h(), R = re ?? L, z = `${R}-list`, B = `${R}-message`, [V, H] = v(!1), [U, W] = v(d ?? ""), [G, K] = v(-1), q = _(null), J = _(null), Y = l((e) => f?.(e)), X = u === void 0 ? U : u, Z = g(() => i(r), [r]), Q = g(() => Z.find((e) => e.value === X), [Z, X]), $ = p((e) => {
115
117
  u === void 0 && W(e.value), Y(e.value), H(!1), K(-1);
116
- }, [u, Y]), ee = p((e) => {
118
+ }, [u, Y]), ie = p((e) => {
117
119
  e.stopPropagation(), u === void 0 && W(""), Y("");
118
- }, [u, Y]), te = p((e) => {
120
+ }, [u, Y]), ae = p((e) => {
119
121
  if (!V) {
120
122
  if ([
121
123
  "Enter",
@@ -158,46 +160,46 @@ var T = f(({ options: r, value: u, defaultValue: d, onChange: f, placeholder: S
158
160
  }
159
161
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
160
162
  }, []);
161
- let ne = o(V, q);
162
- return F ? /* @__PURE__ */ x("div", {
163
+ let oe = o(V, q);
164
+ return F ? /* @__PURE__ */ b("div", {
163
165
  ref: q,
164
- className: e(A, j),
165
- children: [/* @__PURE__ */ b("button", {
166
+ className: e(k, A),
167
+ children: [/* @__PURE__ */ y("button", {
166
168
  ref: I,
167
169
  id: R,
168
170
  type: "button",
169
171
  role: "combobox",
170
172
  "aria-expanded": V,
171
173
  onClick: () => H((e) => !e),
172
- className: M,
173
- children: Q?.label ?? S
174
- }), V && /* @__PURE__ */ b("ul", {
174
+ className: j,
175
+ children: Q?.label ?? x
176
+ }), V && /* @__PURE__ */ y("ul", {
175
177
  ref: J,
176
178
  id: z,
177
- className: N,
178
- children: Z.map((e) => /* @__PURE__ */ b("li", {
179
+ className: M,
180
+ children: Z.map((e) => /* @__PURE__ */ y("li", {
179
181
  "data-idx": e.flatIdx,
180
182
  onClick: () => $(e),
181
183
  children: e.label
182
184
  }, e.value))
183
185
  })]
184
- }) : /* @__PURE__ */ x("div", {
186
+ }) : /* @__PURE__ */ b("div", {
185
187
  ref: q,
186
- className: e("relative", t, j, A),
188
+ className: e("relative", t, A, k),
187
189
  children: [
188
- w && /* @__PURE__ */ x("label", {
190
+ C && /* @__PURE__ */ b("label", {
189
191
  htmlFor: R,
190
- className: "text-xs font-semibold leading-5 text-foreground",
191
- children: [w, O && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
192
+ className: e("text-xs font-semibold leading-5 text-foreground", te),
193
+ children: [C, D && /* @__PURE__ */ b(ee, { children: [/* @__PURE__ */ y("span", {
192
194
  "aria-hidden": "true",
193
195
  className: "ml-1 text-destructive",
194
196
  children: "*"
195
- }), /* @__PURE__ */ b("span", {
197
+ }), /* @__PURE__ */ y("span", {
196
198
  className: "sr-only",
197
199
  children: " (required)"
198
200
  })] })]
199
201
  }),
200
- /* @__PURE__ */ x("button", {
202
+ /* @__PURE__ */ b("button", {
201
203
  ref: I,
202
204
  id: R,
203
205
  type: "button",
@@ -206,40 +208,40 @@ var T = f(({ options: r, value: u, defaultValue: d, onChange: f, placeholder: S
206
208
  "aria-expanded": V,
207
209
  "aria-controls": z,
208
210
  "aria-activedescendant": V && G >= 0 ? `${z}-opt-${G}` : void 0,
209
- "aria-invalid": E ? !0 : void 0,
210
- "aria-required": O || void 0,
211
- "aria-describedby": E || T ? B : void 0,
212
- disabled: D,
213
- onKeyDown: te,
211
+ "aria-invalid": T ? !0 : void 0,
212
+ "aria-required": D || void 0,
213
+ "aria-describedby": T || w ? B : void 0,
214
+ disabled: E,
215
+ onKeyDown: ae,
214
216
  onClick: () => {
215
- D || (H((e) => !e), V || K(Z.find((e) => e.value === X && e.flatIdx >= 0)?.flatIdx ?? -1));
217
+ E || (H((e) => !e), V || K(Z.find((e) => e.value === X && e.flatIdx >= 0)?.flatIdx ?? -1));
216
218
  },
217
- className: e("flex h-9 w-full items-center gap-2 rounded-[var(--radius-md)] px-3 text-left outline-none", n, "focus:border-accent-500 focus:ring-2 focus:ring-focus-ring/20", E && "border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/20", D && "opacity-50 cursor-not-allowed", M),
219
+ className: e("flex h-9 w-full items-center gap-2 rounded-[var(--radius-md)] px-3 text-left outline-none", n, "focus:border-accent-500 focus:ring-[3px] focus:ring-focus-ring/25", T && "border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/25", E && "opacity-50 cursor-not-allowed", j),
218
220
  children: [
219
- Q?.icon && /* @__PURE__ */ b("span", {
221
+ Q?.icon && /* @__PURE__ */ y("span", {
220
222
  className: "shrink-0 text-slate-500 dark:text-slate-400",
221
223
  children: Q.icon
222
224
  }),
223
- Q?.color && Q.color !== "default" && /* @__PURE__ */ b("span", { className: e("w-2 h-2 rounded-full shrink-0", s[Q.color]) }),
224
- /* @__PURE__ */ b("span", {
225
+ Q?.color && Q.color !== "default" && /* @__PURE__ */ y("span", { className: e("w-2 h-2 rounded-full shrink-0", s[Q.color]) }),
226
+ /* @__PURE__ */ y("span", {
225
227
  className: e("flex-1 min-w-0 text-sm truncate", Q ? "text-foreground" : "text-muted-foreground"),
226
- children: Q?.label ?? S
228
+ children: Q?.label ?? x
227
229
  }),
228
- k && X && !D && /* @__PURE__ */ b("span", {
230
+ O && X && !E && /* @__PURE__ */ y("span", {
229
231
  role: "button",
230
232
  tabIndex: -1,
231
- onClick: ee,
233
+ onClick: ie,
232
234
  className: "shrink-0 text-slate-400 hover:text-slate-600 dark:hover:text-slate-300 transition-colors",
233
- children: /* @__PURE__ */ b(a, {})
235
+ children: /* @__PURE__ */ y(a, {})
234
236
  }),
235
- /* @__PURE__ */ b(c, { open: V })
237
+ /* @__PURE__ */ y(c, { open: V })
236
238
  ]
237
239
  }),
238
- /* @__PURE__ */ b(C, {
240
+ /* @__PURE__ */ y(S, {
239
241
  listId: z,
240
242
  listRef: J,
241
243
  open: V,
242
- pos: ne,
244
+ pos: oe,
243
245
  options: r,
244
246
  flat: Z,
245
247
  activeIdx: G,
@@ -247,27 +249,29 @@ var T = f(({ options: r, value: u, defaultValue: d, onChange: f, placeholder: S
247
249
  isSelected: (e) => e === X,
248
250
  onSelect: $,
249
251
  colorDot: s,
250
- className: N
252
+ className: M,
253
+ optionClassName: ne,
254
+ groupLabelClassName: P
251
255
  }),
252
- E && /* @__PURE__ */ b("p", {
256
+ T && /* @__PURE__ */ y("p", {
253
257
  id: B,
254
258
  "aria-live": "polite",
255
- className: "text-xs leading-5 text-destructive",
256
- children: E
259
+ className: e("text-xs leading-5 text-destructive", N),
260
+ children: T
257
261
  }),
258
- T && !E && /* @__PURE__ */ b("p", {
262
+ w && !T && /* @__PURE__ */ y("p", {
259
263
  id: B,
260
- className: "text-xs leading-5 text-muted-foreground",
261
- children: T
264
+ className: e("text-xs leading-5 text-muted-foreground", N),
265
+ children: w
262
266
  })
263
267
  ]
264
268
  });
265
269
  });
266
- T.displayName = "SelectSingle";
270
+ w.displayName = "SelectSingle";
267
271
  //#endregion
268
272
  //#region src/components/select/select-multi.tsx
269
- var E = f(({ options: r, value: l, defaultValue: u, onChange: d, placeholder: f = "Select…", label: p, hint: g, error: S, disabled: w, required: T, clearable: E = !1, className: D, wrapperClassName: O, triggerClassName: k, listClassName: A, id: j, unstyled: M = !1 }, N) => {
270
- let P = h(), F = j ?? P, I = `${F}-list`, L = `${F}-message`, [R, z] = v(!1), [B, V] = v(u ?? []), [H, U] = v(-1), W = _(null), G = _(null), K = l === void 0 ? B : l, q = i(r), J = q.filter((e) => K.includes(e.value));
273
+ var T = f(({ options: r, value: l, defaultValue: u, onChange: d, placeholder: f = "Select…", label: p, hint: g, error: x, disabled: C, required: w, clearable: T = !1, className: E, wrapperClassName: D, triggerClassName: O, listClassName: k, labelClassName: A, messageClassName: j, optionClassName: M, groupLabelClassName: te, id: N, unstyled: ne = !1 }, P) => {
274
+ let re = h(), F = N ?? re, I = `${F}-list`, L = `${F}-message`, [R, z] = v(!1), [B, V] = v(u ?? []), [H, U] = v(-1), W = _(null), G = _(null), K = l === void 0 ? B : l, q = i(r), J = q.filter((e) => K.includes(e.value));
271
275
  function Y(e) {
272
276
  let t = K.includes(e.value) ? K.filter((t) => t !== e.value) : [...K, e.value];
273
277
  l === void 0 && V(t), d?.(t);
@@ -314,11 +318,11 @@ var E = f(({ options: r, value: l, defaultValue: u, onChange: d, placeholder: f
314
318
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
315
319
  }, []);
316
320
  let $ = o(R, W);
317
- return M ? /* @__PURE__ */ x("div", {
321
+ return ne ? /* @__PURE__ */ b("div", {
318
322
  ref: W,
319
- className: e(D, O),
320
- children: [/* @__PURE__ */ b("button", {
321
- ref: N,
323
+ className: e(E, D),
324
+ children: [/* @__PURE__ */ y("button", {
325
+ ref: P,
322
326
  id: F,
323
327
  type: "button",
324
328
  role: "combobox",
@@ -326,9 +330,9 @@ var E = f(({ options: r, value: l, defaultValue: u, onChange: d, placeholder: f
326
330
  "aria-controls": I,
327
331
  onKeyDown: Q,
328
332
  onClick: () => z((e) => !e),
329
- className: k,
333
+ className: O,
330
334
  children: J.length > 0 ? J.map((e) => e.label).join(", ") : f
331
- }), /* @__PURE__ */ b(C, {
335
+ }), /* @__PURE__ */ y(S, {
332
336
  listId: I,
333
337
  listRef: G,
334
338
  open: R,
@@ -341,26 +345,26 @@ var E = f(({ options: r, value: l, defaultValue: u, onChange: d, placeholder: f
341
345
  onSelect: Y,
342
346
  multiselectable: !0,
343
347
  colorDot: s,
344
- className: A
348
+ className: k
345
349
  })]
346
- }) : /* @__PURE__ */ x("div", {
350
+ }) : /* @__PURE__ */ b("div", {
347
351
  ref: W,
348
- className: e("relative", t, O, D),
352
+ className: e("relative", t, D, E),
349
353
  children: [
350
- p && /* @__PURE__ */ x("label", {
354
+ p && /* @__PURE__ */ b("label", {
351
355
  htmlFor: F,
352
- className: "text-xs font-semibold leading-5 text-foreground",
353
- children: [p, T && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
356
+ className: e("text-xs font-semibold leading-5 text-foreground", A),
357
+ children: [p, w && /* @__PURE__ */ b(ee, { children: [/* @__PURE__ */ y("span", {
354
358
  "aria-hidden": "true",
355
359
  className: "ml-1 text-destructive",
356
360
  children: "*"
357
- }), /* @__PURE__ */ b("span", {
361
+ }), /* @__PURE__ */ y("span", {
358
362
  className: "sr-only",
359
363
  children: " (required)"
360
364
  })] })]
361
365
  }),
362
- /* @__PURE__ */ x("button", {
363
- ref: N,
366
+ /* @__PURE__ */ b("button", {
367
+ ref: P,
364
368
  id: F,
365
369
  type: "button",
366
370
  role: "combobox",
@@ -368,56 +372,56 @@ var E = f(({ options: r, value: l, defaultValue: u, onChange: d, placeholder: f
368
372
  "aria-expanded": R,
369
373
  "aria-controls": I,
370
374
  "aria-activedescendant": R && H >= 0 ? `${I}-opt-${H}` : void 0,
371
- "aria-invalid": S ? !0 : void 0,
372
- "aria-required": T || void 0,
373
- "aria-describedby": S || g ? L : void 0,
374
- disabled: w,
375
+ "aria-invalid": x ? !0 : void 0,
376
+ "aria-required": w || void 0,
377
+ "aria-describedby": x || g ? L : void 0,
378
+ disabled: C,
375
379
  onKeyDown: Q,
376
380
  onClick: () => {
377
- w || z((e) => !e);
381
+ C || z((e) => !e);
378
382
  },
379
- className: e("flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-[var(--radius-md)] px-2.5 py-1.5 text-left outline-none", n, "focus:border-accent-500 focus:ring-2 focus:ring-focus-ring/20", S && "border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/20", w && "opacity-50 cursor-not-allowed", k),
380
- children: [J.length === 0 ? /* @__PURE__ */ b("span", {
383
+ className: e("flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-[var(--radius-md)] px-2.5 py-1.5 text-left outline-none", n, "focus:border-accent-500 focus:ring-[3px] focus:ring-focus-ring/25", x && "border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/25", C && "opacity-50 cursor-not-allowed", O),
384
+ children: [J.length === 0 ? /* @__PURE__ */ y("span", {
381
385
  className: "flex-1 text-sm text-slate-500 truncate",
382
386
  children: f
383
- }) : J.map((t) => /* @__PURE__ */ x("span", {
387
+ }) : J.map((t) => /* @__PURE__ */ b("span", {
384
388
  className: "inline-flex max-w-[160px] items-center gap-1 rounded-md border border-border bg-surface-muted px-2 py-0.5 text-xs font-medium text-foreground",
385
389
  children: [
386
- t.color && t.color !== "default" && /* @__PURE__ */ b("span", { className: e("w-1.5 h-1.5 rounded-full shrink-0", s[t.color]) }),
387
- /* @__PURE__ */ b("span", {
390
+ t.color && t.color !== "default" && /* @__PURE__ */ y("span", { className: e("w-1.5 h-1.5 rounded-full shrink-0", s[t.color]) }),
391
+ /* @__PURE__ */ y("span", {
388
392
  className: "truncate",
389
393
  children: t.label
390
394
  }),
391
- /* @__PURE__ */ b("span", {
395
+ /* @__PURE__ */ y("span", {
392
396
  role: "button",
393
397
  tabIndex: -1,
394
398
  onMouseDown: (e) => e.stopPropagation(),
395
399
  onClick: (e) => X(t.value, e),
396
- className: "shrink-0 text-slate-500 dark:text-slate-400 hover:text-gray-900 dark:hover:text-white transition-colors cursor-pointer ml-0.5",
400
+ className: "shrink-0 text-slate-500 dark:text-slate-400 hover:text-foreground transition-colors cursor-pointer ml-0.5",
397
401
  "aria-label": `Remove ${t.label}`,
398
- children: /* @__PURE__ */ b(a, {})
402
+ children: /* @__PURE__ */ y(a, {})
399
403
  })
400
404
  ]
401
- }, t.value)), /* @__PURE__ */ x("span", {
405
+ }, t.value)), /* @__PURE__ */ b("span", {
402
406
  className: "ml-auto flex items-center gap-1.5 shrink-0 pl-1",
403
407
  children: [
404
- E && K.length > 0 && !w && /* @__PURE__ */ b("span", {
408
+ T && K.length > 0 && !C && /* @__PURE__ */ y("span", {
405
409
  role: "button",
406
410
  tabIndex: -1,
407
411
  onClick: Z,
408
412
  className: "text-slate-500 hover:text-slate-600 dark:hover:text-slate-300 transition-colors",
409
413
  "aria-label": "Clear all",
410
- children: /* @__PURE__ */ b(a, {})
414
+ children: /* @__PURE__ */ y(a, {})
411
415
  }),
412
- K.length > 0 && /* @__PURE__ */ b("span", {
416
+ K.length > 0 && /* @__PURE__ */ y("span", {
413
417
  className: "text-[10px] font-medium text-slate-500 tabular-nums",
414
418
  children: K.length
415
419
  }),
416
- /* @__PURE__ */ b(c, { open: R })
420
+ /* @__PURE__ */ y(c, { open: R })
417
421
  ]
418
422
  })]
419
423
  }),
420
- /* @__PURE__ */ b(C, {
424
+ /* @__PURE__ */ y(S, {
421
425
  listId: I,
422
426
  listRef: G,
423
427
  open: R,
@@ -430,32 +434,34 @@ var E = f(({ options: r, value: l, defaultValue: u, onChange: d, placeholder: f
430
434
  onSelect: Y,
431
435
  multiselectable: !0,
432
436
  colorDot: s,
433
- className: A
437
+ className: k,
438
+ optionClassName: M,
439
+ groupLabelClassName: te
434
440
  }),
435
- S && /* @__PURE__ */ b("p", {
441
+ x && /* @__PURE__ */ y("p", {
436
442
  id: L,
437
443
  "aria-live": "polite",
438
- className: "text-xs leading-5 text-destructive",
439
- children: S
444
+ className: e("text-xs leading-5 text-destructive", j),
445
+ children: x
440
446
  }),
441
- g && !S && /* @__PURE__ */ b("p", {
447
+ g && !x && /* @__PURE__ */ y("p", {
442
448
  id: L,
443
- className: "text-xs leading-5 text-muted-foreground",
449
+ className: e("text-xs leading-5 text-muted-foreground", j),
444
450
  children: g
445
451
  })
446
452
  ]
447
453
  });
448
454
  });
449
- E.displayName = "SelectMulti";
455
+ T.displayName = "SelectMulti";
450
456
  //#endregion
451
457
  //#region src/components/select.tsx
452
- var D = f((e, t) => e.multiple ? /* @__PURE__ */ b(E, {
458
+ var E = f((e, t) => e.multiple ? /* @__PURE__ */ y(T, {
453
459
  ...e,
454
460
  ref: t
455
- }) : /* @__PURE__ */ b(T, {
461
+ }) : /* @__PURE__ */ y(w, {
456
462
  ...e,
457
463
  ref: t
458
464
  }));
459
- D.displayName = "Select";
465
+ E.displayName = "Select";
460
466
  //#endregion
461
- export { D as t };
467
+ export { E as t };