meticulous-ui 2.5.6 → 2.6.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.
@@ -1,75 +1,75 @@
1
1
  import { jsxs as H, jsx as o } from "react/jsx-runtime";
2
- import P from "lodash-es/omit";
3
- import { useState as _ } from "react";
2
+ import { useState as P } from "react";
4
3
  import { Wrapper as q, InputBox as v, LeftIconWrapper as A, RightIconWrapper as D, Label as G, HelperText as J } from "./styles.js";
5
- import { getColor as K, getIcon as B } from "./helpers.js";
4
+ import { getColor as K, getIcon as y } from "./helpers.js";
6
5
  import M from "../../../colors/white.js";
7
6
  import N from "../../../colors/grey.js";
8
- const T = ({
7
+ const Z = ({
9
8
  label: e,
10
- onChange: C,
11
- value: r,
12
- type: b,
13
- hasError: x,
14
- name: l = "input",
15
- color: L = "blue",
16
- size: W = "20",
17
- disableAutoComplete: j,
9
+ onChange: B,
10
+ value: n,
11
+ type: C,
12
+ hasError: b,
13
+ name: u = "input",
14
+ color: x = "blue",
15
+ size: L = "20",
16
+ disableAutoComplete: W,
18
17
  helperText: s = "",
19
- background: u = "transparent",
20
- outerBackground: R = M,
18
+ background: l = "transparent",
19
+ outerBackground: j = M,
21
20
  leftIcon: m,
22
21
  rightIcon: f,
23
- ...I
22
+ placeholder: i,
23
+ ...R
24
24
  }) => {
25
- const [t, $] = _(!1), c = K(L), S = () => $(!0), k = () => $(!1), w = (E) => {
26
- C(E);
27
- }, { placeholder: i } = I, g = { color: N.m500, size: 22 }, d = B(m), a = B(f), h = !!(m && d), F = !!(f && a), n = x, z = u, p = `input-${l}`, y = s ? `${p}-helper` : void 0;
25
+ const [t, I] = P(!1), c = K(x), S = () => I(!0), k = () => I(!1), w = (E) => {
26
+ B(E);
27
+ }, $ = { color: N.m500, size: 22 }, a = y(m), d = y(f), h = !!(m && a), g = !!(f && d), r = b, z = l, p = `input-${u}`, F = s ? `${p}-helper` : void 0;
28
28
  return /* @__PURE__ */ H(q, { children: [
29
29
  /* @__PURE__ */ o(
30
30
  v,
31
31
  {
32
- type: b,
33
- name: l,
34
- $hasError: n,
35
- size: W,
36
- value: r,
32
+ type: C,
33
+ name: u,
34
+ $hasError: r,
35
+ size: L,
36
+ value: n,
37
37
  $isFocused: t,
38
38
  $shade: c,
39
39
  $background: z,
40
40
  $hasLeftIcon: h,
41
- $hasRightIcon: F,
41
+ $hasRightIcon: g,
42
42
  id: p,
43
- "aria-invalid": n ? !0 : void 0,
44
- "aria-describedby": y,
43
+ "aria-invalid": r ? !0 : void 0,
44
+ "aria-describedby": F,
45
45
  onFocus: S,
46
46
  onBlur: k,
47
47
  onChange: w,
48
- autoComplete: j ? "off" : "on",
49
- ...P(I, "placeholder")
48
+ autoComplete: W ? "off" : "on",
49
+ ...R
50
50
  }
51
51
  ),
52
- d && /* @__PURE__ */ o(A, { "aria-hidden": "true", children: d(g) }),
53
- a && /* @__PURE__ */ o(D, { "aria-hidden": "true", children: a(g) }),
54
- (e || i && !r) && /* @__PURE__ */ o(
52
+ a && /* @__PURE__ */ o(A, { "aria-hidden": "true", children: a($) }),
53
+ d && /* @__PURE__ */ o(D, { "aria-hidden": "true", children: d($) }),
54
+ (e || i && !n) && /* @__PURE__ */ o(
55
55
  G,
56
56
  {
57
57
  as: "label",
58
58
  htmlFor: p,
59
- $hasError: n,
59
+ $hasError: r,
60
60
  $isFocused: t,
61
61
  $shade: c,
62
- value: r,
63
- $outerBackground: t || r ? R : u,
62
+ value: n,
63
+ $outerBackground: t || n ? j : l,
64
64
  $hasLeftIcon: h,
65
- $hasRightIcon: F,
65
+ $hasRightIcon: g,
66
66
  $onlyPh: i && !e,
67
67
  children: e || i
68
68
  }
69
69
  ),
70
- s && /* @__PURE__ */ o(J, { id: y, $hasError: n, $isFocused: t, $shade: c, $hasLeftIcon: h, children: s })
70
+ s && /* @__PURE__ */ o(J, { id: F, $hasError: r, $isFocused: t, $shade: c, $hasLeftIcon: h, children: s })
71
71
  ] });
72
72
  };
73
73
  export {
74
- T as default
74
+ Z as default
75
75
  };
@@ -1,33 +1,32 @@
1
- import n from "lodash-es/get";
2
1
  import l from "../../../colors/blue.js";
3
- import i from "../../../colors/green.js";
4
- import p from "../../../colors/red.js";
5
- import g from "../../../colors/yellow.js";
6
- import u from "../../../colors/orange.js";
7
- import a from "../../../colors/black.js";
2
+ import n from "../../../colors/green.js";
3
+ import i from "../../../colors/red.js";
4
+ import f from "../../../colors/yellow.js";
5
+ import g from "../../../colors/orange.js";
6
+ import u from "../../../colors/black.js";
8
7
  import e from "../../../colors/grey.js";
9
- import c from "../../../colors/violet.js";
10
- import s from "../../../colors/teal.js";
11
- import y from "../../../colors/purple.js";
12
- import b from "../../../colors/pink.js";
13
- import d from "../../Icons/index.js";
14
- const k = {
8
+ import a from "../../../colors/violet.js";
9
+ import c from "../../../colors/teal.js";
10
+ import s from "../../../colors/purple.js";
11
+ import y from "../../../colors/pink.js";
12
+ import b from "../../Icons/index.js";
13
+ const d = {
15
14
  blue: l.m500,
16
- green: i.m500,
17
- red: p.m500,
18
- green: i.m500,
19
- yellow: g.m500,
20
- orange: u.m500,
21
- black: a.m500,
15
+ green: n.m500,
16
+ red: i.m500,
17
+ green: n.m500,
18
+ yellow: f.m500,
19
+ orange: g.m500,
20
+ black: u.m500,
22
21
  grey: e.m500,
23
- violet: c.m500,
24
- teal: s.m500,
25
- purple: y.m500,
26
- pink: b.m500
27
- }, j = (r) => n(k, r, e.m500), q = ({ $hasError: r, $shade: m, $isFocused: o, value: t, $onlyPh: f }) => r ? typeof t == "string" && !t && !o ? e.m500 : p.m400 : o && !f ? m : e.m500, z = (r) => n(d, r, null), B = ({ $hasLeftIcon: r, $hasRightIcon: m }) => r && m ? "0 2.4rem" : r ? "0 0.6rem 0 2.4rem" : m ? "0 2.4rem 0 0.6rem" : "0 0.6rem";
22
+ violet: a.m500,
23
+ teal: c.m500,
24
+ purple: s.m500,
25
+ pink: y.m500
26
+ }, H = (r) => d[r] ?? e.m500, M = ({ $hasError: r, $shade: m, $isFocused: o, value: t, $onlyPh: p }) => r ? typeof t == "string" && !t && !o ? e.m500 : i.m400 : o && !p ? m : e.m500, j = (r) => b[r] ?? null, q = ({ $hasLeftIcon: r, $hasRightIcon: m }) => r && m ? "0 2.4rem" : r ? "0 0.6rem 0 2.4rem" : m ? "0 2.4rem 0 0.6rem" : "0 0.6rem";
28
27
  export {
29
- j as getColor,
30
- q as getCssShade,
31
- z as getIcon,
32
- B as getPadding
28
+ H as getColor,
29
+ M as getCssShade,
30
+ j as getIcon,
31
+ q as getPadding
33
32
  };
@@ -1,29 +1,28 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import c from "lodash-es/get";
1
+ import { jsxs as o, jsx as n } from "react/jsx-runtime";
3
2
  import u from "../../Typography/P/P.js";
4
3
  import m from "../../../colors/blue.js";
5
- import { Wrapper as $, HiddenInput as y, CircleBorder as D, Circle as g } from "./styles.js";
6
- const C = ({ label: h, value: r, name: s, color: t, textColor: p, isSelected: n, disabled: o, onChange: d }) => {
7
- const f = c(t, "m500", m.m500), i = c(t, "m800", m.m800);
8
- return /* @__PURE__ */ l($, { $disabled: o, $focusShade: i, children: [
9
- /* @__PURE__ */ e(
4
+ import { Wrapper as $, HiddenInput as y, CircleBorder as D, Circle as w } from "./styles.js";
5
+ const k = ({ label: s, value: r, name: p, color: e, textColor: f, isSelected: d, disabled: t, onChange: i }) => {
6
+ const c = (e == null ? void 0 : e.m500) ?? m.m500, a = (e == null ? void 0 : e.m800) ?? m.m800;
7
+ return /* @__PURE__ */ o($, { $disabled: t, $focusShade: a, children: [
8
+ /* @__PURE__ */ n(
10
9
  y,
11
10
  {
12
11
  type: "radio",
13
- name: s,
12
+ name: p,
14
13
  value: r,
15
- checked: n,
16
- disabled: o,
17
- onChange: () => d(r),
18
- onKeyDown: (a) => {
19
- a.key === "Enter" && (a.preventDefault(), o || d(r));
14
+ checked: d,
15
+ disabled: t,
16
+ onChange: () => i(r),
17
+ onKeyDown: (h) => {
18
+ h.key === "Enter" && (h.preventDefault(), t || i(r));
20
19
  }
21
20
  }
22
21
  ),
23
- /* @__PURE__ */ e(D, { "aria-hidden": "true", $isSelected: n, $shade: i, children: /* @__PURE__ */ e(g, { $isSelected: n, $shade: f }) }),
24
- /* @__PURE__ */ e(u, { color: p, size: "1.2rem", children: h })
22
+ /* @__PURE__ */ n(D, { "aria-hidden": "true", $isSelected: d, $shade: a, children: /* @__PURE__ */ n(w, { $isSelected: d, $shade: c }) }),
23
+ /* @__PURE__ */ n(u, { color: f, size: "1.2rem", children: s })
25
24
  ] });
26
25
  };
27
26
  export {
28
- C as default
27
+ k as default
29
28
  };
@@ -1,81 +1,81 @@
1
- import { jsxs as x, jsx as d } from "react/jsx-runtime";
2
- import E from "lodash-es/omit";
3
- import { useState as L, useRef as N } from "react";
4
- import { Wrapper as O, TextareaBox as S, Parent as T, Label as W, HelperText as _ } from "./styles.js";
1
+ import { jsxs as m, jsx as d } from "react/jsx-runtime";
2
+ import { useState as E, useRef as L } from "react";
3
+ import { Wrapper as N, TextareaBox as O, Parent as S, Label as T, HelperText as W } from "./styles.js";
5
4
  import { getColor as q } from "./helpers.js";
6
5
  import G from "../../../colors/white.js";
7
- const X = ({
6
+ const V = ({
8
7
  label: s,
9
- onChange: g,
8
+ onChange: p,
10
9
  value: e,
11
- type: F,
12
- hasError: b,
10
+ type: g,
11
+ hasError: F,
13
12
  name: h = "textarea",
14
- color: B = "blue",
13
+ color: b = "blue",
15
14
  helperText: n = "",
16
15
  background: u = "transparent",
17
- outerBackground: j = G,
16
+ outerBackground: B = G,
18
17
  isDynamic: a,
19
- isResizeNone: y,
20
- rows: C = "2",
21
- cols: H = "20",
22
- ...f
18
+ isResizeNone: j,
19
+ rows: y = "2",
20
+ cols: C = "20",
21
+ placeholder: i,
22
+ ...H
23
23
  }) => {
24
- const [t, p] = L(!1), c = q(B), m = N(null), I = () => p(!0), R = () => p(!1), w = (z) => {
24
+ const [t, f] = E(!1), c = q(b), $ = L(null), I = () => f(!0), R = () => f(!1), w = (z) => {
25
25
  if (a) {
26
- const r = m.current;
27
- if (r) {
28
- r.style.height = "0px";
29
- const A = r.scrollHeight;
30
- r.style.height = `${A}px`;
26
+ const o = $.current;
27
+ if (o) {
28
+ o.style.height = "0px";
29
+ const A = o.scrollHeight;
30
+ o.style.height = `${A}px`;
31
31
  }
32
32
  }
33
- g(z);
34
- }, { placeholder: i } = f, o = b, P = a, k = u, v = a ? {} : { rows: C }, l = `textarea-${h}`, $ = n ? `${l}-helper` : void 0;
35
- return /* @__PURE__ */ x(O, { children: [
33
+ p(z);
34
+ }, r = F, P = a, k = u, v = a ? {} : { rows: y }, l = `textarea-${h}`, x = n ? `${l}-helper` : void 0;
35
+ return /* @__PURE__ */ m(N, { children: [
36
36
  /* @__PURE__ */ d(
37
- S,
37
+ O,
38
38
  {
39
- type: F,
39
+ type: g,
40
40
  name: h,
41
- $hasError: o,
41
+ $hasError: r,
42
42
  value: e,
43
43
  $isFocused: t,
44
44
  $shade: c,
45
45
  $isDynamic: P,
46
46
  $background: k,
47
- cols: H,
48
- $isResizeNone: y,
47
+ cols: C,
48
+ $isResizeNone: j,
49
49
  ...v,
50
50
  id: l,
51
- "aria-invalid": o ? !0 : void 0,
52
- "aria-describedby": $,
53
- ref: m,
51
+ "aria-invalid": r ? !0 : void 0,
52
+ "aria-describedby": x,
53
+ ref: $,
54
54
  onFocus: I,
55
55
  onBlur: R,
56
56
  onChange: w,
57
- ...E(f, "placeholder")
57
+ ...H
58
58
  }
59
59
  ),
60
- /* @__PURE__ */ x(T, { children: [
60
+ /* @__PURE__ */ m(S, { children: [
61
61
  (s || i && !e) && /* @__PURE__ */ d(
62
- W,
62
+ T,
63
63
  {
64
64
  as: "label",
65
65
  htmlFor: l,
66
- $hasError: o,
66
+ $hasError: r,
67
67
  $isFocused: t,
68
68
  $shade: c,
69
69
  $value: e,
70
- $outerBackground: t || e ? j : u,
70
+ $outerBackground: t || e ? B : u,
71
71
  $onlyPh: i && !s,
72
72
  children: s || i
73
73
  }
74
74
  ),
75
- n && /* @__PURE__ */ d(_, { id: $, $hasError: o, $isFocused: t, $shade: c, children: n })
75
+ n && /* @__PURE__ */ d(W, { id: x, $hasError: r, $isFocused: t, $shade: c, children: n })
76
76
  ] })
77
77
  ] });
78
78
  };
79
79
  export {
80
- X as default
80
+ V as default
81
81
  };
@@ -1,30 +1,29 @@
1
- import l from "lodash-es/get";
2
- import n from "../../../colors/blue.js";
1
+ import f from "../../../colors/blue.js";
3
2
  import t from "../../../colors/green.js";
4
3
  import p from "../../../colors/red.js";
5
- import g from "../../../colors/yellow.js";
6
- import a from "../../../colors/orange.js";
7
- import u from "../../../colors/black.js";
4
+ import n from "../../../colors/yellow.js";
5
+ import g from "../../../colors/orange.js";
6
+ import a from "../../../colors/black.js";
8
7
  import r from "../../../colors/grey.js";
9
- import y from "../../../colors/violet.js";
10
- import b from "../../../colors/teal.js";
11
- import c from "../../../colors/purple.js";
12
- import k from "../../../colors/pink.js";
13
- const s = {
14
- blue: n.m500,
8
+ import u from "../../../colors/violet.js";
9
+ import y from "../../../colors/teal.js";
10
+ import b from "../../../colors/purple.js";
11
+ import c from "../../../colors/pink.js";
12
+ const k = {
13
+ blue: f.m500,
15
14
  green: t.m500,
16
15
  red: p.m500,
17
16
  green: t.m500,
18
- yellow: g.m500,
19
- orange: a.m500,
20
- black: u.m500,
17
+ yellow: n.m500,
18
+ orange: g.m500,
19
+ black: a.m500,
21
20
  grey: r.m500,
22
- violet: y.m500,
23
- teal: b.m500,
24
- purple: c.m500,
25
- pink: k.m500
26
- }, L = (m) => l(s, m, r.m500), M = ({ $hasError: m, $shade: i, $isFocused: o, value: e, $onlyPh: f, textColor: C }) => m ? typeof e == "string" && !e && !o ? r.m500 : p.m400 : o && !f ? i : r.m500;
21
+ violet: u.m500,
22
+ teal: y.m500,
23
+ purple: b.m500,
24
+ pink: c.m500
25
+ }, E = (m) => k[m] ?? r.m500, H = ({ $hasError: m, $shade: i, $isFocused: o, value: e, $onlyPh: l, textColor: s }) => m ? typeof e == "string" && !e && !o ? r.m500 : p.m400 : o && !l ? i : r.m500;
27
26
  export {
28
- L as getColor,
29
- M as getCssShade
27
+ E as getColor,
28
+ H as getCssShade
30
29
  };
@@ -1,14 +1,13 @@
1
- import { jsxs as h, jsx as d } from "react/jsx-runtime";
2
- import u from "lodash-es/get";
3
- import { LoaderWrapper as L, VisuallyHidden as $, Dot as g } from "./styles.js";
4
- import { SIZE as c, MEDIUM as l, THEME_SHADE as t, MINI_ANIMATION_DELAYS as D, ANIMATION_DELAYS as M, BLUE as N } from "./constants.js";
5
- import { getTheme as _ } from "./helpers.js";
6
- const B = ({ size: m = l, theme: n = N, isBounce: p, isMini: r, isMiniDark: i }) => {
7
- const { dot: E, gap: I } = c[m] || c[l], s = _(n), a = r ? D : M, A = (i ? t.slice(2, 6) : r ? t.slice(0, 3) : t).map((o) => u(s, o, s.m500)), f = a.map(() => E);
8
- return /* @__PURE__ */ h(L, { role: "status", $gap: I, children: [
1
+ import { jsxs as u, jsx as d } from "react/jsx-runtime";
2
+ import { LoaderWrapper as L, VisuallyHidden as $, Dot as f } from "./styles.js";
3
+ import { SIZE as c, MEDIUM as l, THEME_SHADE as s, MINI_ANIMATION_DELAYS as D, ANIMATION_DELAYS as M, BLUE as N } from "./constants.js";
4
+ import { getTheme as g } from "./helpers.js";
5
+ const H = ({ size: m = l, theme: n = N, isBounce: p, isMini: t, isMiniDark: i }) => {
6
+ const { dot: E, gap: I } = c[m] || c[l], r = g(n), a = t ? D : M, A = (i ? s.slice(2, 6) : t ? s.slice(0, 3) : s).map((o) => r[o] ?? r.m500), h = a.map(() => E);
7
+ return /* @__PURE__ */ u(L, { role: "status", $gap: I, children: [
9
8
  /* @__PURE__ */ d($, { children: "Loading" }),
10
- f.map((o, e) => /* @__PURE__ */ d(
11
- g,
9
+ h.map((o, e) => /* @__PURE__ */ d(
10
+ f,
12
11
  {
13
12
  "aria-hidden": "true",
14
13
  $size: o,
@@ -21,5 +20,5 @@ const B = ({ size: m = l, theme: n = N, isBounce: p, isMini: r, isMiniDark: i })
21
20
  ] });
22
21
  };
23
22
  export {
24
- B as default
23
+ H as default
25
24
  };
@@ -1,28 +1,27 @@
1
- import m from "lodash-es/get";
2
1
  import o from "../../colors/blue.js";
3
- import t from "../../colors/green.js";
4
- import p from "../../colors/red.js";
5
- import e from "../../colors/yellow.js";
6
- import i 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";
2
+ import m from "../../colors/green.js";
3
+ import t from "../../colors/red.js";
4
+ import p from "../../colors/yellow.js";
5
+ import e from "../../colors/orange.js";
6
+ import i from "../../colors/black.js";
7
+ import f from "../../colors/grey.js";
8
+ import l from "../../colors/violet.js";
10
9
  import n from "../../colors/teal.js";
11
- import a from "../../colors/purple.js";
12
- import c from "../../colors/pink.js";
13
- const _ = {
10
+ import g from "../../colors/purple.js";
11
+ import a from "../../colors/pink.js";
12
+ const c = {
14
13
  blue: o,
15
- green: t,
16
- red: p,
17
- yellow: e,
18
- orange: i,
19
- black: f,
20
- grey: l,
21
- violet: g,
14
+ green: m,
15
+ red: t,
16
+ yellow: p,
17
+ orange: e,
18
+ black: i,
19
+ grey: f,
20
+ violet: l,
22
21
  teal: n,
23
- purple: a,
24
- pink: c
25
- }, C = (r) => m(_, r, o);
22
+ purple: g,
23
+ pink: a
24
+ }, w = (r) => c[r] ?? o;
26
25
  export {
27
- C as getTheme
26
+ w as getTheme
28
27
  };
@@ -1,14 +1,13 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import l from "lodash-es/get";
3
- import { getColor as i } from "../Input/Checkbox/helpers.js";
4
- import { PageLdr as s } from "./styles.js";
5
- import p from "../../colors/blue.js";
6
- const d = ({ theme: r = "blue", color: o, ...a }) => {
7
- const e = i(r), m = o || l(e, "m500", p.m500);
8
- return /* @__PURE__ */ t(
9
- s,
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { getColor as t } from "../Input/Checkbox/helpers.js";
3
+ import { PageLdr as i } from "./styles.js";
4
+ import n from "../../colors/blue.js";
5
+ const f = ({ theme: o = "blue", color: a, ...e }) => {
6
+ const r = t(o), m = a || ((r == null ? void 0 : r.m500) ?? n.m500);
7
+ return /* @__PURE__ */ l(
8
+ i,
10
9
  {
11
- ...a,
10
+ ...e,
12
11
  $color: m,
13
12
  role: "progressbar",
14
13
  "aria-label": "Loading",
@@ -18,5 +17,5 @@ const d = ({ theme: r = "blue", color: o, ...a }) => {
18
17
  );
19
18
  };
20
19
  export {
21
- d as default
20
+ f as default
22
21
  };