meticulous-ui 2.9.2 → 2.9.4
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/components/Pagination/styles.js +42 -32
- package/components/Toast/Toast.js +45 -33
- package/components/Toast/index.js +2 -0
- package/components/Toast/styles.js +26 -27
- package/index.js +42 -41
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { SELECTED_BG as i, NOT_SELECTED_BG as
|
|
8
|
-
const t = (o) => ({ $shades:
|
|
9
|
-
if (["#FFFFFF"].includes(
|
|
10
|
-
return
|
|
1
|
+
import e, { css as n } from "styled-components";
|
|
2
|
+
import m from "../Icons/ChevronLeft/ChevronLeft.js";
|
|
3
|
+
import f from "../Icons/ChevronRight/ChevronRight.js";
|
|
4
|
+
import s from "../../colors/grey.js";
|
|
5
|
+
import l from "../../colors/white.js";
|
|
6
|
+
import p from "../../colors/black.js";
|
|
7
|
+
import { SELECTED_BG as i, NOT_SELECTED_BG as c, ACTIVE_NOT_SELECTED_BG as u } from "./constants.js";
|
|
8
|
+
const t = (o) => ({ $shades: r }) => {
|
|
9
|
+
if (["#FFFFFF"].includes(r))
|
|
10
|
+
return p.m900;
|
|
11
11
|
if (o === i)
|
|
12
|
-
return
|
|
13
|
-
if (o ===
|
|
14
|
-
return
|
|
12
|
+
return r.m600;
|
|
13
|
+
if (o === c)
|
|
14
|
+
return r.m50;
|
|
15
15
|
if (o === u)
|
|
16
|
-
return
|
|
17
|
-
},
|
|
16
|
+
return r.m100;
|
|
17
|
+
}, E = e.nav`
|
|
18
18
|
display: flex;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
align-items: center;
|
|
@@ -26,7 +26,7 @@ const t = (o) => ({ $shades: e }) => {
|
|
|
26
26
|
pointer-events: none;
|
|
27
27
|
opacity: 0.4;
|
|
28
28
|
`};
|
|
29
|
-
`,
|
|
29
|
+
`, $ = e.button`
|
|
30
30
|
border: none;
|
|
31
31
|
padding: 0;
|
|
32
32
|
font-family: inherit;
|
|
@@ -43,26 +43,33 @@ const t = (o) => ({ $shades: e }) => {
|
|
|
43
43
|
font-size: ${({ $fontRemSize: o }) => o}rem;
|
|
44
44
|
${({ $isSelected: o }) => o ? n`
|
|
45
45
|
cursor: auto;
|
|
46
|
-
color: ${
|
|
46
|
+
color: ${l};
|
|
47
47
|
background-color: ${t(i)};
|
|
48
|
-
|
|
48
|
+
|
|
49
|
+
&:focus-visible {
|
|
50
|
+
outline: 1px solid ${t(i)};
|
|
51
|
+
}
|
|
49
52
|
` : n`
|
|
50
53
|
cursor: pointer;
|
|
51
|
-
color: ${
|
|
54
|
+
color: ${s.m500};
|
|
52
55
|
|
|
53
56
|
&:hover {
|
|
54
|
-
background-color: ${t(
|
|
57
|
+
background-color: ${t(c)};
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
&:active {
|
|
58
61
|
background-color: ${t(u)};
|
|
59
|
-
color: ${
|
|
62
|
+
color: ${l};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:focus-visible {
|
|
66
|
+
outline: 1px solid ${t(c)};
|
|
60
67
|
}
|
|
61
68
|
`}
|
|
62
|
-
`,
|
|
63
|
-
color: ${
|
|
69
|
+
`, C = e.span`
|
|
70
|
+
color: ${s.m500};
|
|
64
71
|
user-select: none;
|
|
65
|
-
`,
|
|
72
|
+
`, h = e.button`
|
|
66
73
|
border: none;
|
|
67
74
|
background: none;
|
|
68
75
|
padding: 0;
|
|
@@ -72,23 +79,26 @@ const t = (o) => ({ $shades: e }) => {
|
|
|
72
79
|
justify-content: center;
|
|
73
80
|
border-radius: 50%;
|
|
74
81
|
outline-offset: 2px;
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
|
|
83
|
+
&:focus-visible {
|
|
84
|
+
outline: 1px solid ${({ $shades: o }) => o == null ? void 0 : o.m600};
|
|
85
|
+
}
|
|
86
|
+
`, k = e(m)`
|
|
77
87
|
cursor: pointer;
|
|
78
|
-
`, w =
|
|
88
|
+
`, w = e(f)`
|
|
79
89
|
cursor: pointer;
|
|
80
|
-
`, F =
|
|
90
|
+
`, F = e.div`
|
|
81
91
|
min-width: ${({ size: o }) => o};
|
|
82
92
|
display: flex;
|
|
83
93
|
align-items: center;
|
|
84
94
|
justify-content: space-between;
|
|
85
95
|
`;
|
|
86
96
|
export {
|
|
87
|
-
|
|
88
|
-
|
|
97
|
+
E as AllPages,
|
|
98
|
+
h as ArrowButton,
|
|
89
99
|
k as ClickableChevronLeft,
|
|
90
100
|
w as ClickableChevronRight,
|
|
91
|
-
|
|
101
|
+
C as Ellipsis,
|
|
92
102
|
F as MiddleLayer,
|
|
93
|
-
|
|
103
|
+
$ as Page
|
|
94
104
|
};
|
|
@@ -1,43 +1,55 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsxs as T, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useEffect as p, createElement as $ } from "react";
|
|
3
|
+
import { createPortal as F } from "react-dom";
|
|
4
|
+
import { Logo as L } from "./helpers.js";
|
|
5
|
+
import N from "../../colors/grey.js";
|
|
6
|
+
import { COLOR_MAP as j, INFO as k, INFO_COLORS as w } from "./constants.js";
|
|
7
|
+
import { ToastWrapper as x, Message as y, Title as A, Subtitle as I, CloseWrapper as M, ToastsContainer as P } from "./styles.js";
|
|
8
|
+
const O = () => {
|
|
9
|
+
}, B = ({ toasts: e, ...o }) => {
|
|
10
|
+
const [t, a] = u(e);
|
|
11
|
+
p(() => {
|
|
12
|
+
a(e);
|
|
13
|
+
}, [e]);
|
|
14
|
+
const m = ({ type: n, id: c, title: i, subtitle: r, onExpire: l = O }, f) => /* @__PURE__ */ $(R, { type: n, title: i, subtitle: r, key: c, onExpire: l });
|
|
15
|
+
return F(
|
|
16
|
+
/* @__PURE__ */ s(P, { ...o, children: [...t].reverse().map(m) }),
|
|
17
|
+
document.body
|
|
18
|
+
);
|
|
19
|
+
}, d = (e, o, t) => () => {
|
|
20
|
+
e(!0), setTimeout(() => {
|
|
21
|
+
o(!1), t();
|
|
11
22
|
}, 500);
|
|
12
|
-
},
|
|
13
|
-
type:
|
|
14
|
-
visible:
|
|
23
|
+
}, R = ({
|
|
24
|
+
type: e = k,
|
|
25
|
+
visible: o = !0,
|
|
15
26
|
duration: t = 5,
|
|
16
|
-
onExpire: a =
|
|
17
|
-
title:
|
|
18
|
-
subtitle:
|
|
19
|
-
...
|
|
27
|
+
onExpire: a = O,
|
|
28
|
+
title: m,
|
|
29
|
+
subtitle: n,
|
|
30
|
+
...c
|
|
20
31
|
}) => {
|
|
21
|
-
const [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
const
|
|
32
|
+
const [i, r] = u(o), [l, f] = u(!1);
|
|
33
|
+
p(() => {
|
|
34
|
+
r(o);
|
|
35
|
+
}, [o]), p(() => {
|
|
36
|
+
const S = setTimeout(d(f, r, a), t * 1e3 - 500);
|
|
26
37
|
return () => {
|
|
27
|
-
clearTimeout(
|
|
38
|
+
clearTimeout(S);
|
|
28
39
|
};
|
|
29
|
-
}, [t,
|
|
30
|
-
const { main:
|
|
31
|
-
if (
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
40
|
+
}, [t, d]);
|
|
41
|
+
const { main: h, side: C, bg: g } = j[e] ?? w;
|
|
42
|
+
if (i)
|
|
43
|
+
return /* @__PURE__ */ T(x, { $bg: g, className: `${l ? "fade-out" : "fade-in"}`, ...c, children: [
|
|
44
|
+
/* @__PURE__ */ s(L, { type: e, $main: h, $side: C }),
|
|
45
|
+
/* @__PURE__ */ T(y, { children: [
|
|
46
|
+
/* @__PURE__ */ s(A, { children: m }),
|
|
47
|
+
n && /* @__PURE__ */ s(I, { children: n })
|
|
37
48
|
] }),
|
|
38
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ s(M, { size: 20, color: N.m600, onClick: d(f, r, a) })
|
|
39
50
|
] });
|
|
40
51
|
};
|
|
41
52
|
export {
|
|
42
|
-
|
|
53
|
+
B as ToastContainer,
|
|
54
|
+
R as default
|
|
43
55
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import r, { keyframes as
|
|
1
|
+
import r, { keyframes as s, css as o } from "styled-components";
|
|
2
2
|
import i from "../../colors/white.js";
|
|
3
3
|
import n from "../Icons/Close/Close.js";
|
|
4
|
-
import
|
|
4
|
+
import d from "../../colors/grey.js";
|
|
5
5
|
import { WARNING as a } from "./constants.js";
|
|
6
|
-
const m =
|
|
6
|
+
const m = s`
|
|
7
7
|
from {
|
|
8
8
|
opacity: 0;
|
|
9
9
|
transform: translateX(100%); /* Start off-screen to the right */
|
|
@@ -12,7 +12,7 @@ const m = d`
|
|
|
12
12
|
opacity: 1;
|
|
13
13
|
transform: translateX(0); /* Move to its final position */
|
|
14
14
|
}
|
|
15
|
-
`, h =
|
|
15
|
+
`, h = s`
|
|
16
16
|
from {
|
|
17
17
|
opacity: 1;
|
|
18
18
|
transform: translateX(0);
|
|
@@ -21,8 +21,7 @@ const m = d`
|
|
|
21
21
|
opacity: 0;
|
|
22
22
|
transform: translateX(100%); /* Move off-screen to the right */
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
r.div`
|
|
24
|
+
`, w = r.div`
|
|
26
25
|
position: fixed;
|
|
27
26
|
top: 1rem;
|
|
28
27
|
right: 1rem;
|
|
@@ -31,8 +30,7 @@ r.div`
|
|
|
31
30
|
display: flex;
|
|
32
31
|
flex-direction: column;
|
|
33
32
|
gap: 1rem;
|
|
34
|
-
|
|
35
|
-
const w = r.div`
|
|
33
|
+
`, x = r.div`
|
|
36
34
|
display: flex;
|
|
37
35
|
align-items: center;
|
|
38
36
|
justify-content: space-between;
|
|
@@ -60,7 +58,7 @@ const w = r.div`
|
|
|
60
58
|
border-radius: 0.6rem;
|
|
61
59
|
padding: 0.3rem 0.8rem;
|
|
62
60
|
}
|
|
63
|
-
`,
|
|
61
|
+
`, b = r.div`
|
|
64
62
|
position: absolute;
|
|
65
63
|
top: 50%;
|
|
66
64
|
left: 50%;
|
|
@@ -96,7 +94,7 @@ const w = r.div`
|
|
|
96
94
|
border-radius: 50%;
|
|
97
95
|
`}
|
|
98
96
|
}
|
|
99
|
-
`,
|
|
97
|
+
`, u = r.div`
|
|
100
98
|
position: relative;
|
|
101
99
|
width: 4rem;
|
|
102
100
|
height: 4rem;
|
|
@@ -107,7 +105,7 @@ const w = r.div`
|
|
|
107
105
|
width: 3rem;
|
|
108
106
|
height: 3rem;
|
|
109
107
|
}
|
|
110
|
-
`,
|
|
108
|
+
`, $ = r.div`
|
|
111
109
|
position: absolute;
|
|
112
110
|
top: 50%;
|
|
113
111
|
left: 50%;
|
|
@@ -121,7 +119,7 @@ const w = r.div`
|
|
|
121
119
|
transform: translate(-42.8%, -42.8%);
|
|
122
120
|
scale: 0.75;
|
|
123
121
|
}
|
|
124
|
-
`,
|
|
122
|
+
`, y = r.div`
|
|
125
123
|
position: absolute;
|
|
126
124
|
top: 50%;
|
|
127
125
|
left: 50%;
|
|
@@ -135,13 +133,13 @@ const w = r.div`
|
|
|
135
133
|
width: 2.25rem;
|
|
136
134
|
height: 2.25rem;
|
|
137
135
|
}
|
|
138
|
-
`,
|
|
136
|
+
`, v = r(n)`
|
|
139
137
|
cursor: pointer;
|
|
140
|
-
`,
|
|
138
|
+
`, k = r.div`
|
|
141
139
|
font-weight: 600;
|
|
142
140
|
font-size: 1.2rem;
|
|
143
|
-
color: ${
|
|
144
|
-
`,
|
|
141
|
+
color: ${d.m800};
|
|
142
|
+
`, C = r.div`
|
|
145
143
|
display: flex;
|
|
146
144
|
flex-direction: column;
|
|
147
145
|
gap: 0.2rem;
|
|
@@ -150,19 +148,20 @@ const w = r.div`
|
|
|
150
148
|
@media screen and (max-width: 768px) {
|
|
151
149
|
width: 15rem;
|
|
152
150
|
}
|
|
153
|
-
`,
|
|
151
|
+
`, X = r.div`
|
|
154
152
|
font-weight: 400;
|
|
155
153
|
font-size: 1rem;
|
|
156
|
-
color: ${
|
|
154
|
+
color: ${d.m700};
|
|
157
155
|
`;
|
|
158
156
|
export {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
157
|
+
v as CloseWrapper,
|
|
158
|
+
$ as Icon,
|
|
159
|
+
b as LogoContainer,
|
|
160
|
+
C as Message,
|
|
161
|
+
u as Outer,
|
|
162
|
+
y as OuterChild,
|
|
163
|
+
X as Subtitle,
|
|
164
|
+
k as Title,
|
|
165
|
+
x as ToastWrapper,
|
|
166
|
+
w as ToastsContainer
|
|
168
167
|
};
|
package/index.js
CHANGED
|
@@ -1,58 +1,59 @@
|
|
|
1
1
|
import { default as a } from "./components/Pagination/Pagination.js";
|
|
2
|
-
import { default as t } from "./components/Toast/Toast.js";
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
2
|
+
import { default as t, ToastContainer as f } from "./components/Toast/Toast.js";
|
|
3
|
+
import { default as d } from "./components/Spinner/Spinner.js";
|
|
4
|
+
import { default as s } from "./components/Loader/Loader.js";
|
|
5
5
|
import { default as m } from "./components/PageLoader/PageLoader.js";
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
6
|
+
import { default as i } from "./components/OtpInput/OtpInput.js";
|
|
7
|
+
import { default as H } from "./components/Dropdown/Dropdown.js";
|
|
8
|
+
import { default as P } from "./components/Selectbox/Selectbox.js";
|
|
9
9
|
import { default as g } from "./components/Button/Button.js";
|
|
10
10
|
import { default as S } from "./components/Timer/Timer.js";
|
|
11
|
-
import { default as
|
|
11
|
+
import { default as h } from "./components/Shimmer/Shimmer.js";
|
|
12
12
|
import { default as L } from "./components/VideoPlayer/VideoPlayer.js";
|
|
13
13
|
import { default as w } from "./components/Image/Image.js";
|
|
14
14
|
import { default as B } from "./components/Typography/P/P.js";
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
15
|
+
import { default as F } from "./components/Input/Input/Input.js";
|
|
16
|
+
import { default as O } from "./components/Input/Textarea/Textarea.js";
|
|
17
|
+
import { default as U } from "./components/Input/Checkbox/Checkbox.js";
|
|
18
|
+
import { default as j } from "./components/Input/RadioGroup/RadioGroup.js";
|
|
19
|
+
import { default as v } from "./components/Input/FileUploader/FileUploader.js";
|
|
20
|
+
import { default as A } from "./colors/index.js";
|
|
21
|
+
import { default as J } from "./utils/index.js";
|
|
22
|
+
import { default as M } from "./components/Icons/index.js";
|
|
23
|
+
import { default as Q } from "./components/Typography/Headings/H1.js";
|
|
24
|
+
import { default as X } from "./components/Typography/Headings/H2.js";
|
|
25
|
+
import { default as Z } from "./components/Typography/Headings/H3.js";
|
|
26
|
+
import { default as $ } from "./components/Typography/Headings/H4.js";
|
|
27
|
+
import { default as eo } from "./components/Typography/Headings/H5.js";
|
|
28
|
+
import { default as ro } from "./components/Typography/Headings/H6.js";
|
|
29
29
|
export {
|
|
30
30
|
g as Button,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
U as Checkbox,
|
|
32
|
+
H as Dropdown,
|
|
33
|
+
v as FileUploader,
|
|
34
|
+
Q as H1,
|
|
35
|
+
X as H2,
|
|
36
|
+
Z as H3,
|
|
37
|
+
$ as H4,
|
|
38
|
+
eo as H5,
|
|
39
|
+
ro as H6,
|
|
40
40
|
w as Image,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
F as Input,
|
|
42
|
+
s as Loader,
|
|
43
|
+
i as OtpInput,
|
|
44
44
|
B as P,
|
|
45
45
|
m as PageLoader,
|
|
46
46
|
a as Pagination,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
j as RadioGroup,
|
|
48
|
+
P as Selectbox,
|
|
49
|
+
h as Shimmer,
|
|
50
|
+
d as Spinner,
|
|
51
|
+
O as Textarea,
|
|
52
52
|
S as Timer,
|
|
53
53
|
t as Toast,
|
|
54
|
+
f as ToastContainer,
|
|
54
55
|
L as VideoPlayer,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
A as colors,
|
|
57
|
+
M as icons,
|
|
58
|
+
J as utils
|
|
58
59
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meticulous-ui",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.4",
|
|
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",
|