meticulous-ui 2.8.1 → 2.8.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.
@@ -1,31 +1,31 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import c from "../Ripple/Ripple.js";
3
3
  import { FONT_SIZE_MAPPING as C, SIZE_REM_MAPPING as P } from "./constants.js";
4
- import { ArrowButton as d, ClickableChevronLeft as f, Page as k, ClickableChevronRight as v, Ellipsis as $ } from "./styles.js";
5
- const x = ({ size: r, selected: n, shades: t, changePage: s }) => (i) => {
6
- const h = P[r], m = C[r], p = t, o = n === i, a = () => {
7
- s(i);
4
+ import { ArrowButton as d, ClickableChevronLeft as $, Page as f, ClickableChevronRight as k, Ellipsis as v } from "./styles.js";
5
+ const x = ({ size: i, selected: r, shades: t, changePage: s }) => (n) => {
6
+ const h = P[i], m = C[i], p = t, o = r === n, a = () => {
7
+ s(n);
8
8
  }, u = (l) => {
9
9
  (l.key === "Enter" || l.key === " ") && (l.preventDefault(), a());
10
10
  };
11
11
  return /* @__PURE__ */ e(
12
- k,
12
+ f,
13
13
  {
14
- "data-testid": o ? "current-page" : `test-${i}`,
14
+ "data-testid": o ? "current-page" : `test-${n}`,
15
15
  $isSelected: o,
16
16
  onClick: a,
17
17
  onKeyDown: u,
18
18
  tabIndex: o ? 0 : -1,
19
- "aria-label": `Page ${i}`,
19
+ "aria-label": `Page ${n}`,
20
20
  "aria-current": o ? "page" : void 0,
21
21
  $shades: p,
22
22
  $individualRemSize: h,
23
23
  $fontRemSize: m,
24
- children: i
24
+ children: n
25
25
  },
26
- `page_${i}`
26
+ `page_${n}`
27
27
  );
28
- }, A = () => /* @__PURE__ */ e($, { "aria-hidden": "true", children: "…" }), E = ({ iconSize: r, shades: n, setPrevPage: t }) => /* @__PURE__ */ e(d, { onClick: t, "aria-label": "Previous page", children: /* @__PURE__ */ e(c, { rippleColor: n.m50, children: /* @__PURE__ */ e(f, { size: r, "aria-hidden": "true" }) }) }), I = ({ iconSize: r, shades: n, setNextPage: t }) => /* @__PURE__ */ e(d, { onClick: t, "aria-label": "Next page", children: /* @__PURE__ */ e(c, { rippleColor: n.m50, children: /* @__PURE__ */ e(v, { size: r, "aria-hidden": "true" }) }) });
28
+ }, A = () => /* @__PURE__ */ e(v, { "aria-hidden": "true", children: "…" }), E = ({ iconSize: i, shades: r, setPrevPage: t }) => /* @__PURE__ */ e(d, { onClick: t, "aria-label": "Previous page", $shades: r, children: /* @__PURE__ */ e(c, { rippleColor: r.m50, children: /* @__PURE__ */ e($, { size: i, "aria-hidden": "true" }) }) }), I = ({ iconSize: i, shades: r, setNextPage: t }) => /* @__PURE__ */ e(d, { onClick: t, "aria-label": "Next page", $shades: r, children: /* @__PURE__ */ e(c, { rippleColor: r.m50, children: /* @__PURE__ */ e(k, { size: i, "aria-hidden": "true" }) }) });
29
29
  export {
30
30
  I as NextArrow,
31
31
  E as PrevArrow,
@@ -1,20 +1,20 @@
1
- import o, { css as n } from "styled-components";
2
- import a from "../Icons/ChevronLeft/ChevronLeft.js";
3
- import f from "../Icons/ChevronRight/ChevronRight.js";
4
- import c from "../../colors/grey.js";
5
- import i from "../../colors/white.js";
6
- import u from "../../colors/black.js";
7
- import { SELECTED_BG as l, NOT_SELECTED_BG as s, ACTIVE_NOT_SELECTED_BG as m } from "./constants.js";
8
- const t = (e) => ({ $shades: r }) => {
9
- if (["#FFFFFF"].includes(r))
10
- return u.m900;
11
- if (e === l)
12
- return r.m500;
13
- if (e === s)
14
- return r.m50;
15
- if (e === m)
16
- return r.m100;
17
- }, E = o.nav`
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;
11
+ if (o === i)
12
+ return e.m600;
13
+ if (o === m)
14
+ return e.m50;
15
+ if (o === u)
16
+ return e.m100;
17
+ }, $ = r.nav`
18
18
  display: flex;
19
19
  justify-content: center;
20
20
  align-items: center;
@@ -22,46 +22,47 @@ const t = (e) => ({ $shades: r }) => {
22
22
  min-width: 100%;
23
23
  width: 100%;
24
24
 
25
- ${({ $isDisabled: e }) => e && n`
25
+ ${({ $isDisabled: o }) => o && n`
26
26
  pointer-events: none;
27
27
  opacity: 0.4;
28
28
  `};
29
- `, C = o.button`
29
+ `, h = r.button`
30
30
  border: none;
31
31
  padding: 0;
32
32
  font-family: inherit;
33
33
  outline-offset: 2px;
34
34
 
35
- height: ${({ $individualRemSize: e }) => `${e}rem`};
36
- width: ${({ $individualRemSize: e }) => `${e}rem`};
35
+ height: ${({ $individualRemSize: o }) => `${o}rem`};
36
+ width: ${({ $individualRemSize: o }) => `${o}rem`};
37
37
  border-radius: 50%;
38
38
  display: flex;
39
39
  align-items: center;
40
40
  flex-direction: column;
41
41
  justify-content: center;
42
42
  text-align: center;
43
- font-size: ${({ $fontRemSize: e }) => e}rem;
44
- ${({ $isSelected: e }) => e ? n`
43
+ font-size: ${({ $fontRemSize: o }) => o}rem;
44
+ ${({ $isSelected: o }) => o ? n`
45
45
  cursor: auto;
46
- color: ${i};
47
- background-color: ${t(l)};
46
+ color: ${c};
47
+ background-color: ${t(i)};
48
+ outline-color: ${t(i)};
48
49
  ` : n`
49
50
  cursor: pointer;
50
- color: ${c.m500};
51
+ color: ${l.m500};
51
52
 
52
53
  &:hover {
53
- background-color: ${t(s)};
54
+ background-color: ${t(m)};
54
55
  }
55
56
 
56
57
  &:active {
57
- background-color: ${t(m)};
58
- color: ${i};
58
+ background-color: ${t(u)};
59
+ color: ${c};
59
60
  }
60
61
  `}
61
- `, v = o.span`
62
- color: ${c.m500};
62
+ `, v = r.span`
63
+ color: ${l.m500};
63
64
  user-select: none;
64
- `, x = o.button`
65
+ `, x = r.button`
65
66
  border: none;
66
67
  background: none;
67
68
  padding: 0;
@@ -71,22 +72,23 @@ const t = (e) => ({ $shades: r }) => {
71
72
  justify-content: center;
72
73
  border-radius: 50%;
73
74
  outline-offset: 2px;
74
- `, k = o(a)`
75
+ outline-color: ${({ $shades: o }) => o == null ? void 0 : o.m600};
76
+ `, k = r(f)`
75
77
  cursor: pointer;
76
- `, w = o(f)`
78
+ `, w = r(s)`
77
79
  cursor: pointer;
78
- `, F = o.div`
79
- min-width: ${({ size: e }) => e};
80
+ `, F = r.div`
81
+ min-width: ${({ size: o }) => o};
80
82
  display: flex;
81
83
  align-items: center;
82
84
  justify-content: space-between;
83
85
  `;
84
86
  export {
85
- E as AllPages,
87
+ $ as AllPages,
86
88
  x as ArrowButton,
87
89
  k as ClickableChevronLeft,
88
90
  w as ClickableChevronRight,
89
91
  v as Ellipsis,
90
92
  F as MiddleLayer,
91
- C as Page
93
+ h as Page
92
94
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meticulous-ui",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
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",