@konstructio/ui 0.1.1-alpha.6 → 0.1.2-alpha.2

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 (30) hide show
  1. package/dist/{chevron-down-CVce9Mvh.js → chevron-down-BLZPftpV.js} +2 -2
  2. package/dist/components/Autocomplete/Autocomplete.js +46 -54
  3. package/dist/components/Autocomplete/Autocomplete.variants.js +29 -48
  4. package/dist/components/Autocomplete/components/List/List.js +37 -47
  5. package/dist/components/Autocomplete/components/List/List.variants.js +34 -69
  6. package/dist/components/Badge/Badge.js +2 -2
  7. package/dist/components/Button/Button.variants.js +110 -134
  8. package/dist/components/Checkbox/Checkbox.variants.js +5 -5
  9. package/dist/components/Datepicker/DatePicker.js +754 -705
  10. package/dist/components/Dropdown/Dropdown.variants.js +8 -8
  11. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  12. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  13. package/dist/components/Filter/components/ResetButton/ResetButton.js +16 -11
  14. package/dist/components/Input/Input.js +47 -47
  15. package/dist/components/Input/Input.variants.js +10 -10
  16. package/dist/components/Loading/Loading.js +2 -2
  17. package/dist/components/Loading/Loading.variants.js +4 -4
  18. package/dist/components/Radio/Radio.variants.js +4 -4
  19. package/dist/components/Switch/Switch.js +90 -86
  20. package/dist/components/Switch/Switch.variants.js +16 -12
  21. package/dist/components/Tabs/Tabs.variants.js +2 -2
  22. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
  23. package/dist/{createLucideIcon-BpsAkT97.js → createLucideIcon-DbC6TvM5.js} +4 -4
  24. package/dist/index.d.ts +4 -5
  25. package/dist/package.json +17 -17
  26. package/dist/styles.css +1 -1
  27. package/dist/ui/civo-theme.css +204 -189
  28. package/dist/ui/kubefirst-theme.css +3 -1
  29. package/dist/ui/theme.css +2 -2
  30. package/package.json +17 -17
@@ -1,6 +1,6 @@
1
- import { c as o } from "./createLucideIcon-BpsAkT97.js";
1
+ import { c as o } from "./createLucideIcon-DbC6TvM5.js";
2
2
  /**
3
- * @license lucide-react v0.542.0 - ISC
3
+ * @license lucide-react v0.544.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
@@ -1,83 +1,75 @@
1
- import { jsxs as v, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as C, useRef as i, useId as R, useImperativeHandle as A } from "react";
3
- import { cn as p } from "../../utils/index.js";
4
- import { labelVariants as O, autocompleteVariants as V } from "./Autocomplete.variants.js";
5
- import { useAutocomplete as g } from "./hooks/useAutocomplete.js";
6
- import { List as j } from "./components/List/List.js";
7
- const y = C(
1
+ import { jsxs as N, jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as b, useRef as i, useId as C, useImperativeHandle as R } from "react";
3
+ import { cn as m } from "../../utils/index.js";
4
+ import { labelVariants as A, autocompleteVariants as O } from "./Autocomplete.variants.js";
5
+ import { useAutocomplete as V } from "./hooks/useAutocomplete.js";
6
+ import { List as g } from "./components/List/List.js";
7
+ const j = b(
8
8
  ({
9
- autoComplete: c = "off",
10
- className: a,
11
- label: n,
12
- labelClassName: d,
13
- name: t,
14
- options: u,
15
- placeholder: f,
16
- placeHolderEmptyValues: h = "No values...",
17
- placeHolderEmptyValuesClassName: w,
18
- theme: x,
19
- variant: r,
20
- onChange: N
21
- }, b) => {
22
- const s = i(null), o = i(null), m = R();
23
- A(b, () => o.current, [o]);
24
- const e = g({
25
- options: u,
9
+ autoComplete: d = "off",
10
+ className: s,
11
+ label: t,
12
+ labelClassName: p,
13
+ name: r,
14
+ options: c,
15
+ placeholder: u,
16
+ placeHolderEmptyValues: f = "No values...",
17
+ placeHolderEmptyValuesClassName: h,
18
+ theme: v,
19
+ onChange: w
20
+ }, x) => {
21
+ const a = i(null), o = i(null), n = C();
22
+ R(x, () => o.current, [o]);
23
+ const e = V({
24
+ options: c,
26
25
  inputRef: o,
27
- wrapperRef: s,
28
- onChange: N
26
+ wrapperRef: a,
27
+ onChange: w
29
28
  });
30
- return /* @__PURE__ */ v(
29
+ return /* @__PURE__ */ N(
31
30
  "div",
32
31
  {
33
- ref: s,
32
+ ref: a,
34
33
  className: "relative flex flex-col",
35
- "data-theme": x,
34
+ "data-theme": v,
36
35
  children: [
37
- n ? /* @__PURE__ */ l(
36
+ t ? /* @__PURE__ */ l(
38
37
  "label",
39
38
  {
40
- htmlFor: t ?? m,
41
- className: p(
42
- O({
43
- variant: r,
44
- className: d
39
+ htmlFor: r ?? n,
40
+ className: m(
41
+ A({
42
+ className: p
45
43
  })
46
44
  ),
47
- children: n
45
+ children: t
48
46
  }
49
47
  ) : null,
50
48
  /* @__PURE__ */ l(
51
49
  "input",
52
50
  {
53
51
  ref: o,
54
- id: t ?? m,
52
+ id: t ? r ?? n : void 0,
55
53
  type: "text",
56
- name: t,
54
+ name: r,
57
55
  role: "combobox",
58
- autoComplete: c,
59
- className: p(
60
- V({
61
- variant: r,
62
- className: a
63
- })
64
- ),
56
+ autoComplete: d,
57
+ className: m(O({ className: s })),
65
58
  onChange: e.handleChange,
66
59
  value: e.value,
67
- placeholder: f,
60
+ placeholder: u,
68
61
  "aria-expanded": e.showOptions ? "true" : "false"
69
62
  }
70
63
  ),
71
64
  e.showOptions && /* @__PURE__ */ l("div", { className: "absolute z-10 top-full w-full rounded-md mt-1 border shadow-sm border-zinc-200 overflow-hidden", children: /* @__PURE__ */ l(
72
- j,
65
+ g,
73
66
  {
74
- className: a,
67
+ className: s,
75
68
  inputRef: o,
76
- wrapperRef: s,
69
+ wrapperRef: a,
77
70
  options: e.newOptions,
78
- placeholder: h,
79
- placeholderClassName: w,
80
- variant: r,
71
+ placeholder: f,
72
+ placeholderClassName: h,
81
73
  onClick: e.handleSelectValue
82
74
  }
83
75
  ) })
@@ -86,7 +78,7 @@ const y = C(
86
78
  );
87
79
  }
88
80
  );
89
- y.displayName = "Autocomplete";
81
+ j.displayName = "Autocomplete";
90
82
  export {
91
- y as Autocomplete
83
+ j as Autocomplete
92
84
  };
@@ -1,50 +1,31 @@
1
- import { c as a } from "../../index-D29mdTf5.js";
2
- const t = a(
3
- [
4
- "flex",
5
- "w-full",
6
- "rounded-md",
7
- "border",
8
- "border-zinc-200",
9
- "bg-transparent",
10
- "text-zinc-700",
11
- "transition-colors",
12
- "placeholder:text-muted-foreground",
13
- "focus-visible:outline-none",
14
- "focus-visible:ring-1",
15
- "focus-visible:ring-ring",
16
- "disabled:cursor-not-allowed",
17
- "disabled:opacity-50",
18
- "shadow-2xs",
19
- "py-1",
20
- "px-2",
21
- "focus:ring-kubefirst-primary",
22
- "civo:focus:focus:ring-blue-400"
23
- ],
24
- {
25
- variants: {
26
- variant: {
27
- default: ""
28
- }
29
- },
30
- defaultVariants: {
31
- variant: "default"
32
- }
33
- }
34
- ), e = a(
35
- ["pl-1", "mb-2", "text-base", "cursor-pointer"],
36
- {
37
- variants: {
38
- variant: {
39
- default: ""
40
- }
41
- },
42
- defaultVariants: {
43
- variant: "default"
44
- }
45
- }
46
- );
1
+ import { c as r } from "../../index-D29mdTf5.js";
2
+ const e = r([
3
+ "flex",
4
+ "w-full",
5
+ "rounded-md",
6
+ "border",
7
+ "border-zinc-200",
8
+ "bg-transparent",
9
+ "text-zinc-700",
10
+ "transition-colors",
11
+ "placeholder:text-muted-foreground",
12
+ "focus-visible:outline-none",
13
+ "focus-visible:ring-1",
14
+ "focus-visible:ring-ring",
15
+ "disabled:cursor-not-allowed",
16
+ "disabled:opacity-50",
17
+ "shadow-2xs",
18
+ "py-1",
19
+ "px-2",
20
+ "focus:ring-aurora-500",
21
+ "kubefirst:focus:ring-kubefirst-primary"
22
+ ]), i = r([
23
+ "pl-1",
24
+ "mb-2",
25
+ "text-base",
26
+ "cursor-pointer"
27
+ ]);
47
28
  export {
48
- t as autocompleteVariants,
49
- e as labelVariants
29
+ e as autocompleteVariants,
30
+ i as labelVariants
50
31
  };
@@ -1,58 +1,48 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useRef as p } from "react";
3
- import { cn as s } from "../../../../utils/index.js";
4
- import { emptyListVariants as u, buttonVariants as b, listItemVariants as N, listVariants as d } from "./List.variants.js";
5
- import { useNavigationUlList as h } from "../../hooks/useNavigationList.js";
6
- const I = ({
7
- className: i,
8
- inputRef: n,
9
- options: e,
10
- placeholder: m,
11
- placeholderClassName: a,
12
- variant: t,
13
- wrapperRef: c,
14
- onClick: f
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useRef as f } from "react";
3
+ import { cn as r } from "../../../../utils/index.js";
4
+ import { emptyListVariants as p, buttonVariants as u, listItemVariants as b, listVariants as N } from "./List.variants.js";
5
+ import { useNavigationUlList as d } from "../../hooks/useNavigationList.js";
6
+ const y = ({
7
+ className: n,
8
+ inputRef: a,
9
+ options: s,
10
+ placeholder: l,
11
+ placeholderClassName: o,
12
+ wrapperRef: m,
13
+ onClick: c
15
14
  }) => {
16
- const o = p(null);
17
- return h({ ulRef: o, inputRef: n, wrapperRef: c, options: e }), e.length === 0 ? /* @__PURE__ */ r(
15
+ const i = f(null);
16
+ return d({ ulRef: i, inputRef: a, wrapperRef: m, options: s }), s.length === 0 ? /* @__PURE__ */ t(
18
17
  "span",
19
18
  {
20
- className: s(
21
- u({
22
- variant: t,
23
- className: a
19
+ className: r(
20
+ p({
21
+ className: o
24
22
  })
25
23
  ),
26
- children: m
24
+ children: l
27
25
  }
28
- ) : /* @__PURE__ */ r(
29
- "ul",
26
+ ) : /* @__PURE__ */ t("ul", { ref: i, role: "listbox", className: r(N({ className: n })), children: s.map(({ value: e }) => /* @__PURE__ */ t(
27
+ "li",
30
28
  {
31
- ref: o,
32
- role: "listbox",
33
- className: s(d({ variant: t, className: i })),
34
- children: e.map(({ value: l }) => /* @__PURE__ */ r(
35
- "li",
29
+ role: "option",
30
+ tabIndex: 0,
31
+ className: r(b()),
32
+ children: /* @__PURE__ */ t(
33
+ "button",
36
34
  {
37
- role: "option",
38
- tabIndex: 0,
39
- className: s(N({ variant: t })),
40
- children: /* @__PURE__ */ r(
41
- "button",
42
- {
43
- type: "button",
44
- role: "button",
45
- className: s(b({ variant: t })),
46
- onClick: () => f(l),
47
- children: l
48
- }
49
- )
50
- },
51
- l
52
- ))
53
- }
54
- );
35
+ type: "button",
36
+ role: "button",
37
+ className: r(u()),
38
+ onClick: () => c(e),
39
+ children: e
40
+ }
41
+ )
42
+ },
43
+ e
44
+ )) });
55
45
  };
56
46
  export {
57
- I as List
47
+ y as List
58
48
  };
@@ -1,71 +1,36 @@
1
- import { c as t } from "../../../../index-D29mdTf5.js";
2
- const e = t(["max-h-[250px]", "overflow-y-auto"], {
3
- variants: {
4
- variant: {
5
- default: "bg-white"
6
- }
7
- },
8
- defaultVariants: {
9
- variant: "default"
10
- }
11
- }), r = t(
12
- ["p-1", "text-center", "w-full", "block", "bg-white"],
13
- {
14
- variants: {
15
- variant: {
16
- default: ""
17
- }
18
- },
19
- defaultVariants: {
20
- variant: "default"
21
- }
22
- }
23
- ), i = t(
24
- [
25
- "focus-visible:outline-none",
26
- "focus:bg-purple-100",
27
- "hover:bg-purple-100",
28
- "border-transparent",
29
- "civo:focus:bg-blue-100",
30
- "civo:hover:bg-blue-100"
31
- ],
32
- {
33
- variants: {
34
- variant: {
35
- default: ""
36
- }
37
- },
38
- defaultVariants: {
39
- variant: "default"
40
- }
41
- }
42
- ), n = t(
43
- [
44
- "cursor-pointer",
45
- "focus-visible:outline-none",
46
- "px-3",
47
- "py-1.5",
48
- "w-full",
49
- "text-left",
50
- "focus:bg-purple-100",
51
- "hover:bg-purple-100",
52
- "civo:focus:bg-blue-100",
53
- "civo:hover:bg-blue-100"
54
- ],
55
- {
56
- variants: {
57
- variant: {
58
- default: ""
59
- }
60
- },
61
- defaultVariants: {
62
- variant: "default"
63
- }
64
- }
65
- );
1
+ import { c as r } from "../../../../index-D29mdTf5.js";
2
+ const o = r([
3
+ "max-h-[250px]",
4
+ "overflow-y-auto",
5
+ "bg-white"
6
+ ]), e = r([
7
+ "p-1",
8
+ "text-center",
9
+ "w-full",
10
+ "block",
11
+ "bg-white"
12
+ ]), s = r([
13
+ "focus-visible:outline-none",
14
+ "kubefirst:focus:bg-purple-100",
15
+ "kubefirst:hover:bg-purple-100",
16
+ "border-transparent",
17
+ "focus:bg-aurora-50",
18
+ "hover:bg-aurora-50"
19
+ ]), u = r([
20
+ "cursor-pointer",
21
+ "focus-visible:outline-none",
22
+ "px-3",
23
+ "py-1.5",
24
+ "w-full",
25
+ "text-left",
26
+ "focus:bg-aurora-50",
27
+ "hover:bg-aurora-50",
28
+ "kubefirst:focus:bg-purple-100",
29
+ "kubefirst:hover:bg-purple-100"
30
+ ]);
66
31
  export {
67
- n as buttonVariants,
68
- r as emptyListVariants,
69
- i as listItemVariants,
70
- e as listVariants
32
+ u as buttonVariants,
33
+ e as emptyListVariants,
34
+ s as listItemVariants,
35
+ o as listVariants
71
36
  };
@@ -2,9 +2,9 @@ import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
2
  import { useRef as f, useState as h, useCallback as g, useEffect as v } from "react";
3
3
  import { cn as c } from "../../utils/index.js";
4
4
  import { buttonDismissVariants as w, badgeVariants as x } from "./Badge.variants.js";
5
- import { c as y } from "../../createLucideIcon-BpsAkT97.js";
5
+ import { c as y } from "../../createLucideIcon-DbC6TvM5.js";
6
6
  /**
7
- * @license lucide-react v0.542.0 - ISC
7
+ * @license lucide-react v0.544.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.