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.
@@ -1,17 +1,17 @@
1
- import { jsxs as f, jsx as a } from "react/jsx-runtime";
2
- import { LoaderWrapper as L, VisuallyHidden as g, Dot as A } from "./styles.js";
3
- import { SIZE as d, MEDIUM as c, THEME_SHADE as s, ANIMATION_DELAYS as D, BLUE as I } from "./constants.js";
4
- import { getTheme as M } from "./helpers.js";
5
- const j = ({ size: l = c, theme: n = I, isBounce: i, isMini: m, isMiniDark: p }) => {
6
- const { dot: E, gap: h } = d[l] || d[c], t = M(n), r = D, u = (p ? s.slice(2, 6) : m ? s.slice(0, 3) : s).map((o) => t[o] ?? t.m500), $ = r.map(() => E);
7
- return /* @__PURE__ */ f(L, { role: "status", $gap: h, children: [
8
- /* @__PURE__ */ a(g, { children: "Loading" }),
9
- $.map((o, e) => /* @__PURE__ */ a(
10
- A,
1
+ import { jsxs as L, jsx as a } from "react/jsx-runtime";
2
+ import { LoaderWrapper as g, VisuallyHidden as A, Dot as D } from "./styles.js";
3
+ import { SIZE as d, MEDIUM as c, THEME_SHADE as s, ANIMATION_DELAYS as I, BLUE as M } from "./constants.js";
4
+ import { getTheme as x } from "./helpers.js";
5
+ const B = ({ size: l = c, theme: n = M, isBounce: i, isMini: m, isMiniDark: p, ...E }) => {
6
+ const { dot: h, gap: u } = d[l] || d[c], t = x(n), r = I, $ = (p ? s.slice(2, 6) : m ? s.slice(0, 3) : s).map((o) => t[o] ?? t.m500), f = r.map(() => h);
7
+ return /* @__PURE__ */ L(g, { role: "status", $gap: u, ...E, children: [
8
+ /* @__PURE__ */ a(A, { children: "Loading" }),
9
+ f.map((o, e) => /* @__PURE__ */ a(
10
+ D,
11
11
  {
12
12
  "aria-hidden": "true",
13
13
  $size: o,
14
- $color: u[e],
14
+ $color: $[e],
15
15
  $delay: r[e],
16
16
  $isBounce: i
17
17
  },
@@ -20,5 +20,5 @@ const j = ({ size: l = c, theme: n = I, isBounce: i, isMini: m, isMiniDark: p })
20
20
  ] });
21
21
  };
22
22
  export {
23
- j as default
23
+ B as default
24
24
  };
@@ -1,15 +1,15 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import i from "../../colors/grey.js";
3
3
  import m from "../../colors/blue.js";
4
- import g from "../../colors/white.js";
5
- import { Wrapper as s, PWrapper as k } from "./styles.js";
6
- const v = ({ isSelected: o, isDisabled: e }) => o ? i.m700 : e ? i.m300 : i.m500, I = ({
4
+ import s from "../../colors/white.js";
5
+ import { Wrapper as k, PWrapper as v } from "./styles.js";
6
+ const w = ({ isSelected: o, isDisabled: e }) => o ? i.m700 : e ? i.m300 : i.m500, M = ({
7
7
  id: o,
8
8
  value: e,
9
9
  label: l,
10
10
  width: n = "20rem",
11
11
  isSelected: t,
12
- defaultColor: p = g,
12
+ defaultColor: p = s,
13
13
  selectedColor: a = m.m200,
14
14
  hoverColor: d = m.m50,
15
15
  activeColor: f = m.m100,
@@ -17,9 +17,10 @@ const v = ({ isSelected: o, isDisabled: e }) => o ? i.m700 : e ? i.m300 : i.m500
17
17
  size: $ = "1.2rem",
18
18
  onSelect: u,
19
19
  isDisabled: r,
20
- onMouseEnter: C
20
+ onMouseEnter: C,
21
+ ...g
21
22
  }) => /* @__PURE__ */ c(
22
- s,
23
+ k,
23
24
  {
24
25
  $isSelected: t,
25
26
  $width: n,
@@ -31,6 +32,7 @@ const v = ({ isSelected: o, isDisabled: e }) => o ? i.m700 : e ? i.m300 : i.m500
31
32
  $isHighlighted: h,
32
33
  id: o,
33
34
  role: "option",
35
+ ...g,
34
36
  "aria-selected": t,
35
37
  "aria-disabled": r || void 0,
36
38
  onClick: () => {
@@ -38,9 +40,9 @@ const v = ({ isSelected: o, isDisabled: e }) => o ? i.m700 : e ? i.m300 : i.m500
38
40
  },
39
41
  onMouseEnter: C,
40
42
  title: l,
41
- children: /* @__PURE__ */ c(k, { size: $, color: v({ isSelected: t, isDisabled: r }), $width: n, children: l })
43
+ children: /* @__PURE__ */ c(v, { size: $, color: w({ isSelected: t, isDisabled: r }), $width: n, children: l })
42
44
  }
43
45
  );
44
46
  export {
45
- I as default
47
+ M as default
46
48
  };
@@ -1,13 +1,13 @@
1
- import { jsx as j } from "react/jsx-runtime";
2
- import { useState as A, useRef as y, useEffect as E } from "react";
3
- import { OTPWrapper as I } from "./styles.js";
4
- import { renderNums as P } from "./helpers.js";
5
- const T = ({ length: r = 6, value: p = "", onChange: u, onComplete: e }) => {
6
- const [a, D] = A(Array(r).fill("")), d = y([]), w = y(a), o = y(!1), f = (s) => {
1
+ import { jsx as A } from "react/jsx-runtime";
2
+ import { useState as E, useRef as y, useEffect as I } from "react";
3
+ import { OTPWrapper as P } from "./styles.js";
4
+ import { renderNums as b } from "./helpers.js";
5
+ const B = ({ length: r = 6, value: p = "", onChange: u, onComplete: e, ...O }) => {
6
+ const [a, D] = E(Array(r).fill("")), d = y([]), w = y(a), o = y(!1), f = (s) => {
7
7
  var t;
8
8
  o.current = !0, (t = d.current[s]) == null || t.focus();
9
9
  };
10
- E(() => {
10
+ I(() => {
11
11
  if (!p) return;
12
12
  const s = String(p).replace(/\D/g, "").slice(0, r), t = s.split("");
13
13
  for (; t.length < r; ) t.push("");
@@ -17,11 +17,11 @@ const T = ({ length: r = 6, value: p = "", onChange: u, onComplete: e }) => {
17
17
  w.current = s, D(s);
18
18
  const t = s.join("");
19
19
  u == null || u(t), t.length === r && (e == null || e(t));
20
- }, O = (s, t) => {
20
+ }, k = (s, t) => {
21
21
  s = s.replace(/\D/g, "").slice(-1);
22
22
  const c = [...a];
23
23
  c[t] = s, l(c), s && t < r - 1 && f(t + 1);
24
- }, k = (s, t) => {
24
+ }, m = (s, t) => {
25
25
  const c = a.findIndex((n) => n === ""), i = c === -1 ? r - 1 : c;
26
26
  if (s.key === "Backspace") {
27
27
  if (s.preventDefault(), a[t]) {
@@ -30,7 +30,7 @@ const T = ({ length: r = 6, value: p = "", onChange: u, onComplete: e }) => {
30
30
  }
31
31
  t > 0 && f(t - 1);
32
32
  } else s.key === "ArrowLeft" && t > 0 ? (s.preventDefault(), f(t - 1)) : s.key === "ArrowRight" ? (s.preventDefault(), t + 1 <= i && f(t + 1)) : s.key === "Tab" && (s.preventDefault(), s.shiftKey ? t > 0 && f(t - 1) : f(i));
33
- }, m = (s) => {
33
+ }, R = (s) => {
34
34
  if (o.current) {
35
35
  o.current = !1;
36
36
  return;
@@ -38,22 +38,23 @@ const T = ({ length: r = 6, value: p = "", onChange: u, onComplete: e }) => {
38
38
  const t = w.current.findIndex((i) => i === ""), c = t === -1 ? r - 1 : t;
39
39
  s !== c && f(c);
40
40
  };
41
- return /* @__PURE__ */ j(
42
- I,
41
+ return /* @__PURE__ */ A(
42
+ P,
43
43
  {
44
44
  style: { display: "flex", gap: "10px", justifyContent: "center" },
45
45
  onPaste: (s) => {
46
46
  const t = s.clipboardData.getData("text").replace(/\D/g, "");
47
47
  if (!t) return;
48
48
  const c = Array(r).fill("");
49
- t.slice(0, r).split("").forEach((n, R) => c[R] = n), l(c);
49
+ t.slice(0, r).split("").forEach((n, j) => c[j] = n), l(c);
50
50
  const i = Math.min(t.length - 1, r - 1);
51
51
  f(i);
52
52
  },
53
- children: a.map(P({ inputsRef: d, handleChange: O, handleKeyDown: k, handleFocus: m }))
53
+ ...O,
54
+ children: a.map(b({ inputsRef: d, handleChange: k, handleKeyDown: m, handleFocus: R }))
54
55
  }
55
56
  );
56
57
  };
57
58
  export {
58
- T as default
59
+ B as default
59
60
  };
@@ -1,32 +1,33 @@
1
1
  import { jsxs as l, jsx as f } from "react/jsx-runtime";
2
- import { useRef as x, useEffect as _ } from "react";
2
+ import { useRef as E, useEffect as K } from "react";
3
3
  import { PrevArrow as M, renderPageNum as d, NextArrow as R, renderThreeDots as $ } from "./helpers.js";
4
- import K from "../../colors/index.js";
5
- import a from "../../colors/teal.js";
6
- import { ICON_SIZE_MAPPING as j, MEDIUM as G, SIZE_REM_MAPPING as L } from "./constants.js";
4
+ import a from "../../colors/index.js";
5
+ import j from "../../colors/teal.js";
6
+ import { ICON_SIZE_MAPPING as G, MEDIUM as L, SIZE_REM_MAPPING as P } from "./constants.js";
7
7
  import { AllPages as u, MiddleLayer as v } from "./styles.js";
8
- const k = ({
8
+ const B = ({
9
9
  pageNumber: r,
10
- setPageNumber: E,
10
+ setPageNumber: S,
11
11
  totalPages: n,
12
- theme: S = "lime",
13
- size: o = G,
14
- isDisabled: D = !1
12
+ theme: _ = "lime",
13
+ size: o = L,
14
+ isDisabled: D = !1,
15
+ ...x
15
16
  }) => {
16
- const s = x(null), h = x(!1);
17
- _(() => {
17
+ const s = E(null), h = E(!1);
18
+ K(() => {
18
19
  var i, w;
19
20
  h.current && (h.current = !1, (w = (i = s.current) == null ? void 0 : i.querySelector('[aria-current="page"]')) == null || w.focus());
20
21
  }, [r]);
21
22
  const c = (i) => {
22
- i !== r && E(i);
23
+ i !== r && S(i);
23
24
  }, A = () => {
24
25
  r > 1 && c(r - 1);
25
26
  }, m = () => {
26
27
  r < n && c(r + 1);
27
28
  }, y = (i) => {
28
29
  ["ArrowLeft", "ArrowUp"].includes(i.code) && (h.current = !0, A()), ["ArrowRight", "ArrowDown"].includes(i.code) && (h.current = !0, m());
29
- }, e = K[S] ?? a, I = L[o], t = j[o];
30
+ }, e = a[_] ?? j, I = P[o], t = G[o];
30
31
  return n <= 7 ? /* @__PURE__ */ l(
31
32
  u,
32
33
  {
@@ -34,6 +35,7 @@ const k = ({
34
35
  onKeyDown: y,
35
36
  "aria-label": "Pagination",
36
37
  $isDisabled: D,
38
+ ...x,
37
39
  children: [
38
40
  /* @__PURE__ */ f(M, { iconSize: t, shades: e, setPrevPage: A }),
39
41
  /* @__PURE__ */ f(v, { size: `${n * I}rem`, children: Array.from({ length: n }, (i, w) => w + 1).map(
@@ -49,6 +51,7 @@ const k = ({
49
51
  onKeyDown: y,
50
52
  "aria-label": "Pagination",
51
53
  $isDisabled: D,
54
+ ...x,
52
55
  children: [
53
56
  /* @__PURE__ */ f(M, { iconSize: t, shades: e, setPrevPage: A }),
54
57
  /* @__PURE__ */ l(v, { size: `${9 * I}rem`, children: [
@@ -87,5 +90,5 @@ const k = ({
87
90
  );
88
91
  };
89
92
  export {
90
- k as default
93
+ B as default
91
94
  };
@@ -1,12 +1,12 @@
1
1
  import { jsxs as $, jsx as i } from "react/jsx-runtime";
2
- import { useState as C, useId as T, useRef as v, useMemo as se, useEffect as I, useLayoutEffect as ce, useCallback as le } from "react";
2
+ import { useState as C, useId as T, useRef as v, useMemo as ce, useEffect as I, useLayoutEffect as le, useCallback as ae } from "react";
3
3
  import O from "../../colors/grey.js";
4
- import ae from "../../colors/index.js";
5
- import ue from "../../colors/blue.js";
6
- import de from "../Input/Checkbox/Checkbox.js";
4
+ import ue from "../../colors/index.js";
5
+ import de from "../../colors/blue.js";
6
+ import pe from "../Input/Checkbox/Checkbox.js";
7
7
  import U from "../Spinner/Spinner.js";
8
- import { SelectBoxWrapper as pe, Box as fe, PWrapper as me, ChevronDownWrapper as he, OptionWrapper as be, SearchContainer as ge, SearchIcon as xe, SearchInput as we, OptionsList as $e, LoadMoreSentinel as Ce, SpinnerWrapper as Ie, CheckboxItem as ke } from "./styles.js";
9
- const Se = (o) => {
8
+ import { SelectBoxWrapper as fe, Box as me, PWrapper as he, ChevronDownWrapper as be, OptionWrapper as ge, SearchContainer as xe, SearchIcon as we, SearchInput as $e, OptionsList as Ce, LoadMoreSentinel as Ie, SpinnerWrapper as ke, CheckboxItem as Se } from "./styles.js";
9
+ const ye = (o) => {
10
10
  if (typeof o != "string") return o;
11
11
  if (o.endsWith("px")) return parseFloat(o);
12
12
  if (o.endsWith("rem")) {
@@ -14,7 +14,7 @@ const Se = (o) => {
14
14
  return E * c;
15
15
  }
16
16
  return parseFloat(o);
17
- }, We = ({
17
+ }, Ae = ({
18
18
  options: o,
19
19
  onChange: E,
20
20
  value: c = [],
@@ -29,12 +29,13 @@ const Se = (o) => {
29
29
  onLoadMore: l,
30
30
  hasMore: b = !1,
31
31
  isLoadingMore: a = !1,
32
- loaderColor: W
32
+ loaderColor: W,
33
+ ...G
33
34
  }) => {
34
- const [r, g] = C(!1), [G, A] = C(!1), [J, X] = C("bottom"), [S, P] = C(""), [s, x] = C(-1), y = T(), H = T(), u = v(null), w = v(null), z = v(null), V = v(null), Y = () => !m && !k && g((e) => !e), B = (e) => {
35
+ const [r, g] = C(!1), [J, A] = C(!1), [X, Y] = C("bottom"), [S, P] = C(""), [s, x] = C(-1), y = T(), H = T(), u = v(null), w = v(null), z = v(null), V = v(null), Z = () => !m && !k && g((e) => !e), B = (e) => {
35
36
  const t = c.includes(e) ? c.filter((n) => n !== e) : [...c, e];
36
37
  E(t);
37
- }, d = se(() => {
38
+ }, d = ce(() => {
38
39
  if (!h || !S.trim()) return o;
39
40
  const e = S.toLowerCase();
40
41
  return o.filter(({ label: t }) => t.toLowerCase().includes(e));
@@ -57,29 +58,29 @@ const Se = (o) => {
57
58
  u.current && !u.current.contains(t.target) && g(!1);
58
59
  };
59
60
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
60
- }, []), ce(() => {
61
+ }, []), le(() => {
61
62
  if (r && w.current && u.current) {
62
- const e = u.current.getBoundingClientRect(), t = window.innerHeight, n = Se(F), p = t - e.bottom;
63
- X(
63
+ const e = u.current.getBoundingClientRect(), t = window.innerHeight, n = ye(F), p = t - e.bottom;
64
+ Y(
64
65
  p < n + 8 && e.top > p ? "top" : "bottom"
65
66
  );
66
67
  }
67
68
  }, [r, F]);
68
- const Z = (e) => {
69
+ const _ = (e) => {
69
70
  let t = e + 1;
70
71
  for (; t < d.length; ) {
71
72
  if (!d[t].disabled) return t;
72
73
  t++;
73
74
  }
74
75
  return e;
75
- }, _ = (e) => {
76
+ }, L = (e) => {
76
77
  let t = e - 1;
77
78
  for (; t >= 0; ) {
78
79
  if (!d[t].disabled) return t;
79
80
  t--;
80
81
  }
81
82
  return e;
82
- }, j = le(() => {
83
+ }, j = ae(() => {
83
84
  b && !a && l && l();
84
85
  }, [b, a, l]);
85
86
  I(() => {
@@ -93,7 +94,7 @@ const Se = (o) => {
93
94
  );
94
95
  return t.observe(e), () => t.disconnect();
95
96
  }, [j, l, b, a]);
96
- const L = (e) => {
97
+ const M = (e) => {
97
98
  if (!(m || k)) {
98
99
  if (!r) {
99
100
  (e.key === " " || e.key === "Enter" || e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), g(!0));
@@ -102,12 +103,12 @@ const Se = (o) => {
102
103
  switch (e.key) {
103
104
  case "ArrowDown": {
104
105
  e.preventDefault();
105
- const n = Z(s);
106
+ const n = _(s);
106
107
  n === s && b && !a && (l == null || l()), x(n);
107
108
  break;
108
109
  }
109
110
  case "ArrowUp": {
110
- e.preventDefault(), x(_(s));
111
+ e.preventDefault(), x(L(s));
111
112
  break;
112
113
  }
113
114
  case "Enter":
@@ -122,14 +123,14 @@ const Se = (o) => {
122
123
  }
123
124
  }
124
125
  }, {
125
- m50: M,
126
- m100: ee,
126
+ m50: ee,
127
+ m100: te,
127
128
  m500: K,
128
- m800: te
129
- } = ae[N] ?? ue, re = (e, t) => () => !e && x(t), Q = (e) => `${y}-opt-${e}`, ne = c.length === 0 ? q : `${c.length} selected`, oe = ({ value: e, label: t, disabled: n }, p) => {
129
+ m800: re
130
+ } = ue[N] ?? de, ne = (e, t) => () => !e && x(t), Q = (e) => `${y}-opt-${e}`, oe = c.length === 0 ? q : `${c.length} selected`, ie = ({ value: e, label: t, disabled: n }, p) => {
130
131
  const D = c.includes(e);
131
132
  return /* @__PURE__ */ i(
132
- ke,
133
+ Se,
133
134
  {
134
135
  id: Q(p),
135
136
  role: "option",
@@ -138,20 +139,20 @@ const Se = (o) => {
138
139
  $width: `calc(${f} + 1rem)`,
139
140
  $isHighlighted: p === s,
140
141
  $isDisabled: n,
141
- $hoverColor: M,
142
- $activeColor: ee,
142
+ $hoverColor: ee,
143
+ $activeColor: te,
143
144
  onClick: () => B(e),
144
- onMouseEnter: re(n, p),
145
+ onMouseEnter: ne(n, p),
145
146
  title: t,
146
- children: /* @__PURE__ */ i("div", { onClick: (ie) => ie.stopPropagation(), children: /* @__PURE__ */ i(
147
- de,
147
+ children: /* @__PURE__ */ i("div", { onClick: (se) => se.stopPropagation(), children: /* @__PURE__ */ i(
148
+ pe,
148
149
  {
149
150
  value: D,
150
151
  onChange: () => B(e),
151
152
  label: t,
152
153
  disabled: n,
153
154
  innerShade: K,
154
- outerShade: te,
155
+ outerShade: re,
155
156
  tabIndex: -1
156
157
  }
157
158
  ) })
@@ -160,29 +161,30 @@ const Se = (o) => {
160
161
  );
161
162
  };
162
163
  return /* @__PURE__ */ $(
163
- pe,
164
+ fe,
164
165
  {
165
166
  ref: u,
166
167
  $width: f,
167
168
  $isDisabled: m,
168
169
  $isLoading: k,
169
- onKeyDown: L,
170
+ onKeyDown: M,
170
171
  onBlur: (e) => {
171
172
  var t;
172
173
  (t = u.current) != null && t.contains(e.relatedTarget) || (A(!1), g(!1));
173
174
  },
174
175
  onFocus: () => A(!0),
176
+ ...G,
175
177
  children: [
176
178
  /* @__PURE__ */ $(
177
- fe,
179
+ me,
178
180
  {
179
181
  id: H,
180
182
  role: "button",
181
183
  $width: f,
182
- onClick: Y,
184
+ onClick: Z,
183
185
  $isOpen: r,
184
186
  $border: K,
185
- $isFocused: G && !r,
187
+ $isFocused: J && !r,
186
188
  tabIndex: m ? -1 : 0,
187
189
  "aria-haspopup": "listbox",
188
190
  "aria-expanded": r,
@@ -190,16 +192,16 @@ const Se = (o) => {
190
192
  "aria-disabled": m || void 0,
191
193
  "aria-activedescendant": s !== -1 ? Q(s) : void 0,
192
194
  children: [
193
- /* @__PURE__ */ i(me, { $width: f, color: c.length > 0 ? O.m700 : O.m500, size: "1.2rem", children: ne }),
194
- /* @__PURE__ */ i(he, { color: O.m500, size: 22, $isOpen: r, "aria-hidden": !0 })
195
+ /* @__PURE__ */ i(he, { $width: f, color: c.length > 0 ? O.m700 : O.m500, size: "1.2rem", children: oe }),
196
+ /* @__PURE__ */ i(be, { color: O.m500, size: 22, $isOpen: r, "aria-hidden": !0 })
195
197
  ]
196
198
  }
197
199
  ),
198
- /* @__PURE__ */ $(be, { $isOpen: r, $width: f, $height: F, $top: J === "top", children: [
199
- h && /* @__PURE__ */ $(ge, { onClick: (e) => e.stopPropagation(), children: [
200
- /* @__PURE__ */ i(xe, { size: 20, color: O.m600, "aria-hidden": !0 }),
200
+ /* @__PURE__ */ $(ge, { $isOpen: r, $width: f, $height: F, $top: X === "top", children: [
201
+ h && /* @__PURE__ */ $(xe, { onClick: (e) => e.stopPropagation(), children: [
202
+ /* @__PURE__ */ i(we, { size: 20, color: O.m600, "aria-hidden": !0 }),
201
203
  /* @__PURE__ */ i(
202
- we,
204
+ $e,
203
205
  {
204
206
  ref: z,
205
207
  value: S,
@@ -215,7 +217,7 @@ const Se = (o) => {
215
217
  )
216
218
  ] }),
217
219
  /* @__PURE__ */ $(
218
- $e,
220
+ Ce,
219
221
  {
220
222
  ref: w,
221
223
  role: "listbox",
@@ -224,17 +226,17 @@ const Se = (o) => {
224
226
  "aria-multiselectable": !0,
225
227
  "aria-labelledby": H,
226
228
  children: [
227
- d.map(oe),
228
- l && /* @__PURE__ */ i(Ce, { ref: V, children: a && /* @__PURE__ */ i(U, { size: "small", color: W }) })
229
+ d.map(ie),
230
+ l && /* @__PURE__ */ i(Ie, { ref: V, children: a && /* @__PURE__ */ i(U, { size: "small", color: W }) })
229
231
  ]
230
232
  }
231
233
  )
232
234
  ] }),
233
- k && /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ i(U, { size: "small", color: W }) })
235
+ k && /* @__PURE__ */ i(ke, { children: /* @__PURE__ */ i(U, { size: "small", color: W }) })
234
236
  ]
235
237
  }
236
238
  );
237
239
  };
238
240
  export {
239
- We as default
241
+ Ae as default
240
242
  };
@@ -1,9 +1,25 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { ShimmerWrapper as m } from "./styles.js";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { ShimmerWrapper as u } from "./styles.js";
3
3
  const e = (r) => {
4
4
  if (r != null)
5
5
  return typeof r == "number" ? `${r}rem` : r;
6
- }, p = ({ width: r = "100%", height: t = "100%", label: o = "Loading..." }) => /* @__PURE__ */ i(m, { role: "status", "aria-label": o, width: e(r), height: e(t) });
6
+ }, p = ({
7
+ width: r = "100%",
8
+ height: t = "100%",
9
+ borderRadius: o = "0.4rem",
10
+ label: i = "Loading...",
11
+ ...m
12
+ }) => /* @__PURE__ */ n(
13
+ u,
14
+ {
15
+ role: "status",
16
+ "aria-label": i,
17
+ $width: e(r),
18
+ $height: e(t),
19
+ $borderRadius: e(o),
20
+ ...m
21
+ }
22
+ );
7
23
  export {
8
24
  p as default
9
25
  };
@@ -7,9 +7,9 @@ const i = o`
7
7
  position: relative;
8
8
  overflow: hidden;
9
9
  background-color: ${e.m300};
10
- border-radius: 0.4rem;
11
- width: ${({ width: r }) => r};
12
- height: ${({ height: r }) => r};
10
+ border-radius: ${({ $borderRadius: r }) => r};
11
+ width: ${({ $width: r }) => r};
12
+ height: ${({ $height: r }) => r};
13
13
 
14
14
  &:after {
15
15
  content: '';
@@ -1,18 +1,18 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { SpinnerSVG as l, SpinnerCircle as s } from "./styles.js";
3
- import a from "../../colors/index.js";
4
- import h from "../../colors/green.js";
5
- import d from "../../colors/white.js";
6
- import p from "../../colors/grey.js";
7
- const c = {
2
+ import { SpinnerSVG as s, SpinnerCircle as a } from "./styles.js";
3
+ import h from "../../colors/index.js";
4
+ import d from "../../colors/green.js";
5
+ import p from "../../colors/white.js";
6
+ import c from "../../colors/grey.js";
7
+ const g = {
8
8
  small: { strokeWidth: 6, $length: "1rem" },
9
9
  medium: { strokeWidth: 5, $length: "2rem" },
10
10
  large: { strokeWidth: 5, $length: "3rem" }
11
- }, W = ({ color: e = "green", size: o = "medium" }) => {
11
+ }, $ = ({ color: e = "green", size: o = "medium", ...n }) => {
12
12
  var t;
13
- const { strokeWidth: n, $length: r } = c[o], m = [d, p.m600].includes(e) ? e : (t = a[e] ?? h) == null ? void 0 : t.m500;
13
+ const { strokeWidth: m, $length: r } = g[o], l = [p, c.m600].includes(e) ? e : (t = h[e] ?? d) == null ? void 0 : t.m500;
14
14
  return /* @__PURE__ */ i(
15
- l,
15
+ s,
16
16
  {
17
17
  viewBox: "0 0 50 50",
18
18
  width: r,
@@ -20,15 +20,16 @@ const c = {
20
20
  role: "status",
21
21
  "aria-label": "Loading",
22
22
  "aria-live": "polite",
23
+ ...n,
23
24
  children: /* @__PURE__ */ i(
24
- s,
25
+ a,
25
26
  {
26
27
  cx: "25",
27
28
  cy: "25",
28
29
  r: "20",
29
30
  fill: "none",
30
- stroke: m,
31
- strokeWidth: n,
31
+ stroke: l,
32
+ strokeWidth: m,
32
33
  strokeLinecap: "round"
33
34
  }
34
35
  )
@@ -36,5 +37,5 @@ const c = {
36
37
  );
37
38
  };
38
39
  export {
39
- W as default
40
+ $ as default
40
41
  };