@locusgraph/components 0.2.1 → 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 +33 -136
- package/dist/action/button.js +15 -62
- package/dist/display/badge.js +13 -54
- package/dist/display/chat/attachment/attachment-parts.js +52 -218
- package/dist/display/chat/attachment/attachment.js +46 -186
- package/dist/display/chat/bubble.js +47 -192
- package/dist/display/chat/marker.js +32 -131
- package/dist/display/chat/message.js +56 -236
- package/dist/display/content/item.js +101 -415
- package/dist/display/content/kbd.js +18 -77
- package/dist/display/rule-grid/rule-grid.js +69 -292
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +25 -74
- package/dist/display/skeletons/layouts/skeleton-table.js +38 -158
- package/dist/display/skeletons/shapes/skeleton-avatar.js +19 -83
- package/dist/display/skeletons/shapes/skeleton-button.js +19 -83
- package/dist/display/skeletons/shapes/skeleton-text.js +18 -71
- package/dist/display/skeletons/skeleton-parts.js +17 -58
- package/dist/display/status/alert.js +30 -122
- package/dist/display/status/empty.js +57 -238
- package/dist/display/status/skeleton.js +9 -39
- package/dist/display/status/spinner.js +10 -40
- package/dist/display/table.js +75 -308
- package/dist/form/field/field-error.js +24 -107
- package/dist/form/field/field-separator.js +14 -65
- package/dist/form/field/field-set.js +20 -84
- package/dist/form/field/field-text.js +27 -115
- package/dist/form/field/field.js +31 -125
- package/dist/form/input.js +11 -45
- package/dist/form/native-select.js +31 -139
- package/dist/form/textarea.js +9 -39
- package/dist/layout/use-mobile.js +7 -20
- package/dist/navigation/breadcrumb.js +75 -294
- package/dist/navigation/navigation-menu.js +83 -359
- package/dist/navigation/pagination.js +78 -315
- package/dist/shell/app-header.js +21 -73
- package/dist/shell/app-shell.js +17 -56
- package/dist/shell/breadcrumbs.js +39 -97
- package/dist/shell/docs/docs-shell.js +35 -99
- package/dist/shell/docs/docs-sidebar.js +39 -86
- package/dist/shell/docs/use-active-section.js +31 -75
- package/dist/shell/navigation/app-sidebar.js +52 -174
- package/dist/shell/navigation/nav-group.js +40 -149
- package/package.json +1 -1
|
@@ -1,89 +1,25 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
function FieldSet(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
$[0] = t0;
|
|
14
|
-
$[1] = className;
|
|
15
|
-
$[2] = props;
|
|
16
|
-
} else {
|
|
17
|
-
className = $[1];
|
|
18
|
-
props = $[2];
|
|
19
|
-
}
|
|
20
|
-
let t1;
|
|
21
|
-
if ($[3] !== className) {
|
|
22
|
-
t1 = cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className);
|
|
23
|
-
$[3] = className;
|
|
24
|
-
$[4] = t1;
|
|
25
|
-
} else {
|
|
26
|
-
t1 = $[4];
|
|
27
|
-
}
|
|
28
|
-
let t2;
|
|
29
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
30
|
-
t2 = /*#__PURE__*/_jsx("fieldset", {
|
|
31
|
-
"data-slot": "field-set",
|
|
32
|
-
className: t1,
|
|
33
|
-
...props
|
|
34
|
-
});
|
|
35
|
-
$[5] = props;
|
|
36
|
-
$[6] = t1;
|
|
37
|
-
$[7] = t2;
|
|
38
|
-
} else {
|
|
39
|
-
t2 = $[7];
|
|
40
|
-
}
|
|
41
|
-
return t2;
|
|
3
|
+
function FieldSet({
|
|
4
|
+
className,
|
|
5
|
+
...props
|
|
6
|
+
}) {
|
|
7
|
+
return /*#__PURE__*/_jsx("fieldset", {
|
|
8
|
+
"data-slot": "field-set",
|
|
9
|
+
className: cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
42
12
|
}
|
|
43
|
-
function FieldLegend(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
$[0] = t0;
|
|
55
|
-
$[1] = className;
|
|
56
|
-
$[2] = props;
|
|
57
|
-
$[3] = t1;
|
|
58
|
-
} else {
|
|
59
|
-
className = $[1];
|
|
60
|
-
props = $[2];
|
|
61
|
-
t1 = $[3];
|
|
62
|
-
}
|
|
63
|
-
const variant = t1 === undefined ? "legend" : t1;
|
|
64
|
-
let t2;
|
|
65
|
-
if ($[4] !== className) {
|
|
66
|
-
t2 = cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className);
|
|
67
|
-
$[4] = className;
|
|
68
|
-
$[5] = t2;
|
|
69
|
-
} else {
|
|
70
|
-
t2 = $[5];
|
|
71
|
-
}
|
|
72
|
-
let t3;
|
|
73
|
-
if ($[6] !== props || $[7] !== t2 || $[8] !== variant) {
|
|
74
|
-
t3 = /*#__PURE__*/_jsx("legend", {
|
|
75
|
-
"data-slot": "field-legend",
|
|
76
|
-
"data-variant": variant,
|
|
77
|
-
className: t2,
|
|
78
|
-
...props
|
|
79
|
-
});
|
|
80
|
-
$[6] = props;
|
|
81
|
-
$[7] = t2;
|
|
82
|
-
$[8] = variant;
|
|
83
|
-
$[9] = t3;
|
|
84
|
-
} else {
|
|
85
|
-
t3 = $[9];
|
|
86
|
-
}
|
|
87
|
-
return t3;
|
|
13
|
+
function FieldLegend({
|
|
14
|
+
className,
|
|
15
|
+
variant = "legend",
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
return /*#__PURE__*/_jsx("legend", {
|
|
19
|
+
"data-slot": "field-legend",
|
|
20
|
+
"data-variant": variant,
|
|
21
|
+
className: cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
88
24
|
}
|
|
89
25
|
export { FieldLegend, FieldSet };
|
|
@@ -1,122 +1,34 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
2
|
import { Label } from "../label.js";
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
function FieldLabel(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4", "has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10", 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(Label, {
|
|
32
|
-
"data-slot": "field-label",
|
|
33
|
-
className: t1,
|
|
34
|
-
...props
|
|
35
|
-
});
|
|
36
|
-
$[5] = props;
|
|
37
|
-
$[6] = t1;
|
|
38
|
-
$[7] = t2;
|
|
39
|
-
} else {
|
|
40
|
-
t2 = $[7];
|
|
41
|
-
}
|
|
42
|
-
return t2;
|
|
4
|
+
function FieldLabel({
|
|
5
|
+
className,
|
|
6
|
+
...props
|
|
7
|
+
}) {
|
|
8
|
+
return /*#__PURE__*/_jsx(Label, {
|
|
9
|
+
"data-slot": "field-label",
|
|
10
|
+
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4", "has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
43
13
|
}
|
|
44
|
-
function FieldTitle(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
$[0] = t0;
|
|
54
|
-
$[1] = className;
|
|
55
|
-
$[2] = props;
|
|
56
|
-
} else {
|
|
57
|
-
className = $[1];
|
|
58
|
-
props = $[2];
|
|
59
|
-
}
|
|
60
|
-
let t1;
|
|
61
|
-
if ($[3] !== className) {
|
|
62
|
-
t1 = cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className);
|
|
63
|
-
$[3] = className;
|
|
64
|
-
$[4] = t1;
|
|
65
|
-
} else {
|
|
66
|
-
t1 = $[4];
|
|
67
|
-
}
|
|
68
|
-
let t2;
|
|
69
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
70
|
-
t2 = /*#__PURE__*/_jsx("div", {
|
|
71
|
-
"data-slot": "field-label",
|
|
72
|
-
className: t1,
|
|
73
|
-
...props
|
|
74
|
-
});
|
|
75
|
-
$[5] = props;
|
|
76
|
-
$[6] = t1;
|
|
77
|
-
$[7] = t2;
|
|
78
|
-
} else {
|
|
79
|
-
t2 = $[7];
|
|
80
|
-
}
|
|
81
|
-
return t2;
|
|
14
|
+
function FieldTitle({
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
return /*#__PURE__*/_jsx("div", {
|
|
19
|
+
"data-slot": "field-label",
|
|
20
|
+
className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
82
23
|
}
|
|
83
|
-
function FieldDescription(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
$[0] = t0;
|
|
93
|
-
$[1] = className;
|
|
94
|
-
$[2] = props;
|
|
95
|
-
} else {
|
|
96
|
-
className = $[1];
|
|
97
|
-
props = $[2];
|
|
98
|
-
}
|
|
99
|
-
let t1;
|
|
100
|
-
if ($[3] !== className) {
|
|
101
|
-
t1 = cn("text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className);
|
|
102
|
-
$[3] = className;
|
|
103
|
-
$[4] = t1;
|
|
104
|
-
} else {
|
|
105
|
-
t1 = $[4];
|
|
106
|
-
}
|
|
107
|
-
let t2;
|
|
108
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
109
|
-
t2 = /*#__PURE__*/_jsx("p", {
|
|
110
|
-
"data-slot": "field-description",
|
|
111
|
-
className: t1,
|
|
112
|
-
...props
|
|
113
|
-
});
|
|
114
|
-
$[5] = props;
|
|
115
|
-
$[6] = t1;
|
|
116
|
-
$[7] = t2;
|
|
117
|
-
} else {
|
|
118
|
-
t2 = $[7];
|
|
119
|
-
}
|
|
120
|
-
return t2;
|
|
24
|
+
function FieldDescription({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
return /*#__PURE__*/_jsx("p", {
|
|
29
|
+
"data-slot": "field-description",
|
|
30
|
+
className: cn("text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
121
33
|
}
|
|
122
34
|
export { FieldDescription, FieldLabel, FieldTitle };
|
package/dist/form/field/field.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -14,132 +13,39 @@ const fieldVariants = cva("group/field flex w-full gap-3", {
|
|
|
14
13
|
orientation: "vertical"
|
|
15
14
|
}
|
|
16
15
|
});
|
|
17
|
-
function Field(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = t0);
|
|
28
|
-
$[0] = t0;
|
|
29
|
-
$[1] = className;
|
|
30
|
-
$[2] = props;
|
|
31
|
-
$[3] = t1;
|
|
32
|
-
} else {
|
|
33
|
-
className = $[1];
|
|
34
|
-
props = $[2];
|
|
35
|
-
t1 = $[3];
|
|
36
|
-
}
|
|
37
|
-
const orientation = t1 === undefined ? "vertical" : t1;
|
|
38
|
-
let t2;
|
|
39
|
-
if ($[4] !== className || $[5] !== orientation) {
|
|
40
|
-
t2 = cn(fieldVariants({
|
|
16
|
+
function Field({
|
|
17
|
+
className,
|
|
18
|
+
orientation = "vertical",
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /*#__PURE__*/_jsx("div", {
|
|
22
|
+
role: "group",
|
|
23
|
+
"data-slot": "field",
|
|
24
|
+
"data-orientation": orientation,
|
|
25
|
+
className: cn(fieldVariants({
|
|
41
26
|
orientation
|
|
42
|
-
}), className)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
$[6] = t2;
|
|
46
|
-
} else {
|
|
47
|
-
t2 = $[6];
|
|
48
|
-
}
|
|
49
|
-
let t3;
|
|
50
|
-
if ($[7] !== orientation || $[8] !== props || $[9] !== t2) {
|
|
51
|
-
t3 = /*#__PURE__*/_jsx("div", {
|
|
52
|
-
role: "group",
|
|
53
|
-
"data-slot": "field",
|
|
54
|
-
"data-orientation": orientation,
|
|
55
|
-
className: t2,
|
|
56
|
-
...props
|
|
57
|
-
});
|
|
58
|
-
$[7] = orientation;
|
|
59
|
-
$[8] = props;
|
|
60
|
-
$[9] = t2;
|
|
61
|
-
$[10] = t3;
|
|
62
|
-
} else {
|
|
63
|
-
t3 = $[10];
|
|
64
|
-
}
|
|
65
|
-
return t3;
|
|
27
|
+
}), className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
66
30
|
}
|
|
67
|
-
function FieldGroup(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
$[0] = t0;
|
|
77
|
-
$[1] = className;
|
|
78
|
-
$[2] = props;
|
|
79
|
-
} else {
|
|
80
|
-
className = $[1];
|
|
81
|
-
props = $[2];
|
|
82
|
-
}
|
|
83
|
-
let t1;
|
|
84
|
-
if ($[3] !== className) {
|
|
85
|
-
t1 = cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4", className);
|
|
86
|
-
$[3] = className;
|
|
87
|
-
$[4] = t1;
|
|
88
|
-
} else {
|
|
89
|
-
t1 = $[4];
|
|
90
|
-
}
|
|
91
|
-
let t2;
|
|
92
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
93
|
-
t2 = /*#__PURE__*/_jsx("div", {
|
|
94
|
-
"data-slot": "field-group",
|
|
95
|
-
className: t1,
|
|
96
|
-
...props
|
|
97
|
-
});
|
|
98
|
-
$[5] = props;
|
|
99
|
-
$[6] = t1;
|
|
100
|
-
$[7] = t2;
|
|
101
|
-
} else {
|
|
102
|
-
t2 = $[7];
|
|
103
|
-
}
|
|
104
|
-
return t2;
|
|
31
|
+
function FieldGroup({
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}) {
|
|
35
|
+
return /*#__PURE__*/_jsx("div", {
|
|
36
|
+
"data-slot": "field-group",
|
|
37
|
+
className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4", className),
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
105
40
|
}
|
|
106
|
-
function FieldContent(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
$[0] = t0;
|
|
116
|
-
$[1] = className;
|
|
117
|
-
$[2] = props;
|
|
118
|
-
} else {
|
|
119
|
-
className = $[1];
|
|
120
|
-
props = $[2];
|
|
121
|
-
}
|
|
122
|
-
let t1;
|
|
123
|
-
if ($[3] !== className) {
|
|
124
|
-
t1 = cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className);
|
|
125
|
-
$[3] = className;
|
|
126
|
-
$[4] = t1;
|
|
127
|
-
} else {
|
|
128
|
-
t1 = $[4];
|
|
129
|
-
}
|
|
130
|
-
let t2;
|
|
131
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
132
|
-
t2 = /*#__PURE__*/_jsx("div", {
|
|
133
|
-
"data-slot": "field-content",
|
|
134
|
-
className: t1,
|
|
135
|
-
...props
|
|
136
|
-
});
|
|
137
|
-
$[5] = props;
|
|
138
|
-
$[6] = t1;
|
|
139
|
-
$[7] = t2;
|
|
140
|
-
} else {
|
|
141
|
-
t2 = $[7];
|
|
142
|
-
}
|
|
143
|
-
return t2;
|
|
41
|
+
function FieldContent({
|
|
42
|
+
className,
|
|
43
|
+
...props
|
|
44
|
+
}) {
|
|
45
|
+
return /*#__PURE__*/_jsx("div", {
|
|
46
|
+
"data-slot": "field-content",
|
|
47
|
+
className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
144
50
|
}
|
|
145
51
|
export { Field, FieldContent, FieldGroup, fieldVariants };
|
package/dist/form/input.js
CHANGED
|
@@ -1,50 +1,16 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
function Input(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
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
|
+
});
|
|
49
15
|
}
|
|
50
16
|
export { Input };
|
|
@@ -1,153 +1,45 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { ChevronDown as ChevronDownIcon } from "@carbon/icons-react";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import * as React from "react";
|
|
5
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
function NativeSelect(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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", {
|
|
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", {
|
|
38
14
|
"data-slot": "native-select",
|
|
39
15
|
"data-size": size,
|
|
40
|
-
className:
|
|
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),
|
|
41
17
|
...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, {
|
|
18
|
+
}), /*#__PURE__*/_jsx(ChevronDownIcon, {
|
|
53
19
|
className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
54
20
|
"aria-hidden": "true",
|
|
55
21
|
"data-slot": "native-select-icon"
|
|
56
|
-
})
|
|
57
|
-
|
|
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;
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
74
24
|
}
|
|
75
|
-
function NativeSelectOption(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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;
|
|
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
|
+
});
|
|
113
34
|
}
|
|
114
|
-
function NativeSelectOptGroup(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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;
|
|
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
|
+
});
|
|
152
44
|
}
|
|
153
45
|
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|