meticulous-ui 2.5.6 → 2.6.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
@@ -2,47 +2,59 @@
2
2
 
3
3
  A lightweight, modern React component library, following Semantic HTML & ARIA, designed for elegance and precision ✨
4
4
 
5
+ [![npm version](https://img.shields.io/npm/v/meticulous-ui)](https://www.npmjs.com/package/meticulous-ui)
6
+ [![npm downloads](https://img.shields.io/npm/dm/meticulous-ui)](https://www.npmjs.com/package/meticulous-ui)
7
+ [![license](https://img.shields.io/npm/l/meticulous-ui)](https://github.com/xe3110/meticulous-ui/blob/main/LICENSE)
8
+
5
9
  ---
6
10
 
7
11
  ## 🚀 Demo
8
12
 
9
- <a href="https://meticulous-ui.vercel.app/" target="_blank">meticulous-ui</a>
13
+ [meticulous-ui.vercel.app](https://meticulous-ui.vercel.app/)
10
14
 
11
15
  ## 🚀 Installation
12
16
 
13
- ```
17
+ ```bash
14
18
  npm install meticulous-ui
19
+ # or
20
+ yarn add meticulous-ui
15
21
  ```
16
22
 
17
- # or
23
+ **Peer dependencies** — install these if you haven't already:
18
24
 
19
- ```
20
- yarn add meticulous-ui
25
+ ```bash
26
+ npm install react react-dom styled-components
21
27
  ```
22
28
 
23
- ## 🧩 Usage
29
+ ## 🧩 Quick Start
24
30
 
25
31
  ```jsx
26
- import { useState } from 'react';
27
-
28
- import Pagination from 'meticulous-ui/components/Pagination';
29
- import ChevronLeft from 'meticulous-ui/components/Icons/ChevronLeft';
32
+ import { Button, Input, Shimmer, Toast } from 'meticulous-ui';
30
33
  import blue from 'meticulous-ui/colors/blue';
31
- import capFirstLetter from 'meticulous-ui/utils/capFirstLetter';
32
34
 
33
35
  function App() {
34
- const [pageNumber, setPageNumber] = useState(1);
35
-
36
36
  return (
37
- <div>
38
- <h2>{capFirstLetter('example with pagination')}</h2> // returns: Example with pagination
39
- <ChevronLeft size={10} color={blue.m400} onClick={setPrevPage} />
40
- <Pagination totalPages={10} pageNumber={pageNumber} setPageNumber={setPageNumber} />
41
- </div>
37
+ <>
38
+ {/* Loading skeleton */}
39
+ <Shimmer width={200} height={20} />
40
+
41
+ {/* Themed button */}
42
+ <Button theme={blue} onClick={() => console.log('clicked')}>
43
+ Submit
44
+ </Button>
45
+
46
+ {/* Controlled input */}
47
+ <Input label='Email' color='blue' value={email} onChange={handleChange} />
48
+ </>
42
49
  );
43
50
  }
51
+ ```
52
+
53
+ Or import directly from the component path for the smallest bundle:
44
54
 
45
- export default App;
55
+ ```js
56
+ import Button from 'meticulous-ui/components/Button';
57
+ import blue from 'meticulous-ui/colors/blue';
46
58
  ```
47
59
 
48
60
  ## 📦 Components
@@ -65,6 +77,7 @@ export default App;
65
77
  | `Loader` | Renders a loader with dots to show the loading state |
66
78
  | `PageLoader` | Renders a loader with line at the top of page |
67
79
  | `Button` | Renders a button to click & take an action |
80
+ | `Shimmer` | Animated skeleton loading placeholder |
68
81
 
69
82
  ## 📦 Icon Components
70
83
 
@@ -1,38 +1,37 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useRef as x } from "react";
3
- import D from "lodash-es/get";
4
- import I from "../Spinner/Spinner.js";
5
- import R from "../../colors/index.js";
3
+ import D from "../Spinner/Spinner.js";
4
+ import I from "../../colors/index.js";
6
5
  import u from "../../colors/blue.js";
7
- import { ButtonWrapper as B, SpinnerWrapper as E, Content as L, ButtonContainer as S } from "./styles.js";
8
- import k from "../Ripple/Ripple.js";
9
- import z from "../../colors/white.js";
10
- import K from "../../colors/grey.js";
11
- import { MEDIUM as M, SIZE as P } from "./constants.js";
12
- const W = ({ theme: t, children: i }) => /* @__PURE__ */ o(k, { rippleColor: t.m100, children: i }), T = (t) => {
6
+ import { ButtonWrapper as R, SpinnerWrapper as B, Content as E, ButtonContainer as L } from "./styles.js";
7
+ import S from "../Ripple/Ripple.js";
8
+ import k from "../../colors/white.js";
9
+ import z from "../../colors/grey.js";
10
+ import { MEDIUM as K, SIZE as M } from "./constants.js";
11
+ const P = ({ theme: t, children: i }) => /* @__PURE__ */ o(S, { rippleColor: t.m100, children: i }), Q = (t) => {
13
12
  const {
14
13
  children: i,
15
14
  theme: n = u,
16
- size: C = M,
17
- width: m,
18
- leftIcon: j,
19
- rightIcon: U,
20
- isLoading: e,
21
- textColor: d,
15
+ size: C = K,
16
+ width: d,
17
+ leftIcon: W,
18
+ rightIcon: j,
19
+ isLoading: r,
20
+ textColor: s,
22
21
  onKeyDown: l,
23
22
  ...w
24
- } = t || {}, s = x(0), $ = (r) => {
25
- if (r.key === "Enter" || r.key === " ") {
23
+ } = t || {}, m = x(0), $ = (e) => {
24
+ if (e.key === "Enter" || e.key === " ") {
26
25
  const f = Date.now();
27
- if (f - s.current < 500) {
28
- r.preventDefault(), r.stopPropagation();
26
+ if (f - m.current < 500) {
27
+ e.preventDefault(), e.stopPropagation();
29
28
  return;
30
29
  }
31
- s.current = f;
30
+ m.current = f;
32
31
  }
33
- l == null || l(r);
34
- }, { m400: g, m500: b, m600: y } = D(R, n, u), { height: c, width: p, font: v } = P[C] || {}, h = ["white", "yellow"].includes(n) ? K.m600 : z, a = /* @__PURE__ */ o(
35
- B,
32
+ l == null || l(e);
33
+ }, { m400: g, m500: b, m600: y } = I[n] ?? u, { height: c, width: h, font: v } = M[C] || {}, p = ["white", "yellow"].includes(n) ? z.m600 : k, a = /* @__PURE__ */ o(
34
+ R,
36
35
  {
37
36
  ...w,
38
37
  onKeyDown: $,
@@ -40,13 +39,13 @@ const W = ({ theme: t, children: i }) => /* @__PURE__ */ o(k, { rippleColor: t.m
40
39
  $activeColor: y,
41
40
  $selectedColor: g,
42
41
  $height: c,
43
- $width: m || p,
42
+ $width: d || h,
44
43
  disabled: t.disabled,
45
- $isLoading: e,
46
- children: e ? /* @__PURE__ */ o(E, { children: /* @__PURE__ */ o(I, { size: "medium", color: d || h }) }) : /* @__PURE__ */ o(
47
- L,
44
+ $isLoading: r,
45
+ children: r ? /* @__PURE__ */ o(B, { children: /* @__PURE__ */ o(D, { size: "medium", color: s || p }) }) : /* @__PURE__ */ o(
46
+ E,
48
47
  {
49
- $textColor: d || h,
48
+ $textColor: s || p,
50
49
  $font: v,
51
50
  children: i
52
51
  }
@@ -54,16 +53,16 @@ const W = ({ theme: t, children: i }) => /* @__PURE__ */ o(k, { rippleColor: t.m
54
53
  }
55
54
  );
56
55
  return /* @__PURE__ */ o(
57
- S,
56
+ L,
58
57
  {
59
58
  $height: c,
60
- $width: m || p,
59
+ $width: d || h,
61
60
  disabled: t.disabled,
62
- $isLoading: e,
63
- children: e ? a : /* @__PURE__ */ o(W, { theme: n, children: a })
61
+ $isLoading: r,
62
+ children: r ? a : /* @__PURE__ */ o(P, { theme: n, children: a })
64
63
  }
65
64
  );
66
65
  };
67
66
  export {
68
- T as default
67
+ Q as default
69
68
  };
@@ -1,13 +1,12 @@
1
1
  import { jsxs as C, jsx as u } from "react/jsx-runtime";
2
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";
3
- import de from "lodash-es/get";
4
3
  import E from "../../colors/grey.js";
5
- import pe from "../MenuItem/MenuItem.js";
6
- import me from "../../colors/index.js";
7
- import he from "../../colors/blue.js";
4
+ import de from "../MenuItem/MenuItem.js";
5
+ import pe from "../../colors/index.js";
6
+ import me from "../../colors/blue.js";
8
7
  import K from "../Spinner/Spinner.js";
9
- 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";
10
- const Ee = (n) => {
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) => {
11
10
  if (typeof n != "string") return n;
12
11
  if (n.endsWith("px")) return parseFloat(n);
13
12
  if (n.endsWith("rem")) {
@@ -15,7 +14,7 @@ const Ee = (n) => {
15
14
  return O * s;
16
15
  }
17
16
  return parseFloat(n);
18
- }, Ve = ({
17
+ }, Pe = ({
19
18
  options: n,
20
19
  onChange: O,
21
20
  value: s,
@@ -33,7 +32,7 @@ const Ee = (n) => {
33
32
  searchPh: R = "Search..."
34
33
  }) => {
35
34
  var j;
36
- 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), _ = v(!0), G = () => !w && !x && d((e) => !e), P = (e) => {
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) => {
37
36
  e !== s && (O(e), d(!1));
38
37
  }, l = le(() => {
39
38
  if (!g || !k.trim()) return n;
@@ -62,7 +61,7 @@ const Ee = (n) => {
62
61
  }, [i, r]), h(() => {
63
62
  r && g && D.current && D.current.focus();
64
63
  }, [r, g]), h(() => {
65
- r || (_.current = !0);
64
+ r || (G.current = !0);
66
65
  }, [r]), h(() => {
67
66
  const e = (t) => {
68
67
  m.current && !m.current.contains(t.target) && d(!1);
@@ -70,27 +69,27 @@ const Ee = (n) => {
70
69
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
71
70
  }, []), ae(() => {
72
71
  if (r && S.current && m.current) {
73
- const e = m.current.getBoundingClientRect(), t = window.innerHeight, o = Ee(F), a = t - e.bottom;
72
+ const e = m.current.getBoundingClientRect(), t = window.innerHeight, o = ye(F), a = t - e.bottom;
74
73
  T(
75
74
  a < o + 8 && e.top > a ? "top" : "bottom"
76
75
  );
77
76
  }
78
77
  }, [r, F]);
79
- const J = (e) => {
78
+ const X = (e) => {
80
79
  let t = e + 1;
81
80
  for (; t < l.length; ) {
82
81
  if (!l[t].disabled) return t;
83
82
  t++;
84
83
  }
85
84
  return e;
86
- }, X = (e) => {
85
+ }, Y = (e) => {
87
86
  let t = e - 1;
88
87
  for (; t >= 0; ) {
89
88
  if (!l[t].disabled) return t;
90
89
  t--;
91
90
  }
92
91
  return e;
93
- }, Y = (e) => {
92
+ }, Z = (e) => {
94
93
  if (!(w || x)) {
95
94
  if (!r) {
96
95
  (e.key === " " || e.key === "Enter" || e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), d(!0));
@@ -99,11 +98,11 @@ const Ee = (n) => {
99
98
  switch (e.key) {
100
99
  case "ArrowDown":
101
100
  e.preventDefault();
102
- const t = J(i);
101
+ const t = X(i);
103
102
  t === i && I && !f && (c == null || c()), p(t);
104
103
  break;
105
104
  case "ArrowUp":
106
- e.preventDefault(), p((a) => X(a));
105
+ e.preventDefault(), p((a) => Y(a));
107
106
  break;
108
107
  case "Enter":
109
108
  e.preventDefault();
@@ -136,12 +135,12 @@ const Ee = (n) => {
136
135
  return t.observe(e), () => t.disconnect();
137
136
  }, [H, c, I, f]);
138
137
  const {
139
- m50: Z,
138
+ m50: _,
140
139
  m100: L,
141
140
  m200: M,
142
141
  m500: ee
143
- } = de(me, U, he), te = (e, t) => () => !e && p(t), V = (e) => `${y}-opt-${e}`, re = ({ value: e, label: t, disabled: o }, a) => /* @__PURE__ */ fe(
144
- pe,
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,
145
144
  {
146
145
  value: e,
147
146
  label: t,
@@ -154,7 +153,7 @@ const Ee = (n) => {
154
153
  id: V(a),
155
154
  width: b,
156
155
  selectedColor: M,
157
- hoverColor: Z,
156
+ hoverColor: _,
158
157
  activeColor: L
159
158
  }
160
159
  ), ne = (e) => () => {
@@ -168,12 +167,12 @@ const Ee = (n) => {
168
167
  e.stopPropagation();
169
168
  };
170
169
  return /* @__PURE__ */ C(
171
- be,
170
+ he,
172
171
  {
173
172
  ref: m,
174
173
  $width: b,
175
174
  tabIndex: x || w ? -1 : 0,
176
- onKeyDown: Y,
175
+ onKeyDown: Z,
177
176
  $isLoading: w,
178
177
  $isDisabled: x,
179
178
  role: "combobox",
@@ -186,24 +185,24 @@ const Ee = (n) => {
186
185
  onBlur: oe,
187
186
  children: [
188
187
  /* @__PURE__ */ C(
189
- we,
188
+ be,
190
189
  {
191
190
  $width: b,
192
- onClick: G,
191
+ onClick: J,
193
192
  $isOpen: r,
194
193
  $border: ee,
195
194
  $isFocused: q && !r,
196
195
  children: [
197
- /* @__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 }),
198
- /* @__PURE__ */ u(ge, { color: E.m500, size: 22, $isOpen: r, "aria-hidden": !0 })
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 })
199
198
  ]
200
199
  }
201
200
  ),
202
- /* @__PURE__ */ C(Ie, { $isOpen: r, $width: b, $height: F, $top: N === "top", children: [
203
- g && /* @__PURE__ */ C(ke, { onClick: ce, children: [
204
- /* @__PURE__ */ u(Se, { size: 20, color: E.m600, "aria-hidden": !0 }),
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 }),
205
204
  /* @__PURE__ */ u(
206
- Ce,
205
+ Se,
207
206
  {
208
207
  ref: D,
209
208
  value: k,
@@ -218,16 +217,16 @@ const Ee = (n) => {
218
217
  }
219
218
  )
220
219
  ] }),
221
- /* @__PURE__ */ C($e, { ref: S, role: "listbox", id: y, tabIndex: -1, children: [
220
+ /* @__PURE__ */ C(Ce, { ref: S, role: "listbox", id: y, tabIndex: -1, children: [
222
221
  l.map(re),
223
- c && /* @__PURE__ */ u(ve, { ref: B, children: f && /* @__PURE__ */ u(K, { size: "small", color: z }) })
222
+ c && /* @__PURE__ */ u($e, { ref: B, children: f && /* @__PURE__ */ u(K, { size: "small", color: z }) })
224
223
  ] })
225
224
  ] }),
226
- w && /* @__PURE__ */ u(ye, { children: /* @__PURE__ */ u(K, { size: "small", color: z }) })
225
+ w && /* @__PURE__ */ u(ve, { children: /* @__PURE__ */ u(K, { size: "small", color: z }) })
227
226
  ]
228
227
  }
229
228
  );
230
229
  };
231
230
  export {
232
- Ve as default
231
+ Pe as default
233
232
  };
@@ -1,24 +1,23 @@
1
- import { jsxs as D, jsx as n } from "react/jsx-runtime";
2
- import { useState as $, useRef as H } from "react";
3
- import m from "lodash-es/get";
4
- import P from "../../../colors/grey.js";
5
- import j from "../../Typography/P/P.js";
6
- import z from "../../../colors/white.js";
7
- import u from "../../../colors/blue.js";
8
- import { Wrapper as B, CbInput as C, Box as E } from "./styles.js";
9
- import { getColor as F } from "./helpers.js";
10
- const J = ({
11
- label: d,
12
- value: r,
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";
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 = ({
10
+ label: u,
11
+ value: o,
13
12
  color: l = "blue",
14
- textColor: p = P.m700,
15
- disabled: s,
16
- onChange: o,
17
- tabIndex: h,
18
- innerShade: k,
19
- outerShade: y
13
+ textColor: p = H.m700,
14
+ disabled: c,
15
+ onChange: t,
16
+ tabIndex: d,
17
+ innerShade: h,
18
+ outerShade: k
20
19
  }) => {
21
- const [S, t] = $(!1), c = F(l), b = k ?? m(c, "m500", u.m500), x = y ?? m(c, "m600", u.m600), a = H(0), g = (e) => o(e.target.checked), w = (e) => {
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) => {
22
21
  if (e.key === "Enter" || e.key === " ") {
23
22
  const i = Date.now();
24
23
  if (i - a.current < 500) {
@@ -26,42 +25,42 @@ const J = ({
26
25
  return;
27
26
  }
28
27
  if (a.current = i, e.key === " ") {
29
- e.preventDefault(), o(!r);
28
+ e.preventDefault(), t(!o);
30
29
  return;
31
30
  }
32
- o(!r), t(!1);
31
+ t(!o), n(!1);
33
32
  }
34
- e.key === "Escape" && t(!1);
35
- }, f = (e) => () => t(e);
36
- return /* @__PURE__ */ D(B, { as: "label", $disabled: s, children: [
37
- /* @__PURE__ */ n(
38
- C,
33
+ e.key === "Escape" && n(!1);
34
+ }, f = (e) => () => n(e);
35
+ return /* @__PURE__ */ D(z, { as: "label", $disabled: c, children: [
36
+ /* @__PURE__ */ s(
37
+ B,
39
38
  {
40
39
  type: "checkbox",
41
- checked: r,
42
- onChange: g,
40
+ checked: o,
41
+ onChange: x,
43
42
  onKeyDown: w,
44
43
  onFocus: f(!0),
45
44
  onBlur: f(!1),
46
- disabled: s,
47
- tabIndex: h
45
+ disabled: c,
46
+ tabIndex: d
48
47
  }
49
48
  ),
50
- /* @__PURE__ */ n(
51
- E,
49
+ /* @__PURE__ */ s(
50
+ C,
52
51
  {
53
- $value: r,
54
- $focused: S,
52
+ $value: o,
53
+ $focused: y,
55
54
  size: 6,
56
- color: z,
57
- $innerShade: b,
58
- $outerShade: x,
55
+ color: j,
56
+ $innerShade: S,
57
+ $outerShade: b,
59
58
  "aria-hidden": "true"
60
59
  }
61
60
  ),
62
- /* @__PURE__ */ n(j, { color: p, size: "1.2rem", children: d })
61
+ /* @__PURE__ */ s(P, { color: p, size: "1.2rem", children: u })
63
62
  ] });
64
63
  };
65
64
  export {
66
- J as default
65
+ G as default
67
66
  };
@@ -1,28 +1,27 @@
1
- import m from "lodash-es/get";
2
1
  import o from "../../../colors/blue.js";
3
- import t from "../../../colors/green.js";
4
- import p from "../../../colors/red.js";
5
- import i from "../../../colors/yellow.js";
6
- import e from "../../../colors/orange.js";
7
- import f from "../../../colors/black.js";
8
- import l from "../../../colors/grey.js";
9
- import g from "../../../colors/violet.js";
2
+ import m from "../../../colors/green.js";
3
+ import t from "../../../colors/red.js";
4
+ import p from "../../../colors/yellow.js";
5
+ import i from "../../../colors/orange.js";
6
+ import e from "../../../colors/black.js";
7
+ import f from "../../../colors/grey.js";
8
+ import l from "../../../colors/violet.js";
10
9
  import n from "../../../colors/teal.js";
11
- import a from "../../../colors/purple.js";
12
- import c from "../../../colors/pink.js";
13
- const _ = {
10
+ import g from "../../../colors/purple.js";
11
+ import a from "../../../colors/pink.js";
12
+ const c = {
14
13
  blue: o,
15
- green: t,
16
- red: p,
17
- yellow: i,
18
- orange: e,
19
- black: f,
20
- grey: l,
21
- violet: g,
14
+ green: m,
15
+ red: t,
16
+ yellow: p,
17
+ orange: i,
18
+ black: e,
19
+ grey: f,
20
+ violet: l,
22
21
  teal: n,
23
- purple: a,
24
- pink: c
25
- }, D = (r) => m(_, r, o.m500);
22
+ purple: g,
23
+ pink: a
24
+ }, w = (r) => c[r] ?? o.m500;
26
25
  export {
27
- D as getColor
26
+ w as getColor
28
27
  };
@@ -1,15 +1,14 @@
1
- import { jsx as o, jsxs as E } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as U } from "react/jsx-runtime";
2
2
  import { useRef as C } from "react";
3
- import U from "lodash-es/get";
4
- import { UploadBtnContainer as j, Wrapper as M, HiddenInput as W, PWrapper as b } from "./styles.js";
5
- import B from "../../../colors/white.js";
3
+ import { UploadBtnContainer as g, Wrapper as j, HiddenInput as M, PWrapper as W } from "./styles.js";
4
+ import b from "../../../colors/white.js";
6
5
  import x from "../../../colors/blue.js";
7
- import F from "../../../colors/grey.js";
8
- import H from "../../Icons/Link/Link.js";
9
- import P from "../../../colors/index.js";
10
- import Z from "../../Ripple/Ripple.js";
11
- import { SIZE as _, MEDIUM as q } from "./constants.js";
12
- const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m100, children: l }), ro = ({
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 = ({
13
12
  label: e,
14
13
  labelColor: l,
15
14
  theme: p = x,
@@ -17,21 +16,21 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m
17
16
  width: s,
18
17
  isLoading: t,
19
18
  disabled: r,
20
- prefixIcon: c = H,
19
+ prefixIcon: c = F,
21
20
  suffixIcon: m,
22
21
  type: I = "file",
23
22
  accept: R,
24
23
  isMultiple: k,
25
24
  onChange: z
26
25
  }) => {
27
- const u = C(null), { m400: K, m500: g, m600: v } = U(P, p, x), { height: h, width: a, font: n } = _[D] || {}, f = l || ["white", "yellow"].includes(p) ? F.m600 : B, $ = C(0), w = /* @__PURE__ */ E(
28
- M,
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,
29
28
  {
30
29
  $selectedColor: K,
31
- $hoverColor: g,
30
+ $hoverColor: v,
32
31
  $height: h,
33
32
  $width: s || a,
34
- $activeColor: v,
33
+ $activeColor: E,
35
34
  disabled: r,
36
35
  $isLoading: t,
37
36
  role: "button",
@@ -52,7 +51,7 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m
52
51
  },
53
52
  children: [
54
53
  /* @__PURE__ */ o(
55
- W,
54
+ M,
56
55
  {
57
56
  ref: u,
58
57
  type: I,
@@ -65,7 +64,7 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m
65
64
  ),
66
65
  c && /* @__PURE__ */ o(c, { color: f, size: n + 19 }),
67
66
  /* @__PURE__ */ o(
68
- b,
67
+ W,
69
68
  {
70
69
  color: f,
71
70
  size: `${n}rem`,
@@ -80,8 +79,8 @@ const A = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m
80
79
  ]
81
80
  }
82
81
  );
83
- return /* @__PURE__ */ o(j, { $height: h, $width: s || a, disabled: r, $isLoading: t, children: t || r ? w : /* @__PURE__ */ o(A, { theme: p, children: w }) });
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 }) });
84
83
  };
85
84
  export {
86
- ro as default
85
+ L as default
87
86
  };