@pisell/materials 3.3.86 → 3.3.88
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +4 -4
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +25 -25
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +15 -15
- package/es/components/PisellLayouts/index.d.ts +0 -1
- package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
- package/es/components/PisellProcedure/index.d.ts +5 -0
- package/es/components/PisellSteps/PisellSteps.d.ts +14 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.js +274 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.js +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +61 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +176 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.js +11 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.js +16 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.js +93 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.js +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.js +18 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +40 -2
- package/es/components/dataSourceComponents/fields/index.js +5 -1
- package/es/components/dataSourceComponents/fields/utils.js +3 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/es/components/pisellLookup/PisellLookup.js +8 -1
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/es/components/pisellWalletPassCard/index.js +1 -1
- package/es/components/productCard/components/Packages/utils.d.ts +2 -2
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/index.d.ts +4 -0
- package/es/index.js +3 -0
- package/lib/components/PisellLayouts/index.d.ts +0 -1
- package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
- package/lib/components/PisellProcedure/index.d.ts +5 -0
- package/lib/components/PisellSteps/PisellSteps.d.ts +14 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +229 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.js +17 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +64 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +157 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.js +45 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.js +95 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +40 -2
- package/lib/components/dataSourceComponents/fields/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/utils.js +3 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/lib/components/pisellLookup/PisellLookup.js +5 -1
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/lib/components/pisellWalletPassCard/index.js +9 -2
- package/lib/components/productCard/components/Packages/utils.d.ts +2 -2
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.js +9 -0
- package/lowcode/auto-resize-text/meta.ts +9 -9
- package/lowcode/data-source-form/constants.ts +3 -0
- package/lowcode/data-source-form/utils.ts +31 -5
- package/lowcode/data-source-sub-form/meta.ts +259 -0
- package/lowcode/data-source-sub-form/snippets.ts +21 -0
- package/lowcode/form-item-record-list-wrapper/meta.ts +180 -0
- package/lowcode/form-item-record-list-wrapper/snippets.ts +18 -0
- package/lowcode/form-item-tabs/meta.ts +172 -0
- package/package.json +1 -1
- package/es/components/PisellCards/components/GraphicTextCard/components/BadgeWrapper.d.ts +0 -5
- package/es/components/PisellCards/components/GraphicTextCard/components/TextContent.d.ts +0 -27
- package/es/components/PisellCards/components/GraphicTextCard/hooks/index.d.ts +0 -5
- package/es/components/PisellCards/components/GraphicTextCard/hooks/useGraphicTextCardClick.d.ts +0 -15
- package/es/components/PisellCards/components/GraphicTextCard/hooks/useGraphicTextCardStyle.d.ts +0 -18
- package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/es/components/PisellCards/components/GraphicTextCard/utils/index.d.ts +0 -19
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/es/components/PisellCards/components/TextCard/components/IconWrapper.d.ts +0 -17
- package/es/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/es/components/PisellCards/components/TextCard/components/index.d.ts +0 -6
- package/es/components/PisellCards/components/TextCard/index.d.ts +0 -5
- package/es/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/es/components/PisellCards/index.d.ts +0 -15
- package/es/components/config-provider/index.d.ts +0 -10
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -27
- package/es/components/dataSourceComponents/fields/Upload/constants.d.ts +0 -9
- package/es/components/drag-sort-tree/index.d.ts +0 -5
- package/es/components/filter/components/Dropdown/types.d.ts +0 -13
- package/es/components/filter/components/FilterButton/types.d.ts +0 -24
- package/es/components/filter/types.d.ts +0 -48
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisellCurrency/PisellCurrency.d.ts +0 -39
- package/es/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +0 -24
- package/es/components/pisellEmail/PisellEmail.d.ts +0 -37
- package/es/components/pisellFilter/type.d.ts +0 -5
- package/es/components/pisellGridPro/index.d.ts +0 -4
- package/es/components/pisellLongText/PisellLongText.d.ts +0 -39
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.d.ts +0 -9
- package/es/components/pisellMultipleSelect/components/EditView.d.ts +0 -8
- package/es/components/pisellNumber/PisellNumber.d.ts +0 -42
- package/es/components/pisellPhone/PisellPhone.d.ts +0 -36
- package/es/components/pisellPhone/components/EditView.d.ts +0 -19
- package/es/components/pisellPhone/constants/countryCodes.d.ts +0 -20
- package/es/components/pisellPhone/types.d.ts +0 -209
- package/es/components/pisellPhone/utils/countryCodeHelper.d.ts +0 -35
- package/es/components/pisellQuickFilter/type.d.ts +0 -12
- package/es/components/pisellRating/PisellRating.d.ts +0 -31
- package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +0 -8
- package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +0 -10
- package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +0 -16
- package/es/components/pisellSingleLineText/PisellSingleLineText.d.ts +0 -40
- package/es/components/pisellSingleSelect/PisellSingleSelect.d.ts +0 -9
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
- package/es/components/pisellUrl/PisellUrl.d.ts +0 -37
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -4
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -19
- package/es/components/sort/index.d.ts +0 -5
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
- package/es/components/table/types.d.ts +0 -268
- package/es/components/translation/index.d.ts +0 -17
- package/es/components/translation/utils.d.ts +0 -9
- package/lib/components/PisellCards/components/GraphicTextCard/components/BadgeWrapper.d.ts +0 -5
- package/lib/components/PisellCards/components/GraphicTextCard/components/TextContent.d.ts +0 -27
- package/lib/components/PisellCards/components/GraphicTextCard/hooks/index.d.ts +0 -5
- package/lib/components/PisellCards/components/GraphicTextCard/hooks/useGraphicTextCardClick.d.ts +0 -15
- package/lib/components/PisellCards/components/GraphicTextCard/hooks/useGraphicTextCardStyle.d.ts +0 -18
- package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/lib/components/PisellCards/components/GraphicTextCard/utils/index.d.ts +0 -19
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/lib/components/PisellCards/components/TextCard/components/IconWrapper.d.ts +0 -17
- package/lib/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/lib/components/PisellCards/components/TextCard/components/index.d.ts +0 -6
- package/lib/components/PisellCards/components/TextCard/index.d.ts +0 -5
- package/lib/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/lib/components/PisellCards/index.d.ts +0 -15
- package/lib/components/config-provider/index.d.ts +0 -10
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -27
- package/lib/components/dataSourceComponents/fields/Upload/constants.d.ts +0 -9
- package/lib/components/drag-sort-tree/index.d.ts +0 -5
- package/lib/components/filter/components/Dropdown/types.d.ts +0 -13
- package/lib/components/filter/components/FilterButton/types.d.ts +0 -24
- package/lib/components/filter/types.d.ts +0 -48
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisellCurrency/PisellCurrency.d.ts +0 -39
- package/lib/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +0 -24
- package/lib/components/pisellEmail/PisellEmail.d.ts +0 -37
- package/lib/components/pisellFilter/type.d.ts +0 -5
- package/lib/components/pisellGridPro/index.d.ts +0 -4
- package/lib/components/pisellLongText/PisellLongText.d.ts +0 -39
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.d.ts +0 -9
- package/lib/components/pisellMultipleSelect/components/EditView.d.ts +0 -8
- package/lib/components/pisellNumber/PisellNumber.d.ts +0 -42
- package/lib/components/pisellPhone/PisellPhone.d.ts +0 -36
- package/lib/components/pisellPhone/components/EditView.d.ts +0 -19
- package/lib/components/pisellPhone/constants/countryCodes.d.ts +0 -20
- package/lib/components/pisellPhone/types.d.ts +0 -209
- package/lib/components/pisellPhone/utils/countryCodeHelper.d.ts +0 -35
- package/lib/components/pisellQuickFilter/type.d.ts +0 -12
- package/lib/components/pisellRating/PisellRating.d.ts +0 -31
- package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +0 -8
- package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +0 -10
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +0 -16
- package/lib/components/pisellSingleLineText/PisellSingleLineText.d.ts +0 -40
- package/lib/components/pisellSingleSelect/PisellSingleSelect.d.ts +0 -9
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
- package/lib/components/pisellUrl/PisellUrl.d.ts +0 -37
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -4
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -19
- package/lib/components/sort/index.d.ts +0 -5
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/translation/index.d.ts +0 -17
- package/lib/components/translation/utils.d.ts +0 -9
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { PisellBasicCardProps } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
* 样式变体类型
|
|
5
|
-
*/
|
|
6
|
-
export declare type TextCardVariant = 'text' | 'filled' | 'outlined' | 'light' | 'gradient' | 'dashed';
|
|
7
|
-
/**
|
|
8
|
-
* 尺寸类型
|
|
9
|
-
*/
|
|
10
|
-
export declare type TextCardSize = 'small' | 'default' | 'large';
|
|
11
|
-
/**
|
|
12
|
-
* 宽度模式
|
|
13
|
-
*/
|
|
14
|
-
export declare type TextCardWidthMode = 'auto' | 'fixed' | 'full';
|
|
15
|
-
/**
|
|
16
|
-
* 图标配置
|
|
17
|
-
*/
|
|
18
|
-
export interface IconConfig {
|
|
19
|
-
/**
|
|
20
|
-
* 图标大小(单位:px)
|
|
21
|
-
*/
|
|
22
|
-
size?: number;
|
|
23
|
-
/**
|
|
24
|
-
* 图标颜色
|
|
25
|
-
*/
|
|
26
|
-
color?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* 标签配置
|
|
30
|
-
*/
|
|
31
|
-
export interface TagConfig {
|
|
32
|
-
/**
|
|
33
|
-
* 标签颜色
|
|
34
|
-
*/
|
|
35
|
-
color?: string;
|
|
36
|
-
/**
|
|
37
|
-
* 标签自定义样式
|
|
38
|
-
*/
|
|
39
|
-
style?: CSSProperties;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* 角标类型
|
|
43
|
-
*/
|
|
44
|
-
export declare type BadgeType = 'dot' | 'number' | 'text';
|
|
45
|
-
/**
|
|
46
|
-
* 角标位置
|
|
47
|
-
*/
|
|
48
|
-
export declare type BadgePosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
49
|
-
/**
|
|
50
|
-
* 角标配置
|
|
51
|
-
*/
|
|
52
|
-
export interface BadgeConfig {
|
|
53
|
-
/**
|
|
54
|
-
* 角标类型
|
|
55
|
-
* @default 'dot'
|
|
56
|
-
*/
|
|
57
|
-
type?: BadgeType;
|
|
58
|
-
/**
|
|
59
|
-
* 角标内容(数字或文本)
|
|
60
|
-
* 当 type 为 'number' 或 'text' 时有效
|
|
61
|
-
*/
|
|
62
|
-
content?: ReactNode;
|
|
63
|
-
/**
|
|
64
|
-
* 角标位置
|
|
65
|
-
* @default 'top-right'
|
|
66
|
-
*/
|
|
67
|
-
position?: BadgePosition;
|
|
68
|
-
/**
|
|
69
|
-
* 角标偏移量 [x, y]
|
|
70
|
-
* 正数向右/下偏移,负数向左/上偏移
|
|
71
|
-
*/
|
|
72
|
-
offset?: [number, number];
|
|
73
|
-
/**
|
|
74
|
-
* 角标颜色
|
|
75
|
-
*/
|
|
76
|
-
color?: string;
|
|
77
|
-
/**
|
|
78
|
-
* 角标自定义样式
|
|
79
|
-
*/
|
|
80
|
-
style?: CSSProperties;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* 文本配置
|
|
84
|
-
*/
|
|
85
|
-
export interface TextConfig {
|
|
86
|
-
/**
|
|
87
|
-
* 字体大小(单位:px)
|
|
88
|
-
*/
|
|
89
|
-
fontSize?: number;
|
|
90
|
-
/**
|
|
91
|
-
* 字体粗细
|
|
92
|
-
*/
|
|
93
|
-
fontWeight?: string | number;
|
|
94
|
-
/**
|
|
95
|
-
* 文本颜色
|
|
96
|
-
*/
|
|
97
|
-
color?: string;
|
|
98
|
-
/**
|
|
99
|
-
* 最大显示行数
|
|
100
|
-
* @default 1
|
|
101
|
-
*/
|
|
102
|
-
maxLines?: number;
|
|
103
|
-
/**
|
|
104
|
-
* 是否显示省略号
|
|
105
|
-
* @default true
|
|
106
|
-
*/
|
|
107
|
-
ellipsis?: boolean;
|
|
108
|
-
/**
|
|
109
|
-
* 文本对齐方式
|
|
110
|
-
* @default 'left'
|
|
111
|
-
*/
|
|
112
|
-
textAlign?: 'left' | 'center' | 'right';
|
|
113
|
-
flex?: string;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* TextCard 组件 Props
|
|
117
|
-
* 基于 PisellBasicCardProps 扩展
|
|
118
|
-
* 注意:重写 onClick 为可选属性
|
|
119
|
-
*/
|
|
120
|
-
export interface TextCardProps extends Omit<PisellBasicCardProps, 'onClick'> {
|
|
121
|
-
/**
|
|
122
|
-
* 卡片显示的文本内容(必填)
|
|
123
|
-
*/
|
|
124
|
-
text: ReactNode;
|
|
125
|
-
/**
|
|
126
|
-
* 卡片样式变体
|
|
127
|
-
* @default 'text'
|
|
128
|
-
*/
|
|
129
|
-
variant?: TextCardVariant;
|
|
130
|
-
/**
|
|
131
|
-
* 卡片尺寸
|
|
132
|
-
* @default 'default'
|
|
133
|
-
*/
|
|
134
|
-
size?: TextCardSize;
|
|
135
|
-
/**
|
|
136
|
-
* 是否可点击
|
|
137
|
-
* @default true
|
|
138
|
-
*/
|
|
139
|
-
clickable?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* 前置图标
|
|
142
|
-
* 支持 ReactNode(如 antd Icon、svg 等)
|
|
143
|
-
*/
|
|
144
|
-
prefixIcon?: ReactNode;
|
|
145
|
-
/**
|
|
146
|
-
* 后置图标
|
|
147
|
-
* 支持 ReactNode(如 antd Icon、svg 等)
|
|
148
|
-
*/
|
|
149
|
-
suffixIcon?: ReactNode;
|
|
150
|
-
/**
|
|
151
|
-
* 图标配置
|
|
152
|
-
* 统一配置前置和后置图标的大小和颜色
|
|
153
|
-
*/
|
|
154
|
-
iconConfig?: IconConfig;
|
|
155
|
-
/**
|
|
156
|
-
* 后置标签
|
|
157
|
-
* 支持 ReactNode(如 antd Tag、Badge 等)
|
|
158
|
-
*/
|
|
159
|
-
tag?: ReactNode;
|
|
160
|
-
/**
|
|
161
|
-
* 标签配置
|
|
162
|
-
*/
|
|
163
|
-
tagConfig?: TagConfig;
|
|
164
|
-
/**
|
|
165
|
-
* 角标配置
|
|
166
|
-
* 用于显示红点、数字或文本提示
|
|
167
|
-
*/
|
|
168
|
-
badge?: BadgeConfig;
|
|
169
|
-
/**
|
|
170
|
-
* 前置插槽
|
|
171
|
-
* 用于替换前置图标,优先级高于 prefixIcon
|
|
172
|
-
*/
|
|
173
|
-
prefixSlot?: ReactNode;
|
|
174
|
-
/**
|
|
175
|
-
* 后置插槽
|
|
176
|
-
* 用于替换后置图标和标签,优先级高于 suffixIcon 和 tag
|
|
177
|
-
*/
|
|
178
|
-
suffixSlot?: ReactNode;
|
|
179
|
-
/**
|
|
180
|
-
* 文本配置
|
|
181
|
-
* 用于自定义文本样式和显示行为
|
|
182
|
-
*/
|
|
183
|
-
textConfig?: TextConfig;
|
|
184
|
-
/**
|
|
185
|
-
* 宽度模式
|
|
186
|
-
* - auto: 内容撑满,最大宽度 maxWidth
|
|
187
|
-
* - fixed: 固定宽度 width
|
|
188
|
-
* - full: 撑满父容器,最小宽度 28px
|
|
189
|
-
* @default 'auto'
|
|
190
|
-
*/
|
|
191
|
-
widthMode?: TextCardWidthMode;
|
|
192
|
-
/**
|
|
193
|
-
* 固定宽度值
|
|
194
|
-
* 当 widthMode='fixed' 时有效
|
|
195
|
-
*/
|
|
196
|
-
width?: number | string;
|
|
197
|
-
/**
|
|
198
|
-
* 最大宽度
|
|
199
|
-
* 当 widthMode='auto' 时有效
|
|
200
|
-
* @default 400
|
|
201
|
-
*/
|
|
202
|
-
maxWidth?: number | string;
|
|
203
|
-
/**
|
|
204
|
-
* 点击事件
|
|
205
|
-
* 当 clickable=true 且不在 disabled/loading 状态时触发
|
|
206
|
-
* 注意:PisellBasicCardProps 中的 onClick 是必填的,这里重新定义为可选
|
|
207
|
-
*/
|
|
208
|
-
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
209
|
-
/**
|
|
210
|
-
* 自定义渲染函数
|
|
211
|
-
* 完全自定义组件的渲染内容
|
|
212
|
-
* 当提供此函数时,组件内置的渲染逻辑将被忽略
|
|
213
|
-
*/
|
|
214
|
-
render?: (props: TextCardProps) => ReactNode;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* TextContent 组件 Props
|
|
218
|
-
* 文本内容子组件
|
|
219
|
-
*/
|
|
220
|
-
export interface TextContentProps {
|
|
221
|
-
/**
|
|
222
|
-
* 文本内容
|
|
223
|
-
*/
|
|
224
|
-
text: ReactNode;
|
|
225
|
-
/**
|
|
226
|
-
* 文本配置
|
|
227
|
-
*/
|
|
228
|
-
textConfig?: TextConfig;
|
|
229
|
-
/**
|
|
230
|
-
* 自定义类名
|
|
231
|
-
*/
|
|
232
|
-
className?: string;
|
|
233
|
-
active?: PisellBasicCardProps['active'];
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* IconWrapper 组件 Props
|
|
237
|
-
* 图标包装子组件
|
|
238
|
-
*/
|
|
239
|
-
export interface IconWrapperProps {
|
|
240
|
-
/**
|
|
241
|
-
* 图标内容
|
|
242
|
-
*/
|
|
243
|
-
icon: ReactNode;
|
|
244
|
-
/**
|
|
245
|
-
* 图标配置
|
|
246
|
-
*/
|
|
247
|
-
config?: IconConfig;
|
|
248
|
-
/**
|
|
249
|
-
* 图标位置
|
|
250
|
-
*/
|
|
251
|
-
position: 'prefix' | 'suffix';
|
|
252
|
-
/**
|
|
253
|
-
* 自定义类名
|
|
254
|
-
*/
|
|
255
|
-
className?: string;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* BadgeWrapper 组件 Props
|
|
259
|
-
* 角标包装子组件
|
|
260
|
-
*/
|
|
261
|
-
export interface BadgeWrapperProps {
|
|
262
|
-
/**
|
|
263
|
-
* 角标配置
|
|
264
|
-
*/
|
|
265
|
-
badge?: BadgeConfig;
|
|
266
|
-
/**
|
|
267
|
-
* 子元素
|
|
268
|
-
*/
|
|
269
|
-
children: ReactNode;
|
|
270
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const PisellCards: {
|
|
3
|
-
TabCard: (props: any) => import("react").JSX.Element;
|
|
4
|
-
TextCard: (props: any) => import("react").JSX.Element;
|
|
5
|
-
GraphicTextCard: (props: import("./components/GraphicTextCard").GraphicTextCardProps) => import("react").JSX.Element;
|
|
6
|
-
MultilevelCard: (props: any) => import("react").JSX.Element;
|
|
7
|
-
PisellImageCard: (props: import("./components/PisellImageCard").PisellImageCardProps) => import("react").JSX.Element;
|
|
8
|
-
};
|
|
9
|
-
export default PisellCards;
|
|
10
|
-
export type { PisellBasicCardProps } from './types';
|
|
11
|
-
export type { TabCardProps, BadgeConfig } from './components/TabCard/types';
|
|
12
|
-
export type { TextCardProps } from './components/TextCard/types';
|
|
13
|
-
export type { GraphicTextCardProps, GraphicTextCardVariant, GraphicTextCardSize, GraphicConfig, } from './components/GraphicTextCard/types';
|
|
14
|
-
export type { MultilevelCardProps } from './components/MultilevelCard/types';
|
|
15
|
-
export type { PisellImageCardProps, ImageDataSource, ImageFillMode, } from './components/PisellImageCard/types';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ConfigProviderProps as OriginalConfigProviderProps } from "antd/es/config-provider";
|
|
3
|
-
import "dayjs/locale/zh-cn";
|
|
4
|
-
import "dayjs/locale/ja";
|
|
5
|
-
import "dayjs/locale/pt";
|
|
6
|
-
export interface ConfigProviderProps extends OriginalConfigProviderProps {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}
|
|
9
|
-
declare const ConfigProvider: (props: ConfigProviderProps) => React.JSX.Element;
|
|
10
|
-
export default ConfigProvider;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ColumnType } from 'antd/es/table';
|
|
3
|
-
import { LocalSettingsType } from '../../table/types';
|
|
4
|
-
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
5
|
-
export declare type OperationItem = {
|
|
6
|
-
label?: string;
|
|
7
|
-
openMode: 'modal' | 'drawer' | 'custom';
|
|
8
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
9
|
-
openTitle: string;
|
|
10
|
-
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
11
|
-
key: string;
|
|
12
|
-
buttonProps?: any;
|
|
13
|
-
onClick?: (record: any) => void;
|
|
14
|
-
afterClose?: () => void;
|
|
15
|
-
};
|
|
16
|
-
export interface DataSourceTableProps {
|
|
17
|
-
__id?: string;
|
|
18
|
-
currentComponentId?: string;
|
|
19
|
-
currentSettingKey?: string;
|
|
20
|
-
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
21
|
-
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
22
|
-
titleButtons?: {
|
|
23
|
-
show: boolean;
|
|
24
|
-
maxCount: number;
|
|
25
|
-
items: OperationItem[];
|
|
26
|
-
};
|
|
27
|
-
tableButtons?: {
|
|
28
|
-
show: boolean;
|
|
29
|
-
maxCount: number;
|
|
30
|
-
items: OperationItem[];
|
|
31
|
-
};
|
|
32
|
-
buttons?: any[];
|
|
33
|
-
operation?: {
|
|
34
|
-
show: boolean;
|
|
35
|
-
title: string;
|
|
36
|
-
width: number;
|
|
37
|
-
align: 'left' | 'center' | 'right';
|
|
38
|
-
fixed: 'left' | 'right' | false;
|
|
39
|
-
type: 'link' | 'button';
|
|
40
|
-
items: OperationItem[];
|
|
41
|
-
};
|
|
42
|
-
operationContent?: {
|
|
43
|
-
[key: string]: React.ReactNode;
|
|
44
|
-
};
|
|
45
|
-
dataSource: DataSourceType;
|
|
46
|
-
columns: ColumnType<any>[];
|
|
47
|
-
filter: any;
|
|
48
|
-
search?: {
|
|
49
|
-
show: boolean;
|
|
50
|
-
placeholder: string;
|
|
51
|
-
};
|
|
52
|
-
__designMode: string;
|
|
53
|
-
componentId: string;
|
|
54
|
-
clickToDetail?: {
|
|
55
|
-
show: boolean;
|
|
56
|
-
useCustomAction: boolean;
|
|
57
|
-
actionType: string;
|
|
58
|
-
openMode: 'modal' | 'drawer';
|
|
59
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
60
|
-
openTitle: string;
|
|
61
|
-
key: string;
|
|
62
|
-
};
|
|
63
|
-
onRow?: any;
|
|
64
|
-
filterBy?: Record<string, any>;
|
|
65
|
-
sortBy: string;
|
|
66
|
-
tabs?: {
|
|
67
|
-
show: boolean;
|
|
68
|
-
type: string;
|
|
69
|
-
items: {
|
|
70
|
-
name: string;
|
|
71
|
-
filterBy: Record<string, any>;
|
|
72
|
-
sortBy: string;
|
|
73
|
-
}[];
|
|
74
|
-
};
|
|
75
|
-
onValuesChange?: (changedValues: any, values: any) => void;
|
|
76
|
-
extraParams?: {
|
|
77
|
-
list?: Record<string, any>;
|
|
78
|
-
get?: Record<string, any>;
|
|
79
|
-
update?: Record<string, any>;
|
|
80
|
-
create?: Record<string, any>;
|
|
81
|
-
destroy?: Record<string, any>;
|
|
82
|
-
};
|
|
83
|
-
localSettings?: LocalSettingsType;
|
|
84
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取nocobase数据列表
|
|
3
|
-
*/
|
|
4
|
-
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
-
export declare const getShopCountryDataList: (locale?: any) => Promise<any>;
|
|
6
|
-
export interface Country {
|
|
7
|
-
id: number;
|
|
8
|
-
name: {
|
|
9
|
-
en: string;
|
|
10
|
-
'zh-CN': string;
|
|
11
|
-
'zh-HK': string;
|
|
12
|
-
'ja': string;
|
|
13
|
-
'pt': string;
|
|
14
|
-
original: string;
|
|
15
|
-
};
|
|
16
|
-
code: string;
|
|
17
|
-
calling_code: string;
|
|
18
|
-
currency_code: string;
|
|
19
|
-
sort: number;
|
|
20
|
-
status: string;
|
|
21
|
-
created_at: string;
|
|
22
|
-
updated_at: string;
|
|
23
|
-
prefix: string;
|
|
24
|
-
}
|
|
25
|
-
export declare const useCountries: () => {
|
|
26
|
-
data: Country[];
|
|
27
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const SUPPORTED_LANGUAGES: readonly ["original", "en", "zh-CN", "zh-HK", "ja", "pt"];
|
|
2
|
-
export declare const DEFAULT_MAX_COUNT = 9;
|
|
3
|
-
export declare const DEFAULT_UID = "-1";
|
|
4
|
-
export declare const MEDIA_TYPES: {
|
|
5
|
-
readonly VIDEO: "video/";
|
|
6
|
-
readonly AUDIO: "audio/";
|
|
7
|
-
};
|
|
8
|
-
export declare const IMAGE_QUALITY = 0.8;
|
|
9
|
-
export declare const IMAGE_TYPE = "image/jpeg";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FilterItemProps } from '../../types';
|
|
2
|
-
export interface DropdownProps {
|
|
3
|
-
quickFilter: FilterItemProps[];
|
|
4
|
-
otherFilter: FilterItemProps[];
|
|
5
|
-
hiddenQuickFilter?: boolean;
|
|
6
|
-
hiddenOtherFilter?: boolean;
|
|
7
|
-
onChange: (list: {
|
|
8
|
-
quickFilter: FilterItemProps[];
|
|
9
|
-
otherFilter: FilterItemProps[];
|
|
10
|
-
}) => void;
|
|
11
|
-
quickFilterMaxLength: number;
|
|
12
|
-
formFiltersPrefix: string;
|
|
13
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FilterItemProps } from '../../types';
|
|
3
|
-
export declare type FilterValueType = {
|
|
4
|
-
quickFilter: FilterItemProps[];
|
|
5
|
-
otherFilter: FilterItemProps[];
|
|
6
|
-
/** 筛选项表单值,字段名 -> 值,与 Form 的 values 一致 */
|
|
7
|
-
values?: Record<string, any>;
|
|
8
|
-
};
|
|
9
|
-
export declare type FilterListProps = {
|
|
10
|
-
value?: FilterValueType;
|
|
11
|
-
hiddenQuickFilter?: boolean;
|
|
12
|
-
hiddenOtherFilter?: boolean;
|
|
13
|
-
onChange?: (value: FilterValueType) => void;
|
|
14
|
-
quickFilterMaxLength: number;
|
|
15
|
-
formFiltersPrefix: string;
|
|
16
|
-
renderItem?: (item: any, otherProps?: any) => React.ReactNode;
|
|
17
|
-
placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
18
|
-
/** 筛选按钮尺寸,与 antd Button size 一致 */
|
|
19
|
-
size?: 'small' | 'middle' | 'large';
|
|
20
|
-
/** 筛选触发按钮的 className,用于定制样式(如与设计系统对齐) */
|
|
21
|
-
buttonClassName?: string;
|
|
22
|
-
/** 筛选按钮文案,不传则使用 materials 内置多语言 */
|
|
23
|
-
buttonText?: string;
|
|
24
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ModeType } from "../table/types";
|
|
2
|
-
/**
|
|
3
|
-
* 筛选总配置
|
|
4
|
-
*/
|
|
5
|
-
export declare type FilterType = {
|
|
6
|
-
/** 筛选是否展示 */
|
|
7
|
-
show: boolean;
|
|
8
|
-
/** 筛选项排序按钮是否展示 */
|
|
9
|
-
sortButtonShow: boolean;
|
|
10
|
-
/** 筛选列表 */
|
|
11
|
-
list: FilterItemProps[];
|
|
12
|
-
items?: string[];
|
|
13
|
-
/** 快速筛选最大长度 */
|
|
14
|
-
quickFilterMaxLength: number;
|
|
15
|
-
/** 配置存储模式 */
|
|
16
|
-
storageMode: "" | "localStorage";
|
|
17
|
-
/** 筛选列表项dom */
|
|
18
|
-
dom?: any;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* 筛选列表项配置
|
|
22
|
-
* - type 为 single/input/rangePicker 等时使用内置或映射组件
|
|
23
|
-
* - type 为 "custom" 时使用 other.component,组件接收 value/onChange(由 Form 注入)
|
|
24
|
-
*/
|
|
25
|
-
export declare type FilterItemProps = {
|
|
26
|
-
type: "single" | "input" | "datePicker" | "rangePicker" | "rangePickerNew" | "search" | "custom";
|
|
27
|
-
name?: string | string[];
|
|
28
|
-
key: string;
|
|
29
|
-
props?: object;
|
|
30
|
-
label?: string;
|
|
31
|
-
sort?: boolean;
|
|
32
|
-
localFilter?: boolean;
|
|
33
|
-
other: Record<string, any>;
|
|
34
|
-
isCustom?: boolean;
|
|
35
|
-
columnKey?: string;
|
|
36
|
-
isHidden?: boolean;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* 筛选组件属性
|
|
40
|
-
*/
|
|
41
|
-
export interface FilterProps {
|
|
42
|
-
filter: FilterType;
|
|
43
|
-
isRenderFormContent: boolean;
|
|
44
|
-
onValuesChange?: () => void;
|
|
45
|
-
tableId?: string;
|
|
46
|
-
viewMode?: ModeType;
|
|
47
|
-
isMobile?: boolean;
|
|
48
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
/**
|
|
4
|
-
* loginAndRegister组件的属性接口
|
|
5
|
-
*/
|
|
6
|
-
export interface loginAndRegisterProps {
|
|
7
|
-
/** Logo相关配置 */
|
|
8
|
-
showLogo?: boolean;
|
|
9
|
-
logo?: string;
|
|
10
|
-
logoPosition?: 'left' | 'center' | 'right';
|
|
11
|
-
logoSize?: {
|
|
12
|
-
width?: number;
|
|
13
|
-
height?: number;
|
|
14
|
-
};
|
|
15
|
-
/** 标题相关配置 */
|
|
16
|
-
title?: string;
|
|
17
|
-
showTitle?: boolean;
|
|
18
|
-
titleAlign?: 'left' | 'center' | 'right';
|
|
19
|
-
/** 副标题相关配置 */
|
|
20
|
-
subtitle?: string;
|
|
21
|
-
showSubtitle?: boolean;
|
|
22
|
-
subtitleAlign?: 'left' | 'center' | 'right';
|
|
23
|
-
/** 登录方式配置 */
|
|
24
|
-
loginMethods?: ('email' | 'google' | 'facebook' | 'apple')[];
|
|
25
|
-
defaultLoginMethod?: 'email' | 'google' | 'facebook' | 'apple';
|
|
26
|
-
/** 表单配置 */
|
|
27
|
-
emailLabel?: string;
|
|
28
|
-
passwordLabel?: string;
|
|
29
|
-
emailPlaceholder?: string;
|
|
30
|
-
passwordPlaceholder?: string;
|
|
31
|
-
emailRules?: any[];
|
|
32
|
-
buttonText?: string;
|
|
33
|
-
rememberMeText?: string;
|
|
34
|
-
forgotPasswordText?: string;
|
|
35
|
-
showRememberMe?: boolean;
|
|
36
|
-
showForgotPassword?: boolean;
|
|
37
|
-
/** 社交登录配置 */
|
|
38
|
-
socialLoginTexts?: {
|
|
39
|
-
google?: string;
|
|
40
|
-
facebook?: string;
|
|
41
|
-
apple?: string;
|
|
42
|
-
};
|
|
43
|
-
/** 底部配置 */
|
|
44
|
-
showFooter?: boolean;
|
|
45
|
-
showSignUp?: boolean;
|
|
46
|
-
signUpText?: string;
|
|
47
|
-
signUpLink?: string;
|
|
48
|
-
signUpPosition?: 'left' | 'center' | 'right';
|
|
49
|
-
otherLinks?: Array<{
|
|
50
|
-
text: string;
|
|
51
|
-
url: string;
|
|
52
|
-
}>;
|
|
53
|
-
otherLinksPosition?: 'left' | 'center' | 'right';
|
|
54
|
-
/** 登录/注册切换配置 */
|
|
55
|
-
showTabs?: boolean;
|
|
56
|
-
loginTabText?: string;
|
|
57
|
-
registerTabText?: string;
|
|
58
|
-
/** 注册表单配置 */
|
|
59
|
-
registerEmailPlaceholder?: string;
|
|
60
|
-
registerPasswordPlaceholder?: string;
|
|
61
|
-
registerButtonText?: string;
|
|
62
|
-
/** 事件回调 */
|
|
63
|
-
onLogin?: (values: {
|
|
64
|
-
email: string;
|
|
65
|
-
loginMethod: string;
|
|
66
|
-
}) => void;
|
|
67
|
-
onSocialLogin?: (type: 'google' | 'facebook' | 'apple') => void;
|
|
68
|
-
onSignUp?: () => void;
|
|
69
|
-
onRegister?: (values: {
|
|
70
|
-
email: string;
|
|
71
|
-
password: string;
|
|
72
|
-
}) => void;
|
|
73
|
-
/** 新增背景图片属性 */
|
|
74
|
-
backgroundImage?: string;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Saas登录组件
|
|
78
|
-
* @param props - 组件属性
|
|
79
|
-
* @returns React组件
|
|
80
|
-
*/
|
|
81
|
-
declare const loginAndRegister: React.FC<loginAndRegisterProps>;
|
|
82
|
-
export default loginAndRegister;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PisellCurrencyProps } from './types';
|
|
3
|
-
import './PisellCurrency.less';
|
|
4
|
-
/**
|
|
5
|
-
* PisellCurrency 货币组件
|
|
6
|
-
*
|
|
7
|
-
* 基于 PisellNumber 派生,专门处理货币数据。
|
|
8
|
-
* 默认启用千分位和2位小数,符合财务规范。
|
|
9
|
-
*
|
|
10
|
-
* @param props 组件 Props
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* // 受控模式
|
|
14
|
-
* const [price, setPrice] = useState(0);
|
|
15
|
-
* <PisellCurrency
|
|
16
|
-
* value={price}
|
|
17
|
-
* onChange={setPrice}
|
|
18
|
-
* currencySymbol="¥"
|
|
19
|
-
* />
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* // 非受控模式
|
|
23
|
-
* <PisellCurrency
|
|
24
|
-
* defaultValue={100}
|
|
25
|
-
* currencySymbol="$"
|
|
26
|
-
* />
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* // 只读态
|
|
30
|
-
* <PisellCurrency
|
|
31
|
-
* mode="read"
|
|
32
|
-
* value={1234.56}
|
|
33
|
-
* currencySymbol="¥"
|
|
34
|
-
* />
|
|
35
|
-
* // 显示: ¥1,234.56
|
|
36
|
-
*/
|
|
37
|
-
export declare const PisellCurrency: React.FC<PisellCurrencyProps>;
|
|
38
|
-
declare const MemoizedPisellCurrency: React.NamedExoticComponent<PisellCurrencyProps>;
|
|
39
|
-
export default MemoizedPisellCurrency;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Dayjs } from 'dayjs';
|
|
2
|
-
export declare type RelativeDay = 'today' | 'yesterday' | 'tomorrow';
|
|
3
|
-
/**
|
|
4
|
-
* 判断日期相对于参考日期是今天、昨天还是明天
|
|
5
|
-
*
|
|
6
|
-
* @param date 要展示的日期
|
|
7
|
-
* @param reference 参考日期(通常为「当前」dayjs())
|
|
8
|
-
* @returns 'today' | 'yesterday' | 'tomorrow' | null
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* getRelativeDay(dayjs(), dayjs()) // => 'today'
|
|
12
|
-
* getRelativeDay(dayjs().add(1,'day'), dayjs()) // => 'tomorrow'
|
|
13
|
-
* getRelativeDay(dayjs().subtract(1,'day'), dayjs()) // => 'yesterday'
|
|
14
|
-
*/
|
|
15
|
-
export declare function getRelativeDay(date: Dayjs, reference: Dayjs): RelativeDay | null;
|
|
16
|
-
/**
|
|
17
|
-
* 根据 locale 返回相对日期的展示文案
|
|
18
|
-
* 未传 locale 时使用 getDayjsLocale()(与 locales.getLocale 同源)
|
|
19
|
-
*
|
|
20
|
-
* @param day 'today' | 'yesterday' | 'tomorrow'
|
|
21
|
-
* @param locale dayjs locale,如 'zh-cn'、'en'
|
|
22
|
-
* @returns 如 '今天'、'Today'
|
|
23
|
-
*/
|
|
24
|
-
export declare function getRelativeDayLabel(day: RelativeDay, locale?: string): string;
|