diff --git a/packages/common/package.json b/packages/common/package.json index 5daa3d8..4b494c9 100755 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@aelf-design/common", - "version": "0.0.1-alpha.3", + "version": "1.0.0.alpha.1", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js", diff --git a/packages/component/package.json b/packages/component/package.json index 9ab1c10..92abbe3 100755 --- a/packages/component/package.json +++ b/packages/component/package.json @@ -1,6 +1,6 @@ { "name": "aelf-design", - "version": "0.0.1-alpha.3", + "version": "1.0.0.alpha.1", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js", @@ -39,29 +39,28 @@ "build": "father build" }, "dependencies": { - "@ant-design/cssinjs": "^1.18.2", "@aelf-design/common": "workspace:*", "@aelf-design/internal-icons": "workspace:*", + "@ant-design/cssinjs": "^1.18.2", "@ctrl/tinycolor": "^4.0.2", "antd": "^5.12.4", "classnames": "^2.3.2", "copy-to-clipboard": "^3.3.3", - "swiper": "^11.0.5", "dayjs": "^1.11.10", - "ahooks": "^3.7.10", - "lodash-es": "^4.17.21" + "lodash-es": "^4.17.21", + "swiper": "^11.0.5" }, "devDependencies": { + "@aws-sdk/client-cognito-identity": "^3.410.0", + "@aws-sdk/client-s3": "^3.410.0", + "@aws-sdk/credential-provider-cognito-identity": "^3.410.0", + "@aws-sdk/lib-storage": "^3.412.0", "@types/react": "^18.2.45", "@types/react-dom": "^18.2.18", - "father": "^4.3.8", - "typescript": "^5.3.3", "antd-mobile": "^5.34.0", "antd-style": "^3.5.2", - "@aws-sdk/client-cognito-identity": "^3.410.0", - "@aws-sdk/client-s3": "^3.410.0", - "@aws-sdk/credential-provider-cognito-identity": "^3.410.0", - "@aws-sdk/lib-storage": "^3.412.0" + "father": "^4.3.8", + "typescript": "^5.3.3" }, "peerDependencies": { "antd": ">=5.0.0", diff --git a/packages/component/src/Address/index.md b/packages/component/src/Address/index.md index a069848..89adfc6 100644 --- a/packages/component/src/Address/index.md +++ b/packages/component/src/Address/index.md @@ -51,14 +51,14 @@ group: ## API | Property | Description | Type | Default | Version | -| --- | --- | --- | --- | --- | --- | -| address | hash地址 | `string` | - | `1.0.0` | +| --- | --- | --- | --- | --- | +| address | hash地址 | `string` | - | `1.0.0`  | | chain | 主侧链信息 | `AELF \| tDVV \| tDVW` | `AELF` | `1.0.0` | | preLen | ...之前保留多少位 | `number` | `0` | `1.0.0` | | endLen | ...之后保留多少位 | `number` | `0` | `1.0.0` | | hasCopy | 是否展示复制按钮 | `boolean` | `true` | `1.0.0` | | addressClickCallback | 点击hash地址回调函数 | `(originAddress?: string,finalAddress?: string,e?: React.MouseEvent) => void` | - | `1.0.0` | | className | 设置最外层样式 | `string` | - | `1.0.0` | -| size | 设置元素大小 | `small \| default \| large \| ultra`
`small`: font-size:12px
`default`: font-size:14px
`large`: font-size:16px
`ultra`: font-size:20px | `default` | - | `1.0.0` | +| size | 设置元素大小 | `small \| default \| large \| ultra`
`small`: font-size:12px
`default`: font-size:14px
`large`: font-size:16px
`ultra`: font-size:20px | `default`  | `1.0.0` | | ignorePrefixSuffix | 忽略添加前后缀 | `boolean` | `false` | `1.0.0` | | ignoreEvent | 忽略绑定点击事件 | `boolean` | `false` | `1.0.0` | diff --git a/packages/component/src/Carousel/index.md b/packages/component/src/Carousel/index.md index 8127394..489d67b 100644 --- a/packages/component/src/Carousel/index.md +++ b/packages/component/src/Carousel/index.md @@ -18,7 +18,7 @@ group: | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| data | 轮播图数据,URL是必传的 | `ICarouselSlideItem { url: string [key: string]: any}[]` | `{ headClip: 6, tailClip: 4 }` | `1.0.0` | +| data | 轮播图数据,URL是必传的 | `ICarouselSlideItem { url: string [key: string]: any}[]` | `{ headClip: 6, tailClip: 4 }` | `1.0.0`  | | galleryObjectFit | gallery图片展示规则 | `fill \| contain \| cover \| none \| scale-down` | `cover` | `1.0.0` | | thumbsSlidesPerView | thumbs一页展示多少条 | `number` | `5` | `1.0.0` | | onSlideClick | 点击轮播图片触发事件,返回值是当前点击的图片ICarouselSlideItem对象 | `(value: ICarouselSlideItem) => void` | - | `1.0.0` | diff --git a/packages/component/src/Collapse/index.md b/packages/component/src/Collapse/index.md index 7edca7b..a54c319 100644 --- a/packages/component/src/Collapse/index.md +++ b/packages/component/src/Collapse/index.md @@ -44,7 +44,7 @@ refer to [Collapse Token](https://ant.design/components/collapse-cn#%E4%B8%BB%E9 | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| expandIcon删除 | 自定义切换图标 | `(panelProps) => ReactNode` | `1.0.0` | +| expandIcon删除 | 自定义切换图标 | `(panelProps) => ReactNode` | - | `1.0.0` | | expandIconPosition删除 | 设置图标位置 | `number` | `start \| end` | `1.0.0` | ## Supported API diff --git a/packages/component/src/Loading/demos/basic.tsx b/packages/component/src/Loading/demos/basic.tsx index 0c99755..a3f671d 100644 --- a/packages/component/src/Loading/demos/basic.tsx +++ b/packages/component/src/Loading/demos/basic.tsx @@ -14,10 +14,7 @@ export default function LoadingExample() { return ( <> - I am loading...} - /> + I am loading......} /> ); } diff --git a/packages/component/src/Pagination/demos/basic.tsx b/packages/component/src/Pagination/demos/basic.tsx index 38897d8..cae518c 100644 --- a/packages/component/src/Pagination/demos/basic.tsx +++ b/packages/component/src/Pagination/demos/basic.tsx @@ -1,6 +1,6 @@ -import React, { useState } from 'react'; +import React from 'react'; import { Pagination } from 'aelf-design'; -import { Row, Space } from 'antd'; +import { Space } from 'antd'; function Demo() { return ( diff --git a/packages/component/src/Pagination/index.md b/packages/component/src/Pagination/index.md index c54d2b8..cca4a65 100644 --- a/packages/component/src/Pagination/index.md +++ b/packages/component/src/Pagination/index.md @@ -7,36 +7,36 @@ group: # Pagination -1. 调整了样式 -2. 定制了 上一页/上一页 icon -3. 固定文案:Records 10 Records、First、Last +aelf-design aelf-design own component ## Basic Usage -## 组件 Token - -customToken - -```json -customPagination: { - colorTextSecondary: isDarkMode ? '#8C8C8C' : '#808080', - colorBgHover: isDarkMode ? '#212121' : '#F8F8F8', - colorDownArrow: isDarkMode ? '#FFFFFF' : '#101114', -}, +## Token + +```js + ``` ## API | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| current | 当前页数 | number | - | - | -| pageSize | 每页条数 | number | 10 | - | -| defaultCurrent | 默认的当前页数 | number | 1 | - | -| defaultPageSize | 默认的每页条数 | number | 10 | - | -| hideOnSinglePage | 只有一页时是否隐藏分页器。根据options最小值判断 | Boolean | false | - | -| total | 数据总数 | number | - | - | -| showSizeChanger | 是否显示pageSize切换 | Boolean | true | - | -| pageChange | 页码改变的回调,参数是改变后的页码 | function(page) | - | - | -| pageSizeChange | pageSize 改变的回调,参数是改变后的页码及每页条数。因为这里默认处理当sizeChange的时候,页码重置为1,所以一起返回了 | function(current, size) | - | - | +| current | 当前页数 | `number` | - | `1.0.0` | +| pageSize | 每页条数 | `number` | `10` | `1.0.0` | +| defaultCurrent | 默认的当前页数 | `number` | `1` | `1.0.0` | +| defaultPageSize | 默认的每页条数 | `number` | `10` | `1.0.0` | +| hideOnSinglePage | 只有一页时是否隐藏分页器。根据options最小值判断 | `boolean` | `false`  | `1.0.0` | +| total | 数据总数 | `number` | - | `1.0.0` | +| showSizeChanger | 是否显示pageSize切换 | `boolean` | `true` | `1.0.0` | +| pageChange | 页码改变的回调,参数是改变后的页码 | `function(page)` | - | `1.0.0` | +| pageSizeChange | pageSize 改变的回调,参数是改变后的页码及每页条数。因为这里默认处理当sizeChange的时候,页码重置为1,所以一起返回了 | `function(current, size)` | - | `1.0.0`  | diff --git a/packages/component/src/ProgressModal/demos/basic.tsx b/packages/component/src/ProgressModal/demos/basic.tsx new file mode 100644 index 0000000..81761f2 --- /dev/null +++ b/packages/component/src/ProgressModal/demos/basic.tsx @@ -0,0 +1,57 @@ +import React from 'react'; +import { Button } from 'aelf-design'; + +import { IStepItem } from '../../RichProgress/index'; +import ProgressModal from '../index'; + +const App: React.FC = () => { + const [showProgress, setShowProgress] = React.useState(false); + const steps: IStepItem[] = [ + { + title: 'Title1Title1Title1', + subTitle: 'subTitle1subTitle1.', + percent: 100, + progressTip: 'About 15 sec', + status: 'normal', + available: true, + }, + { + title: 'Title2Title2Title2', + subTitle: 'subTitle2subTitle2subTitle2subTitle2.', + percent: 60, + progressTip: 'About 3~5 min', + status: 'exception', + available: true, + }, + { + title: 'Title3Title3Title3', + subTitle: 'subTitle3subTitle3subTitle3.', + percent: 0, + progressTip: 'About 20 sec', + status: 'normal', + available: false, + }, + ]; + return ( +
+ { + setShowProgress(false); + }} + /> + +
+ ); +}; + +export default App; diff --git a/packages/component/src/ProgressModal/index.md b/packages/component/src/ProgressModal/index.md index 589c2ae..1858c73 100644 --- a/packages/component/src/ProgressModal/index.md +++ b/packages/component/src/ProgressModal/index.md @@ -7,29 +7,35 @@ group: # ProgressModal -## Basic Usage - - - -## Copyable - - +aelf-design aelf-design own component -## Format - - +## Basic Usage -## Custom Tooltip + - +| Property | Description | Type | Default | Version | +| --- | --- | --- | --- | --- | +| stepsData | 步骤数据 | [IStepItem[]](#istepitem) | - | `1.0.0` | +| desc | 弹窗描述信息 | `ReactNode` | - | `1.0.0` | +| strokeColor | 成功进度条颜色 | `string` | 跟随`progress`组件主色 | `1.0.0` | +| strokeErrorColor | 失败进度条颜色 | `string` | 跟随`progress`组件`error`色 | `1.0.0` | +| trailColor | 进度条底色 | `string` | 跟随`progress`组件`trailColor`色 | `1.0.0` | +| successIcon | 成功步骤图标 | `ReactNode` | `` | `1.0.0` | +| errorIcon | 失败步骤图标 | `ReactNode` | `` | `1.0.0` | -## API +### IStepItem | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| ellipsis | Address clipping strategy | `boolean \| { headClip?: number, tailClip?: number }` | `{ headClip: 6, tailClip: 4 }` | - | -| copyable | Address copyable | `boolean` | `false` | - | -| address | Address | `string` | - | - | -| tooltip | Show tooltip when hover address | `boolean \|`[Tooltip.title](https://ant.design/components/tooltip-cn#api) | `true ` | - | -| format | Address format | `boolean \| (input: string) => ReactNode` | `false` | - | -| locale | Multilingual settings | `Locale["address"]` | - | - | +| title | 设置title | `ReactNode` | - | `1.0.0` | +| subTitle | 设置subTitle | `ReactNode` | - | `1.0.0` | +| percent | 当前步骤进度条百分比 | `number` | - | `1.0.0` | +| progressTip | 当前步骤进度条下方文本描述 | `ReactNode` | - | `1.0.0` | +| status | 当前步骤状态 | [ProgressLineType](#progresslinetype) | - | `1.0.0` | +| available | 控制当前步骤文案黑色还是灰色 | `boolean` | - | `1.0.0` | + +### ProgressLineType + +```js +type ProgressLineType = 'exception' | 'normal'; +``` diff --git a/packages/component/src/ProgressModal/index.tsx b/packages/component/src/ProgressModal/index.tsx index 1116971..16a617b 100644 --- a/packages/component/src/ProgressModal/index.tsx +++ b/packages/component/src/ProgressModal/index.tsx @@ -1,8 +1,8 @@ -import React, { ReactNode } from 'react'; +import React, { memo, ReactNode } from 'react'; import { ModalProps } from 'antd'; import Modal from '../Modal'; -import { IStepItem, RichProgress } from '../RichProgress'; +import RichProgress, { IStepItem } from '../RichProgress'; import useStyles from './style'; export interface IProgressModalProps extends ModalProps { @@ -15,7 +15,7 @@ export interface IProgressModalProps extends ModalProps { errorIcon?: ReactNode; } -export const ProgressModal = (props: IProgressModalProps) => { +const ProgressModal = (props: IProgressModalProps) => { const { steps, desc, successIcon, errorIcon, strokeColor, trailColor, strokeErrorColor } = props; const { styles, cx, prefixCls } = useStyles(); @@ -38,3 +38,5 @@ export const ProgressModal = (props: IProgressModalProps) => { ); }; + +export default memo(ProgressModal); diff --git a/packages/component/src/Radio/index.md b/packages/component/src/Radio/index.md index e29eb55..000a3a4 100644 --- a/packages/component/src/Radio/index.md +++ b/packages/component/src/Radio/index.md @@ -7,21 +7,27 @@ group: # Radio -1. 定制了样式 -2. 可自定义 圆点样式 - ## Basic Usage -## 组件 token - -```json -customRadio: { - dotColor: isDarkMode ? '#1A1A1A' : '#FFFFFF', -}, +## Token + +```js + ``` -## API +## Supported Token + +refer to [Radio Token](https://ant.design/components/radio-cn#%E4%B8%BB%E9%A2%98%E5%8F%98%E9%87%8Fdesign-token) + +## Supported API -参考 antd +refer to [Radio API](https://ant.design/components/radio-cn#api) diff --git a/packages/component/src/RichProgress/demos/basic.tsx b/packages/component/src/RichProgress/demos/basic.tsx new file mode 100644 index 0000000..ac9059b --- /dev/null +++ b/packages/component/src/RichProgress/demos/basic.tsx @@ -0,0 +1,39 @@ +import React from 'react'; + +import RichProgress, { IStepItem } from '../index'; + +const App: React.FC = () => { + const steps: IStepItem[] = [ + { + title: 'Title1Title1Title1', + subTitle: 'subTitle1subTitle1.', + percent: 100, + progressTip: 'About 15 sec', + status: 'normal', + available: true, + }, + { + title: 'Title2Title2Title2', + subTitle: 'subTitle2subTitle2subTitle2subTitle2.', + percent: 60, + progressTip: 'About 3~5 min', + status: 'exception', + available: true, + }, + { + title: 'Title3Title3Title3', + subTitle: 'subTitle3subTitle3subTitle3.', + percent: 0, + progressTip: 'About 20 sec', + status: 'normal', + available: false, + }, + ]; + return ( +
+ +
+ ); +}; + +export default App; diff --git a/packages/component/src/RichProgress/index.md b/packages/component/src/RichProgress/index.md index 64cd783..d63771b 100644 --- a/packages/component/src/RichProgress/index.md +++ b/packages/component/src/RichProgress/index.md @@ -7,29 +7,36 @@ group: # RichProgress -## Basic Usage - - - -## Copyable +aelf-design aelf-design own component - - -## Format +## Basic Usage - + -## Custom Tooltip +## API - +| Property | Description | Type | Default | Version | +| --- | --- | --- | --- | --- | +| stepsData | 步骤数据 | [IStepItem[]](#istepitem) | - | `1.0.0` | +| strokeColor | 成功进度条颜色 | `string` | 跟随`progress`组件主色 | `1.0.0` | +| strokeErrorColor | 失败进度条颜色 | `string` | 跟随`progress`组件`error`色 | `1.0.0` | +| trailColor | 进度条底色 | `string` | 跟随`progress`组件`trailColor`色 | `1.0.0` | +| successIcon | 成功步骤图标 | `ReactNode` | `` | `1.0.0` | +| errorIcon | 失败步骤图标 | `ReactNode` | `` | `1.0.0` | -## API +### IStepItem | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| ellipsis | Address clipping strategy | `boolean \| { headClip?: number, tailClip?: number }` | `{ headClip: 6, tailClip: 4 }` | - | -| copyable | Address copyable | `boolean` | `false` | - | -| address | Address | `string` | - | - | -| tooltip | Show tooltip when hover address | `boolean \|`[Tooltip.title](https://ant.design/components/tooltip-cn#api) | `true ` | - | -| format | Address format | `boolean \| (input: string) => ReactNode` | `false` | - | -| locale | Multilingual settings | `Locale["address"]` | - | - | +| title | 设置title | `ReactNode` | - | `1.0.0` | +| subTitle | 设置subTitle | `ReactNode` | - | `1.0.0` | +| percent | 当前步骤进度条百分比 | `number` | - | `1.0.0` | +| progressTip | 当前步骤进度条下方文本描述 | `ReactNode` | - | `1.0.0` | +| status | 当前步骤状态 | [ProgressLineType](#progresslinetype) | - | `1.0.0` | +| available | 控制当前步骤文案黑色还是灰色 | `boolean` | - | `1.0.0` | + +### ProgressLineType + +```js +type ProgressLineType = 'exception' | 'normal'; +``` diff --git a/packages/component/src/RichProgress/index.tsx b/packages/component/src/RichProgress/index.tsx index 38e1c69..29ae79d 100644 --- a/packages/component/src/RichProgress/index.tsx +++ b/packages/component/src/RichProgress/index.tsx @@ -1,6 +1,6 @@ -import React, { ReactNode } from 'react'; +import React, { memo, ReactNode } from 'react'; import { ProgressErrorIcon, ProgressSuccessIcon } from '@aelf-design/internal-icons'; -import { useResponsive } from 'ahooks/es/useResponsive'; +import { useResponsive } from 'antd-style'; import Progress from '../Progress'; import useStyles from './style'; @@ -50,7 +50,7 @@ const StepItemIcon = ({ return ( -## 组件 token +## Token ```js ``` - +## Supported Token + +refer to [Table Token](https://ant.design/components/table-cn#%E4%B8%BB%E9%A2%98%E5%8F%98%E9%87%8Fdesign-token) ## API -参考 antd +## Supported API + +refer to [Table API](https://ant.design/components/table-cn#table) diff --git a/packages/component/src/Tabs/demos/basic.tsx b/packages/component/src/Tabs/demos/basic.tsx index 4aba64f..acd866b 100644 --- a/packages/component/src/Tabs/demos/basic.tsx +++ b/packages/component/src/Tabs/demos/basic.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { DownArrowIcon } from '@aelf-design/internal-icons'; -import { AndroidOutlined, SearchOutlined } from '@ant-design/icons'; import { Tabs } from 'aelf-design'; import { Space } from 'antd'; @@ -9,7 +8,7 @@ const tabItems = [ key: '1', label: 'Tab 1', children: 'Content of Tab Pane 1', - icon: , + icon: , }, { key: '2', @@ -21,7 +20,7 @@ const tabItems = [ key: '3', label: 'Tabxxxxxx 3', children: 'Content of Tab Pane 3', - icon: , + icon: , }, ]; const App: React.FC = () => { @@ -30,9 +29,9 @@ const App: React.FC = () => { origin - 26} + indicator={{ size: (origin) => origin - 20 }} /> ); diff --git a/packages/component/src/Tabs/index.md b/packages/component/src/Tabs/index.md index e386720..afe8168 100644 --- a/packages/component/src/Tabs/index.md +++ b/packages/component/src/Tabs/index.md @@ -7,27 +7,39 @@ group: # Tabs -1. 调整了样式 -2. 修改 size props, 提供middle 和small 两种大小 -3. 删除 tabBarGutter: tabs 之间的间隙 +1. customize style +2. delete `size` props, and provide `middle`,`small` size +3. delete `tabBarGutter`: gap between tabs ## Basic Usage -## 组件 token - -```json -Tabs: { - // 标准大小横向标签页标签内间距 - horizontalItemPadding: '17px 16px', - // 小号横向标签页标签内间距 - horizontalItemPaddingSM: '13px 10px', - }, +## Token + +```js + ``` +## Supported Token + +refer to [Tabs Token](https://ant.design/components/tabs-cn#%E4%B8%BB%E9%A2%98%E5%8F%98%E9%87%8Fdesign-token) + ## API -| Property | Description | Type | Default | Version | -| -------- | ----------------------------- | ----------------- | -------- | ------- | -| size | 提供 middle 和 small 两种大小 | `middle \| small` | `middle` | - | +| Property | Description | Type | Default | Version | +| --- | --- | --- | --- | --- | +| size修改 | 提供 middle 和 small 两种大小 | `middle \| small` | `middle` | `1.0.0` | + +## Supported API + +refer to [Tabs API](https://ant.design/components/tabs-cn#api) diff --git a/packages/component/src/ToolTip/demos/basic.tsx b/packages/component/src/ToolTip/demos/basic.tsx index e3e0d4e..9f13f57 100644 --- a/packages/component/src/ToolTip/demos/basic.tsx +++ b/packages/component/src/ToolTip/demos/basic.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { Button, ToolTip } from 'aelf-design'; -import { Space } from 'antd'; const text = ( @@ -9,9 +8,24 @@ const text = ( ); -function Demo() { - return ( - +const buttonWidth = 100; + +const App: React.FC = () => ( +
+
@@ -21,8 +35,66 @@ function Demo() { - - ); -} +
+
+ + + + + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + + + + +
+
+); -export default Demo; +export default App; diff --git a/packages/component/src/ToolTip/index.md b/packages/component/src/ToolTip/index.md index b82f728..1298892 100644 --- a/packages/component/src/ToolTip/index.md +++ b/packages/component/src/ToolTip/index.md @@ -5,14 +5,16 @@ group: order: 3 --- -# ToolTip - -1. 调整了样式 +# Tooltip ## Basic Usage -## API +## Supported Token + +refer to [Tooltip Token](https://ant.design/components/tooltip-cn#%E4%B8%BB%E9%A2%98%E5%8F%98%E9%87%8Fdesign-token) + +## Supported API -同 antd +refer to [Tooltip API](https://ant.design/components/tooltip-cn#api) diff --git a/packages/component/src/Typography/demos/text.tsx b/packages/component/src/Typography/demos/text.tsx index 9d23308..d3077ea 100644 --- a/packages/component/src/Typography/demos/text.tsx +++ b/packages/component/src/Typography/demos/text.tsx @@ -8,21 +8,32 @@ function Demo() { text mini Regular + + text mini Medium + + + text mini Bold + + text small Regular + + text small Medium + + + text small Bold + + text normal Regular + + text normal Medium + text normal Bold - - text small Bold - - - text mini Bold -
); } diff --git a/packages/component/src/Typography/demos/title.tsx b/packages/component/src/Typography/demos/title.tsx index 8e15435..8deaeac 100644 --- a/packages/component/src/Typography/demos/title.tsx +++ b/packages/component/src/Typography/demos/title.tsx @@ -31,9 +31,6 @@ function Demo() { level7 Bold - - text small Regular - ); } diff --git a/packages/component/src/Typography/index.md b/packages/component/src/Typography/index.md index 3ec498e..3ba2c07 100644 --- a/packages/component/src/Typography/index.md +++ b/packages/component/src/Typography/index.md @@ -7,8 +7,8 @@ group: # Typography -1. Text 新增 `fontWeight、 size` props -2. Title 新增 `fontWeight level` props +1. Title add `fontWeight、level` props +2. Text add `fontWeight、 size` props ## Typography.Title @@ -24,12 +24,12 @@ group: | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| fontWeight | 设置字体粗细 | `Regular \| Medium \| Bold` | `Regular` | - | -| level | 重要程度,相当于 h1、h2、h3、h4、h5 | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7`
1: fontSize = 56 lineHeight = 64
2: fontSize = 48 lineHeight = 56
3: fontSize = 40 lineHeight = 48
4: fontSize = 32 lineHeight = 40
5: fontSize = 24 lineHeight = 32
6: fontSize = 20 lineHeight = 28
7: fontSize = 16 lineHeight = 24 | 7 | - | +| fontWeight修改 | 设置字体粗细 | `Regular \| Medium \| Bold` | `Regular` | `1.0.0` | +| level修改 | 重要程度,相当于 h1、h2、h3、h4、h5 | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7`
1: fontSize = 56 lineHeight = 64
2: fontSize = 48 lineHeight = 56
3: fontSize = 40 lineHeight = 48
4: fontSize = 32 lineHeight = 40
5: fontSize = 24 lineHeight = 32
6: fontSize = 20 lineHeight = 28
7: fontSize = 16 lineHeight = 24 | `7` | `1.0.0` | ### Typography.Text | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| fontWeight | 设置字体粗细 | `Regular \|Medium \|Bold` | `Regular` | - | -| size | 字体大小 | `normal \| mini \| small`
normal:fontSize = 14 lineHeight = 22
small:fontSize = 12 lineHeight = 20
mini: fontSize = 10 lineHeight = 18 | `normal` | - | +| fontWeight修改 | 设置字体粗细 | `Regular \|Medium \|Bold` | `Regular` | `1.0.0` | +| size修改 | 字体大小 | `normal \| mini \| small`
normal:fontSize = 14 lineHeight = 22
small:fontSize = 12 lineHeight = 20
mini: fontSize = 10 lineHeight = 18 | `normal` | `1.0.0` | diff --git a/packages/component/src/Upload/index.md b/packages/component/src/Upload/index.md index 6f0e02a..bab9f1d 100644 --- a/packages/component/src/Upload/index.md +++ b/packages/component/src/Upload/index.md @@ -31,16 +31,16 @@ Please fill in your AWS configuration before trying to upload ## API -| Adjust | Property | Description | Type | Default | Version | -| --- | --- | --- | --- | --- | --- | -| add | tips | 上传区域提示文案 | `string \| ReactNode` | Formats supported JPG, JPEG, PNG. Max size 10 MB.Recommend ratio 16:9. | | -| add | showUploadButton | 是否展示上传按钮 | `boolean` | `true` | - | -| add | uploadText | 上传提示文案 | `string` | Upload | - | -| add | uploadIconColor | 上传icon颜色 | `string` | 默认是主题色,colorPrimary | - | -| add | format | Address format | `boolean \| (input: string) => ReactNode` | `false` | - | -| add | locale | Multilingual settings | `Locale["address"]` | - | - | -| delete | listType | - | - | - | - | -| delete | itemRender | - | - | - | - | +| Property | Description | Type | Default | Version | +| --- | --- | --- | --- | --- | +| tipsadd | 上传区域提示文案 | `string \| ReactNode` | Formats supported JPG, JPEG, PNG. Max size 10 MB.Recommend ratio 16:9. | `1.0.0`  | +| showUploadButtonadd | 是否展示上传按钮 | `boolean` | `true` | `1.0.0` | +| uploadTextadd | 上传提示文案 | `string` | Upload | `1.0.0` | +| uploadIconColoradd | 上传icon颜色 | `string` | 默认是主题色,colorPrimary | `1.0.0` | +| formatadd | Address format | `boolean \| (input: string) => ReactNode` | `false` | `1.0.0` | +| localeadd | Multilingual settings | `Locale["address"]` | - | `1.0.0` | +| listTypedelete | - | - | - | `1.0.0` | +| itemRenderdelete | - | - | - | `1.0.0` | ## Design Token @@ -52,6 +52,6 @@ Please fill in your AWS configuration before trying to upload | borderColor | 边框颜色 | `string` | 暗黑模式:#484848 日间模式:#E0E0E0 | | containerBg | 上传区域背景颜色 | `string` | 暗黑模式:#8C8C8C 日间模式:#808080 | -### 其他支持的API参考antd +### Supported API -https://ant-design.antgroup.com/components/upload-cn#api +refer to [Upload API](https://ant-design.antgroup.com/components/upload-cn#api) diff --git a/packages/component/src/UploadButton/index.md b/packages/component/src/UploadButton/index.md index 718a29f..aa9d186 100644 --- a/packages/component/src/UploadButton/index.md +++ b/packages/component/src/UploadButton/index.md @@ -19,6 +19,6 @@ group: | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| tips | 上传区域提示文案 | `string \| ReactNode` | Formats supported JPG, JPEG, PNG. Max size 10 MB.Recommend ratio 16:9. | | -| uploadText | 上传提示文案 | `string` | Upload | - | -| uploadIconColor | 上传icon颜色 | `string` | 默认是主题色,colorPrimary | - | +| tips | 上传区域提示文案 | `string \| ReactNode` | Formats supported JPG, JPEG, PNG. Max size 10 MB.Recommend ratio 16:9. | `1.0.0`  | +| uploadText | 上传提示文案 | `string` | Upload | `1.0.0` | +| uploadIconColor | 上传icon颜色 | `string` | 默认是主题色,colorPrimary | `1.0.0` | diff --git a/packages/component/src/index.tsx b/packages/component/src/index.tsx index 86aa09e..a6acc12 100644 --- a/packages/component/src/index.tsx +++ b/packages/component/src/index.tsx @@ -37,9 +37,13 @@ export type { IUploadProps } from './Upload'; export { default as Loading } from './Loading'; export type { ILoadingProps } from './Loading'; export { default as Carousel } from './Carousel'; +export type { ICarouselProps } from './Carousel'; export { default as UploadButton } from './UploadButton'; export type { IUploadButtonProps } from './UploadButton'; -export type { ICarouselProps } from './Carousel'; +export { default as RichProgress } from './RichProgress'; +export type { ProgressLineType, IStepItem, IProgressStepsProps } from './RichProgress'; +export { default as ProgressModal } from './ProgressModal'; +export type { IProgressModalProps } from './ProgressModal'; export { default as useResponsive } from './hooks/useResponsive'; export { default as useAWSUploadService } from './hooks/useAWSUploadService'; diff --git a/packages/internal-icons/package.json b/packages/internal-icons/package.json index 21a27ee..90c74fc 100755 --- a/packages/internal-icons/package.json +++ b/packages/internal-icons/package.json @@ -1,6 +1,6 @@ { "name": "@aelf-design/internal-icons", - "version": "0.0.1-alpha.3", + "version": "1.0.0.alpha.1", "type": "module", "main": "dist/esm/index.js", "module": "dist/esm/index.js", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6e4416..1e2b3ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,9 +56,6 @@ importers: '@testing-library/react': specifier: ^14.1.2 version: 14.2.1(react-dom@18.2.0)(react@18.2.0) - '@types/lodash': - specifier: ^4.14.202 - version: 4.14.202 '@types/lodash-es': specifier: ^4.17.12 version: 4.17.12 @@ -207,9 +204,6 @@ importers: '@ctrl/tinycolor': specifier: ^4.0.2 version: 4.0.3 - ahooks: - specifier: ^3.7.10 - version: 3.7.10(react@18.2.0) antd: specifier: ^5.12.4 version: 5.14.2(react-dom@18.2.0)(react@18.2.0) @@ -261,7 +255,7 @@ importers: version: 3.6.1(@types/react@18.2.61)(antd@5.14.2)(react-dom@18.2.0)(react@18.2.0) father: specifier: ^4.3.8 - version: 4.4.0(@babel/core@7.24.0)(@types/node@20.11.24)(styled-components@6.1.8)(webpack@5.90.3) + version: 4.4.0(@babel/core@7.24.0)(styled-components@6.1.8)(webpack@5.90.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -4030,7 +4024,7 @@ packages: resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} dependencies: '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.24 + '@jridgewell/trace-mapping': 0.3.25 dev: true /@jridgewell/sourcemap-codec@1.4.15: @@ -4104,6 +4098,16 @@ packages: read-yaml-file: 1.1.0 dev: true + /@microsoft/api-extractor-model@7.28.4: + resolution: {integrity: sha512-vucgyPmgHrJ/D4/xQywAmjTmSfxAx2/aDmD6TkIoLu51FdsAfuWRbijWA48AePy60OO+l+mmy9p2P/CEeBZqig==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.63.0 + transitivePeerDependencies: + - '@types/node' + dev: true + /@microsoft/api-extractor-model@7.28.4(@types/node@20.11.24): resolution: {integrity: sha512-vucgyPmgHrJ/D4/xQywAmjTmSfxAx2/aDmD6TkIoLu51FdsAfuWRbijWA48AePy60OO+l+mmy9p2P/CEeBZqig==} dependencies: @@ -4114,6 +4118,26 @@ packages: - '@types/node' dev: true + /@microsoft/api-extractor@7.39.1: + resolution: {integrity: sha512-V0HtCufWa8hZZvSmlEzQZfINcJkHAU/bmpyJQj6w+zpI87EkR8DuBOW6RWrO9c7mUYFZoDaNgUTyKo83ytv+QQ==} + hasBin: true + dependencies: + '@microsoft/api-extractor-model': 7.28.4 + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.63.0 + '@rushstack/rig-package': 0.5.1 + '@rushstack/ts-command-line': 4.17.1 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.22.8 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.3.3 + transitivePeerDependencies: + - '@types/node' + dev: true + /@microsoft/api-extractor@7.39.1(@types/node@20.11.24): resolution: {integrity: sha512-V0HtCufWa8hZZvSmlEzQZfINcJkHAU/bmpyJQj6w+zpI87EkR8DuBOW6RWrO9c7mUYFZoDaNgUTyKo83ytv+QQ==} hasBin: true @@ -4468,6 +4492,23 @@ packages: dev: true optional: true + /@rushstack/node-core-library@3.63.0: + resolution: {integrity: sha512-Q7B3dVpBQF1v+mUfxNcNZh5uHVR8ntcnkN5GYjbBLrxUYHBGKbnCM+OdcN+hzCpFlLBH6Ob0dEHhZ0spQwf24A==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.8 + semver: 7.5.4 + z-schema: 5.0.5 + dev: true + /@rushstack/node-core-library@3.63.0(@types/node@20.11.24): resolution: {integrity: sha512-Q7B3dVpBQF1v+mUfxNcNZh5uHVR8ntcnkN5GYjbBLrxUYHBGKbnCM+OdcN+hzCpFlLBH6Ob0dEHhZ0spQwf24A==} peerDependencies: @@ -6750,6 +6791,7 @@ packages: resize-observer-polyfill: 1.5.1 screenfull: 5.2.0 tslib: 2.6.2 + dev: true /ajv-keywords@3.5.2(ajv@6.12.6): resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} @@ -9989,6 +10031,45 @@ packages: - webpack-plugin-serve dev: true + /father@4.4.0(@babel/core@7.24.0)(styled-components@6.1.8)(webpack@5.90.3): + resolution: {integrity: sha512-7xwjMLmZtPmoCkvA+B+65X0SUplcJD7lxA+ruELObpGsEGOxPgmdrNbZcdmDg1xAHCrNv/mlE6A4z3QxOKF7WA==} + hasBin: true + dependencies: + '@microsoft/api-extractor': 7.39.1 + '@umijs/babel-preset-umi': 4.1.2 + '@umijs/bundler-utils': 4.1.2 + '@umijs/bundler-webpack': 4.1.2(typescript@5.3.3)(webpack@5.90.3) + '@umijs/case-sensitive-paths-webpack-plugin': 1.0.1 + '@umijs/core': 4.1.2 + '@umijs/utils': 4.1.2 + '@vercel/ncc': 0.33.3 + babel-plugin-dynamic-import-node: 2.3.3 + babel-plugin-module-resolver: 4.1.0 + babel-plugin-styled-components: 2.1.4(@babel/core@7.24.0)(styled-components@6.1.8) + babel-plugin-transform-define: 2.0.1 + enhanced-resolve: 5.9.3 + fast-glob: 3.2.12 + file-system-cache: 2.0.0 + loader-runner: 4.2.0 + minimatch: 3.1.2 + tsconfig-paths: 4.0.0 + typescript: 5.3.3 + typescript-transform-paths: 3.4.6(typescript@5.3.3) + v8-compile-cache: 2.3.0 + transitivePeerDependencies: + - '@babel/core' + - '@types/node' + - '@types/webpack' + - sockjs-client + - styled-components + - supports-color + - type-fest + - webpack + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + /fault@2.0.1: resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} dependencies: @@ -11254,6 +11335,7 @@ packages: /intersection-observer@0.12.2: resolution: {integrity: sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==} + dev: true /intl-messageformat@10.5.11: resolution: {integrity: sha512-eYq5fkFBVxc7GIFDzpFQkDOZgNayNTQn4Oufe8jw6YY6OHVw70/4pA3FyCsQ0Gb2DnvEJEMmN2tOaXUGByM+kg==} @@ -11888,6 +11970,7 @@ packages: /js-cookie@2.2.1: resolution: {integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==} + dev: true /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -12367,6 +12450,7 @@ packages: /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true /log-symbols@2.2.0: resolution: {integrity: sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==} @@ -16233,6 +16317,7 @@ packages: /screenfull@5.2.0: resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==} engines: {node: '>=0.10.0'} + dev: true /scroll-into-view-if-needed@3.1.0: resolution: {integrity: sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==} @@ -17517,6 +17602,7 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: true /tsutils@3.21.0(typescript@5.3.3): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}