@konstructio/ui 0.0.9 → 0.0.11

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 (100) hide show
  1. package/dist/{Modal-Ca3bkvvt.js → Modal-L73dmnHv.js} +240 -235
  2. package/dist/components/AlertDialog/AlertDialog.js +37 -30
  3. package/dist/components/AlertDialog/AlertDialog.types.d.ts +7 -2
  4. package/dist/components/Autocomplete/Autocomplete.js +42 -37
  5. package/dist/components/Autocomplete/components/List/List.js +60 -0
  6. package/dist/components/Autocomplete/components/{List.types.d.ts → List/List.types.d.ts} +3 -3
  7. package/dist/components/Autocomplete/components/{List.variants.js → List/List.variants.js} +1 -1
  8. package/dist/components/Autocomplete/components/index.d.ts +1 -0
  9. package/dist/components/Autocomplete/components/index.js +4 -0
  10. package/dist/components/Breadcrumb/Breadcrumb.js +44 -39
  11. package/dist/components/Button/Button.variants.d.ts +2 -2
  12. package/dist/components/Button/Button.variants.js +142 -8
  13. package/dist/components/Card/Card.js +30 -25
  14. package/dist/components/Checkbox/Checkbox.js +56 -51
  15. package/dist/components/Dropdown/components/ListItem/ListItem.js +18 -17
  16. package/dist/components/Dropdown/components/Wrapper.js +15 -15
  17. package/dist/components/Input/Input.js +4 -4
  18. package/dist/components/Modal/Modal.js +1 -1
  19. package/dist/components/Modal/components/Footer/Footer.js +5 -4
  20. package/dist/components/Modal/components/Header/Header.js +4 -3
  21. package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -3
  22. package/dist/components/Modal/components/index.js +1 -1
  23. package/dist/components/NumberInput/NumberInput.js +78 -69
  24. package/dist/components/ProgressBar/ProgressBar.js +6 -6
  25. package/dist/components/Radio/Radio.js +21 -18
  26. package/dist/components/RadioGroup/RadioGroup.js +26 -22
  27. package/dist/components/RadioGroup/RadioGroup.types.d.ts +4 -3
  28. package/dist/components/Range/Range.js +40 -40
  29. package/dist/components/Sidebar/Sidebar.d.ts +5 -0
  30. package/dist/components/Sidebar/Sidebar.js +27 -0
  31. package/dist/components/Sidebar/Sidebar.types.d.ts +17 -0
  32. package/dist/components/Sidebar/Sidebar.types.js +1 -0
  33. package/dist/components/Sidebar/Sidebar.variants.d.ts +6 -0
  34. package/dist/components/Sidebar/Sidebar.variants.js +56 -0
  35. package/dist/components/Sidebar/components/Footer/Footer.d.ts +3 -0
  36. package/dist/components/Sidebar/components/Footer/Footer.js +22 -0
  37. package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
  38. package/dist/components/Sidebar/components/Footer/Footer.types.js +1 -0
  39. package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +3 -0
  40. package/dist/components/Sidebar/components/Footer/Footer.variants.js +19 -0
  41. package/dist/components/Sidebar/components/Logo/Logo.d.ts +3 -0
  42. package/dist/components/Sidebar/components/Logo/Logo.js +20 -0
  43. package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
  44. package/dist/components/Sidebar/components/Logo/Logo.types.js +1 -0
  45. package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -0
  46. package/dist/components/Sidebar/components/Logo/Logo.variants.js +45 -0
  47. package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
  48. package/dist/components/Sidebar/components/Navigation/Navigation.js +34 -0
  49. package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
  50. package/dist/components/Sidebar/components/Navigation/Navigation.types.js +1 -0
  51. package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +3 -0
  52. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +19 -0
  53. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +3 -0
  54. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +40 -0
  55. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +7 -0
  56. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +1 -0
  57. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +3 -0
  58. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +16 -0
  59. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +3 -0
  60. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +29 -0
  61. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +15 -0
  62. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +1 -0
  63. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +3 -0
  64. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +39 -0
  65. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +3 -0
  66. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +24 -0
  67. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
  68. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +1 -0
  69. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +3 -0
  70. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +19 -0
  71. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +3 -0
  72. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +26 -0
  73. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +7 -0
  74. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +1 -0
  75. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +3 -0
  76. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +23 -0
  77. package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +3 -0
  78. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +84 -0
  79. package/dist/components/Sidebar/components/index.d.ts +15 -0
  80. package/dist/components/Sidebar/components/index.js +18 -0
  81. package/dist/components/Slider/Slider.js +25 -25
  82. package/dist/components/Switch/Switch.js +30 -30
  83. package/dist/components/Tag/Tag.js +5 -4
  84. package/dist/components/TagSelect/TagSelect.js +24 -24
  85. package/dist/components/TextArea/TextArea.js +17 -16
  86. package/dist/components/Toast/Toast.js +103 -97
  87. package/dist/components/Tooltip/Tooltip.js +12 -12
  88. package/dist/components/index.d.ts +1 -0
  89. package/dist/components/index.js +44 -30
  90. package/dist/index.js +47 -33
  91. package/dist/package.json +31 -16
  92. package/dist/plugins/utils/colors.d.ts +5 -0
  93. package/dist/plugins/utils/colors.js +6 -1
  94. package/dist/styles.css +1 -1
  95. package/dist/utils/index.js +747 -530
  96. package/package.json +31 -16
  97. package/dist/components/Autocomplete/components/List.js +0 -57
  98. /package/dist/components/Autocomplete/components/{List.d.ts → List/List.d.ts} +0 -0
  99. /package/dist/components/Autocomplete/components/{List.types.js → List/List.types.js} +0 -0
  100. /package/dist/components/Autocomplete/components/{List.variants.d.ts → List/List.variants.d.ts} +0 -0
@@ -1,45 +1,46 @@
1
1
  import { jsxs as y, jsx as u } from "react/jsx-runtime";
2
- import p, { forwardRef as b, useId as _, useState as E, useCallback as w } from "react";
3
2
  import { R as j } from "../../index-BtibbG81.js";
3
+ import p, { forwardRef as d, useId as E, useState as T, useCallback as x } from "react";
4
4
  import "../../contexts/theme.context.js";
5
- import { useTheme as T } from "../../contexts/theme.hook.js";
5
+ import { useTheme as $ } from "../../contexts/theme.hook.js";
6
6
  import "../../js.cookie-OLEfuq_g.js";
7
- import { labelVariants as $, buttonVariants as x, numberInputVariants as L } from "./NumberInput.variants.js";
7
+ import { cn as h } from "../../utils/index.js";
8
+ import { labelVariants as L, buttonVariants as P, numberInputVariants as W } from "./NumberInput.variants.js";
8
9
  import { P as a } from "../../index-D68N8v8R.js";
9
- function h() {
10
- return h = Object.assign || function(e) {
11
- for (var i = 1; i < arguments.length; i++) {
12
- var r = arguments[i];
10
+ function v() {
11
+ return v = Object.assign || function(e) {
12
+ for (var o = 1; o < arguments.length; o++) {
13
+ var r = arguments[o];
13
14
  for (var t in r)
14
15
  Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
15
16
  }
16
17
  return e;
17
- }, h.apply(this, arguments);
18
+ }, v.apply(this, arguments);
18
19
  }
19
- function W(e, i) {
20
+ function V(e, o) {
20
21
  if (e == null) return {};
21
- var r = V(e, i), t, n;
22
+ var r = M(e, o), t, n;
22
23
  if (Object.getOwnPropertySymbols) {
23
- var o = Object.getOwnPropertySymbols(e);
24
- for (n = 0; n < o.length; n++)
25
- t = o[n], !(i.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
24
+ var i = Object.getOwnPropertySymbols(e);
25
+ for (n = 0; n < i.length; n++)
26
+ t = i[n], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
26
27
  }
27
28
  return r;
28
29
  }
29
- function V(e, i) {
30
+ function M(e, o) {
30
31
  if (e == null) return {};
31
- var r = {}, t = Object.keys(e), n, o;
32
- for (o = 0; o < t.length; o++)
33
- n = t[o], !(i.indexOf(n) >= 0) && (r[n] = e[n]);
32
+ var r = {}, t = Object.keys(e), n, i;
33
+ for (i = 0; i < t.length; i++)
34
+ n = t[i], !(o.indexOf(n) >= 0) && (r[n] = e[n]);
34
35
  return r;
35
36
  }
36
- var d = b(function(e, i) {
37
- var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, o = n === void 0 ? 24 : n, f = W(e, ["color", "size"]);
38
- return /* @__PURE__ */ p.createElement("svg", h({
39
- ref: i,
37
+ var O = d(function(e, o) {
38
+ var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, i = n === void 0 ? 24 : n, f = V(e, ["color", "size"]);
39
+ return /* @__PURE__ */ p.createElement("svg", v({
40
+ ref: o,
40
41
  xmlns: "http://www.w3.org/2000/svg",
41
- width: o,
42
- height: o,
42
+ width: i,
43
+ height: i,
43
44
  viewBox: "0 0 24 24",
44
45
  fill: "none",
45
46
  stroke: t,
@@ -53,45 +54,45 @@ var d = b(function(e, i) {
53
54
  y2: "12"
54
55
  }));
55
56
  });
56
- d.propTypes = {
57
+ O.propTypes = {
57
58
  color: a.string,
58
59
  size: a.oneOfType([a.string, a.number])
59
60
  };
60
- d.displayName = "Minus";
61
- function v() {
62
- return v = Object.assign || function(e) {
63
- for (var i = 1; i < arguments.length; i++) {
64
- var r = arguments[i];
61
+ O.displayName = "Minus";
62
+ function b() {
63
+ return b = Object.assign || function(e) {
64
+ for (var o = 1; o < arguments.length; o++) {
65
+ var r = arguments[o];
65
66
  for (var t in r)
66
67
  Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
67
68
  }
68
69
  return e;
69
- }, v.apply(this, arguments);
70
+ }, b.apply(this, arguments);
70
71
  }
71
- function M(e, i) {
72
+ function R(e, o) {
72
73
  if (e == null) return {};
73
- var r = R(e, i), t, n;
74
+ var r = S(e, o), t, n;
74
75
  if (Object.getOwnPropertySymbols) {
75
- var o = Object.getOwnPropertySymbols(e);
76
- for (n = 0; n < o.length; n++)
77
- t = o[n], !(i.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
76
+ var i = Object.getOwnPropertySymbols(e);
77
+ for (n = 0; n < i.length; n++)
78
+ t = i[n], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
78
79
  }
79
80
  return r;
80
81
  }
81
- function R(e, i) {
82
+ function S(e, o) {
82
83
  if (e == null) return {};
83
- var r = {}, t = Object.keys(e), n, o;
84
- for (o = 0; o < t.length; o++)
85
- n = t[o], !(i.indexOf(n) >= 0) && (r[n] = e[n]);
84
+ var r = {}, t = Object.keys(e), n, i;
85
+ for (i = 0; i < t.length; i++)
86
+ n = t[i], !(o.indexOf(n) >= 0) && (r[n] = e[n]);
86
87
  return r;
87
88
  }
88
- var O = b(function(e, i) {
89
- var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, o = n === void 0 ? 24 : n, f = M(e, ["color", "size"]);
90
- return /* @__PURE__ */ p.createElement("svg", v({
91
- ref: i,
89
+ var g = d(function(e, o) {
90
+ var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, i = n === void 0 ? 24 : n, f = R(e, ["color", "size"]);
91
+ return /* @__PURE__ */ p.createElement("svg", b({
92
+ ref: o,
92
93
  xmlns: "http://www.w3.org/2000/svg",
93
- width: o,
94
- height: o,
94
+ width: i,
95
+ height: i,
95
96
  viewBox: "0 0 24 24",
96
97
  fill: "none",
97
98
  stroke: t,
@@ -110,37 +111,39 @@ var O = b(function(e, i) {
110
111
  y2: "12"
111
112
  }));
112
113
  });
113
- O.propTypes = {
114
+ g.propTypes = {
114
115
  color: a.string,
115
116
  size: a.oneOfType([a.string, a.number])
116
117
  };
117
- O.displayName = "Plus";
118
- const J = b(
118
+ g.displayName = "Plus";
119
+ const Q = d(
119
120
  ({
120
121
  className: e,
121
- init: i,
122
+ init: o,
122
123
  label: r,
123
124
  max: t = -1 / 0,
124
125
  min: n = 1 / 0,
125
- name: o,
126
+ name: i,
126
127
  theme: f,
127
128
  onChange: s
128
- }, P) => {
129
- const { theme: k } = T(), m = f ?? k, I = _(), [c, g] = E(() => i || 0), N = w(() => {
129
+ }, k) => {
130
+ const { theme: I } = $(), m = f ?? I, N = E(), [c, w] = T(() => o || 0), z = x(() => {
130
131
  let l = 0;
131
- n === 1 / 0 ? l = c - 1 : l = Math.max(n, c - 1), g(l), s == null || s(l);
132
- }, [c, n, s]), z = w(() => {
132
+ n === 1 / 0 ? l = c - 1 : l = Math.max(n, c - 1), w(l), s == null || s(l);
133
+ }, [c, n, s]), _ = x(() => {
133
134
  let l = 0;
134
- t === -1 / 0 ? l = c + 1 : l = Math.min(t, c + 1), g(l), s == null || s(l);
135
+ t === -1 / 0 ? l = c + 1 : l = Math.min(t, c + 1), w(l), s == null || s(l);
135
136
  }, [c, t, s]);
136
137
  return /* @__PURE__ */ y("div", { className: "flex flex-col gap-1", children: [
137
138
  r ? /* @__PURE__ */ u(
138
139
  "label",
139
140
  {
140
- htmlFor: o ?? I,
141
- className: $({
142
- theme: m
143
- }),
141
+ htmlFor: i ?? N,
142
+ className: h(
143
+ L({
144
+ theme: m
145
+ })
146
+ ),
144
147
  children: r
145
148
  }
146
149
  ) : null,
@@ -149,10 +152,12 @@ const J = b(
149
152
  "button",
150
153
  {
151
154
  type: "button",
152
- onClick: N,
153
- className: x({ theme: m, button: "rigth" }),
155
+ onClick: z,
156
+ className: h(
157
+ P({ theme: m, button: "rigth" })
158
+ ),
154
159
  children: [
155
- /* @__PURE__ */ u(d, { className: "w-4 h-4" }),
160
+ /* @__PURE__ */ u(O, { className: "w-4 h-4" }),
156
161
  /* @__PURE__ */ u(j, { children: "Decrement" })
157
162
  ]
158
163
  }
@@ -160,11 +165,13 @@ const J = b(
160
165
  /* @__PURE__ */ u(
161
166
  "input",
162
167
  {
163
- ref: P,
168
+ ref: k,
164
169
  type: "number",
165
170
  value: c,
166
- name: o,
167
- className: L({ className: e, theme: m }),
171
+ name: i,
172
+ className: h(
173
+ W({ className: e, theme: m })
174
+ ),
168
175
  readOnly: !0,
169
176
  "aria-label": r
170
177
  }
@@ -173,10 +180,12 @@ const J = b(
173
180
  "button",
174
181
  {
175
182
  type: "button",
176
- onClick: z,
177
- className: x({ theme: m, button: "left" }),
183
+ onClick: _,
184
+ className: h(
185
+ P({ theme: m, button: "left" })
186
+ ),
178
187
  children: [
179
- /* @__PURE__ */ u(O, { className: "w-4 h-4" }),
188
+ /* @__PURE__ */ u(g, { className: "w-4 h-4" }),
180
189
  /* @__PURE__ */ u(j, { children: "Increment" })
181
190
  ]
182
191
  }
@@ -186,5 +195,5 @@ const J = b(
186
195
  }
187
196
  );
188
197
  export {
189
- J as NumberInput
198
+ Q as NumberInput
190
199
  };
@@ -3,7 +3,7 @@ import "../../contexts/theme.context.js";
3
3
  import { useTheme as l } from "../../contexts/theme.hook.js";
4
4
  import "react";
5
5
  import "../../js.cookie-OLEfuq_g.js";
6
- import { cn as t } from "../../utils/index.js";
6
+ import { cn as o } from "../../utils/index.js";
7
7
  import { progressBarVariants as d, progressBarProgress as c } from "./ProgressBar.variants.js";
8
8
  const j = ({
9
9
  label: r,
@@ -11,20 +11,20 @@ const j = ({
11
11
  percent: s,
12
12
  status: n
13
13
  }) => {
14
- const { theme: a } = l(), o = m ?? a;
14
+ const { theme: a } = l(), t = m ?? a;
15
15
  return /* @__PURE__ */ e("div", { className: "w-full", children: [
16
- /* @__PURE__ */ e("div", { className: t("flex", r ? "justify-between" : "justify-end"), children: [
16
+ /* @__PURE__ */ e("div", { className: o("flex", r ? "justify-between" : "justify-end"), children: [
17
17
  r ? /* @__PURE__ */ i("label", { className: "font-semibold", children: r }) : null,
18
18
  /* @__PURE__ */ e("span", { className: "font-semibold", children: [
19
19
  s,
20
20
  "%"
21
21
  ] })
22
22
  ] }),
23
- /* @__PURE__ */ i("div", { className: d({ theme: o }), children: /* @__PURE__ */ i(
23
+ /* @__PURE__ */ i("div", { className: o(d({ theme: t })), children: /* @__PURE__ */ i(
24
24
  "div",
25
25
  {
26
- className: t(
27
- c({ theme: o, status: n }),
26
+ className: o(
27
+ c({ theme: t, status: n }),
28
28
  s > 0 && s < 99 ? "transition-width duration-500" : "transition-colors duration-0"
29
29
  ),
30
30
  style: { width: `${s}%` }
@@ -3,19 +3,20 @@ import { forwardRef as x, useId as N, useCallback as b } from "react";
3
3
  import "../../contexts/theme.context.js";
4
4
  import { useTheme as j } from "../../contexts/theme.hook.js";
5
5
  import "../../js.cookie-OLEfuq_g.js";
6
- import { radioVariants as F } from "./Radio.variants.js";
7
- const I = x(
6
+ import { cn as F } from "../../utils/index.js";
7
+ import { radioVariants as R } from "./Radio.variants.js";
8
+ const q = x(
8
9
  ({
9
- checked: i = !1,
10
- className: m,
10
+ checked: m = !1,
11
+ className: i,
11
12
  defaultChecked: a,
12
- label: l,
13
- name: s,
14
- theme: c,
15
- value: t,
13
+ label: c,
14
+ name: t,
15
+ theme: l,
16
+ value: s,
16
17
  onChange: e
17
- }, d) => {
18
- const p = N(), { theme: n } = j(), o = `${p}-${s}`, f = b(
18
+ }, p) => {
19
+ const d = N(), { theme: n } = j(), o = `${d}-${t}`, f = b(
19
20
  (h) => {
20
21
  e == null || e(h);
21
22
  },
@@ -30,29 +31,31 @@ const I = x(
30
31
  /* @__PURE__ */ r(
31
32
  "input",
32
33
  {
33
- ref: d,
34
+ ref: p,
34
35
  id: o,
35
36
  type: "radio",
36
- name: s,
37
- value: t,
38
- checked: i,
37
+ name: t,
38
+ value: s,
39
+ checked: m,
39
40
  defaultChecked: a,
40
41
  className: "hidden peer",
41
- onChange: () => f(t)
42
+ onChange: () => f(s)
42
43
  }
43
44
  ),
44
45
  /* @__PURE__ */ r(
45
46
  "span",
46
47
  {
47
- className: F({ className: m, theme: c ?? n })
48
+ className: F(
49
+ R({ className: i, theme: l ?? n })
50
+ )
48
51
  }
49
52
  ),
50
- /* @__PURE__ */ r("span", { className: "ml-2", children: l })
53
+ /* @__PURE__ */ r("span", { className: "ml-2", children: c })
51
54
  ]
52
55
  }
53
56
  );
54
57
  }
55
58
  );
56
59
  export {
57
- I as Radio
60
+ q as Radio
58
61
  };
@@ -1,37 +1,41 @@
1
- import { jsx as m, Fragment as n } from "react/jsx-runtime";
2
- import { useState as k, useCallback as l } from "react";
1
+ import { jsx as o, Fragment as N } from "react/jsx-runtime";
3
2
  import { S as R } from "../../index-DoOsnuB6.js";
3
+ import { useState as T, useCallback as a } from "react";
4
4
  import "../../contexts/theme.context.js";
5
- import { useTheme as T } from "../../contexts/theme.hook.js";
5
+ import { useTheme as b } from "../../contexts/theme.hook.js";
6
6
  import "../../js.cookie-OLEfuq_g.js";
7
- import { Radio as b } from "../Radio/Radio.js";
8
- const z = ({
9
- options: o,
10
- theme: r,
11
- name: c,
12
- asChild: s,
13
- defaultValue: i,
14
- onValueChange: e
7
+ import { cn as e } from "../../utils/index.js";
8
+ import { Radio as j } from "../Radio/Radio.js";
9
+ const D = ({
10
+ asChild: r,
11
+ className: c,
12
+ defaultValue: s,
13
+ name: i,
14
+ options: p,
15
+ theme: d,
16
+ wrapperClassName: f,
17
+ onValueChange: m
15
18
  }) => {
16
- const p = s ? R : "div", { theme: d } = T(), [f, S] = k(i), h = l(
19
+ const S = r ? R : "div", { theme: h } = b(), [n, x] = T(s), l = a(
17
20
  (t) => {
18
- S(t), e == null || e(t);
21
+ x(t), m == null || m(t);
19
22
  },
20
- [e]
23
+ [m]
21
24
  );
22
- return /* @__PURE__ */ m(p, { className: "flex gap-2", children: /* @__PURE__ */ m(n, { children: o.map(({ value: t, ...x }) => /* @__PURE__ */ m(
23
- b,
25
+ return /* @__PURE__ */ o(S, { className: e("flex gap-2", f), children: /* @__PURE__ */ o(N, { children: p.map(({ value: t, ...k }) => /* @__PURE__ */ o(
26
+ j,
24
27
  {
25
28
  value: t,
26
- theme: r ?? d,
27
- name: c,
28
- checked: f === t,
29
- onChange: () => h(t),
30
- ...x
29
+ theme: d ?? h,
30
+ name: i,
31
+ className: e(c),
32
+ checked: n === t,
33
+ onChange: () => l(t),
34
+ ...k
31
35
  },
32
36
  t
33
37
  )) }) });
34
38
  };
35
39
  export {
36
- z as RadioGroup
40
+ D as RadioGroup
37
41
  };
@@ -1,11 +1,12 @@
1
1
  import { RadioProps } from '../Radio/Radio.types';
2
2
  export interface RadioGroupProps {
3
+ asChild?: boolean;
4
+ className?: RadioProps['className'];
5
+ defaultValue?: string;
3
6
  label?: string;
4
7
  name: string;
5
8
  options: Omit<RadioProps, 'name'>[];
6
- asChild?: boolean;
7
9
  theme?: RadioProps['theme'];
8
- className?: RadioProps['className'];
9
- defaultValue?: string;
10
+ wrapperClassName?: string;
10
11
  onValueChange?: (value: string) => void;
11
12
  }
@@ -1,64 +1,64 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as R, useRef as V, useState as v, useImperativeHandle as T, useEffect as b, useCallback as j } from "react";
3
- import { R as k, T as w, a as y, b as l } from "../../index-z-AJyzdv.js";
4
- import { cn as C } from "../../utils/index.js";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { R as V, T as v, a as T, b as c } from "../../index-z-AJyzdv.js";
3
+ import { forwardRef as b, useRef as j, useState as k, useImperativeHandle as w, useEffect as y, useCallback as C } from "react";
5
4
  import "../../contexts/theme.context.js";
6
5
  import { useTheme as S } from "../../contexts/theme.hook.js";
7
6
  import "../../js.cookie-OLEfuq_g.js";
8
- import { rangeVariants as $, trackVariants as E, rangeOutsideVariants as H, thumbVariants as c } from "./Range.variants.js";
9
- const J = R(
7
+ import { cn as t } from "../../utils/index.js";
8
+ import { rangeVariants as $, trackVariants as E, rangeOutsideVariants as H, thumbVariants as i } from "./Range.variants.js";
9
+ const J = b(
10
10
  ({
11
- label: n,
12
- defaultValue: i = [0, 100],
13
- name: o,
14
- theme: u,
15
- size: m,
16
- showValue: h,
17
- ...f
18
- }, d) => {
19
- const t = V(null), [a, p] = v(i), { theme: x } = S(), s = u ?? x;
20
- T(d, () => t.current, [t]), b(() => {
21
- t.current && (t.current.value = `[${a.toString()}]`);
22
- }, [a]);
23
- const N = j(
24
- (g) => p(g),
11
+ label: m,
12
+ defaultValue: o = [0, 100],
13
+ name: u,
14
+ theme: h,
15
+ size: l,
16
+ showValue: f,
17
+ ...d
18
+ }, p) => {
19
+ const a = j(null), [s, x] = k(o), { theme: N } = S(), r = h ?? N;
20
+ w(p, () => a.current, [a]), y(() => {
21
+ a.current && (a.current.value = `[${s.toString()}]`);
22
+ }, [s]);
23
+ const g = C(
24
+ (R) => x(R),
25
25
  []
26
26
  );
27
- return /* @__PURE__ */ r("div", { className: "w-full relative flex flex-col gap-3", children: [
28
- /* @__PURE__ */ r(
27
+ return /* @__PURE__ */ n("div", { className: "w-full relative flex flex-col gap-3", children: [
28
+ /* @__PURE__ */ n(
29
29
  "div",
30
30
  {
31
- className: C(
31
+ className: t(
32
32
  "flex items-center",
33
- n ? "justify-between" : "justify-end"
33
+ m ? "justify-between" : "justify-end"
34
34
  ),
35
35
  children: [
36
- n ? /* @__PURE__ */ e("label", { children: n }) : null,
37
- h ? /* @__PURE__ */ r("span", { className: "text-xs", children: [
38
- a[0],
36
+ m ? /* @__PURE__ */ e("label", { children: m }) : null,
37
+ f ? /* @__PURE__ */ n("span", { className: "text-xs", children: [
38
+ s[0],
39
39
  " - ",
40
- a[1]
40
+ s[1]
41
41
  ] }) : null
42
42
  ]
43
43
  }
44
44
  ),
45
- /* @__PURE__ */ e("input", { ref: t, name: o, className: "hidden", type: "text" }),
46
- /* @__PURE__ */ r(
47
- k,
45
+ /* @__PURE__ */ e("input", { ref: a, name: u, className: "hidden", type: "text" }),
46
+ /* @__PURE__ */ n(
47
+ V,
48
48
  {
49
- value: a,
50
- className: $({ theme: s }),
51
- onValueChange: N,
52
- ...f,
49
+ value: s,
50
+ className: t($({ theme: r })),
51
+ onValueChange: g,
52
+ ...d,
53
53
  children: [
54
- /* @__PURE__ */ e(w, { className: E({ theme: s, size: m }), children: /* @__PURE__ */ e(
55
- y,
54
+ /* @__PURE__ */ e(v, { className: t(E({ theme: r, size: l })), children: /* @__PURE__ */ e(
55
+ T,
56
56
  {
57
- className: H({ theme: s })
57
+ className: t(H({ theme: r }))
58
58
  }
59
59
  ) }),
60
- /* @__PURE__ */ e(l, { className: c({ theme: s, size: m }) }),
61
- /* @__PURE__ */ e(l, { className: c({ theme: s, size: m }) })
60
+ /* @__PURE__ */ e(c, { className: t(i({ theme: r, size: l })) }),
61
+ /* @__PURE__ */ e(c, { className: t(i({ theme: r, size: l })) })
62
62
  ]
63
63
  }
64
64
  )
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { Footer, Logo, Navigation, NavigationGroup, NavigationOption, NavigationSeparator } from './components';
3
+ import { SidebarChildrenProps, SidebarProps } from './Sidebar.types';
4
+ declare const Sidebar: FC<SidebarProps> & SidebarChildrenProps;
5
+ export { Footer, Logo, Navigation, NavigationGroup, NavigationOption, NavigationSeparator, Sidebar, };
@@ -0,0 +1,27 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import "../../contexts/theme.context.js";
3
+ import "react";
4
+ import { ThemeProvider as t } from "../../contexts/theme.provider.js";
5
+ import { Footer as a } from "./components/Footer/Footer.js";
6
+ import { Logo as m } from "./components/Logo/Logo.js";
7
+ import { Navigation as p } from "./components/Navigation/Navigation.js";
8
+ import { NavigationGroup as n } from "./components/NavigationGroup/NavigationGroup.js";
9
+ import { NavigationOption as e } from "./components/NavigationOption/NavigationOption.js";
10
+ import { NavigationSeparator as g } from "./components/NavigationSeparator/NavigationSeparator.js";
11
+ import { Wrapper as f } from "./components/Wrapper/Wrapper.js";
12
+ const o = (i) => /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(f, { ...i }) });
13
+ o.Footer = a;
14
+ o.Logo = m;
15
+ o.Navigation = p;
16
+ o.NavigationGroup = n;
17
+ o.NavigationOption = e;
18
+ o.NavigationSeparator = g;
19
+ export {
20
+ a as Footer,
21
+ m as Logo,
22
+ p as Navigation,
23
+ n as NavigationGroup,
24
+ e as NavigationOption,
25
+ g as NavigationSeparator,
26
+ o as Sidebar
27
+ };
@@ -0,0 +1,17 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { FC, PropsWithChildren } from 'react';
3
+ import { wrapperSiderbarVariants } from './Sidebar.variants';
4
+ import { FooterProps, LogoProps, NavigationGroupProps, NavigationOptionProps, NavigationProps, NavigationSeparatorProps } from './components';
5
+ export interface SidebarProps extends VariantProps<typeof wrapperSiderbarVariants>, PropsWithChildren {
6
+ wrapperClassName?: string;
7
+ minWith?: number;
8
+ maxWith?: number;
9
+ }
10
+ export type SidebarChildrenProps = {
11
+ Footer: FC<FooterProps>;
12
+ Logo: FC<LogoProps>;
13
+ Navigation: FC<NavigationProps>;
14
+ NavigationGroup: FC<NavigationGroupProps>;
15
+ NavigationOption: FC<NavigationOptionProps>;
16
+ NavigationSeparator: FC<NavigationSeparatorProps>;
17
+ };
@@ -0,0 +1,6 @@
1
+ export declare const wrapperSiderbarVariants: (props?: ({
2
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const dragVariants: (props?: ({
5
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,56 @@
1
+ import { c as a } from "../../index-BNmRGtA6.js";
2
+ const r = a(
3
+ [
4
+ "group/sidebar",
5
+ "flex",
6
+ "flex-col",
7
+ "h-full",
8
+ "px-4",
9
+ "w-[256px]",
10
+ "relative",
11
+ "transition-all",
12
+ "duration-200",
13
+ "ease-linear"
14
+ ],
15
+ {
16
+ variants: {
17
+ theme: {
18
+ colony: "",
19
+ kubefirst: ["bg-kubefirst-dark-blue-900"],
20
+ civo: ""
21
+ }
22
+ },
23
+ defaultVariants: {
24
+ theme: "kubefirst"
25
+ }
26
+ }
27
+ ), t = a(
28
+ [
29
+ "absolute",
30
+ "top-0",
31
+ "right-0",
32
+ "h-full",
33
+ "opacity-0",
34
+ "group-hover/sidebar:opacity-100",
35
+ "cursor-col-resize",
36
+ "w-[2px]",
37
+ "shadow",
38
+ "shadow-slate-200"
39
+ ],
40
+ {
41
+ variants: {
42
+ theme: {
43
+ colony: "",
44
+ kubefirst: ["bg-slate-200"],
45
+ civo: ""
46
+ }
47
+ },
48
+ defaultVariants: {
49
+ theme: "kubefirst"
50
+ }
51
+ }
52
+ );
53
+ export {
54
+ t as dragVariants,
55
+ r as wrapperSiderbarVariants
56
+ };