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