meticulous-ui 3.9.5 → 3.10.1
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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("react/jsx-runtime"),c=require("react"),g=".ripple-container{position:relative;overflow:hidden;display:inline-block;cursor:pointer}.ripple-effect{position:absolute;border-radius:50%;transform:scale(0);animation:ripple-animation 600ms linear;pointer-events:none}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}",h=({children:a,rippleColor:p="rgba(255, 255, 255, 0.3)",className:u="",...d})=>{const i=c.useRef(null);c.useEffect(()=>{if(!document.getElementById("meticulous-ripple-styles")){const e=document.createElement("style");e.id="meticulous-ripple-styles",e.textContent=g,document.head.appendChild(e)}},[]);const l=(e,n)=>{const r=i.current;if(!r)return;const t=document.createElement("span"),s=r.getBoundingClientRect(),o=Math.max(s.width,s.height);t.style.width=t.style.height=`${o}px`,t.style.left=`${e-o/2}px`,t.style.top=`${n-o/2}px`,t.style.backgroundColor=p,t.classList.add("ripple-effect"),r.appendChild(t),t.addEventListener("animationend",()=>t.remove())},m=e=>{if(e.detail===0)return;const n=i.current.getBoundingClientRect();l(e.clientX-n.left,e.clientY-n.top)},f=e=>{if(e.key!=="Enter"&&e.key!==" ")return;const n=i.current.getBoundingClientRect();l(n.width/2,n.height/2)};return y.jsx("div",{ref:i,className:`ripple-container ${u}`,onClick:m,onKeyDown:f,...d,children:a})};exports.default=h;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),n=require("prop-types"),r=require("react"),d=require("styled-components"),t=e=>e&&e.__esModule?e:{default:e},l=t(n),c=t(d),i=c.default.div`
|
|
2
2
|
-webkit-text-size-adjust: 100%;
|
|
3
|
-
`,o=({children:e,...s})=>(r.useMemo(()=>{document.documentElement.style.fontSize="62.5%"},[]),u.jsx(i,{...s,children:e}));o.propTypes={children:l.default.node};exports.default=o;
|
|
3
|
+
`,o=({children:e,...s})=>(r.useMemo(()=>{document.documentElement.style.fontSize="62.5%",document.body.style.fontSize="1.6rem"},[]),u.jsx(i,{...s,children:e}));o.propTypes={children:l.default.node};exports.default=o;
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as y } from "react";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
const i = document.createElement("style");
|
|
6
|
-
i.id = "meticulous-ripple-styles", i.textContent = h, document.head.appendChild(i);
|
|
7
|
-
}
|
|
8
|
-
const R = ({
|
|
9
|
-
children: i,
|
|
2
|
+
import { useRef as y, useEffect as h } from "react";
|
|
3
|
+
const g = ".ripple-container{position:relative;overflow:hidden;display:inline-block;cursor:pointer}.ripple-effect{position:absolute;border-radius:50%;transform:scale(0);animation:ripple-animation 600ms linear;pointer-events:none}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}", x = ({
|
|
4
|
+
children: c,
|
|
10
5
|
rippleColor: p = "rgba(255, 255, 255, 0.3)",
|
|
11
6
|
className: a = "",
|
|
12
7
|
...d
|
|
13
8
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
if (!
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
const i = y(null);
|
|
10
|
+
h(() => {
|
|
11
|
+
if (!document.getElementById("meticulous-ripple-styles")) {
|
|
12
|
+
const e = document.createElement("style");
|
|
13
|
+
e.id = "meticulous-ripple-styles", e.textContent = g, document.head.appendChild(e);
|
|
14
|
+
}
|
|
15
|
+
}, []);
|
|
16
|
+
const l = (e, n) => {
|
|
17
|
+
const o = i.current;
|
|
18
|
+
if (!o) return;
|
|
19
|
+
const t = document.createElement("span"), s = o.getBoundingClientRect(), r = Math.max(s.width, s.height);
|
|
20
|
+
t.style.width = t.style.height = `${r}px`, t.style.left = `${e - r / 2}px`, t.style.top = `${n - r / 2}px`, t.style.backgroundColor = p, t.classList.add("ripple-effect"), o.appendChild(t), t.addEventListener("animationend", () => t.remove());
|
|
21
|
+
}, u = (e) => {
|
|
22
|
+
if (e.detail === 0) return;
|
|
23
|
+
const n = i.current.getBoundingClientRect();
|
|
24
|
+
l(e.clientX - n.left, e.clientY - n.top);
|
|
25
|
+
}, m = (e) => {
|
|
26
|
+
if (e.key !== "Enter" && e.key !== " ") return;
|
|
27
|
+
const n = i.current.getBoundingClientRect();
|
|
28
|
+
l(n.width / 2, n.height / 2);
|
|
27
29
|
};
|
|
28
30
|
return /* @__PURE__ */ f(
|
|
29
31
|
"div",
|
|
30
32
|
{
|
|
31
|
-
ref:
|
|
33
|
+
ref: i,
|
|
32
34
|
className: `ripple-container ${a}`,
|
|
33
35
|
onClick: u,
|
|
34
36
|
onKeyDown: m,
|
|
35
37
|
...d,
|
|
36
|
-
children:
|
|
38
|
+
children: c
|
|
37
39
|
}
|
|
38
40
|
);
|
|
39
41
|
};
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
x as default
|
|
42
44
|
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { useMemo as
|
|
2
|
+
import m from "prop-types";
|
|
3
|
+
import { useMemo as r } from "react";
|
|
4
4
|
import n from "styled-components";
|
|
5
|
-
const
|
|
5
|
+
const s = n.div`
|
|
6
6
|
-webkit-text-size-adjust: 100%;
|
|
7
|
-
`,
|
|
8
|
-
document.documentElement.style.fontSize = "62.5%";
|
|
9
|
-
}, []), /* @__PURE__ */ e(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
children: r.node
|
|
7
|
+
`, p = ({ children: o, ...t }) => (r(() => {
|
|
8
|
+
document.documentElement.style.fontSize = "62.5%", document.body.style.fontSize = "1.6rem";
|
|
9
|
+
}, []), /* @__PURE__ */ e(s, { ...t, children: o }));
|
|
10
|
+
p.propTypes = {
|
|
11
|
+
children: m.node
|
|
13
12
|
};
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
p as default
|
|
16
15
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meticulous-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.1",
|
|
4
4
|
"license": "ISC",
|
|
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
|
"types": "./index.d.ts",
|