@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
|
@@ -30,6 +30,7 @@ declare const meta: {
|
|
|
30
30
|
type: "select";
|
|
31
31
|
};
|
|
32
32
|
options: string[];
|
|
33
|
+
description: string;
|
|
33
34
|
table: {
|
|
34
35
|
defaultValue: {
|
|
35
36
|
summary: string;
|
|
@@ -71,8 +72,8 @@ declare const meta: {
|
|
|
71
72
|
};
|
|
72
73
|
args: {
|
|
73
74
|
as: "h1";
|
|
74
|
-
size:
|
|
75
|
-
weight: "
|
|
75
|
+
size: 1;
|
|
76
|
+
weight: "bold";
|
|
76
77
|
align: "left";
|
|
77
78
|
};
|
|
78
79
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fragment as a,jsx as o,jsxs as r}from"react/jsx-runtime";import{Heading as e}from"../components/index.js";import"react";const t={title:"Typography/Heading",component:e,parameters:{layout:"padded",docs:{description:{component:"Heading \u7EC4\u4EF6, \u57FA\u672C\u548Ctext \u7EC4\u4EF6\u4E00\u6837\uFF0C\u53EA\u662F\u9ED8\u8BA4\u7684\u6807\u7B7E\u7C7B\u578B\u4E0D\u4E00\u6837"}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},options:[1,2,3,4,5],description:"\u6587\u672C\u5C3A\u5BF8\uFF0C\u4ECE5\u52301\uFF0C\u8D8A\u6765\u8D8A\u5C0F",table:{defaultValue:{summary:"5"}}},weight:{control:{type:"select"},options:["
|
|
1
|
+
import{Fragment as a,jsx as o,jsxs as r}from"react/jsx-runtime";import{Heading as e}from"../components/index.js";import"react";const t={title:"Typography/Heading",component:e,parameters:{layout:"padded",docs:{description:{component:"Heading \u7EC4\u4EF6, \u57FA\u672C\u548Ctext \u7EC4\u4EF6\u4E00\u6837\uFF0C\u53EA\u662F\u9ED8\u8BA4\u7684\u6807\u7B7E\u7C7B\u578B\u4E0D\u4E00\u6837"}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},options:[1,2,3,4,5],description:"\u6587\u672C\u5C3A\u5BF8\uFF0C\u4ECE5\u52301\uFF0C\u8D8A\u6765\u8D8A\u5C0F",table:{defaultValue:{summary:"5"}}},weight:{control:{type:"select"},options:["medium","semibold","bold","extraBold","black"],description:"\u6587\u672C\u7C97\u7EC6, \u4ECE500\u5230900 \uFF0C\u9ED8\u8BA4\u662F700",table:{defaultValue:{summary:"black"}}},align:{control:{type:"select"},options:["left","center","right"],table:{defaultValue:{summary:void 0}}},color:{control:{type:"color"}},as:{control:{type:"select"},options:["h1","h2","h3","h4","h5","h6"],description:"html \u6807\u7B7E\u7C7B\u578B",table:{defaultValue:{summary:"h1"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{as:"h1",size:1,weight:"bold",align:"left"}};var n=t;const d={args:{as:"h1",children:" The quick brown fox jumps over the lazy dog."}},p={render:()=>r(a,{children:[o(e,{size:1,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:2,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:3,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:4,children:"The quick brown fox jumps over the lazy dog."}),o(e,{size:5,children:"The quick brown fox jumps over the lazy dog."})]})};export{p as All,d as Default,n as default};
|
|
2
2
|
//# sourceMappingURL=heading.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/heading.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Heading } from '../components/index.js'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Heading',\n component: Heading,\n parameters: {\n layout: 'padded',\n docs: {\n description: {\n component: 'Heading \u7EC4\u4EF6, \u57FA\u672C\u548Ctext \u7EC4\u4EF6\u4E00\u6837\uFF0C\u53EA\u662F\u9ED8\u8BA4\u7684\u6807\u7B7E\u7C7B\u578B\u4E0D\u4E00\u6837',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n options: [1, 2, 3, 4, 5],\n description: '\u6587\u672C\u5C3A\u5BF8\uFF0C\u4ECE5\u52301\uFF0C\u8D8A\u6765\u8D8A\u5C0F',\n table: {\n defaultValue: { summary: '5' },\n },\n },\n weight: {\n control: {\n type: 'select',\n },\n options: ['
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Heading } from '../components/index.js'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Heading',\n component: Heading,\n parameters: {\n layout: 'padded',\n docs: {\n description: {\n component: 'Heading \u7EC4\u4EF6, \u57FA\u672C\u548Ctext \u7EC4\u4EF6\u4E00\u6837\uFF0C\u53EA\u662F\u9ED8\u8BA4\u7684\u6807\u7B7E\u7C7B\u578B\u4E0D\u4E00\u6837',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n options: [1, 2, 3, 4, 5],\n description: '\u6587\u672C\u5C3A\u5BF8\uFF0C\u4ECE5\u52301\uFF0C\u8D8A\u6765\u8D8A\u5C0F',\n table: {\n defaultValue: { summary: '5' },\n },\n },\n weight: {\n control: {\n type: 'select',\n },\n options: ['medium', 'semibold', 'bold', 'extraBold', 'black'],\n description: '\u6587\u672C\u7C97\u7EC6, \u4ECE500\u5230900 \uFF0C\u9ED8\u8BA4\u662F700',\n table: {\n defaultValue: { summary: 'black' },\n },\n },\n align: {\n control: {\n type: 'select',\n },\n options: ['left', 'center', 'right'],\n table: {\n defaultValue: { summary: undefined },\n },\n },\n color: {\n control: {\n type: 'color',\n },\n },\n as: {\n control: {\n type: 'select',\n },\n options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n description: 'html \u6807\u7B7E\u7C7B\u578B',\n table: {\n defaultValue: { summary: 'h1' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n as: 'h1',\n size: 1,\n weight: 'bold',\n align: 'left',\n },\n} satisfies Meta<typeof Heading>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n as: 'h1',\n children: ' The quick brown fox jumps over the lazy dog.',\n },\n}\n\nexport const All: Story = {\n render: () => (\n <>\n <Heading size={1}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={2}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={3}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={4}>The quick brown fox jumps over the lazy dog.</Heading>\n <Heading size={5}>The quick brown fox jumps over the lazy dog.</Heading>\n </>\n ),\n}\n"],
|
|
5
|
+
"mappings": "AAwFI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBAtFJ,OAAS,WAAAC,MAAe,yBACxB,MAAkB,QAElB,MAAMC,EAAO,CACX,MAAO,qBACP,UAAWD,EACX,WAAY,CACV,OAAQ,SACR,KAAM,CACJ,YAAa,CACX,UAAW,qJACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,EAAG,EAAG,EAAG,EAAG,CAAC,EACvB,YAAa,6EACb,MAAO,CACL,aAAc,CAAE,QAAS,GAAI,CAC/B,CACF,EACA,OAAQ,CACN,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,SAAU,WAAY,OAAQ,YAAa,OAAO,EAC5D,YAAa,2EACb,MAAO,CACL,aAAc,CAAE,QAAS,OAAQ,CACnC,CACF,EACA,MAAO,CACL,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,OAAQ,SAAU,OAAO,EACnC,MAAO,CACL,aAAc,CAAE,QAAS,MAAU,CACrC,CACF,EACA,MAAO,CACL,QAAS,CACP,KAAM,OACR,CACF,EACA,GAAI,CACF,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EAC5C,YAAa,gCACb,MAAO,CACL,aAAc,CAAE,QAAS,IAAK,CAChC,CACF,EACA,KAAM,CACJ,KAAM,SACN,YAAa,4CACf,CACF,EACA,KAAM,CACJ,GAAI,KACJ,KAAM,EACN,OAAQ,OACR,MAAO,MACT,CACF,EAEA,IAAOE,EAAQD,EAIR,MAAME,EAAiB,CAC5B,KAAM,CACJ,GAAI,KACJ,SAAU,+CACZ,CACF,EAEaC,EAAa,CACxB,OAAQ,IACNL,EAAAF,EAAA,CACE,UAAAC,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,EAC9DF,EAACE,EAAA,CAAQ,KAAM,EAAG,wDAA4C,GAChE,CAEJ",
|
|
6
6
|
"names": ["Fragment", "jsx", "jsxs", "Heading", "meta", "heading_stories_default", "Default", "All"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{Text as e}from"../components/index.js";import"react";const r={title:"Typography/Text",component:e,parameters:{layout:"padded",docs:{description:{component:"\u6587\u672C\u7EC4\u4EF6, \u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9."}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},description:"\u6587\u672C\u5C3A\u5BF8 3: \u6B63\u6587, 2: \u8865\u5145\u6587\u672C, 1: \u5C0F\u6807\u9898",options:[1,2,3],table:{defaultValue:{summary:"3"}}},weight:{control:{type:"select"},options:["light","normal","medium","bold"],table:{defaultValue:{summary:"normal"}}},align:{control:{type:"select"},options:["left","center","right"],table:{defaultValue:{summary:void 0}}},color:{control:{type:"color"}},as:{control:{type:"select"},description:"html \u6807\u7B7E\u7C7B\u578B, div\u548Cp\u4F1A\u9ED8\u8BA4\u5360\u6EE1\u6574\u884C",options:["div","label","p","span"],table:{defaultValue:{summary:"span"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{size:3,weight:"normal",align:"left",html:"",as:"p"}};var n=r;const s={args:{children:" The quick brown fox jumps over the lazy dog.",size:3,weight:"normal"}},p={render(){return o("div",{className:"flex flex-col",children:[t(e,{size:1,children:"The quick brown fox jumps over the lazy dog."}),t(e,{size:2,children:"The quick brown fox jumps over the lazy dog."}),t(e,{size:3,children:"The quick brown fox jumps over the lazy dog."})]})}},c={render(){return o("div",{className:"flex flex-col",children:[t(e,{weight:"light",children:"The quick brown fox jumps over the lazy dog."}),t(e,{weight:"normal",children:"The quick brown fox jumps over the lazy dog."}),t(e,{weight:"medium",children:"The quick brown fox jumps over the lazy dog."}),t(e,{weight:"bold",children:"The quick brown fox jumps over the lazy dog."})]})}},
|
|
1
|
+
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{Text as e}from"../components/index.js";import"react";const r={title:"Typography/Text",component:e,parameters:{layout:"padded",docs:{description:{component:"\u6587\u672C\u7EC4\u4EF6, \u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9."}}},tags:["autodocs"],argTypes:{size:{control:{type:"select"},description:"\u6587\u672C\u5C3A\u5BF8 3: \u6B63\u6587, 2: \u8865\u5145\u6587\u672C, 1: \u5C0F\u6807\u9898",options:[1,2,3],table:{defaultValue:{summary:"3"}}},weight:{control:{type:"select"},options:["light","normal","medium","semibold","bold"],table:{defaultValue:{summary:"normal"}}},align:{control:{type:"select"},options:["left","center","right"],table:{defaultValue:{summary:void 0}}},color:{control:{type:"color"}},as:{control:{type:"select"},description:"html \u6807\u7B7E\u7C7B\u578B, div\u548Cp\u4F1A\u9ED8\u8BA4\u5360\u6EE1\u6574\u884C",options:["div","label","p","span"],table:{defaultValue:{summary:"span"}}},html:{type:"string",description:"\u76F8\u5F53\u4E8E dangerouslySetInnerHTML"}},args:{size:3,weight:"normal",align:"left",html:"",as:"p"}};var n=r;const s={args:{children:" The quick brown fox jumps over the lazy dog.",size:3,weight:"normal"}},p={render(){return o("div",{className:"flex flex-col",children:[t(e,{size:1,children:"The quick brown fox jumps over the lazy dog."}),t(e,{size:2,children:"The quick brown fox jumps over the lazy dog."}),t(e,{size:3,children:"The quick brown fox jumps over the lazy dog."})]})}},c={render(){return o("div",{className:"flex flex-col",children:[t(e,{weight:"light",children:"The quick brown fox jumps over the lazy dog."}),t(e,{weight:"normal",children:"The quick brown fox jumps over the lazy dog."}),t(e,{weight:"medium",children:"The quick brown fox jumps over the lazy dog."}),t(e,{weight:"bold",children:"The quick brown fox jumps over the lazy dog."})]})}},d={render(){return t(e,{html:`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(
|
|
2
2
|
to right,
|
|
3
3
|
#00ff00, /* \u7EFF\u8272 */
|
|
4
4
|
#00ff99, /* \u6D45\u7EFF\u8272 */
|
|
@@ -6,5 +6,5 @@ import{jsx as t,jsxs as o}from"react/jsx-runtime";import{Text as e}from"../compo
|
|
|
6
6
|
#0099ff, /* \u6D45\u84DD\u8272 */
|
|
7
7
|
#8000ff, /* \u7D2B\u8272 */
|
|
8
8
|
#ff00ff /* \u7C89\u8272 */
|
|
9
|
-
);color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`})}};export{s as Default,
|
|
9
|
+
);color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`})}};export{s as Default,d as Html,p as Sizes,n as default,c as weight};
|
|
10
10
|
//# sourceMappingURL=text.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/text.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Text } from '../components/index.js'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Text',\n component: Text,\n parameters: {\n layout: 'padded',\n docs: {\n description: {\n component: '\u6587\u672C\u7EC4\u4EF6, \u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9.',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n description: '\u6587\u672C\u5C3A\u5BF8 3: \u6B63\u6587, 2: \u8865\u5145\u6587\u672C, 1: \u5C0F\u6807\u9898',\n options: [1, 2, 3],\n table: {\n defaultValue: { summary: '3' },\n },\n },\n weight: {\n control: {\n type: 'select',\n },\n options: ['light', 'normal', 'medium', 'bold'],\n table: {\n defaultValue: { summary: 'normal' },\n },\n },\n align: {\n control: {\n type: 'select',\n },\n options: ['left', 'center', 'right'],\n table: {\n defaultValue: { summary: undefined },\n },\n },\n color: {\n control: {\n type: 'color',\n },\n },\n as: {\n control: {\n type: 'select',\n },\n description: 'html \u6807\u7B7E\u7C7B\u578B, div\u548Cp\u4F1A\u9ED8\u8BA4\u5360\u6EE1\u6574\u884C',\n options: ['div', 'label', 'p', 'span'],\n table: {\n defaultValue: { summary: 'span' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n size: 3,\n weight: 'normal',\n align: 'left',\n html: '',\n as: 'p',\n },\n} satisfies Meta<typeof Text>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n children: ' The quick brown fox jumps over the lazy dog.',\n size: 3,\n weight: 'normal',\n },\n}\n\nexport const Sizes: Story = {\n render() {\n return (\n <div className=\"flex flex-col\">\n <Text size={1}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={2}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={3}>The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const weight: Story = {\n render() {\n return (\n <div className=\"flex flex-col\">\n <Text weight=\"light\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weight=\"normal\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weight=\"medium\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weight=\"bold\">The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\n\n\nexport const Html: Story = {\n render() {\n return (\n <Text\n html={`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(\n to right, \n #00ff00, /* \u7EFF\u8272 */\n #00ff99, /* \u6D45\u7EFF\u8272 */\n #00ffff, /* \u9752\u8272 */\n #0099ff, /* \u6D45\u84DD\u8272 */\n #8000ff, /* \u7D2B\u8272 */\n #ff00ff /* \u7C89\u8272 */\n );color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`}\n />\n )\n },\n}\n"],
|
|
5
|
-
"mappings": "AAyFM,OACE,OAAAA,EADF,QAAAC,MAAA,oBAvFN,OAAS,QAAAC,MAAY,yBACrB,MAAkB,QAElB,MAAMC,EAAO,CACX,MAAO,kBACP,UAAWD,EACX,WAAY,CACV,OAAQ,SACR,KAAM,CACJ,YAAa,CACX,UAAW,6EACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,YAAa,+FACb,QAAS,CAAC,EAAG,EAAG,CAAC,EACjB,MAAO,CACL,aAAc,CAAE,QAAS,GAAI,CAC/B,CACF,EACA,OAAQ,CACN,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,QAAS,SAAU,SAAU,MAAM,
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Text } from '../components/index.js'\nimport React from 'react'\n\nconst meta = {\n title: 'Typography/Text',\n component: Text,\n parameters: {\n layout: 'padded',\n docs: {\n description: {\n component: '\u6587\u672C\u7EC4\u4EF6, \u7528\u4E8E\u5C55\u793A\u6587\u672C\u5185\u5BB9.',\n },\n },\n },\n tags: ['autodocs'],\n argTypes: {\n size: {\n control: {\n type: 'select',\n },\n description: '\u6587\u672C\u5C3A\u5BF8 3: \u6B63\u6587, 2: \u8865\u5145\u6587\u672C, 1: \u5C0F\u6807\u9898',\n options: [1, 2, 3],\n table: {\n defaultValue: { summary: '3' },\n },\n },\n weight: {\n control: {\n type: 'select',\n },\n options: ['light', 'normal', 'medium', 'semibold', 'bold'],\n table: {\n defaultValue: { summary: 'normal' },\n },\n },\n align: {\n control: {\n type: 'select',\n },\n options: ['left', 'center', 'right'],\n table: {\n defaultValue: { summary: undefined },\n },\n },\n color: {\n control: {\n type: 'color',\n },\n },\n as: {\n control: {\n type: 'select',\n },\n description: 'html \u6807\u7B7E\u7C7B\u578B, div\u548Cp\u4F1A\u9ED8\u8BA4\u5360\u6EE1\u6574\u884C',\n options: ['div', 'label', 'p', 'span'],\n table: {\n defaultValue: { summary: 'span' },\n },\n },\n html: {\n type: 'string',\n description: '\u76F8\u5F53\u4E8E dangerouslySetInnerHTML',\n },\n },\n args: {\n size: 3,\n weight: 'normal',\n align: 'left',\n html: '',\n as: 'p',\n },\n} satisfies Meta<typeof Text>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n children: ' The quick brown fox jumps over the lazy dog.',\n size: 3,\n weight: 'normal',\n },\n}\n\nexport const Sizes: Story = {\n render() {\n return (\n <div className=\"flex flex-col\">\n <Text size={1}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={2}>The quick brown fox jumps over the lazy dog.</Text>\n <Text size={3}>The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\nexport const weight: Story = {\n render() {\n return (\n <div className=\"flex flex-col\">\n <Text weight=\"light\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weight=\"normal\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weight=\"medium\">The quick brown fox jumps over the lazy dog.</Text>\n <Text weight=\"bold\">The quick brown fox jumps over the lazy dog.</Text>\n </div>\n )\n },\n}\n\n\n\nexport const Html: Story = {\n render() {\n return (\n <Text\n html={`The <span style='font-size:20px;font:bold; -webkit-background-clip: text; background: linear-gradient(\n to right, \n #00ff00, /* \u7EFF\u8272 */\n #00ff99, /* \u6D45\u7EFF\u8272 */\n #00ffff, /* \u9752\u8272 */\n #0099ff, /* \u6D45\u84DD\u8272 */\n #8000ff, /* \u7D2B\u8272 */\n #ff00ff /* \u7C89\u8272 */\n );color: transparent;background-clip: text;'>quick brown fox</span> <br/> jumps over the lazy dog.`}\n />\n )\n },\n}\n"],
|
|
5
|
+
"mappings": "AAyFM,OACE,OAAAA,EADF,QAAAC,MAAA,oBAvFN,OAAS,QAAAC,MAAY,yBACrB,MAAkB,QAElB,MAAMC,EAAO,CACX,MAAO,kBACP,UAAWD,EACX,WAAY,CACV,OAAQ,SACR,KAAM,CACJ,YAAa,CACX,UAAW,6EACb,CACF,CACF,EACA,KAAM,CAAC,UAAU,EACjB,SAAU,CACR,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,YAAa,+FACb,QAAS,CAAC,EAAG,EAAG,CAAC,EACjB,MAAO,CACL,aAAc,CAAE,QAAS,GAAI,CAC/B,CACF,EACA,OAAQ,CACN,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,QAAS,SAAU,SAAU,WAAY,MAAM,EACzD,MAAO,CACL,aAAc,CAAE,QAAS,QAAS,CACpC,CACF,EACA,MAAO,CACL,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,OAAQ,SAAU,OAAO,EACnC,MAAO,CACL,aAAc,CAAE,QAAS,MAAU,CACrC,CACF,EACA,MAAO,CACL,QAAS,CACP,KAAM,OACR,CACF,EACA,GAAI,CACF,QAAS,CACP,KAAM,QACR,EACA,YAAa,sFACb,QAAS,CAAC,MAAO,QAAS,IAAK,MAAM,EACrC,MAAO,CACL,aAAc,CAAE,QAAS,MAAO,CAClC,CACF,EACA,KAAM,CACJ,KAAM,SACN,YAAa,4CACf,CACF,EACA,KAAM,CACJ,KAAM,EACN,OAAQ,SACR,MAAO,OACP,KAAM,GACN,GAAI,GACN,CACF,EAEA,IAAOE,EAAQD,EAGR,MAAME,EAAiB,CAC5B,KAAM,CACJ,SAAU,gDACV,KAAM,EACN,OAAQ,QACV,CACF,EAEaC,EAAe,CAC1B,QAAS,CACP,OACEL,EAAC,OAAI,UAAU,gBACb,UAAAD,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,EAC3DF,EAACE,EAAA,CAAK,KAAM,EAAG,wDAA4C,GAC7D,CAEJ,CACF,EAEaK,EAAgB,CAC3B,QAAS,CACP,OACEN,EAAC,OAAI,UAAU,gBACb,UAAAD,EAACE,EAAA,CAAK,OAAO,QAAQ,wDAA4C,EACjEF,EAACE,EAAA,CAAK,OAAO,SAAS,wDAA4C,EAClEF,EAACE,EAAA,CAAK,OAAO,SAAS,wDAA4C,EAClEF,EAACE,EAAA,CAAK,OAAO,OAAO,wDAA4C,GAClE,CAEJ,CACF,EAIaM,EAAc,CACzB,QAAS,CACP,OACER,EAACE,EAAA,CACC,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wGASR,CAEJ,CACF",
|
|
6
6
|
"names": ["jsx", "jsxs", "Text", "meta", "text_stories_default", "Default", "Sizes", "weight", "Html"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anker-in/headless-ui",
|
|
3
|
-
"version": "0.0.27-alpha.
|
|
3
|
+
"version": "0.0.27-alpha.2",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/cjs/index.d.ts",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
},
|
|
33
33
|
"description": "",
|
|
34
34
|
"files": [
|
|
35
|
-
"src/**",
|
|
36
35
|
"dist/**",
|
|
37
36
|
"*.css",
|
|
38
37
|
"README.md",
|
|
@@ -41,7 +40,7 @@
|
|
|
41
40
|
"sideEffects": false,
|
|
42
41
|
"keywords": [],
|
|
43
42
|
"author": "",
|
|
44
|
-
"license": "
|
|
43
|
+
"license": "GPLv3",
|
|
45
44
|
"devDependencies": {
|
|
46
45
|
"@babel/preset-env": "^7.24.6",
|
|
47
46
|
"@babel/preset-react": "^7.24.6",
|
package/style.css
CHANGED
|
@@ -423,11 +423,6 @@ video {
|
|
|
423
423
|
max-width: var(--breakpoint-xl);
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
@media (min-width: 1536px) {
|
|
427
|
-
.container {
|
|
428
|
-
max-width: 1536px;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
426
|
.sr-only {
|
|
432
427
|
position: absolute;
|
|
433
428
|
width: 1px;
|
|
@@ -741,6 +736,9 @@ video {
|
|
|
741
736
|
.max-h-\[var\(--radix-dropdown-menu-content-available-height\)\] {
|
|
742
737
|
max-height: var(--radix-dropdown-menu-content-available-height);
|
|
743
738
|
}
|
|
739
|
+
.w-0 {
|
|
740
|
+
width: 0px;
|
|
741
|
+
}
|
|
744
742
|
.w-2 {
|
|
745
743
|
width: 0.5rem;
|
|
746
744
|
}
|
|
@@ -762,9 +760,6 @@ video {
|
|
|
762
760
|
.w-full {
|
|
763
761
|
width: 100%;
|
|
764
762
|
}
|
|
765
|
-
.min-w-0 {
|
|
766
|
-
min-width: 0px;
|
|
767
|
-
}
|
|
768
763
|
.min-w-\[8rem\] {
|
|
769
764
|
min-width: 8rem;
|
|
770
765
|
}
|
|
@@ -981,10 +976,6 @@ video {
|
|
|
981
976
|
.bg-bg-2 {
|
|
982
977
|
background-color: var(--bg-color-2);
|
|
983
978
|
}
|
|
984
|
-
.bg-black {
|
|
985
|
-
--tw-bg-opacity: 1;
|
|
986
|
-
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
|
|
987
|
-
}
|
|
988
979
|
.bg-black\/80 {
|
|
989
980
|
background-color: rgb(0 0 0 / 0.8);
|
|
990
981
|
}
|
|
@@ -1251,22 +1242,22 @@ video {
|
|
|
1251
1242
|
line-height: 1.5rem;
|
|
1252
1243
|
}
|
|
1253
1244
|
.text-heading-1 {
|
|
1254
|
-
font-size:
|
|
1245
|
+
font-size: 14px;
|
|
1255
1246
|
line-height: 120%;
|
|
1256
1247
|
letter-spacing: -0.48px;
|
|
1257
1248
|
}
|
|
1258
1249
|
.text-heading-2 {
|
|
1259
|
-
font-size:
|
|
1250
|
+
font-size: 20px;
|
|
1260
1251
|
line-height: 120%;
|
|
1261
1252
|
letter-spacing: -0.64px;
|
|
1262
1253
|
}
|
|
1263
1254
|
.text-heading-3 {
|
|
1264
|
-
font-size:
|
|
1255
|
+
font-size: 24px;
|
|
1265
1256
|
line-height: 120%;
|
|
1266
1257
|
letter-spacing: -0.8px;
|
|
1267
1258
|
}
|
|
1268
1259
|
.text-heading-5 {
|
|
1269
|
-
font-size:
|
|
1260
|
+
font-size: 40px;
|
|
1270
1261
|
line-height: 120%;
|
|
1271
1262
|
letter-spacing: -1.12px;
|
|
1272
1263
|
}
|
|
@@ -1297,9 +1288,15 @@ video {
|
|
|
1297
1288
|
font-size: 0.75rem;
|
|
1298
1289
|
line-height: 1rem;
|
|
1299
1290
|
}
|
|
1291
|
+
.font-black {
|
|
1292
|
+
font-weight: 900;
|
|
1293
|
+
}
|
|
1300
1294
|
.font-bold {
|
|
1301
1295
|
font-weight: 700;
|
|
1302
1296
|
}
|
|
1297
|
+
.font-extrabold {
|
|
1298
|
+
font-weight: 800;
|
|
1299
|
+
}
|
|
1303
1300
|
.font-light {
|
|
1304
1301
|
font-weight: 300;
|
|
1305
1302
|
}
|
|
@@ -1334,10 +1331,6 @@ video {
|
|
|
1334
1331
|
--tw-text-opacity: 1;
|
|
1335
1332
|
color: rgb(134 134 140 / var(--tw-text-opacity, 1));
|
|
1336
1333
|
}
|
|
1337
|
-
.text-black {
|
|
1338
|
-
--tw-text-opacity: 1;
|
|
1339
|
-
color: rgb(0 0 0 / var(--tw-text-opacity, 1));
|
|
1340
|
-
}
|
|
1341
1334
|
.text-btn-primary {
|
|
1342
1335
|
color: var(--btn-bg-color);
|
|
1343
1336
|
}
|
|
@@ -1356,6 +1349,9 @@ video {
|
|
|
1356
1349
|
.text-info-quaternary {
|
|
1357
1350
|
color: var(--info-quaternary-color);
|
|
1358
1351
|
}
|
|
1352
|
+
.text-info-white {
|
|
1353
|
+
color: var(--info-white-color);
|
|
1354
|
+
}
|
|
1359
1355
|
.text-lines-1 {
|
|
1360
1356
|
color: var(--line-color-1);
|
|
1361
1357
|
}
|
|
@@ -1371,10 +1367,6 @@ video {
|
|
|
1371
1367
|
.text-primary {
|
|
1372
1368
|
color: var(--brand-color-1);
|
|
1373
1369
|
}
|
|
1374
|
-
.text-white {
|
|
1375
|
-
--tw-text-opacity: 1;
|
|
1376
|
-
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
1377
|
-
}
|
|
1378
1370
|
.underline {
|
|
1379
1371
|
text-decoration-line: underline;
|
|
1380
1372
|
}
|
|
@@ -1626,48 +1618,91 @@ video {
|
|
|
1626
1618
|
opacity: 0.5;
|
|
1627
1619
|
}
|
|
1628
1620
|
@media (min-width: var(--breakpoint-sm)) {
|
|
1629
|
-
.
|
|
1621
|
+
.tablet\:mx-8 {
|
|
1630
1622
|
margin-left: 2rem;
|
|
1631
1623
|
margin-right: 2rem;
|
|
1632
1624
|
}
|
|
1633
|
-
.
|
|
1625
|
+
.tablet\:flex-row {
|
|
1634
1626
|
flex-direction: row;
|
|
1635
1627
|
}
|
|
1636
|
-
.
|
|
1628
|
+
.tablet\:justify-end {
|
|
1637
1629
|
justify-content: flex-end;
|
|
1638
1630
|
}
|
|
1639
|
-
.
|
|
1631
|
+
.tablet\:space-x-2 > :not([hidden]) ~ :not([hidden]) {
|
|
1640
1632
|
--tw-space-x-reverse: 0;
|
|
1641
1633
|
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
1642
1634
|
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
1643
1635
|
}
|
|
1644
|
-
.
|
|
1636
|
+
.tablet\:rounded-lg {
|
|
1645
1637
|
border-radius: 0.5rem;
|
|
1646
1638
|
}
|
|
1647
|
-
.
|
|
1639
|
+
.tablet\:text-left {
|
|
1648
1640
|
text-align: left;
|
|
1649
1641
|
}
|
|
1650
1642
|
}
|
|
1651
1643
|
@media (min-width: var(--breakpoint-md)) {
|
|
1652
|
-
.
|
|
1644
|
+
.laptop\:-bottom-\[40px\] {
|
|
1645
|
+
bottom: -40px;
|
|
1646
|
+
}
|
|
1647
|
+
.laptop\:bottom-\[40px\] {
|
|
1648
|
+
bottom: 40px;
|
|
1649
|
+
}
|
|
1650
|
+
.laptop\:mx-16 {
|
|
1653
1651
|
margin-left: 4rem;
|
|
1654
1652
|
margin-right: 4rem;
|
|
1655
1653
|
}
|
|
1656
|
-
.
|
|
1654
|
+
.laptop\:w-\[30px\] {
|
|
1655
|
+
width: 30px;
|
|
1656
|
+
}
|
|
1657
|
+
.laptop\:gap-4 {
|
|
1657
1658
|
gap: 1rem;
|
|
1658
1659
|
}
|
|
1659
1660
|
}
|
|
1660
1661
|
@media (min-width: var(--breakpoint-lg)) {
|
|
1661
|
-
.
|
|
1662
|
+
.desktop\:mx-16 {
|
|
1662
1663
|
margin-left: 4rem;
|
|
1663
1664
|
margin-right: 4rem;
|
|
1664
1665
|
}
|
|
1666
|
+
.desktop\:text-\[36px\] {
|
|
1667
|
+
font-size: 36px;
|
|
1668
|
+
}
|
|
1669
|
+
.desktop\:text-\[48px\] {
|
|
1670
|
+
font-size: 48px;
|
|
1671
|
+
}
|
|
1665
1672
|
}
|
|
1666
1673
|
@media (min-width: var(--breakpoint-xl)) {
|
|
1667
|
-
.
|
|
1674
|
+
.lg-desktop\:mx-auto {
|
|
1668
1675
|
margin-left: auto;
|
|
1669
1676
|
margin-right: auto;
|
|
1670
1677
|
}
|
|
1678
|
+
.lg-desktop\:p-6 {
|
|
1679
|
+
padding: 1.5rem;
|
|
1680
|
+
}
|
|
1681
|
+
.lg-desktop\:px-6 {
|
|
1682
|
+
padding-left: 1.5rem;
|
|
1683
|
+
padding-right: 1.5rem;
|
|
1684
|
+
}
|
|
1685
|
+
.lg-desktop\:pb-\[32px\] {
|
|
1686
|
+
padding-bottom: 32px;
|
|
1687
|
+
}
|
|
1688
|
+
.lg-desktop\:pt-\[32px\] {
|
|
1689
|
+
padding-top: 32px;
|
|
1690
|
+
}
|
|
1691
|
+
.lg-desktop\:text-\[16px\] {
|
|
1692
|
+
font-size: 16px;
|
|
1693
|
+
}
|
|
1694
|
+
.lg-desktop\:text-\[24px\] {
|
|
1695
|
+
font-size: 24px;
|
|
1696
|
+
}
|
|
1697
|
+
.lg-desktop\:text-\[32px\] {
|
|
1698
|
+
font-size: 32px;
|
|
1699
|
+
}
|
|
1700
|
+
.lg-desktop\:text-\[48px\] {
|
|
1701
|
+
font-size: 48px;
|
|
1702
|
+
}
|
|
1703
|
+
.lg-desktop\:text-\[64px\] {
|
|
1704
|
+
font-size: 64px;
|
|
1705
|
+
}
|
|
1671
1706
|
}
|
|
1672
1707
|
.\[\&\>\*\]\:\!invisible>* {
|
|
1673
1708
|
visibility: hidden !important;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { cn } from '../../helpers/utils'
|
|
4
|
-
import Picture from '../../components/picture'
|
|
5
|
-
import { withStyles } from '../../shared/Styles.js'
|
|
6
|
-
import type { ComponentCommonProps } from '../../types/props.js'
|
|
7
|
-
|
|
8
|
-
export interface BrandEquityItem {
|
|
9
|
-
icon?: React.ReactNode
|
|
10
|
-
title: string
|
|
11
|
-
description: string
|
|
12
|
-
avatarList?: string[]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface BrandEquityProps extends ComponentCommonProps {
|
|
16
|
-
items: BrandEquityItem[]
|
|
17
|
-
itemShape?: 'round' | 'square'
|
|
18
|
-
className?: string
|
|
19
|
-
theme?: 'light' | 'dark'
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const BrandEquity: React.FC<BrandEquityProps> = ({ items = [], itemShape = 'square', style = '', className = '' }) => {
|
|
23
|
-
return (
|
|
24
|
-
<div className={cn('brand-equity-wrapper w-full', className)}>
|
|
25
|
-
<div
|
|
26
|
-
className={cn(
|
|
27
|
-
'grid gap-3 px-4',
|
|
28
|
-
'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
|
|
29
|
-
'md:gap-4',
|
|
30
|
-
'lg:px-[140px] xl:px-[175px] 2xl:px-[268px]'
|
|
31
|
-
)}
|
|
32
|
-
>
|
|
33
|
-
{items.map((item, index) => (
|
|
34
|
-
<div
|
|
35
|
-
key={index}
|
|
36
|
-
className={cn(
|
|
37
|
-
'brand-equity-item',
|
|
38
|
-
'bg-white p-4 flex flex-col',
|
|
39
|
-
'lg:p-6',
|
|
40
|
-
'gap-12 lg:gap-16',
|
|
41
|
-
itemShape === 'round' ? 'rounded-[16px]' : 'rounded-none'
|
|
42
|
-
)}
|
|
43
|
-
>
|
|
44
|
-
<div className="flex justify-between items-center gap-3">
|
|
45
|
-
<h3 className="text-sm font-semibold text-[#1D1D1F] leading-[1.2] tracking-[-0.02em] 2xl:text-lg">
|
|
46
|
-
{item.title}
|
|
47
|
-
</h3>
|
|
48
|
-
{item.avatarList?.length ? (
|
|
49
|
-
<div className="flex -space-x-2">
|
|
50
|
-
{item.avatarList.map((avatarUrl: string, index: number) => (
|
|
51
|
-
<div
|
|
52
|
-
key={index}
|
|
53
|
-
className={cn(
|
|
54
|
-
'size-[30px] rounded-full border-2 border-white overflow-hidden',
|
|
55
|
-
'relative inline-block',
|
|
56
|
-
'xl:size-[36px]'
|
|
57
|
-
)}
|
|
58
|
-
>
|
|
59
|
-
<Picture source={avatarUrl} className="w-full h-full object-cover" />
|
|
60
|
-
</div>
|
|
61
|
-
))}
|
|
62
|
-
</div>
|
|
63
|
-
) : (
|
|
64
|
-
<span className="text-[#1D1D1F]">{item.icon}</span>
|
|
65
|
-
)}
|
|
66
|
-
</div>
|
|
67
|
-
<p className="font-bold text-xl text-[#1D1D1F] leading-[1.2] tracking-[-0.04em] 2xl:text-2xl">
|
|
68
|
-
{item.description}
|
|
69
|
-
</p>
|
|
70
|
-
</div>
|
|
71
|
-
))}
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export default withStyles(BrandEquity)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './BrandEquity.js'
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { cn } from '../../helpers/utils'
|
|
3
|
-
import Picture from '../../components/picture'
|
|
4
|
-
|
|
5
|
-
export interface CategoryItem {
|
|
6
|
-
/** 产品图片*/
|
|
7
|
-
img: string
|
|
8
|
-
title: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface CategoryProps {
|
|
12
|
-
products: CategoryItem[]
|
|
13
|
-
className?: string
|
|
14
|
-
/** 主题色*/
|
|
15
|
-
theme?: 'light' | 'dark'
|
|
16
|
-
/** 卡片形状 */
|
|
17
|
-
shape?: 'round' | 'square'
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const Category: React.FC<CategoryProps> = ({
|
|
21
|
-
className = '',
|
|
22
|
-
shape = 'square',
|
|
23
|
-
products = [],
|
|
24
|
-
}) => {
|
|
25
|
-
return (
|
|
26
|
-
<>
|
|
27
|
-
<div className={cn('w-full', className)}>
|
|
28
|
-
<div className={cn('flex overflow-hidden', 'md:px-[140px] lg:px-[268px]')}>
|
|
29
|
-
<div className={cn('w-full flex', 'gap-3 md:gap-4 overflow-x-auto overflow-y-hidden')}>
|
|
30
|
-
{products?.map((item, index) => {
|
|
31
|
-
return (
|
|
32
|
-
<div
|
|
33
|
-
key={index}
|
|
34
|
-
className={cn(
|
|
35
|
-
'bg-[#EAEAEC] p-4 flex flex-col min-w-[167px] max-w-[167px] box-border overflow-hidden',
|
|
36
|
-
'md:min-w-[205px] md:max-w-[205px] lg:min-w-[264px] lg:max-w-[264px] md:p-6 lg:p-8',
|
|
37
|
-
shape === 'round' ? 'rounded-[16px]' : 'rounded-none'
|
|
38
|
-
)}
|
|
39
|
-
>
|
|
40
|
-
<Picture
|
|
41
|
-
className="w-full object-cover"
|
|
42
|
-
source={item?.img}
|
|
43
|
-
/>
|
|
44
|
-
<p className="flex-1 text-sm text-center font-semibold lg:text-lg">
|
|
45
|
-
{item?.title}
|
|
46
|
-
</p>
|
|
47
|
-
</div>
|
|
48
|
-
)
|
|
49
|
-
})}
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export default Category
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { cn } from '../../helpers/utils'
|
|
3
|
-
import Picture from '../../components/picture'
|
|
4
|
-
import { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar'
|
|
5
|
-
|
|
6
|
-
export interface EvaluateItem {
|
|
7
|
-
/** 产品图片*/
|
|
8
|
-
img: string
|
|
9
|
-
title: string
|
|
10
|
-
subTitle: string
|
|
11
|
-
description: string
|
|
12
|
-
avatar?: string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface EvaluateProps {
|
|
16
|
-
products: EvaluateItem[]
|
|
17
|
-
className?: string
|
|
18
|
-
/** 主题色*/
|
|
19
|
-
theme?: 'light' | 'dark'
|
|
20
|
-
/** 形状 */
|
|
21
|
-
shape?: 'round' | 'square'
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const Evaluate: React.FC<EvaluateProps> = ({
|
|
25
|
-
className = '',
|
|
26
|
-
shape = 'square',
|
|
27
|
-
products = [],
|
|
28
|
-
}) => {
|
|
29
|
-
return (
|
|
30
|
-
<>
|
|
31
|
-
<div className={cn('w-full', className)}>
|
|
32
|
-
<div className={cn('flex overflow-hidden', 'md:px-[140px] lg:px-[268px]')}>
|
|
33
|
-
<div className={cn('w-full flex', 'gap-3 md:gap-4 overflow-x-auto overflow-y-hidden')}>
|
|
34
|
-
{products?.map((item, index) => {
|
|
35
|
-
return (
|
|
36
|
-
<div
|
|
37
|
-
key={index}
|
|
38
|
-
className={cn(
|
|
39
|
-
'bg-[#EAEAEC] p-4 flex flex-col min-w-[288px] max-w-[288px] box-border overflow-hidden',
|
|
40
|
-
'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',
|
|
41
|
-
shape === 'round' ? 'rounded-2xl' : 'rounded-none'
|
|
42
|
-
)}
|
|
43
|
-
>
|
|
44
|
-
<div className={cn('mb-8 w-full flex justify-between md:mb-11 lg:mb-16')}>
|
|
45
|
-
<div className="flex-1">
|
|
46
|
-
<h4 className="text-sm font-semibold md:text-lg">{item?.title}</h4>
|
|
47
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
48
|
-
<path
|
|
49
|
-
d="M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z"
|
|
50
|
-
fill="#F77234"
|
|
51
|
-
/>
|
|
52
|
-
</svg>
|
|
53
|
-
</div>
|
|
54
|
-
<div className="size-10 overflow-hidden lg:size-12">
|
|
55
|
-
<Avatar className="w-full h-full">
|
|
56
|
-
<AvatarImage src={item?.avatar} />
|
|
57
|
-
<AvatarFallback>{item?.title}</AvatarFallback>
|
|
58
|
-
</Avatar>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
<p className="flex-1 line-clamp-6 font-bold text-xl text-[#1D1D1F] lg:text-2xl">
|
|
62
|
-
{item?.description || ''}
|
|
63
|
-
</p>
|
|
64
|
-
<div className={cn('mt-11 p-3 flex items-center bg-[#F7F8F9] overflow-hidden', shape === 'round' ? 'rounded-[8px]' : 'rounded-none')}>
|
|
65
|
-
<div className="flex items-center mr-3 size-12 md:size-16 lg:size-20">
|
|
66
|
-
<Picture
|
|
67
|
-
className="w-full object-cover"
|
|
68
|
-
source={item?.img}
|
|
69
|
-
/>
|
|
70
|
-
</div>
|
|
71
|
-
<p className="flex-1 text-sm font-semibold line-clamp-2 lg:text-lg">
|
|
72
|
-
{item?.subTitle || ''}
|
|
73
|
-
</p>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
)
|
|
77
|
-
})}
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</>
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export default Evaluate
|