@douyinfe/semi-ui 2.21.0-beta.1 → 2.21.1
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/dist/css/semi.css +7 -7
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +22 -20
- 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/lib/cjs/form/interface.d.ts +1 -1
- package/lib/cjs/image/image.d.ts +1 -1
- package/lib/cjs/image/image.js +2 -2
- package/lib/cjs/image/index.d.ts +1 -0
- package/lib/cjs/image/index.js +2 -0
- package/lib/cjs/image/preview.d.ts +1 -0
- package/lib/cjs/image/preview.js +2 -0
- package/lib/cjs/modal/ModalContent.js +2 -2
- package/lib/cjs/select/index.d.ts +2 -2
- package/lib/cjs/select/index.js +2 -2
- package/lib/es/form/interface.d.ts +1 -1
- package/lib/es/image/image.d.ts +1 -1
- package/lib/es/image/image.js +1 -1
- package/lib/es/image/index.d.ts +1 -0
- package/lib/es/image/index.js +1 -0
- package/lib/es/image/preview.d.ts +1 -0
- package/lib/es/image/preview.js +1 -0
- package/lib/es/modal/ModalContent.js +2 -2
- package/lib/es/select/index.d.ts +2 -2
- package/lib/es/select/index.js +2 -2
- package/package.json +7 -7
|
@@ -10,7 +10,7 @@ import { CheckboxProps } from '../checkbox/index';
|
|
|
10
10
|
import { RadioProps } from '../radio/index';
|
|
11
11
|
import { ReactFieldError as FieldError } from './errorMessage';
|
|
12
12
|
import { LabelProps } from './label';
|
|
13
|
-
export { FormState, FormApi, WithFieldOption };
|
|
13
|
+
export { FormState, FormApi, WithFieldOption, RuleItem };
|
|
14
14
|
export declare type CommonFieldProps = {
|
|
15
15
|
/** Field is required (except Form. Checkbox within the Group, Form. Radio) */
|
|
16
16
|
field: string;
|
package/lib/cjs/image/image.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import React from "react";
|
|
|
2
2
|
import BaseComponent from "../_base/baseComponent";
|
|
3
3
|
import { ImageProps, ImageStates } from "./interface";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import '@douyinfe/semi-foundation/lib/cjs/image/image.css';
|
|
6
5
|
import { PreviewContextProps } from "./previewContext";
|
|
7
6
|
import ImageFoundation, { ImageAdapter } from '@douyinfe/semi-foundation/lib/cjs/image/imageFoundation';
|
|
7
|
+
import '@douyinfe/semi-foundation/lib/cjs/image/image.css';
|
|
8
8
|
export default class Image extends BaseComponent<ImageProps, ImageStates> {
|
|
9
9
|
static isSemiImage: boolean;
|
|
10
10
|
static contextType: React.Context<PreviewContextProps>;
|
package/lib/cjs/image/image.js
CHANGED
|
@@ -21,8 +21,6 @@ var _semiIcons = require("@douyinfe/semi-icons");
|
|
|
21
21
|
|
|
22
22
|
var _previewInner = _interopRequireDefault(require("./previewInner"));
|
|
23
23
|
|
|
24
|
-
require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
|
|
25
|
-
|
|
26
24
|
var _previewContext = require("./previewContext");
|
|
27
25
|
|
|
28
26
|
var _imageFoundation = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/image/imageFoundation"));
|
|
@@ -31,6 +29,8 @@ var _localeConsumer = _interopRequireDefault(require("../locale/localeConsumer")
|
|
|
31
29
|
|
|
32
30
|
var _skeleton = _interopRequireDefault(require("../skeleton"));
|
|
33
31
|
|
|
32
|
+
require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
|
|
33
|
+
|
|
34
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
35
|
|
|
36
36
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
package/lib/cjs/image/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Image from "./image";
|
|
2
2
|
import PreviewInner from "./previewInner";
|
|
3
3
|
import Preview from "./preview";
|
|
4
|
+
import '@douyinfe/semi-foundation/lib/cjs/image/image.css';
|
|
4
5
|
export default Image;
|
|
5
6
|
export { PreviewInner, Preview, };
|
|
6
7
|
export { ImageProps, PreviewImageProps, PreviewProps, } from "./interface";
|
package/lib/cjs/image/index.js
CHANGED
|
@@ -23,6 +23,8 @@ var _previewInner = _interopRequireDefault(require("./previewInner"));
|
|
|
23
23
|
|
|
24
24
|
var _preview = _interopRequireDefault(require("./preview"));
|
|
25
25
|
|
|
26
|
+
require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
28
30
|
var _default = _image.default;
|
|
@@ -4,6 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { PreviewProps, PreviewState } from "./interface";
|
|
5
5
|
import PreviewInner from "./previewInner";
|
|
6
6
|
import PreviewFoundation from '@douyinfe/semi-foundation/lib/cjs/image/previewFoundation';
|
|
7
|
+
import '@douyinfe/semi-foundation/lib/cjs/image/image.css';
|
|
7
8
|
export default class Preview extends BaseComponent<PreviewProps, PreviewState> {
|
|
8
9
|
static propTypes: {
|
|
9
10
|
style: PropTypes.Requireable<object>;
|
package/lib/cjs/image/preview.js
CHANGED
|
@@ -23,6 +23,8 @@ var _uuid = require("@douyinfe/semi-foundation/lib/cjs/utils/uuid");
|
|
|
23
23
|
|
|
24
24
|
var _constants = require("@douyinfe/semi-foundation/lib/cjs/image/constants");
|
|
25
25
|
|
|
26
|
+
require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
28
30
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
@@ -267,12 +267,12 @@ class ModalContent extends _baseComponent.default {
|
|
|
267
267
|
},
|
|
268
268
|
addKeyDownEventListener: () => {
|
|
269
269
|
if (this.props.closeOnEsc) {
|
|
270
|
-
document.addEventListener('keydown', this.foundation.handleKeyDown
|
|
270
|
+
document.addEventListener('keydown', this.foundation.handleKeyDown);
|
|
271
271
|
}
|
|
272
272
|
},
|
|
273
273
|
removeKeyDownEventListener: () => {
|
|
274
274
|
if (this.props.closeOnEsc) {
|
|
275
|
-
document.removeEventListener('keydown', this.foundation.handleKeyDown
|
|
275
|
+
document.removeEventListener('keydown', this.foundation.handleKeyDown);
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
getMouseState: () => this.state.dialogMouseDown,
|
|
@@ -6,9 +6,9 @@ import BaseComponent, { ValidateStatus } from '../_base/baseComponent';
|
|
|
6
6
|
import { InputProps } from '../input/index';
|
|
7
7
|
import Option, { OptionProps } from './option';
|
|
8
8
|
import OptionGroup from './optionGroup';
|
|
9
|
-
import { Subtract } from 'utility-types';
|
|
10
9
|
import '@douyinfe/semi-foundation/lib/cjs/select/select.css';
|
|
11
|
-
import { Position, TooltipProps } from '../tooltip';
|
|
10
|
+
import type { Position, TooltipProps } from '../tooltip';
|
|
11
|
+
import type { Subtract } from 'utility-types';
|
|
12
12
|
export type { OptionProps } from './option';
|
|
13
13
|
export type { OptionGroupProps } from './optionGroup';
|
|
14
14
|
export type { VirtualRowProps } from './virtualRow';
|
package/lib/cjs/select/index.js
CHANGED
|
@@ -679,7 +679,7 @@ class Select extends _baseComponent.default {
|
|
|
679
679
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
680
680
|
_react.default.createElement("div", {
|
|
681
681
|
id: "".concat(prefixcls, "-").concat(this.selectOptionListID),
|
|
682
|
-
className: dropdownClassName,
|
|
682
|
+
className: (0, _classnames.default)("".concat(prefixcls, "-option-list-wrapper"), dropdownClassName),
|
|
683
683
|
style: style,
|
|
684
684
|
ref: this.setOptionContainerEl,
|
|
685
685
|
onKeyDown: e => this.foundation.handleContainerKeyDown(e)
|
|
@@ -1190,7 +1190,7 @@ Select.defaultProps = {
|
|
|
1190
1190
|
onBlur: _noop2.default,
|
|
1191
1191
|
onClear: _noop2.default,
|
|
1192
1192
|
onListScroll: _noop2.default,
|
|
1193
|
-
maxHeight:
|
|
1193
|
+
maxHeight: _constants.numbers.LIST_HEIGHT,
|
|
1194
1194
|
dropdownMatchSelectWidth: true,
|
|
1195
1195
|
defaultActiveFirstOption: true,
|
|
1196
1196
|
showArrow: true,
|
|
@@ -10,7 +10,7 @@ import { CheckboxProps } from '../checkbox/index';
|
|
|
10
10
|
import { RadioProps } from '../radio/index';
|
|
11
11
|
import { ReactFieldError as FieldError } from './errorMessage';
|
|
12
12
|
import { LabelProps } from './label';
|
|
13
|
-
export { FormState, FormApi, WithFieldOption };
|
|
13
|
+
export { FormState, FormApi, WithFieldOption, RuleItem };
|
|
14
14
|
export declare type CommonFieldProps = {
|
|
15
15
|
/** Field is required (except Form. Checkbox within the Group, Form. Radio) */
|
|
16
16
|
field: string;
|
package/lib/es/image/image.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import React from "react";
|
|
|
2
2
|
import BaseComponent from "../_base/baseComponent";
|
|
3
3
|
import { ImageProps, ImageStates } from "./interface";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
6
5
|
import { PreviewContextProps } from "./previewContext";
|
|
7
6
|
import ImageFoundation, { ImageAdapter } from '@douyinfe/semi-foundation/lib/es/image/imageFoundation';
|
|
7
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
8
8
|
export default class Image extends BaseComponent<ImageProps, ImageStates> {
|
|
9
9
|
static isSemiImage: boolean;
|
|
10
10
|
static contextType: React.Context<PreviewContextProps>;
|
package/lib/es/image/image.js
CHANGED
|
@@ -10,11 +10,11 @@ import { cssClasses } from '@douyinfe/semi-foundation/lib/es/image/constants';
|
|
|
10
10
|
import cls from "classnames";
|
|
11
11
|
import { IconUploadError, IconEyeOpened } from "@douyinfe/semi-icons";
|
|
12
12
|
import PreviewInner from "./previewInner";
|
|
13
|
-
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
14
13
|
import { PreviewContext } from "./previewContext";
|
|
15
14
|
import ImageFoundation from '@douyinfe/semi-foundation/lib/es/image/imageFoundation';
|
|
16
15
|
import LocaleConsumer from "../locale/localeConsumer";
|
|
17
16
|
import Skeleton from "../skeleton";
|
|
17
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
18
18
|
const prefixCls = cssClasses.PREFIX;
|
|
19
19
|
export default class Image extends BaseComponent {
|
|
20
20
|
constructor(props) {
|
package/lib/es/image/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Image from "./image";
|
|
2
2
|
import PreviewInner from "./previewInner";
|
|
3
3
|
import Preview from "./preview";
|
|
4
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
4
5
|
export default Image;
|
|
5
6
|
export { PreviewInner, Preview, };
|
|
6
7
|
export { ImageProps, PreviewImageProps, PreviewProps, } from "./interface";
|
package/lib/es/image/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { PreviewProps, PreviewState } from "./interface";
|
|
5
5
|
import PreviewInner from "./previewInner";
|
|
6
6
|
import PreviewFoundation from '@douyinfe/semi-foundation/lib/es/image/previewFoundation';
|
|
7
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
7
8
|
export default class Preview extends BaseComponent<PreviewProps, PreviewState> {
|
|
8
9
|
static propTypes: {
|
|
9
10
|
style: PropTypes.Requireable<object>;
|
package/lib/es/image/preview.js
CHANGED
|
@@ -19,6 +19,7 @@ import PreviewInner from "./previewInner";
|
|
|
19
19
|
import PreviewFoundation from '@douyinfe/semi-foundation/lib/es/image/previewFoundation';
|
|
20
20
|
import { getUuidShort } from '@douyinfe/semi-foundation/lib/es/utils/uuid';
|
|
21
21
|
import { cssClasses } from '@douyinfe/semi-foundation/lib/es/image/constants';
|
|
22
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
22
23
|
const prefixCls = cssClasses.PREFIX;
|
|
23
24
|
export default class Preview extends BaseComponent {
|
|
24
25
|
constructor(props) {
|
|
@@ -242,12 +242,12 @@ export default class ModalContent extends BaseComponent {
|
|
|
242
242
|
},
|
|
243
243
|
addKeyDownEventListener: () => {
|
|
244
244
|
if (this.props.closeOnEsc) {
|
|
245
|
-
document.addEventListener('keydown', this.foundation.handleKeyDown
|
|
245
|
+
document.addEventListener('keydown', this.foundation.handleKeyDown);
|
|
246
246
|
}
|
|
247
247
|
},
|
|
248
248
|
removeKeyDownEventListener: () => {
|
|
249
249
|
if (this.props.closeOnEsc) {
|
|
250
|
-
document.removeEventListener('keydown', this.foundation.handleKeyDown
|
|
250
|
+
document.removeEventListener('keydown', this.foundation.handleKeyDown);
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
getMouseState: () => this.state.dialogMouseDown,
|
package/lib/es/select/index.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import BaseComponent, { ValidateStatus } from '../_base/baseComponent';
|
|
|
6
6
|
import { InputProps } from '../input/index';
|
|
7
7
|
import Option, { OptionProps } from './option';
|
|
8
8
|
import OptionGroup from './optionGroup';
|
|
9
|
-
import { Subtract } from 'utility-types';
|
|
10
9
|
import '@douyinfe/semi-foundation/lib/es/select/select.css';
|
|
11
|
-
import { Position, TooltipProps } from '../tooltip';
|
|
10
|
+
import type { Position, TooltipProps } from '../tooltip';
|
|
11
|
+
import type { Subtract } from 'utility-types';
|
|
12
12
|
export type { OptionProps } from './option';
|
|
13
13
|
export type { OptionGroupProps } from './optionGroup';
|
|
14
14
|
export type { VirtualRowProps } from './virtualRow';
|
package/lib/es/select/index.js
CHANGED
|
@@ -633,7 +633,7 @@ class Select extends BaseComponent {
|
|
|
633
633
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
634
634
|
React.createElement("div", {
|
|
635
635
|
id: "".concat(prefixcls, "-").concat(this.selectOptionListID),
|
|
636
|
-
className: dropdownClassName,
|
|
636
|
+
className: cls("".concat(prefixcls, "-option-list-wrapper"), dropdownClassName),
|
|
637
637
|
style: style,
|
|
638
638
|
ref: this.setOptionContainerEl,
|
|
639
639
|
onKeyDown: e => this.foundation.handleContainerKeyDown(e)
|
|
@@ -1145,7 +1145,7 @@ Select.defaultProps = {
|
|
|
1145
1145
|
onBlur: _noop,
|
|
1146
1146
|
onClear: _noop,
|
|
1147
1147
|
onListScroll: _noop,
|
|
1148
|
-
maxHeight:
|
|
1148
|
+
maxHeight: numbers.LIST_HEIGHT,
|
|
1149
1149
|
dropdownMatchSelectWidth: true,
|
|
1150
1150
|
defaultActiveFirstOption: true,
|
|
1151
1151
|
showArrow: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@douyinfe/semi-animation": "2.12.0",
|
|
21
|
-
"@douyinfe/semi-animation-react": "2.21.
|
|
22
|
-
"@douyinfe/semi-foundation": "2.21.
|
|
23
|
-
"@douyinfe/semi-icons": "2.21.
|
|
21
|
+
"@douyinfe/semi-animation-react": "2.21.1",
|
|
22
|
+
"@douyinfe/semi-foundation": "2.21.1",
|
|
23
|
+
"@douyinfe/semi-icons": "2.21.1",
|
|
24
24
|
"@douyinfe/semi-illustrations": "2.15.0",
|
|
25
|
-
"@douyinfe/semi-theme-default": "2.21.
|
|
25
|
+
"@douyinfe/semi-theme-default": "2.21.1",
|
|
26
26
|
"async-validator": "^3.5.0",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "ae80a064a1525cbc26fe498ac236beb0d075e362",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
76
76
|
"@babel/preset-env": "^7.15.8",
|
|
77
77
|
"@babel/preset-react": "^7.14.5",
|
|
78
|
-
"@douyinfe/semi-scss-compile": "2.21.
|
|
78
|
+
"@douyinfe/semi-scss-compile": "2.21.1",
|
|
79
79
|
"@storybook/addon-knobs": "^6.3.1",
|
|
80
80
|
"@types/lodash": "^4.14.176",
|
|
81
81
|
"@types/react": ">=16.0.0",
|