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

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:r,backgroundImage:w,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: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:r}),b&&a&&C.createPortal(a,document.body)]})}exports.ScienceHeroCursor=L;
@@ -4,10 +4,10 @@ import { useState as o, useEffect as p } from "react";
4
4
  import { createPortal as R } from "react-dom";
5
5
  import w from "./scienceHero.module.css.es.js";
6
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);
7
+ const [i, h] = o({ x: 0, y: 0 }), [x, M] = o(0), [b, l] = o(!1), [g, c] = o(!1), [t, y] = o(null), [n, $] = o(!1);
8
8
  p(() => {
9
9
  c(!0);
10
- const e = () => y(window.innerWidth <= 768);
10
+ const e = () => $(window.innerWidth <= 768);
11
11
  return e(), window.addEventListener("resize", e), () => {
12
12
  window.removeEventListener("resize", e), c(!1);
13
13
  };
@@ -26,7 +26,7 @@ function z({ children: s, backgroundImage: m, cursorLink: v }) {
26
26
  };
27
27
  }, [n]);
28
28
  const E = (e) => {
29
- n || ($(e.currentTarget.getBoundingClientRect()), l(!0));
29
+ n || (y(e.currentTarget.getBoundingClientRect()), l(!0));
30
30
  }, C = () => {
31
31
  n || l(!1);
32
32
  }, L = () => {
@@ -69,6 +69,7 @@ function z({ children: s, backgroundImage: m, cursorLink: v }) {
69
69
  /* @__PURE__ */ r(
70
70
  "div",
71
71
  {
72
+ "data-type": "hero",
72
73
  onMouseEnter: E,
73
74
  onMouseLeave: C,
74
75
  onClick: L,
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.133",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",