@exitvibing/hqui 0.1.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.
package/dist/index.js ADDED
@@ -0,0 +1,1049 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ ArrowButton: () => ArrowButton,
34
+ Badge: () => Badge,
35
+ Button: () => Button,
36
+ Card: () => Card,
37
+ CardContent: () => CardContent,
38
+ CardDescription: () => CardDescription,
39
+ CardFooter: () => CardFooter,
40
+ CardHeader: () => CardHeader,
41
+ CardTitle: () => CardTitle,
42
+ Checkbox: () => Checkbox,
43
+ ChooseList: () => ChooseList,
44
+ Counter: () => Counter,
45
+ HighlightText: () => HighlightText,
46
+ Input: () => Input,
47
+ Popup: () => Popup,
48
+ ProgressBar: () => ProgressBar,
49
+ Separator: () => Separator,
50
+ StatusBar: () => StatusBar,
51
+ Switch: () => Switch,
52
+ Table: () => Table,
53
+ TableBody: () => TableBody,
54
+ TableCell: () => TableCell,
55
+ TableHead: () => TableHead,
56
+ TableHeader: () => TableHeader,
57
+ TableRow: () => TableRow,
58
+ Tabs: () => Tabs,
59
+ TabsContent: () => TabsContent,
60
+ TabsList: () => TabsList,
61
+ TabsTrigger: () => TabsTrigger,
62
+ ThemeToggle: () => ThemeToggle,
63
+ Tooltip: () => Tooltip,
64
+ WeekViewCalendar: () => WeekViewCalendar,
65
+ cn: () => cn
66
+ });
67
+ module.exports = __toCommonJS(index_exports);
68
+
69
+ // src/lib/cn.ts
70
+ var import_clsx = require("clsx");
71
+ var import_tailwind_merge = require("tailwind-merge");
72
+ function cn(...inputs) {
73
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
74
+ }
75
+
76
+ // src/components/Button.tsx
77
+ var import_react = require("react");
78
+ var import_jsx_runtime = require("react/jsx-runtime");
79
+ var variants = {
80
+ primary: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
81
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
82
+ destructive: "bg-[hsl(var(--red))] text-white shadow-sm hover:bg-[hsl(var(--red))]/90",
83
+ outline: "border border-border bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",
84
+ ghost: "hover:bg-accent hover:text-accent-foreground",
85
+ purple: "bg-[hsl(var(--purple))] text-white shadow-sm hover:bg-[hsl(var(--purple))]/90",
86
+ orange: "bg-[hsl(var(--orange))] text-white shadow-sm hover:bg-[hsl(var(--orange))]/90",
87
+ blue: "bg-[hsl(var(--blue))] text-white shadow-sm hover:bg-[hsl(var(--blue))]/90",
88
+ green: "bg-[hsl(var(--green))] text-white shadow-sm hover:bg-[hsl(var(--green))]/90"
89
+ };
90
+ var sizes = {
91
+ sm: "h-8 rounded-md px-3 text-xs gap-1.5",
92
+ default: "h-9 px-4 py-2 text-sm gap-2",
93
+ lg: "h-10 rounded-md px-6 text-base gap-2",
94
+ icon: "h-9 w-9 p-0"
95
+ };
96
+ var Button = (0, import_react.forwardRef)(
97
+ ({ className, variant = "primary", size = "default", ...props }, ref) => {
98
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
99
+ "button",
100
+ {
101
+ ref,
102
+ className: cn(
103
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
104
+ variants[variant],
105
+ sizes[size],
106
+ className
107
+ ),
108
+ ...props
109
+ }
110
+ );
111
+ }
112
+ );
113
+ Button.displayName = "Button";
114
+
115
+ // src/components/Card.tsx
116
+ var import_react2 = require("react");
117
+ var import_jsx_runtime2 = require("react/jsx-runtime");
118
+ var Card = (0, import_react2.forwardRef)(
119
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
120
+ "div",
121
+ {
122
+ ref,
123
+ className: cn(
124
+ "rounded-xl border border-border bg-card text-card-foreground shadow-sm transition-shadow hover:shadow-md",
125
+ className
126
+ ),
127
+ ...props
128
+ }
129
+ )
130
+ );
131
+ Card.displayName = "Card";
132
+ var CardHeader = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
133
+ "div",
134
+ {
135
+ ref,
136
+ className: cn("flex flex-col space-y-1.5 p-6 pb-4", className),
137
+ ...props
138
+ }
139
+ ));
140
+ CardHeader.displayName = "CardHeader";
141
+ var CardTitle = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
142
+ "h3",
143
+ {
144
+ ref,
145
+ className: cn("font-semibold leading-none tracking-tight", className),
146
+ ...props
147
+ }
148
+ ));
149
+ CardTitle.displayName = "CardTitle";
150
+ var CardDescription = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
151
+ "p",
152
+ {
153
+ ref,
154
+ className: cn("text-sm text-muted-foreground", className),
155
+ ...props
156
+ }
157
+ ));
158
+ CardDescription.displayName = "CardDescription";
159
+ var CardContent = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props }));
160
+ CardContent.displayName = "CardContent";
161
+ var CardFooter = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
162
+ "div",
163
+ {
164
+ ref,
165
+ className: cn("flex items-center p-6 pt-0", className),
166
+ ...props
167
+ }
168
+ ));
169
+ CardFooter.displayName = "CardFooter";
170
+
171
+ // src/components/Input.tsx
172
+ var import_react3 = require("react");
173
+ var import_jsx_runtime3 = require("react/jsx-runtime");
174
+ var Input = (0, import_react3.forwardRef)(
175
+ ({ className, type = "text", ...props }, ref) => {
176
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
177
+ "input",
178
+ {
179
+ type,
180
+ className: cn(
181
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
182
+ className
183
+ ),
184
+ ref,
185
+ ...props
186
+ }
187
+ );
188
+ }
189
+ );
190
+ Input.displayName = "Input";
191
+
192
+ // src/components/Checkbox.tsx
193
+ var import_react4 = __toESM(require("react"));
194
+ var import_lucide_react = require("lucide-react");
195
+ var import_jsx_runtime4 = require("react/jsx-runtime");
196
+ var Checkbox = (0, import_react4.forwardRef)(
197
+ ({ className, label, id, ...props }, ref) => {
198
+ const defaultId = import_react4.default.useId();
199
+ const inputId = id || defaultId;
200
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
201
+ "label",
202
+ {
203
+ htmlFor: inputId,
204
+ className: cn(
205
+ "flex items-center gap-2 cursor-pointer select-none",
206
+ className
207
+ ),
208
+ children: [
209
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "relative flex items-center justify-center", children: [
210
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
211
+ "input",
212
+ {
213
+ id: inputId,
214
+ type: "checkbox",
215
+ className: "peer h-4 w-4 shrink-0 rounded-sm border border-foreground/30 shadow appearance-none focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 checked:bg-foreground checked:border-foreground",
216
+ ref,
217
+ ...props
218
+ }
219
+ ),
220
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
221
+ import_lucide_react.Check,
222
+ {
223
+ className: "absolute h-3 w-3 text-background pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity",
224
+ strokeWidth: 3
225
+ }
226
+ )
227
+ ] }),
228
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label })
229
+ ]
230
+ }
231
+ );
232
+ }
233
+ );
234
+ Checkbox.displayName = "Checkbox";
235
+
236
+ // src/components/ProgressBar.tsx
237
+ var import_react5 = require("react");
238
+ var import_jsx_runtime5 = require("react/jsx-runtime");
239
+ var colorClasses = {
240
+ white: "bg-foreground",
241
+ purple: "bg-[hsl(var(--purple))]",
242
+ orange: "bg-[hsl(var(--orange))]",
243
+ blue: "bg-[hsl(var(--blue))]",
244
+ green: "bg-[hsl(var(--green))]"
245
+ };
246
+ var ProgressBar = (0, import_react5.forwardRef)(
247
+ ({
248
+ className,
249
+ value = 0,
250
+ max = 100,
251
+ showLabel = false,
252
+ color = "white",
253
+ ...props
254
+ }, ref) => {
255
+ const percentage = Math.min(Math.max(0, value / max * 100), 100);
256
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cn("flex items-center gap-3", showLabel && "w-full"), children: [
257
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
258
+ "div",
259
+ {
260
+ ref,
261
+ role: "progressbar",
262
+ "aria-valuemin": 0,
263
+ "aria-valuemax": max,
264
+ "aria-valuenow": value,
265
+ className: cn(
266
+ "relative h-2 w-full overflow-hidden rounded-full bg-secondary",
267
+ className
268
+ ),
269
+ ...props,
270
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
271
+ "div",
272
+ {
273
+ className: cn(
274
+ "h-full rounded-full transition-all duration-500 ease-out",
275
+ colorClasses[color]
276
+ ),
277
+ style: { width: `${percentage}%` }
278
+ }
279
+ )
280
+ }
281
+ ),
282
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "text-xs font-medium text-muted-foreground tabular-nums w-10 text-right", children: [
283
+ Math.round(percentage),
284
+ "%"
285
+ ] })
286
+ ] });
287
+ }
288
+ );
289
+ ProgressBar.displayName = "ProgressBar";
290
+
291
+ // src/components/Table.tsx
292
+ var import_react6 = require("react");
293
+ var import_jsx_runtime6 = require("react/jsx-runtime");
294
+ var Table = (0, import_react6.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative w-full overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
295
+ "table",
296
+ {
297
+ ref,
298
+ className: cn("w-full caption-bottom text-sm", className),
299
+ ...props
300
+ }
301
+ ) }));
302
+ Table.displayName = "Table";
303
+ var TableHeader = (0, import_react6.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
304
+ "thead",
305
+ {
306
+ ref,
307
+ className: cn("bg-muted/50 [&_tr]:border-b", className),
308
+ ...props
309
+ }
310
+ ));
311
+ TableHeader.displayName = "TableHeader";
312
+ var TableBody = (0, import_react6.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
313
+ "tbody",
314
+ {
315
+ ref,
316
+ className: cn("[&_tr:last-child]:border-0", className),
317
+ ...props
318
+ }
319
+ ));
320
+ TableBody.displayName = "TableBody";
321
+ var TableRow = (0, import_react6.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
322
+ "tr",
323
+ {
324
+ ref,
325
+ className: cn(
326
+ "border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
327
+ className
328
+ ),
329
+ ...props
330
+ }
331
+ ));
332
+ TableRow.displayName = "TableRow";
333
+ var TableHead = (0, import_react6.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
334
+ "th",
335
+ {
336
+ ref,
337
+ className: cn(
338
+ "h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
339
+ className
340
+ ),
341
+ ...props
342
+ }
343
+ ));
344
+ TableHead.displayName = "TableHead";
345
+ var TableCell = (0, import_react6.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
346
+ "td",
347
+ {
348
+ ref,
349
+ className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
350
+ ...props
351
+ }
352
+ ));
353
+ TableCell.displayName = "TableCell";
354
+
355
+ // src/components/HighlightText.tsx
356
+ var import_react7 = require("react");
357
+ var import_jsx_runtime7 = require("react/jsx-runtime");
358
+ var HighlightText = (0, import_react7.forwardRef)(
359
+ ({ className, children, ...props }, ref) => {
360
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
361
+ "span",
362
+ {
363
+ ref,
364
+ className: cn(
365
+ "bg-foreground text-background px-1.5 py-0.5 rounded font-medium",
366
+ className
367
+ ),
368
+ ...props,
369
+ children
370
+ }
371
+ );
372
+ }
373
+ );
374
+ HighlightText.displayName = "HighlightText";
375
+
376
+ // src/components/Badge.tsx
377
+ var import_react8 = require("react");
378
+ var import_jsx_runtime8 = require("react/jsx-runtime");
379
+ var colorVariants = {
380
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/80",
381
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
382
+ outline: "border border-border text-foreground",
383
+ white: "bg-foreground/10 text-foreground border border-foreground/20",
384
+ destructive: "bg-[hsl(var(--red))] text-white shadow hover:bg-[hsl(var(--red))]/80",
385
+ purple: "bg-[hsl(var(--purple))]/15 text-[hsl(var(--purple))] border border-[hsl(var(--purple))]/20",
386
+ orange: "bg-[hsl(var(--orange))]/15 text-[hsl(var(--orange))] border border-[hsl(var(--orange))]/20",
387
+ blue: "bg-[hsl(var(--blue))]/15 text-[hsl(var(--blue))] border border-[hsl(var(--blue))]/20",
388
+ green: "bg-[hsl(var(--green))]/15 text-[hsl(var(--green))] border border-[hsl(var(--green))]/20",
389
+ red: "bg-[hsl(var(--red))]/15 text-[hsl(var(--red))] border border-[hsl(var(--red))]/20"
390
+ };
391
+ var Badge = (0, import_react8.forwardRef)(
392
+ ({ className, variant = "default", ...props }, ref) => {
393
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
394
+ "span",
395
+ {
396
+ ref,
397
+ className: cn(
398
+ "inline-flex items-center rounded-md px-2 py-0.5 text-xs font-semibold transition-colors",
399
+ colorVariants[variant],
400
+ className
401
+ ),
402
+ ...props
403
+ }
404
+ );
405
+ }
406
+ );
407
+ Badge.displayName = "Badge";
408
+
409
+ // src/components/Separator.tsx
410
+ var import_react9 = require("react");
411
+ var import_jsx_runtime9 = require("react/jsx-runtime");
412
+ var Separator = (0, import_react9.forwardRef)(
413
+ ({ className, orientation = "horizontal", ...props }, ref) => {
414
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
415
+ "div",
416
+ {
417
+ ref,
418
+ role: "separator",
419
+ "aria-orientation": orientation,
420
+ className: cn(
421
+ "shrink-0 bg-border",
422
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
423
+ className
424
+ ),
425
+ ...props
426
+ }
427
+ );
428
+ }
429
+ );
430
+ Separator.displayName = "Separator";
431
+
432
+ // src/components/Tabs.tsx
433
+ var import_react10 = require("react");
434
+ var import_jsx_runtime10 = require("react/jsx-runtime");
435
+ var TabsContext = (0, import_react10.createContext)({
436
+ value: "",
437
+ onValueChange: () => {
438
+ }
439
+ });
440
+ var Tabs = (0, import_react10.forwardRef)(
441
+ ({
442
+ className,
443
+ defaultValue = "",
444
+ value: controlledValue,
445
+ onValueChange,
446
+ children,
447
+ ...props
448
+ }, ref) => {
449
+ const [uncontrolledValue, setUncontrolledValue] = (0, import_react10.useState)(defaultValue);
450
+ const isControlled = controlledValue !== void 0;
451
+ const currentValue = isControlled ? controlledValue : uncontrolledValue;
452
+ const handleChange = (newValue) => {
453
+ if (!isControlled) setUncontrolledValue(newValue);
454
+ onValueChange?.(newValue);
455
+ };
456
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
457
+ TabsContext.Provider,
458
+ {
459
+ value: { value: currentValue, onValueChange: handleChange },
460
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { ref, className: cn("w-full", className), ...props, children })
461
+ }
462
+ );
463
+ }
464
+ );
465
+ Tabs.displayName = "Tabs";
466
+ var TabsList = (0, import_react10.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
467
+ "div",
468
+ {
469
+ ref,
470
+ className: cn(
471
+ "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
472
+ className
473
+ ),
474
+ ...props
475
+ }
476
+ ));
477
+ TabsList.displayName = "TabsList";
478
+ var TabsTrigger = (0, import_react10.forwardRef)(
479
+ ({ className, value, ...props }, ref) => {
480
+ const ctx = (0, import_react10.useContext)(TabsContext);
481
+ const isActive = ctx.value === value;
482
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
483
+ "button",
484
+ {
485
+ ref,
486
+ type: "button",
487
+ role: "tab",
488
+ "aria-selected": isActive,
489
+ "data-state": isActive ? "active" : "inactive",
490
+ className: cn(
491
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
492
+ isActive ? "bg-background text-foreground shadow" : "hover:bg-background/50 hover:text-foreground",
493
+ className
494
+ ),
495
+ onClick: () => ctx.onValueChange(value),
496
+ ...props
497
+ }
498
+ );
499
+ }
500
+ );
501
+ TabsTrigger.displayName = "TabsTrigger";
502
+ var TabsContent = (0, import_react10.forwardRef)(
503
+ ({ className, value, ...props }, ref) => {
504
+ const ctx = (0, import_react10.useContext)(TabsContext);
505
+ if (ctx.value !== value) return null;
506
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
507
+ "div",
508
+ {
509
+ ref,
510
+ role: "tabpanel",
511
+ className: cn(
512
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 animate-fade-in",
513
+ className
514
+ ),
515
+ ...props
516
+ }
517
+ );
518
+ }
519
+ );
520
+ TabsContent.displayName = "TabsContent";
521
+
522
+ // src/components/Switch.tsx
523
+ var import_react11 = __toESM(require("react"));
524
+ var import_jsx_runtime11 = require("react/jsx-runtime");
525
+ var Switch = (0, import_react11.forwardRef)(
526
+ ({ className, label, id, ...props }, ref) => {
527
+ const defaultId = import_react11.default.useId();
528
+ const inputId = id || defaultId;
529
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
530
+ "label",
531
+ {
532
+ htmlFor: inputId,
533
+ className: cn(
534
+ "inline-flex items-center gap-2 cursor-pointer select-none",
535
+ className
536
+ ),
537
+ children: [
538
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "relative", children: [
539
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
540
+ "input",
541
+ {
542
+ id: inputId,
543
+ type: "checkbox",
544
+ role: "switch",
545
+ className: "peer sr-only",
546
+ ref,
547
+ ...props
548
+ }
549
+ ),
550
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-5 w-9 rounded-full border-2 border-transparent bg-input transition-colors peer-checked:bg-foreground peer-focus-visible:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background peer-disabled:cursor-not-allowed peer-disabled:opacity-50" }),
551
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "absolute left-0.5 top-0.5 h-4 w-4 rounded-full bg-background shadow-lg transition-transform peer-checked:translate-x-4 peer-checked:bg-background" })
552
+ ] }),
553
+ label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-sm font-medium leading-none", children: label })
554
+ ]
555
+ }
556
+ );
557
+ }
558
+ );
559
+ Switch.displayName = "Switch";
560
+
561
+ // src/components/Tooltip.tsx
562
+ var import_react12 = require("react");
563
+ var import_jsx_runtime12 = require("react/jsx-runtime");
564
+ var Tooltip = (0, import_react12.forwardRef)(
565
+ ({ className, content, side = "top", delayMs = 200, children, ...props }, ref) => {
566
+ const [visible, setVisible] = (0, import_react12.useState)(false);
567
+ const timeoutRef = (0, import_react12.useRef)();
568
+ const wrapperRef = (0, import_react12.useRef)(null);
569
+ const tooltipRef = (0, import_react12.useRef)(null);
570
+ const [position, setPosition] = (0, import_react12.useState)({ top: 0, left: 0 });
571
+ const show = () => {
572
+ timeoutRef.current = setTimeout(() => setVisible(true), delayMs);
573
+ };
574
+ const hide = () => {
575
+ clearTimeout(timeoutRef.current);
576
+ setVisible(false);
577
+ };
578
+ const updatePosition = (0, import_react12.useCallback)(() => {
579
+ if (!wrapperRef.current || !tooltipRef.current) return;
580
+ const trigger = wrapperRef.current.getBoundingClientRect();
581
+ const tip = tooltipRef.current.getBoundingClientRect();
582
+ const gap = 8;
583
+ let top = 0;
584
+ let left = 0;
585
+ switch (side) {
586
+ case "top":
587
+ top = trigger.top - tip.height - gap;
588
+ left = trigger.left + trigger.width / 2 - tip.width / 2;
589
+ break;
590
+ case "bottom":
591
+ top = trigger.bottom + gap;
592
+ left = trigger.left + trigger.width / 2 - tip.width / 2;
593
+ break;
594
+ case "left":
595
+ top = trigger.top + trigger.height / 2 - tip.height / 2;
596
+ left = trigger.left - tip.width - gap;
597
+ break;
598
+ case "right":
599
+ top = trigger.top + trigger.height / 2 - tip.height / 2;
600
+ left = trigger.right + gap;
601
+ break;
602
+ }
603
+ setPosition({ top, left });
604
+ }, [side]);
605
+ (0, import_react12.useEffect)(() => {
606
+ if (visible) {
607
+ requestAnimationFrame(updatePosition);
608
+ }
609
+ }, [visible, updatePosition]);
610
+ (0, import_react12.useEffect)(() => {
611
+ return () => clearTimeout(timeoutRef.current);
612
+ }, []);
613
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
614
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
615
+ "div",
616
+ {
617
+ ref: (node) => {
618
+ wrapperRef.current = node;
619
+ if (typeof ref === "function") ref(node);
620
+ else if (ref)
621
+ ref.current = node;
622
+ },
623
+ className: cn("inline-flex", className),
624
+ onMouseEnter: show,
625
+ onMouseLeave: hide,
626
+ onFocus: show,
627
+ onBlur: hide,
628
+ ...props,
629
+ children
630
+ }
631
+ ),
632
+ visible && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
633
+ "div",
634
+ {
635
+ ref: tooltipRef,
636
+ role: "tooltip",
637
+ className: "fixed z-[9999] rounded-md bg-foreground px-3 py-1.5 text-xs text-background shadow-md whitespace-nowrap pointer-events-none",
638
+ style: {
639
+ top: position.top,
640
+ left: position.left,
641
+ animation: "popup-fade-in 0.1s ease-out"
642
+ },
643
+ children: content
644
+ }
645
+ )
646
+ ] });
647
+ }
648
+ );
649
+ Tooltip.displayName = "Tooltip";
650
+
651
+ // src/components/ThemeToggle.tsx
652
+ var import_react13 = require("react");
653
+ var import_lucide_react2 = require("lucide-react");
654
+ var import_jsx_runtime13 = require("react/jsx-runtime");
655
+ var ThemeToggle = (0, import_react13.forwardRef)(
656
+ ({ className, defaultTheme }, ref) => {
657
+ const [isDark, setIsDark] = (0, import_react13.useState)(() => {
658
+ if (typeof window === "undefined") return defaultTheme === "dark";
659
+ return document.documentElement.classList.contains("dark");
660
+ });
661
+ (0, import_react13.useEffect)(() => {
662
+ if (isDark) {
663
+ document.documentElement.classList.add("dark");
664
+ } else {
665
+ document.documentElement.classList.remove("dark");
666
+ }
667
+ }, [isDark]);
668
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
669
+ Button,
670
+ {
671
+ ref,
672
+ variant: "ghost",
673
+ size: "icon",
674
+ className: cn("rounded-full", className),
675
+ onClick: () => setIsDark((prev) => !prev),
676
+ "aria-label": isDark ? "Switch to light mode" : "Switch to dark mode",
677
+ children: isDark ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.Moon, { className: "h-4 w-4" })
678
+ }
679
+ );
680
+ }
681
+ );
682
+ ThemeToggle.displayName = "ThemeToggle";
683
+
684
+ // src/components/extended/Counter.tsx
685
+ var import_react14 = require("react");
686
+ var import_lucide_react3 = require("lucide-react");
687
+ var import_jsx_runtime14 = require("react/jsx-runtime");
688
+ var Counter = (0, import_react14.forwardRef)(
689
+ ({
690
+ initialValue = 0,
691
+ min = Number.MIN_SAFE_INTEGER,
692
+ max = Number.MAX_SAFE_INTEGER,
693
+ step = 1,
694
+ onChange,
695
+ className
696
+ }, ref) => {
697
+ const [value, setValue] = (0, import_react14.useState)(initialValue);
698
+ const handleIncrement = () => {
699
+ const next = Math.min(max, value + step);
700
+ setValue(next);
701
+ onChange?.(next);
702
+ };
703
+ const handleDecrement = () => {
704
+ const next = Math.max(min, value - step);
705
+ setValue(next);
706
+ onChange?.(next);
707
+ };
708
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
709
+ "div",
710
+ {
711
+ ref,
712
+ className: cn(
713
+ "inline-flex items-center rounded-lg border border-border bg-card",
714
+ className
715
+ ),
716
+ children: [
717
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
718
+ Button,
719
+ {
720
+ variant: "ghost",
721
+ size: "icon",
722
+ className: "h-8 w-8 rounded-r-none",
723
+ onClick: handleDecrement,
724
+ disabled: value <= min,
725
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Minus, { className: "h-3.5 w-3.5" })
726
+ }
727
+ ),
728
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w-10 text-center text-sm font-medium tabular-nums border-x border-border", children: value }),
729
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
730
+ Button,
731
+ {
732
+ variant: "ghost",
733
+ size: "icon",
734
+ className: "h-8 w-8 rounded-l-none",
735
+ onClick: handleIncrement,
736
+ disabled: value >= max,
737
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Plus, { className: "h-3.5 w-3.5" })
738
+ }
739
+ )
740
+ ]
741
+ }
742
+ );
743
+ }
744
+ );
745
+ Counter.displayName = "Counter";
746
+
747
+ // src/components/extended/ArrowButton.tsx
748
+ var import_react15 = require("react");
749
+ var import_lucide_react4 = require("lucide-react");
750
+ var import_jsx_runtime15 = require("react/jsx-runtime");
751
+ var ArrowButton = (0, import_react15.forwardRef)(
752
+ ({ direction = "right", text, className, children, ...props }, ref) => {
753
+ const Icon = direction === "left" ? import_lucide_react4.ChevronLeft : import_lucide_react4.ChevronRight;
754
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
755
+ Button,
756
+ {
757
+ ref,
758
+ className: cn("gap-1", !text && !children && "px-2", className),
759
+ ...props,
760
+ children: [
761
+ direction === "left" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { className: "h-4 w-4" }),
762
+ (text || children) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: text || children }),
763
+ direction === "right" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { className: "h-4 w-4" })
764
+ ]
765
+ }
766
+ );
767
+ }
768
+ );
769
+ ArrowButton.displayName = "ArrowButton";
770
+
771
+ // src/components/extended/ChooseList.tsx
772
+ var import_react16 = require("react");
773
+ var import_lucide_react5 = require("lucide-react");
774
+ var import_jsx_runtime16 = require("react/jsx-runtime");
775
+ var ChooseList = (0, import_react16.forwardRef)(
776
+ ({ className, options, ...props }, ref) => {
777
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "relative inline-block w-full", children: [
778
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
779
+ "select",
780
+ {
781
+ ref,
782
+ className: cn(
783
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring appearance-none cursor-pointer pr-10",
784
+ className
785
+ ),
786
+ ...props,
787
+ children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
788
+ "option",
789
+ {
790
+ value: opt.value,
791
+ className: "bg-card text-foreground",
792
+ children: opt.label
793
+ },
794
+ opt.value
795
+ ))
796
+ }
797
+ ),
798
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react5.ChevronDown, { className: "h-4 w-4" }) })
799
+ ] });
800
+ }
801
+ );
802
+ ChooseList.displayName = "ChooseList";
803
+
804
+ // src/components/extended/Popup.tsx
805
+ var import_react17 = require("react");
806
+ var import_lucide_react6 = require("lucide-react");
807
+ var import_jsx_runtime17 = require("react/jsx-runtime");
808
+ var Popup = (0, import_react17.forwardRef)(
809
+ ({ className, open, onClose, title, children, ...props }, ref) => {
810
+ (0, import_react17.useEffect)(() => {
811
+ if (open) {
812
+ document.body.style.overflow = "hidden";
813
+ } else {
814
+ document.body.style.overflow = "";
815
+ }
816
+ return () => {
817
+ document.body.style.overflow = "";
818
+ };
819
+ }, [open]);
820
+ (0, import_react17.useEffect)(() => {
821
+ const handleEscape = (e) => {
822
+ if (e.key === "Escape") onClose();
823
+ };
824
+ if (open) document.addEventListener("keydown", handleEscape);
825
+ return () => document.removeEventListener("keydown", handleEscape);
826
+ }, [open, onClose]);
827
+ if (!open) return null;
828
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
829
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
830
+ "div",
831
+ {
832
+ className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
833
+ style: { animation: "popup-fade-in 0.15s ease-out" },
834
+ onClick: onClose
835
+ }
836
+ ),
837
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
838
+ "div",
839
+ {
840
+ ref,
841
+ role: "dialog",
842
+ "aria-modal": "true",
843
+ className: cn(
844
+ "relative z-50 w-full max-w-lg rounded-xl border border-border bg-card p-6 shadow-2xl",
845
+ className
846
+ ),
847
+ style: { animation: "popup-scale-in 0.15s ease-out" },
848
+ ...props,
849
+ children: [
850
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [
851
+ title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "text-lg font-semibold tracking-tight", children: title }),
852
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
853
+ Button,
854
+ {
855
+ variant: "ghost",
856
+ size: "icon",
857
+ className: "h-7 w-7 rounded-full ml-auto",
858
+ onClick: onClose,
859
+ "aria-label": "Close popup",
860
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react6.X, { className: "h-4 w-4" })
861
+ }
862
+ )
863
+ ] }),
864
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "text-sm text-muted-foreground", children })
865
+ ]
866
+ }
867
+ )
868
+ ] });
869
+ }
870
+ );
871
+ Popup.displayName = "Popup";
872
+
873
+ // src/components/extended/StatusBar.tsx
874
+ var import_react18 = require("react");
875
+ var import_jsx_runtime18 = require("react/jsx-runtime");
876
+ var statusStyles = {
877
+ idle: "bg-muted-foreground",
878
+ working: "bg-[hsl(var(--blue))] animate-pulse",
879
+ error: "bg-[hsl(var(--orange))]",
880
+ ready: "bg-[hsl(var(--purple))]",
881
+ live: "bg-[hsl(var(--purple))] animate-pulse"
882
+ };
883
+ var StatusBar = (0, import_react18.forwardRef)(
884
+ ({ className, status = "idle", label, children, ...props }, ref) => {
885
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
886
+ "div",
887
+ {
888
+ ref,
889
+ role: "status",
890
+ className: cn(
891
+ "inline-flex items-center gap-2 rounded-full border border-border bg-card px-3 py-1",
892
+ className
893
+ ),
894
+ ...props,
895
+ children: [
896
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
897
+ "span",
898
+ {
899
+ className: cn("h-2 w-2 rounded-full", statusStyles[status]),
900
+ "aria-hidden": "true"
901
+ }
902
+ ),
903
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs font-semibold uppercase tracking-wider", children: label || status }),
904
+ children && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs text-muted-foreground border-l border-border pl-2", children })
905
+ ]
906
+ }
907
+ );
908
+ }
909
+ );
910
+ StatusBar.displayName = "StatusBar";
911
+
912
+ // src/components/extended/WeekViewCalendar.tsx
913
+ var import_react19 = require("react");
914
+ var import_jsx_runtime19 = require("react/jsx-runtime");
915
+ var WeekViewCalendar = (0, import_react19.forwardRef)(({ className, events = [], startHour = 8, endHour = 18, ...props }, ref) => {
916
+ const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
917
+ const hours = Array.from(
918
+ { length: endHour - startHour },
919
+ (_, i) => i + startHour
920
+ );
921
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
922
+ "div",
923
+ {
924
+ ref,
925
+ className: cn(
926
+ "flex flex-col rounded-lg border border-border overflow-hidden bg-card",
927
+ className
928
+ ),
929
+ ...props,
930
+ children: [
931
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "grid grid-cols-8 border-b border-border bg-muted/30", children: [
932
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex items-center justify-center border-r border-border p-2 text-xs font-medium text-muted-foreground w-16", children: "Time" }),
933
+ days.map((day, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
934
+ "div",
935
+ {
936
+ className: cn(
937
+ "p-2 text-center text-sm font-semibold",
938
+ i < 6 && "border-r border-border"
939
+ ),
940
+ children: day
941
+ },
942
+ day
943
+ ))
944
+ ] }),
945
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "relative overflow-y-auto max-h-[500px] custom-scrollbar", children: [
946
+ hours.map((hour, hIndex) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
947
+ "div",
948
+ {
949
+ className: cn(
950
+ "grid grid-cols-8",
951
+ hIndex < hours.length - 1 && "border-b border-border/50"
952
+ ),
953
+ children: [
954
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex items-start justify-center border-r border-border p-2 text-xs text-muted-foreground w-16 sticky left-0 bg-card", children: `${hour === 0 ? 12 : hour > 12 ? hour - 12 : hour} ${hour >= 12 ? "PM" : "AM"}` }),
955
+ days.map((_, dIndex) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
956
+ "div",
957
+ {
958
+ className: cn(
959
+ "h-16 relative",
960
+ dIndex < 6 && "border-r border-border/50"
961
+ )
962
+ },
963
+ dIndex
964
+ ))
965
+ ]
966
+ },
967
+ hour
968
+ )),
969
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
970
+ "div",
971
+ {
972
+ className: "absolute inset-0 z-10 pointer-events-none",
973
+ style: { paddingLeft: "4rem" },
974
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "relative w-full h-full", children: events.map((event) => {
975
+ if (event.startHour < startHour || event.startHour >= endHour)
976
+ return null;
977
+ const top = (event.startHour - startHour) / (endHour - startHour) * 100;
978
+ const height = event.durationHours / (endHour - startHour) * 100;
979
+ const left = event.dayIndex / 7 * 100;
980
+ const width = 100 / 7;
981
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
982
+ "div",
983
+ {
984
+ className: "absolute p-0.5 pointer-events-auto",
985
+ style: {
986
+ top: `${top}%`,
987
+ left: `${left}%`,
988
+ height: `${height}%`,
989
+ width: `${width}%`
990
+ },
991
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
992
+ "div",
993
+ {
994
+ className: "h-full w-full rounded-md border border-white/10 p-1.5 text-xs font-semibold text-white overflow-hidden shadow-sm transition-transform hover:scale-[1.02] hover:shadow-md cursor-pointer",
995
+ style: {
996
+ backgroundColor: event.color || "hsl(var(--primary))"
997
+ },
998
+ title: event.title,
999
+ children: event.title
1000
+ }
1001
+ )
1002
+ },
1003
+ event.id
1004
+ );
1005
+ }) })
1006
+ }
1007
+ )
1008
+ ] })
1009
+ ]
1010
+ }
1011
+ );
1012
+ });
1013
+ WeekViewCalendar.displayName = "WeekViewCalendar";
1014
+ // Annotate the CommonJS export names for ESM import in node:
1015
+ 0 && (module.exports = {
1016
+ ArrowButton,
1017
+ Badge,
1018
+ Button,
1019
+ Card,
1020
+ CardContent,
1021
+ CardDescription,
1022
+ CardFooter,
1023
+ CardHeader,
1024
+ CardTitle,
1025
+ Checkbox,
1026
+ ChooseList,
1027
+ Counter,
1028
+ HighlightText,
1029
+ Input,
1030
+ Popup,
1031
+ ProgressBar,
1032
+ Separator,
1033
+ StatusBar,
1034
+ Switch,
1035
+ Table,
1036
+ TableBody,
1037
+ TableCell,
1038
+ TableHead,
1039
+ TableHeader,
1040
+ TableRow,
1041
+ Tabs,
1042
+ TabsContent,
1043
+ TabsList,
1044
+ TabsTrigger,
1045
+ ThemeToggle,
1046
+ Tooltip,
1047
+ WeekViewCalendar,
1048
+ cn
1049
+ });