@konstructio/ui 0.0.8 → 0.0.10

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 (41) 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/Card/Card.js +30 -25
  12. package/dist/components/Checkbox/Checkbox.js +56 -51
  13. package/dist/components/Dropdown/components/ListItem/ListItem.js +18 -17
  14. package/dist/components/Dropdown/components/Wrapper.js +15 -15
  15. package/dist/components/Input/Input.js +4 -4
  16. package/dist/components/Modal/Modal.js +1 -1
  17. package/dist/components/Modal/components/Footer/Footer.js +5 -4
  18. package/dist/components/Modal/components/Header/Header.js +4 -3
  19. package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -3
  20. package/dist/components/Modal/components/index.js +1 -1
  21. package/dist/components/NumberInput/NumberInput.js +78 -69
  22. package/dist/components/ProgressBar/ProgressBar.js +6 -6
  23. package/dist/components/Radio/Radio.js +21 -18
  24. package/dist/components/RadioGroup/RadioGroup.js +26 -22
  25. package/dist/components/RadioGroup/RadioGroup.types.d.ts +4 -3
  26. package/dist/components/Range/Range.js +40 -40
  27. package/dist/components/Slider/Slider.js +25 -25
  28. package/dist/components/Switch/Switch.js +30 -30
  29. package/dist/components/Tag/Tag.js +5 -4
  30. package/dist/components/TagSelect/TagSelect.js +24 -24
  31. package/dist/components/TextArea/TextArea.js +17 -16
  32. package/dist/components/Toast/Toast.js +103 -97
  33. package/dist/components/Tooltip/Tooltip.js +12 -12
  34. package/dist/components/index.js +1 -1
  35. package/dist/index.js +1 -1
  36. package/dist/package.json +16 -3
  37. package/package.json +16 -3
  38. package/dist/components/Autocomplete/components/List.js +0 -57
  39. /package/dist/components/Autocomplete/components/{List.d.ts → List/List.d.ts} +0 -0
  40. /package/dist/components/Autocomplete/components/{List.types.js → List/List.types.js} +0 -0
  41. /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
  )
@@ -1,46 +1,46 @@
1
- import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as N, useRef as v, useState as T, useImperativeHandle as V, useEffect as b, useCallback as R } from "react";
3
- import { R as g, T as j, b as k } from "../../index-z-AJyzdv.js";
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import { R as v, T, b as V } from "../../index-z-AJyzdv.js";
3
+ import { forwardRef as b, useRef as R, useState as g, useImperativeHandle as j, useEffect as k, useCallback as w } from "react";
4
4
  import "../../contexts/theme.context.js";
5
- import { useTheme as w } from "../../contexts/theme.hook.js";
5
+ import { useTheme as y } from "../../contexts/theme.hook.js";
6
6
  import "../../js.cookie-OLEfuq_g.js";
7
- import { cn as y } from "../../utils/index.js";
7
+ import { cn as a } from "../../utils/index.js";
8
8
  import { sliderVariants as C, trackVariants as S, thumbVariants as E } from "./Slider.variants.js";
9
- const J = N(
10
- ({ label: a, defaultValue: m = [0], name: i, theme: c, size: l, showValue: o, ...u }, f) => {
11
- const e = v(null), [r, h] = T(m), { theme: d } = w(), s = c ?? d;
12
- V(f, () => e.current, [e]), b(() => {
9
+ const J = b(
10
+ ({ label: s, defaultValue: i = [0], name: c, theme: o, size: m, showValue: u, ...f }, h) => {
11
+ const e = R(null), [r, d] = g(i), { theme: p } = y(), n = o ?? p;
12
+ j(h, () => e.current, [e]), k(() => {
13
13
  e.current && (e.current.value = r.toString());
14
14
  }, [r]);
15
- const p = R(
16
- (x) => h(x),
15
+ const x = w(
16
+ (N) => d(N),
17
17
  []
18
18
  );
19
- return /* @__PURE__ */ n("div", { className: "w-full relative flex flex-col gap-3", children: [
20
- /* @__PURE__ */ n(
19
+ return /* @__PURE__ */ l("div", { className: "w-full relative flex flex-col gap-3", children: [
20
+ /* @__PURE__ */ l(
21
21
  "div",
22
22
  {
23
- className: y(
23
+ className: a(
24
24
  "flex items-center",
25
- a ? "justify-between" : "justify-end"
25
+ s ? "justify-between" : "justify-end"
26
26
  ),
27
27
  children: [
28
- a ? /* @__PURE__ */ t("label", { children: a }) : null,
29
- o ? /* @__PURE__ */ t("span", { className: "text-xs", children: r }) : null
28
+ s ? /* @__PURE__ */ t("label", { children: s }) : null,
29
+ u ? /* @__PURE__ */ t("span", { className: "text-xs", children: r }) : null
30
30
  ]
31
31
  }
32
32
  ),
33
- /* @__PURE__ */ t("input", { ref: e, name: i, className: "hidden", type: "number" }),
34
- /* @__PURE__ */ n(
35
- g,
33
+ /* @__PURE__ */ t("input", { ref: e, name: c, className: "hidden", type: "number" }),
34
+ /* @__PURE__ */ l(
35
+ v,
36
36
  {
37
37
  value: r,
38
- className: C({ theme: s }),
39
- onValueChange: p,
40
- ...u,
38
+ className: a(C({ theme: n })),
39
+ onValueChange: x,
40
+ ...f,
41
41
  children: [
42
- /* @__PURE__ */ t(j, { className: S({ theme: s, size: l }) }),
43
- /* @__PURE__ */ t(k, { className: E({ theme: s, size: l }) })
42
+ /* @__PURE__ */ t(T, { className: a(S({ theme: n, size: m })) }),
43
+ /* @__PURE__ */ t(V, { className: a(E({ theme: n, size: m })) })
44
44
  ]
45
45
  }
46
46
  )