@zenpatient-org/healthspan-marketing-ui 0.1.132 → 0.1.134

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 n=require("react/jsx-runtime"),t=require("react"),C=require("react-dom"),w=require("./scienceHero.module.css.cjs.js");function L({children:r,backgroundImage:p,cursorLink:v}){const[i,x]=t.useState({x:0,y:0}),[h,m]=t.useState(0),[$,c]=t.useState(!1),[b,l]=t.useState(!1),[o,g]=t.useState(null),[s,M]=t.useState(!1);t.useEffect(()=>{l(!0);const e=()=>M(window.innerWidth<=768);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),l(!1)}},[]),t.useEffect(()=>{if(s)return;const e=f=>{x({x:f.clientX,y:f.clientY})},d=()=>{m(window.scrollY)};return window.addEventListener("mousemove",e),window.addEventListener("scroll",d),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("scroll",d)}},[s]);const S=e=>{s||(g(e.currentTarget.getBoundingClientRect()),c(!0))},y=()=>{s||c(!1)},E=()=>{window.location.href=v};if(typeof window>"u")return r;if(s)return n.jsx("div",{children:r});const u=`circle(270px at ${i.x}px ${i.y}px)`,a=$&&o&&n.jsx("div",{className:w.default.cursorContainer,style:{position:"fixed",top:`${o.top}px`,left:`${o.left}px`,width:`${o.width}px`,height:`${o.height}px`,overflow:"hidden",cursor:"pointer"},children:n.jsx("div",{className:w.default.normalBackground,style:{position:"absolute",top:`${-o.top}px`,left:`${-o.left}px`,backgroundImage:`url(${p})`,clipPath:u,WebkitClipPath:u,backgroundPosition:`center ${-h}px`}})});return n.jsxs(n.Fragment,{children:[n.jsx("div",{onMouseEnter:S,onMouseLeave:y,onClick:E,style:{cursor:"pointer"},children:r}),b&&a&&C.createPortal(a,document.body)]})}exports.ScienceHeroCursor=L;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),t=require("react"),C=require("react-dom"),p=require("./scienceHero.module.css.cjs.js");function L({children:s,backgroundImage:w,cursorLink:v}){const[i,x]=t.useState({x:0,y:0}),[h,m]=t.useState(0),[$,c]=t.useState(!1),[g,l]=t.useState(!1),[o,b]=t.useState(null),[r,M]=t.useState(!1);t.useEffect(()=>{l(!0);const e=()=>M(window.innerWidth<=768);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),l(!1)}},[]),t.useEffect(()=>{if(r)return;const e=f=>{x({x:f.clientX,y:f.clientY})},d=()=>{m(window.scrollY)};return window.addEventListener("mousemove",e),window.addEventListener("scroll",d),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("scroll",d)}},[r]);const S=e=>{r||(b(e.currentTarget.getBoundingClientRect()),c(!0))},y=()=>{r||c(!1)},E=()=>{window.location.href=v};if(typeof window>"u")return s;if(r)return n.jsx(n.Fragment,{children:s});const u=`circle(270px at ${i.x}px ${i.y}px)`,a=$&&o&&n.jsx("div",{className:p.default.cursorContainer,style:{position:"fixed",top:`${o.top}px`,left:`${o.left}px`,width:`${o.width}px`,height:`${o.height}px`,overflow:"hidden",cursor:"pointer"},children:n.jsx("div",{className:p.default.normalBackground,style:{position:"absolute",top:`${-o.top}px`,left:`${-o.left}px`,backgroundImage:`url(${w})`,clipPath:u,WebkitClipPath:u,backgroundPosition:`center ${-h}px`}})});return n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-type":"hero",onMouseEnter:S,onMouseLeave:y,onClick:E,style:{cursor:"pointer"},children:s}),g&&a&&C.createPortal(a,document.body)]})}exports.ScienceHeroCursor=L;
@@ -1,44 +1,44 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as k, Fragment as P } from "react/jsx-runtime";
3
- import { useState as o, useEffect as p } from "react";
2
+ import { jsx as r, Fragment as p, jsxs as P } from "react/jsx-runtime";
3
+ import { useState as o, useEffect as w } from "react";
4
4
  import { createPortal as R } from "react-dom";
5
- import w from "./scienceHero.module.css.es.js";
6
- function z({ children: s, backgroundImage: m, cursorLink: v }) {
7
- const [i, h] = o({ x: 0, y: 0 }), [x, M] = o(0), [b, l] = o(!1), [g, c] = o(!1), [t, $] = o(null), [n, y] = o(!1);
8
- p(() => {
5
+ import m from "./scienceHero.module.css.es.js";
6
+ function z({ children: s, backgroundImage: h, cursorLink: v }) {
7
+ const [i, x] = o({ x: 0, y: 0 }), [M, b] = o(0), [g, l] = o(!1), [y, c] = o(!1), [t, $] = o(null), [n, E] = o(!1);
8
+ w(() => {
9
9
  c(!0);
10
- const e = () => y(window.innerWidth <= 768);
10
+ const e = () => E(window.innerWidth <= 768);
11
11
  return e(), window.addEventListener("resize", e), () => {
12
12
  window.removeEventListener("resize", e), c(!1);
13
13
  };
14
- }, []), p(() => {
14
+ }, []), w(() => {
15
15
  if (n) return;
16
16
  const e = (f) => {
17
- h({
17
+ x({
18
18
  x: f.clientX,
19
19
  y: f.clientY
20
20
  });
21
21
  }, a = () => {
22
- M(window.scrollY);
22
+ b(window.scrollY);
23
23
  };
24
24
  return window.addEventListener("mousemove", e), window.addEventListener("scroll", a), () => {
25
25
  window.removeEventListener("mousemove", e), window.removeEventListener("scroll", a);
26
26
  };
27
27
  }, [n]);
28
- const E = (e) => {
28
+ const C = (e) => {
29
29
  n || ($(e.currentTarget.getBoundingClientRect()), l(!0));
30
- }, C = () => {
31
- n || l(!1);
32
30
  }, L = () => {
31
+ n || l(!1);
32
+ }, k = () => {
33
33
  window.location.href = v;
34
34
  };
35
35
  if (typeof window > "u") return s;
36
36
  if (n)
37
- return /* @__PURE__ */ r("div", { children: s });
38
- const d = `circle(270px at ${i.x}px ${i.y}px)`, u = b && t && /* @__PURE__ */ r(
37
+ return /* @__PURE__ */ r(p, { children: s });
38
+ const d = `circle(270px at ${i.x}px ${i.y}px)`, u = g && t && /* @__PURE__ */ r(
39
39
  "div",
40
40
  {
41
- className: w.cursorContainer,
41
+ className: m.cursorContainer,
42
42
  style: {
43
43
  position: "fixed",
44
44
  top: `${t.top}px`,
@@ -51,32 +51,33 @@ function z({ children: s, backgroundImage: m, cursorLink: v }) {
51
51
  children: /* @__PURE__ */ r(
52
52
  "div",
53
53
  {
54
- className: w.normalBackground,
54
+ className: m.normalBackground,
55
55
  style: {
56
56
  position: "absolute",
57
57
  top: `${-t.top}px`,
58
58
  left: `${-t.left}px`,
59
- backgroundImage: `url(${m})`,
59
+ backgroundImage: `url(${h})`,
60
60
  clipPath: d,
61
61
  WebkitClipPath: d,
62
- backgroundPosition: `center ${-x}px`
62
+ backgroundPosition: `center ${-M}px`
63
63
  }
64
64
  }
65
65
  )
66
66
  }
67
67
  );
68
- return /* @__PURE__ */ k(P, { children: [
68
+ return /* @__PURE__ */ P(p, { children: [
69
69
  /* @__PURE__ */ r(
70
70
  "div",
71
71
  {
72
- onMouseEnter: E,
73
- onMouseLeave: C,
74
- onClick: L,
72
+ "data-type": "hero",
73
+ onMouseEnter: C,
74
+ onMouseLeave: L,
75
+ onClick: k,
75
76
  style: { cursor: "pointer" },
76
77
  children: s
77
78
  }
78
79
  ),
79
- g && u && R(u, document.body)
80
+ y && u && R(u, document.body)
80
81
  ] });
81
82
  }
82
83
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.1.132",
3
+ "version": "0.1.134",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",