@scbt-ecom/ui 0.152.1 → 0.152.2
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/lib/widgets/benefit/ui/BenefitItem.js +1 -1
- package/dist/lib/widgets/benefit/ui/BenefitItem.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types/lib/widgets/benefit/model/types.d.ts +0 -1
- package/dist/types/lib/widgets/benefit/ui/BenefitItem.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as p}from"react/jsx-runtime";import{cva as
|
|
1
|
+
import{jsxs as e,jsx as p}from"react/jsx-runtime";import{cva as k}from"class-variance-authority";import{useDevice as y}from"../../../shared/hooks/useDevice.js";import"react";import{cn as t}from"../../../shared/utils/cn.js";import{TypeGuards as l}from"../../../shared/utils/typeGuards.js";import"uuid";import"react-hook-form";import"@hookform/resolvers/zod";import{ButtonWithHandlers as h}from"../../buttonWithHandlers/ButtonWithHandlers.js";const v=k("flex flex-col justify-between overflow-hidden rounded-md bg-color-blue-grey-100 py-6 desktop:flex-row desktop:px-0 desktop:py-0",{variants:{variant:{twoCards:"",threeCards:"desktop:first:col-span-full",fourCards:"desktop:first:col-span-2 desktop:last:col-span-2"}}}),B=({subtitle:f,title:n,img:o,classes:r,button:i,variant:x,color:u,enabledMobileImage:d})=>{const{isDesktop:m}=y();return e("li",{style:{backgroundColor:u??"#F3F4F7"},className:t(v({variant:x}),{"pb-0":d},{"pb-12":!d},r==null?void 0:r.root),children:[e("div",{className:t("flex flex-col items-start justify-between px-4 desktop:px-8 desktop:py-8",r==null?void 0:r.wrapper),children:[e("div",{className:t("flex flex-col gap-4",r==null?void 0:r.textContainer),children:[p("div",{dangerouslySetInnerHTML:{__html:n},className:t("desktop:desk-title-bold-s",r==null?void 0:r.title)}),p("div",{dangerouslySetInnerHTML:{__html:f},className:t("mob-body-regular-l text-icon-blue-grey-800 desktop:desk-body-regular-l",r==null?void 0:r.subtitle)})]}),m&&(i==null?void 0:i.handlerOptions)&&p(h,{intent:"primary",className:t("desktop:w-[200px]",r==null?void 0:r.button),size:"lg",...i})]}),(d||m)&&o&&p("div",{className:t("flex w-full justify-end",r==null?void 0:r.imgContainer),children:o&&"url"in o&&l.isObject(o)?p("img",{className:t("h-[246px] object-cover",r==null?void 0:r.img),src:o.url,alt:o.alt}):o})]},n)};export{B as BenefitItem};
|
|
2
2
|
//# sourceMappingURL=BenefitItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BenefitItem.js","sources":["../../../../../lib/widgets/benefit/ui/BenefitItem.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport { type Details } from '../model/types'\nimport { useDevice } from '$/shared/hooks'\nimport { cn, TypeGuards } from '$/shared/utils'\nimport { ButtonWithHandlers } from '$/widgets/buttonWithHandlers'\n\nexport type BenefitItemClasses = {\n root?: string\n button?: string\n wrapper?: string\n textContainer?: string\n subtitle?: string\n img?: string\n imgContainer?: string\n title?: string\n}\n\nconst itemConfig = cva(\n 'flex flex-col justify-between overflow-hidden rounded-md bg-color-blue-grey-100 py-6 desktop:flex-row desktop:px-0 desktop:py-0',\n {\n variants: {\n variant: {\n twoCards: '',\n threeCards: 'desktop:first:col-span-full',\n fourCards: 'desktop:first:col-span-2 desktop:last:col-span-2'\n }\n }\n }\n)\n\nexport interface BenefitItemProps extends Details {\n classes?: BenefitItemClasses\n variant?: 'twoCards' | 'threeCards' | 'fourCards'\n}\n\nexport const BenefitItem = ({
|
|
1
|
+
{"version":3,"file":"BenefitItem.js","sources":["../../../../../lib/widgets/benefit/ui/BenefitItem.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport { type Details } from '../model/types'\nimport { useDevice } from '$/shared/hooks'\nimport { cn, TypeGuards } from '$/shared/utils'\nimport { ButtonWithHandlers } from '$/widgets/buttonWithHandlers'\n\nexport type BenefitItemClasses = {\n root?: string\n button?: string\n wrapper?: string\n textContainer?: string\n subtitle?: string\n img?: string\n imgContainer?: string\n title?: string\n}\n\nconst itemConfig = cva(\n 'flex flex-col justify-between overflow-hidden rounded-md bg-color-blue-grey-100 py-6 desktop:flex-row desktop:px-0 desktop:py-0',\n {\n variants: {\n variant: {\n twoCards: '',\n threeCards: 'desktop:first:col-span-full',\n fourCards: 'desktop:first:col-span-2 desktop:last:col-span-2'\n }\n }\n }\n)\n\nexport interface BenefitItemProps extends Details {\n classes?: BenefitItemClasses\n variant?: 'twoCards' | 'threeCards' | 'fourCards'\n}\n\nexport const BenefitItem = ({ subtitle, title, img, classes, button, variant, color, enabledMobileImage }: BenefitItemProps) => {\n const { isDesktop } = useDevice()\n\n return (\n <li\n key={title}\n style={{ backgroundColor: color ?? '#F3F4F7' }}\n className={cn(itemConfig({ variant }), { 'pb-0': enabledMobileImage }, { 'pb-12': !enabledMobileImage }, classes?.root)}\n >\n <div className={cn('flex flex-col items-start justify-between px-4 desktop:px-8 desktop:py-8', classes?.wrapper)}>\n <div className={cn('flex flex-col gap-4', classes?.textContainer)}>\n <div dangerouslySetInnerHTML={{ __html: title }} className={cn('desktop:desk-title-bold-s', classes?.title)} />\n <div\n dangerouslySetInnerHTML={{ __html: subtitle }}\n className={cn('mob-body-regular-l text-icon-blue-grey-800 desktop:desk-body-regular-l', classes?.subtitle)}\n />\n </div>\n\n {isDesktop && button?.handlerOptions && (\n <ButtonWithHandlers intent='primary' className={cn('desktop:w-[200px]', classes?.button)} size='lg' {...button} />\n )}\n </div>\n\n {(enabledMobileImage || isDesktop) && img && (\n <div className={cn('flex w-full justify-end', classes?.imgContainer)}>\n {img && 'url' in img && TypeGuards.isObject(img) ? (\n <img className={cn('h-[246px] object-cover', classes?.img)} src={img.url} alt={img.alt} />\n ) : (\n img\n )}\n </div>\n )}\n </li>\n )\n}\n"],"names":["itemConfig","cva","BenefitItem","subtitle","title","img","classes","button","variant","color","enabledMobileImage","isDesktop","useDevice","jsxs","cn","jsx","ButtonWith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