@anker-in/headless-ui 0.0.27-alpha.0 → 0.0.27-alpha.1

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.
Files changed (172) hide show
  1. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  2. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +2 -2
  3. package/dist/cjs/biz-components/Category/index.js +1 -1
  4. package/dist/cjs/biz-components/Category/index.js.map +2 -2
  5. package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -0
  6. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  7. package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
  8. package/dist/cjs/biz-components/Marquee/index.js +1 -1
  9. package/dist/cjs/biz-components/Marquee/index.js.map +2 -2
  10. package/dist/cjs/biz-components/MemberEquity/index.js +30 -30
  11. package/dist/cjs/biz-components/MemberEquity/index.js.map +2 -2
  12. package/dist/cjs/biz-components/ShelfDisplay/index.js +9 -9
  13. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +2 -2
  14. package/dist/cjs/biz-components/Slogan/index.js +1 -1
  15. package/dist/cjs/biz-components/Slogan/index.js.map +2 -2
  16. package/dist/cjs/components/button.js +1 -1
  17. package/dist/cjs/components/button.js.map +2 -2
  18. package/dist/cjs/components/card.js +1 -1
  19. package/dist/cjs/components/card.js.map +2 -2
  20. package/dist/cjs/components/carousel.js +1 -1
  21. package/dist/cjs/components/carousel.js.map +2 -2
  22. package/dist/cjs/components/container.js +1 -1
  23. package/dist/cjs/components/container.js.map +2 -2
  24. package/dist/cjs/components/dialog.js +1 -1
  25. package/dist/cjs/components/dialog.js.map +2 -2
  26. package/dist/cjs/components/gird.js +1 -1
  27. package/dist/cjs/components/gird.js.map +2 -2
  28. package/dist/cjs/components/heading.d.ts +1 -1
  29. package/dist/cjs/components/heading.js +1 -1
  30. package/dist/cjs/components/heading.js.map +2 -2
  31. package/dist/cjs/components/text.js +1 -1
  32. package/dist/cjs/components/text.js.map +1 -1
  33. package/dist/cjs/stories/container.stories.js +6 -6
  34. package/dist/cjs/stories/container.stories.js.map +2 -2
  35. package/dist/cjs/stories/dialog.stories.js +1 -1
  36. package/dist/cjs/stories/dialog.stories.js.map +2 -2
  37. package/dist/cjs/stories/evaluate.stories.js +1 -1
  38. package/dist/cjs/stories/evaluate.stories.js.map +2 -2
  39. package/dist/cjs/stories/heading.stories.d.ts +3 -2
  40. package/dist/cjs/stories/heading.stories.js +1 -1
  41. package/dist/cjs/stories/heading.stories.js.map +2 -2
  42. package/dist/cjs/stories/text.stories.js +1 -1
  43. package/dist/cjs/stories/text.stories.js.map +2 -2
  44. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  45. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +2 -2
  46. package/dist/esm/biz-components/Category/index.js +1 -1
  47. package/dist/esm/biz-components/Category/index.js.map +2 -2
  48. package/dist/esm/biz-components/Evaluate/index.d.ts +1 -0
  49. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  50. package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
  51. package/dist/esm/biz-components/Marquee/index.js +1 -1
  52. package/dist/esm/biz-components/Marquee/index.js.map +2 -2
  53. package/dist/esm/biz-components/MemberEquity/index.js +29 -29
  54. package/dist/esm/biz-components/MemberEquity/index.js.map +2 -2
  55. package/dist/esm/biz-components/ShelfDisplay/index.js +9 -9
  56. package/dist/esm/biz-components/ShelfDisplay/index.js.map +2 -2
  57. package/dist/esm/biz-components/Slogan/index.js +1 -1
  58. package/dist/esm/biz-components/Slogan/index.js.map +2 -2
  59. package/dist/esm/components/button.js +1 -1
  60. package/dist/esm/components/button.js.map +2 -2
  61. package/dist/esm/components/card.js +1 -1
  62. package/dist/esm/components/card.js.map +2 -2
  63. package/dist/esm/components/carousel.js +1 -1
  64. package/dist/esm/components/carousel.js.map +2 -2
  65. package/dist/esm/components/container.js +1 -1
  66. package/dist/esm/components/container.js.map +2 -2
  67. package/dist/esm/components/dialog.js +1 -1
  68. package/dist/esm/components/dialog.js.map +2 -2
  69. package/dist/esm/components/gird.js +1 -1
  70. package/dist/esm/components/gird.js.map +2 -2
  71. package/dist/esm/components/heading.d.ts +1 -1
  72. package/dist/esm/components/heading.js +1 -1
  73. package/dist/esm/components/heading.js.map +2 -2
  74. package/dist/esm/components/text.js +1 -1
  75. package/dist/esm/components/text.js.map +1 -1
  76. package/dist/esm/stories/container.stories.js +6 -6
  77. package/dist/esm/stories/container.stories.js.map +2 -2
  78. package/dist/esm/stories/dialog.stories.js +1 -1
  79. package/dist/esm/stories/dialog.stories.js.map +2 -2
  80. package/dist/esm/stories/evaluate.stories.js +1 -1
  81. package/dist/esm/stories/evaluate.stories.js.map +2 -2
  82. package/dist/esm/stories/heading.stories.d.ts +3 -2
  83. package/dist/esm/stories/heading.stories.js +1 -1
  84. package/dist/esm/stories/heading.stories.js.map +2 -2
  85. package/dist/esm/stories/text.stories.js +2 -2
  86. package/dist/esm/stories/text.stories.js.map +2 -2
  87. package/package.json +2 -3
  88. package/style.css +44 -30
  89. package/src/biz-components/BrandEquity/BrandEquity.tsx +0 -77
  90. package/src/biz-components/BrandEquity/index.ts +0 -1
  91. package/src/biz-components/Category/index.tsx +0 -57
  92. package/src/biz-components/Evaluate/index.tsx +0 -85
  93. package/src/biz-components/HeroBanner/HeroBanner.tsx +0 -103
  94. package/src/biz-components/HeroBanner/index.tsx +0 -1
  95. package/src/biz-components/HeroBanner/types.ts +0 -28
  96. package/src/biz-components/Marquee/index.tsx +0 -79
  97. package/src/biz-components/MemberEquity/index.tsx +0 -114
  98. package/src/biz-components/MemberEquity/types.ts +0 -26
  99. package/src/biz-components/Shelf/Shelf.tsx +0 -22
  100. package/src/biz-components/Shelf/index.ts +0 -1
  101. package/src/biz-components/Shelf/types.ts +0 -6
  102. package/src/biz-components/ShelfDisplay/index.tsx +0 -142
  103. package/src/biz-components/Slogan/index.tsx +0 -53
  104. package/src/biz-components/Slogan/types.ts +0 -25
  105. package/src/biz-components/index.ts +0 -11
  106. package/src/components/alert.tsx +0 -124
  107. package/src/components/avatar.tsx +0 -126
  108. package/src/components/badge.tsx +0 -27
  109. package/src/components/button.tsx +0 -183
  110. package/src/components/card.tsx +0 -51
  111. package/src/components/carousel.tsx +0 -352
  112. package/src/components/checkbox.tsx +0 -42
  113. package/src/components/color.tsx +0 -77
  114. package/src/components/container.tsx +0 -28
  115. package/src/components/dialog.tsx +0 -98
  116. package/src/components/drawer.tsx +0 -115
  117. package/src/components/drop-down.tsx +0 -182
  118. package/src/components/gird.tsx +0 -90
  119. package/src/components/heading.tsx +0 -80
  120. package/src/components/index.ts +0 -26
  121. package/src/components/input-number.tsx +0 -216
  122. package/src/components/input.tsx +0 -79
  123. package/src/components/link.tsx +0 -99
  124. package/src/components/picture.tsx +0 -100
  125. package/src/components/popover.tsx +0 -31
  126. package/src/components/radio.tsx +0 -85
  127. package/src/components/skeleton.tsx +0 -41
  128. package/src/components/tabs.tsx +0 -78
  129. package/src/components/text.tsx +0 -99
  130. package/src/components/theme.tsx +0 -20
  131. package/src/helpers/component-props.ts +0 -17
  132. package/src/helpers/constants.ts +0 -0
  133. package/src/helpers/index.ts +0 -2
  134. package/src/helpers/utils.ts +0 -16
  135. package/src/icons/spinner.tsx +0 -26
  136. package/src/index.ts +0 -1
  137. package/src/shared/Styles.tsx +0 -94
  138. package/src/stories/HeroBanner.stories.tsx +0 -86
  139. package/src/stories/MemberEquity.stories.tsx +0 -107
  140. package/src/stories/alert.stories.tsx +0 -41
  141. package/src/stories/avatar.stories.tsx +0 -83
  142. package/src/stories/badge.stories.tsx +0 -40
  143. package/src/stories/brandEquity.stories.tsx +0 -73
  144. package/src/stories/button.stories.tsx +0 -145
  145. package/src/stories/card.stories.tsx +0 -97
  146. package/src/stories/carousel.stories.tsx +0 -161
  147. package/src/stories/category.stories.tsx +0 -52
  148. package/src/stories/checkbox.stories.tsx +0 -93
  149. package/src/stories/container.stories.tsx +0 -97
  150. package/src/stories/dialog.stories.tsx +0 -74
  151. package/src/stories/drawer.stories.tsx +0 -88
  152. package/src/stories/drop-down.stories.tsx +0 -83
  153. package/src/stories/evaluate.stories.tsx +0 -53
  154. package/src/stories/grid.stories.tsx +0 -190
  155. package/src/stories/heading.stories.tsx +0 -96
  156. package/src/stories/input-number.stories.tsx +0 -52
  157. package/src/stories/input.stories.tsx +0 -64
  158. package/src/stories/link.stories.tsx +0 -142
  159. package/src/stories/marquee.stories.tsx +0 -102
  160. package/src/stories/picture.stories.tsx +0 -51
  161. package/src/stories/popover.stories.tsx +0 -41
  162. package/src/stories/radio.stories.tsx +0 -55
  163. package/src/stories/shelf.stories.tsx +0 -35
  164. package/src/stories/shelfDisplay.stories.tsx +0 -69
  165. package/src/stories/skeleton.stories.tsx +0 -67
  166. package/src/stories/slogan.stories.tsx +0 -99
  167. package/src/stories/tabs.stories.tsx +0 -179
  168. package/src/stories/text.stories.tsx +0 -130
  169. package/src/styles/global.css +0 -4
  170. package/src/styles/index.css +0 -0
  171. package/src/types/index.ts +0 -0
  172. package/src/types/props.ts +0 -5
@@ -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,6 +0,0 @@
1
- export type ShelfProps = {
2
- id: string
3
- title: string
4
- subtitle: string
5
- products: any[]
6
- }
@@ -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'
@@ -1,124 +0,0 @@
1
- import * as React from 'react'
2
- import { cva, type VariantProps } from 'class-variance-authority'
3
- import { cn } from '../helpers/index.js'
4
-
5
- const alertVariants = cva(
6
- '[&>svg:first-child]:text-foreground relative w-full rounded-lg border px-4 py-3 text-sm [&>:first-child]:absolute [&>svg:first-child+div]:translate-y-[-3px] [&>svg:first-child]:left-4 [&>svg:first-child]:top-2 [&>svg:first-child~*]:pl-7',
7
- {
8
- variants: {
9
- variant: {
10
- default: 'bg-background text-foreground',
11
- destructive:
12
- 'border-destructive/50 text-destructive dark:border-destructive [&>svg:first-child]:text-destructive',
13
- },
14
- },
15
- defaultVariants: {
16
- variant: 'default',
17
- },
18
- }
19
- )
20
-
21
- const Close = () => (
22
- <svg
23
- className="close absolute right-4 top-2 size-6 cursor-pointer !pl-0"
24
- width="24"
25
- height="24"
26
- viewBox="0 0 24 24"
27
- fill="none"
28
- xmlns="http://www.w3.org/2000/svg"
29
- >
30
- <path
31
- d="M15.3452 16.4762L12.1377 13.2687L8.92973 16.4767C8.61712 16.7893 8.11029 16.7891 7.79766 16.4765C7.48505 16.1638 7.4848 15.657 7.79741 15.3444L11.0054 12.1364L7.79791 8.92891C7.48503 8.61603 7.48503 8.10946 7.79765 7.79683C8.11015 7.48433 8.61688 7.48424 8.92973 7.79709L12.1372 11.0046L15.3452 7.79658C15.6577 7.48408 16.1646 7.48421 16.4772 7.79683C16.7899 8.10946 16.79 8.61641 16.4775 8.9289L13.2695 12.1369L16.477 15.3444C16.7899 15.6572 16.7898 16.1639 16.4773 16.4764C16.1647 16.789 15.6581 16.789 15.3452 16.4762L15.3452 16.4762Z"
32
- fill="#1D1D1F"
33
- />
34
- </svg>
35
- )
36
-
37
- const IconMap = {
38
- info: (
39
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
40
- <circle cx="12" cy="12" r="10.5" fill="#00BEFA" />
41
- <path
42
- fillRule="evenodd"
43
- clipRule="evenodd"
44
- d="M13.1249 7.13281C13.1249 6.51149 12.6213 6.00781 11.9999 6.00781C11.3786 6.00781 10.8749 6.51149 10.8749 7.13281V13.1328C10.8749 13.7541 11.3786 14.2578 11.9999 14.2578C12.6213 14.2578 13.1249 13.7541 13.1249 13.1328V7.13281ZM13.3499 16.6342C13.3499 15.8886 12.7455 15.2842 11.9999 15.2842C11.2543 15.2842 10.6499 15.8886 10.6499 16.6342C10.6499 17.3798 11.2543 17.9842 11.9999 17.9842C12.7455 17.9842 13.3499 17.3798 13.3499 16.6342Z"
45
- fill="white"
46
- />
47
- </svg>
48
- ),
49
- success: (
50
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
51
- <circle cx="12.5" cy="12.5" r="10.5" fill="#30D158" />
52
- <path
53
- fillRule="evenodd"
54
- clipRule="evenodd"
55
- d="M18.3976 8.6772C18.0468 8.32635 17.478 8.32635 17.1271 8.6772L11.5586 14.2457L8.15843 10.8456C7.80758 10.4947 7.23874 10.4947 6.88789 10.8456C6.53704 11.1964 6.53704 11.7653 6.88789 12.1161L10.849 16.0772C10.8632 16.0914 10.8778 16.1051 10.8928 16.1182C10.9028 16.1293 10.9132 16.1402 10.9239 16.1509C11.2748 16.5018 11.8436 16.5018 12.1945 16.1509L18.3976 9.94773C18.7485 9.59688 18.7485 9.02805 18.3976 8.6772Z"
56
- fill="white"
57
- />
58
- </svg>
59
- ),
60
- warning: (
61
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
62
- <circle cx="12" cy="12" r="10.5" fill="#FFC24D" />
63
- <path
64
- fillRule="evenodd"
65
- clipRule="evenodd"
66
- d="M13.1249 7.13281C13.1249 6.51149 12.6213 6.00781 11.9999 6.00781C11.3786 6.00781 10.8749 6.51149 10.8749 7.13281V13.1328C10.8749 13.7541 11.3786 14.2578 11.9999 14.2578C12.6213 14.2578 13.1249 13.7541 13.1249 13.1328V7.13281ZM13.3499 16.6342C13.3499 15.8886 12.7455 15.2842 11.9999 15.2842C11.2543 15.2842 10.6499 15.8886 10.6499 16.6342C10.6499 17.3798 11.2543 17.9842 11.9999 17.9842C12.7455 17.9842 13.3499 17.3798 13.3499 16.6342Z"
67
- fill="white"
68
- />
69
- </svg>
70
- ),
71
- error: (
72
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
73
- <circle cx="12" cy="12" r="10.5" fill="#FF4D4D" />
74
- <path
75
- fillRule="evenodd"
76
- clipRule="evenodd"
77
- d="M13.1249 7.13281C13.1249 6.51149 12.6213 6.00781 11.9999 6.00781C11.3786 6.00781 10.8749 6.51149 10.8749 7.13281V13.1328C10.8749 13.7541 11.3786 14.2578 11.9999 14.2578C12.6213 14.2578 13.1249 13.7541 13.1249 13.1328V7.13281ZM13.3499 16.6342C13.3499 15.8886 12.7455 15.2842 11.9999 15.2842C11.2543 15.2842 10.6499 15.8886 10.6499 16.6342C10.6499 17.3798 11.2543 17.9842 11.9999 17.9842C12.7455 17.9842 13.3499 17.3798 13.3499 16.6342Z"
78
- fill="white"
79
- />
80
- </svg>
81
- ),
82
- }
83
-
84
- const Alert = React.forwardRef<
85
- HTMLDivElement,
86
- React.HTMLAttributes<HTMLDivElement> &
87
- VariantProps<typeof alertVariants> & {
88
- /**
89
- * 状态
90
- */
91
- status?: 'success' | 'error' | 'warning' | 'info'
92
- /**
93
- * 是否可以关闭
94
- */
95
- closable?: boolean
96
- }
97
- >(({ className, variant, status, closable = false, children, ...props }, ref) => {
98
- const icon = status ? IconMap[status] : null
99
-
100
- return (
101
- <div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props}>
102
- {icon}
103
- {children}
104
- {closable && <Close />}
105
- </div>
106
- )
107
- })
108
- Alert.displayName = 'Alert'
109
-
110
- const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
111
- ({ className, ...props }, ref) => (
112
- <h5 ref={ref} className={cn('mb-1 font-medium leading-none tracking-tight', className)} {...props} />
113
- )
114
- )
115
- AlertTitle.displayName = 'AlertTitle'
116
-
117
- const AlertDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
118
- ({ className, ...props }, ref) => (
119
- <div ref={ref} className={cn('text-sm text-[#86868C] [&_p]:leading-relaxed', className)} {...props} />
120
- )
121
- )
122
- AlertDescription.displayName = 'AlertDescription'
123
-
124
- export { Alert, AlertTitle, AlertDescription }