shineout 3.10.0-beta.2 → 3.10.0-beta.21
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/cjs/alert/alert.semantic.d.ts +4 -0
- package/cjs/alert/alert.semantic.js +62 -0
- package/cjs/avatar/avatar.semantic.d.ts +4 -0
- package/cjs/avatar/avatar.semantic.js +58 -0
- package/cjs/badge/badge.semantic.d.ts +4 -0
- package/cjs/badge/badge.semantic.js +64 -0
- package/cjs/badge/interface.d.ts +1 -0
- package/cjs/border-beam/border-beam.d.ts +3 -0
- package/cjs/border-beam/border-beam.js +25 -0
- package/cjs/border-beam/border-beam.type.d.ts +6 -0
- package/cjs/border-beam/border-beam.type.js +5 -0
- package/cjs/border-beam/index.d.ts +7 -0
- package/cjs/border-beam/index.js +12 -0
- package/cjs/border-beam/interface.d.ts +1 -0
- package/cjs/border-beam/interface.js +5 -0
- package/cjs/breadcrumb/breadcrumb.semantic.d.ts +4 -0
- package/cjs/breadcrumb/breadcrumb.semantic.js +82 -0
- package/cjs/breadcrumb/interface.d.ts +1 -0
- package/cjs/button/button.semantic.d.ts +4 -0
- package/cjs/button/button.semantic.js +59 -0
- package/cjs/button/interface.d.ts +1 -0
- package/cjs/card/card.semantic.d.ts +4 -0
- package/cjs/card/card.semantic.js +74 -0
- package/cjs/card/interface.d.ts +1 -0
- package/cjs/carousel/carousel.semantic.d.ts +4 -0
- package/cjs/carousel/carousel.semantic.js +100 -0
- package/cjs/carousel/interface.d.ts +1 -0
- package/cjs/cascader/cascader.semantic.d.ts +4 -0
- package/cjs/cascader/cascader.semantic.js +90 -0
- package/cjs/checkbox/checkbox.semantic.d.ts +4 -0
- package/cjs/checkbox/checkbox.semantic.js +54 -0
- package/cjs/collapse/collapse.semantic.d.ts +4 -0
- package/cjs/collapse/collapse.semantic.js +77 -0
- package/cjs/collapse/interface.d.ts +1 -0
- package/cjs/date-picker/date-picker.semantic.d.ts +4 -0
- package/cjs/date-picker/date-picker.semantic.js +75 -0
- package/cjs/descriptions/descriptions.semantic.d.ts +4 -0
- package/cjs/descriptions/descriptions.semantic.js +90 -0
- package/cjs/descriptions/interface.d.ts +1 -0
- package/cjs/divider/divider.semantic.d.ts +4 -0
- package/cjs/divider/divider.semantic.js +49 -0
- package/cjs/divider/interface.d.ts +1 -0
- package/cjs/drawer/drawer.js +11 -1
- package/cjs/drawer/drawer.semantic.d.ts +4 -0
- package/cjs/drawer/drawer.semantic.js +91 -0
- package/cjs/dropdown/dropdown.semantic.d.ts +4 -0
- package/cjs/dropdown/dropdown.semantic.js +82 -0
- package/cjs/dropdown/interface.d.ts +1 -0
- package/cjs/empty/empty.semantic.d.ts +4 -0
- package/cjs/empty/empty.semantic.js +44 -0
- package/cjs/empty/interface.d.ts +1 -0
- package/cjs/form/form.semantic.d.ts +4 -0
- package/cjs/form/form.semantic.js +91 -0
- package/cjs/gap/gap.semantic.d.ts +4 -0
- package/cjs/gap/gap.semantic.js +73 -0
- package/cjs/gap/interface.d.ts +1 -0
- package/cjs/grid/grid.semantic.d.ts +4 -0
- package/cjs/grid/grid.semantic.js +71 -0
- package/cjs/grid/interface.d.ts +1 -0
- package/cjs/image/image.semantic.d.ts +4 -0
- package/cjs/image/image.semantic.js +74 -0
- package/cjs/image/interface.d.ts +1 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +9 -1
- package/cjs/input/input.semantic.d.ts +4 -0
- package/cjs/input/input.semantic.js +50 -0
- package/cjs/link/interface.d.ts +1 -0
- package/cjs/link/link.semantic.d.ts +4 -0
- package/cjs/link/link.semantic.js +58 -0
- package/cjs/list/interface.d.ts +1 -0
- package/cjs/list/list.semantic.d.ts +4 -0
- package/cjs/list/list.semantic.js +64 -0
- package/cjs/menu/interface.d.ts +1 -0
- package/cjs/menu/menu.semantic.d.ts +4 -0
- package/cjs/menu/menu.semantic.js +111 -0
- package/cjs/message/interface.d.ts +1 -0
- package/cjs/message/message.semantic.d.ts +4 -0
- package/cjs/message/message.semantic.js +70 -0
- package/cjs/modal/modal.semantic.d.ts +4 -0
- package/cjs/modal/modal.semantic.js +86 -0
- package/cjs/pagination/interface.d.ts +1 -0
- package/cjs/pagination/pagination.semantic.d.ts +4 -0
- package/cjs/pagination/pagination.semantic.js +70 -0
- package/cjs/popover/interface.d.ts +1 -1
- package/cjs/popover/popover.semantic.d.ts +4 -0
- package/cjs/popover/popover.semantic.js +52 -0
- package/cjs/progress/interface.d.ts +1 -0
- package/cjs/progress/progress.semantic.d.ts +4 -0
- package/cjs/progress/progress.semantic.js +94 -0
- package/cjs/radio/radio.semantic.d.ts +4 -0
- package/cjs/radio/radio.semantic.js +54 -0
- package/cjs/rate/rate.semantic.d.ts +4 -0
- package/cjs/rate/rate.semantic.js +56 -0
- package/cjs/select/select.semantic.d.ts +4 -0
- package/cjs/select/select.semantic.js +93 -0
- package/cjs/skeleton/interface.d.ts +1 -0
- package/cjs/skeleton/skeleton.semantic.d.ts +4 -0
- package/cjs/skeleton/skeleton.semantic.js +58 -0
- package/cjs/slider/slider.semantic.d.ts +4 -0
- package/cjs/slider/slider.semantic.js +59 -0
- package/cjs/spin/spin.semantic.d.ts +4 -0
- package/cjs/spin/spin.semantic.js +113 -0
- package/cjs/steps/interface.d.ts +1 -0
- package/cjs/steps/steps.semantic.d.ts +4 -0
- package/cjs/steps/steps.semantic.js +81 -0
- package/cjs/switch/switch.semantic.d.ts +4 -0
- package/cjs/switch/switch.semantic.js +55 -0
- package/cjs/table/interface.d.ts +1 -1
- package/cjs/table/table.semantic.d.ts +4 -0
- package/cjs/table/table.semantic.js +136 -0
- package/cjs/table/table.type.d.ts +2 -1
- package/cjs/tabs/interface.d.ts +1 -0
- package/cjs/tabs/tabs.semantic.d.ts +4 -0
- package/cjs/tabs/tabs.semantic.js +121 -0
- package/cjs/tag/interface.d.ts +1 -1
- package/cjs/tag/tag.semantic.d.ts +4 -0
- package/cjs/tag/tag.semantic.js +63 -0
- package/cjs/tag/tag.type.d.ts +2 -1
- package/cjs/textarea/textarea.semantic.d.ts +4 -0
- package/cjs/textarea/textarea.semantic.js +46 -0
- package/cjs/tooltip/tooltip.semantic.d.ts +4 -0
- package/cjs/tooltip/tooltip.semantic.js +57 -0
- package/cjs/transfer/transfer.semantic.d.ts +4 -0
- package/cjs/transfer/transfer.semantic.js +71 -0
- package/cjs/tree/interface.d.ts +1 -1
- package/cjs/tree/tree.semantic.d.ts +4 -0
- package/cjs/tree/tree.semantic.js +83 -0
- package/cjs/tree/tree.type.d.ts +2 -1
- package/cjs/tree-select/tree-select.semantic.d.ts +4 -0
- package/cjs/tree-select/tree-select.semantic.js +89 -0
- package/cjs/type.d.ts +1 -0
- package/cjs/type.js +3 -1
- package/cjs/upload/button.js +12 -1
- package/cjs/upload/image.js +4 -0
- package/cjs/upload/interface.d.ts +1 -1
- package/cjs/upload/upload.js +4 -0
- package/cjs/upload/upload.semantic.d.ts +4 -0
- package/cjs/upload/upload.semantic.js +50 -0
- package/cjs/upload/upload.type.d.ts +2 -1
- package/dist/shineout.js +15000 -13277
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/alert/alert.semantic.d.ts +4 -0
- package/esm/alert/alert.semantic.js +54 -0
- package/esm/avatar/avatar.semantic.d.ts +4 -0
- package/esm/avatar/avatar.semantic.js +51 -0
- package/esm/badge/badge.semantic.d.ts +4 -0
- package/esm/badge/badge.semantic.js +57 -0
- package/esm/badge/interface.d.ts +1 -0
- package/esm/border-beam/border-beam.d.ts +3 -0
- package/esm/border-beam/border-beam.js +18 -0
- package/esm/border-beam/border-beam.type.d.ts +6 -0
- package/esm/border-beam/border-beam.type.js +1 -0
- package/esm/border-beam/index.d.ts +7 -0
- package/esm/border-beam/index.js +5 -0
- package/esm/border-beam/interface.d.ts +1 -0
- package/esm/border-beam/interface.js +1 -0
- package/esm/breadcrumb/breadcrumb.semantic.d.ts +4 -0
- package/esm/breadcrumb/breadcrumb.semantic.js +74 -0
- package/esm/breadcrumb/interface.d.ts +1 -0
- package/esm/button/button.semantic.d.ts +4 -0
- package/esm/button/button.semantic.js +52 -0
- package/esm/button/interface.d.ts +1 -0
- package/esm/card/card.semantic.d.ts +4 -0
- package/esm/card/card.semantic.js +67 -0
- package/esm/card/interface.d.ts +1 -0
- package/esm/carousel/carousel.semantic.d.ts +4 -0
- package/esm/carousel/carousel.semantic.js +93 -0
- package/esm/carousel/interface.d.ts +1 -0
- package/esm/cascader/cascader.semantic.d.ts +4 -0
- package/esm/cascader/cascader.semantic.js +82 -0
- package/esm/checkbox/checkbox.semantic.d.ts +4 -0
- package/esm/checkbox/checkbox.semantic.js +46 -0
- package/esm/collapse/collapse.semantic.d.ts +4 -0
- package/esm/collapse/collapse.semantic.js +70 -0
- package/esm/collapse/interface.d.ts +1 -0
- package/esm/date-picker/date-picker.semantic.d.ts +4 -0
- package/esm/date-picker/date-picker.semantic.js +67 -0
- package/esm/descriptions/descriptions.semantic.d.ts +4 -0
- package/esm/descriptions/descriptions.semantic.js +82 -0
- package/esm/descriptions/interface.d.ts +1 -0
- package/esm/divider/divider.semantic.d.ts +4 -0
- package/esm/divider/divider.semantic.js +42 -0
- package/esm/divider/interface.d.ts +1 -0
- package/esm/drawer/drawer.js +11 -1
- package/esm/drawer/drawer.semantic.d.ts +4 -0
- package/esm/drawer/drawer.semantic.js +83 -0
- package/esm/dropdown/dropdown.semantic.d.ts +4 -0
- package/esm/dropdown/dropdown.semantic.js +74 -0
- package/esm/dropdown/interface.d.ts +1 -0
- package/esm/empty/empty.semantic.d.ts +4 -0
- package/esm/empty/empty.semantic.js +36 -0
- package/esm/empty/interface.d.ts +1 -0
- package/esm/form/form.semantic.d.ts +4 -0
- package/esm/form/form.semantic.js +84 -0
- package/esm/gap/gap.semantic.d.ts +4 -0
- package/esm/gap/gap.semantic.js +66 -0
- package/esm/gap/interface.d.ts +1 -0
- package/esm/grid/grid.semantic.d.ts +4 -0
- package/esm/grid/grid.semantic.js +64 -0
- package/esm/grid/interface.d.ts +1 -0
- package/esm/image/image.semantic.d.ts +4 -0
- package/esm/image/image.semantic.js +67 -0
- package/esm/image/interface.d.ts +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/input/input.semantic.d.ts +4 -0
- package/esm/input/input.semantic.js +42 -0
- package/esm/link/interface.d.ts +1 -0
- package/esm/link/link.semantic.d.ts +4 -0
- package/esm/link/link.semantic.js +51 -0
- package/esm/list/interface.d.ts +1 -0
- package/esm/list/list.semantic.d.ts +4 -0
- package/esm/list/list.semantic.js +56 -0
- package/esm/menu/interface.d.ts +1 -0
- package/esm/menu/menu.semantic.d.ts +4 -0
- package/esm/menu/menu.semantic.js +103 -0
- package/esm/message/interface.d.ts +1 -0
- package/esm/message/message.semantic.d.ts +4 -0
- package/esm/message/message.semantic.js +59 -0
- package/esm/modal/modal.semantic.d.ts +4 -0
- package/esm/modal/modal.semantic.js +78 -0
- package/esm/pagination/interface.d.ts +1 -0
- package/esm/pagination/pagination.semantic.d.ts +4 -0
- package/esm/pagination/pagination.semantic.js +62 -0
- package/esm/popover/interface.d.ts +1 -1
- package/esm/popover/popover.semantic.d.ts +4 -0
- package/esm/popover/popover.semantic.js +45 -0
- package/esm/progress/interface.d.ts +1 -0
- package/esm/progress/progress.semantic.d.ts +4 -0
- package/esm/progress/progress.semantic.js +87 -0
- package/esm/radio/radio.semantic.d.ts +4 -0
- package/esm/radio/radio.semantic.js +46 -0
- package/esm/rate/rate.semantic.d.ts +4 -0
- package/esm/rate/rate.semantic.js +48 -0
- package/esm/select/select.semantic.d.ts +4 -0
- package/esm/select/select.semantic.js +85 -0
- package/esm/skeleton/interface.d.ts +1 -0
- package/esm/skeleton/skeleton.semantic.d.ts +4 -0
- package/esm/skeleton/skeleton.semantic.js +50 -0
- package/esm/slider/slider.semantic.d.ts +4 -0
- package/esm/slider/slider.semantic.js +51 -0
- package/esm/spin/spin.semantic.d.ts +4 -0
- package/esm/spin/spin.semantic.js +106 -0
- package/esm/steps/interface.d.ts +1 -0
- package/esm/steps/steps.semantic.d.ts +4 -0
- package/esm/steps/steps.semantic.js +74 -0
- package/esm/switch/switch.semantic.d.ts +4 -0
- package/esm/switch/switch.semantic.js +48 -0
- package/esm/table/interface.d.ts +1 -1
- package/esm/table/table.semantic.d.ts +4 -0
- package/esm/table/table.semantic.js +128 -0
- package/esm/table/table.type.d.ts +2 -1
- package/esm/tabs/interface.d.ts +1 -0
- package/esm/tabs/tabs.semantic.d.ts +4 -0
- package/esm/tabs/tabs.semantic.js +114 -0
- package/esm/tag/interface.d.ts +1 -1
- package/esm/tag/tag.semantic.d.ts +4 -0
- package/esm/tag/tag.semantic.js +56 -0
- package/esm/tag/tag.type.d.ts +2 -1
- package/esm/textarea/textarea.semantic.d.ts +4 -0
- package/esm/textarea/textarea.semantic.js +38 -0
- package/esm/tooltip/tooltip.semantic.d.ts +4 -0
- package/esm/tooltip/tooltip.semantic.js +49 -0
- package/esm/transfer/transfer.semantic.d.ts +4 -0
- package/esm/transfer/transfer.semantic.js +63 -0
- package/esm/tree/interface.d.ts +1 -1
- package/esm/tree/tree.semantic.d.ts +4 -0
- package/esm/tree/tree.semantic.js +75 -0
- package/esm/tree/tree.type.d.ts +2 -1
- package/esm/tree-select/tree-select.semantic.d.ts +4 -0
- package/esm/tree-select/tree-select.semantic.js +81 -0
- package/esm/type.d.ts +1 -0
- package/esm/type.js +2 -0
- package/esm/upload/button.js +12 -1
- package/esm/upload/image.js +4 -0
- package/esm/upload/interface.d.ts +1 -1
- package/esm/upload/upload.js +4 -0
- package/esm/upload/upload.semantic.d.ts +4 -0
- package/esm/upload/upload.semantic.js +42 -0
- package/esm/upload/upload.type.d.ts +2 -1
- package/package.json +5 -5
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tabs Semantic DOM 元数据。
|
|
3
|
+
*
|
|
4
|
+
* 文档站构建时通过 chunk 模板自动引入,渲染 Semantic tab。
|
|
5
|
+
*
|
|
6
|
+
* @see /docs/rfc/0001-semantic-dom.md
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Tabs } from "./..";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
var TabsSemanticDemo = function TabsSemanticDemo() {
|
|
13
|
+
return /*#__PURE__*/_jsx("div", {
|
|
14
|
+
style: {
|
|
15
|
+
width: 400
|
|
16
|
+
},
|
|
17
|
+
children: /*#__PURE__*/_jsxs(Tabs, {
|
|
18
|
+
defaultActive: 0,
|
|
19
|
+
shape: "line",
|
|
20
|
+
extra: "Extra",
|
|
21
|
+
collapsible: true,
|
|
22
|
+
children: [/*#__PURE__*/_jsx(Tabs.Panel, {
|
|
23
|
+
tab: "Tab 1",
|
|
24
|
+
children: "Content 1"
|
|
25
|
+
}), /*#__PURE__*/_jsx(Tabs.Panel, {
|
|
26
|
+
tab: "Tab 2",
|
|
27
|
+
children: "Content 2"
|
|
28
|
+
}), /*#__PURE__*/_jsx(Tabs.Panel, {
|
|
29
|
+
tab: "Tab 3",
|
|
30
|
+
children: "Content 3"
|
|
31
|
+
}), /*#__PURE__*/_jsx(Tabs.Panel, {
|
|
32
|
+
tab: "Tab 4",
|
|
33
|
+
children: "Content 4"
|
|
34
|
+
}), /*#__PURE__*/_jsx(Tabs.Panel, {
|
|
35
|
+
tab: "Tab 5",
|
|
36
|
+
children: "Content 5"
|
|
37
|
+
}), /*#__PURE__*/_jsx(Tabs.Panel, {
|
|
38
|
+
tab: "Tab 6",
|
|
39
|
+
children: "Content 6"
|
|
40
|
+
}), /*#__PURE__*/_jsx(Tabs.Panel, {
|
|
41
|
+
tab: "Tab 7",
|
|
42
|
+
children: "Content 7"
|
|
43
|
+
}), /*#__PURE__*/_jsx(Tabs.Panel, {
|
|
44
|
+
tab: "Tab 8",
|
|
45
|
+
children: "Content 8"
|
|
46
|
+
}), /*#__PURE__*/_jsx(Tabs.Panel, {
|
|
47
|
+
tab: "Tab 9",
|
|
48
|
+
children: "Content 9"
|
|
49
|
+
}), /*#__PURE__*/_jsx(Tabs.Panel, {
|
|
50
|
+
tab: "Tab 10",
|
|
51
|
+
children: "Content 10"
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
var tabsSemantic = {
|
|
57
|
+
keys: [{
|
|
58
|
+
key: 'root',
|
|
59
|
+
cn: 'Tabs 最外层容器',
|
|
60
|
+
en: 'Tabs outermost wrapper element',
|
|
61
|
+
version: '3.10.0',
|
|
62
|
+
example: "<Tabs\n classNames={{ root: 'my-tabs' }}\n styles={{ root: { borderRadius: 8 } }}\n/>"
|
|
63
|
+
}, {
|
|
64
|
+
key: 'header',
|
|
65
|
+
cn: '标签栏区域',
|
|
66
|
+
en: 'Tab bar header area',
|
|
67
|
+
version: '3.10.0',
|
|
68
|
+
example: "<Tabs\n classNames={{ header: 'my-header' }}\n styles={{ header: { padding: '0 16px' } }}\n/>"
|
|
69
|
+
}, {
|
|
70
|
+
key: 'tab',
|
|
71
|
+
cn: '每个标签项',
|
|
72
|
+
en: 'Each tab item',
|
|
73
|
+
version: '3.10.0',
|
|
74
|
+
example: "<Tabs\n classNames={{ tab: 'my-tab' }}\n styles={{ tab: { fontWeight: 500 } }}\n/>"
|
|
75
|
+
}, {
|
|
76
|
+
key: 'panel',
|
|
77
|
+
cn: '内容面板区域',
|
|
78
|
+
en: 'Content panel area',
|
|
79
|
+
version: '3.10.0',
|
|
80
|
+
example: "<Tabs\n classNames={{ panel: 'my-panel' }}\n styles={{ panel: { padding: 16 } }}\n/>"
|
|
81
|
+
}, {
|
|
82
|
+
key: 'extra',
|
|
83
|
+
cn: '额外内容区',
|
|
84
|
+
en: 'Extra content area',
|
|
85
|
+
version: '3.10.0',
|
|
86
|
+
example: "<Tabs\n classNames={{ extra: 'my-extra' }}\n styles={{ extra: { color: '#999' } }}\n/>"
|
|
87
|
+
}, {
|
|
88
|
+
key: 'ink',
|
|
89
|
+
cn: '指示条(line/dash 形态)',
|
|
90
|
+
en: 'Ink bar indicator (line/dash shape)',
|
|
91
|
+
version: '3.10.0',
|
|
92
|
+
example: "<Tabs\n classNames={{ ink: 'my-ink' }}\n styles={{ ink: { background: '#1890ff' } }}\n/>"
|
|
93
|
+
}, {
|
|
94
|
+
key: 'prev',
|
|
95
|
+
cn: '前滚动按钮',
|
|
96
|
+
en: 'Previous scroll button',
|
|
97
|
+
version: '3.10.0',
|
|
98
|
+
example: "<Tabs\n classNames={{ prev: 'my-prev' }}\n styles={{ prev: { color: '#1890ff' } }}\n/>"
|
|
99
|
+
}, {
|
|
100
|
+
key: 'next',
|
|
101
|
+
cn: '后滚动按钮',
|
|
102
|
+
en: 'Next scroll button',
|
|
103
|
+
version: '3.10.0',
|
|
104
|
+
example: "<Tabs\n classNames={{ next: 'my-next' }}\n styles={{ next: { color: '#1890ff' } }}\n/>"
|
|
105
|
+
}, {
|
|
106
|
+
key: 'collapsible',
|
|
107
|
+
cn: '折叠按钮',
|
|
108
|
+
en: 'Collapsible button',
|
|
109
|
+
version: '3.10.0',
|
|
110
|
+
example: "<Tabs\n classNames={{ collapsible: 'my-collapsible' }}\n styles={{ collapsible: { color: '#52c41a' } }}\n/>"
|
|
111
|
+
}],
|
|
112
|
+
demo: TabsSemanticDemo
|
|
113
|
+
};
|
|
114
|
+
export default tabsSemantic;
|
package/esm/tag/interface.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { TagInputProps as InputProps, TagProps as Props } from './tag.type';
|
|
1
|
+
export type { TagInputProps as InputProps, TagProps as Props, TagSemanticKey } from './tag.type';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag Semantic DOM 元数据。
|
|
3
|
+
*
|
|
4
|
+
* 文档站构建时通过 chunk 模板自动引入,渲染 Semantic tab。
|
|
5
|
+
*
|
|
6
|
+
* @see /docs/rfc/0001-semantic-dom.md
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Tag } from "./..";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
var TagSemanticDemo = function TagSemanticDemo() {
|
|
13
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
14
|
+
style: {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
gap: 8,
|
|
17
|
+
flexWrap: 'wrap'
|
|
18
|
+
},
|
|
19
|
+
children: [/*#__PURE__*/_jsx(Tag, {
|
|
20
|
+
color: "info",
|
|
21
|
+
onClose: true,
|
|
22
|
+
children: "Closable Tag"
|
|
23
|
+
}), /*#__PURE__*/_jsx(Tag, {
|
|
24
|
+
color: "success",
|
|
25
|
+
children: "Simple Tag"
|
|
26
|
+
}), /*#__PURE__*/_jsx(Tag, {
|
|
27
|
+
color: "warning",
|
|
28
|
+
shape: "rounded",
|
|
29
|
+
onClose: true,
|
|
30
|
+
children: "Rounded"
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var tagSemantic = {
|
|
35
|
+
keys: [{
|
|
36
|
+
key: 'root',
|
|
37
|
+
cn: 'Tag 最外层容器',
|
|
38
|
+
en: 'Tag outermost wrapper element',
|
|
39
|
+
version: '3.10.0',
|
|
40
|
+
example: "<Tag\n classNames={{ root: 'my-tag' }}\n styles={{ root: { borderRadius: 8 } }}\n/>"
|
|
41
|
+
}, {
|
|
42
|
+
key: 'wrapper',
|
|
43
|
+
cn: '内容包装区域',
|
|
44
|
+
en: 'Content wrapper area',
|
|
45
|
+
version: '3.10.0',
|
|
46
|
+
example: "<Tag\n classNames={{ wrapper: 'my-wrapper' }}\n styles={{ wrapper: { padding: '0 8px' } }}\n/>"
|
|
47
|
+
}, {
|
|
48
|
+
key: 'closeIcon',
|
|
49
|
+
cn: '关闭按钮',
|
|
50
|
+
en: 'Close icon button',
|
|
51
|
+
version: '3.10.0',
|
|
52
|
+
example: "<Tag\n onClose\n classNames={{ closeIcon: 'my-close' }}\n styles={{ closeIcon: { color: 'red' } }}\n/>"
|
|
53
|
+
}],
|
|
54
|
+
demo: TagSemanticDemo
|
|
55
|
+
};
|
|
56
|
+
export default tagSemantic;
|
package/esm/tag/tag.type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { TagProps as UnStyledTagProps, TagInputProps as UnStyledTagInputProps } from '@sheinx/base';
|
|
1
|
+
import { TagProps as UnStyledTagProps, TagInputProps as UnStyledTagInputProps, TagSemanticKey as _TagSemanticKey } from '@sheinx/base';
|
|
2
|
+
export type TagSemanticKey = _TagSemanticKey;
|
|
2
3
|
/**
|
|
3
4
|
* @title Tag
|
|
4
5
|
*/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Textarea Semantic DOM 元数据。
|
|
3
|
+
*
|
|
4
|
+
* 文档站构建时通过 chunk 模板自动引入,渲染 Semantic tab。
|
|
5
|
+
*
|
|
6
|
+
* @see /docs/rfc/0001-semantic-dom.md
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Textarea } from "./..";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
var TextareaSemanticDemo = function TextareaSemanticDemo() {
|
|
12
|
+
return /*#__PURE__*/_jsx("div", {
|
|
13
|
+
style: {
|
|
14
|
+
width: 300
|
|
15
|
+
},
|
|
16
|
+
children: /*#__PURE__*/_jsx(Textarea, {
|
|
17
|
+
placeholder: "Please input",
|
|
18
|
+
rows: 3
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var textareaSemantic = {
|
|
23
|
+
keys: [{
|
|
24
|
+
key: 'root',
|
|
25
|
+
cn: 'Textarea 最外层容器',
|
|
26
|
+
en: 'Textarea outermost wrapper element',
|
|
27
|
+
version: '3.10.0',
|
|
28
|
+
example: "<Textarea\n classNames={{ root: 'my-textarea' }}\n styles={{ root: { borderRadius: 8 } }}\n/>"
|
|
29
|
+
}, {
|
|
30
|
+
key: 'textarea',
|
|
31
|
+
cn: '内部 textarea 元素',
|
|
32
|
+
en: 'Inner textarea element',
|
|
33
|
+
version: '3.10.0',
|
|
34
|
+
example: "<Textarea\n classNames={{ textarea: 'my-textarea-inner' }}\n styles={{ textarea: { fontFamily: 'monospace' } }}\n/>"
|
|
35
|
+
}],
|
|
36
|
+
demo: TextareaSemanticDemo
|
|
37
|
+
};
|
|
38
|
+
export default textareaSemantic;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tooltip Semantic DOM 元数据。
|
|
3
|
+
*
|
|
4
|
+
* 文档站构建时通过 chunk 模板自动引入,渲染 Semantic tab。
|
|
5
|
+
* 修改 key 列表即修改 TooltipSemanticKey 公开契约,需谨慎。
|
|
6
|
+
*
|
|
7
|
+
* @see /docs/rfc/0001-semantic-dom.md
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import Tooltip from "./index";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
var TooltipSemanticDemo = function TooltipSemanticDemo() {
|
|
13
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
14
|
+
tip: "This is the tooltip content.",
|
|
15
|
+
trigger: "click",
|
|
16
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
17
|
+
style: {
|
|
18
|
+
padding: '4px 8px',
|
|
19
|
+
border: '1px solid #d9d9d9',
|
|
20
|
+
borderRadius: 4,
|
|
21
|
+
cursor: 'pointer'
|
|
22
|
+
},
|
|
23
|
+
children: "Click me"
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
var tooltipSemantic = {
|
|
28
|
+
keys: [{
|
|
29
|
+
key: 'root',
|
|
30
|
+
cn: '最外层弹层容器(与 className 等价)',
|
|
31
|
+
en: 'Outer wrapper of the tooltip popup (equivalent to className)',
|
|
32
|
+
version: '3.10.0',
|
|
33
|
+
example: "<Tooltip\n tip=\"hello\"\n classNames={{\n root: 'my-classname'\n }}\n styles={{\n root: {\n color: 'red'\n }\n }}\n/>"
|
|
34
|
+
}, {
|
|
35
|
+
key: 'arrow',
|
|
36
|
+
cn: '指向触发元素的小箭头',
|
|
37
|
+
en: 'The small arrow pointing at the trigger element',
|
|
38
|
+
version: '3.10.0',
|
|
39
|
+
example: "<Tooltip\n tip=\"hello\"\n classNames={{\n arrow: 'my-arrow'\n }}\n styles={{\n arrow: {\n background: '#fafafa'\n }\n }}\n/>"
|
|
40
|
+
}, {
|
|
41
|
+
key: 'content',
|
|
42
|
+
cn: '弹层内容承载区',
|
|
43
|
+
en: 'The inner content area',
|
|
44
|
+
version: '3.10.0',
|
|
45
|
+
example: "<Tooltip\n tip=\"hello\"\n classNames={{\n content: 'my-content'\n }}\n styles={{\n content: {\n padding: 16,\n borderRadius: 8\n }\n }}\n/>"
|
|
46
|
+
}],
|
|
47
|
+
demo: TooltipSemanticDemo
|
|
48
|
+
};
|
|
49
|
+
export default tooltipSemantic;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transfer Semantic DOM 元数据。
|
|
3
|
+
*
|
|
4
|
+
* 文档站构建时通过 chunk 模板自动引入,渲染 Semantic tab。
|
|
5
|
+
*
|
|
6
|
+
* @see /docs/rfc/0001-semantic-dom.md
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Transfer } from "./..";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
var data = Array.from({
|
|
12
|
+
length: 6
|
|
13
|
+
}, function (_, i) {
|
|
14
|
+
return {
|
|
15
|
+
id: i + 1,
|
|
16
|
+
name: "Item ".concat(i + 1)
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
var TransferSemanticDemo = function TransferSemanticDemo() {
|
|
20
|
+
return /*#__PURE__*/_jsx(Transfer, {
|
|
21
|
+
data: data,
|
|
22
|
+
keygen: "id",
|
|
23
|
+
renderItem: "name",
|
|
24
|
+
defaultValue: [4, 5],
|
|
25
|
+
titles: ['Source', 'Target'],
|
|
26
|
+
listHeight: 180
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var transferSemantic = {
|
|
30
|
+
keys: [{
|
|
31
|
+
key: 'root',
|
|
32
|
+
cn: 'Transfer 最外层容器',
|
|
33
|
+
en: 'Transfer outermost wrapper element',
|
|
34
|
+
version: '3.10.0',
|
|
35
|
+
example: "<Transfer\n classNames={{ root: 'my-transfer' }}\n styles={{ root: { border: '1px solid #eee' } }}\n/>"
|
|
36
|
+
}, {
|
|
37
|
+
key: 'header',
|
|
38
|
+
cn: '面板头部区域(含全选 + 标题)',
|
|
39
|
+
en: 'Panel header area (includes select-all + title)',
|
|
40
|
+
version: '3.10.0',
|
|
41
|
+
example: "<Transfer\n classNames={{ header: 'my-header' }}\n styles={{ header: { background: '#fafafa' } }}\n/>"
|
|
42
|
+
}, {
|
|
43
|
+
key: 'list',
|
|
44
|
+
cn: '列表容器',
|
|
45
|
+
en: 'List container',
|
|
46
|
+
version: '3.10.0',
|
|
47
|
+
example: "<Transfer\n classNames={{ list: 'my-list' }}\n styles={{ list: { padding: 4 } }}\n/>"
|
|
48
|
+
}, {
|
|
49
|
+
key: 'item',
|
|
50
|
+
cn: '单个列表项',
|
|
51
|
+
en: 'Individual list item',
|
|
52
|
+
version: '3.10.0',
|
|
53
|
+
example: "<Transfer\n classNames={{ item: 'my-item' }}\n styles={{ item: { borderRadius: 4 } }}\n/>"
|
|
54
|
+
}, {
|
|
55
|
+
key: 'operations',
|
|
56
|
+
cn: '中间操作按钮区',
|
|
57
|
+
en: 'Middle operation buttons area',
|
|
58
|
+
version: '3.10.0',
|
|
59
|
+
example: "<Transfer\n classNames={{ operations: 'my-ops' }}\n styles={{ operations: { padding: '0 12px' } }}\n/>"
|
|
60
|
+
}],
|
|
61
|
+
demo: TransferSemanticDemo
|
|
62
|
+
};
|
|
63
|
+
export default transferSemantic;
|
package/esm/tree/interface.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { TreeProps as Props } from './tree.type';
|
|
1
|
+
export type { TreeProps as Props, TreeSemanticKey } from './tree.type';
|
|
2
2
|
export type { KeygenResult } from '@sheinx/hooks';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree Semantic DOM 元数据。
|
|
3
|
+
*
|
|
4
|
+
* 文档站构建时通过 chunk 模板自动引入,渲染 Semantic tab。
|
|
5
|
+
*
|
|
6
|
+
* @see /docs/rfc/0001-semantic-dom.md
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Tree } from "./..";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
var treeData = [{
|
|
12
|
+
id: '1',
|
|
13
|
+
name: 'Node 1',
|
|
14
|
+
children: [{
|
|
15
|
+
id: '1-1',
|
|
16
|
+
name: 'Child 1-1'
|
|
17
|
+
}, {
|
|
18
|
+
id: '1-2',
|
|
19
|
+
name: 'Child 1-2'
|
|
20
|
+
}]
|
|
21
|
+
}, {
|
|
22
|
+
id: '2',
|
|
23
|
+
name: 'Node 2',
|
|
24
|
+
children: [{
|
|
25
|
+
id: '2-1',
|
|
26
|
+
name: 'Child 2-1'
|
|
27
|
+
}]
|
|
28
|
+
}, {
|
|
29
|
+
id: '3',
|
|
30
|
+
name: 'Node 3'
|
|
31
|
+
}];
|
|
32
|
+
var TreeSemanticDemo = function TreeSemanticDemo() {
|
|
33
|
+
return /*#__PURE__*/_jsx("div", {
|
|
34
|
+
style: {
|
|
35
|
+
width: 300
|
|
36
|
+
},
|
|
37
|
+
children: /*#__PURE__*/_jsx(Tree, {
|
|
38
|
+
data: treeData,
|
|
39
|
+
keygen: "id",
|
|
40
|
+
renderItem: function renderItem(node) {
|
|
41
|
+
return node.name;
|
|
42
|
+
},
|
|
43
|
+
defaultExpandAll: true
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var treeSemantic = {
|
|
48
|
+
keys: [{
|
|
49
|
+
key: 'root',
|
|
50
|
+
cn: 'Tree 最外层容器',
|
|
51
|
+
en: 'Tree outermost wrapper element',
|
|
52
|
+
version: '3.10.0',
|
|
53
|
+
example: "<Tree\n classNames={{ root: 'my-tree' }}\n styles={{ root: { border: '1px solid #eee' } }}\n/>"
|
|
54
|
+
}, {
|
|
55
|
+
key: 'node',
|
|
56
|
+
cn: '每个树节点容器',
|
|
57
|
+
en: 'Each tree node wrapper',
|
|
58
|
+
version: '3.10.0',
|
|
59
|
+
example: "<Tree\n classNames={{ node: 'my-node' }}\n styles={{ node: { padding: '4px 0' } }}\n/>"
|
|
60
|
+
}, {
|
|
61
|
+
key: 'content',
|
|
62
|
+
cn: '节点内容区域(含 checkbox 和文本)',
|
|
63
|
+
en: 'Node content area (includes checkbox and text)',
|
|
64
|
+
version: '3.10.0',
|
|
65
|
+
example: "<Tree\n classNames={{ content: 'my-content' }}\n styles={{ content: { borderRadius: 4 } }}\n/>"
|
|
66
|
+
}, {
|
|
67
|
+
key: 'icon',
|
|
68
|
+
cn: '展开/折叠图标',
|
|
69
|
+
en: 'Expand/collapse icon',
|
|
70
|
+
version: '3.10.0',
|
|
71
|
+
example: "<Tree\n classNames={{ icon: 'my-icon' }}\n styles={{ icon: { color: '#1890ff' } }}\n/>"
|
|
72
|
+
}],
|
|
73
|
+
demo: TreeSemanticDemo
|
|
74
|
+
};
|
|
75
|
+
export default treeSemantic;
|
package/esm/tree/tree.type.d.ts
CHANGED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TreeSelect Semantic DOM 元数据。
|
|
3
|
+
*
|
|
4
|
+
* 文档站构建时通过 chunk 模板自动引入,渲染 Semantic tab。
|
|
5
|
+
*
|
|
6
|
+
* @see /docs/rfc/0001-semantic-dom.md
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { TreeSelect } from "./..";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
var treeData = [{
|
|
12
|
+
id: '1',
|
|
13
|
+
name: 'Option 1',
|
|
14
|
+
children: [{
|
|
15
|
+
id: '1-1',
|
|
16
|
+
name: 'Option 1-1'
|
|
17
|
+
}, {
|
|
18
|
+
id: '1-2',
|
|
19
|
+
name: 'Option 1-2'
|
|
20
|
+
}]
|
|
21
|
+
}, {
|
|
22
|
+
id: '2',
|
|
23
|
+
name: 'Option 2',
|
|
24
|
+
children: [{
|
|
25
|
+
id: '2-1',
|
|
26
|
+
name: 'Option 2-1'
|
|
27
|
+
}]
|
|
28
|
+
}, {
|
|
29
|
+
id: '3',
|
|
30
|
+
name: 'Option 3'
|
|
31
|
+
}];
|
|
32
|
+
var TreeSelectSemanticDemo = function TreeSelectSemanticDemo() {
|
|
33
|
+
return /*#__PURE__*/_jsx("div", {
|
|
34
|
+
style: {
|
|
35
|
+
width: 300
|
|
36
|
+
},
|
|
37
|
+
children: /*#__PURE__*/_jsx(TreeSelect, {
|
|
38
|
+
data: treeData,
|
|
39
|
+
keygen: "id",
|
|
40
|
+
renderItem: function renderItem(node) {
|
|
41
|
+
return node.name;
|
|
42
|
+
},
|
|
43
|
+
placeholder: "Please select"
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var treeSelectSemantic = {
|
|
48
|
+
keys: [{
|
|
49
|
+
key: 'root',
|
|
50
|
+
cn: 'TreeSelect 最外层容器',
|
|
51
|
+
en: 'TreeSelect outermost wrapper element',
|
|
52
|
+
version: '3.10.0',
|
|
53
|
+
example: "<TreeSelect\n classNames={{ root: 'my-tree-select' }}\n styles={{ root: { border: '1px solid #eee' } }}\n/>"
|
|
54
|
+
}, {
|
|
55
|
+
key: 'header',
|
|
56
|
+
cn: '结果区域(显示已选值 / placeholder)',
|
|
57
|
+
en: 'Header area (shows selected values / placeholder)',
|
|
58
|
+
version: '3.10.0',
|
|
59
|
+
example: "<TreeSelect\n classNames={{ header: 'my-header' }}\n styles={{ header: { padding: '8px' } }}\n/>"
|
|
60
|
+
}, {
|
|
61
|
+
key: 'popup',
|
|
62
|
+
cn: '下拉面板',
|
|
63
|
+
en: 'Dropdown popup panel',
|
|
64
|
+
version: '3.10.0',
|
|
65
|
+
example: "<TreeSelect\n classNames={{ popup: 'my-popup' }}\n styles={{ popup: { background: '#fff' } }}\n/>"
|
|
66
|
+
}, {
|
|
67
|
+
key: 'list',
|
|
68
|
+
cn: '树列表容器',
|
|
69
|
+
en: 'Tree list container',
|
|
70
|
+
version: '3.10.0',
|
|
71
|
+
example: "<TreeSelect\n classNames={{ list: 'my-list' }}\n styles={{ list: { padding: 8 } }}\n/>"
|
|
72
|
+
}, {
|
|
73
|
+
key: 'option',
|
|
74
|
+
cn: '树节点选项',
|
|
75
|
+
en: 'Tree node option',
|
|
76
|
+
version: '3.10.0',
|
|
77
|
+
example: "<TreeSelect\n classNames={{ option: 'my-option' }}\n styles={{ option: { borderRadius: 4 } }}\n/>"
|
|
78
|
+
}],
|
|
79
|
+
demo: TreeSelectSemanticDemo
|
|
80
|
+
};
|
|
81
|
+
export default treeSelectSemantic;
|
package/esm/type.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * as Alert from './alert/interface';
|
|
2
2
|
export * as Avatar from './avatar/interface';
|
|
3
3
|
export * as Badge from './badge/interface';
|
|
4
|
+
export * as BorderBeam from './border-beam/interface';
|
|
4
5
|
export * as Breadcrumb from './breadcrumb/interface';
|
|
5
6
|
export * as Button from './button/interface';
|
|
6
7
|
export * as Card from './card/interface';
|
package/esm/type.js
CHANGED
|
@@ -4,6 +4,8 @@ import * as _Avatar from "./avatar/interface";
|
|
|
4
4
|
export { _Avatar as Avatar };
|
|
5
5
|
import * as _Badge from "./badge/interface";
|
|
6
6
|
export { _Badge as Badge };
|
|
7
|
+
import * as _BorderBeam from "./border-beam/interface";
|
|
8
|
+
export { _BorderBeam as BorderBeam };
|
|
7
9
|
import * as _Breadcrumb from "./breadcrumb/interface";
|
|
8
10
|
export { _Breadcrumb as Breadcrumb };
|
|
9
11
|
import * as _Button from "./button/interface";
|
package/esm/upload/button.js
CHANGED
|
@@ -5,6 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { UploadButton } from '@sheinx/base';
|
|
8
|
+
import { util } from '@sheinx/hooks';
|
|
8
9
|
import { useAlertStyle, useButtonStyle, useImageStyle, usePopoverStyle, useSpinStyle, useUploadStyle } from '@sheinx/shineout-style';
|
|
9
10
|
import useFieldCommon from "../hooks/use-field-common";
|
|
10
11
|
import useUploadCommon from "./use-upload-common";
|
|
@@ -24,8 +25,18 @@ var BaseUploadButton = function BaseUploadButton(props) {
|
|
|
24
25
|
};
|
|
25
26
|
BaseUploadButton.displayName = 'ShineoutUploadButton';
|
|
26
27
|
export default (function (props) {
|
|
28
|
+
var _props$htmlName;
|
|
27
29
|
var customProps = useUploadCommon({
|
|
28
30
|
rules: props.rules
|
|
29
31
|
});
|
|
30
|
-
|
|
32
|
+
|
|
33
|
+
// 同 upload.tsx:useFieldCommon 会把 name 从子组件 props 中移除,
|
|
34
|
+
// 提前将其作为 htmlName 的 fallback 保存,以兼容 v2 中 name 作为 FormData 键名的行为。
|
|
35
|
+
var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
|
|
36
|
+
if (!props.htmlName && typeof props.name === 'string' && props.name !== 'file') {
|
|
37
|
+
util.devUseWarning.warn("Upload.Button \u7684 name=\"".concat(props.name, "\" \u4F1A\u4F5C\u4E3A\u4E0A\u4F20\u8BF7\u6C42 FormData \u7684\u5B57\u6BB5\u540D\u3002\u5982\u9700\u4FDD\u6301\u9ED8\u8BA4\u5B57\u6BB5\u540D \"file\"\uFF0C\u8BF7\u663E\u5F0F\u8BBE\u7F6E htmlName=\"file\"\u3002"));
|
|
38
|
+
}
|
|
39
|
+
return useFieldCommon(_objectSpread(_objectSpread({}, props), {}, {
|
|
40
|
+
htmlName: htmlName
|
|
41
|
+
}, customProps), BaseUploadButton);
|
|
31
42
|
});
|
package/esm/upload/image.js
CHANGED
|
@@ -5,6 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { UploadImage } from '@sheinx/base';
|
|
8
|
+
import { util } from '@sheinx/hooks';
|
|
8
9
|
import { useAlertStyle, useButtonStyle, useImageStyle, usePopoverStyle, useSpinStyle, useUploadStyle } from '@sheinx/shineout-style';
|
|
9
10
|
import useFieldCommon from "../hooks/use-field-common";
|
|
10
11
|
import useUploadCommon from "./use-upload-common";
|
|
@@ -32,6 +33,9 @@ export default (function (props) {
|
|
|
32
33
|
// 同 upload.tsx:useFieldCommon 会把 name 从子组件 props 中移除,
|
|
33
34
|
// 提前将其作为 htmlName 的 fallback 保存,以兼容 v2 中 name 作为 FormData 键名的行为。
|
|
34
35
|
var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
|
|
36
|
+
if (!props.htmlName && typeof props.name === 'string' && props.name !== 'file') {
|
|
37
|
+
util.devUseWarning.warn("Upload.Image \u7684 name=\"".concat(props.name, "\" \u4F1A\u4F5C\u4E3A\u4E0A\u4F20\u8BF7\u6C42 FormData \u7684\u5B57\u6BB5\u540D\u3002\u5982\u9700\u4FDD\u6301\u9ED8\u8BA4\u5B57\u6BB5\u540D \"file\"\uFF0C\u8BF7\u663E\u5F0F\u8BBE\u7F6E htmlName=\"file\"\u3002"));
|
|
38
|
+
}
|
|
35
39
|
return useFieldCommon(_objectSpread(_objectSpread({}, props), {}, {
|
|
36
40
|
htmlName: htmlName
|
|
37
41
|
}, customProps), BaseUploadImage);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { UploadProps as Props, Validator } from './upload.type';
|
|
1
|
+
export type { UploadProps as Props, Validator, UploadRef as Ref } from './upload.type';
|
|
2
2
|
export type { UploadImageProps as ImageProps } from './image.type';
|
|
3
3
|
export type { UploadDraggerProps as DraggerProps } from './dragger.type';
|
|
4
4
|
export type { UploadOptions as Options } from '@sheinx/hooks';
|
package/esm/upload/upload.js
CHANGED
|
@@ -5,6 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { Upload } from '@sheinx/base';
|
|
8
|
+
import { util } from '@sheinx/hooks';
|
|
8
9
|
import { useAlertStyle, useButtonStyle, useImageStyle, usePopoverStyle, useSpinStyle, useUploadStyle } from '@sheinx/shineout-style';
|
|
9
10
|
import useFieldCommon from "../hooks/use-field-common";
|
|
10
11
|
import useUploadCommon from "./use-upload-common";
|
|
@@ -33,6 +34,9 @@ export default (function (props) {
|
|
|
33
34
|
// 但 Upload 的 name 在 v2 中同时作为 FormData 的键名,为了兼容 v2 行为,
|
|
34
35
|
// 在 name 被移除之前将其作为 htmlName 的 fallback 保存下来。
|
|
35
36
|
var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
|
|
37
|
+
if (!props.htmlName && typeof props.name === 'string' && props.name !== 'file') {
|
|
38
|
+
util.devUseWarning.warn("Upload \u7684 name=\"".concat(props.name, "\" \u4F1A\u4F5C\u4E3A\u4E0A\u4F20\u8BF7\u6C42 FormData \u7684\u5B57\u6BB5\u540D\u3002\u5982\u9700\u4FDD\u6301\u9ED8\u8BA4\u5B57\u6BB5\u540D \"file\"\uFF0C\u8BF7\u663E\u5F0F\u8BBE\u7F6E htmlName=\"file\"\u3002"));
|
|
39
|
+
}
|
|
36
40
|
return useFieldCommon(_objectSpread(_objectSpread({}, props), {}, {
|
|
37
41
|
htmlName: htmlName
|
|
38
42
|
}, customProps), BaseUpload, 'array');
|