@anker-in/headless-ui 0.0.27-alpha.19 → 0.0.27-alpha.20
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/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/types.d.ts +22 -21
- package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +9 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +2 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +7 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/index.d.ts +1 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/index.js +2 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/index.js.map +7 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.d.ts +21 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js +2 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js.map +7 -0
- package/dist/cjs/biz-components/SectionHeading/SectionHeading.d.ts +4 -0
- package/dist/cjs/biz-components/SectionHeading/SectionHeading.js +2 -0
- package/dist/cjs/biz-components/SectionHeading/SectionHeading.js.map +7 -0
- package/dist/cjs/biz-components/SectionHeading/index.d.ts +0 -0
- package/dist/cjs/biz-components/SectionHeading/index.js +2 -0
- package/dist/cjs/biz-components/SectionHeading/index.js.map +7 -0
- package/dist/cjs/biz-components/SectionHeading/types.d.ts +6 -0
- package/dist/cjs/biz-components/SectionHeading/types.js +2 -0
- package/dist/cjs/biz-components/SectionHeading/types.js.map +7 -0
- package/dist/cjs/biz-components/index.d.ts +2 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +2 -2
- package/dist/cjs/shared/Styles.d.ts +0 -2
- package/dist/cjs/shared/Styles.js +1 -1
- package/dist/cjs/shared/Styles.js.map +3 -3
- package/dist/cjs/stories/HeroBanner.stories.js +2 -2
- package/dist/cjs/stories/HeroBanner.stories.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/types.d.ts +22 -21
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +9 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +2 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +7 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/index.d.ts +1 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/index.js +2 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/index.js.map +7 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.d.ts +21 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.js +1 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.js.map +7 -0
- package/dist/esm/biz-components/SectionHeading/SectionHeading.d.ts +4 -0
- package/dist/esm/biz-components/SectionHeading/SectionHeading.js +2 -0
- package/dist/esm/biz-components/SectionHeading/SectionHeading.js.map +7 -0
- package/dist/esm/biz-components/SectionHeading/index.d.ts +0 -0
- package/dist/esm/biz-components/SectionHeading/index.js +2 -0
- package/dist/esm/biz-components/SectionHeading/index.js.map +7 -0
- package/dist/esm/biz-components/SectionHeading/types.d.ts +6 -0
- package/dist/esm/biz-components/SectionHeading/types.js +2 -0
- package/dist/esm/biz-components/SectionHeading/types.js.map +7 -0
- package/dist/esm/biz-components/index.d.ts +2 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.js.map +2 -2
- package/dist/esm/shared/Styles.d.ts +0 -2
- package/dist/esm/shared/Styles.js +1 -1
- package/dist/esm/shared/Styles.js.map +3 -3
- package/dist/esm/stories/HeroBanner.stories.js +2 -2
- package/dist/esm/stories/HeroBanner.stories.js.map +3 -3
- package/package.json +1 -1
- package/style.css +4 -1
- package/tailwind.config.ts +2 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var k=Object.create;var m=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var z=(e,a)=>{for(var r in a)m(e,r,{get:a[r],enumerable:!0})},h=(e,a,r,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of B(a))!H.call(e,s)&&s!==r&&m(e,s,{get:()=>a[s],enumerable:!(n=w(a,s))||n.enumerable});return e};var C=(e,a,r)=>(r=e!=null?k(D(e)):{},h(a||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),F=e=>h(m({},"__esModule",{value:!0}),e);var R={};z(R,{default:()=>P});module.exports=F(R);var t=require("react/jsx-runtime"),u=C(require("react")),o=require("../../components/index.js"),l=require("../../helpers/index.js"),v=require("../../shared/Styles.js");const x=u.default.forwardRef(({data:e,className:a},r)=>{const{title:n,subtitle:s,background:b,primaryButton:p,secondaryButton:c,theme:i="light",products:d=[]}=e,g=i==="dark"?"text-white":"text-[#1D1D1F]",N=i==="dark"?"bg-white":"bg-[#1D1D1F]";return(0,t.jsxs)("div",{"data-ui-component-id":"HeroBanner",ref:r,className:(0,l.cn)(i==="dark"?"aiui-dark":"","lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] relative aspect-[390/660] w-full overflow-hidden",a),children:[(0,t.jsx)(o.Picture,{className:"laptop:w-full absolute h-full",imgClassName:"h-full object-cover",source:b}),(0,t.jsxs)("div",{className:"laptop:top-1/2 laptop:-translate-y-1/2 relative top-[30%] z-10 flex flex-col gap-8 px-32",children:[(0,t.jsxs)("div",{className:"max-w-[686px] space-y-4",children:[(0,t.jsx)(o.Heading,{as:"h1",size:5,className:(0,l.cn)("hero-banner-title",g),html:n}),(0,t.jsx)(o.Text,{className:(0,l.cn)("hero-banner-subtitle text-lg font-medium leading-[1.2] tracking-[-0.02em]",g),html:s})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[c&&(0,t.jsx)(o.Button,{size:"lg",variant:"primary",className:"hero-banner-primary-button",...c,children:c.text}),p&&(0,t.jsx)(o.Button,{size:"lg",variant:"secondary",...p,className:"hero-banner-secondary-button",children:p.text})]})]}),d.length>0&&(0,t.jsx)("div",{className:"absolute bottom-0 z-10 flex items-center gap-3 px-32 pb-6",children:d.map((y,f)=>(0,t.jsxs)(u.default.Fragment,{children:[(0,t.jsx)(o.Text,{className:(0,l.cn)("hero-banner-product-text text-sm font-medium leading-[1.2] tracking-[-0.02em]",i==="dark"?"text-white":"text-[#1D1D1F]"),children:y.title}),f<d.length-1&&(0,t.jsx)("div",{className:(0,l.cn)("h-4 w-px",N)})]},f))})]})});x.displayName="HeroBanner";var P=(0,v.withStyles)(x);
|
|
2
2
|
//# sourceMappingURL=HeroBanner.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/HeroBanner/HeroBanner.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React from 'react'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\n\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(\n
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["HeroBanner_exports", "__export", "HeroBanner_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_helpers", "import_Styles", "HeroBanner", "React", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\n\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(({ data, className }, ref) => {\n const { title, subtitle, background, primaryButton, secondaryButton, theme = 'light', products = [] } = data\n const textColorClass = theme === 'dark' ? 'text-white' : 'text-[#1D1D1F]'\n const dividerColorClass = theme === 'dark' ? 'bg-white' : 'bg-[#1D1D1F]'\n\n return (\n <div\n data-ui-component-id=\"HeroBanner\"\n ref={ref}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] relative aspect-[390/660] w-full overflow-hidden',\n className\n )}\n >\n <Picture className=\"laptop:w-full absolute h-full\" imgClassName=\"h-full object-cover\" source={background} />\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 relative top-[30%] z-10 flex flex-col gap-8 px-32\">\n <div className=\"max-w-[686px] space-y-4\">\n <Heading as=\"h1\" size={5} className={cn('hero-banner-title', textColorClass)} html={title} />\n <Text\n className={cn('hero-banner-subtitle text-lg font-medium leading-[1.2] tracking-[-0.02em]', textColorClass)}\n html={subtitle}\n />\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"flex items-center gap-4\">\n {secondaryButton && (\n <Button size=\"lg\" variant=\"primary\" className=\"hero-banner-primary-button\" {...secondaryButton}>\n {secondaryButton.text}\n </Button>\n )}\n {primaryButton && (\n <Button size=\"lg\" variant=\"secondary\" {...primaryButton} className=\"hero-banner-secondary-button\">\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n\n {/* \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */}\n {products.length > 0 && (\n <div className=\"absolute bottom-0 z-10 flex items-center gap-3 px-32 pb-6\">\n {products.map((product, index) => (\n <React.Fragment key={index}>\n <Text\n className={cn(\n 'hero-banner-product-text text-sm font-medium leading-[1.2] tracking-[-0.02em]',\n theme === 'dark' ? 'text-white' : 'text-[#1D1D1F]'\n )}\n >\n {product.title}\n </Text>\n {index < products.length - 1 && <div className={cn('h-4 w-px', dividerColorClass)} />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withStyles(HeroBanner)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsBM,IAAAI,EAAA,6BArBNC,EAAkB,oBAElBC,EAA+C,qCAC/CC,EAAmB,kCACnBC,EAA2B,kCAE3B,MAAMC,EAAa,EAAAC,QAAM,WAA4C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACjG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,WAAAC,EAAY,cAAAC,EAAe,gBAAAC,EAAiB,MAAAC,EAAQ,QAAS,SAAAC,EAAW,CAAC,CAAE,EAAIT,EAClGU,EAAiBF,IAAU,OAAS,aAAe,iBACnDG,EAAoBH,IAAU,OAAS,WAAa,eAE1D,SACE,QAAC,OACC,uBAAqB,aACrB,IAAKN,EACL,aAAW,MACTM,IAAU,OAAS,YAAc,GACjC,2JACAP,CACF,EAEA,oBAAC,WAAQ,UAAU,gCAAgC,aAAa,sBAAsB,OAAQI,EAAY,KAE1G,QAAC,OAAI,UAAU,2FACb,qBAAC,OAAI,UAAU,0BACb,oBAAC,WAAQ,GAAG,KAAK,KAAM,EAAG,aAAW,MAAG,oBAAqBK,CAAc,EAAG,KAAMP,EAAO,KAC3F,OAAC,QACC,aAAW,MAAG,4EAA6EO,CAAc,EACzG,KAAMN,EACR,GACF,KAEA,QAAC,OAAI,UAAU,0BACZ,UAAAG,MACC,OAAC,UAAO,KAAK,KAAK,QAAQ,UAAU,UAAU,6BAA8B,GAAGA,EAC5E,SAAAA,EAAgB,KACnB,EAEDD,MACC,OAAC,UAAO,KAAK,KAAK,QAAQ,YAAa,GAAGA,EAAe,UAAU,+BAChE,SAAAA,EAAc,KACjB,GAEJ,GACF,EAGCG,EAAS,OAAS,MACjB,OAAC,OAAI,UAAU,4DACZ,SAAAA,EAAS,IAAI,CAACG,EAASC,OACtB,QAAC,EAAAd,QAAM,SAAN,CACC,oBAAC,QACC,aAAW,MACT,gFACAS,IAAU,OAAS,aAAe,gBACpC,EAEC,SAAAI,EAAQ,MACX,EACCC,EAAQJ,EAAS,OAAS,MAAK,OAAC,OAAI,aAAW,MAAG,WAAYE,CAAiB,EAAG,IAThEE,CAUrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDf,EAAW,YAAc,aAEzB,IAAOP,KAAQ,cAAWO,CAAU",
|
|
6
|
+
"names": ["HeroBanner_exports", "__export", "HeroBanner_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_helpers", "import_Styles", "HeroBanner", "React", "data", "className", "ref", "title", "subtitle", "background", "primaryButton", "secondaryButton", "theme", "products", "textColorClass", "dividerColorClass", "product", "index"]
|
|
7
7
|
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import type { ButtonProps } from '../../components/button.js';
|
|
2
2
|
import type { Theme } from '../../types/props.js';
|
|
3
3
|
export interface HeroBannerProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
data: {
|
|
5
|
+
/** 主标题 */
|
|
6
|
+
title: string;
|
|
7
|
+
/** 副标题/描述文本 */
|
|
8
|
+
subtitle: string;
|
|
9
|
+
/** 背景图片URL */
|
|
10
|
+
background: string;
|
|
11
|
+
/** 主按钮文本和配置 */
|
|
12
|
+
primaryButton?: {
|
|
13
|
+
text: string;
|
|
14
|
+
} & Omit<ButtonProps, 'children'>;
|
|
15
|
+
/** 次要按钮文本和配置 */
|
|
16
|
+
secondaryButton?: {
|
|
17
|
+
text: string;
|
|
18
|
+
} & Omit<ButtonProps, 'children'>;
|
|
19
|
+
/** 主题 */
|
|
20
|
+
theme?: Theme;
|
|
21
|
+
/** 底部产品列表 */
|
|
22
|
+
products?: Array<{
|
|
23
|
+
title: string;
|
|
24
|
+
}>;
|
|
25
|
+
};
|
|
18
26
|
/** 自定义类名 */
|
|
19
27
|
className?: string;
|
|
20
|
-
/** 主题 */
|
|
21
|
-
theme?: Theme;
|
|
22
|
-
/** 底部产品列表 */
|
|
23
|
-
products?: Array<{
|
|
24
|
-
title: string;
|
|
25
|
-
active?: boolean;
|
|
26
|
-
}>;
|
|
27
28
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var a=(r,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of p(t))!m.call(r,e)&&e!==s&&o(r,e,{get:()=>t[e],enumerable:!(n=i(t,e))||n.enumerable});return r};var u=r=>a(o({},"__esModule",{value:!0}),r);var c={};module.exports=u(c);
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/HeroBanner/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { ButtonProps } from '../../components/button.js'\nimport type { Theme } from '../../types/props.js'\n\nexport interface HeroBannerProps {\n /** \u4E3B\u6807\u9898 */\n
|
|
4
|
+
"sourcesContent": ["import type { ButtonProps } from '../../components/button.js'\nimport type { Theme } from '../../types/props.js'\n\nexport interface HeroBannerProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0\u6587\u672C */\n subtitle: string\n /** \u80CC\u666F\u56FE\u7247URL */\n background: string\n /** \u4E3B\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n primaryButton?: {\n text: string\n } & Omit<ButtonProps, 'children'>\n /** \u6B21\u8981\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n secondaryButton?: {\n text: string\n } & Omit<ButtonProps, 'children'>\n\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */\n products?: Array<{\n title: string\n }>\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
|
|
5
5
|
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
6
|
"names": ["types_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MultiLayoutGraphicBlockProps } from './types';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
(props: Omit<MultiLayoutGraphicBlockProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var u=Object.create;var o=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var y=(r,i)=>{for(var t in i)o(r,t,{get:i[t],enumerable:!0})},n=(r,i,t,a)=>{if(i&&typeof i=="object"||typeof i=="function")for(let e of s(i))!p.call(r,e)&&e!==t&&o(r,e,{get:()=>i[e],enumerable:!(a=g(i,e))||a.enumerable});return r};var f=(r,i,t)=>(t=r!=null?u(l(r)):{},n(i||!r||!r.__esModule?o(t,"default",{value:r,enumerable:!0}):t,r)),m=r=>n(o({},"__esModule",{value:!0}),r);var L={};y(L,{default:()=>w});module.exports=m(L);var d=require("react/jsx-runtime"),c=f(require("react")),v=require("../../shared/Styles.js");const h=c.default.forwardRef((r,i)=>{const{layout:t}=r.data;return(0,d.jsx)("div",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:i,children:(()=>{switch(t){case"single-row":return(0,d.jsx)("div",{children:"single-row"});case"grid-2-1":return(0,d.jsx)("div",{children:"grid-2-1"});case"grid-1-2":return(0,d.jsx)("div",{children:"grid-1-2"});case"grid-3":return(0,d.jsx)("div",{children:"grid-3"});case"grid-2x2":return(0,d.jsx)("div",{children:"grid-2x2"});case"grid-1-3":return(0,d.jsx)("div",{children:"grid-1-3"});case"grid-1-2-2":return(0,d.jsx)("div",{children:"grid-1-2-2"});case"grid-2-2-1":return(0,d.jsx)("div",{children:"grid-2-2-1"});case"grid-1-4":return(0,d.jsx)("div",{children:"grid-1-4"})}})()})});var w=(0,v.withStyles)(h);
|
|
2
|
+
//# sourceMappingURL=MultiLayoutGraphicBlock.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport type { MultiLayoutGraphicBlockProps } from './types'\nimport { withStyles } from '../../shared/Styles.js'\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { layout } = props.data\n\n const renderedContent = () => {\n switch (layout) {\n case 'single-row':\n return <div>single-row</div>\n case 'grid-2-1':\n return <div>grid-2-1</div>\n case 'grid-1-2':\n return <div>grid-1-2</div>\n case 'grid-3':\n return <div>grid-3</div>\n case 'grid-2x2':\n return <div>grid-2x2</div>\n case 'grid-1-3':\n return <div>grid-1-3</div>\n case 'grid-1-2-2':\n return <div>grid-1-2-2</div>\n case 'grid-2-2-1':\n return <div>grid-2-2-1</div>\n case 'grid-1-4':\n return <div>grid-1-4</div>\n }\n }\n\n return (\n <div data-ui-component-id=\"MultiLayoutGraphicBlock\" ref={ref}>\n {renderedContent()}\n </div>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAUe,IAAAI,EAAA,6BAVfC,EAAkB,oBAElBC,EAA2B,kCAE3B,MAAMC,EAA0B,EAAAC,QAAM,WAAyD,CAACC,EAAOC,IAAQ,CAC7G,KAAM,CAAE,OAAAC,CAAO,EAAIF,EAAM,KAyBzB,SACE,OAAC,OAAI,uBAAqB,0BAA0B,IAAKC,EACtD,UAzBmB,IAAM,CAC5B,OAAQC,EAAQ,CACd,IAAK,aACH,SAAO,OAAC,OAAI,sBAAU,EACxB,IAAK,WACH,SAAO,OAAC,OAAI,oBAAQ,EACtB,IAAK,WACH,SAAO,OAAC,OAAI,oBAAQ,EACtB,IAAK,SACH,SAAO,OAAC,OAAI,kBAAM,EACpB,IAAK,WACH,SAAO,OAAC,OAAI,oBAAQ,EACtB,IAAK,WACH,SAAO,OAAC,OAAI,oBAAQ,EACtB,IAAK,aACH,SAAO,OAAC,OAAI,sBAAU,EACxB,IAAK,aACH,SAAO,OAAC,OAAI,sBAAU,EACxB,IAAK,WACH,SAAO,OAAC,OAAI,oBAAQ,CACxB,CACF,GAIqB,EACnB,CAEJ,CAAC,EAED,IAAOT,KAAQ,cAAWK,CAAuB",
|
|
6
|
+
"names": ["MultiLayoutGraphicBlock_exports", "__export", "MultiLayoutGraphicBlock_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_Styles", "MultiLayoutGraphicBlock", "React", "props", "ref", "layout"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './MultiLayoutGraphicBlock.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var m=Object.create;var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var c=(e,f)=>{for(var o in f)t(e,o,{get:f[o],enumerable:!0})},d=(e,f,o,a)=>{if(f&&typeof f=="object"||typeof f=="function")for(let r of u(f))!b.call(e,r)&&r!==o&&t(e,r,{get:()=>f[r],enumerable:!(a=p(f,r))||a.enumerable});return e};var g=(e,f,o)=>(o=e!=null?m(x(e)):{},d(f||!e||!e.__esModule?t(o,"default",{value:e,enumerable:!0}):o,e)),h=e=>d(t({},"__esModule",{value:!0}),e);var i={};c(i,{default:()=>l.default});module.exports=h(i);var l=g(require("./MultiLayoutGraphicBlock.js"));
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/index.tsx"],
|
|
4
|
+
"sourcesContent": ["export { default } from './MultiLayoutGraphicBlock.js'"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wCAAAE,EAAAF,GAAA,IAAAG,EAAwB",
|
|
6
|
+
"names": ["MultiLayoutGraphicBlock_exports", "__export", "__toCommonJS", "import_MultiLayoutGraphicBlock"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Theme } from '../../types/props';
|
|
2
|
+
export type MultiLayoutGraphicBlockProps = {
|
|
3
|
+
data: {
|
|
4
|
+
layout: 'single-row' | 'grid-2-1' | 'grid-1-2' | 'grid-3' | 'grid-2x2' | 'grid-1-3' | 'grid-1-2-2' | 'grid-2-2-1' | 'grid-1-4';
|
|
5
|
+
blocks: {
|
|
6
|
+
theme: Theme;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
imageUrl: string;
|
|
10
|
+
primaryBtn: {
|
|
11
|
+
text: string;
|
|
12
|
+
link: string;
|
|
13
|
+
};
|
|
14
|
+
secondaryBtn: {
|
|
15
|
+
text: string;
|
|
16
|
+
link: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var g=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(i,r,s,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of o(r))!d.call(i,t)&&t!==s&&g(i,t,{get:()=>r[t],enumerable:!(e=n(r,t))||e.enumerable});return i};var a=i=>p(g({},"__esModule",{value:!0}),i);var l={};module.exports=a(l);
|
|
2
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/types.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { Theme } from '../../types/props'\n\nexport type MultiLayoutGraphicBlockProps = {\n data: {\n layout:\n | 'single-row' // \u4E00\u884C\u4E00\u4E2A\uFF08\u9ED8\u8BA4\uFF09\n | 'grid-2-1' // \u7B2C\u4E00\u884C2\u4E2A\uFF0C\u7B2C\u4E8C\u884C1\u4E2A\n | 'grid-1-2' // \u7B2C\u4E00\u884C1\u4E2A\uFF0C\u7B2C\u4E8C\u884C2\u4E2A\n | 'grid-3' // \u4E00\u884C3\u4E2A\n | 'grid-2x2' // \u4E24\u884C\u54042\u4E2A\n | 'grid-1-3' // \u7B2C\u4E00\u884C1\u4E2A\uFF0C\u7B2C\u4E8C\u884C3\u4E2A\n | 'grid-1-2-2' // \u7B2C\u4E00\u884C1\u4E2A\uFF0C\u7B2C\u4E8C\u884C2\u4E2A\uFF0C\u7B2C\u4E09\u884C2\u4E2A\n | 'grid-2-2-1' // \u7B2C\u4E00\u884C1\u4E2A\uFF0C\u7B2C\u4E8C\u884C2\u4E2A\uFF0C\u7B2C\u4E09\u884C1\u4E2A\n | 'grid-1-4' // \u7B2C\u4E00\u884C1\u4E2A\uFF0C\u7B2C\u4E8C\u884C4\u4E2A\uFF0C \u540C\u65F6\u652F\u6301\u7B2C\u4E8C\u884C\u6EDA\u52A8\n blocks: {\n theme: Theme\n title: string\n description: string\n imageUrl: string\n primaryBtn: {\n text: string\n link: string\n }\n secondaryBtn: {\n text: string\n link: string\n }[]\n }\n }\n className?: string\n}\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["types_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var f=Object.create;var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var o in t)n(e,o,{get:t[o],enumerable:!0})},a=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of l(t))!H.call(e,r)&&r!==o&&n(e,r,{get:()=>t[r],enumerable:!(i=d(t,r))||i.enumerable});return e};var h=(e,t,o)=>(o=e!=null?f(g(e)):{},a(t||!e||!e.__esModule?n(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>a(n({},"__esModule",{value:!0}),e);var R={};S(R,{default:()=>P});module.exports=y(R);var p=require("react/jsx-runtime"),m=h(require("react")),s=require("../../helpers/utils.js"),c=require("../../components/index.js");const N=m.default.forwardRef((e,t)=>{const{title:o,className:i,...r}=e;return(0,p.jsx)(c.Heading,{ref:t,className:(0,s.cn)("section-heading",i),html:o,...r})});var P=N;
|
|
2
|
+
//# sourceMappingURL=SectionHeading.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/SectionHeading/SectionHeading.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport type { SectionHeadingProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\n\nconst SectionHeading = React.forwardRef<HTMLDivElement, SectionHeadingProps>((props, ref) => {\n const { title, className, ...rest } = props\n\n return <Heading ref={ref} className={cn('section-heading', className)} html={title} {...rest} />\n})\n\nexport default SectionHeading\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAQS,IAAAI,EAAA,6BARTC,EAAkB,oBAElBC,EAAmB,kCACnBC,EAAwB,qCAExB,MAAMC,EAAiB,EAAAC,QAAM,WAAgD,CAACC,EAAOC,IAAQ,CAC3F,KAAM,CAAE,MAAAC,EAAO,UAAAC,EAAW,GAAGC,CAAK,EAAIJ,EAEtC,SAAO,OAAC,WAAQ,IAAKC,EAAK,aAAW,MAAG,kBAAmBE,CAAS,EAAG,KAAMD,EAAQ,GAAGE,EAAM,CAChG,CAAC,EAED,IAAOZ,EAAQM",
|
|
6
|
+
"names": ["SectionHeading_exports", "__export", "SectionHeading_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_components", "SectionHeading", "React", "props", "ref", "title", "className", "rest"]
|
|
7
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var d=(t,e,c,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of o(e))!s.call(t,i)&&i!==c&&a(t,i,{get:()=>e[i],enumerable:!(r=n(e,i))||r.enumerable});return t};var g=t=>d(a({},"__esModule",{value:!0}),t);var l={};module.exports=g(l);var p=require("react");
|
|
2
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/SectionHeading/types.ts"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nexport interface SectionHeadingProps {\n title: string\n className?: string\n children: React.ReactNode\n}\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAA,IAAAE,EAAkB",
|
|
6
|
+
"names": ["types_exports", "__toCommonJS", "import_react"]
|
|
7
|
+
}
|
|
@@ -9,3 +9,5 @@ export { default as HeroBanner } from './HeroBanner/index.js';
|
|
|
9
9
|
export { default as AccordionCards } from './AccordionCards/index.js';
|
|
10
10
|
export { default as Graphic } from './Graphic/index.js';
|
|
11
11
|
export { Marquee, MarqueeList, MarqueeImageContent, MarqueeTextContent, type FastMarqueeProps, type MarqueeListProps, type MarqueeImageContentProps, type MarqueeTextContentProps, } from './Marquee/index.js';
|
|
12
|
+
export * from './Marquee/index.js';
|
|
13
|
+
export { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var P=Object.create;var u=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var G=(e,r)=>{for(var t in r)u(e,t,{get:r[t],enumerable:!0})},p=(e,r,t,m)=>{if(r&&typeof r=="object"||typeof r=="function")for(let f of E(r))!S.call(e,f)&&f!==t&&u(e,f,{get:()=>r[f],enumerable:!(m=B(r,f))||m.enumerable});return e},l=(e,r,t)=>(p(e,r,"default"),t&&p(t,r,"default")),a=(e,r,t)=>(t=e!=null?P(L(e)):{},p(r||!e||!e.__esModule?u(t,"default",{value:e,enumerable:!0}):t,e)),I=e=>p(u({},"__esModule",{value:!0}),e);var s={};G(s,{AccordionCards:()=>c.default,BrandEquity:()=>d.default,Category:()=>y.default,Evaluate:()=>i.default,Graphic:()=>g.default,HeroBanner:()=>C.default,Marquee:()=>o.Marquee,MarqueeImageContent:()=>o.MarqueeImageContent,MarqueeList:()=>o.MarqueeList,MarqueeTextContent:()=>o.MarqueeTextContent,MemberEquity:()=>n.default,MultiLayoutGraphicBlock:()=>h.default,Shelf:()=>x.default,ShelfDisplay:()=>M.default,Slogan:()=>q.default});module.exports=I(s);var x=a(require("./Shelf/index.js")),d=a(require("./BrandEquity/index.js")),n=a(require("./MemberEquity/index.js")),q=a(require("./Slogan/index.js")),M=a(require("./ShelfDisplay/index.js")),i=a(require("./Evaluate/index.js")),y=a(require("./Category/index.js")),C=a(require("./HeroBanner/index.js")),c=a(require("./AccordionCards/index.js")),g=a(require("./Graphic/index.js")),o=require("./Marquee/index.js");l(s,require("./Marquee/index.js"),module.exports);var h=a(require("./MultiLayoutGraphicBlock/index.js"));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/biz-components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as Shelf } from './Shelf/index.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport {\n Marquee,\n MarqueeList,\n MarqueeImageContent,\n MarqueeTextContent,\n type FastMarqueeProps,\n type MarqueeListProps,\n type MarqueeImageContentProps,\n type MarqueeTextContentProps,\n} from './Marquee/index.js'\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["biz_components_exports", "__export", "__toCommonJS", "import_Shelf", "import_BrandEquity", "import_MemberEquity", "import_Slogan", "import_ShelfDisplay", "import_Evaluate", "import_Category", "import_HeroBanner", "import_AccordionCards", "import_Graphic", "import_Marquee"]
|
|
4
|
+
"sourcesContent": ["export { default as Shelf } from './Shelf/index.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport {\n Marquee,\n MarqueeList,\n MarqueeImageContent,\n MarqueeTextContent,\n type FastMarqueeProps,\n type MarqueeListProps,\n type MarqueeImageContentProps,\n type MarqueeTextContentProps,\n} from './Marquee/index.js'\nexport * from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\n"],
|
|
5
|
+
"mappings": "wmBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,ybAAAE,EAAAF,GAAA,IAAAG,EAAiC,+BACjCC,EAAuC,qCACvCC,EAAwC,sCACxCC,EAAkC,gCAClCC,EAAwC,sCACxCC,EAAoC,kCACpCC,EAAoC,kCACpCC,EAAsC,oCACtCC,EAA0C,wCAC1CC,EAAmC,iCACnCC,EASO,8BACPC,EAAAd,EAAc,8BApBd,gBAqBA,IAAAe,EAAmD",
|
|
6
|
+
"names": ["biz_components_exports", "__export", "__toCommonJS", "import_Shelf", "import_BrandEquity", "import_MemberEquity", "import_Slogan", "import_ShelfDisplay", "import_Evaluate", "import_Category", "import_HeroBanner", "import_AccordionCards", "import_Graphic", "import_Marquee", "__reExport", "import_MultiLayoutGraphicBlock"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var H=Object.create;var i=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var z=(t,e)=>{for(var
|
|
1
|
+
"use strict";var H=Object.create;var i=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var z=(t,e)=>{for(var n in e)i(t,n,{get:e[n],enumerable:!0})},p=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of V(e))!C.call(t,o)&&o!==n&&i(t,o,{get:()=>e[o],enumerable:!(a=R(e,o))||a.enumerable});return t};var E=(t,e,n)=>(n=t!=null?H(w(t)):{},p(e||!t||!t.__esModule?i(n,"default",{value:t,enumerable:!0}):n,t)),N=t=>p(i({},"__esModule",{value:!0}),t);var T={};z(T,{Heading:()=>l});module.exports=N(T);var r=require("react/jsx-runtime"),h=require("../helpers/index.js"),x=require("@radix-ui/react-slot"),m=require("class-variance-authority"),f=E(require("react"));const S=(0,m.cva)("tracking font-heading text-info-primary leading-tight",{variants:{size:{1:"text-heading-1 lg-desktop:text-[16px]",2:"text-heading-2 lg-desktop:text-[24px]",3:"text-heading-3 lg-desktop:text-[32px]",4:"text-heading-4 desktop:text-[36px] lg-desktop:text-[48px]",5:"text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]"},weight:{medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:5,weight:"bold"}}),l=f.default.forwardRef((t,e)=>{const{children:n,className:a,size:o=5,align:c,weight:k,asChild:b,as:y="h1",color:s,html:d,...P}=t,g=d?{dangerouslySetInnerHTML:{__html:d}}:null,u=s?{style:{color:s}}:null;return(0,r.jsx)(x.Slot,{...P,ref:e,className:(0,h.cn)(S({size:o,weight:k,align:c}),a),...g,...u,children:b?n:(0,r.jsx)(y,{children:g?null:n})})});l.displayName="Heading";
|
|
2
2
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/heading.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('tracking text-info-primary leading-tight', {\n variants: {\n size: {\n 1: 'text-heading-1 lg-desktop:text-[16px]',\n 2: 'text-heading-2 lg-desktop:text-[24px]',\n 3: 'text-heading-3 lg-desktop:text-[32px]',\n 4: 'text-heading-4 desktop:text-[36px] lg-desktop:text-[48px]',\n 5: 'text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 5,\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size = 5, align, weight, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAwE4B,IAAAI,EAAA,6BAxE5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAElB,MAAMC,KAAkB,OAAI,
|
|
4
|
+
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('tracking font-heading text-info-primary leading-tight', {\n variants: {\n size: {\n 1: 'text-heading-1 lg-desktop:text-[16px]',\n 2: 'text-heading-2 lg-desktop:text-[24px]',\n 3: 'text-heading-3 lg-desktop:text-[32px]',\n 4: 'text-heading-4 desktop:text-[36px] lg-desktop:text-[48px]',\n 5: 'text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 5,\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size = 5, align, weight, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAwE4B,IAAAI,EAAA,6BAxE5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAElB,MAAMC,KAAkB,OAAI,wDAAyD,CACnF,SAAU,CACR,KAAM,CACJ,EAAG,wCACH,EAAG,wCACH,EAAG,wCACH,EAAG,4DACH,EAAG,2DACL,EACA,OAAQ,CACN,OAAQ,cACR,SAAU,gBACV,KAAM,YACN,UAAW,iBACX,MAAO,YACT,EACA,MAAO,CACL,KAAM,YACN,OAAQ,cACR,MAAO,YACT,CACF,EACA,gBAAiB,CACf,KAAM,EACN,OAAQ,MACV,CACF,CAAC,EAWKP,EAAU,EAAAQ,QAAM,WAAyC,CAACC,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,EAAG,MAAAC,EAAO,OAAAC,EAAQ,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIX,EAC1GY,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KACJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKV,EACL,aAAW,MACTH,EAAgB,CACd,KAAAM,EACA,OAAAE,EACA,MAAAD,CACF,CAAC,EACDF,CACF,EACC,GAAGS,EACH,GAAGC,EAEH,SAAAN,EAAUL,KAAW,OAACM,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EAEDX,EAAQ,YAAc",
|
|
6
6
|
"names": ["heading_exports", "__export", "Heading", "__toCommonJS", "import_jsx_runtime", "import_helpers", "import_react_slot", "import_class_variance_authority", "import_react", "headingVariants", "React", "props", "forwardedRef", "children", "className", "size", "align", "weight", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var s in e)a(t,s,{get:e[s],enumerable:!0})},p=(t,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of m(e))!P.call(t,l)&&l!==s&&a(t,l,{get:()=>e[l],enumerable:!(n=d(e,l))||n.enumerable});return t};var f=t=>p(a({},"__esModule",{value:!0}),t);var $={};g($,{getStylesProps:()=>c,useStyles:()=>y,withStyles:()=>N});module.exports=f($);var o=require("react/jsx-runtime"),r=require("react");const i=()=>`style_${Math.random().toString(36).substring(2,9)}_${Date.now().toString(36)}`,c=t=>{const{style:e,uid:s,disabled:n}=t;return{style:e,uid:s,disabled:n}},b=({style:t,uid:e=i(),disabled:s=!1})=>!t||s?null:(0,o.jsx)("style",{"data-style-id":e,children:`.block-${e} { ${t} }`}),y=t=>{const e=(0,r.useMemo)(()=>t?.uid||i(),[t?.uid]),s=(0,r.useMemo)(()=>(0,o.jsx)(b,{...t,uid:e}),[t,e]);return{className:`block-${e} `,StyleComponent:s,uid:e}};function N(t,e){const s=function(n){const l={...e,...c(n)},{className:u,StyleComponent:S}=y(l);return(0,o.jsxs)(o.Fragment,{children:[S,(0,o.jsx)(t,{...n,className:`${u} ${n.className}`})]})};return s.displayName=t.displayName||t.name||"Component",s}
|
|
2
2
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/shared/Styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react'\n\nexport interface StylesProps {\n /** \u81EA\u5B9A\u4E49\u6837\u5F0F\u5B57\u7B26\u4E32 */\n style?: string\n /** \u552F\u4E00\u6807\u8BC6\u7B26 */\n uid?: string\n /** \u662F\u5426\u7981\u7528 */\n disabled?: boolean\n}\n\n/**\n * \u751F\u6210\u552F\u4E00\u6807\u8BC6\u7B26\n */\nconst generateUID = () => {\n return `style_${Math.random().toString(36).substring(2, 9)}_${Date.now().toString(36)}`\n}\n\n/**\n * \u4ECE\u7EC4\u4EF6 props \u4E2D\u63D0\u53D6\u6837\u5F0F\u76F8\u5173\u5C5E\u6027\n */\nexport const getStylesProps = <T extends Record<string, unknown>>(props: T & StylesProps): StylesProps => {\n const { style, uid, disabled } = props\n return { style, uid, disabled }\n}\n\n/**\n * \u6837\u5F0F\u6CE8\u5165\u7EC4\u4EF6\n */\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID(), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return <style data-style-id={uid}>{`.block-${uid} { ${style} }`}</style>\n}\n\n/**\n * \u6837\u5F0F Hook\uFF0C\u8FD4\u56DE\u6837\u5F0F\u7C7B\u540D\u548C\u6837\u5F0F\u7EC4\u4EF6\n * @param styleProps - \u6837\u5F0F\u5C5E\u6027\n */\nexport const useStyles = (styleProps: Partial<StylesProps>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID(), [styleProps?.uid])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n } as const\n}\n\n/**\n * \u6837\u5F0F\u9AD8\u9636\u7EC4\u4EF6\uFF0C \u7528\u4E8E\u7ED9\u7EC4\u4EF6\u7528style \u6807\u7B7E\u7684\u5F62\u5F0F\u8FFD\u52A0\u6837\u5F0F\n * @param WrappedComponent - \u9700\u8981\u5305\u88C5\u7684\u7EC4\u4EF6\n * @param defaultStyleProps - \u9ED8\u8BA4\u6837\u5F0F\u5C5E\u6027\n */\nexport function withStyles<P extends object>(\n WrappedComponent: React.ComponentType<P>,\n defaultStyleProps?: Partial<StylesProps>\n) {\n const WithStyles = function (props: Omit<P, keyof StylesProps> & Partial<StylesProps> & { className?: string }) {\n const finalStyleProps = {\n ...defaultStyleProps,\n ...getStylesProps(props),\n }\n\n const { className, StyleComponent } = useStyles(finalStyleProps)\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent {...(props as P)} className={`${className} ${props.className}`} />\n </>\n )\n }\n\n // \u76F4\u63A5\u4F7F\u7528\u539F\u59CB\u7EC4\u4EF6\u7684\u540D\u79F0\n WithStyles.displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'\n return WithStyles\n}\n\
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Styles_exports", "__export", "
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react'\n\nexport interface StylesProps {\n /** \u81EA\u5B9A\u4E49\u6837\u5F0F\u5B57\u7B26\u4E32 */\n style?: string\n /** \u552F\u4E00\u6807\u8BC6\u7B26 */\n uid?: string\n /** \u662F\u5426\u7981\u7528 */\n disabled?: boolean\n}\n\n/**\n * \u751F\u6210\u552F\u4E00\u6807\u8BC6\u7B26\n */\nconst generateUID = () => {\n return `style_${Math.random().toString(36).substring(2, 9)}_${Date.now().toString(36)}`\n}\n\n/**\n * \u4ECE\u7EC4\u4EF6 props \u4E2D\u63D0\u53D6\u6837\u5F0F\u76F8\u5173\u5C5E\u6027\n */\nexport const getStylesProps = <T extends Record<string, unknown>>(props: T & StylesProps): StylesProps => {\n const { style, uid, disabled } = props\n return { style, uid, disabled }\n}\n\n/**\n * \u6837\u5F0F\u6CE8\u5165\u7EC4\u4EF6\n */\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID(), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return <style data-style-id={uid}>{`.block-${uid} { ${style} }`}</style>\n}\n\n/**\n * \u6837\u5F0F Hook\uFF0C\u8FD4\u56DE\u6837\u5F0F\u7C7B\u540D\u548C\u6837\u5F0F\u7EC4\u4EF6\n * @param styleProps - \u6837\u5F0F\u5C5E\u6027\n */\nexport const useStyles = (styleProps: Partial<StylesProps>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID(), [styleProps?.uid])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n } as const\n}\n\n/**\n * \u6837\u5F0F\u9AD8\u9636\u7EC4\u4EF6\uFF0C \u7528\u4E8E\u7ED9\u7EC4\u4EF6\u7528style \u6807\u7B7E\u7684\u5F62\u5F0F\u8FFD\u52A0\u6837\u5F0F\n * @param WrappedComponent - \u9700\u8981\u5305\u88C5\u7684\u7EC4\u4EF6\n * @param defaultStyleProps - \u9ED8\u8BA4\u6837\u5F0F\u5C5E\u6027\n */\nexport function withStyles<P extends object>(\n WrappedComponent: React.ComponentType<P>,\n defaultStyleProps?: Partial<StylesProps>\n) {\n const WithStyles = function (props: Omit<P, keyof StylesProps> & Partial<StylesProps> & { className?: string }) {\n const finalStyleProps = {\n ...defaultStyleProps,\n ...getStylesProps(props),\n }\n\n const { className, StyleComponent } = useStyles(finalStyleProps)\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent {...(props as P)} className={`${className} ${props.className}`} />\n </>\n )\n }\n\n // \u76F4\u63A5\u4F7F\u7528\u539F\u59CB\u7EC4\u4EF6\u7684\u540D\u79F0\n WithStyles.displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'\n return WithStyles\n}\n\n\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,cAAAC,EAAA,eAAAC,IAAA,eAAAC,EAAAL,GAkCS,IAAAM,EAAA,6BAlCTC,EAA+B,iBAc/B,MAAMC,EAAc,IACX,SAAS,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAG,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,SAAS,EAAE,CAAC,GAM1EN,EAAqDO,GAAwC,CACxG,KAAM,CAAE,MAAAC,EAAO,IAAAC,EAAK,SAAAC,CAAS,EAAIH,EACjC,MAAO,CAAE,MAAAC,EAAO,IAAAC,EAAK,SAAAC,CAAS,CAChC,EAKMC,EAAgC,CAAC,CAAE,MAAAH,EAAO,IAAAC,EAAMH,EAAY,EAAG,SAAAI,EAAW,EAAM,IAChF,CAACF,GAASE,EACL,QAGF,OAAC,SAAM,gBAAeD,EAAM,mBAAUA,CAAG,MAAMD,CAAK,KAAK,EAOrDP,EAAaW,GAAqC,CAC7D,MAAMH,KAAM,WAAQ,IAAMG,GAAY,KAAON,EAAY,EAAG,CAACM,GAAY,GAAG,CAAC,EAEvEC,KAAiB,WAAQ,OAAM,OAACF,EAAA,CAAQ,GAAGC,EAAY,IAAKH,EAAK,EAAI,CAACG,EAAYH,CAAG,CAAC,EAE5F,MAAO,CACL,UAAW,SAASA,CAAG,IACvB,eAAAI,EACA,IAAAJ,CACF,CACF,EAOO,SAASP,EACdY,EACAC,EACA,CACA,MAAMC,EAAa,SAAUT,EAAmF,CAC9G,MAAMU,EAAkB,CACtB,GAAGF,EACH,GAAGf,EAAeO,CAAK,CACzB,EAEM,CAAE,UAAAW,EAAW,eAAAL,CAAe,EAAIZ,EAAUgB,CAAe,EAE/D,SACE,oBACG,UAAAJ,KACD,OAACC,EAAA,CAAkB,GAAIP,EAAa,UAAW,GAAGW,CAAS,IAAIX,EAAM,SAAS,GAAI,GACpF,CAEJ,EAGA,OAAAS,EAAW,YAAcF,EAAiB,aAAeA,EAAiB,MAAQ,YAC3EE,CACT",
|
|
6
|
+
"names": ["Styles_exports", "__export", "getStylesProps", "useStyles", "withStyles", "__toCommonJS", "import_jsx_runtime", "import_react", "generateUID", "props", "style", "uid", "disabled", "Styles", "styleProps", "StyleComponent", "WrappedComponent", "defaultStyleProps", "WithStyles", "finalStyleProps", "className"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var c=Object.create;var a=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var l=(e,t)=>{for(var r in t)a(e,r,{get:t[r],enumerable:!0})},i=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!m.call(e,o)&&o!==r&&a(e,o,{get:()=>t[o],enumerable:!(n=h(t,o))||n.enumerable});return e};var k=(e,t,r)=>(r=e!=null?c(d(e)):{},i(t||!e||!e.__esModule?a(r,"default",{value:e,enumerable:!0}):r,e)),f=e=>i(a({},"__esModule",{value:!0}),e);var w={};l(w,{DarkTheme:()=>b,LightTheme:()=>B,WithoutSecondaryButton:()=>A,default:()=>y});module.exports=f(w);var p=k(require("../biz-components/HeroBanner/HeroBanner.js"));const g={title:"Biz-Components/HeroBanner",component:p.default,parameters:{layout:"fullscreen",docs:{description:{component:`
|
|
2
2
|
HeroBanner \u7EC4\u4EF6\u7528\u4E8E\u5C55\u793A\u7F51\u7AD9\u7684\u4E3B\u8981\u5185\u5BB9\u533A\u57DF\uFF0C\u901A\u5E38\u5305\u542B\u6807\u9898\u3001\u526F\u6807\u9898\u548C\u884C\u52A8\u6309\u94AE\u3002
|
|
3
3
|
|
|
4
4
|
### \u7279\u70B9
|
|
@@ -6,5 +6,5 @@ HeroBanner \u7EC4\u4EF6\u7528\u4E8E\u5C55\u793A\u7F51\u7AD9\u7684\u4E3B\u8981\u5
|
|
|
6
6
|
- \u4F7F\u7528 Mont For Anker \u5B57\u4F53\u4F5C\u4E3A\u6807\u9898
|
|
7
7
|
- \u53EF\u914D\u7F6E\u4E3B\u6309\u94AE\u548C\u6B21\u8981\u6309\u94AE
|
|
8
8
|
- \u652F\u6301\u5E95\u90E8\u4EA7\u54C1\u5217\u8868
|
|
9
|
-
`}}},tags:["autodocs"]};var
|
|
9
|
+
`}}},tags:["autodocs"]};var y=g;const s="https://cdn.shopify.com/s/files/1/0521/9411/5753/files/aee13b30b2c77fc8d0a46e4f19fa48cb_6a25debf-f95e-4ca6-990b-babcad65216c.png?v=1745468206",P="https://cdn.shopify.com/s/files/1/0517/6767/3016/files/87e32d61fc407d5e6c8aff00f3453072.jpg?v=1745999899",B={args:{data:{title:"Anker Laptop Power",subtitle:"Anker Prime 240W GaN Desktop Charger (4 Ports)",background:s,theme:"light",primaryButton:{text:"Shop Now"},secondaryButton:{text:"Learn More"},products:[{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"},{title:"Anker Prime 27,650mAh Power Bank (250W)"},{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"}]}}},b={args:{data:{title:"Power Your Life",subtitle:"Experience the next generation of charging technology with our innovative solutions designed for modern life.",background:P,theme:"dark",primaryButton:{text:"Shop Now"},secondaryButton:{text:"Learn More"},products:[{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"},{title:"Anker Prime 27,650mAh Power Bank (250W)"},{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"}]}}},A={args:{data:{title:"Future of Charging",subtitle:"Step into the future with our revolutionary charging solutions that redefine the way you power your devices.",background:s,theme:"light",primaryButton:{text:"Shop Now"},products:[{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"},{title:"Anker Prime 27,650mAh Power Bank (250W)"},{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"}]}}};
|
|
10
10
|
//# sourceMappingURL=HeroBanner.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/HeroBanner.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport HeroBanner from '../biz-components/HeroBanner/HeroBanner.js'\n\nconst meta = {\n title: 'Biz-Components/HeroBanner',\n component: HeroBanner,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: `\nHeroBanner \u7EC4\u4EF6\u7528\u4E8E\u5C55\u793A\u7F51\u7AD9\u7684\u4E3B\u8981\u5185\u5BB9\u533A\u57DF\uFF0C\u901A\u5E38\u5305\u542B\u6807\u9898\u3001\u526F\u6807\u9898\u548C\u884C\u52A8\u6309\u94AE\u3002\n\n### \u7279\u70B9\n- \u652F\u6301\u4EAE\u8272\u548C\u6697\u8272\u4E3B\u9898\n- \u4F7F\u7528 Mont For Anker \u5B57\u4F53\u4F5C\u4E3A\u6807\u9898\n- \u53EF\u914D\u7F6E\u4E3B\u6309\u94AE\u548C\u6B21\u8981\u6309\u94AE\n- \u652F\u6301\u5E95\u90E8\u4EA7\u54C1\u5217\u8868\n `,\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof HeroBanner>\n\nexport default meta\ntype Story = StoryObj<typeof HeroBanner>\n\nconst defaultBackground =\n 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/aee13b30b2c77fc8d0a46e4f19fa48cb_6a25debf-f95e-4ca6-990b-babcad65216c.png?v=1745468206'\n\nexport const LightTheme: Story = {\n args: {\n title: 'Anker Laptop Power',\n
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,EAAA,eAAAC,EAAA,2BAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAN,GACA,IAAAO,EAAuB,yDAEvB,MAAMC,EAAO,CACX,MAAO,4BACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SASb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOJ,EAAQG,EAGf,MAAME,EACJ,
|
|
6
|
-
"names": ["HeroBanner_stories_exports", "__export", "DarkTheme", "LightTheme", "WithoutSecondaryButton", "HeroBanner_stories_default", "__toCommonJS", "import_HeroBanner", "meta", "HeroBanner", "defaultBackground"]
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport HeroBanner from '../biz-components/HeroBanner/HeroBanner.js'\n\nconst meta = {\n title: 'Biz-Components/HeroBanner',\n component: HeroBanner,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: `\nHeroBanner \u7EC4\u4EF6\u7528\u4E8E\u5C55\u793A\u7F51\u7AD9\u7684\u4E3B\u8981\u5185\u5BB9\u533A\u57DF\uFF0C\u901A\u5E38\u5305\u542B\u6807\u9898\u3001\u526F\u6807\u9898\u548C\u884C\u52A8\u6309\u94AE\u3002\n\n### \u7279\u70B9\n- \u652F\u6301\u4EAE\u8272\u548C\u6697\u8272\u4E3B\u9898\n- \u4F7F\u7528 Mont For Anker \u5B57\u4F53\u4F5C\u4E3A\u6807\u9898\n- \u53EF\u914D\u7F6E\u4E3B\u6309\u94AE\u548C\u6B21\u8981\u6309\u94AE\n- \u652F\u6301\u5E95\u90E8\u4EA7\u54C1\u5217\u8868\n `,\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof HeroBanner>\n\nexport default meta\ntype Story = StoryObj<typeof HeroBanner>\n\nconst defaultBackground =\n 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/aee13b30b2c77fc8d0a46e4f19fa48cb_6a25debf-f95e-4ca6-990b-babcad65216c.png?v=1745468206'\n\nconst darkBackground =\n 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/87e32d61fc407d5e6c8aff00f3453072.jpg?v=1745999899'\n\nexport const LightTheme: Story = {\n args: {\n data: {\n title: 'Anker Laptop Power',\n subtitle: 'Anker Prime 240W GaN Desktop Charger (4 Ports)',\n background: defaultBackground,\n theme: 'light',\n primaryButton: {\n text: 'Shop Now',\n },\n secondaryButton: {\n text: 'Learn More',\n },\n products: [\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n { title: 'Anker Prime 27,650mAh Power Bank (250W)' },\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n ],\n },\n },\n}\n\nexport const DarkTheme: Story = {\n args: {\n data: {\n title: 'Power Your Life',\n subtitle:\n 'Experience the next generation of charging technology with our innovative solutions designed for modern life.',\n background: darkBackground,\n theme: 'dark',\n primaryButton: {\n text: 'Shop Now',\n },\n secondaryButton: {\n text: 'Learn More',\n },\n products: [\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n { title: 'Anker Prime 27,650mAh Power Bank (250W)' },\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n ],\n },\n },\n}\n\nexport const WithoutSecondaryButton: Story = {\n args: {\n data: {\n title: 'Future of Charging',\n subtitle:\n 'Step into the future with our revolutionary charging solutions that redefine the way you power your devices.',\n background: defaultBackground,\n theme: 'light',\n primaryButton: {\n text: 'Shop Now',\n },\n products: [\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n { title: 'Anker Prime 27,650mAh Power Bank (250W)' },\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n ],\n },\n },\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,EAAA,eAAAC,EAAA,2BAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAN,GACA,IAAAO,EAAuB,yDAEvB,MAAMC,EAAO,CACX,MAAO,4BACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SASb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOJ,EAAQG,EAGf,MAAME,EACJ,gJAEIC,EACJ,2GAEWR,EAAoB,CAC/B,KAAM,CACJ,KAAM,CACJ,MAAO,qBACP,SAAU,iDACV,WAAYO,EACZ,MAAO,QACP,cAAe,CACb,KAAM,UACR,EACA,gBAAiB,CACf,KAAM,YACR,EACA,SAAU,CACR,CAAE,MAAO,gDAAiD,EAC1D,CAAE,MAAO,yCAA0C,EACnD,CAAE,MAAO,gDAAiD,CAC5D,CACF,CACF,CACF,EAEaR,EAAmB,CAC9B,KAAM,CACJ,KAAM,CACJ,MAAO,kBACP,SACE,gHACF,WAAYS,EACZ,MAAO,OACP,cAAe,CACb,KAAM,UACR,EACA,gBAAiB,CACf,KAAM,YACR,EACA,SAAU,CACR,CAAE,MAAO,gDAAiD,EAC1D,CAAE,MAAO,yCAA0C,EACnD,CAAE,MAAO,gDAAiD,CAC5D,CACF,CACF,CACF,EAEaP,EAAgC,CAC3C,KAAM,CACJ,KAAM,CACJ,MAAO,qBACP,SACE,+GACF,WAAYM,EACZ,MAAO,QACP,cAAe,CACb,KAAM,UACR,EACA,SAAU,CACR,CAAE,MAAO,gDAAiD,EAC1D,CAAE,MAAO,yCAA0C,EACnD,CAAE,MAAO,gDAAiD,CAC5D,CACF,CACF,CACF",
|
|
6
|
+
"names": ["HeroBanner_stories_exports", "__export", "DarkTheme", "LightTheme", "WithoutSecondaryButton", "HeroBanner_stories_default", "__toCommonJS", "import_HeroBanner", "meta", "HeroBanner", "defaultBackground", "darkBackground"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import m from"react";import{Button as
|
|
1
|
+
"use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import m from"react";import{Button as p,Heading as y,Picture as k,Text as c}from"../../components/index.js";import{cn as t}from"../../helpers/index.js";import{withStyles as w}from"../../shared/Styles.js";const d=m.forwardRef(({data:u,className:g},f)=>{const{title:h,subtitle:x,background:v,primaryButton:o,secondaryButton:s,theme:r="light",products:l=[]}=u,n=r==="dark"?"text-white":"text-[#1D1D1F]",b=r==="dark"?"bg-white":"bg-[#1D1D1F]";return a("div",{"data-ui-component-id":"HeroBanner",ref:f,className:t(r==="dark"?"aiui-dark":"","lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] relative aspect-[390/660] w-full overflow-hidden",g),children:[e(k,{className:"laptop:w-full absolute h-full",imgClassName:"h-full object-cover",source:v}),a("div",{className:"laptop:top-1/2 laptop:-translate-y-1/2 relative top-[30%] z-10 flex flex-col gap-8 px-32",children:[a("div",{className:"max-w-[686px] space-y-4",children:[e(y,{as:"h1",size:5,className:t("hero-banner-title",n),html:h}),e(c,{className:t("hero-banner-subtitle text-lg font-medium leading-[1.2] tracking-[-0.02em]",n),html:x})]}),a("div",{className:"flex items-center gap-4",children:[s&&e(p,{size:"lg",variant:"primary",className:"hero-banner-primary-button",...s,children:s.text}),o&&e(p,{size:"lg",variant:"secondary",...o,className:"hero-banner-secondary-button",children:o.text})]})]}),l.length>0&&e("div",{className:"absolute bottom-0 z-10 flex items-center gap-3 px-32 pb-6",children:l.map((N,i)=>a(m.Fragment,{children:[e(c,{className:t("hero-banner-product-text text-sm font-medium leading-[1.2] tracking-[-0.02em]",r==="dark"?"text-white":"text-[#1D1D1F]"),children:N.title}),i<l.length-1&&e("div",{className:t("h-4 w-px",b)})]},i))})]})});d.displayName="HeroBanner";var C=w(d);export{C as default};
|
|
2
2
|
//# sourceMappingURL=HeroBanner.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/HeroBanner/HeroBanner.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React from 'react'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\n\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(\n
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "Button", "Picture", "Text", "cn", "withStyles", "HeroBanner", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\n\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(({ data, className }, ref) => {\n const { title, subtitle, background, primaryButton, secondaryButton, theme = 'light', products = [] } = data\n const textColorClass = theme === 'dark' ? 'text-white' : 'text-[#1D1D1F]'\n const dividerColorClass = theme === 'dark' ? 'bg-white' : 'bg-[#1D1D1F]'\n\n return (\n <div\n data-ui-component-id=\"HeroBanner\"\n ref={ref}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] relative aspect-[390/660] w-full overflow-hidden',\n className\n )}\n >\n <Picture className=\"laptop:w-full absolute h-full\" imgClassName=\"h-full object-cover\" source={background} />\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 relative top-[30%] z-10 flex flex-col gap-8 px-32\">\n <div className=\"max-w-[686px] space-y-4\">\n <Heading as=\"h1\" size={5} className={cn('hero-banner-title', textColorClass)} html={title} />\n <Text\n className={cn('hero-banner-subtitle text-lg font-medium leading-[1.2] tracking-[-0.02em]', textColorClass)}\n html={subtitle}\n />\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"flex items-center gap-4\">\n {secondaryButton && (\n <Button size=\"lg\" variant=\"primary\" className=\"hero-banner-primary-button\" {...secondaryButton}>\n {secondaryButton.text}\n </Button>\n )}\n {primaryButton && (\n <Button size=\"lg\" variant=\"secondary\" {...primaryButton} className=\"hero-banner-secondary-button\">\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n\n {/* \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */}\n {products.length > 0 && (\n <div className=\"absolute bottom-0 z-10 flex items-center gap-3 px-32 pb-6\">\n {products.map((product, index) => (\n <React.Fragment key={index}>\n <Text\n className={cn(\n 'hero-banner-product-text text-sm font-medium leading-[1.2] tracking-[-0.02em]',\n theme === 'dark' ? 'text-white' : 'text-[#1D1D1F]'\n )}\n >\n {product.title}\n </Text>\n {index < products.length - 1 && <div className={cn('h-4 w-px', dividerColorClass)} />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withStyles(HeroBanner)\n"],
|
|
5
|
+
"mappings": "aAsBM,cAAAA,EAGE,QAAAC,MAHF,oBArBN,OAAOC,MAAW,QAElB,OAAS,UAAAC,EAAQ,WAAAC,EAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC/C,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAE3B,MAAMC,EAAaP,EAAM,WAA4C,CAAC,CAAE,KAAAQ,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACjG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,WAAAC,EAAY,cAAAC,EAAe,gBAAAC,EAAiB,MAAAC,EAAQ,QAAS,SAAAC,EAAW,CAAC,CAAE,EAAIT,EAClGU,EAAiBF,IAAU,OAAS,aAAe,iBACnDG,EAAoBH,IAAU,OAAS,WAAa,eAE1D,OACEjB,EAAC,OACC,uBAAqB,aACrB,IAAKW,EACL,UAAWL,EACTW,IAAU,OAAS,YAAc,GACjC,2JACAP,CACF,EAEA,UAAAX,EAACK,EAAA,CAAQ,UAAU,gCAAgC,aAAa,sBAAsB,OAAQU,EAAY,EAE1Gd,EAAC,OAAI,UAAU,2FACb,UAAAA,EAAC,OAAI,UAAU,0BACb,UAAAD,EAACI,EAAA,CAAQ,GAAG,KAAK,KAAM,EAAG,UAAWG,EAAG,oBAAqBa,CAAc,EAAG,KAAMP,EAAO,EAC3Fb,EAACM,EAAA,CACC,UAAWC,EAAG,4EAA6Ea,CAAc,EACzG,KAAMN,EACR,GACF,EAEAb,EAAC,OAAI,UAAU,0BACZ,UAAAgB,GACCjB,EAACG,EAAA,CAAO,KAAK,KAAK,QAAQ,UAAU,UAAU,6BAA8B,GAAGc,EAC5E,SAAAA,EAAgB,KACnB,EAEDD,GACChB,EAACG,EAAA,CAAO,KAAK,KAAK,QAAQ,YAAa,GAAGa,EAAe,UAAU,+BAChE,SAAAA,EAAc,KACjB,GAEJ,GACF,EAGCG,EAAS,OAAS,GACjBnB,EAAC,OAAI,UAAU,4DACZ,SAAAmB,EAAS,IAAI,CAACG,EAASC,IACtBtB,EAACC,EAAM,SAAN,CACC,UAAAF,EAACM,EAAA,CACC,UAAWC,EACT,gFACAW,IAAU,OAAS,aAAe,gBACpC,EAEC,SAAAI,EAAQ,MACX,EACCC,EAAQJ,EAAS,OAAS,GAAKnB,EAAC,OAAI,UAAWO,EAAG,WAAYc,CAAiB,EAAG,IAThEE,CAUrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDd,EAAW,YAAc,aAEzB,IAAOe,EAAQhB,EAAWC,CAAU",
|
|
6
|
+
"names": ["jsx", "jsxs", "React", "Button", "Heading", "Picture", "Text", "cn", "withStyles", "HeroBanner", "data", "className", "ref", "title", "subtitle", "background", "primaryButton", "secondaryButton", "theme", "products", "textColorClass", "dividerColorClass", "product", "index", "HeroBanner_default"]
|
|
7
7
|
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import type { ButtonProps } from '../../components/button.js';
|
|
2
2
|
import type { Theme } from '../../types/props.js';
|
|
3
3
|
export interface HeroBannerProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
data: {
|
|
5
|
+
/** 主标题 */
|
|
6
|
+
title: string;
|
|
7
|
+
/** 副标题/描述文本 */
|
|
8
|
+
subtitle: string;
|
|
9
|
+
/** 背景图片URL */
|
|
10
|
+
background: string;
|
|
11
|
+
/** 主按钮文本和配置 */
|
|
12
|
+
primaryButton?: {
|
|
13
|
+
text: string;
|
|
14
|
+
} & Omit<ButtonProps, 'children'>;
|
|
15
|
+
/** 次要按钮文本和配置 */
|
|
16
|
+
secondaryButton?: {
|
|
17
|
+
text: string;
|
|
18
|
+
} & Omit<ButtonProps, 'children'>;
|
|
19
|
+
/** 主题 */
|
|
20
|
+
theme?: Theme;
|
|
21
|
+
/** 底部产品列表 */
|
|
22
|
+
products?: Array<{
|
|
23
|
+
title: string;
|
|
24
|
+
}>;
|
|
25
|
+
};
|
|
18
26
|
/** 自定义类名 */
|
|
19
27
|
className?: string;
|
|
20
|
-
/** 主题 */
|
|
21
|
-
theme?: Theme;
|
|
22
|
-
/** 底部产品列表 */
|
|
23
|
-
products?: Array<{
|
|
24
|
-
title: string;
|
|
25
|
-
active?: boolean;
|
|
26
|
-
}>;
|
|
27
28
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MultiLayoutGraphicBlockProps } from './types';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
(props: Omit<MultiLayoutGraphicBlockProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import e from"react";import{withStyles as o}from"../../shared/Styles.js";const a=e.forwardRef((i,d)=>{const{layout:t}=i.data;return r("div",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:d,children:(()=>{switch(t){case"single-row":return r("div",{children:"single-row"});case"grid-2-1":return r("div",{children:"grid-2-1"});case"grid-1-2":return r("div",{children:"grid-1-2"});case"grid-3":return r("div",{children:"grid-3"});case"grid-2x2":return r("div",{children:"grid-2x2"});case"grid-1-3":return r("div",{children:"grid-1-3"});case"grid-1-2-2":return r("div",{children:"grid-1-2-2"});case"grid-2-2-1":return r("div",{children:"grid-2-2-1"});case"grid-1-4":return r("div",{children:"grid-1-4"})}})()})});var u=o(a);export{u as default};
|
|
2
|
+
//# sourceMappingURL=MultiLayoutGraphicBlock.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport type { MultiLayoutGraphicBlockProps } from './types'\nimport { withStyles } from '../../shared/Styles.js'\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { layout } = props.data\n\n const renderedContent = () => {\n switch (layout) {\n case 'single-row':\n return <div>single-row</div>\n case 'grid-2-1':\n return <div>grid-2-1</div>\n case 'grid-1-2':\n return <div>grid-1-2</div>\n case 'grid-3':\n return <div>grid-3</div>\n case 'grid-2x2':\n return <div>grid-2x2</div>\n case 'grid-1-3':\n return <div>grid-1-3</div>\n case 'grid-1-2-2':\n return <div>grid-1-2-2</div>\n case 'grid-2-2-1':\n return <div>grid-2-2-1</div>\n case 'grid-1-4':\n return <div>grid-1-4</div>\n }\n }\n\n return (\n <div data-ui-component-id=\"MultiLayoutGraphicBlock\" ref={ref}>\n {renderedContent()}\n </div>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\n"],
|
|
5
|
+
"mappings": "AAUe,cAAAA,MAAA,oBAVf,OAAOC,MAAW,QAElB,OAAS,cAAAC,MAAkB,yBAE3B,MAAMC,EAA0BF,EAAM,WAAyD,CAACG,EAAOC,IAAQ,CAC7G,KAAM,CAAE,OAAAC,CAAO,EAAIF,EAAM,KAyBzB,OACEJ,EAAC,OAAI,uBAAqB,0BAA0B,IAAKK,EACtD,UAzBmB,IAAM,CAC5B,OAAQC,EAAQ,CACd,IAAK,aACH,OAAON,EAAC,OAAI,sBAAU,EACxB,IAAK,WACH,OAAOA,EAAC,OAAI,oBAAQ,EACtB,IAAK,WACH,OAAOA,EAAC,OAAI,oBAAQ,EACtB,IAAK,SACH,OAAOA,EAAC,OAAI,kBAAM,EACpB,IAAK,WACH,OAAOA,EAAC,OAAI,oBAAQ,EACtB,IAAK,WACH,OAAOA,EAAC,OAAI,oBAAQ,EACtB,IAAK,aACH,OAAOA,EAAC,OAAI,sBAAU,EACxB,IAAK,aACH,OAAOA,EAAC,OAAI,sBAAU,EACxB,IAAK,WACH,OAAOA,EAAC,OAAI,oBAAQ,CACxB,CACF,GAIqB,EACnB,CAEJ,CAAC,EAED,IAAOO,EAAQL,EAAWC,CAAuB",
|
|
6
|
+
"names": ["jsx", "React", "withStyles", "MultiLayoutGraphicBlock", "props", "ref", "layout", "MultiLayoutGraphicBlock_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './MultiLayoutGraphicBlock.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Theme } from '../../types/props';
|
|
2
|
+
export type MultiLayoutGraphicBlockProps = {
|
|
3
|
+
data: {
|
|
4
|
+
layout: 'single-row' | 'grid-2-1' | 'grid-1-2' | 'grid-3' | 'grid-2x2' | 'grid-1-3' | 'grid-1-2-2' | 'grid-2-2-1' | 'grid-1-4';
|
|
5
|
+
blocks: {
|
|
6
|
+
theme: Theme;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
imageUrl: string;
|
|
10
|
+
primaryBtn: {
|
|
11
|
+
text: string;
|
|
12
|
+
link: string;
|
|
13
|
+
};
|
|
14
|
+
secondaryBtn: {
|
|
15
|
+
text: string;
|
|
16
|
+
link: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as c}from"react/jsx-runtime";import n from"react";import{cn as a}from"../../helpers/utils.js";import{Heading as m}from"../../components/index.js";const s=n.forwardRef((e,t)=>{const{title:o,className:r,...i}=e;return c(m,{ref:t,className:a("section-heading",r),html:o,...i})});var l=s;export{l as default};
|
|
2
|
+
//# sourceMappingURL=SectionHeading.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/SectionHeading/SectionHeading.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport type { SectionHeadingProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\n\nconst SectionHeading = React.forwardRef<HTMLDivElement, SectionHeadingProps>((props, ref) => {\n const { title, className, ...rest } = props\n\n return <Heading ref={ref} className={cn('section-heading', className)} html={title} {...rest} />\n})\n\nexport default SectionHeading\n"],
|
|
5
|
+
"mappings": "AAQS,cAAAA,MAAA,oBART,OAAOC,MAAW,QAElB,OAAS,MAAAC,MAAU,yBACnB,OAAS,WAAAC,MAAe,4BAExB,MAAMC,EAAiBH,EAAM,WAAgD,CAACI,EAAOC,IAAQ,CAC3F,KAAM,CAAE,MAAAC,EAAO,UAAAC,EAAW,GAAGC,CAAK,EAAIJ,EAEtC,OAAOL,EAACG,EAAA,CAAQ,IAAKG,EAAK,UAAWJ,EAAG,kBAAmBM,CAAS,EAAG,KAAMD,EAAQ,GAAGE,EAAM,CAChG,CAAC,EAED,IAAOC,EAAQN",
|
|
6
|
+
"names": ["jsx", "React", "cn", "Heading", "SectionHeading", "props", "ref", "title", "className", "rest", "SectionHeading_default"]
|
|
7
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/SectionHeading/types.ts"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nexport interface SectionHeadingProps {\n title: string\n className?: string\n children: React.ReactNode\n}\n"],
|
|
5
|
+
"mappings": "AAAA,MAAkB",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -9,3 +9,5 @@ export { default as HeroBanner } from './HeroBanner/index.js';
|
|
|
9
9
|
export { default as AccordionCards } from './AccordionCards/index.js';
|
|
10
10
|
export { default as Graphic } from './Graphic/index.js';
|
|
11
11
|
export { Marquee, MarqueeList, MarqueeImageContent, MarqueeTextContent, type FastMarqueeProps, type MarqueeListProps, type MarqueeImageContentProps, type MarqueeTextContentProps, } from './Marquee/index.js';
|
|
12
|
+
export * from './Marquee/index.js';
|
|
13
|
+
export { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as t}from"./Shelf/index.js";import{default as o}from"./BrandEquity/index.js";import{default as p}from"./MemberEquity/index.js";import{default as s}from"./Slogan/index.js";import{default as m}from"./ShelfDisplay/index.js";import{default as
|
|
1
|
+
import{default as t}from"./Shelf/index.js";import{default as o}from"./BrandEquity/index.js";import{default as p}from"./MemberEquity/index.js";import{default as s}from"./Slogan/index.js";import{default as m}from"./ShelfDisplay/index.js";import{default as d}from"./Evaluate/index.js";import{default as q}from"./Category/index.js";import{default as i}from"./HeroBanner/index.js";import{default as C}from"./AccordionCards/index.js";import{default as g}from"./Graphic/index.js";import{Marquee as P,MarqueeList as B,MarqueeImageContent as E,MarqueeTextContent as L}from"./Marquee/index.js";export*from"./Marquee/index.js";import{default as I}from"./MultiLayoutGraphicBlock/index.js";export{C as AccordionCards,o as BrandEquity,q as Category,d as Evaluate,g as Graphic,i as HeroBanner,P as Marquee,E as MarqueeImageContent,B as MarqueeList,L as MarqueeTextContent,p as MemberEquity,I as MultiLayoutGraphicBlock,t as Shelf,m as ShelfDisplay,s as Slogan};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/biz-components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as Shelf } from './Shelf/index.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport {\n Marquee,\n MarqueeList,\n MarqueeImageContent,\n MarqueeTextContent,\n type FastMarqueeProps,\n type MarqueeListProps,\n type MarqueeImageContentProps,\n type MarqueeTextContentProps,\n} from './Marquee/index.js'\n"],
|
|
5
|
-
"mappings": "AAAA,OAAoB,WAAXA,MAAwB,mBACjC,OAAoB,WAAXA,MAA8B,yBACvC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA6B,wBACtC,OAAoB,WAAXA,MAAiC,4BAC1C,OAAoB,WAAXA,MAA0B,qBACnC,OACE,WAAAC,EACA,eAAAC,EACA,uBAAAC,EACA,sBAAAC,MAKK",
|
|
4
|
+
"sourcesContent": ["export { default as Shelf } from './Shelf/index.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport {\n Marquee,\n MarqueeList,\n MarqueeImageContent,\n MarqueeTextContent,\n type FastMarqueeProps,\n type MarqueeListProps,\n type MarqueeImageContentProps,\n type MarqueeTextContentProps,\n} from './Marquee/index.js'\nexport * from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\n"],
|
|
5
|
+
"mappings": "AAAA,OAAoB,WAAXA,MAAwB,mBACjC,OAAoB,WAAXA,MAA8B,yBACvC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA6B,wBACtC,OAAoB,WAAXA,MAAiC,4BAC1C,OAAoB,WAAXA,MAA0B,qBACnC,OACE,WAAAC,EACA,eAAAC,EACA,uBAAAC,EACA,sBAAAC,MAKK,qBACP,WAAc,qBACd,OAAoB,WAAXJ,MAA0C",
|
|
6
6
|
"names": ["default", "Marquee", "MarqueeList", "MarqueeImageContent", "MarqueeTextContent"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{cn as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{cn as c}from"../helpers/index.js";import{Slot as k}from"@radix-ui/react-slot";import{cva as b}from"class-variance-authority";import y from"react";const P=b("tracking font-heading text-info-primary leading-tight",{variants:{size:{1:"text-heading-1 lg-desktop:text-[16px]",2:"text-heading-2 lg-desktop:text-[24px]",3:"text-heading-3 lg-desktop:text-[32px]",4:"text-heading-4 desktop:text-[36px] lg-desktop:text-[48px]",5:"text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]"},weight:{medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:5,weight:"bold"}}),a=y.forwardRef((l,r)=>{const{children:t,className:s,size:d=5,align:g,weight:p,asChild:h,as:x="h1",color:e,html:n,...m}=l,o=n?{dangerouslySetInnerHTML:{__html:n}}:null,f=e?{style:{color:e}}:null;return i(k,{...m,ref:r,className:c(P({size:d,weight:p,align:g}),s),...o,...f,children:h?t:i(x,{children:o?null:t})})});a.displayName="Heading";export{a as Heading};
|
|
2
2
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/heading.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('tracking text-info-primary leading-tight', {\n variants: {\n size: {\n 1: 'text-heading-1 lg-desktop:text-[16px]',\n 2: 'text-heading-2 lg-desktop:text-[24px]',\n 3: 'text-heading-3 lg-desktop:text-[32px]',\n 4: 'text-heading-4 desktop:text-[36px] lg-desktop:text-[48px]',\n 5: 'text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 5,\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size = 5, align, weight, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
-
"mappings": "AAwE4B,cAAAA,MAAA,oBAxE5B,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BACvC,OAAOC,MAAW,QAElB,MAAMC,EAAkBF,EAAI,
|
|
4
|
+
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('tracking font-heading text-info-primary leading-tight', {\n variants: {\n size: {\n 1: 'text-heading-1 lg-desktop:text-[16px]',\n 2: 'text-heading-2 lg-desktop:text-[24px]',\n 3: 'text-heading-3 lg-desktop:text-[32px]',\n 4: 'text-heading-4 desktop:text-[36px] lg-desktop:text-[48px]',\n 5: 'text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 5,\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size = 5, align, weight, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
+
"mappings": "AAwE4B,cAAAA,MAAA,oBAxE5B,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BACvC,OAAOC,MAAW,QAElB,MAAMC,EAAkBF,EAAI,wDAAyD,CACnF,SAAU,CACR,KAAM,CACJ,EAAG,wCACH,EAAG,wCACH,EAAG,wCACH,EAAG,4DACH,EAAG,2DACL,EACA,OAAQ,CACN,OAAQ,cACR,SAAU,gBACV,KAAM,YACN,UAAW,iBACX,MAAO,YACT,EACA,MAAO,CACL,KAAM,YACN,OAAQ,cACR,MAAO,YACT,CACF,EACA,gBAAiB,CACf,KAAM,EACN,OAAQ,MACV,CACF,CAAC,EAWKG,EAAUF,EAAM,WAAyC,CAACG,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,EAAG,MAAAC,EAAO,OAAAC,EAAQ,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIX,EAC1GY,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KACJ,OACEhB,EAACE,EAAA,CACE,GAAGgB,EACJ,IAAKV,EACL,UAAWP,EACTI,EAAgB,CACd,KAAAM,EACA,OAAAE,EACA,MAAAD,CACF,CAAC,EACDF,CACF,EACC,GAAGS,EACH,GAAGC,EAEH,SAAAN,EAAUL,EAAWT,EAACe,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EAEDH,EAAQ,YAAc",
|
|
6
6
|
"names": ["jsx", "cn", "Slot", "cva", "React", "headingVariants", "Heading", "props", "forwardedRef", "children", "className", "size", "align", "weight", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as d,jsx as o,jsxs as m}from"react/jsx-runtime";import{useMemo as l}from"react";const a=()=>`style_${Math.random().toString(36).substring(2,9)}_${Date.now().toString(36)}`,y=t=>{const{style:e,uid:s,disabled:n}=t;return{style:e,uid:s,disabled:n}},u=({style:t,uid:e=a(),disabled:s=!1})=>!t||s?null:o("style",{"data-style-id":e,children:`.block-${e} { ${t} }`}),S=t=>{const e=l(()=>t?.uid||a(),[t?.uid]),s=l(()=>o(u,{...t,uid:e}),[t,e]);return{className:`block-${e} `,StyleComponent:s,uid:e}};function p(t,e){const s=function(n){const r={...e,...y(n)},{className:i,StyleComponent:c}=S(r);return m(d,{children:[c,o(t,{...n,className:`${i} ${n.className}`})]})};return s.displayName=t.displayName||t.name||"Component",s}export{y as getStylesProps,S as useStyles,p as withStyles};
|
|
2
2
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/shared/Styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react'\n\nexport interface StylesProps {\n /** \u81EA\u5B9A\u4E49\u6837\u5F0F\u5B57\u7B26\u4E32 */\n style?: string\n /** \u552F\u4E00\u6807\u8BC6\u7B26 */\n uid?: string\n /** \u662F\u5426\u7981\u7528 */\n disabled?: boolean\n}\n\n/**\n * \u751F\u6210\u552F\u4E00\u6807\u8BC6\u7B26\n */\nconst generateUID = () => {\n return `style_${Math.random().toString(36).substring(2, 9)}_${Date.now().toString(36)}`\n}\n\n/**\n * \u4ECE\u7EC4\u4EF6 props \u4E2D\u63D0\u53D6\u6837\u5F0F\u76F8\u5173\u5C5E\u6027\n */\nexport const getStylesProps = <T extends Record<string, unknown>>(props: T & StylesProps): StylesProps => {\n const { style, uid, disabled } = props\n return { style, uid, disabled }\n}\n\n/**\n * \u6837\u5F0F\u6CE8\u5165\u7EC4\u4EF6\n */\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID(), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return <style data-style-id={uid}>{`.block-${uid} { ${style} }`}</style>\n}\n\n/**\n * \u6837\u5F0F Hook\uFF0C\u8FD4\u56DE\u6837\u5F0F\u7C7B\u540D\u548C\u6837\u5F0F\u7EC4\u4EF6\n * @param styleProps - \u6837\u5F0F\u5C5E\u6027\n */\nexport const useStyles = (styleProps: Partial<StylesProps>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID(), [styleProps?.uid])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n } as const\n}\n\n/**\n * \u6837\u5F0F\u9AD8\u9636\u7EC4\u4EF6\uFF0C \u7528\u4E8E\u7ED9\u7EC4\u4EF6\u7528style \u6807\u7B7E\u7684\u5F62\u5F0F\u8FFD\u52A0\u6837\u5F0F\n * @param WrappedComponent - \u9700\u8981\u5305\u88C5\u7684\u7EC4\u4EF6\n * @param defaultStyleProps - \u9ED8\u8BA4\u6837\u5F0F\u5C5E\u6027\n */\nexport function withStyles<P extends object>(\n WrappedComponent: React.ComponentType<P>,\n defaultStyleProps?: Partial<StylesProps>\n) {\n const WithStyles = function (props: Omit<P, keyof StylesProps> & Partial<StylesProps> & { className?: string }) {\n const finalStyleProps = {\n ...defaultStyleProps,\n ...getStylesProps(props),\n }\n\n const { className, StyleComponent } = useStyles(finalStyleProps)\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent {...(props as P)} className={`${className} ${props.className}`} />\n </>\n )\n }\n\n // \u76F4\u63A5\u4F7F\u7528\u539F\u59CB\u7EC4\u4EF6\u7684\u540D\u79F0\n WithStyles.displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'\n return WithStyles\n}\n\
|
|
5
|
-
"mappings": "AAkCS,OAqCH,YAAAA,EArCG,OAAAC,EAqCH,QAAAC,MArCG,oBAlCT,
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react'\n\nexport interface StylesProps {\n /** \u81EA\u5B9A\u4E49\u6837\u5F0F\u5B57\u7B26\u4E32 */\n style?: string\n /** \u552F\u4E00\u6807\u8BC6\u7B26 */\n uid?: string\n /** \u662F\u5426\u7981\u7528 */\n disabled?: boolean\n}\n\n/**\n * \u751F\u6210\u552F\u4E00\u6807\u8BC6\u7B26\n */\nconst generateUID = () => {\n return `style_${Math.random().toString(36).substring(2, 9)}_${Date.now().toString(36)}`\n}\n\n/**\n * \u4ECE\u7EC4\u4EF6 props \u4E2D\u63D0\u53D6\u6837\u5F0F\u76F8\u5173\u5C5E\u6027\n */\nexport const getStylesProps = <T extends Record<string, unknown>>(props: T & StylesProps): StylesProps => {\n const { style, uid, disabled } = props\n return { style, uid, disabled }\n}\n\n/**\n * \u6837\u5F0F\u6CE8\u5165\u7EC4\u4EF6\n */\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID(), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return <style data-style-id={uid}>{`.block-${uid} { ${style} }`}</style>\n}\n\n/**\n * \u6837\u5F0F Hook\uFF0C\u8FD4\u56DE\u6837\u5F0F\u7C7B\u540D\u548C\u6837\u5F0F\u7EC4\u4EF6\n * @param styleProps - \u6837\u5F0F\u5C5E\u6027\n */\nexport const useStyles = (styleProps: Partial<StylesProps>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID(), [styleProps?.uid])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n } as const\n}\n\n/**\n * \u6837\u5F0F\u9AD8\u9636\u7EC4\u4EF6\uFF0C \u7528\u4E8E\u7ED9\u7EC4\u4EF6\u7528style \u6807\u7B7E\u7684\u5F62\u5F0F\u8FFD\u52A0\u6837\u5F0F\n * @param WrappedComponent - \u9700\u8981\u5305\u88C5\u7684\u7EC4\u4EF6\n * @param defaultStyleProps - \u9ED8\u8BA4\u6837\u5F0F\u5C5E\u6027\n */\nexport function withStyles<P extends object>(\n WrappedComponent: React.ComponentType<P>,\n defaultStyleProps?: Partial<StylesProps>\n) {\n const WithStyles = function (props: Omit<P, keyof StylesProps> & Partial<StylesProps> & { className?: string }) {\n const finalStyleProps = {\n ...defaultStyleProps,\n ...getStylesProps(props),\n }\n\n const { className, StyleComponent } = useStyles(finalStyleProps)\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent {...(props as P)} className={`${className} ${props.className}`} />\n </>\n )\n }\n\n // \u76F4\u63A5\u4F7F\u7528\u539F\u59CB\u7EC4\u4EF6\u7684\u540D\u79F0\n WithStyles.displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'\n return WithStyles\n}\n\n\n"],
|
|
5
|
+
"mappings": "AAkCS,OAqCH,YAAAA,EArCG,OAAAC,EAqCH,QAAAC,MArCG,oBAlCT,OAAgB,WAAAC,MAAe,QAc/B,MAAMC,EAAc,IACX,SAAS,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAG,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,SAAS,EAAE,CAAC,GAM1EC,EAAqDC,GAAwC,CACxG,KAAM,CAAE,MAAAC,EAAO,IAAAC,EAAK,SAAAC,CAAS,EAAIH,EACjC,MAAO,CAAE,MAAAC,EAAO,IAAAC,EAAK,SAAAC,CAAS,CAChC,EAKMC,EAAgC,CAAC,CAAE,MAAAH,EAAO,IAAAC,EAAMJ,EAAY,EAAG,SAAAK,EAAW,EAAM,IAChF,CAACF,GAASE,EACL,KAGFR,EAAC,SAAM,gBAAeO,EAAM,mBAAUA,CAAG,MAAMD,CAAK,KAAK,EAOrDI,EAAaC,GAAqC,CAC7D,MAAMJ,EAAML,EAAQ,IAAMS,GAAY,KAAOR,EAAY,EAAG,CAACQ,GAAY,GAAG,CAAC,EAEvEC,EAAiBV,EAAQ,IAAMF,EAACS,EAAA,CAAQ,GAAGE,EAAY,IAAKJ,EAAK,EAAI,CAACI,EAAYJ,CAAG,CAAC,EAE5F,MAAO,CACL,UAAW,SAASA,CAAG,IACvB,eAAAK,EACA,IAAAL,CACF,CACF,EAOO,SAASM,EACdC,EACAC,EACA,CACA,MAAMC,EAAa,SAAUX,EAAmF,CAC9G,MAAMY,EAAkB,CACtB,GAAGF,EACH,GAAGX,EAAeC,CAAK,CACzB,EAEM,CAAE,UAAAa,EAAW,eAAAN,CAAe,EAAIF,EAAUO,CAAe,EAE/D,OACEhB,EAAAF,EAAA,CACG,UAAAa,EACDZ,EAACc,EAAA,CAAkB,GAAIT,EAAa,UAAW,GAAGa,CAAS,IAAIb,EAAM,SAAS,GAAI,GACpF,CAEJ,EAGA,OAAAW,EAAW,YAAcF,EAAiB,aAAeA,EAAiB,MAAQ,YAC3EE,CACT",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "useMemo", "generateUID", "getStylesProps", "props", "style", "uid", "disabled", "Styles", "useStyles", "styleProps", "StyleComponent", "withStyles", "WrappedComponent", "defaultStyleProps", "WithStyles", "finalStyleProps", "className"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t from"../biz-components/HeroBanner/HeroBanner.js";const
|
|
1
|
+
import t from"../biz-components/HeroBanner/HeroBanner.js";const r={title:"Biz-Components/HeroBanner",component:t,parameters:{layout:"fullscreen",docs:{description:{component:`
|
|
2
2
|
HeroBanner \u7EC4\u4EF6\u7528\u4E8E\u5C55\u793A\u7F51\u7AD9\u7684\u4E3B\u8981\u5185\u5BB9\u533A\u57DF\uFF0C\u901A\u5E38\u5305\u542B\u6807\u9898\u3001\u526F\u6807\u9898\u548C\u884C\u52A8\u6309\u94AE\u3002
|
|
3
3
|
|
|
4
4
|
### \u7279\u70B9
|
|
@@ -6,5 +6,5 @@ HeroBanner \u7EC4\u4EF6\u7528\u4E8E\u5C55\u793A\u7F51\u7AD9\u7684\u4E3B\u8981\u5
|
|
|
6
6
|
- \u4F7F\u7528 Mont For Anker \u5B57\u4F53\u4F5C\u4E3A\u6807\u9898
|
|
7
7
|
- \u53EF\u914D\u7F6E\u4E3B\u6309\u94AE\u548C\u6B21\u8981\u6309\u94AE
|
|
8
8
|
- \u652F\u6301\u5E95\u90E8\u4EA7\u54C1\u5217\u8868
|
|
9
|
-
`}}},tags:["autodocs"]};var n=
|
|
9
|
+
`}}},tags:["autodocs"]};var n=r;const e="https://cdn.shopify.com/s/files/1/0521/9411/5753/files/aee13b30b2c77fc8d0a46e4f19fa48cb_6a25debf-f95e-4ca6-990b-babcad65216c.png?v=1745468206",o="https://cdn.shopify.com/s/files/1/0517/6767/3016/files/87e32d61fc407d5e6c8aff00f3453072.jpg?v=1745999899",i={args:{data:{title:"Anker Laptop Power",subtitle:"Anker Prime 240W GaN Desktop Charger (4 Ports)",background:e,theme:"light",primaryButton:{text:"Shop Now"},secondaryButton:{text:"Learn More"},products:[{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"},{title:"Anker Prime 27,650mAh Power Bank (250W)"},{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"}]}}},s={args:{data:{title:"Power Your Life",subtitle:"Experience the next generation of charging technology with our innovative solutions designed for modern life.",background:o,theme:"dark",primaryButton:{text:"Shop Now"},secondaryButton:{text:"Learn More"},products:[{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"},{title:"Anker Prime 27,650mAh Power Bank (250W)"},{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"}]}}},p={args:{data:{title:"Future of Charging",subtitle:"Step into the future with our revolutionary charging solutions that redefine the way you power your devices.",background:e,theme:"light",primaryButton:{text:"Shop Now"},products:[{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"},{title:"Anker Prime 27,650mAh Power Bank (250W)"},{title:"Anker Prime 240W GaN Desktop Charger (4 Ports)"}]}}};export{s as DarkTheme,i as LightTheme,p as WithoutSecondaryButton,n as default};
|
|
10
10
|
//# sourceMappingURL=HeroBanner.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/HeroBanner.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport HeroBanner from '../biz-components/HeroBanner/HeroBanner.js'\n\nconst meta = {\n title: 'Biz-Components/HeroBanner',\n component: HeroBanner,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: `\nHeroBanner \u7EC4\u4EF6\u7528\u4E8E\u5C55\u793A\u7F51\u7AD9\u7684\u4E3B\u8981\u5185\u5BB9\u533A\u57DF\uFF0C\u901A\u5E38\u5305\u542B\u6807\u9898\u3001\u526F\u6807\u9898\u548C\u884C\u52A8\u6309\u94AE\u3002\n\n### \u7279\u70B9\n- \u652F\u6301\u4EAE\u8272\u548C\u6697\u8272\u4E3B\u9898\n- \u4F7F\u7528 Mont For Anker \u5B57\u4F53\u4F5C\u4E3A\u6807\u9898\n- \u53EF\u914D\u7F6E\u4E3B\u6309\u94AE\u548C\u6B21\u8981\u6309\u94AE\n- \u652F\u6301\u5E95\u90E8\u4EA7\u54C1\u5217\u8868\n `,\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof HeroBanner>\n\nexport default meta\ntype Story = StoryObj<typeof HeroBanner>\n\nconst defaultBackground =\n 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/aee13b30b2c77fc8d0a46e4f19fa48cb_6a25debf-f95e-4ca6-990b-babcad65216c.png?v=1745468206'\n\nexport const LightTheme: Story = {\n args: {\n title: 'Anker Laptop Power',\n
|
|
5
|
-
"mappings": "AACA,OAAOA,MAAgB,6CAEvB,MAAMC,EAAO,CACX,MAAO,4BACP,UAAWD,EACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SASb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOE,EAAQD,EAGf,MAAME,EACJ,
|
|
6
|
-
"names": ["HeroBanner", "meta", "HeroBanner_stories_default", "defaultBackground", "LightTheme", "DarkTheme", "WithoutSecondaryButton"]
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport HeroBanner from '../biz-components/HeroBanner/HeroBanner.js'\n\nconst meta = {\n title: 'Biz-Components/HeroBanner',\n component: HeroBanner,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: `\nHeroBanner \u7EC4\u4EF6\u7528\u4E8E\u5C55\u793A\u7F51\u7AD9\u7684\u4E3B\u8981\u5185\u5BB9\u533A\u57DF\uFF0C\u901A\u5E38\u5305\u542B\u6807\u9898\u3001\u526F\u6807\u9898\u548C\u884C\u52A8\u6309\u94AE\u3002\n\n### \u7279\u70B9\n- \u652F\u6301\u4EAE\u8272\u548C\u6697\u8272\u4E3B\u9898\n- \u4F7F\u7528 Mont For Anker \u5B57\u4F53\u4F5C\u4E3A\u6807\u9898\n- \u53EF\u914D\u7F6E\u4E3B\u6309\u94AE\u548C\u6B21\u8981\u6309\u94AE\n- \u652F\u6301\u5E95\u90E8\u4EA7\u54C1\u5217\u8868\n `,\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof HeroBanner>\n\nexport default meta\ntype Story = StoryObj<typeof HeroBanner>\n\nconst defaultBackground =\n 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/aee13b30b2c77fc8d0a46e4f19fa48cb_6a25debf-f95e-4ca6-990b-babcad65216c.png?v=1745468206'\n\nconst darkBackground =\n 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/87e32d61fc407d5e6c8aff00f3453072.jpg?v=1745999899'\n\nexport const LightTheme: Story = {\n args: {\n data: {\n title: 'Anker Laptop Power',\n subtitle: 'Anker Prime 240W GaN Desktop Charger (4 Ports)',\n background: defaultBackground,\n theme: 'light',\n primaryButton: {\n text: 'Shop Now',\n },\n secondaryButton: {\n text: 'Learn More',\n },\n products: [\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n { title: 'Anker Prime 27,650mAh Power Bank (250W)' },\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n ],\n },\n },\n}\n\nexport const DarkTheme: Story = {\n args: {\n data: {\n title: 'Power Your Life',\n subtitle:\n 'Experience the next generation of charging technology with our innovative solutions designed for modern life.',\n background: darkBackground,\n theme: 'dark',\n primaryButton: {\n text: 'Shop Now',\n },\n secondaryButton: {\n text: 'Learn More',\n },\n products: [\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n { title: 'Anker Prime 27,650mAh Power Bank (250W)' },\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n ],\n },\n },\n}\n\nexport const WithoutSecondaryButton: Story = {\n args: {\n data: {\n title: 'Future of Charging',\n subtitle:\n 'Step into the future with our revolutionary charging solutions that redefine the way you power your devices.',\n background: defaultBackground,\n theme: 'light',\n primaryButton: {\n text: 'Shop Now',\n },\n products: [\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n { title: 'Anker Prime 27,650mAh Power Bank (250W)' },\n { title: 'Anker Prime 240W GaN Desktop Charger (4 Ports)' },\n ],\n },\n },\n}\n"],
|
|
5
|
+
"mappings": "AACA,OAAOA,MAAgB,6CAEvB,MAAMC,EAAO,CACX,MAAO,4BACP,UAAWD,EACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SASb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOE,EAAQD,EAGf,MAAME,EACJ,gJAEIC,EACJ,2GAEWC,EAAoB,CAC/B,KAAM,CACJ,KAAM,CACJ,MAAO,qBACP,SAAU,iDACV,WAAYF,EACZ,MAAO,QACP,cAAe,CACb,KAAM,UACR,EACA,gBAAiB,CACf,KAAM,YACR,EACA,SAAU,CACR,CAAE,MAAO,gDAAiD,EAC1D,CAAE,MAAO,yCAA0C,EACnD,CAAE,MAAO,gDAAiD,CAC5D,CACF,CACF,CACF,EAEaG,EAAmB,CAC9B,KAAM,CACJ,KAAM,CACJ,MAAO,kBACP,SACE,gHACF,WAAYF,EACZ,MAAO,OACP,cAAe,CACb,KAAM,UACR,EACA,gBAAiB,CACf,KAAM,YACR,EACA,SAAU,CACR,CAAE,MAAO,gDAAiD,EAC1D,CAAE,MAAO,yCAA0C,EACnD,CAAE,MAAO,gDAAiD,CAC5D,CACF,CACF,CACF,EAEaG,EAAgC,CAC3C,KAAM,CACJ,KAAM,CACJ,MAAO,qBACP,SACE,+GACF,WAAYJ,EACZ,MAAO,QACP,cAAe,CACb,KAAM,UACR,EACA,SAAU,CACR,CAAE,MAAO,gDAAiD,EAC1D,CAAE,MAAO,yCAA0C,EACnD,CAAE,MAAO,gDAAiD,CAC5D,CACF,CACF,CACF",
|
|
6
|
+
"names": ["HeroBanner", "meta", "HeroBanner_stories_default", "defaultBackground", "darkBackground", "LightTheme", "DarkTheme", "WithoutSecondaryButton"]
|
|
7
7
|
}
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1285,7 +1285,10 @@ video {
|
|
|
1285
1285
|
text-align: right;
|
|
1286
1286
|
}
|
|
1287
1287
|
.font-body {
|
|
1288
|
-
font-family: Inter,
|
|
1288
|
+
font-family: var(--font-Inter), sans-serif;
|
|
1289
|
+
}
|
|
1290
|
+
.font-heading {
|
|
1291
|
+
font-family: var(--font-MontForAnker), sans-serif;
|
|
1289
1292
|
}
|
|
1290
1293
|
.text-2xl {
|
|
1291
1294
|
font-size: 1.5rem;
|
package/tailwind.config.ts
CHANGED