@locusgraph/components 0.2.0 → 0.2.2
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 +45 -17
- package/dist/action/button.js +44 -27
- package/dist/action/toggle-group.js +176 -12
- package/dist/action/toggle.js +70 -17
- package/dist/display/avatar.js +118 -7
- package/dist/display/badge.js +33 -20
- 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 +56 -13
- package/dist/display/chat/attachment/attachment.js +70 -28
- package/dist/display/chat/bubble.js +80 -37
- package/dist/display/chat/marker.js +44 -15
- package/dist/display/chat/message-scroller.js +276 -14
- package/dist/display/chat/message.js +58 -13
- package/dist/display/content/item.js +134 -47
- package/dist/display/content/kbd.js +19 -5
- package/dist/display/media/aspect-ratio.js +27 -3
- package/dist/display/media/carousel-controls.js +162 -11
- package/dist/display/media/carousel.js +325 -65
- package/dist/display/rule-grid/rule-grid.js +86 -29
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +30 -6
- package/dist/display/skeletons/layouts/skeleton-table.js +44 -6
- package/dist/display/skeletons/shapes/skeleton-avatar.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-button.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-text.js +25 -7
- package/dist/display/skeletons/skeleton-parts.js +22 -6
- package/dist/display/status/alert.js +44 -18
- package/dist/display/status/empty.js +69 -22
- package/dist/display/status/progress.js +116 -16
- package/dist/display/status/skeleton.js +10 -3
- package/dist/display/status/spinner.js +11 -3
- package/dist/display/table.js +77 -17
- package/dist/feedback/toaster.js +98 -21
- 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 +151 -8
- package/dist/form/advanced/combobox/combobox-items.js +239 -14
- package/dist/form/advanced/combobox/combobox.js +386 -13
- package/dist/form/advanced/input-otp.js +201 -11
- package/dist/form/choice/checkbox.js +58 -3
- package/dist/form/choice/radio-group.js +94 -5
- 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 +34 -14
- package/dist/form/field/field-separator.js +19 -3
- package/dist/form/field/field-set.js +21 -5
- package/dist/form/field/field-text.js +28 -7
- package/dist/form/field/field.js +43 -25
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +13 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +39 -7
- package/dist/form/textarea.js +11 -3
- package/dist/layout/accordion.js +165 -8
- package/dist/layout/collapsible.js +75 -7
- package/dist/layout/resizable.js +122 -7
- package/dist/layout/scroll/direction.js +25 -3
- 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 +384 -28
- package/dist/layout/tabs.js +183 -18
- package/dist/layout/use-mobile.js +11 -11
- package/dist/navigation/breadcrumb.js +82 -17
- package/dist/navigation/menubar/menubar-items.js +322 -16
- package/dist/navigation/menubar/menubar-sub.js +125 -7
- package/dist/navigation/menubar/menubar.js +213 -13
- package/dist/navigation/navigation-menu.js +90 -18
- package/dist/navigation/pagination.js +91 -20
- package/dist/overlay/alert-dialog.js +485 -26
- package/dist/overlay/context-menu/context-menu-items.js +322 -16
- package/dist/overlay/context-menu/context-menu-sub.js +125 -7
- package/dist/overlay/context-menu/context-menu.js +140 -11
- package/dist/overlay/dialog.js +405 -24
- package/dist/overlay/floating/command.js +423 -20
- 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 +149 -7
- package/dist/overlay/menu/dropdown-menu-item.js +174 -9
- package/dist/overlay/menu/dropdown-menu-sub.js +124 -7
- package/dist/overlay/menu/dropdown-menu.js +147 -12
- package/dist/overlay/popover.js +106 -7
- package/dist/overlay/sheet.js +379 -26
- package/dist/overlay/tooltip.js +145 -9
- package/dist/shell/app-header.js +29 -5
- package/dist/shell/app-shell.js +19 -3
- package/dist/shell/breadcrumbs.js +46 -14
- package/dist/shell/docs/docs-header.js +210 -10
- package/dist/shell/docs/docs-shell.js +36 -3
- package/dist/shell/docs/docs-sidebar.js +41 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +44 -42
- package/dist/shell/navigation/app-sidebar.js +66 -6
- package/dist/shell/navigation/nav-group.js +53 -11
- package/dist/shell/theme-toggle.js +51 -4
- package/package.json +2 -2
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,16 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
function Input({
|
|
5
|
+
className,
|
|
6
|
+
type,
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /*#__PURE__*/_jsx("input", {
|
|
10
|
+
type: type,
|
|
11
|
+
"data-slot": "input",
|
|
12
|
+
className: 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),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
5
15
|
}
|
|
6
16
|
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,45 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { ChevronDown as ChevronDownIcon } from "@carbon/icons-react";
|
|
3
2
|
import { cn } from "cn";
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
function NativeSelect({
|
|
6
|
+
className,
|
|
7
|
+
size = "default",
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
11
|
+
className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
12
|
+
"data-slot": "native-select-wrapper",
|
|
13
|
+
children: [/*#__PURE__*/_jsx("select", {
|
|
14
|
+
"data-slot": "native-select",
|
|
15
|
+
"data-size": size,
|
|
16
|
+
className: 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),
|
|
17
|
+
...props
|
|
18
|
+
}), /*#__PURE__*/_jsx(ChevronDownIcon, {
|
|
19
|
+
className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
"data-slot": "native-select-icon"
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
6
24
|
}
|
|
7
|
-
function NativeSelectOption({
|
|
8
|
-
|
|
25
|
+
function NativeSelectOption({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}) {
|
|
29
|
+
return /*#__PURE__*/_jsx("option", {
|
|
30
|
+
"data-slot": "native-select-option",
|
|
31
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
9
34
|
}
|
|
10
|
-
function NativeSelectOptGroup({
|
|
11
|
-
|
|
35
|
+
function NativeSelectOptGroup({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
return /*#__PURE__*/_jsx("optgroup", {
|
|
40
|
+
"data-slot": "native-select-optgroup",
|
|
41
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
12
44
|
}
|
|
13
45
|
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
package/dist/form/textarea.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
function Textarea({
|
|
5
|
+
className,
|
|
6
|
+
...props
|
|
7
|
+
}) {
|
|
8
|
+
return /*#__PURE__*/_jsx("textarea", {
|
|
9
|
+
"data-slot": "textarea",
|
|
10
|
+
className: 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),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
5
13
|
}
|
|
6
14
|
export { Textarea };
|