trepur_components 2.4.7 → 2.4.8
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/lib/components/Input/Input.stories.d.ts +6 -3
- package/lib/components/Input/index.d.ts +6 -3
- package/lib/components/Input/index.js +64 -71
- package/lib/components/Select/Select.stories.d.ts +4 -5
- package/lib/components/Select/index.d.ts +3 -5
- package/lib/components/Select/index.js +104 -97
- package/package.json +1 -1
|
@@ -4,15 +4,18 @@ import { Input } from '.';
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('.').InputContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
7
|
-
Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<
|
|
7
|
+
Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLabelElement> & {
|
|
8
8
|
required?: boolean;
|
|
9
|
-
} & import('react').RefAttributes<
|
|
9
|
+
} & import('react').RefAttributes<HTMLLabelElement>>;
|
|
10
10
|
Validation: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
11
|
Actions: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
-
Wrapper: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLInputElement> &
|
|
12
|
+
Wrapper: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLInputElement> & {
|
|
13
|
+
handleChange?: (e: any) => void;
|
|
14
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
13
15
|
};
|
|
14
16
|
args: {
|
|
15
17
|
placeholder: string;
|
|
18
|
+
id: string;
|
|
16
19
|
children: import("react/jsx-runtime").JSX.Element[];
|
|
17
20
|
};
|
|
18
21
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface InputContextProps {
|
|
4
|
+
id: string;
|
|
4
5
|
autoComplete?: string;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
formId?: string;
|
|
@@ -23,11 +24,13 @@ export interface InputContextProps {
|
|
|
23
24
|
value?: string;
|
|
24
25
|
}
|
|
25
26
|
declare const Input: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & InputContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
26
|
-
Label: import('react').ForwardRefExoticComponent<HTMLAttributes<
|
|
27
|
+
Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLLabelElement> & {
|
|
27
28
|
required?: boolean;
|
|
28
|
-
} & import('react').RefAttributes<
|
|
29
|
+
} & import('react').RefAttributes<HTMLLabelElement>>;
|
|
29
30
|
Validation: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
30
31
|
Actions: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
31
|
-
Wrapper: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLInputElement> &
|
|
32
|
+
Wrapper: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLInputElement> & {
|
|
33
|
+
handleChange?: (e: any) => void;
|
|
34
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
32
35
|
};
|
|
33
36
|
export { Input };
|
|
@@ -1,114 +1,107 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { faCircleExclamation as
|
|
6
|
-
const u =
|
|
7
|
-
const
|
|
1
|
+
import { jsx as l, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n, useMemo as w, createContext as j, useContext as x } from "react";
|
|
3
|
+
import s from "clsx";
|
|
4
|
+
import { Icon as A } from "../Icon/index.js";
|
|
5
|
+
import { faCircleExclamation as L } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
+
const u = j(null), f = n(({ id: e, children: r, className: t, errors: a, placeholder: i, ...o }, d) => {
|
|
7
|
+
const p = w(
|
|
8
8
|
() => ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
id: e,
|
|
10
|
+
errors: a,
|
|
11
|
+
placeholder: i,
|
|
12
|
+
...o
|
|
12
13
|
}),
|
|
13
|
-
[
|
|
14
|
+
[a, o]
|
|
14
15
|
);
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ l(u.Provider, { value: p, children: /* @__PURE__ */ l(
|
|
16
17
|
"div",
|
|
17
18
|
{
|
|
18
|
-
ref:
|
|
19
|
-
className:
|
|
20
|
-
...
|
|
19
|
+
ref: d,
|
|
20
|
+
className: s("grid grid-cols-1 gap-1 w-full rounded-md", t),
|
|
21
|
+
...o,
|
|
21
22
|
children: r
|
|
22
23
|
}
|
|
23
24
|
) });
|
|
24
|
-
}),
|
|
25
|
-
const { placeholder:
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
25
|
+
}), b = n(({ className: e, children: r, handleChange: t, onClick: a, onBlur: i, ...o }, d) => {
|
|
26
|
+
const { id: p, placeholder: y, value: g, errors: m } = x(u) || {};
|
|
27
|
+
return /* @__PURE__ */ c("div", { ref: d, className: "group/input relative isolate flex w-full", children: [
|
|
28
|
+
/* @__PURE__ */ l(
|
|
28
29
|
"input",
|
|
29
30
|
{
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
id: p,
|
|
32
|
+
placeholder: y,
|
|
33
|
+
className: s(
|
|
32
34
|
"h-10 border border-black rounded-md flex w-full bg-card px-3 py-1.5 text-sm placeholder:text-gray-500",
|
|
33
35
|
{
|
|
34
|
-
"border-border border": !
|
|
35
|
-
"border-red-600 border-2":
|
|
36
|
-
}
|
|
36
|
+
"border-border border": !m,
|
|
37
|
+
"border-red-600 border-2": m
|
|
38
|
+
},
|
|
39
|
+
e
|
|
37
40
|
),
|
|
38
|
-
value:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
maxLength: e.maxLength,
|
|
44
|
-
minLength: e.minLength,
|
|
45
|
-
pattern: e.pattern,
|
|
46
|
-
required: e.required,
|
|
47
|
-
type: e.type,
|
|
48
|
-
name: e.name,
|
|
49
|
-
onChange: (g) => a == null ? void 0 : a(g.target.value),
|
|
50
|
-
onClick: t,
|
|
51
|
-
onBlur: l,
|
|
52
|
-
onFocus: e.onFocus
|
|
41
|
+
value: g,
|
|
42
|
+
onChange: (h) => t == null ? void 0 : t(h.target.value),
|
|
43
|
+
onClick: a,
|
|
44
|
+
onBlur: i,
|
|
45
|
+
...o
|
|
53
46
|
}
|
|
54
47
|
),
|
|
55
48
|
r
|
|
56
49
|
] });
|
|
57
|
-
}),
|
|
58
|
-
({ className:
|
|
50
|
+
}), I = n(
|
|
51
|
+
({ className: e, children: r }, t) => /* @__PURE__ */ l(
|
|
59
52
|
"div",
|
|
60
53
|
{
|
|
61
54
|
ref: t,
|
|
62
|
-
className:
|
|
55
|
+
className: s(
|
|
63
56
|
"absolute right-1 top-1/2 my-auto -translate-y-1/2",
|
|
64
|
-
|
|
57
|
+
e
|
|
65
58
|
),
|
|
66
|
-
children:
|
|
59
|
+
children: r
|
|
67
60
|
}
|
|
68
61
|
)
|
|
69
|
-
),
|
|
70
|
-
"
|
|
62
|
+
), N = n(({ id: e, className: r, children: t, required: a }) => /* @__PURE__ */ c(
|
|
63
|
+
"label",
|
|
71
64
|
{
|
|
72
|
-
|
|
73
|
-
className:
|
|
65
|
+
htmlFor: e,
|
|
66
|
+
className: s("flex px-1 text-md font-normal leading-5", r),
|
|
74
67
|
children: [
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
t,
|
|
69
|
+
a && /* @__PURE__ */ l("span", { children: "*" })
|
|
77
70
|
]
|
|
78
71
|
}
|
|
79
|
-
)),
|
|
80
|
-
const { errors: t } =
|
|
81
|
-
return t ? /* @__PURE__ */
|
|
72
|
+
)), v = n(({ ...e }, r) => {
|
|
73
|
+
const { errors: t } = x(u) || {};
|
|
74
|
+
return t ? /* @__PURE__ */ l(
|
|
82
75
|
"div",
|
|
83
76
|
{
|
|
84
|
-
ref:
|
|
77
|
+
ref: r,
|
|
85
78
|
className: "text-sm pl-1 font-medium text-error-default",
|
|
86
|
-
...
|
|
87
|
-
children: t == null ? void 0 : t.map((
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
79
|
+
...e,
|
|
80
|
+
children: t == null ? void 0 : t.map((a) => /* @__PURE__ */ c("div", { className: "text-xs gap-1 flex", children: [
|
|
81
|
+
/* @__PURE__ */ l(
|
|
82
|
+
A,
|
|
90
83
|
{
|
|
84
|
+
size: "xs",
|
|
91
85
|
className: "my-auto text-error-default",
|
|
92
|
-
icon:
|
|
93
|
-
co: !0
|
|
86
|
+
icon: L
|
|
94
87
|
}
|
|
95
88
|
),
|
|
96
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ l("span", { children: a }, `error-msg:${a.replace(" ", "_")}`)
|
|
97
90
|
] }))
|
|
98
91
|
}
|
|
99
92
|
) : null;
|
|
100
93
|
});
|
|
101
94
|
f.displayName = "Input";
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
Label:
|
|
108
|
-
Validation:
|
|
109
|
-
Actions:
|
|
110
|
-
Wrapper:
|
|
95
|
+
I.displayName = "Input.Actions";
|
|
96
|
+
N.displayName = "Input.Label";
|
|
97
|
+
v.displayName = "Input.Validation";
|
|
98
|
+
b.displayName = "Input.Wrapper";
|
|
99
|
+
const E = Object.assign(f, {
|
|
100
|
+
Label: N,
|
|
101
|
+
Validation: v,
|
|
102
|
+
Actions: I,
|
|
103
|
+
Wrapper: b
|
|
111
104
|
});
|
|
112
105
|
export {
|
|
113
|
-
|
|
106
|
+
E as Input
|
|
114
107
|
};
|
|
@@ -4,15 +4,14 @@ import { Select } from '.';
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & Omit<import('react').HTMLAttributes<HTMLDivElement> & import('../Input').InputContextProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('.').SelectContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
7
|
-
Item: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLIElement> &
|
|
8
|
-
|
|
9
|
-
} & import('react').RefAttributes<HTMLLIElement>>;
|
|
10
|
-
Label: import('react').ForwardRefExoticComponent<Omit<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
7
|
+
Item: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLIElement> & import('react').RefAttributes<HTMLLIElement>>;
|
|
8
|
+
Label: import('react').ForwardRefExoticComponent<Omit<import('react').HTMLAttributes<HTMLLabelElement> & {
|
|
11
9
|
required?: boolean;
|
|
12
|
-
} & import('react').RefAttributes<
|
|
10
|
+
} & import('react').RefAttributes<HTMLLabelElement>, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
13
11
|
};
|
|
14
12
|
parameters: {};
|
|
15
13
|
args: {
|
|
14
|
+
id: string;
|
|
16
15
|
label: string;
|
|
17
16
|
placeholder: string;
|
|
18
17
|
children: import("react/jsx-runtime").JSX.Element[];
|
|
@@ -14,11 +14,9 @@ export interface SelectContextProps {
|
|
|
14
14
|
handleChange?: (e: any) => void;
|
|
15
15
|
}
|
|
16
16
|
declare const Select: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & Omit<HTMLAttributes<HTMLDivElement> & import('../Input').InputContextProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & SelectContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
17
|
-
Item: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLLIElement> &
|
|
18
|
-
|
|
19
|
-
} & import('react').RefAttributes<HTMLLIElement>>;
|
|
20
|
-
Label: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement> & {
|
|
17
|
+
Item: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLLIElement> & import('react').RefAttributes<HTMLLIElement>>;
|
|
18
|
+
Label: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLLabelElement> & {
|
|
21
19
|
required?: boolean;
|
|
22
|
-
} & import('react').RefAttributes<
|
|
20
|
+
} & import('react').RefAttributes<HTMLLabelElement>, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
23
21
|
};
|
|
24
22
|
export { Select };
|
|
@@ -1,152 +1,159 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as l, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s, useState as I, useCallback as v, useEffect as A, createContext as H, useContext as p } from "react";
|
|
3
3
|
import d from "clsx";
|
|
4
|
-
import { Input as
|
|
5
|
-
import { Card as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { faCaretDown as
|
|
8
|
-
const
|
|
4
|
+
import { Input as i } from "../Input/index.js";
|
|
5
|
+
import { Card as K } from "../Card/index.js";
|
|
6
|
+
import { Button as w } from "../Button/index.js";
|
|
7
|
+
import { faCaretDown as P } from "@fortawesome/fontawesome-free-solid";
|
|
8
|
+
const m = H(null), k = s(
|
|
9
9
|
({
|
|
10
|
-
id:
|
|
11
|
-
open:
|
|
12
|
-
defaultOpen:
|
|
13
|
-
onOpenChange:
|
|
10
|
+
id: n,
|
|
11
|
+
open: t,
|
|
12
|
+
defaultOpen: r,
|
|
13
|
+
onOpenChange: a,
|
|
14
14
|
onChange: e,
|
|
15
|
-
className:
|
|
16
|
-
children:
|
|
15
|
+
className: o,
|
|
16
|
+
children: u,
|
|
17
17
|
loading: f,
|
|
18
|
-
label:
|
|
19
|
-
placeholder:
|
|
20
|
-
...
|
|
18
|
+
label: b,
|
|
19
|
+
placeholder: S,
|
|
20
|
+
...B
|
|
21
21
|
}) => {
|
|
22
|
-
const [
|
|
23
|
-
(
|
|
24
|
-
|
|
22
|
+
const [E, M] = I(t ?? r), [y, x] = I(""), N = v(
|
|
23
|
+
(c) => {
|
|
24
|
+
M(c), a == null || a(c);
|
|
25
25
|
},
|
|
26
|
-
[
|
|
27
|
-
),
|
|
26
|
+
[a]
|
|
27
|
+
), V = {
|
|
28
28
|
loading: f,
|
|
29
|
-
label:
|
|
30
|
-
placeholder:
|
|
31
|
-
open:
|
|
29
|
+
label: b,
|
|
30
|
+
placeholder: S,
|
|
31
|
+
open: E,
|
|
32
32
|
setOpen: N,
|
|
33
|
-
internalValue:
|
|
34
|
-
setInternalValue:
|
|
33
|
+
internalValue: y,
|
|
34
|
+
setInternalValue: x
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
() => N(
|
|
38
|
-
[
|
|
36
|
+
A(
|
|
37
|
+
() => N(t ?? r ?? !1),
|
|
38
|
+
[t, r, N]
|
|
39
39
|
);
|
|
40
|
-
const
|
|
41
|
-
(
|
|
42
|
-
alert(
|
|
40
|
+
const h = v(
|
|
41
|
+
(c) => {
|
|
42
|
+
alert(c), y.includes(c) ? (x(""), e == null || e("")) : (x(c), e == null || e(c));
|
|
43
43
|
},
|
|
44
|
-
[
|
|
44
|
+
[y, e]
|
|
45
45
|
);
|
|
46
|
-
return /* @__PURE__ */ l(
|
|
46
|
+
return /* @__PURE__ */ l(m.Provider, { value: V, children: /* @__PURE__ */ L("div", { className: "relative", children: [
|
|
47
47
|
/* @__PURE__ */ l(
|
|
48
|
-
|
|
48
|
+
D,
|
|
49
49
|
{
|
|
50
|
-
id:
|
|
51
|
-
className:
|
|
52
|
-
onChange: () =>
|
|
53
|
-
...
|
|
54
|
-
children:
|
|
50
|
+
id: n,
|
|
51
|
+
className: o,
|
|
52
|
+
onChange: () => h,
|
|
53
|
+
...B,
|
|
54
|
+
children: u
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
|
-
/* @__PURE__ */ l(
|
|
57
|
+
/* @__PURE__ */ l(T, { children: u })
|
|
58
58
|
] }) });
|
|
59
59
|
}
|
|
60
|
-
),
|
|
61
|
-
const { open:
|
|
60
|
+
), R = s(({ className: n, ...t }, r) => {
|
|
61
|
+
const { open: a, setOpen: e } = p(m) || {};
|
|
62
62
|
return /* @__PURE__ */ l(
|
|
63
|
-
|
|
63
|
+
w,
|
|
64
64
|
{
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
tabIndex: -1,
|
|
66
|
+
ref: r,
|
|
67
|
+
className: n,
|
|
67
68
|
"aria-label": "toggle open",
|
|
68
|
-
onClick: () => e == null ? void 0 : e(!
|
|
69
|
+
onClick: () => e == null ? void 0 : e(!a),
|
|
69
70
|
variant: "ghost",
|
|
70
71
|
size: "sm",
|
|
71
|
-
...
|
|
72
|
+
...t,
|
|
72
73
|
children: /* @__PURE__ */ l(
|
|
73
|
-
|
|
74
|
+
w.Icon,
|
|
74
75
|
{
|
|
75
76
|
className: d("transition-transform duration-300 ease-in-out", {
|
|
76
|
-
"rotate-180 transform":
|
|
77
|
+
"rotate-180 transform": a
|
|
77
78
|
}),
|
|
78
|
-
icon:
|
|
79
|
+
icon: P
|
|
79
80
|
}
|
|
80
81
|
)
|
|
81
82
|
}
|
|
82
83
|
);
|
|
83
|
-
}),
|
|
84
|
-
const { open:
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
|
|
84
|
+
}), j = s(({ className: n, children: t }, r) => /* @__PURE__ */ l(i.Label, { className: n, ref: r, children: t })), D = s(({ id: n, className: t, ...r }, a) => {
|
|
85
|
+
const { open: e, setOpen: o, internalValue: u, label: f, placeholder: b } = p(m) || {};
|
|
86
|
+
return /* @__PURE__ */ L(
|
|
87
|
+
i,
|
|
87
88
|
{
|
|
88
|
-
|
|
89
|
+
id: n,
|
|
90
|
+
className: d("w-full rounded-md caret-transparent ", t),
|
|
89
91
|
ref: a,
|
|
90
|
-
"data-open":
|
|
91
|
-
placeholder:
|
|
92
|
-
value:
|
|
92
|
+
"data-open": e,
|
|
93
|
+
placeholder: b,
|
|
94
|
+
value: u ?? "",
|
|
93
95
|
...r,
|
|
94
96
|
children: [
|
|
95
|
-
/* @__PURE__ */ l(
|
|
97
|
+
/* @__PURE__ */ l(i.Label, { children: f }),
|
|
96
98
|
/* @__PURE__ */ l(
|
|
97
|
-
|
|
99
|
+
i.Wrapper,
|
|
98
100
|
{
|
|
99
|
-
onClick: () =>
|
|
100
|
-
onBlur: () =>
|
|
101
|
+
onClick: () => o == null ? void 0 : o(!e),
|
|
102
|
+
onBlur: () => o == null ? void 0 : o(!1),
|
|
101
103
|
className: d(
|
|
102
104
|
"caret-transparent rounded hover:cursor-pointer data-[open=true]:border-primary data-[open=true]:ring-1 data-[open=true]:ring-primary",
|
|
103
|
-
|
|
105
|
+
t
|
|
104
106
|
),
|
|
105
|
-
|
|
107
|
+
onKeyDown: (S) => {
|
|
108
|
+
S.key === "Enter" && (o == null || o(!e));
|
|
109
|
+
},
|
|
110
|
+
children: /* @__PURE__ */ l(i.Actions, { children: /* @__PURE__ */ l(R, {}) })
|
|
106
111
|
}
|
|
107
112
|
)
|
|
108
113
|
]
|
|
109
114
|
}
|
|
110
115
|
);
|
|
111
|
-
}),
|
|
112
|
-
const { open: e } = p(
|
|
116
|
+
}), T = s(({ children: n, className: t, ...r }, a) => {
|
|
117
|
+
const { open: e } = p(m) || {};
|
|
113
118
|
return e ? /* @__PURE__ */ l(
|
|
114
|
-
|
|
119
|
+
K,
|
|
115
120
|
{
|
|
116
|
-
ref:
|
|
121
|
+
ref: a,
|
|
117
122
|
className: d(
|
|
118
123
|
"!rounded-md z-10 mt-0.5 absolute overflow-hidden !p-0 data-[state=open]:animate-in w-full data-[state=open]:fade-in-0",
|
|
119
|
-
|
|
124
|
+
t
|
|
120
125
|
),
|
|
121
|
-
...
|
|
122
|
-
children: /* @__PURE__ */ l("ul", { children:
|
|
126
|
+
...r,
|
|
127
|
+
children: /* @__PURE__ */ l("ul", { children: n })
|
|
123
128
|
}
|
|
124
129
|
) : null;
|
|
125
|
-
}),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
T.displayName = "Select.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
130
|
+
}), z = s(
|
|
131
|
+
({ children: n, className: t, ...r }, a) => {
|
|
132
|
+
const { setInternalValue: e } = p(m) || {};
|
|
133
|
+
return /* @__PURE__ */ l(
|
|
134
|
+
"li",
|
|
135
|
+
{
|
|
136
|
+
tabIndex: 1,
|
|
137
|
+
ref: a,
|
|
138
|
+
className: d(
|
|
139
|
+
"hover:cursor-pointer hover:bg-gray-100 w-full py-2 px-4",
|
|
140
|
+
t
|
|
141
|
+
),
|
|
142
|
+
onMouseDown: (o) => e == null ? void 0 : e(o.target.innerHTML),
|
|
143
|
+
...r,
|
|
144
|
+
children: n
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
k.displayName = "Select";
|
|
150
|
+
T.displayName = "Select.Content";
|
|
151
|
+
D.displayName = "Select.Trigger";
|
|
152
|
+
z.displayName = "Select.Item";
|
|
153
|
+
j.displayName = "Select.Label";
|
|
154
|
+
const U = Object.assign(k, {
|
|
155
|
+
Item: z,
|
|
156
|
+
Label: j
|
|
150
157
|
});
|
|
151
158
|
export {
|
|
152
159
|
U as Select
|