@konstructio/ui 0.0.12-alpha.1 → 0.0.12-alpha.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/{Combination-BQYb0Gw7.js → Combination-b348x__d.js} +24 -24
- package/dist/Modal-B-E9uaA6.js +922 -0
- package/dist/components/Alert/Alert.js +58 -0
- package/dist/components/Alert/Alert.variants.js +77 -0
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.variants.js +0 -1
- package/dist/components/Autocomplete/components/List/List.js +3 -3
- package/dist/components/Breadcrumb/Breadcrumb.js +3 -3
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +18 -15
- package/dist/components/Breadcrumb/components/Item/Item.js +4 -4
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Card/Card.js +3 -3
- package/dist/components/Checkbox/Checkbox.js +5 -5
- package/dist/components/Command/Command.js +32 -0
- package/dist/components/Command/Command.variants.js +97 -0
- package/dist/components/Command/components/Command.js +8 -0
- package/dist/components/Command/components/CommandEmpty.js +15 -0
- package/dist/components/Command/components/CommandGroup.js +19 -0
- package/dist/components/Command/components/CommandInput.js +84 -0
- package/dist/components/Command/components/CommandItem.js +29 -0
- package/dist/components/Command/components/CommandList.js +16 -0
- package/dist/components/Command/components/CommandSeparator.js +16 -0
- package/dist/components/Command/components/CommandShortcut.js +19 -0
- package/dist/components/Command/components/DialogContent.js +31 -0
- package/dist/components/Command/components/DialogOverlay.js +19 -0
- package/dist/components/Command/components/index.js +20 -0
- package/dist/components/Command/contexts/Command.context.js +13 -0
- package/dist/components/Command/contexts/Command.provider.js +24 -0
- package/dist/components/Command/contexts/index.js +6 -0
- package/dist/components/Divider/Divider.js +10 -0
- package/dist/components/Divider/Divider.variants.js +14 -0
- package/dist/components/Dropdown/Dropdown.js +5 -5
- package/dist/components/Dropdown/Dropdown.variants.js +22 -3
- package/dist/components/Dropdown/components/List/List.variants.js +4 -4
- package/dist/components/Dropdown/components/ListItem/ListItem.js +19 -18
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +6 -4
- package/dist/components/Dropdown/components/Wrapper.js +88 -57
- package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.js +11 -11
- package/dist/components/Input/Input.js +112 -67
- package/dist/components/Input/Input.variants.js +5 -6
- package/dist/components/Loading/Loading.js +109 -0
- package/dist/components/Loading/Loading.variants.js +19 -0
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -5
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +3 -3
- package/dist/components/Radio/Radio.js +4 -4
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +4 -4
- package/dist/components/Sidebar/Sidebar.variants.js +2 -1
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +9 -17
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +2 -2
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +6 -5
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Slider/Slider.js +14 -14
- package/dist/components/Switch/Switch.js +17 -17
- package/dist/components/Tag/Tag.js +17 -5
- package/dist/components/Tag/Tag.variants.js +11 -1
- package/dist/components/TagSelect/TagSelect.js +6 -71
- package/dist/components/TagSelect/TagSelect.variants.js +29 -50
- package/dist/components/TagSelect/components/Item/Item.js +23 -0
- package/dist/components/TagSelect/components/Item/Item.variants.js +31 -0
- package/dist/components/TagSelect/components/List/List.js +13 -0
- package/dist/components/TagSelect/components/List/List.variants.js +37 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +88 -0
- package/dist/components/TagSelect/components/index.js +8 -0
- package/dist/components/TagSelect/contexts/TagSelect.context.js +19 -0
- package/dist/components/TagSelect/contexts/TagSelect.hook.js +11 -0
- package/dist/components/TagSelect/contexts/TagSelect.provider.js +69 -0
- package/dist/components/TagSelect/contexts/index.js +6 -0
- package/dist/components/TagSelect/hooks/useTagSelect.js +22 -27
- package/dist/components/TextArea/TextArea.js +28 -22
- package/dist/components/TextArea/TextArea.variants.js +0 -1
- package/dist/components/Toast/Toast.js +143 -130
- package/dist/components/Toast/Toast.variants.js +2 -3
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Typography/Typography.js +31 -0
- package/dist/components/Typography/Typography.variants.js +63 -0
- package/dist/components/index.js +61 -53
- package/dist/{index-BxeV34ij.js → index-4ecjw_Aj.js} +1 -1
- package/dist/index-B_6_jmOO.js +68 -0
- package/dist/{index-BBjak_0p.js → index-BbsJ0VIJ.js} +2 -2
- package/dist/{index-CJsYodgi.js → index-BzaHYXkt.js} +9 -9
- package/dist/{index-KEdwcThH.js → index-CbTU3cnP.js} +1 -1
- package/dist/{index-8vgf-x5i.js → index-Cva-e5M4.js} +2 -2
- package/dist/index-CzSBQN5S.js +432 -0
- package/dist/index-D7QNmo_D.js +422 -0
- package/dist/index-DUA6Y_AE.js +126 -0
- package/dist/{index-CoqDsznq.js → index-D_76wh4w.js} +3 -3
- package/dist/{index-D4Q2rMby.js → index-Dj1pom3_.js} +2 -2
- package/dist/index-DyKo5ZJT.js +446 -0
- package/dist/index.d.ts +63 -12
- package/dist/index.js +76 -68
- package/dist/package.json +36 -35
- package/dist/plugins/konstruct.js +34 -31
- package/dist/plugins/utils/animation.styles.js +162 -0
- package/dist/plugins/utils/index.js +7 -0
- package/dist/styles.css +1 -1
- package/dist/{useBreadcrumb-CojbXFVD.js → useBreadcrumb-BsIeMoR1.js} +47 -47
- package/dist/utils/index.js +320 -322
- package/package.json +36 -35
- package/dist/Modal-W2GbkC_F.js +0 -906
- package/dist/index-1GLoikpT.js +0 -19134
- package/dist/index-BVppSRDQ.js +0 -551
- package/dist/index-DoOsnuB6.js +0 -72
|
@@ -1,29 +1,21 @@
|
|
|
1
1
|
import { c as t } from "../../../../index-BNmRGtA6.js";
|
|
2
|
-
const
|
|
2
|
+
const o = t(
|
|
3
3
|
[
|
|
4
|
-
"px-4",
|
|
5
|
-
"py-5",
|
|
4
|
+
"md:px-4",
|
|
5
|
+
"md:py-5",
|
|
6
6
|
"flex",
|
|
7
7
|
"flex-col",
|
|
8
|
-
"items-center",
|
|
9
|
-
"items-center",
|
|
10
8
|
"justify-center",
|
|
11
9
|
"gap-1",
|
|
12
10
|
"group",
|
|
13
11
|
"relative",
|
|
14
12
|
"mb-8",
|
|
15
|
-
"[&>
|
|
16
|
-
"[&>
|
|
17
|
-
"[&>span]:font-semibold",
|
|
18
|
-
"[&>span]:pl-14",
|
|
19
|
-
"[&>span]:-mt-2",
|
|
13
|
+
"[&>p]:pl-14",
|
|
14
|
+
"[&>p]:-mt-2",
|
|
20
15
|
"[&>img]:pt-3",
|
|
21
|
-
"[&>*>
|
|
22
|
-
"[&>*>
|
|
23
|
-
"[&>*>
|
|
24
|
-
"[&>*>span]:absolute",
|
|
25
|
-
"[&>*>span]:bottom-0",
|
|
26
|
-
"[&>*>span]:-mt-2",
|
|
16
|
+
"[&>*>p]:absolute",
|
|
17
|
+
"[&>*>p]:bottom-0",
|
|
18
|
+
"[&>*>p]:-mt-2",
|
|
27
19
|
"[&>*>img]:pt-3",
|
|
28
20
|
"cursor-pointer"
|
|
29
21
|
],
|
|
@@ -41,5 +33,5 @@ const s = t(
|
|
|
41
33
|
}
|
|
42
34
|
);
|
|
43
35
|
export {
|
|
44
|
-
|
|
36
|
+
o as logoVariants
|
|
45
37
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const a =
|
|
1
|
+
import { c as t } from "../../../../index-BNmRGtA6.js";
|
|
2
|
+
const a = t(
|
|
3
3
|
[
|
|
4
4
|
"[&>a]:flex",
|
|
5
5
|
"[&>a]:gap-2",
|
|
@@ -11,9 +11,10 @@ const a = e(
|
|
|
11
11
|
"font-normal",
|
|
12
12
|
"font-normal",
|
|
13
13
|
"gap-2",
|
|
14
|
-
"
|
|
15
|
-
"px-4",
|
|
16
|
-
"py-2.5",
|
|
14
|
+
"rounded-xl",
|
|
15
|
+
"md:px-4",
|
|
16
|
+
"md:py-2.5",
|
|
17
|
+
"p-2",
|
|
17
18
|
"text-black",
|
|
18
19
|
"w-full"
|
|
19
20
|
],
|
|
@@ -8,7 +8,7 @@ import "../NavigationTitle/NavigationTitle.js";
|
|
|
8
8
|
import { jsxs as T, jsx as V } from "react/jsx-runtime";
|
|
9
9
|
import { useRef as d, useCallback as l, useMemo as s, Children as i, isValidElement as v, useEffect as b } from "react";
|
|
10
10
|
import { cn as E } from "../../../../utils/index.js";
|
|
11
|
-
import {
|
|
11
|
+
import { dragVariants as j, wrapperSiderbarVariants as z } from "../../Sidebar.variants.js";
|
|
12
12
|
import { useTheme as k } from "../../../../contexts/theme.hook.js";
|
|
13
13
|
const K = ({
|
|
14
14
|
canResize: M = !0,
|
|
@@ -61,7 +61,7 @@ const K = ({
|
|
|
61
61
|
{
|
|
62
62
|
ref: u,
|
|
63
63
|
className: E(
|
|
64
|
-
|
|
64
|
+
z({
|
|
65
65
|
className: w,
|
|
66
66
|
theme: g
|
|
67
67
|
})
|
|
@@ -74,7 +74,7 @@ const K = ({
|
|
|
74
74
|
"div",
|
|
75
75
|
{
|
|
76
76
|
ref: r,
|
|
77
|
-
className: E(
|
|
77
|
+
className: E(j({ theme: g })),
|
|
78
78
|
onMouseDown: R
|
|
79
79
|
}
|
|
80
80
|
)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { R as v, T,
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
2
|
+
import { R as v, T, b as V } from "../../index-BzaHYXkt.js";
|
|
3
|
+
import { forwardRef as b, useRef as R, useState as g, useImperativeHandle as j, useEffect as k, useCallback as w } from "react";
|
|
4
|
+
import { cn as a } from "../../utils/index.js";
|
|
5
|
+
import { trackVariants as y, thumbVariants as C, sliderVariants as S } from "./Slider.variants.js";
|
|
6
6
|
import { useTheme as E } from "../../contexts/theme.hook.js";
|
|
7
|
-
const F =
|
|
7
|
+
const F = b(
|
|
8
8
|
({ label: s, defaultValue: c = [0], name: i, theme: o, size: m, showValue: u, ...f }, h) => {
|
|
9
|
-
const e =
|
|
9
|
+
const e = R(null), [r, d] = g(c), { theme: p } = E(), n = o ?? p;
|
|
10
10
|
j(h, () => e.current, [e]), k(() => {
|
|
11
|
-
e.current && (e.current.value =
|
|
12
|
-
}, [
|
|
11
|
+
e.current && (e.current.value = r.toString());
|
|
12
|
+
}, [r]);
|
|
13
13
|
const x = w(
|
|
14
14
|
(N) => d(N),
|
|
15
15
|
[]
|
|
@@ -18,13 +18,13 @@ const F = R(
|
|
|
18
18
|
/* @__PURE__ */ l(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
21
|
+
className: a(
|
|
22
22
|
"flex items-center",
|
|
23
23
|
s ? "justify-between" : "justify-end"
|
|
24
24
|
),
|
|
25
25
|
children: [
|
|
26
26
|
s ? /* @__PURE__ */ t("label", { children: s }) : null,
|
|
27
|
-
u ? /* @__PURE__ */ t("span", { className: "text-xs", children:
|
|
27
|
+
u ? /* @__PURE__ */ t("span", { className: "text-xs", children: r }) : null
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
30
|
),
|
|
@@ -32,13 +32,13 @@ const F = R(
|
|
|
32
32
|
/* @__PURE__ */ l(
|
|
33
33
|
v,
|
|
34
34
|
{
|
|
35
|
-
value:
|
|
36
|
-
className:
|
|
35
|
+
value: r,
|
|
36
|
+
className: a(S({ theme: n })),
|
|
37
37
|
onValueChange: x,
|
|
38
38
|
...f,
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */ t(T, { className:
|
|
41
|
-
/* @__PURE__ */ t(V, { className:
|
|
40
|
+
/* @__PURE__ */ t(T, { className: a(y({ theme: n, size: m })) }),
|
|
41
|
+
/* @__PURE__ */ t(V, { className: a(C({ theme: n, size: m })) })
|
|
42
42
|
]
|
|
43
43
|
}
|
|
44
44
|
)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as P, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
3
|
import { forwardRef as _, useState as H, useRef as A, useId as M, useImperativeHandle as $, useEffect as j, useCallback as z } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { u as O } from "../../index-
|
|
6
|
-
import { u as V, a as D } from "../../index-
|
|
7
|
-
import { P as g } from "../../index-
|
|
4
|
+
import { a as B, c as q, b as F } from "../../index-Cva-e5M4.js";
|
|
5
|
+
import { u as O } from "../../index-B_6_jmOO.js";
|
|
6
|
+
import { u as V, a as D } from "../../index-4ecjw_Aj.js";
|
|
7
|
+
import { P as g } from "../../index-D7QNmo_D.js";
|
|
8
8
|
import { cn as x } from "../../utils/index.js";
|
|
9
|
-
import {
|
|
9
|
+
import { thumbVariants as L, switchVariants as U } from "./Switch.variants.js";
|
|
10
10
|
import { useTheme as W } from "../../contexts/theme.hook.js";
|
|
11
|
-
var k = "Switch", [X, ie] =
|
|
11
|
+
var k = "Switch", [X, ie] = q(k), [G, J] = X(k), R = p.forwardRef(
|
|
12
12
|
(e, s) => {
|
|
13
13
|
const {
|
|
14
14
|
__scopeSwitch: t,
|
|
@@ -20,8 +20,8 @@ var k = "Switch", [X, ie] = B(k), [G, J] = X(k), R = p.forwardRef(
|
|
|
20
20
|
value: i = "on",
|
|
21
21
|
onCheckedChange: m,
|
|
22
22
|
form: r,
|
|
23
|
-
...
|
|
24
|
-
} = e, [
|
|
23
|
+
...l
|
|
24
|
+
} = e, [d, b] = p.useState(null), v = O(s, (C) => b(C)), f = p.useRef(!1), w = d ? r || !!d.closest("form") : !0, [S = !1, T] = B({
|
|
25
25
|
prop: n,
|
|
26
26
|
defaultProp: h,
|
|
27
27
|
onChange: m
|
|
@@ -38,7 +38,7 @@ var k = "Switch", [X, ie] = B(k), [G, J] = X(k), R = p.forwardRef(
|
|
|
38
38
|
"data-disabled": a ? "" : void 0,
|
|
39
39
|
disabled: a,
|
|
40
40
|
value: i,
|
|
41
|
-
...
|
|
41
|
+
...l,
|
|
42
42
|
ref: v,
|
|
43
43
|
onClick: F(e.onClick, (C) => {
|
|
44
44
|
T((I) => !I), w && (f.current = C.isPropagationStopped(), f.current || C.stopPropagation());
|
|
@@ -48,7 +48,7 @@ var k = "Switch", [X, ie] = B(k), [G, J] = X(k), R = p.forwardRef(
|
|
|
48
48
|
w && /* @__PURE__ */ u(
|
|
49
49
|
K,
|
|
50
50
|
{
|
|
51
|
-
control:
|
|
51
|
+
control: d,
|
|
52
52
|
bubbles: !f.current,
|
|
53
53
|
name: c,
|
|
54
54
|
value: i,
|
|
@@ -81,10 +81,10 @@ N.displayName = y;
|
|
|
81
81
|
var K = (e) => {
|
|
82
82
|
const { control: s, checked: t, bubbles: c = !0, ...n } = e, h = p.useRef(null), o = V(t), a = D(s);
|
|
83
83
|
return p.useEffect(() => {
|
|
84
|
-
const i = h.current, m = window.HTMLInputElement.prototype,
|
|
85
|
-
if (o !== t &&
|
|
86
|
-
const
|
|
87
|
-
|
|
84
|
+
const i = h.current, m = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(m, "checked").set;
|
|
85
|
+
if (o !== t && l) {
|
|
86
|
+
const d = new Event("click", { bubbles: c });
|
|
87
|
+
l.call(i, t), i.dispatchEvent(d);
|
|
88
88
|
}
|
|
89
89
|
}, [o, t, c]), /* @__PURE__ */ u(
|
|
90
90
|
"input",
|
|
@@ -120,7 +120,7 @@ const ue = _(
|
|
|
120
120
|
className: h,
|
|
121
121
|
label: o
|
|
122
122
|
}, a) => {
|
|
123
|
-
const [i, m] = H(s ?? !1), r = A(null),
|
|
123
|
+
const [i, m] = H(s ?? !1), r = A(null), l = M(), { theme: d } = W(), b = c ?? d, v = e ? `${l}-${e}` : l;
|
|
124
124
|
$(a, () => r.current, [r]), j(() => {
|
|
125
125
|
r.current && (r.current.value = `${i}`);
|
|
126
126
|
}, [i]);
|
|
@@ -151,12 +151,12 @@ const ue = _(
|
|
|
151
151
|
id: v,
|
|
152
152
|
defaultChecked: s,
|
|
153
153
|
onCheckedChange: f,
|
|
154
|
-
className: x(
|
|
154
|
+
className: x(U({ theme: b, className: h })),
|
|
155
155
|
"aria-label": o,
|
|
156
156
|
children: /* @__PURE__ */ u(
|
|
157
157
|
Y,
|
|
158
158
|
{
|
|
159
|
-
className:
|
|
159
|
+
className: L({
|
|
160
160
|
theme: b,
|
|
161
161
|
className: n
|
|
162
162
|
})
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { S as r } from "../../index-B_6_jmOO.js";
|
|
3
|
+
import { cn as o } from "../../utils/index.js";
|
|
4
|
+
import { tagVariants as c } from "./Tag.variants.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
label: i,
|
|
7
|
+
color: s,
|
|
8
|
+
rightIcon: t,
|
|
9
|
+
leftIcon: e,
|
|
10
|
+
className: l,
|
|
11
|
+
"data-value": m
|
|
12
|
+
}) => /* @__PURE__ */ n("div", { className: o(c({ color: s, className: l })), "data-value": m, children: [
|
|
13
|
+
e ? /* @__PURE__ */ a(r, { className: "text-inherit", children: e }) : null,
|
|
14
|
+
/* @__PURE__ */ a("span", { className: "text-inherit", children: i }),
|
|
15
|
+
t ? /* @__PURE__ */ a(r, { className: "text-inherit", children: t }) : null
|
|
16
|
+
] });
|
|
5
17
|
export {
|
|
6
|
-
|
|
18
|
+
u as Tag
|
|
7
19
|
};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { c as e } from "../../index-BNmRGtA6.js";
|
|
2
2
|
const f = e(
|
|
3
|
-
[
|
|
3
|
+
[
|
|
4
|
+
"px-2",
|
|
5
|
+
"py-1",
|
|
6
|
+
"rounded-md",
|
|
7
|
+
"w-max",
|
|
8
|
+
"text-xs",
|
|
9
|
+
"flex",
|
|
10
|
+
"items-center",
|
|
11
|
+
"justify-center",
|
|
12
|
+
"gap-1"
|
|
13
|
+
],
|
|
4
14
|
{
|
|
5
15
|
variants: {
|
|
6
16
|
color: {
|
|
@@ -1,73 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { tagSelectVariants as k, tagListVariants as I, tagItemVariants as V } from "./TagSelect.variants.js";
|
|
7
|
-
import { C as j } from "../../chevron-up-DgLBQCKD.js";
|
|
8
|
-
import { useTheme as y } from "../../contexts/theme.hook.js";
|
|
9
|
-
const z = g(({ label: s, name: l, options: f, placeholder: h = "Select a value...", theme: o }, x) => {
|
|
10
|
-
const c = w(), { theme: a } = y(), t = C(null), {
|
|
11
|
-
isOpen: n,
|
|
12
|
-
selectedTag: m,
|
|
13
|
-
value: p,
|
|
14
|
-
wrapperRef: b,
|
|
15
|
-
handleClickTag: N,
|
|
16
|
-
handleOpenDropdown: v
|
|
17
|
-
} = S();
|
|
18
|
-
return T(x, () => t.current, [t]), R(() => {
|
|
19
|
-
t.current && (t.current.value = p);
|
|
20
|
-
}, [p]), /* @__PURE__ */ u("div", { ref: b, className: "flex flex-col w-full relative", children: [
|
|
21
|
-
s ? /* @__PURE__ */ e("label", { className: "m-2 cursor-pointer", htmlFor: l ?? c, children: s }) : null,
|
|
22
|
-
/* @__PURE__ */ u(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
id: l ?? c,
|
|
26
|
-
className: r(k({ theme: o ?? a })),
|
|
27
|
-
role: "combobox",
|
|
28
|
-
onClick: v,
|
|
29
|
-
"aria-expanded": n,
|
|
30
|
-
children: [
|
|
31
|
-
m ? /* @__PURE__ */ e(d, { ...m }) : /* @__PURE__ */ e("span", { className: "text-base text-inherit", children: h }),
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
j,
|
|
34
|
-
{
|
|
35
|
-
className: r(
|
|
36
|
-
"w-4 h-4 text-inherit transition-all duration-50",
|
|
37
|
-
n ? "rotate-0" : "rotate-180"
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
/* @__PURE__ */ e("input", { ref: t, type: "text", name: l, className: "hidden" }),
|
|
45
|
-
n ? /* @__PURE__ */ e(
|
|
46
|
-
"ul",
|
|
47
|
-
{
|
|
48
|
-
role: "listbox",
|
|
49
|
-
className: r(I({ theme: o ?? a })),
|
|
50
|
-
children: f.map((i) => /* @__PURE__ */ e(
|
|
51
|
-
"li",
|
|
52
|
-
{
|
|
53
|
-
className: r(V({ theme: o ?? a })),
|
|
54
|
-
role: "option",
|
|
55
|
-
children: /* @__PURE__ */ e(
|
|
56
|
-
"button",
|
|
57
|
-
{
|
|
58
|
-
type: "button",
|
|
59
|
-
role: "button",
|
|
60
|
-
className: "m-0 p-0 w-full",
|
|
61
|
-
onClick: () => N(i),
|
|
62
|
-
children: /* @__PURE__ */ e(d, { label: i.label, color: i.color })
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
))
|
|
67
|
-
}
|
|
68
|
-
) : null
|
|
69
|
-
] });
|
|
70
|
-
});
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { TagSelectProvider as f } from "./contexts/TagSelect.provider.js";
|
|
4
|
+
import { Wrapper as i } from "./components/Wrapper/Wrapper.js";
|
|
5
|
+
const n = p(({ options: o, multiselect: e, ...t }, m) => /* @__PURE__ */ r(f, { defaultOptions: o, multiselect: e, children: /* @__PURE__ */ r(i, { ref: m, ...t }) }));
|
|
71
6
|
export {
|
|
72
|
-
|
|
7
|
+
n as TagSelect
|
|
73
8
|
};
|
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
import { c as e } from "../../index-BNmRGtA6.js";
|
|
2
|
-
const
|
|
3
|
-
[
|
|
4
|
-
"border",
|
|
5
|
-
"cursor-pointer",
|
|
6
|
-
"duration-250",
|
|
7
|
-
"ease-in-out",
|
|
8
|
-
"flex",
|
|
9
|
-
"items-center",
|
|
10
|
-
"justify-between",
|
|
11
|
-
"px-3",
|
|
12
|
-
"py-1",
|
|
13
|
-
"rounded-md",
|
|
14
|
-
"transition-all",
|
|
15
|
-
"w-full"
|
|
16
|
-
],
|
|
2
|
+
const r = e(
|
|
3
|
+
["flex", "flex-col", "w-full", "relative", "text-zinc-500"],
|
|
17
4
|
{
|
|
18
5
|
variants: {
|
|
19
6
|
theme: {
|
|
20
|
-
colony:
|
|
21
|
-
kubefirst:
|
|
22
|
-
"aria-expanded:border-kubefirst-primary",
|
|
23
|
-
"aria-expanded:text-kubefirst-secondary"
|
|
24
|
-
],
|
|
7
|
+
colony: "",
|
|
8
|
+
kubefirst: "",
|
|
25
9
|
civo: ""
|
|
26
10
|
}
|
|
27
11
|
},
|
|
@@ -29,42 +13,37 @@ const t = e(
|
|
|
29
13
|
theme: "kubefirst"
|
|
30
14
|
}
|
|
31
15
|
}
|
|
32
|
-
), a = e(
|
|
16
|
+
), a = e(["my-2", "cursor-pointer"], {
|
|
17
|
+
variants: {
|
|
18
|
+
theme: {
|
|
19
|
+
colony: "",
|
|
20
|
+
kubefirst: "",
|
|
21
|
+
civo: ""
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
theme: "kubefirst"
|
|
26
|
+
}
|
|
27
|
+
}), i = e(
|
|
33
28
|
[
|
|
34
|
-
"absolute",
|
|
35
|
-
"bg-white",
|
|
36
29
|
"border",
|
|
37
|
-
"
|
|
30
|
+
"cursor-pointer",
|
|
31
|
+
"duration-250",
|
|
38
32
|
"ease-in-out",
|
|
39
33
|
"flex",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
34
|
+
"items-center",
|
|
35
|
+
"justify-between",
|
|
36
|
+
"px-2",
|
|
37
|
+
"py-1",
|
|
38
|
+
"rounded",
|
|
45
39
|
"transition-all",
|
|
46
|
-
"w-full"
|
|
47
|
-
"z-10"
|
|
40
|
+
"w-full"
|
|
48
41
|
],
|
|
49
42
|
{
|
|
50
43
|
variants: {
|
|
51
44
|
theme: {
|
|
52
|
-
colony:
|
|
53
|
-
kubefirst:
|
|
54
|
-
civo: ""
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
defaultVariants: {
|
|
58
|
-
theme: "kubefirst"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
), i = e(
|
|
62
|
-
["cursor-pointer", "py-1", "px-2", "last:mb-2", "first:mt-2", "h-full"],
|
|
63
|
-
{
|
|
64
|
-
variants: {
|
|
65
|
-
theme: {
|
|
66
|
-
colony: "hover:bg-red-100",
|
|
67
|
-
kubefirst: "hover:bg-purple-100",
|
|
45
|
+
colony: "",
|
|
46
|
+
kubefirst: "",
|
|
68
47
|
civo: ""
|
|
69
48
|
}
|
|
70
49
|
},
|
|
@@ -74,7 +53,7 @@ const t = e(
|
|
|
74
53
|
}
|
|
75
54
|
);
|
|
76
55
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
56
|
+
a as labelVariants,
|
|
57
|
+
i as tagSelectVariants,
|
|
58
|
+
r as wrapperVariants
|
|
80
59
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Tag as i } from "../../../Tag/Tag.js";
|
|
3
|
+
import { cn as c } from "../../../../utils/index.js";
|
|
4
|
+
import { wrapperVariants as n } from "./Item.variants.js";
|
|
5
|
+
import { useTagSelect as s } from "../../contexts/TagSelect.hook.js";
|
|
6
|
+
import { useTheme as h } from "../../../../contexts/theme.hook.js";
|
|
7
|
+
const g = ({ option: e, theme: r }) => {
|
|
8
|
+
const { theme: m } = h(), { onSelectTag: o } = s();
|
|
9
|
+
return /* @__PURE__ */ t(
|
|
10
|
+
"li",
|
|
11
|
+
{
|
|
12
|
+
role: "option",
|
|
13
|
+
className: c(
|
|
14
|
+
n({ theme: r ?? m, isSelected: e.isSelected })
|
|
15
|
+
),
|
|
16
|
+
onClick: () => o(e),
|
|
17
|
+
children: /* @__PURE__ */ t(i, { ...e })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
g as Item
|
|
23
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { c as e } from "../../../../index-BNmRGtA6.js";
|
|
2
|
+
const r = e(
|
|
3
|
+
["cursor-pointer", "py-1.5", "px-2", "last:pb-2", "first:pt-2", "h-full"],
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
theme: {
|
|
7
|
+
colony: "",
|
|
8
|
+
kubefirst: ["hover:bg-purple-100"],
|
|
9
|
+
civo: ""
|
|
10
|
+
},
|
|
11
|
+
isSelected: {
|
|
12
|
+
true: "",
|
|
13
|
+
false: ""
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
compoundVariants: [
|
|
17
|
+
{
|
|
18
|
+
theme: "kubefirst",
|
|
19
|
+
isSelected: !0,
|
|
20
|
+
class: ["bg-purple-100"]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
theme: "kubefirst",
|
|
25
|
+
isSelected: !1
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
export {
|
|
30
|
+
r as wrapperVariants
|
|
31
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "../../../../utils/index.js";
|
|
3
|
+
import { Item as n } from "../Item/Item.js";
|
|
4
|
+
import { wrapperVariants as p } from "./List.variants.js";
|
|
5
|
+
import { useTagSelect as a } from "../../contexts/TagSelect.hook.js";
|
|
6
|
+
import { useTheme as c } from "../../../../contexts/theme.hook.js";
|
|
7
|
+
const d = ({ theme: m }) => {
|
|
8
|
+
const { tags: t } = a(), { theme: s } = c(), o = m ?? s;
|
|
9
|
+
return /* @__PURE__ */ e("ul", { role: "listbox", className: i(p({ theme: o })), children: t.length > 0 ? t.map((r) => /* @__PURE__ */ e(n, { theme: o, option: r }, r.id)) : /* @__PURE__ */ e("span", { className: "text-center text-sm px-4 py-2", children: "There is not options available" }) });
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
d as List
|
|
13
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { c as e } from "../../../../index-BNmRGtA6.js";
|
|
2
|
+
const t = e(
|
|
3
|
+
[
|
|
4
|
+
"absolute",
|
|
5
|
+
"bg-white",
|
|
6
|
+
"border",
|
|
7
|
+
"duration-100",
|
|
8
|
+
"flex",
|
|
9
|
+
"flex-col",
|
|
10
|
+
"mt-0.5",
|
|
11
|
+
"rounded",
|
|
12
|
+
"shadow-sm",
|
|
13
|
+
"top-full",
|
|
14
|
+
"transition-all",
|
|
15
|
+
"w-full",
|
|
16
|
+
"z-10",
|
|
17
|
+
"animate-in",
|
|
18
|
+
"fade-in-60",
|
|
19
|
+
"zoom-in-95",
|
|
20
|
+
"overflow-hidden"
|
|
21
|
+
],
|
|
22
|
+
{
|
|
23
|
+
variants: {
|
|
24
|
+
theme: {
|
|
25
|
+
colony: "",
|
|
26
|
+
kubefirst: "",
|
|
27
|
+
civo: ""
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
theme: "kubefirst"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
export {
|
|
36
|
+
t as wrapperVariants
|
|
37
|
+
};
|