@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.
- package/dist/modules/IngredientHighlight/IngredientHighlight.cjs.js +1 -1
- package/dist/modules/IngredientHighlight/IngredientHighlight.d.ts +1 -1
- package/dist/modules/IngredientHighlight/IngredientHighlight.es.js +12 -12
- package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.cjs.js +1 -1
- package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.d.ts +1 -1
- package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.es.js +1 -1
- package/dist/modules/IngredientHighlight/components/Ingredient/types.d.ts +2 -2
- package/dist/modules/IngredientHighlight/types.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
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: ({
|
|
3
|
+
export declare const IngredientHighlight: ({ items }: TIngredientHighlight) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
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 = ({
|
|
6
|
-
const [
|
|
7
|
-
|
|
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__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
isOpen:
|
|
14
|
+
title: i.title,
|
|
15
|
+
description: i.description,
|
|
16
|
+
isOpen: n === e,
|
|
17
17
|
index: e,
|
|
18
|
-
onClick:
|
|
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=({
|
|
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: ({
|
|
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 = ({
|
|
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
|
] });
|