meticulous-ui 3.0.4 → 3.0.6
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 +21 -20
- package/components/Button/Button.js +17 -16
- package/components/Image/Image.js +10 -9
- package/components/Input/FileUploader/FileUploader.js +31 -33
- package/components/OtpInput/OtpInput.js +36 -44
- package/components/OtpInput/helpers.js +15 -13
- package/components/OtpInput/styles.js +1 -1
- package/components/Toast/helpers.js +13 -13
- package/components/Toast/styles.js +9 -6
- package/components/Typography/Headings/index.js +16 -0
- package/index.js +36 -46
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,26 +58,27 @@ import blue from 'meticulous-ui/colors/blue';
|
|
|
58
58
|
|
|
59
59
|
## 📦 Components
|
|
60
60
|
|
|
61
|
-
| Component
|
|
62
|
-
|
|
|
63
|
-
| `Pagination`
|
|
64
|
-
| `Toast`
|
|
65
|
-
| `Timer`
|
|
66
|
-
| `OtpInput`
|
|
67
|
-
| `VideoPlayer`
|
|
68
|
-
| `Image`
|
|
69
|
-
| `Input`
|
|
70
|
-
| `Checkbox`
|
|
71
|
-
| `RadioGroup`
|
|
72
|
-
| `FileUploader`
|
|
73
|
-
| `Textarea`
|
|
74
|
-
| `Dropdown`
|
|
75
|
-
| `SelectBox`
|
|
76
|
-
| `Spinner`
|
|
77
|
-
| `Loader`
|
|
78
|
-
| `PageLoader`
|
|
79
|
-
| `Button`
|
|
80
|
-
| `Shimmer`
|
|
61
|
+
| Component | Description |
|
|
62
|
+
| --------------- | ---------------------------------------------------------------- |
|
|
63
|
+
| `Pagination` | Fully responsive pagination component |
|
|
64
|
+
| `Toast` | Push 4 types of notifications on screen |
|
|
65
|
+
| `Timer` | Renders analog / digital clock with alarm |
|
|
66
|
+
| `OtpInput` | Gives inputs to enter and edit OTP |
|
|
67
|
+
| `VideoPlayer` | Renders video with keyboard shortcuts |
|
|
68
|
+
| `Image` | Renders image with shimmer, lower resolution |
|
|
69
|
+
| `Input` | Renders input box to let user enter input |
|
|
70
|
+
| `Checkbox` | Renders checkbox to let user give boolean value |
|
|
71
|
+
| `RadioGroup` | Renders radio options in a group to let user select |
|
|
72
|
+
| `FileUploader` | Renders a button type input from where user can upload |
|
|
73
|
+
| `Textarea` | Renders textarea box to let user enter description |
|
|
74
|
+
| `Dropdown` | Renders dropdown to select from options |
|
|
75
|
+
| `SelectBox` | Renders selectbox to select multiple values from options |
|
|
76
|
+
| `Spinner` | Renders a spinner to show the loading state |
|
|
77
|
+
| `Loader` | Renders a loader with dots to show the loading state |
|
|
78
|
+
| `PageLoader` | Renders a loader with line at the top of page |
|
|
79
|
+
| `Button` | Renders a button to click & take an action |
|
|
80
|
+
| `Shimmer` | Animated skeleton loading placeholder |
|
|
81
|
+
| `RootComponent` | This is the required wrapper for any app that uses meticulous-ui |
|
|
81
82
|
|
|
82
83
|
## 📦 Icon Components
|
|
83
84
|
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as x } from "react";
|
|
3
3
|
import D from "../Spinner/Spinner.js";
|
|
4
4
|
import I from "../../colors/index.js";
|
|
5
|
-
import
|
|
5
|
+
import u from "../../colors/blue.js";
|
|
6
6
|
import { ButtonWrapper as R, SpinnerWrapper as B, Content as E, ButtonContainer as L } from "./styles.js";
|
|
7
7
|
import S from "../Ripple/Ripple.js";
|
|
8
8
|
import k from "../../colors/white.js";
|
|
@@ -11,41 +11,42 @@ import { MEDIUM as K, SIZE as M } from "./constants.js";
|
|
|
11
11
|
const P = ({ theme: t, children: i }) => /* @__PURE__ */ o(S, { rippleColor: t.m100, children: i }), Q = (t) => {
|
|
12
12
|
const {
|
|
13
13
|
children: i,
|
|
14
|
-
theme: n =
|
|
15
|
-
size:
|
|
14
|
+
theme: n = u,
|
|
15
|
+
size: C = K,
|
|
16
16
|
width: s,
|
|
17
17
|
leftIcon: W,
|
|
18
18
|
rightIcon: j,
|
|
19
|
-
isLoading:
|
|
19
|
+
isLoading: r,
|
|
20
20
|
textColor: d,
|
|
21
21
|
onKeyDown: l,
|
|
22
22
|
...w
|
|
23
|
-
} = t || {}, m = x(0), $ = (
|
|
24
|
-
if (
|
|
23
|
+
} = t || {}, m = x(0), $ = (e) => {
|
|
24
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
25
25
|
const f = Date.now();
|
|
26
26
|
if (f - m.current < 500) {
|
|
27
|
-
|
|
27
|
+
e.preventDefault(), e.stopPropagation();
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
m.current = f;
|
|
31
31
|
}
|
|
32
|
-
l == null || l(
|
|
33
|
-
}, { m400: g, m500: b, m600: y } = I[n] ??
|
|
32
|
+
l == null || l(e);
|
|
33
|
+
}, { m400: g, m500: b, m600: y } = I[n] ?? u, { height: c, width: p, font: v } = M[C] || {}, h = ["white", "yellow"].includes(n) ? z.m600 : k, a = /* @__PURE__ */ o(
|
|
34
34
|
R,
|
|
35
35
|
{
|
|
36
|
+
type: "button",
|
|
36
37
|
...w,
|
|
37
38
|
onKeyDown: $,
|
|
38
39
|
$hoverColor: b,
|
|
39
40
|
$activeColor: y,
|
|
40
41
|
$selectedColor: g,
|
|
41
42
|
$height: c,
|
|
42
|
-
$width: s ||
|
|
43
|
+
$width: s || p,
|
|
43
44
|
disabled: t.disabled,
|
|
44
|
-
$isLoading:
|
|
45
|
-
children:
|
|
45
|
+
$isLoading: r,
|
|
46
|
+
children: r ? /* @__PURE__ */ o(B, { children: /* @__PURE__ */ o(D, { size: "small", color: d || h }) }) : /* @__PURE__ */ o(
|
|
46
47
|
E,
|
|
47
48
|
{
|
|
48
|
-
$textColor: d ||
|
|
49
|
+
$textColor: d || h,
|
|
49
50
|
$font: v,
|
|
50
51
|
children: i
|
|
51
52
|
}
|
|
@@ -56,10 +57,10 @@ const P = ({ theme: t, children: i }) => /* @__PURE__ */ o(S, { rippleColor: t.m
|
|
|
56
57
|
L,
|
|
57
58
|
{
|
|
58
59
|
$height: c,
|
|
59
|
-
$width: s ||
|
|
60
|
+
$width: s || p,
|
|
60
61
|
disabled: t.disabled,
|
|
61
|
-
$isLoading:
|
|
62
|
-
children:
|
|
62
|
+
$isLoading: r,
|
|
63
|
+
children: r ? a : /* @__PURE__ */ o(P, { theme: n, children: a })
|
|
63
64
|
}
|
|
64
65
|
);
|
|
65
66
|
};
|
|
@@ -7,24 +7,24 @@ const o = (e) => {
|
|
|
7
7
|
return typeof e == "number" ? `${e}rem` : e;
|
|
8
8
|
}, k = ({
|
|
9
9
|
src: e,
|
|
10
|
-
alt:
|
|
10
|
+
alt: n = "",
|
|
11
11
|
width: c = "100%",
|
|
12
12
|
height: f = "100%",
|
|
13
13
|
borderRadius: r = "0.4rem",
|
|
14
14
|
loadLow: m = !1,
|
|
15
|
-
lowSrc:
|
|
16
|
-
...
|
|
15
|
+
lowSrc: i,
|
|
16
|
+
...l
|
|
17
17
|
}) => {
|
|
18
|
-
const [
|
|
18
|
+
const [u, h] = a(!1), [d, $] = a(!1), [s, L] = a(!1), p = () => h(!0), g = () => $(!0), w = () => L(!0), I = m ? u : d;
|
|
19
19
|
return /* @__PURE__ */ x(S, { $width: o(c), $height: o(f), $borderRadius: o(r), children: [
|
|
20
20
|
!s && /* @__PURE__ */ t(j, { $loaded: I, children: /* @__PURE__ */ t(y, { borderRadius: r }) }),
|
|
21
|
-
m &&
|
|
21
|
+
m && i && !s && /* @__PURE__ */ t(
|
|
22
22
|
E,
|
|
23
23
|
{
|
|
24
|
-
src:
|
|
24
|
+
src: i,
|
|
25
25
|
alt: "",
|
|
26
26
|
"aria-hidden": "true",
|
|
27
|
-
$lowLoaded:
|
|
27
|
+
$lowLoaded: u,
|
|
28
28
|
$loaded: d,
|
|
29
29
|
$borderRadius: o(r),
|
|
30
30
|
onLoad: p
|
|
@@ -34,12 +34,13 @@ const o = (e) => {
|
|
|
34
34
|
R,
|
|
35
35
|
{
|
|
36
36
|
src: e,
|
|
37
|
-
alt:
|
|
37
|
+
alt: n,
|
|
38
|
+
"aria-hidden": n === "" ? "true" : void 0,
|
|
38
39
|
$loaded: d,
|
|
39
40
|
$borderRadius: o(r),
|
|
40
41
|
onLoad: g,
|
|
41
42
|
onError: w,
|
|
42
|
-
...
|
|
43
|
+
...l
|
|
43
44
|
}
|
|
44
45
|
)
|
|
45
46
|
] });
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as U } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as C } from "react";
|
|
3
|
-
import { UploadBtnContainer as j, Wrapper as M, HiddenInput as W, PWrapper as
|
|
4
|
-
import
|
|
3
|
+
import { UploadBtnContainer as j, Wrapper as M, HiddenInput as W, PWrapper as B } from "./styles.js";
|
|
4
|
+
import F from "../../../colors/white.js";
|
|
5
5
|
import x from "../../../colors/blue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { SIZE as
|
|
11
|
-
const
|
|
12
|
-
label:
|
|
6
|
+
import H from "../../../colors/grey.js";
|
|
7
|
+
import P from "../../Icons/Link/Link.js";
|
|
8
|
+
import Z from "../../../colors/index.js";
|
|
9
|
+
import q from "../../Ripple/Ripple.js";
|
|
10
|
+
import { SIZE as A, MEDIUM as G } from "./constants.js";
|
|
11
|
+
const J = ({ theme: t, children: l }) => /* @__PURE__ */ o(q, { rippleColor: t.m100, children: l }), oo = ({
|
|
12
|
+
label: t,
|
|
13
13
|
labelColor: l,
|
|
14
14
|
theme: p = x,
|
|
15
|
-
size: D =
|
|
15
|
+
size: D = G,
|
|
16
16
|
width: s,
|
|
17
|
-
isLoading:
|
|
17
|
+
isLoading: e,
|
|
18
18
|
disabled: r,
|
|
19
|
-
prefixIcon: c =
|
|
19
|
+
prefixIcon: c = P,
|
|
20
20
|
suffixIcon: m,
|
|
21
21
|
type: I = "file",
|
|
22
22
|
accept: R,
|
|
@@ -24,37 +24,35 @@ const G = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m
|
|
|
24
24
|
onChange: z,
|
|
25
25
|
...K
|
|
26
26
|
}) => {
|
|
27
|
-
const
|
|
27
|
+
const h = C(null), { m400: g, m500: v, m600: E } = Z[p] ?? x, { height: u, width: $, font: n } = A[D] || {}, f = l || ["white", "yellow"].includes(p) ? H.m600 : F, a = C(0), d = /* @__PURE__ */ U(
|
|
28
28
|
M,
|
|
29
29
|
{
|
|
30
|
-
$selectedColor:
|
|
31
|
-
$hoverColor:
|
|
32
|
-
$height:
|
|
33
|
-
$width: s ||
|
|
34
|
-
$activeColor:
|
|
30
|
+
$selectedColor: g,
|
|
31
|
+
$hoverColor: v,
|
|
32
|
+
$height: u,
|
|
33
|
+
$width: s || $,
|
|
34
|
+
$activeColor: E,
|
|
35
35
|
disabled: r,
|
|
36
|
-
$isLoading:
|
|
37
|
-
role: "button",
|
|
36
|
+
$isLoading: e,
|
|
38
37
|
tabIndex: 0,
|
|
39
38
|
"aria-disabled": r,
|
|
40
|
-
"aria-busy": t,
|
|
41
39
|
onKeyDown: (i) => {
|
|
42
|
-
var
|
|
40
|
+
var w;
|
|
43
41
|
if (i.key === "Enter" || i.key === " ") {
|
|
44
42
|
i.preventDefault();
|
|
45
43
|
const y = Date.now();
|
|
46
|
-
if (y -
|
|
44
|
+
if (y - a.current < 500) {
|
|
47
45
|
i.stopPropagation();
|
|
48
46
|
return;
|
|
49
47
|
}
|
|
50
|
-
|
|
48
|
+
a.current = y, !r && !e && ((w = h.current) == null || w.click());
|
|
51
49
|
}
|
|
52
50
|
},
|
|
53
51
|
children: [
|
|
54
52
|
/* @__PURE__ */ o(
|
|
55
53
|
W,
|
|
56
54
|
{
|
|
57
|
-
ref:
|
|
55
|
+
ref: h,
|
|
58
56
|
type: I,
|
|
59
57
|
accept: R,
|
|
60
58
|
multiple: k,
|
|
@@ -65,15 +63,15 @@ const G = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m
|
|
|
65
63
|
),
|
|
66
64
|
c && /* @__PURE__ */ o(c, { color: f, size: n + 19 }),
|
|
67
65
|
/* @__PURE__ */ o(
|
|
68
|
-
|
|
66
|
+
B,
|
|
69
67
|
{
|
|
70
68
|
color: f,
|
|
71
69
|
size: `${n}rem`,
|
|
72
70
|
$prefixIcon: !!c,
|
|
73
71
|
$suffixIcon: !!m,
|
|
74
72
|
$iconSize: n + 19,
|
|
75
|
-
title:
|
|
76
|
-
children:
|
|
73
|
+
title: t,
|
|
74
|
+
children: t
|
|
77
75
|
}
|
|
78
76
|
),
|
|
79
77
|
m && /* @__PURE__ */ o(m, { color: f, size: n + 19 })
|
|
@@ -83,12 +81,12 @@ const G = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m
|
|
|
83
81
|
return /* @__PURE__ */ o(
|
|
84
82
|
j,
|
|
85
83
|
{
|
|
86
|
-
$height:
|
|
87
|
-
$width: s ||
|
|
84
|
+
$height: u,
|
|
85
|
+
$width: s || $,
|
|
88
86
|
disabled: r,
|
|
89
|
-
$isLoading:
|
|
87
|
+
$isLoading: e,
|
|
90
88
|
...K,
|
|
91
|
-
children:
|
|
89
|
+
children: e || r ? d : /* @__PURE__ */ o(J, { theme: p, children: d })
|
|
92
90
|
}
|
|
93
91
|
);
|
|
94
92
|
};
|
|
@@ -1,59 +1,51 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { OTPWrapper as
|
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I, useRef as y, useEffect as P } from "react";
|
|
3
|
+
import { OTPWrapper as j } from "./styles.js";
|
|
4
4
|
import { renderNums as b } from "./helpers.js";
|
|
5
|
-
const B = ({ length:
|
|
6
|
-
const [a, D] =
|
|
5
|
+
const B = ({ length: s = 6, value: p = "", onChange: n, onComplete: e, ...O }) => {
|
|
6
|
+
const [a, D] = I(Array(s).fill("")), d = y([]), w = y(a), o = y(!1), f = (r) => {
|
|
7
7
|
var t;
|
|
8
|
-
o.current = !0, (t = d.current[
|
|
8
|
+
o.current = !0, (t = d.current[r]) == null || t.focus();
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
P(() => {
|
|
11
11
|
if (!p) return;
|
|
12
|
-
const
|
|
13
|
-
for (; t.length <
|
|
14
|
-
D(t),
|
|
15
|
-
}, [p,
|
|
16
|
-
const l = (
|
|
17
|
-
w.current =
|
|
18
|
-
const t =
|
|
19
|
-
|
|
20
|
-
}, k = (
|
|
21
|
-
|
|
12
|
+
const r = String(p).replace(/\D/g, "").slice(0, s), t = r.split("");
|
|
13
|
+
for (; t.length < s; ) t.push("");
|
|
14
|
+
D(t), r.length === s && (e == null || e(r));
|
|
15
|
+
}, [p, s, e]);
|
|
16
|
+
const l = (r) => {
|
|
17
|
+
w.current = r, D(r);
|
|
18
|
+
const t = r.join("");
|
|
19
|
+
n == null || n(t), t.length === s && (e == null || e(t));
|
|
20
|
+
}, k = (r, t) => {
|
|
21
|
+
r = r.replace(/\D/g, "").slice(-1);
|
|
22
22
|
const c = [...a];
|
|
23
|
-
c[t] =
|
|
24
|
-
}, m = (
|
|
25
|
-
const c = a.findIndex((
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
|
|
23
|
+
c[t] = r, l(c), r && t < s - 1 && f(t + 1);
|
|
24
|
+
}, m = (r, t) => {
|
|
25
|
+
const c = a.findIndex((u) => u === ""), i = c === -1 ? s - 1 : c;
|
|
26
|
+
if (r.key === "Backspace") {
|
|
27
|
+
if (r.preventDefault(), a[t]) {
|
|
28
|
+
const u = [...a];
|
|
29
|
+
u[t] = "", l(u);
|
|
30
30
|
}
|
|
31
31
|
t > 0 && f(t - 1);
|
|
32
|
-
} else
|
|
33
|
-
}, R = (
|
|
32
|
+
} else r.key === "ArrowLeft" && t > 0 ? (r.preventDefault(), f(t - 1)) : r.key === "ArrowRight" ? (r.preventDefault(), t + 1 <= i && f(t + 1)) : r.key === "Tab" && (r.preventDefault(), r.shiftKey ? t > 0 && f(t - 1) : f(i));
|
|
33
|
+
}, R = (r) => {
|
|
34
34
|
if (o.current) {
|
|
35
35
|
o.current = !1;
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
const t = w.current.findIndex((i) => i === ""), c = t === -1 ?
|
|
39
|
-
|
|
38
|
+
const t = w.current.findIndex((i) => i === ""), c = t === -1 ? s - 1 : t;
|
|
39
|
+
r !== c && f(c);
|
|
40
40
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
t.slice(0, r).split("").forEach((n, j) => c[j] = n), l(c);
|
|
50
|
-
const i = Math.min(t.length - 1, r - 1);
|
|
51
|
-
f(i);
|
|
52
|
-
},
|
|
53
|
-
...O,
|
|
54
|
-
children: a.map(b({ inputsRef: d, handleChange: k, handleKeyDown: m, handleFocus: R }))
|
|
55
|
-
}
|
|
56
|
-
);
|
|
41
|
+
return /* @__PURE__ */ E(j, { onPaste: (r) => {
|
|
42
|
+
const t = r.clipboardData.getData("text").replace(/\D/g, "");
|
|
43
|
+
if (!t) return;
|
|
44
|
+
const c = Array(s).fill("");
|
|
45
|
+
t.slice(0, s).split("").forEach((u, A) => c[A] = u), l(c);
|
|
46
|
+
const i = Math.min(t.length - 1, s - 1);
|
|
47
|
+
f(i);
|
|
48
|
+
}, ...O, children: a.map(b({ inputsRef: d, handleChange: k, handleKeyDown: m, handleFocus: R, length: s })) });
|
|
57
49
|
};
|
|
58
50
|
export {
|
|
59
51
|
B as default
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { Input as
|
|
3
|
-
const
|
|
2
|
+
import { Input as s } from "./styles.js";
|
|
3
|
+
const g = (o, t) => (n) => {
|
|
4
4
|
o(n.target.value, t);
|
|
5
|
-
},
|
|
6
|
-
|
|
5
|
+
}, l = (o, t) => (n) => o(n, t), p = ({ inputsRef: o, handleChange: t, handleKeyDown: n, handleFocus: a, digit: u, index: e, length: r }) => /* @__PURE__ */ m(
|
|
6
|
+
s,
|
|
7
7
|
{
|
|
8
8
|
ref: (c) => o.current[e] = c,
|
|
9
9
|
maxLength: 1,
|
|
10
10
|
inputMode: "numeric",
|
|
11
11
|
autoComplete: "one-time-code",
|
|
12
|
+
"aria-label": `Digit ${e + 1} of ${r}`,
|
|
12
13
|
value: u,
|
|
13
|
-
onChange:
|
|
14
|
-
onKeyDown:
|
|
15
|
-
onFocus: () =>
|
|
14
|
+
onChange: g(t, e),
|
|
15
|
+
onKeyDown: l(n, e),
|
|
16
|
+
onFocus: () => a(e)
|
|
16
17
|
},
|
|
17
18
|
`key-${e}`
|
|
18
|
-
), y = ({ inputsRef: o, handleChange: t, handleKeyDown: n, handleFocus:
|
|
19
|
-
|
|
19
|
+
), y = ({ inputsRef: o, handleChange: t, handleKeyDown: n, handleFocus: a, length: u }) => (e, r) => /* @__PURE__ */ m(
|
|
20
|
+
p,
|
|
20
21
|
{
|
|
21
22
|
inputsRef: o,
|
|
22
23
|
handleChange: t,
|
|
23
24
|
handleKeyDown: n,
|
|
24
|
-
handleFocus:
|
|
25
|
-
digit:
|
|
26
|
-
index:
|
|
25
|
+
handleFocus: a,
|
|
26
|
+
digit: e,
|
|
27
|
+
index: r,
|
|
28
|
+
length: u
|
|
27
29
|
},
|
|
28
|
-
`otp-num-${
|
|
30
|
+
`otp-num-${r}`
|
|
29
31
|
);
|
|
30
32
|
export {
|
|
31
33
|
y as renderNums
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { WARNING as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { WARNING as n, ERROR as t, SUCCESS as s } from "./constants.js";
|
|
3
|
+
import g from "../Icons/Close/Close.js";
|
|
4
4
|
import l from "../Icons/Check/Check.js";
|
|
5
5
|
import u from "../Icons/Info/Info.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Outer as
|
|
9
|
-
const L = (r, o) => r === t ? /* @__PURE__ */ i(
|
|
10
|
-
const m = L(r, o);
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */ i(
|
|
13
|
-
|
|
14
|
-
/* @__PURE__ */ i(I, { size: R(r), children: m })
|
|
6
|
+
import C from "../Icons/WarningTriangleFilled/WarningTriangleFilled.js";
|
|
7
|
+
import d from "../../colors/white.js";
|
|
8
|
+
import { Outer as h, OuterChild as z, LogoContainer as a, Icon as I } from "./styles.js";
|
|
9
|
+
const L = (r, o) => r === t ? /* @__PURE__ */ i(g, { size: 16, color: o }) : r === s ? /* @__PURE__ */ i(l, { size: 18, color: o }) : r === n ? /* @__PURE__ */ i(C, { size: 28, color: d }) : /* @__PURE__ */ i(u, { size: 22, color: o }), R = (r) => r === t ? 1.6 : r === s ? 1.76 : r === n ? 2.8 : 2.08, k = ({ type: r, $main: o, $side: f }) => {
|
|
10
|
+
const m = L(r, o), e = r === n;
|
|
11
|
+
return /* @__PURE__ */ c(h, { "aria-hidden": "true", $side: f, children: [
|
|
12
|
+
/* @__PURE__ */ i(z, { $main: o }),
|
|
13
|
+
!e && /* @__PURE__ */ i(a, { $main: o, type: r }),
|
|
14
|
+
/* @__PURE__ */ i(I, { size: R(r), $isWarning: e, children: m })
|
|
15
15
|
] });
|
|
16
16
|
};
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
k as Logo
|
|
19
19
|
};
|
|
@@ -89,9 +89,9 @@ const a = r`
|
|
|
89
89
|
width: 4.8rem;
|
|
90
90
|
height: 4.8rem;
|
|
91
91
|
}
|
|
92
|
-
`,
|
|
92
|
+
`, $ = t.div`
|
|
93
93
|
position: absolute;
|
|
94
|
-
top: 50
|
|
94
|
+
top: ${({ $isWarning: e }) => e ? "49%" : "50%"};
|
|
95
95
|
left: 50%;
|
|
96
96
|
transform: translate(-50%, -50%);
|
|
97
97
|
width: ${({ size: e }) => e}rem;
|
|
@@ -103,10 +103,13 @@ const a = r`
|
|
|
103
103
|
@media screen and (max-width: 768px) {
|
|
104
104
|
top: 42.8%;
|
|
105
105
|
left: 42.8%;
|
|
106
|
-
transform: translate(
|
|
106
|
+
transform: translate(
|
|
107
|
+
${({ $isWarning: e }) => e ? "-45.8%" : "-42.8%"},
|
|
108
|
+
${({ $isWarning: e }) => e ? "-50.8%" : "-42.8%"}
|
|
109
|
+
);
|
|
107
110
|
scale: 0.75;
|
|
108
111
|
}
|
|
109
|
-
`,
|
|
112
|
+
`, y = t.div`
|
|
110
113
|
position: absolute;
|
|
111
114
|
top: 50%;
|
|
112
115
|
left: 50%;
|
|
@@ -179,11 +182,11 @@ const a = r`
|
|
|
179
182
|
export {
|
|
180
183
|
v as CloseButtonContainer,
|
|
181
184
|
C as CloseWrapper,
|
|
182
|
-
|
|
185
|
+
$ as Icon,
|
|
183
186
|
x as LogoContainer,
|
|
184
187
|
z as Message,
|
|
185
188
|
b as Outer,
|
|
186
|
-
|
|
189
|
+
y as OuterChild,
|
|
187
190
|
k as ProgressRing,
|
|
188
191
|
I as Subtitle,
|
|
189
192
|
R as Title,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import o from "./H1.js";
|
|
2
|
+
import r from "./H2.js";
|
|
3
|
+
import m from "./H3.js";
|
|
4
|
+
import t from "./H4.js";
|
|
5
|
+
import f from "./H5.js";
|
|
6
|
+
import i from "./H6.js";
|
|
7
|
+
const s = { H1: o, H2: r, H3: m, H4: t, H5: f, H6: i };
|
|
8
|
+
export {
|
|
9
|
+
o as H1,
|
|
10
|
+
r as H2,
|
|
11
|
+
m as H3,
|
|
12
|
+
t as H4,
|
|
13
|
+
f as H5,
|
|
14
|
+
i as H6,
|
|
15
|
+
s as default
|
|
16
|
+
};
|
package/index.js
CHANGED
|
@@ -1,61 +1,51 @@
|
|
|
1
1
|
import { default as a } from "./components/Pagination/Pagination.js";
|
|
2
2
|
import { default as r, ToastContainer as f } from "./components/Toast/Toast.js";
|
|
3
3
|
import { default as d } from "./components/Spinner/Spinner.js";
|
|
4
|
-
import { default as
|
|
4
|
+
import { default as s } from "./components/Loader/Loader.js";
|
|
5
5
|
import { default as u } from "./components/PageLoader/PageLoader.js";
|
|
6
6
|
import { default as n } from "./components/OtpInput/OtpInput.js";
|
|
7
|
-
import { default as
|
|
7
|
+
import { default as c } from "./components/Dropdown/Dropdown.js";
|
|
8
8
|
import { default as P } from "./components/RootComponent/RootComponent.js";
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as U } from "./components/Input/
|
|
18
|
-
import { default as j } from "./components/Input/
|
|
19
|
-
import { default as v } from "./components/Input/
|
|
20
|
-
import { default as A } from "./components/Input/
|
|
21
|
-
import { default as J } from "./
|
|
22
|
-
import { default as M } from "./
|
|
23
|
-
import { default as Q } from "./
|
|
24
|
-
import { default as X } from "./components/
|
|
25
|
-
import { default as Z } from "./components/Typography/Headings/H2.js";
|
|
26
|
-
import { default as $ } from "./components/Typography/Headings/H3.js";
|
|
27
|
-
import { default as eo } from "./components/Typography/Headings/H4.js";
|
|
28
|
-
import { default as to } from "./components/Typography/Headings/H5.js";
|
|
29
|
-
import { default as fo } from "./components/Typography/Headings/H6.js";
|
|
9
|
+
import { default as C } from "./components/Selectbox/Selectbox.js";
|
|
10
|
+
import { default as S } from "./components/Button/Button.js";
|
|
11
|
+
import { default as h } from "./components/Timer/Timer.js";
|
|
12
|
+
import { default as R } from "./components/Shimmer/Shimmer.js";
|
|
13
|
+
import { default as w } from "./components/VideoPlayer/VideoPlayer.js";
|
|
14
|
+
import { default as B } from "./components/Image/Image.js";
|
|
15
|
+
import { default as F } from "./components/Typography/Headings/index.js";
|
|
16
|
+
import { default as H } from "./components/Typography/P/P.js";
|
|
17
|
+
import { default as U } from "./components/Input/Input/Input.js";
|
|
18
|
+
import { default as j } from "./components/Input/Textarea/Textarea.js";
|
|
19
|
+
import { default as v } from "./components/Input/Checkbox/Checkbox.js";
|
|
20
|
+
import { default as A } from "./components/Input/RadioGroup/RadioGroup.js";
|
|
21
|
+
import { default as J } from "./components/Input/FileUploader/FileUploader.js";
|
|
22
|
+
import { default as M } from "./colors/index.js";
|
|
23
|
+
import { default as Q } from "./utils/index.js";
|
|
24
|
+
import { default as X } from "./components/Icons/index.js";
|
|
30
25
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
to as H5,
|
|
40
|
-
fo as H6,
|
|
41
|
-
y as Image,
|
|
42
|
-
G as Input,
|
|
43
|
-
m as Loader,
|
|
26
|
+
S as Button,
|
|
27
|
+
v as Checkbox,
|
|
28
|
+
c as Dropdown,
|
|
29
|
+
J as FileUploader,
|
|
30
|
+
F as Headings,
|
|
31
|
+
B as Image,
|
|
32
|
+
U as Input,
|
|
33
|
+
s as Loader,
|
|
44
34
|
n as OtpInput,
|
|
45
|
-
|
|
35
|
+
H as P,
|
|
46
36
|
u as PageLoader,
|
|
47
37
|
a as Pagination,
|
|
48
|
-
|
|
38
|
+
A as RadioGroup,
|
|
49
39
|
P as RootComponent,
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
C as Selectbox,
|
|
41
|
+
R as Shimmer,
|
|
52
42
|
d as Spinner,
|
|
53
|
-
|
|
54
|
-
|
|
43
|
+
j as Textarea,
|
|
44
|
+
h as Timer,
|
|
55
45
|
r as Toast,
|
|
56
46
|
f as ToastContainer,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
w as VideoPlayer,
|
|
48
|
+
M as colors,
|
|
49
|
+
X as icons,
|
|
50
|
+
Q as utils
|
|
61
51
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meticulous-ui",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A comprehensive React UI component library with a wide range of customizable components, icons, colors, and utilities for building modern web applications.",
|
|
6
6
|
"main": "./index.js",
|