@sth87/shadcn-design-system 0.2.11 → 0.3.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 (82) hide show
  1. package/README.md +2 -3
  2. package/dist/AI_CONTEXT.md +4 -4
  3. package/dist/cjs/components/Calendar/Calendar.cjs +1 -1
  4. package/dist/cjs/components/Calendar/index.cjs +1 -1
  5. package/dist/cjs/components/Checkbox/Checkbox.cjs +1 -1
  6. package/dist/cjs/components/Checkbox/Confetti.cjs +1 -0
  7. package/dist/cjs/components/DatePicker/DatePicker.cjs +1 -1
  8. package/dist/cjs/components/DatePicker/RangePicker.cjs +1 -1
  9. package/dist/cjs/components/DatePicker/TimePicker.cjs +1 -1
  10. package/dist/cjs/components/Slider/Slider.cjs +1 -1
  11. package/dist/cjs/components/Slider/SpecSliderLabel.cjs +1 -0
  12. package/dist/cjs/components/Table/TableFilter/data-table-filter-popover.cjs +1 -1
  13. package/dist/cjs/components/Table/data-table.cjs +1 -1
  14. package/dist/cjs/components/Tabs/Tabs.cjs +1 -1
  15. package/dist/cjs/components/Tooltip/SpecTooltip.cjs +1 -0
  16. package/dist/cjs/components/Tooltip/Tooltip.cjs +1 -1
  17. package/dist/cjs/index.cjs +1 -1
  18. package/dist/cjs/packages/ui/src/components/calendar-logic.cjs +1 -0
  19. package/dist/cjs/packages/ui/src/components/calendar.cjs +1 -1
  20. package/dist/cjs/styles/index.css +1 -1
  21. package/dist/cjs/utils/animations.cjs +1 -1
  22. package/dist/cjs/utils/data-table.cjs +1 -1
  23. package/dist/cjs/utils/date-format.cjs +1 -0
  24. package/dist/esm/components/Calendar/Calendar.js +23 -19
  25. package/dist/esm/components/Calendar/index.js +7 -3
  26. package/dist/esm/components/Checkbox/Checkbox.js +46 -44
  27. package/dist/esm/components/Checkbox/Confetti.js +28 -0
  28. package/dist/esm/components/DatePicker/DatePicker.js +78 -81
  29. package/dist/esm/components/DatePicker/RangePicker.js +121 -124
  30. package/dist/esm/components/DatePicker/TimePicker.js +122 -124
  31. package/dist/esm/components/Slider/Slider.js +140 -199
  32. package/dist/esm/components/Slider/SpecSliderLabel.js +60 -0
  33. package/dist/esm/components/Table/TableFilter/data-table-filter-popover.js +30 -26
  34. package/dist/esm/components/Table/data-table.js +51 -47
  35. package/dist/esm/components/Tabs/Tabs.js +80 -91
  36. package/dist/esm/components/Tooltip/SpecTooltip.js +69 -0
  37. package/dist/esm/components/Tooltip/Tooltip.js +42 -85
  38. package/dist/esm/index.js +162 -158
  39. package/dist/esm/packages/ui/src/components/calendar-logic.js +83 -0
  40. package/dist/esm/packages/ui/src/components/calendar.js +459 -184
  41. package/dist/esm/styles/index.css +1 -1
  42. package/dist/esm/utils/animations.js +36 -44
  43. package/dist/esm/utils/data-table.js +6 -0
  44. package/dist/esm/utils/date-format.js +162 -0
  45. package/dist/types/components/Calendar/Calendar.d.ts +5 -5
  46. package/dist/types/components/Calendar/Calendar.d.ts.map +1 -1
  47. package/dist/types/components/Calendar/index.d.ts +1 -1
  48. package/dist/types/components/Calendar/index.d.ts.map +1 -1
  49. package/dist/types/components/Checkbox/Checkbox.d.ts.map +1 -1
  50. package/dist/types/components/Checkbox/Confetti.d.ts +2 -0
  51. package/dist/types/components/Checkbox/Confetti.d.ts.map +1 -0
  52. package/dist/types/components/DatePicker/DatePicker.d.ts.map +1 -1
  53. package/dist/types/components/DatePicker/RangePicker.d.ts.map +1 -1
  54. package/dist/types/components/DatePicker/TimePicker.d.ts.map +1 -1
  55. package/dist/types/components/Marquee/Marquee.d.ts +1 -1
  56. package/dist/types/components/Slider/Slider.d.ts +1 -1
  57. package/dist/types/components/Slider/Slider.d.ts.map +1 -1
  58. package/dist/types/components/Slider/SpecSliderLabel.d.ts +14 -0
  59. package/dist/types/components/Slider/SpecSliderLabel.d.ts.map +1 -0
  60. package/dist/types/components/Table/TableFilter/data-table-filter-popover.d.ts.map +1 -1
  61. package/dist/types/components/Table/data-table.d.ts.map +1 -1
  62. package/dist/types/components/Tabs/Tabs.d.ts.map +1 -1
  63. package/dist/types/components/Tooltip/SpecTooltip.d.ts +11 -0
  64. package/dist/types/components/Tooltip/SpecTooltip.d.ts.map +1 -0
  65. package/dist/types/components/Tooltip/Tooltip.d.ts.map +1 -1
  66. package/dist/types/components/Upload/Upload.d.ts +1 -1
  67. package/dist/types/packages/ui/src/components/badge.d.ts +2 -2
  68. package/dist/types/packages/ui/src/components/button.d.ts +1 -1
  69. package/dist/types/packages/ui/src/components/calendar-logic.d.ts +72 -0
  70. package/dist/types/packages/ui/src/components/calendar-logic.d.ts.map +1 -0
  71. package/dist/types/packages/ui/src/components/calendar.d.ts +95 -6
  72. package/dist/types/packages/ui/src/components/calendar.d.ts.map +1 -1
  73. package/dist/types/utils/animations.d.ts +0 -19
  74. package/dist/types/utils/animations.d.ts.map +1 -1
  75. package/dist/types/utils/data-table.d.ts.map +1 -1
  76. package/dist/types/utils/date-format.d.ts +24 -0
  77. package/dist/types/utils/date-format.d.ts.map +1 -0
  78. package/package.json +2 -3
  79. package/dist/cjs/utils/css.cjs +0 -1
  80. package/dist/esm/utils/css.js +0 -24
  81. package/dist/types/utils/css.d.ts +0 -4
  82. package/dist/types/utils/css.d.ts.map +0 -1
@@ -1,29 +1,27 @@
1
- import { jsxs as b, jsx as r } from "react/jsx-runtime";
2
- import { useState as E, useEffect as Ne, useRef as U, useMemo as _, useCallback as V, memo as ze } from "react";
3
- import { cn as C } from "../../packages/ui/src/lib/utils.js";
4
- import { Popover as Ee, PopoverTrigger as Ue, PopoverContent as qe } from "../../packages/ui/src/components/popover.js";
5
- import { Drawer as Ae, DrawerTrigger as Ge, DrawerContent as Je, DrawerHeader as Ke, DrawerTitle as Qe, DrawerDescription as We } from "../../packages/ui/src/components/drawer.js";
1
+ import { jsxs as w, jsx as n } from "react/jsx-runtime";
2
+ import { useState as E, useEffect as Ne, useRef as U, useMemo as _, useCallback as V, memo as $e } from "react";
3
+ import { cn as H } from "../../packages/ui/src/lib/utils.js";
4
+ import { Popover as ze, PopoverTrigger as Ee, PopoverContent as Ue } from "../../packages/ui/src/components/popover.js";
5
+ import { Drawer as qe, DrawerTrigger as Ae, DrawerContent as Ge, DrawerHeader as Je, DrawerTitle as Ke, DrawerDescription as Qe } from "../../packages/ui/src/components/drawer.js";
6
6
  import { isMobile as De } from "react-device-detect";
7
- import { Clock as Xe } from "lucide-react";
7
+ import { Clock as We } from "lucide-react";
8
8
  import { TimeColumnwheel as B } from "../WheelColumn.js";
9
- import { TimeGridView as Ye } from "../TimeGridView.js";
10
- import { parse as Ze, isValid as Me, format as _e } from "date-fns";
9
+ import { TimeGridView as Xe } from "../TimeGridView.js";
10
+ import { parseDate as Ye, isValidDate as Ze, formatDate as _e } from "../../utils/date-format.js";
11
11
  import Be from "../Select/Select.js";
12
12
  import L from "../Button/Button.js";
13
13
  import Le from "../Input/Input.js";
14
- const ee = (o, m = 1) => {
15
- const H = [];
16
- for (let v = 0; v < o; v += m)
17
- H.push(v);
18
- return H;
19
- }, q = (o) => String(o).padStart(2, "0"), Se = (o, m = "HH:mm") => !o || !Me(o) ? "" : _e(o, m), ye = (o, m = "HH:mm") => {
20
- if (!o) return;
21
- const v = Ze(o, m, /* @__PURE__ */ new Date());
22
- if (Me(v))
23
- return v;
14
+ const ee = (i, m = 1) => {
15
+ const b = [];
16
+ for (let C = 0; C < i; C += m)
17
+ b.push(C);
18
+ return b;
19
+ }, q = (i) => String(i).padStart(2, "0"), Se = (i, m = "HH:mm") => Ze(i) ? _e(i, m) : "", ye = (i, m = "HH:mm") => {
20
+ if (i)
21
+ return Ye(i, m, /* @__PURE__ */ new Date());
24
22
  };
25
- function es(o) {
26
- return o.replace(/HH|mm|ss/g, (m) => {
23
+ function es(i) {
24
+ return i.replace(/HH|mm|ss/g, (m) => {
27
25
  switch (m) {
28
26
  case "HH":
29
27
  case "mm":
@@ -35,20 +33,20 @@ function es(o) {
35
33
  }).replace(/H|m|s/g, () => "9");
36
34
  }
37
35
  function hs({
38
- value: o,
36
+ value: i,
39
37
  onChange: m,
40
- onSelect: H,
41
- showHours: v = !0,
38
+ onSelect: b,
39
+ showHours: C = !0,
42
40
  showMinutes: se = !0,
43
41
  showSeconds: P = !1,
44
- disabled: w = !1,
42
+ disabled: v = !1,
45
43
  className: te,
46
44
  timeLabel: c,
47
45
  mask: A,
48
46
  format: y,
49
47
  mode: l = "wheel",
50
- hourInterval: re = 1,
51
- minuteInterval: ne = 1,
48
+ hourInterval: ne = 1,
49
+ minuteInterval: re = 1,
52
50
  secondInterval: oe = 1,
53
51
  disabledTimes: ie = [],
54
52
  disabledTimeRanges: ce = [],
@@ -56,38 +54,38 @@ function hs({
56
54
  nowButtonLabel: de = "Now",
57
55
  standalone: O = !0,
58
56
  desktopMode: ae = "popover",
59
- mobileMode: ke = "drawer",
57
+ mobileMode: Me = "drawer",
60
58
  color: R = "primary",
61
59
  isOpen: ue,
62
- ...Ve
60
+ ...ke
63
61
  }) {
64
62
  let x, T;
65
63
  typeof y == "string" ? (x = y, T = y) : y ? (x = y.input, T = y.output) : (x = P ? "HH:mm:ss" : "HH:mm", T = P ? "HH:mm:ss" : "HH:mm");
66
64
  const [f, N] = E(void 0), [p, D] = E(void 0), [g, S] = E(void 0), [$, me] = E(!1);
67
65
  Ne(() => {
68
- if (o) {
69
- const e = ye(o, x);
66
+ if (i) {
67
+ const e = ye(i, x);
70
68
  e && (N(e.getHours()), D(e.getMinutes()), S(e.getSeconds()));
71
69
  } else
72
70
  N(void 0), D(void 0), S(void 0);
73
- }, [o, x]);
71
+ }, [i, x]);
74
72
  const G = U(null), J = U(null), K = U(null), Q = U(null), M = _(
75
- () => ee(24, re),
76
- [re]
77
- ), k = _(
78
- () => ee(60, ne),
73
+ () => ee(24, ne),
79
74
  [ne]
75
+ ), k = _(
76
+ () => ee(60, re),
77
+ [re]
80
78
  ), j = _(
81
79
  () => ee(60, oe),
82
80
  [oe]
83
81
  ), d = V(
84
82
  (e, s, t = 0) => {
85
- const n = `${q(e ?? 0)}:${q(s ?? 0)}${P ? `:${q(t ?? 0)}` : ""}`;
86
- if (ie.includes(n))
83
+ const r = `${q(e ?? 0)}:${q(s ?? 0)}${P ? `:${q(t ?? 0)}` : ""}`;
84
+ if (ie.includes(r))
87
85
  return !0;
88
86
  for (const a of ce) {
89
- const [u, i, h = 0] = a.from.split(":").map(Number), [z, Fe, Oe = 0] = a.to.split(":").map(Number), Te = (e ?? 0) * 3600 + (s ?? 0) * 60 + (t ?? 0), Re = u * 3600 + i * 60 + h, $e = z * 3600 + Fe * 60 + Oe;
90
- if (Te >= Re && Te <= $e)
87
+ const [u, o, h = 0] = a.from.split(":").map(Number), [z, Ie, Fe = 0] = a.to.split(":").map(Number), Te = (e ?? 0) * 3600 + (s ?? 0) * 60 + (t ?? 0), Oe = u * 3600 + o * 60 + h, Re = z * 3600 + Ie * 60 + Fe;
88
+ if (Te >= Oe && Te <= Re)
91
89
  return !0;
92
90
  }
93
91
  return !1;
@@ -99,40 +97,40 @@ function hs({
99
97
  return typeof c == "boolean" ? c ? e === "hours" ? "Hour" : e === "minutes" ? "Minute" : "Second" : void 0 : typeof c == "string" ? c : e === "hours" ? c.hours || "Hour" : e === "minutes" ? c.minutes || "Minute" : c.seconds || "Second";
100
98
  },
101
99
  [c]
102
- ), fe = typeof c == "string" && /* @__PURE__ */ r(
100
+ ), fe = typeof c == "string" && /* @__PURE__ */ n(
103
101
  "div",
104
102
  {
105
103
  className: "ds:text-xs ds:font-semibold ds:text-muted-foreground ds:uppercase ds:p-2 ds:border-b ds:w-full ds:text-center",
106
104
  children: c
107
105
  },
108
106
  "common-label"
109
- ), Pe = V(
107
+ ), Ve = V(
110
108
  (e, s, t = 0) => {
111
- const n = M.reduce(
112
- (i, h) => Math.abs(h - e) < Math.abs(i - e) ? h : i
109
+ const r = M.reduce(
110
+ (o, h) => Math.abs(h - e) < Math.abs(o - e) ? h : o
113
111
  ), a = k.reduce(
114
- (i, h) => Math.abs(h - s) < Math.abs(i - s) ? h : i
112
+ (o, h) => Math.abs(h - s) < Math.abs(o - s) ? h : o
115
113
  ), u = j.reduce(
116
- (i, h) => Math.abs(h - t) < Math.abs(i - t) ? h : i
114
+ (o, h) => Math.abs(h - t) < Math.abs(o - t) ? h : o
117
115
  );
118
- if (d(n, a, u)) {
119
- for (const i of M)
116
+ if (d(r, a, u)) {
117
+ for (const o of M)
120
118
  for (const h of k)
121
119
  for (const z of j)
122
- if (!d(i, h, z))
123
- return { h: i, m: h, s: z };
120
+ if (!d(o, h, z))
121
+ return { h: o, m: h, s: z };
124
122
  }
125
- return { h: n, m: a, s: u };
123
+ return { h: r, m: a, s: u };
126
124
  },
127
125
  [M, k, j, d]
128
126
  ), I = V(
129
127
  (e, s, t) => {
130
- const n = /* @__PURE__ */ new Date();
131
- n.setHours(e, s, t, 0);
132
- const a = Se(n, T);
133
- m?.(void 0, a, n), H?.(n, a);
128
+ const r = /* @__PURE__ */ new Date();
129
+ r.setHours(e, s, t, 0);
130
+ const a = Se(r, T);
131
+ m?.(void 0, a, r), b?.(r, a);
134
132
  },
135
- [T, m, H]
133
+ [T, m, b]
136
134
  ), pe = (e) => {
137
135
  d(e, p, g) || (N(e), I(e, p ?? 0, g ?? 0));
138
136
  }, he = (e) => {
@@ -146,9 +144,9 @@ function hs({
146
144
  "[data-selected]"
147
145
  );
148
146
  if (s) {
149
- const t = e.current, n = t.clientHeight, a = s.offsetTop, u = s.clientHeight, i = a - n / 2 + u / 2;
147
+ const t = e.current, r = t.clientHeight, a = s.offsetTop, u = s.clientHeight, o = a - r / 2 + u / 2;
150
148
  t.scrollTo({
151
- top: i,
149
+ top: o,
152
150
  behavior: "smooth"
153
151
  });
154
152
  }
@@ -158,12 +156,12 @@ function hs({
158
156
  ), X = V(() => {
159
157
  l === "wheel" ? (F(G), F(J), F(K)) : l === "compact" && F(Q);
160
158
  }, [G, J, K, Q, l, F]), ve = () => {
161
- const e = /* @__PURE__ */ new Date(), { h: s, m: t, s: n } = Pe(
159
+ const e = /* @__PURE__ */ new Date(), { h: s, m: t, s: r } = Ve(
162
160
  e.getHours(),
163
161
  e.getMinutes(),
164
162
  e.getSeconds()
165
163
  );
166
- N(s), D(t), S(n), I(s, t, n), setTimeout(() => X(), 100);
164
+ N(s), D(t), S(r), I(s, t, r), setTimeout(() => X(), 100);
167
165
  };
168
166
  Ne(() => {
169
167
  if ((O ? $ : ue) || (f !== void 0 || p !== void 0 || g !== void 0)) {
@@ -180,57 +178,57 @@ function hs({
180
178
  p,
181
179
  g
182
180
  ]);
183
- const Y = ze(
181
+ const Y = $e(
184
182
  ({
185
183
  items: e,
186
184
  value: s,
187
185
  onChange: t,
188
- timeLabel: n,
186
+ timeLabel: r,
189
187
  type: a
190
- }) => /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-2", children: [
191
- n && /* @__PURE__ */ r("div", { className: "ds:text-xs ds:font-semibold ds:text-muted-foreground ds:uppercase ds:p-2 ds:border-b ds:w-full ds:text-center", children: n }),
192
- /* @__PURE__ */ r("div", { className: "ds:p-2", children: /* @__PURE__ */ r(
188
+ }) => /* @__PURE__ */ w("div", { className: "ds:flex ds:flex-col ds:gap-2", children: [
189
+ r && /* @__PURE__ */ n("div", { className: "ds:text-xs ds:font-semibold ds:text-muted-foreground ds:uppercase ds:p-2 ds:border-b ds:w-full ds:text-center", children: r }),
190
+ /* @__PURE__ */ n("div", { className: "ds:p-2", children: /* @__PURE__ */ n(
193
191
  Be,
194
192
  {
195
193
  value: s?.toString() || "",
196
194
  onValueChange: (u) => t(Number(u)),
197
- disabled: w,
195
+ disabled: v,
198
196
  clearable: !1,
199
197
  search: !1,
200
198
  options: e.map((u) => {
201
- const i = a === "hours" && d(u, p, g) || a === "minutes" && d(f, u, g) || a === "seconds" && d(f, p, u);
199
+ const o = a === "hours" && d(u, p, g) || a === "minutes" && d(f, u, g) || a === "seconds" && d(f, p, u);
202
200
  return {
203
201
  label: q(u),
204
202
  value: u.toString(),
205
- disabled: i
203
+ disabled: o
206
204
  };
207
205
  })
208
206
  }
209
207
  ) })
210
208
  ] })
211
- ), je = (e, s) => {
209
+ ), Pe = (e, s) => {
212
210
  d(e, s, 0) || (N(e), D(s), S(0), I(e, s, 0));
213
211
  }, we = () => {
214
212
  const e = [];
215
213
  if (l === "compact")
216
- return /* @__PURE__ */ r(
217
- Ye,
214
+ return /* @__PURE__ */ n(
215
+ Xe,
218
216
  {
219
217
  HOURS: M,
220
218
  MINUTES: k,
221
219
  hours: f,
222
220
  minutes: p,
223
- disabled: w,
221
+ disabled: v,
224
222
  isTimeDisabled: d,
225
- onTimeSelect: je,
223
+ onTimeSelect: Pe,
226
224
  ref: Q,
227
225
  color: R
228
226
  }
229
227
  );
230
- if (v) {
228
+ if (C) {
231
229
  const s = typeof c == "string" ? void 0 : W("hours");
232
230
  l === "wheel" ? e.push(
233
- /* @__PURE__ */ r(
231
+ /* @__PURE__ */ n(
234
232
  B,
235
233
  {
236
234
  ref: G,
@@ -239,13 +237,13 @@ function hs({
239
237
  onChange: pe,
240
238
  timeLabel: s,
241
239
  isItemDisabled: (t) => d(t, p, g),
242
- disabled: w,
240
+ disabled: v,
243
241
  color: R
244
242
  },
245
243
  "hours"
246
244
  )
247
245
  ) : l === "select" && e.push(
248
- /* @__PURE__ */ r(
246
+ /* @__PURE__ */ n(
249
247
  Y,
250
248
  {
251
249
  items: M,
@@ -261,7 +259,7 @@ function hs({
261
259
  if (se) {
262
260
  const s = typeof c == "string" ? void 0 : W("minutes");
263
261
  l === "wheel" ? e.push(
264
- /* @__PURE__ */ r(
262
+ /* @__PURE__ */ n(
265
263
  B,
266
264
  {
267
265
  ref: J,
@@ -269,15 +267,15 @@ function hs({
269
267
  value: p,
270
268
  onChange: he,
271
269
  timeLabel: s,
272
- itemClassName: v ? "ds:border-l" : void 0,
270
+ itemClassName: C ? "ds:border-l" : void 0,
273
271
  isItemDisabled: (t) => d(f, t, g),
274
- disabled: w,
272
+ disabled: v,
275
273
  color: R
276
274
  },
277
275
  "minutes"
278
276
  )
279
277
  ) : l === "select" && e.push(
280
- /* @__PURE__ */ r(
278
+ /* @__PURE__ */ n(
281
279
  Y,
282
280
  {
283
281
  items: k,
@@ -293,7 +291,7 @@ function hs({
293
291
  if (P) {
294
292
  const s = typeof c == "string" ? void 0 : W("seconds");
295
293
  l === "wheel" ? e.push(
296
- /* @__PURE__ */ r(
294
+ /* @__PURE__ */ n(
297
295
  B,
298
296
  {
299
297
  ref: K,
@@ -301,15 +299,15 @@ function hs({
301
299
  value: g,
302
300
  onChange: ge,
303
301
  timeLabel: s,
304
- itemClassName: se || v ? "ds:border-l" : void 0,
302
+ itemClassName: se || C ? "ds:border-l" : void 0,
305
303
  isItemDisabled: (t) => d(f, p, t),
306
- disabled: w,
304
+ disabled: v,
307
305
  color: R
308
306
  },
309
307
  "seconds"
310
308
  )
311
309
  ) : l === "select" && e.push(
312
- /* @__PURE__ */ r(
310
+ /* @__PURE__ */ n(
313
311
  Y,
314
312
  {
315
313
  items: j,
@@ -325,43 +323,43 @@ function hs({
325
323
  return e;
326
324
  };
327
325
  if (!O)
328
- return /* @__PURE__ */ b(
326
+ return /* @__PURE__ */ w(
329
327
  "div",
330
328
  {
331
- className: C("ds:flex ds:flex-col ds:gap-2 ds:h-full ds:justify-between", te),
329
+ className: H("ds:flex ds:flex-col ds:gap-2 ds:h-full ds:justify-between", te),
332
330
  children: [
333
331
  fe,
334
- /* @__PURE__ */ r(
332
+ /* @__PURE__ */ n(
335
333
  "div",
336
334
  {
337
- className: C(
335
+ className: H(
338
336
  "ds:flex ds:rounded ds:overflow-clip ds:mb-auto",
339
337
  l === "wheel" ? "ds:items-end ds:justify-center ds:p-0 ds:h-72" : "ds:items-start ds:justify-center"
340
338
  ),
341
339
  children: we()
342
340
  }
343
341
  ),
344
- le && /* @__PURE__ */ r(
342
+ le && /* @__PURE__ */ n(
345
343
  L,
346
344
  {
347
345
  type: "button",
348
346
  variant: "solid",
349
347
  size: "xs",
350
348
  onClick: ve,
351
- disabled: w,
352
- className: C("ds:rounded-none"),
349
+ disabled: v,
350
+ className: H("ds:rounded-none"),
353
351
  children: de
354
352
  }
355
353
  )
356
354
  ]
357
355
  }
358
356
  );
359
- const He = /* @__PURE__ */ b("div", { className: C("ds:flex ds:flex-col ds:gap-4 ds:h-full", te), children: [
357
+ const He = /* @__PURE__ */ w("div", { className: H("ds:flex ds:flex-col ds:gap-4 ds:h-full", te), children: [
360
358
  fe,
361
- /* @__PURE__ */ r(
359
+ /* @__PURE__ */ n(
362
360
  "div",
363
361
  {
364
- className: C(
362
+ className: H(
365
363
  "ds:flex ds:rounded ds:overflow-clip ds:my-auto ds:mx-auto ds:max-w-sm ds:md:max-w-md ds:lg:max-w-lg ds:relative",
366
364
  l === "wheel" ? "ds:items-end ds:justify-center ds:p-0" : "ds:items-start ds:justify-center",
367
365
  {
@@ -372,81 +370,81 @@ function hs({
372
370
  children: we()
373
371
  }
374
372
  ),
375
- le && /* @__PURE__ */ r(
373
+ le && /* @__PURE__ */ n(
376
374
  L,
377
375
  {
378
376
  type: "button",
379
377
  variant: "solid",
380
378
  size: "xs",
381
379
  onClick: ve,
382
- disabled: w,
383
- className: C("ds:rounded-none"),
380
+ disabled: v,
381
+ className: H("ds:rounded-none"),
384
382
  children: de
385
383
  }
386
384
  )
387
- ] }), be = /* @__PURE__ */ b(
385
+ ] }), be = /* @__PURE__ */ w(
388
386
  L,
389
387
  {
390
388
  variant: "ghost",
391
389
  className: "ds:!p-1 ds:!leading-0 ds:h-auto ds:rounded ds:hover:bg-accent ds:transition-colors",
392
- disabled: w,
390
+ disabled: v,
393
391
  children: [
394
- /* @__PURE__ */ r(Xe, { className: "ds:size-4" }),
395
- /* @__PURE__ */ r("span", { className: "ds:sr-only", children: "Select time" })
392
+ /* @__PURE__ */ n(We, { className: "ds:size-4" }),
393
+ /* @__PURE__ */ n("span", { className: "ds:sr-only", children: "Select time" })
396
394
  ]
397
395
  }
398
- ), Ce = /* @__PURE__ */ b(Ee, { open: $, onOpenChange: me, children: [
399
- /* @__PURE__ */ r(Ue, { asChild: !0, disabled: w, children: be }),
400
- /* @__PURE__ */ r(
401
- qe,
396
+ ), Ce = /* @__PURE__ */ w(ze, { open: $, onOpenChange: me, children: [
397
+ /* @__PURE__ */ n(Ee, { asChild: !0, disabled: v, children: be }),
398
+ /* @__PURE__ */ n(
399
+ Ue,
402
400
  {
403
- className: C(
401
+ className: H(
404
402
  "ds:w-auto ds:overflow-hidden ds:p-0",
405
403
  "ds:backdrop-blur ds:bg-background/50"
406
404
  ),
407
405
  children: He
408
406
  }
409
407
  )
410
- ] }), xe = /* @__PURE__ */ b(Ae, { open: $, onOpenChange: me, children: [
411
- /* @__PURE__ */ r(Ge, { asChild: !0, children: be }),
412
- /* @__PURE__ */ b(
413
- Je,
408
+ ] }), xe = /* @__PURE__ */ w(qe, { open: $, onOpenChange: me, children: [
409
+ /* @__PURE__ */ n(Ae, { asChild: !0, children: be }),
410
+ /* @__PURE__ */ w(
411
+ Ge,
414
412
  {
415
- className: C(
413
+ className: H(
416
414
  "ds:w-auto ds:overflow-hidden ds:p-0",
417
415
  "ds:backdrop-blur ds:bg-background"
418
416
  ),
419
417
  children: [
420
- /* @__PURE__ */ b(Ke, { className: "ds:sr-only", children: [
421
- /* @__PURE__ */ r(Qe, { children: "Select time" }),
422
- /* @__PURE__ */ r(We, { children: "Choose a time" })
418
+ /* @__PURE__ */ w(Je, { className: "ds:sr-only", children: [
419
+ /* @__PURE__ */ n(Ke, { children: "Select time" }),
420
+ /* @__PURE__ */ n(Qe, { children: "Choose a time" })
423
421
  ] }),
424
422
  He
425
423
  ]
426
424
  }
427
425
  )
428
- ] }), Ie = T;
426
+ ] }), je = T;
429
427
  let Z;
430
- return A === !0 ? Z = es(x) : typeof A == "string" && (Z = A), /* @__PURE__ */ r(
428
+ return A === !0 ? Z = es(x) : typeof A == "string" && (Z = A), /* @__PURE__ */ n(
431
429
  Le,
432
430
  {
433
- ...Ve,
431
+ ...ke,
434
432
  clearable: !0,
435
- value: o || "",
436
- placeholder: Ie,
433
+ value: i || "",
434
+ placeholder: je,
437
435
  mask: Z,
438
- disabled: w,
436
+ disabled: v,
439
437
  className: "ds:cursor-pointer",
440
438
  onChange: (e) => {
441
439
  const s = e.target.value, t = ye(s, x);
442
440
  if (t) {
443
441
  N(t.getHours()), D(t.getMinutes()), S(t.getSeconds());
444
- const n = Se(t, T);
445
- m?.(e, n, t), H?.(t, n);
442
+ const r = Se(t, T);
443
+ m?.(e, r, t), b?.(t, r);
446
444
  } else
447
- N(0), D(0), S(0), m?.(e, s, void 0), H?.(void 0, s);
445
+ N(0), D(0), S(0), m?.(e, s, void 0), b?.(void 0, s);
448
446
  },
449
- suffixIcon: De ? ke === "drawer" ? xe : Ce : ae === "drawer" ? xe : Ce
447
+ suffixIcon: De ? Me === "drawer" ? xe : Ce : ae === "drawer" ? xe : Ce
450
448
  }
451
449
  );
452
450
  }