wz-h5-design 1.0.0
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/README.md +51 -0
- package/dist/Button/index.js +84 -0
- package/dist/Button/index.umd.cjs +1 -0
- package/dist/Button/style/index.css +1 -0
- package/dist/Button/style/index.js +1 -0
- package/dist/Button/style.css +1 -0
- package/dist/Card/index.js +32 -0
- package/dist/Card/index.umd.cjs +1 -0
- package/dist/Card/style/index.css +1 -0
- package/dist/Card/style/index.js +1 -0
- package/dist/Card/style.css +1 -0
- package/dist/Cascader/index.js +94 -0
- package/dist/Cascader/index.umd.cjs +1 -0
- package/dist/Cascader/style/index.css +1 -0
- package/dist/Cascader/style/index.js +1 -0
- package/dist/Cascader/style.css +1 -0
- package/dist/Cell/index.js +135 -0
- package/dist/Cell/index.umd.cjs +6 -0
- package/dist/Cell/style/index.css +1 -0
- package/dist/Cell/style/index.js +1 -0
- package/dist/Cell/style.css +1 -0
- package/dist/CheckList/index.js +34 -0
- package/dist/CheckList/index.umd.cjs +1 -0
- package/dist/CheckList/style/index.css +1 -0
- package/dist/CheckList/style/index.js +1 -0
- package/dist/CheckList/style.css +1 -0
- package/dist/Checkbox/index.js +84 -0
- package/dist/Checkbox/index.umd.cjs +1 -0
- package/dist/Checkbox/style/index.css +1 -0
- package/dist/Checkbox/style/index.js +1 -0
- package/dist/Checkbox/style.css +1 -0
- package/dist/Collapse/index.js +72 -0
- package/dist/Collapse/index.umd.cjs +1 -0
- package/dist/Collapse/style/index.css +1 -0
- package/dist/Collapse/style/index.js +1 -0
- package/dist/Collapse/style.css +1 -0
- package/dist/DatePicker/index.js +154 -0
- package/dist/DatePicker/index.umd.cjs +1 -0
- package/dist/DatePicker/style/index.css +1 -0
- package/dist/DatePicker/style/index.js +1 -0
- package/dist/DatePicker/style.css +1 -0
- package/dist/DateRangePicker/index.js +220 -0
- package/dist/DateRangePicker/index.umd.cjs +1 -0
- package/dist/DateRangePicker/style/index.css +1 -0
- package/dist/DateRangePicker/style/index.js +1 -0
- package/dist/DateRangePicker/style.css +1 -0
- package/dist/Dialog/index.js +216 -0
- package/dist/Dialog/index.umd.cjs +6 -0
- package/dist/Dialog/style/index.css +1 -0
- package/dist/Dialog/style/index.js +1 -0
- package/dist/Dialog/style.css +1 -0
- package/dist/Divider/index.js +27 -0
- package/dist/Divider/index.umd.cjs +1 -0
- package/dist/Divider/style/index.css +1 -0
- package/dist/Divider/style/index.js +1 -0
- package/dist/Divider/style.css +1 -0
- package/dist/DropDownMenu/index.js +111 -0
- package/dist/DropDownMenu/index.umd.cjs +1 -0
- package/dist/DropDownMenu/style/index.css +1 -0
- package/dist/DropDownMenu/style/index.js +1 -0
- package/dist/DropDownMenu/style.css +1 -0
- package/dist/Flex/index.js +85 -0
- package/dist/Flex/index.umd.cjs +1 -0
- package/dist/Flex/style/index.css +1 -0
- package/dist/Flex/style/index.js +1 -0
- package/dist/Flex/style.css +1 -0
- package/dist/Grid/index.js +54 -0
- package/dist/Grid/index.umd.cjs +1 -0
- package/dist/Grid/style/index.css +1 -0
- package/dist/Grid/style/index.js +1 -0
- package/dist/Grid/style.css +1 -0
- package/dist/GridView/index.js +90 -0
- package/dist/GridView/index.umd.cjs +1 -0
- package/dist/GridView/style/index.css +1 -0
- package/dist/GridView/style/index.js +1 -0
- package/dist/GridView/style.css +1 -0
- package/dist/Icon/index.js +31 -0
- package/dist/Icon/index.umd.cjs +1 -0
- package/dist/Icon/style/index.css +1 -0
- package/dist/Icon/style/index.js +1 -0
- package/dist/Icon/style.css +1 -0
- package/dist/Input/index.js +148 -0
- package/dist/Input/index.umd.cjs +1 -0
- package/dist/Input/style/index.css +1 -0
- package/dist/Input/style/index.js +1 -0
- package/dist/Input/style.css +1 -0
- package/dist/NavBar/index.js +175 -0
- package/dist/NavBar/index.umd.cjs +6 -0
- package/dist/NavBar/style/index.css +1 -0
- package/dist/NavBar/style/index.js +1 -0
- package/dist/NavBar/style.css +1 -0
- package/dist/Popup/index.js +124 -0
- package/dist/Popup/index.umd.cjs +1 -0
- package/dist/Popup/style/index.css +1 -0
- package/dist/Popup/style/index.js +1 -0
- package/dist/Popup/style.css +1 -0
- package/dist/Radio/index.js +82 -0
- package/dist/Radio/index.umd.cjs +1 -0
- package/dist/Radio/style/index.css +1 -0
- package/dist/Radio/style/index.js +1 -0
- package/dist/Radio/style.css +1 -0
- package/dist/Search/index.js +158 -0
- package/dist/Search/index.umd.cjs +1 -0
- package/dist/Search/style/index.css +1 -0
- package/dist/Search/style/index.js +1 -0
- package/dist/Search/style.css +1 -0
- package/dist/Stepper/index.js +140 -0
- package/dist/Stepper/index.umd.cjs +1 -0
- package/dist/Stepper/style/index.css +1 -0
- package/dist/Stepper/style/index.js +1 -0
- package/dist/Stepper/style.css +1 -0
- package/dist/Switch/index.js +53 -0
- package/dist/Switch/index.umd.cjs +1 -0
- package/dist/Switch/style/index.css +1 -0
- package/dist/Switch/style/index.js +1 -0
- package/dist/Switch/style.css +1 -0
- package/dist/Tabbar/index.js +159 -0
- package/dist/Tabbar/index.umd.cjs +6 -0
- package/dist/Tabbar/style/index.css +1 -0
- package/dist/Tabbar/style/index.js +1 -0
- package/dist/Tabbar/style.css +1 -0
- package/dist/Tabs/index.js +50 -0
- package/dist/Tabs/index.umd.cjs +1 -0
- package/dist/Tabs/style/index.css +1 -0
- package/dist/Tabs/style/index.js +1 -0
- package/dist/Tabs/style.css +1 -0
- package/dist/Tag/index.js +96 -0
- package/dist/Tag/index.umd.cjs +6 -0
- package/dist/Tag/style/index.css +1 -0
- package/dist/Tag/style/index.js +1 -0
- package/dist/Tag/style.css +1 -0
- package/dist/TimePicker/index.js +201 -0
- package/dist/TimePicker/index.umd.cjs +1 -0
- package/dist/TimePicker/style/index.css +1 -0
- package/dist/TimePicker/style/index.js +1 -0
- package/dist/TimePicker/style.css +1 -0
- package/dist/Tip/index.js +104 -0
- package/dist/Tip/index.umd.cjs +6 -0
- package/dist/Tip/style/index.css +1 -0
- package/dist/Tip/style/index.js +1 -0
- package/dist/Tip/style.css +1 -0
- package/dist/Toast/index.js +183 -0
- package/dist/Toast/index.umd.cjs +6 -0
- package/dist/Toast/style/index.css +1 -0
- package/dist/Toast/style/index.js +1 -0
- package/dist/Toast/style.css +1 -0
- package/dist/Tooltip/index.js +172 -0
- package/dist/Tooltip/index.umd.cjs +6 -0
- package/dist/Tooltip/style/index.css +1 -0
- package/dist/Tooltip/style/index.js +1 -0
- package/dist/Tooltip/style.css +1 -0
- package/dist/assets/fonts/qitu/iconfont.css +140 -0
- package/dist/assets/fonts/qitu/iconfont.ttf +0 -0
- package/dist/assets/fonts/qitu/iconfont.woff +0 -0
- package/dist/assets/fonts/qitu/iconfont.woff2 +0 -0
- package/dist/assets/fonts/qituyonghu/iconfont.css +64 -0
- package/dist/assets/fonts/qituyonghu/iconfont.ttf +0 -0
- package/dist/assets/fonts/qituyonghu/iconfont.woff +0 -0
- package/dist/assets/fonts/qituyonghu/iconfont.woff2 +0 -0
- package/dist/assets/fonts/wzdaili/iconfont.css +71 -0
- package/dist/assets/fonts/wzdaili/iconfont.ttf +0 -0
- package/dist/assets/fonts/wzdaili/iconfont.woff +0 -0
- package/dist/assets/fonts/wzdaili/iconfont.woff2 +0 -0
- package/dist/assets/fonts/wzyonghu/iconfont.css +97 -0
- package/dist/assets/fonts/wzyonghu/iconfont.ttf +0 -0
- package/dist/assets/fonts/wzyonghu/iconfont.woff +0 -0
- package/dist/assets/fonts/wzyonghu/iconfont.woff2 +0 -0
- package/dist/assets/fonts/yunying/iconfont.css +303 -0
- package/dist/assets/fonts/yunying/iconfont.ttf +0 -0
- package/dist/assets/fonts/yunying/iconfont.woff +0 -0
- package/dist/assets/fonts/yunying/iconfont.woff2 +0 -0
- package/dist/style.css +1 -0
- package/dist/types/components/Button/Button.d.ts +16 -0
- package/dist/types/components/Button/index.d.ts +5 -0
- package/dist/types/components/Card/Card.d.ts +15 -0
- package/dist/types/components/Card/index.d.ts +3 -0
- package/dist/types/components/Cascader/Cascader.d.ts +14 -0
- package/dist/types/components/Cascader/index.d.ts +3 -0
- package/dist/types/components/Cell/Cell.d.ts +24 -0
- package/dist/types/components/Cell/CellGroup.d.ts +8 -0
- package/dist/types/components/Cell/index.d.ts +8 -0
- package/dist/types/components/CheckList/CheckList.d.ts +11 -0
- package/dist/types/components/CheckList/index.d.ts +3 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +62 -0
- package/dist/types/components/Checkbox/index.d.ts +3 -0
- package/dist/types/components/Collapse/Collapse.d.ts +17 -0
- package/dist/types/components/Collapse/index.d.ts +3 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +13 -0
- package/dist/types/components/DatePicker/index.d.ts +3 -0
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +13 -0
- package/dist/types/components/DateRangePicker/index.d.ts +3 -0
- package/dist/types/components/Dialog/Dialog.d.ts +16 -0
- package/dist/types/components/Dialog/imperative.d.ts +8 -0
- package/dist/types/components/Dialog/index.d.ts +8 -0
- package/dist/types/components/Divider/Divider.d.ts +11 -0
- package/dist/types/components/Divider/index.d.ts +3 -0
- package/dist/types/components/DropDownMenu/DropdownMenu.d.ts +19 -0
- package/dist/types/components/DropDownMenu/index.d.ts +2 -0
- package/dist/types/components/Flex/Flex.d.ts +25 -0
- package/dist/types/components/Flex/index.d.ts +3 -0
- package/dist/types/components/Grid/Grid.d.ts +22 -0
- package/dist/types/components/Grid/index.d.ts +3 -0
- package/dist/types/components/GridView/GridView.d.ts +59 -0
- package/dist/types/components/GridView/index.d.ts +2 -0
- package/dist/types/components/Icon/Icon.d.ts +12 -0
- package/dist/types/components/Icon/icon-data.d.ts +42 -0
- package/dist/types/components/Icon/index.d.ts +3 -0
- package/dist/types/components/Input/Input.d.ts +17 -0
- package/dist/types/components/Input/index.d.ts +3 -0
- package/dist/types/components/NavBar/NavBar.d.ts +20 -0
- package/dist/types/components/NavBar/index.d.ts +3 -0
- package/dist/types/components/Popup/Popup.d.ts +23 -0
- package/dist/types/components/Popup/index.d.ts +3 -0
- package/dist/types/components/Radio/Radio.d.ts +62 -0
- package/dist/types/components/Radio/index.d.ts +3 -0
- package/dist/types/components/Search/Search.d.ts +26 -0
- package/dist/types/components/Search/index.d.ts +3 -0
- package/dist/types/components/Stepper/Stepper.d.ts +22 -0
- package/dist/types/components/Stepper/index.d.ts +3 -0
- package/dist/types/components/Switch/Switch.d.ts +16 -0
- package/dist/types/components/Switch/index.d.ts +3 -0
- package/dist/types/components/Tabbar/Tabbar.d.ts +39 -0
- package/dist/types/components/Tabbar/index.d.ts +3 -0
- package/dist/types/components/Tabs/Tabs.d.ts +25 -0
- package/dist/types/components/Tabs/index.d.ts +3 -0
- package/dist/types/components/Tag/Tag.d.ts +39 -0
- package/dist/types/components/Tag/index.d.ts +3 -0
- package/dist/types/components/TimePicker/TimePicker.d.ts +12 -0
- package/dist/types/components/TimePicker/index.d.ts +3 -0
- package/dist/types/components/Tip/Tip.d.ts +32 -0
- package/dist/types/components/Tip/index.d.ts +3 -0
- package/dist/types/components/Toast/Toast.d.ts +11 -0
- package/dist/types/components/Toast/index.d.ts +15 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +17 -0
- package/dist/types/components/Tooltip/index.d.ts +3 -0
- package/dist/types/components/index.d.ts +31 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/utils/color.d.ts +1 -0
- package/dist/wz-h5-design.es.js +2449 -0
- package/dist/wz-h5-design.umd.js +6 -0
- package/package.json +84 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Collapse.scss';
|
|
3
|
+
export interface CollapseProps {
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
extra?: React.ReactNode;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
defaultExpanded?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
onChange?: (expanded: boolean) => void;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
className?: string;
|
|
12
|
+
headerStyle?: React.CSSProperties;
|
|
13
|
+
headerClassName?: string;
|
|
14
|
+
contentStyle?: React.CSSProperties;
|
|
15
|
+
contentClassName?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const Collapse: React.FC<CollapseProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './DatePicker.scss';
|
|
3
|
+
export interface DatePickerProps {
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange?: (val: string) => void;
|
|
6
|
+
min?: string;
|
|
7
|
+
max?: string;
|
|
8
|
+
columns?: Array<'year' | 'month' | 'day'>;
|
|
9
|
+
itemHeight?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export declare const DatePicker: React.FC<DatePickerProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './DateRangePicker.scss';
|
|
3
|
+
export interface DateRangePickerProps {
|
|
4
|
+
value?: [string, string];
|
|
5
|
+
onChange?: (val: [string, string]) => void;
|
|
6
|
+
min?: string;
|
|
7
|
+
max?: string;
|
|
8
|
+
startLabel?: string;
|
|
9
|
+
endLabel?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export declare const DateRangePicker: React.FC<DateRangePickerProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import './Dialog.scss';
|
|
3
|
+
export interface DialogProps {
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
content?: ReactNode;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
actions?: {
|
|
9
|
+
key: string | number;
|
|
10
|
+
text: ReactNode;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}[];
|
|
13
|
+
closeOnAction?: boolean;
|
|
14
|
+
closeOnMaskClick?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const Dialog: FC<DialogProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DialogProps } from './Dialog';
|
|
2
|
+
type ImperativeProps = Omit<DialogProps, 'visible' | 'onClose'> & {
|
|
3
|
+
onConfirm?: () => void;
|
|
4
|
+
onCancel?: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const alert: (props: ImperativeProps) => void;
|
|
7
|
+
export declare const confirm: (props: ImperativeProps) => void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dialog as InnerDialog } from './Dialog';
|
|
2
|
+
import { alert, confirm } from './imperative';
|
|
3
|
+
type DialogWithAPI = typeof InnerDialog & {
|
|
4
|
+
alert: typeof alert;
|
|
5
|
+
confirm: typeof confirm;
|
|
6
|
+
};
|
|
7
|
+
declare const Dialog: DialogWithAPI;
|
|
8
|
+
export { Dialog, alert, confirm };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Divider.scss';
|
|
3
|
+
export interface DividerProps {
|
|
4
|
+
direction?: 'horizontal' | 'vertical';
|
|
5
|
+
color?: string;
|
|
6
|
+
length?: number | string;
|
|
7
|
+
margin?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Divider: React.FC<DividerProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './DropdownMenu.scss';
|
|
3
|
+
export interface DropdownOption {
|
|
4
|
+
text: string;
|
|
5
|
+
value: any;
|
|
6
|
+
}
|
|
7
|
+
export interface DropdownItemProps {
|
|
8
|
+
title: string;
|
|
9
|
+
options: DropdownOption[];
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface DropdownMenuProps {
|
|
13
|
+
items: DropdownItemProps[];
|
|
14
|
+
extension?: React.ReactNode;
|
|
15
|
+
onChange?: (itemIndex: number, value: any, allValues: Record<number, any>) => void;
|
|
16
|
+
value?: Record<number, any>;
|
|
17
|
+
defaultValue?: Record<number, any>;
|
|
18
|
+
}
|
|
19
|
+
export declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Flex.scss";
|
|
3
|
+
export interface FlexProps {
|
|
4
|
+
direction?: "row" | "row-reverse" | "column" | "column-reverse";
|
|
5
|
+
align?: "start" | "center" | "end" | "stretch" | "baseline";
|
|
6
|
+
justify?: "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
7
|
+
wrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
8
|
+
gap?: number | string;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export interface FlexItemProps {
|
|
14
|
+
span?: number;
|
|
15
|
+
order?: number;
|
|
16
|
+
offset?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare const FlexItem: React.FC<FlexItemProps>;
|
|
22
|
+
export declare const Flex: React.FC<FlexProps> & {
|
|
23
|
+
Item: typeof FlexItem;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Grid.scss";
|
|
3
|
+
export interface GridProps {
|
|
4
|
+
cols?: number;
|
|
5
|
+
gap?: number | string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface GridItemProps {
|
|
11
|
+
span?: number;
|
|
12
|
+
offset?: number;
|
|
13
|
+
order?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const GridItem: React.FC<GridItemProps>;
|
|
19
|
+
export declare const Grid: React.FC<GridProps> & {
|
|
20
|
+
Item: typeof GridItem;
|
|
21
|
+
};
|
|
22
|
+
export default Grid;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./GridView.scss";
|
|
3
|
+
export interface GridViewItemProps {
|
|
4
|
+
/** 图标,可以是字符串(图标名)或React节点 */
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
/** 文本内容 */
|
|
7
|
+
text?: React.ReactNode;
|
|
8
|
+
/** 描述文本 */
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
/** 徽章内容 */
|
|
11
|
+
badge?: React.ReactNode;
|
|
12
|
+
/** 角标内容 */
|
|
13
|
+
corner?: React.ReactNode;
|
|
14
|
+
/** 点击事件 */
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
/** 自定义类名 */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** 自定义样式 */
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
/** 是否禁用 */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** 子元素(完全自定义内容时使用) */
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
/** 是否为横向布局 */
|
|
25
|
+
horizontal?: boolean;
|
|
26
|
+
/** 是否为紧凑模式 */
|
|
27
|
+
compact?: boolean;
|
|
28
|
+
/** 背景图片URL */
|
|
29
|
+
backgroundImage?: string;
|
|
30
|
+
/** 背景图片样式 */
|
|
31
|
+
backgroundStyle?: React.CSSProperties;
|
|
32
|
+
}
|
|
33
|
+
export interface GridViewProps {
|
|
34
|
+
/** 每行列数 */
|
|
35
|
+
columns?: number;
|
|
36
|
+
/** 格子间距 */
|
|
37
|
+
gap?: number | string;
|
|
38
|
+
/** 是否为方形格子 */
|
|
39
|
+
square?: boolean;
|
|
40
|
+
/** 自定义类名 */
|
|
41
|
+
className?: string;
|
|
42
|
+
/** 自定义样式 */
|
|
43
|
+
style?: React.CSSProperties;
|
|
44
|
+
/** 子元素 */
|
|
45
|
+
children?: React.ReactNode;
|
|
46
|
+
/** 是否无背景 */
|
|
47
|
+
noBg?: boolean;
|
|
48
|
+
/** 是否圆角 */
|
|
49
|
+
rounded?: boolean;
|
|
50
|
+
/** 是否显示阴影 */
|
|
51
|
+
shadow?: boolean;
|
|
52
|
+
/** 是否为横向布局容器(用于固定尺寸的横向项目) */
|
|
53
|
+
horizontal?: boolean;
|
|
54
|
+
}
|
|
55
|
+
declare const GridViewItem: React.FC<GridViewItemProps>;
|
|
56
|
+
export declare const GridView: React.FC<GridViewProps> & {
|
|
57
|
+
Item: typeof GridViewItem;
|
|
58
|
+
};
|
|
59
|
+
export default GridView;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Icon.scss';
|
|
3
|
+
export interface IconProps {
|
|
4
|
+
name: string;
|
|
5
|
+
size?: number | string;
|
|
6
|
+
color?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
10
|
+
type?: 'yunying' | 'qitu' | 'wzyonghu' | 'wzdaili' | 'qituyonghu';
|
|
11
|
+
}
|
|
12
|
+
export declare const Icon: React.FC<IconProps>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 自动生成的图标数据和类型定义
|
|
3
|
+
* 请勿手动修改此文件
|
|
4
|
+
* 运行 npm run extract-icons 重新生成
|
|
5
|
+
*/
|
|
6
|
+
export declare const ICON_MAP: {
|
|
7
|
+
readonly qitu: readonly ["check", "close", "close-outline", "danxuankuang_sel", "date", "dingdan", "dropdown", "edit", "eyes-close", "eyes-open", "info", "jia", "jian", "jinjianchuyong", "map", "minus-sign", "next2beifen", "no-data", "plus-sign", "radio-nor", "remove", "shebei_nor", "shebei_sel", "shenhezhong1", "shouye_nor", "shouye_sel", "sousuo", "tel", "wode_nor", "wode_sel", "zhandiantubiao"];
|
|
8
|
+
readonly qituyonghu: readonly ["check-round", "dangqianweizhi", "dropdown", "huan", "huanche1", "jia", "jinjianchuyong", "radio-nor", "song", "tuijian", "xiangji", "xuanzhong"];
|
|
9
|
+
readonly wzdaili: readonly ["bukekan", "chongdiandingdan", "chongzhidingdan", "kaquanguanli", "kekan", "shebeiguanli", "shenhezhong", "shujuzonglan", "xiazaizhongxin", "xufeidingdan", "yunyingshangguanli", "zengzhishouyifenzhang", "zhanghaoguanli", "zhifuquanxianguanli"];
|
|
10
|
+
readonly wzyonghu: readonly ["bangdingshoujihao", "chongdianbangzhu", "chongdianjilu", "chongdianwuyou", "daohang", "guanyuwanzhuang", "guzhangshangbao", "ic_notify_close", "jiantou", "jiaoyijilu", "lianxikefu", "shoucangshebei", "shouqi", "sousuo", "wanzhuangshangcheng", "wodechongdianquan", "wodedianka", "woyaodaili", "xialashaixuan", "xialashaixuan1"];
|
|
11
|
+
readonly yunying: readonly ["batch-operation", "bianzu", "bofanganniu", "bulletin", "chart", "check", "check-circle", "check-round", "checkbox", "checkbox-checked", "checkbox-indet", "clear", "close", "close-outline", "code", "daochu1", "date", "del", "delete", "device-group", "device_nor", "device_sel", "dianliangmoshi", "dingdan", "download", "drag", "dropdown", "edit", "eyes-close", "eyes-open", "filter", "fujianwenjian", "fujianwenjian-shibai", "fuxuan_disable", "fuxuan_nor", "fuxuan_sel", "gongshuaimoshi", "home_nor", "home_sel", "info", "info-outline", "jia", "jian", "list-down", "list-up", "map", "minus-sign", "next", "no-data", "notice", "order_nor", "order_sel", "piliangcaozuo", "plus", "plus-sign", "question", "question-round", "radio-nor", "radio-sel", "refresh", "remove", "right-arrow", "scan", "share", "sousuo", "tel", "time", "user_nor", "user_sel", "warning", "weixuanzemoshi", "xiangji"];
|
|
12
|
+
};
|
|
13
|
+
export type IconType = 'qitu' | 'qituyonghu' | 'wzdaili' | 'wzyonghu' | 'yunying';
|
|
14
|
+
export type QituIconName = 'check' | 'close' | 'close-outline' | 'danxuankuang_sel' | 'date' | 'dingdan' | 'dropdown' | 'edit' | 'eyes-close' | 'eyes-open' | 'info' | 'jia' | 'jian' | 'jinjianchuyong' | 'map' | 'minus-sign' | 'next2beifen' | 'no-data' | 'plus-sign' | 'radio-nor' | 'remove' | 'shebei_nor' | 'shebei_sel' | 'shenhezhong1' | 'shouye_nor' | 'shouye_sel' | 'sousuo' | 'tel' | 'wode_nor' | 'wode_sel' | 'zhandiantubiao';
|
|
15
|
+
export type QituyonghuIconName = 'check-round' | 'dangqianweizhi' | 'dropdown' | 'huan' | 'huanche1' | 'jia' | 'jinjianchuyong' | 'radio-nor' | 'song' | 'tuijian' | 'xiangji' | 'xuanzhong';
|
|
16
|
+
export type WzdailiIconName = 'bukekan' | 'chongdiandingdan' | 'chongzhidingdan' | 'kaquanguanli' | 'kekan' | 'shebeiguanli' | 'shenhezhong' | 'shujuzonglan' | 'xiazaizhongxin' | 'xufeidingdan' | 'yunyingshangguanli' | 'zengzhishouyifenzhang' | 'zhanghaoguanli' | 'zhifuquanxianguanli';
|
|
17
|
+
export type WzyonghuIconName = 'bangdingshoujihao' | 'chongdianbangzhu' | 'chongdianjilu' | 'chongdianwuyou' | 'daohang' | 'guanyuwanzhuang' | 'guzhangshangbao' | 'ic_notify_close' | 'jiantou' | 'jiaoyijilu' | 'lianxikefu' | 'shoucangshebei' | 'shouqi' | 'sousuo' | 'wanzhuangshangcheng' | 'wodechongdianquan' | 'wodedianka' | 'woyaodaili' | 'xialashaixuan' | 'xialashaixuan1';
|
|
18
|
+
export type YunyingIconName = 'batch-operation' | 'bianzu' | 'bofanganniu' | 'bulletin' | 'chart' | 'check' | 'check-circle' | 'check-round' | 'checkbox' | 'checkbox-checked' | 'checkbox-indet' | 'clear' | 'close' | 'close-outline' | 'code' | 'daochu1' | 'date' | 'del' | 'delete' | 'device-group' | 'device_nor' | 'device_sel' | 'dianliangmoshi' | 'dingdan' | 'download' | 'drag' | 'dropdown' | 'edit' | 'eyes-close' | 'eyes-open' | 'filter' | 'fujianwenjian' | 'fujianwenjian-shibai' | 'fuxuan_disable' | 'fuxuan_nor' | 'fuxuan_sel' | 'gongshuaimoshi' | 'home_nor' | 'home_sel' | 'info' | 'info-outline' | 'jia' | 'jian' | 'list-down' | 'list-up' | 'map' | 'minus-sign' | 'next' | 'no-data' | 'notice' | 'order_nor' | 'order_sel' | 'piliangcaozuo' | 'plus' | 'plus-sign' | 'question' | 'question-round' | 'radio-nor' | 'radio-sel' | 'refresh' | 'remove' | 'right-arrow' | 'scan' | 'share' | 'sousuo' | 'tel' | 'time' | 'user_nor' | 'user_sel' | 'warning' | 'weixuanzemoshi' | 'xiangji';
|
|
19
|
+
export type IconName = QituIconName | QituyonghuIconName | WzdailiIconName | WzyonghuIconName | YunyingIconName;
|
|
20
|
+
/**
|
|
21
|
+
* 获取指定类型的所有图标名称
|
|
22
|
+
*/
|
|
23
|
+
export declare function getIconsByType(type: IconType): readonly string[];
|
|
24
|
+
/**
|
|
25
|
+
* 获取所有图标类型
|
|
26
|
+
*/
|
|
27
|
+
export declare function getAllIconTypes(): IconType[];
|
|
28
|
+
/**
|
|
29
|
+
* 检查图标是否存在
|
|
30
|
+
*/
|
|
31
|
+
export declare function hasIcon(type: IconType, name: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 获取所有图标的总数
|
|
34
|
+
*/
|
|
35
|
+
export declare function getTotalIconCount(): number;
|
|
36
|
+
/**
|
|
37
|
+
* 搜索图标
|
|
38
|
+
*/
|
|
39
|
+
export declare function searchIcons(keyword: string, type?: IconType): Array<{
|
|
40
|
+
type: IconType;
|
|
41
|
+
name: string;
|
|
42
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Input.scss";
|
|
3
|
+
type InputTypes = "text" | "password" | "textarea" | "number";
|
|
4
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
5
|
+
clearable?: boolean;
|
|
6
|
+
align?: "left" | "center" | "right";
|
|
7
|
+
type?: InputTypes;
|
|
8
|
+
showCount?: boolean;
|
|
9
|
+
rows?: number;
|
|
10
|
+
countStyle?: React.CSSProperties;
|
|
11
|
+
suffix?: React.ReactNode;
|
|
12
|
+
borderRadius?: string;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
bordered?: true;
|
|
15
|
+
}
|
|
16
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "./NavBar.scss";
|
|
3
|
+
export interface NavBarProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
leftArrow?: boolean;
|
|
6
|
+
leftText?: string;
|
|
7
|
+
rightText?: string;
|
|
8
|
+
onLeftClick?: () => void;
|
|
9
|
+
onRightClick?: () => void;
|
|
10
|
+
leftSlot?: ReactNode;
|
|
11
|
+
rightSlot?: ReactNode;
|
|
12
|
+
titleSlot?: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
/** 是否固定在顶部 */
|
|
16
|
+
fixed?: boolean;
|
|
17
|
+
/** 滚动固定,滚动多少距离后固定在顶部 */
|
|
18
|
+
scrollFixed?: boolean | number;
|
|
19
|
+
}
|
|
20
|
+
export declare const NavBar: React.FC<NavBarProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Popup.scss';
|
|
3
|
+
export type PopupPosition = 'top' | 'right' | 'bottom' | 'left';
|
|
4
|
+
export interface PopupProps {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
position?: PopupPosition;
|
|
7
|
+
mask?: boolean;
|
|
8
|
+
maskClosable?: boolean;
|
|
9
|
+
round?: boolean;
|
|
10
|
+
duration?: number;
|
|
11
|
+
zIndex?: number;
|
|
12
|
+
destroyOnClose?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
maskStyle?: React.CSSProperties;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
onClosed?: () => void;
|
|
19
|
+
afterShow?: () => void;
|
|
20
|
+
closeable?: boolean;
|
|
21
|
+
title?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare const Popup: React.FC<PopupProps>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Radio.scss';
|
|
3
|
+
export type RadioSize = 'small' | 'medium' | 'large';
|
|
4
|
+
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange'> {
|
|
5
|
+
/**
|
|
6
|
+
* 单选框大小
|
|
7
|
+
*/
|
|
8
|
+
size?: RadioSize;
|
|
9
|
+
/**
|
|
10
|
+
* 是否选中
|
|
11
|
+
*/
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 是否禁用
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 值变化时的回调
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (checked: boolean) => void;
|
|
21
|
+
/**
|
|
22
|
+
* 单选框的文本
|
|
23
|
+
*/
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* 单选框的值
|
|
27
|
+
*/
|
|
28
|
+
value?: string | number;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
export interface RadioGroupProps {
|
|
33
|
+
/**
|
|
34
|
+
* 当前选中的值
|
|
35
|
+
*/
|
|
36
|
+
value?: string | number;
|
|
37
|
+
/**
|
|
38
|
+
* 默认选中的值
|
|
39
|
+
*/
|
|
40
|
+
defaultValue?: string | number;
|
|
41
|
+
/**
|
|
42
|
+
* 值变化时的回调
|
|
43
|
+
*/
|
|
44
|
+
onChange?: (value: string | number) => void;
|
|
45
|
+
/**
|
|
46
|
+
* 是否禁用
|
|
47
|
+
*/
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 单选框大小
|
|
51
|
+
*/
|
|
52
|
+
size?: RadioSize;
|
|
53
|
+
/**
|
|
54
|
+
* 单选框组的内容
|
|
55
|
+
*/
|
|
56
|
+
children?: React.ReactNode;
|
|
57
|
+
className?: string;
|
|
58
|
+
style?: React.CSSProperties;
|
|
59
|
+
}
|
|
60
|
+
export declare const Radio: React.FC<RadioProps> & {
|
|
61
|
+
Group: React.FC<RadioGroupProps>;
|
|
62
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Search.scss";
|
|
3
|
+
export interface SearchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "prefix"> {
|
|
4
|
+
value?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
shape?: "round" | "square";
|
|
8
|
+
clearable?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
prefix?: React.ReactNode;
|
|
11
|
+
suffix?: React.ReactNode;
|
|
12
|
+
leftIcon?: React.ReactNode;
|
|
13
|
+
actionText?: React.ReactNode;
|
|
14
|
+
showCancel?: boolean;
|
|
15
|
+
cancelText?: React.ReactNode;
|
|
16
|
+
background?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
className?: string;
|
|
19
|
+
onSearch?: (value: string) => void;
|
|
20
|
+
onClear?: () => void;
|
|
21
|
+
onChange?: (value: string) => void;
|
|
22
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
23
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
24
|
+
onCancel?: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const Search: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Stepper.scss';
|
|
3
|
+
export interface StepperProps {
|
|
4
|
+
value: number | string;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
onChange: (value: number | string) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
prefix?: string;
|
|
11
|
+
suffix?: string;
|
|
12
|
+
showMinus?: boolean;
|
|
13
|
+
showPlus?: boolean;
|
|
14
|
+
precision?: number;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
inputStyle?: React.CSSProperties;
|
|
18
|
+
inputClassName?: string;
|
|
19
|
+
buttonStyle?: React.CSSProperties;
|
|
20
|
+
buttonClassName?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const Stepper: React.FC<StepperProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Switch.scss';
|
|
3
|
+
export interface SwitchProps {
|
|
4
|
+
value?: boolean;
|
|
5
|
+
defaultValue?: boolean;
|
|
6
|
+
onChange?: (val: boolean) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
showText?: boolean;
|
|
9
|
+
activeText?: string;
|
|
10
|
+
inactiveText?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
className?: string;
|
|
13
|
+
size?: 'default' | 'large' | 'small';
|
|
14
|
+
activeColor?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const Switch: React.FC<SwitchProps>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import './Tabbar.scss';
|
|
3
|
+
export interface TabbarItemProps {
|
|
4
|
+
/** 唯一标识 */
|
|
5
|
+
key: string;
|
|
6
|
+
/** 标题 */
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
/** 图标,可以是 Icon 的 name 或者 ReactNode */
|
|
9
|
+
icon?: string | React.ReactNode;
|
|
10
|
+
/** 选中时的图标 */
|
|
11
|
+
activeIcon?: string | React.ReactNode;
|
|
12
|
+
/** 徽标, 可以是数字、文本或自定义 React 节点 */
|
|
13
|
+
badge?: React.ReactNode;
|
|
14
|
+
/** 将徽标渲染为气泡样式 */
|
|
15
|
+
badgeAsBubble?: boolean;
|
|
16
|
+
/** 自定义激活状态下图标和文字颜色 */
|
|
17
|
+
activeColor?: string;
|
|
18
|
+
/** 是否为特殊突起按钮 */
|
|
19
|
+
hump?: boolean;
|
|
20
|
+
/** 自定义点击事件,hump 为 true 时生效 */
|
|
21
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface TabbarProps {
|
|
24
|
+
/** 当前激活的 key */
|
|
25
|
+
activeKey?: string;
|
|
26
|
+
/** 默认激活的 key */
|
|
27
|
+
defaultActiveKey?: string;
|
|
28
|
+
/** 切换事件 */
|
|
29
|
+
onChange?: (key: string) => void;
|
|
30
|
+
/** TabbarItem 数组 */
|
|
31
|
+
items: TabbarItemProps[];
|
|
32
|
+
/** 是否固定在底部 */
|
|
33
|
+
fixed?: boolean;
|
|
34
|
+
/** 自定义类名 */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** 自定义样式 */
|
|
37
|
+
style?: React.CSSProperties;
|
|
38
|
+
}
|
|
39
|
+
export declare const Tabbar: FC<TabbarProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import './Tabs.scss';
|
|
3
|
+
export interface TabPaneProps {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
badge?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface TabsProps {
|
|
10
|
+
type?: 'line' | 'card' | 'pills';
|
|
11
|
+
value?: number;
|
|
12
|
+
defaultValue?: number;
|
|
13
|
+
onChange?: (index: number) => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
headerClassName?: string;
|
|
17
|
+
headerStyle?: React.CSSProperties;
|
|
18
|
+
contentClassName?: string;
|
|
19
|
+
contentStyle?: React.CSSProperties;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare const TabPane: React.FC<TabPaneProps>;
|
|
23
|
+
export declare const Tabs: React.FC<TabsProps> & {
|
|
24
|
+
TabPane: typeof TabPane;
|
|
25
|
+
};
|