@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.
Files changed (144) hide show
  1. package/dist/{Modal-B-E9uaA6.js → Modal-i7eolhYH.js} +311 -307
  2. package/dist/components/Alert/Alert.js +24 -29
  3. package/dist/components/Alert/Alert.variants.js +9 -15
  4. package/dist/components/AlertDialog/AlertDialog.js +59 -46
  5. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -2
  6. package/dist/components/AlertDialog/components/index.js +1 -1
  7. package/dist/components/Autocomplete/Autocomplete.js +76 -72
  8. package/dist/components/Autocomplete/Autocomplete.variants.js +11 -20
  9. package/dist/components/Autocomplete/components/List/List.js +28 -30
  10. package/dist/components/Autocomplete/components/List/List.variants.js +34 -40
  11. package/dist/components/Breadcrumb/Breadcrumb.js +47 -56
  12. package/dist/components/Breadcrumb/Breadcrumb.variants.js +6 -26
  13. package/dist/components/Breadcrumb/components/Item/Item.js +29 -41
  14. package/dist/components/Breadcrumb/components/Item/Item.variants.js +2 -20
  15. package/dist/components/Button/Button.js +33 -37
  16. package/dist/components/Button/Button.variants.js +138 -195
  17. package/dist/components/Card/Card.js +32 -37
  18. package/dist/components/Card/Card.variants.js +18 -53
  19. package/dist/components/Checkbox/Checkbox.js +65 -68
  20. package/dist/components/Checkbox/Checkbox.variants.js +11 -35
  21. package/dist/components/Command/Command.js +33 -25
  22. package/dist/components/Command/Command.variants.js +47 -94
  23. package/dist/components/Command/components/Command.js +1 -1
  24. package/dist/components/Command/components/CommandEmpty.js +1 -1
  25. package/dist/components/Command/components/CommandGroup.js +1 -1
  26. package/dist/components/Command/components/CommandInput.js +1 -1
  27. package/dist/components/Command/components/CommandItem.js +1 -1
  28. package/dist/components/Command/components/CommandList.js +1 -1
  29. package/dist/components/Command/components/CommandSeparator.js +1 -1
  30. package/dist/components/Command/components/DialogContent.js +1 -1
  31. package/dist/components/Command/components/DialogOverlay.js +8 -8
  32. package/dist/components/Divider/Divider.js +3 -2
  33. package/dist/components/Divider/Divider.variants.js +12 -9
  34. package/dist/components/Dropdown/Dropdown.js +6 -6
  35. package/dist/components/Dropdown/Dropdown.variants.js +31 -38
  36. package/dist/components/Dropdown/components/List/List.js +17 -15
  37. package/dist/components/Dropdown/components/List/List.variants.js +22 -32
  38. package/dist/components/Dropdown/components/ListItem/ListItem.js +20 -19
  39. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +18 -30
  40. package/dist/components/Dropdown/components/Wrapper.js +127 -90
  41. package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
  42. package/dist/components/Dropdown/contexts/dropdown.provider.js +9 -9
  43. package/dist/components/Input/Input.js +37 -37
  44. package/dist/components/Input/Input.variants.js +8 -13
  45. package/dist/components/Loading/Loading.js +60 -58
  46. package/dist/components/Loading/Loading.variants.js +9 -15
  47. package/dist/components/Modal/Modal.js +2 -2
  48. package/dist/components/Modal/components/Body/Body.js +1 -1
  49. package/dist/components/Modal/components/Footer/Footer.js +2 -2
  50. package/dist/components/Modal/components/Header/Header.js +3 -3
  51. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -4
  52. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +32 -46
  53. package/dist/components/Modal/components/index.js +1 -1
  54. package/dist/components/NumberInput/NumberInput.js +93 -111
  55. package/dist/components/NumberInput/NumberInput.variants.js +30 -51
  56. package/dist/components/ProgressBar/ProgressBar.js +25 -29
  57. package/dist/components/ProgressBar/ProgressBar.variants.js +10 -31
  58. package/dist/components/Radio/Radio.js +45 -46
  59. package/dist/components/Radio/Radio.variants.js +4 -13
  60. package/dist/components/RadioCard/RadioCard.js +31 -37
  61. package/dist/components/RadioCard/RadioCard.variants.js +8 -17
  62. package/dist/components/RadioCardGroup/RadioCardGroup.js +22 -23
  63. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +3 -9
  64. package/dist/components/RadioGroup/RadioGroup.js +30 -31
  65. package/dist/components/RadioGroup/RadioGroup.variants.js +2 -8
  66. package/dist/components/Range/Range.js +28 -34
  67. package/dist/components/Range/Range.variants.js +21 -53
  68. package/dist/components/Sidebar/Sidebar.js +12 -13
  69. package/dist/components/Sidebar/Sidebar.variants.js +30 -56
  70. package/dist/components/Sidebar/components/Footer/Footer.js +5 -17
  71. package/dist/components/Sidebar/components/Footer/Footer.variants.js +9 -16
  72. package/dist/components/Sidebar/components/Logo/Logo.js +5 -15
  73. package/dist/components/Sidebar/components/Logo/Logo.variants.js +20 -36
  74. package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -28
  75. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +3 -17
  76. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +21 -34
  77. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +2 -13
  78. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +21 -27
  79. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +7 -17
  80. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +7 -19
  81. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +6 -16
  82. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +8 -21
  83. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +11 -20
  84. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +41 -44
  85. package/dist/components/Slider/Slider.js +26 -27
  86. package/dist/components/Slider/Slider.variants.js +22 -34
  87. package/dist/components/Switch/Switch.js +103 -106
  88. package/dist/components/Switch/Switch.variants.js +28 -53
  89. package/dist/components/Table/Table.js +27 -0
  90. package/dist/components/Table/Table.variants.js +40 -0
  91. package/dist/components/Table/components/Body.js +18 -0
  92. package/dist/components/Table/components/Filter.js +9 -0
  93. package/dist/components/Table/components/Head.js +18 -0
  94. package/dist/components/Table/components/Row.js +28 -0
  95. package/dist/components/Table/components/index.js +10 -0
  96. package/dist/components/Tag/Tag.js +1 -1
  97. package/dist/components/TagSelect/TagSelect.variants.js +23 -55
  98. package/dist/components/TagSelect/components/Item/Item.js +12 -14
  99. package/dist/components/TagSelect/components/Item/Item.variants.js +11 -10
  100. package/dist/components/TagSelect/components/List/List.js +9 -10
  101. package/dist/components/TagSelect/components/List/List.variants.js +21 -35
  102. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +46 -48
  103. package/dist/components/TextArea/TextArea.js +20 -23
  104. package/dist/components/TextArea/TextArea.variants.js +19 -31
  105. package/dist/components/Toast/Toast.js +110 -116
  106. package/dist/components/Toast/Toast.variants.js +42 -70
  107. package/dist/components/Tooltip/Tooltip.js +21 -27
  108. package/dist/components/Tooltip/Tooltip.variants.js +61 -62
  109. package/dist/components/Typography/Typography.js +23 -19
  110. package/dist/components/Typography/Typography.variants.js +1 -7
  111. package/dist/components/index.js +22 -20
  112. package/dist/contexts/theme.provider.js +37 -39
  113. package/dist/domain/theme.js +0 -0
  114. package/dist/index-AM3avohj.js +133 -0
  115. package/dist/{index-BzaHYXkt.js → index-BOx5P4tS.js} +5 -5
  116. package/dist/index-Bk324h27.js +82 -0
  117. package/dist/{index-4ecjw_Aj.js → index-Bry5AFQ2.js} +1 -1
  118. package/dist/{index-CbTU3cnP.js → index-CWKdynYu.js} +1 -1
  119. package/dist/index-D9BbbgUq.js +47 -0
  120. package/dist/{index-DyKo5ZJT.js → index-DvFiic6N.js} +45 -45
  121. package/dist/{index-Dj1pom3_.js → index-G_6jG4Qc.js} +2 -2
  122. package/dist/{index-D_76wh4w.js → index-YaQrdkGE.js} +3 -3
  123. package/dist/{index-Cva-e5M4.js → index-bYyfdsls.js} +9 -9
  124. package/dist/index-dRxIWVBr.js +313 -0
  125. package/dist/{index-D7QNmo_D.js → index-g-TFwd6Y.js} +41 -41
  126. package/dist/index.d.ts +115 -98
  127. package/dist/index.js +30 -30
  128. package/dist/package.json +37 -36
  129. package/dist/styles.css +1 -1
  130. package/dist/ui/kubefirst-theme.css +296 -0
  131. package/dist/ui/theme.css +6 -0
  132. package/dist/ui/utilities.css +165 -0
  133. package/dist/utils/index.js +675 -424
  134. package/package.json +37 -36
  135. package/dist/components/AlertDialog/AlertDialog.variants.js +0 -15
  136. package/dist/index-B_6_jmOO.js +0 -68
  137. package/dist/index-BbsJ0VIJ.js +0 -47
  138. package/dist/index-CzSBQN5S.js +0 -432
  139. package/dist/index-DUA6Y_AE.js +0 -126
  140. package/dist/plugins/index.js +0 -4
  141. package/dist/plugins/konstruct.js +0 -118
  142. package/dist/plugins/utils/animation.styles.js +0 -162
  143. package/dist/plugins/utils/colors.js +0 -331
  144. package/dist/plugins/utils/index.js +0 -7
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.0.12-alpha.9",
5
+ "version": "0.0.13-alpha.1",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://konstructio.github.io/konstruct-ui",
41
41
  "scripts": {
42
- "build": "rimraf ./dist & tsc --p ./tsconfig.build.json && vite build && cp ./package.json ./dist/package.json",
42
+ "build": "rimraf ./dist & tsc --p ./tsconfig.build.json && vite build && chmod +x scripts/copy.sh && ./scripts/copy.sh",
43
43
  "build:storybook": "storybook build -o storybook-static && cp -r public/* storybook-static",
44
44
  "check:prettier": "prettier lib --check --config ./.prettierrc",
45
45
  "check:types": "tsc -p tsconfig.json",
@@ -55,23 +55,23 @@
55
55
  "test:watch": "vitest dev"
56
56
  },
57
57
  "dependencies": {
58
- "@radix-ui/react-alert-dialog": "^1.1.6",
59
- "@radix-ui/react-checkbox": "^1.1.4",
60
- "@radix-ui/react-dialog": "^1.1.6",
61
- "@radix-ui/react-slider": "^1.2.3",
62
- "@radix-ui/react-slot": "^1.1.2",
63
- "@radix-ui/react-switch": "^1.1.3",
64
- "@radix-ui/react-toast": "^1.2.6",
65
- "@radix-ui/react-visually-hidden": "^1.1.2",
58
+ "@radix-ui/react-alert-dialog": "^1.1.7",
59
+ "@radix-ui/react-checkbox": "^1.1.5",
60
+ "@radix-ui/react-dialog": "^1.1.7",
61
+ "@radix-ui/react-slider": "^1.2.4",
62
+ "@radix-ui/react-slot": "^1.2.0",
63
+ "@radix-ui/react-switch": "^1.1.4",
64
+ "@radix-ui/react-toast": "^1.2.7",
65
+ "@radix-ui/react-visually-hidden": "^1.1.3",
66
66
  "class-variance-authority": "^0.7.1",
67
67
  "clsx": "^2.1.1",
68
- "cmdk": "^1.0.4",
68
+ "cmdk": "^1.1.1",
69
69
  "js-cookie": "^3.0.5",
70
- "lucide-react": "^0.477.0",
70
+ "lucide-react": "^0.488.0",
71
71
  "react-feather": "^2.0.10",
72
72
  "react-focus-lock": "^2.13.6",
73
73
  "react-remove-scroll": "^2.6.3",
74
- "tailwind-merge": "^3.0.2"
74
+ "tailwind-merge": "^3.2.0"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@types/react": "*",
@@ -79,7 +79,7 @@
79
79
  "react": "^16.8 || ^17.0 || ^18.0 || ^19.0",
80
80
  "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0",
81
81
  "react-router-dom": "^7",
82
- "tailwindcss": "^3"
82
+ "tailwindcss": "^4"
83
83
  },
84
84
  "peerDependenciesMeta": {
85
85
  "react": {
@@ -103,28 +103,29 @@
103
103
  },
104
104
  "devDependencies": {
105
105
  "@rollup/plugin-alias": "^5.1.1",
106
- "@storybook/addon-docs": "^8.6.3",
107
- "@storybook/addon-essentials": "^8.6.3",
108
- "@storybook/addon-interactions": "^8.6.3",
109
- "@storybook/addon-links": "^8.6.3",
106
+ "@storybook/addon-docs": "^8.6.12",
107
+ "@storybook/addon-essentials": "^8.6.12",
108
+ "@storybook/addon-interactions": "^8.6.12",
109
+ "@storybook/addon-links": "^8.6.12",
110
110
  "@storybook/addon-styling-webpack": "^1.0.1",
111
- "@storybook/blocks": "^8.6.3",
112
- "@storybook/react": "^8.6.3",
113
- "@storybook/react-vite": "^8.6.3",
114
- "@storybook/test": "^8.6.3",
111
+ "@storybook/blocks": "^8.6.12",
112
+ "@storybook/react": "^8.6.12",
113
+ "@storybook/react-vite": "^8.6.12",
114
+ "@storybook/test": "^8.6.12",
115
+ "@tailwindcss/vite": "^4.1.4",
115
116
  "@testing-library/jest-dom": "^6.6.3",
116
- "@testing-library/react": "^16.2.0",
117
+ "@testing-library/react": "^16.3.0",
117
118
  "@testing-library/user-event": "^14.6.1",
118
119
  "@types/jest-axe": "^3.5.9",
119
120
  "@types/js-cookie": "^3.0.6",
120
121
  "@types/lodash": "^4.17.16",
121
- "@types/react": "^19.0.10",
122
- "@types/react-dom": "^19.0.4",
123
- "@typescript-eslint/eslint-plugin": "^8.26.0",
124
- "@typescript-eslint/parser": "^8.26.0",
122
+ "@types/react": "^19.1.2",
123
+ "@types/react-dom": "^19.1.2",
124
+ "@typescript-eslint/eslint-plugin": "^8.29.1",
125
+ "@typescript-eslint/parser": "^8.29.1",
125
126
  "@vitejs/plugin-react": "^4.3.4",
126
- "@vitest/coverage-v8": "^3.0.7",
127
- "autoprefixer": "^10.4.20",
127
+ "@vitest/coverage-v8": "^3.1.1",
128
+ "autoprefixer": "^10.4.21",
128
129
  "eslint": "^8.57.0",
129
130
  "eslint-plugin-react-hooks": "^4.6.2",
130
131
  "eslint-plugin-react-refresh": "^0.4.7",
@@ -132,20 +133,20 @@
132
133
  "glob": "^11.0.1",
133
134
  "husky": "^9.1.7",
134
135
  "jest-axe": "^10.0.0",
135
- "jsdom": "^26.0.0",
136
+ "jsdom": "^26.1.0",
136
137
  "lodash": "^4.17.21",
137
138
  "postcss": "^8.5.3",
138
139
  "prettier": "^3.5.3",
139
140
  "rimraf": "^6.0.1",
140
- "storybook": "^8.6.3",
141
- "tailwindcss": "^3.4.17",
141
+ "storybook": "^8.6.12",
142
+ "tailwindcss": "^4.1.4",
142
143
  "ts-node": "^10.9.2",
143
- "typescript": "^5.8.2",
144
- "vite": "^6.2.0",
144
+ "typescript": "^5.8.3",
145
+ "vite": "^6.2.6",
145
146
  "vite-plugin-dts": "^4.5.3",
146
- "vite-plugin-lib-inject-css": "^2.2.1",
147
+ "vite-plugin-lib-inject-css": "^2.2.2",
147
148
  "vite-plugin-svgr": "^4.3.0",
148
149
  "vite-tsconfig-paths": "^5.1.4",
149
- "vitest": "^3.0.7"
150
+ "vitest": "^3.1.1"
150
151
  }
151
152
  }
@@ -1,15 +0,0 @@
1
- import { c as t } from "../../index-BNmRGtA6.js";
2
- const e = t([], {
3
- variants: {
4
- theme: {
5
- colony: "",
6
- kubefirst: ""
7
- }
8
- },
9
- defaultVariants: {
10
- theme: "kubefirst"
11
- }
12
- });
13
- export {
14
- e as buttonAlertDialogVariants
15
- };
@@ -1,68 +0,0 @@
1
- import * as i from "react";
2
- import { jsx as c, Fragment as m } from "react/jsx-runtime";
3
- function p(e, r) {
4
- if (typeof e == "function")
5
- return e(r);
6
- e != null && (e.current = r);
7
- }
8
- function d(...e) {
9
- return (r) => {
10
- let n = !1;
11
- const o = e.map((t) => {
12
- const l = p(t, r);
13
- return !n && typeof l == "function" && (n = !0), l;
14
- });
15
- if (n)
16
- return () => {
17
- for (let t = 0; t < o.length; t++) {
18
- const l = o[t];
19
- typeof l == "function" ? l() : p(e[t], null);
20
- }
21
- };
22
- };
23
- }
24
- function S(...e) {
25
- return i.useCallback(d(...e), e);
26
- }
27
- var y = i.forwardRef((e, r) => {
28
- const { children: n, ...o } = e, t = i.Children.toArray(n), l = t.find(h);
29
- if (l) {
30
- const s = l.props.children, a = t.map((f) => f === l ? i.Children.count(s) > 1 ? i.Children.only(null) : i.isValidElement(s) ? s.props.children : null : f);
31
- return /* @__PURE__ */ c(u, { ...o, ref: r, children: i.isValidElement(s) ? i.cloneElement(s, void 0, a) : null });
32
- }
33
- return /* @__PURE__ */ c(u, { ...o, ref: r, children: n });
34
- });
35
- y.displayName = "Slot";
36
- var u = i.forwardRef((e, r) => {
37
- const { children: n, ...o } = e;
38
- if (i.isValidElement(n)) {
39
- const t = R(n), l = C(o, n.props);
40
- return n.type !== i.Fragment && (l.ref = r ? d(r, t) : t), i.cloneElement(n, l);
41
- }
42
- return i.Children.count(n) > 1 ? i.Children.only(null) : null;
43
- });
44
- u.displayName = "SlotClone";
45
- var g = ({ children: e }) => /* @__PURE__ */ c(m, { children: e });
46
- function h(e) {
47
- return i.isValidElement(e) && e.type === g;
48
- }
49
- function C(e, r) {
50
- const n = { ...r };
51
- for (const o in r) {
52
- const t = e[o], l = r[o];
53
- /^on[A-Z]/.test(o) ? t && l ? n[o] = (...a) => {
54
- l(...a), t(...a);
55
- } : t && (n[o] = t) : o === "style" ? n[o] = { ...t, ...l } : o === "className" && (n[o] = [t, l].filter(Boolean).join(" "));
56
- }
57
- return { ...e, ...n };
58
- }
59
- function R(e) {
60
- var o, t;
61
- let r = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = r && "isReactWarning" in r && r.isReactWarning;
62
- return n ? e.ref : (r = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, n = r && "isReactWarning" in r && r.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
63
- }
64
- export {
65
- y as S,
66
- g as a,
67
- S as u
68
- };
@@ -1,47 +0,0 @@
1
- import n from "react";
2
- import { c as O } from "./index-Cva-e5M4.js";
3
- import { u as I, S as x } from "./index-B_6_jmOO.js";
4
- import { jsx as m } from "react/jsx-runtime";
5
- function L(s) {
6
- const f = s + "CollectionProvider", [A, N] = O(f), [_, a] = A(
7
- f,
8
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
9
- ), u = (c) => {
10
- const { scope: e, children: l } = c, o = n.useRef(null), t = n.useRef(/* @__PURE__ */ new Map()).current;
11
- return /* @__PURE__ */ m(_, { scope: e, itemMap: t, collectionRef: o, children: l });
12
- };
13
- u.displayName = f;
14
- const d = s + "CollectionSlot", p = n.forwardRef(
15
- (c, e) => {
16
- const { scope: l, children: o } = c, t = a(d, l), r = I(e, t.collectionRef);
17
- return /* @__PURE__ */ m(x, { ref: r, children: o });
18
- }
19
- );
20
- p.displayName = d;
21
- const C = s + "CollectionItemSlot", R = "data-radix-collection-item", M = n.forwardRef(
22
- (c, e) => {
23
- const { scope: l, children: o, ...t } = c, r = n.useRef(null), S = I(e, r), i = a(C, l);
24
- return n.useEffect(() => (i.itemMap.set(r, { ref: r, ...t }), () => void i.itemMap.delete(r))), /* @__PURE__ */ m(x, { [R]: "", ref: S, children: o });
25
- }
26
- );
27
- M.displayName = C;
28
- function E(c) {
29
- const e = a(s + "CollectionConsumer", c);
30
- return n.useCallback(() => {
31
- const o = e.collectionRef.current;
32
- if (!o) return [];
33
- const t = Array.from(o.querySelectorAll(`[${R}]`));
34
- return Array.from(e.itemMap.values()).sort(
35
- (i, T) => t.indexOf(i.ref.current) - t.indexOf(T.ref.current)
36
- );
37
- }, [e.collectionRef, e.itemMap]);
38
- }
39
- return [
40
- { Provider: u, Slot: p, ItemSlot: M },
41
- E,
42
- N
43
- ];
44
- }
45
- export {
46
- L as c
47
- };