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 f=require("react/jsx-runtime"),y=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}}";if(typeof document!="undefined"&&!document.getElementById("meticulous-ripple-styles")){const i=document.createElement("style");i.id="meticulous-ripple-styles",i.textContent=g,document.head.appendChild(i)}const h=({children:i,rippleColor:a="rgba(255, 255, 255, 0.3)",className:p="",...d})=>{const r=y.useRef(null),s=(t,n)=>{const o=r.current;if(!o)return;const e=document.createElement("span"),c=o.getBoundingClientRect(),l=Math.max(c.width,c.height);e.style.width=e.style.height=`${l}px`,e.style.left=`${t-l/2}px`,e.style.top=`${n-l/2}px`,e.style.backgroundColor=a,e.classList.add("ripple-effect"),o.appendChild(e),e.addEventListener("animationend",()=>e.remove())},u=t=>{if(t.detail===0)return;const n=r.current.getBoundingClientRect();s(t.clientX-n.left,t.clientY-n.top)},m=t=>{if(t.key!=="Enter"&&t.key!==" ")return;const n=r.current.getBoundingClientRect();s(n.width/2,n.height/2)};return f.jsx("div",{ref:r,className:`ripple-container ${p}`,onClick:u,onKeyDown:m,...d,children:i})};exports.default=h;
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 h = ".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}}";
4
- if (typeof document != "undefined" && !document.getElementById("meticulous-ripple-styles")) {
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 o = y(null), s = (t, n) => {
15
- const r = o.current;
16
- if (!r) return;
17
- const e = document.createElement("span"), c = r.getBoundingClientRect(), l = Math.max(c.width, c.height);
18
- e.style.width = e.style.height = `${l}px`, e.style.left = `${t - l / 2}px`, e.style.top = `${n - l / 2}px`, e.style.backgroundColor = p, e.classList.add("ripple-effect"), r.appendChild(e), e.addEventListener("animationend", () => e.remove());
19
- }, u = (t) => {
20
- if (t.detail === 0) return;
21
- const n = o.current.getBoundingClientRect();
22
- s(t.clientX - n.left, t.clientY - n.top);
23
- }, m = (t) => {
24
- if (t.key !== "Enter" && t.key !== " ") return;
25
- const n = o.current.getBoundingClientRect();
26
- s(n.width / 2, n.height / 2);
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: o,
33
+ ref: i,
32
34
  className: `ripple-container ${a}`,
33
35
  onClick: u,
34
36
  onKeyDown: m,
35
37
  ...d,
36
- children: i
38
+ children: c
37
39
  }
38
40
  );
39
41
  };
40
42
  export {
41
- R as default
43
+ x as default
42
44
  };
@@ -1,16 +1,15 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import r from "prop-types";
3
- import { useMemo as m } from "react";
2
+ import m from "prop-types";
3
+ import { useMemo as r } from "react";
4
4
  import n from "styled-components";
5
- const p = n.div`
5
+ const s = n.div`
6
6
  -webkit-text-size-adjust: 100%;
7
- `, s = ({ children: o, ...t }) => (m(() => {
8
- document.documentElement.style.fontSize = "62.5%";
9
- }, []), /* @__PURE__ */ e(p, { ...t, children: o }));
10
- s.propTypes = {
11
- /** Content to render inside the root wrapper */
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
- s as default
14
+ p as default
16
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meticulous-ui",
3
- "version": "3.9.5",
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",