meticulous-ui 2.8.5 → 2.8.6

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.
@@ -3,14 +3,14 @@ import { useState as n, useRef as oe, useEffect as N } from "react";
3
3
  import se from "../Glass/Glass.js";
4
4
  import le from "./components/TimerRing/TimerRing.js";
5
5
  import m from "../../colors/white.js";
6
- import { Wrapper as de, Dimmer as ce, DotsWrapper as ue, AllDots as me, Dots as he, Time as v, TimeTxt as E, HourHand as pe, MinuteHand as ge, SecondHand as be, AlarmRing as fe, BulletRing as Se, Bullet as Te, VisuallyHidden as ye, LeftActions as Ae, ActionBtn as h, MediaStopFilledWrapper as $e, MediaPauseFilledWrapper as Re, MediaPlayFilledWrapper as De, RightActions as Pe, AddWrapper as we } from "./styles.js";
6
+ import { Wrapper as de, Dimmer as ce, DotsWrapper as ue, AllDots as me, Dots as he, Time as v, TimeTxt as E, HourHand as pe, MinuteHand as ge, SecondHand as be, AlarmRing as fe, BulletRing as Te, Bullet as Se, VisuallyHidden as ye, LeftActions as Ae, ActionBtn as h, MediaStopFilledWrapper as $e, MediaPauseFilledWrapper as Re, MediaPlayFilledWrapper as De, RightActions as Pe, AddWrapper as we } from "./styles.js";
7
7
  const d = () => {
8
8
  }, He = (p) => () => {
9
- const a = (/* @__PURE__ */ new Date()).toLocaleString("en-Us", { hour12: !0, timeZone: p }).split(", ")[1].split(" ")[0], [b, r, c] = a.split(":").map(Number);
9
+ const a = (/* @__PURE__ */ new Date()).toLocaleString("en-Us", { hour12: !0, timeZone: p }).split(", ")[1].split(" ")[0], [b, t, c] = a.split(":").map(Number);
10
10
  return {
11
11
  second: c * 6,
12
- minute: r * 6 + c * 0.1,
13
- hour: b % 12 * 30 + r * 0.5
12
+ minute: t * 6 + c * 0.1,
13
+ hour: b % 12 * 30 + t * 0.5
14
14
  };
15
15
  }, ze = ({
16
16
  color: p = "green",
@@ -18,7 +18,7 @@ const d = () => {
18
18
  showTimeWithSec: g = !0,
19
19
  timeZone: a = "Asia/Kolkata",
20
20
  isDigital: b = !0,
21
- timerSeconds: r = 0,
21
+ timerSeconds: t = 0,
22
22
  onTimerAdd: c = d,
23
23
  onTimerComplete: U = d,
24
24
  onTimerRemove: O = d,
@@ -26,35 +26,35 @@ const d = () => {
26
26
  onTimerPlay: K = d,
27
27
  ..._
28
28
  }) => {
29
- const [f, q] = n(/* @__PURE__ */ new Date()), [o, S] = n(0), [u, T] = n(!1), [y, J] = n(He(a)), [Q, A] = n(0), [$, R] = n(!1), H = oe(u);
29
+ const [f, q] = n(/* @__PURE__ */ new Date()), [o, T] = n(0), [u, S] = n(!1), [y, J] = n(He(a)), [Q, A] = n(0), [$, R] = n(!1), H = oe(u);
30
30
  N(() => {
31
31
  H.current = u;
32
32
  }, [u]);
33
33
  const V = () => {
34
- S(r), A(r % 60 * 6), T(!1), c();
34
+ T(t), A(t % 60 * 6), S(!1), c();
35
35
  }, X = () => {
36
36
  R(!0), O();
37
37
  }, Y = () => {
38
- S(0), A(0), R(!1);
38
+ T(0), A(0), R(!1);
39
39
  }, Z = () => {
40
- T(!0), G();
40
+ S(!0), G();
41
41
  }, ee = () => {
42
- T(!1), K();
42
+ S(!1), K();
43
43
  };
44
44
  N(() => {
45
45
  const C = setInterval(() => {
46
46
  const l = /* @__PURE__ */ new Date();
47
- q(l), J((t) => {
47
+ q(l), J((r) => {
48
48
  const te = l.toLocaleString("en-Us", { hour12: !0, timeZone: a }).split(", ")[1].split(" ")[0], [re, L, j] = te.split(":").map(Number), ie = j * 6, ne = L * 6 + j * 0.1, ae = re % 12 * 30 + L * 0.5, P = (x, z) => {
49
49
  const B = x % 360;
50
50
  return x - B + z + (z < B ? 360 : 0);
51
51
  };
52
52
  return {
53
- second: P(t.second, ie),
54
- minute: P(t.minute, ne),
55
- hour: P(t.hour, ae)
53
+ second: P(r.second, ie),
54
+ minute: P(r.minute, ne),
55
+ hour: P(r.hour, ae)
56
56
  };
57
- }), H.current || (S((t) => (t - 1 === 0 && (U(), R(!0)), t - 1)), A((t) => t - 6));
57
+ }), H.current || (T((r) => (r - 1 === 0 && (U(), R(!0)), r - 1)), A((r) => r - 6));
58
58
  }, 1e3);
59
59
  return () => clearInterval(C);
60
60
  }, []);
@@ -101,12 +101,12 @@ const d = () => {
101
101
  }
102
102
  ),
103
103
  /* @__PURE__ */ e(
104
- Se,
104
+ Te,
105
105
  {
106
106
  style: { "--bullet-rotate": `${45 + Q}deg` },
107
107
  $dismissing: $,
108
108
  "aria-hidden": "true",
109
- children: /* @__PURE__ */ e(Te, {})
109
+ children: /* @__PURE__ */ e(Se, {})
110
110
  }
111
111
  ),
112
112
  /* @__PURE__ */ e(
@@ -118,7 +118,7 @@ const d = () => {
118
118
  }
119
119
  )
120
120
  ] }),
121
- /* @__PURE__ */ i(Ae, { $noActions: s, role: "group", "aria-label": "Timer controls", children: [
121
+ t > 0 && /* @__PURE__ */ i(Ae, { $noActions: s, role: "group", "aria-label": "Timer controls", children: [
122
122
  /* @__PURE__ */ e(
123
123
  h,
124
124
  {
@@ -140,12 +140,12 @@ const d = () => {
140
140
  }
141
141
  ) : /* @__PURE__ */ e(h, { type: "button", onClick: ee, "aria-label": "Resume timer", children: /* @__PURE__ */ e(De, { color: m, size: 14, "aria-hidden": "true" }) })
142
142
  ] }),
143
- /* @__PURE__ */ e(Pe, { role: "group", "aria-label": "Start timer", children: /* @__PURE__ */ e(
143
+ t > 0 && /* @__PURE__ */ e(Pe, { role: "group", "aria-label": "Start timer", children: /* @__PURE__ */ e(
144
144
  h,
145
145
  {
146
146
  type: "button",
147
147
  onClick: V,
148
- "aria-label": `Start ${r} second timer`,
148
+ "aria-label": `Start ${t} second timer`,
149
149
  children: /* @__PURE__ */ e(we, { color: m, size: 20, "aria-hidden": "true" })
150
150
  }
151
151
  ) })
@@ -67,7 +67,7 @@ const u = ({ $color: o }) => h[o], e = i`
67
67
  `, D = t.div`
68
68
  position: absolute;
69
69
  left: 1.6%;
70
- top: 44%;
70
+ top: 43.8%;
71
71
  transform: translate(-50%, -50%) rotate(6.7deg);
72
72
  `, S = t.div`
73
73
  ${e};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meticulous-ui",
3
- "version": "2.8.5",
3
+ "version": "2.8.6",
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",