@vkzstudio/muza-ui 1.0.6 → 1.0.8

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 (107) hide show
  1. package/dist/components/Button/buttonVariants.d.ts +1 -1
  2. package/dist/components/Calendar/Calendar.d.ts +2 -2
  3. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  4. package/dist/components/Calendar/Calendar.js +158 -150
  5. package/dist/components/Chip/Chip.d.ts +43 -0
  6. package/dist/components/Chip/Chip.d.ts.map +1 -0
  7. package/dist/components/Chip/Chip.js +98 -0
  8. package/dist/components/Chip/Chip.stories.d.ts +9 -0
  9. package/dist/components/Chip/Chip.stories.d.ts.map +1 -0
  10. package/dist/components/Chip/index.d.ts +2 -0
  11. package/dist/components/Chip/index.d.ts.map +1 -0
  12. package/dist/components/DataTable/DataTable.d.ts +23 -0
  13. package/dist/components/DataTable/DataTable.d.ts.map +1 -0
  14. package/dist/components/DataTable/DataTable.js +101 -0
  15. package/dist/components/DataTable/DataTable.stories.d.ts +14 -0
  16. package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -0
  17. package/dist/components/DataTable/index.d.ts +2 -0
  18. package/dist/components/DataTable/index.d.ts.map +1 -0
  19. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  20. package/dist/components/Dialog/Dialog.js +28 -26
  21. package/dist/components/ExpandableTable/Table.d.ts +1 -1
  22. package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
  23. package/dist/components/FileUpload/FileItem.js +81 -77
  24. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  25. package/dist/components/FileUpload/FileUpload.js +98 -94
  26. package/dist/components/Flex/Flex.d.ts +1 -1
  27. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  28. package/dist/components/MultiSelect/MultiSelect.js +51 -50
  29. package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts +19 -0
  30. package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts.map +1 -0
  31. package/dist/components/MuzaUIProvider/MuzaUIProvider.js +19 -0
  32. package/dist/components/MuzaUIProvider/MuzaUIProvider.stories.d.ts +10 -0
  33. package/dist/components/MuzaUIProvider/MuzaUIProvider.stories.d.ts.map +1 -0
  34. package/dist/components/MuzaUIProvider/index.d.ts +2 -0
  35. package/dist/components/MuzaUIProvider/index.d.ts.map +1 -0
  36. package/dist/components/Reorderable/Reorderable.d.ts +100 -0
  37. package/dist/components/Reorderable/Reorderable.d.ts.map +1 -0
  38. package/dist/components/Reorderable/Reorderable.js +197 -0
  39. package/dist/components/Reorderable/Reorderable.stories.d.ts +14 -0
  40. package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -0
  41. package/dist/components/Reorderable/index.d.ts +2 -0
  42. package/dist/components/Reorderable/index.d.ts.map +1 -0
  43. package/dist/components/ReorderableTable/ReorderableTable.d.ts +40 -0
  44. package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -0
  45. package/dist/components/ReorderableTable/ReorderableTable.js +175 -0
  46. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +18 -0
  47. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -0
  48. package/dist/components/ReorderableTable/index.d.ts +2 -0
  49. package/dist/components/ReorderableTable/index.d.ts.map +1 -0
  50. package/dist/components/Searchbar/Searchbar.d.ts +1 -1
  51. package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
  52. package/dist/components/Searchbar/Searchbar.js +50 -49
  53. package/dist/components/Select/Select.d.ts.map +1 -1
  54. package/dist/components/Select/Select.js +43 -42
  55. package/dist/components/Stepper/Stepper.d.ts +1 -1
  56. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  57. package/dist/components/Stepper/Stepper.js +43 -42
  58. package/dist/components/SwipeButton/SwipeButton.d.ts +1 -1
  59. package/dist/components/SwipeButton/SwipeButton.d.ts.map +1 -1
  60. package/dist/components/SwipeButton/SwipeButton.js +85 -84
  61. package/dist/components/SwipeButton/SwipeButton.stories.d.ts +1 -1
  62. package/dist/components/Typography/Typography.d.ts +1 -1
  63. package/dist/components/index.d.ts +6 -0
  64. package/dist/components/index.d.ts.map +1 -1
  65. package/dist/index.js +217 -189
  66. package/dist/muza-ui.css +1 -1
  67. package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  68. package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
  69. package/dist/node_modules/date-fns/constants.js +4 -0
  70. package/dist/node_modules/date-fns/constructFrom.js +8 -0
  71. package/dist/node_modules/date-fns/isSameWeek.js +14 -0
  72. package/dist/node_modules/date-fns/locale/cs/_lib/formatDistance.js +275 -0
  73. package/dist/node_modules/date-fns/locale/cs/_lib/formatLong.js +33 -0
  74. package/dist/node_modules/date-fns/locale/cs/_lib/formatRelative.js +25 -0
  75. package/dist/node_modules/date-fns/locale/cs/_lib/localize.js +167 -0
  76. package/dist/node_modules/date-fns/locale/cs/_lib/match.js +109 -0
  77. package/dist/node_modules/date-fns/locale/cs.js +21 -0
  78. package/dist/node_modules/date-fns/locale/sk/_lib/formatDistance.js +158 -0
  79. package/dist/node_modules/date-fns/locale/sk/_lib/formatLong.js +33 -0
  80. package/dist/node_modules/date-fns/locale/sk/_lib/formatRelative.js +60 -0
  81. package/dist/node_modules/date-fns/locale/sk/_lib/localize.js +175 -0
  82. package/dist/node_modules/date-fns/locale/sk/_lib/match.js +111 -0
  83. package/dist/node_modules/date-fns/locale/sk.js +21 -0
  84. package/dist/node_modules/date-fns/startOfWeek.js +11 -0
  85. package/dist/node_modules/date-fns/toDate.js +8 -0
  86. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +38 -0
  87. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +29 -0
  88. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.js +17 -0
  89. package/dist/node_modules/framer-motion/dist/es/context/ReorderContext.js +5 -0
  90. package/dist/node_modules/motion-utils/dist/es/array.js +15 -6
  91. package/dist/translations/TranslationContext.d.ts +61 -0
  92. package/dist/translations/TranslationContext.d.ts.map +1 -0
  93. package/dist/translations/TranslationContext.js +74 -0
  94. package/dist/translations/index.d.ts +6 -0
  95. package/dist/translations/index.d.ts.map +1 -0
  96. package/dist/translations/locales/cs.d.ts +3 -0
  97. package/dist/translations/locales/cs.d.ts.map +1 -0
  98. package/dist/translations/locales/cs.js +56 -0
  99. package/dist/translations/locales/en.d.ts +3 -0
  100. package/dist/translations/locales/en.d.ts.map +1 -0
  101. package/dist/translations/locales/en.js +56 -0
  102. package/dist/translations/locales/sk.d.ts +3 -0
  103. package/dist/translations/locales/sk.d.ts.map +1 -0
  104. package/dist/translations/locales/sk.js +56 -0
  105. package/dist/translations/types.d.ts +126 -0
  106. package/dist/translations/types.d.ts.map +1 -0
  107. package/package.json +2 -2
@@ -1,81 +1,82 @@
1
- import { jsxs as w, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as R, jsx as e } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { MagnifyingGlass as z } from "../Icons/CustomIcons.js";
4
- import { cn as a } from "../../utils/cn.js";
3
+ import { useMuzaTranslations as j } from "../../translations/TranslationContext.js";
4
+ import { MagnifyingGlass as w } from "../Icons/CustomIcons.js";
5
+ import { cn as s } from "../../utils/cn.js";
5
6
  import { CloseCircleBold as I } from "@solar-icons/react-perf";
6
- import { Input as V } from "../Input/Input.js";
7
- const G = ({
8
- className: m,
9
- error: p = !1,
7
+ import { Input as M } from "../Input/Input.js";
8
+ const F = ({
9
+ className: p,
10
+ error: h = !1,
10
11
  size: x = "sm",
11
12
  showButtons: d = !0,
12
13
  clearButtonAriaLabel: y,
13
- searchButtonAriaLabel: h,
14
- disabled: e = !1,
15
- value: o,
14
+ searchButtonAriaLabel: b,
15
+ disabled: r = !1,
16
+ value: a,
16
17
  defaultValue: k,
17
18
  name: v,
18
19
  placeholder: g,
19
- onChange: s,
20
+ onChange: o,
20
21
  onSubmit: i,
21
- ...N
22
+ ...B
22
23
  }) => {
23
- const f = n.useRef(null), [c, l] = n.useState(
24
- o ?? k ?? ""
24
+ const u = j(), A = y ?? u.searchbar.clearButtonAriaLabel, L = b ?? u.searchbar.searchButtonAriaLabel, f = n.useRef(null), [c, l] = n.useState(
25
+ a ?? k ?? ""
25
26
  );
26
27
  n.useEffect(() => {
27
- o !== void 0 && l(o);
28
- }, [o]);
29
- const C = (t) => {
30
- l(t.target.value), s && s(t);
31
- }, R = () => {
32
- var t, u;
33
- l(""), (u = (t = f.current) == null ? void 0 : t.querySelector("input")) == null || u.focus(), s && s({
28
+ a !== void 0 && l(a);
29
+ }, [a]);
30
+ const N = (t) => {
31
+ l(t.target.value), o && o(t);
32
+ }, z = () => {
33
+ var t, m;
34
+ l(""), (m = (t = f.current) == null ? void 0 : t.querySelector("input")) == null || m.focus(), o && o({
34
35
  target: { value: "" }
35
36
  });
36
- }, j = d ? /* @__PURE__ */ w("div", { className: "flex gap-sm", children: [
37
- /* @__PURE__ */ r(
37
+ }, C = d ? /* @__PURE__ */ R("div", { className: "flex gap-sm", children: [
38
+ /* @__PURE__ */ e(
38
39
  "button",
39
40
  {
40
- className: a(
41
+ className: s(
41
42
  "flex shrink-0 cursor-pointer items-center focus-visible-default transition-opacity",
42
43
  {
43
44
  "opacity-0": !c,
44
- "cursor-not-allowed": e
45
+ "cursor-not-allowed": r
45
46
  }
46
47
  ),
47
- "aria-label": y,
48
+ "aria-label": A,
48
49
  type: "button",
49
- onClick: R,
50
- children: /* @__PURE__ */ r(
50
+ onClick: z,
51
+ children: /* @__PURE__ */ e(
51
52
  I,
52
53
  {
53
- className: a("size-icon-small text-icon-dark-secondary-def", {
54
- "text-text-dark-tertiary": e
54
+ className: s("size-icon-small text-icon-dark-secondary-def", {
55
+ "text-text-dark-tertiary": r
55
56
  })
56
57
  }
57
58
  )
58
59
  }
59
60
  ),
60
- /* @__PURE__ */ r(
61
+ /* @__PURE__ */ e(
61
62
  "button",
62
63
  {
63
- className: a(
64
+ className: s(
64
65
  "flex shrink-0 cursor-pointer items-center focus-visible-default",
65
66
  {
66
- "cursor-not-allowed": e
67
+ "cursor-not-allowed": r
67
68
  }
68
69
  ),
69
- "aria-label": h,
70
+ "aria-label": L,
70
71
  type: "submit",
71
- children: /* @__PURE__ */ r(
72
- z,
72
+ children: /* @__PURE__ */ e(
73
+ w,
73
74
  {
74
- className: a(
75
+ className: s(
75
76
  "size-icon-small text-icon-dark-primary-def transition-colors",
76
77
  {
77
- "text-text-dark-tertiary": e,
78
- "group-hover:text-icon-dark-primary-hover": !e
78
+ "text-text-dark-tertiary": r,
79
+ "group-hover:text-icon-dark-primary-hover": !r
79
80
  }
80
81
  )
81
82
  }
@@ -83,33 +84,33 @@ const G = ({
83
84
  }
84
85
  )
85
86
  ] }) : void 0;
86
- return /* @__PURE__ */ r(
87
+ return /* @__PURE__ */ e(
87
88
  "form",
88
89
  {
89
90
  ref: f,
90
91
  onSubmit: (t) => {
91
92
  t.preventDefault(), c.length > 0 && (i == null || i(t));
92
93
  },
93
- className: m,
94
- children: /* @__PURE__ */ r(
95
- V,
94
+ className: p,
95
+ children: /* @__PURE__ */ e(
96
+ M,
96
97
  {
97
- suffix: j,
98
+ suffix: C,
98
99
  type: "text",
99
100
  size: x,
100
- error: p,
101
- disabled: e,
101
+ error: h,
102
+ disabled: r,
102
103
  value: c,
103
104
  name: v,
104
- onChange: C,
105
+ onChange: N,
105
106
  placeholder: g,
106
107
  className: "group",
107
- ...N
108
+ ...B
108
109
  }
109
110
  )
110
111
  }
111
112
  );
112
113
  };
113
114
  export {
114
- G as Searchbar
115
+ F as Searchbar
115
116
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AAad,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAA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AAA;QACb,KAAK,EAAE,SAAS,CAAA;QAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB,CAAC,CAAA;IACF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,MAAM,wFA8LlB,CAAA"}
@@ -1,26 +1,27 @@
1
1
  import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
- import m, { forwardRef as C, useMemo as V, useRef as N, useEffect as R } from "react";
3
- import { triggerWrapperVariants as A } from "./utils.js";
2
+ import m, { forwardRef as A, useMemo as I, useRef as N, useEffect as R } from "react";
3
+ import { triggerWrapperVariants as j } from "./utils.js";
4
+ import { useMuzaTranslations as E } from "../../translations/TranslationContext.js";
4
5
  import { Typography as s } from "../Typography/Typography.js";
5
- import { DropdownMenu as I, DropdownMenuTrigger as j, DropdownMenuContent as E, DropdownMenuRadioGroup as _, DropdownMenuRadioItem as k } from "../DropdownMenu/DropdownMenu.js";
6
- import { AltArrowUpOutline as B } from "@solar-icons/react-perf";
7
- import { cn as F } from "../../utils/cn.js";
8
- const G = C(
9
- (S, f) => {
10
- const {
11
- label: x,
12
- hint: g,
13
- error: h,
6
+ import { DropdownMenu as P, DropdownMenuTrigger as _, DropdownMenuContent as k, DropdownMenuRadioGroup as B, DropdownMenuRadioItem as F } from "../DropdownMenu/DropdownMenu.js";
7
+ import { AltArrowUpOutline as G } from "@solar-icons/react-perf";
8
+ import { cn as L } from "../../utils/cn.js";
9
+ const U = A(
10
+ (z, f) => {
11
+ const S = E(), {
12
+ label: h,
13
+ hint: x,
14
+ error: g,
14
15
  options: c,
15
- onChange: i,
16
+ onChange: a,
16
17
  value: r,
17
- disabled: a,
18
+ disabled: i,
18
19
  prefix: b,
19
- size: z,
20
- placeholder: w = "Select...",
21
- shouldScrollToSelectedOption: v,
20
+ size: M,
21
+ placeholder: T,
22
+ shouldScrollToSelectedOption: w,
22
23
  collisionPadding: D
23
- } = S, M = V(() => {
24
+ } = z, v = T ?? S.select.placeholder, O = I(() => {
24
25
  const e = r && c.find((l) => l.value === r);
25
26
  return e ? typeof e.label != "function" ? /* @__PURE__ */ t(
26
27
  s,
@@ -38,13 +39,13 @@ const G = C(
38
39
  className: "grow-1 fix-y-text truncate text-left text-comp-select-text-placeholder",
39
40
  weight: "regular",
40
41
  component: "span",
41
- children: w
42
+ children: v
42
43
  }
43
44
  );
44
- }, [c, r, w]), [o, O] = m.useState(!1), [y, T] = m.useState(0), d = m.useRef(!1), W = N(null), u = N({}), n = (typeof f == "function" ? null : f) ?? W;
45
+ }, [c, r, v]), [o, W] = m.useState(!1), [y, C] = m.useState(0), d = m.useRef(!1), V = N(null), u = N({}), n = (typeof f == "function" ? null : f) ?? V;
45
46
  return R(() => {
46
47
  const e = () => {
47
- n.current && T(n.current.offsetWidth);
48
+ n.current && C(n.current.offsetWidth);
48
49
  };
49
50
  e();
50
51
  const l = new ResizeObserver(e);
@@ -53,47 +54,47 @@ const G = C(
53
54
  };
54
55
  }, [n]), R(() => {
55
56
  var e;
56
- o && r && u.current[r] && v && ((e = u.current[r]) == null || e.scrollIntoView({ block: "nearest" }));
57
- }, [o, v, r]), /* @__PURE__ */ p("div", { className: "flex flex-1 flex-col gap-sm", children: [
58
- x && /* @__PURE__ */ t(
57
+ o && r && u.current[r] && w && ((e = u.current[r]) == null || e.scrollIntoView({ block: "nearest" }));
58
+ }, [o, w, r]), /* @__PURE__ */ p("div", { className: "flex flex-1 flex-col gap-sm", children: [
59
+ h && /* @__PURE__ */ t(
59
60
  s,
60
61
  {
61
62
  component: "label",
62
63
  size: "sm",
63
64
  weight: "regular",
64
65
  className: "text-comp-select-text-primary",
65
- children: x
66
+ children: h
66
67
  }
67
68
  ),
68
69
  /* @__PURE__ */ p(
69
- I,
70
+ P,
70
71
  {
71
72
  onOpenChange: (e) => {
72
- O(e);
73
+ W(e);
73
74
  },
74
75
  children: [
75
- /* @__PURE__ */ t(j, { disabled: a, asChild: !0, children: /* @__PURE__ */ t(
76
+ /* @__PURE__ */ t(_, { disabled: i, asChild: !0, children: /* @__PURE__ */ t(
76
77
  "button",
77
78
  {
78
79
  ref: n,
79
80
  type: "button",
80
81
  role: "input",
81
82
  tabIndex: 0,
82
- disabled: a,
83
- className: A({ size: z, error: h, expanded: o }),
83
+ disabled: i,
84
+ className: j({ size: M, error: g, expanded: o }),
84
85
  children: /* @__PURE__ */ p("div", { className: "flex min-w-0 flex-1 items-center gap-sm", children: [
85
86
  b && /* @__PURE__ */ t(
86
87
  "span",
87
88
  {
88
- className: a ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def",
89
+ className: i ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def",
89
90
  children: b
90
91
  }
91
92
  ),
92
- M,
93
+ O,
93
94
  /* @__PURE__ */ t(
94
- B,
95
+ G,
95
96
  {
96
- className: F(
97
+ className: L(
97
98
  "transition-transform duration-200",
98
99
  o ? "rotate-0" : "rotate-180"
99
100
  )
@@ -103,7 +104,7 @@ const G = C(
103
104
  }
104
105
  ) }),
105
106
  /* @__PURE__ */ t(
106
- E,
107
+ k,
107
108
  {
108
109
  className: "mt-1",
109
110
  style: {
@@ -114,14 +115,14 @@ const G = C(
114
115
  },
115
116
  collisionPadding: D,
116
117
  children: /* @__PURE__ */ t(
117
- _,
118
+ B,
118
119
  {
119
120
  value: r,
120
121
  onValueChange: (e) => {
121
- d.current = !0, i == null || i(e);
122
+ d.current = !0, a == null || a(e);
122
123
  },
123
124
  children: c.map((e) => /* @__PURE__ */ t(
124
- k,
125
+ F,
125
126
  {
126
127
  value: e.value.toString(),
127
128
  disabled: e.disabled,
@@ -140,20 +141,20 @@ const G = C(
140
141
  ]
141
142
  }
142
143
  ),
143
- g && /* @__PURE__ */ t(
144
+ x && /* @__PURE__ */ t(
144
145
  s,
145
146
  {
146
147
  component: "p",
147
148
  size: "sm",
148
149
  weight: "regular",
149
- className: h ? "text-comp-select-text-error" : "text-comp-select-text-secondary",
150
- children: g
150
+ className: g ? "text-comp-select-text-error" : "text-comp-select-text-secondary",
151
+ children: x
151
152
  }
152
153
  )
153
154
  ] });
154
155
  }
155
156
  );
156
- G.displayName = "Select";
157
+ U.displayName = "Select";
157
158
  export {
158
- G as Select
159
+ U as Select
159
160
  };
@@ -13,6 +13,6 @@ export interface StepperProps {
13
13
  className?: string;
14
14
  onLimitReached?: (limit: 'min' | 'max') => void;
15
15
  }
16
- declare const Stepper: ({ value, defaultValue, onChange, min, max, step, disabled, formatValue, incrementAriaLabel, decrementAriaLabel, className, onLimitReached, }: StepperProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const Stepper: ({ value, defaultValue, onChange, min, max, step, disabled, formatValue, incrementAriaLabel: incrementAriaLabelProp, decrementAriaLabel: decrementAriaLabelProp, className, onLimitReached, }: StepperProps) => import("react/jsx-runtime").JSX.Element;
17
17
  export { Stepper };
18
18
  //# sourceMappingURL=Stepper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAE3B,KAAK,EAAE,MAAM,CAAA;IAEb,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAElC,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAEvC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,KAAK,IAAI,CAAA;CAChD;AAED,QAAA,MAAM,OAAO,GAAI,8IAad,YAAY,4CA6Ed,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAE3B,KAAK,EAAE,MAAM,CAAA;IAEb,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAElC,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAEvC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,KAAK,IAAI,CAAA;CAChD;AAED,QAAA,MAAM,OAAO,GAAI,8LAad,YAAY,4CAmFd,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -1,84 +1,85 @@
1
- import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
- import { useState as j, useEffect as n } from "react";
3
- import { StepperButton as v } from "./StepperButton.js";
4
- import { Typography as w } from "../Typography/Typography.js";
5
- import { cn as z } from "../../utils/cn.js";
6
- import { MinusCircleBold as D, AddCircleBold as A } from "@solar-icons/react-perf";
7
- const G = ({
8
- value: d,
1
+ import { jsxs as w, jsx as l } from "react/jsx-runtime";
2
+ import { useState as I, useEffect as M } from "react";
3
+ import { StepperButton as b } from "./StepperButton.js";
4
+ import { useMuzaTranslations as T } from "../../translations/TranslationContext.js";
5
+ import { Typography as D } from "../Typography/Typography.js";
6
+ import { cn as x } from "../../utils/cn.js";
7
+ import { MinusCircleBold as E, AddCircleBold as Y } from "@solar-icons/react-perf";
8
+ const P = ({
9
+ value: f,
9
10
  defaultValue: p,
10
11
  onChange: r,
11
- min: c,
12
+ min: i,
12
13
  max: o,
13
- step: N,
14
+ step: z,
14
15
  disabled: m,
15
- formatValue: u,
16
- incrementAriaLabel: b = "Increment",
17
- decrementAriaLabel: y = "Decrement",
18
- className: k,
19
- onLimitReached: e
16
+ formatValue: d,
17
+ incrementAriaLabel: v,
18
+ decrementAriaLabel: A,
19
+ className: N,
20
+ onLimitReached: s
20
21
  }) => {
21
- const i = d !== void 0, [S, f] = j(p ?? 0), s = i ? d : S, x = N ?? 1;
22
- n(() => {
23
- !i && p !== void 0 && f(p);
24
- }, [p, i]);
22
+ const n = T(), y = v ?? n.stepper.incrementAriaLabel, k = A ?? n.stepper.decrementAriaLabel, c = f !== void 0, [S, a] = I(p ?? 0), e = c ? f : S, u = z ?? 1;
23
+ M(() => {
24
+ !c && p !== void 0 && a(p);
25
+ }, [p, c]);
25
26
  const B = () => {
26
27
  if (m) return;
27
- const t = s - x;
28
- if (c !== void 0 && t < c) {
29
- e == null || e("min");
28
+ const t = e - u;
29
+ if (i !== void 0 && t < i) {
30
+ s == null || s("min");
30
31
  return;
31
32
  }
32
- i || f(t), r == null || r(t);
33
- }, I = () => {
33
+ c || a(t), r == null || r(t);
34
+ }, j = () => {
34
35
  if (m) return;
35
- const t = s + x;
36
+ const t = e + u;
36
37
  if (o !== void 0 && t > o) {
37
- e == null || e("max");
38
+ s == null || s("max");
38
39
  return;
39
40
  }
40
- i || f(t), r == null || r(t);
41
+ c || a(t), r == null || r(t);
41
42
  };
42
- return /* @__PURE__ */ a("div", { className: z("flex items-center gap-sm", k), children: [
43
+ return /* @__PURE__ */ w("div", { className: x("flex items-center gap-sm", N), children: [
43
44
  /* @__PURE__ */ l(
44
- v,
45
+ b,
45
46
  {
46
- ariaLabel: y,
47
+ ariaLabel: k,
47
48
  onClick: B,
48
- disabled: m || c !== void 0 && s <= c,
49
+ disabled: m || i !== void 0 && e <= i,
49
50
  className: "size-comp-stepper-btn-size",
50
- children: /* @__PURE__ */ l(D, { className: "size-full transition-colors" })
51
+ children: /* @__PURE__ */ l(E, { className: "size-full transition-colors" })
51
52
  }
52
53
  ),
53
54
  /* @__PURE__ */ l(
54
- w,
55
+ D,
55
56
  {
56
57
  variant: "body",
57
58
  size: "base",
58
59
  weight: "medium",
59
60
  component: "span",
60
- className: z(
61
+ className: x(
61
62
  "min-w-[1.75rem] text-center text-text-dark-primary-def",
62
63
  {
63
- "text-text-dark-secondary": s === c
64
+ "text-text-dark-secondary": e === i
64
65
  }
65
66
  ),
66
67
  fixY: !0,
67
- children: u ? u(s) : s
68
+ children: d ? d(e) : e
68
69
  }
69
70
  ),
70
71
  /* @__PURE__ */ l(
71
- v,
72
+ b,
72
73
  {
73
- ariaLabel: b,
74
- onClick: I,
75
- disabled: m || o !== void 0 && s >= o,
74
+ ariaLabel: y,
75
+ onClick: j,
76
+ disabled: m || o !== void 0 && e >= o,
76
77
  className: "size-comp-stepper-btn-size",
77
- children: /* @__PURE__ */ l(A, { className: "size-full transition-colors" })
78
+ children: /* @__PURE__ */ l(Y, { className: "size-full transition-colors" })
78
79
  }
79
80
  )
80
81
  ] });
81
82
  };
82
83
  export {
83
- G as Stepper
84
+ P as Stepper
84
85
  };
@@ -12,6 +12,6 @@ export interface SwipeButtonProps extends React.ButtonHTMLAttributes<HTMLButtonE
12
12
  onResetComplete?: () => void;
13
13
  className?: string;
14
14
  }
15
- declare const SwipeButton: ({ text, successText, loadingText, variant, size, fullWidth, loading, success, disabled, danger, onSwipeComplete, reset, onResetComplete, className, }: SwipeButtonProps) => import("react/jsx-runtime").JSX.Element;
15
+ declare const SwipeButton: ({ text, successText: successTextProp, loadingText: loadingTextProp, variant, size, fullWidth, loading, success, disabled, danger, onSwipeComplete, reset, onResetComplete, className, }: SwipeButtonProps) => import("react/jsx-runtime").JSX.Element;
16
16
  export { SwipeButton };
17
17
  //# sourceMappingURL=SwipeButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeButton.d.ts","sourceRoot":"","sources":["../../../src/components/SwipeButton/SwipeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAe5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3D,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,WAAW,GAAI,uJAelB,gBAAgB,4CAiOlB,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"SwipeButton.d.ts","sourceRoot":"","sources":["../../../src/components/SwipeButton/SwipeBut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