@konstructio/ui 0.0.12-alpha.9 → 0.0.13-alpha.1
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-B-E9uaA6.js → Modal-i7eolhYH.js} +311 -307
- package/dist/components/Alert/Alert.js +24 -29
- package/dist/components/Alert/Alert.variants.js +9 -15
- package/dist/components/AlertDialog/AlertDialog.js +59 -46
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -2
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +76 -72
- package/dist/components/Autocomplete/Autocomplete.variants.js +11 -20
- package/dist/components/Autocomplete/components/List/List.js +28 -30
- package/dist/components/Autocomplete/components/List/List.variants.js +34 -40
- package/dist/components/Breadcrumb/Breadcrumb.js +47 -56
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +6 -26
- package/dist/components/Breadcrumb/components/Item/Item.js +29 -41
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +2 -20
- package/dist/components/Button/Button.js +33 -37
- package/dist/components/Button/Button.variants.js +138 -195
- package/dist/components/Card/Card.js +32 -37
- package/dist/components/Card/Card.variants.js +18 -53
- package/dist/components/Checkbox/Checkbox.js +65 -68
- package/dist/components/Checkbox/Checkbox.variants.js +11 -35
- package/dist/components/Command/Command.js +33 -25
- package/dist/components/Command/Command.variants.js +47 -94
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +8 -8
- package/dist/components/Divider/Divider.js +3 -2
- package/dist/components/Divider/Divider.variants.js +12 -9
- package/dist/components/Dropdown/Dropdown.js +6 -6
- package/dist/components/Dropdown/Dropdown.variants.js +31 -38
- package/dist/components/Dropdown/components/List/List.js +17 -15
- package/dist/components/Dropdown/components/List/List.variants.js +22 -32
- package/dist/components/Dropdown/components/ListItem/ListItem.js +20 -19
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +18 -30
- package/dist/components/Dropdown/components/Wrapper.js +127 -90
- package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.js +9 -9
- package/dist/components/Input/Input.js +37 -37
- package/dist/components/Input/Input.variants.js +8 -13
- package/dist/components/Loading/Loading.js +60 -58
- package/dist/components/Loading/Loading.variants.js +9 -15
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +2 -2
- package/dist/components/Modal/components/Header/Header.js +3 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -4
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +32 -46
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +93 -111
- package/dist/components/NumberInput/NumberInput.variants.js +30 -51
- package/dist/components/ProgressBar/ProgressBar.js +25 -29
- package/dist/components/ProgressBar/ProgressBar.variants.js +10 -31
- package/dist/components/Radio/Radio.js +45 -46
- package/dist/components/Radio/Radio.variants.js +4 -13
- package/dist/components/RadioCard/RadioCard.js +31 -37
- package/dist/components/RadioCard/RadioCard.variants.js +8 -17
- package/dist/components/RadioCardGroup/RadioCardGroup.js +22 -23
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +3 -9
- package/dist/components/RadioGroup/RadioGroup.js +30 -31
- package/dist/components/RadioGroup/RadioGroup.variants.js +2 -8
- package/dist/components/Range/Range.js +28 -34
- package/dist/components/Range/Range.variants.js +21 -53
- package/dist/components/Sidebar/Sidebar.js +12 -13
- package/dist/components/Sidebar/Sidebar.variants.js +30 -56
- package/dist/components/Sidebar/components/Footer/Footer.js +5 -17
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +9 -16
- package/dist/components/Sidebar/components/Logo/Logo.js +5 -15
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +20 -36
- package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -28
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +3 -17
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +21 -34
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +2 -13
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +21 -27
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +7 -17
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +7 -19
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +6 -16
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +8 -21
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +11 -20
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +41 -44
- package/dist/components/Slider/Slider.js +26 -27
- package/dist/components/Slider/Slider.variants.js +22 -34
- package/dist/components/Switch/Switch.js +103 -106
- package/dist/components/Switch/Switch.variants.js +28 -53
- package/dist/components/Table/Table.js +27 -0
- package/dist/components/Table/Table.variants.js +40 -0
- package/dist/components/Table/components/Body.js +18 -0
- package/dist/components/Table/components/Filter.js +9 -0
- package/dist/components/Table/components/Head.js +18 -0
- package/dist/components/Table/components/Row.js +28 -0
- package/dist/components/Table/components/index.js +10 -0
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagSelect/TagSelect.variants.js +23 -55
- package/dist/components/TagSelect/components/Item/Item.js +12 -14
- package/dist/components/TagSelect/components/Item/Item.variants.js +11 -10
- package/dist/components/TagSelect/components/List/List.js +9 -10
- package/dist/components/TagSelect/components/List/List.variants.js +21 -35
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +46 -48
- package/dist/components/TextArea/TextArea.js +20 -23
- package/dist/components/TextArea/TextArea.variants.js +19 -31
- package/dist/components/Toast/Toast.js +110 -116
- package/dist/components/Toast/Toast.variants.js +42 -70
- package/dist/components/Tooltip/Tooltip.js +21 -27
- package/dist/components/Tooltip/Tooltip.variants.js +61 -62
- package/dist/components/Typography/Typography.js +23 -19
- package/dist/components/Typography/Typography.variants.js +1 -7
- package/dist/components/index.js +22 -20
- package/dist/contexts/theme.provider.js +37 -39
- package/dist/domain/theme.js +0 -0
- package/dist/index-AM3avohj.js +133 -0
- package/dist/{index-BzaHYXkt.js → index-BOx5P4tS.js} +5 -5
- package/dist/index-Bk324h27.js +82 -0
- package/dist/{index-4ecjw_Aj.js → index-Bry5AFQ2.js} +1 -1
- package/dist/{index-CbTU3cnP.js → index-CWKdynYu.js} +1 -1
- package/dist/index-D9BbbgUq.js +47 -0
- package/dist/{index-DyKo5ZJT.js → index-DvFiic6N.js} +45 -45
- package/dist/{index-Dj1pom3_.js → index-G_6jG4Qc.js} +2 -2
- package/dist/{index-D_76wh4w.js → index-YaQrdkGE.js} +3 -3
- package/dist/{index-Cva-e5M4.js → index-bYyfdsls.js} +9 -9
- package/dist/index-dRxIWVBr.js +313 -0
- package/dist/{index-D7QNmo_D.js → index-g-TFwd6Y.js} +41 -41
- package/dist/index.d.ts +115 -98
- package/dist/index.js +30 -30
- package/dist/package.json +37 -36
- package/dist/styles.css +1 -1
- package/dist/ui/kubefirst-theme.css +296 -0
- package/dist/ui/theme.css +6 -0
- package/dist/ui/utilities.css +165 -0
- package/dist/utils/index.js +675 -424
- package/package.json +37 -36
- package/dist/components/AlertDialog/AlertDialog.variants.js +0 -15
- package/dist/index-B_6_jmOO.js +0 -68
- package/dist/index-BbsJ0VIJ.js +0 -47
- package/dist/index-CzSBQN5S.js +0 -432
- package/dist/index-DUA6Y_AE.js +0 -126
- package/dist/plugins/index.js +0 -4
- package/dist/plugins/konstruct.js +0 -118
- package/dist/plugins/utils/animation.styles.js +0 -162
- package/dist/plugins/utils/colors.js +0 -331
- package/dist/plugins/utils/index.js +0 -7
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "../../utils/index.js";
|
|
3
|
+
import { tableVariants as p } from "./Table.variants.js";
|
|
4
|
+
import { Body as f } from "./components/Body.js";
|
|
5
|
+
import { Filter as l } from "./components/Filter.js";
|
|
6
|
+
import { Head as d } from "./components/Head.js";
|
|
7
|
+
import { Row as s } from "./components/Row.js";
|
|
8
|
+
const o = ({ children: r, className: m, theme: t, ...a }) => /* @__PURE__ */ e(
|
|
9
|
+
"table",
|
|
10
|
+
{
|
|
11
|
+
className: i(
|
|
12
|
+
p({
|
|
13
|
+
className: m
|
|
14
|
+
})
|
|
15
|
+
),
|
|
16
|
+
"data-theme": t,
|
|
17
|
+
...a,
|
|
18
|
+
children: r
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
o.Body = f;
|
|
22
|
+
o.Filter = l;
|
|
23
|
+
o.Head = d;
|
|
24
|
+
o.Row = s;
|
|
25
|
+
export {
|
|
26
|
+
o as Table
|
|
27
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { c as t } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const r = t([
|
|
3
|
+
"table-auto",
|
|
4
|
+
"w-full",
|
|
5
|
+
"border-collapse",
|
|
6
|
+
"border-spacing-0",
|
|
7
|
+
"rounded",
|
|
8
|
+
"shadow-sm"
|
|
9
|
+
]), a = t(
|
|
10
|
+
[
|
|
11
|
+
"h-8",
|
|
12
|
+
"text-inherit",
|
|
13
|
+
"[&>td]:py-3",
|
|
14
|
+
"[&>td]:px-4",
|
|
15
|
+
"text-slate-700",
|
|
16
|
+
"hover:bg-zinc-100",
|
|
17
|
+
"hover:cursor-pointer"
|
|
18
|
+
],
|
|
19
|
+
{
|
|
20
|
+
variants: {
|
|
21
|
+
isSelected: {
|
|
22
|
+
true: "bg-purple-50",
|
|
23
|
+
false: ""
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
), s = t([
|
|
28
|
+
"h-[18px]",
|
|
29
|
+
"bg-slate-100",
|
|
30
|
+
"[&>tr>th]:py-3",
|
|
31
|
+
"[&>tr>th]:px-4",
|
|
32
|
+
"[&>tr>th]:uppercase",
|
|
33
|
+
"text-left"
|
|
34
|
+
]), o = t([]);
|
|
35
|
+
export {
|
|
36
|
+
o as bodyVariants,
|
|
37
|
+
s as headVariants,
|
|
38
|
+
a as rowVariants,
|
|
39
|
+
r as tableVariants
|
|
40
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as s } from "../../../utils/index.js";
|
|
3
|
+
import { bodyVariants as a } from "../Table.variants.js";
|
|
4
|
+
const d = ({ children: o, className: r, ...m }) => /* @__PURE__ */ t(
|
|
5
|
+
"tbody",
|
|
6
|
+
{
|
|
7
|
+
className: s(
|
|
8
|
+
a({
|
|
9
|
+
className: r
|
|
10
|
+
})
|
|
11
|
+
),
|
|
12
|
+
...m,
|
|
13
|
+
children: o
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
d as Body
|
|
18
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Input as i } from "../../Input/Input.js";
|
|
3
|
+
const o = ({ children: e, ...r }) => /* @__PURE__ */ t("div", { className: "flex px-4 py-6 rounded-t", children: [
|
|
4
|
+
/* @__PURE__ */ s(i, { className: "!w-1/3", ...r }),
|
|
5
|
+
/* @__PURE__ */ s("div", { className: "w-1/4 flex justify-end", children: e })
|
|
6
|
+
] });
|
|
7
|
+
export {
|
|
8
|
+
o as Filter
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../../../utils/index.js";
|
|
3
|
+
import { headVariants as e } from "../Table.variants.js";
|
|
4
|
+
const c = ({ children: o, className: r, ...a }) => /* @__PURE__ */ m(
|
|
5
|
+
"thead",
|
|
6
|
+
{
|
|
7
|
+
className: t(
|
|
8
|
+
e({
|
|
9
|
+
className: r
|
|
10
|
+
})
|
|
11
|
+
),
|
|
12
|
+
...a,
|
|
13
|
+
children: o
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
c as Head
|
|
18
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as c } from "../../../utils/index.js";
|
|
3
|
+
import { rowVariants as n } from "../Table.variants.js";
|
|
4
|
+
const l = ({
|
|
5
|
+
children: o,
|
|
6
|
+
className: r,
|
|
7
|
+
width: t,
|
|
8
|
+
isSelected: m,
|
|
9
|
+
onSelect: s,
|
|
10
|
+
...i
|
|
11
|
+
}) => /* @__PURE__ */ a(
|
|
12
|
+
"tr",
|
|
13
|
+
{
|
|
14
|
+
style: { width: t },
|
|
15
|
+
onClick: s,
|
|
16
|
+
className: c(
|
|
17
|
+
n({
|
|
18
|
+
className: r,
|
|
19
|
+
isSelected: m
|
|
20
|
+
})
|
|
21
|
+
),
|
|
22
|
+
...i,
|
|
23
|
+
children: o
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
export {
|
|
27
|
+
l as Row
|
|
28
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { S as r } from "../../index-
|
|
2
|
+
import { S as r } from "../../index-Bk324h27.js";
|
|
3
3
|
import { cn as o } from "../../utils/index.js";
|
|
4
4
|
import { tagVariants as c } from "./Tag.variants.js";
|
|
5
5
|
const u = ({
|
|
@@ -1,59 +1,27 @@
|
|
|
1
1
|
import { c as e } from "../../index-BNmRGtA6.js";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
theme: "kubefirst"
|
|
26
|
-
}
|
|
27
|
-
}), i = e(
|
|
28
|
-
[
|
|
29
|
-
"border",
|
|
30
|
-
"cursor-pointer",
|
|
31
|
-
"duration-250",
|
|
32
|
-
"ease-in-out",
|
|
33
|
-
"flex",
|
|
34
|
-
"items-center",
|
|
35
|
-
"justify-between",
|
|
36
|
-
"px-2",
|
|
37
|
-
"py-1",
|
|
38
|
-
"rounded",
|
|
39
|
-
"transition-all",
|
|
40
|
-
"w-full"
|
|
41
|
-
],
|
|
42
|
-
{
|
|
43
|
-
variants: {
|
|
44
|
-
theme: {
|
|
45
|
-
colony: "",
|
|
46
|
-
kubefirst: "",
|
|
47
|
-
civo: ""
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
defaultVariants: {
|
|
51
|
-
theme: "kubefirst"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
);
|
|
2
|
+
const t = e([
|
|
3
|
+
"flex",
|
|
4
|
+
"flex-col",
|
|
5
|
+
"w-full",
|
|
6
|
+
"relative",
|
|
7
|
+
"text-zinc-500"
|
|
8
|
+
]), a = e(["my-2", "cursor-pointer"]), o = e([
|
|
9
|
+
"border",
|
|
10
|
+
"cursor-pointer",
|
|
11
|
+
"duration-250",
|
|
12
|
+
"ease-in-out",
|
|
13
|
+
"flex",
|
|
14
|
+
"items-center",
|
|
15
|
+
"justify-between",
|
|
16
|
+
"px-2",
|
|
17
|
+
"py-1",
|
|
18
|
+
"rounded",
|
|
19
|
+
"transition-all",
|
|
20
|
+
"w-full",
|
|
21
|
+
"border-gray-200"
|
|
22
|
+
]);
|
|
55
23
|
export {
|
|
56
24
|
a as labelVariants,
|
|
57
|
-
|
|
58
|
-
|
|
25
|
+
o as tagSelectVariants,
|
|
26
|
+
t as wrapperVariants
|
|
59
27
|
};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Tag as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { wrapperVariants as
|
|
5
|
-
import { useTagSelect as
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
return /* @__PURE__ */ t(
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Tag as m } from "../../../Tag/Tag.js";
|
|
3
|
+
import { cn as a } from "../../../../utils/index.js";
|
|
4
|
+
import { wrapperVariants as c } from "./Item.variants.js";
|
|
5
|
+
import { useTagSelect as i } from "../../contexts/TagSelect.hook.js";
|
|
6
|
+
const d = ({ option: e, theme: t }) => {
|
|
7
|
+
const { onSelectTag: o } = i();
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
10
9
|
"li",
|
|
11
10
|
{
|
|
12
11
|
role: "option",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
),
|
|
12
|
+
"data-theme": t,
|
|
13
|
+
className: a(c({ isSelected: e.isSelected })),
|
|
16
14
|
onClick: () => o(e),
|
|
17
|
-
children: /* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ r(m, { ...e })
|
|
18
16
|
}
|
|
19
17
|
);
|
|
20
18
|
};
|
|
21
19
|
export {
|
|
22
|
-
|
|
20
|
+
d as Item
|
|
23
21
|
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { c as e } from "../../../../index-BNmRGtA6.js";
|
|
2
|
-
const
|
|
3
|
-
[
|
|
2
|
+
const t = e(
|
|
3
|
+
[
|
|
4
|
+
"cursor-pointer",
|
|
5
|
+
"py-1.5",
|
|
6
|
+
"px-2",
|
|
7
|
+
"last:pb-2",
|
|
8
|
+
"first:pt-2",
|
|
9
|
+
"h-full",
|
|
10
|
+
"hover:bg-purple-100"
|
|
11
|
+
],
|
|
4
12
|
{
|
|
5
13
|
variants: {
|
|
6
|
-
theme: {
|
|
7
|
-
colony: "",
|
|
8
|
-
kubefirst: ["hover:bg-purple-100"],
|
|
9
|
-
civo: ""
|
|
10
|
-
},
|
|
11
14
|
isSelected: {
|
|
12
15
|
true: "",
|
|
13
16
|
false: ""
|
|
@@ -15,17 +18,15 @@ const r = e(
|
|
|
15
18
|
},
|
|
16
19
|
compoundVariants: [
|
|
17
20
|
{
|
|
18
|
-
theme: "kubefirst",
|
|
19
21
|
isSelected: !0,
|
|
20
22
|
class: ["bg-purple-100"]
|
|
21
23
|
}
|
|
22
24
|
],
|
|
23
25
|
defaultVariants: {
|
|
24
|
-
theme: "kubefirst",
|
|
25
26
|
isSelected: !1
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
);
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
t as wrapperVariants
|
|
31
32
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { Item as
|
|
4
|
-
import { wrapperVariants as
|
|
5
|
-
import { useTagSelect as
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
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" }) });
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as m } from "../../../../utils/index.js";
|
|
3
|
+
import { Item as s } from "../Item/Item.js";
|
|
4
|
+
import { wrapperVariants as a } from "./List.variants.js";
|
|
5
|
+
import { useTagSelect as i } from "../../contexts/TagSelect.hook.js";
|
|
6
|
+
const f = ({ theme: o }) => {
|
|
7
|
+
const { tags: e } = i();
|
|
8
|
+
return /* @__PURE__ */ t("ul", { role: "listbox", "data-theme": o, className: m(a()), children: e.length > 0 ? e.map((r) => /* @__PURE__ */ t(s, { option: r }, r.id)) : /* @__PURE__ */ t("span", { className: "text-center text-sm px-4 py-2", children: "There is not options available" }) });
|
|
10
9
|
};
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
f as List
|
|
13
12
|
};
|
|
@@ -1,37 +1,23 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
],
|
|
22
|
-
{
|
|
23
|
-
variants: {
|
|
24
|
-
theme: {
|
|
25
|
-
colony: "",
|
|
26
|
-
kubefirst: "",
|
|
27
|
-
civo: ""
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
defaultVariants: {
|
|
31
|
-
theme: "kubefirst"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
);
|
|
1
|
+
import { c as o } from "../../../../index-BNmRGtA6.js";
|
|
2
|
+
const a = o([
|
|
3
|
+
"absolute",
|
|
4
|
+
"bg-white",
|
|
5
|
+
"border",
|
|
6
|
+
"duration-100",
|
|
7
|
+
"flex",
|
|
8
|
+
"flex-col",
|
|
9
|
+
"mt-0.5",
|
|
10
|
+
"rounded",
|
|
11
|
+
"shadow-xs",
|
|
12
|
+
"top-full",
|
|
13
|
+
"transition-all",
|
|
14
|
+
"w-full",
|
|
15
|
+
"z-10",
|
|
16
|
+
"animate-in",
|
|
17
|
+
"fade-in-50",
|
|
18
|
+
"overflow-hidden",
|
|
19
|
+
"border-gray-200"
|
|
20
|
+
]);
|
|
35
21
|
export {
|
|
36
|
-
|
|
22
|
+
a as wrapperVariants
|
|
37
23
|
};
|
|
@@ -1,88 +1,86 @@
|
|
|
1
1
|
import "../Item/Item.js";
|
|
2
|
-
import { List as
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { Tag as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { useTagSelect as
|
|
8
|
-
import { labelVariants as
|
|
9
|
-
import { X as
|
|
10
|
-
import { C as
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
const J = C(
|
|
2
|
+
import { List as g } from "../List/List.js";
|
|
3
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef as w, useId as T, useImperativeHandle as b } from "react";
|
|
5
|
+
import { Tag as C } from "../../../Tag/Tag.js";
|
|
6
|
+
import { cn as r } from "../../../../utils/index.js";
|
|
7
|
+
import { useTagSelect as S } from "../../hooks/useTagSelect.js";
|
|
8
|
+
import { labelVariants as k, tagSelectVariants as R, wrapperVariants as I } from "../../TagSelect.variants.js";
|
|
9
|
+
import { X as O } from "../../../../x-DU-Zw-L_.js";
|
|
10
|
+
import { C as V } from "../../../../chevron-up-DgLBQCKD.js";
|
|
11
|
+
import { useTagSelect as j } from "../../contexts/TagSelect.hook.js";
|
|
12
|
+
const B = w(
|
|
14
13
|
({
|
|
15
|
-
label:
|
|
16
|
-
labelClassName:
|
|
17
|
-
name:
|
|
18
|
-
placeholder:
|
|
14
|
+
label: o,
|
|
15
|
+
labelClassName: c,
|
|
16
|
+
name: t,
|
|
17
|
+
placeholder: p = "Select a value...",
|
|
19
18
|
theme: d,
|
|
20
19
|
wrapperClassName: f
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
return
|
|
20
|
+
}, h) => {
|
|
21
|
+
const i = T(), { selectedTags: n, isOpen: s, onOpen: u, onRemoveTag: x, inputRef: l } = j(), { wrapperRef: N, handleOpen: v } = S();
|
|
22
|
+
return b(h, () => l.current, [l]), /* @__PURE__ */ m(
|
|
24
23
|
"div",
|
|
25
24
|
{
|
|
26
|
-
ref:
|
|
27
|
-
className:
|
|
28
|
-
|
|
29
|
-
theme: t,
|
|
25
|
+
ref: N,
|
|
26
|
+
className: r(
|
|
27
|
+
I({
|
|
30
28
|
className: f
|
|
31
29
|
})
|
|
32
30
|
),
|
|
31
|
+
"data-theme": d,
|
|
33
32
|
children: [
|
|
34
|
-
|
|
33
|
+
o ? /* @__PURE__ */ e(
|
|
35
34
|
"label",
|
|
36
35
|
{
|
|
37
|
-
htmlFor:
|
|
38
|
-
className:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
className: p
|
|
36
|
+
htmlFor: t ?? i,
|
|
37
|
+
className: r(
|
|
38
|
+
k({
|
|
39
|
+
className: c
|
|
42
40
|
})
|
|
43
41
|
),
|
|
44
|
-
onClick: () =>
|
|
45
|
-
children:
|
|
42
|
+
onClick: () => u(!0),
|
|
43
|
+
children: o
|
|
46
44
|
}
|
|
47
45
|
) : null,
|
|
48
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ m(
|
|
49
47
|
"div",
|
|
50
48
|
{
|
|
51
|
-
id:
|
|
52
|
-
className:
|
|
49
|
+
id: t ?? i,
|
|
50
|
+
className: r(R()),
|
|
53
51
|
role: "combobox",
|
|
54
|
-
onClick:
|
|
55
|
-
"aria-expanded":
|
|
52
|
+
onClick: v,
|
|
53
|
+
"aria-expanded": s,
|
|
56
54
|
children: [
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
n.length === 0 ? /* @__PURE__ */ e("span", { className: "text-base text-inherit select-none", children: p }) : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: n.map((a) => /* @__PURE__ */ e(
|
|
56
|
+
C,
|
|
59
57
|
{
|
|
60
|
-
...
|
|
58
|
+
...a,
|
|
61
59
|
className: "select-none",
|
|
62
|
-
rightIcon: /* @__PURE__ */ e(
|
|
63
|
-
"data-value":
|
|
60
|
+
rightIcon: /* @__PURE__ */ e(O, { className: "w-3 h-3", onClick: () => x(a) }),
|
|
61
|
+
"data-value": a.label
|
|
64
62
|
},
|
|
65
|
-
|
|
63
|
+
a.id
|
|
66
64
|
)) }),
|
|
67
65
|
/* @__PURE__ */ e(
|
|
68
|
-
|
|
66
|
+
V,
|
|
69
67
|
{
|
|
70
|
-
className:
|
|
68
|
+
className: r(
|
|
71
69
|
"w-4 h-4 text-inherit transition-all duration-50 shrink-0",
|
|
72
|
-
|
|
70
|
+
s ? "rotate-0" : "rotate-180"
|
|
73
71
|
)
|
|
74
72
|
}
|
|
75
73
|
)
|
|
76
74
|
]
|
|
77
75
|
}
|
|
78
76
|
),
|
|
79
|
-
/* @__PURE__ */ e("input", { ref:
|
|
80
|
-
|
|
77
|
+
/* @__PURE__ */ e("input", { ref: l, type: "text", name: t, className: "hidden" }),
|
|
78
|
+
s ? /* @__PURE__ */ e(g, {}) : null
|
|
81
79
|
]
|
|
82
80
|
}
|
|
83
81
|
);
|
|
84
82
|
}
|
|
85
83
|
);
|
|
86
84
|
export {
|
|
87
|
-
|
|
85
|
+
B as Wrapper
|
|
88
86
|
};
|
|
@@ -1,33 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { textAreaVariants as
|
|
5
|
-
|
|
6
|
-
const w = h(
|
|
1
|
+
import { jsxs as f, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x, useId as u } from "react";
|
|
3
|
+
import { cn as h } from "../../utils/index.js";
|
|
4
|
+
import { textAreaVariants as p } from "./TextArea.variants.js";
|
|
5
|
+
const I = x(
|
|
7
6
|
({
|
|
8
|
-
initialValue:
|
|
7
|
+
initialValue: m,
|
|
9
8
|
label: e,
|
|
10
|
-
name:
|
|
11
|
-
placeholder:
|
|
9
|
+
name: l,
|
|
10
|
+
placeholder: s,
|
|
12
11
|
rows: c = 3,
|
|
13
|
-
theme:
|
|
14
|
-
className:
|
|
12
|
+
theme: i,
|
|
13
|
+
className: n,
|
|
15
14
|
...r
|
|
16
|
-
},
|
|
17
|
-
const t = u(),
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
e ? /* @__PURE__ */ o("label", { htmlFor:
|
|
15
|
+
}, d) => {
|
|
16
|
+
const t = u(), a = l ? `${t}-name` : t;
|
|
17
|
+
return /* @__PURE__ */ f("div", { className: "flex flex-col gap-2", "data-theme": i, children: [
|
|
18
|
+
e ? /* @__PURE__ */ o("label", { htmlFor: a, className: "cursor-pointer", children: e }) : null,
|
|
20
19
|
/* @__PURE__ */ o(
|
|
21
20
|
"textarea",
|
|
22
21
|
{
|
|
23
|
-
id:
|
|
24
|
-
ref:
|
|
25
|
-
className: p(
|
|
26
|
-
v({ className: i, theme: n ?? x })
|
|
27
|
-
),
|
|
22
|
+
id: a,
|
|
23
|
+
ref: d,
|
|
24
|
+
className: h(p({ className: n })),
|
|
28
25
|
rows: c,
|
|
29
|
-
placeholder:
|
|
30
|
-
value:
|
|
26
|
+
placeholder: s,
|
|
27
|
+
value: m ?? r.value,
|
|
31
28
|
...r
|
|
32
29
|
}
|
|
33
30
|
)
|
|
@@ -35,5 +32,5 @@ const w = h(
|
|
|
35
32
|
}
|
|
36
33
|
);
|
|
37
34
|
export {
|
|
38
|
-
|
|
35
|
+
I as TextArea
|
|
39
36
|
};
|