@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
@@ -2,6 +2,7 @@ import { HTMLAttributes } from 'react';
2
2
  export type TimePickerSize = "sm" | "md" | "lg";
3
3
  export type TimePickerFormat = "12" | "24";
4
4
  export type TimePickerSide = "top" | "bottom";
5
+ export type TimePickerAlign = "start" | "end";
5
6
  export interface TimePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
6
7
  label?: string;
7
8
  hint?: string;
@@ -21,6 +22,7 @@ export interface TimePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "d
21
22
  placeholder?: string;
22
23
  size?: TimePickerSize;
23
24
  side?: TimePickerSide;
25
+ align?: TimePickerAlign;
24
26
  triggerClassName?: string;
25
27
  panelClassName?: string;
26
28
  labelClassName?: string;
@@ -1,18 +1,15 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
3
- import { o as t, s as n, t as r } from "../component-styles-Bgy44fc8.js";
4
- import { forwardRef as i, useEffect as a, useId as o, useImperativeHandle as s, useRef as c, useState as l } from "react";
5
- import { Fragment as ee, jsx as u, jsxs as d } from "react/jsx-runtime";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
+ import { o as t, s as n, t as r } from "../component-styles-C2CbHEEA.js";
4
+ import { forwardRef as i, useEffect as a, useId as o, useImperativeHandle as s, useLayoutEffect as c, useRef as l, useState as u } from "react";
5
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
6
6
  //#region src/components/time-picker.tsx
7
- var te = {
8
- sm: "h-8 px-2.5 text-xs",
9
- md: "h-9 px-3 text-sm",
10
- lg: "h-10 px-3.5 text-sm"
11
- }, ne = {
12
- bottom: "top-full mt-1.5",
13
- top: "bottom-full mb-1.5"
14
- }, f = (e) => String(e).padStart(2, "0");
15
- function p(e) {
7
+ var ee = {
8
+ sm: "h-10 px-2.5 text-xs sm:h-8",
9
+ md: "h-11 px-3 text-sm sm:h-9",
10
+ lg: "h-12 px-3.5 text-sm sm:h-10"
11
+ }, m = (e) => String(e).padStart(2, "0");
12
+ function h(e) {
16
13
  if (!e) return null;
17
14
  let t = /^(?:([01]\d|2[0-3])):([0-5]\d)(?::([0-5]\d))?$/.exec(e);
18
15
  return t ? {
@@ -21,22 +18,22 @@ function p(e) {
21
18
  second: Number(t[3] ?? 0)
22
19
  } : null;
23
20
  }
24
- function m(e) {
21
+ function g(e) {
25
22
  return e.hour * 3600 + e.minute * 60 + e.second;
26
23
  }
27
- function h(e, t) {
28
- let n = `${f(e.hour)}:${f(e.minute)}`;
29
- return t ? `${n}:${f(e.second)}` : n;
24
+ function _(e, t) {
25
+ let n = `${m(e.hour)}:${m(e.minute)}`;
26
+ return t ? `${n}:${m(e.second)}` : n;
30
27
  }
31
- function g(e, t, n) {
32
- let r = p(e);
28
+ function v(e, t, n) {
29
+ let r = h(e);
33
30
  if (!r) return "";
34
- let i = f(r.minute), a = n ? `:${f(r.second)}` : "";
35
- if (t === "24") return `${f(r.hour)}:${i}${a}`;
31
+ let i = m(r.minute), a = n ? `:${m(r.second)}` : "";
32
+ if (t === "24") return `${m(r.hour)}:${i}${a}`;
36
33
  let o = r.hour >= 12 ? "PM" : "AM";
37
34
  return `${r.hour % 12 || 12}:${i}${a} ${o}`;
38
35
  }
39
- function _(e) {
36
+ function y(e) {
40
37
  let t = /* @__PURE__ */ new Date(), n = Math.floor(59 / e) * e;
41
38
  return {
42
39
  hour: t.getHours(),
@@ -44,9 +41,17 @@ function _(e) {
44
41
  second: t.getSeconds()
45
42
  };
46
43
  }
47
- function v({ label: t, name: r, options: i, value: a, onSelect: o }) {
48
- let s = `${r}-label`;
49
- function c(e, t) {
44
+ function b(e, t, n) {
45
+ let r = Math.floor(59 / t) * t;
46
+ return {
47
+ ...e,
48
+ minute: Math.min(r, Math.round(e.minute / t) * t),
49
+ second: n ? e.second : 0
50
+ };
51
+ }
52
+ function x({ label: t, id: r, name: i, options: a, value: o, onSelect: s }) {
53
+ let c = `${r}-label`;
54
+ function l(e, t) {
50
55
  if (![
51
56
  "ArrowUp",
52
57
  "ArrowDown",
@@ -54,124 +59,160 @@ function v({ label: t, name: r, options: i, value: a, onSelect: o }) {
54
59
  "End"
55
60
  ].includes(e.key)) return;
56
61
  e.preventDefault();
57
- let n = e.key === "Home" ? 0 : e.key === "End" ? i.length - 1 : (t + (e.key === "ArrowDown" ? 1 : -1) + i.length) % i.length, r = i[n];
58
- r && (o(r.value), e.currentTarget.closest("[data-time-column]")?.querySelectorAll("[role=\"option\"]")[n]?.focus());
62
+ let n = e.key === "Home" ? 0 : e.key === "End" ? a.length - 1 : (t + (e.key === "ArrowDown" ? 1 : -1) + a.length) % a.length, r = a[n];
63
+ r && (s(r.value), e.currentTarget.closest("[data-time-column]")?.querySelectorAll("[role=\"option\"]")[n]?.focus());
59
64
  }
60
- return /* @__PURE__ */ d("div", {
65
+ return /* @__PURE__ */ p("div", {
61
66
  className: "min-w-0",
62
- children: [/* @__PURE__ */ u("p", {
63
- id: s,
67
+ children: [/* @__PURE__ */ f("p", {
68
+ id: c,
64
69
  className: "mb-1.5 truncate text-center text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",
65
70
  children: t
66
- }), /* @__PURE__ */ u("div", {
71
+ }), /* @__PURE__ */ f("div", {
67
72
  role: "listbox",
68
- "aria-labelledby": s,
69
- "data-time-column": r,
70
- className: "max-h-44 min-w-0 overflow-y-auto overscroll-contain rounded-[var(--radius-md)] border border-border bg-surface p-1 scrollbar-thin",
71
- children: i.map((t, r) => {
72
- let i = t.value === a;
73
- return /* @__PURE__ */ u("button", {
73
+ "aria-labelledby": c,
74
+ "data-time-column": i,
75
+ className: "max-h-52 min-w-0 overflow-y-auto overscroll-contain rounded-[var(--radius-md)] border border-border bg-surface p-1 scrollbar-thin sm:max-h-44",
76
+ children: a.map((t, r) => {
77
+ let i = t.value === o;
78
+ return /* @__PURE__ */ f("button", {
74
79
  type: "button",
75
80
  role: "option",
76
81
  "aria-selected": i,
77
82
  tabIndex: i ? 0 : -1,
78
- onClick: () => o(t.value),
79
- onKeyDown: (e) => c(e, r),
80
- className: e("flex h-9 w-full items-center justify-center rounded-[var(--radius-sm)] px-1 text-xs tabular-nums transition-colors", n, i ? "bg-primary font-semibold text-primary-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"),
83
+ onClick: () => s(t.value),
84
+ onKeyDown: (e) => l(e, r),
85
+ className: e("flex h-11 w-full items-center justify-center rounded-[var(--radius-sm)] px-1 text-sm tabular-nums transition-colors sm:h-9 sm:text-xs", n, i ? "bg-primary font-semibold text-primary-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"),
81
86
  children: t.label
82
87
  }, t.value);
83
88
  })
84
89
  })]
85
90
  });
86
91
  }
87
- var y = i(({ label: i, hint: y, error: b, value: x, defaultValue: S = "", onValueChange: C, format: w = "12", minuteStep: T = 5, showSeconds: E = !1, min: re, max: D, name: O, disabled: k = !1, required: A = !1, clearable: ie = !0, placeholder: ae = "Select time…", size: oe = "md", side: se = "bottom", triggerClassName: ce, panelClassName: le, labelClassName: ue, messageClassName: j, className: de, id: fe, onBlur: pe, ...me }, he) => {
88
- let ge = o(), M = fe ?? ge, N = `${M}-panel`, P = `${M}-message`, F = c(null), I = c(null);
89
- s(he, () => I.current);
90
- let L = Number.isFinite(T) ? Math.max(1, Math.min(30, Math.floor(T))) : 5, R = (e) => {
91
- let t = p(e);
92
- return t ? h(t, E) : "";
93
- }, [_e, ve] = l(() => R(S)), z = R(x ?? _e), [B, V] = l(!1), [H, U] = l(() => p(z) ?? _(L)), ye = Array.from({ length: 24 }, (e, t) => ({
92
+ var S = i(({ label: i, hint: S, error: C, value: w, defaultValue: te = "", onValueChange: ne, format: T = "12", minuteStep: E = 5, showSeconds: D = !1, min: re, max: ie, name: O, disabled: k = !1, required: A = !1, clearable: ae = !0, placeholder: oe = "Select time…", size: se = "md", side: j = "bottom", align: M = "start", triggerClassName: ce, panelClassName: le, labelClassName: ue, messageClassName: N, className: de, id: fe, onBlur: pe, onKeyDown: me, ...he }, ge) => {
93
+ let _e = o(), P = fe ?? _e, F = `${P}-panel`, I = `${P}-message`, L = l(null), R = l(null), z = l(null);
94
+ s(ge, () => R.current);
95
+ let B = Number.isFinite(E) ? Math.max(1, Math.min(30, Math.floor(E))) : 5, V = (e) => {
96
+ let t = h(e);
97
+ return t ? _(t, D) : "";
98
+ }, [ve, ye] = u(() => V(te)), H = V(w ?? ve), [U, be] = u(!1), [xe, W] = u({ visibility: "hidden" }), [G, K] = u(() => b(h(H) ?? y(B), B, D)), Se = Array.from({ length: 24 }, (e, t) => ({
94
99
  value: t,
95
- label: f(t)
96
- })), be = Array.from({ length: 12 }, (e, t) => ({
100
+ label: m(t)
101
+ })), Ce = Array.from({ length: 12 }, (e, t) => ({
97
102
  value: t + 1,
98
- label: f(t + 1)
99
- })), xe = Array.from({ length: Math.floor(59 / L) + 1 }, (e, t) => {
100
- let n = t * L;
103
+ label: m(t + 1)
104
+ })), we = Array.from({ length: Math.floor(59 / B) + 1 }, (e, t) => {
105
+ let n = t * B;
101
106
  return {
102
107
  value: n,
103
- label: f(n)
108
+ label: m(n)
104
109
  };
105
- }), Se = Array.from({ length: 60 }, (e, t) => ({
110
+ }), Te = Array.from({ length: 60 }, (e, t) => ({
106
111
  value: t,
107
- label: f(t)
108
- })), W = [{
112
+ label: m(t)
113
+ })), Ee = [{
109
114
  value: 0,
110
115
  label: "AM"
111
116
  }, {
112
117
  value: 1,
113
118
  label: "PM"
114
- }], G = p(re), K = p(D), q = m(H), J = G ? q < m(G) : !1, Ce = K ? q > m(K) : !1, Y = J || Ce, X = g(z, w, E);
115
- function Z() {
116
- k || (U(p(z) ?? _(L)), V(!0));
119
+ }], q = h(re), J = h(ie), Y = g(G), X = q ? Y < g(q) : !1, De = J ? Y > g(J) : !1, Z = X || De, Oe = v(H, T, D);
120
+ function ke() {
121
+ k || (K(b(h(H) ?? y(B), B, D)), W({ visibility: "hidden" }), be(!0));
117
122
  }
118
123
  function Q(e = !1) {
119
- V(!1), e && I.current?.focus();
124
+ be(!1), e && R.current?.focus();
120
125
  }
121
126
  function $(e) {
122
- x === void 0 && ve(e), C?.(e), Q(!0);
127
+ w === void 0 && ye(e), ne?.(e), Q(!0);
123
128
  }
124
129
  return a(() => {
125
- if (!B) return;
130
+ if (!U) return;
126
131
  let e = (e) => {
127
- F.current?.contains(e.target) || Q();
132
+ L.current?.contains(e.target) || Q();
128
133
  };
129
134
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
130
- }, [B]), a(() => {
131
- B && requestAnimationFrame(() => {
132
- F.current?.querySelector("[data-time-column=\"hour\"] [aria-selected=\"true\"]")?.focus();
135
+ }, [U]), c(() => {
136
+ if (!U) return;
137
+ let e = () => {
138
+ let e = R.current, t = z.current;
139
+ if (!e || !t) return;
140
+ if (window.innerWidth < 640) {
141
+ W({
142
+ insetInline: 8,
143
+ bottom: 8,
144
+ top: "auto",
145
+ width: "auto",
146
+ visibility: "visible"
147
+ });
148
+ return;
149
+ }
150
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = M === "start" ? n.left : n.right - r.width, a = Math.max(16, window.innerWidth - r.width - 16), o = Math.min(Math.max(i, 16), a), s = n.bottom + 6, c = n.top - r.height - 6, l = s + r.height <= window.innerHeight - 16, u = c >= 16, d = j === "bottom" ? l || !u ? s : c : u || !l ? c : s, f = Math.max(16, window.innerHeight - r.height - 16);
151
+ W({
152
+ left: o,
153
+ top: Math.min(Math.max(d, 16), f),
154
+ visibility: "visible"
155
+ });
156
+ };
157
+ return e(), window.addEventListener("resize", e), document.addEventListener("scroll", e, !0), () => {
158
+ window.removeEventListener("resize", e), document.removeEventListener("scroll", e, !0);
159
+ };
160
+ }, [
161
+ M,
162
+ U,
163
+ j
164
+ ]), a(() => {
165
+ if (!U || window.innerWidth >= 640) return;
166
+ let e = document.body.style.overflow;
167
+ return document.body.style.overflow = "hidden", () => {
168
+ document.body.style.overflow = e;
169
+ };
170
+ }, [U]), a(() => {
171
+ U && requestAnimationFrame(() => {
172
+ let e = L.current?.querySelector("[data-time-column=\"hour\"] [aria-selected=\"true\"]"), t = e?.closest("[role=\"listbox\"]");
173
+ e?.focus({ preventScroll: !0 }), e && t && (t.scrollTop = e.offsetTop - t.clientHeight / 2 + e.clientHeight / 2);
133
174
  });
134
- }, [B]), /* @__PURE__ */ d("div", {
135
- ref: F,
175
+ }, [U]), /* @__PURE__ */ p("div", {
176
+ ref: L,
136
177
  className: e("relative", t, de),
137
178
  onBlur: (e) => {
138
179
  pe?.(e), e.currentTarget.contains(e.relatedTarget) || Q();
139
180
  },
140
181
  onKeyDown: (e) => {
141
- e.key === "Escape" && B && (e.preventDefault(), Q(!0));
182
+ me?.(e), !e.defaultPrevented && e.key === "Escape" && U && (e.preventDefault(), Q(!0));
142
183
  },
143
- ...me,
184
+ ...he,
144
185
  children: [
145
- i && /* @__PURE__ */ d("label", {
146
- htmlFor: M,
186
+ i && /* @__PURE__ */ p("label", {
187
+ htmlFor: P,
147
188
  className: e("text-xs font-semibold leading-5 text-foreground", ue),
148
- children: [i, A && /* @__PURE__ */ d(ee, { children: [/* @__PURE__ */ u("span", {
189
+ children: [i, A && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("span", {
149
190
  "aria-hidden": "true",
150
191
  className: "ml-1 text-destructive",
151
192
  children: "*"
152
- }), /* @__PURE__ */ u("span", {
193
+ }), /* @__PURE__ */ f("span", {
153
194
  className: "sr-only",
154
195
  children: " (required)"
155
196
  })] })]
156
197
  }),
157
- /* @__PURE__ */ d("button", {
158
- ref: I,
159
- id: M,
198
+ /* @__PURE__ */ p("button", {
199
+ ref: R,
200
+ id: P,
160
201
  type: "button",
161
202
  disabled: k,
162
- "aria-expanded": B,
203
+ "aria-expanded": U,
163
204
  "aria-haspopup": "dialog",
164
- "aria-controls": N,
165
- "aria-invalid": b ? !0 : void 0,
205
+ "aria-controls": F,
206
+ "aria-invalid": C ? !0 : void 0,
166
207
  "aria-required": A || void 0,
167
- "aria-describedby": b || y ? P : void 0,
168
- onClick: () => B ? Q() : Z(),
208
+ "aria-describedby": C || S ? I : void 0,
209
+ onClick: () => U ? Q() : ke(),
169
210
  onKeyDown: (e) => {
170
- e.key === "ArrowDown" && !B && (e.preventDefault(), Z());
211
+ e.key === "ArrowDown" && !U && (e.preventDefault(), ke());
171
212
  },
172
- className: e("flex w-full min-w-0 items-center gap-2 rounded-[var(--radius-md)] text-left", r, n, b && "border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/20", te[oe], ce),
213
+ className: e("flex w-full min-w-0 items-center gap-2 rounded-[var(--radius-md)] text-left", r, n, C && "border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/25", ee[se], ce),
173
214
  children: [
174
- /* @__PURE__ */ d("svg", {
215
+ /* @__PURE__ */ p("svg", {
175
216
  "aria-hidden": "true",
176
217
  width: "15",
177
218
  height: "15",
@@ -182,17 +223,17 @@ var y = i(({ label: i, hint: y, error: b, value: x, defaultValue: S = "", onValu
182
223
  strokeLinecap: "round",
183
224
  strokeLinejoin: "round",
184
225
  className: "shrink-0 text-muted-foreground",
185
- children: [/* @__PURE__ */ u("circle", {
226
+ children: [/* @__PURE__ */ f("circle", {
186
227
  cx: "12",
187
228
  cy: "12",
188
229
  r: "9"
189
- }), /* @__PURE__ */ u("path", { d: "M12 7v5l3 2" })]
230
+ }), /* @__PURE__ */ f("path", { d: "M12 7v5l3 2" })]
190
231
  }),
191
- /* @__PURE__ */ u("span", {
192
- className: e("min-w-0 flex-1 truncate", X ? "text-foreground" : "text-muted-foreground"),
193
- children: X || ae
232
+ /* @__PURE__ */ f("span", {
233
+ className: e("min-w-0 flex-1 truncate", Oe ? "text-foreground" : "text-muted-foreground"),
234
+ children: Oe || oe
194
235
  }),
195
- /* @__PURE__ */ u("svg", {
236
+ /* @__PURE__ */ f("svg", {
196
237
  "aria-hidden": "true",
197
238
  width: "13",
198
239
  height: "13",
@@ -202,135 +243,152 @@ var y = i(({ label: i, hint: y, error: b, value: x, defaultValue: S = "", onValu
202
243
  strokeWidth: "2.5",
203
244
  strokeLinecap: "round",
204
245
  strokeLinejoin: "round",
205
- className: e("shrink-0 text-muted-foreground transition-transform", B && "rotate-180"),
206
- children: /* @__PURE__ */ u("path", { d: "m6 9 6 6 6-6" })
246
+ className: e("shrink-0 text-muted-foreground transition-transform", U && "rotate-180"),
247
+ children: /* @__PURE__ */ f("path", { d: "m6 9 6 6 6-6" })
207
248
  })
208
249
  ]
209
250
  }),
210
- O && /* @__PURE__ */ u("input", {
251
+ O && /* @__PURE__ */ f("input", {
211
252
  type: "hidden",
212
253
  name: O,
213
- value: z,
254
+ value: H,
214
255
  disabled: k
215
256
  }),
216
- B && /* @__PURE__ */ d("div", {
217
- id: N,
257
+ U && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
258
+ "aria-hidden": "true",
259
+ className: "fixed inset-0 z-40 bg-overlay sm:hidden",
260
+ onMouseDown: () => Q(!0)
261
+ }), /* @__PURE__ */ p("div", {
262
+ ref: z,
263
+ id: F,
218
264
  role: "dialog",
219
265
  "aria-label": i ? `Choose ${i.toLowerCase()}` : "Choose time",
220
- className: e("absolute left-0 z-50 w-[min(22rem,calc(100vw-2rem))] max-h-[min(30rem,calc(100dvh-2rem))] overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-surface-raised p-3 shadow-floating", ne[se], le),
266
+ "data-side": j,
267
+ "data-align": M,
268
+ style: xe,
269
+ className: e("fixed z-50 w-[min(22rem,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", le),
221
270
  children: [
222
- /* @__PURE__ */ d("div", {
271
+ /* @__PURE__ */ p("div", {
223
272
  className: "mb-3 flex items-center justify-between gap-3",
224
- children: [/* @__PURE__ */ d("div", {
273
+ children: [/* @__PURE__ */ p("div", {
225
274
  className: "min-w-0",
226
- children: [/* @__PURE__ */ u("p", {
275
+ children: [/* @__PURE__ */ f("p", {
227
276
  className: "truncate text-sm font-semibold text-foreground",
228
277
  children: "Choose time"
229
- }), /* @__PURE__ */ d("p", {
278
+ }), /* @__PURE__ */ p("p", {
230
279
  className: "text-[11px] text-muted-foreground",
231
- children: [w === "12" ? "12-hour" : "24-hour", " format"]
280
+ children: [T === "12" ? "12-hour" : "24-hour", " format"]
232
281
  })]
233
- }), /* @__PURE__ */ u("button", {
282
+ }), /* @__PURE__ */ f("button", {
234
283
  type: "button",
235
- onClick: () => U(_(L)),
236
- className: e("h-8 rounded-md px-2.5 text-xs font-medium text-accent-700 hover:bg-muted dark:text-accent-300", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg"),
284
+ onClick: () => K(b(y(B), B, D)),
285
+ className: e("h-11 rounded-md px-3 text-xs font-medium text-accent-700 hover:bg-muted sm:h-8 sm:px-2.5 dark:text-accent-300", "focus-ring"),
237
286
  children: "Now"
238
287
  })]
239
288
  }),
240
- /* @__PURE__ */ d("div", {
241
- className: e("grid gap-2", w === "12" && E ? "grid-cols-4" : E || w === "12" ? "grid-cols-3" : "grid-cols-2"),
289
+ /* @__PURE__ */ f("div", {
290
+ "aria-live": "polite",
291
+ className: "mb-3 flex h-11 items-center justify-center rounded-[var(--radius-md)] bg-muted px-3 text-lg font-semibold tabular-nums text-foreground",
292
+ children: v(_(G, D), T, D)
293
+ }),
294
+ /* @__PURE__ */ p("div", {
295
+ className: e("grid gap-2", T === "12" && D ? "grid-cols-4" : D || T === "12" ? "grid-cols-3" : "grid-cols-2"),
242
296
  children: [
243
- /* @__PURE__ */ u(v, {
297
+ /* @__PURE__ */ f(x, {
244
298
  label: "Hour",
299
+ id: `${P}-hour`,
245
300
  name: "hour",
246
- options: w === "24" ? ye : be,
247
- value: w === "24" ? H.hour : H.hour % 12 || 12,
248
- onSelect: (e) => U((t) => ({
301
+ options: T === "24" ? Se : Ce,
302
+ value: T === "24" ? G.hour : G.hour % 12 || 12,
303
+ onSelect: (e) => K((t) => ({
249
304
  ...t,
250
- hour: w === "24" ? e : e % 12 + (t.hour >= 12 ? 12 : 0)
305
+ hour: T === "24" ? e : e % 12 + (t.hour >= 12 ? 12 : 0)
251
306
  }))
252
307
  }),
253
- /* @__PURE__ */ u(v, {
308
+ /* @__PURE__ */ f(x, {
309
+ id: `${P}-minute`,
254
310
  label: "Minute",
255
311
  name: "minute",
256
- options: xe,
257
- value: H.minute,
258
- onSelect: (e) => U((t) => ({
312
+ options: we,
313
+ value: G.minute,
314
+ onSelect: (e) => K((t) => ({
259
315
  ...t,
260
316
  minute: e
261
317
  }))
262
318
  }),
263
- E && /* @__PURE__ */ u(v, {
319
+ D && /* @__PURE__ */ f(x, {
320
+ id: `${P}-second`,
264
321
  label: "Second",
265
322
  name: "second",
266
- options: Se,
267
- value: H.second,
268
- onSelect: (e) => U((t) => ({
323
+ options: Te,
324
+ value: G.second,
325
+ onSelect: (e) => K((t) => ({
269
326
  ...t,
270
327
  second: e
271
328
  }))
272
329
  }),
273
- w === "12" && /* @__PURE__ */ u(v, {
330
+ T === "12" && /* @__PURE__ */ f(x, {
331
+ id: `${P}-period`,
274
332
  label: "Period",
275
333
  name: "period",
276
- options: W,
277
- value: +(H.hour >= 12),
278
- onSelect: (e) => U((t) => ({
334
+ options: Ee,
335
+ value: +(G.hour >= 12),
336
+ onSelect: (e) => K((t) => ({
279
337
  ...t,
280
338
  hour: t.hour % 12 + e * 12
281
339
  }))
282
340
  })
283
341
  ]
284
342
  }),
285
- Y && /* @__PURE__ */ d("p", {
343
+ Z && /* @__PURE__ */ p("p", {
286
344
  role: "status",
287
345
  className: "mt-2 text-xs text-destructive",
288
346
  children: [
289
347
  "Choose a time ",
290
- J ? `at or after ${g(h(G, E), w, E)}` : `at or before ${g(h(K, E), w, E)}`,
348
+ X ? `at or after ${v(_(q, D), T, D)}` : `at or before ${v(_(J, D), T, D)}`,
291
349
  "."
292
350
  ]
293
351
  }),
294
- /* @__PURE__ */ d("div", {
295
- className: "mt-3 flex flex-wrap items-center justify-end gap-2 border-t border-border pt-3",
352
+ /* @__PURE__ */ p("div", {
353
+ className: "sticky bottom-0 -mx-3 -mb-3 mt-3 flex flex-wrap items-center justify-end gap-2 border-t border-border bg-surface-raised px-3 pb-3 pt-3",
296
354
  children: [
297
- ie && !A && z && /* @__PURE__ */ u("button", {
355
+ ae && !A && H && /* @__PURE__ */ f("button", {
298
356
  type: "button",
299
357
  onClick: () => $(""),
300
- className: e("mr-auto h-8 rounded-md px-2.5 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg"),
358
+ className: e("mr-auto h-11 rounded-md px-3 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground sm:h-8 sm:px-2.5", "focus-ring"),
301
359
  children: "Clear"
302
360
  }),
303
- /* @__PURE__ */ u("button", {
361
+ /* @__PURE__ */ f("button", {
304
362
  type: "button",
305
363
  onClick: () => Q(!0),
306
- className: e("h-8 rounded-md px-3 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg"),
364
+ className: e("h-11 rounded-md px-3 text-xs font-medium text-muted-foreground hover:bg-muted hover:text-foreground sm:h-8", "focus-ring"),
307
365
  children: "Cancel"
308
366
  }),
309
- /* @__PURE__ */ u("button", {
367
+ /* @__PURE__ */ f("button", {
310
368
  type: "button",
311
- disabled: Y,
312
- onClick: () => $(h(H, E)),
313
- className: e("h-8 rounded-md bg-primary px-3 text-xs font-semibold text-primary-foreground hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-40", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg"),
369
+ disabled: Z,
370
+ onClick: () => $(_(G, D)),
371
+ className: e("h-11 rounded-md bg-primary px-4 text-xs font-semibold text-primary-foreground hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-40 sm:h-8 sm:px-3", "focus-ring"),
314
372
  children: "Apply"
315
373
  })
316
374
  ]
317
375
  })
318
376
  ]
319
- }),
320
- b && /* @__PURE__ */ u("p", {
321
- id: P,
377
+ })] }),
378
+ C && /* @__PURE__ */ f("p", {
379
+ id: I,
322
380
  "aria-live": "polite",
323
- className: e("text-xs leading-5 text-destructive", j),
324
- children: b
381
+ className: e("text-xs leading-5 text-destructive", N),
382
+ children: C
325
383
  }),
326
- y && !b && /* @__PURE__ */ u("p", {
327
- id: P,
328
- className: e("text-xs leading-5 text-muted-foreground", j),
329
- children: y
384
+ S && !C && /* @__PURE__ */ f("p", {
385
+ id: I,
386
+ className: e("text-xs leading-5 text-muted-foreground", N),
387
+ children: S
330
388
  })
331
389
  ]
332
390
  });
333
391
  });
334
- y.displayName = "TimePicker";
392
+ S.displayName = "TimePicker";
335
393
  //#endregion
336
- export { y as TimePicker };
394
+ export { S as TimePicker };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react/jsx-runtime");var n={default:`bg-slate-400 border-slate-400/30`,success:`bg-emerald-400 border-emerald-400/30`,warning:`bg-amber-400 border-amber-400/30`,error:`bg-red-400 border-red-400/30`,info:`bg-sky-400 border-sky-400/30`},r={default:`bg-slate-500/15 text-slate-400`,success:`bg-emerald-500/15 text-emerald-400`,warning:`bg-amber-500/15 text-amber-400`,error:`bg-red-500/15 text-red-400`,info:`bg-sky-500/15 text-sky-400`};function i({events:i,className:a}){return(0,t.jsx)(`div`,{className:e.t(`flex flex-col`,a),children:i.map((a,o)=>{let s=o===i.length-1,c=a.variant??`default`;return(0,t.jsxs)(`div`,{className:`flex gap-3`,children:[(0,t.jsxs)(`div`,{className:`flex flex-col items-center`,children:[a.icon?(0,t.jsx)(`div`,{className:e.t(`w-8 h-8 rounded-full flex items-center justify-center shrink-0`,r[c]),children:(0,t.jsx)(`span`,{className:`w-4 h-4 flex items-center justify-center`,children:a.icon})}):(0,t.jsx)(`div`,{className:e.t(`w-2.5 h-2.5 rounded-full shrink-0 border-2 mt-1.5`,n[c])}),!s&&(0,t.jsx)(`div`,{className:`flex-1 w-px bg-black/10 dark:bg-white/10 my-1`})]}),(0,t.jsxs)(`div`,{className:e.t(`pb-5 min-w-0`,s&&`pb-0`),children:[(0,t.jsxs)(`div`,{className:`flex items-baseline gap-2 flex-wrap`,children:[(0,t.jsx)(`p`,{className:`text-sm font-medium text-slate-700 dark:text-slate-200`,children:a.title}),a.timestamp&&(0,t.jsx)(`span`,{className:`text-xs text-slate-500`,children:a.timestamp})]}),a.description&&(0,t.jsx)(`p`,{className:`text-sm text-slate-500 mt-0.5`,children:a.description})]})]},a.id)})})}exports.Timeline=i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs");let t=require("react/jsx-runtime");var n={default:`bg-slate-400 border-slate-400/30`,success:`bg-emerald-400 border-emerald-400/30`,warning:`bg-amber-400 border-amber-400/30`,error:`bg-red-400 border-red-400/30`,info:`bg-sky-400 border-sky-400/30`},r={default:`bg-slate-500/15 text-slate-400`,success:`bg-emerald-500/15 text-emerald-400`,warning:`bg-amber-500/15 text-amber-400`,error:`bg-red-500/15 text-red-400`,info:`bg-sky-500/15 text-sky-400`};function i({events:i,className:a}){return(0,t.jsx)(`div`,{className:e.t(`flex flex-col`,a),children:i.map((a,o)=>{let s=o===i.length-1,c=a.variant??`default`;return(0,t.jsxs)(`div`,{className:`flex gap-3`,children:[(0,t.jsxs)(`div`,{className:`flex flex-col items-center`,children:[a.icon?(0,t.jsx)(`div`,{className:e.t(`w-8 h-8 rounded-full flex items-center justify-center shrink-0`,r[c]),children:(0,t.jsx)(`span`,{className:`w-4 h-4 flex items-center justify-center`,children:a.icon})}):(0,t.jsx)(`div`,{className:e.t(`w-2.5 h-2.5 rounded-full shrink-0 border-2 mt-1.5`,n[c])}),!s&&(0,t.jsx)(`div`,{className:`flex-1 w-px bg-black/10 dark:bg-white/10 my-1`})]}),(0,t.jsxs)(`div`,{className:e.t(`pb-5 min-w-0`,s&&`pb-0`),children:[(0,t.jsxs)(`div`,{className:`flex items-baseline gap-2 flex-wrap`,children:[(0,t.jsx)(`p`,{className:`text-sm font-medium text-slate-700 dark:text-slate-200`,children:a.title}),a.timestamp&&(0,t.jsx)(`span`,{className:`text-xs text-slate-500`,children:a.timestamp})]}),a.description&&(0,t.jsx)(`p`,{className:`text-sm text-slate-500 mt-0.5`,children:a.description})]})]},a.id)})})}exports.Timeline=i;
@@ -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 { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  //#region src/components/timeline.tsx
4
4
  var r = {
@@ -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("react"),r=require("react/jsx-runtime");var i={default:[`border border-transparent bg-transparent text-muted-foreground`,`hover:bg-muted hover:text-foreground`,`data-[state=on]:bg-accent-100 data-[state=on]:text-accent-800`,`dark:data-[state=on]:bg-accent-900/45 dark:data-[state=on]:text-accent-200`].join(` `),outline:[`border border-border bg-surface text-muted-foreground shadow-xs`,`hover:border-border-strong hover:bg-surface-muted hover:text-foreground`,`data-[state=on]:border-accent-300 data-[state=on]:bg-accent-50 data-[state=on]:text-accent-800`,`dark:data-[state=on]:border-accent-700 dark:data-[state=on]:bg-accent-900/35 dark:data-[state=on]:text-accent-200`].join(` `)},a={sm:`h-8 rounded-[var(--radius-md)] px-2.5 text-xs gap-1.5`,md:`h-9 rounded-[var(--radius-md)] px-3 text-sm gap-2`,lg:`h-10 rounded-[var(--radius-lg)] px-4 text-sm gap-2`,icon:`size-9 rounded-[var(--radius-md)] p-0`},o=[`inline-flex shrink-0 cursor-pointer select-none items-center justify-center font-medium`,`transition-[color,background-color,border-color,box-shadow] duration-150`,`disabled:pointer-events-none disabled:opacity-40`,t.s].join(` `),s=(0,n.forwardRef)(({pressed:t,defaultPressed:s=!1,onPressedChange:c,variant:l=`default`,size:u=`md`,className:d,type:f=`button`,onClick:p,...m},h)=>{let[g,_]=(0,n.useState)(s),v=t??g;return(0,r.jsx)(`button`,{ref:h,type:f,"aria-pressed":v,"data-state":v?`on`:`off`,className:e.t(o,i[l],a[u],d),onClick:e=>{if(p?.(e),e.defaultPrevented)return;let n=!v;t===void 0&&_(n),c?.(n)},...m})});s.displayName=`Toggle`;var c=(0,n.createContext)(null);function l(){let e=(0,n.useContext)(c);if(!e)throw Error(`ToggleGroupItem must be inside <ToggleGroup>`);return e}var u=(0,n.forwardRef)(({type:t=`single`,value:i,defaultValue:a,onValueChange:o,orientation:s=`horizontal`,variant:l=`default`,size:u=`md`,disabled:d=!1,loop:f=!0,className:p,children:m,...h},g)=>{let[_,v]=(0,n.useState)(()=>a??(t===`multiple`?[]:``)),y=i??_,b=o;function x(e){return t===`multiple`?Array.isArray(y)&&y.includes(e):y===e}function S(e){let n=t===`multiple`?(()=>{let t=Array.isArray(y)?y:[];return t.includes(e)?t.filter(t=>t!==e):[...t,e]})():y===e?``:e;i===void 0&&v(n),b?.(n)}return(0,r.jsx)(c.Provider,{value:{disabled:d,isPressed:x,loop:f,orientation:s,select:S,size:u,variant:l},children:(0,r.jsx)(`div`,{ref:g,role:`group`,"data-rui-toggle-group":``,"data-orientation":s,className:e.t(`inline-flex w-fit rounded-[var(--radius-lg)]`,s===`horizontal`?`max-w-full flex-row items-center gap-1 overflow-x-auto overscroll-x-contain p-0.5 scrollbar-none [&>*]:shrink-0`:`max-w-full flex-col items-stretch gap-1`,p),...h,children:m})})});u.displayName=`ToggleGroup`;var d=(0,n.forwardRef)(({value:t,variant:n,size:s,className:c,disabled:u,type:d=`button`,onClick:f,onKeyDown:p,...m},h)=>{let g=l(),_=g.isPressed(t),v=g.disabled||u;function y(e){if(p?.(e),e.defaultPrevented)return;let t=g.orientation===`horizontal`?`ArrowLeft`:`ArrowUp`,n=g.orientation===`horizontal`?`ArrowRight`:`ArrowDown`;if(e.key!==t&&e.key!==n&&e.key!==`Home`&&e.key!==`End`)return;let r=e.currentTarget.closest(`[data-rui-toggle-group]`),i=Array.from(r?.querySelectorAll(`[data-rui-toggle-item]:not(:disabled)`)??[]).filter(e=>e.closest(`[data-rui-toggle-group]`)===r),a=i.indexOf(e.currentTarget);if(a<0||i.length===0)return;e.preventDefault();let o=e.key===`Home`?0:e.key===`End`?i.length-1:a+(e.key===n?1:-1);o=g.loop?(o+i.length)%i.length:Math.max(0,Math.min(i.length-1,o)),i[o]?.focus()}return(0,r.jsx)(`button`,{ref:h,type:d,"aria-pressed":_,"data-rui-toggle-item":``,"data-state":_?`on`:`off`,disabled:v,className:e.t(o,i[n??g.variant],a[s??g.size],c),onClick:e=>{f?.(e),e.defaultPrevented||g.select(t)},onKeyDown:y,...m})});d.displayName=`ToggleGroupItem`,exports.Toggle=s,exports.ToggleGroup=u,exports.ToggleGroupItem=d,exports.toggleSizes=a,exports.toggleVariants=i;
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("react"),r=require("react/jsx-runtime");var i={default:[`border border-transparent bg-transparent text-muted-foreground`,`hover:bg-muted hover:text-foreground`,`data-[state=on]:bg-accent-100 data-[state=on]:text-accent-800`,`dark:data-[state=on]:bg-accent-900/45 dark:data-[state=on]:text-accent-200`].join(` `),outline:[`border border-border bg-surface text-muted-foreground shadow-xs`,`hover:border-border-strong hover:bg-surface-muted hover:text-foreground`,`data-[state=on]:border-accent-300 data-[state=on]:bg-accent-50 data-[state=on]:text-accent-800`,`dark:data-[state=on]:border-accent-700 dark:data-[state=on]:bg-accent-900/35 dark:data-[state=on]:text-accent-200`].join(` `)},a={sm:`h-8 rounded-[var(--radius-md)] px-2.5 text-xs gap-1.5`,md:`h-9 rounded-[var(--radius-md)] px-3 text-sm gap-2`,lg:`h-10 rounded-[var(--radius-lg)] px-4 text-sm gap-2`,icon:`size-9 rounded-[var(--radius-md)] p-0`},o=[`inline-flex shrink-0 cursor-pointer select-none items-center justify-center font-medium`,`transition-[color,background-color,border-color,box-shadow] duration-150`,`disabled:pointer-events-none disabled:opacity-40`,t.s].join(` `),s=(0,n.forwardRef)(({pressed:t,defaultPressed:s=!1,onPressedChange:c,variant:l=`default`,size:u=`md`,className:d,type:f=`button`,onClick:p,...m},h)=>{let[g,_]=(0,n.useState)(s),v=t??g;return(0,r.jsx)(`button`,{ref:h,type:f,"aria-pressed":v,"data-state":v?`on`:`off`,className:e.t(o,i[l],a[u],d),onClick:e=>{if(p?.(e),e.defaultPrevented)return;let n=!v;t===void 0&&_(n),c?.(n)},...m})});s.displayName=`Toggle`;var c=(0,n.createContext)(null);function l(){let e=(0,n.useContext)(c);if(!e)throw Error(`ToggleGroupItem must be inside <ToggleGroup>`);return e}var u=(0,n.forwardRef)(({type:t=`single`,value:i,defaultValue:a,onValueChange:o,orientation:s=`horizontal`,variant:l=`default`,size:u=`md`,disabled:d=!1,loop:f=!0,className:p,children:m,...h},g)=>{let[_,v]=(0,n.useState)(()=>a??(t===`multiple`?[]:``)),y=i??_,b=o;function x(e){return t===`multiple`?Array.isArray(y)&&y.includes(e):y===e}function S(e){let n=t===`multiple`?(()=>{let t=Array.isArray(y)?y:[];return t.includes(e)?t.filter(t=>t!==e):[...t,e]})():y===e?``:e;i===void 0&&v(n),b?.(n)}return(0,r.jsx)(c.Provider,{value:{disabled:d,isPressed:x,loop:f,orientation:s,select:S,size:u,variant:l},children:(0,r.jsx)(`div`,{ref:g,role:`group`,"data-rui-toggle-group":``,"data-orientation":s,className:e.t(`inline-flex w-fit rounded-[var(--radius-lg)]`,s===`horizontal`?`max-w-full flex-row items-center gap-1 overflow-x-auto overscroll-x-contain p-0.5 scrollbar-none [&>*]:shrink-0`:`max-w-full flex-col items-stretch gap-1`,p),...h,children:m})})});u.displayName=`ToggleGroup`;var d=(0,n.forwardRef)(({value:t,variant:n,size:s,className:c,disabled:u,type:d=`button`,onClick:f,onKeyDown:p,...m},h)=>{let g=l(),_=g.isPressed(t),v=g.disabled||u;function y(e){if(p?.(e),e.defaultPrevented)return;let t=g.orientation===`horizontal`?`ArrowLeft`:`ArrowUp`,n=g.orientation===`horizontal`?`ArrowRight`:`ArrowDown`;if(e.key!==t&&e.key!==n&&e.key!==`Home`&&e.key!==`End`)return;let r=e.currentTarget.closest(`[data-rui-toggle-group]`),i=Array.from(r?.querySelectorAll(`[data-rui-toggle-item]:not(:disabled)`)??[]).filter(e=>e.closest(`[data-rui-toggle-group]`)===r),a=i.indexOf(e.currentTarget);if(a<0||i.length===0)return;e.preventDefault();let o=e.key===`Home`?0:e.key===`End`?i.length-1:a+(e.key===n?1:-1);o=g.loop?(o+i.length)%i.length:Math.max(0,Math.min(i.length-1,o)),i[o]?.focus()}return(0,r.jsx)(`button`,{ref:h,type:d,"aria-pressed":_,"data-rui-toggle-item":``,"data-state":_?`on`:`off`,disabled:v,className:e.t(o,i[n??g.variant],a[s??g.size],c),onClick:e=>{f?.(e),e.defaultPrevented||g.select(t)},onKeyDown:y,...m})});d.displayName=`ToggleGroupItem`,exports.Toggle=s,exports.ToggleGroup=u,exports.ToggleGroupItem=d,exports.toggleSizes=a,exports.toggleVariants=i;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { t as e } from "../cn-DpgY2leY.js";
3
- import { s as t } from "../component-styles-Bgy44fc8.js";
2
+ import { t as e } from "../cn-BJyZJP-y.js";
3
+ import { s as t } from "../component-styles-C2CbHEEA.js";
4
4
  import { createContext as n, forwardRef as r, useContext as i, useState as a } from "react";
5
5
  import { jsx as o } from "react/jsx-runtime";
6
6
  //#region src/components/toggle.tsx
@@ -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={top:{container:`bottom-full left-1/2 -translate-x-1/2 mb-2`,initial:{y:4}},bottom:{container:`top-full left-1/2 -translate-x-1/2 mt-2`,initial:{y:-4}},left:{container:`right-full top-1/2 -translate-y-1/2 mr-2`,initial:{x:4}},right:{container:`left-full top-1/2 -translate-y-1/2 ml-2`,initial:{x:-4}}};function a({content:a,children:o,position:s=`top`,delayMs:c=0,className:l}){let[u,d]=(0,n.useState)(!1),f=(0,n.useRef)(null),p=(0,n.useId)(),{container:m,initial:h}=i[s];function g(){c>0?f.current=setTimeout(()=>d(!0),c):d(!0)}function _(){f.current&&clearTimeout(f.current),d(!1)}(0,n.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]);let v=(0,n.isValidElement)(o)?(0,n.cloneElement)(o,{"aria-describedby":u?p:void 0,onMouseEnter:e=>{o.props.onMouseEnter?.(e),e.defaultPrevented||g()},onMouseLeave:e=>{o.props.onMouseLeave?.(e),_()},onFocus:e=>{o.props.onFocus?.(e),e.defaultPrevented||g()},onBlur:e=>{o.props.onBlur?.(e),_()}}):(0,r.jsx)(`span`,{tabIndex:0,"aria-describedby":u?p:void 0,onMouseEnter:g,onMouseLeave:_,onFocus:g,onBlur:_,children:o});return(0,r.jsxs)(`div`,{className:`relative inline-flex`,children:[v,(0,r.jsx)(t.AnimatePresence,{children:u&&(0,r.jsx)(t.motion.div,{id:p,role:`tooltip`,initial:{opacity:0,...h},animate:{opacity:1,y:0,x:0},exit:{opacity:0,...h},transition:{duration:.12},className:e.t(`absolute z-50 pointer-events-none`,`max-w-[min(20rem,calc(100vw-2rem))] rounded-md px-2.5 py-1.5 text-xs font-medium leading-4`,`border border-slate-700 bg-slate-900 text-slate-50 shadow-floating dark:border-border-strong dark:bg-surface-raised dark:text-foreground`,m,l),children:a})})]})}exports.Tooltip=a;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-B6R3HKzx.cjs"),t=require("../motion-B2shivEB.cjs");let n=require("framer-motion"),r=require("react"),i=require("react/jsx-runtime");var a={top:{container:`bottom-full left-1/2 -translate-x-1/2 mb-2`,initial:{y:4}},bottom:{container:`top-full left-1/2 -translate-x-1/2 mt-2`,initial:{y:-4}},left:{container:`right-full top-1/2 -translate-y-1/2 mr-2`,initial:{x:4}},right:{container:`left-full top-1/2 -translate-y-1/2 ml-2`,initial:{x:-4}}};function o({content:o,children:s,position:c=`top`,delayMs:l=0,className:u,wrapperClassName:d}){let[f,p]=(0,r.useState)(!1),m=(0,r.useRef)(null),h=(0,r.useId)(),{container:g,initial:_}=a[c];function v(){l>0?m.current=setTimeout(()=>p(!0),l):p(!0)}function y(){m.current&&clearTimeout(m.current),p(!1)}(0,r.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]);let b=(0,r.isValidElement)(s)?(0,r.cloneElement)(s,{"aria-describedby":f?h:void 0,onMouseEnter:e=>{s.props.onMouseEnter?.(e),e.defaultPrevented||v()},onMouseLeave:e=>{s.props.onMouseLeave?.(e),y()},onFocus:e=>{s.props.onFocus?.(e),e.defaultPrevented||v()},onBlur:e=>{s.props.onBlur?.(e),y()}}):(0,i.jsx)(`span`,{tabIndex:0,"aria-describedby":f?h:void 0,onMouseEnter:v,onMouseLeave:y,onFocus:v,onBlur:y,children:s});return(0,i.jsxs)(`div`,{className:e.t(`relative inline-flex`,d),children:[b,(0,i.jsx)(n.AnimatePresence,{children:f&&(0,i.jsx)(n.motion.div,{id:h,role:`tooltip`,initial:{opacity:0,..._},animate:{opacity:1,y:0,x:0},exit:{opacity:0,..._},transition:t.n.fade,className:e.t(`absolute z-50 pointer-events-none`,`max-w-[min(20rem,calc(100vw-2rem))] rounded-md px-2.5 py-1.5 text-xs font-medium leading-4`,`border border-slate-700 bg-slate-900 text-slate-50 shadow-floating dark:border-border-strong dark:bg-surface-raised dark:text-foreground`,g,u),children:o})})]})}exports.Tooltip=o;
@@ -6,6 +6,7 @@ export interface TooltipProps {
6
6
  position?: Position;
7
7
  delayMs?: number;
8
8
  className?: string;
9
+ wrapperClassName?: string;
9
10
  }
10
- export declare function Tooltip({ content, children, position, delayMs, className, }: TooltipProps): import("react").JSX.Element;
11
+ export declare function Tooltip({ content, children, position, delayMs, className, wrapperClassName, }: TooltipProps): import("react").JSX.Element;
11
12
  export {};