@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.
Files changed (64) hide show
  1. package/dist/{Modal-DZUwNzSW.js → Modal-ByNiP7eb.js} +3 -3
  2. package/dist/components/Alert/Alert.js +1 -1
  3. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  4. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  5. package/dist/components/AlertDialog/components/index.js +1 -1
  6. package/dist/components/Checkbox/Checkbox.js +1 -1
  7. package/dist/components/Command/Command.js +32 -0
  8. package/dist/components/Command/Command.variants.js +97 -0
  9. package/dist/components/Command/components/Command.js +8 -0
  10. package/dist/components/Command/components/CommandEmpty.js +15 -0
  11. package/dist/components/Command/components/CommandGroup.js +19 -0
  12. package/dist/components/Command/components/CommandInput.js +84 -0
  13. package/dist/components/Command/components/CommandItem.js +29 -0
  14. package/dist/components/Command/components/CommandList.js +16 -0
  15. package/dist/components/Command/components/CommandSeparator.js +16 -0
  16. package/dist/components/Command/components/CommandShortcut.js +19 -0
  17. package/dist/components/Command/components/DialogContent.js +31 -0
  18. package/dist/components/Command/components/DialogOverlay.js +19 -0
  19. package/dist/components/Command/components/index.js +20 -0
  20. package/dist/components/Command/contexts/Command.context.js +13 -0
  21. package/dist/components/Command/contexts/Command.provider.js +24 -0
  22. package/dist/components/Command/contexts/index.js +6 -0
  23. package/dist/components/Loading/Loading.js +102 -21
  24. package/dist/components/Loading/Loading.variants.js +13 -14
  25. package/dist/components/Modal/Modal.js +2 -2
  26. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
  27. package/dist/components/Modal/components/index.js +1 -1
  28. package/dist/components/NumberInput/NumberInput.js +1 -1
  29. package/dist/components/Range/Range.js +1 -1
  30. package/dist/components/Slider/Slider.js +1 -1
  31. package/dist/components/Switch/Switch.js +1 -1
  32. package/dist/components/Tag/Tag.js +17 -5
  33. package/dist/components/Tag/Tag.variants.js +11 -1
  34. package/dist/components/TagSelect/TagSelect.js +6 -71
  35. package/dist/components/TagSelect/TagSelect.variants.js +29 -50
  36. package/dist/components/TagSelect/components/Item/Item.js +23 -0
  37. package/dist/components/TagSelect/components/Item/Item.variants.js +31 -0
  38. package/dist/components/TagSelect/components/List/List.js +13 -0
  39. package/dist/components/TagSelect/components/List/List.variants.js +37 -0
  40. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +88 -0
  41. package/dist/components/TagSelect/components/index.js +8 -0
  42. package/dist/components/TagSelect/contexts/TagSelect.context.js +19 -0
  43. package/dist/components/TagSelect/contexts/TagSelect.hook.js +11 -0
  44. package/dist/components/TagSelect/contexts/TagSelect.provider.js +69 -0
  45. package/dist/components/TagSelect/contexts/index.js +6 -0
  46. package/dist/components/TagSelect/hooks/useTagSelect.js +22 -27
  47. package/dist/components/Toast/Toast.js +3 -3
  48. package/dist/components/Typography/Typography.js +23 -22
  49. package/dist/components/Typography/Typography.variants.js +49 -22
  50. package/dist/components/index.js +1 -1
  51. package/dist/{index-C6WtlN_F.js → index-BzaHYXkt.js} +1 -1
  52. package/dist/{index-Z1voPZOH.js → index-CbTU3cnP.js} +1 -1
  53. package/dist/index-CzSBQN5S.js +432 -0
  54. package/dist/index-D7QNmo_D.js +422 -0
  55. package/dist/index-DUA6Y_AE.js +126 -0
  56. package/dist/{index-B33at13_.js → index-D_76wh4w.js} +1 -1
  57. package/dist/index-DyKo5ZJT.js +446 -0
  58. package/dist/index.d.ts +15 -5
  59. package/dist/index.js +1 -1
  60. package/dist/package.json +17 -13
  61. package/dist/styles.css +1 -1
  62. package/package.json +16 -13
  63. package/dist/index-3jTPaVvh.js +0 -551
  64. package/dist/index-BTeAm7mx.js +0 -19133
@@ -1,39 +1,34 @@
1
- import { useRef as b, useState as o, useEffect as k, useCallback as a } from "react";
2
- import { useToggle as w } from "../../../hooks/useToggle.js";
3
- const C = () => {
4
- const t = b(null), [r, e] = w(!1), [c, d] = o(null), [u, i] = o("");
5
- k(() => {
6
- const n = new AbortController(), p = (s) => {
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
- }, m = (s) => {
9
- var l;
10
- (l = t.current) != null && l.contains(s.target) || e(!1);
8
+ }, o = (s) => {
9
+ var r;
10
+ (r = a.current) != null && r.contains(s.target) || e(!1);
11
11
  };
12
- return document.addEventListener("keydown", p, {
13
- signal: n.signal
14
- }), document.addEventListener("mousedown", m, {
15
- signal: n.signal
12
+ return document.addEventListener("keydown", n, {
13
+ signal: t.signal
14
+ }), document.addEventListener("mousedown", o, {
15
+ signal: t.signal
16
16
  }), () => {
17
- n.abort();
17
+ t.abort();
18
18
  };
19
- }, [e, t]);
20
- const f = a(() => {
21
- e();
22
- }, [e]), g = a(
23
- (n) => {
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
- isOpen: r,
30
- selectedTag: c,
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
- C as useTagSelect
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-BTeAm7mx.js";
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-B33at13_.js";
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-Z1voPZOH.js";
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 a } from "react/jsx-runtime";
2
- import { useId as h } from "react";
3
- import { typographyVariants as i } from "./Typography.variants.js";
4
- import { useTheme as y } from "../../contexts/theme.hook.js";
5
- const n = ({
6
- className: o,
7
- theme: t,
8
- children: e,
9
- variant: r,
10
- ...m
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 p = h(), { theme: s } = y();
13
- return /* @__PURE__ */ a(
14
- "p",
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: p,
17
- className: i({
18
- className: o,
19
- theme: t ?? s,
20
- variant: r
17
+ id: r,
18
+ className: f({
19
+ className: e,
20
+ theme: m ?? h,
21
+ variant: o
21
22
  }),
22
- ...m,
23
- children: e
23
+ ...t,
24
+ children: p
24
25
  }
25
26
  );
26
27
  };
27
- n.displayName = "Typography";
28
+ u.displayName = "Typography";
28
29
  export {
29
- n as Typography
30
+ u as Typography
30
31
  };
@@ -1,29 +1,56 @@
1
1
  import { c as t } from "../../index-BNmRGtA6.js";
2
- const x = t([""], {
2
+ const e = t(["font-normal", "text-zinc-700"], {
3
3
  variants: {
4
4
  variant: {
5
- h1: "text-[57px] font-normal leading-[64px]",
6
- h2: "text-[45px] font-normal leading-[52px]",
7
- h3: "text-[36px] font-normal leading-[44px]",
8
- h4: "text-[32px] font-normal leading-[40px]",
9
- h5: "text-[28px] font-normal leading-[36px]",
10
- h6: "text-[24px] font-medium leading-[32px] tracking-[0.15px]",
11
- subtitle1: "text-[22px] font-normal leading-[28px]",
12
- subtitle2: "text-[16px] font-medium leading-[24px] tracking-[0.15px]",
13
- subtitle3: "text-[14px] font-medium leading-[20px] tracking-[0.1px]",
14
- labelLarge: "text-[14px] font-normal leading-[20px] tracking-[0.1px]",
15
- labelMedium: "text-[12px] font-medium leading-[16px] tracking-[0.5px] uppercase",
16
- labelSmall: "text-[11px] font-medium leading-[16px] tracking-[0.5px] uppercase",
17
- buttonSmall: "text-[14px] font-semibold leading-[20px] tracking-[0.25px]",
18
- body1: "text-[16px] font-normal leading-[24px] tracking-[0.5px]",
19
- body2: "text-[14px] font-normal leading-[20px] tracking-[0.25px]",
20
- body3: "text-[12px] font-normal leading-[16px] tracking-[0.4px]",
21
- tooltip: "text-[14px] font-normal leading-[22px]"
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: "text-zinc-700",
25
- colony: "text-zinc-700",
26
- civo: "text-zinc-700"
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
- x as typographyVariants
62
+ e as typographyVariants
36
63
  };
@@ -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-DZUwNzSW.js";
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-BTeAm7mx.js";
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]) {
@@ -1,5 +1,5 @@
1
1
  import * as e from "react";
2
- import { P as o } from "./index-BTeAm7mx.js";
2
+ import { P as o } from "./index-D7QNmo_D.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  var d = "VisuallyHidden", a = e.forwardRef(
5
5
  (r, i) => /* @__PURE__ */ t(