@devalok/shilp-sutra 0.27.2 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/dist/_chunks/badge-group.js +299 -0
  2. package/dist/_chunks/framer.js +1915 -1980
  3. package/dist/_chunks/keybinding.js +4 -5
  4. package/dist/_chunks/primitives.js +3198 -3272
  5. package/dist/_chunks/sonner.js +29 -31
  6. package/dist/_chunks/stat-row.js +110 -131
  7. package/dist/_chunks/tiptap.js +42 -78
  8. package/dist/_chunks/tree-view.js +138 -149
  9. package/dist/_chunks/typing-indicator.js +565 -0
  10. package/dist/_chunks/use-calendar.js +416 -439
  11. package/dist/_chunks/vendor-client.js +977 -814
  12. package/dist/_chunks/vendor-utils.js +5 -5
  13. package/dist/ai/block-renderer.js +22 -22
  14. package/dist/ai/blocks/loading.d.ts.map +1 -1
  15. package/dist/ai/command-bar.d.ts.map +1 -1
  16. package/dist/ai/command-bar.js +241 -263
  17. package/dist/ai/conversation.d.ts.map +1 -1
  18. package/dist/ai/conversation.js +87 -107
  19. package/dist/composed/activity-feed.d.ts +2 -0
  20. package/dist/composed/activity-feed.d.ts.map +1 -1
  21. package/dist/composed/activity-feed.js +118 -90
  22. package/dist/composed/avatar-group.d.ts +1 -0
  23. package/dist/composed/avatar-group.d.ts.map +1 -1
  24. package/dist/composed/avatar-group.js +91 -67
  25. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  26. package/dist/composed/bulk-action-bar.js +29 -28
  27. package/dist/composed/command-palette.d.ts.map +1 -1
  28. package/dist/composed/command-palette.js +99 -113
  29. package/dist/composed/content-card.js +1 -1
  30. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  31. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  32. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  33. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  34. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  35. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  36. package/dist/composed/deadline-indicator.js +29 -28
  37. package/dist/composed/error-boundary.d.ts.map +1 -1
  38. package/dist/composed/error-boundary.js +30 -27
  39. package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
  40. package/dist/composed/file-preview.d.ts.map +1 -1
  41. package/dist/composed/file-preview.js +261 -271
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +49 -48
  44. package/dist/composed/form-section.d.ts.map +1 -1
  45. package/dist/composed/form-section.js +12 -11
  46. package/dist/composed/global-loading.js +1 -1
  47. package/dist/composed/index.js +63 -63
  48. package/dist/composed/inline-edit.d.ts.map +1 -1
  49. package/dist/composed/inline-edit.js +55 -54
  50. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  51. package/dist/composed/markdown-viewer.js +44 -43
  52. package/dist/composed/master-detail.d.ts.map +1 -1
  53. package/dist/composed/master-detail.js +35 -34
  54. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  55. package/dist/composed/multi-select-popover.js +64 -64
  56. package/dist/composed/page-header.d.ts.map +1 -1
  57. package/dist/composed/page-header.js +31 -37
  58. package/dist/composed/priority-indicator.d.ts.map +1 -1
  59. package/dist/composed/priority-indicator.js +37 -36
  60. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  61. package/dist/composed/rich-text-editor.js +287 -306
  62. package/dist/composed/schedule-view.js +62 -62
  63. package/dist/composed/status-badge.d.ts +4 -2
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +58 -45
  66. package/dist/shell/app-command-palette.d.ts.map +1 -1
  67. package/dist/shell/app-command-palette.js +93 -93
  68. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  69. package/dist/shell/bottom-navbar.js +21 -20
  70. package/dist/shell/index.js +18 -18
  71. package/dist/shell/notification-center.d.ts.map +1 -1
  72. package/dist/shell/notification-center.js +96 -95
  73. package/dist/shell/notification-preferences.d.ts.map +1 -1
  74. package/dist/shell/notification-preferences.js +82 -85
  75. package/dist/shell/sidebar.js +59 -60
  76. package/dist/shell/top-bar.d.ts.map +1 -1
  77. package/dist/shell/top-bar.js +103 -103
  78. package/dist/tailwind/index.cjs +37 -4
  79. package/dist/tailwind/preset.d.ts.map +1 -1
  80. package/dist/tailwind/preset.js +38 -5
  81. package/dist/tokens/primitives.css +10 -0
  82. package/dist/tokens/semantic.css +70 -7
  83. package/dist/ui/accordion.d.ts +5 -2
  84. package/dist/ui/accordion.d.ts.map +1 -1
  85. package/dist/ui/accordion.js +44 -39
  86. package/dist/ui/alert-dialog.js +57 -57
  87. package/dist/ui/alert.d.ts +1 -1
  88. package/dist/ui/alert.d.ts.map +1 -1
  89. package/dist/ui/alert.js +30 -29
  90. package/dist/ui/aspect-ratio.js +4 -4
  91. package/dist/ui/autocomplete.js +56 -56
  92. package/dist/ui/avatar.js +2 -2
  93. package/dist/ui/badge-group.d.ts +22 -0
  94. package/dist/ui/badge-group.d.ts.map +1 -0
  95. package/dist/ui/badge-group.js +8 -0
  96. package/dist/ui/badge-indicator.d.ts +32 -0
  97. package/dist/ui/badge-indicator.d.ts.map +1 -0
  98. package/dist/ui/badge-indicator.js +54 -0
  99. package/dist/ui/badge.d.ts +27 -24
  100. package/dist/ui/badge.d.ts.map +1 -1
  101. package/dist/ui/badge.js +13 -129
  102. package/dist/ui/banner.d.ts +1 -1
  103. package/dist/ui/banner.d.ts.map +1 -1
  104. package/dist/ui/banner.js +27 -26
  105. package/dist/ui/breadcrumb.d.ts.map +1 -1
  106. package/dist/ui/breadcrumb.js +37 -36
  107. package/dist/ui/button-group.d.ts +12 -6
  108. package/dist/ui/button-group.d.ts.map +1 -1
  109. package/dist/ui/button-group.js +18 -18
  110. package/dist/ui/button-processing.d.ts +15 -0
  111. package/dist/ui/button-processing.d.ts.map +1 -0
  112. package/dist/ui/button-processing.js +77 -0
  113. package/dist/ui/button.d.ts +50 -25
  114. package/dist/ui/button.d.ts.map +1 -1
  115. package/dist/ui/button.js +243 -127
  116. package/dist/ui/card.js +20 -21
  117. package/dist/ui/charts/index.js +499 -508
  118. package/dist/ui/chat/date-separator.d.ts +12 -0
  119. package/dist/ui/chat/date-separator.d.ts.map +1 -0
  120. package/dist/ui/chat/index.d.ts +9 -0
  121. package/dist/ui/chat/index.d.ts.map +1 -0
  122. package/dist/ui/chat/index.js +12 -0
  123. package/dist/ui/chat/message-input.d.ts +16 -0
  124. package/dist/ui/chat/message-input.d.ts.map +1 -0
  125. package/dist/ui/chat/message-list.d.ts +24 -0
  126. package/dist/ui/chat/message-list.d.ts.map +1 -0
  127. package/dist/ui/chat/message.d.ts +108 -0
  128. package/dist/ui/chat/message.d.ts.map +1 -0
  129. package/dist/ui/chat/system-message.d.ts +11 -0
  130. package/dist/ui/chat/system-message.d.ts.map +1 -0
  131. package/dist/ui/chat/typing-indicator.d.ts +14 -0
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
  133. package/dist/ui/chat/unread-separator.d.ts +12 -0
  134. package/dist/ui/chat/unread-separator.d.ts.map +1 -0
  135. package/dist/ui/checkbox.js +18 -18
  136. package/dist/ui/chip.d.ts +13 -62
  137. package/dist/ui/chip.d.ts.map +1 -1
  138. package/dist/ui/chip.js +10 -109
  139. package/dist/ui/collapsible.js +4 -4
  140. package/dist/ui/color-input.d.ts +19 -5
  141. package/dist/ui/color-input.d.ts.map +1 -1
  142. package/dist/ui/color-input.js +371 -79
  143. package/dist/ui/color-swatch.js +11 -11
  144. package/dist/ui/combobox.d.ts.map +1 -1
  145. package/dist/ui/combobox.js +74 -80
  146. package/dist/ui/context-menu.d.ts.map +1 -1
  147. package/dist/ui/context-menu.js +86 -85
  148. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  149. package/dist/ui/data-table-toolbar.js +51 -57
  150. package/dist/ui/data-table.d.ts.map +1 -1
  151. package/dist/ui/data-table.js +268 -296
  152. package/dist/ui/devalok-grain.d.ts +81 -0
  153. package/dist/ui/devalok-grain.d.ts.map +1 -0
  154. package/dist/ui/devalok-grain.js +69 -0
  155. package/dist/ui/dialog.d.ts.map +1 -1
  156. package/dist/ui/dialog.js +73 -72
  157. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  158. package/dist/ui/dropdown-menu.js +93 -92
  159. package/dist/ui/file-upload.d.ts.map +1 -1
  160. package/dist/ui/file-upload.js +82 -82
  161. package/dist/ui/hover-card.js +29 -29
  162. package/dist/ui/icon-button.d.ts +7 -7
  163. package/dist/ui/icon-button.d.ts.map +1 -1
  164. package/dist/ui/icon-context.d.ts +15 -0
  165. package/dist/ui/icon-context.d.ts.map +1 -0
  166. package/dist/ui/icon-context.js +20 -0
  167. package/dist/ui/icon-group.d.ts +22 -0
  168. package/dist/ui/icon-group.d.ts.map +1 -0
  169. package/dist/ui/icon-group.js +32 -0
  170. package/dist/ui/icon.d.ts +57 -0
  171. package/dist/ui/icon.d.ts.map +1 -0
  172. package/dist/ui/icon.js +122 -0
  173. package/dist/ui/index.d.ts +8 -1
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +351 -329
  176. package/dist/ui/input-otp.d.ts.map +1 -1
  177. package/dist/ui/input-otp.js +21 -20
  178. package/dist/ui/input.d.ts +32 -11
  179. package/dist/ui/input.d.ts.map +1 -1
  180. package/dist/ui/input.js +149 -44
  181. package/dist/ui/label.js +1 -1
  182. package/dist/ui/lib/motion.d.ts +2 -0
  183. package/dist/ui/lib/motion.d.ts.map +1 -1
  184. package/dist/ui/lib/motion.js +13 -11
  185. package/dist/ui/lib/utils.js +1 -1
  186. package/dist/ui/menubar.d.ts.map +1 -1
  187. package/dist/ui/menubar.js +87 -86
  188. package/dist/ui/navigation-menu.d.ts.map +1 -1
  189. package/dist/ui/navigation-menu.js +23 -28
  190. package/dist/ui/number-input.d.ts.map +1 -1
  191. package/dist/ui/number-input.js +54 -53
  192. package/dist/ui/pagination.d.ts.map +1 -1
  193. package/dist/ui/pagination.js +45 -44
  194. package/dist/ui/popover.js +30 -30
  195. package/dist/ui/progress.d.ts +3 -1
  196. package/dist/ui/progress.d.ts.map +1 -1
  197. package/dist/ui/progress.js +43 -39
  198. package/dist/ui/radio.js +1 -1
  199. package/dist/ui/search-input.d.ts.map +1 -1
  200. package/dist/ui/search-input.js +47 -60
  201. package/dist/ui/segmented-control.js +1 -1
  202. package/dist/ui/select.d.ts.map +1 -1
  203. package/dist/ui/select.js +54 -53
  204. package/dist/ui/separator.js +5 -5
  205. package/dist/ui/sheet.d.ts.map +1 -1
  206. package/dist/ui/sheet.js +46 -45
  207. package/dist/ui/sidebar.d.ts.map +1 -1
  208. package/dist/ui/sidebar.js +196 -193
  209. package/dist/ui/skeleton.js +1 -1
  210. package/dist/ui/slider.js +1 -1
  211. package/dist/ui/spinner.js +74 -74
  212. package/dist/ui/stat-card.d.ts.map +1 -1
  213. package/dist/ui/stat-card.js +85 -86
  214. package/dist/ui/switch.d.ts +3 -0
  215. package/dist/ui/switch.d.ts.map +1 -1
  216. package/dist/ui/switch.js +40 -26
  217. package/dist/ui/tabs.js +43 -43
  218. package/dist/ui/text.js +1 -1
  219. package/dist/ui/textarea.js +10 -10
  220. package/dist/ui/toast.d.ts.map +1 -1
  221. package/dist/ui/toast.js +169 -169
  222. package/dist/ui/toggle-group.js +1 -1
  223. package/dist/ui/toggle.js +5 -5
  224. package/dist/ui/tooltip.js +41 -41
  225. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  226. package/docs/components/_header.md +4 -4
  227. package/docs/components/composed/activity-feed.md +7 -0
  228. package/docs/components/composed/avatar-group.md +8 -5
  229. package/docs/components/composed/status-badge.md +14 -1
  230. package/docs/components/ui/accordion.md +5 -2
  231. package/docs/components/ui/badge-group.md +38 -0
  232. package/docs/components/ui/badge-indicator.md +40 -0
  233. package/docs/components/ui/badge.md +36 -5
  234. package/docs/components/ui/button-processing.md +15 -0
  235. package/docs/components/ui/button.md +40 -11
  236. package/docs/components/ui/chat.md +214 -0
  237. package/docs/components/ui/color-input.md +58 -4
  238. package/docs/components/ui/data-table.md +3 -0
  239. package/docs/components/ui/devalok-grain.md +55 -0
  240. package/docs/components/ui/icon-button.md +12 -5
  241. package/docs/components/ui/icon-context.md +38 -0
  242. package/docs/components/ui/icon-group.md +36 -0
  243. package/docs/components/ui/icon.md +47 -0
  244. package/docs/components/ui/input.md +32 -6
  245. package/docs/components/ui/progress.md +5 -0
  246. package/docs/components/ui/spinner.md +3 -0
  247. package/docs/components/ui/switch.md +13 -0
  248. package/llms-full.txt +724 -44
  249. package/llms.txt +38 -19
  250. package/package.json +8 -2
@@ -1,103 +1,104 @@
1
1
  "use client";
2
- import { jsxs as p, jsx as t } from "react/jsx-runtime";
3
- import * as h from "react";
2
+ import { jsxs as b, jsx as t } from "react/jsx-runtime";
3
+ import * as g from "react";
4
4
  import { useState as Pe } from "react";
5
- import { format as D, startOfMonth as z, endOfMonth as me, startOfWeek as Se, endOfWeek as Ye, addDays as _, subMonths as be, addMonths as te, isSameMonth as ge, isSameDay as X, lastDayOfMonth as Re, isBefore as C, startOfDay as K, isAfter as ee, isWithinInterval as xe, setMonth as re, setYear as ne, endOfDay as U, startOfYear as Te, subDays as ue, setHours as J, setMinutes as se, setSeconds as ye } from "date-fns";
6
- import { IconChevronLeft as Ae, IconChevronRight as He, IconCalendarEvent as we, IconClock as Oe, IconCalendarClock as De } from "@tabler/icons-react";
5
+ import { format as D, startOfMonth as q, endOfMonth as ge, startOfWeek as Ce, endOfWeek as Ye, addDays as J, subMonths as me, addMonths as se, isSameMonth as xe, isSameDay as X, lastDayOfMonth as Re, isBefore as ee, startOfDay as B, isAfter as te, isWithinInterval as ye, setMonth as re, setYear as oe, endOfDay as _, startOfYear as Te, subDays as fe, setHours as G, setMinutes as ne, setSeconds as Me } from "date-fns";
6
+ import { IconChevronLeft as He, IconChevronRight as Ae, IconCalendarEvent as ve, IconClock as De, IconCalendarClock as Oe } from "@tabler/icons-react";
7
+ import { Icon as K } from "../ui/icon.js";
7
8
  import { cn as y } from "../ui/lib/utils.js";
8
- import { Popover as ce, PopoverTrigger as oe, PopoverContent as ae } from "../ui/popover.js";
9
- const Ee = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], Q = h.forwardRef(
9
+ import { Popover as ae, PopoverTrigger as ce, PopoverContent as le } from "../ui/popover.js";
10
+ const Ee = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], Q = g.forwardRef(
10
11
  function({
11
12
  currentMonth: e,
12
- selected: n,
13
- rangeStart: a,
14
- rangeEnd: d,
15
- hoverDate: g,
16
- onSelect: b,
13
+ selected: u,
14
+ rangeStart: c,
15
+ rangeEnd: i,
16
+ hoverDate: p,
17
+ onSelect: h,
17
18
  onHover: f,
18
19
  onMonthChange: x,
19
20
  onHeaderClick: k,
20
- disabledDates: P,
21
+ disabledDates: S,
21
22
  minDate: M,
22
23
  maxDate: w,
23
- hidePrevNav: T,
24
- hideNextNav: N,
25
- events: A,
26
- className: Y,
27
- ...R
24
+ hidePrevNav: R,
25
+ hideNextNav: v,
26
+ events: T,
27
+ className: C,
28
+ ...Y
28
29
  }, m) {
29
- const O = h.useRef(null), H = h.useMemo(() => {
30
- const c = /* @__PURE__ */ new Map();
31
- if (!A) return c;
32
- for (const s of A) {
33
- const l = D(s.date, "yyyy-MM-dd"), r = c.get(l) ?? [];
34
- r.push(s), c.set(l, r);
30
+ const A = g.useRef(null), H = g.useMemo(() => {
31
+ const r = /* @__PURE__ */ new Map();
32
+ if (!T) return r;
33
+ for (const s of T) {
34
+ const a = D(s.date, "yyyy-MM-dd"), n = r.get(a) ?? [];
35
+ n.push(s), r.set(a, n);
35
36
  }
36
- return c;
37
- }, [A]), E = z(e), S = me(e), $ = Se(E), G = Ye(S), L = [];
38
- let j = $;
39
- for (; j <= G; )
40
- L.push(j), j = _(j, 1);
41
- const I = (c) => !!(P != null && P(c) || M && C(c, K(M)) || w && ee(c, K(w))), B = (c) => {
42
- if (a && d) {
43
- const s = C(a, d) ? a : d, l = ee(d, a) ? d : a;
44
- return xe(c, { start: s, end: l });
37
+ return r;
38
+ }, [T]), O = q(e), P = ge(e), E = Ce(O), W = Ye(P), j = [];
39
+ let $ = E;
40
+ for (; $ <= W; )
41
+ j.push($), $ = J($, 1);
42
+ const I = (r) => !!(S?.(r) || M && ee(r, B(M)) || w && te(r, B(w))), F = (r) => {
43
+ if (c && i) {
44
+ const s = ee(c, i) ? c : i, a = te(i, c) ? i : c;
45
+ return ye(r, { start: s, end: a });
45
46
  }
46
- if (a && g) {
47
- const s = C(a, g) ? a : g, l = ee(g, a) ? g : a;
48
- return xe(c, { start: s, end: l });
47
+ if (c && p) {
48
+ const s = ee(c, p) ? c : p, a = te(p, c) ? p : c;
49
+ return ye(r, { start: s, end: a });
49
50
  }
50
51
  return !1;
51
- }, V = (c) => !!(a && X(c, a) || d && X(c, d)), F = (c) => {
52
- if (!O.current) return;
53
- const s = D(c, "yyyy-MM-dd"), l = O.current.querySelector(
52
+ }, z = (r) => !!(c && X(r, c) || i && X(r, i)), L = (r) => {
53
+ if (!A.current) return;
54
+ const s = D(r, "yyyy-MM-dd"), a = A.current.querySelector(
54
55
  `[data-date="${s}"]`
55
56
  );
56
- l ? l.focus() : x(z(c));
57
- }, W = (c) => {
58
- const l = c.target.getAttribute("data-date");
59
- if (!l) return;
60
- const r = /* @__PURE__ */ new Date(l + "T00:00:00");
57
+ a ? a.focus() : x(q(r));
58
+ }, V = (r) => {
59
+ const a = r.target.getAttribute("data-date");
60
+ if (!a) return;
61
+ const n = /* @__PURE__ */ new Date(a + "T00:00:00");
61
62
  let o = null;
62
- switch (c.key) {
63
+ switch (r.key) {
63
64
  case "ArrowLeft":
64
- o = _(r, -1);
65
+ o = J(n, -1);
65
66
  break;
66
67
  case "ArrowRight":
67
- o = _(r, 1);
68
+ o = J(n, 1);
68
69
  break;
69
70
  case "ArrowUp":
70
- o = _(r, -7);
71
+ o = J(n, -7);
71
72
  break;
72
73
  case "ArrowDown":
73
- o = _(r, 7);
74
+ o = J(n, 7);
74
75
  break;
75
76
  case "Home":
76
- o = z(r);
77
+ o = q(n);
77
78
  break;
78
79
  case "End":
79
- o = Re(r);
80
+ o = Re(n);
80
81
  break;
81
82
  case "Enter":
82
83
  case " ": {
83
- c.preventDefault(), !I(r) && ge(r, e) && b(r);
84
+ r.preventDefault(), !I(n) && xe(n, e) && h(n);
84
85
  return;
85
86
  }
86
87
  default:
87
88
  return;
88
89
  }
89
- o && (c.preventDefault(), F(o));
90
+ o && (r.preventDefault(), L(o));
90
91
  };
91
- return /* @__PURE__ */ p("div", { ref: m, ...R, className: y("w-[252px]", Y), children: [
92
- /* @__PURE__ */ p("div", { className: "flex items-center justify-between px-ds-02 pb-ds-04", children: [
93
- T ? /* @__PURE__ */ t("span", { className: "h-ds-xs-plus w-ds-xs-plus" }) : /* @__PURE__ */ t(
92
+ return /* @__PURE__ */ b("div", { ref: m, ...Y, className: y("w-[252px]", C), children: [
93
+ /* @__PURE__ */ b("div", { className: "flex items-center justify-between px-ds-02 pb-ds-04", children: [
94
+ R ? /* @__PURE__ */ t("span", { className: "h-ds-xs-plus w-ds-xs-plus" }) : /* @__PURE__ */ t(
94
95
  "button",
95
96
  {
96
97
  type: "button",
97
- onClick: () => x(be(e, 1)),
98
+ onClick: () => x(me(e, 1)),
98
99
  className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors duration-fast-01 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9",
99
100
  "aria-label": "Previous month",
100
- children: /* @__PURE__ */ t(Ae, { className: "h-ico-sm w-ico-sm", stroke: 1.5 })
101
+ children: /* @__PURE__ */ t(K, { icon: He, size: "sm", stroke: "light" })
101
102
  }
102
103
  ),
103
104
  /* @__PURE__ */ t(
@@ -113,73 +114,73 @@ const Ee = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], Q = h.forwardRef(
113
114
  children: D(e, "MMMM yyyy")
114
115
  }
115
116
  ),
116
- N ? /* @__PURE__ */ t("span", { className: "h-ds-xs-plus w-ds-xs-plus" }) : /* @__PURE__ */ t(
117
+ v ? /* @__PURE__ */ t("span", { className: "h-ds-xs-plus w-ds-xs-plus" }) : /* @__PURE__ */ t(
117
118
  "button",
118
119
  {
119
120
  type: "button",
120
- onClick: () => x(te(e, 1)),
121
+ onClick: () => x(se(e, 1)),
121
122
  className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors duration-fast-01 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9",
122
123
  "aria-label": "Next month",
123
- children: /* @__PURE__ */ t(He, { className: "h-ico-sm w-ico-sm", stroke: 1.5 })
124
+ children: /* @__PURE__ */ t(K, { icon: Ae, size: "sm", stroke: "light" })
124
125
  }
125
126
  )
126
127
  ] }),
127
- /* @__PURE__ */ p(
128
+ /* @__PURE__ */ b(
128
129
  "div",
129
130
  {
130
- ref: O,
131
+ ref: A,
131
132
  className: "grid grid-cols-7 gap-0",
132
133
  role: "grid",
133
134
  tabIndex: 0,
134
135
  "aria-label": "Calendar",
135
- onKeyDown: W,
136
+ onKeyDown: V,
136
137
  children: [
137
- Ee.map((c) => /* @__PURE__ */ t(
138
+ Ee.map((r) => /* @__PURE__ */ t(
138
139
  "div",
139
140
  {
140
141
  role: "columnheader",
141
142
  className: "flex h-ds-sm items-center justify-center text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle",
142
- children: c
143
+ children: r
143
144
  },
144
- c
145
+ r
145
146
  )),
146
- L.map((c, s) => {
147
- const l = ge(c, e), r = I(c), o = n && X(c, n), i = B(c), v = V(c), de = X(c, /* @__PURE__ */ new Date()), he = D(c, "yyyy-MM-dd"), pe = H.get(he) ?? [];
148
- return /* @__PURE__ */ p(
147
+ j.map((r, s) => {
148
+ const a = xe(r, e), n = I(r), o = u && X(r, u), l = F(r), N = z(r), ue = X(r, /* @__PURE__ */ new Date()), be = D(r, "yyyy-MM-dd"), pe = H.get(be) ?? [];
149
+ return /* @__PURE__ */ b(
149
150
  "button",
150
151
  {
151
152
  type: "button",
152
153
  role: "gridcell",
153
- "data-date": he,
154
- tabIndex: l && !r ? 0 : -1,
155
- disabled: !l || r,
154
+ "data-date": be,
155
+ tabIndex: a && !n ? 0 : -1,
156
+ disabled: !a || n,
156
157
  onClick: () => {
157
- l && !r && b(c);
158
+ a && !n && h(r);
158
159
  },
159
- onMouseEnter: () => f == null ? void 0 : f(c),
160
- onMouseLeave: () => f == null ? void 0 : f(null),
161
- "aria-label": D(c, "EEEE, MMMM d, yyyy"),
162
- "aria-selected": o || v || void 0,
163
- "aria-disabled": !l || r || void 0,
160
+ onMouseEnter: () => f?.(r),
161
+ onMouseLeave: () => f?.(null),
162
+ "aria-label": D(r, "EEEE, MMMM d, yyyy"),
163
+ "aria-selected": o || N || void 0,
164
+ "aria-disabled": !a || n || void 0,
164
165
  className: y(
165
166
  "relative flex h-ds-sm w-ds-sm-plus items-center justify-center rounded-ds-md text-ds-md font-body transition-colors duration-fast-01 ease-productive-standard",
166
- !l && "pointer-events-none opacity-0",
167
- l && r && "opacity-action-disabled pointer-events-none cursor-not-allowed",
168
- l && !r && !o && !v && !i && "text-surface-fg hover:bg-surface-raised-hover",
169
- i && !v && "rounded-ds-none bg-surface-raised-hover text-surface-fg",
170
- (o || v) && "bg-accent-9 text-accent-fg hover:bg-accent-10",
171
- de && !o && !v && !r && "font-semibold text-accent-11"
167
+ !a && "pointer-events-none opacity-0",
168
+ a && n && "opacity-action-disabled pointer-events-none cursor-not-allowed",
169
+ a && !n && !o && !N && !l && "text-surface-fg hover:bg-surface-raised-hover",
170
+ l && !N && "rounded-ds-none bg-surface-raised-hover text-surface-fg",
171
+ (o || N) && "bg-accent-9 text-accent-fg hover:bg-accent-10",
172
+ ue && !o && !N && !n && "font-semibold text-accent-11"
172
173
  ),
173
174
  children: [
174
- D(c, "d"),
175
- pe.length > 0 && /* @__PURE__ */ t("span", { className: "flex gap-px justify-center absolute bottom-[2px] left-0 right-0", children: pe.slice(0, 3).map((ve, ke) => /* @__PURE__ */ t(
175
+ D(r, "d"),
176
+ pe.length > 0 && /* @__PURE__ */ t("span", { className: "flex gap-px justify-center absolute bottom-[2px] left-0 right-0", children: pe.slice(0, 3).map((ke, Se) => /* @__PURE__ */ t(
176
177
  "span",
177
178
  {
178
179
  "data-event-dot": !0,
179
180
  className: "h-[4px] w-[4px] rounded-ds-full",
180
- style: { backgroundColor: ve.color ?? "var(--color-accent-9)" }
181
+ style: { backgroundColor: ke.color ?? "var(--color-accent-9)" }
181
182
  },
182
- ke
183
+ Se
183
184
  )) })
184
185
  ]
185
186
  },
@@ -193,36 +194,36 @@ const Ee = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], Q = h.forwardRef(
193
194
  }
194
195
  );
195
196
  Q.displayName = "CalendarGrid";
196
- const le = h.forwardRef(
197
+ const ie = g.forwardRef(
197
198
  function({
198
199
  currentYear: e,
199
- selectedYear: n,
200
- onYearSelect: a,
201
- minDate: d,
202
- maxDate: g,
203
- className: b,
200
+ selectedYear: u,
201
+ onYearSelect: c,
202
+ minDate: i,
203
+ maxDate: p,
204
+ className: h,
204
205
  ...f
205
206
  }, x) {
206
- const k = Math.floor(e / 10) * 10, P = Array.from({ length: 12 }, (M, w) => k + w);
207
- return /* @__PURE__ */ p("div", { ref: x, ...f, className: y("w-[252px]", b), children: [
208
- /* @__PURE__ */ p("div", { className: "text-center pb-ds-04 text-ds-md font-semibold text-surface-fg", children: [
207
+ const k = Math.floor(e / 10) * 10, S = Array.from({ length: 12 }, (M, w) => k + w);
208
+ return /* @__PURE__ */ b("div", { ref: x, ...f, className: y("w-[252px]", h), children: [
209
+ /* @__PURE__ */ b("div", { className: "text-center pb-ds-04 text-ds-md font-semibold text-surface-fg", children: [
209
210
  k,
210
211
  " – ",
211
212
  k + 11
212
213
  ] }),
213
- /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-ds-02", children: P.map((M) => {
214
- const w = M === n, T = d != null && M < d.getFullYear() || g != null && M > g.getFullYear();
214
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-ds-02", children: S.map((M) => {
215
+ const w = M === u, R = i != null && M < i.getFullYear() || p != null && M > p.getFullYear();
215
216
  return /* @__PURE__ */ t(
216
217
  "button",
217
218
  {
218
219
  type: "button",
219
- disabled: T || !1,
220
- onClick: () => !T && a(M),
220
+ disabled: R || !1,
221
+ onClick: () => !R && c(M),
221
222
  className: y(
222
223
  "h-ds-sm-plus rounded-ds-md text-ds-md transition-colors",
223
- T && "opacity-action-disabled pointer-events-none cursor-not-allowed",
224
+ R && "opacity-action-disabled pointer-events-none cursor-not-allowed",
224
225
  w && "bg-accent-9 text-accent-fg",
225
- !w && !T && "hover:bg-surface-raised-hover text-surface-fg"
226
+ !w && !R && "hover:bg-surface-raised-hover text-surface-fg"
226
227
  ),
227
228
  children: M
228
229
  },
@@ -232,7 +233,7 @@ const le = h.forwardRef(
232
233
  ] });
233
234
  }
234
235
  );
235
- le.displayName = "YearPicker";
236
+ ie.displayName = "YearPicker";
236
237
  const $e = [
237
238
  "Jan",
238
239
  "Feb",
@@ -246,26 +247,26 @@ const $e = [
246
247
  "Oct",
247
248
  "Nov",
248
249
  "Dec"
249
- ], ie = h.forwardRef(
250
+ ], de = g.forwardRef(
250
251
  function({
251
252
  currentYear: e,
252
- selectedMonth: n,
253
- onMonthSelect: a,
254
- minDate: d,
255
- maxDate: g,
256
- className: b,
253
+ selectedMonth: u,
254
+ onMonthSelect: c,
255
+ minDate: i,
256
+ maxDate: p,
257
+ className: h,
257
258
  ...f
258
259
  }, x) {
259
- return /* @__PURE__ */ p("div", { ref: x, ...f, className: y("w-[252px]", b), children: [
260
+ return /* @__PURE__ */ b("div", { ref: x, ...f, className: y("w-[252px]", h), children: [
260
261
  /* @__PURE__ */ t("div", { className: "text-center pb-ds-04 text-ds-md font-semibold text-surface-fg", children: e }),
261
- /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-ds-02", children: $e.map((k, P) => {
262
- const M = P === n, w = d != null && (e < d.getFullYear() || e === d.getFullYear() && P < d.getMonth()) || g != null && (e > g.getFullYear() || e === g.getFullYear() && P > g.getMonth());
262
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-ds-02", children: $e.map((k, S) => {
263
+ const M = S === u, w = i != null && (e < i.getFullYear() || e === i.getFullYear() && S < i.getMonth()) || p != null && (e > p.getFullYear() || e === p.getFullYear() && S > p.getMonth());
263
264
  return /* @__PURE__ */ t(
264
265
  "button",
265
266
  {
266
267
  type: "button",
267
268
  disabled: w || !1,
268
- onClick: () => !w && a(P),
269
+ onClick: () => !w && c(S),
269
270
  className: y(
270
271
  "h-ds-sm-plus rounded-ds-md text-ds-md transition-colors",
271
272
  w && "opacity-action-disabled pointer-events-none cursor-not-allowed",
@@ -280,54 +281,54 @@ const $e = [
280
281
  ] });
281
282
  }
282
283
  );
283
- ie.displayName = "MonthPicker";
284
- const je = h.forwardRef(
284
+ de.displayName = "MonthPicker";
285
+ const Ie = g.forwardRef(
285
286
  function({
286
287
  value: e,
287
- onChange: n,
288
- placeholder: a = "Pick a date",
289
- className: d,
290
- formatStr: g = "MMM d, yyyy",
291
- minDate: b,
288
+ onChange: u,
289
+ placeholder: c = "Pick a date",
290
+ className: i,
291
+ formatStr: p = "MMM d, yyyy",
292
+ minDate: h,
292
293
  maxDate: f,
293
294
  disabledDates: x,
294
295
  ...k
295
- }, P) {
296
- const [M, w] = h.useState(!1), [T, N] = h.useState(
296
+ }, S) {
297
+ const [M, w] = g.useState(!1), [R, v] = g.useState(
297
298
  e ?? /* @__PURE__ */ new Date()
298
- ), [A, Y] = h.useState("days");
299
- h.useEffect(() => {
300
- M || Y("days");
299
+ ), [T, C] = g.useState("days");
300
+ g.useEffect(() => {
301
+ M || C("days");
301
302
  }, [M]);
302
- const R = (S) => {
303
- n == null || n(S), w(!1);
303
+ const Y = (P) => {
304
+ u?.(P), w(!1);
304
305
  }, m = () => {
305
- Y((S) => S === "days" ? "months" : "years");
306
- }, O = (S) => {
307
- N(($) => re($, S)), Y("days");
308
- }, H = (S) => {
309
- N(($) => ne($, S)), Y("months");
310
- }, E = () => {
311
- switch (A) {
306
+ C((P) => P === "days" ? "months" : "years");
307
+ }, A = (P) => {
308
+ v((E) => re(E, P)), C("days");
309
+ }, H = (P) => {
310
+ v((E) => oe(E, P)), C("months");
311
+ }, O = () => {
312
+ switch (T) {
312
313
  case "years":
313
314
  return /* @__PURE__ */ t(
314
- le,
315
+ ie,
315
316
  {
316
- currentYear: T.getFullYear(),
317
- selectedYear: e == null ? void 0 : e.getFullYear(),
317
+ currentYear: R.getFullYear(),
318
+ selectedYear: e?.getFullYear(),
318
319
  onYearSelect: H,
319
- minDate: b,
320
+ minDate: h,
320
321
  maxDate: f
321
322
  }
322
323
  );
323
324
  case "months":
324
325
  return /* @__PURE__ */ t(
325
- ie,
326
+ de,
326
327
  {
327
- currentYear: T.getFullYear(),
328
- selectedMonth: e == null ? void 0 : e.getMonth(),
329
- onMonthSelect: O,
330
- minDate: b,
328
+ currentYear: R.getFullYear(),
329
+ selectedMonth: e?.getMonth(),
330
+ onMonthSelect: A,
331
+ minDate: h,
331
332
  maxDate: f
332
333
  }
333
334
  );
@@ -335,40 +336,34 @@ const je = h.forwardRef(
335
336
  return /* @__PURE__ */ t(
336
337
  Q,
337
338
  {
338
- currentMonth: T,
339
+ currentMonth: R,
339
340
  selected: e,
340
- onSelect: R,
341
- onMonthChange: N,
341
+ onSelect: Y,
342
+ onMonthChange: v,
342
343
  onHeaderClick: m,
343
344
  disabledDates: x,
344
- minDate: b,
345
+ minDate: h,
345
346
  maxDate: f
346
347
  }
347
348
  );
348
349
  }
349
350
  };
350
- return /* @__PURE__ */ p(ce, { open: M, onOpenChange: w, children: [
351
- /* @__PURE__ */ t(oe, { asChild: !0, children: /* @__PURE__ */ p(
351
+ return /* @__PURE__ */ b(ae, { open: M, onOpenChange: w, children: [
352
+ /* @__PURE__ */ t(ce, { asChild: !0, children: /* @__PURE__ */ b(
352
353
  "button",
353
354
  {
354
- ref: P,
355
+ ref: S,
355
356
  type: "button",
356
- "aria-label": e ? `Change date, ${D(e, g)}` : a,
357
+ "aria-label": e ? `Change date, ${D(e, p)}` : c,
357
358
  ...k,
358
359
  className: y(
359
360
  "inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
360
361
  "hover:border-surface-border-strong",
361
362
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
362
- d
363
+ i
363
364
  ),
364
365
  children: [
365
- /* @__PURE__ */ t(
366
- we,
367
- {
368
- className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
369
- stroke: 1.5
370
- }
371
- ),
366
+ /* @__PURE__ */ t(K, { icon: ve, size: "sm", stroke: "light", className: "text-surface-fg-subtle" }),
372
367
  /* @__PURE__ */ t(
373
368
  "span",
374
369
  {
@@ -376,86 +371,86 @@ const je = h.forwardRef(
376
371
  "text-ds-md",
377
372
  e ? "text-surface-fg" : "text-surface-fg-subtle"
378
373
  ),
379
- children: e ? D(e, g) : a
374
+ children: e ? D(e, p) : c
380
375
  }
381
376
  )
382
377
  ]
383
378
  }
384
379
  ) }),
385
380
  /* @__PURE__ */ t(
386
- ae,
381
+ le,
387
382
  {
388
383
  className: "w-auto border-surface-border-strong bg-surface-overlay p-ds-04",
389
384
  align: "start",
390
385
  sideOffset: 4,
391
- children: E()
386
+ children: O()
392
387
  }
393
388
  )
394
389
  ] });
395
390
  }
396
391
  );
397
- je.displayName = "DatePicker";
398
- const Ie = {
392
+ Ie.displayName = "DatePicker";
393
+ const je = {
399
394
  today: {
400
395
  label: "Today",
401
396
  getRange: () => {
402
- const u = /* @__PURE__ */ new Date();
403
- return { start: K(u), end: U(u) };
397
+ const d = /* @__PURE__ */ new Date();
398
+ return { start: B(d), end: _(d) };
404
399
  }
405
400
  },
406
401
  yesterday: {
407
402
  label: "Yesterday",
408
403
  getRange: () => {
409
- const u = ue(/* @__PURE__ */ new Date(), 1);
410
- return { start: K(u), end: U(u) };
404
+ const d = fe(/* @__PURE__ */ new Date(), 1);
405
+ return { start: B(d), end: _(d) };
411
406
  }
412
407
  },
413
408
  last7days: {
414
409
  label: "Last 7 days",
415
410
  getRange: () => {
416
- const u = /* @__PURE__ */ new Date();
417
- return { start: K(ue(u, 6)), end: U(u) };
411
+ const d = /* @__PURE__ */ new Date();
412
+ return { start: B(fe(d, 6)), end: _(d) };
418
413
  }
419
414
  },
420
415
  last30days: {
421
416
  label: "Last 30 days",
422
417
  getRange: () => {
423
- const u = /* @__PURE__ */ new Date();
424
- return { start: K(ue(u, 29)), end: U(u) };
418
+ const d = /* @__PURE__ */ new Date();
419
+ return { start: B(fe(d, 29)), end: _(d) };
425
420
  }
426
421
  },
427
422
  thisMonth: {
428
423
  label: "This month",
429
424
  getRange: () => {
430
- const u = /* @__PURE__ */ new Date();
431
- return { start: z(u), end: me(u) };
425
+ const d = /* @__PURE__ */ new Date();
426
+ return { start: q(d), end: ge(d) };
432
427
  }
433
428
  },
434
429
  lastMonth: {
435
430
  label: "Last month",
436
431
  getRange: () => {
437
- const e = be(/* @__PURE__ */ new Date(), 1);
438
- return { start: z(e), end: me(e) };
432
+ const e = me(/* @__PURE__ */ new Date(), 1);
433
+ return { start: q(e), end: ge(e) };
439
434
  }
440
435
  },
441
436
  thisYear: {
442
437
  label: "This year",
443
438
  getRange: () => {
444
- const u = /* @__PURE__ */ new Date();
445
- return { start: Te(u), end: U(u) };
439
+ const d = /* @__PURE__ */ new Date();
440
+ return { start: Te(d), end: _(d) };
446
441
  }
447
442
  }
448
- }, Ne = h.forwardRef(
449
- function({ presets: e, onSelect: n, className: a, ...d }, g) {
450
- return /* @__PURE__ */ t("div", { ref: g, ...d, className: y("flex flex-col gap-ds-01", a), children: e.map((b) => {
451
- const f = Ie[b];
443
+ }, Ne = g.forwardRef(
444
+ function({ presets: e, onSelect: u, className: c, ...i }, p) {
445
+ return /* @__PURE__ */ t("div", { ref: p, ...i, className: y("flex flex-col gap-ds-01", c), children: e.map((h) => {
446
+ const f = je[h];
452
447
  return f ? /* @__PURE__ */ t(
453
448
  "button",
454
449
  {
455
450
  type: "button",
456
451
  onClick: () => {
457
452
  const { start: x, end: k } = f.getRange();
458
- n(x, k);
453
+ u(x, k);
459
454
  },
460
455
  className: y(
461
456
  "h-ds-sm w-full rounded-ds-md px-ds-03 text-left text-ds-sm",
@@ -465,109 +460,109 @@ const Ie = {
465
460
  ),
466
461
  children: f.label
467
462
  },
468
- b
463
+ h
469
464
  ) : null;
470
465
  }) });
471
466
  }
472
467
  );
473
468
  Ne.displayName = "Presets";
474
- const Le = h.forwardRef(
469
+ const ze = g.forwardRef(
475
470
  function({
476
471
  startDate: e,
477
- endDate: n,
478
- onChange: a,
479
- placeholder: d = "Pick a date range",
480
- className: g,
481
- formatStr: b = "MMM d, yyyy",
472
+ endDate: u,
473
+ onChange: c,
474
+ placeholder: i = "Pick a date range",
475
+ className: p,
476
+ formatStr: h = "MMM d, yyyy",
482
477
  minDate: f,
483
478
  maxDate: x,
484
479
  disabledDates: k,
485
- presets: P,
480
+ presets: S,
486
481
  numberOfMonths: M = 1,
487
482
  ...w
488
- }, T) {
489
- const [N, A] = h.useState(!1), [Y, R] = h.useState(
483
+ }, R) {
484
+ const [v, T] = g.useState(!1), [C, Y] = g.useState(
490
485
  e ?? /* @__PURE__ */ new Date()
491
- ), [m, O] = h.useState(
486
+ ), [m, A] = g.useState(
492
487
  e ?? null
493
- ), [H, E] = h.useState(
494
- n ?? null
495
- ), [S, $] = h.useState(null), [G, L] = h.useState("days"), j = Math.max(1, M);
496
- h.useEffect(() => {
497
- O(e ?? null), E(n ?? null);
498
- }, [e, n]), h.useEffect(() => {
499
- N || L("days");
500
- }, [N]);
488
+ ), [H, O] = g.useState(
489
+ u ?? null
490
+ ), [P, E] = g.useState(null), [W, j] = g.useState("days"), $ = Math.max(1, M);
491
+ g.useEffect(() => {
492
+ A(e ?? null), O(u ?? null);
493
+ }, [e, u]), g.useEffect(() => {
494
+ v || j("days");
495
+ }, [v]);
501
496
  const I = (o) => {
502
497
  if (!m || m && H)
503
- O(o), E(null);
498
+ A(o), O(null);
504
499
  else {
505
- const i = C(o, m) ? o : m, v = ee(o, m) ? o : m;
506
- O(i), E(v), a == null || a({ start: i, end: v }), A(!1);
500
+ const l = ee(o, m) ? o : m, N = te(o, m) ? o : m;
501
+ A(l), O(N), c?.({ start: l, end: N }), T(!1);
507
502
  }
508
- }, B = (o, i) => {
509
- O(o), E(i), a == null || a({ start: o, end: i }), A(!1);
510
- }, V = () => {
511
- L((o) => o === "days" ? "months" : "years");
512
- }, F = (o) => {
513
- R((i) => re(i, o)), L("days");
514
- }, W = (o) => {
515
- R((i) => ne(i, o)), L("months");
516
- }, c = () => m && H ? `${D(m, b)} - ${D(H, b)}` : d, s = () => j === 1 ? /* @__PURE__ */ t(
503
+ }, F = (o, l) => {
504
+ A(o), O(l), c?.({ start: o, end: l }), T(!1);
505
+ }, z = () => {
506
+ j((o) => o === "days" ? "months" : "years");
507
+ }, L = (o) => {
508
+ Y((l) => re(l, o)), j("days");
509
+ }, V = (o) => {
510
+ Y((l) => oe(l, o)), j("months");
511
+ }, r = () => m && H ? `${D(m, h)} - ${D(H, h)}` : i, s = () => $ === 1 ? /* @__PURE__ */ t(
517
512
  Q,
518
513
  {
519
- currentMonth: Y,
514
+ currentMonth: C,
520
515
  rangeStart: m,
521
516
  rangeEnd: H,
522
- hoverDate: S,
517
+ hoverDate: P,
523
518
  onSelect: I,
524
- onHover: $,
525
- onMonthChange: R,
526
- onHeaderClick: V,
519
+ onHover: E,
520
+ onMonthChange: Y,
521
+ onHeaderClick: z,
527
522
  disabledDates: k,
528
523
  minDate: f,
529
524
  maxDate: x
530
525
  }
531
- ) : /* @__PURE__ */ t("div", { className: "flex flex-row gap-ds-04", children: Array.from({ length: j }, (o, i) => /* @__PURE__ */ t(
526
+ ) : /* @__PURE__ */ t("div", { className: "flex flex-row gap-ds-04", children: Array.from({ length: $ }, (o, l) => /* @__PURE__ */ t(
532
527
  Q,
533
528
  {
534
- currentMonth: te(Y, i),
529
+ currentMonth: se(C, l),
535
530
  rangeStart: m,
536
531
  rangeEnd: H,
537
- hoverDate: S,
532
+ hoverDate: P,
538
533
  onSelect: I,
539
- onHover: $,
540
- onMonthChange: (v) => {
541
- R(te(v, -i));
534
+ onHover: E,
535
+ onMonthChange: (N) => {
536
+ Y(se(N, -l));
542
537
  },
543
- onHeaderClick: V,
538
+ onHeaderClick: z,
544
539
  disabledDates: k,
545
540
  minDate: f,
546
541
  maxDate: x,
547
- hidePrevNav: i > 0,
548
- hideNextNav: i < j - 1
542
+ hidePrevNav: l > 0,
543
+ hideNextNav: l < $ - 1
549
544
  },
550
- i
551
- )) }), l = () => {
552
- switch (G) {
545
+ l
546
+ )) }), a = () => {
547
+ switch (W) {
553
548
  case "years":
554
549
  return /* @__PURE__ */ t(
555
- le,
550
+ ie,
556
551
  {
557
- currentYear: Y.getFullYear(),
558
- selectedYear: m == null ? void 0 : m.getFullYear(),
559
- onYearSelect: W,
552
+ currentYear: C.getFullYear(),
553
+ selectedYear: m?.getFullYear(),
554
+ onYearSelect: V,
560
555
  minDate: f,
561
556
  maxDate: x
562
557
  }
563
558
  );
564
559
  case "months":
565
560
  return /* @__PURE__ */ t(
566
- ie,
561
+ de,
567
562
  {
568
- currentYear: Y.getFullYear(),
569
- selectedMonth: m == null ? void 0 : m.getMonth(),
570
- onMonthSelect: F,
563
+ currentYear: C.getFullYear(),
564
+ selectedMonth: m?.getMonth(),
565
+ onMonthSelect: L,
571
566
  minDate: f,
572
567
  maxDate: x
573
568
  }
@@ -575,29 +570,23 @@ const Le = h.forwardRef(
575
570
  default:
576
571
  return s();
577
572
  }
578
- }, r = P && P.length > 0;
579
- return /* @__PURE__ */ p(ce, { open: N, onOpenChange: A, children: [
580
- /* @__PURE__ */ t(oe, { asChild: !0, children: /* @__PURE__ */ p(
573
+ }, n = S && S.length > 0;
574
+ return /* @__PURE__ */ b(ae, { open: v, onOpenChange: T, children: [
575
+ /* @__PURE__ */ t(ce, { asChild: !0, children: /* @__PURE__ */ b(
581
576
  "button",
582
577
  {
583
- ref: T,
578
+ ref: R,
584
579
  type: "button",
585
- "aria-label": m && H ? `Change date range, ${c()}` : d,
580
+ "aria-label": m && H ? `Change date range, ${r()}` : i,
586
581
  ...w,
587
582
  className: y(
588
583
  "inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
589
584
  "hover:border-surface-border-strong",
590
585
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
591
- g
586
+ p
592
587
  ),
593
588
  children: [
594
- /* @__PURE__ */ t(
595
- we,
596
- {
597
- className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
598
- stroke: 1.5
599
- }
600
- ),
589
+ /* @__PURE__ */ t(K, { icon: ve, size: "sm", stroke: "light", className: "text-surface-fg-subtle" }),
601
590
  /* @__PURE__ */ t(
602
591
  "span",
603
592
  {
@@ -605,85 +594,85 @@ const Le = h.forwardRef(
605
594
  "text-ds-md",
606
595
  m && H ? "text-surface-fg" : "text-surface-fg-subtle"
607
596
  ),
608
- children: c()
597
+ children: r()
609
598
  }
610
599
  )
611
600
  ]
612
601
  }
613
602
  ) }),
614
603
  /* @__PURE__ */ t(
615
- ae,
604
+ le,
616
605
  {
617
606
  className: "w-auto border-surface-border-strong bg-surface-overlay p-ds-04",
618
607
  align: "start",
619
608
  sideOffset: 4,
620
- children: r ? /* @__PURE__ */ p("div", { className: "flex flex-row gap-ds-04", children: [
621
- /* @__PURE__ */ t("div", { className: "min-w-[140px] border-r border-surface-border-strong pr-ds-04", children: /* @__PURE__ */ t(Ne, { presets: P, onSelect: B }) }),
622
- /* @__PURE__ */ t("div", { children: l() })
623
- ] }) : l()
609
+ children: n ? /* @__PURE__ */ b("div", { className: "flex flex-row gap-ds-04", children: [
610
+ /* @__PURE__ */ t("div", { className: "min-w-[140px] border-r border-surface-border-strong pr-ds-04", children: /* @__PURE__ */ t(Ne, { presets: S, onSelect: F }) }),
611
+ /* @__PURE__ */ t("div", { children: a() })
612
+ ] }) : a()
624
613
  }
625
614
  )
626
615
  ] });
627
616
  }
628
617
  );
629
- Le.displayName = "DateRangePicker";
630
- function Z(u, e, n) {
631
- const a = [];
632
- for (let d = u; d <= e; d += n)
633
- a.push(d);
634
- return a;
618
+ ze.displayName = "DateRangePicker";
619
+ function Z(d, e, u) {
620
+ const c = [];
621
+ for (let i = d; i <= e; i += u)
622
+ c.push(i);
623
+ return c;
635
624
  }
636
- function q(u) {
637
- return u.toString().padStart(2, "0");
625
+ function U(d) {
626
+ return d.toString().padStart(2, "0");
638
627
  }
639
- const Ve = h.forwardRef(
628
+ const Le = g.forwardRef(
640
629
  function({
641
630
  value: e,
642
- onChange: n,
643
- format: a = "12h",
644
- minuteStep: d = 1,
645
- secondStep: g = 1,
646
- showSeconds: b = !1,
631
+ onChange: u,
632
+ format: c = "12h",
633
+ minuteStep: i = 1,
634
+ secondStep: p = 1,
635
+ showSeconds: h = !1,
647
636
  placeholder: f = "Pick a time",
648
637
  className: x,
649
638
  disabled: k = !1,
650
- ...P
639
+ ...S
651
640
  }, M) {
652
- const [w, T] = h.useState(!1), N = e ? e.getHours() : null, A = e ? e.getMinutes() : null, Y = e ? e.getSeconds() : null, R = N !== null ? N >= 12 ? "PM" : "AM" : null, m = N !== null ? N === 0 ? 12 : N > 12 ? N - 12 : N : null, O = a === "12h" ? Z(1, 12, 1) : Z(0, 23, 1), H = Z(0, 59, d), E = Z(0, 59, g), S = (s) => {
653
- const l = e ? new Date(e) : /* @__PURE__ */ new Date();
654
- let r = s.hours ?? l.getHours();
655
- const o = s.minutes ?? l.getMinutes(), i = s.seconds ?? l.getSeconds();
656
- a === "12h" && s.hours !== void 0 && ((s.ampm ?? R ?? "AM") === "AM" ? r = s.hours === 12 ? 0 : s.hours : r = s.hours === 12 ? 12 : s.hours + 12);
657
- let v = J(l, r);
658
- return v = se(v, o), v = ye(v, i), v;
659
- }, $ = (s) => {
660
- const l = S({ hours: s });
661
- n == null || n(l);
662
- }, G = (s) => {
663
- const l = S({ minutes: s });
664
- n == null || n(l);
665
- }, L = (s) => {
666
- const l = S({ seconds: s });
667
- n == null || n(l);
641
+ const [w, R] = g.useState(!1), v = e ? e.getHours() : null, T = e ? e.getMinutes() : null, C = e ? e.getSeconds() : null, Y = v !== null ? v >= 12 ? "PM" : "AM" : null, m = v !== null ? v === 0 ? 12 : v > 12 ? v - 12 : v : null, A = c === "12h" ? Z(1, 12, 1) : Z(0, 23, 1), H = Z(0, 59, i), O = Z(0, 59, p), P = (s) => {
642
+ const a = e ? new Date(e) : /* @__PURE__ */ new Date();
643
+ let n = s.hours ?? a.getHours();
644
+ const o = s.minutes ?? a.getMinutes(), l = s.seconds ?? a.getSeconds();
645
+ c === "12h" && s.hours !== void 0 && ((s.ampm ?? Y ?? "AM") === "AM" ? n = s.hours === 12 ? 0 : s.hours : n = s.hours === 12 ? 12 : s.hours + 12);
646
+ let N = G(a, n);
647
+ return N = ne(N, o), N = Me(N, l), N;
648
+ }, E = (s) => {
649
+ const a = P({ hours: s });
650
+ u?.(a);
651
+ }, W = (s) => {
652
+ const a = P({ minutes: s });
653
+ u?.(a);
668
654
  }, j = (s) => {
655
+ const a = P({ seconds: s });
656
+ u?.(a);
657
+ }, $ = (s) => {
669
658
  if (!e) {
670
659
  const o = s === "AM" ? 0 : 12;
671
- let i = /* @__PURE__ */ new Date();
672
- i = J(i, o), i = se(i, 0), i = ye(i, 0), n == null || n(i);
660
+ let l = /* @__PURE__ */ new Date();
661
+ l = G(l, o), l = ne(l, 0), l = Me(l, 0), u?.(l);
673
662
  return;
674
663
  }
675
- const l = e.getHours();
676
- let r;
677
- s === "AM" ? r = l >= 12 ? l - 12 : l : r = l < 12 ? l + 12 : l, n == null || n(J(new Date(e), r));
678
- }, I = h.useMemo(() => e ? a === "12h" ? D(e, b ? "h:mm:ss a" : "h:mm a") : D(e, b ? "HH:mm:ss" : "HH:mm") : null, [e, a, b]), B = a === "12h" ? m : N, V = "flex flex-col gap-ds-01 overflow-y-auto max-h-[200px] px-ds-01", F = "flex h-ds-sm w-full items-center justify-center rounded-ds-md text-ds-md transition-colors duration-fast-01 ease-productive-standard cursor-pointer", W = "bg-accent-9 text-accent-fg", c = "text-surface-fg hover:bg-surface-raised-hover";
679
- return /* @__PURE__ */ p(ce, { open: w, onOpenChange: T, children: [
680
- /* @__PURE__ */ t(oe, { asChild: !0, children: /* @__PURE__ */ p(
664
+ const a = e.getHours();
665
+ let n;
666
+ s === "AM" ? n = a >= 12 ? a - 12 : a : n = a < 12 ? a + 12 : a, u?.(G(new Date(e), n));
667
+ }, I = g.useMemo(() => e ? c === "12h" ? D(e, h ? "h:mm:ss a" : "h:mm a") : D(e, h ? "HH:mm:ss" : "HH:mm") : null, [e, c, h]), F = c === "12h" ? m : v, z = "flex flex-col gap-ds-01 overflow-y-auto max-h-[200px] px-ds-01", L = "flex h-ds-sm w-full items-center justify-center rounded-ds-md text-ds-md transition-colors duration-fast-01 ease-productive-standard cursor-pointer", V = "bg-accent-9 text-accent-fg", r = "text-surface-fg hover:bg-surface-raised-hover";
668
+ return /* @__PURE__ */ b(ae, { open: w, onOpenChange: R, children: [
669
+ /* @__PURE__ */ t(ce, { asChild: !0, children: /* @__PURE__ */ b(
681
670
  "button",
682
671
  {
683
672
  ref: M,
684
673
  type: "button",
685
674
  disabled: k,
686
- ...P,
675
+ ...S,
687
676
  className: y(
688
677
  "inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
689
678
  "hover:border-surface-border-strong",
@@ -693,13 +682,7 @@ const Ve = h.forwardRef(
693
682
  ),
694
683
  "aria-label": I ? `Selected time: ${I}` : f,
695
684
  children: [
696
- /* @__PURE__ */ t(
697
- Oe,
698
- {
699
- className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
700
- stroke: 1.5
701
- }
702
- ),
685
+ /* @__PURE__ */ t(K, { icon: De, size: "sm", stroke: "light", className: "text-surface-fg-subtle" }),
703
686
  /* @__PURE__ */ t(
704
687
  "span",
705
688
  {
@@ -714,80 +697,80 @@ const Ve = h.forwardRef(
714
697
  }
715
698
  ) }),
716
699
  /* @__PURE__ */ t(
717
- ae,
700
+ le,
718
701
  {
719
702
  className: "w-auto border-surface-border-strong bg-surface-overlay p-ds-04",
720
703
  align: "start",
721
704
  sideOffset: 4,
722
- children: /* @__PURE__ */ p("div", { className: "flex gap-ds-03", role: "group", "aria-label": "Time picker", children: [
723
- /* @__PURE__ */ p("div", { className: "flex flex-col items-center gap-ds-02", children: [
705
+ children: /* @__PURE__ */ b("div", { className: "flex gap-ds-03", role: "group", "aria-label": "Time picker", children: [
706
+ /* @__PURE__ */ b("div", { className: "flex flex-col items-center gap-ds-02", children: [
724
707
  /* @__PURE__ */ t("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: "Hr" }),
725
- /* @__PURE__ */ t("div", { className: y(V, "min-w-[48px]"), children: O.map((s) => /* @__PURE__ */ t(
708
+ /* @__PURE__ */ t("div", { className: y(z, "min-w-[48px]"), children: A.map((s) => /* @__PURE__ */ t(
726
709
  "button",
727
710
  {
728
711
  type: "button",
729
- onClick: () => $(s),
712
+ onClick: () => E(s),
730
713
  className: y(
731
- F,
732
- B === s ? W : c
714
+ L,
715
+ F === s ? V : r
733
716
  ),
734
717
  "aria-label": `${s} hours`,
735
- "aria-selected": B === s || void 0,
736
- children: a === "24h" ? q(s) : s
718
+ "aria-selected": F === s || void 0,
719
+ children: c === "24h" ? U(s) : s
737
720
  },
738
721
  s
739
722
  )) })
740
723
  ] }),
741
- /* @__PURE__ */ p("div", { className: "flex flex-col items-center gap-ds-02", children: [
724
+ /* @__PURE__ */ b("div", { className: "flex flex-col items-center gap-ds-02", children: [
742
725
  /* @__PURE__ */ t("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: "Min" }),
743
- /* @__PURE__ */ t("div", { className: y(V, "min-w-[48px]"), children: H.map((s) => /* @__PURE__ */ t(
726
+ /* @__PURE__ */ t("div", { className: y(z, "min-w-[48px]"), children: H.map((s) => /* @__PURE__ */ t(
744
727
  "button",
745
728
  {
746
729
  type: "button",
747
- onClick: () => G(s),
730
+ onClick: () => W(s),
748
731
  className: y(
749
- F,
750
- A === s ? W : c
732
+ L,
733
+ T === s ? V : r
751
734
  ),
752
- "aria-label": `${q(s)} minutes`,
753
- "aria-selected": A === s || void 0,
754
- children: q(s)
735
+ "aria-label": `${U(s)} minutes`,
736
+ "aria-selected": T === s || void 0,
737
+ children: U(s)
755
738
  },
756
739
  s
757
740
  )) })
758
741
  ] }),
759
- b && /* @__PURE__ */ p("div", { className: "flex flex-col items-center gap-ds-02", children: [
742
+ h && /* @__PURE__ */ b("div", { className: "flex flex-col items-center gap-ds-02", children: [
760
743
  /* @__PURE__ */ t("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: "Sec" }),
761
- /* @__PURE__ */ t("div", { className: y(V, "min-w-[48px]"), children: E.map((s) => /* @__PURE__ */ t(
744
+ /* @__PURE__ */ t("div", { className: y(z, "min-w-[48px]"), children: O.map((s) => /* @__PURE__ */ t(
762
745
  "button",
763
746
  {
764
747
  type: "button",
765
- onClick: () => L(s),
748
+ onClick: () => j(s),
766
749
  className: y(
767
- F,
768
- Y === s ? W : c
750
+ L,
751
+ C === s ? V : r
769
752
  ),
770
- "aria-label": `${q(s)} seconds`,
771
- "aria-selected": Y === s || void 0,
772
- children: q(s)
753
+ "aria-label": `${U(s)} seconds`,
754
+ "aria-selected": C === s || void 0,
755
+ children: U(s)
773
756
  },
774
757
  s
775
758
  )) })
776
759
  ] }),
777
- a === "12h" && /* @__PURE__ */ p("div", { className: "flex flex-col items-center gap-ds-02", children: [
760
+ c === "12h" && /* @__PURE__ */ b("div", { className: "flex flex-col items-center gap-ds-02", children: [
778
761
  /* @__PURE__ */ t("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: " " }),
779
762
  /* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-01 px-ds-01", children: ["AM", "PM"].map((s) => /* @__PURE__ */ t(
780
763
  "button",
781
764
  {
782
765
  type: "button",
783
- onClick: () => j(s),
766
+ onClick: () => $(s),
784
767
  className: y(
785
- F,
768
+ L,
786
769
  "min-w-[44px] font-semibold",
787
- R === s ? W : c
770
+ Y === s ? V : r
788
771
  ),
789
772
  "aria-label": s,
790
- "aria-selected": R === s || void 0,
773
+ "aria-selected": Y === s || void 0,
791
774
  children: s
792
775
  },
793
776
  s
@@ -799,173 +782,167 @@ const Ve = h.forwardRef(
799
782
  ] });
800
783
  }
801
784
  );
802
- Ve.displayName = "TimePicker";
803
- function Me(u) {
804
- return u.toString().padStart(2, "0");
785
+ Le.displayName = "TimePicker";
786
+ function we(d) {
787
+ return d.toString().padStart(2, "0");
805
788
  }
806
- function fe(u, e, n) {
807
- const a = [];
808
- for (let d = u; d <= e; d += n)
809
- a.push(d);
810
- return a;
789
+ function he(d, e, u) {
790
+ const c = [];
791
+ for (let i = d; i <= e; i += u)
792
+ c.push(i);
793
+ return c;
811
794
  }
812
- const Fe = h.forwardRef(
795
+ const Ve = g.forwardRef(
813
796
  function({
814
797
  value: e,
815
- onChange: n,
816
- minDate: a,
817
- maxDate: d,
818
- disabledDates: g,
819
- timeFormat: b = "12h",
798
+ onChange: u,
799
+ minDate: c,
800
+ maxDate: i,
801
+ disabledDates: p,
802
+ timeFormat: h = "12h",
820
803
  minuteStep: f = 1,
821
804
  placeholder: x = "Pick date & time",
822
805
  className: k,
823
- ...P
806
+ ...S
824
807
  }, M) {
825
- const [w, T] = h.useState(!1), [N, A] = h.useState(e ?? /* @__PURE__ */ new Date()), [Y, R] = h.useState("days");
826
- h.useEffect(() => {
827
- w || R("days");
808
+ const [w, R] = g.useState(!1), [v, T] = g.useState(e ?? /* @__PURE__ */ new Date()), [C, Y] = g.useState("days");
809
+ g.useEffect(() => {
810
+ w || Y("days");
828
811
  }, [w]);
829
- const m = e ? e.getHours() : 0, O = e ? e.getMinutes() : 0, H = m >= 12 ? "PM" : "AM", E = m === 0 ? 12 : m > 12 ? m - 12 : m, S = b === "12h" ? fe(1, 12, 1) : fe(0, 23, 1), $ = fe(0, 59, f), G = b === "12h" ? E : m, L = (r) => {
830
- let o = J(r, e ? e.getHours() : m);
831
- o = se(o, e ? e.getMinutes() : O), n == null || n(o);
832
- }, j = () => {
833
- R((r) => r === "days" ? "months" : "years");
834
- }, I = (r) => {
835
- A((o) => re(o, r)), R("days");
836
- }, B = (r) => {
837
- A((o) => ne(o, r)), R("months");
838
- }, V = (r) => {
812
+ const m = e ? e.getHours() : 0, A = e ? e.getMinutes() : 0, H = m >= 12 ? "PM" : "AM", O = m === 0 ? 12 : m > 12 ? m - 12 : m, P = h === "12h" ? he(1, 12, 1) : he(0, 23, 1), E = he(0, 59, f), W = h === "12h" ? O : m, j = (n) => {
813
+ let o = G(n, e ? e.getHours() : m);
814
+ o = ne(o, e ? e.getMinutes() : A), u?.(o);
815
+ }, $ = () => {
816
+ Y((n) => n === "days" ? "months" : "years");
817
+ }, I = (n) => {
818
+ T((o) => re(o, n)), Y("days");
819
+ }, F = (n) => {
820
+ T((o) => oe(o, n)), Y("months");
821
+ }, z = (n) => {
839
822
  const o = e ? new Date(e) : /* @__PURE__ */ new Date();
840
- let i = r;
841
- b === "12h" && ((e ? H : "AM") === "AM" ? i = r === 12 ? 0 : r : i = r === 12 ? 12 : r + 12);
842
- const v = J(o, i);
843
- n == null || n(v);
844
- }, F = (r) => {
845
- const o = e ? new Date(e) : /* @__PURE__ */ new Date(), i = se(o, r);
846
- n == null || n(i);
847
- }, W = (r) => {
848
- const o = e ? new Date(e) : /* @__PURE__ */ new Date(), i = o.getHours();
849
- let v;
850
- r === "AM" ? v = i >= 12 ? i - 12 : i : v = i < 12 ? i + 12 : i, n == null || n(J(o, v));
851
- }, c = h.useMemo(() => e ? D(e, b === "12h" ? "MMM d, yyyy h:mm a" : "MMM d, yyyy HH:mm") : null, [e, b]), s = () => {
852
- switch (Y) {
823
+ let l = n;
824
+ h === "12h" && ((e ? H : "AM") === "AM" ? l = n === 12 ? 0 : n : l = n === 12 ? 12 : n + 12);
825
+ const N = G(o, l);
826
+ u?.(N);
827
+ }, L = (n) => {
828
+ const o = e ? new Date(e) : /* @__PURE__ */ new Date(), l = ne(o, n);
829
+ u?.(l);
830
+ }, V = (n) => {
831
+ const o = e ? new Date(e) : /* @__PURE__ */ new Date(), l = o.getHours();
832
+ let N;
833
+ n === "AM" ? N = l >= 12 ? l - 12 : l : N = l < 12 ? l + 12 : l, u?.(G(o, N));
834
+ }, r = g.useMemo(() => e ? D(e, h === "12h" ? "MMM d, yyyy h:mm a" : "MMM d, yyyy HH:mm") : null, [e, h]), s = () => {
835
+ switch (C) {
853
836
  case "years":
854
837
  return /* @__PURE__ */ t(
855
- le,
838
+ ie,
856
839
  {
857
- currentYear: N.getFullYear(),
858
- selectedYear: e == null ? void 0 : e.getFullYear(),
859
- onYearSelect: B,
860
- minDate: a,
861
- maxDate: d
840
+ currentYear: v.getFullYear(),
841
+ selectedYear: e?.getFullYear(),
842
+ onYearSelect: F,
843
+ minDate: c,
844
+ maxDate: i
862
845
  }
863
846
  );
864
847
  case "months":
865
848
  return /* @__PURE__ */ t(
866
- ie,
849
+ de,
867
850
  {
868
- currentYear: N.getFullYear(),
869
- selectedMonth: e == null ? void 0 : e.getMonth(),
851
+ currentYear: v.getFullYear(),
852
+ selectedMonth: e?.getMonth(),
870
853
  onMonthSelect: I,
871
- minDate: a,
872
- maxDate: d
854
+ minDate: c,
855
+ maxDate: i
873
856
  }
874
857
  );
875
858
  default:
876
859
  return /* @__PURE__ */ t(
877
860
  Q,
878
861
  {
879
- currentMonth: N,
862
+ currentMonth: v,
880
863
  selected: e,
881
- onSelect: L,
882
- onMonthChange: A,
883
- onHeaderClick: j,
884
- disabledDates: g,
885
- minDate: a,
886
- maxDate: d
864
+ onSelect: j,
865
+ onMonthChange: T,
866
+ onHeaderClick: $,
867
+ disabledDates: p,
868
+ minDate: c,
869
+ maxDate: i
887
870
  }
888
871
  );
889
872
  }
890
- }, l = "h-ds-sm rounded-ds-md border border-surface-border-strong bg-surface-overlay px-ds-02 text-ds-md text-surface-fg transition-colors duration-fast-01 ease-productive-standard hover:border-surface-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 cursor-pointer appearance-none";
891
- return /* @__PURE__ */ p(ce, { open: w, onOpenChange: T, children: [
892
- /* @__PURE__ */ t(oe, { asChild: !0, children: /* @__PURE__ */ p(
873
+ }, a = "h-ds-sm rounded-ds-md border border-surface-border-strong bg-surface-overlay px-ds-02 text-ds-md text-surface-fg transition-colors duration-fast-01 ease-productive-standard hover:border-surface-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 cursor-pointer appearance-none";
874
+ return /* @__PURE__ */ b(ae, { open: w, onOpenChange: R, children: [
875
+ /* @__PURE__ */ t(ce, { asChild: !0, children: /* @__PURE__ */ b(
893
876
  "button",
894
877
  {
895
878
  ref: M,
896
879
  type: "button",
897
- ...P,
880
+ ...S,
898
881
  className: y(
899
882
  "inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
900
883
  "hover:border-surface-border-strong",
901
884
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
902
885
  k
903
886
  ),
904
- "aria-label": c ? `Selected: ${c}` : x,
887
+ "aria-label": r ? `Selected: ${r}` : x,
905
888
  children: [
906
- /* @__PURE__ */ t(
907
- De,
908
- {
909
- className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
910
- stroke: 1.5
911
- }
912
- ),
889
+ /* @__PURE__ */ t(K, { icon: Oe, size: "sm", stroke: "light", className: "text-surface-fg-subtle" }),
913
890
  /* @__PURE__ */ t(
914
891
  "span",
915
892
  {
916
893
  className: y(
917
894
  "text-ds-md",
918
- c ? "text-surface-fg" : "text-surface-fg-subtle"
895
+ r ? "text-surface-fg" : "text-surface-fg-subtle"
919
896
  ),
920
- children: c ?? x
897
+ children: r ?? x
921
898
  }
922
899
  )
923
900
  ]
924
901
  }
925
902
  ) }),
926
903
  /* @__PURE__ */ t(
927
- ae,
904
+ le,
928
905
  {
929
906
  className: "w-auto border-surface-border-strong bg-surface-overlay p-ds-04",
930
907
  align: "start",
931
908
  sideOffset: 4,
932
- children: /* @__PURE__ */ p("div", { className: "flex flex-col gap-ds-04", children: [
909
+ children: /* @__PURE__ */ b("div", { className: "flex flex-col gap-ds-04", children: [
933
910
  s(),
934
- Y === "days" && /* @__PURE__ */ p("div", { className: "flex items-center gap-ds-02 border-t border-surface-border-strong pt-ds-04", children: [
911
+ C === "days" && /* @__PURE__ */ b("div", { className: "flex items-center gap-ds-02 border-t border-surface-border-strong pt-ds-04", children: [
935
912
  /* @__PURE__ */ t("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: "Time" }),
936
- /* @__PURE__ */ p(
913
+ /* @__PURE__ */ b(
937
914
  "select",
938
915
  {
939
- value: G ?? "",
940
- onChange: (r) => V(Number(r.target.value)),
941
- className: l,
916
+ value: W ?? "",
917
+ onChange: (n) => z(Number(n.target.value)),
918
+ className: a,
942
919
  "aria-label": "Hour",
943
920
  children: [
944
921
  !e && /* @__PURE__ */ t("option", { value: "", children: "--" }),
945
- S.map((r) => /* @__PURE__ */ t("option", { value: r, children: b === "24h" ? Me(r) : r }, r))
922
+ P.map((n) => /* @__PURE__ */ t("option", { value: n, children: h === "24h" ? we(n) : n }, n))
946
923
  ]
947
924
  }
948
925
  ),
949
926
  /* @__PURE__ */ t("span", { className: "text-ds-md font-semibold text-surface-fg-subtle", children: ":" }),
950
- /* @__PURE__ */ p(
927
+ /* @__PURE__ */ b(
951
928
  "select",
952
929
  {
953
- value: e ? O : "",
954
- onChange: (r) => F(Number(r.target.value)),
955
- className: l,
930
+ value: e ? A : "",
931
+ onChange: (n) => L(Number(n.target.value)),
932
+ className: a,
956
933
  "aria-label": "Minute",
957
934
  children: [
958
935
  !e && /* @__PURE__ */ t("option", { value: "", children: "--" }),
959
- $.map((r) => /* @__PURE__ */ t("option", { value: r, children: Me(r) }, r))
936
+ E.map((n) => /* @__PURE__ */ t("option", { value: n, children: we(n) }, n))
960
937
  ]
961
938
  }
962
939
  ),
963
- b === "12h" && /* @__PURE__ */ p(
940
+ h === "12h" && /* @__PURE__ */ b(
964
941
  "select",
965
942
  {
966
943
  value: e ? H : "",
967
- onChange: (r) => W(r.target.value),
968
- className: l,
944
+ onChange: (n) => V(n.target.value),
945
+ className: a,
969
946
  "aria-label": "AM or PM",
970
947
  children: [
971
948
  !e && /* @__PURE__ */ t("option", { value: "", children: "--" }),
@@ -981,26 +958,26 @@ const Fe = h.forwardRef(
981
958
  ] });
982
959
  }
983
960
  );
984
- Fe.displayName = "DateTimePicker";
985
- function Ue(u) {
986
- const [e, n] = Pe(u ?? /* @__PURE__ */ new Date());
961
+ Ve.displayName = "DateTimePicker";
962
+ function Ue(d) {
963
+ const [e, u] = Pe(d ?? /* @__PURE__ */ new Date());
987
964
  return {
988
965
  currentMonth: e,
989
- setCurrentMonth: n,
990
- goToPreviousMonth: () => n((f) => be(f, 1)),
991
- goToNextMonth: () => n((f) => te(f, 1)),
992
- goToMonth: (f) => n((x) => re(x, f)),
993
- goToYear: (f) => n((x) => ne(x, f))
966
+ setCurrentMonth: u,
967
+ goToPreviousMonth: () => u((f) => me(f, 1)),
968
+ goToNextMonth: () => u((f) => se(f, 1)),
969
+ goToMonth: (f) => u((x) => re(x, f)),
970
+ goToYear: (f) => u((x) => oe(x, f))
994
971
  };
995
972
  }
996
973
  export {
997
974
  Q as C,
998
- je as D,
999
- ie as M,
975
+ Ie as D,
976
+ de as M,
1000
977
  Ne as P,
1001
- Ve as T,
1002
- le as Y,
1003
- Le as a,
1004
- Fe as b,
978
+ Le as T,
979
+ ie as Y,
980
+ ze as a,
981
+ Ve as b,
1005
982
  Ue as u
1006
983
  };