@konstructio/ui 0.0.2 → 0.0.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 (117) hide show
  1. package/dist/{AlertDialogTrigger-BIbxXexQ.js → AlertDialogTrigger-lenvKoGF.js} +4 -4
  2. package/dist/Modal-Bg9UG35z.js +909 -0
  3. package/dist/{chevron-up-Cmu1oXfj.js → chevron-up-CvquEaNg.js} +1 -1
  4. package/dist/clsx-OuTLNxxd.js +16 -0
  5. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  6. package/dist/components/AlertDialog/AlertDialog.variants.d.ts +1 -1
  7. package/dist/components/AlertDialog/AlertDialog.variants.js +4 -5
  8. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  9. package/dist/components/AlertDialog/components/index.js +1 -1
  10. package/dist/components/Autocomplete/Autocomplete.variants.d.ts +2 -2
  11. package/dist/components/Autocomplete/Autocomplete.variants.js +8 -8
  12. package/dist/components/Autocomplete/components/List.types.d.ts +3 -3
  13. package/dist/components/Autocomplete/components/List.variants.d.ts +4 -4
  14. package/dist/components/Autocomplete/components/List.variants.js +13 -13
  15. package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +4 -4
  16. package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +4 -4
  17. package/dist/components/Breadcrumb/Breadcrumb.js +57 -412
  18. package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +3 -3
  19. package/dist/components/Breadcrumb/Breadcrumb.variants.js +12 -12
  20. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  21. package/dist/components/Button/Button.js +23 -21
  22. package/dist/components/Button/Button.variants.d.ts +2 -1
  23. package/dist/components/Button/Button.variants.js +122 -23
  24. package/dist/components/Checkbox/Checkbox.js +4 -4
  25. package/dist/components/Checkbox/Checkbox.variants.d.ts +2 -2
  26. package/dist/components/Checkbox/Checkbox.variants.js +7 -16
  27. package/dist/components/Dropdown/Dropdown.js +5 -5
  28. package/dist/components/Dropdown/Dropdown.types.d.ts +1 -0
  29. package/dist/components/Dropdown/Dropdown.variants.d.ts +1 -1
  30. package/dist/components/Dropdown/Dropdown.variants.js +5 -9
  31. package/dist/components/Dropdown/components/List/List.d.ts +2 -2
  32. package/dist/components/Dropdown/components/List/List.types.d.ts +3 -3
  33. package/dist/components/Dropdown/components/List/List.variants.d.ts +1 -1
  34. package/dist/components/Dropdown/components/List/List.variants.js +3 -3
  35. package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +1 -1
  36. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +3 -3
  37. package/dist/components/Dropdown/components/Wrapper.d.ts +2 -2
  38. package/dist/components/Dropdown/components/Wrapper.js +1 -1
  39. package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +4 -1
  40. package/dist/components/Dropdown/contexts/dropdown.provider.js +19 -8
  41. package/dist/components/Dropdown/hooks/useDropdown.d.ts +4 -4
  42. package/dist/components/Dropdown/hooks/useNavigationList.d.ts +4 -4
  43. package/dist/components/Input/Input.js +1 -1
  44. package/dist/components/Input/Input.variants.d.ts +1 -1
  45. package/dist/components/Input/Input.variants.js +3 -3
  46. package/dist/components/Modal/Modal.js +2 -2
  47. package/dist/components/Modal/components/Body/Body.js +1 -1
  48. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  49. package/dist/components/Modal/components/Header/Header.js +1 -1
  50. package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -3
  51. package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +2 -2
  52. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +10 -10
  53. package/dist/components/Modal/components/index.js +1 -1
  54. package/dist/components/Modal/hooks/useModal.d.ts +1 -1
  55. package/dist/components/NumberInput/NumberInput.js +96 -87
  56. package/dist/components/NumberInput/NumberInput.variants.d.ts +3 -3
  57. package/dist/components/NumberInput/NumberInput.variants.js +14 -21
  58. package/dist/components/ProgressBar/ProgressBar.variants.d.ts +2 -2
  59. package/dist/components/ProgressBar/ProgressBar.variants.js +7 -12
  60. package/dist/components/Radio/Radio.variants.d.ts +1 -1
  61. package/dist/components/Radio/Radio.variants.js +4 -7
  62. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  63. package/dist/components/Range/Range.js +1 -1
  64. package/dist/components/Range/Range.variants.d.ts +4 -4
  65. package/dist/components/Range/Range.variants.js +18 -18
  66. package/dist/components/Slider/Slider.js +1 -1
  67. package/dist/components/Slider/Slider.variants.d.ts +3 -3
  68. package/dist/components/Slider/Slider.variants.js +12 -12
  69. package/dist/components/Switch/Switch.js +2 -2
  70. package/dist/components/Switch/Switch.variants.d.ts +2 -2
  71. package/dist/components/Switch/Switch.variants.js +6 -6
  72. package/dist/components/Tag/Tag.variants.js +1 -1
  73. package/dist/components/TagSelect/TagSelect.js +1 -1
  74. package/dist/components/TagSelect/TagSelect.variants.d.ts +3 -3
  75. package/dist/components/TagSelect/TagSelect.variants.js +11 -14
  76. package/dist/components/TagSelect/hooks/useTagSelect.d.ts +1 -1
  77. package/dist/components/TextArea/TextArea.variants.d.ts +1 -1
  78. package/dist/components/TextArea/TextArea.variants.js +5 -5
  79. package/dist/components/Toast/Toast.js +104 -101
  80. package/dist/components/Toast/Toast.variants.d.ts +3 -3
  81. package/dist/components/Toast/Toast.variants.js +12 -12
  82. package/dist/components/Tooltip/Tooltip.js +1 -1
  83. package/dist/components/Tooltip/Tooltip.variants.d.ts +2 -2
  84. package/dist/components/Tooltip/Tooltip.variants.js +9 -9
  85. package/dist/components/Tooltip/hooks/useTooltip.d.ts +1 -1
  86. package/dist/components/index.js +1 -1
  87. package/dist/contexts/theme.context.d.ts +1 -1
  88. package/dist/contexts/theme.hook.js +3 -6
  89. package/dist/contexts/theme.provider.d.ts +2 -3
  90. package/dist/contexts/theme.provider.js +4 -1
  91. package/dist/index-BBjak_0p.js +47 -0
  92. package/dist/index-BNmRGtA6.js +34 -0
  93. package/dist/{index-DFbnnPzA.js → index-Ci9Yg4G1.js} +5 -5
  94. package/dist/{index-B_GWswUP.js → index-D4Q2rMby.js} +1 -1
  95. package/dist/{index-DQMInta3.js → index-D68N8v8R.js} +214 -209
  96. package/dist/index-DoOsnuB6.js +72 -0
  97. package/dist/{index-2K8qjK4R.js → index-O3j1K921.js} +36 -37
  98. package/dist/index-OOfdXoxx.js +423 -0
  99. package/dist/index-ffjBR8Av.js +32 -0
  100. package/dist/index.js +1 -1
  101. package/dist/package.json +38 -38
  102. package/dist/plugins/konstruct.js +61 -50
  103. package/dist/plugins/utils/colors.d.ts +127 -10
  104. package/dist/plugins/utils/colors.js +210 -510
  105. package/dist/styles.css +1 -1
  106. package/dist/useBreadcrumb-tyxjV-a1.js +1398 -0
  107. package/dist/utils/index.js +150 -162
  108. package/dist/x-CRBgmX1Q.js +62 -0
  109. package/package.json +38 -38
  110. package/dist/Modal-CO0_SnXD.js +0 -909
  111. package/dist/index-2hJuj4UN.js +0 -19069
  112. package/dist/index-4qm4jAkj.js +0 -92
  113. package/dist/index-BJ7FQg17.js +0 -35
  114. package/dist/index-BqM_XclQ.js +0 -94
  115. package/dist/index-BwYCDOHZ.js +0 -44
  116. package/dist/index-CCavb-1K.js +0 -57
  117. package/dist/useBreadcrumb-BSMnc4Fu.js +0 -341
@@ -1,5 +1,5 @@
1
1
  import l, { forwardRef as c } from "react";
2
- import { P as a } from "./index-DQMInta3.js";
2
+ import { P as a } from "./index-D68N8v8R.js";
3
3
  function p() {
4
4
  return p = Object.assign || function(e) {
5
5
  for (var o = 1; o < arguments.length; o++) {
@@ -0,0 +1,16 @@
1
+ function a(r) {
2
+ var f, n, t = "";
3
+ if (typeof r == "string" || typeof r == "number") t += r;
4
+ else if (typeof r == "object") if (Array.isArray(r)) {
5
+ var o = r.length;
6
+ for (f = 0; f < o; f++) r[f] && (n = a(r[f])) && (t && (t += " "), t += n);
7
+ } else for (n in r) r[n] && (t && (t += " "), t += n);
8
+ return t;
9
+ }
10
+ function i() {
11
+ for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = a(r)) && (t && (t += " "), t += f);
12
+ return t;
13
+ }
14
+ export {
15
+ i as c
16
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { R as h, A as f, P as x, O as g, C as u, T as C, D as b, a as y, b as O } from "../../AlertDialogTrigger-BIbxXexQ.js";
2
+ import { R as h, A as f, P as x, O as g, C as u, T as C, D as b, a as y, b as O } from "../../AlertDialogTrigger-lenvKoGF.js";
3
3
  import "../../contexts/theme.context.js";
4
4
  import { useTheme as A } from "../../contexts/theme.hook.js";
5
5
  import "react";
@@ -1,3 +1,3 @@
1
1
  export declare const buttonAlertDialogVariants: (props?: ({
2
- theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
2
+ theme?: "kubefirst" | "colony" | null | undefined;
3
3
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,10 +1,9 @@
1
- import { c as t } from "../../index-BwYCDOHZ.js";
2
- const r = t([], {
1
+ import { c as t } from "../../index-BNmRGtA6.js";
2
+ const e = t([], {
3
3
  variants: {
4
4
  theme: {
5
5
  colony: "",
6
- kubefirst: "",
7
- konstruct: ""
6
+ kubefirst: ""
8
7
  }
9
8
  },
10
9
  defaultVariants: {
@@ -12,5 +11,5 @@ const r = t([], {
12
11
  }
13
12
  });
14
13
  export {
15
- r as buttonAlertDialogVariants
14
+ e as buttonAlertDialogVariants
16
15
  };
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { A as a } from "../../../AlertDialogTrigger-BIbxXexQ.js";
2
+ import { A as a } from "../../../AlertDialogTrigger-lenvKoGF.js";
3
3
  import "../../../contexts/theme.context.js";
4
4
  import "../../../contexts/theme.hook.js";
5
5
  import "react";
@@ -1,4 +1,4 @@
1
- import { A as g } from "../../../AlertDialogTrigger-BIbxXexQ.js";
1
+ import { A as g } from "../../../AlertDialogTrigger-lenvKoGF.js";
2
2
  export {
3
3
  g as AlertDialogTrigger
4
4
  };
@@ -1,8 +1,8 @@
1
1
  export declare const autocompleteVariants: (props?: ({
2
2
  variant?: "default" | null | undefined;
3
- theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
3
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
4
4
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
5
  export declare const labelVariants: (props?: ({
6
6
  variant?: "default" | null | undefined;
7
- theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
7
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { c as t } from "../../index-BwYCDOHZ.js";
2
- const r = t(
1
+ import { c as e } from "../../index-BNmRGtA6.js";
2
+ const r = e(
3
3
  [
4
4
  "flex",
5
5
  "w-full",
@@ -26,9 +26,9 @@ const r = t(
26
26
  default: ""
27
27
  },
28
28
  theme: {
29
- kubefirst: ["focus:ring-kubefirst-purple-light"],
30
- konstruct: ["focus:focus:ring-orange-400"],
31
- colony: ["focus:focus:ring-red-400"]
29
+ kubefirst: ["focus:ring-kubefirst-primary"],
30
+ colony: ["focus:focus:ring-red-400"],
31
+ civo: ""
32
32
  }
33
33
  },
34
34
  defaultVariants: {
@@ -36,7 +36,7 @@ const r = t(
36
36
  variant: "default"
37
37
  }
38
38
  }
39
- ), a = t(
39
+ ), a = e(
40
40
  ["pl-1", "mb-2", "text-base", "cursor-pointer"],
41
41
  {
42
42
  variants: {
@@ -45,8 +45,8 @@ const r = t(
45
45
  },
46
46
  theme: {
47
47
  kubefirst: "",
48
- konstruct: "",
49
- colony: ""
48
+ colony: "",
49
+ civo: ""
50
50
  }
51
51
  },
52
52
  defaultVariants: {
@@ -1,11 +1,11 @@
1
- import { ReactNode, RefObject } from 'react';
1
+ import { ComponentRef, ReactNode, RefObject } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { Option } from '../Autocomplete.types';
4
4
  import { autocompleteVariants } from '../Autocomplete.variants';
5
5
  export interface Props extends VariantProps<typeof autocompleteVariants> {
6
6
  className?: string;
7
- inputRef: RefObject<HTMLInputElement>;
8
- wrapperRef: RefObject<HTMLDivElement>;
7
+ inputRef: RefObject<ComponentRef<'input'> | null>;
8
+ wrapperRef: RefObject<ComponentRef<'div'> | null>;
9
9
  options: Option[];
10
10
  placeholder: string | ReactNode;
11
11
  placeholderClassName?: string;
@@ -1,16 +1,16 @@
1
1
  export declare const listVariants: (props?: ({
2
2
  variant?: "default" | null | undefined;
3
- theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
3
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
4
4
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
5
  export declare const emptyListVariants: (props?: ({
6
6
  variant?: "default" | null | undefined;
7
- theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
7
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
9
  export declare const listItemVariants: (props?: ({
10
10
  variant?: "default" | null | undefined;
11
- theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
11
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
12
12
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
13
13
  export declare const buttonVariants: (props?: ({
14
14
  variant?: "default" | null | undefined;
15
- theme?: "kubefirst" | "konstruct" | "colony" | null | undefined;
15
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
16
16
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,4 +1,4 @@
1
- import { c as t } from "../../../index-BwYCDOHZ.js";
1
+ import { c as t } from "../../../index-BNmRGtA6.js";
2
2
  const a = t(["max-h-[250px]", "overflow-y-auto"], {
3
3
  variants: {
4
4
  variant: {
@@ -6,8 +6,8 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
6
6
  },
7
7
  theme: {
8
8
  kubefirst: "",
9
- konstruct: "",
10
- colony: ""
9
+ colony: "",
10
+ civo: ""
11
11
  }
12
12
  },
13
13
  defaultVariants: {
@@ -23,8 +23,8 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
23
23
  },
24
24
  theme: {
25
25
  kubefirst: "",
26
- konstruct: "",
27
- colony: ""
26
+ colony: "",
27
+ civo: ""
28
28
  }
29
29
  },
30
30
  defaultVariants: {
@@ -32,22 +32,22 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
32
32
  theme: "kubefirst"
33
33
  }
34
34
  }
35
- ), o = t(["focus-visible:outline-none"], {
35
+ ), i = t(["focus-visible:outline-none"], {
36
36
  variants: {
37
37
  variant: {
38
38
  default: ""
39
39
  },
40
40
  theme: {
41
41
  kubefirst: ["focus:bg-purple-100", "hover:bg-purple-100"],
42
- konstruct: ["focus:bg-orange-100", "hover:bg-orange-100"],
43
- colony: ["focus:bg-red-100", "hover:bg-red-100"]
42
+ colony: ["focus:bg-red-100", "hover:bg-red-100"],
43
+ civo: ""
44
44
  }
45
45
  },
46
46
  defaultVariants: {
47
47
  variant: "default",
48
48
  theme: "kubefirst"
49
49
  }
50
- }), n = t(
50
+ }), o = t(
51
51
  [
52
52
  "cursor-pointer",
53
53
  "focus-visible:outline-none",
@@ -63,8 +63,8 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
63
63
  },
64
64
  theme: {
65
65
  kubefirst: ["focus:bg-purple-100", "hover:bg-purple-100"],
66
- konstruct: ["focus:bg-orange-100", "hover:bg-orange-100"],
67
- colony: ["focus:bg-red-100", "hover:bg-red-100"]
66
+ colony: ["focus:bg-red-100", "hover:bg-red-100"],
67
+ civo: ""
68
68
  }
69
69
  },
70
70
  defaultVariants: {
@@ -74,8 +74,8 @@ const a = t(["max-h-[250px]", "overflow-y-auto"], {
74
74
  }
75
75
  );
76
76
  export {
77
- n as buttonVariants,
77
+ o as buttonVariants,
78
78
  r as emptyListVariants,
79
- o as listItemVariants,
79
+ i as listItemVariants,
80
80
  a as listVariants
81
81
  };
@@ -1,13 +1,13 @@
1
- import { ChangeEvent, RefObject } from 'react';
1
+ import { ChangeEvent, ComponentRef, RefObject } from 'react';
2
2
  import { Option } from '../Autocomplete.types';
3
3
  type UseAutocompleteProps = {
4
4
  options: Option[];
5
- inputRef: RefObject<HTMLInputElement>;
6
- wrapperRef: RefObject<HTMLDivElement>;
5
+ inputRef: RefObject<ComponentRef<'input'> | null>;
6
+ wrapperRef: RefObject<ComponentRef<'div'> | null>;
7
7
  onChange(value: string): void;
8
8
  };
9
9
  export declare const useAutocomplete: ({ options, inputRef, wrapperRef, onChange, }: UseAutocompleteProps) => {
10
- inputRef: RefObject<HTMLInputElement>;
10
+ inputRef: RefObject<HTMLInputElement | null>;
11
11
  newOptions: Option[];
12
12
  showOptions: boolean;
13
13
  value: string;
@@ -1,9 +1,9 @@
1
- import { RefObject } from 'react';
1
+ import { ComponentRef, RefObject } from 'react';
2
2
  import { Option } from '../Autocomplete.types';
3
3
  type UseNavigationListProps = {
4
- ulRef: RefObject<HTMLUListElement>;
5
- inputRef: RefObject<HTMLInputElement>;
6
- wrapperRef: RefObject<HTMLDivElement>;
4
+ ulRef: RefObject<ComponentRef<'ul'> | null>;
5
+ inputRef: RefObject<ComponentRef<'input'> | null>;
6
+ wrapperRef: RefObject<ComponentRef<'div'> | null>;
7
7
  options: Option[];
8
8
  };
9
9
  export declare const useNavigationUlList: ({ ulRef, inputRef, wrapperRef, options, }: UseNavigationListProps) => void;