@douyinfe/semi-ui 2.13.0-beta.0 → 2.14.0-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/form/field.tsx CHANGED
@@ -7,7 +7,7 @@ import Input from '../input/index';
7
7
  import TextArea from '../input/textarea';
8
8
  import InputNumber from '../inputNumber/index';
9
9
  import Select from '../select/index';
10
- import { Checkbox } from '../checkbox/index';
10
+ import Checkbox from '../checkbox/index';
11
11
  import CheckboxGroup from '../checkbox/checkboxGroup';
12
12
  import { Radio } from '../radio/index';
13
13
  import RadioGroup from '../radio/radioGroup';
@@ -125,7 +125,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
125
125
  onBlur?: (e: React.FocusEvent<Element, Element>) => void;
126
126
  onListScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
127
127
  children?: React.ReactNode;
128
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
128
+ } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
129
129
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
130
130
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
131
131
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -73,7 +73,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
73
73
  onBlur?: (e: import("react").FocusEvent<Element, Element>) => void;
74
74
  onListScroll?: (e: import("react").UIEvent<HTMLDivElement, UIEvent>) => void;
75
75
  children?: import("react").ReactNode;
76
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
76
+ } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
77
77
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
78
78
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
79
79
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
@@ -20,7 +20,7 @@ var _index2 = _interopRequireDefault(require("../inputNumber/index"));
20
20
 
21
21
  var _index3 = _interopRequireDefault(require("../select/index"));
22
22
 
23
- var _index4 = require("../checkbox/index");
23
+ var _index4 = _interopRequireDefault(require("../checkbox/index"));
24
24
 
25
25
  var _checkboxGroup = _interopRequireDefault(require("../checkbox/checkboxGroup"));
26
26
 
@@ -69,7 +69,7 @@ FormSelect.Option = _index3.default.Option;
69
69
  FormSelect.OptGroup = _index3.default.OptGroup;
70
70
  const FormCheckboxGroup = (0, _withField.default)(_checkboxGroup.default);
71
71
  exports.FormCheckboxGroup = FormCheckboxGroup;
72
- const FormCheckbox = (0, _withField.default)(_index4.Checkbox, {
72
+ const FormCheckbox = (0, _withField.default)(_index4.default, {
73
73
  valueKey: 'checked',
74
74
  valuePath: 'target.checked',
75
75
  shouldInject: false
@@ -42,7 +42,7 @@ var _dropdown = _interopRequireDefault(require("../dropdown"));
42
42
 
43
43
  var _radio = require("../radio");
44
44
 
45
- var _checkbox = require("../checkbox");
45
+ var _checkbox = _interopRequireDefault(require("../checkbox"));
46
46
 
47
47
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
48
48
 
@@ -126,7 +126,7 @@ function renderDropdown() {
126
126
  }) : /*#__PURE__*/_react.default.createElement(_dropdown.default.Item, {
127
127
  key: key,
128
128
  onClick: changeFn
129
- }, filterMultiple ? /*#__PURE__*/_react.default.createElement(_checkbox.Checkbox, {
129
+ }, filterMultiple ? /*#__PURE__*/_react.default.createElement(_checkbox.default, {
130
130
  checked: checked
131
131
  }, text) : /*#__PURE__*/_react.default.createElement(_radio.Radio, {
132
132
  checked: checked
@@ -26,7 +26,7 @@ var _constants = require("@douyinfe/semi-foundation/lib/cjs/table/constants");
26
26
 
27
27
  var _tableSelectionCellFoundation = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/table/tableSelectionCellFoundation"));
28
28
 
29
- var _checkbox = require("../checkbox");
29
+ var _checkbox = _interopRequireDefault(require("../checkbox"));
30
30
 
31
31
  /* eslint-disable max-len */
32
32
 
@@ -78,7 +78,7 @@ class TableSelectionCell extends _baseComponent.default {
78
78
  }, className);
79
79
  return /*#__PURE__*/_react.default.createElement("span", {
80
80
  className: wrapCls
81
- }, /*#__PURE__*/_react.default.createElement(_checkbox.Checkbox, (0, _assign.default)({
81
+ }, /*#__PURE__*/_react.default.createElement(_checkbox.default, (0, _assign.default)({
82
82
  "aria-label": ariaLabel
83
83
  }, checkboxProps)));
84
84
  }
@@ -62,9 +62,9 @@ var _baseComponent = _interopRequireDefault(require("../_base/baseComponent"));
62
62
 
63
63
  var _localeConsumer = _interopRequireDefault(require("../locale/localeConsumer"));
64
64
 
65
- var _index = require("../checkbox/index");
65
+ var _checkbox = _interopRequireDefault(require("../checkbox"));
66
66
 
67
- var _index2 = _interopRequireDefault(require("../input/index"));
67
+ var _index = _interopRequireDefault(require("../input/index"));
68
68
 
69
69
  var _spin = _interopRequireDefault(require("../spin"));
70
70
 
@@ -212,7 +212,7 @@ class Transfer extends _baseComponent.default {
212
212
  role: "search",
213
213
  "aria-label": "Transfer filter",
214
214
  className: "".concat(prefixcls, "-filter")
215
- }, /*#__PURE__*/_react.default.createElement(_index2.default, (0, _assign.default)({
215
+ }, /*#__PURE__*/_react.default.createElement(_index.default, (0, _assign.default)({
216
216
  prefix: /*#__PURE__*/_react.default.createElement(_semiIcons.IconSearch, null),
217
217
  placeholder: locale.placeholder,
218
218
  showClear: true,
@@ -273,7 +273,7 @@ class Transfer extends _baseComponent.default {
273
273
  ["".concat(prefixcls, "-item")]: true,
274
274
  ["".concat(prefixcls, "-item-disabled")]: item.disabled
275
275
  });
276
- return /*#__PURE__*/_react.default.createElement(_index.Checkbox, {
276
+ return /*#__PURE__*/_react.default.createElement(_checkbox.default, {
277
277
  key: index,
278
278
  disabled: item.disabled || disabled,
279
279
  className: leftItemCls,
@@ -46,7 +46,7 @@ var _isEnterPress = _interopRequireDefault(require("@douyinfe/semi-foundation/li
46
46
 
47
47
  var _semiIcons = require("@douyinfe/semi-icons");
48
48
 
49
- var _checkbox = require("../checkbox");
49
+ var _checkbox = _interopRequireDefault(require("../checkbox"));
50
50
 
51
51
  var _treeContext = _interopRequireDefault(require("./treeContext"));
52
52
 
@@ -355,7 +355,7 @@ class TreeNode extends _react.PureComponent {
355
355
  role: 'none',
356
356
  onClick: this.onCheck,
357
357
  onKeyPress: this.handleCheckEnterPress
358
- }, /*#__PURE__*/_react.default.createElement(_checkbox.Checkbox, {
358
+ }, /*#__PURE__*/_react.default.createElement(_checkbox.default, {
359
359
  "aria-label": 'Toggle the checked state of checkbox',
360
360
  indeterminate: halfChecked,
361
361
  checked: checked,
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
37
37
  underline: PropTypes.Requireable<boolean>;
38
38
  strong: PropTypes.Requireable<boolean>;
39
39
  type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
40
- heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 5 | 6>;
40
+ heading: PropTypes.Requireable<4 | 2 | 1 | 3 | 5 | 6>;
41
41
  style: PropTypes.Requireable<object>;
42
42
  className: PropTypes.Requireable<string>;
43
43
  component: PropTypes.Requireable<string>;
@@ -125,7 +125,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
125
125
  onBlur?: (e: React.FocusEvent<Element, Element>) => void;
126
126
  onListScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
127
127
  children?: React.ReactNode;
128
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
128
+ } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
129
129
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
130
130
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
131
131
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -73,7 +73,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
73
73
  onBlur?: (e: import("react").FocusEvent<Element, Element>) => void;
74
74
  onListScroll?: (e: import("react").UIEvent<HTMLDivElement, UIEvent>) => void;
75
75
  children?: import("react").ReactNode;
76
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
76
+ } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
77
77
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
78
78
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
79
79
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
@@ -5,7 +5,7 @@ import Input from '../input/index';
5
5
  import TextArea from '../input/textarea';
6
6
  import InputNumber from '../inputNumber/index';
7
7
  import Select from '../select/index';
8
- import { Checkbox } from '../checkbox/index';
8
+ import Checkbox from '../checkbox/index';
9
9
  import CheckboxGroup from '../checkbox/checkboxGroup';
10
10
  import { Radio } from '../radio/index';
11
11
  import RadioGroup from '../radio/radioGroup';
@@ -16,7 +16,7 @@ import { IconFilter } from '@douyinfe/semi-icons';
16
16
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/table/constants';
17
17
  import Dropdown from '../dropdown';
18
18
  import { Radio } from '../radio';
19
- import { Checkbox } from '../checkbox';
19
+ import Checkbox from '../checkbox';
20
20
 
21
21
  function renderDropdown() {
22
22
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -8,7 +8,7 @@ import classnames from 'classnames';
8
8
  import PropTypes from 'prop-types';
9
9
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/table/constants';
10
10
  import TableSelectionCellFoundation from '@douyinfe/semi-foundation/lib/es/table/tableSelectionCellFoundation';
11
- import { Checkbox } from '../checkbox';
11
+ import Checkbox from '../checkbox';
12
12
  /**
13
13
  * render selection cell
14
14
  */
@@ -24,7 +24,7 @@ import { cssClasses, strings } from '@douyinfe/semi-foundation/lib/es/transfer/c
24
24
  import '@douyinfe/semi-foundation/lib/es/transfer/transfer.css';
25
25
  import BaseComponent from '../_base/baseComponent';
26
26
  import LocaleConsumer from '../locale/localeConsumer';
27
- import { Checkbox } from '../checkbox/index';
27
+ import Checkbox from '../checkbox';
28
28
  import Input from '../input/index';
29
29
  import Spin from '../spin';
30
30
  import Button from '../button';
@@ -26,7 +26,7 @@ import PropTypes from 'prop-types';
26
26
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/tree/constants';
27
27
  import isEnterPress from '@douyinfe/semi-foundation/lib/es/utils/isEnterPress';
28
28
  import { IconTreeTriangleDown, IconFile, IconFolder, IconFolderOpen } from '@douyinfe/semi-icons';
29
- import { Checkbox } from '../checkbox';
29
+ import Checkbox from '../checkbox';
30
30
  import TreeContext from './treeContext';
31
31
  import Spin from '../spin';
32
32
  const prefixcls = cssClasses.PREFIX_OPTION;
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
37
37
  underline: PropTypes.Requireable<boolean>;
38
38
  strong: PropTypes.Requireable<boolean>;
39
39
  type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
40
- heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 5 | 6>;
40
+ heading: PropTypes.Requireable<4 | 2 | 1 | 3 | 5 | 6>;
41
41
  style: PropTypes.Requireable<object>;
42
42
  className: PropTypes.Requireable<string>;
43
43
  component: PropTypes.Requireable<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.13.0-beta.0",
3
+ "version": "2.14.0-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.13.0-beta.0",
19
- "@douyinfe/semi-foundation": "2.13.0-beta.0",
20
- "@douyinfe/semi-icons": "2.13.0-beta.0",
21
- "@douyinfe/semi-illustrations": "2.13.0-beta.0",
22
- "@douyinfe/semi-theme-default": "2.13.0-beta.0",
18
+ "@douyinfe/semi-animation-react": "2.14.0-alpha.0",
19
+ "@douyinfe/semi-foundation": "2.14.0-alpha.0",
20
+ "@douyinfe/semi-icons": "2.14.0-alpha.0",
21
+ "@douyinfe/semi-illustrations": "2.14.0-alpha.0",
22
+ "@douyinfe/semi-theme-default": "2.14.0-alpha.0",
23
23
  "@types/react-window": "^1.8.2",
24
24
  "async-validator": "^3.5.0",
25
25
  "classnames": "^2.2.6",
@@ -69,13 +69,13 @@
69
69
  ],
70
70
  "author": "",
71
71
  "license": "MIT",
72
- "gitHead": "3b7c0e399103443a467eca0ff77f233a11346c99",
72
+ "gitHead": "f9b3fe93f63ef8686face2ce7a647bd2f2be3411",
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.13.0-beta.0",
78
+ "@douyinfe/semi-scss-compile": "2.14.0-alpha.0",
79
79
  "@storybook/addon-knobs": "^6.3.1",
80
80
  "@types/lodash": "^4.14.176",
81
81
  "babel-loader": "^8.2.2",
@@ -10,7 +10,7 @@ import { cssClasses } from '@douyinfe/semi-foundation/table/constants';
10
10
  import Dropdown, { DropdownProps } from '../dropdown';
11
11
  import { Trigger, Position } from '../tooltip';
12
12
  import { Radio } from '../radio';
13
- import { Checkbox } from '../checkbox';
13
+ import Checkbox from '../checkbox';
14
14
  import {
15
15
  FilterIcon,
16
16
  Filter,
@@ -8,7 +8,7 @@ import { noop } from 'lodash';
8
8
  import { cssClasses } from '@douyinfe/semi-foundation/table/constants';
9
9
  import TableSelectionCellFoundation, { TableSelectionCellAdapter, TableSelectionCellEvent } from '@douyinfe/semi-foundation/table/tableSelectionCellFoundation';
10
10
 
11
- import { Checkbox, CheckboxEvent, CheckboxProps } from '../checkbox';
11
+ import Checkbox, { CheckboxEvent, CheckboxProps } from '../checkbox';
12
12
 
13
13
  export interface TableSelectionCellProps {
14
14
  columnTitle?: string; // TODO: future api
@@ -10,7 +10,7 @@ import '@douyinfe/semi-foundation/transfer/transfer.scss';
10
10
  import BaseComponent from '../_base/baseComponent';
11
11
  import LocaleConsumer from '../locale/localeConsumer';
12
12
  import { Locale } from '../locale/interface';
13
- import { Checkbox } from '../checkbox/index';
13
+ import Checkbox from '../checkbox';
14
14
  import Input, { InputProps } from '../input/index';
15
15
  import Spin from '../spin';
16
16
  import Button from '../button';
package/tree/treeNode.tsx CHANGED
@@ -5,7 +5,7 @@ import { cssClasses } from '@douyinfe/semi-foundation/tree/constants';
5
5
  import isEnterPress from '@douyinfe/semi-foundation/utils/isEnterPress';
6
6
  import { debounce, isFunction, isString, get, isEmpty } from 'lodash';
7
7
  import { IconTreeTriangleDown, IconFile, IconFolder, IconFolderOpen } from '@douyinfe/semi-icons';
8
- import { Checkbox } from '../checkbox';
8
+ import Checkbox from '../checkbox';
9
9
  import TreeContext, { TreeContextValue } from './treeContext';
10
10
  import Spin from '../spin';
11
11
  import { TreeNodeProps, TreeNodeState } from './interface';