meticulous-ui 2.9.0 → 2.9.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.
@@ -15,7 +15,7 @@ const c = () => {
15
15
  };
16
16
  }, ve = ({
17
17
  color: g = "green",
18
- showTime: M = !0,
18
+ showTime: I = !0,
19
19
  showTimeWithSec: b = !0,
20
20
  timeZone: o = "Asia/Kolkata",
21
21
  isDigital: f = !0,
@@ -25,55 +25,55 @@ const c = () => {
25
25
  onTimerRemove: K = c,
26
26
  onTimerPause: q = c,
27
27
  onTimerPlay: J = c,
28
- size: S = 20,
28
+ size: M = 20,
29
29
  ...Q
30
30
  }) => {
31
- const [T, V] = a(/* @__PURE__ */ new Date()), [s, $] = a(0), [m, A] = a(!1), [y, X] = a(Ce(o)), [Y, R] = a(0), [D, P] = a(!1), k = de(m), t = Math.round(S), w = Math.round(14 * S / 20);
31
+ const [S, V] = a(/* @__PURE__ */ new Date()), [s, T] = a(0), [m, $] = a(!1), [A, X] = a(Ce(o)), [Y, y] = a(0), [R, D] = a(!1), k = de(m), t = Math.round(M), P = Math.round(14 * M / 20);
32
32
  O(() => {
33
33
  k.current = m;
34
34
  }, [m]);
35
35
  const Z = () => {
36
- $(r), R(r % 60 * 6), A(!1), u();
36
+ T(r), y(r % 60 * 6), $(!1), u();
37
37
  }, ee = () => {
38
- P(!0), K();
38
+ D(!0), K();
39
39
  }, te = () => {
40
- $(0), R(0), P(!1);
40
+ T(0), y(0), D(!1);
41
41
  }, re = () => {
42
- A(!0), q();
42
+ $(!0), q();
43
43
  }, ie = () => {
44
- A(!1), J();
44
+ $(!1), J();
45
45
  };
46
46
  O(() => {
47
- const j = setInterval(() => {
47
+ const N = setInterval(() => {
48
48
  const d = /* @__PURE__ */ new Date();
49
49
  V(d), X((i) => {
50
- const ne = d.toLocaleString("en-Us", { hour12: !0, timeZone: o }).split(", ")[1].split(" ")[0], [ae, x, z] = ne.split(":").map(Number), oe = z * 6, se = x * 6 + z * 0.1, le = ae % 12 * 30 + x * 0.5, I = (B, E) => {
50
+ const ne = d.toLocaleString("en-Us", { hour12: !0, timeZone: o }).split(", ")[1].split(" ")[0], [ae, j, x] = ne.split(":").map(Number), oe = x * 6, se = j * 6 + x * 0.1, le = ae % 12 * 30 + j * 0.5, H = (B, E) => {
51
51
  const F = B % 360;
52
52
  return B - F + E + (E < F ? 360 : 0);
53
53
  };
54
54
  return {
55
- second: I(i.second, oe),
56
- minute: I(i.minute, se),
57
- hour: I(i.hour, le)
55
+ second: H(i.second, oe),
56
+ minute: H(i.minute, se),
57
+ hour: H(i.hour, le)
58
58
  };
59
- }), k.current || ($((i) => (i - 1 === 0 && (G(), P(!0)), i - 1)), R((i) => i - 6));
59
+ }), k.current || (T((i) => (i - 1 === 0 && (G(), D(!0)), i - 1)), y((i) => i - 6));
60
60
  }, 1e3);
61
- return () => clearInterval(j);
61
+ return () => clearInterval(N);
62
62
  }, []);
63
- const H = T.toLocaleString("en-Us", { hour12: !0, timeZone: o }).split(", ")[1], C = H.split(" ")[0], W = H.split(" ")[1], L = H.split(":").slice(0, 2).join(":"), l = !(Number.isInteger(s) && s > 0), N = `${b ? C : L} ${W}`;
63
+ const w = S.toLocaleString("en-Us", { hour12: !0, timeZone: o }).split(", ")[1], C = w.split(" ")[0], W = w.split(" ")[1], z = w.split(":").slice(0, 2).join(":"), l = !(Number.isInteger(s) && s > 0), L = `${b ? C : z} ${W}`;
64
64
  return /* @__PURE__ */ n(me, { $color: g, role: "region", "aria-label": "Clock", $size: t, ...Q, children: [
65
65
  /* @__PURE__ */ e(ce, { borderRadius: `${ke(16.67)({ $size: t })}rem`, "aria-hidden": "true" }),
66
- M && /* @__PURE__ */ n(v, { children: [
67
- /* @__PURE__ */ e(he, { "aria-hidden": "true", $size: t, children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(ge, { "aria-hidden": "true", children: [...Array(60)].map((j, d) => /* @__PURE__ */ e(be, { $i: d, $size: t }, d)) }) }) }),
68
- f ? /* @__PURE__ */ n(U, { as: "time", dateTime: T.toISOString(), "aria-label": N, children: [
69
- /* @__PURE__ */ e(_, { $size: t, "aria-hidden": "true", children: b ? C : L }),
66
+ I && /* @__PURE__ */ n(v, { children: [
67
+ /* @__PURE__ */ e(he, { "aria-hidden": "true", $size: t, children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(ge, { "aria-hidden": "true", children: [...Array(60)].map((N, d) => /* @__PURE__ */ e(be, { $i: d, $size: t }, d)) }) }) }),
68
+ f ? /* @__PURE__ */ n(U, { as: "time", dateTime: S.toISOString(), "aria-label": L, children: [
69
+ /* @__PURE__ */ e(_, { $size: t, "aria-hidden": "true", children: b ? C : z }),
70
70
  /* @__PURE__ */ e(_, { $size: t, "aria-hidden": "true", children: W })
71
- ] }) : /* @__PURE__ */ n(U, { as: "time", dateTime: T.toISOString(), "aria-label": N, children: [
71
+ ] }) : /* @__PURE__ */ n(U, { as: "time", dateTime: S.toISOString(), "aria-label": L, children: [
72
72
  /* @__PURE__ */ e(
73
73
  fe,
74
74
  {
75
75
  $size: t,
76
- style: { "--hand-rotate": `${y.hour}deg` },
76
+ style: { "--hand-rotate": `${A.hour}deg` },
77
77
  "aria-hidden": "true"
78
78
  }
79
79
  ),
@@ -81,7 +81,7 @@ const c = () => {
81
81
  Se,
82
82
  {
83
83
  $size: t,
84
- style: { "--hand-rotate": `${y.minute}deg` },
84
+ style: { "--hand-rotate": `${A.minute}deg` },
85
85
  "aria-hidden": "true"
86
86
  }
87
87
  ),
@@ -89,20 +89,20 @@ const c = () => {
89
89
  Te,
90
90
  {
91
91
  $size: t,
92
- style: { "--hand-rotate": `${y.second}deg` },
92
+ style: { "--hand-rotate": `${A.second}deg` },
93
93
  "aria-hidden": "true"
94
94
  }
95
95
  )
96
96
  ] })
97
97
  ] }),
98
- (!l || D) && /* @__PURE__ */ n(v, { children: [
98
+ (!l || R) && /* @__PURE__ */ n(v, { children: [
99
99
  /* @__PURE__ */ e(
100
100
  $e,
101
101
  {
102
- $dismissing: D,
102
+ $dismissing: R,
103
103
  onAnimationEnd: te,
104
104
  "aria-hidden": "true",
105
- children: /* @__PURE__ */ e(ue, { size: S, progress: s >= 60 ? 1 : s % 60 / 60 })
105
+ children: /* @__PURE__ */ e(ue, { progress: s >= 60 ? 1 : s % 60 / 60 })
106
106
  }
107
107
  ),
108
108
  /* @__PURE__ */ e(
@@ -110,7 +110,7 @@ const c = () => {
110
110
  {
111
111
  $size: t,
112
112
  style: { "--bullet-rotate": `${45 + Y}deg` },
113
- $dismissing: D,
113
+ $dismissing: R,
114
114
  "aria-hidden": "true",
115
115
  children: /* @__PURE__ */ e(ye, { $size: t })
116
116
  }
@@ -140,7 +140,7 @@ const c = () => {
140
140
  $size: t,
141
141
  "aria-label": "Stop timer",
142
142
  "aria-disabled": l,
143
- children: /* @__PURE__ */ e(Pe, { color: h, size: w, "aria-hidden": "true" })
143
+ children: /* @__PURE__ */ e(Pe, { color: h, size: P, "aria-hidden": "true" })
144
144
  }
145
145
  ),
146
146
  l || !m ? /* @__PURE__ */ e(
@@ -151,9 +151,9 @@ const c = () => {
151
151
  $size: t,
152
152
  "aria-label": "Pause timer",
153
153
  "aria-disabled": l,
154
- children: /* @__PURE__ */ e(we, { color: h, size: w, "aria-hidden": "true" })
154
+ children: /* @__PURE__ */ e(we, { color: h, size: P, "aria-hidden": "true" })
155
155
  }
156
- ) : /* @__PURE__ */ e(p, { type: "button", onClick: ie, "aria-label": "Resume timer", $size: t, children: /* @__PURE__ */ e(He, { color: h, size: w, "aria-hidden": "true" }) })
156
+ ) : /* @__PURE__ */ e(p, { type: "button", onClick: ie, "aria-label": "Resume timer", $size: t, children: /* @__PURE__ */ e(He, { color: h, size: P, "aria-hidden": "true" }) })
157
157
  ]
158
158
  }
159
159
  ),
@@ -1,33 +1,33 @@
1
- import { jsxs as n, jsx as c } from "react/jsx-runtime";
2
- import { useRef as i, useEffect as a } from "react";
3
- import l from "../../../../colors/white.js";
4
- import { SVG as h } from "./styles.js";
5
- const p = ({ progress: o, size: r }) => {
6
- const s = i(null), t = r * 5.25, e = 2 * Math.PI * t;
7
- return a(() => {
8
- const f = e * (1 - o);
9
- s.current.style.strokeDashoffset = f;
10
- }, [o]), /* @__PURE__ */ n(h, { width: r * 11, height: r * 11, children: [
11
- /* @__PURE__ */ c(
1
+ import { jsx as t, jsxs as f } from "react/jsx-runtime";
2
+ import { useRef as n, useEffect as c } from "react";
3
+ import a from "../../../../colors/white.js";
4
+ import { SVG as l } from "./styles.js";
5
+ const r = 33, e = 2 * Math.PI * r, u = ({ progress: o }) => {
6
+ const s = n(null);
7
+ return c(() => {
8
+ const i = e * (1 - o);
9
+ s.current.style.strokeDashoffset = i;
10
+ }, [o]), /* @__PURE__ */ t(l, { viewBox: "0 0 100 100", width: "100%", height: "100%", children: /* @__PURE__ */ f("g", { transform: "rotate(-90, 50, 48)", children: [
11
+ /* @__PURE__ */ t(
12
12
  "circle",
13
13
  {
14
- cx: r * 5.5,
15
- cy: r * 5.5,
16
- r: t,
14
+ cx: 50,
15
+ cy: 48,
16
+ r,
17
17
  stroke: "rgba(255,255,255,.2)",
18
- strokeWidth: r * 0.2,
18
+ strokeWidth: 2,
19
19
  fill: "none"
20
20
  }
21
21
  ),
22
- /* @__PURE__ */ c(
22
+ /* @__PURE__ */ t(
23
23
  "circle",
24
24
  {
25
25
  ref: s,
26
- cx: r * 5.5,
27
- cy: r * 5.5,
28
- r: t,
29
- stroke: l,
30
- strokeWidth: r * 0.2,
26
+ cx: 50,
27
+ cy: 48,
28
+ r,
29
+ stroke: a,
30
+ strokeWidth: 1,
31
31
  fill: "none",
32
32
  strokeLinecap: "round",
33
33
  strokeDasharray: e,
@@ -35,8 +35,8 @@ const p = ({ progress: o, size: r }) => {
35
35
  style: { transition: "stroke-dashoffset 0.2s linear" }
36
36
  }
37
37
  )
38
- ] });
38
+ ] }) });
39
39
  };
40
40
  export {
41
- p as default
41
+ u as default
42
42
  };
@@ -1,7 +1,5 @@
1
- import t from "styled-components";
2
- const e = t.svg`
3
- rotate: -90deg;
4
- `;
1
+ import o from "styled-components";
2
+ const r = o.svg``;
5
3
  export {
6
- e as SVG
4
+ r as SVG
7
5
  };
@@ -8,7 +8,7 @@ import u from "../../colors/black.js";
8
8
  import b from "../../colors/red.js";
9
9
  import { COLOR_MAPPING as $ } from "./constants.js";
10
10
  import { getSize as t } from "./helpers.js";
11
- const a = 1, f = 16.67, s = 1.67, g = 3.404, v = ({ $color: e }) => $[e], n = r`
11
+ const s = 1, g = 16.67, a = 1.67, f = 3.404, v = ({ $color: e }) => $[e], n = r`
12
12
  position: absolute;
13
13
  bottom: 50%;
14
14
  transform-origin: bottom;
@@ -17,16 +17,16 @@ const a = 1, f = 16.67, s = 1.67, g = 3.404, v = ({ $color: e }) => $[e], n = r`
17
17
  rotate: var(--hand-rotate);
18
18
  `, T = o.div`
19
19
  position: relative;
20
- height: ${t(a)}rem;
21
- width: ${t(a)}rem;
22
- border-radius: ${t(f)}rem;
20
+ height: ${t(s)}rem;
21
+ width: ${t(s)}rem;
22
+ border-radius: ${t(g)}rem;
23
23
  background-color: ${v};
24
24
  `, W = o.div`
25
25
  position: absolute;
26
26
  left: 50%;
27
27
  top: 48%;
28
- width: ${t(s)}rem;
29
- height: ${t(s)}rem;
28
+ width: ${t(a)}rem;
29
+ height: ${t(a)}rem;
30
30
  transform: translate(-50%, -50%);
31
31
  border-radius: 50%;
32
32
  background-color: rgba(0, 0, 0, 0.16);
@@ -47,7 +47,7 @@ const a = 1, f = 16.67, s = 1.67, g = 3.404, v = ({ $color: e }) => $[e], n = r`
47
47
  width: ${t(120)}rem;
48
48
  height: ${t(120)}rem;
49
49
  background: rgba(255, 255, 255, 0.4);
50
- transform-origin: ${t(g)}rem;
50
+ transform-origin: ${t(f)}rem;
51
51
  border-radius: 2px;
52
52
  rotate: ${({ $i: e }) => `${e * 6}deg`};
53
53
 
@@ -91,8 +91,8 @@ const a = 1, f = 16.67, s = 1.67, g = 3.404, v = ({ $color: e }) => $[e], n = r`
91
91
  to { opacity: 0; transform: scale(0.85); }
92
92
  `, E = o.div`
93
93
  position: absolute;
94
- left: 16%;
95
- top: 14%;
94
+ inset: 0;
95
+ pointer-events: none;
96
96
  ${({ $dismissing: e }) => e && r`
97
97
  animation: ${d} 0.4s ease-out forwards;
98
98
  `}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meticulous-ui",
3
- "version": "2.9.0",
3
+ "version": "2.9.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",