Skip to content

Commit

Permalink
fix: merge lock.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
curryZhaoAelf committed Mar 14, 2024
2 parents 5cfc0b8 + a32618a commit c966b67
Show file tree
Hide file tree
Showing 29 changed files with 479 additions and 179 deletions.
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
21 changes: 10 additions & 11 deletions packages/component/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions packages/component/src/Address/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLElement>) => void` | - | `1.0.0` |
| className | 设置最外层样式 | `string` | - | `1.0.0` |
| size | 设置元素大小 | `small \| default \| large \| ultra` <br/>`small`: font-size:12px <br/>`default`: font-size:14px <br/>`large`: font-size:16px <br/>`ultra`: font-size:20px | `default` | - | `1.0.0` |
| size | 设置元素大小 | `small \| default \| large \| ultra` <br/>`small`: font-size:12px <br/>`default`: font-size:14px <br/>`large`: font-size:16px <br/>`ultra`: font-size:20px | `default`&nbsp; | `1.0.0` |
| ignorePrefixSuffix | 忽略添加前后缀 | `boolean` | `false` | `1.0.0` |
| ignoreEvent | 忽略绑定点击事件 | `boolean` | `false` | `1.0.0` |
2 changes: 1 addition & 1 deletion packages/component/src/Carousel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`&nbsp; |
| 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` |
2 changes: 1 addition & 1 deletion packages/component/src/Collapse/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ refer to [Collapse Token](https://ant.design/components/collapse-cn#%E4%B8%BB%E9

| Property | Description | Type | Default | Version |
| --- | --- | --- | --- | --- |
| expandIcon<Badge type='error'>删除</Badge> | 自定义切换图标 | `(panelProps) => ReactNode` | `1.0.0` |
| expandIcon<Badge type='error'>删除</Badge> | 自定义切换图标 | `(panelProps) => ReactNode` | - | `1.0.0` |
| expandIconPosition<Badge type='error'>删除</Badge> | 设置图标位置 | `number` | `start \| end` | `1.0.0` |

## Supported API
Expand Down
5 changes: 1 addition & 4 deletions packages/component/src/Loading/demos/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ export default function LoadingExample() {
return (
<>
<Button onClick={onClickHandler}>open loading</Button>
<Loading
open={openLoading}
content={<div className="flex items-center justify-center">I am loading...</div>}
/>
<Loading open={openLoading} content={<div>I am loading......</div>} />
</>
);
}
4 changes: 2 additions & 2 deletions packages/component/src/Pagination/demos/basic.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
44 changes: 22 additions & 22 deletions packages/component/src/Pagination/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ group:

# Pagination

1. 调整了样式
2. 定制了 上一页/上一页 icon
3. 固定文案:Records 10 Records、First、Last
<Badge type='success'>aelf-design</Badge> aelf-design own component

## Basic Usage

<code src="./demos/basic.tsx"></code>

## 组件 Token

customToken

```json
customPagination: {
colorTextSecondary: isDarkMode ? '#8C8C8C' : '#808080',
colorBgHover: isDarkMode ? '#212121' : '#F8F8F8',
colorDownArrow: isDarkMode ? '#FFFFFF' : '#101114',
},
## Token

```js
<AELFDProvider
customToken={{
customAddress:{
colorTextSecondary: isDarkMode ? '#8C8C8C' : '#808080',
colorBgHover: isDarkMode ? '#212121' : '#F8F8F8',
colorDownArrow: isDarkMode ? '#FFFFFF' : '#101114',
}
}}
>
```

## 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`&nbsp; | `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`&nbsp; |
57 changes: 57 additions & 0 deletions packages/component/src/ProgressModal/demos/basic.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div>
<ProgressModal
desc="I am a description"
title="test-progress"
open={showProgress}
steps={steps}
onCancel={() => {
setShowProgress(false);
}}
/>
<Button
onClick={() => {
setShowProgress(true);
}}
>
show progress modal demo
</Button>
</div>
);
};

export default App;
44 changes: 25 additions & 19 deletions packages/component/src/ProgressModal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,35 @@ group:

# ProgressModal

## Basic Usage

<!-- <code src="./demos/basic.tsx"></code> -->

## Copyable

<!-- <code src="./demos/copyable.tsx"></code> -->
<Badge type='success'>aelf-design</Badge> aelf-design own component

## Format

<!-- <code src="./demos/format.tsx"></code> -->
## Basic Usage

## Custom Tooltip
<code src="./demos/basic.tsx"></code>

<!-- <code src="./demos/customTooltip.tsx"></code> -->
| 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` | `<ProgressSuccessIcon />` | `1.0.0` |
| errorIcon | 失败步骤图标 | `ReactNode` | `<ProgressErrorIcon />` | `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';
```
8 changes: 5 additions & 3 deletions packages/component/src/ProgressModal/index.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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();

Expand All @@ -38,3 +38,5 @@ export const ProgressModal = (props: IProgressModalProps) => {
</Modal>
);
};

export default memo(ProgressModal);
28 changes: 17 additions & 11 deletions packages/component/src/Radio/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,27 @@ group:

# Radio

1. 定制了样式
2. 可自定义 圆点样式

## Basic Usage

<code src="./demos/basic.tsx"></code>

## 组件 token

```json
customRadio: {
dotColor: isDarkMode ? '#1A1A1A' : '#FFFFFF',
},
## Token

```js
<AELFDProvider
customToken={{
customRadio:{
// background color of dot
dotColor: isDarkMode ? '#1A1A1A' : '#FFFFFF',
}
}}
>
```

## 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)
39 changes: 39 additions & 0 deletions packages/component/src/RichProgress/demos/basic.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div>
<RichProgress stepsData={steps} />
</div>
);
};

export default App;
Loading

0 comments on commit c966b67

Please sign in to comment.