@konstructio/ui 0.0.4 → 0.0.6

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 (42) hide show
  1. package/dist/{AlertDialogTrigger-lenvKoGF.js → AlertDialogTrigger-D4Tm_9M0.js} +2 -2
  2. package/dist/{Modal-Bg9UG35z.js → Modal-Ca3bkvvt.js} +2 -2
  3. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  4. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  5. package/dist/components/AlertDialog/components/index.js +1 -1
  6. package/dist/components/Autocomplete/Autocomplete.js +31 -30
  7. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  8. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  9. package/dist/components/Card/Card.d.ts +4 -0
  10. package/dist/components/Card/Card.js +38 -0
  11. package/dist/components/Card/Card.types.d.ts +7 -0
  12. package/dist/components/Card/Card.types.js +1 -0
  13. package/dist/components/Card/Card.variants.d.ts +10 -0
  14. package/dist/components/Card/Card.variants.js +87 -0
  15. package/dist/components/Checkbox/Checkbox.js +106 -101
  16. package/dist/components/Checkbox/Checkbox.types.d.ts +2 -0
  17. package/dist/components/Dropdown/components/List/List.js +14 -13
  18. package/dist/components/Dropdown/components/List/List.types.d.ts +1 -3
  19. package/dist/components/Dropdown/components/ListItem/ListItem.js +25 -18
  20. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +14 -3
  21. package/dist/components/Dropdown/components/Wrapper.js +46 -34
  22. package/dist/components/Modal/Modal.js +2 -2
  23. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
  24. package/dist/components/Modal/components/index.js +1 -1
  25. package/dist/components/NumberInput/NumberInput.js +65 -65
  26. package/dist/components/Range/Range.js +1 -1
  27. package/dist/components/Slider/Slider.js +1 -1
  28. package/dist/components/Switch/Switch.js +59 -49
  29. package/dist/components/Toast/Toast.js +3 -3
  30. package/dist/components/Tooltip/Tooltip.js +17 -17
  31. package/dist/components/Tooltip/Tooltip.variants.js +1 -1
  32. package/dist/components/index.js +1 -1
  33. package/dist/index-BaNV0qac.js +19164 -0
  34. package/dist/{index-O3j1K921.js → index-BedjZUuB.js} +1 -1
  35. package/dist/{index-ffjBR8Av.js → index-BtibbG81.js} +1 -1
  36. package/dist/{index-Ci9Yg4G1.js → index-z-AJyzdv.js} +1 -1
  37. package/dist/index.js +1 -1
  38. package/dist/package.json +36 -36
  39. package/dist/styles.css +1 -1
  40. package/dist/{useBreadcrumb-tyxjV-a1.js → useBreadcrumb-DxYsZvj_.js} +4 -4
  41. package/package.json +36 -36
  42. package/dist/index-OOfdXoxx.js +0 -423
@@ -2,9 +2,11 @@ import { InputHTMLAttributes } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { checkboxVariants } from './Checkbox.variants';
4
4
  export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'checked'>, VariantProps<typeof checkboxVariants> {
5
+ ariaLabelledBy?: string;
5
6
  className?: string;
6
7
  defaultChecked?: boolean;
7
8
  disabled?: boolean;
9
+ id?: string;
8
10
  label?: string;
9
11
  labelClassName?: string;
10
12
  name?: string;
@@ -1,25 +1,26 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as l, useRef as p, useImperativeHandle as a } from "react";
3
- import { cn as u } from "../../../../utils/index.js";
4
- import { useNavigationUlList as c } from "../../hooks/useNavigationList.js";
5
- import { useDropdownContext as d } from "../../contexts/dropdown.hook.js";
2
+ import { forwardRef as p, useRef as a, useImperativeHandle as u } from "react";
3
+ import { cn as c } from "../../../../utils/index.js";
4
+ import { useNavigationUlList as d } from "../../hooks/useNavigationList.js";
5
+ import { useDropdownContext as x } from "../../contexts/dropdown.hook.js";
6
6
  import "../../contexts/dropdown.context.js";
7
- import { ListItem as x } from "../ListItem/ListItem.js";
8
- import { listVariants as v } from "./List.variants.js";
9
- const j = l(
10
- ({ options: i, theme: o, wrapperRef: m, wrapperInputRef: s }, n) => {
11
- const r = p(null), { isOpen: f } = d();
12
- return a(n, () => r.current, [r]), c({ ulRef: r, wrapperRef: m, wrapperInputRef: s }), /* @__PURE__ */ e(
7
+ import { ListItem as v } from "../ListItem/ListItem.js";
8
+ import { listVariants as L } from "./List.variants.js";
9
+ const C = p(
10
+ ({ options: i, theme: t, wrapperRef: m, wrapperInputRef: s, name: l }, n) => {
11
+ const r = a(null), { isOpen: f } = x();
12
+ return u(n, () => r.current, [r]), d({ ulRef: r, wrapperRef: m, wrapperInputRef: s }), /* @__PURE__ */ e(
13
13
  "ul",
14
14
  {
15
15
  ref: r,
16
+ title: l,
16
17
  role: "listbox",
17
- className: u(v({ theme: o }), f ? "flex" : "hidden"),
18
- children: i.map((t) => /* @__PURE__ */ e(x, { theme: o, ...t }, t.value))
18
+ className: c(L({ theme: t }), f ? "flex" : "hidden"),
19
+ children: i.map((o) => /* @__PURE__ */ e(v, { theme: t, ...o }, o.value))
19
20
  }
20
21
  );
21
22
  }
22
23
  );
23
24
  export {
24
- j as List
25
+ C as List
25
26
  };
@@ -1,8 +1,6 @@
1
1
  import { ComponentRef, RefObject } from 'react';
2
2
  import { DropdownProps } from '../../Dropdown.types';
3
- export type ListProps = {
4
- options: DropdownProps['options'];
5
- theme: DropdownProps['theme'];
3
+ export type ListProps = Pick<DropdownProps, 'name' | 'options' | 'theme'> & {
6
4
  wrapperRef: RefObject<ComponentRef<'div'> | null>;
7
5
  wrapperInputRef: RefObject<ComponentRef<'div'> | null>;
8
6
  };
@@ -1,29 +1,36 @@
1
- import { jsx as s, jsxs as a } from "react/jsx-runtime";
2
- import { useCallback as c } from "react";
3
- import { useDropdownContext as m } from "../../contexts/dropdown.hook.js";
1
+ import { jsxs as m, jsx as f } from "react/jsx-runtime";
2
+ import { useRef as u, useCallback as r } from "react";
3
+ import { useDropdownContext as d } from "../../contexts/dropdown.hook.js";
4
4
  import "../../contexts/dropdown.context.js";
5
- import { listItemVariants as i } from "./ListItem.variants.js";
6
- const d = ({ theme: n, ...e }) => {
7
- const { setValue: t, toggleOpen: l } = m(), r = c(
8
- (o) => {
9
- t(o), l(!1);
5
+ import { listItemVariants as p } from "./ListItem.variants.js";
6
+ const y = ({ theme: o, ...e }) => {
7
+ const { setValue: n, toggleOpen: s } = d(), c = u(null), t = r(
8
+ (l) => {
9
+ n(l), s(!1);
10
10
  },
11
- [t, l]
11
+ [n, s]
12
+ ), a = r(
13
+ (l, i) => {
14
+ l.key === "Enter" && t(i);
15
+ },
16
+ [t]
12
17
  );
13
- return /* @__PURE__ */ s("li", { className: i({ theme: n }), role: "option", tabIndex: 0, children: /* @__PURE__ */ a(
14
- "button",
18
+ return /* @__PURE__ */ m(
19
+ "li",
15
20
  {
16
- type: "button",
17
- role: "button",
18
- className: "m-0 p-0 w-full flex items-center gap-3",
19
- onClick: () => r(e),
21
+ ref: c,
22
+ role: "option",
23
+ className: p({ theme: o }),
24
+ tabIndex: 0,
25
+ onClick: () => t(e),
26
+ onKeyDown: (l) => a(l, e),
20
27
  children: [
21
- e.leftIcon ? /* @__PURE__ */ s("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null,
28
+ e.leftIcon ? /* @__PURE__ */ f("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null,
22
29
  e.label
23
30
  ]
24
31
  }
25
- ) });
32
+ );
26
33
  };
27
34
  export {
28
- d as ListItem
35
+ y as ListItem
29
36
  };
@@ -1,6 +1,17 @@
1
1
  import { c as e } from "../../../../index-BNmRGtA6.js";
2
- const o = e(
3
- ["cursor-pointer", "py-1", "px-2", "h-full", "focus-visible:outline-none"],
2
+ const t = e(
3
+ [
4
+ "cursor-pointer",
5
+ "py-2",
6
+ "px-2",
7
+ "h-full",
8
+ "focus-visible:outline-none",
9
+ "m-0",
10
+ "w-full",
11
+ "flex",
12
+ "items-center",
13
+ "gap-3"
14
+ ],
4
15
  {
5
16
  variants: {
6
17
  theme: {
@@ -15,5 +26,5 @@ const o = e(
15
26
  }
16
27
  );
17
28
  export {
18
- o as listItemVariants
29
+ t as listItemVariants
19
30
  };
@@ -1,5 +1,5 @@
1
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as D, useId as F, useRef as b, useImperativeHandle as L, useEffect as m } from "react";
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as D, useId as F, useRef as N, useImperativeHandle as L, useEffect as f } from "react";
3
3
  import { cn as $ } from "../../../utils/index.js";
4
4
  import "../../../contexts/theme.context.js";
5
5
  import { useTheme as A } from "../../../contexts/theme.hook.js";
@@ -11,52 +11,54 @@ import "../contexts/dropdown.context.js";
11
11
  import { List as q } from "./List/List.js";
12
12
  import { C as z } from "../../../chevron-up-CvquEaNg.js";
13
13
  const _ = D(
14
- ({ theme: R, label: f, placeholder: g, name: i, options: l, defaultValue: c }, O) => {
15
- const p = F(), r = b(null), u = b(null), { wrapperRef: n, wrapperInputRef: d, handleOpen: j, handleOpenIfClosed: E } = U({ ulRef: u }), { isOpen: h, value: e, setValue: x, toggleOpen: w } = W(), { theme: T } = A(), v = R ?? T, C = i ? `${p}-${i}` : p;
16
- L(O, () => r.current, [r]), m(() => {
14
+ ({ theme: R, label: p, placeholder: g, name: o, options: a, defaultValue: c }, O) => {
15
+ const d = F(), r = N(null), u = N(null), { wrapperRef: n, wrapperInputRef: h, handleOpen: j, handleOpenIfClosed: y } = U({ ulRef: u }), { isOpen: x, value: e, setValue: w, toggleOpen: b } = W(), { theme: E } = A(), v = R ?? E, i = o ? `${d}-${o}` : d;
16
+ L(O, () => r.current, [r]), f(() => {
17
17
  r.current && (r.current.value = e ? e.value : "");
18
- }, [e]), m(() => {
18
+ }, [e]), f(() => {
19
19
  if (c) {
20
- const o = l.find(
21
- (s) => s.value === c
20
+ const s = a.find(
21
+ (l) => l.value === c
22
22
  );
23
- o && x(o);
23
+ s && w(s);
24
24
  }
25
- }, [c, l, x]), m(() => {
26
- var s;
27
- const o = new AbortController();
28
- return (s = n.current) == null || s.addEventListener("focusout", (y) => {
29
- var N;
30
- const I = y.relatedTarget;
31
- (!I || !((N = n.current) != null && N.contains(I))) && w(!1);
25
+ }, [c, a, w]), f(() => {
26
+ var l;
27
+ const s = new AbortController();
28
+ return (l = n.current) == null || l.addEventListener("focusout", (k) => {
29
+ var I;
30
+ const C = k.relatedTarget;
31
+ (!C || !((I = n.current) != null && I.contains(C))) && b(!1);
32
32
  }), () => {
33
- o.abort();
33
+ s.abort();
34
34
  };
35
- }, [w, n]);
36
- const k = () => e != null && e.leftIcon ? /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null;
37
- return /* @__PURE__ */ a("div", { ref: n, className: "flex flex-col w-full relative", children: [
38
- f ? /* @__PURE__ */ t(
35
+ }, [b, n]);
36
+ const T = () => e != null && e.leftIcon ? /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null;
37
+ return /* @__PURE__ */ m("div", { ref: n, className: "flex flex-col w-full relative", children: [
38
+ p ? /* @__PURE__ */ t(
39
39
  "label",
40
40
  {
41
+ id: i,
41
42
  className: "m-2 cursor-pointer",
42
- htmlFor: C,
43
- onClick: E,
44
- children: f
43
+ htmlFor: i,
44
+ onClick: y,
45
+ children: p
45
46
  }
46
47
  ) : null,
47
- /* @__PURE__ */ a(
48
+ /* @__PURE__ */ m(
48
49
  "div",
49
50
  {
50
- ref: d,
51
- id: C,
51
+ ref: h,
52
+ id: i,
52
53
  className: H({ theme: v }),
53
54
  role: "combobox",
54
55
  onClick: j,
55
- "aria-expanded": h,
56
+ "aria-expanded": x,
56
57
  tabIndex: 0,
58
+ "aria-labelledby": i,
57
59
  children: [
58
- /* @__PURE__ */ t("span", { className: "text-base text-inherit", children: e ? /* @__PURE__ */ a("span", { className: "flex gap-3 items-center", children: [
59
- k(),
60
+ /* @__PURE__ */ t("span", { className: "text-base text-inherit", children: e ? /* @__PURE__ */ m("span", { className: "flex gap-3 items-center", children: [
61
+ T(),
60
62
  e.label
61
63
  ] }) : g }),
62
64
  /* @__PURE__ */ t(
@@ -64,21 +66,31 @@ const _ = D(
64
66
  {
65
67
  className: $(
66
68
  "w-4 h-4 text-inherit transition-all duration-50",
67
- h ? "rotate-0" : "rotate-180"
69
+ x ? "rotate-0" : "rotate-180"
68
70
  )
69
71
  }
70
72
  )
71
73
  ]
72
74
  }
73
75
  ),
74
- /* @__PURE__ */ t("input", { ref: r, type: "text", name: i, className: "hidden" }),
76
+ /* @__PURE__ */ t(
77
+ "input",
78
+ {
79
+ ref: r,
80
+ type: "text",
81
+ name: o,
82
+ className: "hidden",
83
+ "aria-hidden": "true"
84
+ }
85
+ ),
75
86
  /* @__PURE__ */ t(
76
87
  q,
77
88
  {
78
89
  ref: u,
90
+ name: o,
79
91
  wrapperRef: n,
80
- wrapperInputRef: d,
81
- options: l,
92
+ wrapperInputRef: h,
93
+ options: a,
82
94
  theme: v
83
95
  }
84
96
  )
@@ -1,9 +1,9 @@
1
1
  import "react/jsx-runtime";
2
- import "../../index-OOfdXoxx.js";
2
+ import "../../index-BaNV0qac.js";
3
3
  import "./components/Body/Body.js";
4
4
  import "./components/Footer/Footer.js";
5
5
  import "./components/Header/Header.js";
6
- import { M as d } from "../../Modal-Bg9UG35z.js";
6
+ import { M as d } from "../../Modal-Ca3bkvvt.js";
7
7
  import "./hooks/useModal.js";
8
8
  export {
9
9
  d as Modal
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { W as b } from "../../../../Modal-Bg9UG35z.js";
3
+ import { W as b } from "../../../../Modal-Ca3bkvvt.js";
4
4
  import "../../../../Combination-Cmu9JRkv.js";
5
- import "../../../../index-ffjBR8Av.js";
5
+ import "../../../../index-BtibbG81.js";
6
6
  import "../../../../contexts/theme.context.js";
7
7
  import "../../../../contexts/theme.hook.js";
8
8
  import "../../../../js.cookie-OLEfuq_g.js";
@@ -1,7 +1,7 @@
1
1
  import { Body as e } from "./Body/Body.js";
2
2
  import { Footer as t } from "./Footer/Footer.js";
3
3
  import { Header as m } from "./Header/Header.js";
4
- import { W as a } from "../../../Modal-Bg9UG35z.js";
4
+ import { W as a } from "../../../Modal-Ca3bkvvt.js";
5
5
  export {
6
6
  e as Body,
7
7
  t as Footer,
@@ -1,45 +1,45 @@
1
1
  import { jsxs as y, jsx as u } from "react/jsx-runtime";
2
- import p, { forwardRef as v, useId as _, useState as E, useCallback as w } from "react";
3
- import { R as x } from "../../index-ffjBR8Av.js";
2
+ import p, { forwardRef as b, useId as _, useState as E, useCallback as w } from "react";
3
+ import { R as j } from "../../index-BtibbG81.js";
4
4
  import "../../contexts/theme.context.js";
5
5
  import { useTheme as T } from "../../contexts/theme.hook.js";
6
6
  import "../../js.cookie-OLEfuq_g.js";
7
- import { labelVariants as $, buttonVariants as j, numberInputVariants as L } from "./NumberInput.variants.js";
7
+ import { labelVariants as $, buttonVariants as x, numberInputVariants as L } from "./NumberInput.variants.js";
8
8
  import { P as a } from "../../index-D68N8v8R.js";
9
9
  function h() {
10
10
  return h = Object.assign || function(e) {
11
- for (var o = 1; o < arguments.length; o++) {
12
- var n = arguments[o];
13
- for (var t in n)
14
- Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
11
+ for (var i = 1; i < arguments.length; i++) {
12
+ var r = arguments[i];
13
+ for (var t in r)
14
+ Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
15
15
  }
16
16
  return e;
17
17
  }, h.apply(this, arguments);
18
18
  }
19
- function W(e, o) {
19
+ function W(e, i) {
20
20
  if (e == null) return {};
21
- var n = V(e, o), t, r;
21
+ var r = V(e, i), t, n;
22
22
  if (Object.getOwnPropertySymbols) {
23
- var i = Object.getOwnPropertySymbols(e);
24
- for (r = 0; r < i.length; r++)
25
- t = i[r], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
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]);
26
26
  }
27
- return n;
27
+ return r;
28
28
  }
29
- function V(e, o) {
29
+ function V(e, i) {
30
30
  if (e == null) return {};
31
- var n = {}, t = Object.keys(e), r, i;
32
- for (i = 0; i < t.length; i++)
33
- r = t[i], !(o.indexOf(r) >= 0) && (n[r] = e[r]);
34
- return n;
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]);
34
+ return r;
35
35
  }
36
- var d = v(function(e, o) {
37
- var n = e.color, t = n === void 0 ? "currentColor" : n, r = e.size, i = r === void 0 ? 24 : r, f = W(e, ["color", "size"]);
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
38
  return /* @__PURE__ */ p.createElement("svg", h({
39
- ref: o,
39
+ ref: i,
40
40
  xmlns: "http://www.w3.org/2000/svg",
41
- width: i,
42
- height: i,
41
+ width: o,
42
+ height: o,
43
43
  viewBox: "0 0 24 24",
44
44
  fill: "none",
45
45
  stroke: t,
@@ -58,40 +58,40 @@ d.propTypes = {
58
58
  size: a.oneOfType([a.string, a.number])
59
59
  };
60
60
  d.displayName = "Minus";
61
- function b() {
62
- return b = Object.assign || function(e) {
63
- for (var o = 1; o < arguments.length; o++) {
64
- var n = arguments[o];
65
- for (var t in n)
66
- Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
61
+ function v() {
62
+ return v = Object.assign || function(e) {
63
+ for (var i = 1; i < arguments.length; i++) {
64
+ var r = arguments[i];
65
+ for (var t in r)
66
+ Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
67
67
  }
68
68
  return e;
69
- }, b.apply(this, arguments);
69
+ }, v.apply(this, arguments);
70
70
  }
71
- function M(e, o) {
71
+ function M(e, i) {
72
72
  if (e == null) return {};
73
- var n = R(e, o), t, r;
73
+ var r = R(e, i), t, n;
74
74
  if (Object.getOwnPropertySymbols) {
75
- var i = Object.getOwnPropertySymbols(e);
76
- for (r = 0; r < i.length; r++)
77
- t = i[r], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
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]);
78
78
  }
79
- return n;
79
+ return r;
80
80
  }
81
- function R(e, o) {
81
+ function R(e, i) {
82
82
  if (e == null) return {};
83
- var n = {}, t = Object.keys(e), r, i;
84
- for (i = 0; i < t.length; i++)
85
- r = t[i], !(o.indexOf(r) >= 0) && (n[r] = e[r]);
86
- return n;
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]);
86
+ return r;
87
87
  }
88
- var O = v(function(e, o) {
89
- var n = e.color, t = n === void 0 ? "currentColor" : n, r = e.size, i = r === void 0 ? 24 : r, f = M(e, ["color", "size"]);
90
- return /* @__PURE__ */ p.createElement("svg", b({
91
- ref: o,
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,
92
92
  xmlns: "http://www.w3.org/2000/svg",
93
- width: i,
94
- height: i,
93
+ width: o,
94
+ height: o,
95
95
  viewBox: "0 0 24 24",
96
96
  fill: "none",
97
97
  stroke: t,
@@ -115,45 +115,45 @@ O.propTypes = {
115
115
  size: a.oneOfType([a.string, a.number])
116
116
  };
117
117
  O.displayName = "Plus";
118
- const J = v(
118
+ const J = b(
119
119
  ({
120
120
  className: e,
121
- init: o,
122
- label: n,
121
+ init: i,
122
+ label: r,
123
123
  max: t = -1 / 0,
124
- min: r = 1 / 0,
125
- name: i,
124
+ min: n = 1 / 0,
125
+ name: o,
126
126
  theme: f,
127
127
  onChange: s
128
128
  }, P) => {
129
- const { theme: k } = T(), m = f ?? k, I = _(), [c, g] = E(() => o || 0), N = w(() => {
129
+ const { theme: k } = T(), m = f ?? k, I = _(), [c, g] = E(() => i || 0), N = w(() => {
130
130
  let l = 0;
131
- r === 1 / 0 ? l = c - 1 : l = Math.max(r, c - 1), g(l), s == null || s(l);
132
- }, [c, r, s]), z = w(() => {
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(() => {
133
133
  let l = 0;
134
134
  t === -1 / 0 ? l = c + 1 : l = Math.min(t, c + 1), g(l), s == null || s(l);
135
135
  }, [c, t, s]);
136
136
  return /* @__PURE__ */ y("div", { className: "flex flex-col gap-1", children: [
137
- n ? /* @__PURE__ */ u(
137
+ r ? /* @__PURE__ */ u(
138
138
  "label",
139
139
  {
140
- htmlFor: i ?? I,
140
+ htmlFor: o ?? I,
141
141
  className: $({
142
142
  theme: m
143
143
  }),
144
- children: n
144
+ children: r
145
145
  }
146
146
  ) : null,
147
- /* @__PURE__ */ y("div", { className: "flex items-center", children: [
147
+ /* @__PURE__ */ y("div", { className: "flex items-center", role: "presentation", children: [
148
148
  /* @__PURE__ */ y(
149
149
  "button",
150
150
  {
151
151
  type: "button",
152
152
  onClick: N,
153
- className: j({ theme: m, button: "rigth" }),
153
+ className: x({ theme: m, button: "rigth" }),
154
154
  children: [
155
155
  /* @__PURE__ */ u(d, { className: "w-4 h-4" }),
156
- /* @__PURE__ */ u(x, { children: "Decrement" })
156
+ /* @__PURE__ */ u(j, { children: "Decrement" })
157
157
  ]
158
158
  }
159
159
  ),
@@ -163,10 +163,10 @@ const J = v(
163
163
  ref: P,
164
164
  type: "number",
165
165
  value: c,
166
- name: i,
166
+ name: o,
167
167
  className: L({ className: e, theme: m }),
168
168
  readOnly: !0,
169
- role: "textbox"
169
+ "aria-label": r
170
170
  }
171
171
  ),
172
172
  /* @__PURE__ */ y(
@@ -174,10 +174,10 @@ const J = v(
174
174
  {
175
175
  type: "button",
176
176
  onClick: z,
177
- className: j({ theme: m, button: "left" }),
177
+ className: x({ theme: m, button: "left" }),
178
178
  children: [
179
179
  /* @__PURE__ */ u(O, { className: "w-4 h-4" }),
180
- /* @__PURE__ */ u(x, { children: "Increment" })
180
+ /* @__PURE__ */ u(j, { children: "Increment" })
181
181
  ]
182
182
  }
183
183
  )
@@ -1,6 +1,6 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
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-Ci9Yg4G1.js";
3
+ import { R as k, T as w, a as y, b as l } from "../../index-z-AJyzdv.js";
4
4
  import { cn as C } from "../../utils/index.js";
5
5
  import "../../contexts/theme.context.js";
6
6
  import { useTheme as S } from "../../contexts/theme.hook.js";
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
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-Ci9Yg4G1.js";
3
+ import { R as g, T as j, b as k } from "../../index-z-AJyzdv.js";
4
4
  import "../../contexts/theme.context.js";
5
5
  import { useTheme as w } from "../../contexts/theme.hook.js";
6
6
  import "../../js.cookie-OLEfuq_g.js";