meticulous-ui 2.2.8 → 2.2.9
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/components/Dropdown/Dropdown.js +83 -82
- package/components/Dropdown/styles.js +4 -4
- package/components/Glass/Glass.js +6 -0
- package/components/Glass/index.js +4 -0
- package/components/Glass/styles.js +73 -0
- package/components/Icons/Add/index.js +4 -0
- package/components/Icons/MediaPauseFilled/index.js +4 -0
- package/components/Icons/MediaPlayFilled/index.js +4 -0
- package/components/Icons/MediaStopFilled/index.js +4 -0
- package/components/Input/Checkbox/Checkbox.js +39 -0
- package/components/Input/Checkbox/helpers.js +28 -0
- package/components/Input/Checkbox/index.js +4 -0
- package/components/Input/Checkbox/styles.js +30 -0
- package/components/Input/Radio/Radio.js +26 -0
- package/components/Input/Radio/styles.js +45 -0
- package/components/Input/RadioGroup/RadioGroup.js +27 -0
- package/components/Input/RadioGroup/index.js +4 -0
- package/components/Input/RadioGroup/styles.js +18 -0
- package/components/Input/Textarea/styles.js +4 -4
- package/components/MenuItem/styles.js +4 -4
- package/components/OtpInput/OtpInput.js +30 -29
- package/components/Pagination/styles.js +6 -6
- package/components/Spinner/Spinner.js +11 -10
- package/components/Timer/Timer.js +64 -0
- package/components/Timer/components/TimerRing/TimerRing.js +42 -0
- package/components/Timer/components/TimerRing/styles.js +7 -0
- package/components/Timer/constants.js +25 -0
- package/components/Timer/index.js +4 -0
- package/components/Timer/styles.js +164 -0
- package/components/Typography/Headings/H1.js +9 -0
- package/components/Typography/Headings/H2.js +9 -0
- package/components/Typography/Headings/H3.js +9 -0
- package/components/Typography/Headings/H4.js +9 -0
- package/components/Typography/Headings/H5.js +9 -0
- package/components/Typography/Headings/H6.js +9 -0
- package/components/VideoPlayer/VideoPlayer.js +34 -0
- package/components/VideoPlayer/components/Volumebar/Volumebar.js +13 -0
- package/components/VideoPlayer/components/Volumebar/styles.js +38 -0
- package/components/VideoPlayer/index.js +4 -0
- package/components/VideoPlayer/styles.js +34 -0
- package/components/VideoPlayer/useSpacebarToggle.js +37 -0
- package/components/VideoPlayer/useVolumeOverlay.js +10 -0
- package/index.js +38 -16
- package/package.json +9 -6
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useEffect as f } from "react";
|
|
2
|
+
const l = (c, a, r) => {
|
|
3
|
+
f(() => {
|
|
4
|
+
const u = (t) => {
|
|
5
|
+
var d;
|
|
6
|
+
if (![
|
|
7
|
+
"Space",
|
|
8
|
+
"KeyF",
|
|
9
|
+
"Escape",
|
|
10
|
+
"ArrowUp",
|
|
11
|
+
"ArrowDown",
|
|
12
|
+
"ArrowLeft",
|
|
13
|
+
"ArrowRight",
|
|
14
|
+
"KeyM"
|
|
15
|
+
].includes(t.code))
|
|
16
|
+
return;
|
|
17
|
+
const n = t.target;
|
|
18
|
+
if (n && (n.tagName === "INPUT" || n.tagName === "TEXTAREA" || n.isContentEditable))
|
|
19
|
+
return;
|
|
20
|
+
t.preventDefault();
|
|
21
|
+
const e = c.current;
|
|
22
|
+
if (e)
|
|
23
|
+
if (t.code === "Space")
|
|
24
|
+
if (e.paused) {
|
|
25
|
+
const i = e.play();
|
|
26
|
+
i && i.catch && i.catch(() => {
|
|
27
|
+
});
|
|
28
|
+
} else
|
|
29
|
+
e.pause();
|
|
30
|
+
else t.code === "KeyF" ? document.fullscreenElement ? document.exitFullscreen() : (d = a.current) == null || d.requestFullscreen() : t.code === "ArrowUp" ? (e.volume = Math.min(1, e.volume + 0.05), r == null || r(e.volume)) : t.code === "ArrowDown" ? (e.volume = Math.max(0, e.volume - 0.05), r == null || r(e.volume)) : t.code === "KeyM" ? (e.volume = e.volume > 0 ? 0 : 1, r == null || r(e.volume)) : t.code === "ArrowLeft" ? e.currentTime > 5 ? e.currentTime -= 5 : e.currentTime > 0 && (e.currentTime = 0) : t.code === "ArrowRight" && (e.currentTime < e.duration - 5 ? e.currentTime += 5 : e.currentTime < e.duration && (e.currentTime = e.duration));
|
|
31
|
+
};
|
|
32
|
+
return window.addEventListener("keydown", u, !0), () => window.removeEventListener("keydown", u, !0);
|
|
33
|
+
}, [c, a, r]);
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
l as useSpacebarToggle
|
|
37
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useState as r, useRef as n, useCallback as s } from "react";
|
|
2
|
+
const c = () => {
|
|
3
|
+
const [u, e] = r(null), t = n(null), o = s((l) => {
|
|
4
|
+
e(Math.round(l * 100)), clearTimeout(t.current), t.current = setTimeout(() => e(null), 1500);
|
|
5
|
+
}, []);
|
|
6
|
+
return { volume: u, showVolume: o };
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
c as useVolumeOverlay
|
|
10
|
+
};
|
package/index.js
CHANGED
|
@@ -1,24 +1,46 @@
|
|
|
1
1
|
import { default as a } from "./components/Pagination/Pagination.js";
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as r } from "./components/Toast/Toast.js";
|
|
3
3
|
import { default as p } from "./components/Spinner/Spinner.js";
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
4
|
+
import { default as s } from "./components/OtpInput/OtpInput.js";
|
|
5
|
+
import { default as l } from "./components/Dropdown/Dropdown.js";
|
|
6
6
|
import { default as m } from "./components/Button/Button.js";
|
|
7
|
-
import { default as i } from "./components/
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
7
|
+
import { default as i } from "./components/Timer/Timer.js";
|
|
8
|
+
import { default as c } from "./components/VideoPlayer/VideoPlayer.js";
|
|
9
|
+
import { default as T } from "./components/Typography/P/P.js";
|
|
10
|
+
import { default as b } from "./components/Input/Input/Input.js";
|
|
11
|
+
import { default as h } from "./components/Input/Textarea/Textarea.js";
|
|
12
|
+
import { default as w } from "./components/Input/Checkbox/Checkbox.js";
|
|
13
|
+
import { default as B } from "./components/Input/RadioGroup/RadioGroup.js";
|
|
14
|
+
import { default as D } from "./colors/index.js";
|
|
15
|
+
import { default as O } from "./utils/index.js";
|
|
16
|
+
import { default as S } from "./components/Icons/index.js";
|
|
17
|
+
import { default as j } from "./components/Typography/Headings/H1.js";
|
|
18
|
+
import { default as v } from "./components/Typography/Headings/H2.js";
|
|
19
|
+
import { default as A } from "./components/Typography/Headings/H3.js";
|
|
20
|
+
import { default as F } from "./components/Typography/Headings/H4.js";
|
|
21
|
+
import { default as K } from "./components/Typography/Headings/H5.js";
|
|
22
|
+
import { default as M } from "./components/Typography/Headings/H6.js";
|
|
12
23
|
export {
|
|
13
24
|
m as Button,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
w as Checkbox,
|
|
26
|
+
l as Dropdown,
|
|
27
|
+
j as H1,
|
|
28
|
+
v as H2,
|
|
29
|
+
A as H3,
|
|
30
|
+
F as H4,
|
|
31
|
+
K as H5,
|
|
32
|
+
M as H6,
|
|
33
|
+
b as Input,
|
|
34
|
+
s as OtpInput,
|
|
35
|
+
T as P,
|
|
17
36
|
a as Pagination,
|
|
37
|
+
B as RadioGroup,
|
|
18
38
|
p as Spinner,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
39
|
+
h as Textarea,
|
|
40
|
+
i as Timer,
|
|
41
|
+
r as Toast,
|
|
42
|
+
c as VideoPlayer,
|
|
43
|
+
D as colors,
|
|
44
|
+
S as icons,
|
|
45
|
+
O as utils
|
|
24
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meticulous-ui",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -58,15 +58,18 @@
|
|
|
58
58
|
"publish:dist": "npm publish dist/"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@storybook/addon-docs": "^
|
|
61
|
+
"@storybook/addon-docs": "^9.1.13",
|
|
62
62
|
"@storybook/mdx2-csf": "^1.1.0",
|
|
63
|
-
"@storybook/react-vite": "^
|
|
63
|
+
"@storybook/react-vite": "^9.1.10",
|
|
64
64
|
"@vitejs/plugin-react": "^5.0.4",
|
|
65
|
-
"eslint-plugin-storybook": "^
|
|
65
|
+
"eslint-plugin-storybook": "^9.1.10",
|
|
66
66
|
"gh-pages": "^6.3.0",
|
|
67
67
|
"prop-types": "^15.8.1",
|
|
68
|
-
"storybook": "^
|
|
68
|
+
"storybook": "^9.1.10",
|
|
69
69
|
"svgo": "^4.0.0",
|
|
70
|
-
"vite
|
|
70
|
+
"vite": "^6.0.0",
|
|
71
|
+
"vite-plugin-svgr": "^4.5.0",
|
|
72
|
+
"styled-components": "^6.0.0",
|
|
73
|
+
"lodash-es": "^4.17.21"
|
|
71
74
|
}
|
|
72
75
|
}
|