@bzync/rui 0.0.5 → 0.0.8

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 +5 -0
  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 +2 -2
  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,25 +1,26 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
3
- import "../component-styles-Bgy44fc8.js";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
+ import "../component-styles-C2CbHEEA.js";
4
4
  import { t } from "../focus-Dk1YWVPN.js";
5
- import { AnimatePresence as n, motion as r } from "framer-motion";
6
- import { createContext as i, useContext as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u } from "react";
7
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
+ import { n } from "../motion-gnRzFS5f.js";
6
+ import { AnimatePresence as r, motion as i } from "framer-motion";
7
+ import { createContext as a, useContext as o, useEffect as s, useId as c, useMemo as l, useRef as u, useState as d } from "react";
8
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
9
  //#region src/components/command.tsx
9
- var p = i(null);
10
- function m() {
11
- let e = a(p);
10
+ var m = a(null);
11
+ function h() {
12
+ let e = o(m);
12
13
  if (!e) throw Error("useCommand must be inside <CommandProvider>");
13
14
  return e;
14
15
  }
15
- function h({ children: e, shortcut: t = "k" }) {
16
- let [n, r] = u(!1);
17
- return o(() => {
16
+ function g({ children: e, shortcut: t = "k" }) {
17
+ let [n, r] = d(!1);
18
+ return s(() => {
18
19
  function e(e) {
19
20
  (e.metaKey || e.ctrlKey) && e.key === t && (e.preventDefault(), r((e) => !e));
20
21
  }
21
22
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
22
- }, [t]), /* @__PURE__ */ d(p.Provider, {
23
+ }, [t]), /* @__PURE__ */ f(m.Provider, {
23
24
  value: {
24
25
  open: n,
25
26
  setOpen: r
@@ -27,63 +28,63 @@ function h({ children: e, shortcut: t = "k" }) {
27
28
  children: e
28
29
  });
29
30
  }
30
- function g({ items: i, placeholder: a = "Search commands…", emptyText: p = "No results found.", ariaLabel: h = "Command palette" }) {
31
- let { open: g, setOpen: _ } = m(), [v, y] = u(""), [b, x] = u(0), S = l(null), C = l(null), w = l(null), T = s();
32
- o(() => {
33
- if (!g) return;
34
- let e = document.activeElement instanceof HTMLElement ? document.activeElement : null, n = document.body.style.overflow, r = window.setTimeout(() => S.current?.focus(), 0), i = (e) => {
31
+ function _({ items: a, placeholder: o = "Search commands…", emptyText: m = "No results found.", ariaLabel: g = "Command palette", className: _, overlayClassName: v, searchClassName: y, inputClassName: b, listClassName: x, itemClassName: S, emptyClassName: C }) {
32
+ let { open: w, setOpen: T } = h(), [E, D] = d(""), [O, k] = d(0), A = u(null), j = u(null), M = u(null), N = c();
33
+ s(() => {
34
+ if (!w) return;
35
+ let e = document.activeElement instanceof HTMLElement ? document.activeElement : null, n = document.body.style.overflow, r = window.setTimeout(() => A.current?.focus(), 0), i = (e) => {
35
36
  if (e.key === "Escape") {
36
- e.preventDefault(), _(!1);
37
+ e.preventDefault(), T(!1);
37
38
  return;
38
39
  }
39
- if (e.key !== "Tab" || !w.current) return;
40
- let n = t(w.current);
40
+ if (e.key !== "Tab" || !M.current) return;
41
+ let n = t(M.current);
41
42
  if (n.length === 0) {
42
- e.preventDefault(), w.current.focus();
43
+ e.preventDefault(), M.current.focus();
43
44
  return;
44
45
  }
45
46
  let r = n[0], i = n[n.length - 1];
46
47
  e.shiftKey && document.activeElement === r ? (e.preventDefault(), i.focus()) : !e.shiftKey && document.activeElement === i && (e.preventDefault(), r.focus());
47
48
  };
48
- return y(""), x(0), document.body.style.overflow = "hidden", document.addEventListener("keydown", i), () => {
49
+ return D(""), k(0), document.body.style.overflow = "hidden", document.addEventListener("keydown", i), () => {
49
50
  window.clearTimeout(r), document.body.style.overflow = n, document.removeEventListener("keydown", i), e?.focus();
50
51
  };
51
- }, [g, _]);
52
- let E = c(() => {
53
- if (!v) return i;
54
- let e = v.toLowerCase();
55
- return i.filter((t) => t.label.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e) || t.keywords?.some((t) => t.toLowerCase().includes(e)));
56
- }, [v, i]), D = c(() => {
52
+ }, [w, T]);
53
+ let P = l(() => {
54
+ if (!E) return a;
55
+ let e = E.toLowerCase();
56
+ return a.filter((t) => t.label.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e) || t.keywords?.some((t) => t.toLowerCase().includes(e)));
57
+ }, [E, a]), F = l(() => {
57
58
  let e = /* @__PURE__ */ new Map();
58
- for (let t of E) {
59
+ for (let t of P) {
59
60
  let n = t.group ?? "";
60
61
  e.has(n) || e.set(n, []), e.get(n).push(t);
61
62
  }
62
63
  return e;
63
- }, [E]), O = c(() => Array.from(D.values()).flat(), [D]);
64
- function k(e) {
65
- e.key === "ArrowDown" ? (e.preventDefault(), x((e) => Math.min(e + 1, Math.max(O.length - 1, 0)))) : e.key === "ArrowUp" ? (e.preventDefault(), x((e) => Math.max(e - 1, 0))) : e.key === "Enter" ? (e.preventDefault(), O[b]?.onSelect(), _(!1)) : e.key === "Escape" && _(!1);
64
+ }, [P]), I = l(() => Array.from(F.values()).flat(), [F]);
65
+ function L(e) {
66
+ e.key === "ArrowDown" ? (e.preventDefault(), k((e) => Math.min(e + 1, Math.max(I.length - 1, 0)))) : e.key === "ArrowUp" ? (e.preventDefault(), k((e) => Math.max(e - 1, 0))) : e.key === "Enter" ? (e.preventDefault(), I[O]?.onSelect(), T(!1)) : e.key === "Escape" && T(!1);
66
67
  }
67
- o(() => {
68
- C.current && C.current.querySelector("[data-active=\"true\"]")?.scrollIntoView({ block: "nearest" });
69
- }, [b]);
70
- let A = 0;
71
- return /* @__PURE__ */ d(n, { children: g && /* @__PURE__ */ f("div", {
68
+ s(() => {
69
+ j.current && j.current.querySelector("[data-active=\"true\"]")?.scrollIntoView({ block: "nearest" });
70
+ }, [O]);
71
+ let R = 0;
72
+ return /* @__PURE__ */ f(r, { children: w && /* @__PURE__ */ p("div", {
72
73
  className: "fixed inset-0 z-[200] flex items-start justify-center pt-[15vh] p-4",
73
- children: [/* @__PURE__ */ d(r.div, {
74
+ children: [/* @__PURE__ */ f(i.div, {
74
75
  initial: { opacity: 0 },
75
76
  animate: { opacity: 1 },
76
77
  exit: { opacity: 0 },
77
- transition: { duration: .15 },
78
- className: "absolute inset-0 bg-overlay",
79
- onClick: () => _(!1),
78
+ transition: n.fade,
79
+ className: e("absolute inset-0 bg-overlay", v),
80
+ onClick: () => T(!1),
80
81
  "aria-hidden": "true"
81
- }), /* @__PURE__ */ f(r.div, {
82
- ref: w,
82
+ }), /* @__PURE__ */ p(i.div, {
83
+ ref: M,
83
84
  tabIndex: -1,
84
85
  role: "dialog",
85
86
  "aria-modal": "true",
86
- "aria-label": h,
87
+ "aria-label": g,
87
88
  initial: {
88
89
  opacity: 0,
89
90
  scale: .96,
@@ -104,11 +105,11 @@ function g({ items: i, placeholder: a = "Search commands…", emptyText: p = "No
104
105
  stiffness: 400,
105
106
  damping: 30
106
107
  },
107
- className: "relative w-full max-w-lg overflow-hidden rounded-[var(--radius-xl)] border border-border bg-surface-raised shadow-overlay",
108
- children: [/* @__PURE__ */ f("div", {
109
- className: "flex items-center gap-3 border-b border-border px-4",
108
+ className: e("relative w-full max-w-lg overflow-hidden rounded-[var(--radius-xl)] border border-border bg-surface-raised shadow-overlay", _),
109
+ children: [/* @__PURE__ */ p("div", {
110
+ className: e("flex items-center gap-3 border-b border-border px-4", y),
110
111
  children: [
111
- /* @__PURE__ */ f("svg", {
112
+ /* @__PURE__ */ p("svg", {
112
113
  width: "16",
113
114
  height: "16",
114
115
  viewBox: "0 0 24 24",
@@ -118,80 +119,80 @@ function g({ items: i, placeholder: a = "Search commands…", emptyText: p = "No
118
119
  strokeLinecap: "round",
119
120
  strokeLinejoin: "round",
120
121
  className: "text-slate-400 shrink-0",
121
- children: [/* @__PURE__ */ d("circle", {
122
+ children: [/* @__PURE__ */ f("circle", {
122
123
  cx: "11",
123
124
  cy: "11",
124
125
  r: "8"
125
- }), /* @__PURE__ */ d("path", { d: "m21 21-4.35-4.35" })]
126
+ }), /* @__PURE__ */ f("path", { d: "m21 21-4.35-4.35" })]
126
127
  }),
127
- /* @__PURE__ */ d("input", {
128
- ref: S,
128
+ /* @__PURE__ */ f("input", {
129
+ ref: A,
129
130
  type: "search",
130
131
  role: "combobox",
131
- "aria-label": h,
132
+ "aria-label": g,
132
133
  "aria-autocomplete": "list",
133
134
  "aria-expanded": "true",
134
- "aria-controls": T,
135
- "aria-activedescendant": O[b] ? `${T}-option-${b}` : void 0,
136
- value: v,
135
+ "aria-controls": N,
136
+ "aria-activedescendant": I[O] ? `${N}-option-${O}` : void 0,
137
+ value: E,
137
138
  onChange: (e) => {
138
- y(e.target.value), x(0);
139
+ D(e.target.value), k(0);
139
140
  },
140
- onKeyDown: k,
141
- placeholder: a,
142
- className: "min-w-0 flex-1 bg-transparent py-3.5 text-sm text-foreground outline-none placeholder:text-muted-foreground"
141
+ onKeyDown: L,
142
+ placeholder: o,
143
+ className: e("min-w-0 flex-1 bg-transparent py-3.5 text-sm text-foreground outline-none placeholder:text-muted-foreground", b)
143
144
  }),
144
- /* @__PURE__ */ d("kbd", {
145
+ /* @__PURE__ */ f("kbd", {
145
146
  className: "shrink-0 rounded-[var(--radius-sm)] border border-border-strong bg-surface-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",
146
147
  children: "ESC"
147
148
  })
148
149
  ]
149
- }), /* @__PURE__ */ d("div", {
150
- id: T,
151
- ref: C,
150
+ }), /* @__PURE__ */ f("div", {
151
+ id: N,
152
+ ref: j,
152
153
  role: "listbox",
153
154
  "aria-label": "Commands",
154
- className: "max-h-80 overflow-y-auto py-1.5",
155
- children: E.length === 0 ? /* @__PURE__ */ d("p", {
156
- className: "py-10 text-center text-sm text-muted-foreground",
157
- children: p
158
- }) : Array.from(D.entries()).map(([t, n]) => /* @__PURE__ */ f("div", {
155
+ className: e("max-h-80 overflow-y-auto py-1.5", x),
156
+ children: P.length === 0 ? /* @__PURE__ */ f("p", {
157
+ className: e("py-10 text-center text-sm text-muted-foreground", C),
158
+ children: m
159
+ }) : Array.from(F.entries()).map(([t, n]) => /* @__PURE__ */ p("div", {
159
160
  role: "group",
160
161
  "aria-label": t || void 0,
161
- children: [t && /* @__PURE__ */ d("p", {
162
+ children: [t && /* @__PURE__ */ f("p", {
162
163
  className: "px-4 py-1 text-[10px] font-semibold text-slate-500 uppercase tracking-widest",
163
164
  children: t
164
165
  }), n.map((t) => {
165
- let n = A++, r = n === b;
166
- return /* @__PURE__ */ f("button", {
167
- id: `${T}-option-${n}`,
166
+ let n = R++, r = n === O;
167
+ return /* @__PURE__ */ p("button", {
168
+ id: `${N}-option-${n}`,
168
169
  type: "button",
169
170
  role: "option",
170
171
  "aria-selected": r,
171
172
  "data-active": r,
172
173
  onClick: () => {
173
- t.onSelect(), _(!1);
174
+ t.onSelect(), T(!1);
174
175
  },
175
- onMouseEnter: () => x(n),
176
- className: e("flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg", r ? "bg-surface-muted" : "hover:bg-surface-muted/70"),
176
+ onMouseEnter: () => k(n),
177
+ className: e("flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors", "focus-ring", r ? "bg-surface-muted" : "hover:bg-surface-muted/70", S),
177
178
  children: [
178
- t.icon && /* @__PURE__ */ d("span", {
179
+ t.icon && /* @__PURE__ */ f("span", {
179
180
  className: "shrink-0 text-slate-500 dark:text-slate-400 w-5 flex items-center justify-center",
180
181
  children: t.icon
181
182
  }),
182
- /* @__PURE__ */ f("div", {
183
+ /* @__PURE__ */ p("div", {
183
184
  className: "flex-1 min-w-0",
184
- children: [/* @__PURE__ */ d("p", {
185
+ children: [/* @__PURE__ */ f("p", {
185
186
  className: "truncate text-sm text-foreground",
186
187
  children: t.label
187
- }), t.description && /* @__PURE__ */ d("p", {
188
+ }), t.description && /* @__PURE__ */ f("p", {
188
189
  className: "truncate text-xs text-muted-foreground",
189
190
  children: t.description
190
191
  })]
191
192
  }),
192
- t.shortcut && /* @__PURE__ */ d("div", {
193
+ t.shortcut && /* @__PURE__ */ f("div", {
193
194
  className: "flex items-center gap-0.5 shrink-0",
194
- children: t.shortcut.map((e, t) => /* @__PURE__ */ d("kbd", {
195
+ children: t.shortcut.map((e, t) => /* @__PURE__ */ f("kbd", {
195
196
  className: "rounded-[var(--radius-sm)] border border-border bg-surface-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",
196
197
  children: e
197
198
  }, t))
@@ -205,4 +206,4 @@ function g({ items: i, placeholder: a = "Search commands…", emptyText: p = "No
205
206
  }) });
206
207
  }
207
208
  //#endregion
208
- export { g as CommandPalette, h as CommandProvider, m as useCommand };
209
+ export { _ as CommandPalette, g as CommandProvider, h as useCommand };
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./button.cjs"),t=require("./modal.cjs");let n=require("react/jsx-runtime");function r({open:r,onClose:i,onConfirm:a,title:o=`Are you sure?`,description:s,confirmLabel:c=`Confirm`,cancelLabel:l=`Cancel`,destructive:u=!1,loading:d=!1,icon:f}){return(0,n.jsxs)(t.Modal,{open:r,onClose:i,size:`sm`,title:o,description:typeof s==`string`?s:void 0,icon:f??(u?(0,n.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`text-red-600 dark:text-red-400`,children:[(0,n.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`}),(0,n.jsx)(`path`,{d:`M12 9v4`}),(0,n.jsx)(`path`,{d:`M12 17h.01`})]}):(0,n.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`text-info`,children:[(0,n.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,n.jsx)(`path`,{d:`M12 16v-4`}),(0,n.jsx)(`path`,{d:`M12 8h.01`})]})),children:[typeof s!=`string`&&s&&(0,n.jsx)(`div`,{className:`text-sm leading-relaxed text-slate-600 dark:text-slate-400`,children:s}),(0,n.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2.5 pt-2`,children:[(0,n.jsx)(e.Button,{variant:`ghost`,onClick:i,disabled:d,children:l}),(0,n.jsx)(e.Button,{variant:u?`destructive`:`primary`,onClick:a,loading:d,autoFocus:!0,children:c})]})]})}exports.ConfirmDialog=r;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs"),t=require("./button.cjs"),n=require("./modal.cjs");let r=require("react/jsx-runtime");function i({open:i,onClose:a,onConfirm:o,title:s=`Are you sure?`,description:c,confirmLabel:l=`Confirm`,cancelLabel:u=`Cancel`,destructive:d=!1,loading:f=!1,icon:p,className:m,overlayClassName:h,panelClassName:g,contentClassName:_,actionsClassName:v,cancelButtonClassName:y,confirmButtonClassName:b}){return(0,r.jsxs)(n.Modal,{open:i,onClose:a,size:`sm`,title:s,description:typeof c==`string`?c:void 0,icon:p??(d?(0,r.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`text-red-600 dark:text-red-400`,children:[(0,r.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`}),(0,r.jsx)(`path`,{d:`M12 9v4`}),(0,r.jsx)(`path`,{d:`M12 17h.01`})]}):(0,r.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`text-info`,children:[(0,r.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,r.jsx)(`path`,{d:`M12 16v-4`}),(0,r.jsx)(`path`,{d:`M12 8h.01`})]})),className:m,overlayClassName:h,panelClassName:g,children:[typeof c!=`string`&&c&&(0,r.jsx)(`div`,{className:e.t(`text-sm leading-relaxed text-slate-600 dark:text-slate-400`,_),children:c}),(0,r.jsxs)(`div`,{className:e.t(`flex flex-wrap justify-end gap-2.5 pt-2`,v),children:[(0,r.jsx)(t.Button,{variant:`ghost`,onClick:a,disabled:f,className:y,children:u}),(0,r.jsx)(t.Button,{variant:d?`destructive`:`primary`,onClick:o,loading:f,autoFocus:!0,className:b,children:l})]})]})}exports.ConfirmDialog=i;
@@ -10,5 +10,12 @@ export interface ConfirmDialogProps {
10
10
  destructive?: boolean;
11
11
  loading?: boolean;
12
12
  icon?: ReactNode;
13
+ className?: string;
14
+ overlayClassName?: string;
15
+ panelClassName?: string;
16
+ contentClassName?: string;
17
+ actionsClassName?: string;
18
+ cancelButtonClassName?: string;
19
+ confirmButtonClassName?: string;
13
20
  }
14
- export declare function ConfirmDialog({ open, onClose, onConfirm, title, description, confirmLabel, cancelLabel, destructive, loading, icon, }: ConfirmDialogProps): import("react").JSX.Element;
21
+ export declare function ConfirmDialog({ open, onClose, onConfirm, title, description, confirmLabel, cancelLabel, destructive, loading, icon, className, overlayClassName, panelClassName, contentClassName, actionsClassName, cancelButtonClassName, confirmButtonClassName, }: ConfirmDialogProps): import("react").JSX.Element;
@@ -1,16 +1,17 @@
1
1
  "use client";
2
- import { Button as e } from "./button.js";
3
- import { Modal as t } from "./modal.js";
4
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
+ import { Button as t } from "./button.js";
4
+ import { Modal as n } from "./modal.js";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
6
  //#region src/components/confirm-dialog.tsx
6
- function i({ open: i, onClose: a, onConfirm: o, title: s = "Are you sure?", description: c, confirmLabel: l = "Confirm", cancelLabel: u = "Cancel", destructive: d = !1, loading: f = !1, icon: p }) {
7
- return /* @__PURE__ */ r(t, {
8
- open: i,
9
- onClose: a,
7
+ function a({ open: a, onClose: o, onConfirm: s, title: c = "Are you sure?", description: l, confirmLabel: u = "Confirm", cancelLabel: d = "Cancel", destructive: f = !1, loading: p = !1, icon: m, className: h, overlayClassName: g, panelClassName: _, contentClassName: v, actionsClassName: y, cancelButtonClassName: b, confirmButtonClassName: x }) {
8
+ return /* @__PURE__ */ i(n, {
9
+ open: a,
10
+ onClose: o,
10
11
  size: "sm",
11
- title: s,
12
- description: typeof c == "string" ? c : void 0,
13
- icon: p ?? (d ? /* @__PURE__ */ r("svg", {
12
+ title: c,
13
+ description: typeof l == "string" ? l : void 0,
14
+ icon: m ?? (f ? /* @__PURE__ */ i("svg", {
14
15
  width: "20",
15
16
  height: "20",
16
17
  viewBox: "0 0 24 24",
@@ -21,11 +22,11 @@ function i({ open: i, onClose: a, onConfirm: o, title: s = "Are you sure?", desc
21
22
  strokeLinejoin: "round",
22
23
  className: "text-red-600 dark:text-red-400",
23
24
  children: [
24
- /* @__PURE__ */ n("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
25
- /* @__PURE__ */ n("path", { d: "M12 9v4" }),
26
- /* @__PURE__ */ n("path", { d: "M12 17h.01" })
25
+ /* @__PURE__ */ r("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
26
+ /* @__PURE__ */ r("path", { d: "M12 9v4" }),
27
+ /* @__PURE__ */ r("path", { d: "M12 17h.01" })
27
28
  ]
28
- }) : /* @__PURE__ */ r("svg", {
29
+ }) : /* @__PURE__ */ i("svg", {
29
30
  width: "20",
30
31
  height: "20",
31
32
  viewBox: "0 0 24 24",
@@ -36,34 +37,39 @@ function i({ open: i, onClose: a, onConfirm: o, title: s = "Are you sure?", desc
36
37
  strokeLinejoin: "round",
37
38
  className: "text-info",
38
39
  children: [
39
- /* @__PURE__ */ n("circle", {
40
+ /* @__PURE__ */ r("circle", {
40
41
  cx: "12",
41
42
  cy: "12",
42
43
  r: "10"
43
44
  }),
44
- /* @__PURE__ */ n("path", { d: "M12 16v-4" }),
45
- /* @__PURE__ */ n("path", { d: "M12 8h.01" })
45
+ /* @__PURE__ */ r("path", { d: "M12 16v-4" }),
46
+ /* @__PURE__ */ r("path", { d: "M12 8h.01" })
46
47
  ]
47
48
  })),
48
- children: [typeof c != "string" && c && /* @__PURE__ */ n("div", {
49
- className: "text-sm leading-relaxed text-slate-600 dark:text-slate-400",
50
- children: c
51
- }), /* @__PURE__ */ r("div", {
52
- className: "flex flex-wrap justify-end gap-2.5 pt-2",
53
- children: [/* @__PURE__ */ n(e, {
49
+ className: h,
50
+ overlayClassName: g,
51
+ panelClassName: _,
52
+ children: [typeof l != "string" && l && /* @__PURE__ */ r("div", {
53
+ className: e("text-sm leading-relaxed text-slate-600 dark:text-slate-400", v),
54
+ children: l
55
+ }), /* @__PURE__ */ i("div", {
56
+ className: e("flex flex-wrap justify-end gap-2.5 pt-2", y),
57
+ children: [/* @__PURE__ */ r(t, {
54
58
  variant: "ghost",
55
- onClick: a,
56
- disabled: f,
57
- children: u
58
- }), /* @__PURE__ */ n(e, {
59
- variant: d ? "destructive" : "primary",
60
59
  onClick: o,
61
- loading: f,
60
+ disabled: p,
61
+ className: b,
62
+ children: d
63
+ }), /* @__PURE__ */ r(t, {
64
+ variant: f ? "destructive" : "primary",
65
+ onClick: s,
66
+ loading: p,
62
67
  autoFocus: !0,
63
- children: l
68
+ className: x,
69
+ children: u
64
70
  })]
65
71
  })]
66
72
  });
67
73
  }
68
74
  //#endregion
69
- export { i as ConfirmDialog };
75
+ export { a as ConfirmDialog };
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("framer-motion"),n=require("react"),r=require("react/jsx-runtime");var i=()=>(0,r.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,r.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,r.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]}),a=()=>(0,r.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,r.jsx)(`path`,{d:`m20 6-11 11-5-5`})});function o({value:o,timeout:s=2e3,label:c,size:l=`sm`,className:u,...d}){let[f,p]=(0,n.useState)(!1);async function m(){try{await navigator.clipboard.writeText(o),p(!0),setTimeout(()=>p(!1),s)}catch{}}return(0,r.jsx)(`button`,{type:`button`,onClick:m,className:e.t(`inline-flex shrink-0 items-center justify-center whitespace-nowrap font-medium transition-colors select-none`,`border border-black/10 dark:border-white/10`,f?`bg-emerald-500/10 text-emerald-400 border-emerald-500/20`:`bg-black/4 dark:bg-white/4 text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-black/8 dark:hover:bg-white/8`,l===`sm`?`h-6 px-2 text-xs gap-1 rounded-md`:`h-8 px-3 text-sm gap-1.5 rounded-lg`,u),...d,children:(0,r.jsx)(t.AnimatePresence,{mode:`wait`,initial:!1,children:f?(0,r.jsxs)(t.motion.span,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.1},className:`inline-flex items-center gap-1 whitespace-nowrap`,children:[(0,r.jsx)(a,{}),c&&`Copied`]},`check`):(0,r.jsxs)(t.motion.span,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.1},className:`inline-flex items-center gap-1 whitespace-nowrap`,children:[(0,r.jsx)(i,{}),c&&c]},`copy`)})})}exports.CopyButton=o;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");let t=require("framer-motion"),n=require("react"),r=require("react/jsx-runtime");var i=()=>(0,r.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,r.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,r.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]}),a=()=>(0,r.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,r.jsx)(`path`,{d:`m20 6-11 11-5-5`})});function o({value:o,timeout:s=2e3,label:c,size:l=`sm`,className:u,...d}){let[f,p]=(0,n.useState)(!1);async function m(){try{await navigator.clipboard.writeText(o),p(!0),setTimeout(()=>p(!1),s)}catch{}}return(0,r.jsx)(`button`,{type:`button`,onClick:m,"aria-label":c?void 0:f?`Copied to clipboard`:`Copy to clipboard`,className:e.t(`focus-ring inline-flex shrink-0 items-center justify-center whitespace-nowrap font-medium select-none border`,`transition-[color,background-color,border-color] duration-150`,f?`border-success/25 bg-success/10 text-success dark:text-emerald-400`:`border-border bg-muted text-muted-foreground hover:bg-surface-muted hover:text-foreground`,l===`sm`?`h-6 px-2 text-xs gap-1 rounded-[var(--radius-md)]`:`h-8 px-3 text-sm gap-1.5 rounded-[var(--radius-lg)]`,u),...d,children:(0,r.jsx)(t.AnimatePresence,{mode:`wait`,initial:!1,children:f?(0,r.jsxs)(t.motion.span,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.1},className:`inline-flex items-center gap-1 whitespace-nowrap`,children:[(0,r.jsx)(a,{}),c&&`Copied`]},`check`):(0,r.jsxs)(t.motion.span,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.1},className:`inline-flex items-center gap-1 whitespace-nowrap`,children:[(0,r.jsx)(i,{}),c&&c]},`copy`)})})}exports.CopyButton=o;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
3
  import { AnimatePresence as t, motion as n } from "framer-motion";
4
4
  import { useState as r } from "react";
5
5
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
@@ -42,7 +42,8 @@ function c({ value: c, timeout: l = 2e3, label: u, size: d = "sm", className: f,
42
42
  return /* @__PURE__ */ i("button", {
43
43
  type: "button",
44
44
  onClick: g,
45
- className: e("inline-flex shrink-0 items-center justify-center whitespace-nowrap font-medium transition-colors select-none", "border border-black/10 dark:border-white/10", m ? "bg-emerald-500/10 text-emerald-400 border-emerald-500/20" : "bg-black/4 dark:bg-white/4 text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-black/8 dark:hover:bg-white/8", d === "sm" ? "h-6 px-2 text-xs gap-1 rounded-md" : "h-8 px-3 text-sm gap-1.5 rounded-lg", f),
45
+ "aria-label": u ? void 0 : m ? "Copied to clipboard" : "Copy to clipboard",
46
+ className: e("focus-ring inline-flex shrink-0 items-center justify-center whitespace-nowrap font-medium select-none border", "transition-[color,background-color,border-color] duration-150", m ? "border-success/25 bg-success/10 text-success dark:text-emerald-400" : "border-border bg-muted text-muted-foreground hover:bg-surface-muted hover:text-foreground", d === "sm" ? "h-6 px-2 text-xs gap-1 rounded-[var(--radius-md)]" : "h-8 px-3 text-sm gap-1.5 rounded-[var(--radius-lg)]", f),
46
47
  ...p,
47
48
  children: /* @__PURE__ */ i(t, {
48
49
  mode: "wait",
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react"),n=require("react/jsx-runtime");var r={default:`text-foreground`,positive:`text-success`,negative:`text-destructive`,muted:`text-muted-foreground`},i={xs:`text-xs`,sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-2xl`};function a(e){return typeof e==`bigint`?e<0n:e<0}function o(e){return typeof e==`bigint`||Number.isFinite(e)}function s(e,{currency:t=`USD`,locale:n=`en-US`,accounting:r=!1,options:i}={}){if(!o(e))return null;try{return new Intl.NumberFormat(n,{...i,style:`currency`,currency:t,currencySign:r?`accounting`:`standard`}).format(e)}catch{return null}}var c=(0,t.forwardRef)(({value:t,currency:o=`USD`,locale:c=`en-US`,accounting:l=!1,options:u,tone:d=`auto`,size:f=`md`,fallback:p=`—`,className:m,...h},g)=>{let _=s(t,{currency:o,locale:c,accounting:l,options:u}),v=d===`auto`?a(t)?`negative`:`default`:d,y=u?.notation===`compact`?s(t,{currency:o,locale:c,accounting:l,options:{...u,notation:`standard`}})??void 0:void 0;return(0,n.jsx)(`span`,{ref:g,"data-invalid":_===null||void 0,"aria-label":y,className:e.t(`inline whitespace-nowrap font-medium tabular-nums`,r[v],i[f],m),...h,children:_??p})});c.displayName=`Currency`,exports.Currency=c,exports.formatCurrency=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");let t=require("react"),n=require("react/jsx-runtime");var r={default:`text-foreground`,positive:`text-success`,negative:`text-destructive`,muted:`text-muted-foreground`},i={xs:`text-xs`,sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-2xl`};function a(e){return typeof e==`bigint`?e<0n:e<0}function o(e){return typeof e==`bigint`||Number.isFinite(e)}function s(e,{currency:t=`USD`,locale:n=`en-US`,accounting:r=!1,options:i}={}){if(!o(e))return null;try{return new Intl.NumberFormat(n,{...i,style:`currency`,currency:t,currencySign:r?`accounting`:`standard`}).format(e)}catch{return null}}var c=(0,t.forwardRef)(({value:t,currency:o=`USD`,locale:c=`en-US`,accounting:l=!1,options:u,tone:d=`auto`,size:f=`md`,fallback:p=`—`,className:m,...h},g)=>{let _=s(t,{currency:o,locale:c,accounting:l,options:u}),v=d===`auto`?a(t)?`negative`:`default`:d,y=u?.notation===`compact`?s(t,{currency:o,locale:c,accounting:l,options:{...u,notation:`standard`}})??void 0:void 0;return(0,n.jsx)(`span`,{ref:g,"data-invalid":_===null||void 0,"aria-label":y,className:e.t(`inline whitespace-nowrap font-medium tabular-nums`,r[v],i[f],m),...h,children:_??p})});c.displayName=`Currency`,exports.Currency=c,exports.formatCurrency=s;
@@ -1,4 +1,4 @@
1
- import { t as e } from "../cn-DpgY2leY.js";
1
+ import { t as e } from "../cn-BJyZJP-y.js";
2
2
  import { forwardRef as t } from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  //#region src/components/currency.tsx
@@ -18,6 +18,10 @@ export interface DataTableProps<T extends {
18
18
  emptyMessage?: string;
19
19
  onRowClick?: (row: T) => void;
20
20
  className?: string;
21
+ toolbarClassName?: string;
22
+ tableClassName?: string;
23
+ /** Removes the default table chrome while preserving its data behavior. */
24
+ unstyled?: boolean;
21
25
  /** Show search bar. Pass column keys to search — defaults to all searchable columns */
22
26
  searchable?: boolean;
23
27
  searchPlaceholder?: string;
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../datatable-rzDgQ3r6.cjs");exports.DataTable=e.t;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../datatable-t0U7t_xh.cjs");exports.DataTable=e.t;
@@ -2,8 +2,4 @@ import { DataTableProps } from './datatable/types';
2
2
  export type { SortDir, ColumnDef, DataTableProps } from './datatable/types';
3
3
  export declare function DataTable<T extends {
4
4
  id: string | number;
5
- }>({ columns, data, loading, emptyMessage, onRowClick, className, toolbarClassName, tableClassName, searchable, searchPlaceholder, pageSizeOptions, defaultPageSize, density, ariaLabel, getRowLabel, unstyled, }: DataTableProps<T> & {
6
- toolbarClassName?: string;
7
- tableClassName?: string;
8
- unstyled?: boolean;
9
- }): import("react").JSX.Element;
5
+ }>({ columns, data, loading, emptyMessage, onRowClick, className, toolbarClassName, tableClassName, searchable, searchPlaceholder, pageSizeOptions, defaultPageSize, density, ariaLabel, getRowLabel, unstyled, }: DataTableProps<T>): import("react").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as e } from "../datatable-yBN4M3UV.js";
2
+ import { t as e } from "../datatable-BJoZMrKI.js";
3
3
  export { e as DataTable };
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs"),t=require("../component-styles-DOUctc8_.cjs");let n=require("framer-motion"),r=require("react"),i=require("react/jsx-runtime");var a=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],o=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];function s(e){return`${o[e.getMonth()].slice(0,3)} ${e.getDate()}, ${e.getFullYear()}`}function c(e,t){return new Date(e,t+1,0).getDate()}function l(e,t){return new Date(e,t,1).getDay()}function u(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function d({value:d,onChange:f,label:p,hint:m,error:h,placeholder:g=`Select date…`,disabled:_,clearable:v=!0,minDate:y,maxDate:b,className:x}){let[S,C]=(0,r.useState)(null),w=d===void 0?S:d,T=new Date,[E,D]=(0,r.useState)(!1),[O,k]=(0,r.useState)((w??T).getFullYear()),[A,j]=(0,r.useState)((w??T).getMonth()),M=(0,r.useRef)(null),N=(0,r.useId)(),P=`${N}-message`;function F(e){d===void 0&&C(e),f?.(e),D(!1)}function I(e){e.stopPropagation(),d===void 0&&C(null),f?.(null)}function L(){A===0?(j(11),k(e=>e-1)):j(e=>e-1)}function R(){A===11?(j(0),k(e=>e+1)):j(e=>e+1)}(0,r.useEffect)(()=>{function e(e){M.current?.contains(e.target)||D(!1)}function t(e){e.key===`Escape`&&D(!1)}return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[]);let z=c(O,A),B=l(O,A),V=[...Array(B).fill(null),...Array.from({length:z},(e,t)=>t+1)];return(0,i.jsxs)(`div`,{ref:M,className:e.t(`relative`,t.o,x),children:[p&&(0,i.jsx)(`label`,{htmlFor:N,className:`text-xs font-semibold leading-5 text-foreground`,children:p}),(0,i.jsxs)(`button`,{type:`button`,id:N,"aria-expanded":E,"aria-haspopup":`dialog`,"aria-invalid":h?!0:void 0,"aria-describedby":h||m?P:void 0,disabled:_,onClick:()=>D(e=>!e),className:e.t(`flex h-9 w-full items-center gap-2 rounded-[var(--radius-md)] px-3 text-left outline-none`,t.t,`focus:border-accent-500 focus:ring-2 focus:ring-focus-ring/20`,h&&`border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/20`,_&&`opacity-50 cursor-not-allowed`),children:[(0,i.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`text-slate-500 shrink-0`,children:[(0,i.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,ry:`2`}),(0,i.jsx)(`line`,{x1:`16`,x2:`16`,y1:`2`,y2:`6`}),(0,i.jsx)(`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`6`}),(0,i.jsx)(`line`,{x1:`3`,x2:`21`,y1:`10`,y2:`10`})]}),(0,i.jsx)(`span`,{className:e.t(`flex-1 text-sm truncate`,w?`text-foreground`:`text-muted-foreground`),children:w?s(w):g}),v&&w&&!_&&(0,i.jsx)(`span`,{role:`button`,tabIndex:-1,onClick:I,className:`shrink-0 text-slate-500 hover:text-slate-700 dark:hover:text-slate-300 transition-colors`,children:(0,i.jsx)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,i.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),(0,i.jsx)(n.AnimatePresence,{children:E&&(0,i.jsxs)(n.motion.div,{initial:{opacity:0,y:-4,scaleY:.97},animate:{opacity:1,y:0,scaleY:1},exit:{opacity:0,y:-4,scaleY:.97},transition:{duration:.13},style:{originY:0},role:`dialog`,"aria-label":`Choose date`,className:`absolute left-0 top-full z-50 mt-1.5 w-[min(18rem,calc(100vw-2rem))] rounded-[var(--radius-lg)] border border-border bg-surface-raised p-3 shadow-floating`,children:[(0,i.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,i.jsx)(`button`,{type:`button`,onClick:L,"aria-label":`Previous month`,className:e.t(t.c,`size-7`),children:(0,i.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,i.jsx)(`path`,{d:`m15 18-6-6 6-6`})})}),(0,i.jsxs)(`span`,{"aria-live":`polite`,className:`text-sm font-semibold text-foreground`,children:[o[A],` `,O]}),(0,i.jsx)(`button`,{type:`button`,onClick:R,"aria-label":`Next month`,className:e.t(t.c,`size-7`),children:(0,i.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,i.jsx)(`path`,{d:`m9 18 6-6-6-6`})})})]}),(0,i.jsx)(`div`,{className:`grid grid-cols-7 gap-0.5 mb-1`,children:a.map(e=>(0,i.jsx)(`div`,{"aria-hidden":`true`,className:`text-center text-[10px] font-semibold text-muted-foreground py-1`,children:e},e))}),(0,i.jsx)(`div`,{className:`grid grid-cols-7 gap-0.5`,children:V.map((t,n)=>{if(!t)return(0,i.jsx)(`div`,{},`empty-${n}`);let r=new Date(O,A,t),a=w?u(r,w):!1,o=u(r,T),s=y&&r<y||b&&r>b;return(0,i.jsx)(`button`,{type:`button`,disabled:!!s,onClick:()=>F(r),"aria-label":r.toLocaleDateString(void 0,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`}),"aria-pressed":a,"aria-current":o?`date`:void 0,className:e.t(`h-8 w-full rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring/35`,a?`bg-primary text-primary-foreground font-medium`:o?`border border-accent-500/40 text-accent-400 hover:bg-accent-500/10`:`text-slate-700 dark:text-slate-200 hover:bg-black/6 dark:hover:bg-white/6`,s&&`opacity-30 cursor-not-allowed`),children:t},t)})})]})}),h&&(0,i.jsx)(`p`,{id:P,"aria-live":`polite`,className:`text-xs leading-5 text-destructive`,children:h}),m&&!h&&(0,i.jsx)(`p`,{id:P,className:`text-xs leading-5 text-muted-foreground`,children:m})]})}exports.DatePicker=d;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs"),t=require("../component-styles-DY4wigiq.cjs");let n=require("framer-motion"),r=require("react"),i=require("react/jsx-runtime");var a=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],o=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];function s(e){return`${o[e.getMonth()].slice(0,3)} ${e.getDate()}, ${e.getFullYear()}`}function c(e,t){return new Date(e,t+1,0).getDate()}function l(e,t){return new Date(e,t,1).getDay()}function u(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function d(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}var f=(0,r.forwardRef)(({value:f,onChange:p,label:m,hint:h,error:g,placeholder:_=`Select date…`,disabled:v,clearable:y=!0,minDate:b,maxDate:x,className:S,...C},w)=>{let[T,E]=(0,r.useState)(null),D=f===void 0?T:f,O=new Date,[k,A]=(0,r.useState)(!1),[j,M]=(0,r.useState)((D??O).getFullYear()),[N,P]=(0,r.useState)((D??O).getMonth()),[F,I]=(0,r.useState)(D??O),[L,R]=(0,r.useState)({visibility:`hidden`}),z=(0,r.useRef)(null),B=(0,r.useRef)(null),V=(0,r.useRef)(null);(0,r.useImperativeHandle)(w,()=>z.current);let H=(0,r.useId)(),U=`${H}-dialog`,W=`${H}-message`;function G(e){return!!(b&&e<b||x&&e>x)}function K(e){if(G(e))return;let t=e.getFullYear()===j&&e.getMonth()===N;if(I(e),M(e.getFullYear()),P(e.getMonth()),t){V.current?.querySelector(`[data-date="${d(e)}"]`)?.focus({preventScroll:!0});return}requestAnimationFrame(()=>requestAnimationFrame(()=>{V.current?.querySelector(`[data-date="${d(e)}"]`)?.focus({preventScroll:!0})}))}function q(){return D&&!G(D)?D:G(O)?b&&(!x||b<=x)?b:x??O:O}function J(){let e=q();I(e),M(e.getFullYear()),P(e.getMonth()),R({visibility:`hidden`}),A(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>{V.current?.querySelector(`[data-date="${d(e)}"]`)?.focus({preventScroll:!0})}))}function Y(e=!1){A(!1),e&&requestAnimationFrame(()=>B.current?.focus())}function X(e){f===void 0&&E(e),p?.(e),Y(!0)}function Z(){f===void 0&&E(null),p?.(null)}function Q(e,t){let n=new Date(e,t,1),r=new Date(e,t+1,0,23,59,59,999);return!(b&&b>r)&&!(x&&x<n)}function $(e){let t=new Date(j,N+e,1),n=t.getFullYear(),r=t.getMonth();if(!Q(n,r))return;let i=new Date(n,r,Math.min(F.getDate(),c(n,r)));b&&i<b&&b.getFullYear()===n&&b.getMonth()===r&&(i=new Date(n,r,b.getDate())),x&&i>x&&x.getFullYear()===n&&x.getMonth()===r&&(i=new Date(n,r,x.getDate())),M(n),P(r),I(i)}(0,r.useEffect)(()=>{function e(e){z.current?.contains(e.target)||Y()}function t(e){e.key===`Escape`&&k&&(e.preventDefault(),Y(!0))}return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[k]),(0,r.useLayoutEffect)(()=>{if(!k)return;let e=()=>{let e=B.current,t=V.current;if(!e||!t)return;let n=t.getBoundingClientRect();if(window.innerWidth<640){R({insetInline:8,bottom:8,top:`auto`,width:`auto`,visibility:`visible`});return}let r=e.getBoundingClientRect(),i=Math.min(Math.max(r.left,16),Math.max(16,window.innerWidth-n.width-16)),a=r.bottom+6,o=r.top-n.height-6,s=a+n.height<=window.innerHeight-16||o<16?a:o;R({left:i,top:Math.min(Math.max(s,16),Math.max(16,window.innerHeight-n.height-16)),visibility:`visible`})};return e(),window.addEventListener(`resize`,e),document.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),document.removeEventListener(`scroll`,e,!0)}},[k]),(0,r.useEffect)(()=>{if(!k||window.innerWidth>=640)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[k]);function ee(e,t){let n;e.key===`ArrowLeft`?n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-1):e.key===`ArrowRight`?n=new Date(t.getFullYear(),t.getMonth(),t.getDate()+1):e.key===`ArrowUp`?n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-7):e.key===`ArrowDown`?n=new Date(t.getFullYear(),t.getMonth(),t.getDate()+7):e.key===`Home`?n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay()):e.key===`End`?n=new Date(t.getFullYear(),t.getMonth(),t.getDate()+(6-t.getDay())):e.key===`PageUp`?n=new Date(t.getFullYear(),t.getMonth()-1,Math.min(t.getDate(),c(t.getFullYear(),t.getMonth()-1))):e.key===`PageDown`&&(n=new Date(t.getFullYear(),t.getMonth()+1,Math.min(t.getDate(),c(t.getFullYear(),t.getMonth()+1)))),n&&(e.preventDefault(),K(n))}let te=c(j,N),ne=l(j,N),re=[...Array(ne).fill(null),...Array.from({length:te},(e,t)=>t+1)];return(0,i.jsxs)(`div`,{ref:z,className:e.t(`relative`,t.o,S),...C,children:[m&&(0,i.jsx)(`label`,{htmlFor:H,className:`text-xs font-semibold leading-5 text-foreground`,children:m}),(0,i.jsxs)(`div`,{className:e.t(`flex h-11 w-full items-center rounded-[var(--radius-md)] sm:h-9`,t.t,g&&`border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/25`,v&&`cursor-not-allowed opacity-50`),children:[(0,i.jsxs)(`button`,{ref:B,type:`button`,id:H,"aria-expanded":k,"aria-haspopup":`dialog`,"aria-controls":U,"aria-invalid":g?!0:void 0,"aria-describedby":g||h?W:void 0,disabled:v,onClick:()=>k?Y():J(),className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-[var(--radius-md)] px-3 text-left outline-none focus-visible:ring-[3px] focus-visible:ring-focus-ring/35`,children:[(0,i.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`text-slate-500 shrink-0`,children:[(0,i.jsx)(`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,ry:`2`}),(0,i.jsx)(`line`,{x1:`16`,x2:`16`,y1:`2`,y2:`6`}),(0,i.jsx)(`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`6`}),(0,i.jsx)(`line`,{x1:`3`,x2:`21`,y1:`10`,y2:`10`})]}),(0,i.jsx)(`span`,{className:e.t(`flex-1 text-sm truncate`,D?`text-foreground`:`text-muted-foreground`),children:D?s(D):_})]}),y&&D&&!v&&(0,i.jsx)(`button`,{type:`button`,"aria-label":`Clear ${m?.toLowerCase()??`date`}`,onClick:Z,className:e.t(t.c,`mr-1 size-9 sm:size-7`),children:(0,i.jsx)(`svg`,{"aria-hidden":`true`,width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,i.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),(0,i.jsx)(n.AnimatePresence,{children:k&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.motion.div,{"aria-hidden":`true`,className:`fixed inset-0 z-40 bg-overlay sm:hidden`,onMouseDown:()=>Y(!0),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),(0,i.jsxs)(n.motion.div,{ref:V,id:U,initial:{opacity:0,y:-4,scaleY:.97},animate:{opacity:1,y:0,scaleY:1},exit:{opacity:0,y:-4,scaleY:.97},transition:{duration:.13},role:`dialog`,"aria-label":m?`Choose ${m.toLowerCase()}`:`Choose date`,className:`fixed z-50 w-[min(18rem,calc(100vw-2rem))] max-h-[calc(100dvh-1rem)] overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-surface-raised p-3 shadow-floating`,style:{...L,originY:0},children:[(0,i.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3 sm:hidden`,children:[(0,i.jsx)(`strong`,{className:`text-sm text-foreground`,children:m?`Choose ${m.toLowerCase()}`:`Choose date`}),(0,i.jsx)(`button`,{type:`button`,onClick:()=>Y(!0),className:e.t(t.c,`size-11`),"aria-label":`Close date picker`,children:(0,i.jsx)(`svg`,{"aria-hidden":`true`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,i.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),(0,i.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,i.jsx)(`button`,{type:`button`,onClick:()=>$(-1),disabled:!Q(new Date(j,N-1,1).getFullYear(),new Date(j,N-1,1).getMonth()),"aria-label":`Previous month`,className:e.t(t.c,`size-11 disabled:cursor-not-allowed disabled:opacity-35 sm:size-7`),children:(0,i.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,i.jsx)(`path`,{d:`m15 18-6-6 6-6`})})}),(0,i.jsxs)(`span`,{"aria-live":`polite`,className:`text-sm font-semibold text-foreground`,children:[o[N],` `,j]}),(0,i.jsx)(`button`,{type:`button`,onClick:()=>$(1),disabled:!Q(new Date(j,N+1,1).getFullYear(),new Date(j,N+1,1).getMonth()),"aria-label":`Next month`,className:e.t(t.c,`size-11 disabled:cursor-not-allowed disabled:opacity-35 sm:size-7`),children:(0,i.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,i.jsx)(`path`,{d:`m9 18 6-6-6-6`})})})]}),(0,i.jsx)(`div`,{className:`grid grid-cols-7 gap-0.5 mb-1`,children:a.map(e=>(0,i.jsx)(`div`,{"aria-hidden":`true`,className:`py-1 text-center text-[10px] font-semibold text-muted-foreground`,children:e},e))}),(0,i.jsx)(`div`,{className:`grid grid-cols-7 gap-0.5`,children:re.map((t,n)=>{if(!t)return(0,i.jsx)(`div`,{},`empty-${n}`);let r=new Date(j,N,t),a=D?u(r,D):!1,o=u(r,O),s=G(r);return(0,i.jsx)(`button`,{type:`button`,disabled:!!s,onClick:()=>X(r),onFocus:()=>I(r),onKeyDown:e=>ee(e,r),"data-date":d(r),tabIndex:u(r,F)?0:-1,"aria-label":r.toLocaleDateString(void 0,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`}),"aria-pressed":a,"aria-current":o?`date`:void 0,className:e.t(`h-11 w-full rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-focus-ring/35 sm:h-8`,a?`bg-primary text-primary-foreground font-medium`:o?`border border-accent-500/40 text-accent-400 hover:bg-accent-500/10`:`text-slate-700 dark:text-slate-200 hover:bg-black/6 dark:hover:bg-white/6`,s&&`opacity-30 cursor-not-allowed`),children:t},t)})}),(0,i.jsxs)(`div`,{className:e.t(`mt-3 flex items-center border-t border-border pt-3`,G(O)?`justify-end`:`justify-between`),children:[!G(O)&&(0,i.jsx)(`button`,{type:`button`,onClick:()=>K(O),className:`h-11 rounded-md px-3 text-xs font-medium text-accent-700 hover:bg-muted focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-focus-ring/35 sm:h-10 dark:text-accent-300`,children:`Today`}),(0,i.jsx)(`button`,{type:`button`,onClick:()=>Y(!0),className:`h-11 rounded-md px-3 text-xs font-medium text-muted-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-focus-ring/35 sm:h-10`,children:`Cancel`})]})]})]})}),g&&(0,i.jsx)(`p`,{id:W,"aria-live":`polite`,className:`text-xs leading-5 text-destructive`,children:g}),h&&!g&&(0,i.jsx)(`p`,{id:W,className:`text-xs leading-5 text-muted-foreground`,children:h})]})});f.displayName=`DatePicker`,exports.DatePicker=f;
@@ -1,4 +1,5 @@
1
- export interface DatePickerProps {
1
+ import { HTMLAttributes } from 'react';
2
+ export interface DatePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
2
3
  value?: Date | null;
3
4
  onChange?: (date: Date | null) => void;
4
5
  label?: string;
@@ -9,6 +10,5 @@ export interface DatePickerProps {
9
10
  clearable?: boolean;
10
11
  minDate?: Date;
11
12
  maxDate?: Date;
12
- className?: string;
13
13
  }
14
- export declare function DatePicker({ value: controlledValue, onChange, label, hint, error, placeholder, disabled, clearable, minDate, maxDate, className, }: DatePickerProps): import("react").JSX.Element;
14
+ export declare const DatePicker: import('react').ForwardRefExoticComponent<DatePickerProps & import('react').RefAttributes<HTMLDivElement>>;