meticulous-ui 2.6.2 → 2.8.0

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.
package/README.md CHANGED
@@ -65,6 +65,7 @@ import blue from 'meticulous-ui/colors/blue';
65
65
  | `Timer` | Renders analog / digital clock with alarm |
66
66
  | `OtpInput` | Gives inputs to enter and edit OTP |
67
67
  | `VideoPlayer` | Renders video with keyboard shortcuts |
68
+ | `Image` | Renders image with shimmer, lower resolution |
68
69
  | `Input` | Renders input box to let user enter input |
69
70
  | `Checkbox` | Renders checkbox to let user give boolean value |
70
71
  | `RadioGroup` | Renders radio options in a group to let user select |
@@ -1,12 +1,12 @@
1
1
  import { jsxs as C, jsx as u } from "react/jsx-runtime";
2
- import { useState as $, useId as ie, useRef as v, useMemo as le, useEffect as h, useLayoutEffect as ae, useCallback as ue, createElement as fe } from "react";
2
+ import { useState as $, useId as le, useRef as v, useMemo as ae, useEffect as h, useLayoutEffect as ue, useCallback as fe, createElement as de } from "react";
3
3
  import E from "../../colors/grey.js";
4
- import de from "../MenuItem/MenuItem.js";
5
- import pe from "../../colors/index.js";
6
- import me from "../../colors/blue.js";
4
+ import pe from "../MenuItem/MenuItem.js";
5
+ import me from "../../colors/index.js";
6
+ import he from "../../colors/blue.js";
7
7
  import K from "../Spinner/Spinner.js";
8
- import { DropdownWrapper as he, Box as be, PWrapper as we, ChevronDownWrapper as xe, OptionWrapper as ge, SearchContainer as Ie, SearchIcon as ke, SearchInput as Se, OptionsList as Ce, LoadMoreSentinel as $e, SpinnerWrapper as ve } from "./styles.js";
9
- const ye = (n) => {
8
+ import { DropdownWrapper as be, Box as we, PWrapper as xe, ChevronDownWrapper as ge, OptionWrapper as Ie, SearchContainer as ke, SearchIcon as Se, SearchInput as Ce, OptionsList as $e, LoadMoreSentinel as ve, SpinnerWrapper as ye } from "./styles.js";
9
+ const Ee = (n) => {
10
10
  if (typeof n != "string") return n;
11
11
  if (n.endsWith("px")) return parseFloat(n);
12
12
  if (n.endsWith("rem")) {
@@ -14,7 +14,7 @@ const ye = (n) => {
14
14
  return O * s;
15
15
  }
16
16
  return parseFloat(n);
17
- }, Pe = ({
17
+ }, He = ({
18
18
  options: n,
19
19
  onChange: O,
20
20
  value: s,
@@ -29,12 +29,13 @@ const ye = (n) => {
29
29
  onLoadMore: c,
30
30
  hasMore: I = !1,
31
31
  isLoadingMore: f = !1,
32
- searchPh: R = "Search..."
32
+ searchPh: R = "Search...",
33
+ ...q
33
34
  }) => {
34
35
  var j;
35
- const [r, d] = $(!1), [q, W] = $(!1), [N, T] = $("bottom"), [k, A] = $(""), [i, p] = $(-1), y = ie(), m = v(null), S = v(null), D = v(null), B = v(null), G = v(!0), J = () => !w && !x && d((e) => !e), P = (e) => {
36
+ const [r, d] = $(!1), [N, W] = $(!1), [T, G] = $("bottom"), [k, A] = $(""), [i, p] = $(-1), y = le(), m = v(null), S = v(null), D = v(null), B = v(null), J = v(!0), X = () => !w && !x && d((e) => !e), P = (e) => {
36
37
  e !== s && (O(e), d(!1));
37
- }, l = le(() => {
38
+ }, l = ae(() => {
38
39
  if (!g || !k.trim()) return n;
39
40
  const e = k.toLowerCase();
40
41
  return n.filter(({ label: t }) => t.toLowerCase().includes(e));
@@ -61,35 +62,35 @@ const ye = (n) => {
61
62
  }, [i, r]), h(() => {
62
63
  r && g && D.current && D.current.focus();
63
64
  }, [r, g]), h(() => {
64
- r || (G.current = !0);
65
+ r || (J.current = !0);
65
66
  }, [r]), h(() => {
66
67
  const e = (t) => {
67
68
  m.current && !m.current.contains(t.target) && d(!1);
68
69
  };
69
70
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
70
- }, []), ae(() => {
71
+ }, []), ue(() => {
71
72
  if (r && S.current && m.current) {
72
- const e = m.current.getBoundingClientRect(), t = window.innerHeight, o = ye(F), a = t - e.bottom;
73
- T(
73
+ const e = m.current.getBoundingClientRect(), t = window.innerHeight, o = Ee(F), a = t - e.bottom;
74
+ G(
74
75
  a < o + 8 && e.top > a ? "top" : "bottom"
75
76
  );
76
77
  }
77
78
  }, [r, F]);
78
- const X = (e) => {
79
+ const Y = (e) => {
79
80
  let t = e + 1;
80
81
  for (; t < l.length; ) {
81
82
  if (!l[t].disabled) return t;
82
83
  t++;
83
84
  }
84
85
  return e;
85
- }, Y = (e) => {
86
+ }, Z = (e) => {
86
87
  let t = e - 1;
87
88
  for (; t >= 0; ) {
88
89
  if (!l[t].disabled) return t;
89
90
  t--;
90
91
  }
91
92
  return e;
92
- }, Z = (e) => {
93
+ }, _ = (e) => {
93
94
  if (!(w || x)) {
94
95
  if (!r) {
95
96
  (e.key === " " || e.key === "Enter" || e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), d(!0));
@@ -98,11 +99,11 @@ const ye = (n) => {
98
99
  switch (e.key) {
99
100
  case "ArrowDown":
100
101
  e.preventDefault();
101
- const t = X(i);
102
+ const t = Y(i);
102
103
  t === i && I && !f && (c == null || c()), p(t);
103
104
  break;
104
105
  case "ArrowUp":
105
- e.preventDefault(), p((a) => Y(a));
106
+ e.preventDefault(), p((a) => Z(a));
106
107
  break;
107
108
  case "Enter":
108
109
  e.preventDefault();
@@ -114,7 +115,7 @@ const ye = (n) => {
114
115
  break;
115
116
  }
116
117
  }
117
- }, H = ue(() => {
118
+ }, H = fe(() => {
118
119
  I && !f && c && c();
119
120
  }, [I, f, c]);
120
121
  h(() => {
@@ -135,44 +136,45 @@ const ye = (n) => {
135
136
  return t.observe(e), () => t.disconnect();
136
137
  }, [H, c, I, f]);
137
138
  const {
138
- m50: _,
139
- m100: L,
140
- m200: M,
141
- m500: ee
142
- } = pe[U] ?? me, te = (e, t) => () => !e && p(t), V = (e) => `${y}-opt-${e}`, re = ({ value: e, label: t, disabled: o }, a) => /* @__PURE__ */ fe(
143
- de,
139
+ m50: L,
140
+ m100: M,
141
+ m200: ee,
142
+ m500: te
143
+ } = me[U] ?? he, re = (e, t) => () => !e && p(t), V = (e) => `${y}-opt-${e}`, ne = ({ value: e, label: t, disabled: o }, a) => /* @__PURE__ */ de(
144
+ pe,
144
145
  {
145
146
  value: e,
146
147
  label: t,
147
148
  isDisabled: o,
148
149
  onSelect: P,
149
- onMouseEnter: te(o, a),
150
+ onMouseEnter: re(o, a),
150
151
  isSelected: e === s,
151
152
  isHighlighted: a === i,
152
153
  key: e,
153
154
  id: V(a),
154
155
  width: b,
155
- selectedColor: M,
156
- hoverColor: _,
157
- activeColor: L
156
+ selectedColor: ee,
157
+ hoverColor: L,
158
+ activeColor: M
158
159
  }
159
- ), ne = (e) => () => {
160
+ ), oe = (e) => () => {
160
161
  W(e);
161
- }, oe = (e) => {
162
+ }, se = (e) => {
162
163
  var t;
163
164
  W(!1), (t = m.current) != null && t.contains(e.relatedTarget) || d(!1);
164
- }, se = (e) => {
165
- A(e.target.value);
166
165
  }, ce = (e) => {
166
+ A(e.target.value);
167
+ }, ie = (e) => {
167
168
  e.stopPropagation();
168
169
  };
169
170
  return /* @__PURE__ */ C(
170
- he,
171
+ be,
171
172
  {
172
173
  ref: m,
173
174
  $width: b,
175
+ ...q,
174
176
  tabIndex: x || w ? -1 : 0,
175
- onKeyDown: Z,
177
+ onKeyDown: _,
176
178
  $isLoading: w,
177
179
  $isDisabled: x,
178
180
  role: "combobox",
@@ -181,32 +183,32 @@ const ye = (n) => {
181
183
  "aria-controls": y,
182
184
  "aria-disabled": x || void 0,
183
185
  "aria-activedescendant": i !== -1 ? V(i) : void 0,
184
- onFocus: ne(!0),
185
- onBlur: oe,
186
+ onFocus: oe(!0),
187
+ onBlur: se,
186
188
  children: [
187
189
  /* @__PURE__ */ C(
188
- be,
190
+ we,
189
191
  {
190
192
  $width: b,
191
- onClick: J,
193
+ onClick: X,
192
194
  $isOpen: r,
193
- $border: ee,
194
- $isFocused: q && !r,
195
+ $border: te,
196
+ $isFocused: N && !r,
195
197
  children: [
196
- /* @__PURE__ */ u(we, { $width: b, color: s ? E.m700 : E.m500, size: "1.2rem", children: s ? (j = n.find(({ value: e }) => s === e)) == null ? void 0 : j.label : Q }),
197
- /* @__PURE__ */ u(xe, { color: E.m500, size: 22, $isOpen: r, "aria-hidden": !0 })
198
+ /* @__PURE__ */ u(xe, { $width: b, color: s ? E.m700 : E.m500, size: "1.2rem", children: s ? (j = n.find(({ value: e }) => s === e)) == null ? void 0 : j.label : Q }),
199
+ /* @__PURE__ */ u(ge, { color: E.m500, size: 22, $isOpen: r, "aria-hidden": !0 })
198
200
  ]
199
201
  }
200
202
  ),
201
- /* @__PURE__ */ C(ge, { $isOpen: r, $width: b, $height: F, $top: N === "top", children: [
202
- g && /* @__PURE__ */ C(Ie, { onClick: ce, children: [
203
- /* @__PURE__ */ u(ke, { size: 20, color: E.m600, "aria-hidden": !0 }),
203
+ /* @__PURE__ */ C(Ie, { $isOpen: r, $width: b, $height: F, $top: T === "top", children: [
204
+ g && /* @__PURE__ */ C(ke, { onClick: ie, children: [
205
+ /* @__PURE__ */ u(Se, { size: 20, color: E.m600, "aria-hidden": !0 }),
204
206
  /* @__PURE__ */ u(
205
- Se,
207
+ Ce,
206
208
  {
207
209
  ref: D,
208
210
  value: k,
209
- onChange: se,
211
+ onChange: ce,
210
212
  placeholder: R,
211
213
  "aria-label": R,
212
214
  "aria-controls": y,
@@ -217,16 +219,16 @@ const ye = (n) => {
217
219
  }
218
220
  )
219
221
  ] }),
220
- /* @__PURE__ */ C(Ce, { ref: S, role: "listbox", id: y, tabIndex: -1, children: [
221
- l.map(re),
222
- c && /* @__PURE__ */ u($e, { ref: B, children: f && /* @__PURE__ */ u(K, { size: "small", color: z }) })
222
+ /* @__PURE__ */ C($e, { ref: S, role: "listbox", id: y, tabIndex: -1, children: [
223
+ l.map(ne),
224
+ c && /* @__PURE__ */ u(ve, { ref: B, children: f && /* @__PURE__ */ u(K, { size: "small", color: z }) })
223
225
  ] })
224
226
  ] }),
225
- w && /* @__PURE__ */ u(ve, { children: /* @__PURE__ */ u(K, { size: "small", color: z }) })
227
+ w && /* @__PURE__ */ u(ye, { children: /* @__PURE__ */ u(K, { size: "small", color: z }) })
226
228
  ]
227
229
  }
228
230
  );
229
231
  };
230
232
  export {
231
- Pe as default
233
+ He as default
232
234
  };
@@ -1,6 +1,6 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { GlassWrapper as a } from "./styles.js";
3
- const t = ({ border: r = "none", borderRadius: o = 0 }) => /* @__PURE__ */ s(a, { $border: r, $borderRadius: o });
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { GlassWrapper as e } from "./styles.js";
3
+ const d = ({ border: r = "none", borderRadius: o = 0, ...s }) => /* @__PURE__ */ a(e, { $border: r, $borderRadius: o, ...s });
4
4
  export {
5
- t as default
5
+ d as default
6
6
  };
@@ -0,0 +1,49 @@
1
+ import { jsxs as x, jsx as t } from "react/jsx-runtime";
2
+ import { useState as a } from "react";
3
+ import y from "../Shimmer/Shimmer.js";
4
+ import { ImageWrapper as S, ShimmerOverlay as j, LowResImage as E, StyledImage as R } from "./styles.js";
5
+ const o = (e) => {
6
+ if (e != null)
7
+ return typeof e == "number" ? `${e}rem` : e;
8
+ }, k = ({
9
+ src: e,
10
+ alt: l = "",
11
+ width: c = "100%",
12
+ height: f = "100%",
13
+ borderRadius: r = "0.4rem",
14
+ loadLow: m = !1,
15
+ lowSrc: n,
16
+ ...u
17
+ }) => {
18
+ const [i, $] = a(!1), [d, h] = a(!1), [s, L] = a(!1), p = () => $(!0), g = () => h(!0), w = () => L(!0), I = m ? i : d;
19
+ return /* @__PURE__ */ x(S, { $width: o(c), $height: o(f), $borderRadius: o(r), children: [
20
+ !s && /* @__PURE__ */ t(j, { $loaded: I, children: /* @__PURE__ */ t(y, { borderRadius: r }) }),
21
+ m && n && !s && /* @__PURE__ */ t(
22
+ E,
23
+ {
24
+ src: n,
25
+ alt: "",
26
+ "aria-hidden": "true",
27
+ $lowLoaded: i,
28
+ $loaded: d,
29
+ $borderRadius: o(r),
30
+ onLoad: p
31
+ }
32
+ ),
33
+ !s && /* @__PURE__ */ t(
34
+ R,
35
+ {
36
+ src: e,
37
+ alt: l,
38
+ $loaded: d,
39
+ $borderRadius: o(r),
40
+ onLoad: g,
41
+ onError: w,
42
+ ...u
43
+ }
44
+ )
45
+ ] });
46
+ };
47
+ export {
48
+ k as default
49
+ };
@@ -0,0 +1,4 @@
1
+ import e from "./Image.js";
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,44 @@
1
+ import t from "styled-components";
2
+ const s = t.span`
3
+ position: relative;
4
+ display: inline-block;
5
+ width: ${({ $width: i }) => i};
6
+ height: ${({ $height: i }) => i};
7
+ border-radius: ${({ $borderRadius: i }) => i};
8
+ overflow: hidden;
9
+ `, a = t.img`
10
+ display: block;
11
+ width: 100%;
12
+ height: 100%;
13
+ object-fit: cover;
14
+ border-radius: ${({ $borderRadius: i }) => i};
15
+ opacity: ${({ $loaded: i }) => i ? 1 : 0};
16
+ transition: opacity 0.5s ease-in-out;
17
+ `, n = t.div`
18
+ position: absolute;
19
+ inset: 0;
20
+ z-index: 2;
21
+ opacity: ${({ $loaded: i }) => i ? 0 : 1};
22
+ transition: opacity 0.35s ease-out;
23
+ pointer-events: none;
24
+ `, r = t.img`
25
+ position: absolute;
26
+ inset: 0;
27
+ z-index: 1;
28
+ display: block;
29
+ width: 100%;
30
+ height: 100%;
31
+ object-fit: cover;
32
+ transform: scale(1.05);
33
+ filter: ${({ $loaded: i }) => i ? "blur(0px)" : "blur(12px)"};
34
+ opacity: ${({ $lowLoaded: i, $loaded: e }) => i && !e ? 1 : 0};
35
+ transition:
36
+ opacity 0.5s ease-in-out,
37
+ filter 0.5s ease-in-out;
38
+ `;
39
+ export {
40
+ s as ImageWrapper,
41
+ r as LowResImage,
42
+ n as ShimmerOverlay,
43
+ a as StyledImage
44
+ };
@@ -1,23 +1,24 @@
1
- import { jsxs as D, jsx as s } from "react/jsx-runtime";
2
- import { useState as $, useRef as g } from "react";
3
- import H from "../../../colors/grey.js";
4
- import P from "../../Typography/P/P.js";
5
- import j from "../../../colors/white.js";
1
+ import { jsxs as $, jsx as s } from "react/jsx-runtime";
2
+ import { useState as g, useRef as H } from "react";
3
+ import P from "../../../colors/grey.js";
4
+ import j from "../../Typography/P/P.js";
5
+ import z from "../../../colors/white.js";
6
6
  import m from "../../../colors/blue.js";
7
- import { Wrapper as z, CbInput as B, Box as C } from "./styles.js";
8
- import { getColor as E } from "./helpers.js";
9
- const G = ({
7
+ import { Wrapper as B, CbInput as C, Box as E } from "./styles.js";
8
+ import { getColor as F } from "./helpers.js";
9
+ const J = ({
10
10
  label: u,
11
11
  value: o,
12
12
  color: l = "blue",
13
- textColor: p = H.m700,
13
+ textColor: p = P.m700,
14
14
  disabled: c,
15
15
  onChange: t,
16
16
  tabIndex: d,
17
17
  innerShade: h,
18
- outerShade: k
18
+ outerShade: k,
19
+ ...y
19
20
  }) => {
20
- const [y, n] = $(!1), r = E(l), S = h ?? (r == null ? void 0 : r.m500) ?? m.m500, b = k ?? (r == null ? void 0 : r.m600) ?? m.m600, a = g(0), x = (e) => t(e.target.checked), w = (e) => {
21
+ const [S, n] = g(!1), r = F(l), b = h ?? (r == null ? void 0 : r.m500) ?? m.m500, x = k ?? (r == null ? void 0 : r.m600) ?? m.m600, a = H(0), w = (e) => t(e.target.checked), D = (e) => {
21
22
  if (e.key === "Enter" || e.key === " ") {
22
23
  const i = Date.now();
23
24
  if (i - a.current < 500) {
@@ -32,14 +33,14 @@ const G = ({
32
33
  }
33
34
  e.key === "Escape" && n(!1);
34
35
  }, f = (e) => () => n(e);
35
- return /* @__PURE__ */ D(z, { as: "label", $disabled: c, children: [
36
+ return /* @__PURE__ */ $(B, { as: "label", $disabled: c, ...y, children: [
36
37
  /* @__PURE__ */ s(
37
- B,
38
+ C,
38
39
  {
39
40
  type: "checkbox",
40
41
  checked: o,
41
- onChange: x,
42
- onKeyDown: w,
42
+ onChange: w,
43
+ onKeyDown: D,
43
44
  onFocus: f(!0),
44
45
  onBlur: f(!1),
45
46
  disabled: c,
@@ -47,20 +48,20 @@ const G = ({
47
48
  }
48
49
  ),
49
50
  /* @__PURE__ */ s(
50
- C,
51
+ E,
51
52
  {
52
53
  $value: o,
53
- $focused: y,
54
+ $focused: S,
54
55
  size: 6,
55
- color: j,
56
- $innerShade: S,
57
- $outerShade: b,
56
+ color: z,
57
+ $innerShade: b,
58
+ $outerShade: x,
58
59
  "aria-hidden": "true"
59
60
  }
60
61
  ),
61
- /* @__PURE__ */ s(P, { color: p, size: "1.2rem", children: u })
62
+ /* @__PURE__ */ s(j, { color: p, size: "1.2rem", children: u })
62
63
  ] });
63
64
  };
64
65
  export {
65
- G as default
66
+ J as default
66
67
  };
@@ -11,7 +11,7 @@ const c = e.div`
11
11
 
12
12
  ${({ $disabled: r }) => r && t`
13
13
  pointer-events: none;
14
- opacity: 0.7;
14
+ opacity: 0.4;
15
15
  `}
16
16
  `, d = e(i)`
17
17
  width: 1.2rem;
@@ -1,36 +1,37 @@
1
- import { jsx as o, jsxs as U } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as g } from "react/jsx-runtime";
2
2
  import { useRef as C } from "react";
3
- import { UploadBtnContainer as g, Wrapper as j, HiddenInput as M, PWrapper as W } from "./styles.js";
4
- import b from "../../../colors/white.js";
3
+ import { UploadBtnContainer as j, Wrapper as M, HiddenInput as W, PWrapper as b } from "./styles.js";
4
+ import B from "../../../colors/white.js";
5
5
  import x from "../../../colors/blue.js";
6
- import B from "../../../colors/grey.js";
7
- import F from "../../Icons/Link/Link.js";
8
- import H from "../../../colors/index.js";
9
- import P from "../../Ripple/Ripple.js";
10
- import { SIZE as Z, MEDIUM as q } from "./constants.js";
11
- const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(P, { rippleColor: e.m100, children: l }), L = ({
6
+ import F from "../../../colors/grey.js";
7
+ import H from "../../Icons/Link/Link.js";
8
+ import P from "../../../colors/index.js";
9
+ import Z from "../../Ripple/Ripple.js";
10
+ import { SIZE as q, MEDIUM as A } from "./constants.js";
11
+ const G = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m100, children: l }), oo = ({
12
12
  label: e,
13
13
  labelColor: l,
14
14
  theme: p = x,
15
- size: D = q,
15
+ size: D = A,
16
16
  width: s,
17
17
  isLoading: t,
18
18
  disabled: r,
19
- prefixIcon: c = F,
19
+ prefixIcon: c = H,
20
20
  suffixIcon: m,
21
21
  type: I = "file",
22
22
  accept: R,
23
23
  isMultiple: k,
24
- onChange: z
24
+ onChange: z,
25
+ ...K
25
26
  }) => {
26
- const u = C(null), { m400: K, m500: v, m600: E } = H[p] ?? x, { height: h, width: a, font: n } = Z[D] || {}, f = l || ["white", "yellow"].includes(p) ? B.m600 : b, $ = C(0), w = /* @__PURE__ */ U(
27
- j,
27
+ const u = C(null), { m400: v, m500: E, m600: U } = P[p] ?? x, { height: h, width: a, font: n } = q[D] || {}, f = l || ["white", "yellow"].includes(p) ? F.m600 : B, $ = C(0), w = /* @__PURE__ */ g(
28
+ M,
28
29
  {
29
- $selectedColor: K,
30
- $hoverColor: v,
30
+ $selectedColor: v,
31
+ $hoverColor: E,
31
32
  $height: h,
32
33
  $width: s || a,
33
- $activeColor: E,
34
+ $activeColor: U,
34
35
  disabled: r,
35
36
  $isLoading: t,
36
37
  role: "button",
@@ -51,7 +52,7 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(P, { rippleColor: e.m
51
52
  },
52
53
  children: [
53
54
  /* @__PURE__ */ o(
54
- M,
55
+ W,
55
56
  {
56
57
  ref: u,
57
58
  type: I,
@@ -64,7 +65,7 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(P, { rippleColor: e.m
64
65
  ),
65
66
  c && /* @__PURE__ */ o(c, { color: f, size: n + 19 }),
66
67
  /* @__PURE__ */ o(
67
- W,
68
+ b,
68
69
  {
69
70
  color: f,
70
71
  size: `${n}rem`,
@@ -79,8 +80,18 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(P, { rippleColor: e.m
79
80
  ]
80
81
  }
81
82
  );
82
- return /* @__PURE__ */ o(g, { $height: h, $width: s || a, disabled: r, $isLoading: t, children: t || r ? w : /* @__PURE__ */ o(A, { theme: p, children: w }) });
83
+ return /* @__PURE__ */ o(
84
+ j,
85
+ {
86
+ $height: h,
87
+ $width: s || a,
88
+ disabled: r,
89
+ $isLoading: t,
90
+ ...K,
91
+ children: t || r ? w : /* @__PURE__ */ o(G, { theme: p, children: w })
92
+ }
93
+ );
83
94
  };
84
95
  export {
85
- L as default
96
+ oo as default
86
97
  };
@@ -1,12 +1,22 @@
1
- import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
- import u from "../../Typography/P/P.js";
1
+ import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
+ import $ from "../../Typography/P/P.js";
3
3
  import m from "../../../colors/blue.js";
4
- import { Wrapper as $, HiddenInput as y, CircleBorder as D, Circle as w } from "./styles.js";
5
- const k = ({ label: s, value: r, name: p, color: e, textColor: f, isSelected: d, disabled: t, onChange: i }) => {
6
- const c = (e == null ? void 0 : e.m500) ?? m.m500, a = (e == null ? void 0 : e.m800) ?? m.m800;
7
- return /* @__PURE__ */ o($, { $disabled: t, $focusShade: a, children: [
4
+ import { Wrapper as y, HiddenInput as D, CircleBorder as w, Circle as x } from "./styles.js";
5
+ const C = ({
6
+ label: s,
7
+ value: r,
8
+ name: p,
9
+ color: e,
10
+ textColor: f,
11
+ isSelected: d,
12
+ disabled: t,
13
+ onChange: i,
14
+ ...c
15
+ }) => {
16
+ const o = (e == null ? void 0 : e.m500) ?? m.m500, a = (e == null ? void 0 : e.m800) ?? m.m800;
17
+ return /* @__PURE__ */ u(y, { $disabled: t, $focusShade: a, ...c, children: [
8
18
  /* @__PURE__ */ n(
9
- y,
19
+ D,
10
20
  {
11
21
  type: "radio",
12
22
  name: p,
@@ -19,10 +29,10 @@ const k = ({ label: s, value: r, name: p, color: e, textColor: f, isSelected: d,
19
29
  }
20
30
  }
21
31
  ),
22
- /* @__PURE__ */ n(D, { "aria-hidden": "true", $isSelected: d, $shade: a, children: /* @__PURE__ */ n(w, { $isSelected: d, $shade: c }) }),
23
- /* @__PURE__ */ n(u, { color: f, size: "1.2rem", children: s })
32
+ /* @__PURE__ */ n(w, { "aria-hidden": "true", $isSelected: d, $shade: a, children: /* @__PURE__ */ n(x, { $isSelected: d, $shade: o }) }),
33
+ /* @__PURE__ */ n($, { color: f, size: "1.2rem", children: s })
24
34
  ] });
25
35
  };
26
36
  export {
27
- k as default
37
+ C as default
28
38
  };
@@ -1,9 +1,9 @@
1
- import { jsxs as f, jsx as u } from "react/jsx-runtime";
2
- import { createElement as g } from "react";
3
- import { getColor as h } from "../Checkbox/helpers.js";
4
- import x from "../Radio/Radio.js";
5
- import { Wrapper as j } from "./styles.js";
6
- const v = ({
1
+ import { jsxs as u, jsx as g } from "react/jsx-runtime";
2
+ import { createElement as h } from "react";
3
+ import { getColor as x } from "../Checkbox/helpers.js";
4
+ import j from "../Radio/Radio.js";
5
+ import { Wrapper as k } from "./styles.js";
6
+ const y = ({
7
7
  options: i,
8
8
  color: n = "blue",
9
9
  value: o,
@@ -11,34 +11,36 @@ const v = ({
11
11
  isHorizonatal: d,
12
12
  label: e,
13
13
  ariaLabel: m,
14
- name: c
14
+ name: c,
15
+ ...l
15
16
  }) => {
16
- const l = h(n), s = (r) => {
17
+ const s = x(n), t = (r) => {
17
18
  r !== o && a(r);
18
- }, t = (r) => /* @__PURE__ */ g(
19
- x,
19
+ }, f = (r) => /* @__PURE__ */ h(
20
+ j,
20
21
  {
21
22
  ...r,
22
23
  key: r == null ? void 0 : r.value,
23
24
  name: c,
24
- color: l,
25
+ color: s,
25
26
  isSelected: o === (r == null ? void 0 : r.value),
26
- onChange: s
27
+ onChange: t
27
28
  }
28
29
  );
29
- return /* @__PURE__ */ f(
30
- j,
30
+ return /* @__PURE__ */ u(
31
+ k,
31
32
  {
32
33
  role: "radiogroup",
33
34
  "aria-label": e ? void 0 : m,
34
35
  $isHorizonatal: d,
36
+ ...l,
35
37
  children: [
36
- e && /* @__PURE__ */ u("legend", { children: e }),
37
- i.map(t)
38
+ e && /* @__PURE__ */ g("legend", { children: e }),
39
+ i.map(f)
38
40
  ]
39
41
  }
40
42
  );
41
43
  };
42
44
  export {
43
- v as default
45
+ y as default
44
46
  };