meticulous-ui 2.7.0 → 2.8.0
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.
- package/README.md +1 -0
- package/components/Image/Image.js +49 -0
- package/components/Image/index.js +4 -0
- package/components/Image/styles.js +44 -0
- package/components/Input/FileUploader/FileUploader.js +11 -1
- package/components/Input/Radio/Radio.js +11 -1
- package/components/Shimmer/Shimmer.js +17 -1
- package/components/Toast/Toast.js +9 -1
- package/components/VideoPlayer/VideoPlayer.js +8 -1
- package/index.js +40 -38
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ import blue from 'meticulous-ui/colors/blue';
|
|
|
65
65
|
| `Timer` | Renders analog / digital clock with alarm |
|
|
66
66
|
| `OtpInput` | Gives inputs to enter and edit OTP |
|
|
67
67
|
| `VideoPlayer` | Renders video with keyboard shortcuts |
|
|
68
|
+
| `Image` | Renders image with shimmer, lower resolution |
|
|
68
69
|
| `Input` | Renders input box to let user enter input |
|
|
69
70
|
| `Checkbox` | Renders checkbox to let user give boolean value |
|
|
70
71
|
| `RadioGroup` | Renders radio options in a group to let user select |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as x, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as a } from "react";
|
|
3
|
+
import y from "../Shimmer/Shimmer.js";
|
|
4
|
+
import { ImageWrapper as S, ShimmerOverlay as j, LowResImage as E, StyledImage as R } from "./styles.js";
|
|
5
|
+
const o = (e) => {
|
|
6
|
+
if (e != null)
|
|
7
|
+
return typeof e == "number" ? `${e}rem` : e;
|
|
8
|
+
}, k = ({
|
|
9
|
+
src: e,
|
|
10
|
+
alt: l = "",
|
|
11
|
+
width: c = "100%",
|
|
12
|
+
height: f = "100%",
|
|
13
|
+
borderRadius: r = "0.4rem",
|
|
14
|
+
loadLow: m = !1,
|
|
15
|
+
lowSrc: n,
|
|
16
|
+
...u
|
|
17
|
+
}) => {
|
|
18
|
+
const [i, $] = a(!1), [d, h] = a(!1), [s, L] = a(!1), p = () => $(!0), g = () => h(!0), w = () => L(!0), I = m ? i : d;
|
|
19
|
+
return /* @__PURE__ */ x(S, { $width: o(c), $height: o(f), $borderRadius: o(r), children: [
|
|
20
|
+
!s && /* @__PURE__ */ t(j, { $loaded: I, children: /* @__PURE__ */ t(y, { borderRadius: r }) }),
|
|
21
|
+
m && n && !s && /* @__PURE__ */ t(
|
|
22
|
+
E,
|
|
23
|
+
{
|
|
24
|
+
src: n,
|
|
25
|
+
alt: "",
|
|
26
|
+
"aria-hidden": "true",
|
|
27
|
+
$lowLoaded: i,
|
|
28
|
+
$loaded: d,
|
|
29
|
+
$borderRadius: o(r),
|
|
30
|
+
onLoad: p
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
!s && /* @__PURE__ */ t(
|
|
34
|
+
R,
|
|
35
|
+
{
|
|
36
|
+
src: e,
|
|
37
|
+
alt: l,
|
|
38
|
+
$loaded: d,
|
|
39
|
+
$borderRadius: o(r),
|
|
40
|
+
onLoad: g,
|
|
41
|
+
onError: w,
|
|
42
|
+
...u
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
k as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import t from "styled-components";
|
|
2
|
+
const s = t.span`
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
width: ${({ $width: i }) => i};
|
|
6
|
+
height: ${({ $height: i }) => i};
|
|
7
|
+
border-radius: ${({ $borderRadius: i }) => i};
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
`, a = t.img`
|
|
10
|
+
display: block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
object-fit: cover;
|
|
14
|
+
border-radius: ${({ $borderRadius: i }) => i};
|
|
15
|
+
opacity: ${({ $loaded: i }) => i ? 1 : 0};
|
|
16
|
+
transition: opacity 0.5s ease-in-out;
|
|
17
|
+
`, n = t.div`
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset: 0;
|
|
20
|
+
z-index: 2;
|
|
21
|
+
opacity: ${({ $loaded: i }) => i ? 0 : 1};
|
|
22
|
+
transition: opacity 0.35s ease-out;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
`, r = t.img`
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: 0;
|
|
27
|
+
z-index: 1;
|
|
28
|
+
display: block;
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
object-fit: cover;
|
|
32
|
+
transform: scale(1.05);
|
|
33
|
+
filter: ${({ $loaded: i }) => i ? "blur(0px)" : "blur(12px)"};
|
|
34
|
+
opacity: ${({ $lowLoaded: i, $loaded: e }) => i && !e ? 1 : 0};
|
|
35
|
+
transition:
|
|
36
|
+
opacity 0.5s ease-in-out,
|
|
37
|
+
filter 0.5s ease-in-out;
|
|
38
|
+
`;
|
|
39
|
+
export {
|
|
40
|
+
s as ImageWrapper,
|
|
41
|
+
r as LowResImage,
|
|
42
|
+
n as ShimmerOverlay,
|
|
43
|
+
a as StyledImage
|
|
44
|
+
};
|
|
@@ -80,7 +80,17 @@ const G = ({ theme: e, children: l }) => /* @__PURE__ */ o(Z, { rippleColor: e.m
|
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
|
-
return /* @__PURE__ */ o(
|
|
83
|
+
return /* @__PURE__ */ o(
|
|
84
|
+
j,
|
|
85
|
+
{
|
|
86
|
+
$height: h,
|
|
87
|
+
$width: s || a,
|
|
88
|
+
disabled: r,
|
|
89
|
+
$isLoading: t,
|
|
90
|
+
...K,
|
|
91
|
+
children: t || r ? w : /* @__PURE__ */ o(G, { theme: p, children: w })
|
|
92
|
+
}
|
|
93
|
+
);
|
|
84
94
|
};
|
|
85
95
|
export {
|
|
86
96
|
oo as default
|
|
@@ -2,7 +2,17 @@ import { jsxs as u, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import $ from "../../Typography/P/P.js";
|
|
3
3
|
import m from "../../../colors/blue.js";
|
|
4
4
|
import { Wrapper as y, HiddenInput as D, CircleBorder as w, Circle as x } from "./styles.js";
|
|
5
|
-
const C = ({
|
|
5
|
+
const C = ({
|
|
6
|
+
label: s,
|
|
7
|
+
value: r,
|
|
8
|
+
name: p,
|
|
9
|
+
color: e,
|
|
10
|
+
textColor: f,
|
|
11
|
+
isSelected: d,
|
|
12
|
+
disabled: t,
|
|
13
|
+
onChange: i,
|
|
14
|
+
...c
|
|
15
|
+
}) => {
|
|
6
16
|
const o = (e == null ? void 0 : e.m500) ?? m.m500, a = (e == null ? void 0 : e.m800) ?? m.m800;
|
|
7
17
|
return /* @__PURE__ */ u(y, { $disabled: t, $focusShade: a, ...c, children: [
|
|
8
18
|
/* @__PURE__ */ n(
|
|
@@ -3,7 +3,23 @@ import { ShimmerWrapper as u } from "./styles.js";
|
|
|
3
3
|
const e = (r) => {
|
|
4
4
|
if (r != null)
|
|
5
5
|
return typeof r == "number" ? `${r}rem` : r;
|
|
6
|
-
}, p = ({
|
|
6
|
+
}, p = ({
|
|
7
|
+
width: r = "100%",
|
|
8
|
+
height: t = "100%",
|
|
9
|
+
borderRadius: o = "0.4rem",
|
|
10
|
+
label: i = "Loading...",
|
|
11
|
+
...m
|
|
12
|
+
}) => /* @__PURE__ */ n(
|
|
13
|
+
u,
|
|
14
|
+
{
|
|
15
|
+
role: "status",
|
|
16
|
+
"aria-label": i,
|
|
17
|
+
$width: e(r),
|
|
18
|
+
$height: e(t),
|
|
19
|
+
$borderRadius: e(o),
|
|
20
|
+
...m
|
|
21
|
+
}
|
|
22
|
+
);
|
|
7
23
|
export {
|
|
8
24
|
p as default
|
|
9
25
|
};
|
|
@@ -9,7 +9,15 @@ const R = () => {
|
|
|
9
9
|
o(!0), setTimeout(() => {
|
|
10
10
|
e(!1), t();
|
|
11
11
|
}, 500);
|
|
12
|
-
}, b = ({
|
|
12
|
+
}, b = ({
|
|
13
|
+
type: o = L,
|
|
14
|
+
visible: e = !0,
|
|
15
|
+
duration: t = 5,
|
|
16
|
+
onExpire: a = R,
|
|
17
|
+
title: l,
|
|
18
|
+
subtitle: i,
|
|
19
|
+
...d
|
|
20
|
+
}) => {
|
|
13
21
|
const [p, s] = f(e), [O, c] = f(!1);
|
|
14
22
|
u(() => {
|
|
15
23
|
s(e);
|
|
@@ -4,7 +4,14 @@ import { VideoContainer as p, Video as c } from "./styles.js";
|
|
|
4
4
|
import { useSpacebarToggle as h } from "./useSpacebarToggle.js";
|
|
5
5
|
import V from "./components/Volumebar/Volumebar.js";
|
|
6
6
|
import { useVolumeOverlay as g } from "./useVolumeOverlay.js";
|
|
7
|
-
const j = ({
|
|
7
|
+
const j = ({
|
|
8
|
+
link: s,
|
|
9
|
+
thumbnail: i,
|
|
10
|
+
width: m = "600",
|
|
11
|
+
borderRadius: u = 8,
|
|
12
|
+
height: l = "auto",
|
|
13
|
+
...n
|
|
14
|
+
}) => {
|
|
8
15
|
const o = t(null), e = t(null), { volume: a, showVolume: d } = g();
|
|
9
16
|
return h(o, e, d), /* @__PURE__ */ f(p, { ref: e, $width: m, $height: l, ...n, children: [
|
|
10
17
|
/* @__PURE__ */ r(c, { $borderRadius: u, ref: o, src: s, poster: i, controls: !0, children: "Your browser does not support the video tag." }),
|
package/index.js
CHANGED
|
@@ -2,55 +2,57 @@ import { default as a } from "./components/Pagination/Pagination.js";
|
|
|
2
2
|
import { default as t } from "./components/Toast/Toast.js";
|
|
3
3
|
import { default as p } from "./components/Spinner/Spinner.js";
|
|
4
4
|
import { default as l } from "./components/Loader/Loader.js";
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as m } from "./components/PageLoader/PageLoader.js";
|
|
6
6
|
import { default as x } from "./components/OtpInput/OtpInput.js";
|
|
7
7
|
import { default as n } from "./components/Dropdown/Dropdown.js";
|
|
8
8
|
import { default as c } from "./components/Selectbox/Selectbox.js";
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
9
|
+
import { default as g } from "./components/Button/Button.js";
|
|
10
|
+
import { default as S } from "./components/Timer/Timer.js";
|
|
11
|
+
import { default as b } from "./components/Shimmer/Shimmer.js";
|
|
12
12
|
import { default as L } from "./components/VideoPlayer/VideoPlayer.js";
|
|
13
|
-
import { default as w } from "./components/
|
|
14
|
-
import { default as B } from "./components/
|
|
15
|
-
import { default as D } from "./components/Input/
|
|
16
|
-
import { default as G } from "./components/Input/
|
|
17
|
-
import { default as R } from "./components/Input/
|
|
18
|
-
import { default as V } from "./components/Input/
|
|
19
|
-
import { default as q } from "./
|
|
20
|
-
import { default as z } from "./
|
|
21
|
-
import { default as E } from "./
|
|
22
|
-
import { default as K } from "./components/
|
|
23
|
-
import { default as N } from "./components/Typography/Headings/
|
|
24
|
-
import { default as W } from "./components/Typography/Headings/
|
|
25
|
-
import { default as Y } from "./components/Typography/Headings/
|
|
26
|
-
import { default as _ } from "./components/Typography/Headings/
|
|
27
|
-
import { default as
|
|
13
|
+
import { default as w } from "./components/Image/Image.js";
|
|
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";
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
g as Button,
|
|
31
|
+
R as Checkbox,
|
|
31
32
|
n as Dropdown,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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,
|
|
40
|
+
w as Image,
|
|
41
|
+
D as Input,
|
|
40
42
|
l as Loader,
|
|
41
43
|
x as OtpInput,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
B as P,
|
|
45
|
+
m as PageLoader,
|
|
44
46
|
a as Pagination,
|
|
45
|
-
|
|
47
|
+
V as RadioGroup,
|
|
46
48
|
c as Selectbox,
|
|
47
|
-
|
|
49
|
+
b as Shimmer,
|
|
48
50
|
p as Spinner,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
G as Textarea,
|
|
52
|
+
S as Timer,
|
|
51
53
|
t as Toast,
|
|
52
54
|
L as VideoPlayer,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
z as colors,
|
|
56
|
+
K as icons,
|
|
57
|
+
E as utils
|
|
56
58
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meticulous-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
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",
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
"textarea",
|
|
44
44
|
"checkbox",
|
|
45
45
|
"radio",
|
|
46
|
+
"image",
|
|
47
|
+
"video-player",
|
|
46
48
|
"file-uploader",
|
|
47
49
|
"notification",
|
|
48
50
|
"dropdown",
|