@xjur-ui/react 1.0.0 → 1.0.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/.turbo/turbo-build.log +63 -57
- package/CHANGELOG.md +18 -0
- package/dist/components/avatar.d.ts +11 -0
- package/dist/components/avatar.js +58 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/{ui/input/message.js → badge.js} +30 -47
- package/dist/components/{ui/button.d.ts → button.d.ts} +2 -2
- package/dist/components/{ui/button.js → button.js} +9 -6
- package/dist/components/calendar.d.ts +11 -0
- package/dist/components/calendar.js +751 -0
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/{ui/input/root.js → checkbox.js} +69 -79
- package/dist/components/chip.d.ts +24 -0
- package/dist/components/chip.js +255 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +41 -0
- package/dist/components/date-picker.d.ts +20 -0
- package/dist/components/date-picker.js +232 -0
- package/dist/components/divider.d.ts +7 -0
- package/dist/components/divider.js +28 -0
- package/dist/components/dropdown-menu.d.ts +22 -0
- package/dist/components/dropdown-menu.js +294 -0
- package/dist/components/{resources/icons.d.ts → icon.d.ts} +11 -2
- package/dist/components/{ui/icon.js → icon.js} +20 -5
- package/dist/components/input.d.ts +32 -0
- package/dist/components/input.js +315 -0
- package/dist/components/list.d.ts +25 -0
- package/dist/components/{ui/input/content.js → list.js} +83 -87
- package/dist/components/{ui/logo.d.ts → logo.d.ts} +2 -2
- package/dist/components/{ui/logo.js → logo.js} +5 -5
- package/dist/components/{ui/otp-input.js → otp-input.js} +1 -1
- package/dist/components/radio.d.ts +10 -0
- package/dist/components/{ui/input/label.js → radio.js} +68 -77
- package/dist/components/search-input.d.ts +17 -0
- package/dist/components/search-input.js +274 -0
- package/dist/components/select.d.ts +33 -0
- package/dist/components/select.js +550 -0
- package/dist/components/sheet.d.ts +19 -0
- package/dist/components/sheet.js +251 -0
- package/dist/components/switch.d.ts +7 -0
- package/dist/components/switch.js +36 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.js +54 -0
- package/dist/components/tag.d.ts +18 -0
- package/dist/components/tag.js +189 -0
- package/dist/components/{ui/typography.d.ts → typography.d.ts} +4 -4
- package/dist/components/{ui/typography.js → typography.js} +1 -1
- package/dist/index.css +1233 -62
- package/dist/index.d.ts +2 -17
- package/dist/index.js +0 -788
- package/eslint.config.js +8 -1
- package/package.json +41 -10
- package/src/components/avatar.tsx +53 -0
- package/src/components/badge.tsx +40 -0
- package/src/components/{ui/button.tsx → button.tsx} +7 -5
- package/src/components/calendar.tsx +123 -0
- package/src/components/checkbox.tsx +57 -0
- package/src/components/chip.tsx +109 -0
- package/src/components/collapsible.tsx +35 -0
- package/src/components/date-picker.tsx +160 -0
- package/src/components/divider.tsx +23 -0
- package/src/components/dropdown-menu.tsx +101 -0
- package/src/components/{ui/icon.tsx → icon.tsx} +1 -1
- package/src/components/input.tsx +256 -0
- package/src/components/list.tsx +111 -0
- package/src/components/radio.tsx +74 -0
- package/src/components/search-input.tsx +112 -0
- package/src/components/select.tsx +240 -0
- package/src/components/sheet.tsx +141 -0
- package/src/components/switch.tsx +31 -0
- package/src/components/tabs.tsx +53 -0
- package/src/components/tag.tsx +91 -0
- package/src/index.css +4 -1
- package/src/index.ts +0 -1
- package/src/{components/resources → resources}/icons.ts +16 -1
- package/src/resources/input-mask.ts +91 -0
- package/dist/components/resources/icons.js +0 -133
- package/dist/components/resources/logo/horizontal.d.ts +0 -12
- package/dist/components/resources/logo/horizontal.js +0 -107
- package/dist/components/resources/logo/icon.d.ts +0 -12
- package/dist/components/resources/logo/icon.js +0 -79
- package/dist/components/resources/logo/index.d.ts +0 -4
- package/dist/components/resources/logo/index.js +0 -291
- package/dist/components/resources/logo/vertical.d.ts +0 -12
- package/dist/components/resources/logo/vertical.js +0 -107
- package/dist/components/ui/accordion.d.ts +0 -5
- package/dist/components/ui/accordion.js +0 -8
- package/dist/components/ui/icon.d.ts +0 -12
- package/dist/components/ui/index.d.ts +0 -17
- package/dist/components/ui/index.js +0 -788
- package/dist/components/ui/input/content.d.ts +0 -9
- package/dist/components/ui/input/index.d.ts +0 -12
- package/dist/components/ui/input/index.js +0 -335
- package/dist/components/ui/input/label.d.ts +0 -12
- package/dist/components/ui/input/message.d.ts +0 -10
- package/dist/components/ui/input/root.d.ts +0 -18
- package/dist/components/ui/input/slot.d.ts +0 -10
- package/dist/components/ui/input/slot.js +0 -20
- package/dist/components/ui/input/text.d.ts +0 -10
- package/dist/components/ui/input/text.js +0 -195
- package/src/components/ui/accordion.tsx +0 -3
- package/src/components/ui/index.ts +0 -13
- package/src/components/ui/input/content.tsx +0 -59
- package/src/components/ui/input/index.ts +0 -6
- package/src/components/ui/input/label.tsx +0 -41
- package/src/components/ui/input/message.tsx +0 -37
- package/src/components/ui/input/root.tsx +0 -57
- package/src/components/ui/input/slot.tsx +0 -21
- package/src/components/ui/input/text.tsx +0 -69
- /package/dist/components/{ui/otp-input.d.ts → otp-input.d.ts} +0 -0
- /package/src/components/{ui/logo.tsx → logo.tsx} +0 -0
- /package/src/components/{ui/otp-input.tsx → otp-input.tsx} +0 -0
- /package/src/components/{ui/typography.tsx → typography.tsx} +0 -0
- /package/src/{components/resources → resources}/logo/horizontal.tsx +0 -0
- /package/src/{components/resources → resources}/logo/icon.tsx +0 -0
- /package/src/{components/resources → resources}/logo/index.ts +0 -0
- /package/src/{components/resources → resources}/logo/vertical.tsx +0 -0
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
// src/components/select.tsx
|
|
2
|
+
import * as RadixPopover from "@radix-ui/react-popover";
|
|
3
|
+
import { cx as cx5 } from "@xjur-ui/util";
|
|
4
|
+
|
|
5
|
+
// src/components/list.tsx
|
|
6
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
7
|
+
import { cx, cva as cva2 } from "@xjur-ui/util";
|
|
8
|
+
|
|
9
|
+
// src/components/typography.tsx
|
|
10
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
11
|
+
import { cva } from "@xjur-ui/util";
|
|
12
|
+
import { memo } from "react";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
var typographyVariants = cva("", {
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
body: "",
|
|
18
|
+
label: "",
|
|
19
|
+
title: "",
|
|
20
|
+
headline: ""
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
"sm-2x": "",
|
|
24
|
+
"sm-1x": "",
|
|
25
|
+
sm: "",
|
|
26
|
+
md: "",
|
|
27
|
+
lg: ""
|
|
28
|
+
},
|
|
29
|
+
weight: {
|
|
30
|
+
thin: "font-thin",
|
|
31
|
+
extraLight: "font-extralight",
|
|
32
|
+
light: "font-light",
|
|
33
|
+
normal: "font-normal",
|
|
34
|
+
medium: "font-medium",
|
|
35
|
+
semibold: "font-semibold",
|
|
36
|
+
bold: "font-bold",
|
|
37
|
+
extraBold: "font-extrabold",
|
|
38
|
+
black: "font-black"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
compoundVariants: [
|
|
42
|
+
{ variant: "body", size: "sm-1x", class: "text-size-body-sm-1x" },
|
|
43
|
+
{ variant: "body", size: "sm", class: "text-size-body-sm" },
|
|
44
|
+
{ variant: "body", size: "md", class: "text-size-body-md" },
|
|
45
|
+
{ variant: "body", size: "lg", class: "text-size-body-lg" },
|
|
46
|
+
{ variant: "label", size: "sm-2x", class: "text-size-label-sm-2x" },
|
|
47
|
+
{ variant: "label", size: "sm-1x", class: "text-size-label-sm-1x" },
|
|
48
|
+
{ variant: "label", size: "sm", class: "text-size-label-sm" },
|
|
49
|
+
{ variant: "label", size: "md", class: "text-size-label-md" },
|
|
50
|
+
{ variant: "label", size: "lg", class: "text-size-label-lg" },
|
|
51
|
+
{ variant: "title", size: "sm", class: "text-size-title-sm" },
|
|
52
|
+
{ variant: "title", size: "md", class: "text-size-title-md" },
|
|
53
|
+
{ variant: "title", size: "lg", class: "text-size-title-lg" },
|
|
54
|
+
{ variant: "headline", size: "sm", class: "text-size-headline-sm" },
|
|
55
|
+
{ variant: "headline", size: "md", class: "text-size-headline-md" },
|
|
56
|
+
{ variant: "headline", size: "lg", class: "text-size-headline-lg" }
|
|
57
|
+
],
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: "body",
|
|
60
|
+
size: "md",
|
|
61
|
+
weight: "normal"
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
var Typography = memo(
|
|
65
|
+
({
|
|
66
|
+
variant,
|
|
67
|
+
size,
|
|
68
|
+
weight,
|
|
69
|
+
asChild,
|
|
70
|
+
className,
|
|
71
|
+
...props
|
|
72
|
+
}) => {
|
|
73
|
+
const Component = asChild ? Slot : "span";
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
75
|
+
Component,
|
|
76
|
+
{
|
|
77
|
+
className: typographyVariants({ variant, size, weight, className }),
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
Typography.displayName = "Typography";
|
|
84
|
+
|
|
85
|
+
// src/components/list.tsx
|
|
86
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
87
|
+
function ListRoot({
|
|
88
|
+
className,
|
|
89
|
+
asChild,
|
|
90
|
+
...props
|
|
91
|
+
}) {
|
|
92
|
+
const Comp = asChild ? Slot2 : "div";
|
|
93
|
+
return /* @__PURE__ */ jsx2(
|
|
94
|
+
Comp,
|
|
95
|
+
{
|
|
96
|
+
...props,
|
|
97
|
+
className: cx(
|
|
98
|
+
className,
|
|
99
|
+
"rounded-small scrollbar-hide bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-10 max-h-[400px] list-none overflow-y-auto border"
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
function ListHeader({
|
|
105
|
+
className,
|
|
106
|
+
asChild,
|
|
107
|
+
...props
|
|
108
|
+
}) {
|
|
109
|
+
const Comp = asChild ? Slot2 : "div";
|
|
110
|
+
return /* @__PURE__ */ jsx2(Comp, { ...props, className: cx(className, "px-small pt-small-1x") });
|
|
111
|
+
}
|
|
112
|
+
function ListHeaderTitle({
|
|
113
|
+
variant = "label",
|
|
114
|
+
size = "sm",
|
|
115
|
+
weight = "medium",
|
|
116
|
+
className,
|
|
117
|
+
...props
|
|
118
|
+
}) {
|
|
119
|
+
return /* @__PURE__ */ jsx2(
|
|
120
|
+
Typography,
|
|
121
|
+
{
|
|
122
|
+
className: cx(className, "text-neutral-placeholder"),
|
|
123
|
+
size,
|
|
124
|
+
variant,
|
|
125
|
+
weight,
|
|
126
|
+
...props
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function ListContent({
|
|
131
|
+
className,
|
|
132
|
+
asChild,
|
|
133
|
+
...props
|
|
134
|
+
}) {
|
|
135
|
+
const Comp = asChild ? Slot2 : "ul";
|
|
136
|
+
return /* @__PURE__ */ jsx2(
|
|
137
|
+
Comp,
|
|
138
|
+
{
|
|
139
|
+
...props,
|
|
140
|
+
className: cx("gap-small-1x p-small flex flex-col", className)
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
var variants = cva2(
|
|
145
|
+
[
|
|
146
|
+
"py-medium px-small flex items-center gap-small rounded-small-1x",
|
|
147
|
+
"bg-layer-2-idle text-neutral-dark",
|
|
148
|
+
"hover:bg-layer-2-hover transition-colors duration-100 ease-out",
|
|
149
|
+
"active:bg-layer-2-pressed"
|
|
150
|
+
],
|
|
151
|
+
{
|
|
152
|
+
variants: {
|
|
153
|
+
size: {
|
|
154
|
+
md: "h-large-4x",
|
|
155
|
+
lg: "h-large-7x"
|
|
156
|
+
},
|
|
157
|
+
isActive: {
|
|
158
|
+
true: "bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
defaultVariants: {
|
|
162
|
+
size: "md",
|
|
163
|
+
isActive: false
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
function ListItem({
|
|
168
|
+
className,
|
|
169
|
+
size,
|
|
170
|
+
isActive,
|
|
171
|
+
asChild,
|
|
172
|
+
...props
|
|
173
|
+
}) {
|
|
174
|
+
const Comp = asChild ? Slot2 : "li";
|
|
175
|
+
return /* @__PURE__ */ jsx2(Comp, { ...props, className: cx(variants({ size, isActive }), className) });
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// src/components/search-input.tsx
|
|
179
|
+
import { cva as cva4, cx as cx3 } from "@xjur-ui/util";
|
|
180
|
+
import { createContext } from "react";
|
|
181
|
+
|
|
182
|
+
// src/components/button.tsx
|
|
183
|
+
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
184
|
+
import { cva as cva3, cx as cx2 } from "@xjur-ui/util";
|
|
185
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
186
|
+
var buttonVariants = cva3(
|
|
187
|
+
[
|
|
188
|
+
"outline-none inline-flex items-center justify-center rounded-circle gap-small cursor-pointer disabled:opacity-38 disabled:pointer-events-none transition-colors"
|
|
189
|
+
],
|
|
190
|
+
{
|
|
191
|
+
variants: {
|
|
192
|
+
size: {
|
|
193
|
+
md: "py-small_1x-alt px-medium text-size-body-md",
|
|
194
|
+
sm: "py-small-1x px-small text-size-label-sm",
|
|
195
|
+
icon_md: "p-small text-size-body-md h-large-4x w-large-4x",
|
|
196
|
+
icon_sm: "p-small-1x text-size-label-sm h-large-2x w-large-2x"
|
|
197
|
+
},
|
|
198
|
+
variant: {
|
|
199
|
+
primary: "",
|
|
200
|
+
secondary: "",
|
|
201
|
+
tertiary: "",
|
|
202
|
+
destructive: "",
|
|
203
|
+
outlined: "bg-layer-2-idle border border-border-layer-2 hover:bg-layer-2-hover active:bg-layer-2-pressed"
|
|
204
|
+
},
|
|
205
|
+
appearance: {
|
|
206
|
+
solid: "",
|
|
207
|
+
ghost: "bg-transparent"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
compoundVariants: [
|
|
211
|
+
{
|
|
212
|
+
variant: "primary",
|
|
213
|
+
appearance: "solid",
|
|
214
|
+
class: "bg-primary-idle text-neutral-label hover:bg-primary-hover active:bg-primary-pressed"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
variant: "primary",
|
|
218
|
+
appearance: "ghost",
|
|
219
|
+
class: "text-primary-idle hover:bg-primary-alt-idle active:bg-primary-alt-pressed"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
variant: "secondary",
|
|
223
|
+
appearance: "solid",
|
|
224
|
+
class: "bg-layer-1-hover text-neutral-dark hover:bg-layer-1-pressed active:bg-layer-1-active"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
variant: "secondary",
|
|
228
|
+
appearance: "ghost",
|
|
229
|
+
class: "hover:bg-layer-1-hover active:bg-layer-1-pressed"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
variant: "tertiary",
|
|
233
|
+
appearance: "solid",
|
|
234
|
+
class: "bg-layer-2-hover text-neutral-dark hover:bg-layer-2-pressed active:bg-layer-2-active"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
variant: "tertiary",
|
|
238
|
+
appearance: "ghost",
|
|
239
|
+
class: "hover:bg-layer-2-hover active:bg-layer-2-pressed"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
variant: "destructive",
|
|
243
|
+
appearance: "solid",
|
|
244
|
+
class: "bg-danger-idle text-neutral-label hover:bg-danger-hover active:bg-danger-pressed"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
variant: "destructive",
|
|
248
|
+
appearance: "ghost",
|
|
249
|
+
class: "text-danger-label-idle hover:bg-danger-alt-idle active:bg-danger-alt-pressed"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
defaultVariants: {
|
|
253
|
+
size: "md",
|
|
254
|
+
variant: "primary",
|
|
255
|
+
appearance: "solid"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
// src/components/search-input.tsx
|
|
261
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
262
|
+
var SearchInputRootContext = createContext({
|
|
263
|
+
variant: "outlined"
|
|
264
|
+
});
|
|
265
|
+
function SearchInputRoot({
|
|
266
|
+
className,
|
|
267
|
+
variant = "outlined",
|
|
268
|
+
...props
|
|
269
|
+
}) {
|
|
270
|
+
return /* @__PURE__ */ jsx4(SearchInputRootContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx4("div", { className: cx3(className, "relative flex w-full"), ...props }) });
|
|
271
|
+
}
|
|
272
|
+
function SearchInputContent({
|
|
273
|
+
className,
|
|
274
|
+
...props
|
|
275
|
+
}) {
|
|
276
|
+
const contentVarians = cva4(
|
|
277
|
+
[
|
|
278
|
+
"gap-small py-small_1x-alt px-small flex items-center w-full",
|
|
279
|
+
"h-large-4x rounded-circle",
|
|
280
|
+
"border-border-layer-2 placeholder:placeholder-neutral-placeholder text-size-body-md text-neutral-dark border font-normal",
|
|
281
|
+
"group-hover:border-border-layer-3 transition-colors duration-200",
|
|
282
|
+
"disabled:opacity-60",
|
|
283
|
+
"focus-within:border-primary-idle"
|
|
284
|
+
],
|
|
285
|
+
{
|
|
286
|
+
variants: {
|
|
287
|
+
variant: {
|
|
288
|
+
outlined: "rounded-circle focus-within:border-primary-idle focus-within:shadow-focus-primary",
|
|
289
|
+
line: "rounded-none border-t-0 border-b-1 border-x-0",
|
|
290
|
+
action: "rounded-tr-none rounded-br-none border-r-0"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
);
|
|
295
|
+
return /* @__PURE__ */ jsx4(SearchInputRootContext.Consumer, { children: ({ variant }) => /* @__PURE__ */ jsx4(
|
|
296
|
+
"div",
|
|
297
|
+
{
|
|
298
|
+
className: cx3(className, contentVarians({ variant })),
|
|
299
|
+
"data-variant": variant,
|
|
300
|
+
...props
|
|
301
|
+
}
|
|
302
|
+
) });
|
|
303
|
+
}
|
|
304
|
+
function SearchInputText({
|
|
305
|
+
className,
|
|
306
|
+
...props
|
|
307
|
+
}) {
|
|
308
|
+
return /* @__PURE__ */ jsx4("input", { className: cx3(className, "flex-1 outline-none"), ...props });
|
|
309
|
+
}
|
|
310
|
+
function SearchInputSlot(props) {
|
|
311
|
+
return /* @__PURE__ */ jsx4("div", { ...props, "data-slot": "search-input-slot" });
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// src/components/icon.tsx
|
|
315
|
+
import { cx as cx4 } from "@xjur-ui/util";
|
|
316
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
317
|
+
function Icon({ className, filled = false, name, ...props }) {
|
|
318
|
+
return /* @__PURE__ */ jsx5(
|
|
319
|
+
"span",
|
|
320
|
+
{
|
|
321
|
+
...props,
|
|
322
|
+
className: cx4(
|
|
323
|
+
"material-symbols-outlined",
|
|
324
|
+
"text-size-body-lg",
|
|
325
|
+
className
|
|
326
|
+
),
|
|
327
|
+
style: {
|
|
328
|
+
fontVariationSettings: `'FILL' ${filled ? 1 : 0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,
|
|
329
|
+
...props.style
|
|
330
|
+
},
|
|
331
|
+
children: name
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// src/components/select.tsx
|
|
337
|
+
import { Fragment, jsx as jsx6, jsxs } from "react/jsx-runtime";
|
|
338
|
+
function SelectRoot(props) {
|
|
339
|
+
return /* @__PURE__ */ jsx6(RadixPopover.Root, { ...props });
|
|
340
|
+
}
|
|
341
|
+
function SelectTrigger({
|
|
342
|
+
className,
|
|
343
|
+
...props
|
|
344
|
+
}) {
|
|
345
|
+
return /* @__PURE__ */ jsx6(
|
|
346
|
+
RadixPopover.Trigger,
|
|
347
|
+
{
|
|
348
|
+
className: cx5(
|
|
349
|
+
className,
|
|
350
|
+
"group h-large-4x rounded-small-1x gap-small py-small_1x-alt px-small relative flex w-full cursor-pointer items-center",
|
|
351
|
+
"bg-layer-2-idle border-border-layer-2 hover:border-border-layer-3 border",
|
|
352
|
+
"data-[state=open]:border-primary-idle data-[state=open]:shadow-focus-primary",
|
|
353
|
+
"has-[input:not(:placeholder-shown)]:text-primary-idle",
|
|
354
|
+
"has-[input:not(:placeholder-shown)]:border-primary-idle"
|
|
355
|
+
),
|
|
356
|
+
...props
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
function SelectContent({
|
|
361
|
+
className,
|
|
362
|
+
children,
|
|
363
|
+
sideOffset = 4,
|
|
364
|
+
side = "bottom",
|
|
365
|
+
align = "start",
|
|
366
|
+
...props
|
|
367
|
+
}) {
|
|
368
|
+
return /* @__PURE__ */ jsx6(RadixPopover.Portal, { children: /* @__PURE__ */ jsx6(
|
|
369
|
+
RadixPopover.Content,
|
|
370
|
+
{
|
|
371
|
+
align,
|
|
372
|
+
className: cx5(
|
|
373
|
+
className,
|
|
374
|
+
"group z-10 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-content-available-width)] min-w-[var(--radix-popover-trigger-width)]"
|
|
375
|
+
),
|
|
376
|
+
side,
|
|
377
|
+
sideOffset,
|
|
378
|
+
...props,
|
|
379
|
+
children: /* @__PURE__ */ jsx6(ListRoot, { children })
|
|
380
|
+
}
|
|
381
|
+
) });
|
|
382
|
+
}
|
|
383
|
+
function SelectValue({
|
|
384
|
+
className,
|
|
385
|
+
displayValue = "",
|
|
386
|
+
...props
|
|
387
|
+
}) {
|
|
388
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
389
|
+
!!displayValue && /* @__PURE__ */ jsx6(Typography, { className: "text-neutral-dark group-has-[div[data-slot=select-left-slot]]:pl-large-1x", children: displayValue }),
|
|
390
|
+
/* @__PURE__ */ jsx6(
|
|
391
|
+
"input",
|
|
392
|
+
{
|
|
393
|
+
...props,
|
|
394
|
+
"aria-readonly": true,
|
|
395
|
+
className: cx5(className, "pointer-events-none"),
|
|
396
|
+
hidden: true,
|
|
397
|
+
placeholder: props.placeholder ?? " ",
|
|
398
|
+
readOnly: true
|
|
399
|
+
}
|
|
400
|
+
)
|
|
401
|
+
] });
|
|
402
|
+
}
|
|
403
|
+
function SelectMultiValue({
|
|
404
|
+
className,
|
|
405
|
+
values,
|
|
406
|
+
children,
|
|
407
|
+
...props
|
|
408
|
+
}) {
|
|
409
|
+
return /* @__PURE__ */ jsxs(
|
|
410
|
+
"div",
|
|
411
|
+
{
|
|
412
|
+
className: cx5(
|
|
413
|
+
className,
|
|
414
|
+
"gap-small-1x scrollbar-hide group-has-[div[data-slot=select-left-slot]]:pl-large-1x overflow-x-small flex"
|
|
415
|
+
),
|
|
416
|
+
...props,
|
|
417
|
+
children: [
|
|
418
|
+
children,
|
|
419
|
+
/* @__PURE__ */ jsx6(
|
|
420
|
+
"input",
|
|
421
|
+
{
|
|
422
|
+
"aria-readonly": true,
|
|
423
|
+
className: cx5(className, "pointer-events-none"),
|
|
424
|
+
hidden: true,
|
|
425
|
+
placeholder: " ",
|
|
426
|
+
readOnly: true,
|
|
427
|
+
value: values.join(",")
|
|
428
|
+
}
|
|
429
|
+
)
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
function SelectLabel({
|
|
435
|
+
className,
|
|
436
|
+
htmlFor,
|
|
437
|
+
children,
|
|
438
|
+
...props
|
|
439
|
+
}) {
|
|
440
|
+
return /* @__PURE__ */ jsx6(
|
|
441
|
+
Typography,
|
|
442
|
+
{
|
|
443
|
+
asChild: true,
|
|
444
|
+
className: cx5(
|
|
445
|
+
"inline-block max-w-full truncate text-left font-normal",
|
|
446
|
+
"left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2",
|
|
447
|
+
"ease transition-all duration-250",
|
|
448
|
+
// Content Open
|
|
449
|
+
"group-data-[state=open]:text-primary-idle",
|
|
450
|
+
"group-data-[state=open]:-top-[3px]",
|
|
451
|
+
"group-data-[state=open]:text-size-label-sm-1x",
|
|
452
|
+
"group-data-[state=open]:font-medium",
|
|
453
|
+
// Filled
|
|
454
|
+
"group-has-[input:not(:placeholder-shown)]:text-primary-idle",
|
|
455
|
+
"group-has-[input:not(:placeholder-shown)]:-top-[3px]",
|
|
456
|
+
"group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x",
|
|
457
|
+
"group-has-[input:not(:placeholder-shown)]:font-medium",
|
|
458
|
+
// If has left slot
|
|
459
|
+
"group-has-[div[data-slot=select-left-slot]]:left-large-4x",
|
|
460
|
+
"group-has-[div[data-slot=select-left-slot]]:group-data-[state=open]:left-small",
|
|
461
|
+
"group-has-[div[data-slot=select-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-small",
|
|
462
|
+
// If has right slot
|
|
463
|
+
"group-has-[div[data-slot=select-right-slot]]:right-large-4x",
|
|
464
|
+
"group-has-[div[data-slot=select-right-slot]]:group-data-[state=open]:right-small",
|
|
465
|
+
"group-has-[div[data-slot=select-right-slot]]:group-has-[input:not(:placeholder-shown)]:right-small",
|
|
466
|
+
// Animate
|
|
467
|
+
"group-data-[state=open]:animate-in",
|
|
468
|
+
"group-data-[state=closed]:animate-out",
|
|
469
|
+
"group-has-[input:not(:placeholder-shown)]:animate-out",
|
|
470
|
+
className
|
|
471
|
+
),
|
|
472
|
+
weight: "medium",
|
|
473
|
+
...props,
|
|
474
|
+
children: /* @__PURE__ */ jsx6("label", { htmlFor, children: /* @__PURE__ */ jsx6("span", { className: "bg-layer-2-idle rounded-small-1x max-w-full", children }) })
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
function SelectOptions(props) {
|
|
479
|
+
return /* @__PURE__ */ jsx6(ListContent, { ...props });
|
|
480
|
+
}
|
|
481
|
+
function SelectOption({
|
|
482
|
+
className,
|
|
483
|
+
...props
|
|
484
|
+
}) {
|
|
485
|
+
return /* @__PURE__ */ jsx6(ListItem, { className: cx5(className, "cursor-pointer"), ...props });
|
|
486
|
+
}
|
|
487
|
+
function SelectOptionText(props) {
|
|
488
|
+
return /* @__PURE__ */ jsx6(Typography, { ...props });
|
|
489
|
+
}
|
|
490
|
+
function SelectHeader(props) {
|
|
491
|
+
return /* @__PURE__ */ jsx6(ListHeader, { ...props });
|
|
492
|
+
}
|
|
493
|
+
function SelectHeaderTitle(props) {
|
|
494
|
+
return /* @__PURE__ */ jsx6(ListHeaderTitle, { ...props });
|
|
495
|
+
}
|
|
496
|
+
function SelectDropdown(props) {
|
|
497
|
+
return /* @__PURE__ */ jsx6("div", { ...props });
|
|
498
|
+
}
|
|
499
|
+
function SelectLeftSlot({ className, ...props }) {
|
|
500
|
+
return /* @__PURE__ */ jsx6(
|
|
501
|
+
"div",
|
|
502
|
+
{
|
|
503
|
+
...props,
|
|
504
|
+
className: cx5(
|
|
505
|
+
className,
|
|
506
|
+
"left-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center"
|
|
507
|
+
),
|
|
508
|
+
"data-slot": "select-left-slot"
|
|
509
|
+
}
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
function SelectRightSlot({
|
|
513
|
+
className,
|
|
514
|
+
...props
|
|
515
|
+
}) {
|
|
516
|
+
return /* @__PURE__ */ jsx6(
|
|
517
|
+
"div",
|
|
518
|
+
{
|
|
519
|
+
...props,
|
|
520
|
+
className: cx5(
|
|
521
|
+
className,
|
|
522
|
+
"right-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center"
|
|
523
|
+
),
|
|
524
|
+
"data-slot": "select-right-slot"
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
function SelectSearch(props) {
|
|
529
|
+
return /* @__PURE__ */ jsx6(SearchInputRoot, { variant: "line", children: /* @__PURE__ */ jsxs(SearchInputContent, { children: [
|
|
530
|
+
/* @__PURE__ */ jsx6(SearchInputSlot, { children: /* @__PURE__ */ jsx6(Icon, { className: "text-icon-neutral-3", name: "search" }) }),
|
|
531
|
+
/* @__PURE__ */ jsx6(SearchInputText, { ...props })
|
|
532
|
+
] }) });
|
|
533
|
+
}
|
|
534
|
+
export {
|
|
535
|
+
SelectContent,
|
|
536
|
+
SelectDropdown,
|
|
537
|
+
SelectHeader,
|
|
538
|
+
SelectHeaderTitle,
|
|
539
|
+
SelectLabel,
|
|
540
|
+
SelectLeftSlot,
|
|
541
|
+
SelectMultiValue,
|
|
542
|
+
SelectOption,
|
|
543
|
+
SelectOptionText,
|
|
544
|
+
SelectOptions,
|
|
545
|
+
SelectRightSlot,
|
|
546
|
+
SelectRoot,
|
|
547
|
+
SelectSearch,
|
|
548
|
+
SelectTrigger,
|
|
549
|
+
SelectValue
|
|
550
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
4
|
+
|
|
5
|
+
declare function SheetRoot({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function SheetClose({ children, ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function SheetContent({ className, children, side, overlay, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
11
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
12
|
+
overlay?: boolean;
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function SheetBody({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { SheetBody, SheetClose, SheetContent, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetRoot, SheetTitle, SheetTrigger };
|