@konstructio/ui 0.0.9 → 0.0.11
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/{Modal-Ca3bkvvt.js → Modal-L73dmnHv.js} +240 -235
- package/dist/components/AlertDialog/AlertDialog.js +37 -30
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +7 -2
- package/dist/components/Autocomplete/Autocomplete.js +42 -37
- package/dist/components/Autocomplete/components/List/List.js +60 -0
- package/dist/components/Autocomplete/components/{List.types.d.ts → List/List.types.d.ts} +3 -3
- package/dist/components/Autocomplete/components/{List.variants.js → List/List.variants.js} +1 -1
- package/dist/components/Autocomplete/components/index.d.ts +1 -0
- package/dist/components/Autocomplete/components/index.js +4 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +44 -39
- package/dist/components/Button/Button.variants.d.ts +2 -2
- package/dist/components/Button/Button.variants.js +142 -8
- package/dist/components/Card/Card.js +30 -25
- package/dist/components/Checkbox/Checkbox.js +56 -51
- package/dist/components/Dropdown/components/ListItem/ListItem.js +18 -17
- package/dist/components/Dropdown/components/Wrapper.js +15 -15
- package/dist/components/Input/Input.js +4 -4
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +5 -4
- package/dist/components/Modal/components/Header/Header.js +4 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +78 -69
- package/dist/components/ProgressBar/ProgressBar.js +6 -6
- package/dist/components/Radio/Radio.js +21 -18
- package/dist/components/RadioGroup/RadioGroup.js +26 -22
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +4 -3
- package/dist/components/Range/Range.js +40 -40
- package/dist/components/Sidebar/Sidebar.d.ts +5 -0
- package/dist/components/Sidebar/Sidebar.js +27 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts +17 -0
- package/dist/components/Sidebar/Sidebar.types.js +1 -0
- package/dist/components/Sidebar/Sidebar.variants.d.ts +6 -0
- package/dist/components/Sidebar/Sidebar.variants.js +56 -0
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Sidebar/components/Footer/Footer.js +22 -0
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Footer/Footer.types.js +1 -0
- package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +19 -0
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +3 -0
- package/dist/components/Sidebar/components/Logo/Logo.js +20 -0
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Logo/Logo.types.js +1 -0
- package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +45 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.js +34 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.types.js +1 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +19 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +40 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +7 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +16 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +29 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +15 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +39 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +24 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +19 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +26 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +7 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +23 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +84 -0
- package/dist/components/Sidebar/components/index.d.ts +15 -0
- package/dist/components/Sidebar/components/index.js +18 -0
- package/dist/components/Slider/Slider.js +25 -25
- package/dist/components/Switch/Switch.js +30 -30
- package/dist/components/Tag/Tag.js +5 -4
- package/dist/components/TagSelect/TagSelect.js +24 -24
- package/dist/components/TextArea/TextArea.js +17 -16
- package/dist/components/Toast/Toast.js +103 -97
- package/dist/components/Tooltip/Tooltip.js +12 -12
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +44 -30
- package/dist/index.js +47 -33
- package/dist/package.json +31 -16
- package/dist/plugins/utils/colors.d.ts +5 -0
- package/dist/plugins/utils/colors.js +6 -1
- package/dist/styles.css +1 -1
- package/dist/utils/index.js +747 -530
- package/package.json +31 -16
- package/dist/components/Autocomplete/components/List.js +0 -57
- /package/dist/components/Autocomplete/components/{List.d.ts → List/List.d.ts} +0 -0
- /package/dist/components/Autocomplete/components/{List.types.js → List/List.types.js} +0 -0
- /package/dist/components/Autocomplete/components/{List.variants.d.ts → List/List.variants.d.ts} +0 -0
|
@@ -1,39 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
3
|
import "../../contexts/theme.context.js";
|
|
4
|
-
import { useTheme as
|
|
4
|
+
import { useTheme as f } from "../../contexts/theme.hook.js";
|
|
5
5
|
import "../../js.cookie-OLEfuq_g.js";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { cn as t } from "../../utils/index.js";
|
|
7
|
+
import { cardBaseVariants as n, cardVariants as h } from "./Card.variants.js";
|
|
8
|
+
const l = c(
|
|
9
|
+
({ className: s, theme: r, isActive: m, canHover: a, wrapperClassName: i, ...d }, p) => {
|
|
10
|
+
const { theme: e } = f();
|
|
11
|
+
return /* @__PURE__ */ o(
|
|
11
12
|
"div",
|
|
12
13
|
{
|
|
13
|
-
className:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
className: t(
|
|
15
|
+
n({
|
|
16
|
+
canHover: a,
|
|
17
|
+
className: i,
|
|
18
|
+
isActive: m,
|
|
19
|
+
theme: r ?? e
|
|
20
|
+
})
|
|
21
|
+
),
|
|
22
|
+
children: /* @__PURE__ */ o(
|
|
20
23
|
"div",
|
|
21
24
|
{
|
|
22
|
-
ref:
|
|
23
|
-
className:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
ref: p,
|
|
26
|
+
className: t(
|
|
27
|
+
h({
|
|
28
|
+
className: s,
|
|
29
|
+
theme: r ?? e,
|
|
30
|
+
isActive: m,
|
|
31
|
+
canHover: a
|
|
32
|
+
})
|
|
33
|
+
),
|
|
34
|
+
...d
|
|
30
35
|
}
|
|
31
36
|
)
|
|
32
37
|
}
|
|
33
38
|
);
|
|
34
39
|
}
|
|
35
40
|
);
|
|
36
|
-
|
|
41
|
+
l.displayName = "Card";
|
|
37
42
|
export {
|
|
38
|
-
|
|
43
|
+
l as Card
|
|
39
44
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as S, jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import * as u from "react";
|
|
3
|
-
import j, { forwardRef as
|
|
4
|
-
import { u as
|
|
5
|
-
import { c as
|
|
6
|
-
import { u as
|
|
7
|
-
import { P as
|
|
8
|
-
import { P as
|
|
9
|
-
import { useToggle as V } from "../../hooks/useToggle.js";
|
|
10
|
-
import { checkboxVariants as X, labelVariants as G } from "./Checkbox.variants.js";
|
|
3
|
+
import j, { forwardRef as _, useId as A, useCallback as H } from "react";
|
|
4
|
+
import { u as K } from "../../index-DoOsnuB6.js";
|
|
5
|
+
import { c as W, a as $, d as I } from "../../index-8vgf-x5i.js";
|
|
6
|
+
import { u as q, a as F } from "../../index-BxeV34ij.js";
|
|
7
|
+
import { P as V } from "../../index-D4Q2rMby.js";
|
|
8
|
+
import { P as T } from "../../index-BaNV0qac.js";
|
|
11
9
|
import "../../contexts/theme.context.js";
|
|
12
|
-
import { useTheme as
|
|
10
|
+
import { useTheme as X } from "../../contexts/theme.hook.js";
|
|
13
11
|
import "../../js.cookie-OLEfuq_g.js";
|
|
12
|
+
import { cn as N } from "../../utils/index.js";
|
|
13
|
+
import { useToggle as G } from "../../hooks/useToggle.js";
|
|
14
|
+
import { checkboxVariants as J, labelVariants as Q } from "./Checkbox.variants.js";
|
|
14
15
|
import { P } from "../../index-D68N8v8R.js";
|
|
15
16
|
function E() {
|
|
16
17
|
return E = Object.assign || function(e) {
|
|
@@ -22,9 +23,9 @@ function E() {
|
|
|
22
23
|
return e;
|
|
23
24
|
}, E.apply(this, arguments);
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function U(e, s) {
|
|
26
27
|
if (e == null) return {};
|
|
27
|
-
var t =
|
|
28
|
+
var t = Y(e, s), o, n;
|
|
28
29
|
if (Object.getOwnPropertySymbols) {
|
|
29
30
|
var r = Object.getOwnPropertySymbols(e);
|
|
30
31
|
for (n = 0; n < r.length; n++)
|
|
@@ -32,15 +33,15 @@ function Q(e, s) {
|
|
|
32
33
|
}
|
|
33
34
|
return t;
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function Y(e, s) {
|
|
36
37
|
if (e == null) return {};
|
|
37
38
|
var t = {}, o = Object.keys(e), n, r;
|
|
38
39
|
for (r = 0; r < o.length; r++)
|
|
39
40
|
n = o[r], !(s.indexOf(n) >= 0) && (t[n] = e[n]);
|
|
40
41
|
return t;
|
|
41
42
|
}
|
|
42
|
-
var O =
|
|
43
|
-
var t = e.color, o = t === void 0 ? "currentColor" : t, n = e.size, r = n === void 0 ? 24 : n, l =
|
|
43
|
+
var O = _(function(e, s) {
|
|
44
|
+
var t = e.color, o = t === void 0 ? "currentColor" : t, n = e.size, r = n === void 0 ? 24 : n, l = U(e, ["color", "size"]);
|
|
44
45
|
return /* @__PURE__ */ j.createElement("svg", E({
|
|
45
46
|
ref: s,
|
|
46
47
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -61,7 +62,7 @@ O.propTypes = {
|
|
|
61
62
|
size: P.oneOfType([P.string, P.number])
|
|
62
63
|
};
|
|
63
64
|
O.displayName = "Check";
|
|
64
|
-
var R = "Checkbox", [
|
|
65
|
+
var R = "Checkbox", [Z, Ce] = W(R), [ee, te] = Z(R), z = u.forwardRef(
|
|
65
66
|
(e, s) => {
|
|
66
67
|
const {
|
|
67
68
|
__scopeCheckbox: t,
|
|
@@ -74,26 +75,26 @@ var R = "Checkbox", [Y, ke] = K(R), [Z, ee] = Y(R), T = u.forwardRef(
|
|
|
74
75
|
onCheckedChange: C,
|
|
75
76
|
form: d,
|
|
76
77
|
...p
|
|
77
|
-
} = e, [i, k] = u.useState(null), v =
|
|
78
|
+
} = e, [i, k] = u.useState(null), v = K(s, (c) => k(c)), x = u.useRef(!1), g = i ? d || !!i.closest("form") : !0, [m = !1, w] = $({
|
|
78
79
|
prop: n,
|
|
79
80
|
defaultProp: r,
|
|
80
81
|
onChange: C
|
|
81
|
-
}),
|
|
82
|
+
}), M = u.useRef(m);
|
|
82
83
|
return u.useEffect(() => {
|
|
83
84
|
const c = i == null ? void 0 : i.form;
|
|
84
85
|
if (c) {
|
|
85
|
-
const y = () => w(
|
|
86
|
+
const y = () => w(M.current);
|
|
86
87
|
return c.addEventListener("reset", y), () => c.removeEventListener("reset", y);
|
|
87
88
|
}
|
|
88
|
-
}, [i, w]), /* @__PURE__ */
|
|
89
|
+
}, [i, w]), /* @__PURE__ */ S(ee, { scope: t, state: m, disabled: a, children: [
|
|
89
90
|
/* @__PURE__ */ f(
|
|
90
|
-
|
|
91
|
+
T.button,
|
|
91
92
|
{
|
|
92
93
|
type: "button",
|
|
93
94
|
role: "checkbox",
|
|
94
95
|
"aria-checked": h(m) ? "mixed" : m,
|
|
95
96
|
"aria-required": l,
|
|
96
|
-
"data-state":
|
|
97
|
+
"data-state": B(m),
|
|
97
98
|
"data-disabled": a ? "" : void 0,
|
|
98
99
|
disabled: a,
|
|
99
100
|
value: b,
|
|
@@ -108,7 +109,7 @@ var R = "Checkbox", [Y, ke] = K(R), [Z, ee] = Y(R), T = u.forwardRef(
|
|
|
108
109
|
}
|
|
109
110
|
),
|
|
110
111
|
g && /* @__PURE__ */ f(
|
|
111
|
-
|
|
112
|
+
re,
|
|
112
113
|
{
|
|
113
114
|
control: i,
|
|
114
115
|
bubbles: !x.current,
|
|
@@ -125,14 +126,14 @@ var R = "Checkbox", [Y, ke] = K(R), [Z, ee] = Y(R), T = u.forwardRef(
|
|
|
125
126
|
] });
|
|
126
127
|
}
|
|
127
128
|
);
|
|
128
|
-
|
|
129
|
-
var
|
|
129
|
+
z.displayName = R;
|
|
130
|
+
var L = "CheckboxIndicator", D = u.forwardRef(
|
|
130
131
|
(e, s) => {
|
|
131
|
-
const { __scopeCheckbox: t, forceMount: o, ...n } = e, r =
|
|
132
|
-
return /* @__PURE__ */ f(
|
|
133
|
-
|
|
132
|
+
const { __scopeCheckbox: t, forceMount: o, ...n } = e, r = te(L, t);
|
|
133
|
+
return /* @__PURE__ */ f(V, { present: o || h(r.state) || r.state === !0, children: /* @__PURE__ */ f(
|
|
134
|
+
T.span,
|
|
134
135
|
{
|
|
135
|
-
"data-state":
|
|
136
|
+
"data-state": B(r.state),
|
|
136
137
|
"data-disabled": r.disabled ? "" : void 0,
|
|
137
138
|
...n,
|
|
138
139
|
ref: s,
|
|
@@ -141,9 +142,9 @@ var z = "CheckboxIndicator", L = u.forwardRef(
|
|
|
141
142
|
) });
|
|
142
143
|
}
|
|
143
144
|
);
|
|
144
|
-
|
|
145
|
-
var
|
|
146
|
-
const { control: s, checked: t, bubbles: o = !0, defaultChecked: n, ...r } = e, l = u.useRef(null), a =
|
|
145
|
+
D.displayName = L;
|
|
146
|
+
var re = (e) => {
|
|
147
|
+
const { control: s, checked: t, bubbles: o = !0, defaultChecked: n, ...r } = e, l = u.useRef(null), a = q(t), b = F(s);
|
|
147
148
|
u.useEffect(() => {
|
|
148
149
|
const d = l.current, p = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(p, "checked").set;
|
|
149
150
|
if (a !== t && k) {
|
|
@@ -175,11 +176,11 @@ var te = (e) => {
|
|
|
175
176
|
function h(e) {
|
|
176
177
|
return e === "indeterminate";
|
|
177
178
|
}
|
|
178
|
-
function
|
|
179
|
+
function B(e) {
|
|
179
180
|
return h(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
180
181
|
}
|
|
181
|
-
var
|
|
182
|
-
const
|
|
182
|
+
var oe = z, ne = D;
|
|
183
|
+
const xe = _(
|
|
183
184
|
({
|
|
184
185
|
ariaLabelledBy: e,
|
|
185
186
|
className: s,
|
|
@@ -194,12 +195,12 @@ const ve = S(
|
|
|
194
195
|
variant: d,
|
|
195
196
|
onChange: p
|
|
196
197
|
}, i) => {
|
|
197
|
-
const [k, v] =
|
|
198
|
+
const [k, v] = G(t), x = A(), { theme: g } = X(), m = H(() => {
|
|
198
199
|
v(), p == null || p();
|
|
199
200
|
}, [p, v]);
|
|
200
|
-
return /* @__PURE__ */
|
|
201
|
+
return /* @__PURE__ */ S("div", { className: "flex items-center gap-2", children: [
|
|
201
202
|
/* @__PURE__ */ f(
|
|
202
|
-
|
|
203
|
+
oe,
|
|
203
204
|
{
|
|
204
205
|
id: n ?? x,
|
|
205
206
|
checked: k,
|
|
@@ -208,25 +209,29 @@ const ve = S(
|
|
|
208
209
|
disabled: o,
|
|
209
210
|
"aria-labelledby": e,
|
|
210
211
|
title: C,
|
|
211
|
-
className:
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
className: N(
|
|
213
|
+
J({
|
|
214
|
+
className: s,
|
|
215
|
+
theme: b ?? g,
|
|
216
|
+
variant: d,
|
|
217
|
+
checked: k
|
|
218
|
+
})
|
|
219
|
+
),
|
|
217
220
|
onCheckedChange: m,
|
|
218
|
-
children: /* @__PURE__ */ f(
|
|
221
|
+
children: /* @__PURE__ */ f(ne, { children: /* @__PURE__ */ f(O, { className: "w-4 h-4 stroke-2" }) })
|
|
219
222
|
}
|
|
220
223
|
),
|
|
221
224
|
r ? /* @__PURE__ */ f(
|
|
222
225
|
"label",
|
|
223
226
|
{
|
|
224
227
|
htmlFor: a ?? n,
|
|
225
|
-
className:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
className: N(
|
|
229
|
+
Q({
|
|
230
|
+
variant: d,
|
|
231
|
+
theme: b,
|
|
232
|
+
className: l
|
|
233
|
+
})
|
|
234
|
+
),
|
|
230
235
|
children: r
|
|
231
236
|
}
|
|
232
237
|
) : null
|
|
@@ -234,5 +239,5 @@ const ve = S(
|
|
|
234
239
|
}
|
|
235
240
|
);
|
|
236
241
|
export {
|
|
237
|
-
|
|
242
|
+
xe as Checkbox
|
|
238
243
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as u, useCallback as
|
|
1
|
+
import { jsxs as i, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as u, useCallback as s } from "react";
|
|
3
|
+
import { cn as p } from "../../../../utils/index.js";
|
|
3
4
|
import { useDropdownContext as d } from "../../contexts/dropdown.hook.js";
|
|
4
5
|
import "../../contexts/dropdown.context.js";
|
|
5
|
-
import { listItemVariants as
|
|
6
|
-
const
|
|
7
|
-
const { setValue: n, toggleOpen:
|
|
8
|
-
(
|
|
9
|
-
n(
|
|
6
|
+
import { listItemVariants as x } from "./ListItem.variants.js";
|
|
7
|
+
const b = ({ theme: o, ...e }) => {
|
|
8
|
+
const { setValue: n, toggleOpen: r } = d(), c = u(null), l = s(
|
|
9
|
+
(t) => {
|
|
10
|
+
n(t), r(!1);
|
|
10
11
|
},
|
|
11
|
-
[n,
|
|
12
|
-
),
|
|
13
|
-
(
|
|
14
|
-
|
|
12
|
+
[n, r]
|
|
13
|
+
), m = s(
|
|
14
|
+
(t, a) => {
|
|
15
|
+
t.key === "Enter" && l(a);
|
|
15
16
|
},
|
|
16
|
-
[
|
|
17
|
+
[l]
|
|
17
18
|
);
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ i(
|
|
19
20
|
"li",
|
|
20
21
|
{
|
|
21
22
|
ref: c,
|
|
22
23
|
role: "option",
|
|
23
|
-
className: p({ theme: o }),
|
|
24
|
+
className: p(x({ theme: o })),
|
|
24
25
|
tabIndex: 0,
|
|
25
|
-
onClick: () =>
|
|
26
|
-
onKeyDown: (
|
|
26
|
+
onClick: () => l(e),
|
|
27
|
+
onKeyDown: (t) => m(t, e),
|
|
27
28
|
children: [
|
|
28
29
|
e.leftIcon ? /* @__PURE__ */ f("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null,
|
|
29
30
|
e.label
|
|
@@ -32,5 +33,5 @@ const y = ({ theme: o, ...e }) => {
|
|
|
32
33
|
);
|
|
33
34
|
};
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
+
b as ListItem
|
|
36
37
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
2
|
+
import { forwardRef as F, useId as L, useRef as N, useImperativeHandle as $, useEffect as f } from "react";
|
|
3
|
+
import { cn as R } from "../../../utils/index.js";
|
|
4
4
|
import "../../../contexts/theme.context.js";
|
|
5
5
|
import { useTheme as A } from "../../../contexts/theme.hook.js";
|
|
6
6
|
import "../../../js.cookie-OLEfuq_g.js";
|
|
@@ -10,10 +10,10 @@ import { useDropdownContext as W } from "../contexts/dropdown.hook.js";
|
|
|
10
10
|
import "../contexts/dropdown.context.js";
|
|
11
11
|
import { List as q } from "./List/List.js";
|
|
12
12
|
import { C as z } from "../../../chevron-up-CvquEaNg.js";
|
|
13
|
-
const _ =
|
|
14
|
-
({ theme:
|
|
15
|
-
const d =
|
|
16
|
-
|
|
13
|
+
const _ = F(
|
|
14
|
+
({ theme: g, label: p, placeholder: O, name: o, options: a, defaultValue: c }, j) => {
|
|
15
|
+
const d = L(), r = N(null), u = N(null), { wrapperRef: n, wrapperInputRef: h, handleOpen: y, handleOpenIfClosed: E } = U({ ulRef: u }), { isOpen: x, value: e, setValue: w, toggleOpen: b } = W(), { theme: T } = A(), v = g ?? T, i = o ? `${d}-${o}` : d;
|
|
16
|
+
$(j, () => r.current, [r]), f(() => {
|
|
17
17
|
r.current && (r.current.value = e ? e.value : "");
|
|
18
18
|
}, [e]), f(() => {
|
|
19
19
|
if (c) {
|
|
@@ -25,15 +25,15 @@ const _ = D(
|
|
|
25
25
|
}, [c, a, w]), f(() => {
|
|
26
26
|
var l;
|
|
27
27
|
const s = new AbortController();
|
|
28
|
-
return (l = n.current) == null || l.addEventListener("focusout", (
|
|
28
|
+
return (l = n.current) == null || l.addEventListener("focusout", (D) => {
|
|
29
29
|
var I;
|
|
30
|
-
const C =
|
|
30
|
+
const C = D.relatedTarget;
|
|
31
31
|
(!C || !((I = n.current) != null && I.contains(C))) && b(!1);
|
|
32
32
|
}), () => {
|
|
33
33
|
s.abort();
|
|
34
34
|
};
|
|
35
35
|
}, [b, n]);
|
|
36
|
-
const
|
|
36
|
+
const k = () => e != null && e.leftIcon ? /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null;
|
|
37
37
|
return /* @__PURE__ */ m("div", { ref: n, className: "flex flex-col w-full relative", children: [
|
|
38
38
|
p ? /* @__PURE__ */ t(
|
|
39
39
|
"label",
|
|
@@ -41,7 +41,7 @@ const _ = D(
|
|
|
41
41
|
id: i,
|
|
42
42
|
className: "m-2 cursor-pointer",
|
|
43
43
|
htmlFor: i,
|
|
44
|
-
onClick:
|
|
44
|
+
onClick: E,
|
|
45
45
|
children: p
|
|
46
46
|
}
|
|
47
47
|
) : null,
|
|
@@ -50,21 +50,21 @@ const _ = D(
|
|
|
50
50
|
{
|
|
51
51
|
ref: h,
|
|
52
52
|
id: i,
|
|
53
|
-
className: H({ theme: v }),
|
|
53
|
+
className: R(H({ theme: v })),
|
|
54
54
|
role: "combobox",
|
|
55
|
-
onClick:
|
|
55
|
+
onClick: y,
|
|
56
56
|
"aria-expanded": x,
|
|
57
57
|
tabIndex: 0,
|
|
58
58
|
"aria-labelledby": i,
|
|
59
59
|
children: [
|
|
60
60
|
/* @__PURE__ */ t("span", { className: "text-base text-inherit", children: e ? /* @__PURE__ */ m("span", { className: "flex gap-3 items-center", children: [
|
|
61
|
-
|
|
61
|
+
k(),
|
|
62
62
|
e.label
|
|
63
|
-
] }) :
|
|
63
|
+
] }) : O }),
|
|
64
64
|
/* @__PURE__ */ t(
|
|
65
65
|
z,
|
|
66
66
|
{
|
|
67
|
-
className:
|
|
67
|
+
className: R(
|
|
68
68
|
"w-4 h-4 text-inherit transition-all duration-50",
|
|
69
69
|
x ? "rotate-0" : "rotate-180"
|
|
70
70
|
)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import s, { forwardRef as m, useId as b } from "react";
|
|
3
3
|
import { cn as w } from "../../utils/index.js";
|
|
4
|
-
import { inputVariants as j } from "./Input.variants.js";
|
|
5
4
|
import "../../contexts/theme.context.js";
|
|
6
|
-
import { useTheme as
|
|
5
|
+
import { useTheme as j } from "../../contexts/theme.hook.js";
|
|
7
6
|
import "../../js.cookie-OLEfuq_g.js";
|
|
7
|
+
import { inputVariants as N } from "./Input.variants.js";
|
|
8
8
|
import { P as l } from "../../index-D68N8v8R.js";
|
|
9
9
|
function p() {
|
|
10
10
|
return p = Object.assign || function(e) {
|
|
@@ -133,7 +133,7 @@ const _ = m(
|
|
|
133
133
|
onClickIcon: g,
|
|
134
134
|
...d
|
|
135
135
|
}, x) => {
|
|
136
|
-
const v = b(), { theme: O } =
|
|
136
|
+
const v = b(), { theme: O } = j();
|
|
137
137
|
return /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
|
|
138
138
|
r ? /* @__PURE__ */ a(
|
|
139
139
|
"label",
|
|
@@ -151,7 +151,7 @@ const _ = m(
|
|
|
151
151
|
ref: x,
|
|
152
152
|
name: n,
|
|
153
153
|
type: i,
|
|
154
|
-
className:
|
|
154
|
+
className: N({
|
|
155
155
|
className: e,
|
|
156
156
|
theme: c ?? O,
|
|
157
157
|
variant: o ? "error" : "default"
|
|
@@ -3,7 +3,7 @@ import "../../index-BaNV0qac.js";
|
|
|
3
3
|
import "./components/Body/Body.js";
|
|
4
4
|
import "./components/Footer/Footer.js";
|
|
5
5
|
import "./components/Header/Header.js";
|
|
6
|
-
import { M as d } from "../../Modal-
|
|
6
|
+
import { M as d } from "../../Modal-L73dmnHv.js";
|
|
7
7
|
import "./hooks/useModal.js";
|
|
8
8
|
export {
|
|
9
9
|
d as Modal
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { S as
|
|
3
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { S as n } from "../../../../index-DoOsnuB6.js";
|
|
3
|
+
import { cn as e } from "../../../../utils/index.js";
|
|
4
|
+
const a = ({ children: o, asChild: t, className: r }) => /* @__PURE__ */ m(t ? n : "div", { className: e(r), children: o });
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
a as Footer
|
|
6
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { S as
|
|
3
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { S as n } from "../../../../index-DoOsnuB6.js";
|
|
3
|
+
import { cn as e } from "../../../../utils/index.js";
|
|
4
|
+
const i = ({ children: o, asChild: r, className: t }) => /* @__PURE__ */ m(r ? n : "div", { className: e(t), children: o });
|
|
4
5
|
export {
|
|
5
6
|
i as Header
|
|
6
7
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
+
import "../../../../index-BtibbG81.js";
|
|
2
3
|
import "react";
|
|
3
|
-
import { W as
|
|
4
|
+
import { W as c } from "../../../../Modal-L73dmnHv.js";
|
|
4
5
|
import "../../../../Combination-Cmu9JRkv.js";
|
|
5
|
-
import "../../../../index-BtibbG81.js";
|
|
6
6
|
import "../../../../contexts/theme.context.js";
|
|
7
7
|
import "../../../../contexts/theme.hook.js";
|
|
8
8
|
import "../../../../js.cookie-OLEfuq_g.js";
|
|
9
|
+
import "../../../../utils/index.js";
|
|
9
10
|
import "../../hooks/useModal.js";
|
|
10
11
|
import "./Wrapper.variants.js";
|
|
11
12
|
import "../../../../x-CRBgmX1Q.js";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
c as Wrapper
|
|
14
15
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Body as e } from "./Body/Body.js";
|
|
2
2
|
import { Footer as t } from "./Footer/Footer.js";
|
|
3
3
|
import { Header as m } from "./Header/Header.js";
|
|
4
|
-
import { W as a } from "../../../Modal-
|
|
4
|
+
import { W as a } from "../../../Modal-L73dmnHv.js";
|
|
5
5
|
export {
|
|
6
6
|
e as Body,
|
|
7
7
|
t as Footer,
|