meticulous-ui 2.9.2 → 2.9.3

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,43 +1,51 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import { useState as f, useEffect as u } from "react";
3
- import { Logo as S } from "./helpers.js";
4
- import $ from "../../colors/grey.js";
5
- import { COLOR_MAP as F, INFO as L, INFO_COLORS as N } from "./constants.js";
6
- import { ToastWrapper as j, Message as w, Title as x, Subtitle as I, CloseWrapper as M } from "./styles.js";
7
- const R = () => {
8
- }, m = (o, e, t) => () => {
9
- o(!0), setTimeout(() => {
10
- e(!1), t();
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";
7
+ const O = () => {
8
+ }, b = ({ toasts: e, ...o }) => {
9
+ const [t, n] = d(e);
10
+ T(() => {
11
+ n(e);
12
+ }, [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) => () => {
16
+ e(!0), setTimeout(() => {
17
+ o(!1), t();
11
18
  }, 500);
12
- }, b = ({
13
- type: o = L,
14
- visible: e = !0,
19
+ }, W = ({
20
+ type: e = j,
21
+ visible: o = !0,
15
22
  duration: t = 5,
16
- onExpire: a = R,
17
- title: l,
18
- subtitle: i,
19
- ...d
23
+ onExpire: n = O,
24
+ title: m,
25
+ subtitle: a,
26
+ ...c
20
27
  }) => {
21
- const [p, s] = f(e), [O, c] = f(!1);
22
- u(() => {
23
- s(e);
24
- }, [e]), u(() => {
25
- const C = setTimeout(m(c, s, a), t * 1e3 - 500);
28
+ const [i, r] = d(o), [l, f] = d(!1);
29
+ T(() => {
30
+ r(o);
31
+ }, [o]), T(() => {
32
+ const S = setTimeout(u(f, r, n), t * 1e3 - 500);
26
33
  return () => {
27
- clearTimeout(C);
34
+ clearTimeout(S);
28
35
  };
29
- }, [t, m]);
30
- const { main: T, side: h, bg: g } = F[o] ?? N;
31
- if (p)
32
- return /* @__PURE__ */ n(j, { $bg: g, className: `${O ? "fade-out" : "fade-in"}`, ...d, children: [
33
- /* @__PURE__ */ r(S, { type: o, $main: T, $side: h }),
34
- /* @__PURE__ */ n(w, { children: [
35
- /* @__PURE__ */ r(x, { children: l }),
36
- i && /* @__PURE__ */ r(I, { children: i })
36
+ }, [t, u]);
37
+ const { main: h, side: C, bg: g } = N[e] ?? k;
38
+ 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: [
42
+ /* @__PURE__ */ s(A, { children: m }),
43
+ a && /* @__PURE__ */ s(I, { children: a })
37
44
  ] }),
38
- /* @__PURE__ */ r(M, { size: 20, color: $.m600, onClick: m(c, s, a) })
45
+ /* @__PURE__ */ s(M, { size: 20, color: L.m600, onClick: u(f, r, n) })
39
46
  ] });
40
47
  };
41
48
  export {
42
- b as default
49
+ b as ToastContainer,
50
+ W as default
43
51
  };
@@ -1,4 +1,6 @@
1
1
  import t from "./Toast.js";
2
+ import { ToastContainer as e } from "./Toast.js";
2
3
  export {
4
+ e as ToastContainer,
3
5
  t as default
4
6
  };
@@ -1,9 +1,9 @@
1
- import r, { keyframes as d, css as o } from "styled-components";
1
+ import r, { keyframes as s, css as o } from "styled-components";
2
2
  import i from "../../colors/white.js";
3
3
  import n from "../Icons/Close/Close.js";
4
- import s from "../../colors/grey.js";
4
+ import d from "../../colors/grey.js";
5
5
  import { WARNING as a } from "./constants.js";
6
- const m = d`
6
+ const m = s`
7
7
  from {
8
8
  opacity: 0;
9
9
  transform: translateX(100%); /* Start off-screen to the right */
@@ -12,7 +12,7 @@ const m = d`
12
12
  opacity: 1;
13
13
  transform: translateX(0); /* Move to its final position */
14
14
  }
15
- `, h = d`
15
+ `, h = s`
16
16
  from {
17
17
  opacity: 1;
18
18
  transform: translateX(0);
@@ -21,8 +21,7 @@ const m = d`
21
21
  opacity: 0;
22
22
  transform: translateX(100%); /* Move off-screen to the right */
23
23
  }
24
- `;
25
- r.div`
24
+ `, w = r.div`
26
25
  position: fixed;
27
26
  top: 1rem;
28
27
  right: 1rem;
@@ -31,8 +30,7 @@ r.div`
31
30
  display: flex;
32
31
  flex-direction: column;
33
32
  gap: 1rem;
34
- `;
35
- const w = r.div`
33
+ `, x = r.div`
36
34
  display: flex;
37
35
  align-items: center;
38
36
  justify-content: space-between;
@@ -60,7 +58,7 @@ const w = r.div`
60
58
  border-radius: 0.6rem;
61
59
  padding: 0.3rem 0.8rem;
62
60
  }
63
- `, x = r.div`
61
+ `, b = r.div`
64
62
  position: absolute;
65
63
  top: 50%;
66
64
  left: 50%;
@@ -96,7 +94,7 @@ const w = r.div`
96
94
  border-radius: 50%;
97
95
  `}
98
96
  }
99
- `, b = r.div`
97
+ `, u = r.div`
100
98
  position: relative;
101
99
  width: 4rem;
102
100
  height: 4rem;
@@ -107,7 +105,7 @@ const w = r.div`
107
105
  width: 3rem;
108
106
  height: 3rem;
109
107
  }
110
- `, u = r.div`
108
+ `, $ = r.div`
111
109
  position: absolute;
112
110
  top: 50%;
113
111
  left: 50%;
@@ -121,7 +119,7 @@ const w = r.div`
121
119
  transform: translate(-42.8%, -42.8%);
122
120
  scale: 0.75;
123
121
  }
124
- `, $ = r.div`
122
+ `, y = r.div`
125
123
  position: absolute;
126
124
  top: 50%;
127
125
  left: 50%;
@@ -135,13 +133,13 @@ const w = r.div`
135
133
  width: 2.25rem;
136
134
  height: 2.25rem;
137
135
  }
138
- `, y = r(n)`
136
+ `, v = r(n)`
139
137
  cursor: pointer;
140
- `, v = r.div`
138
+ `, k = r.div`
141
139
  font-weight: 600;
142
140
  font-size: 1.2rem;
143
- color: ${s.m800};
144
- `, k = r.div`
141
+ color: ${d.m800};
142
+ `, C = r.div`
145
143
  display: flex;
146
144
  flex-direction: column;
147
145
  gap: 0.2rem;
@@ -150,19 +148,20 @@ const w = r.div`
150
148
  @media screen and (max-width: 768px) {
151
149
  width: 15rem;
152
150
  }
153
- `, C = r.div`
151
+ `, X = r.div`
154
152
  font-weight: 400;
155
153
  font-size: 1rem;
156
- color: ${s.m700};
154
+ color: ${d.m700};
157
155
  `;
158
156
  export {
159
- y as CloseWrapper,
160
- u as Icon,
161
- x as LogoContainer,
162
- k as Message,
163
- b as Outer,
164
- $ as OuterChild,
165
- C as Subtitle,
166
- v as Title,
167
- w as ToastWrapper
157
+ v as CloseWrapper,
158
+ $ as Icon,
159
+ b as LogoContainer,
160
+ C as Message,
161
+ u as Outer,
162
+ y as OuterChild,
163
+ X as Subtitle,
164
+ k as Title,
165
+ x as ToastWrapper,
166
+ w as ToastsContainer
168
167
  };
package/index.js CHANGED
@@ -1,58 +1,59 @@
1
1
  import { default as a } from "./components/Pagination/Pagination.js";
2
- import { default as t } from "./components/Toast/Toast.js";
3
- import { default as p } from "./components/Spinner/Spinner.js";
4
- import { default as l } from "./components/Loader/Loader.js";
2
+ import { default as t, ToastContainer as f } from "./components/Toast/Toast.js";
3
+ import { default as d } from "./components/Spinner/Spinner.js";
4
+ import { default as s } from "./components/Loader/Loader.js";
5
5
  import { default as m } from "./components/PageLoader/PageLoader.js";
6
- import { default as x } from "./components/OtpInput/OtpInput.js";
7
- import { default as n } from "./components/Dropdown/Dropdown.js";
8
- import { default as c } from "./components/Selectbox/Selectbox.js";
6
+ import { default as i } from "./components/OtpInput/OtpInput.js";
7
+ import { default as H } from "./components/Dropdown/Dropdown.js";
8
+ import { default as P } from "./components/Selectbox/Selectbox.js";
9
9
  import { default as g } from "./components/Button/Button.js";
10
10
  import { default as S } from "./components/Timer/Timer.js";
11
- import { default as b } from "./components/Shimmer/Shimmer.js";
11
+ import { default as h } from "./components/Shimmer/Shimmer.js";
12
12
  import { default as L } from "./components/VideoPlayer/VideoPlayer.js";
13
13
  import { default as w } from "./components/Image/Image.js";
14
14
  import { default as B } from "./components/Typography/P/P.js";
15
- import { default as D } from "./components/Input/Input/Input.js";
16
- import { default as G } from "./components/Input/Textarea/Textarea.js";
17
- import { default as R } from "./components/Input/Checkbox/Checkbox.js";
18
- import { default as V } from "./components/Input/RadioGroup/RadioGroup.js";
19
- import { default as q } from "./components/Input/FileUploader/FileUploader.js";
20
- import { default as z } from "./colors/index.js";
21
- import { default as E } from "./utils/index.js";
22
- import { default as K } from "./components/Icons/index.js";
23
- import { default as N } from "./components/Typography/Headings/H1.js";
24
- import { default as W } from "./components/Typography/Headings/H2.js";
25
- import { default as Y } from "./components/Typography/Headings/H3.js";
26
- import { default as _ } from "./components/Typography/Headings/H4.js";
27
- import { default as ee } from "./components/Typography/Headings/H5.js";
28
- import { default as ae } from "./components/Typography/Headings/H6.js";
15
+ import { default as F } from "./components/Input/Input/Input.js";
16
+ import { default as O } from "./components/Input/Textarea/Textarea.js";
17
+ import { default as U } from "./components/Input/Checkbox/Checkbox.js";
18
+ import { default as j } from "./components/Input/RadioGroup/RadioGroup.js";
19
+ import { default as v } from "./components/Input/FileUploader/FileUploader.js";
20
+ import { default as A } from "./colors/index.js";
21
+ import { default as J } from "./utils/index.js";
22
+ import { default as M } from "./components/Icons/index.js";
23
+ import { default as Q } from "./components/Typography/Headings/H1.js";
24
+ import { default as X } from "./components/Typography/Headings/H2.js";
25
+ import { default as Z } from "./components/Typography/Headings/H3.js";
26
+ import { default as $ } from "./components/Typography/Headings/H4.js";
27
+ import { default as eo } from "./components/Typography/Headings/H5.js";
28
+ import { default as ro } from "./components/Typography/Headings/H6.js";
29
29
  export {
30
30
  g as Button,
31
- R as Checkbox,
32
- n as Dropdown,
33
- q as FileUploader,
34
- N as H1,
35
- W as H2,
36
- Y as H3,
37
- _ as H4,
38
- ee as H5,
39
- ae as H6,
31
+ U as Checkbox,
32
+ H as Dropdown,
33
+ v as FileUploader,
34
+ Q as H1,
35
+ X as H2,
36
+ Z as H3,
37
+ $ as H4,
38
+ eo as H5,
39
+ ro as H6,
40
40
  w as Image,
41
- D as Input,
42
- l as Loader,
43
- x as OtpInput,
41
+ F as Input,
42
+ s as Loader,
43
+ i as OtpInput,
44
44
  B as P,
45
45
  m as PageLoader,
46
46
  a as Pagination,
47
- V as RadioGroup,
48
- c as Selectbox,
49
- b as Shimmer,
50
- p as Spinner,
51
- G as Textarea,
47
+ j as RadioGroup,
48
+ P as Selectbox,
49
+ h as Shimmer,
50
+ d as Spinner,
51
+ O as Textarea,
52
52
  S as Timer,
53
53
  t as Toast,
54
+ f as ToastContainer,
54
55
  L as VideoPlayer,
55
- z as colors,
56
- K as icons,
57
- E as utils
56
+ A as colors,
57
+ M as icons,
58
+ J as utils
58
59
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meticulous-ui",
3
- "version": "2.9.2",
3
+ "version": "2.9.3",
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",