@locusgraph/components 0.1.1 → 0.2.1
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/action/button-group.js +148 -17
- package/dist/action/button.js +91 -27
- package/dist/action/toggle-group.js +176 -12
- package/dist/action/toggle.js +71 -18
- package/dist/display/avatar.js +118 -7
- package/dist/display/badge.d.ts +1 -1
- package/dist/display/badge.js +74 -17
- package/dist/display/chart/chart-container.js +205 -45
- package/dist/display/chart/chart-legend.js +79 -14
- package/dist/display/chart/chart-tooltip.js +211 -40
- package/dist/display/chat/attachment/attachment-parts.js +222 -13
- package/dist/display/chat/attachment/attachment.js +210 -28
- package/dist/display/chat/bubble.js +225 -37
- package/dist/display/chat/marker.js +143 -15
- package/dist/display/chat/message-scroller.js +277 -15
- package/dist/display/chat/message.js +238 -13
- package/dist/display/content/item.js +448 -47
- package/dist/display/content/kbd.js +78 -5
- package/dist/display/media/aspect-ratio.js +27 -3
- package/dist/display/media/carousel-controls.js +163 -12
- package/dist/display/media/carousel.js +325 -65
- package/dist/display/rule-grid/rule-grid.d.ts +3 -1
- package/dist/display/rule-grid/rule-grid.js +311 -25
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +83 -0
- package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-table.js +174 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.js +102 -0
- package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-button.js +102 -0
- package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
- package/dist/display/skeletons/shapes/skeleton-text.js +84 -0
- package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
- package/dist/display/skeletons/skeleton-parts.js +68 -0
- package/dist/display/status/alert.d.ts +1 -1
- package/dist/display/status/alert.js +137 -17
- package/dist/display/status/empty.js +250 -22
- package/dist/display/status/progress.d.ts +5 -1
- package/dist/display/status/progress.js +120 -3
- package/dist/display/status/skeleton.js +40 -3
- package/dist/display/status/spinner.js +42 -4
- package/dist/display/table.js +310 -17
- package/dist/feedback/toaster.d.ts +1 -1
- package/dist/feedback/toaster.js +100 -25
- package/dist/form/advanced/calendar-day-button.js +89 -12
- package/dist/form/advanced/calendar.js +349 -56
- package/dist/form/advanced/combobox/combobox-chips.js +152 -9
- package/dist/form/advanced/combobox/combobox-items.js +240 -15
- package/dist/form/advanced/combobox/combobox.js +387 -14
- package/dist/form/advanced/input-otp.js +202 -12
- package/dist/form/choice/checkbox.js +59 -4
- package/dist/form/choice/radio-group.js +95 -6
- package/dist/form/choice/select.js +479 -25
- package/dist/form/choice/slider.js +118 -4
- package/dist/form/choice/switch.js +53 -3
- package/dist/form/field/field-error.js +117 -14
- package/dist/form/field/field-separator.js +70 -3
- package/dist/form/field/field-set.js +85 -5
- package/dist/form/field/field-text.js +116 -7
- package/dist/form/field/field.js +138 -26
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +47 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +148 -8
- package/dist/form/textarea.js +41 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/layout/accordion.js +166 -9
- package/dist/layout/collapsible.js +75 -7
- package/dist/layout/resizable.js +123 -8
- package/dist/layout/scroll/direction.js +25 -3
- package/dist/layout/scroll/scroll-area.d.ts +1 -1
- package/dist/layout/scroll/scroll-area.js +138 -5
- package/dist/layout/sidebar/sidebar-context.js +184 -51
- package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
- package/dist/layout/sidebar/sidebar-menu.js +319 -38
- package/dist/layout/sidebar/sidebar-sections.js +369 -22
- package/dist/layout/sidebar/sidebar.js +385 -29
- package/dist/layout/tabs.js +183 -18
- package/dist/layout/use-mobile.js +23 -10
- package/dist/navigation/breadcrumb.js +302 -18
- package/dist/navigation/menubar/menubar-items.js +323 -17
- package/dist/navigation/menubar/menubar-sub.js +126 -8
- package/dist/navigation/menubar/menubar.js +213 -13
- package/dist/navigation/navigation-menu.js +367 -19
- package/dist/navigation/pagination.js +329 -20
- package/dist/overlay/alert-dialog.js +485 -26
- package/dist/overlay/context-menu/context-menu-items.js +323 -17
- package/dist/overlay/context-menu/context-menu-sub.js +126 -8
- package/dist/overlay/context-menu/context-menu.js +140 -11
- package/dist/overlay/dialog.js +406 -25
- package/dist/overlay/floating/command.js +424 -21
- package/dist/overlay/floating/drawer.js +354 -22
- package/dist/overlay/floating/hover-card.js +107 -7
- package/dist/overlay/menu/dropdown-menu-choice.js +150 -8
- package/dist/overlay/menu/dropdown-menu-item.js +174 -9
- package/dist/overlay/menu/dropdown-menu-sub.js +125 -8
- package/dist/overlay/menu/dropdown-menu.js +147 -12
- package/dist/overlay/popover.js +106 -7
- package/dist/overlay/sheet.js +380 -27
- package/dist/overlay/tooltip.js +145 -9
- package/dist/shell/app-header.js +81 -5
- package/dist/shell/app-shell.js +58 -3
- package/dist/shell/breadcrumbs.js +102 -12
- package/dist/shell/docs/docs-header.js +211 -11
- package/dist/shell/docs/docs-shell.js +100 -3
- package/dist/shell/docs/docs-sidebar.js +88 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +88 -42
- package/dist/shell/navigation/app-sidebar.js +188 -6
- package/dist/shell/navigation/nav-group.js +161 -10
- package/dist/shell/theme-toggle.js +52 -5
- package/package.json +5 -5
package/dist/form/input-group.js
CHANGED
|
@@ -1,65 +1,315 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
4
5
|
import { cn } from "cn";
|
|
6
|
+
import * as React from "react";
|
|
5
7
|
import { Button } from "../action/button.js";
|
|
6
8
|
import { Input } from "./input.js";
|
|
7
9
|
import { Textarea } from "./textarea.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
11
|
-
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
12
|
-
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
13
|
-
];
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
const inputGroupAlignmentClasses = ["has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3"];
|
|
14
12
|
const inputGroupFocusClasses = "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-ring";
|
|
15
13
|
const inputGroupErrorClasses = "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40";
|
|
16
|
-
function InputGroup(
|
|
17
|
-
|
|
14
|
+
function InputGroup(t0) {
|
|
15
|
+
const $ = _c(8);
|
|
16
|
+
let className;
|
|
17
|
+
let props;
|
|
18
|
+
if ($[0] !== t0) {
|
|
19
|
+
({
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
} = t0);
|
|
23
|
+
$[0] = t0;
|
|
24
|
+
$[1] = className;
|
|
25
|
+
$[2] = props;
|
|
26
|
+
} else {
|
|
27
|
+
className = $[1];
|
|
28
|
+
props = $[2];
|
|
29
|
+
}
|
|
30
|
+
let t1;
|
|
31
|
+
if ($[3] !== className) {
|
|
32
|
+
t1 = cn("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30", "h-9 min-w-0 has-[>textarea]:h-auto", inputGroupAlignmentClasses, inputGroupFocusClasses, inputGroupErrorClasses, className);
|
|
33
|
+
$[3] = className;
|
|
34
|
+
$[4] = t1;
|
|
35
|
+
} else {
|
|
36
|
+
t1 = $[4];
|
|
37
|
+
}
|
|
38
|
+
let t2;
|
|
39
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
40
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
41
|
+
"data-slot": "input-group",
|
|
42
|
+
role: "group",
|
|
43
|
+
className: t1,
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
$[5] = props;
|
|
47
|
+
$[6] = t1;
|
|
48
|
+
$[7] = t2;
|
|
49
|
+
} else {
|
|
50
|
+
t2 = $[7];
|
|
51
|
+
}
|
|
52
|
+
return t2;
|
|
18
53
|
}
|
|
19
54
|
const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
55
|
+
variants: {
|
|
56
|
+
align: {
|
|
57
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
58
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
59
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3",
|
|
60
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: {
|
|
64
|
+
align: "inline-start"
|
|
65
|
+
}
|
|
31
66
|
});
|
|
32
|
-
function InputGroupAddon(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
67
|
+
function InputGroupAddon(t0) {
|
|
68
|
+
const $ = _c(11);
|
|
69
|
+
let className;
|
|
70
|
+
let props;
|
|
71
|
+
let t1;
|
|
72
|
+
if ($[0] !== t0) {
|
|
73
|
+
({
|
|
74
|
+
className,
|
|
75
|
+
align: t1,
|
|
76
|
+
...props
|
|
77
|
+
} = t0);
|
|
78
|
+
$[0] = t0;
|
|
79
|
+
$[1] = className;
|
|
80
|
+
$[2] = props;
|
|
81
|
+
$[3] = t1;
|
|
82
|
+
} else {
|
|
83
|
+
className = $[1];
|
|
84
|
+
props = $[2];
|
|
85
|
+
t1 = $[3];
|
|
86
|
+
}
|
|
87
|
+
const align = t1 === undefined ? "inline-start" : t1;
|
|
88
|
+
let t2;
|
|
89
|
+
if ($[4] !== align || $[5] !== className) {
|
|
90
|
+
t2 = cn(inputGroupAddonVariants({
|
|
91
|
+
align
|
|
92
|
+
}), className);
|
|
93
|
+
$[4] = align;
|
|
94
|
+
$[5] = className;
|
|
95
|
+
$[6] = t2;
|
|
96
|
+
} else {
|
|
97
|
+
t2 = $[6];
|
|
98
|
+
}
|
|
99
|
+
let t3;
|
|
100
|
+
if ($[7] !== align || $[8] !== props || $[9] !== t2) {
|
|
101
|
+
t3 = /*#__PURE__*/_jsx("div", {
|
|
102
|
+
role: "group",
|
|
103
|
+
"data-slot": "input-group-addon",
|
|
104
|
+
"data-align": align,
|
|
105
|
+
className: t2,
|
|
106
|
+
onClick: _temp,
|
|
107
|
+
...props
|
|
108
|
+
});
|
|
109
|
+
$[7] = align;
|
|
110
|
+
$[8] = props;
|
|
111
|
+
$[9] = t2;
|
|
112
|
+
$[10] = t3;
|
|
113
|
+
} else {
|
|
114
|
+
t3 = $[10];
|
|
115
|
+
}
|
|
116
|
+
return t3;
|
|
117
|
+
}
|
|
118
|
+
function _temp(e) {
|
|
119
|
+
if (e.target.closest("button")) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
39
123
|
}
|
|
40
124
|
const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
125
|
+
variants: {
|
|
126
|
+
size: {
|
|
127
|
+
xs: "h-6 gap-1 rounded-full px-2.5 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
128
|
+
sm: "h-8 gap-1.5 rounded-full px-3 has-[>svg]:px-2.5",
|
|
129
|
+
"icon-xs": "size-6 rounded-full p-0 has-[>svg]:p-0",
|
|
130
|
+
"icon-sm": "size-8 rounded-full p-0 has-[>svg]:p-0"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
defaultVariants: {
|
|
134
|
+
size: "xs"
|
|
135
|
+
}
|
|
52
136
|
});
|
|
53
|
-
function InputGroupButton(
|
|
54
|
-
|
|
137
|
+
function InputGroupButton(t0) {
|
|
138
|
+
const $ = _c(15);
|
|
139
|
+
let className;
|
|
140
|
+
let props;
|
|
141
|
+
let t1;
|
|
142
|
+
let t2;
|
|
143
|
+
let t3;
|
|
144
|
+
if ($[0] !== t0) {
|
|
145
|
+
({
|
|
146
|
+
className,
|
|
147
|
+
type: t1,
|
|
148
|
+
variant: t2,
|
|
149
|
+
size: t3,
|
|
150
|
+
...props
|
|
151
|
+
} = t0);
|
|
152
|
+
$[0] = t0;
|
|
153
|
+
$[1] = className;
|
|
154
|
+
$[2] = props;
|
|
155
|
+
$[3] = t1;
|
|
156
|
+
$[4] = t2;
|
|
157
|
+
$[5] = t3;
|
|
158
|
+
} else {
|
|
159
|
+
className = $[1];
|
|
160
|
+
props = $[2];
|
|
161
|
+
t1 = $[3];
|
|
162
|
+
t2 = $[4];
|
|
163
|
+
t3 = $[5];
|
|
164
|
+
}
|
|
165
|
+
const type = t1 === undefined ? "button" : t1;
|
|
166
|
+
const variant = t2 === undefined ? "ghost" : t2;
|
|
167
|
+
const size = t3 === undefined ? "xs" : t3;
|
|
168
|
+
let t4;
|
|
169
|
+
if ($[6] !== className || $[7] !== size) {
|
|
170
|
+
t4 = cn(inputGroupButtonVariants({
|
|
171
|
+
size
|
|
172
|
+
}), className);
|
|
173
|
+
$[6] = className;
|
|
174
|
+
$[7] = size;
|
|
175
|
+
$[8] = t4;
|
|
176
|
+
} else {
|
|
177
|
+
t4 = $[8];
|
|
178
|
+
}
|
|
179
|
+
let t5;
|
|
180
|
+
if ($[9] !== props || $[10] !== size || $[11] !== t4 || $[12] !== type || $[13] !== variant) {
|
|
181
|
+
t5 = /*#__PURE__*/_jsx(Button, {
|
|
182
|
+
type: type,
|
|
183
|
+
"data-size": size,
|
|
184
|
+
variant: variant,
|
|
185
|
+
className: t4,
|
|
186
|
+
...props
|
|
187
|
+
});
|
|
188
|
+
$[9] = props;
|
|
189
|
+
$[10] = size;
|
|
190
|
+
$[11] = t4;
|
|
191
|
+
$[12] = type;
|
|
192
|
+
$[13] = variant;
|
|
193
|
+
$[14] = t5;
|
|
194
|
+
} else {
|
|
195
|
+
t5 = $[14];
|
|
196
|
+
}
|
|
197
|
+
return t5;
|
|
55
198
|
}
|
|
56
|
-
function InputGroupText(
|
|
57
|
-
|
|
199
|
+
function InputGroupText(t0) {
|
|
200
|
+
const $ = _c(8);
|
|
201
|
+
let className;
|
|
202
|
+
let props;
|
|
203
|
+
if ($[0] !== t0) {
|
|
204
|
+
({
|
|
205
|
+
className,
|
|
206
|
+
...props
|
|
207
|
+
} = t0);
|
|
208
|
+
$[0] = t0;
|
|
209
|
+
$[1] = className;
|
|
210
|
+
$[2] = props;
|
|
211
|
+
} else {
|
|
212
|
+
className = $[1];
|
|
213
|
+
props = $[2];
|
|
214
|
+
}
|
|
215
|
+
let t1;
|
|
216
|
+
if ($[3] !== className) {
|
|
217
|
+
t1 = cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className);
|
|
218
|
+
$[3] = className;
|
|
219
|
+
$[4] = t1;
|
|
220
|
+
} else {
|
|
221
|
+
t1 = $[4];
|
|
222
|
+
}
|
|
223
|
+
let t2;
|
|
224
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
225
|
+
t2 = /*#__PURE__*/_jsx("span", {
|
|
226
|
+
className: t1,
|
|
227
|
+
...props
|
|
228
|
+
});
|
|
229
|
+
$[5] = props;
|
|
230
|
+
$[6] = t1;
|
|
231
|
+
$[7] = t2;
|
|
232
|
+
} else {
|
|
233
|
+
t2 = $[7];
|
|
234
|
+
}
|
|
235
|
+
return t2;
|
|
58
236
|
}
|
|
59
|
-
function InputGroupInput(
|
|
60
|
-
|
|
237
|
+
function InputGroupInput(t0) {
|
|
238
|
+
const $ = _c(8);
|
|
239
|
+
let className;
|
|
240
|
+
let props;
|
|
241
|
+
if ($[0] !== t0) {
|
|
242
|
+
({
|
|
243
|
+
className,
|
|
244
|
+
...props
|
|
245
|
+
} = t0);
|
|
246
|
+
$[0] = t0;
|
|
247
|
+
$[1] = className;
|
|
248
|
+
$[2] = props;
|
|
249
|
+
} else {
|
|
250
|
+
className = $[1];
|
|
251
|
+
props = $[2];
|
|
252
|
+
}
|
|
253
|
+
let t1;
|
|
254
|
+
if ($[3] !== className) {
|
|
255
|
+
t1 = cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className);
|
|
256
|
+
$[3] = className;
|
|
257
|
+
$[4] = t1;
|
|
258
|
+
} else {
|
|
259
|
+
t1 = $[4];
|
|
260
|
+
}
|
|
261
|
+
let t2;
|
|
262
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
263
|
+
t2 = /*#__PURE__*/_jsx(Input, {
|
|
264
|
+
"data-slot": "input-group-control",
|
|
265
|
+
className: t1,
|
|
266
|
+
...props
|
|
267
|
+
});
|
|
268
|
+
$[5] = props;
|
|
269
|
+
$[6] = t1;
|
|
270
|
+
$[7] = t2;
|
|
271
|
+
} else {
|
|
272
|
+
t2 = $[7];
|
|
273
|
+
}
|
|
274
|
+
return t2;
|
|
61
275
|
}
|
|
62
|
-
function InputGroupTextarea(
|
|
63
|
-
|
|
276
|
+
function InputGroupTextarea(t0) {
|
|
277
|
+
const $ = _c(8);
|
|
278
|
+
let className;
|
|
279
|
+
let props;
|
|
280
|
+
if ($[0] !== t0) {
|
|
281
|
+
({
|
|
282
|
+
className,
|
|
283
|
+
...props
|
|
284
|
+
} = t0);
|
|
285
|
+
$[0] = t0;
|
|
286
|
+
$[1] = className;
|
|
287
|
+
$[2] = props;
|
|
288
|
+
} else {
|
|
289
|
+
className = $[1];
|
|
290
|
+
props = $[2];
|
|
291
|
+
}
|
|
292
|
+
let t1;
|
|
293
|
+
if ($[3] !== className) {
|
|
294
|
+
t1 = cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className);
|
|
295
|
+
$[3] = className;
|
|
296
|
+
$[4] = t1;
|
|
297
|
+
} else {
|
|
298
|
+
t1 = $[4];
|
|
299
|
+
}
|
|
300
|
+
let t2;
|
|
301
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
302
|
+
t2 = /*#__PURE__*/_jsx(Textarea, {
|
|
303
|
+
"data-slot": "input-group-control",
|
|
304
|
+
className: t1,
|
|
305
|
+
...props
|
|
306
|
+
});
|
|
307
|
+
$[5] = props;
|
|
308
|
+
$[6] = t1;
|
|
309
|
+
$[7] = t2;
|
|
310
|
+
} else {
|
|
311
|
+
t2 = $[7];
|
|
312
|
+
}
|
|
313
|
+
return t2;
|
|
64
314
|
}
|
|
65
|
-
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea
|
|
315
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
package/dist/form/input.js
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { cn } from "cn";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
function Input(t0) {
|
|
6
|
+
const $ = _c(10);
|
|
7
|
+
let className;
|
|
8
|
+
let props;
|
|
9
|
+
let type;
|
|
10
|
+
if ($[0] !== t0) {
|
|
11
|
+
({
|
|
12
|
+
className,
|
|
13
|
+
type,
|
|
14
|
+
...props
|
|
15
|
+
} = t0);
|
|
16
|
+
$[0] = t0;
|
|
17
|
+
$[1] = className;
|
|
18
|
+
$[2] = props;
|
|
19
|
+
$[3] = type;
|
|
20
|
+
} else {
|
|
21
|
+
className = $[1];
|
|
22
|
+
props = $[2];
|
|
23
|
+
type = $[3];
|
|
24
|
+
}
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[4] !== className) {
|
|
27
|
+
t1 = cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30", "focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className);
|
|
28
|
+
$[4] = className;
|
|
29
|
+
$[5] = t1;
|
|
30
|
+
} else {
|
|
31
|
+
t1 = $[5];
|
|
32
|
+
}
|
|
33
|
+
let t2;
|
|
34
|
+
if ($[6] !== props || $[7] !== t1 || $[8] !== type) {
|
|
35
|
+
t2 = /*#__PURE__*/_jsx("input", {
|
|
36
|
+
type: type,
|
|
37
|
+
"data-slot": "input",
|
|
38
|
+
className: t1,
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
$[6] = props;
|
|
42
|
+
$[7] = t1;
|
|
43
|
+
$[8] = type;
|
|
44
|
+
$[9] = t2;
|
|
45
|
+
} else {
|
|
46
|
+
t2 = $[9];
|
|
47
|
+
}
|
|
48
|
+
return t2;
|
|
5
49
|
}
|
|
6
50
|
export { Input };
|
package/dist/form/label.js
CHANGED
|
@@ -1,8 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { cn } from "cn";
|
|
4
5
|
import * as LabelPrimitive from "radix-ui/label";
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
function Label(t0) {
|
|
9
|
+
const $ = _c(8);
|
|
10
|
+
let className;
|
|
11
|
+
let props;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
} = t0);
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
$[1] = className;
|
|
19
|
+
$[2] = props;
|
|
20
|
+
} else {
|
|
21
|
+
className = $[1];
|
|
22
|
+
props = $[2];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[3] !== className) {
|
|
26
|
+
t1 = cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className);
|
|
27
|
+
$[3] = className;
|
|
28
|
+
$[4] = t1;
|
|
29
|
+
} else {
|
|
30
|
+
t1 = $[4];
|
|
31
|
+
}
|
|
32
|
+
let t2;
|
|
33
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
34
|
+
t2 = /*#__PURE__*/_jsx(LabelPrimitive.Root, {
|
|
35
|
+
"data-slot": "label",
|
|
36
|
+
className: t1,
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
$[5] = props;
|
|
40
|
+
$[6] = t1;
|
|
41
|
+
$[7] = t2;
|
|
42
|
+
} else {
|
|
43
|
+
t2 = $[7];
|
|
44
|
+
}
|
|
45
|
+
return t2;
|
|
7
46
|
}
|
|
8
47
|
export { Label };
|
|
@@ -1,13 +1,153 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { ChevronDown as ChevronDownIcon } from "@carbon/icons-react";
|
|
2
3
|
import { cn } from "cn";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
function NativeSelect(t0) {
|
|
7
|
+
const $ = _c(13);
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
let t1;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({
|
|
13
|
+
className,
|
|
14
|
+
size: t1,
|
|
15
|
+
...props
|
|
16
|
+
} = t0);
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
$[1] = className;
|
|
19
|
+
$[2] = props;
|
|
20
|
+
$[3] = t1;
|
|
21
|
+
} else {
|
|
22
|
+
className = $[1];
|
|
23
|
+
props = $[2];
|
|
24
|
+
t1 = $[3];
|
|
25
|
+
}
|
|
26
|
+
const size = t1 === undefined ? "default" : t1;
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[4] !== className) {
|
|
29
|
+
t2 = cn("h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground has-[option[value='']:checked]:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className);
|
|
30
|
+
$[4] = className;
|
|
31
|
+
$[5] = t2;
|
|
32
|
+
} else {
|
|
33
|
+
t2 = $[5];
|
|
34
|
+
}
|
|
35
|
+
let t3;
|
|
36
|
+
if ($[6] !== props || $[7] !== size || $[8] !== t2) {
|
|
37
|
+
t3 = /*#__PURE__*/_jsx("select", {
|
|
38
|
+
"data-slot": "native-select",
|
|
39
|
+
"data-size": size,
|
|
40
|
+
className: t2,
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
$[6] = props;
|
|
44
|
+
$[7] = size;
|
|
45
|
+
$[8] = t2;
|
|
46
|
+
$[9] = t3;
|
|
47
|
+
} else {
|
|
48
|
+
t3 = $[9];
|
|
49
|
+
}
|
|
50
|
+
let t4;
|
|
51
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
52
|
+
t4 = /*#__PURE__*/_jsx(ChevronDownIcon, {
|
|
53
|
+
className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
54
|
+
"aria-hidden": "true",
|
|
55
|
+
"data-slot": "native-select-icon"
|
|
56
|
+
});
|
|
57
|
+
$[10] = t4;
|
|
58
|
+
} else {
|
|
59
|
+
t4 = $[10];
|
|
60
|
+
}
|
|
61
|
+
let t5;
|
|
62
|
+
if ($[11] !== t3) {
|
|
63
|
+
t5 = /*#__PURE__*/_jsxs("div", {
|
|
64
|
+
className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
65
|
+
"data-slot": "native-select-wrapper",
|
|
66
|
+
children: [t3, t4]
|
|
67
|
+
});
|
|
68
|
+
$[11] = t3;
|
|
69
|
+
$[12] = t5;
|
|
70
|
+
} else {
|
|
71
|
+
t5 = $[12];
|
|
72
|
+
}
|
|
73
|
+
return t5;
|
|
6
74
|
}
|
|
7
|
-
function NativeSelectOption(
|
|
8
|
-
|
|
75
|
+
function NativeSelectOption(t0) {
|
|
76
|
+
const $ = _c(8);
|
|
77
|
+
let className;
|
|
78
|
+
let props;
|
|
79
|
+
if ($[0] !== t0) {
|
|
80
|
+
({
|
|
81
|
+
className,
|
|
82
|
+
...props
|
|
83
|
+
} = t0);
|
|
84
|
+
$[0] = t0;
|
|
85
|
+
$[1] = className;
|
|
86
|
+
$[2] = props;
|
|
87
|
+
} else {
|
|
88
|
+
className = $[1];
|
|
89
|
+
props = $[2];
|
|
90
|
+
}
|
|
91
|
+
let t1;
|
|
92
|
+
if ($[3] !== className) {
|
|
93
|
+
t1 = cn("bg-[Canvas] text-[CanvasText]", className);
|
|
94
|
+
$[3] = className;
|
|
95
|
+
$[4] = t1;
|
|
96
|
+
} else {
|
|
97
|
+
t1 = $[4];
|
|
98
|
+
}
|
|
99
|
+
let t2;
|
|
100
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
101
|
+
t2 = /*#__PURE__*/_jsx("option", {
|
|
102
|
+
"data-slot": "native-select-option",
|
|
103
|
+
className: t1,
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
$[5] = props;
|
|
107
|
+
$[6] = t1;
|
|
108
|
+
$[7] = t2;
|
|
109
|
+
} else {
|
|
110
|
+
t2 = $[7];
|
|
111
|
+
}
|
|
112
|
+
return t2;
|
|
9
113
|
}
|
|
10
|
-
function NativeSelectOptGroup(
|
|
11
|
-
|
|
114
|
+
function NativeSelectOptGroup(t0) {
|
|
115
|
+
const $ = _c(8);
|
|
116
|
+
let className;
|
|
117
|
+
let props;
|
|
118
|
+
if ($[0] !== t0) {
|
|
119
|
+
({
|
|
120
|
+
className,
|
|
121
|
+
...props
|
|
122
|
+
} = t0);
|
|
123
|
+
$[0] = t0;
|
|
124
|
+
$[1] = className;
|
|
125
|
+
$[2] = props;
|
|
126
|
+
} else {
|
|
127
|
+
className = $[1];
|
|
128
|
+
props = $[2];
|
|
129
|
+
}
|
|
130
|
+
let t1;
|
|
131
|
+
if ($[3] !== className) {
|
|
132
|
+
t1 = cn("bg-[Canvas] text-[CanvasText]", className);
|
|
133
|
+
$[3] = className;
|
|
134
|
+
$[4] = t1;
|
|
135
|
+
} else {
|
|
136
|
+
t1 = $[4];
|
|
137
|
+
}
|
|
138
|
+
let t2;
|
|
139
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
140
|
+
t2 = /*#__PURE__*/_jsx("optgroup", {
|
|
141
|
+
"data-slot": "native-select-optgroup",
|
|
142
|
+
className: t1,
|
|
143
|
+
...props
|
|
144
|
+
});
|
|
145
|
+
$[5] = props;
|
|
146
|
+
$[6] = t1;
|
|
147
|
+
$[7] = t2;
|
|
148
|
+
} else {
|
|
149
|
+
t2 = $[7];
|
|
150
|
+
}
|
|
151
|
+
return t2;
|
|
12
152
|
}
|
|
13
153
|
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
package/dist/form/textarea.js
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { cn } from "cn";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
function Textarea(t0) {
|
|
6
|
+
const $ = _c(8);
|
|
7
|
+
let className;
|
|
8
|
+
let props;
|
|
9
|
+
if ($[0] !== t0) {
|
|
10
|
+
({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = className;
|
|
16
|
+
$[2] = props;
|
|
17
|
+
} else {
|
|
18
|
+
className = $[1];
|
|
19
|
+
props = $[2];
|
|
20
|
+
}
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[3] !== className) {
|
|
23
|
+
t1 = cn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", className);
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[4];
|
|
28
|
+
}
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
31
|
+
t2 = /*#__PURE__*/_jsx("textarea", {
|
|
32
|
+
"data-slot": "textarea",
|
|
33
|
+
className: t1,
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
$[5] = props;
|
|
37
|
+
$[6] = t1;
|
|
38
|
+
$[7] = t2;
|
|
39
|
+
} else {
|
|
40
|
+
t2 = $[7];
|
|
41
|
+
}
|
|
42
|
+
return t2;
|
|
5
43
|
}
|
|
6
44
|
export { Textarea };
|