@zenpatient-org/healthspan-marketing-ui 0.1.38 → 0.1.40

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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),o=require("./components/Ingredient/Ingredient.cjs.js"),n=require("./ingredientHighlight.module.css.cjs.js"),g=({ingredients:a})=>{const[s,c]=r.useState(0),l=i=>{c(e=>e===i?e:i)};return t.jsx("section",{className:n.default.root,children:t.jsxs("div",{className:n.default.container,children:[t.jsx("div",{className:n.default.imageContainer,children:t.jsx("img",{src:a[s].image,alt:"background image",className:n.default.image})}),t.jsx("div",{className:n.default.ingredients,children:a.map((i,e)=>t.jsx(o.Ingredient,{label:i.label,content:i.content,isOpen:s===e,index:e,onClick:l},e))})]})})};exports.IngredientHighlight=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("react"),d=require("./components/Ingredient/Ingredient.cjs.js"),n=require("./ingredientHighlight.module.css.cjs.js"),g=({items:s})=>{const[r,a]=l.useState(0),c=i=>{a(e=>e===i?e:i)};return t.jsx("section",{className:n.default.root,children:t.jsxs("div",{className:n.default.container,children:[t.jsx("div",{className:n.default.imageContainer,children:t.jsx("img",{src:s[r].image,alt:"background image",className:n.default.image})}),t.jsx("div",{className:n.default.ingredients,children:s.map((i,e)=>t.jsx(d.Ingredient,{title:i.title,description:i.description,isOpen:r===e,index:e,onClick:c},e))})]})})};exports.IngredientHighlight=g;
@@ -1,3 +1,3 @@
1
1
  import { TIngredientHighlight } from './types';
2
2
 
3
- export declare const IngredientHighlight: ({ ingredients }: TIngredientHighlight) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const IngredientHighlight: ({ items }: TIngredientHighlight) => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +1,21 @@
1
- import { jsx as a, jsxs as m } from "react/jsx-runtime";
2
- import { useState as r } from "react";
1
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
+ import { useState as m } from "react";
3
3
  import { Ingredient as l } from "./components/Ingredient/Ingredient.es.js";
4
4
  import s from "./ingredientHighlight.module.css.es.js";
5
- const I = ({ ingredients: i }) => {
6
- const [o, c] = r(0), n = (t) => {
7
- c((e) => e === t ? e : t);
5
+ const I = ({ items: r }) => {
6
+ const [n, o] = m(0), a = (i) => {
7
+ o((e) => e === i ? e : i);
8
8
  };
9
- return /* @__PURE__ */ a("section", { className: s.root, children: /* @__PURE__ */ m("div", { className: s.container, children: [
10
- /* @__PURE__ */ a("div", { className: s.imageContainer, children: /* @__PURE__ */ a("img", { src: i[o].image, alt: "background image", className: s.image }) }),
11
- /* @__PURE__ */ a("div", { className: s.ingredients, children: i.map((t, e) => /* @__PURE__ */ a(
9
+ return /* @__PURE__ */ t("section", { className: s.root, children: /* @__PURE__ */ c("div", { className: s.container, children: [
10
+ /* @__PURE__ */ t("div", { className: s.imageContainer, children: /* @__PURE__ */ t("img", { src: r[n].image, alt: "background image", className: s.image }) }),
11
+ /* @__PURE__ */ t("div", { className: s.ingredients, children: r.map((i, e) => /* @__PURE__ */ t(
12
12
  l,
13
13
  {
14
- label: t.label,
15
- content: t.content,
16
- isOpen: o === e,
14
+ title: i.title,
15
+ description: i.description,
16
+ isOpen: n === e,
17
17
  index: e,
18
- onClick: n
18
+ onClick: a
19
19
  },
20
20
  e
21
21
  )) })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../../components/Typography/Typography.cjs.js"),t=require("../../../../utils/cn/cn.cjs.js"),r=require("./ingredient.module.css.cjs.js"),o=({label:d,content:a,isOpen:n,index:s,onClick:c})=>e.jsxs("div",{onClick:()=>c(s??0),className:t.cn(r.default.root,{[r.default.rootOpened]:n}),children:[e.jsx("div",{className:r.default.header,children:e.jsx(i.Typography,{defaultVariant:"headingXs",children:d})}),e.jsx("div",{className:t.cn(r.default.description,{[r.default.descriptionShow]:n}),children:e.jsx("div",{className:r.default.descriptionInner,children:e.jsx(i.Typography,{as:"p",defaultVariant:"bodySm",children:a})})})]});exports.Ingredient=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../../components/Typography/Typography.cjs.js"),t=require("../../../../utils/cn/cn.cjs.js"),r=require("./ingredient.module.css.cjs.js"),o=({title:d,description:a,isOpen:n,index:s,onClick:c})=>e.jsxs("div",{onClick:()=>c(s??0),className:t.cn(r.default.root,{[r.default.rootOpened]:n}),children:[e.jsx("div",{className:r.default.header,children:e.jsx(i.Typography,{defaultVariant:"headingXs",children:d})}),e.jsx("div",{className:t.cn(r.default.description,{[r.default.descriptionShow]:n}),children:e.jsx("div",{className:r.default.descriptionInner,children:e.jsx(i.Typography,{as:"p",defaultVariant:"bodySm",children:a})})})]});exports.Ingredient=o;
@@ -1,3 +1,3 @@
1
1
  import { TIngredient } from './types';
2
2
 
3
- export declare const Ingredient: ({ label, content, isOpen, index, onClick }: TIngredient) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const Ingredient: ({ title, description, isOpen, index, onClick }: TIngredient) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import { Typography as o } from "../../../../components/Typography/Typography.es.js";
3
3
  import { cn as d } from "../../../../utils/cn/cn.es.js";
4
4
  import r from "./ingredient.module.css.es.js";
5
- const f = ({ label: n, content: a, isOpen: i, index: s, onClick: t }) => /* @__PURE__ */ c("div", { onClick: () => t(s ?? 0), className: d(r.root, { [r.rootOpened]: i }), children: [
5
+ const f = ({ title: n, description: a, isOpen: i, index: s, onClick: t }) => /* @__PURE__ */ c("div", { onClick: () => t(s ?? 0), className: d(r.root, { [r.rootOpened]: i }), children: [
6
6
  /* @__PURE__ */ e("div", { className: r.header, children: /* @__PURE__ */ e(o, { defaultVariant: "headingXs", children: n }) }),
7
7
  /* @__PURE__ */ e("div", { className: d(r.description, { [r.descriptionShow]: i }), children: /* @__PURE__ */ e("div", { className: r.descriptionInner, children: /* @__PURE__ */ e(o, { as: "p", defaultVariant: "bodySm", children: a }) }) })
8
8
  ] });
@@ -1,6 +1,6 @@
1
1
  export type TIngredient = {
2
- label: string;
3
- content: string;
2
+ title: string;
3
+ description: string;
4
4
  index: number;
5
5
  isOpen: boolean;
6
6
  onClick: (index: number) => void;
@@ -1,7 +1,7 @@
1
1
  export type TIngredientHighlight = {
2
- ingredients: Array<{
2
+ items: Array<{
3
3
  image: string;
4
- label: string;
5
- content: string;
4
+ title: string;
5
+ description: string;
6
6
  }>;
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",