@hex-core/components 1.3.1 → 1.4.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/README.md +183 -9
- package/dist/accordion.d.ts +13 -0
- package/dist/accordion.js +62 -0
- package/dist/accordion.js.map +1 -0
- package/dist/alert-dialog.d.ts +34 -0
- package/dist/alert-dialog.js +125 -0
- package/dist/alert-dialog.js.map +1 -0
- package/dist/alert.d.ts +17 -0
- package/dist/alert.js +54 -0
- package/dist/alert.js.map +1 -0
- package/dist/aspect-ratio.d.ts +7 -0
- package/dist/aspect-ratio.js +8 -0
- package/dist/aspect-ratio.js.map +1 -0
- package/dist/avatar.d.ts +11 -0
- package/dist/avatar.js +44 -0
- package/dist/avatar.js.map +1 -0
- package/dist/badge.d.ts +22 -0
- package/dist/badge.js +36 -0
- package/dist/badge.js.map +1 -0
- package/dist/breadcrumb.d.ts +27 -0
- package/dist/breadcrumb.js +120 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/button-variants-Bx6gCUFp.d.ts +19 -0
- package/dist/button.d.ts +13 -0
- package/dist/button.js +113 -0
- package/dist/button.js.map +1 -0
- package/dist/calendar.d.ts +17 -0
- package/dist/calendar.js +126 -0
- package/dist/calendar.js.map +1 -0
- package/dist/card.d.ts +16 -0
- package/dist/card.js +68 -0
- package/dist/card.js.map +1 -0
- package/dist/checkbox.d.ts +11 -0
- package/dist/checkbox.js +65 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/cluster.d.ts +34 -0
- package/dist/cluster.js +50 -0
- package/dist/cluster.js.map +1 -0
- package/dist/collapsible.d.ts +11 -0
- package/dist/collapsible.js +10 -0
- package/dist/collapsible.js.map +1 -0
- package/dist/color-picker.d.ts +44 -0
- package/dist/color-picker.js +321 -0
- package/dist/color-picker.js.map +1 -0
- package/dist/combobox.d.ts +45 -0
- package/dist/combobox.js +226 -0
- package/dist/combobox.js.map +1 -0
- package/dist/command.d.ts +111 -0
- package/dist/command.js +232 -0
- package/dist/command.js.map +1 -0
- package/dist/container.d.ts +41 -0
- package/dist/container.js +39 -0
- package/dist/container.js.map +1 -0
- package/dist/context-menu.d.ts +37 -0
- package/dist/context-menu.js +130 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/data-table.d.ts +33 -0
- package/dist/data-table.js +103 -0
- package/dist/data-table.js.map +1 -0
- package/dist/date-picker.d.ts +43 -0
- package/dist/date-picker.js +221 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/dialog.d.ts +46 -0
- package/dist/dialog.js +125 -0
- package/dist/dialog.js.map +1 -0
- package/dist/drawer.d.ts +41 -0
- package/dist/drawer.js +82 -0
- package/dist/drawer.js.map +1 -0
- package/dist/dropdown-menu.d.ts +39 -0
- package/dist/dropdown-menu.js +133 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/dropzone.d.ts +54 -0
- package/dist/dropzone.js +194 -0
- package/dist/dropzone.js.map +1 -0
- package/dist/file-tree.d.ts +53 -0
- package/dist/file-tree.js +322 -0
- package/dist/file-tree.js.map +1 -0
- package/dist/form.d.ts +45 -0
- package/dist/form.js +114 -0
- package/dist/form.js.map +1 -0
- package/dist/grid.d.ts +50 -0
- package/dist/grid.js +58 -0
- package/dist/grid.js.map +1 -0
- package/dist/hover-card.d.ts +11 -0
- package/dist/hover-card.js +34 -0
- package/dist/hover-card.js.map +1 -0
- package/dist/index.d.ts +98 -1571
- package/dist/index.js +527 -5536
- package/dist/index.js.map +1 -1
- package/dist/input-otp.d.ts +19 -0
- package/dist/input-otp.js +71 -0
- package/dist/input-otp.js.map +1 -0
- package/dist/input.d.ts +6 -0
- package/dist/input.js +40 -0
- package/dist/input.js.map +1 -0
- package/dist/label.d.ts +11 -0
- package/dist/label.js +22 -0
- package/dist/label.js.map +1 -0
- package/dist/menubar.d.ts +35 -0
- package/dist/menubar.js +106 -0
- package/dist/menubar.js.map +1 -0
- package/dist/multi-combobox.d.ts +51 -0
- package/dist/multi-combobox.js +258 -0
- package/dist/multi-combobox.js.map +1 -0
- package/dist/navigation-menu.d.ts +23 -0
- package/dist/navigation-menu.js +108 -0
- package/dist/navigation-menu.js.map +1 -0
- package/dist/pagination.d.ts +40 -0
- package/dist/pagination.js +195 -0
- package/dist/pagination.js.map +1 -0
- package/dist/popover.d.ts +13 -0
- package/dist/popover.js +35 -0
- package/dist/popover.js.map +1 -0
- package/dist/progress.d.ts +10 -0
- package/dist/progress.js +38 -0
- package/dist/progress.js.map +1 -0
- package/dist/radio-group.d.ts +9 -0
- package/dist/radio-group.js +44 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/resizable.d.ts +28 -0
- package/dist/resizable.js +66 -0
- package/dist/resizable.js.map +1 -0
- package/dist/schemas.d.ts +121 -0
- package/dist/schemas.js +4643 -0
- package/dist/schemas.js.map +1 -0
- package/dist/scroll-area.d.ts +18 -0
- package/dist/scroll-area.js +55 -0
- package/dist/scroll-area.js.map +1 -0
- package/dist/select.d.ts +21 -0
- package/dist/select.js +136 -0
- package/dist/select.js.map +1 -0
- package/dist/separator.d.ts +11 -0
- package/dist/separator.js +29 -0
- package/dist/separator.js.map +1 -0
- package/dist/sheet.d.ts +39 -0
- package/dist/sheet.js +140 -0
- package/dist/sheet.js.map +1 -0
- package/dist/sidebar.d.ts +75 -0
- package/dist/sidebar.js +201 -0
- package/dist/sidebar.js.map +1 -0
- package/dist/skeleton.d.ts +11 -0
- package/dist/skeleton.js +21 -0
- package/dist/skeleton.js.map +1 -0
- package/dist/slider.d.ts +20 -0
- package/dist/slider.js +55 -0
- package/dist/slider.js.map +1 -0
- package/dist/sonner.d.ts +14 -0
- package/dist/sonner.js +27 -0
- package/dist/sonner.js.map +1 -0
- package/dist/spacer.d.ts +38 -0
- package/dist/spacer.js +43 -0
- package/dist/spacer.js.map +1 -0
- package/dist/stack.d.ts +34 -0
- package/dist/stack.js +49 -0
- package/dist/stack.js.map +1 -0
- package/dist/stepper.d.ts +48 -0
- package/dist/stepper.js +226 -0
- package/dist/stepper.js.map +1 -0
- package/dist/switch.d.ts +11 -0
- package/dist/switch.js +47 -0
- package/dist/switch.js.map +1 -0
- package/dist/table.d.ts +24 -0
- package/dist/table.js +85 -0
- package/dist/table.js.map +1 -0
- package/dist/tabs.d.ts +13 -0
- package/dist/tabs.js +57 -0
- package/dist/tabs.js.map +1 -0
- package/dist/textarea.d.ts +10 -0
- package/dist/textarea.js +36 -0
- package/dist/textarea.js.map +1 -0
- package/dist/time-picker.d.ts +34 -0
- package/dist/time-picker.js +50 -0
- package/dist/time-picker.js.map +1 -0
- package/dist/timeline.d.ts +42 -0
- package/dist/timeline.js +84 -0
- package/dist/timeline.js.map +1 -0
- package/dist/toggle-group.d.ts +17 -0
- package/dist/toggle-group.js +83 -0
- package/dist/toggle-group.js.map +1 -0
- package/dist/toggle.d.ts +19 -0
- package/dist/toggle.js +49 -0
- package/dist/toggle.js.map +1 -0
- package/dist/tooltip.d.ts +13 -0
- package/dist/tooltip.js +33 -0
- package/dist/tooltip.js.map +1 -0
- package/package.json +68 -16
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
// src/components/pagination/pagination.tsx
|
|
8
|
+
var buttonVariants = cva(
|
|
9
|
+
[
|
|
10
|
+
"inline-flex items-center justify-center gap-[var(--gap-sm,0.5rem)] whitespace-nowrap rounded-md text-sm font-medium",
|
|
11
|
+
"transition-all duration-[var(--duration-normal,200ms)] ease-out",
|
|
12
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
13
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
14
|
+
"active:scale-[0.98]",
|
|
15
|
+
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
|
|
16
|
+
].join(" "),
|
|
17
|
+
{
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
default: [
|
|
21
|
+
"bg-primary text-primary-foreground",
|
|
22
|
+
"shadow-sm shadow-primary/20",
|
|
23
|
+
"hover:bg-primary/90 hover:shadow-md hover:shadow-primary/25"
|
|
24
|
+
].join(" "),
|
|
25
|
+
destructive: [
|
|
26
|
+
"bg-destructive text-destructive-foreground",
|
|
27
|
+
"shadow-sm shadow-destructive/20",
|
|
28
|
+
"hover:bg-destructive/90 hover:shadow-md hover:shadow-destructive/25"
|
|
29
|
+
].join(" "),
|
|
30
|
+
outline: [
|
|
31
|
+
"border border-input bg-background",
|
|
32
|
+
"shadow-sm inset-ring-1 inset-ring-foreground/[0.06]",
|
|
33
|
+
"hover:bg-accent hover:text-accent-foreground hover:shadow-md hover:inset-ring-foreground/12"
|
|
34
|
+
].join(" "),
|
|
35
|
+
secondary: [
|
|
36
|
+
"bg-secondary text-secondary-foreground",
|
|
37
|
+
"shadow-sm inset-ring-1 inset-ring-foreground/[0.08]",
|
|
38
|
+
"hover:bg-secondary/80 hover:shadow-md hover:inset-ring-foreground/15"
|
|
39
|
+
].join(" "),
|
|
40
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
41
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
default: "h-[var(--control-height-md,2.5rem)] px-[var(--space-4,1rem)] py-[var(--space-2,0.5rem)]",
|
|
45
|
+
sm: "h-[var(--control-height-sm,2.25rem)] rounded-md px-[var(--space-3,0.75rem)]",
|
|
46
|
+
lg: "h-[var(--control-height-lg,2.75rem)] rounded-md px-[var(--space-8,2rem)] text-base",
|
|
47
|
+
icon: "h-[var(--control-height-md,2.5rem)] w-[var(--control-height-md,2.5rem)]"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "default",
|
|
52
|
+
size: "default"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
function cn(...inputs) {
|
|
57
|
+
return twMerge(clsx(inputs));
|
|
58
|
+
}
|
|
59
|
+
function Pagination({ className, ...props }) {
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
"nav",
|
|
62
|
+
{
|
|
63
|
+
role: "navigation",
|
|
64
|
+
"aria-label": "pagination",
|
|
65
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
66
|
+
...props
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
var PaginationContent = React.forwardRef(
|
|
71
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
72
|
+
"ul",
|
|
73
|
+
{
|
|
74
|
+
ref,
|
|
75
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
PaginationContent.displayName = "PaginationContent";
|
|
81
|
+
var PaginationItem = React.forwardRef(
|
|
82
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className, ...props })
|
|
83
|
+
);
|
|
84
|
+
PaginationItem.displayName = "PaginationItem";
|
|
85
|
+
function PaginationLink({
|
|
86
|
+
className,
|
|
87
|
+
isActive,
|
|
88
|
+
size = "icon",
|
|
89
|
+
...props
|
|
90
|
+
}) {
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
"a",
|
|
93
|
+
{
|
|
94
|
+
"aria-current": isActive ? "page" : void 0,
|
|
95
|
+
className: cn(
|
|
96
|
+
buttonVariants({ variant: isActive ? "outline" : "ghost", size }),
|
|
97
|
+
className
|
|
98
|
+
),
|
|
99
|
+
...props
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
function PaginationPrevious({ className, ...props }) {
|
|
104
|
+
return /* @__PURE__ */ jsxs(
|
|
105
|
+
PaginationLink,
|
|
106
|
+
{
|
|
107
|
+
"aria-label": "Go to previous page",
|
|
108
|
+
size: "default",
|
|
109
|
+
className: cn("gap-1 pl-2.5", className),
|
|
110
|
+
...props,
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ jsx(
|
|
113
|
+
"svg",
|
|
114
|
+
{
|
|
115
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
116
|
+
viewBox: "0 0 24 24",
|
|
117
|
+
fill: "none",
|
|
118
|
+
stroke: "currentColor",
|
|
119
|
+
strokeWidth: "2",
|
|
120
|
+
strokeLinecap: "round",
|
|
121
|
+
strokeLinejoin: "round",
|
|
122
|
+
className: "h-4 w-4",
|
|
123
|
+
"aria-hidden": "true",
|
|
124
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "15 18 9 12 15 6" })
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ jsx("span", { children: "Previous" })
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function PaginationNext({ className, ...props }) {
|
|
133
|
+
return /* @__PURE__ */ jsxs(
|
|
134
|
+
PaginationLink,
|
|
135
|
+
{
|
|
136
|
+
"aria-label": "Go to next page",
|
|
137
|
+
size: "default",
|
|
138
|
+
className: cn("gap-1 pr-2.5", className),
|
|
139
|
+
...props,
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ jsx("span", { children: "Next" }),
|
|
142
|
+
/* @__PURE__ */ jsx(
|
|
143
|
+
"svg",
|
|
144
|
+
{
|
|
145
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
146
|
+
viewBox: "0 0 24 24",
|
|
147
|
+
fill: "none",
|
|
148
|
+
stroke: "currentColor",
|
|
149
|
+
strokeWidth: "2",
|
|
150
|
+
strokeLinecap: "round",
|
|
151
|
+
strokeLinejoin: "round",
|
|
152
|
+
className: "h-4 w-4",
|
|
153
|
+
"aria-hidden": "true",
|
|
154
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "9 18 15 12 9 6" })
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
162
|
+
return /* @__PURE__ */ jsxs(
|
|
163
|
+
"span",
|
|
164
|
+
{
|
|
165
|
+
className: cn("flex h-[var(--control-height-sm,2.25rem)] w-[var(--control-height-sm,2.25rem)] items-center justify-center", className),
|
|
166
|
+
...props,
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ jsxs(
|
|
169
|
+
"svg",
|
|
170
|
+
{
|
|
171
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
172
|
+
viewBox: "0 0 24 24",
|
|
173
|
+
fill: "none",
|
|
174
|
+
stroke: "currentColor",
|
|
175
|
+
strokeWidth: "2",
|
|
176
|
+
strokeLinecap: "round",
|
|
177
|
+
strokeLinejoin: "round",
|
|
178
|
+
className: "h-4 w-4",
|
|
179
|
+
"aria-hidden": "true",
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1" }),
|
|
182
|
+
/* @__PURE__ */ jsx("circle", { cx: "19", cy: "12", r: "1" }),
|
|
183
|
+
/* @__PURE__ */ jsx("circle", { cx: "5", cy: "12", r: "1" })
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
194
|
+
//# sourceMappingURL=pagination.js.map
|
|
195
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/primitives/button/button-variants.ts","../src/lib/utils.ts","../src/components/p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cva } from \"class-variance-authority\";\n\n/**\n * CVA variants for the Button component.\n *\n * Lives in its own module so RSC-safe consumers (`Pagination`, future\n * link-styled buttons in static layouts) can import variants without\n * pulling in the full `Button` runtime — `Button` itself is client-only\n * because of `Slot` + `forwardRef` + the loading spinner. Splitting the\n * variants out keeps `dist/pagination.js` free of `@radix-ui/react-slot`.\n */\nexport const buttonVariants = cva(\n\t[\n\t\t\"inline-flex items-center justify-center gap-[var(--gap-sm,0.5rem)] whitespace-nowrap rounded-md text-sm font-medium\",\n\t\t\"transition-all duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n\t\t\"disabled:pointer-events-none disabled:opacity-50\",\n\t\t\"active:scale-[0.98]\",\n\t\t\"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n\t].join(\" \"),\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: [\n\t\t\t\t\t\"bg-primary text-primary-foreground\",\n\t\t\t\t\t\"shadow-sm shadow-primary/20\",\n\t\t\t\t\t\"hover:bg-primary/90 hover:shadow-md hover:shadow-primary/25\",\n\t\t\t\t].join(\" \"),\n\t\t\t\tdestructive: [\n\t\t\t\t\t\"bg-destructive text-destructive-foreground\",\n\t\t\t\t\t\"shadow-sm shadow-destructive/20\",\n\t\t\t\t\t\"hover:bg-destructive/90 hover:shadow-md hover:shadow-destructive/25\",\n\t\t\t\t].join(\" \"),\n\t\t\t\toutline: [\n\t\t\t\t\t\"border border-input bg-background\",\n\t\t\t\t\t\"shadow-sm inset-ring-1 inset-ring-foreground/[0.06]\",\n\t\t\t\t\t\"hover:bg-accent hover:text-accent-foreground hover:shadow-md hover:inset-ring-foreground/12\",\n\t\t\t\t].join(\" \"),\n\t\t\t\tsecondary: [\n\t\t\t\t\t\"bg-secondary text-secondary-foreground\",\n\t\t\t\t\t\"shadow-sm inset-ring-1 inset-ring-foreground/[0.08]\",\n\t\t\t\t\t\"hover:bg-secondary/80 hover:shadow-md hover:inset-ring-foreground/15\",\n\t\t\t\t].join(\" \"),\n\t\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground\",\n\t\t\t\tlink: \"text-primary underline-offset-4 hover:underline\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"h-[var(--control-height-md,2.5rem)] px-[var(--space-4,1rem)] py-[var(--space-2,0.5rem)]\",\n\t\t\t\tsm: \"h-[var(--control-height-sm,2.25rem)] rounded-md px-[var(--space-3,0.75rem)]\",\n\t\t\t\tlg: \"h-[var(--control-height-lg,2.75rem)] rounded-md px-[var(--space-8,2rem)] text-base\",\n\t\t\t\ticon: \"h-[var(--control-height-md,2.5rem)] w-[var(--control-height-md,2.5rem)]\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nexport type ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport {\n\ttype ButtonVariantsProps,\n\tbuttonVariants,\n} from \"../../primitives/button/button-variants.js\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * Root nav landmark for pagination controls.\n * @returns A centered nav element with aria-label='pagination'\n */\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n\treturn (\n\t\t<nav\n\t\t\trole=\"navigation\"\n\t\t\taria-label=\"pagination\"\n\t\t\tclassName={cn(\"mx-auto flex w-full justify-center\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/** Ordered list wrapper for pagination links. */\nconst PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<\"ul\">>(\n\t({ className, ...props }, ref) => (\n\t\t<ul\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"flex flex-row items-center gap-1\", className)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nPaginationContent.displayName = \"PaginationContent\";\n\n/** A pagination list item wrapper. */\nconst PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<\"li\">>(\n\t({ className, ...props }, ref) => <li ref={ref} className={className} {...props} />,\n);\nPaginationItem.displayName = \"PaginationItem\";\n\ntype PaginationLinkProps = {\n\tisActive?: boolean;\n} & Pick<ButtonVariantsProps, \"size\"> &\n\tReact.ComponentProps<\"a\">;\n\n/**\n * A pagination link styled as a button. Mark the current page with isActive.\n * @returns An anchor element styled via buttonVariants\n */\nfunction PaginationLink({\n\tclassName,\n\tisActive,\n\tsize = \"icon\",\n\t...props\n}: PaginationLinkProps) {\n\treturn (\n\t\t<a\n\t\t\taria-current={isActive ? \"page\" : undefined}\n\t\t\tclassName={cn(\n\t\t\t\tbuttonVariants({ variant: isActive ? \"outline\" : \"ghost\", size }),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * Previous-page link with chevron-left icon.\n * @returns A PaginationLink with aria-label='Go to previous page'\n */\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to previous page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn(\"gap-1 pl-2.5\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<svg\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\tclassName=\"h-4 w-4\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<polyline points=\"15 18 9 12 15 6\" />\n\t\t\t</svg>\n\t\t\t<span>Previous</span>\n\t\t</PaginationLink>\n\t);\n}\n\n/**\n * Next-page link with chevron-right icon.\n * @returns A PaginationLink with aria-label='Go to next page'\n */\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to next page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn(\"gap-1 pr-2.5\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span>Next</span>\n\t\t\t<svg\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\tclassName=\"h-4 w-4\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<polyline points=\"9 18 15 12 9 6\" />\n\t\t\t</svg>\n\t\t</PaginationLink>\n\t);\n}\n\n/**\n * Ellipsis placeholder for truncated page ranges (e.g. 1 … 5 6 7 … 99).\n * @returns A span containing a decorative SVG (aria-hidden) plus a sr-only \"More pages\" label for AT.\n */\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<\"span\">) {\n\t// Wrapper stays reachable by AT; only the decorative SVG is aria-hidden so the\n\t// sr-only \"More pages\" label actually reaches screen readers.\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\"flex h-[var(--control-height-sm,2.25rem)] w-[var(--control-height-sm,2.25rem)] items-center justify-center\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<svg\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\tclassName=\"h-4 w-4\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"1\" />\n\t\t\t\t<circle cx=\"19\" cy=\"12\" r=\"1\" />\n\t\t\t\t<circle cx=\"5\" cy=\"12\" r=\"1\" />\n\t\t\t</svg>\n\t\t\t<span className=\"sr-only\">More pages</span>\n\t\t</span>\n\t);\n}\n\nexport {\n\tPagination,\n\tPaginationContent,\n\tPaginationEllipsis,\n\tPaginationItem,\n\tPaginationLink,\n\tPaginationNext,\n\tPaginationPrevious,\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/** Root container for a popover. */
|
|
5
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
6
|
+
/** The element that anchors and opens the popover. */
|
|
7
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
/** Helper to explicitly anchor the popover to a different element. */
|
|
9
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
/** The floating popover content panel. */
|
|
11
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
|
|
13
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
package/dist/popover.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function cn(...inputs) {
|
|
9
|
+
return twMerge(clsx(inputs));
|
|
10
|
+
}
|
|
11
|
+
var Popover = PopoverPrimitive.Root;
|
|
12
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
13
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
14
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
15
|
+
PopoverPrimitive.Content,
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
align,
|
|
19
|
+
sideOffset,
|
|
20
|
+
className: cn(
|
|
21
|
+
"z-50 w-72 rounded-md border border-foreground/[0.08] bg-popover p-[var(--space-4,1rem)] text-popover-foreground shadow-md outline-none",
|
|
22
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
23
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
24
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
25
|
+
"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",
|
|
26
|
+
className
|
|
27
|
+
),
|
|
28
|
+
...props
|
|
29
|
+
}
|
|
30
|
+
) }));
|
|
31
|
+
PopoverContent.displayName = "PopoverContent";
|
|
32
|
+
|
|
33
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
34
|
+
//# sourceMappingURL=popover.js.map
|
|
35
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/popover/popover.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACHA,IAAM,OAAA,GAA2B,gBAAA,CAAA;AAGjC,IAAM,cAAA,GAAkC,gBAAA,CAAA;AAGxC,IAAM,aAAA,GAAiC,gBAAA,CAAA;AAGvC,IAAM,cAAA,GAAuB,KAAA,CAAA,UAAA,CAG3B,CAAC,EAAE,WAAW,KAAA,GAAQ,QAAA,EAAU,UAAA,GAAa,CAAA,EAAG,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC7D,GAAA,CAAkB,yBAAjB,EACA,QAAA,kBAAA,GAAA;AAAA,EAAkB,gBAAA,CAAA,OAAA;AAAA,EAAjB;AAAA,IACA,GAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACV,wIAAA;AAAA,MACA,8DAAA;AAAA,MACA,4DAAA;AAAA,MACA,8DAAA;AAAA,MACA,6JAAA;AAAA,MACA;AAAA,KACD;AAAA,IACC,GAAG;AAAA;AACL,CAAA,EACD,CACA;AACD,cAAA,CAAe,WAAA,GAAc,gBAAA","file":"popover.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/** Root container for a popover. */\nconst Popover = PopoverPrimitive.Root;\n\n/** The element that anchors and opens the popover. */\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/** Helper to explicitly anchor the popover to a different element. */\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\n/** The floating popover content panel. */\nconst PopoverContent = React.forwardRef<\n\tReact.ComponentRef<typeof PopoverPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n\t<PopoverPrimitive.Portal>\n\t\t<PopoverPrimitive.Content\n\t\t\tref={ref}\n\t\t\talign={align}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 w-72 rounded-md border border-foreground/[0.08] bg-popover p-[var(--space-4,1rem)] text-popover-foreground shadow-md outline-none\",\n\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n\t\t\t\t\"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\t\t\"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n\t\t\t\t\"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\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = \"PopoverContent\";\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A horizontal progress bar from 0–100%.
|
|
6
|
+
* Built on Radix UI Progress for aria-valuenow/max wiring.
|
|
7
|
+
*/
|
|
8
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
|
|
10
|
+
export { Progress };
|
package/dist/progress.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function cn(...inputs) {
|
|
9
|
+
return twMerge(clsx(inputs));
|
|
10
|
+
}
|
|
11
|
+
var Progress = React.forwardRef(({ className, value, max = 100, ...props }, ref) => {
|
|
12
|
+
const pct = Math.max(0, Math.min(100, (value ?? 0) / max * 100));
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
ProgressPrimitive.Root,
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
value: value ?? 0,
|
|
18
|
+
max,
|
|
19
|
+
className: cn(
|
|
20
|
+
"relative h-2 w-full overflow-hidden rounded-full border border-foreground/[0.08] bg-secondary",
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
...props,
|
|
24
|
+
children: /* @__PURE__ */ jsx(
|
|
25
|
+
ProgressPrimitive.Indicator,
|
|
26
|
+
{
|
|
27
|
+
className: "h-full w-full flex-1 bg-primary transition-transform duration-500 ease-out",
|
|
28
|
+
style: { transform: `translateX(-${100 - pct}%)` }
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
Progress.displayName = "Progress";
|
|
35
|
+
|
|
36
|
+
export { Progress };
|
|
37
|
+
//# sourceMappingURL=progress.js.map
|
|
38
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/primitives/progress/progress.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACAA,IAAM,QAAA,GAAiB,KAAA,CAAA,UAAA,CAGrB,CAAC,EAAE,SAAA,EAAW,KAAA,EAAO,GAAA,GAAM,GAAA,EAAK,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AACrD,EAAA,MAAM,GAAA,GAAM,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,IAAA,CAAK,GAAA,CAAI,GAAA,EAAA,CAAO,KAAA,IAAS,CAAA,IAAK,GAAA,GAAO,GAAG,CAAC,CAAA;AACjE,EAAA,uBACC,GAAA;AAAA,IAAmB,iBAAA,CAAA,IAAA;AAAA,IAAlB;AAAA,MACA,GAAA;AAAA,MAGA,OAAO,KAAA,IAAS,CAAA;AAAA,MAChB,GAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACV,+FAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA;AAAA,QAAmB,iBAAA,CAAA,SAAA;AAAA,QAAlB;AAAA,UACA,SAAA,EAAU,4EAAA;AAAA,UACV,OAAO,EAAE,SAAA,EAAW,CAAA,YAAA,EAAe,GAAA,GAAM,GAAG,CAAA,EAAA,CAAA;AAAK;AAAA;AAClD;AAAA,GACD;AAEF,CAAC;AACD,QAAA,CAAS,WAAA,GAAc,UAAA","file":"progress.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * A horizontal progress bar from 0–100%.\n * Built on Radix UI Progress for aria-valuenow/max wiring.\n */\nconst Progress = React.forwardRef<\n\tReact.ComponentRef<typeof ProgressPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, max = 100, ...props }, ref) => {\n\tconst pct = Math.max(0, Math.min(100, ((value ?? 0) / max) * 100));\n\treturn (\n\t\t<ProgressPrimitive.Root\n\t\t\tref={ref}\n\t\t\t// Clamp undefined → 0 so ARIA (aria-valuenow) matches the visual fill.\n\t\t\t// Consumers who want an indeterminate loading bar should use <Skeleton />.\n\t\t\tvalue={value ?? 0}\n\t\t\tmax={max}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative h-2 w-full overflow-hidden rounded-full border border-foreground/[0.08] bg-secondary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ProgressPrimitive.Indicator\n\t\t\t\tclassName=\"h-full w-full flex-1 bg-primary transition-transform duration-500 ease-out\"\n\t\t\t\tstyle={{ transform: `translateX(-${100 - pct}%)` }}\n\t\t\t/>\n\t\t</ProgressPrimitive.Root>\n\t);\n});\nProgress.displayName = \"Progress\";\n\nexport { Progress };\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/** Root container for a radio group. Pair with one or more RadioGroupItem. */
|
|
5
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
/** A single radio option within a RadioGroup. */
|
|
7
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
|
|
9
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function cn(...inputs) {
|
|
9
|
+
return twMerge(clsx(inputs));
|
|
10
|
+
}
|
|
11
|
+
var RadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
12
|
+
RadioGroupPrimitive.Root,
|
|
13
|
+
{
|
|
14
|
+
className: cn(
|
|
15
|
+
"grid gap-[var(--gap-sm,0.5rem)] data-[orientation=horizontal]:flex data-[orientation=horizontal]:flex-row",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
ref,
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
RadioGroup.displayName = "RadioGroup";
|
|
23
|
+
var RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
24
|
+
RadioGroupPrimitive.Item,
|
|
25
|
+
{
|
|
26
|
+
ref,
|
|
27
|
+
className: cn(
|
|
28
|
+
"aspect-square h-4 w-4 rounded-full border border-input",
|
|
29
|
+
"transition-all duration-[var(--duration-normal,200ms)] ease-out shadow-sm inset-ring-1 inset-ring-foreground/[0.06]",
|
|
30
|
+
"hover:border-ring/50 hover:shadow-md",
|
|
31
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
32
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
33
|
+
"data-[state=checked]:border-primary",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props,
|
|
37
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", className: "h-2 w-2 text-primary", "aria-hidden": "true", children: /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }) }) })
|
|
38
|
+
}
|
|
39
|
+
));
|
|
40
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
41
|
+
|
|
42
|
+
export { RadioGroup, RadioGroupItem };
|
|
43
|
+
//# sourceMappingURL=radio-group.js.map
|
|
44
|
+
//# sourceMappingURL=radio-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/primitives/radio-group/radio-group.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACHA,IAAM,UAAA,GAAmB,iBAGvB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC3B,GAAA;AAAA,EAAqB,mBAAA,CAAA,IAAA;AAAA,EAApB;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACV,2GAAA;AAAA,MACA;AAAA,KACD;AAAA,IACA,GAAA;AAAA,IACC,GAAG;AAAA;AACL,CACA;AACD,UAAA,CAAW,WAAA,GAAc,YAAA;AAGzB,IAAM,cAAA,GAAuB,iBAG3B,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC3B,GAAA;AAAA,EAAqB,mBAAA,CAAA,IAAA;AAAA,EAApB;AAAA,IACA,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACV,wDAAA;AAAA,MACA,qHAAA;AAAA,MACA,sCAAA;AAAA,MACA,qGAAA;AAAA,MACA,iDAAA;AAAA,MACA,qCAAA;AAAA,MACA;AAAA,KACD;AAAA,IACC,GAAG,KAAA;AAAA,IAEJ,QAAA,kBAAA,GAAA,CAAqB,mBAAA,CAAA,SAAA,EAApB,EAA8B,SAAA,EAAU,kCAAA,EACxC,8BAAC,KAAA,EAAA,EAAI,OAAA,EAAQ,WAAA,EAAY,IAAA,EAAK,cAAA,EAAe,SAAA,EAAU,wBAAuB,aAAA,EAAY,MAAA,EACzF,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAO,EAAA,EAAG,IAAA,EAAK,IAAG,IAAA,EAAK,CAAA,EAAE,IAAA,EAAK,CAAA,EAChC,CAAA,EACD;AAAA;AACD,CACA;AACD,cAAA,CAAe,WAAA,GAAc,gBAAA","file":"radio-group.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/** Root container for a radio group. Pair with one or more RadioGroupItem. */\nconst RadioGroup = React.forwardRef<\n\tReact.ComponentRef<typeof RadioGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<RadioGroupPrimitive.Root\n\t\tclassName={cn(\n\t\t\t\"grid gap-[var(--gap-sm,0.5rem)] data-[orientation=horizontal]:flex data-[orientation=horizontal]:flex-row\",\n\t\t\tclassName,\n\t\t)}\n\t\tref={ref}\n\t\t{...props}\n\t/>\n));\nRadioGroup.displayName = \"RadioGroup\";\n\n/** A single radio option within a RadioGroup. */\nconst RadioGroupItem = React.forwardRef<\n\tReact.ComponentRef<typeof RadioGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => (\n\t<RadioGroupPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"aspect-square h-4 w-4 rounded-full border border-input\",\n\t\t\t\"transition-all duration-[var(--duration-normal,200ms)] ease-out shadow-sm inset-ring-1 inset-ring-foreground/[0.06]\",\n\t\t\t\"hover:border-ring/50 hover:shadow-md\",\n\t\t\t\"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n\t\t\t\"disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\"data-[state=checked]:border-primary\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t<svg viewBox=\"0 0 24 24\" fill=\"currentColor\" className=\"h-2 w-2 text-primary\" aria-hidden=\"true\">\n\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t</svg>\n\t\t</RadioGroupPrimitive.Indicator>\n\t</RadioGroupPrimitive.Item>\n));\nRadioGroupItem.displayName = \"RadioGroupItem\";\n\nexport { RadioGroup, RadioGroupItem };\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Separator, Panel, Group } from 'react-resizable-panels';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Root container for a group of resizable panels.
|
|
7
|
+
* @returns A flex container that coordinates panel sizing.
|
|
8
|
+
*/
|
|
9
|
+
declare function ResizablePanelGroup({ className, ...props }: React.ComponentPropsWithoutRef<typeof Group>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare namespace ResizablePanelGroup {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
/** A single resizable panel. Configure via defaultSize, minSize, maxSize. */
|
|
14
|
+
declare const ResizablePanel: typeof Panel;
|
|
15
|
+
interface ResizableHandleProps extends React.ComponentPropsWithoutRef<typeof Separator> {
|
|
16
|
+
/** Show a grab-grip on the handle for affordance. */
|
|
17
|
+
withHandle?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Draggable separator between panels. Optionally renders a grab-grip dot.
|
|
21
|
+
* @returns A slim, focusable resize handle.
|
|
22
|
+
*/
|
|
23
|
+
declare function ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare namespace ResizableHandle {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Panel, Group, Separator } from 'react-resizable-panels';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
function ResizablePanelGroup({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Group,
|
|
16
|
+
{
|
|
17
|
+
className: cn(
|
|
18
|
+
"flex h-full w-full aria-[orientation=vertical]:flex-col",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
ResizablePanelGroup.displayName = "ResizablePanelGroup";
|
|
26
|
+
var ResizablePanel = Panel;
|
|
27
|
+
function ResizableHandle({ withHandle, className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
Separator,
|
|
30
|
+
{
|
|
31
|
+
className: cn(
|
|
32
|
+
"relative flex w-px items-center justify-center bg-foreground/[0.12] transition-all duration-[var(--duration-normal,200ms)] ease-out hover:bg-ring data-[separator=active]:bg-ring",
|
|
33
|
+
"after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",
|
|
34
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
35
|
+
"aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full",
|
|
36
|
+
"aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0",
|
|
37
|
+
"[&[aria-orientation=horizontal]>div]:rotate-90",
|
|
38
|
+
className
|
|
39
|
+
),
|
|
40
|
+
...props,
|
|
41
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsxs(
|
|
42
|
+
"svg",
|
|
43
|
+
{
|
|
44
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
+
viewBox: "0 0 24 24",
|
|
46
|
+
fill: "currentColor",
|
|
47
|
+
className: "h-2.5 w-2.5",
|
|
48
|
+
"aria-hidden": "true",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "5", r: "1" }),
|
|
51
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "12", r: "1" }),
|
|
52
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "19", r: "1" }),
|
|
53
|
+
/* @__PURE__ */ jsx("circle", { cx: "15", cy: "5", r: "1" }),
|
|
54
|
+
/* @__PURE__ */ jsx("circle", { cx: "15", cy: "12", r: "1" }),
|
|
55
|
+
/* @__PURE__ */ jsx("circle", { cx: "15", cy: "19", r: "1" })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
) })
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
ResizableHandle.displayName = "ResizableHandle";
|
|
63
|
+
|
|
64
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
65
|
+
//# sourceMappingURL=resizable.js.map
|
|
66
|
+
//# sourceMappingURL=resizable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/resizable/resizable.tsx"],"names":["ResizablePrimitiveGroup","ResizablePrimitivePanel","ResizablePrimitiveSeparator"],"mappings":";;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACIA,SAAS,mBAAA,CAAoB;AAAA,EAC5B,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAmE;AAClE,EAAA,uBACC,GAAA;AAAA,IAACA,KAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACV,yDAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF;AACA,mBAAA,CAAoB,WAAA,GAAc,qBAAA;AAGlC,IAAM,cAAA,GAAiBC;AAYvB,SAAS,gBAAgB,EAAE,UAAA,EAAY,SAAA,EAAW,GAAG,OAAM,EAAyB;AACnF,EAAA,uBACC,GAAA;AAAA,IAACC,SAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACV,mLAAA;AAAA,QACA,gFAAA;AAAA,QACA,qGAAA;AAAA,QACA,yEAAA;AAAA,QACA,sOAAA;AAAA,QACA,gDAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA,UAAA,oBACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,2EAAA,EACd,QAAA,kBAAA,IAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACA,KAAA,EAAM,4BAAA;AAAA,UACN,OAAA,EAAQ,WAAA;AAAA,UACR,IAAA,EAAK,cAAA;AAAA,UACL,SAAA,EAAU,aAAA;AAAA,UACV,aAAA,EAAY,MAAA;AAAA,UAEZ,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,YAAO,EAAA,EAAG,GAAA,EAAI,EAAA,EAAG,GAAA,EAAI,GAAE,GAAA,EAAI,CAAA;AAAA,gCAC3B,QAAA,EAAA,EAAO,EAAA,EAAG,KAAI,EAAA,EAAG,IAAA,EAAK,GAAE,GAAA,EAAI,CAAA;AAAA,gCAC5B,QAAA,EAAA,EAAO,EAAA,EAAG,KAAI,EAAA,EAAG,IAAA,EAAK,GAAE,GAAA,EAAI,CAAA;AAAA,gCAC5B,QAAA,EAAA,EAAO,EAAA,EAAG,MAAK,EAAA,EAAG,GAAA,EAAI,GAAE,GAAA,EAAI,CAAA;AAAA,gCAC5B,QAAA,EAAA,EAAO,EAAA,EAAG,MAAK,EAAA,EAAG,IAAA,EAAK,GAAE,GAAA,EAAI,CAAA;AAAA,gCAC7B,QAAA,EAAA,EAAO,EAAA,EAAG,MAAK,EAAA,EAAG,IAAA,EAAK,GAAE,GAAA,EAAI;AAAA;AAAA;AAAA,OAC/B,EACD;AAAA;AAAA,GAEF;AAEF;AACA,eAAA,CAAgB,WAAA,GAAc,iBAAA","file":"resizable.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport {\n\tGroup as ResizablePrimitiveGroup,\n\tPanel as ResizablePrimitivePanel,\n\tSeparator as ResizablePrimitiveSeparator,\n} from \"react-resizable-panels\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * Root container for a group of resizable panels.\n * @returns A flex container that coordinates panel sizing.\n */\nfunction ResizablePanelGroup({\n\tclassName,\n\t...props\n}: React.ComponentPropsWithoutRef<typeof ResizablePrimitiveGroup>) {\n\treturn (\n\t\t<ResizablePrimitiveGroup\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-full w-full aria-[orientation=vertical]:flex-col\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\nResizablePanelGroup.displayName = \"ResizablePanelGroup\";\n\n/** A single resizable panel. Configure via defaultSize, minSize, maxSize. */\nconst ResizablePanel = ResizablePrimitivePanel;\n\ninterface ResizableHandleProps\n\textends React.ComponentPropsWithoutRef<typeof ResizablePrimitiveSeparator> {\n\t/** Show a grab-grip on the handle for affordance. */\n\twithHandle?: boolean;\n}\n\n/**\n * Draggable separator between panels. Optionally renders a grab-grip dot.\n * @returns A slim, focusable resize handle.\n */\nfunction ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps) {\n\treturn (\n\t\t<ResizablePrimitiveSeparator\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex w-px items-center justify-center bg-foreground/[0.12] transition-all duration-[var(--duration-normal,200ms)] ease-out hover:bg-ring data-[separator=active]:bg-ring\",\n\t\t\t\t\"after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2\",\n\t\t\t\t\"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n\t\t\t\t\"aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full\",\n\t\t\t\t\"aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0\",\n\t\t\t\t\"[&[aria-orientation=horizontal]>div]:rotate-90\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{withHandle && (\n\t\t\t\t<div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border\">\n\t\t\t\t\t<svg\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\tclassName=\"h-2.5 w-2.5\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<circle cx=\"9\" cy=\"5\" r=\"1\" />\n\t\t\t\t\t\t<circle cx=\"9\" cy=\"12\" r=\"1\" />\n\t\t\t\t\t\t<circle cx=\"9\" cy=\"19\" r=\"1\" />\n\t\t\t\t\t\t<circle cx=\"15\" cy=\"5\" r=\"1\" />\n\t\t\t\t\t\t<circle cx=\"15\" cy=\"12\" r=\"1\" />\n\t\t\t\t\t\t<circle cx=\"15\" cy=\"19\" r=\"1\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</ResizablePrimitiveSeparator>\n\t);\n}\nResizableHandle.displayName = \"ResizableHandle\";\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"]}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ComponentSchemaDefinition } from '@hex-core/registry';
|
|
2
|
+
|
|
3
|
+
declare const buttonSchema: ComponentSchemaDefinition;
|
|
4
|
+
|
|
5
|
+
declare const inputSchema: ComponentSchemaDefinition;
|
|
6
|
+
|
|
7
|
+
declare const labelSchema: ComponentSchemaDefinition;
|
|
8
|
+
|
|
9
|
+
declare const textareaSchema: ComponentSchemaDefinition;
|
|
10
|
+
|
|
11
|
+
declare const checkboxSchema: ComponentSchemaDefinition;
|
|
12
|
+
|
|
13
|
+
declare const switchSchema: ComponentSchemaDefinition;
|
|
14
|
+
|
|
15
|
+
declare const badgeSchema: ComponentSchemaDefinition;
|
|
16
|
+
|
|
17
|
+
declare const separatorSchema: ComponentSchemaDefinition;
|
|
18
|
+
|
|
19
|
+
declare const cardSchema: ComponentSchemaDefinition;
|
|
20
|
+
|
|
21
|
+
declare const tabsSchema: ComponentSchemaDefinition;
|
|
22
|
+
|
|
23
|
+
declare const accordionSchema: ComponentSchemaDefinition;
|
|
24
|
+
|
|
25
|
+
declare const dialogSchema: ComponentSchemaDefinition;
|
|
26
|
+
|
|
27
|
+
declare const alertDialogSchema: ComponentSchemaDefinition;
|
|
28
|
+
|
|
29
|
+
declare const dropdownMenuSchema: ComponentSchemaDefinition;
|
|
30
|
+
|
|
31
|
+
declare const popoverSchema: ComponentSchemaDefinition;
|
|
32
|
+
|
|
33
|
+
declare const tooltipSchema: ComponentSchemaDefinition;
|
|
34
|
+
|
|
35
|
+
declare const selectSchema: ComponentSchemaDefinition;
|
|
36
|
+
|
|
37
|
+
declare const radioGroupSchema: ComponentSchemaDefinition;
|
|
38
|
+
|
|
39
|
+
declare const sliderSchema: ComponentSchemaDefinition;
|
|
40
|
+
|
|
41
|
+
declare const toggleSchema: ComponentSchemaDefinition;
|
|
42
|
+
|
|
43
|
+
declare const toggleGroupSchema: ComponentSchemaDefinition;
|
|
44
|
+
|
|
45
|
+
declare const formSchema: ComponentSchemaDefinition;
|
|
46
|
+
|
|
47
|
+
declare const avatarSchema: ComponentSchemaDefinition;
|
|
48
|
+
|
|
49
|
+
declare const skeletonSchema: ComponentSchemaDefinition;
|
|
50
|
+
|
|
51
|
+
declare const progressSchema: ComponentSchemaDefinition;
|
|
52
|
+
|
|
53
|
+
declare const scrollAreaSchema: ComponentSchemaDefinition;
|
|
54
|
+
|
|
55
|
+
declare const aspectRatioSchema: ComponentSchemaDefinition;
|
|
56
|
+
|
|
57
|
+
declare const containerSchema: ComponentSchemaDefinition;
|
|
58
|
+
|
|
59
|
+
declare const stackSchema: ComponentSchemaDefinition;
|
|
60
|
+
|
|
61
|
+
declare const clusterSchema: ComponentSchemaDefinition;
|
|
62
|
+
|
|
63
|
+
declare const gridSchema: ComponentSchemaDefinition;
|
|
64
|
+
|
|
65
|
+
declare const spacerSchema: ComponentSchemaDefinition;
|
|
66
|
+
|
|
67
|
+
declare const collapsibleSchema: ComponentSchemaDefinition;
|
|
68
|
+
|
|
69
|
+
declare const hoverCardSchema: ComponentSchemaDefinition;
|
|
70
|
+
|
|
71
|
+
declare const contextMenuSchema: ComponentSchemaDefinition;
|
|
72
|
+
|
|
73
|
+
declare const menubarSchema: ComponentSchemaDefinition;
|
|
74
|
+
|
|
75
|
+
declare const navigationMenuSchema: ComponentSchemaDefinition;
|
|
76
|
+
|
|
77
|
+
declare const breadcrumbSchema: ComponentSchemaDefinition;
|
|
78
|
+
|
|
79
|
+
declare const alertSchema: ComponentSchemaDefinition;
|
|
80
|
+
|
|
81
|
+
declare const sonnerSchema: ComponentSchemaDefinition;
|
|
82
|
+
|
|
83
|
+
declare const tableSchema: ComponentSchemaDefinition;
|
|
84
|
+
|
|
85
|
+
declare const dataTableSchema: ComponentSchemaDefinition;
|
|
86
|
+
|
|
87
|
+
declare const paginationSchema: ComponentSchemaDefinition;
|
|
88
|
+
|
|
89
|
+
declare const calendarSchema: ComponentSchemaDefinition;
|
|
90
|
+
|
|
91
|
+
declare const datePickerSchema: ComponentSchemaDefinition;
|
|
92
|
+
|
|
93
|
+
declare const inputOTPSchema: ComponentSchemaDefinition;
|
|
94
|
+
|
|
95
|
+
declare const commandSchema: ComponentSchemaDefinition;
|
|
96
|
+
|
|
97
|
+
declare const comboboxSchema: ComponentSchemaDefinition;
|
|
98
|
+
|
|
99
|
+
declare const multiComboboxSchema: ComponentSchemaDefinition;
|
|
100
|
+
|
|
101
|
+
declare const stepperSchema: ComponentSchemaDefinition;
|
|
102
|
+
|
|
103
|
+
declare const timelineSchema: ComponentSchemaDefinition;
|
|
104
|
+
|
|
105
|
+
declare const dropzoneSchema: ComponentSchemaDefinition;
|
|
106
|
+
|
|
107
|
+
declare const timePickerSchema: ComponentSchemaDefinition;
|
|
108
|
+
|
|
109
|
+
declare const fileTreeSchema: ComponentSchemaDefinition;
|
|
110
|
+
|
|
111
|
+
declare const colorPickerSchema: ComponentSchemaDefinition;
|
|
112
|
+
|
|
113
|
+
declare const sheetSchema: ComponentSchemaDefinition;
|
|
114
|
+
|
|
115
|
+
declare const drawerSchema: ComponentSchemaDefinition;
|
|
116
|
+
|
|
117
|
+
declare const resizableSchema: ComponentSchemaDefinition;
|
|
118
|
+
|
|
119
|
+
declare const sidebarSchema: ComponentSchemaDefinition;
|
|
120
|
+
|
|
121
|
+
export { accordionSchema, alertDialogSchema, alertSchema, aspectRatioSchema, avatarSchema, badgeSchema, breadcrumbSchema, buttonSchema, calendarSchema, cardSchema, checkboxSchema, clusterSchema, collapsibleSchema, colorPickerSchema, comboboxSchema, commandSchema, containerSchema, contextMenuSchema, dataTableSchema, datePickerSchema, dialogSchema, drawerSchema, dropdownMenuSchema, dropzoneSchema, fileTreeSchema, formSchema, gridSchema, hoverCardSchema, inputOTPSchema, inputSchema, labelSchema, menubarSchema, multiComboboxSchema, navigationMenuSchema, paginationSchema, popoverSchema, progressSchema, radioGroupSchema, resizableSchema, scrollAreaSchema, selectSchema, separatorSchema, sheetSchema, sidebarSchema, skeletonSchema, sliderSchema, sonnerSchema, spacerSchema, stackSchema, stepperSchema, switchSchema, tableSchema, tabsSchema, textareaSchema, timePickerSchema, timelineSchema, toggleGroupSchema, toggleSchema, tooltipSchema };
|