@anker-in/headless-ui 0.0.27-alpha.0 → 0.0.27-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +2 -2
- package/dist/cjs/biz-components/Category/index.js +1 -1
- package/dist/cjs/biz-components/Category/index.js.map +2 -2
- package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -0
- package/dist/cjs/biz-components/Evaluate/index.js +1 -1
- package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
- package/dist/cjs/biz-components/Marquee/index.js +1 -1
- package/dist/cjs/biz-components/Marquee/index.js.map +2 -2
- package/dist/cjs/biz-components/MemberEquity/index.js +30 -30
- package/dist/cjs/biz-components/MemberEquity/index.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.js +9 -9
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/cjs/biz-components/Slogan/index.js +1 -1
- package/dist/cjs/biz-components/Slogan/index.js.map +2 -2
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +2 -2
- package/dist/cjs/components/card.js +1 -1
- package/dist/cjs/components/card.js.map +2 -2
- package/dist/cjs/components/carousel.js +1 -1
- package/dist/cjs/components/carousel.js.map +2 -2
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +2 -2
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +2 -2
- package/dist/cjs/components/gird.js +1 -1
- package/dist/cjs/components/gird.js.map +2 -2
- package/dist/cjs/components/heading.d.ts +1 -1
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +2 -2
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/components/text.js.map +1 -1
- package/dist/cjs/stories/container.stories.js +6 -6
- package/dist/cjs/stories/container.stories.js.map +2 -2
- package/dist/cjs/stories/dialog.stories.js +1 -1
- package/dist/cjs/stories/dialog.stories.js.map +2 -2
- package/dist/cjs/stories/evaluate.stories.js +1 -1
- package/dist/cjs/stories/evaluate.stories.js.map +2 -2
- package/dist/cjs/stories/heading.stories.d.ts +3 -2
- package/dist/cjs/stories/heading.stories.js +1 -1
- package/dist/cjs/stories/heading.stories.js.map +2 -2
- package/dist/cjs/stories/text.stories.js +1 -1
- package/dist/cjs/stories/text.stories.js.map +2 -2
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +2 -2
- package/dist/esm/biz-components/Category/index.js +1 -1
- package/dist/esm/biz-components/Category/index.js.map +2 -2
- package/dist/esm/biz-components/Evaluate/index.d.ts +1 -0
- package/dist/esm/biz-components/Evaluate/index.js +1 -1
- package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
- package/dist/esm/biz-components/Marquee/index.js +1 -1
- package/dist/esm/biz-components/Marquee/index.js.map +2 -2
- package/dist/esm/biz-components/MemberEquity/index.js +29 -29
- package/dist/esm/biz-components/MemberEquity/index.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/index.js +9 -9
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/esm/biz-components/Slogan/index.js +1 -1
- package/dist/esm/biz-components/Slogan/index.js.map +2 -2
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +2 -2
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/card.js.map +2 -2
- package/dist/esm/components/carousel.js +1 -1
- package/dist/esm/components/carousel.js.map +2 -2
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/container.js.map +2 -2
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +2 -2
- package/dist/esm/components/gird.js +1 -1
- package/dist/esm/components/gird.js.map +2 -2
- package/dist/esm/components/heading.d.ts +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.js.map +2 -2
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.js.map +1 -1
- package/dist/esm/stories/container.stories.js +6 -6
- package/dist/esm/stories/container.stories.js.map +2 -2
- package/dist/esm/stories/dialog.stories.js +1 -1
- package/dist/esm/stories/dialog.stories.js.map +2 -2
- package/dist/esm/stories/evaluate.stories.js +1 -1
- package/dist/esm/stories/evaluate.stories.js.map +2 -2
- package/dist/esm/stories/heading.stories.d.ts +3 -2
- package/dist/esm/stories/heading.stories.js +1 -1
- package/dist/esm/stories/heading.stories.js.map +2 -2
- package/dist/esm/stories/text.stories.js +2 -2
- package/dist/esm/stories/text.stories.js.map +2 -2
- package/package.json +2 -3
- package/style.css +69 -34
- package/src/biz-components/BrandEquity/BrandEquity.tsx +0 -77
- package/src/biz-components/BrandEquity/index.ts +0 -1
- package/src/biz-components/Category/index.tsx +0 -57
- package/src/biz-components/Evaluate/index.tsx +0 -85
- package/src/biz-components/HeroBanner/HeroBanner.tsx +0 -103
- package/src/biz-components/HeroBanner/index.tsx +0 -1
- package/src/biz-components/HeroBanner/types.ts +0 -28
- package/src/biz-components/Marquee/index.tsx +0 -79
- package/src/biz-components/MemberEquity/index.tsx +0 -114
- package/src/biz-components/MemberEquity/types.ts +0 -26
- package/src/biz-components/Shelf/Shelf.tsx +0 -22
- package/src/biz-components/Shelf/index.ts +0 -1
- package/src/biz-components/Shelf/types.ts +0 -6
- package/src/biz-components/ShelfDisplay/index.tsx +0 -142
- package/src/biz-components/Slogan/index.tsx +0 -53
- package/src/biz-components/Slogan/types.ts +0 -25
- package/src/biz-components/index.ts +0 -11
- package/src/components/alert.tsx +0 -124
- package/src/components/avatar.tsx +0 -126
- package/src/components/badge.tsx +0 -27
- package/src/components/button.tsx +0 -183
- package/src/components/card.tsx +0 -51
- package/src/components/carousel.tsx +0 -352
- package/src/components/checkbox.tsx +0 -42
- package/src/components/color.tsx +0 -77
- package/src/components/container.tsx +0 -28
- package/src/components/dialog.tsx +0 -98
- package/src/components/drawer.tsx +0 -115
- package/src/components/drop-down.tsx +0 -182
- package/src/components/gird.tsx +0 -90
- package/src/components/heading.tsx +0 -80
- package/src/components/index.ts +0 -26
- package/src/components/input-number.tsx +0 -216
- package/src/components/input.tsx +0 -79
- package/src/components/link.tsx +0 -99
- package/src/components/picture.tsx +0 -100
- package/src/components/popover.tsx +0 -31
- package/src/components/radio.tsx +0 -85
- package/src/components/skeleton.tsx +0 -41
- package/src/components/tabs.tsx +0 -78
- package/src/components/text.tsx +0 -99
- package/src/components/theme.tsx +0 -20
- package/src/helpers/component-props.ts +0 -17
- package/src/helpers/constants.ts +0 -0
- package/src/helpers/index.ts +0 -2
- package/src/helpers/utils.ts +0 -16
- package/src/icons/spinner.tsx +0 -26
- package/src/index.ts +0 -1
- package/src/shared/Styles.tsx +0 -94
- package/src/stories/HeroBanner.stories.tsx +0 -86
- package/src/stories/MemberEquity.stories.tsx +0 -107
- package/src/stories/alert.stories.tsx +0 -41
- package/src/stories/avatar.stories.tsx +0 -83
- package/src/stories/badge.stories.tsx +0 -40
- package/src/stories/brandEquity.stories.tsx +0 -73
- package/src/stories/button.stories.tsx +0 -145
- package/src/stories/card.stories.tsx +0 -97
- package/src/stories/carousel.stories.tsx +0 -161
- package/src/stories/category.stories.tsx +0 -52
- package/src/stories/checkbox.stories.tsx +0 -93
- package/src/stories/container.stories.tsx +0 -97
- package/src/stories/dialog.stories.tsx +0 -74
- package/src/stories/drawer.stories.tsx +0 -88
- package/src/stories/drop-down.stories.tsx +0 -83
- package/src/stories/evaluate.stories.tsx +0 -53
- package/src/stories/grid.stories.tsx +0 -190
- package/src/stories/heading.stories.tsx +0 -96
- package/src/stories/input-number.stories.tsx +0 -52
- package/src/stories/input.stories.tsx +0 -64
- package/src/stories/link.stories.tsx +0 -142
- package/src/stories/marquee.stories.tsx +0 -102
- package/src/stories/picture.stories.tsx +0 -51
- package/src/stories/popover.stories.tsx +0 -41
- package/src/stories/radio.stories.tsx +0 -55
- package/src/stories/shelf.stories.tsx +0 -35
- package/src/stories/shelfDisplay.stories.tsx +0 -69
- package/src/stories/skeleton.stories.tsx +0 -67
- package/src/stories/slogan.stories.tsx +0 -99
- package/src/stories/tabs.stories.tsx +0 -179
- package/src/stories/text.stories.tsx +0 -130
- package/src/styles/global.css +0 -4
- package/src/styles/index.css +0 -0
- package/src/types/index.ts +0 -0
- package/src/types/props.ts +0 -5
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import type { HeroBannerProps } from "./types.js"
|
|
3
|
-
import { Button, Text } from "../../components/index.js"
|
|
4
|
-
import { cn } from "../../helpers/index.js"
|
|
5
|
-
import { withStyles } from "../../shared/Styles.js"
|
|
6
|
-
|
|
7
|
-
const HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(
|
|
8
|
-
({
|
|
9
|
-
title,
|
|
10
|
-
subtitle,
|
|
11
|
-
background,
|
|
12
|
-
primaryButton,
|
|
13
|
-
secondaryButton,
|
|
14
|
-
theme = "light",
|
|
15
|
-
className,
|
|
16
|
-
products = []
|
|
17
|
-
}, ref) => {
|
|
18
|
-
const textColorClass = theme === "dark" ? "text-white" : "text-[#1D1D1F]"
|
|
19
|
-
const dividerColorClass = theme === "dark" ? "bg-white" : "bg-[#1D1D1F]"
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<div
|
|
23
|
-
ref={ref}
|
|
24
|
-
className={cn(
|
|
25
|
-
"relative flex min-h-[720px] w-full flex-col justify-between overflow-hidden bg-cover bg-center bg-no-repeat",
|
|
26
|
-
className
|
|
27
|
-
)}
|
|
28
|
-
style={{ backgroundImage: `url(${background})` }}
|
|
29
|
-
>
|
|
30
|
-
{/* 内容区域 */}
|
|
31
|
-
<div className="relative z-10 flex flex-col gap-8 px-32 pt-[307px]">
|
|
32
|
-
<div className="max-w-[686px] space-y-4">
|
|
33
|
-
<h1 className={cn(
|
|
34
|
-
"hero-banner-title font-mont text-[64px] font-bold leading-none tracking-[-0.04em]",
|
|
35
|
-
textColorClass
|
|
36
|
-
)}>
|
|
37
|
-
{title}
|
|
38
|
-
</h1>
|
|
39
|
-
<p className={cn(
|
|
40
|
-
"hero-banner-subtitle text-lg font-medium leading-[1.2] tracking-[-0.02em]",
|
|
41
|
-
textColorClass
|
|
42
|
-
)}>
|
|
43
|
-
{subtitle}
|
|
44
|
-
</p>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
{/* 按钮组 */}
|
|
48
|
-
<div className="flex items-center gap-4">
|
|
49
|
-
{secondaryButton && (
|
|
50
|
-
<Button
|
|
51
|
-
size="lg"
|
|
52
|
-
variant="nature"
|
|
53
|
-
theme={theme}
|
|
54
|
-
className="hero-banner-primary-button"
|
|
55
|
-
{...secondaryButton}
|
|
56
|
-
>
|
|
57
|
-
{secondaryButton.text}
|
|
58
|
-
</Button>
|
|
59
|
-
)}
|
|
60
|
-
{primaryButton && (
|
|
61
|
-
<Button
|
|
62
|
-
size="lg"
|
|
63
|
-
variant="secondary"
|
|
64
|
-
theme={theme}
|
|
65
|
-
{...primaryButton}
|
|
66
|
-
className="hero-banner-secondary-button bg-transparent border-black text-black hover:bg-black hover:text-white"
|
|
67
|
-
>
|
|
68
|
-
{primaryButton.text}
|
|
69
|
-
</Button>
|
|
70
|
-
)}
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
{/* 底部产品列表 */}
|
|
75
|
-
{products.length > 0 && (
|
|
76
|
-
<div className="relative z-10 flex items-center gap-3 px-32 pb-6">
|
|
77
|
-
{products.map((product, index) => (
|
|
78
|
-
<React.Fragment key={index}>
|
|
79
|
-
<Text
|
|
80
|
-
className={cn(
|
|
81
|
-
"hero-banner-product-text text-sm font-medium leading-[1.2] tracking-[-0.02em]",
|
|
82
|
-
theme === "dark" ? "text-white" : "text-[#1D1D1F]"
|
|
83
|
-
)}
|
|
84
|
-
>
|
|
85
|
-
{product.title}
|
|
86
|
-
</Text>
|
|
87
|
-
{index < products.length - 1 && (
|
|
88
|
-
<div className={cn("h-4 w-px", dividerColorClass)} />
|
|
89
|
-
)}
|
|
90
|
-
</React.Fragment>
|
|
91
|
-
))}
|
|
92
|
-
</div>
|
|
93
|
-
)}
|
|
94
|
-
</div>
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
HeroBanner.displayName = "HeroBanner"
|
|
100
|
-
|
|
101
|
-
export default withStyles(HeroBanner)
|
|
102
|
-
|
|
103
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './HeroBanner.js'
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps } from "../../components/button"
|
|
2
|
-
|
|
3
|
-
export interface HeroBannerProps {
|
|
4
|
-
/** 主标题 */
|
|
5
|
-
title: string
|
|
6
|
-
/** 副标题/描述文本 */
|
|
7
|
-
subtitle: string
|
|
8
|
-
/** 背景图片URL */
|
|
9
|
-
background: string
|
|
10
|
-
/** 主按钮文本和配置 */
|
|
11
|
-
primaryButton?: {
|
|
12
|
-
text: string
|
|
13
|
-
} & Omit<ButtonProps, 'children'>
|
|
14
|
-
/** 次要按钮文本和配置 */
|
|
15
|
-
secondaryButton?: {
|
|
16
|
-
text: string
|
|
17
|
-
} & Omit<ButtonProps, 'children'>
|
|
18
|
-
/** 自定义类名 */
|
|
19
|
-
className?: string
|
|
20
|
-
/** 主题 */
|
|
21
|
-
theme?: "light" | "dark"
|
|
22
|
-
/** 底部产品列表 */
|
|
23
|
-
products?: Array<{
|
|
24
|
-
title: string
|
|
25
|
-
active?: boolean
|
|
26
|
-
}>
|
|
27
|
-
}
|
|
28
|
-
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { cn } from '../../helpers/utils.js'
|
|
3
|
-
import { default as FastMarquee } from 'react-fast-marquee'
|
|
4
|
-
import { type MarqueeProps as FastMarqueeProps } from 'react-fast-marquee'
|
|
5
|
-
import { Picture, Text } from '../../components'
|
|
6
|
-
|
|
7
|
-
const Marquee = React.forwardRef<HTMLDivElement, FastMarqueeProps>(
|
|
8
|
-
({children, ...props}, ref) => {
|
|
9
|
-
return (
|
|
10
|
-
<FastMarquee
|
|
11
|
-
ref={ref}
|
|
12
|
-
{...props}
|
|
13
|
-
>
|
|
14
|
-
{children}
|
|
15
|
-
</FastMarquee>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
Marquee.displayName = 'Marquee'
|
|
21
|
-
|
|
22
|
-
interface MarqueeListProps {
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
className?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const MarqueeList = React.forwardRef<
|
|
28
|
-
HTMLDivElement,
|
|
29
|
-
MarqueeListProps
|
|
30
|
-
>(({ className, children, ...props }, ref) => {
|
|
31
|
-
return (
|
|
32
|
-
<div className={cn("flex gap-6 items-center md:gap-16", className)} ref={ref}>
|
|
33
|
-
{children}
|
|
34
|
-
</div>
|
|
35
|
-
)
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
MarqueeList.displayName = 'MarqueeList'
|
|
39
|
-
|
|
40
|
-
interface MarqueeImageContentProps {
|
|
41
|
-
image: string
|
|
42
|
-
className?: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const MarqueeImageContent = ({ image, className }: MarqueeImageContentProps) => {
|
|
46
|
-
return (
|
|
47
|
-
<Picture
|
|
48
|
-
source={image}
|
|
49
|
-
className={cn("aspect-w-[120] w-[72px] aspect-h-[80] md:w-[120px]", className)}
|
|
50
|
-
imgClassName="object-cover"
|
|
51
|
-
/>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
MarqueeImageContent.displayName = 'MarqueeImageContent'
|
|
56
|
-
|
|
57
|
-
interface MarqueeTextContentProps {
|
|
58
|
-
text: string
|
|
59
|
-
className?: string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const MarqueeTextContent = React.forwardRef<
|
|
63
|
-
HTMLDivElement,
|
|
64
|
-
MarqueeTextContentProps
|
|
65
|
-
>(({ text, className }, ref) => {
|
|
66
|
-
return (
|
|
67
|
-
<Text
|
|
68
|
-
as="div"
|
|
69
|
-
ref={ref}
|
|
70
|
-
html={text}
|
|
71
|
-
className={cn("size-14 text-nowrap flex items-center justify-center leading-[1.2] text-lines-2 font-medium", className)}
|
|
72
|
-
/>
|
|
73
|
-
)
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
MarqueeTextContent.displayName = 'MarqueeTextContent'
|
|
77
|
-
|
|
78
|
-
export { Marquee, MarqueeList, MarqueeImageContent, MarqueeTextContent }
|
|
79
|
-
export type { FastMarqueeProps, MarqueeListProps, MarqueeImageContentProps, MarqueeTextContentProps }
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from '../../components/index.js';
|
|
3
|
-
import { withStyles } from '../../shared/Styles.js';
|
|
4
|
-
import type { MemberEquityProps } from './types.js';
|
|
5
|
-
|
|
6
|
-
const MemberEquity: React.FC<MemberEquityProps> = ({
|
|
7
|
-
title,
|
|
8
|
-
description,
|
|
9
|
-
backgroundImage,
|
|
10
|
-
primaryButton,
|
|
11
|
-
secondaryButton,
|
|
12
|
-
shape = 'square',
|
|
13
|
-
theme = 'light',
|
|
14
|
-
className = '',
|
|
15
|
-
}) => {
|
|
16
|
-
|
|
17
|
-
const handleButtonPrimaryClick = () => {
|
|
18
|
-
// 执行主按钮的点击事件
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const handleButtonSecondaryClick = () => {
|
|
23
|
-
// 执行副按钮的点击事件
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<section
|
|
28
|
-
data-ui-component-id="MemberEquity"
|
|
29
|
-
className={`
|
|
30
|
-
relative w-full overflow-hidden bg-[#242426]
|
|
31
|
-
${shape === 'round' ? 'rounded-none sm:rounded-lg md:rounded-xl lg:rounded-2xl' : ''}
|
|
32
|
-
${className}
|
|
33
|
-
`}
|
|
34
|
-
>
|
|
35
|
-
|
|
36
|
-
<div
|
|
37
|
-
className="absolute inset-0 w-full h-full"
|
|
38
|
-
style={{
|
|
39
|
-
backgroundImage: `
|
|
40
|
-
radial-gradient(circle at 70% 176%, rgba(84, 85, 87, 0) 72%, rgba(84, 85, 87, 1) 100%),
|
|
41
|
-
url(${backgroundImage})
|
|
42
|
-
`,
|
|
43
|
-
backgroundSize: 'cover',
|
|
44
|
-
backgroundPosition: 'center',
|
|
45
|
-
}}
|
|
46
|
-
/>
|
|
47
|
-
<div className={`
|
|
48
|
-
relative w-full mx-auto
|
|
49
|
-
aspect-[343/200] xs:aspect-[343/200]
|
|
50
|
-
sm:aspect-[343/200]
|
|
51
|
-
md:aspect-[592/336]
|
|
52
|
-
lg:aspect-[800/448]
|
|
53
|
-
xl:aspect-[1000/560]
|
|
54
|
-
flex items-center
|
|
55
|
-
`}>
|
|
56
|
-
<div className={`
|
|
57
|
-
w-full px-4 sm:px-6 md:px-[76px] lg:px-[111px] xl:px-[139px]
|
|
58
|
-
flex flex-col gap-4 sm:gap-5 md:gap-6 lg:gap-7 xl:gap-8
|
|
59
|
-
`}>
|
|
60
|
-
<div className="flex flex-col gap-2 sm:gap-2 md:gap-3 lg:gap-3 xl:gap-4">
|
|
61
|
-
<h2 className={`
|
|
62
|
-
member-equity-title font-mont font-bold text-white tracking-[-0.04em]
|
|
63
|
-
text-xl sm:text-2xl md:text-3xl lg:text-4xl xl:text-[32px]
|
|
64
|
-
leading-[1.2]
|
|
65
|
-
max-w-[280px] sm:max-w-[300px] md:max-w-[400px] lg:max-w-[500px] xl:max-w-[547px]
|
|
66
|
-
`}>
|
|
67
|
-
{title}
|
|
68
|
-
</h2>
|
|
69
|
-
<p className={`
|
|
70
|
-
member-equity-description font-pingfang font-semibold text-white tracking-[-0.02em]
|
|
71
|
-
text-sm sm:text-sm md:text-base lg:text-lg xl:text-lg
|
|
72
|
-
leading-[1.4]
|
|
73
|
-
max-w-[260px] sm:max-w-[286px] md:max-w-[350px] lg:max-w-[426px] xl:max-w-[547px]
|
|
74
|
-
`}>
|
|
75
|
-
{description}
|
|
76
|
-
</p>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
{/* 按钮组 */}
|
|
80
|
-
<div className="flex items-center gap-3 sm:gap-3 md:gap-4 lg:gap-4 xl:gap-4">
|
|
81
|
-
<Button
|
|
82
|
-
theme={theme}
|
|
83
|
-
variant="primary"
|
|
84
|
-
onClick={handleButtonPrimaryClick}
|
|
85
|
-
className={`
|
|
86
|
-
member-equity-button-primary bg-transparent border-white border-[1px] text-white text-xs sm:text-sm md:text-sm lg:text-base xl:text-base
|
|
87
|
-
px-4 sm:px-5 md:px-6 lg:px-7 xl:px-7 hover:bg-white hover:text-black
|
|
88
|
-
py-2 sm:py-[10px] md:py-[11px] lg:py-[12px] xl:py-[14px]
|
|
89
|
-
${shape === 'round' ? 'rounded-[16px] sm:rounded-[19px] md:rounded-[20px] lg:rounded-[22px] xl:rounded-[24px]' : ''}
|
|
90
|
-
`}
|
|
91
|
-
>
|
|
92
|
-
{primaryButton.text}
|
|
93
|
-
</Button>
|
|
94
|
-
<Button
|
|
95
|
-
theme={theme}
|
|
96
|
-
variant="secondary"
|
|
97
|
-
onClick={handleButtonSecondaryClick}
|
|
98
|
-
className={`
|
|
99
|
-
member-equity-button-secondary text-xs sm:text-sm md:text-sm lg:text-base xl:text-base
|
|
100
|
-
px-4 sm:px-5 md:px-6 lg:px-7 xl:px-7
|
|
101
|
-
py-2 sm:py-[10px] md:py-[11px] lg:py-[12px] xl:py-[14px]
|
|
102
|
-
${shape === 'round' ? 'rounded-[16px] sm:rounded-[19px] md:rounded-[20px] lg:rounded-[22px] xl:rounded-[24px]' : ''}
|
|
103
|
-
`}
|
|
104
|
-
>
|
|
105
|
-
{secondaryButton.text}
|
|
106
|
-
</Button>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
</section>
|
|
111
|
-
);
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
export default withStyles(MemberEquity);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { ComponentCommonProps } from '../../types/props.js';
|
|
2
|
-
|
|
3
|
-
export interface MemberEquityProps extends ComponentCommonProps {
|
|
4
|
-
/** 标题 */
|
|
5
|
-
title: string;
|
|
6
|
-
/** 描述文本 */
|
|
7
|
-
description: string;
|
|
8
|
-
/** 背景图片 URL */
|
|
9
|
-
backgroundImage: string;
|
|
10
|
-
/** 主按钮配置 */
|
|
11
|
-
primaryButton: {
|
|
12
|
-
text: string;
|
|
13
|
-
href: string;
|
|
14
|
-
};
|
|
15
|
-
/** 副按钮配置 */
|
|
16
|
-
secondaryButton: {
|
|
17
|
-
text: string;
|
|
18
|
-
href: string;
|
|
19
|
-
};
|
|
20
|
-
/** 形状 */
|
|
21
|
-
shape?: 'round' | 'square';
|
|
22
|
-
/** 主题 */
|
|
23
|
-
theme?: 'light' | 'dark';
|
|
24
|
-
/** 自定义类名 */
|
|
25
|
-
className?: string;
|
|
26
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 这是一个demo 模版
|
|
3
|
-
*/
|
|
4
|
-
import { withStyles } from '../../shared/Styles.js'
|
|
5
|
-
import type { ShelfProps } from './types.js'
|
|
6
|
-
|
|
7
|
-
const Shelf = (props: ShelfProps) => {
|
|
8
|
-
console.log('~ Shelf props', props)
|
|
9
|
-
return (
|
|
10
|
-
<div>
|
|
11
|
-
<h1 className="text-2xl font-bold">{props.title}</h1>
|
|
12
|
-
<h2>{props.subtitle}</h2>
|
|
13
|
-
<div>
|
|
14
|
-
{props.products.map(product => (
|
|
15
|
-
<div key={product.sku}>{product.name}</div>
|
|
16
|
-
))}
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default withStyles(Shelf)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Shelf.js'
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { cn } from '../../helpers/utils'
|
|
3
|
-
import Picture from '../../components/picture'
|
|
4
|
-
import Button from '../../components/button'
|
|
5
|
-
export interface ShelfDisplayItem {
|
|
6
|
-
/** 产品图片*/
|
|
7
|
-
img: string
|
|
8
|
-
/** 折扣后价格*/
|
|
9
|
-
price: string
|
|
10
|
-
title: string
|
|
11
|
-
/** 折扣前价格*/
|
|
12
|
-
basePrice: string
|
|
13
|
-
subTitle: string
|
|
14
|
-
/** 标签*/
|
|
15
|
-
tagItems: string[]
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface ShelfDisplayProps {
|
|
19
|
-
products: ShelfDisplayItem[]
|
|
20
|
-
/** 卡片形状 */
|
|
21
|
-
itemShape?: 'round' | 'square'
|
|
22
|
-
className?: string
|
|
23
|
-
/** 主题色*/
|
|
24
|
-
theme?: 'light' | 'dark'
|
|
25
|
-
/** 按钮形状 */
|
|
26
|
-
shape?: 'round' | 'square'
|
|
27
|
-
/** 主按钮配置 */
|
|
28
|
-
primaryButton?: string
|
|
29
|
-
/** 副按钮配置 */
|
|
30
|
-
secondaryButton?: string
|
|
31
|
-
/** 按钮事件*/
|
|
32
|
-
event?: {
|
|
33
|
-
primaryButton?: {
|
|
34
|
-
onClick: (v: any) => void
|
|
35
|
-
},
|
|
36
|
-
secondaryButton?: {
|
|
37
|
-
onClick: (v: any) => void
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const ShelfDisplay: React.FC<ShelfDisplayProps> = ({
|
|
43
|
-
className = '',
|
|
44
|
-
shape = 'square',
|
|
45
|
-
itemShape = 'square',
|
|
46
|
-
products = [],
|
|
47
|
-
primaryButton,
|
|
48
|
-
secondaryButton,
|
|
49
|
-
event
|
|
50
|
-
}) => {
|
|
51
|
-
|
|
52
|
-
const onPrimaryButton = (params: ShelfDisplayItem) => {
|
|
53
|
-
event?.primaryButton?.onClick?.(params)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const onSecondaryButton = (params: ShelfDisplayItem) => {
|
|
57
|
-
event?.secondaryButton?.onClick(params)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<>
|
|
62
|
-
<div className={cn('w-full', className)}>
|
|
63
|
-
<div className={cn('flex overflow-hidden', 'md:px-[140px] lg:px-[268px]')}>
|
|
64
|
-
<div className={cn('w-full flex', 'gap-3 md:gap-4 overflow-x-auto overflow-y-hidden')}>
|
|
65
|
-
{products?.map((item, index) => {
|
|
66
|
-
return (
|
|
67
|
-
<div
|
|
68
|
-
key={index}
|
|
69
|
-
className={cn(
|
|
70
|
-
'bg-[#EAEAEC] p-4 flex flex-col min-w-[288px] max-w-[288px]',
|
|
71
|
-
'md:min-w-[316px] md:max-w-[316px] lg:min-w-[404px] lg:max-w-[404px] lg:pt-4 lg:px-6 lg:pb-6',
|
|
72
|
-
itemShape === 'round' ? 'rounded-2xl' : 'rounded-none'
|
|
73
|
-
)}
|
|
74
|
-
>
|
|
75
|
-
<div className={cn('h-[137px] overflow-hidden relative inline-block mb-2', 'lg:mb-3 lg:h-[195px]')}>
|
|
76
|
-
<Picture
|
|
77
|
-
source={item?.img || ''}
|
|
78
|
-
className="h-full [&_img]:w-auto object-cover flex justify-center"
|
|
79
|
-
/>
|
|
80
|
-
</div>
|
|
81
|
-
<div className="mb-1 flex gap-1 flex-wrap lg:mb-2">
|
|
82
|
-
{item?.tagItems?.map((tag, index) => {
|
|
83
|
-
return (
|
|
84
|
-
<div
|
|
85
|
-
key={index}
|
|
86
|
-
className="border-2 border-[#00BEFA] px-2 py-1 text-sm font-bold rounded-3xl text-[#00BEFA] lg:text-base"
|
|
87
|
-
>
|
|
88
|
-
{tag}
|
|
89
|
-
</div>
|
|
90
|
-
)
|
|
91
|
-
})}
|
|
92
|
-
</div>
|
|
93
|
-
<p className="flex-1 font-bold text-xl text-[#1D1D1F] leading-[1.2] tracking-[-0.04em] lg:text-2xl">
|
|
94
|
-
{item?.title || ''}
|
|
95
|
-
</p>
|
|
96
|
-
<h3 className="mt-1 mb-5 text-sm font-semibold text-[#1D1D1F] leading-[1.2] tracking-[-0.02em] lg:mt-2 lg:mb-6 lg:text-lg">
|
|
97
|
-
{item?.subTitle || ''}
|
|
98
|
-
</h3>
|
|
99
|
-
<div className="mb-2 flex items-center">
|
|
100
|
-
<div className="font-bold text-xl text-[#1D1D1F] lg:text-2xl">
|
|
101
|
-
{item?.price || ''}
|
|
102
|
-
</div>
|
|
103
|
-
<div className="ml-1 font-bold text-xl text-[#86868C] lg:text-2xl">
|
|
104
|
-
{item?.basePrice || ''}
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
{/* 按钮组 */}
|
|
108
|
-
<div className="flex items-center gap-3">
|
|
109
|
-
<Button
|
|
110
|
-
variant="primary"
|
|
111
|
-
onClick={() => onPrimaryButton(item)}
|
|
112
|
-
className={`
|
|
113
|
-
flex-1 bg-transparent border-[#1D1D1F] border box-border text-[#1D1D1F] text-xs md:text-sm lg:text-base
|
|
114
|
-
px-4 md:px-6 lg:px-7 hover:bg-transparent hover:text-black py-2 md:py-2.5 lg:py-3 tracking-[-0.04em]
|
|
115
|
-
${shape === 'round' ? 'rounded-[20px] lg:rounded-3xl' : ''}
|
|
116
|
-
`}
|
|
117
|
-
>
|
|
118
|
-
{primaryButton || ''}
|
|
119
|
-
</Button>
|
|
120
|
-
<Button
|
|
121
|
-
variant="secondary"
|
|
122
|
-
onClick={() => onSecondaryButton(item)}
|
|
123
|
-
className={`
|
|
124
|
-
flex-1 bg-[#1D1D1F] border-[#1D1D1F] border text-white box-border text-xs md:text-sm lg:text-base
|
|
125
|
-
px-4 md:px-6 lg:px-7 py-2 md:py-2.5 lg:py-3 tracking-[-0.04em]
|
|
126
|
-
${shape === 'round' ? 'rounded-[20px] lg:rounded-3xl' : ''}
|
|
127
|
-
`}
|
|
128
|
-
>
|
|
129
|
-
{secondaryButton || ''}
|
|
130
|
-
</Button>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
)
|
|
134
|
-
})}
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
</>
|
|
139
|
-
)
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export default ShelfDisplay
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { cn } from '../../helpers/utils.js'
|
|
3
|
-
import { Heading, Text } from '../../components/index.js'
|
|
4
|
-
import { withStyles } from '../../shared/Styles.js'
|
|
5
|
-
import type { SloganProps } from './types.js'
|
|
6
|
-
|
|
7
|
-
const Slogan = React.forwardRef<HTMLDivElement, SloganProps>(
|
|
8
|
-
({ title, features, className }, ref) => {
|
|
9
|
-
return (
|
|
10
|
-
<div
|
|
11
|
-
ref={ref}
|
|
12
|
-
className={cn(
|
|
13
|
-
'flex flex-col items-start md:flex-row md:items-end justify-center md:justify-between text-center w-full',
|
|
14
|
-
'px-4 sm:px-6 md:px-8 lg:px-16 xl:px-32',
|
|
15
|
-
'gap-8 py-8 sm:py-10 md:py-12 lg:py-16 xl:py-20',
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
>
|
|
19
|
-
<Heading
|
|
20
|
-
as="h2"
|
|
21
|
-
size={2}
|
|
22
|
-
weight={"bold"}
|
|
23
|
-
align={"left"}
|
|
24
|
-
className='slogan-title text-[#1D1D1F] !leading-none text-[40px] md:text-[40px] lg:text-[48px] xl:text-[64px]'
|
|
25
|
-
>
|
|
26
|
-
{title}
|
|
27
|
-
</Heading>
|
|
28
|
-
{features && features.length > 0 && (
|
|
29
|
-
<div className="flex flex-row w-full gap-3 max-w-[423px] items-center">
|
|
30
|
-
{features.slice(0, 3).map((feature, index) => (
|
|
31
|
-
<React.Fragment key={index}>
|
|
32
|
-
{index > 0 && (
|
|
33
|
-
<div className="self-stretch w-px bg-[#D9D9D9]" />
|
|
34
|
-
)}
|
|
35
|
-
<div className="flex-1">
|
|
36
|
-
<Text
|
|
37
|
-
align="left"
|
|
38
|
-
className="slogan-feature-text font-medium line-clamp-3 md:line-clamp-2 text-[#1D1D1F] text-[12px] leading-[1.4] sm:text-[13px] md:text-[14px]"
|
|
39
|
-
html={feature}
|
|
40
|
-
/>
|
|
41
|
-
</div>
|
|
42
|
-
</React.Fragment>
|
|
43
|
-
))}
|
|
44
|
-
</div>
|
|
45
|
-
)}
|
|
46
|
-
</div>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
Slogan.displayName = 'Slogan'
|
|
52
|
-
|
|
53
|
-
export default withStyles(Slogan)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface Feature {
|
|
2
|
-
/**
|
|
3
|
-
* 特性标题
|
|
4
|
-
*/
|
|
5
|
-
title: string
|
|
6
|
-
/**
|
|
7
|
-
* 特性描述
|
|
8
|
-
*/
|
|
9
|
-
description: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface SloganProps {
|
|
13
|
-
/**
|
|
14
|
-
* 主标题
|
|
15
|
-
*/
|
|
16
|
-
title: string
|
|
17
|
-
/**
|
|
18
|
-
* 特性列表,最多支持3个
|
|
19
|
-
*/
|
|
20
|
-
features?: string[]
|
|
21
|
-
/**
|
|
22
|
-
* 自定义类名
|
|
23
|
-
*/
|
|
24
|
-
className?: string
|
|
25
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { default as Shelf } from './Shelf/index.js'
|
|
2
|
-
export { default as BrandEquity } from './BrandEquity/index.js'
|
|
3
|
-
export { default as MemberEquity } from './MemberEquity/index.js'
|
|
4
|
-
export { default as Slogan } from './Slogan/index.js'
|
|
5
|
-
export { default as ShelfDisplay } from './ShelfDisplay/index.js'
|
|
6
|
-
export { default as Evaluate } from './Evaluate/index.js'
|
|
7
|
-
export { default as Category } from './Category/index.js'
|
|
8
|
-
export { default as HeroBanner } from './HeroBanner/index.js'
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export * from './Marquee'
|