meticulous-ui 2.2.0 → 2.2.2
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/Input/Input/Input.js +36 -37
- package/components/Input/Input/styles.js +2 -2
- package/components/Input/Textarea/Textarea.js +42 -43
- package/components/Input/Textarea/styles.js +2 -2
- package/components/Pagination/Pagination.js +15 -15
- package/components/Pagination/helpers.js +15 -15
- package/components/Pagination/styles.js +1 -1
- package/package.json +1 -1
|
@@ -1,71 +1,70 @@
|
|
|
1
1
|
import { j as o } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import z from "../../../node_modules/lodash-es/omit.js";
|
|
3
3
|
import { useState as H } from "react";
|
|
4
|
-
import { Wrapper as P, InputBox as
|
|
5
|
-
import { getColor as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
4
|
+
import { Wrapper as P, InputBox as b, LeftIconWrapper as q, RightIconWrapper as A, Label as D, HelperText as G } from "./styles.js";
|
|
5
|
+
import { getColor as J, getIcon as j } from "./helpers.js";
|
|
6
|
+
import K from "../../../colors/white.js";
|
|
7
|
+
import M from "../../../colors/grey.js";
|
|
8
|
+
const Y = ({
|
|
9
9
|
label: r,
|
|
10
|
-
onChange:
|
|
10
|
+
onChange: I,
|
|
11
11
|
value: t,
|
|
12
|
-
type:
|
|
12
|
+
type: $,
|
|
13
13
|
hasError: F,
|
|
14
14
|
name: B = "input",
|
|
15
15
|
color: C = "blue",
|
|
16
16
|
size: y = "20",
|
|
17
17
|
disableAutoComplete: L,
|
|
18
|
-
helperText:
|
|
19
|
-
background:
|
|
20
|
-
outerBackground: R =
|
|
21
|
-
leftIcon:
|
|
22
|
-
rightIcon:
|
|
23
|
-
...
|
|
18
|
+
helperText: a = "",
|
|
19
|
+
background: l = "transparent",
|
|
20
|
+
outerBackground: R = K,
|
|
21
|
+
leftIcon: m,
|
|
22
|
+
rightIcon: d,
|
|
23
|
+
...u
|
|
24
24
|
}) => {
|
|
25
|
-
const [n,
|
|
26
|
-
|
|
27
|
-
}, { placeholder:
|
|
25
|
+
const [n, f] = H(!1), s = J(C), W = () => f(!0), E = () => f(!1), S = (w) => {
|
|
26
|
+
I(w);
|
|
27
|
+
}, { placeholder: e } = u, x = { color: M.m500, size: 22 }, c = j(m), i = j(d), p = !!(m && c), g = !!(d && i), h = F, k = l;
|
|
28
28
|
return /* @__PURE__ */ o.jsxs(P, { children: [
|
|
29
29
|
/* @__PURE__ */ o.jsx(
|
|
30
|
-
|
|
30
|
+
b,
|
|
31
31
|
{
|
|
32
|
-
type:
|
|
32
|
+
type: $,
|
|
33
33
|
name: B,
|
|
34
|
-
$hasError:
|
|
34
|
+
$hasError: h,
|
|
35
35
|
size: y,
|
|
36
36
|
value: t,
|
|
37
37
|
$isFocused: n,
|
|
38
|
-
$shade:
|
|
39
|
-
background:
|
|
40
|
-
$hasLeftIcon:
|
|
41
|
-
$hasRightIcon:
|
|
38
|
+
$shade: s,
|
|
39
|
+
$background: k,
|
|
40
|
+
$hasLeftIcon: p,
|
|
41
|
+
$hasRightIcon: g,
|
|
42
42
|
onFocus: W,
|
|
43
43
|
onBlur: E,
|
|
44
44
|
onChange: S,
|
|
45
45
|
autoComplete: L ? "off" : "on",
|
|
46
|
-
...z(
|
|
46
|
+
...z(u, "placeholder")
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
|
+
c && /* @__PURE__ */ o.jsx(q, { children: c(x) }),
|
|
49
50
|
i && /* @__PURE__ */ o.jsx(A, { children: i(x) }),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
G,
|
|
51
|
+
(r || e && !t) && /* @__PURE__ */ o.jsx(
|
|
52
|
+
D,
|
|
53
53
|
{
|
|
54
|
-
$hasError:
|
|
54
|
+
$hasError: h,
|
|
55
55
|
$isFocused: n,
|
|
56
|
-
$shade:
|
|
56
|
+
$shade: s,
|
|
57
57
|
value: t,
|
|
58
|
-
|
|
59
|
-
$
|
|
60
|
-
$
|
|
61
|
-
$
|
|
62
|
-
|
|
63
|
-
children: r || c
|
|
58
|
+
$outerBackground: n || t ? R : l,
|
|
59
|
+
$hasLeftIcon: p,
|
|
60
|
+
$hasRightIcon: g,
|
|
61
|
+
$onlyPh: e && !r,
|
|
62
|
+
children: r || e
|
|
64
63
|
}
|
|
65
64
|
),
|
|
66
|
-
|
|
65
|
+
a && /* @__PURE__ */ o.jsx(G, { $hasError: h, $isFocused: n, $shade: s, $hasLeftIcon: p, children: a })
|
|
67
66
|
] });
|
|
68
67
|
};
|
|
69
68
|
export {
|
|
70
|
-
|
|
69
|
+
Y as default
|
|
71
70
|
};
|
|
@@ -11,7 +11,7 @@ const g = e.input`
|
|
|
11
11
|
padding: ${p};
|
|
12
12
|
font-weight: 400;
|
|
13
13
|
transition: border-color 0.3s ease;
|
|
14
|
-
background-color: ${({ background: o }) => o} !important;
|
|
14
|
+
background-color: ${({ $background: o }) => o} !important;
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
|
|
17
17
|
&:-webkit-autofill,
|
|
@@ -27,7 +27,7 @@ const g = e.input`
|
|
|
27
27
|
color: ${m.m500};
|
|
28
28
|
font-weight: 300;
|
|
29
29
|
font-size: 1.4rem;
|
|
30
|
-
background-color: ${({ background: o }) => o};
|
|
30
|
+
background-color: ${({ $background: o }) => o};
|
|
31
31
|
pointer-events: none;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -1,77 +1,76 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Wrapper as
|
|
5
|
-
import { getColor as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
2
|
+
import k from "../../../node_modules/lodash-es/omit.js";
|
|
3
|
+
import { useState as z, useRef as A } from "react";
|
|
4
|
+
import { Wrapper as I, TextareaBox as L, Parent as N, Label as O, HelperText as S } from "./styles.js";
|
|
5
|
+
import { getColor as W } from "./helpers.js";
|
|
6
|
+
import q from "../../../colors/white.js";
|
|
7
|
+
const V = ({
|
|
8
8
|
label: s,
|
|
9
|
-
onChange:
|
|
9
|
+
onChange: p,
|
|
10
10
|
value: t,
|
|
11
|
-
type:
|
|
12
|
-
hasError:
|
|
13
|
-
name:
|
|
14
|
-
color:
|
|
15
|
-
helperText:
|
|
16
|
-
background:
|
|
17
|
-
outerBackground:
|
|
18
|
-
isDynamic:
|
|
11
|
+
type: u,
|
|
12
|
+
hasError: m,
|
|
13
|
+
name: $ = "textarea",
|
|
14
|
+
color: g = "blue",
|
|
15
|
+
helperText: h = "",
|
|
16
|
+
background: i = "transparent",
|
|
17
|
+
outerBackground: j = q,
|
|
18
|
+
isDynamic: n,
|
|
19
19
|
isResizeNone: B,
|
|
20
20
|
rows: F = "2",
|
|
21
21
|
cols: R = "20",
|
|
22
22
|
...x
|
|
23
23
|
}) => {
|
|
24
|
-
const [o,
|
|
25
|
-
if (
|
|
26
|
-
const r =
|
|
24
|
+
const [o, d] = z(!1), c = W(g), f = A(null), C = () => d(!0), H = () => d(!1), w = (T) => {
|
|
25
|
+
if (n) {
|
|
26
|
+
const r = f.current;
|
|
27
27
|
if (r) {
|
|
28
28
|
r.style.height = "0px";
|
|
29
|
-
const
|
|
30
|
-
r.style.height = `${
|
|
29
|
+
const b = r.scrollHeight;
|
|
30
|
+
r.style.height = `${b}px`;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
}, { placeholder:
|
|
35
|
-
return /* @__PURE__ */ e.jsxs(
|
|
33
|
+
p(T);
|
|
34
|
+
}, { placeholder: l } = x, a = m, y = n, E = i, P = n ? {} : { rows: F };
|
|
35
|
+
return /* @__PURE__ */ e.jsxs(I, { children: [
|
|
36
36
|
/* @__PURE__ */ e.jsx(
|
|
37
|
-
|
|
37
|
+
L,
|
|
38
38
|
{
|
|
39
|
-
type:
|
|
40
|
-
name:
|
|
41
|
-
$hasError:
|
|
39
|
+
type: u,
|
|
40
|
+
name: $,
|
|
41
|
+
$hasError: a,
|
|
42
42
|
value: t,
|
|
43
43
|
$isFocused: o,
|
|
44
|
-
$shade:
|
|
44
|
+
$shade: c,
|
|
45
45
|
$isDynamic: y,
|
|
46
|
-
background:
|
|
46
|
+
$background: E,
|
|
47
47
|
cols: R,
|
|
48
48
|
$isResizeNone: B,
|
|
49
|
-
...
|
|
50
|
-
ref:
|
|
49
|
+
...P,
|
|
50
|
+
ref: f,
|
|
51
51
|
onFocus: C,
|
|
52
52
|
onBlur: H,
|
|
53
53
|
onChange: w,
|
|
54
|
-
...
|
|
54
|
+
...k(x, "placeholder")
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
|
-
/* @__PURE__ */ e.jsxs(
|
|
58
|
-
(s ||
|
|
59
|
-
|
|
57
|
+
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
58
|
+
(s || l && !t) && /* @__PURE__ */ e.jsx(
|
|
59
|
+
O,
|
|
60
60
|
{
|
|
61
|
-
$hasError:
|
|
61
|
+
$hasError: a,
|
|
62
62
|
$isFocused: o,
|
|
63
|
-
$shade:
|
|
63
|
+
$shade: c,
|
|
64
64
|
value: t,
|
|
65
|
-
|
|
66
|
-
$
|
|
67
|
-
|
|
68
|
-
children: s || h
|
|
65
|
+
$outerBackground: o || t ? j : i,
|
|
66
|
+
$onlyPh: l && !s,
|
|
67
|
+
children: s || l
|
|
69
68
|
}
|
|
70
69
|
),
|
|
71
|
-
|
|
70
|
+
h && /* @__PURE__ */ e.jsx(S, { $hasError: a, $isFocused: o, $shade: c, children: h })
|
|
72
71
|
] })
|
|
73
72
|
] });
|
|
74
73
|
};
|
|
75
74
|
export {
|
|
76
|
-
|
|
75
|
+
V as default
|
|
77
76
|
};
|
|
@@ -10,7 +10,7 @@ const b = o.textarea`
|
|
|
10
10
|
padding: 0.6rem;
|
|
11
11
|
font-weight: 400;
|
|
12
12
|
transition: border-color 0.3s ease;
|
|
13
|
-
background-color: ${({ background: e }) => e} !important;
|
|
13
|
+
background-color: ${({ $background: e }) => e} !important;
|
|
14
14
|
min-height: 1.4rem;
|
|
15
15
|
min-width: 3rem;
|
|
16
16
|
|
|
@@ -37,7 +37,7 @@ const b = o.textarea`
|
|
|
37
37
|
color: ${l.m500};
|
|
38
38
|
font-weight: 300;
|
|
39
39
|
font-size: 1.4rem;
|
|
40
|
-
background-color: ${({ background: e }) => e};
|
|
40
|
+
background-color: ${({ $background: e }) => e};
|
|
41
41
|
pointer-events: none;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as i } from "../../_virtual/jsx-runtime.js";
|
|
2
2
|
import E from "../../node_modules/lodash-es/get.js";
|
|
3
3
|
import h from "../../node_modules/lodash-es/range.js";
|
|
4
|
-
import { PrevArrow as w, renderPageNum as
|
|
4
|
+
import { PrevArrow as w, renderPageNum as e, NextArrow as A, renderThreeDots as I } from "./helpers.js";
|
|
5
5
|
import K from "../../colors/index.js";
|
|
6
6
|
import R from "../../colors/teal.js";
|
|
7
7
|
import { ICON_SIZE_MAPPING as S, MEDIUM as _, SIZE_REM_MAPPING as v } from "./constants.js";
|
|
@@ -12,44 +12,44 @@ const k = ({
|
|
|
12
12
|
totalPages: r,
|
|
13
13
|
theme: y = "lime",
|
|
14
14
|
size: s = _,
|
|
15
|
-
isDisabled:
|
|
15
|
+
isDisabled: j = !1
|
|
16
16
|
}) => {
|
|
17
|
-
const d = (
|
|
18
|
-
|
|
17
|
+
const d = (x) => {
|
|
18
|
+
x !== n && $(x);
|
|
19
19
|
}, f = () => {
|
|
20
20
|
n > 1 && d(n - 1);
|
|
21
21
|
}, t = () => {
|
|
22
22
|
n < r && d(n + 1);
|
|
23
|
-
},
|
|
24
|
-
|
|
23
|
+
}, l = (x) => {
|
|
24
|
+
["ArrowLeft", "ArrowUp"].includes(x.code) && f(), ["ArrowRight", "ArrowDown"].includes(x.code) && t();
|
|
25
25
|
}, o = E(K, y, R), m = v[s], c = S[s];
|
|
26
|
-
return r <= 7 ? /* @__PURE__ */ i.jsxs(D, { onKeyDown:
|
|
26
|
+
return r <= 7 ? /* @__PURE__ */ i.jsxs(D, { onKeyDown: l, tabIndex: "0", $isDisabled: j, children: [
|
|
27
27
|
/* @__PURE__ */ i.jsx(w, { iconSize: c, shades: o, setPrevPage: f }),
|
|
28
28
|
/* @__PURE__ */ i.jsx(M, { size: `${r * m}rem`, children: h(1, r + 1).map(
|
|
29
|
-
|
|
29
|
+
e({ size: s, selected: n, shades: o, changePage: d })
|
|
30
30
|
) }),
|
|
31
31
|
/* @__PURE__ */ i.jsx(A, { iconSize: c, shades: o, setNextPage: t })
|
|
32
|
-
] }) : r < 10 || n < 4 || n > r - 3 && n <= r ? /* @__PURE__ */ i.jsxs(D, { onKeyDown:
|
|
32
|
+
] }) : r < 10 || n < 4 || n > r - 3 && n <= r ? /* @__PURE__ */ i.jsxs(D, { onKeyDown: l, tabIndex: "0", $isDisabled: j, children: [
|
|
33
33
|
/* @__PURE__ */ i.jsx(w, { iconSize: c, shades: o, setPrevPage: f }),
|
|
34
34
|
/* @__PURE__ */ i.jsxs(M, { size: `${9 * m}rem`, children: [
|
|
35
|
-
h(1, 5).map(
|
|
35
|
+
h(1, 5).map(e({ size: s, selected: n, shades: o, changePage: d })),
|
|
36
36
|
I(),
|
|
37
37
|
[r - 3, r - 2, r - 1, r].map(
|
|
38
|
-
|
|
38
|
+
e({ size: s, selected: n, shades: o, changePage: d })
|
|
39
39
|
)
|
|
40
40
|
] }),
|
|
41
41
|
/* @__PURE__ */ i.jsx(A, { iconSize: c, shades: o, setNextPage: t })
|
|
42
|
-
] }) : /* @__PURE__ */ i.jsxs(D, { onKeyDown:
|
|
42
|
+
] }) : /* @__PURE__ */ i.jsxs(D, { onKeyDown: l, tabIndex: "0", $isDisabled: j, children: [
|
|
43
43
|
/* @__PURE__ */ i.jsx(w, { iconSize: c, shades: o, setPrevPage: f }),
|
|
44
44
|
/* @__PURE__ */ i.jsxs(M, { size: `${9 * m}rem`, children: [
|
|
45
|
-
h(1, 3).map(
|
|
45
|
+
h(1, 3).map(e({ size: s, selected: n, shades: o, changePage: d })),
|
|
46
46
|
I(),
|
|
47
47
|
[n - 1, n, n + 1].map(
|
|
48
|
-
|
|
48
|
+
e({ size: s, selected: n, shades: o, changePage: d })
|
|
49
49
|
),
|
|
50
50
|
I(),
|
|
51
51
|
[r - 1, r].map(
|
|
52
|
-
|
|
52
|
+
e({ size: s, selected: n, shades: o, changePage: d })
|
|
53
53
|
)
|
|
54
54
|
] }),
|
|
55
55
|
/* @__PURE__ */ i.jsx(A, { iconSize: c, shades: o, setNextPage: t })
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { j as r } from "../../_virtual/jsx-runtime.js";
|
|
2
2
|
import s from "../Ripple/Ripple.js";
|
|
3
|
-
import { FONT_SIZE_MAPPING as
|
|
4
|
-
import { ClickableChevronLeft as
|
|
5
|
-
const
|
|
6
|
-
const l =
|
|
7
|
-
c(
|
|
3
|
+
import { FONT_SIZE_MAPPING as h, SIZE_REM_MAPPING as j } from "./constants.js";
|
|
4
|
+
import { ClickableChevronLeft as p, Page as C, ClickableChevronRight as a, P as t } from "./styles.js";
|
|
5
|
+
const $ = ({ size: e, selected: o, shades: n, changePage: c }) => (i) => {
|
|
6
|
+
const l = j[e], d = h[e], m = n, x = () => {
|
|
7
|
+
c(i);
|
|
8
8
|
};
|
|
9
9
|
return /* @__PURE__ */ r.jsx(
|
|
10
|
-
|
|
10
|
+
C,
|
|
11
11
|
{
|
|
12
|
-
"data-testid":
|
|
13
|
-
$isSelected:
|
|
14
|
-
onClick:
|
|
15
|
-
shades:
|
|
12
|
+
"data-testid": o === i ? "current-page" : `test-${i}`,
|
|
13
|
+
$isSelected: o === i,
|
|
14
|
+
onClick: x,
|
|
15
|
+
$shades: m,
|
|
16
16
|
$individualRemSize: l,
|
|
17
|
-
$fontRemSize:
|
|
18
|
-
children:
|
|
17
|
+
$fontRemSize: d,
|
|
18
|
+
children: i
|
|
19
19
|
},
|
|
20
|
-
`page_${
|
|
20
|
+
`page_${i}`
|
|
21
21
|
);
|
|
22
22
|
}, u = () => /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
23
23
|
/* @__PURE__ */ r.jsx(t, { children: "." }),
|
|
24
24
|
/* @__PURE__ */ r.jsx(t, { children: "." }),
|
|
25
25
|
/* @__PURE__ */ r.jsx(t, { children: "." })
|
|
26
|
-
] }), N = ({ iconSize: e, shades:
|
|
26
|
+
] }), N = ({ iconSize: e, shades: o, setPrevPage: n }) => /* @__PURE__ */ r.jsx(s, { rippleColor: o.m50, children: /* @__PURE__ */ r.jsx(p, { size: e, onClick: n }) }), S = ({ iconSize: e, shades: o, setNextPage: n }) => /* @__PURE__ */ r.jsx(s, { rippleColor: o.m50, children: /* @__PURE__ */ r.jsx(a, { size: e, onClick: n }) });
|
|
27
27
|
export {
|
|
28
28
|
S as NextArrow,
|
|
29
29
|
N as PrevArrow,
|
|
30
|
-
|
|
30
|
+
$ as renderPageNum,
|
|
31
31
|
u as renderThreeDots
|
|
32
32
|
};
|
|
@@ -5,7 +5,7 @@ import c from "../../colors/grey.js";
|
|
|
5
5
|
import n from "../../colors/white.js";
|
|
6
6
|
import d from "../../colors/black.js";
|
|
7
7
|
import { SELECTED_BG as m, NOT_SELECTED_BG as l, ACTIVE_NOT_SELECTED_BG as s } from "./constants.js";
|
|
8
|
-
const t = (r) => ({ shades: e }) => {
|
|
8
|
+
const t = (r) => ({ $shades: e }) => {
|
|
9
9
|
if (["#FFFFFF"].includes(e))
|
|
10
10
|
return d.m900;
|
|
11
11
|
if (r === m)
|