@ieee-ui/ui 0.0.2 → 0.0.3

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.
@@ -1,765 +0,0 @@
1
- import re, { useState as $, useRef as ne, useEffect as oe } from "react";
2
- var L = { exports: {} }, M = {};
3
- /**
4
- * @license React
5
- * react-jsx-runtime.production.js
6
- *
7
- * Copyright (c) Meta Platforms, Inc. and affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */
12
- var Z;
13
- function se() {
14
- if (Z) return M;
15
- Z = 1;
16
- var m = Symbol.for("react.transitional.element"), f = Symbol.for("react.fragment");
17
- function c(p, d, i) {
18
- var g = null;
19
- if (i !== void 0 && (g = "" + i), d.key !== void 0 && (g = "" + d.key), "key" in d) {
20
- i = {};
21
- for (var h in d)
22
- h !== "key" && (i[h] = d[h]);
23
- } else i = d;
24
- return d = i.ref, {
25
- $$typeof: m,
26
- type: p,
27
- key: g,
28
- ref: d !== void 0 ? d : null,
29
- props: i
30
- };
31
- }
32
- return M.Fragment = f, M.jsx = c, M.jsxs = c, M;
33
- }
34
- var D = {};
35
- /**
36
- * @license React
37
- * react-jsx-runtime.development.js
38
- *
39
- * Copyright (c) Meta Platforms, Inc. and affiliates.
40
- *
41
- * This source code is licensed under the MIT license found in the
42
- * LICENSE file in the root directory of this source tree.
43
- */
44
- var Q;
45
- function ae() {
46
- return Q || (Q = 1, process.env.NODE_ENV !== "production" && (function() {
47
- function m(e) {
48
- if (e == null) return null;
49
- if (typeof e == "function")
50
- return e.$$typeof === G ? null : e.displayName || e.name || null;
51
- if (typeof e == "string") return e;
52
- switch (e) {
53
- case _:
54
- return "Fragment";
55
- case W:
56
- return "Profiler";
57
- case S:
58
- return "StrictMode";
59
- case J:
60
- return "Suspense";
61
- case U:
62
- return "SuspenseList";
63
- case B:
64
- return "Activity";
65
- }
66
- if (typeof e == "object")
67
- switch (typeof e.tag == "number" && console.error(
68
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
- ), e.$$typeof) {
70
- case T:
71
- return "Portal";
72
- case z:
73
- return e.displayName || "Context";
74
- case I:
75
- return (e._context.displayName || "Context") + ".Consumer";
76
- case V:
77
- var n = e.render;
78
- return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
- case q:
80
- return n = e.displayName || null, n !== null ? n : m(e.type) || "Memo";
81
- case O:
82
- n = e._payload, e = e._init;
83
- try {
84
- return m(e(n));
85
- } catch {
86
- }
87
- }
88
- return null;
89
- }
90
- function f(e) {
91
- return "" + e;
92
- }
93
- function c(e) {
94
- try {
95
- f(e);
96
- var n = !1;
97
- } catch {
98
- n = !0;
99
- }
100
- if (n) {
101
- n = console;
102
- var s = n.error, l = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
- return s.call(
104
- n,
105
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- l
107
- ), f(e);
108
- }
109
- }
110
- function p(e) {
111
- if (e === _) return "<>";
112
- if (typeof e == "object" && e !== null && e.$$typeof === O)
113
- return "<...>";
114
- try {
115
- var n = m(e);
116
- return n ? "<" + n + ">" : "<...>";
117
- } catch {
118
- return "<...>";
119
- }
120
- }
121
- function d() {
122
- var e = Y.A;
123
- return e === null ? null : e.getOwner();
124
- }
125
- function i() {
126
- return Error("react-stack-top-frame");
127
- }
128
- function g(e) {
129
- if (P.call(e, "key")) {
130
- var n = Object.getOwnPropertyDescriptor(e, "key").get;
131
- if (n && n.isReactWarning) return !1;
132
- }
133
- return e.key !== void 0;
134
- }
135
- function h(e, n) {
136
- function s() {
137
- F || (F = !0, console.error(
138
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
- n
140
- ));
141
- }
142
- s.isReactWarning = !0, Object.defineProperty(e, "key", {
143
- get: s,
144
- configurable: !0
145
- });
146
- }
147
- function R() {
148
- var e = m(this.type);
149
- return C[e] || (C[e] = !0, console.error(
150
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
- )), e = this.props.ref, e !== void 0 ? e : null;
152
- }
153
- function y(e, n, s, l, j, v) {
154
- var u = s.ref;
155
- return e = {
156
- $$typeof: w,
157
- type: e,
158
- key: n,
159
- props: s,
160
- _owner: l
161
- }, (u !== void 0 ? u : null) !== null ? Object.defineProperty(e, "ref", {
162
- enumerable: !1,
163
- get: R
164
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
165
- configurable: !1,
166
- enumerable: !1,
167
- writable: !0,
168
- value: 0
169
- }), Object.defineProperty(e, "_debugInfo", {
170
- configurable: !1,
171
- enumerable: !1,
172
- writable: !0,
173
- value: null
174
- }), Object.defineProperty(e, "_debugStack", {
175
- configurable: !1,
176
- enumerable: !1,
177
- writable: !0,
178
- value: j
179
- }), Object.defineProperty(e, "_debugTask", {
180
- configurable: !1,
181
- enumerable: !1,
182
- writable: !0,
183
- value: v
184
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
- }
186
- function b(e, n, s, l, j, v) {
187
- var u = n.children;
188
- if (u !== void 0)
189
- if (l)
190
- if (X(u)) {
191
- for (l = 0; l < u.length; l++)
192
- x(u[l]);
193
- Object.freeze && Object.freeze(u);
194
- } else
195
- console.error(
196
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
- );
198
- else x(u);
199
- if (P.call(n, "key")) {
200
- u = m(e);
201
- var N = Object.keys(n).filter(function(te) {
202
- return te !== "key";
203
- });
204
- l = 0 < N.length ? "{key: someKey, " + N.join(": ..., ") + ": ...}" : "{key: someKey}", k[u + l] || (N = 0 < N.length ? "{" + N.join(": ..., ") + ": ...}" : "{}", console.error(
205
- `A props object containing a "key" prop is being spread into JSX:
206
- let props = %s;
207
- <%s {...props} />
208
- React keys must be passed directly to JSX without using spread:
209
- let props = %s;
210
- <%s key={someKey} {...props} />`,
211
- l,
212
- u,
213
- N,
214
- u
215
- ), k[u + l] = !0);
216
- }
217
- if (u = null, s !== void 0 && (c(s), u = "" + s), g(n) && (c(n.key), u = "" + n.key), "key" in n) {
218
- s = {};
219
- for (var H in n)
220
- H !== "key" && (s[H] = n[H]);
221
- } else s = n;
222
- return u && h(
223
- s,
224
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
- ), y(
226
- e,
227
- u,
228
- s,
229
- d(),
230
- j,
231
- v
232
- );
233
- }
234
- function x(e) {
235
- E(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === O && (e._payload.status === "fulfilled" ? E(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
236
- }
237
- function E(e) {
238
- return typeof e == "object" && e !== null && e.$$typeof === w;
239
- }
240
- var a = re, w = Symbol.for("react.transitional.element"), T = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), z = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), J = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), Y = a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, X = Array.isArray, A = console.createTask ? console.createTask : function() {
241
- return null;
242
- };
243
- a = {
244
- react_stack_bottom_frame: function(e) {
245
- return e();
246
- }
247
- };
248
- var F, C = {}, t = a.react_stack_bottom_frame.bind(
249
- a,
250
- i
251
- )(), o = A(p(i)), k = {};
252
- D.Fragment = _, D.jsx = function(e, n, s) {
253
- var l = 1e4 > Y.recentlyCreatedOwnerStacks++;
254
- return b(
255
- e,
256
- n,
257
- s,
258
- !1,
259
- l ? Error("react-stack-top-frame") : t,
260
- l ? A(p(e)) : o
261
- );
262
- }, D.jsxs = function(e, n, s) {
263
- var l = 1e4 > Y.recentlyCreatedOwnerStacks++;
264
- return b(
265
- e,
266
- n,
267
- s,
268
- !0,
269
- l ? Error("react-stack-top-frame") : t,
270
- l ? A(p(e)) : o
271
- );
272
- };
273
- })()), D;
274
- }
275
- var K;
276
- function le() {
277
- return K || (K = 1, process.env.NODE_ENV === "production" ? L.exports = se() : L.exports = ae()), L.exports;
278
- }
279
- var r = le();
280
- const ee = ({
281
- children: m,
282
- variant: f = "primary",
283
- size: c = "medium",
284
- isLoading: p = !1,
285
- leftIcon: d,
286
- rightIcon: i,
287
- disabled: g,
288
- className: h = "",
289
- ...R
290
- }) => {
291
- const y = `
292
- inline-flex items-center justify-center gap-2
293
- font-semibold rounded-lg
294
- transition-all duration-200
295
- focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
296
- disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none
297
- `, b = {
298
- primary: `
299
- bg-primary text-primary-foreground
300
- hover:bg-primary/90 active:bg-primary/80
301
- shadow-sm hover:shadow
302
- `,
303
- secondary: `
304
- bg-secondary text-secondary-foreground
305
- hover:bg-secondary/90 active:bg-secondary/80
306
- shadow-sm hover:shadow
307
- `,
308
- accent: `
309
- bg-accent text-accent-foreground
310
- hover:bg-accent/90 active:bg-accent/80
311
- shadow-sm hover:shadow
312
- `,
313
- danger: `
314
- bg-destructive text-destructive-foreground
315
- hover:bg-destructive/90 active:bg-destructive/80
316
- shadow-sm hover:shadow
317
- `,
318
- success: `
319
- bg-success text-success-foreground
320
- hover:bg-success/90 active:bg-success/80
321
- shadow-sm hover:shadow
322
- `,
323
- info: `
324
- bg-info text-info-foreground
325
- hover:bg-info/90 active:bg-info/80
326
- shadow-sm hover:shadow
327
- `,
328
- highlight: `
329
- bg-highlight text-highlight-foreground
330
- hover:bg-highlight/90 active:bg-highlight/80
331
- shadow-sm hover:shadow
332
- `,
333
- outline: `
334
- bg-transparent border-2 border-primary text-primary
335
- hover:bg-primary/5 active:bg-primary/10
336
- `,
337
- ghost: `
338
- bg-transparent text-primary
339
- hover:bg-muted active:bg-muted/80
340
- `
341
- }, x = {
342
- small: "px-3 py-1.5 text-sm",
343
- medium: "px-5 py-2.5 text-base",
344
- large: "px-7 py-3.5 text-lg"
345
- };
346
- return /* @__PURE__ */ r.jsxs(
347
- "button",
348
- {
349
- className: `
350
- ${y}
351
- ${b[f]}
352
- ${x[c]}
353
- ${h}
354
- `,
355
- disabled: g || p,
356
- ...R,
357
- children: [
358
- p && /* @__PURE__ */ r.jsxs(
359
- "svg",
360
- {
361
- className: "animate-spin h-4 w-4",
362
- xmlns: "http://www.w3.org/2000/svg",
363
- fill: "none",
364
- viewBox: "0 0 24 24",
365
- children: [
366
- /* @__PURE__ */ r.jsx(
367
- "circle",
368
- {
369
- className: "opacity-25",
370
- cx: "12",
371
- cy: "12",
372
- r: "10",
373
- stroke: "currentColor",
374
- strokeWidth: "4"
375
- }
376
- ),
377
- /* @__PURE__ */ r.jsx(
378
- "path",
379
- {
380
- className: "opacity-75",
381
- fill: "currentColor",
382
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
383
- }
384
- )
385
- ]
386
- }
387
- ),
388
- !p && d && /* @__PURE__ */ r.jsx("span", { children: d }),
389
- m,
390
- !p && i && /* @__PURE__ */ r.jsx("span", { children: i })
391
- ]
392
- }
393
- );
394
- }, ie = ({
395
- label: m,
396
- error: f,
397
- className: c = "",
398
- ...p
399
- }) => /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col gap-1", children: [
400
- m && /* @__PURE__ */ r.jsx("label", { className: "text-sm font-medium text-gray-700", children: m }),
401
- /* @__PURE__ */ r.jsx(
402
- "input",
403
- {
404
- className: `px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${f ? "border-red-500" : "border-gray-300"} ${c}`,
405
- ...p
406
- }
407
- ),
408
- f && /* @__PURE__ */ r.jsx("span", { className: "text-xs text-red-500", children: f })
409
- ] }), ue = ({
410
- label: m,
411
- value: f,
412
- onChange: c,
413
- placeholder: p = "Select date",
414
- error: d,
415
- disabled: i = !1,
416
- minDate: g,
417
- maxDate: h,
418
- className: R = ""
419
- }) => {
420
- const [y, b] = $(!1), [x, E] = $(f), [a, w] = $(
421
- f ? new Date(f.getFullYear(), f.getMonth(), 1) : new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1)
422
- ), [T, _] = $(!1), S = ne(null);
423
- oe(() => {
424
- const t = (o) => {
425
- S.current && !S.current.contains(o.target) && b(!1);
426
- };
427
- return y && document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
428
- }, [y]);
429
- const W = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], I = [
430
- "January",
431
- "February",
432
- "March",
433
- "April",
434
- "May",
435
- "June",
436
- "July",
437
- "August",
438
- "September",
439
- "October",
440
- "November",
441
- "December"
442
- ], z = (t) => {
443
- const o = t.getFullYear(), k = t.getMonth(), e = new Date(o, k, 1), s = new Date(o, k + 1, 0).getDate(), l = e.getDay(), j = [];
444
- for (let v = 0; v < l; v++)
445
- j.push(null);
446
- for (let v = 1; v <= s; v++)
447
- j.push(v);
448
- return j;
449
- }, V = () => {
450
- w(
451
- new Date(a.getFullYear(), a.getMonth() - 1, 1)
452
- );
453
- }, J = () => {
454
- w(
455
- new Date(a.getFullYear(), a.getMonth() + 1, 1)
456
- );
457
- }, U = (t) => {
458
- w(new Date(a.getFullYear(), t, 1));
459
- }, q = (t) => {
460
- w(new Date(t, a.getMonth(), 1)), _(!1);
461
- }, O = () => {
462
- const t = (/* @__PURE__ */ new Date()).getFullYear(), o = g ? g.getFullYear() : t - 100, k = h ? h.getFullYear() : t + 100, e = [];
463
- for (let n = o; n <= k; n++)
464
- e.push(n);
465
- return e;
466
- }, B = (t) => {
467
- const o = new Date(
468
- a.getFullYear(),
469
- a.getMonth(),
470
- t
471
- );
472
- g && o < g || h && o > h || (E(o), c == null || c(o), b(!1));
473
- }, G = () => {
474
- const t = /* @__PURE__ */ new Date();
475
- w(new Date(t.getFullYear(), t.getMonth(), 1)), E(t), c == null || c(t), b(!1);
476
- }, Y = () => {
477
- E(void 0), c == null || c(void 0);
478
- }, P = (t) => {
479
- const o = new Date(
480
- a.getFullYear(),
481
- a.getMonth(),
482
- t
483
- );
484
- return !!(g && o < g || h && o > h);
485
- }, X = (t) => {
486
- const o = /* @__PURE__ */ new Date();
487
- return t === o.getDate() && a.getMonth() === o.getMonth() && a.getFullYear() === o.getFullYear();
488
- }, A = (t) => x ? t === x.getDate() && a.getMonth() === x.getMonth() && a.getFullYear() === x.getFullYear() : !1, F = (t) => t ? t.toLocaleDateString("en-US", {
489
- month: "2-digit",
490
- day: "2-digit",
491
- year: "numeric"
492
- }) : "", C = z(a);
493
- return /* @__PURE__ */ r.jsxs("div", { className: `relative ${R}`, ref: S, children: [
494
- /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col gap-1", children: [
495
- m && /* @__PURE__ */ r.jsx("label", { className: "text-xs font-medium text-text-muted tracking-wide uppercase", children: m }),
496
- /* @__PURE__ */ r.jsxs(
497
- "div",
498
- {
499
- className: `
500
- relative flex items-center gap-2 px-4 py-3
501
- bg-surface border-b-2 transition-all cursor-pointer
502
- rounded-t-lg
503
- ${y ? "border-primary bg-background-light" : "border-border"}
504
- ${d ? "border-destructive" : ""}
505
- ${i ? "opacity-50 cursor-not-allowed" : "hover:bg-background-light"}
506
- `,
507
- onClick: () => !i && b(!y),
508
- children: [
509
- /* @__PURE__ */ r.jsx(
510
- "input",
511
- {
512
- type: "text",
513
- value: F(x),
514
- placeholder: p,
515
- readOnly: !0,
516
- disabled: i,
517
- className: `
518
- flex-1 bg-transparent outline-none cursor-pointer
519
- text-text-primary placeholder:text-muted-foreground
520
- ${i ? "cursor-not-allowed" : ""}
521
- `
522
- }
523
- ),
524
- /* @__PURE__ */ r.jsx(
525
- "svg",
526
- {
527
- className: "w-5 h-5 text-muted-foreground",
528
- fill: "none",
529
- stroke: "currentColor",
530
- viewBox: "0 0 24 24",
531
- children: /* @__PURE__ */ r.jsx(
532
- "path",
533
- {
534
- strokeLinecap: "round",
535
- strokeLinejoin: "round",
536
- strokeWidth: 2,
537
- d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
538
- }
539
- )
540
- }
541
- ),
542
- x && !i && /* @__PURE__ */ r.jsx(
543
- "button",
544
- {
545
- onClick: (t) => {
546
- t.stopPropagation(), Y();
547
- },
548
- className: "p-1 rounded-full hover:bg-muted transition-colors",
549
- type: "button",
550
- children: /* @__PURE__ */ r.jsx(
551
- "svg",
552
- {
553
- className: "w-4 h-4 text-muted-foreground",
554
- fill: "none",
555
- stroke: "currentColor",
556
- viewBox: "0 0 24 24",
557
- children: /* @__PURE__ */ r.jsx(
558
- "path",
559
- {
560
- strokeLinecap: "round",
561
- strokeLinejoin: "round",
562
- strokeWidth: 2,
563
- d: "M6 18L18 6M6 6l12 12"
564
- }
565
- )
566
- }
567
- )
568
- }
569
- )
570
- ]
571
- }
572
- ),
573
- d && /* @__PURE__ */ r.jsx("span", { className: "text-xs text-destructive tracking-wide", children: d })
574
- ] }),
575
- y && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
576
- /* @__PURE__ */ r.jsx("div", { className: "md:hidden fixed inset-0 bg-black/20 z-40" }),
577
- /* @__PURE__ */ r.jsxs(
578
- "div",
579
- {
580
- className: `
581
- fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50 w-[90vw] max-w-sm
582
- md:absolute md:top-full md:left-0 md:mt-1 md:z-10 md:w-80 md:translate-x-0 md:translate-y-0
583
- bg-card shadow-2xl rounded-lg overflow-hidden border border-border
584
- `,
585
- children: [
586
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between px-3 py-2 md:px-4 md:py-3 bg-primary text-primary-foreground", children: [
587
- /* @__PURE__ */ r.jsx(
588
- "button",
589
- {
590
- onClick: V,
591
- className: "p-1.5 md:p-2 rounded-full hover:bg-white/10 transition-colors",
592
- type: "button",
593
- "aria-label": "Previous month",
594
- children: /* @__PURE__ */ r.jsx(
595
- "svg",
596
- {
597
- className: "w-4 h-4 md:w-5 md:h-5",
598
- fill: "none",
599
- stroke: "currentColor",
600
- viewBox: "0 0 24 24",
601
- children: /* @__PURE__ */ r.jsx(
602
- "path",
603
- {
604
- strokeLinecap: "round",
605
- strokeLinejoin: "round",
606
- strokeWidth: 2,
607
- d: "M15 19l-7-7 7-7"
608
- }
609
- )
610
- }
611
- )
612
- }
613
- ),
614
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-1.5 md:gap-2", children: [
615
- /* @__PURE__ */ r.jsx(
616
- "select",
617
- {
618
- value: a.getMonth(),
619
- onChange: (t) => U(Number(t.target.value)),
620
- className: "bg-white/10 hover:bg-white/20 px-1.5 py-0.5 md:px-2 md:py-1 rounded text-xs md:text-sm font-medium cursor-pointer outline-none focus:ring-2 focus:ring-white/30 transition-colors",
621
- onClick: (t) => t.stopPropagation(),
622
- children: I.map((t, o) => /* @__PURE__ */ r.jsx(
623
- "option",
624
- {
625
- value: o,
626
- className: "bg-card text-text-primary",
627
- children: t
628
- },
629
- t
630
- ))
631
- }
632
- ),
633
- /* @__PURE__ */ r.jsxs(
634
- "button",
635
- {
636
- onClick: () => _(!T),
637
- className: "bg-white/10 hover:bg-white/20 px-1.5 py-0.5 md:px-2 md:py-1 rounded text-xs md:text-sm font-medium transition-colors",
638
- type: "button",
639
- children: [
640
- a.getFullYear(),
641
- /* @__PURE__ */ r.jsx(
642
- "svg",
643
- {
644
- className: `w-3 h-3 inline-block ml-0.5 md:ml-1 transition-transform ${T ? "rotate-180" : ""}`,
645
- fill: "none",
646
- stroke: "currentColor",
647
- viewBox: "0 0 24 24",
648
- children: /* @__PURE__ */ r.jsx(
649
- "path",
650
- {
651
- strokeLinecap: "round",
652
- strokeLinejoin: "round",
653
- strokeWidth: 2,
654
- d: "M19 9l-7 7-7-7"
655
- }
656
- )
657
- }
658
- )
659
- ]
660
- }
661
- )
662
- ] }),
663
- /* @__PURE__ */ r.jsx(
664
- "button",
665
- {
666
- onClick: J,
667
- className: "p-1.5 md:p-2 rounded-full hover:bg-white/10 transition-colors",
668
- type: "button",
669
- "aria-label": "Next month",
670
- children: /* @__PURE__ */ r.jsx(
671
- "svg",
672
- {
673
- className: "w-4 h-4 md:w-5 md:h-5",
674
- fill: "none",
675
- stroke: "currentColor",
676
- viewBox: "0 0 24 24",
677
- children: /* @__PURE__ */ r.jsx(
678
- "path",
679
- {
680
- strokeLinecap: "round",
681
- strokeLinejoin: "round",
682
- strokeWidth: 2,
683
- d: "M9 5l7 7-7 7"
684
- }
685
- )
686
- }
687
- )
688
- }
689
- )
690
- ] }),
691
- T ? /* @__PURE__ */ r.jsx("div", { className: "p-3 md:p-4 bg-card max-h-64 overflow-y-auto", children: /* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-3 md:grid-cols-4 gap-1.5 md:gap-2", children: O().map((t) => /* @__PURE__ */ r.jsx(
692
- "button",
693
- {
694
- onClick: () => q(t),
695
- type: "button",
696
- className: `
697
- px-2 py-1.5 md:px-3 md:py-2 rounded-lg text-xs md:text-sm font-medium transition-all
698
- ${t === a.getFullYear() ? "bg-primary text-primary-foreground shadow-md scale-105 hover:bg-primary/90" : t === (/* @__PURE__ */ new Date()).getFullYear() ? "bg-accent/20 text-accent-foreground font-bold hover:bg-accent/30" : "text-text-primary hover:bg-muted hover:scale-105"}
699
- `,
700
- children: t
701
- },
702
- t
703
- )) }) }) : /* @__PURE__ */ r.jsxs("div", { className: "p-3 md:p-4 bg-card", children: [
704
- /* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 gap-0.5 md:gap-1 mb-1.5 md:mb-2", children: W.map((t) => /* @__PURE__ */ r.jsx(
705
- "div",
706
- {
707
- className: "text-center text-[10px] md:text-xs font-medium text-muted-foreground py-1.5 md:py-2",
708
- children: t
709
- },
710
- t
711
- )) }),
712
- /* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 gap-0.5 md:gap-1", children: C.map((t, o) => /* @__PURE__ */ r.jsx(
713
- "button",
714
- {
715
- onClick: () => {
716
- t && !P(t) && B(t);
717
- },
718
- type: "button",
719
- className: `
720
- aspect-square flex items-center justify-center rounded-full
721
- text-xs md:text-sm font-medium transition-all
722
- ${t ? "" : "invisible"}
723
- ${t && A(t) ? "bg-primary text-primary-foreground shadow-md scale-105 hover:bg-primary/90" : t && X(t) ? "bg-accent text-accent-foreground font-bold hover:bg-accent/90 hover:scale-105" : "text-text-primary hover:bg-muted hover:scale-110"}
724
- ${t && P(t) ? "opacity-30 cursor-not-allowed" : "cursor-pointer"}
725
- `,
726
- children: t
727
- },
728
- o
729
- )) })
730
- ] }),
731
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between px-3 py-2 md:px-4 md:py-3 bg-surface border-t border-border gap-2", children: [
732
- /* @__PURE__ */ r.jsx(
733
- ee,
734
- {
735
- variant: "outline",
736
- size: "small",
737
- onClick: G,
738
- type: "button",
739
- className: "text-xs md:text-sm px-2 md:px-3",
740
- children: "Today"
741
- }
742
- ),
743
- /* @__PURE__ */ r.jsx(
744
- ee,
745
- {
746
- variant: "primary",
747
- size: "small",
748
- onClick: () => b(!1),
749
- type: "button",
750
- className: "text-xs md:text-sm px-2 md:px-3",
751
- children: "Done"
752
- }
753
- )
754
- ] })
755
- ]
756
- }
757
- )
758
- ] })
759
- ] });
760
- };
761
- export {
762
- ee as Button,
763
- ue as DatePicker,
764
- ie as Input
765
- };