tokka-ui 0.1.0 → 0.2.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/accordion.d.ts +9 -0
- package/dist/accordion.js +51 -0
- package/dist/alert-dialog.d.ts +23 -0
- package/dist/alert-dialog.js +122 -0
- package/dist/alert.d.ts +11 -0
- package/dist/alert.js +55 -0
- package/dist/aspect-ratio.d.ts +6 -0
- package/dist/aspect-ratio.js +6 -0
- package/dist/avatar.d.ts +8 -0
- package/dist/avatar.js +46 -0
- package/dist/badge.d.ts +13 -0
- package/dist/badge.js +31 -0
- package/dist/breadcrumb.d.ts +22 -0
- package/dist/breadcrumb.js +97 -0
- package/dist/button.d.ts +1 -1
- package/dist/button.js +4 -51
- package/dist/calendar.d.ts +11 -0
- package/dist/calendar.js +8 -0
- package/dist/carousel.d.ts +23 -0
- package/dist/carousel.js +200 -0
- package/dist/chart.d.ts +1 -0
- package/dist/chart.js +2 -0
- package/dist/checkbox.d.ts +6 -0
- package/dist/checkbox.js +31 -0
- package/dist/chunk-63HUTNB3.js +92 -0
- package/dist/chunk-7BHODGBN.js +25 -0
- package/dist/chunk-A4HW2TQU.js +66 -0
- package/dist/chunk-BOKKBA25.js +30 -0
- package/dist/chunk-DVPPDIDA.js +57 -0
- package/dist/chunk-FJGEWLIV.js +109 -0
- package/dist/chunk-KDTBFEE2.js +123 -0
- package/dist/chunk-PLLTYLGO.js +120 -0
- package/dist/chunk-QBAV4RWS.js +43 -0
- package/dist/collapsible.d.ts +8 -0
- package/dist/collapsible.js +10 -0
- package/dist/combobox.d.ts +6 -0
- package/dist/combobox.js +32 -0
- package/dist/command.d.ts +85 -0
- package/dist/command.js +24 -0
- package/dist/context-menu.d.ts +30 -0
- package/dist/context-menu.js +157 -0
- package/dist/data-table.d.ts +2 -0
- package/dist/data-table.js +21 -0
- package/dist/date-picker.d.ts +6 -0
- package/dist/date-picker.js +16 -0
- package/dist/dialog.d.ts +22 -0
- package/dist/dialog.js +25 -0
- package/dist/drawer.d.ts +27 -0
- package/dist/drawer.js +105 -0
- package/dist/dropdown-menu.d.ts +30 -0
- package/dist/dropdown-menu.js +155 -0
- package/dist/form.d.ts +28 -0
- package/dist/form.js +120 -0
- package/dist/hover-card.d.ts +8 -0
- package/dist/hover-card.js +29 -0
- package/dist/input-otp.d.ts +37 -0
- package/dist/input-otp.js +53 -0
- package/dist/label.d.ts +8 -0
- package/dist/label.js +7 -0
- package/dist/menubar.d.ts +31 -0
- package/dist/menubar.js +186 -0
- package/dist/native-select.d.ts +7 -0
- package/dist/native-select.js +31 -0
- package/dist/navigation-menu.d.ts +15 -0
- package/dist/navigation-menu.js +111 -0
- package/dist/pagination.d.ts +33 -0
- package/dist/pagination.js +111 -0
- package/dist/popover.d.ts +8 -0
- package/dist/popover.js +11 -0
- package/dist/progress.d.ts +6 -0
- package/dist/progress.js +30 -0
- package/dist/radio-group.d.ts +7 -0
- package/dist/radio-group.js +39 -0
- package/dist/resizable.d.ts +27 -0
- package/dist/resizable.js +42 -0
- package/dist/scroll-area.d.ts +7 -0
- package/dist/scroll-area.js +42 -0
- package/dist/select.d.ts +15 -0
- package/dist/select.js +128 -0
- package/dist/separator.d.ts +6 -0
- package/dist/separator.js +28 -0
- package/dist/sheet.d.ts +29 -0
- package/dist/sheet.js +25 -0
- package/dist/sidebar.d.ts +30 -0
- package/dist/sidebar.js +203 -0
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.js +21 -0
- package/dist/slider.d.ts +6 -0
- package/dist/slider.js +27 -0
- package/dist/sonner.d.ts +7 -0
- package/dist/sonner.js +23 -0
- package/dist/spinner.d.ts +12 -0
- package/dist/spinner.js +29 -0
- package/dist/switch.d.ts +6 -0
- package/dist/switch.js +31 -0
- package/dist/table.d.ts +12 -0
- package/dist/table.js +21 -0
- package/dist/tabs.d.ts +9 -0
- package/dist/tabs.js +51 -0
- package/dist/textarea.d.ts +7 -0
- package/dist/textarea.js +26 -0
- package/dist/toggle-group.d.ts +15 -0
- package/dist/toggle-group.js +49 -0
- package/dist/toggle.d.ts +15 -0
- package/dist/toggle.js +9 -0
- package/dist/tooltip.d.ts +9 -0
- package/dist/tooltip.js +30 -0
- package/package.json +237 -8
- package/src/accordion.tsx +55 -0
- package/src/alert-dialog.tsx +138 -0
- package/src/alert.tsx +58 -0
- package/src/aspect-ratio.tsx +5 -0
- package/src/avatar.tsx +47 -0
- package/src/badge.tsx +35 -0
- package/src/breadcrumb.tsx +114 -0
- package/src/calendar.tsx +63 -0
- package/src/carousel.tsx +259 -0
- package/src/chart.tsx +9 -0
- package/src/checkbox.tsx +27 -0
- package/src/collapsible.tsx +9 -0
- package/src/combobox.tsx +8 -0
- package/src/command.tsx +152 -0
- package/src/context-menu.tsx +197 -0
- package/src/data-table.tsx +9 -0
- package/src/date-picker.tsx +8 -0
- package/src/dialog.tsx +119 -0
- package/src/drawer.tsx +115 -0
- package/src/dropdown-menu.tsx +197 -0
- package/src/form.tsx +175 -0
- package/src/hover-card.tsx +26 -0
- package/src/input-otp.tsx +68 -0
- package/src/label.tsx +23 -0
- package/src/menubar.tsx +233 -0
- package/src/native-select.tsx +29 -0
- package/src/navigation-menu.tsx +127 -0
- package/src/pagination.tsx +116 -0
- package/src/popover.tsx +28 -0
- package/src/progress.tsx +25 -0
- package/src/radio-group.tsx +41 -0
- package/src/resizable.tsx +42 -0
- package/src/scroll-area.tsx +45 -0
- package/src/select.tsx +157 -0
- package/src/separator.tsx +28 -0
- package/src/sheet.tsx +137 -0
- package/src/sidebar.tsx +249 -0
- package/src/skeleton.tsx +15 -0
- package/src/slider.tsx +25 -0
- package/src/sonner.tsx +25 -0
- package/src/spinner.tsx +33 -0
- package/src/switch.tsx +26 -0
- package/src/table.tsx +116 -0
- package/src/tabs.tsx +52 -0
- package/src/textarea.tsx +23 -0
- package/src/toggle-group.tsx +58 -0
- package/src/toggle.tsx +42 -0
- package/src/tooltip.tsx +27 -0
- package/LICENSE +0 -21
package/dist/carousel.js
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button
|
|
3
|
+
} from "./chunk-DVPPDIDA.js";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "./chunk-RQHJBTEU.js";
|
|
7
|
+
|
|
8
|
+
// src/carousel.tsx
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
11
|
+
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
var CarouselContext = React.createContext(null);
|
|
14
|
+
function useCarousel() {
|
|
15
|
+
const context = React.useContext(CarouselContext);
|
|
16
|
+
if (!context) {
|
|
17
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
18
|
+
}
|
|
19
|
+
return context;
|
|
20
|
+
}
|
|
21
|
+
var Carousel = React.forwardRef(
|
|
22
|
+
({
|
|
23
|
+
orientation = "horizontal",
|
|
24
|
+
opts,
|
|
25
|
+
setApi,
|
|
26
|
+
plugins,
|
|
27
|
+
className,
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}, ref) => {
|
|
31
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
32
|
+
{
|
|
33
|
+
...opts,
|
|
34
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
35
|
+
},
|
|
36
|
+
plugins
|
|
37
|
+
);
|
|
38
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
39
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
40
|
+
const onSelect = React.useCallback((api2) => {
|
|
41
|
+
if (!api2) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
45
|
+
setCanScrollNext(api2.canScrollNext());
|
|
46
|
+
}, []);
|
|
47
|
+
const scrollPrev = React.useCallback(() => {
|
|
48
|
+
api?.scrollPrev();
|
|
49
|
+
}, [api]);
|
|
50
|
+
const scrollNext = React.useCallback(() => {
|
|
51
|
+
api?.scrollNext();
|
|
52
|
+
}, [api]);
|
|
53
|
+
const handleKeyDown = React.useCallback(
|
|
54
|
+
(event) => {
|
|
55
|
+
if (event.key === "ArrowLeft") {
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
scrollPrev();
|
|
58
|
+
} else if (event.key === "ArrowRight") {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
scrollNext();
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
[scrollPrev, scrollNext]
|
|
64
|
+
);
|
|
65
|
+
React.useEffect(() => {
|
|
66
|
+
if (!api || !setApi) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
setApi(api);
|
|
70
|
+
}, [api, setApi]);
|
|
71
|
+
React.useEffect(() => {
|
|
72
|
+
if (!api) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
onSelect(api);
|
|
76
|
+
api.on("reInit", onSelect);
|
|
77
|
+
api.on("select", onSelect);
|
|
78
|
+
return () => {
|
|
79
|
+
api?.off("select", onSelect);
|
|
80
|
+
};
|
|
81
|
+
}, [api, onSelect]);
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
CarouselContext.Provider,
|
|
84
|
+
{
|
|
85
|
+
value: {
|
|
86
|
+
carouselRef,
|
|
87
|
+
api,
|
|
88
|
+
opts,
|
|
89
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
90
|
+
scrollPrev,
|
|
91
|
+
scrollNext,
|
|
92
|
+
canScrollPrev,
|
|
93
|
+
canScrollNext
|
|
94
|
+
},
|
|
95
|
+
children: /* @__PURE__ */ jsx(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
ref,
|
|
99
|
+
onKeyDownCapture: handleKeyDown,
|
|
100
|
+
className: cn("relative", className),
|
|
101
|
+
role: "region",
|
|
102
|
+
"aria-roledescription": "carousel",
|
|
103
|
+
...props,
|
|
104
|
+
children
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
Carousel.displayName = "Carousel";
|
|
112
|
+
var CarouselContent = React.forwardRef(({ className, ...props }, ref) => {
|
|
113
|
+
const { carouselRef, orientation } = useCarousel();
|
|
114
|
+
return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
ref,
|
|
118
|
+
className: cn(
|
|
119
|
+
"flex",
|
|
120
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
121
|
+
className
|
|
122
|
+
),
|
|
123
|
+
...props
|
|
124
|
+
}
|
|
125
|
+
) });
|
|
126
|
+
});
|
|
127
|
+
CarouselContent.displayName = "CarouselContent";
|
|
128
|
+
var CarouselItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
129
|
+
const { orientation } = useCarousel();
|
|
130
|
+
return /* @__PURE__ */ jsx(
|
|
131
|
+
"div",
|
|
132
|
+
{
|
|
133
|
+
ref,
|
|
134
|
+
role: "group",
|
|
135
|
+
"aria-roledescription": "slide",
|
|
136
|
+
className: cn(
|
|
137
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
138
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
139
|
+
className
|
|
140
|
+
),
|
|
141
|
+
...props
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
});
|
|
145
|
+
CarouselItem.displayName = "CarouselItem";
|
|
146
|
+
var CarouselPrevious = React.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
147
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
148
|
+
return /* @__PURE__ */ jsxs(
|
|
149
|
+
Button,
|
|
150
|
+
{
|
|
151
|
+
ref,
|
|
152
|
+
variant,
|
|
153
|
+
size,
|
|
154
|
+
className: cn(
|
|
155
|
+
"absolute size-8 rounded-full",
|
|
156
|
+
orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
157
|
+
className
|
|
158
|
+
),
|
|
159
|
+
disabled: !canScrollPrev,
|
|
160
|
+
onClick: scrollPrev,
|
|
161
|
+
...props,
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ jsx(ArrowLeft, { className: "size-4" }),
|
|
164
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
});
|
|
169
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
170
|
+
var CarouselNext = React.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
171
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
172
|
+
return /* @__PURE__ */ jsxs(
|
|
173
|
+
Button,
|
|
174
|
+
{
|
|
175
|
+
ref,
|
|
176
|
+
variant,
|
|
177
|
+
size,
|
|
178
|
+
className: cn(
|
|
179
|
+
"absolute size-8 rounded-full",
|
|
180
|
+
orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
181
|
+
className
|
|
182
|
+
),
|
|
183
|
+
disabled: !canScrollNext,
|
|
184
|
+
onClick: scrollNext,
|
|
185
|
+
...props,
|
|
186
|
+
children: [
|
|
187
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "size-4" }),
|
|
188
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
});
|
|
193
|
+
CarouselNext.displayName = "CarouselNext";
|
|
194
|
+
export {
|
|
195
|
+
Carousel,
|
|
196
|
+
CarouselContent,
|
|
197
|
+
CarouselItem,
|
|
198
|
+
CarouselNext,
|
|
199
|
+
CarouselPrevious
|
|
200
|
+
};
|
package/dist/chart.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'recharts';
|
package/dist/chart.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
|
|
4
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
|
|
6
|
+
export { Checkbox };
|
package/dist/checkbox.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-RQHJBTEU.js";
|
|
4
|
+
|
|
5
|
+
// src/checkbox.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
8
|
+
import { Check } from "lucide-react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
11
|
+
CheckboxPrimitive.Root,
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
className: cn(
|
|
15
|
+
"peer size-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props,
|
|
19
|
+
children: /* @__PURE__ */ jsx(
|
|
20
|
+
CheckboxPrimitive.Indicator,
|
|
21
|
+
{
|
|
22
|
+
className: cn("flex items-center justify-center text-current"),
|
|
23
|
+
children: /* @__PURE__ */ jsx(Check, { className: "size-4" })
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
29
|
+
export {
|
|
30
|
+
Checkbox
|
|
31
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-RQHJBTEU.js";
|
|
4
|
+
|
|
5
|
+
// src/table.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var Table = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
9
|
+
"table",
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
) }));
|
|
16
|
+
Table.displayName = "Table";
|
|
17
|
+
var TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
18
|
+
TableHeader.displayName = "TableHeader";
|
|
19
|
+
var TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
20
|
+
"tbody",
|
|
21
|
+
{
|
|
22
|
+
ref,
|
|
23
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
));
|
|
27
|
+
TableBody.displayName = "TableBody";
|
|
28
|
+
var TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
29
|
+
"tfoot",
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
className: cn(
|
|
33
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props
|
|
37
|
+
}
|
|
38
|
+
));
|
|
39
|
+
TableFooter.displayName = "TableFooter";
|
|
40
|
+
var TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
41
|
+
"tr",
|
|
42
|
+
{
|
|
43
|
+
ref,
|
|
44
|
+
className: cn(
|
|
45
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
));
|
|
51
|
+
TableRow.displayName = "TableRow";
|
|
52
|
+
var TableHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
53
|
+
"th",
|
|
54
|
+
{
|
|
55
|
+
ref,
|
|
56
|
+
className: cn(
|
|
57
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
58
|
+
className
|
|
59
|
+
),
|
|
60
|
+
...props
|
|
61
|
+
}
|
|
62
|
+
));
|
|
63
|
+
TableHead.displayName = "TableHead";
|
|
64
|
+
var TableCell = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
65
|
+
"td",
|
|
66
|
+
{
|
|
67
|
+
ref,
|
|
68
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
));
|
|
72
|
+
TableCell.displayName = "TableCell";
|
|
73
|
+
var TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
74
|
+
"caption",
|
|
75
|
+
{
|
|
76
|
+
ref,
|
|
77
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
));
|
|
81
|
+
TableCaption.displayName = "TableCaption";
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
Table,
|
|
85
|
+
TableHeader,
|
|
86
|
+
TableBody,
|
|
87
|
+
TableFooter,
|
|
88
|
+
TableRow,
|
|
89
|
+
TableHead,
|
|
90
|
+
TableCell,
|
|
91
|
+
TableCaption
|
|
92
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-RQHJBTEU.js";
|
|
4
|
+
|
|
5
|
+
// src/label.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var labelVariants = cva(
|
|
11
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
12
|
+
);
|
|
13
|
+
var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14
|
+
LabelPrimitive.Root,
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
className: cn(labelVariants(), className),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
Label
|
|
25
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buttonVariants
|
|
3
|
+
} from "./chunk-DVPPDIDA.js";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "./chunk-RQHJBTEU.js";
|
|
7
|
+
|
|
8
|
+
// src/calendar.tsx
|
|
9
|
+
import "react";
|
|
10
|
+
import { DayPicker } from "react-day-picker";
|
|
11
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
function Calendar({
|
|
14
|
+
className,
|
|
15
|
+
classNames,
|
|
16
|
+
showOutsideDays = true,
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
DayPicker,
|
|
21
|
+
{
|
|
22
|
+
showOutsideDays,
|
|
23
|
+
className: cn("p-3", className),
|
|
24
|
+
classNames: {
|
|
25
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
26
|
+
month: "space-y-4",
|
|
27
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
28
|
+
caption_label: "text-sm font-medium",
|
|
29
|
+
nav: "space-x-1 flex items-center",
|
|
30
|
+
nav_button: cn(
|
|
31
|
+
buttonVariants({ variant: "outline" }),
|
|
32
|
+
"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
33
|
+
),
|
|
34
|
+
nav_button_previous: "absolute left-1",
|
|
35
|
+
nav_button_next: "absolute right-1",
|
|
36
|
+
table: "w-full border-collapse space-y-1",
|
|
37
|
+
head_row: "flex",
|
|
38
|
+
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
39
|
+
row: "flex w-full mt-2",
|
|
40
|
+
cell: "size-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
41
|
+
day: cn(
|
|
42
|
+
buttonVariants({ variant: "ghost" }),
|
|
43
|
+
"size-9 p-0 font-normal aria-selected:opacity-100"
|
|
44
|
+
),
|
|
45
|
+
day_range_end: "day-range-end",
|
|
46
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
47
|
+
day_today: "bg-accent text-accent-foreground",
|
|
48
|
+
day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
|
|
49
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
50
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
51
|
+
day_hidden: "invisible",
|
|
52
|
+
...classNames
|
|
53
|
+
},
|
|
54
|
+
components: {
|
|
55
|
+
IconLeft: () => /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4" }),
|
|
56
|
+
IconRight: () => /* @__PURE__ */ jsx(ChevronRight, { className: "size-4" })
|
|
57
|
+
},
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
Calendar.displayName = "Calendar";
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
Calendar
|
|
66
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-RQHJBTEU.js";
|
|
4
|
+
|
|
5
|
+
// src/popover.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Popover = PopoverPrimitive.Root;
|
|
10
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
11
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
12
|
+
PopoverPrimitive.Content,
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
align,
|
|
16
|
+
sideOffset,
|
|
17
|
+
className: cn(
|
|
18
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
) }));
|
|
24
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
Popover,
|
|
28
|
+
PopoverTrigger,
|
|
29
|
+
PopoverContent
|
|
30
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-RQHJBTEU.js";
|
|
4
|
+
|
|
5
|
+
// src/button.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsxs } from "react/jsx-runtime";
|
|
10
|
+
var buttonVariants = cva(
|
|
11
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium 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",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
16
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
17
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
18
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
19
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
20
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: "h-10 px-4 py-2",
|
|
24
|
+
sm: "h-9 rounded-md px-3",
|
|
25
|
+
lg: "h-11 rounded-md px-8",
|
|
26
|
+
icon: "size-10"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "default"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
var Button = React.forwardRef(
|
|
36
|
+
({ className, variant, size, asChild = false, icon, children, ...props }, ref) => {
|
|
37
|
+
const Comp = asChild ? Slot : "button";
|
|
38
|
+
return /* @__PURE__ */ jsxs(
|
|
39
|
+
Comp,
|
|
40
|
+
{
|
|
41
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
42
|
+
ref,
|
|
43
|
+
...props,
|
|
44
|
+
children: [
|
|
45
|
+
icon,
|
|
46
|
+
children
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
Button.displayName = "Button";
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
buttonVariants,
|
|
56
|
+
Button
|
|
57
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-RQHJBTEU.js";
|
|
4
|
+
|
|
5
|
+
// src/dialog.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
8
|
+
import { X } from "lucide-react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var Dialog = DialogPrimitive.Root;
|
|
11
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
12
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
13
|
+
var DialogClose = DialogPrimitive.Close;
|
|
14
|
+
var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
15
|
+
DialogPrimitive.Overlay,
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
className: cn(
|
|
19
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
20
|
+
className
|
|
21
|
+
),
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
));
|
|
25
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
26
|
+
var DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
27
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
28
|
+
/* @__PURE__ */ jsxs(
|
|
29
|
+
DialogPrimitive.Content,
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
className: cn(
|
|
33
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props,
|
|
37
|
+
children: [
|
|
38
|
+
children,
|
|
39
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
40
|
+
/* @__PURE__ */ jsx(X, { className: "size-4" }),
|
|
41
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
42
|
+
] })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] }));
|
|
47
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
48
|
+
var DialogHeader = ({
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}) => /* @__PURE__ */ jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: cn(
|
|
55
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
56
|
+
className
|
|
57
|
+
),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
DialogHeader.displayName = "DialogHeader";
|
|
62
|
+
var DialogFooter = ({
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}) => /* @__PURE__ */ jsx(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: cn(
|
|
69
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
70
|
+
className
|
|
71
|
+
),
|
|
72
|
+
...props
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
DialogFooter.displayName = "DialogFooter";
|
|
76
|
+
var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
77
|
+
DialogPrimitive.Title,
|
|
78
|
+
{
|
|
79
|
+
ref,
|
|
80
|
+
className: cn(
|
|
81
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
82
|
+
className
|
|
83
|
+
),
|
|
84
|
+
...props
|
|
85
|
+
}
|
|
86
|
+
));
|
|
87
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
88
|
+
var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
89
|
+
DialogPrimitive.Description,
|
|
90
|
+
{
|
|
91
|
+
ref,
|
|
92
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
93
|
+
...props
|
|
94
|
+
}
|
|
95
|
+
));
|
|
96
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
Dialog,
|
|
100
|
+
DialogTrigger,
|
|
101
|
+
DialogPortal,
|
|
102
|
+
DialogClose,
|
|
103
|
+
DialogOverlay,
|
|
104
|
+
DialogContent,
|
|
105
|
+
DialogHeader,
|
|
106
|
+
DialogFooter,
|
|
107
|
+
DialogTitle,
|
|
108
|
+
DialogDescription
|
|
109
|
+
};
|