@ztwoint/z-ui 0.1.62 → 0.1.63
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.
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { ChevronDownIcon as
|
|
4
|
-
import { cn as
|
|
2
|
+
import * as s from "@radix-ui/react-select";
|
|
3
|
+
import { ChevronDownIcon as c, ChevronUpIcon as d } from "lucide-react";
|
|
4
|
+
import { cn as r } from "../../lib/utils.js";
|
|
5
5
|
import u from "../assets/icons/circle-check-filled.js";
|
|
6
6
|
function h({ ...e }) {
|
|
7
|
-
return /* @__PURE__ */ t(
|
|
7
|
+
return /* @__PURE__ */ t(s.Root, { "data-slot": "select", ...e });
|
|
8
8
|
}
|
|
9
9
|
function b({
|
|
10
10
|
className: e,
|
|
11
|
-
...
|
|
11
|
+
...a
|
|
12
12
|
}) {
|
|
13
13
|
return /* @__PURE__ */ t(
|
|
14
|
-
|
|
14
|
+
s.Group,
|
|
15
15
|
{
|
|
16
16
|
"data-slot": "select-group",
|
|
17
|
-
className:
|
|
17
|
+
className: r(
|
|
18
18
|
// layout
|
|
19
19
|
"flex w-full flex-col items-start gap-1 relative rounded-none",
|
|
20
20
|
e
|
|
21
21
|
),
|
|
22
|
-
...
|
|
22
|
+
...a
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
function g({
|
|
27
27
|
className: e,
|
|
28
|
-
...
|
|
28
|
+
...a
|
|
29
29
|
}) {
|
|
30
30
|
return /* @__PURE__ */ t(
|
|
31
|
-
|
|
31
|
+
s.Value,
|
|
32
32
|
{
|
|
33
33
|
"data-slot": "select-value",
|
|
34
|
-
className:
|
|
34
|
+
className: r(
|
|
35
35
|
// layout + text alignment
|
|
36
36
|
"w-full self-center items-start text-left flex gap-1",
|
|
37
37
|
e
|
|
38
38
|
),
|
|
39
|
-
...
|
|
39
|
+
...a
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
function w({
|
|
44
44
|
className: e,
|
|
45
|
-
size:
|
|
46
|
-
children:
|
|
45
|
+
size: a = "default",
|
|
46
|
+
children: l,
|
|
47
47
|
...n
|
|
48
48
|
}) {
|
|
49
49
|
return /* @__PURE__ */ o(
|
|
50
|
-
|
|
50
|
+
s.Trigger,
|
|
51
51
|
{
|
|
52
52
|
"data-slot": "select-trigger",
|
|
53
|
-
"data-size":
|
|
54
|
-
className:
|
|
53
|
+
"data-size": a,
|
|
54
|
+
className: r(
|
|
55
55
|
// base layout
|
|
56
56
|
"h-7.5 flex items-center justify-between w-full self-stretch transition-all cursor-pointer",
|
|
57
57
|
"gap-[6px] p-2 rounded-md",
|
|
@@ -83,23 +83,23 @@ function w({
|
|
|
83
83
|
),
|
|
84
84
|
...n,
|
|
85
85
|
children: [
|
|
86
|
-
|
|
87
|
-
/* @__PURE__ */ t(
|
|
86
|
+
l,
|
|
87
|
+
/* @__PURE__ */ t(s.Icon, { asChild: !0, children: /* @__PURE__ */ t(c, { className: "shrink-0 w-[14px] h-[14px] aspect-square text-text-neutral-muted" }) })
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
function v({
|
|
93
93
|
className: e,
|
|
94
|
-
children:
|
|
95
|
-
position:
|
|
94
|
+
children: a,
|
|
95
|
+
position: l = "popper",
|
|
96
96
|
...n
|
|
97
97
|
}) {
|
|
98
|
-
return /* @__PURE__ */ t(
|
|
99
|
-
|
|
98
|
+
return /* @__PURE__ */ t(s.Portal, { children: /* @__PURE__ */ t(
|
|
99
|
+
s.Content,
|
|
100
100
|
{
|
|
101
101
|
"data-slot": "select-content",
|
|
102
|
-
className:
|
|
102
|
+
className: r(
|
|
103
103
|
"min-w-[var(--radix-select-trigger-width)] flex flex-col items-start p-1 rounded-xl",
|
|
104
104
|
// background stack (overlay on top + base)
|
|
105
105
|
"bg-dropdown-surface",
|
|
@@ -108,51 +108,51 @@ function v({
|
|
|
108
108
|
e
|
|
109
109
|
),
|
|
110
110
|
sideOffset: 10,
|
|
111
|
-
position:
|
|
111
|
+
position: l,
|
|
112
112
|
...n,
|
|
113
|
-
children: /* @__PURE__ */ t(
|
|
113
|
+
children: /* @__PURE__ */ t(s.Viewport, { className: "!w-full ", children: a })
|
|
114
114
|
}
|
|
115
115
|
) });
|
|
116
116
|
}
|
|
117
117
|
function N({
|
|
118
118
|
className: e,
|
|
119
|
-
...
|
|
119
|
+
...a
|
|
120
120
|
}) {
|
|
121
121
|
return /* @__PURE__ */ t(
|
|
122
|
-
|
|
122
|
+
s.Label,
|
|
123
123
|
{
|
|
124
124
|
"data-slot": "select-label",
|
|
125
|
-
className:
|
|
125
|
+
className: r(
|
|
126
126
|
"flex items-center gap-1 self-stretch text-text-neutral-secondary",
|
|
127
127
|
"px-2 pt-2 pb-1",
|
|
128
128
|
"leading-none-medium-sm",
|
|
129
129
|
e
|
|
130
130
|
),
|
|
131
|
-
...
|
|
131
|
+
...a
|
|
132
132
|
}
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
|
-
function S({ className: e, children:
|
|
135
|
+
function S({ className: e, children: a, leftIcon: l, label: n, ...i }) {
|
|
136
136
|
return /* @__PURE__ */ o(
|
|
137
|
-
|
|
137
|
+
s.Item,
|
|
138
138
|
{
|
|
139
139
|
"data-slot": "select-item",
|
|
140
|
-
className:
|
|
140
|
+
className: r(
|
|
141
141
|
"border-none w-full relative self-stretch flex items-center justify-between gap-2 cursor-pointer outline-none rounded-md",
|
|
142
|
-
"data-[disabled]:pointer-events-none",
|
|
142
|
+
"data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:text-text-neutral-muted",
|
|
143
143
|
"p-2",
|
|
144
144
|
// hover/active surface
|
|
145
145
|
"data-[state=active]:surface-neutral-focused hover:surface-neutral-focused",
|
|
146
146
|
e
|
|
147
147
|
),
|
|
148
|
-
...
|
|
148
|
+
...i,
|
|
149
149
|
children: [
|
|
150
|
-
/* @__PURE__ */ t(
|
|
151
|
-
|
|
152
|
-
/* @__PURE__ */ t("div", { className: "flex-1
|
|
150
|
+
/* @__PURE__ */ t(s.ItemText, { asChild: !0, children: /* @__PURE__ */ o("div", { className: "flex items-center justify-center gap-2 flex-1 leading-none-medium-sm", children: [
|
|
151
|
+
l && /* @__PURE__ */ t("div", { className: "flex w-3.5 h-3.5 items-center justify-center", children: l }),
|
|
152
|
+
/* @__PURE__ */ t("div", { className: "flex-1", children: a || n })
|
|
153
153
|
] }) }),
|
|
154
154
|
/* @__PURE__ */ t(
|
|
155
|
-
|
|
155
|
+
s.ItemIndicator,
|
|
156
156
|
{
|
|
157
157
|
"data-slot": "select-item-indicator",
|
|
158
158
|
className: "flex w-[14px] h-[14px] items-center justify-center",
|
|
@@ -165,42 +165,42 @@ function S({ className: e, children: s, leftIcon: r, label: n, ...c }) {
|
|
|
165
165
|
}
|
|
166
166
|
function y({
|
|
167
167
|
className: e,
|
|
168
|
-
...
|
|
168
|
+
...a
|
|
169
169
|
}) {
|
|
170
170
|
return /* @__PURE__ */ t(
|
|
171
|
-
|
|
171
|
+
s.Separator,
|
|
172
172
|
{
|
|
173
173
|
"data-slot": "select-separator",
|
|
174
|
-
className:
|
|
175
|
-
...
|
|
174
|
+
className: r("border-t-[1px] border-solid border-stroke-solid-light my-1 mx-1", e),
|
|
175
|
+
...a
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
179
|
function Z({
|
|
180
180
|
className: e,
|
|
181
|
-
...
|
|
181
|
+
...a
|
|
182
182
|
}) {
|
|
183
183
|
return /* @__PURE__ */ t(
|
|
184
|
-
|
|
184
|
+
s.ScrollUpButton,
|
|
185
185
|
{
|
|
186
186
|
"data-slot": "select-scroll-up-button",
|
|
187
|
-
className:
|
|
188
|
-
...
|
|
187
|
+
className: r("flex cursor-default items-center justify-center py-1", e),
|
|
188
|
+
...a,
|
|
189
189
|
children: /* @__PURE__ */ t(d, { className: "size-4" })
|
|
190
190
|
}
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
193
|
function j({
|
|
194
194
|
className: e,
|
|
195
|
-
...
|
|
195
|
+
...a
|
|
196
196
|
}) {
|
|
197
197
|
return /* @__PURE__ */ t(
|
|
198
|
-
|
|
198
|
+
s.ScrollDownButton,
|
|
199
199
|
{
|
|
200
200
|
"data-slot": "select-scroll-down-button",
|
|
201
|
-
className:
|
|
202
|
-
...
|
|
203
|
-
children: /* @__PURE__ */ t(
|
|
201
|
+
className: r("flex cursor-default items-center justify-center py-1", e),
|
|
202
|
+
...a,
|
|
203
|
+
children: /* @__PURE__ */ t(c, { className: "size-4" })
|
|
204
204
|
}
|
|
205
205
|
);
|
|
206
206
|
}
|