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.
@@ -1,20 +1,20 @@
1
- import r, { css as n } from "styled-components";
2
- import f from "../Icons/ChevronLeft/ChevronLeft.js";
3
- import s from "../Icons/ChevronRight/ChevronRight.js";
4
- import l from "../../colors/grey.js";
5
- import c from "../../colors/white.js";
6
- import a from "../../colors/black.js";
7
- import { SELECTED_BG as i, NOT_SELECTED_BG as m, ACTIVE_NOT_SELECTED_BG as u } from "./constants.js";
8
- const t = (o) => ({ $shades: e }) => {
9
- if (["#FFFFFF"].includes(e))
10
- return a.m900;
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 e.m600;
13
- if (o === m)
14
- return e.m50;
12
+ return r.m600;
13
+ if (o === c)
14
+ return r.m50;
15
15
  if (o === u)
16
- return e.m100;
17
- }, $ = r.nav`
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
- `, h = r.button`
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: ${c};
46
+ color: ${l};
47
47
  background-color: ${t(i)};
48
- outline-color: ${t(i)};
48
+
49
+ &:focus-visible {
50
+ outline: 1px solid ${t(i)};
51
+ }
49
52
  ` : n`
50
53
  cursor: pointer;
51
- color: ${l.m500};
54
+ color: ${s.m500};
52
55
 
53
56
  &:hover {
54
- background-color: ${t(m)};
57
+ background-color: ${t(c)};
55
58
  }
56
59
 
57
60
  &:active {
58
61
  background-color: ${t(u)};
59
- color: ${c};
62
+ color: ${l};
63
+ }
64
+
65
+ &:focus-visible {
66
+ outline: 1px solid ${t(c)};
60
67
  }
61
68
  `}
62
- `, v = r.span`
63
- color: ${l.m500};
69
+ `, C = e.span`
70
+ color: ${s.m500};
64
71
  user-select: none;
65
- `, x = r.button`
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
- outline-color: ${({ $shades: o }) => o == null ? void 0 : o.m600};
76
- `, k = r(f)`
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 = r(s)`
88
+ `, w = e(f)`
79
89
  cursor: pointer;
80
- `, F = r.div`
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
- $ as AllPages,
88
- x as ArrowButton,
97
+ E as AllPages,
98
+ h as ArrowButton,
89
99
  k as ClickableChevronLeft,
90
100
  w as ClickableChevronRight,
91
- v as Ellipsis,
101
+ C as Ellipsis,
92
102
  F as MiddleLayer,
93
- h as Page
103
+ $ as Page
94
104
  };
@@ -1,51 +1,55 @@
1
- import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
- import { useState as d, useEffect as T, createElement as $ } from "react";
3
- import { Logo as F } from "./helpers.js";
4
- import L from "../../colors/grey.js";
5
- import { COLOR_MAP as N, INFO as j, INFO_COLORS as k } from "./constants.js";
6
- import { ToastWrapper as w, Message as x, Title as A, Subtitle as I, CloseWrapper as M, ToastsContainer as R } from "./styles.js";
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
- }, b = ({ toasts: e, ...o }) => {
9
- const [t, n] = d(e);
10
- T(() => {
11
- n(e);
9
+ }, B = ({ toasts: e, ...o }) => {
10
+ const [t, a] = u(e);
11
+ p(() => {
12
+ a(e);
12
13
  }, [e]);
13
- const m = ({ type: a, id: c, title: i, subtitle: r, onExpire: l = O }, f) => /* @__PURE__ */ $(W, { type: a, title: i, subtitle: r, key: c, onExpire: l });
14
- return /* @__PURE__ */ s(R, { ...o, children: [...t].reverse().map(m) });
15
- }, u = (e, o, t) => () => {
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
- }, W = ({
20
- type: e = j,
23
+ }, R = ({
24
+ type: e = k,
21
25
  visible: o = !0,
22
26
  duration: t = 5,
23
- onExpire: n = O,
27
+ onExpire: a = O,
24
28
  title: m,
25
- subtitle: a,
29
+ subtitle: n,
26
30
  ...c
27
31
  }) => {
28
- const [i, r] = d(o), [l, f] = d(!1);
29
- T(() => {
32
+ const [i, r] = u(o), [l, f] = u(!1);
33
+ p(() => {
30
34
  r(o);
31
- }, [o]), T(() => {
32
- const S = setTimeout(u(f, r, n), t * 1e3 - 500);
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, u]);
37
- const { main: h, side: C, bg: g } = N[e] ?? k;
40
+ }, [t, d]);
41
+ const { main: h, side: C, bg: g } = j[e] ?? w;
38
42
  if (i)
39
- return /* @__PURE__ */ p(w, { $bg: g, className: `${l ? "fade-out" : "fade-in"}`, ...c, children: [
40
- /* @__PURE__ */ s(F, { type: e, $main: h, $side: C }),
41
- /* @__PURE__ */ p(x, { children: [
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
- a && /* @__PURE__ */ s(I, { children: a })
47
+ n && /* @__PURE__ */ s(I, { children: n })
44
48
  ] }),
45
- /* @__PURE__ */ s(M, { size: 20, color: L.m600, onClick: u(f, r, n) })
49
+ /* @__PURE__ */ s(M, { size: 20, color: N.m600, onClick: d(f, r, a) })
46
50
  ] });
47
51
  };
48
52
  export {
49
- b as ToastContainer,
50
- W as default
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",
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",