@zenpatient-org/healthspan-marketing-ui 0.1.30 → 0.1.31

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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),n=require("../../utils/cn/cn.cjs.js"),e=require("./bubbles.module.css.cjs.js"),r=["xs","lg","sm","sm","xl","sm","xl","xl","xl","md","md","md","lg"],b=({className:a})=>{const[u,o]=t.useState(!1),[i,m]=t.useState(!1),c=t.useRef(null);return s.jsx("section",{ref:c,className:n.cn(e.default.root,a),children:s.jsx("div",{className:e.default.container,children:r.map((d,l)=>s.jsx("div",{className:n.cn(e.default.bubble,(i||u)&&e.default.bubbleFinished),"data-size":d,"data-index":l},l))})})};exports.Bubbles=b;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),t=require("react"),l=require("../../utils/cn/cn.cjs.js"),n=require("./bubbles.module.css.cjs.js"),b=["xs","lg","sm","sm","xl","sm","xl","xl","xl","md","md","md","lg"],m=({className:o})=>{const[r,a]=t.useState(!1),[i,d]=t.useState(!1),c=t.useRef(null);return t.useEffect(()=>{const s=new window.IntersectionObserver(([e])=>{e.isIntersecting&&e.intersectionRatio===1&&!r&&!i&&(a(!0),setTimeout(()=>d(!0),5e3))},{threshold:1});return c.current&&s.observe(c.current),()=>s.disconnect()},[r,i]),u.jsx("section",{ref:c,className:l.cn(n.default.root,o),children:u.jsx("div",{className:n.default.container,children:b.map((s,e)=>u.jsx("div",{className:l.cn(n.default.bubble,(i||r)&&n.default.bubbleFinished),"data-size":s,"data-index":e},e))})})};exports.Bubbles=m;
@@ -1,20 +1,28 @@
1
1
  "use client";
2
- import { jsx as e } from "react/jsx-runtime";
3
- import { useState as l, useRef as c } from "react";
4
- import { cn as i } from "../../utils/cn/cn.es.js";
5
- import s from "./bubbles.module.css.es.js";
6
- const d = ["xs", "lg", "sm", "sm", "xl", "sm", "xl", "xl", "xl", "md", "md", "md", "lg"], N = ({ className: m }) => {
7
- const [n, b] = l(!1), [a, f] = l(!1), o = c(null);
8
- return /* @__PURE__ */ e("section", { ref: o, className: i(s.root, m), children: /* @__PURE__ */ e("div", { className: s.container, children: d.map((r, t) => /* @__PURE__ */ e(
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { useState as c, useRef as u, useEffect as b } from "react";
4
+ import { cn as l } from "../../utils/cn/cn.es.js";
5
+ import t from "./bubbles.module.css.es.js";
6
+ const f = ["xs", "lg", "sm", "sm", "xl", "sm", "xl", "xl", "xl", "md", "md", "md", "lg"], g = ({ className: m }) => {
7
+ const [n, a] = c(!1), [r, d] = c(!1), i = u(null);
8
+ return b(() => {
9
+ const s = new window.IntersectionObserver(
10
+ ([e]) => {
11
+ e.isIntersecting && e.intersectionRatio === 1 && !n && !r && (a(!0), setTimeout(() => d(!0), 5e3));
12
+ },
13
+ { threshold: 1 }
14
+ );
15
+ return i.current && s.observe(i.current), () => s.disconnect();
16
+ }, [n, r]), /* @__PURE__ */ o("section", { ref: i, className: l(t.root, m), children: /* @__PURE__ */ o("div", { className: t.container, children: f.map((s, e) => /* @__PURE__ */ o(
9
17
  "div",
10
18
  {
11
- className: i(s.bubble, (a || n) && s.bubbleFinished),
12
- "data-size": r,
13
- "data-index": t
19
+ className: l(t.bubble, (r || n) && t.bubbleFinished),
20
+ "data-size": s,
21
+ "data-index": e
14
22
  },
15
- t
23
+ e
16
24
  )) }) });
17
25
  };
18
26
  export {
19
- N as Bubbles
27
+ g as Bubbles
20
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",