meticulous-ui 2.2.8 → 2.3.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.
Files changed (50) hide show
  1. package/README.md +15 -14
  2. package/components/Dropdown/Dropdown.js +83 -82
  3. package/components/Dropdown/styles.js +4 -4
  4. package/components/Glass/Glass.js +6 -0
  5. package/components/Glass/index.js +4 -0
  6. package/components/Glass/styles.js +73 -0
  7. package/components/Icons/Add/index.js +4 -0
  8. package/components/Icons/Link/index.js +4 -0
  9. package/components/Icons/MediaPauseFilled/index.js +4 -0
  10. package/components/Icons/MediaPlayFilled/index.js +4 -0
  11. package/components/Icons/MediaStopFilled/index.js +4 -0
  12. package/components/Input/Checkbox/Checkbox.js +39 -0
  13. package/components/Input/Checkbox/helpers.js +28 -0
  14. package/components/Input/Checkbox/index.js +4 -0
  15. package/components/Input/Checkbox/styles.js +30 -0
  16. package/components/Input/FileUploader/FileUploader.js +76 -0
  17. package/components/Input/FileUploader/constants.js +29 -0
  18. package/components/Input/FileUploader/index.js +4 -0
  19. package/components/Input/FileUploader/styles.js +83 -0
  20. package/components/Input/Radio/Radio.js +26 -0
  21. package/components/Input/Radio/styles.js +45 -0
  22. package/components/Input/RadioGroup/RadioGroup.js +27 -0
  23. package/components/Input/RadioGroup/index.js +4 -0
  24. package/components/Input/RadioGroup/styles.js +18 -0
  25. package/components/Input/Textarea/styles.js +4 -4
  26. package/components/MenuItem/styles.js +4 -4
  27. package/components/OtpInput/OtpInput.js +30 -29
  28. package/components/Pagination/styles.js +6 -6
  29. package/components/Spinner/Spinner.js +11 -10
  30. package/components/Timer/Timer.js +64 -0
  31. package/components/Timer/components/TimerRing/TimerRing.js +42 -0
  32. package/components/Timer/components/TimerRing/styles.js +7 -0
  33. package/components/Timer/constants.js +25 -0
  34. package/components/Timer/index.js +4 -0
  35. package/components/Timer/styles.js +164 -0
  36. package/components/Typography/Headings/H1.js +9 -0
  37. package/components/Typography/Headings/H2.js +9 -0
  38. package/components/Typography/Headings/H3.js +9 -0
  39. package/components/Typography/Headings/H4.js +9 -0
  40. package/components/Typography/Headings/H5.js +9 -0
  41. package/components/Typography/Headings/H6.js +9 -0
  42. package/components/VideoPlayer/VideoPlayer.js +34 -0
  43. package/components/VideoPlayer/components/Volumebar/Volumebar.js +13 -0
  44. package/components/VideoPlayer/components/Volumebar/styles.js +38 -0
  45. package/components/VideoPlayer/index.js +4 -0
  46. package/components/VideoPlayer/styles.js +34 -0
  47. package/components/VideoPlayer/useSpacebarToggle.js +37 -0
  48. package/components/VideoPlayer/useVolumeOverlay.js +10 -0
  49. package/index.js +40 -16
  50. package/package.json +12 -6
package/README.md CHANGED
@@ -47,20 +47,21 @@ export default App;
47
47
 
48
48
  ## 📦 Components
49
49
 
50
- | Component | Description |
51
- | ------------- | -------------------------------------------------- |
52
- | `Pagination` | Fully responsive pagination component |
53
- | `Toast` | Push 4 types of notifications on screen |
54
- | `Timer` | Renders analog / digital clock with alarm |
55
- | `OtpInput` | Gives inputs to enter and edit OTP |
56
- | `VideoPlayer` | Renders video with keyboard shortcuts |
57
- | `Input` | Renders input box to let user enter input |
58
- | `Checkbox` | Renders checkbox to let user give boolean value |
59
- | `RadioGroup` | Renders radio options ina group to let user select |
60
- | `Textarea` | Renders textarea box to let user enter description |
61
- | `Dropdown` | Renders dropdown to select from options |
62
- | `Spinner` | Renders a spinner to show the loading state |
63
- | `Button` | Renders a button to click & take an action |
50
+ | Component | Description |
51
+ | -------------- | ------------------------------------------------------ |
52
+ | `Pagination` | Fully responsive pagination component |
53
+ | `Toast` | Push 4 types of notifications on screen |
54
+ | `Timer` | Renders analog / digital clock with alarm |
55
+ | `OtpInput` | Gives inputs to enter and edit OTP |
56
+ | `VideoPlayer` | Renders video with keyboard shortcuts |
57
+ | `Input` | Renders input box to let user enter input |
58
+ | `Checkbox` | Renders checkbox to let user give boolean value |
59
+ | `RadioGroup` | Renders radio options in a group to let user select |
60
+ | `FileUploader` | Renders a button type input from where user can upload |
61
+ | `Textarea` | Renders textarea box to let user enter description |
62
+ | `Dropdown` | Renders dropdown to select from options |
63
+ | `Spinner` | Renders a spinner to show the loading state |
64
+ | `Button` | Renders a button to click & take an action |
64
65
 
65
66
  ## 📦 Icon Components
66
67
 
@@ -1,56 +1,57 @@
1
1
  import { j as r } from "../../_virtual/jsx-runtime.js";
2
- import { useState as C, useRef as S, useMemo as M, useEffect as d, useLayoutEffect as ee, useCallback as te, createElement as ne } from "react";
3
- import re from "../../node_modules/lodash-es/get.js";
2
+ import { useState as C, useRef as S, useMemo as ee, useEffect as d, useLayoutEffect as te, useCallback as ne, createElement as re } from "react";
3
+ import se from "../../node_modules/lodash-es/get.js";
4
4
  import I from "../../colors/grey.js";
5
5
  import oe from "../MenuItem/MenuItem.js";
6
- import se from "../../colors/index.js";
7
- import ie from "../../colors/blue.js";
8
- import F from "../Spinner/Spinner.js";
9
- import { DropdownWrapper as ce, Box as le, PWrapper as fe, ChevronDownWrapper as ue, OptionWrapper as ae, SearchContainer as pe, SearchIcon as de, SearchInput as me, OptionsList as he, LoadMoreSentinel as xe, SpinnerWrapper as be } from "./styles.js";
10
- const ge = (o) => {
11
- if (typeof o != "string") return o;
12
- if (o.endsWith("px")) return parseFloat(o);
13
- if (o.endsWith("rem")) {
14
- const E = parseFloat(o), i = parseFloat(getComputedStyle(document.documentElement).fontSize);
6
+ import ie from "../../colors/index.js";
7
+ import ce from "../../colors/blue.js";
8
+ import P from "../Spinner/Spinner.js";
9
+ import { DropdownWrapper as le, Box as fe, PWrapper as ue, ChevronDownWrapper as pe, OptionWrapper as ae, SearchContainer as de, SearchIcon as me, SearchInput as he, OptionsList as xe, LoadMoreSentinel as be, SpinnerWrapper as ge } from "./styles.js";
10
+ const we = (s) => {
11
+ if (typeof s != "string") return s;
12
+ if (s.endsWith("px")) return parseFloat(s);
13
+ if (s.endsWith("rem")) {
14
+ const E = parseFloat(s), i = parseFloat(getComputedStyle(document.documentElement).fontSize);
15
15
  return E * i;
16
16
  }
17
- return parseFloat(o);
18
- }, ye = ({
19
- options: o,
17
+ return parseFloat(s);
18
+ }, De = ({
19
+ options: s,
20
20
  onChange: E,
21
21
  value: i,
22
22
  width: m = "20rem",
23
23
  menuHeight: O = "20rem",
24
- placeholder: P,
25
- theme: A = "blue",
24
+ placeholder: A,
25
+ theme: B = "blue",
26
26
  isLoading: $,
27
27
  isDisabled: v,
28
28
  loaderColor: y,
29
29
  searchable: h = !1,
30
- onLoadMore: l,
30
+ onLoadMore: c,
31
31
  hasMore: x = !1,
32
- isLoadingMore: a = !1,
33
- searchPh: B = "Search..."
32
+ isLoadingMore: p = !1,
33
+ searchPh: H = "Search..."
34
34
  }) => {
35
- const [n, j] = C(!1), [H, V] = C("bottom"), [b, D] = C(""), [f, p] = C(-1), g = S(null), w = S(null), k = S(null), R = S(null), K = S(!0), Q = () => j((e) => !e), z = (e) => {
35
+ var F;
36
+ const [n, j] = C(!1), [V, K] = C("bottom"), [b, D] = C(""), [f, a] = C(-1), g = S(null), w = S(null), k = S(null), R = S(null), Q = S(!0), q = () => j((e) => !e), z = (e) => {
36
37
  e !== i && (E(e), j(!1));
37
- }, c = M(() => {
38
- if (!h || !b.trim()) return o;
38
+ }, l = ee(() => {
39
+ if (!h || !b.trim()) return s;
39
40
  const e = b.toLowerCase();
40
- return o.filter(({ label: t }) => t.toLowerCase().includes(e));
41
- }, [o, b, h]);
41
+ return s.filter(({ label: t }) => t.toLowerCase().includes(e));
42
+ }, [s, b, h]);
42
43
  d(() => {
43
44
  if (n) {
44
- const e = c.findIndex((t) => t.value === i);
45
- if (e !== -1 && !c[e].disabled)
46
- p(e);
45
+ const e = l.findIndex((t) => t.value === i);
46
+ if (e !== -1 && !l[e].disabled)
47
+ a(e);
47
48
  else {
48
- const t = c.findIndex((s) => !s.disabled);
49
- p(t);
49
+ const t = l.findIndex((o) => !o.disabled);
50
+ a(t);
50
51
  }
51
52
  } else
52
- D(""), p(-1);
53
- }, [n, b, c, i]), d(() => {
53
+ D(""), a(-1);
54
+ }, [n, b, l, i]), d(() => {
54
55
  if (n && f !== -1 && w.current) {
55
56
  const e = w.current.children[f];
56
57
  e && e.scrollIntoView({
@@ -61,63 +62,63 @@ const ge = (o) => {
61
62
  }, [f, n]), d(() => {
62
63
  n && h && k.current && k.current.focus();
63
64
  }, [n, h]), d(() => {
64
- n || (K.current = !0);
65
+ n || (Q.current = !0);
65
66
  }, [n]), d(() => {
66
67
  const e = (t) => {
67
68
  g.current && !g.current.contains(t.target) && j(!1);
68
69
  };
69
70
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
70
- }, []), ee(() => {
71
+ }, []), te(() => {
71
72
  if (n && w.current && g.current) {
72
- const e = g.current.getBoundingClientRect(), t = window.innerHeight, s = ge(O), u = t - e.bottom;
73
- V(
74
- u < s + 8 && e.top > u ? "top" : "bottom"
73
+ const e = g.current.getBoundingClientRect(), t = window.innerHeight, o = we(O), u = t - e.bottom;
74
+ K(
75
+ u < o + 8 && e.top > u ? "top" : "bottom"
75
76
  );
76
77
  }
77
78
  }, [n, O]);
78
- const q = (e) => {
79
+ const N = (e) => {
79
80
  let t = e + 1;
80
- for (; t < c.length; ) {
81
- if (!c[t].disabled) return t;
81
+ for (; t < l.length; ) {
82
+ if (!l[t].disabled) return t;
82
83
  t++;
83
84
  }
84
85
  return e;
85
- }, N = (e) => {
86
+ }, U = (e) => {
86
87
  let t = e - 1;
87
88
  for (; t >= 0; ) {
88
- if (!c[t].disabled) return t;
89
+ if (!l[t].disabled) return t;
89
90
  t--;
90
91
  }
91
92
  return e;
92
- }, U = (e) => {
93
+ }, G = (e) => {
93
94
  if (n)
94
95
  switch (e.key) {
95
96
  case "ArrowDown":
96
97
  e.preventDefault();
97
- const t = q(f);
98
- t === f && x && !a && l?.(), p(t);
98
+ const t = N(f);
99
+ t === f && x && !p && (c == null || c()), a(t);
99
100
  break;
100
101
  case "ArrowUp":
101
- e.preventDefault(), p((u) => N(u));
102
+ e.preventDefault(), a((u) => U(u));
102
103
  break;
103
104
  case "Enter":
104
105
  e.preventDefault();
105
- const s = c[f];
106
- s && !s.disabled && z(s.value);
106
+ const o = l[f];
107
+ o && !o.disabled && z(o.value);
107
108
  break;
108
109
  case "Escape":
109
110
  j(!1);
110
111
  break;
111
112
  }
112
- }, W = te(() => {
113
- x && !a && l && l();
114
- }, [x, a, l]);
113
+ }, W = ne(() => {
114
+ x && !p && c && c();
115
+ }, [x, p, c]);
115
116
  d(() => {
116
117
  const e = R.current;
117
- if (!e || !l || !x) return;
118
+ if (!e || !c || !x) return;
118
119
  const t = new IntersectionObserver(
119
- ([s]) => {
120
- s.isIntersecting && !a && W();
120
+ ([o]) => {
121
+ o.isIntersecting && !p && W();
121
122
  },
122
123
  {
123
124
  root: w.current,
@@ -128,70 +129,70 @@ const ge = (o) => {
128
129
  }
129
130
  );
130
131
  return t.observe(e), () => t.disconnect();
131
- }, [W, l, x, a]);
132
+ }, [W, c, x, p]);
132
133
  const {
133
- m50: G,
134
- m100: J,
135
- m200: T,
136
- m500: X
137
- } = re(se, A, ie), Y = (e, t) => () => !e && p(t), Z = ({ value: e, label: t, disabled: s }, u) => /* @__PURE__ */ ne(
134
+ m50: J,
135
+ m100: T,
136
+ m200: X,
137
+ m500: Y
138
+ } = se(ie, B, ce), Z = (e, t) => () => !e && a(t), _ = ({ value: e, label: t, disabled: o }, u) => /* @__PURE__ */ re(
138
139
  oe,
139
140
  {
140
141
  value: e,
141
142
  label: t,
142
- isDisabled: s,
143
+ isDisabled: o,
143
144
  onSelect: z,
144
- onMouseEnter: Y(s, u),
145
+ onMouseEnter: Z(o, u),
145
146
  isSelected: e === i,
146
147
  isHighlighted: u === f,
147
148
  key: e,
148
149
  width: m,
149
- selectedColor: T,
150
- hoverColor: G,
151
- activeColor: J
150
+ selectedColor: X,
151
+ hoverColor: J,
152
+ activeColor: T
152
153
  }
153
- ), _ = (e) => {
154
+ ), L = (e) => {
154
155
  D(e.target.value);
155
- }, L = (e) => {
156
+ }, M = (e) => {
156
157
  e.stopPropagation();
157
158
  };
158
159
  return /* @__PURE__ */ r.jsxs(
159
- ce,
160
+ le,
160
161
  {
161
162
  ref: g,
162
163
  $width: m,
163
164
  tabIndex: v ? -1 : 0,
164
- onKeyDown: U,
165
+ onKeyDown: G,
165
166
  $isLoading: $,
166
167
  $isDisabled: v,
167
168
  children: [
168
- /* @__PURE__ */ r.jsxs(le, { $width: m, onClick: Q, $isOpen: n, $border: X, children: [
169
- /* @__PURE__ */ r.jsx(fe, { $width: m, color: i ? I.m700 : I.m500, size: "1.2rem", children: i ? o.find(({ value: e }) => i === e)?.label : P }),
170
- /* @__PURE__ */ r.jsx(ue, { color: I.m500, size: 22, $isOpen: n })
169
+ /* @__PURE__ */ r.jsxs(fe, { $width: m, onClick: q, $isOpen: n, $border: Y, children: [
170
+ /* @__PURE__ */ r.jsx(ue, { $width: m, color: i ? I.m700 : I.m500, size: "1.2rem", children: i ? (F = s.find(({ value: e }) => i === e)) == null ? void 0 : F.label : A }),
171
+ /* @__PURE__ */ r.jsx(pe, { color: I.m500, size: 22, $isOpen: n })
171
172
  ] }),
172
- /* @__PURE__ */ r.jsxs(ae, { $isOpen: n, $width: m, $height: O, $top: H === "top", children: [
173
- h && /* @__PURE__ */ r.jsxs(pe, { onClick: L, children: [
174
- /* @__PURE__ */ r.jsx(de, { size: 20, color: I.m600 }),
173
+ /* @__PURE__ */ r.jsxs(ae, { $isOpen: n, $width: m, $height: O, $top: V === "top", children: [
174
+ h && /* @__PURE__ */ r.jsxs(de, { onClick: M, children: [
175
+ /* @__PURE__ */ r.jsx(me, { size: 20, color: I.m600 }),
175
176
  /* @__PURE__ */ r.jsx(
176
- me,
177
+ he,
177
178
  {
178
179
  ref: k,
179
180
  value: b,
180
- onChange: _,
181
- placeholder: B
181
+ onChange: L,
182
+ placeholder: H
182
183
  }
183
184
  )
184
185
  ] }),
185
- /* @__PURE__ */ r.jsxs(he, { ref: w, children: [
186
- c.map(Z),
187
- l && /* @__PURE__ */ r.jsx(xe, { ref: R, children: a && /* @__PURE__ */ r.jsx(F, { size: "small", color: y }) })
186
+ /* @__PURE__ */ r.jsxs(xe, { ref: w, children: [
187
+ l.map(_),
188
+ c && /* @__PURE__ */ r.jsx(be, { ref: R, children: p && /* @__PURE__ */ r.jsx(P, { size: "small", color: y }) })
188
189
  ] })
189
190
  ] }),
190
- $ && /* @__PURE__ */ r.jsx(be, { children: /* @__PURE__ */ r.jsx(F, { size: "small", color: y }) })
191
+ $ && /* @__PURE__ */ r.jsx(ge, { children: /* @__PURE__ */ r.jsx(P, { size: "small", color: y }) })
191
192
  ]
192
193
  }
193
194
  );
194
195
  };
195
196
  export {
196
- ye as default
197
+ De as default
197
198
  };
@@ -114,9 +114,9 @@ const c = n`
114
114
  &::placeholder {
115
115
  color: ${t.m400};
116
116
  }
117
- `, L = e(d)`
117
+ `, E = e(d)`
118
118
  margin: 0 0.8rem;
119
- `, O = e.div`
119
+ `, L = e.div`
120
120
  display: flex;
121
121
  justify-content: center;
122
122
  align-items: center;
@@ -128,12 +128,12 @@ export {
128
128
  $ as Box,
129
129
  S as ChevronDownWrapper,
130
130
  w as DropdownWrapper,
131
- O as LoadMoreSentinel,
131
+ L as LoadMoreSentinel,
132
132
  k as OptionWrapper,
133
133
  D as OptionsList,
134
134
  y as PWrapper,
135
135
  z as SearchContainer,
136
- L as SearchIcon,
136
+ E as SearchIcon,
137
137
  C as SearchInput,
138
138
  W as SpinnerWrapper
139
139
  };
@@ -0,0 +1,6 @@
1
+ import { j as o } from "../../_virtual/jsx-runtime.js";
2
+ import { GlassWrapper as a } from "./styles.js";
3
+ const p = ({ border: r = "none", borderRadius: s = 0 }) => /* @__PURE__ */ o.jsx(a, { $border: r, $borderRadius: s });
4
+ export {
5
+ p as default
6
+ };
@@ -0,0 +1,4 @@
1
+ import o from "./Glass.js";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,73 @@
1
+ import a from "../../node_modules/styled-components/dist/styled-components.browser.esm.js";
2
+ const e = a.div`
3
+ width: 100%;
4
+ height: 100%;
5
+ border-radius: ${({ $borderRadius: r }) => r};
6
+ position: relative;
7
+ overflow: hidden;
8
+ box-sizing: border-box;
9
+
10
+ background:
11
+ radial-gradient(
12
+ 60rem 22rem at 50% 45%,
13
+ rgba(20, 40, 20, 0.06),
14
+ rgba(10, 25, 10, 0.02) 50%,
15
+ transparent 70%
16
+ ),
17
+ linear-gradient(
18
+ 180deg,
19
+ rgba(255, 255, 255, 0.18) 0%,
20
+ rgba(255, 255, 255, 0.06) 40%,
21
+ rgba(255, 255, 255, 0.03) 100%
22
+ );
23
+
24
+ box-shadow:
25
+ 0 3rem 6rem rgba(7, 22, 10, 0.3),
26
+ 0 2px 0 rgba(255, 255, 255, 0.03) inset;
27
+
28
+ border: 1px solid rgba(255, 255, 255, 0.25);
29
+ color: rgba(8, 34, 16, 0.95);
30
+
31
+ ::before {
32
+ content: '';
33
+ position: absolute;
34
+ left: -12%;
35
+ top: -24%;
36
+ width: 62%;
37
+ height: 62%;
38
+ border-radius: 50%;
39
+ background: radial-gradient(
40
+ circle,
41
+ rgba(255, 255, 255, 0.24),
42
+ rgba(255, 255, 255, 0.06) 40%,
43
+ transparent 60%
44
+ );
45
+ filter: blur(4.6rem);
46
+ opacity: 0.85;
47
+ pointer-events: none;
48
+ transform: translateZ(0);
49
+ }
50
+
51
+ ::after {
52
+ content: '';
53
+ position: absolute;
54
+ right: -6%;
55
+ bottom: -18%;
56
+ width: 68%;
57
+ height: 68%;
58
+ border-radius: 50%;
59
+ background: radial-gradient(
60
+ circle at 30% 40%,
61
+ rgba(255, 255, 255, 0.08),
62
+ rgba(255, 255, 255, 0.01) 40%,
63
+ transparent 70%
64
+ );
65
+ filter: blur(5.4rem);
66
+ opacity: 0.45;
67
+ pointer-events: none;
68
+ transform: translateZ(0);
69
+ }
70
+ `;
71
+ export {
72
+ e as GlassWrapper
73
+ };
@@ -0,0 +1,4 @@
1
+ import o from "./Add.js";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import r from "./Link.js";
2
+ export {
3
+ r as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import a from "./MediaPauseFilled.js";
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import e from "./MediaPlayFilled.js";
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import o from "./MediaStopFilled.js";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,39 @@
1
+ import { j as o } from "../../../_virtual/jsx-runtime.js";
2
+ import m from "../../../node_modules/lodash-es/get.js";
3
+ import f from "../../../colors/grey.js";
4
+ import x from "../../Typography/P/P.js";
5
+ import u from "../../../colors/white.js";
6
+ import c from "../../../colors/blue.js";
7
+ import { Wrapper as j, Box as k } from "./styles.js";
8
+ import { getColor as g } from "./helpers.js";
9
+ const E = ({ label: s, value: r, color: n = "blue", textColor: p = f.m700, disabled: e, onChange: t }) => {
10
+ const h = () => {
11
+ e || t(!r);
12
+ }, i = g(n), a = m(i, "m500", c.m500), l = m(i, "m800", c.m800);
13
+ return /* @__PURE__ */ o.jsxs(j, { onClick: h, $disabled: e, children: [
14
+ /* @__PURE__ */ o.jsx(
15
+ "input",
16
+ {
17
+ type: "checkbox",
18
+ checked: r,
19
+ onChange: (d) => t(d.target.checked),
20
+ disabled: e,
21
+ style: { position: "absolute", opacity: 0, width: 0, height: 0 }
22
+ }
23
+ ),
24
+ /* @__PURE__ */ o.jsx(
25
+ k,
26
+ {
27
+ $value: r,
28
+ size: 6,
29
+ color: u,
30
+ $innerShade: a,
31
+ $outerShade: l
32
+ }
33
+ ),
34
+ /* @__PURE__ */ o.jsx(x, { color: p, size: "1.2rem", children: s })
35
+ ] });
36
+ };
37
+ export {
38
+ E as default
39
+ };
@@ -0,0 +1,28 @@
1
+ import m from "../../../node_modules/lodash-es/get.js";
2
+ 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";
10
+ import n from "../../../colors/teal.js";
11
+ import a from "../../../colors/purple.js";
12
+ import c from "../../../colors/pink.js";
13
+ const b = {
14
+ blue: o,
15
+ green: t,
16
+ red: p,
17
+ yellow: i,
18
+ orange: e,
19
+ black: f,
20
+ grey: l,
21
+ violet: g,
22
+ teal: n,
23
+ purple: a,
24
+ pink: c
25
+ }, D = (r) => m(b, r, o.m500);
26
+ export {
27
+ D as getColor
28
+ };
@@ -0,0 +1,4 @@
1
+ import e from "./Checkbox.js";
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,30 @@
1
+ import t, { css as e } from "../../../node_modules/styled-components/dist/styled-components.browser.esm.js";
2
+ import i from "../../Icons/Check/Check.js";
3
+ import n from "../../../colors/grey.js";
4
+ const m = t.div`
5
+ cursor: pointer;
6
+ display: flex;
7
+ align-items: center;
8
+ gap: 0.8rem;
9
+ width: max-content;
10
+
11
+ ${({ $disabled: r }) => r && e`
12
+ pointer-events: none;
13
+ opacity: 0.7;
14
+ `}
15
+ `, c = t(i)`
16
+ width: 1.2rem;
17
+ height: 1.2rem;
18
+ border: 1px solid ${({ $value: r, $outerShade: o }) => r ? o : n.m800};
19
+ border-radius: 0.2rem;
20
+ background-color: ${({ $value: r, $innerShade: o }) => r ? o : "transparent"};
21
+ transition: background-color 0.35s ease;
22
+
23
+ path {
24
+ stroke-width: 3;
25
+ }
26
+ `;
27
+ export {
28
+ c as Box,
29
+ m as Wrapper
30
+ };
@@ -0,0 +1,76 @@
1
+ import { j as o } from "../../../_virtual/jsx-runtime.js";
2
+ import { useRef as U } from "react";
3
+ import a from "../../../node_modules/lodash-es/get.js";
4
+ import { UploadBtnContainer as v, HiddenInput as M, Wrapper as W, PWrapper as g } from "./styles.js";
5
+ import y from "../../../colors/white.js";
6
+ import x from "../../../colors/blue.js";
7
+ import B from "../../Icons/Link/Link.js";
8
+ import D from "../../../colors/index.js";
9
+ import F from "../../Ripple/Ripple.js";
10
+ import { SIZE as H, MEDIUM as Z } from "./constants.js";
11
+ const q = ({ theme: t, children: r }) => /* @__PURE__ */ o.jsx(F, { rippleColor: t.m100, children: r }), X = ({
12
+ label: t,
13
+ labelColor: r = y,
14
+ theme: s = x,
15
+ size: j = Z,
16
+ width: c,
17
+ isLoading: i,
18
+ disabled: e,
19
+ prefixIcon: n = B,
20
+ suffixIcon: m,
21
+ type: d = "file",
22
+ accept: C,
23
+ isMultiple: R,
24
+ onChange: k
25
+ }) => {
26
+ const l = U(null), { m400: w, m500: z, m600: E } = a(D, s, x), { height: f, width: h, font: p } = H[j] || {}, I = () => {
27
+ var u;
28
+ !e && !i && ((u = l.current) == null || u.click());
29
+ }, $ = /* @__PURE__ */ o.jsxs(
30
+ W,
31
+ {
32
+ $selectedColor: w,
33
+ $hoverColor: z,
34
+ $height: f,
35
+ $width: c || h,
36
+ $activeColor: E,
37
+ disabled: e,
38
+ isLoading: i,
39
+ type: "button",
40
+ onClick: I,
41
+ children: [
42
+ n && /* @__PURE__ */ o.jsx(n, { color: r, size: p + 19 }),
43
+ /* @__PURE__ */ o.jsx(
44
+ g,
45
+ {
46
+ color: r,
47
+ size: `${p}rem`,
48
+ $prefixIcon: !!n,
49
+ $suffixIcon: !!m,
50
+ $iconSize: p + 19,
51
+ title: t,
52
+ children: t
53
+ }
54
+ ),
55
+ m && /* @__PURE__ */ o.jsx(m, { color: r, size: p + 19 })
56
+ ]
57
+ }
58
+ );
59
+ return /* @__PURE__ */ o.jsxs(v, { $height: f, $width: c || h, disabled: e, $isLoading: i, children: [
60
+ /* @__PURE__ */ o.jsx(
61
+ M,
62
+ {
63
+ ref: l,
64
+ type: d,
65
+ accept: C,
66
+ multiple: R,
67
+ disabled: e,
68
+ onChange: k
69
+ }
70
+ ),
71
+ i ? $ : /* @__PURE__ */ o.jsx(q, { theme: s, children: $ })
72
+ ] });
73
+ };
74
+ export {
75
+ X as default
76
+ };
@@ -0,0 +1,29 @@
1
+ const t = "small", h = "medium", o = "large", e = "ex-large", i = {
2
+ [t]: {
3
+ height: 2.8,
4
+ width: 6.75,
5
+ font: 1
6
+ },
7
+ [h]: {
8
+ height: 3.2,
9
+ width: 7.5,
10
+ font: 1.2
11
+ },
12
+ [o]: {
13
+ height: 3.6,
14
+ width: 8.25,
15
+ font: 1.4
16
+ },
17
+ [e]: {
18
+ height: 4,
19
+ width: 9,
20
+ font: 1.6
21
+ }
22
+ };
23
+ export {
24
+ e as EX_LARGE,
25
+ o as LARGE,
26
+ h as MEDIUM,
27
+ i as SIZE,
28
+ t as SMALL
29
+ };