@pisell/materials 3.3.87 → 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/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- 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/fields/Input.Subdomain/index.d.ts +1 -1
- 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/Select/index.d.ts +1 -1
- 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/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +44 -7
- package/es/components/dataSourceComponents/fields/index.js +5 -1
- package/es/components/dataSourceComponents/fields/utils.js +3 -0
- package/es/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/es/components/pisellLookup/PisellLookup.js +8 -1
- package/es/components/productCard/components/Packages/utils.d.ts +2 -2
- 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/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- 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/fields/Input.Subdomain/index.d.ts +1 -1
- 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/Select/index.d.ts +1 -1
- 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/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +44 -7
- package/lib/components/dataSourceComponents/fields/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/utils.js +3 -0
- package/lib/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/lib/components/pisellLookup/PisellLookup.js +5 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +2 -2
- 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 +3 -3
- 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
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { uuid } from '../_utils/utils';
|
|
2
|
+
import {
|
|
3
|
+
formItemGeneralDataGroup,
|
|
4
|
+
generalItemMap,
|
|
5
|
+
getFormItemGeneralInfoGroup,
|
|
6
|
+
formItemGeneralOptionTypeGroup,
|
|
7
|
+
getFormItemValidateGroup,
|
|
8
|
+
getFormItemGeneralAppearanceGroup,
|
|
9
|
+
} from '../_utils/defaultSchema';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
componentName: 'FormItemTabs',
|
|
13
|
+
title: '选项卡',
|
|
14
|
+
category: '无代码表单',
|
|
15
|
+
group: '无代码组件',
|
|
16
|
+
docUrl: '',
|
|
17
|
+
screenshot: '',
|
|
18
|
+
devMode: 'proCode',
|
|
19
|
+
npm: {
|
|
20
|
+
package: '@pisell/materials',
|
|
21
|
+
version: '1.0.1',
|
|
22
|
+
exportName: 'FormItemTabs',
|
|
23
|
+
main: 'src/index.tsx',
|
|
24
|
+
destructuring: true,
|
|
25
|
+
subName: '',
|
|
26
|
+
},
|
|
27
|
+
generalProps: [
|
|
28
|
+
// 数据分组
|
|
29
|
+
formItemGeneralDataGroup,
|
|
30
|
+
// 信息分组
|
|
31
|
+
getFormItemGeneralInfoGroup([
|
|
32
|
+
generalItemMap['label'],
|
|
33
|
+
generalItemMap['tooltip'],
|
|
34
|
+
generalItemMap['extra'],
|
|
35
|
+
generalItemMap['hideLabel'],
|
|
36
|
+
generalItemMap['renderMode'],
|
|
37
|
+
generalItemMap['defaultValue'],
|
|
38
|
+
]),
|
|
39
|
+
// 选项类型分组
|
|
40
|
+
formItemGeneralOptionTypeGroup,
|
|
41
|
+
// 校验分组
|
|
42
|
+
getFormItemValidateGroup([generalItemMap['requiredobj']]),
|
|
43
|
+
// 外观分组
|
|
44
|
+
getFormItemGeneralAppearanceGroup([]),
|
|
45
|
+
],
|
|
46
|
+
props: [
|
|
47
|
+
{
|
|
48
|
+
name: 'defaultValue',
|
|
49
|
+
title: { label: '默认值', tip: '默认选中的选项值' },
|
|
50
|
+
propType: { type: 'oneOfType', value: ['string', 'number'] },
|
|
51
|
+
setter: ['StringSetter', 'NumberSetter', 'VariableSetter'],
|
|
52
|
+
supportVariable: true,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'value',
|
|
56
|
+
title: { label: '当前值', tip: '当前选中的选项值(受控)' },
|
|
57
|
+
propType: { type: 'oneOfType', value: ['string', 'number'] },
|
|
58
|
+
setter: ['StringSetter', 'NumberSetter', 'VariableSetter'],
|
|
59
|
+
supportVariable: true,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'disabled',
|
|
63
|
+
title: { label: '是否禁用', tip: '是否禁用整个选项卡组件' },
|
|
64
|
+
propType: 'bool',
|
|
65
|
+
defaultValue: false,
|
|
66
|
+
setter: 'BoolSetter',
|
|
67
|
+
supportVariable: true,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'options',
|
|
71
|
+
title: { label: '选项列表', tip: '配置各选项卡的标签和对应值' },
|
|
72
|
+
propType: {
|
|
73
|
+
type: 'arrayOf',
|
|
74
|
+
value: {
|
|
75
|
+
type: 'shape',
|
|
76
|
+
value: [
|
|
77
|
+
{
|
|
78
|
+
name: 'label',
|
|
79
|
+
propType: 'string',
|
|
80
|
+
description: '选项名',
|
|
81
|
+
defaultValue: '选项名',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'value',
|
|
85
|
+
propType: { type: 'oneOfType', value: ['string', 'number'] },
|
|
86
|
+
description: '选项值',
|
|
87
|
+
defaultValue: '选项值',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'disabled',
|
|
91
|
+
propType: 'bool',
|
|
92
|
+
description: '是否禁用该选项',
|
|
93
|
+
defaultValue: false,
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
setter: {
|
|
99
|
+
componentName: 'ArraySetter',
|
|
100
|
+
props: {
|
|
101
|
+
itemSetter: {
|
|
102
|
+
componentName: 'ObjectSetter',
|
|
103
|
+
props: {
|
|
104
|
+
config: {
|
|
105
|
+
items: [
|
|
106
|
+
{
|
|
107
|
+
name: 'label',
|
|
108
|
+
title: '选项名',
|
|
109
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
110
|
+
isRequired: true,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'value',
|
|
114
|
+
title: '选项值',
|
|
115
|
+
setter: ['StringSetter', 'NumberSetter', 'VariableSetter'],
|
|
116
|
+
isRequired: true,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'disabled',
|
|
120
|
+
title: '是否禁用',
|
|
121
|
+
setter: 'BoolSetter',
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
initialValue: () => {
|
|
127
|
+
return {
|
|
128
|
+
label: '选项名',
|
|
129
|
+
value: uuid(),
|
|
130
|
+
disabled: false,
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'onChange',
|
|
139
|
+
title: { label: '变化时回调', tip: '切换选项时触发的回调函数' },
|
|
140
|
+
propType: 'func',
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
configure: {
|
|
144
|
+
supports: {
|
|
145
|
+
style: true,
|
|
146
|
+
events: [
|
|
147
|
+
{
|
|
148
|
+
name: 'onChange',
|
|
149
|
+
template:
|
|
150
|
+
"onChange(value,${extParams}){\n// 切换选项时回调\nconsole.log('onChange', value);}",
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
snippets: [
|
|
156
|
+
{
|
|
157
|
+
title: '选项卡',
|
|
158
|
+
screenshot: '',
|
|
159
|
+
schema: {
|
|
160
|
+
componentName: 'FormItemTabs',
|
|
161
|
+
props: {
|
|
162
|
+
optionSourceType: 'custom',
|
|
163
|
+
options: [
|
|
164
|
+
{ label: '选项A', value: 'A' },
|
|
165
|
+
{ label: '选项B', value: 'B' },
|
|
166
|
+
{ label: '选项C', value: 'C' },
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.88",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"styled-components": "^6.0.0-rc.3",
|
|
90
90
|
"swiper": "^8.4.7",
|
|
91
91
|
"vod-js-sdk-v6": "^1.4.11",
|
|
92
|
-
"@pisell/date-picker": "3.0.4",
|
|
93
92
|
"@pisell/icon": "0.0.11",
|
|
94
|
-
"@pisell/utils": "3.0.2"
|
|
93
|
+
"@pisell/utils": "3.0.2",
|
|
94
|
+
"@pisell/date-picker": "3.0.4"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"react": "^18.0.0",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextContentProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* TextContent 文本内容组件
|
|
5
|
-
* 负责渲染主文本内容,支持省略和多行显示
|
|
6
|
-
*
|
|
7
|
-
* @component
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* // 单行文本
|
|
11
|
-
* <TextContent text="Tab title" />
|
|
12
|
-
*
|
|
13
|
-
* // 自定义样式
|
|
14
|
-
* <TextContent
|
|
15
|
-
* text="Tab title"
|
|
16
|
-
* textConfig={{
|
|
17
|
-
* fontSize: 16,
|
|
18
|
-
* fontWeight: 600,
|
|
19
|
-
* color: '#101828',
|
|
20
|
-
* maxLines: 2,
|
|
21
|
-
* textAlign: 'center'
|
|
22
|
-
* }}
|
|
23
|
-
* />
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
declare const TextContent: React.FC<TextContentProps>;
|
|
27
|
-
export default TextContent;
|
package/es/components/PisellCards/components/GraphicTextCard/hooks/useGraphicTextCardClick.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { GraphicTextCardProps } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* useGraphicTextCardClick Hook
|
|
4
|
-
* 处理组件点击事件的逻辑
|
|
5
|
-
*
|
|
6
|
-
* @param props - GraphicTextCard 组件的 Props
|
|
7
|
-
* @returns 点击事件处理函数
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* const handleClick = useGraphicTextCardClick(props);
|
|
12
|
-
* <div onClick={handleClick}>...</div>
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export declare const useGraphicTextCardClick: (props: GraphicTextCardProps) => (event: React.MouseEvent<HTMLDivElement>) => void;
|
package/es/components/PisellCards/components/GraphicTextCard/hooks/useGraphicTextCardStyle.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { GraphicTextCardProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* useGraphicTextCardStyle Hook
|
|
5
|
-
* 处理组件样式和类名的合并逻辑
|
|
6
|
-
*
|
|
7
|
-
* @param props - GraphicTextCard 组件的 Props
|
|
8
|
-
* @returns 合并后的样式和类名
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* const { mergedStyle, mergedClassName } = useGraphicTextCardStyle(props);
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export declare const useGraphicTextCardStyle: (props: GraphicTextCardProps) => {
|
|
16
|
-
mergedStyle: CSSProperties;
|
|
17
|
-
mergedClassName: string;
|
|
18
|
-
};
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { PisellBasicCardProps } from '../../types';
|
|
3
|
-
import { PisellImageCardProps } from '../PisellImageCard/types';
|
|
4
|
-
/**
|
|
5
|
-
* 样式变体类型
|
|
6
|
-
*/
|
|
7
|
-
export declare type GraphicTextCardVariant = 'vertical-image' | 'vertical-icon' | 'horizontal' | 'card';
|
|
8
|
-
/**
|
|
9
|
-
* 尺寸类型
|
|
10
|
-
*/
|
|
11
|
-
export declare type GraphicTextCardSize = 'small' | 'default' | 'large';
|
|
12
|
-
/**
|
|
13
|
-
* 宽度模式
|
|
14
|
-
*/
|
|
15
|
-
export declare type GraphicTextCardWidthMode = 'auto' | 'fixed' | 'full';
|
|
16
|
-
/**
|
|
17
|
-
* 图形区域配置
|
|
18
|
-
*/
|
|
19
|
-
export interface GraphicConfig extends PisellImageCardProps {
|
|
20
|
-
hidden?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* 图形区域宽度(单位:px)
|
|
23
|
-
* 如不设置,将根据 variant 和 size 自动计算
|
|
24
|
-
*/
|
|
25
|
-
width?: number;
|
|
26
|
-
/**
|
|
27
|
-
* 图形区域高度(单位:px)
|
|
28
|
-
* 如不设置,将根据 variant 和 size 自动计算
|
|
29
|
-
*/
|
|
30
|
-
height?: number;
|
|
31
|
-
/**
|
|
32
|
-
* 图形区域圆角
|
|
33
|
-
*/
|
|
34
|
-
borderRadius?: number | string;
|
|
35
|
-
/**
|
|
36
|
-
* 图形区域背景色
|
|
37
|
-
*/
|
|
38
|
-
background?: string;
|
|
39
|
-
/**
|
|
40
|
-
* 图形区域边框
|
|
41
|
-
*/
|
|
42
|
-
border?: string;
|
|
43
|
-
/**
|
|
44
|
-
* 图形区域阴影
|
|
45
|
-
*/
|
|
46
|
-
boxShadow?: string;
|
|
47
|
-
/**
|
|
48
|
-
* 图形区域内边距
|
|
49
|
-
*/
|
|
50
|
-
padding?: number | string;
|
|
51
|
-
/**
|
|
52
|
-
* 图标大小(当使用 icon 时有效,单位:px)
|
|
53
|
-
*/
|
|
54
|
-
iconSize?: number;
|
|
55
|
-
/**
|
|
56
|
-
* 图标颜色(当使用 icon 时有效)
|
|
57
|
-
*/
|
|
58
|
-
iconColor?: string;
|
|
59
|
-
/**
|
|
60
|
-
* 自定义样式
|
|
61
|
-
*/
|
|
62
|
-
style?: CSSProperties;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* 角标类型
|
|
66
|
-
*/
|
|
67
|
-
export declare type BadgeType = 'dot' | 'number' | 'text';
|
|
68
|
-
/**
|
|
69
|
-
* 角标位置
|
|
70
|
-
*/
|
|
71
|
-
export declare type BadgePosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
72
|
-
/**
|
|
73
|
-
* 角标配置
|
|
74
|
-
*/
|
|
75
|
-
export interface BadgeConfig {
|
|
76
|
-
/**
|
|
77
|
-
* 角标类型
|
|
78
|
-
* @default 'dot'
|
|
79
|
-
*/
|
|
80
|
-
type?: BadgeType;
|
|
81
|
-
/**
|
|
82
|
-
* 角标内容(数字或文本)
|
|
83
|
-
* 当 type 为 'number' 或 'text' 时有效
|
|
84
|
-
*/
|
|
85
|
-
content?: ReactNode;
|
|
86
|
-
/**
|
|
87
|
-
* 角标位置
|
|
88
|
-
* @default 'top-right'
|
|
89
|
-
*/
|
|
90
|
-
position?: BadgePosition;
|
|
91
|
-
/**
|
|
92
|
-
* 角标偏移量 [x, y]
|
|
93
|
-
* 正数向右/下偏移,负数向左/上偏移
|
|
94
|
-
*/
|
|
95
|
-
offset?: [number, number];
|
|
96
|
-
/**
|
|
97
|
-
* 角标颜色
|
|
98
|
-
*/
|
|
99
|
-
color?: string;
|
|
100
|
-
/**
|
|
101
|
-
* 角标自定义样式
|
|
102
|
-
*/
|
|
103
|
-
style?: CSSProperties;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* 文本配置
|
|
107
|
-
*/
|
|
108
|
-
export interface TextConfig {
|
|
109
|
-
/**
|
|
110
|
-
* 字体大小(单位:px)
|
|
111
|
-
*/
|
|
112
|
-
fontSize?: number;
|
|
113
|
-
/**
|
|
114
|
-
* 字体粗细
|
|
115
|
-
*/
|
|
116
|
-
fontWeight?: string | number;
|
|
117
|
-
/**
|
|
118
|
-
* 文本颜色
|
|
119
|
-
*/
|
|
120
|
-
color?: string;
|
|
121
|
-
/**
|
|
122
|
-
* 最大显示行数
|
|
123
|
-
* @default 1
|
|
124
|
-
*/
|
|
125
|
-
maxLines?: number;
|
|
126
|
-
/**
|
|
127
|
-
* 是否显示省略号
|
|
128
|
-
* @default true
|
|
129
|
-
*/
|
|
130
|
-
ellipsis?: boolean;
|
|
131
|
-
/**
|
|
132
|
-
* 文本对齐方式
|
|
133
|
-
* @default 'left'
|
|
134
|
-
*/
|
|
135
|
-
textAlign?: 'left' | 'center' | 'right';
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* GraphicTextCard 组件 Props
|
|
139
|
-
* 基于 PisellBasicCardProps 扩展
|
|
140
|
-
* 注意:重写 onClick 为可选属性
|
|
141
|
-
*/
|
|
142
|
-
export interface GraphicTextCardProps extends Omit<PisellBasicCardProps, 'onClick'> {
|
|
143
|
-
/**
|
|
144
|
-
* 卡片显示的文本内容(必填)
|
|
145
|
-
*/
|
|
146
|
-
text: ReactNode;
|
|
147
|
-
/**
|
|
148
|
-
* 卡片样式变体
|
|
149
|
-
* @default 'vertical-image'
|
|
150
|
-
*/
|
|
151
|
-
variant?: GraphicTextCardVariant;
|
|
152
|
-
/**
|
|
153
|
-
* 卡片尺寸
|
|
154
|
-
* @default 'default'
|
|
155
|
-
*/
|
|
156
|
-
size?: GraphicTextCardSize;
|
|
157
|
-
/**
|
|
158
|
-
* 是否可点击
|
|
159
|
-
* @default true
|
|
160
|
-
*/
|
|
161
|
-
clickable?: boolean;
|
|
162
|
-
/**
|
|
163
|
-
* 图片地址
|
|
164
|
-
* 与 icon 二选一,优先使用 image
|
|
165
|
-
*/
|
|
166
|
-
image?: string;
|
|
167
|
-
/**
|
|
168
|
-
* 图标
|
|
169
|
-
* 支持 ReactNode(如 antd Icon、svg 等)或图标 URL
|
|
170
|
-
* 与 image 二选一
|
|
171
|
-
*/
|
|
172
|
-
icon?: ReactNode;
|
|
173
|
-
/**
|
|
174
|
-
* 图形区域配置
|
|
175
|
-
* 用于自定义图形区域的样式和尺寸
|
|
176
|
-
*/
|
|
177
|
-
graphicConfig?: GraphicConfig;
|
|
178
|
-
/**
|
|
179
|
-
* 图形区域插槽
|
|
180
|
-
* 用于完全自定义图形区域,优先级高于 image 和 icon
|
|
181
|
-
*/
|
|
182
|
-
graphicSlot?: ReactNode;
|
|
183
|
-
/**
|
|
184
|
-
* 角标配置
|
|
185
|
-
* 用于显示红点、数字或文本提示
|
|
186
|
-
*/
|
|
187
|
-
badge?: BadgeConfig;
|
|
188
|
-
/**
|
|
189
|
-
* 前置插槽
|
|
190
|
-
* 用于在图形区域前添加自定义内容
|
|
191
|
-
*/
|
|
192
|
-
prefixSlot?: ReactNode;
|
|
193
|
-
/**
|
|
194
|
-
* 后置插槽
|
|
195
|
-
* 用于在文本内容后添加自定义内容
|
|
196
|
-
*/
|
|
197
|
-
suffixSlot?: ReactNode;
|
|
198
|
-
/**
|
|
199
|
-
* 文本配置
|
|
200
|
-
* 用于自定义文本样式和显示行为
|
|
201
|
-
*/
|
|
202
|
-
textConfig?: TextConfig;
|
|
203
|
-
/**
|
|
204
|
-
* 宽度模式
|
|
205
|
-
* - auto: 内容撑满,最大宽度 maxWidth
|
|
206
|
-
* - fixed: 固定宽度 width
|
|
207
|
-
* - full: 撑满父容器
|
|
208
|
-
* @default 'auto'
|
|
209
|
-
*/
|
|
210
|
-
widthMode?: GraphicTextCardWidthMode;
|
|
211
|
-
/**
|
|
212
|
-
* 固定宽度值
|
|
213
|
-
* 当 widthMode='fixed' 时有效
|
|
214
|
-
*/
|
|
215
|
-
width?: number | string;
|
|
216
|
-
/**
|
|
217
|
-
* 最大宽度
|
|
218
|
-
* 当 widthMode='auto' 时有效
|
|
219
|
-
* @default 400
|
|
220
|
-
*/
|
|
221
|
-
maxWidth?: number | string;
|
|
222
|
-
/**
|
|
223
|
-
* 点击事件
|
|
224
|
-
* 当 clickable=true 且不在 disabled/loading 状态时触发
|
|
225
|
-
* 注意:PisellBasicCardProps 中的 onClick 是必填的,这里重新定义为可选
|
|
226
|
-
*/
|
|
227
|
-
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
228
|
-
/**
|
|
229
|
-
* 自定义渲染函数
|
|
230
|
-
* 完全自定义组件的渲染内容
|
|
231
|
-
* 当提供此函数时,组件内置的渲染逻辑将被忽略
|
|
232
|
-
*/
|
|
233
|
-
render?: (props: GraphicTextCardProps) => ReactNode;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* GraphicArea 组件 Props
|
|
237
|
-
* 图形区域子组件
|
|
238
|
-
*/
|
|
239
|
-
export interface GraphicAreaProps {
|
|
240
|
-
/**
|
|
241
|
-
* 图片地址
|
|
242
|
-
*/
|
|
243
|
-
image?: string;
|
|
244
|
-
/**
|
|
245
|
-
* 图标内容
|
|
246
|
-
*/
|
|
247
|
-
icon?: ReactNode;
|
|
248
|
-
/**
|
|
249
|
-
* 图形配置
|
|
250
|
-
*/
|
|
251
|
-
config?: GraphicConfig;
|
|
252
|
-
/**
|
|
253
|
-
* 自定义类名
|
|
254
|
-
*/
|
|
255
|
-
className?: string;
|
|
256
|
-
aliWidth?: number;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* TextContent 组件 Props
|
|
260
|
-
* 文本内容子组件
|
|
261
|
-
*/
|
|
262
|
-
export interface TextContentProps {
|
|
263
|
-
/**
|
|
264
|
-
* 文本内容
|
|
265
|
-
*/
|
|
266
|
-
text: ReactNode;
|
|
267
|
-
/**
|
|
268
|
-
* 文本配置
|
|
269
|
-
*/
|
|
270
|
-
textConfig?: TextConfig;
|
|
271
|
-
/**
|
|
272
|
-
* 自定义类名
|
|
273
|
-
*/
|
|
274
|
-
className?: string;
|
|
275
|
-
active: PisellBasicCardProps['active'];
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* BadgeWrapper 组件 Props
|
|
279
|
-
* 角标包装子组件
|
|
280
|
-
*/
|
|
281
|
-
export interface BadgeWrapperProps {
|
|
282
|
-
/**
|
|
283
|
-
* 角标配置
|
|
284
|
-
*/
|
|
285
|
-
badge?: BadgeConfig;
|
|
286
|
-
/**
|
|
287
|
-
* 子元素
|
|
288
|
-
*/
|
|
289
|
-
children: ReactNode;
|
|
290
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { GraphicTextCardVariant, GraphicTextCardSize } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* 获取图形区域的默认尺寸
|
|
4
|
-
* 根据样式变体和尺寸返回对应的默认宽高
|
|
5
|
-
*
|
|
6
|
-
* @param variant - 样式变体
|
|
7
|
-
* @param size - 尺寸
|
|
8
|
-
* @returns 默认的宽度和高度
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const size = getDefaultGraphicSize('vertical-image', 'default');
|
|
13
|
-
* // 返回 { width: 36, height: 36 }
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
export declare const getDefaultGraphicSize: (variant: GraphicTextCardVariant, size: GraphicTextCardSize) => {
|
|
17
|
-
width: number | string;
|
|
18
|
-
height: number | string;
|
|
19
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BadgeWrapperProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* BadgeWrapper 角标包装组件
|
|
5
|
-
* 负责角标的渲染和定位,支持红点、数字、文本三种类型
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* // 红点角标
|
|
10
|
-
* <BadgeWrapper badge={{ type: 'dot' }}>
|
|
11
|
-
* <TextCard text="Item" />
|
|
12
|
-
* </BadgeWrapper>
|
|
13
|
-
*
|
|
14
|
-
* // 数字角标
|
|
15
|
-
* <BadgeWrapper badge={{ type: 'number', content: 99 }}>
|
|
16
|
-
* <TextCard text="Item" />
|
|
17
|
-
* </BadgeWrapper>
|
|
18
|
-
*
|
|
19
|
-
* // 文本角标
|
|
20
|
-
* <BadgeWrapper badge={{ type: 'text', content: 'New' }}>
|
|
21
|
-
* <TextCard text="Item" />
|
|
22
|
-
* </BadgeWrapper>
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
declare const BadgeWrapper: React.FC<BadgeWrapperProps>;
|
|
26
|
-
export default BadgeWrapper;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconWrapperProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* IconWrapper 图标包装组件
|
|
5
|
-
* 负责统一图标渲染逻辑,支持自定义图标大小和颜色
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <IconWrapper
|
|
10
|
-
* icon={<BellIcon />}
|
|
11
|
-
* position="prefix"
|
|
12
|
-
* config={{ size: 16, color: '#666' }}
|
|
13
|
-
* />
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
declare const IconWrapper: React.FC<IconWrapperProps>;
|
|
17
|
-
export default IconWrapper;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextContentProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* TextContent 文本内容组件
|
|
5
|
-
* 负责渲染主文本内容,处理文本省略逻辑
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <TextContent
|
|
10
|
-
* text="这是一段很长的文本内容"
|
|
11
|
-
* textConfig={{
|
|
12
|
-
* maxLines: 2,
|
|
13
|
-
* ellipsis: true,
|
|
14
|
-
* fontSize: 14,
|
|
15
|
-
* color: '#333'
|
|
16
|
-
* }}
|
|
17
|
-
* />
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
declare const TextContent: React.FC<TextContentProps>;
|
|
21
|
-
export default TextContent;
|