@douyinfe/semi-ui 2.17.1 → 2.18.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/anchor/index.tsx +1 -1
- package/anchor/link.tsx +3 -4
- package/autoComplete/__test__/autoComplete.test.js +6 -6
- package/autoComplete/index.tsx +1 -1
- package/autoComplete/option.tsx +164 -0
- package/calendar/__test__/calendar.test.js +21 -2
- package/calendar/_story/calendar.stories.js +31 -0
- package/calendar/index.tsx +3 -1
- package/calendar/interface.ts +2 -1
- package/carousel/index.tsx +5 -5
- package/checkbox/checkbox.tsx +10 -2
- package/dist/css/semi.css +133 -28
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +7478 -8726
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/form/_story/FieldProps/labelOptional.jsx +30 -0
- package/form/_story/form.stories.js +7 -0
- package/form/baseForm.tsx +0 -1
- package/form/hoc/withField.tsx +1 -0
- package/form/label.tsx +21 -7
- package/gulpfile.js +3 -1
- package/lib/cjs/_base/base.css +35 -0
- package/lib/cjs/anchor/index.js +2 -1
- package/lib/cjs/anchor/link.d.ts +1 -1
- package/lib/cjs/anchor/link.js +9 -5
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.js +1 -1
- package/lib/cjs/autoComplete/option.d.ts +50 -0
- package/lib/cjs/autoComplete/option.js +218 -0
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/calendar/index.d.ts +2 -0
- package/lib/cjs/calendar/index.js +3 -1
- package/lib/cjs/calendar/interface.d.ts +2 -1
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -1
- package/lib/cjs/carousel/index.js +2 -2
- package/lib/cjs/checkbox/checkbox.d.ts +4 -0
- package/lib/cjs/checkbox/checkbox.js +9 -3
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/form/baseForm.js +0 -1
- package/lib/cjs/form/hoc/withField.js +2 -1
- package/lib/cjs/form/label.d.ts +8 -5
- package/lib/cjs/form/label.js +15 -4
- package/lib/cjs/locale/interface.d.ts +3 -0
- package/lib/cjs/locale/source/ar.js +3 -0
- package/lib/cjs/locale/source/de.js +3 -0
- package/lib/cjs/locale/source/en_GB.js +3 -0
- package/lib/cjs/locale/source/en_US.js +3 -0
- package/lib/cjs/locale/source/es.js +3 -0
- package/lib/cjs/locale/source/fr.js +3 -0
- package/lib/cjs/locale/source/id_ID.js +3 -0
- package/lib/cjs/locale/source/it.js +3 -0
- package/lib/cjs/locale/source/ja_JP.js +3 -0
- package/lib/cjs/locale/source/ko_KR.js +3 -0
- package/lib/cjs/locale/source/ms_MY.js +3 -0
- package/lib/cjs/locale/source/pt_BR.js +3 -0
- package/lib/cjs/locale/source/ru_RU.js +3 -0
- package/lib/cjs/locale/source/th_TH.js +3 -0
- package/lib/cjs/locale/source/tr_TR.js +3 -0
- package/lib/cjs/locale/source/vi_VN.js +3 -0
- package/lib/cjs/locale/source/zh_CN.js +3 -0
- package/lib/cjs/locale/source/zh_TW.js +3 -0
- package/lib/cjs/modal/Modal.js +0 -8
- package/lib/cjs/modal/ModalContent.js +4 -1
- package/lib/cjs/radio/radio.d.ts +3 -1
- package/lib/cjs/radio/radio.js +33 -8
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/table/ColumnFilter.js +4 -2
- package/lib/cjs/table/ColumnSorter.d.ts +1 -0
- package/lib/cjs/table/ColumnSorter.js +9 -6
- package/lib/cjs/table/Table.js +11 -4
- package/lib/cjs/tabs/TabBar.js +5 -1
- package/lib/cjs/tag/group.d.ts +3 -0
- package/lib/cjs/tag/group.js +24 -6
- package/lib/cjs/tag/index.d.ts +2 -1
- package/lib/cjs/tag/index.js +7 -5
- package/lib/cjs/tag/interface.d.ts +2 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +2 -2
- package/lib/cjs/timePicker/TimeShape.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +2 -2
- package/lib/cjs/transfer/index.js +7 -2
- package/lib/cjs/tree/index.d.ts +3 -1
- package/lib/cjs/tree/index.js +23 -0
- package/lib/cjs/tree/interface.d.ts +4 -0
- package/lib/cjs/typography/base.d.ts +1 -1
- package/lib/cjs/typography/paragraph.d.ts +1 -1
- package/lib/cjs/typography/text.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +2 -2
- package/lib/cjs/upload/index.d.ts +1 -1
- package/lib/es/_base/base.css +35 -0
- package/lib/es/anchor/index.js +2 -1
- package/lib/es/anchor/link.d.ts +1 -1
- package/lib/es/anchor/link.js +9 -5
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/autoComplete/index.js +1 -1
- package/lib/es/autoComplete/option.d.ts +50 -0
- package/lib/es/autoComplete/option.js +188 -0
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/calendar/index.d.ts +2 -0
- package/lib/es/calendar/index.js +3 -1
- package/lib/es/calendar/interface.d.ts +2 -1
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +1 -1
- package/lib/es/carousel/index.js +2 -2
- package/lib/es/checkbox/checkbox.d.ts +4 -0
- package/lib/es/checkbox/checkbox.js +10 -4
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/form/baseForm.js +0 -1
- package/lib/es/form/hoc/withField.js +2 -1
- package/lib/es/form/label.d.ts +8 -5
- package/lib/es/form/label.js +13 -4
- package/lib/es/locale/interface.d.ts +3 -0
- package/lib/es/locale/source/ar.js +3 -0
- package/lib/es/locale/source/de.js +3 -0
- package/lib/es/locale/source/en_GB.js +3 -0
- package/lib/es/locale/source/en_US.js +3 -0
- package/lib/es/locale/source/es.js +3 -0
- package/lib/es/locale/source/fr.js +3 -0
- package/lib/es/locale/source/id_ID.js +3 -0
- package/lib/es/locale/source/it.js +3 -0
- package/lib/es/locale/source/ja_JP.js +3 -0
- package/lib/es/locale/source/ko_KR.js +3 -0
- package/lib/es/locale/source/ms_MY.js +3 -0
- package/lib/es/locale/source/pt_BR.js +3 -0
- package/lib/es/locale/source/ru_RU.js +3 -0
- package/lib/es/locale/source/th_TH.js +3 -0
- package/lib/es/locale/source/tr_TR.js +3 -0
- package/lib/es/locale/source/vi_VN.js +3 -0
- package/lib/es/locale/source/zh_CN.js +3 -0
- package/lib/es/locale/source/zh_TW.js +3 -0
- package/lib/es/modal/Modal.js +0 -8
- package/lib/es/modal/ModalContent.js +4 -1
- package/lib/es/radio/radio.d.ts +3 -1
- package/lib/es/radio/radio.js +31 -8
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/table/ColumnFilter.js +4 -2
- package/lib/es/table/ColumnSorter.d.ts +1 -0
- package/lib/es/table/ColumnSorter.js +9 -6
- package/lib/es/table/Table.js +10 -4
- package/lib/es/tabs/TabBar.js +5 -1
- package/lib/es/tag/group.d.ts +3 -0
- package/lib/es/tag/group.js +24 -6
- package/lib/es/tag/index.d.ts +2 -1
- package/lib/es/tag/index.js +7 -5
- package/lib/es/tag/interface.d.ts +2 -1
- package/lib/es/timePicker/TimePicker.d.ts +2 -2
- package/lib/es/timePicker/TimeShape.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +2 -2
- package/lib/es/transfer/index.js +7 -2
- package/lib/es/tree/index.d.ts +3 -1
- package/lib/es/tree/index.js +22 -0
- package/lib/es/tree/interface.d.ts +4 -0
- package/lib/es/typography/base.d.ts +1 -1
- package/lib/es/typography/paragraph.d.ts +1 -1
- package/lib/es/typography/text.d.ts +1 -1
- package/lib/es/typography/title.d.ts +2 -2
- package/lib/es/upload/index.d.ts +1 -1
- package/locale/interface.ts +3 -0
- package/locale/source/ar.ts +3 -0
- package/locale/source/de.ts +3 -0
- package/locale/source/en_GB.ts +3 -0
- package/locale/source/en_US.ts +3 -0
- package/locale/source/es.ts +3 -0
- package/locale/source/fr.ts +3 -0
- package/locale/source/id_ID.ts +3 -0
- package/locale/source/it.ts +3 -0
- package/locale/source/ja_JP.ts +3 -0
- package/locale/source/ko_KR.ts +3 -0
- package/locale/source/ms_MY.ts +3 -0
- package/locale/source/pt_BR.ts +3 -0
- package/locale/source/ru_RU.ts +3 -0
- package/locale/source/th_TH.ts +3 -0
- package/locale/source/tr_TR.ts +4 -1
- package/locale/source/vi_VN.ts +3 -0
- package/locale/source/zh_CN.ts +3 -0
- package/locale/source/zh_TW.ts +3 -0
- package/modal/Modal.tsx +0 -6
- package/modal/ModalContent.tsx +4 -1
- package/modal/__test__/modal.test.js +1 -1
- package/modal/_story/__snapshots__/modal.stories.tsx.snap +203 -0
- package/package.json +7 -7
- package/radio/_story/radio.stories.js +2 -2
- package/radio/radio.tsx +27 -5
- package/rating/__test__/rating.test.js +1 -1
- package/select/__test__/select.test.js +11 -17
- package/select/_story/select.stories.js +6 -6
- package/steps/_story/steps.stories.js +3 -3
- package/switch/_story/switch.stories.js +4 -4
- package/switch/_story/switch.stories.tsx +4 -4
- package/table/ColumnFilter.tsx +2 -1
- package/table/ColumnSorter.tsx +16 -10
- package/table/Table.tsx +7 -4
- package/tabs/TabBar.tsx +7 -1
- package/tag/_story/tag.stories.js +57 -1
- package/tag/group.tsx +20 -3
- package/tag/index.tsx +6 -5
- package/tag/interface.ts +2 -1
- package/transfer/_story/transfer.stories.js +2 -2
- package/transfer/index.tsx +7 -2
- package/tree/_story/tree.stories.js +152 -3
- package/tree/index.tsx +16 -1
- package/tree/interface.ts +6 -0
- package/upload/_story/upload.stories.js +2 -2
- package/webpack.config.js +13 -3
package/lib/es/tree/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import _isFunction from "lodash/isFunction";
|
|
|
2
2
|
import _get from "lodash/get";
|
|
3
3
|
import _isEqual from "lodash/isEqual";
|
|
4
4
|
import _isEmpty from "lodash/isEmpty";
|
|
5
|
+
import _findIndexInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find-index";
|
|
5
6
|
import _Promise from "@babel/runtime-corejs3/core-js-stable/promise";
|
|
6
7
|
import _Set from "@babel/runtime-corejs3/core-js-stable/set";
|
|
7
8
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
@@ -40,6 +41,25 @@ class Tree extends BaseComponent {
|
|
|
40
41
|
this.foundation.handleInputChange(value);
|
|
41
42
|
};
|
|
42
43
|
|
|
44
|
+
this.scrollTo = scrollData => {
|
|
45
|
+
var _a;
|
|
46
|
+
|
|
47
|
+
const {
|
|
48
|
+
key,
|
|
49
|
+
align = 'center'
|
|
50
|
+
} = scrollData;
|
|
51
|
+
const {
|
|
52
|
+
flattenNodes
|
|
53
|
+
} = this.state;
|
|
54
|
+
|
|
55
|
+
if (key) {
|
|
56
|
+
const index = flattenNodes === null || flattenNodes === void 0 ? void 0 : _findIndexInstanceProperty(flattenNodes).call(flattenNodes, node => {
|
|
57
|
+
return node.key === key;
|
|
58
|
+
});
|
|
59
|
+
index >= 0 && ((_a = this.virtualizedListRef.current) === null || _a === void 0 ? void 0 : _a.scrollToItem(index, align));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
43
63
|
this.renderEmpty = () => {
|
|
44
64
|
const {
|
|
45
65
|
emptyContent
|
|
@@ -201,6 +221,7 @@ class Tree extends BaseComponent {
|
|
|
201
221
|
this.optionsRef = /*#__PURE__*/React.createRef();
|
|
202
222
|
this.foundation = new TreeFoundation(this.adapter);
|
|
203
223
|
this.dragNode = null;
|
|
224
|
+
this.virtualizedListRef = /*#__PURE__*/React.createRef();
|
|
204
225
|
}
|
|
205
226
|
/**
|
|
206
227
|
* Process of getDerivedStateFromProps was inspired by rc-tree
|
|
@@ -573,6 +594,7 @@ class Tree extends BaseComponent {
|
|
|
573
594
|
width
|
|
574
595
|
} = _ref4;
|
|
575
596
|
return /*#__PURE__*/React.createElement(VirtualList, {
|
|
597
|
+
ref: this.virtualizedListRef,
|
|
576
598
|
itemCount: flattenNodes.length,
|
|
577
599
|
itemSize: virtualize.itemSize,
|
|
578
600
|
height: height,
|
|
@@ -64,7 +64,7 @@ export default class Base extends Component<BaseTypographyProps, BaseTypographyS
|
|
|
64
64
|
spacing: PropTypes.Requireable<"normal" | "extended">;
|
|
65
65
|
strong: PropTypes.Requireable<boolean>;
|
|
66
66
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
67
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
67
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
|
|
68
68
|
style: PropTypes.Requireable<object>;
|
|
69
69
|
className: PropTypes.Requireable<string>;
|
|
70
70
|
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -29,7 +29,7 @@ export default class Paragraph extends PureComponent<ParagraphProps> {
|
|
|
29
29
|
link: PropTypes.Requireable<boolean | object>;
|
|
30
30
|
underline: PropTypes.Requireable<boolean>;
|
|
31
31
|
strong: PropTypes.Requireable<boolean>;
|
|
32
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
32
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
|
|
33
33
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
34
34
|
spacing: PropTypes.Requireable<"normal" | "extended">;
|
|
35
35
|
style: PropTypes.Requireable<object>;
|
|
@@ -32,7 +32,7 @@ export default class Text extends PureComponent<TextProps> {
|
|
|
32
32
|
underline: PropTypes.Requireable<boolean>;
|
|
33
33
|
link: PropTypes.Requireable<boolean | object>;
|
|
34
34
|
strong: PropTypes.Requireable<boolean>;
|
|
35
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
35
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
|
|
36
36
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
37
37
|
style: PropTypes.Requireable<object>;
|
|
38
38
|
className: PropTypes.Requireable<string>;
|
|
@@ -36,8 +36,8 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
36
36
|
link: PropTypes.Requireable<boolean | object>;
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
40
|
-
heading: PropTypes.Requireable<1 | 2 | 3 | 4 |
|
|
39
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
|
|
40
|
+
heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 6 | 5>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
43
43
|
component: PropTypes.Requireable<string>;
|
package/lib/es/upload/index.d.ts
CHANGED
|
@@ -140,7 +140,7 @@ declare class Upload extends BaseComponent<UploadProps, UploadState> {
|
|
|
140
140
|
style: PropTypes.Requireable<object>;
|
|
141
141
|
timeout: PropTypes.Requireable<number>;
|
|
142
142
|
transformFile: PropTypes.Requireable<(...args: any[]) => any>;
|
|
143
|
-
uploadTrigger: PropTypes.Requireable<"
|
|
143
|
+
uploadTrigger: PropTypes.Requireable<"custom" | "auto">;
|
|
144
144
|
validateMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
145
145
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
146
146
|
withCredentials: PropTypes.Requireable<boolean>;
|
package/locale/interface.ts
CHANGED
package/locale/source/ar.ts
CHANGED
package/locale/source/de.ts
CHANGED
package/locale/source/en_GB.ts
CHANGED
package/locale/source/en_US.ts
CHANGED
package/locale/source/es.ts
CHANGED
package/locale/source/fr.ts
CHANGED
package/locale/source/id_ID.ts
CHANGED
package/locale/source/it.ts
CHANGED
package/locale/source/ja_JP.ts
CHANGED
package/locale/source/ko_KR.ts
CHANGED
package/locale/source/ms_MY.ts
CHANGED
package/locale/source/pt_BR.ts
CHANGED
package/locale/source/ru_RU.ts
CHANGED
package/locale/source/th_TH.ts
CHANGED
package/locale/source/tr_TR.ts
CHANGED
package/locale/source/vi_VN.ts
CHANGED
package/locale/source/zh_CN.ts
CHANGED
package/locale/source/zh_TW.ts
CHANGED
package/modal/Modal.tsx
CHANGED
|
@@ -347,12 +347,6 @@ class Modal extends BaseComponent<ModalReactProps, ModalState> {
|
|
|
347
347
|
let style = styleFromProps;
|
|
348
348
|
const maskStyle = maskStyleFromProps;
|
|
349
349
|
const renderFooter = 'footer' in this.props ? footer : this.renderFooter();
|
|
350
|
-
if (this.props.centered) {
|
|
351
|
-
style = {
|
|
352
|
-
transform: 'translateY(-50%)',
|
|
353
|
-
top: '50%', ...style,
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
350
|
let wrapperStyle: {
|
|
357
351
|
zIndex?: CSSProperties['zIndex'];
|
|
358
352
|
position?: CSSProperties['position'];
|
package/modal/ModalContent.tsx
CHANGED
|
@@ -318,7 +318,10 @@ export default class ModalContent extends BaseComponent<ModalContentReactProps,
|
|
|
318
318
|
<div
|
|
319
319
|
role="none"
|
|
320
320
|
tabIndex={-1}
|
|
321
|
-
className={
|
|
321
|
+
className={cls({
|
|
322
|
+
[`${cssClasses.DIALOG}-wrap`]:true,
|
|
323
|
+
[`${cssClasses.DIALOG}-wrap-center`]:this.props.centered
|
|
324
|
+
})}
|
|
322
325
|
onClick={maskClosable ? this.onMaskClick : null}
|
|
323
326
|
onMouseUp={maskClosable ? this.onMaskMouseUp : null}
|
|
324
327
|
>
|
|
@@ -287,7 +287,7 @@ describe('modal', () => {
|
|
|
287
287
|
it('centered without motion', () => {
|
|
288
288
|
let com = getModal({ centered: true, visible: true, motion: false });
|
|
289
289
|
let modal = mount(com, { attachTo: document.getElementById('container') });
|
|
290
|
-
expect(modal.find(`div.${BASE_CLASS_PREFIX}-modal`)).
|
|
290
|
+
expect(modal.find(`div.${BASE_CLASS_PREFIX}-modal-wrap`)).toHaveClassName(`${BASE_CLASS_PREFIX}-modal-wrap-center`)
|
|
291
291
|
});
|
|
292
292
|
|
|
293
293
|
it('keepDOM', () => {
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`模态框-点击遮罩层不可关闭 1`] = `
|
|
4
|
+
<DialogComponent
|
|
5
|
+
maskClosable={false}
|
|
6
|
+
>
|
|
7
|
+
<Button
|
|
8
|
+
onClick={[Function]}
|
|
9
|
+
>
|
|
10
|
+
<Button
|
|
11
|
+
block={false}
|
|
12
|
+
disabled={false}
|
|
13
|
+
htmlType="button"
|
|
14
|
+
onClick={[Function]}
|
|
15
|
+
onMouseDown={[Function]}
|
|
16
|
+
onMouseEnter={[Function]}
|
|
17
|
+
onMouseLeave={[Function]}
|
|
18
|
+
prefixCls="semi-button"
|
|
19
|
+
size="default"
|
|
20
|
+
theme="light"
|
|
21
|
+
type="primary"
|
|
22
|
+
>
|
|
23
|
+
<button
|
|
24
|
+
aria-disabled={false}
|
|
25
|
+
className="semi-button semi-button-primary semi-button-light"
|
|
26
|
+
disabled={false}
|
|
27
|
+
onClick={[Function]}
|
|
28
|
+
onMouseDown={[Function]}
|
|
29
|
+
onMouseEnter={[Function]}
|
|
30
|
+
onMouseLeave={[Function]}
|
|
31
|
+
type="button"
|
|
32
|
+
>
|
|
33
|
+
<span
|
|
34
|
+
className="semi-button-content"
|
|
35
|
+
onClick={[Function]}
|
|
36
|
+
x-semi-prop="children"
|
|
37
|
+
>
|
|
38
|
+
show dialog
|
|
39
|
+
</span>
|
|
40
|
+
</button>
|
|
41
|
+
</Button>
|
|
42
|
+
</Button>
|
|
43
|
+
<Button
|
|
44
|
+
onClick={[Function]}
|
|
45
|
+
>
|
|
46
|
+
<Button
|
|
47
|
+
block={false}
|
|
48
|
+
disabled={false}
|
|
49
|
+
htmlType="button"
|
|
50
|
+
onClick={[Function]}
|
|
51
|
+
onMouseDown={[Function]}
|
|
52
|
+
onMouseEnter={[Function]}
|
|
53
|
+
onMouseLeave={[Function]}
|
|
54
|
+
prefixCls="semi-button"
|
|
55
|
+
size="default"
|
|
56
|
+
theme="light"
|
|
57
|
+
type="primary"
|
|
58
|
+
>
|
|
59
|
+
<button
|
|
60
|
+
aria-disabled={false}
|
|
61
|
+
className="semi-button semi-button-primary semi-button-light"
|
|
62
|
+
disabled={false}
|
|
63
|
+
onClick={[Function]}
|
|
64
|
+
onMouseDown={[Function]}
|
|
65
|
+
onMouseEnter={[Function]}
|
|
66
|
+
onMouseLeave={[Function]}
|
|
67
|
+
type="button"
|
|
68
|
+
>
|
|
69
|
+
<span
|
|
70
|
+
className="semi-button-content"
|
|
71
|
+
onClick={[Function]}
|
|
72
|
+
x-semi-prop="children"
|
|
73
|
+
>
|
|
74
|
+
静态调用
|
|
75
|
+
</span>
|
|
76
|
+
</button>
|
|
77
|
+
</Button>
|
|
78
|
+
</Button>
|
|
79
|
+
<Modal
|
|
80
|
+
afterClose={[Function]}
|
|
81
|
+
cancelLoading={false}
|
|
82
|
+
centered={false}
|
|
83
|
+
closable={true}
|
|
84
|
+
closeOnEsc={true}
|
|
85
|
+
confirmLoading={false}
|
|
86
|
+
fullScreen={false}
|
|
87
|
+
hasCancel={true}
|
|
88
|
+
keepDOM={false}
|
|
89
|
+
lazyRender={true}
|
|
90
|
+
mask={true}
|
|
91
|
+
maskClosable={false}
|
|
92
|
+
maskFixed={false}
|
|
93
|
+
motion={true}
|
|
94
|
+
okType="primary"
|
|
95
|
+
onCancel={[Function]}
|
|
96
|
+
onOk={[Function]}
|
|
97
|
+
size="small"
|
|
98
|
+
title="对话框标题"
|
|
99
|
+
visible={false}
|
|
100
|
+
zIndex={1000}
|
|
101
|
+
/>
|
|
102
|
+
</DialogComponent>
|
|
103
|
+
`;
|
|
104
|
+
|
|
105
|
+
exports[`模态框默认 1`] = `
|
|
106
|
+
<DialogComponent>
|
|
107
|
+
<Button
|
|
108
|
+
onClick={[Function]}
|
|
109
|
+
>
|
|
110
|
+
<Button
|
|
111
|
+
block={false}
|
|
112
|
+
disabled={false}
|
|
113
|
+
htmlType="button"
|
|
114
|
+
onClick={[Function]}
|
|
115
|
+
onMouseDown={[Function]}
|
|
116
|
+
onMouseEnter={[Function]}
|
|
117
|
+
onMouseLeave={[Function]}
|
|
118
|
+
prefixCls="semi-button"
|
|
119
|
+
size="default"
|
|
120
|
+
theme="light"
|
|
121
|
+
type="primary"
|
|
122
|
+
>
|
|
123
|
+
<button
|
|
124
|
+
aria-disabled={false}
|
|
125
|
+
className="semi-button semi-button-primary semi-button-light"
|
|
126
|
+
disabled={false}
|
|
127
|
+
onClick={[Function]}
|
|
128
|
+
onMouseDown={[Function]}
|
|
129
|
+
onMouseEnter={[Function]}
|
|
130
|
+
onMouseLeave={[Function]}
|
|
131
|
+
type="button"
|
|
132
|
+
>
|
|
133
|
+
<span
|
|
134
|
+
className="semi-button-content"
|
|
135
|
+
onClick={[Function]}
|
|
136
|
+
x-semi-prop="children"
|
|
137
|
+
>
|
|
138
|
+
show dialog
|
|
139
|
+
</span>
|
|
140
|
+
</button>
|
|
141
|
+
</Button>
|
|
142
|
+
</Button>
|
|
143
|
+
<Button
|
|
144
|
+
onClick={[Function]}
|
|
145
|
+
>
|
|
146
|
+
<Button
|
|
147
|
+
block={false}
|
|
148
|
+
disabled={false}
|
|
149
|
+
htmlType="button"
|
|
150
|
+
onClick={[Function]}
|
|
151
|
+
onMouseDown={[Function]}
|
|
152
|
+
onMouseEnter={[Function]}
|
|
153
|
+
onMouseLeave={[Function]}
|
|
154
|
+
prefixCls="semi-button"
|
|
155
|
+
size="default"
|
|
156
|
+
theme="light"
|
|
157
|
+
type="primary"
|
|
158
|
+
>
|
|
159
|
+
<button
|
|
160
|
+
aria-disabled={false}
|
|
161
|
+
className="semi-button semi-button-primary semi-button-light"
|
|
162
|
+
disabled={false}
|
|
163
|
+
onClick={[Function]}
|
|
164
|
+
onMouseDown={[Function]}
|
|
165
|
+
onMouseEnter={[Function]}
|
|
166
|
+
onMouseLeave={[Function]}
|
|
167
|
+
type="button"
|
|
168
|
+
>
|
|
169
|
+
<span
|
|
170
|
+
className="semi-button-content"
|
|
171
|
+
onClick={[Function]}
|
|
172
|
+
x-semi-prop="children"
|
|
173
|
+
>
|
|
174
|
+
静态调用
|
|
175
|
+
</span>
|
|
176
|
+
</button>
|
|
177
|
+
</Button>
|
|
178
|
+
</Button>
|
|
179
|
+
<Modal
|
|
180
|
+
afterClose={[Function]}
|
|
181
|
+
cancelLoading={false}
|
|
182
|
+
centered={false}
|
|
183
|
+
closable={true}
|
|
184
|
+
closeOnEsc={true}
|
|
185
|
+
confirmLoading={false}
|
|
186
|
+
fullScreen={false}
|
|
187
|
+
hasCancel={true}
|
|
188
|
+
keepDOM={false}
|
|
189
|
+
lazyRender={true}
|
|
190
|
+
mask={true}
|
|
191
|
+
maskClosable={true}
|
|
192
|
+
maskFixed={false}
|
|
193
|
+
motion={true}
|
|
194
|
+
okType="primary"
|
|
195
|
+
onCancel={[Function]}
|
|
196
|
+
onOk={[Function]}
|
|
197
|
+
size="small"
|
|
198
|
+
title="对话框标题"
|
|
199
|
+
visible={false}
|
|
200
|
+
zIndex={1000}
|
|
201
|
+
/>
|
|
202
|
+
</DialogComponent>
|
|
203
|
+
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.1-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@babel/runtime-corejs3": "^7.15.4",
|
|
17
17
|
"@douyinfe/semi-animation": "2.12.0",
|
|
18
|
-
"@douyinfe/semi-animation-react": "2.
|
|
19
|
-
"@douyinfe/semi-foundation": "2.
|
|
20
|
-
"@douyinfe/semi-icons": "2.
|
|
18
|
+
"@douyinfe/semi-animation-react": "2.18.1-alpha.0",
|
|
19
|
+
"@douyinfe/semi-foundation": "2.18.1-alpha.0",
|
|
20
|
+
"@douyinfe/semi-icons": "2.18.1-alpha.0",
|
|
21
21
|
"@douyinfe/semi-illustrations": "2.15.0",
|
|
22
|
-
"@douyinfe/semi-theme-default": "2.
|
|
22
|
+
"@douyinfe/semi-theme-default": "2.18.1-alpha.0",
|
|
23
23
|
"async-validator": "^3.5.0",
|
|
24
24
|
"classnames": "^2.2.6",
|
|
25
25
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
],
|
|
67
67
|
"author": "",
|
|
68
68
|
"license": "MIT",
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "14883ac99b2f3c772b267d6d6ae5d5412cd3f9de",
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
72
72
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
73
73
|
"@babel/preset-env": "^7.15.8",
|
|
74
74
|
"@babel/preset-react": "^7.14.5",
|
|
75
|
-
"@douyinfe/semi-scss-compile": "2.
|
|
75
|
+
"@douyinfe/semi-scss-compile": "2.18.1-alpha.0",
|
|
76
76
|
"@storybook/addon-knobs": "^6.3.1",
|
|
77
77
|
"@types/lodash": "^4.14.176",
|
|
78
78
|
"@types/react": ">=16.0.0",
|
|
@@ -196,7 +196,7 @@ const RadioGroup1 = () => {
|
|
|
196
196
|
</div>
|
|
197
197
|
);
|
|
198
198
|
};
|
|
199
|
-
class
|
|
199
|
+
class RadioWithControlled extends React.Component {
|
|
200
200
|
constructor(props) {
|
|
201
201
|
super(props);
|
|
202
202
|
this.state = {
|
|
@@ -240,7 +240,7 @@ export const _RadioGroup = () => {
|
|
|
240
240
|
</RadioGroup>
|
|
241
241
|
<br />
|
|
242
242
|
value+onchange
|
|
243
|
-
<
|
|
243
|
+
<RadioWithControlled />
|
|
244
244
|
<br />
|
|
245
245
|
联动
|
|
246
246
|
<RadioGroup1 />
|