@konstructio/ui 0.0.12-alpha.2 → 0.0.12-alpha.3
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-DZUwNzSW.js → Modal-ByNiP7eb.js} +3 -3
- package/dist/components/Alert/Alert.js +1 -1
- 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/Checkbox/Checkbox.js +1 -1
- 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/Loading/Loading.js +102 -21
- package/dist/components/Loading/Loading.variants.js +13 -14
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- 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/Toast/Toast.js +3 -3
- package/dist/components/Typography/Typography.js +23 -22
- package/dist/components/Typography/Typography.variants.js +49 -22
- package/dist/components/index.js +1 -1
- package/dist/{index-C6WtlN_F.js → index-BzaHYXkt.js} +1 -1
- package/dist/{index-Z1voPZOH.js → index-CbTU3cnP.js} +1 -1
- 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-B33at13_.js → index-D_76wh4w.js} +1 -1
- package/dist/index-DyKo5ZJT.js +446 -0
- package/dist/index.d.ts +15 -5
- package/dist/index.js +1 -1
- package/dist/package.json +17 -13
- package/dist/styles.css +1 -1
- package/package.json +16 -13
- package/dist/index-3jTPaVvh.js +0 -551
- package/dist/index-BTeAm7mx.js +0 -19133
|
@@ -1,39 +1,34 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
const
|
|
1
|
+
import { useRef as c, useEffect as u, useCallback as i } from "react";
|
|
2
|
+
import { useTagSelect as d } from "../contexts/TagSelect.hook.js";
|
|
3
|
+
const g = () => {
|
|
4
|
+
const a = c(null), { onOpen: e } = d();
|
|
5
|
+
u(() => {
|
|
6
|
+
const t = new AbortController(), n = (s) => {
|
|
7
7
|
s.key === "Escape" && e(!1);
|
|
8
|
-
},
|
|
9
|
-
var
|
|
10
|
-
(
|
|
8
|
+
}, o = (s) => {
|
|
9
|
+
var r;
|
|
10
|
+
(r = a.current) != null && r.contains(s.target) || e(!1);
|
|
11
11
|
};
|
|
12
|
-
return document.addEventListener("keydown",
|
|
13
|
-
signal:
|
|
14
|
-
}), document.addEventListener("mousedown",
|
|
15
|
-
signal:
|
|
12
|
+
return document.addEventListener("keydown", n, {
|
|
13
|
+
signal: t.signal
|
|
14
|
+
}), document.addEventListener("mousedown", o, {
|
|
15
|
+
signal: t.signal
|
|
16
16
|
}), () => {
|
|
17
|
-
|
|
17
|
+
t.abort();
|
|
18
18
|
};
|
|
19
|
-
}, [e,
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
d(n), e(!1), i(n.label);
|
|
19
|
+
}, [e, a]);
|
|
20
|
+
const l = i(
|
|
21
|
+
(t) => {
|
|
22
|
+
const n = t.target;
|
|
23
|
+
(n == null ? void 0 : n.closest("[data-value]")) || e(!0);
|
|
25
24
|
},
|
|
26
25
|
[e]
|
|
27
26
|
);
|
|
28
27
|
return {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
value: u,
|
|
32
|
-
wrapperRef: t,
|
|
33
|
-
handleClickTag: g,
|
|
34
|
-
handleOpenDropdown: f
|
|
28
|
+
wrapperRef: a,
|
|
29
|
+
handleOpen: l
|
|
35
30
|
};
|
|
36
31
|
};
|
|
37
32
|
export {
|
|
38
|
-
|
|
33
|
+
g as useTagSelect
|
|
39
34
|
};
|
|
@@ -2,12 +2,12 @@ import { jsx as c, jsxs as D, Fragment as se } from "react/jsx-runtime";
|
|
|
2
2
|
import { u as ae, S as j } from "../../index-B_6_jmOO.js";
|
|
3
3
|
import * as s from "react";
|
|
4
4
|
import { useState as Re, useRef as be, useEffect as ge, useMemo as oe, isValidElement as re, useCallback as Se } from "react";
|
|
5
|
-
import { P as L, r as Ie, d as Ne } from "../../index-
|
|
5
|
+
import { P as L, r as Ie, d as Ne } from "../../index-D7QNmo_D.js";
|
|
6
6
|
import { c as Ae, a as Fe, b, d as X, u as _e } from "../../index-Cva-e5M4.js";
|
|
7
7
|
import { c as De } from "../../index-BbsJ0VIJ.js";
|
|
8
|
-
import { B as Le, R as Oe, P as Me } from "../../index-
|
|
8
|
+
import { B as Le, R as Oe, P as Me } from "../../index-D_76wh4w.js";
|
|
9
9
|
import { P as ke } from "../../index-Dj1pom3_.js";
|
|
10
|
-
import { V as ie, R as Ve } from "../../index-
|
|
10
|
+
import { V as ie, R as Ve } from "../../index-CbTU3cnP.js";
|
|
11
11
|
import { cn as q } from "../../utils/index.js";
|
|
12
12
|
import { closeToastVariants as Ke, toastVariants as He, viewportToastVariants as We } from "./Toast.variants.js";
|
|
13
13
|
import { X as Xe } from "../../x-DU-Zw-L_.js";
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { typographyVariants as
|
|
4
|
-
import { useTheme as
|
|
5
|
-
const
|
|
6
|
-
className:
|
|
7
|
-
theme:
|
|
8
|
-
children:
|
|
9
|
-
variant:
|
|
10
|
-
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useId as d } from "react";
|
|
3
|
+
import { typographyVariants as f } from "./Typography.variants.js";
|
|
4
|
+
import { useTheme as n } from "../../contexts/theme.hook.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
className: e,
|
|
7
|
+
theme: m,
|
|
8
|
+
children: p,
|
|
9
|
+
variant: o,
|
|
10
|
+
component: s,
|
|
11
|
+
...t
|
|
11
12
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
13
|
+
const r = d(), { theme: h } = n(), y = s ?? (o != null && o.includes("h") ? o : "p");
|
|
14
|
+
return /* @__PURE__ */ c(
|
|
15
|
+
y,
|
|
15
16
|
{
|
|
16
|
-
id:
|
|
17
|
-
className:
|
|
18
|
-
className:
|
|
19
|
-
theme:
|
|
20
|
-
variant:
|
|
17
|
+
id: r,
|
|
18
|
+
className: f({
|
|
19
|
+
className: e,
|
|
20
|
+
theme: m ?? h,
|
|
21
|
+
variant: o
|
|
21
22
|
}),
|
|
22
|
-
...
|
|
23
|
-
children:
|
|
23
|
+
...t,
|
|
24
|
+
children: p
|
|
24
25
|
}
|
|
25
26
|
);
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
u.displayName = "Typography";
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
u as Typography
|
|
30
31
|
};
|
|
@@ -1,29 +1,56 @@
|
|
|
1
1
|
import { c as t } from "../../index-BNmRGtA6.js";
|
|
2
|
-
const
|
|
2
|
+
const e = t(["font-normal", "text-zinc-700"], {
|
|
3
3
|
variants: {
|
|
4
4
|
variant: {
|
|
5
|
-
h1: "text-[57px]
|
|
6
|
-
h2: "text-[45px]
|
|
7
|
-
h3: "text-[36px]
|
|
8
|
-
h4: "text-[32px]
|
|
9
|
-
h5: "text-[28px]
|
|
10
|
-
h6: "text-[24px] font-medium leading-[32px] tracking-[0.15px]",
|
|
11
|
-
subtitle1: "text-[22px]
|
|
12
|
-
subtitle2:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
h1: ["text-[57px]", "leading-[64px]"],
|
|
6
|
+
h2: ["text-[45px]", "leading-[52px]"],
|
|
7
|
+
h3: ["text-[36px]", "leading-[44px]"],
|
|
8
|
+
h4: ["text-[32px]", "leading-[40px]"],
|
|
9
|
+
h5: ["text-[28px]", "leading-[36px]"],
|
|
10
|
+
h6: ["text-[24px]", "font-medium", "leading-[32px]", "tracking-[0.15px]"],
|
|
11
|
+
subtitle1: ["text-[22px]", "leading-[28px]"],
|
|
12
|
+
subtitle2: [
|
|
13
|
+
"text-[16px]",
|
|
14
|
+
"font-medium",
|
|
15
|
+
"leading-[24px]",
|
|
16
|
+
"tracking-[0.15px]"
|
|
17
|
+
],
|
|
18
|
+
subtitle3: [
|
|
19
|
+
"text-[14px]",
|
|
20
|
+
"font-medium",
|
|
21
|
+
"leading-[20px]",
|
|
22
|
+
"tracking-[0.1px]"
|
|
23
|
+
],
|
|
24
|
+
labelLarge: ["text-[14px]", "leading-[20px]", "tracking-[0.1px]"],
|
|
25
|
+
labelMedium: [
|
|
26
|
+
"text-[12px]",
|
|
27
|
+
"font-medium",
|
|
28
|
+
"leading-[16px]",
|
|
29
|
+
"tracking-[0.5px]",
|
|
30
|
+
"uppercase"
|
|
31
|
+
],
|
|
32
|
+
labelSmall: [
|
|
33
|
+
"text-[11px]",
|
|
34
|
+
"font-medium",
|
|
35
|
+
"leading-[16px]",
|
|
36
|
+
"tracking-[0.5px]",
|
|
37
|
+
"uppercase"
|
|
38
|
+
],
|
|
39
|
+
buttonSmall: [
|
|
40
|
+
"text-[14px]",
|
|
41
|
+
"font-semibold",
|
|
42
|
+
"leading-[20px]",
|
|
43
|
+
"tracking-[0.25px]"
|
|
44
|
+
],
|
|
45
|
+
body1: ["text-[16px]", "leading-[24px]", "tracking-[0.5px]"],
|
|
46
|
+
body2: ["text-[14px]", "leading-[20px]", "tracking-[0.25px]"],
|
|
47
|
+
body3: ["text-[12px]", "leading-[16px]", "tracking-[0.4px]"],
|
|
48
|
+
tooltip: ["text-[14px]", "leading-[22px]"]
|
|
22
49
|
},
|
|
23
50
|
theme: {
|
|
24
|
-
kubefirst: "
|
|
25
|
-
colony: "
|
|
26
|
-
civo: "
|
|
51
|
+
kubefirst: "",
|
|
52
|
+
colony: "",
|
|
53
|
+
civo: ""
|
|
27
54
|
}
|
|
28
55
|
},
|
|
29
56
|
defaultVariants: {
|
|
@@ -32,5 +59,5 @@ const x = t([""], {
|
|
|
32
59
|
}
|
|
33
60
|
});
|
|
34
61
|
export {
|
|
35
|
-
|
|
62
|
+
e as typographyVariants
|
|
36
63
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Card as n } from "./Card/Card.js";
|
|
|
7
7
|
import { Checkbox as l } from "./Checkbox/Checkbox.js";
|
|
8
8
|
import { Dropdown as c } from "./Dropdown/Dropdown.js";
|
|
9
9
|
import { Input as N } from "./Input/Input.js";
|
|
10
|
-
import { M as S } from "../Modal-
|
|
10
|
+
import { M as S } from "../Modal-ByNiP7eb.js";
|
|
11
11
|
import { NumberInput as s } from "./NumberInput/NumberInput.js";
|
|
12
12
|
import { ProgressBar as C } from "./ProgressBar/ProgressBar.js";
|
|
13
13
|
import { Radio as B } from "./Radio/Radio.js";
|
|
@@ -2,7 +2,7 @@ import * as d from "react";
|
|
|
2
2
|
import { a as ae, c as ce, b as _ } from "./index-Cva-e5M4.js";
|
|
3
3
|
import { u as K } from "./index-B_6_jmOO.js";
|
|
4
4
|
import { a as le, u as de } from "./index-4ecjw_Aj.js";
|
|
5
|
-
import { P as T } from "./index-
|
|
5
|
+
import { P as T } from "./index-D7QNmo_D.js";
|
|
6
6
|
import { c as ue } from "./index-BbsJ0VIJ.js";
|
|
7
7
|
import { jsx as g, jsxs as fe } from "react/jsx-runtime";
|
|
8
8
|
function $(e, [t, n]) {
|