meticulous-ui 2.9.3 → 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 +34 -30
- 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,51 +1,55 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import L from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
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";
|
|
7
8
|
const O = () => {
|
|
8
|
-
},
|
|
9
|
-
const [t,
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
}, B = ({ toasts: e, ...o }) => {
|
|
10
|
+
const [t, a] = u(e);
|
|
11
|
+
p(() => {
|
|
12
|
+
a(e);
|
|
12
13
|
}, [e]);
|
|
13
|
-
const m = ({ type:
|
|
14
|
-
return
|
|
15
|
-
|
|
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) => () => {
|
|
16
20
|
e(!0), setTimeout(() => {
|
|
17
21
|
o(!1), t();
|
|
18
22
|
}, 500);
|
|
19
|
-
},
|
|
20
|
-
type: e =
|
|
23
|
+
}, R = ({
|
|
24
|
+
type: e = k,
|
|
21
25
|
visible: o = !0,
|
|
22
26
|
duration: t = 5,
|
|
23
|
-
onExpire:
|
|
27
|
+
onExpire: a = O,
|
|
24
28
|
title: m,
|
|
25
|
-
subtitle:
|
|
29
|
+
subtitle: n,
|
|
26
30
|
...c
|
|
27
31
|
}) => {
|
|
28
|
-
const [i, r] =
|
|
29
|
-
|
|
32
|
+
const [i, r] = u(o), [l, f] = u(!1);
|
|
33
|
+
p(() => {
|
|
30
34
|
r(o);
|
|
31
|
-
}, [o]),
|
|
32
|
-
const S = setTimeout(
|
|
35
|
+
}, [o]), p(() => {
|
|
36
|
+
const S = setTimeout(d(f, r, a), t * 1e3 - 500);
|
|
33
37
|
return () => {
|
|
34
38
|
clearTimeout(S);
|
|
35
39
|
};
|
|
36
|
-
}, [t,
|
|
37
|
-
const { main: h, side: C, bg: g } =
|
|
40
|
+
}, [t, d]);
|
|
41
|
+
const { main: h, side: C, bg: g } = j[e] ?? w;
|
|
38
42
|
if (i)
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */ s(
|
|
41
|
-
/* @__PURE__ */
|
|
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: [
|
|
42
46
|
/* @__PURE__ */ s(A, { children: m }),
|
|
43
|
-
|
|
47
|
+
n && /* @__PURE__ */ s(I, { children: n })
|
|
44
48
|
] }),
|
|
45
|
-
/* @__PURE__ */ s(M, { size: 20, color:
|
|
49
|
+
/* @__PURE__ */ s(M, { size: 20, color: N.m600, onClick: d(f, r, a) })
|
|
46
50
|
] });
|
|
47
51
|
};
|
|
48
52
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
B as ToastContainer,
|
|
54
|
+
R as default
|
|
51
55
|
};
|
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",
|