@king-design/react 3.3.1 → 3.3.2

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.
@@ -30,8 +30,7 @@ export default function ($props, $blocks, $__proto__) {
30
30
  ghost = _this$get.ghost;
31
31
  var _this$config = this.config,
32
32
  cls = _this$config.cls,
33
- k = _this$config.k,
34
- disableWave = _this$config.disableWave;
33
+ k = _this$config.k;
35
34
  var checked = this.isChecked();
36
35
  var isIcon = function isIcon(child) {
37
36
  return child.tag === Icon || child.className && child.className.indexOf('icon') > -1;
@@ -67,7 +66,7 @@ export default function ($props, $blocks, $__proto__) {
67
66
  var typeStyles = theme[type];
68
67
  var waveColor = typeStyles && typeStyles.borderColor || theme.primary.borderColor;
69
68
  return _$cc(Wave, {
70
- 'disabled': loading || disabled || type === 'none' || type === 'link' || disableWave,
69
+ 'disabled': loading || disabled || type === 'none' || type === 'link',
71
70
  'inset': type === 'flat' ? '-1px' : '-2px',
72
71
  'color': waveColor,
73
72
  'children': _$cc(DynamicButton, _extends({
@@ -22,9 +22,7 @@ export default function ($props, $blocks, $__proto__) {
22
22
  title = _this$get.title,
23
23
  rest = _objectWithoutPropertiesLoose(_this$get, _excluded);
24
24
  var isChecked = this.isChecked();
25
- var _this$config = this.config,
26
- k = _this$config.k,
27
- disableWave = _this$config.disableWave;
25
+ var k = this.config.k;
28
26
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-checkbox"] = true, _classNameObj[k + "-disabled"] = disabled, _classNameObj[k + "-checked"] = isChecked, _classNameObj[k + "-indeterminate"] = indeterminate, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
29
27
  var events = ['ev-click', 'ev-change', 'ev-mouseenter', 'ev-mouseleave'].reduce(function (memo, name) {
30
28
  if (rest[name]) {
@@ -47,7 +45,7 @@ export default function ($props, $blocks, $__proto__) {
47
45
  'ev-click': this.onClick,
48
46
  'ev-keypress': this.onKeypress
49
47
  }, events), [_$cc(Wave, {
50
- 'disabled': disabled || disableWave,
48
+ 'disabled': disabled,
51
49
  'inset': '-2px',
52
50
  'children': _$ce(2, 'span', _$cv('input', _extends({
53
51
  'type': 'checkbox',
@@ -58,9 +58,7 @@ export default function ($props, $blocks, $__proto__) {
58
58
  isFocus = _this$focusHook.isFocus,
59
59
  focusInputOnClick = _this$focusHook.focusInputOnClick;
60
60
  var isNotAutoRows = isStringOrNumber(rows) && rows !== 'auto';
61
- var _this$config = this.config,
62
- k = _this$config.k,
63
- disableWave = _this$config.disableWave;
61
+ var k = this.config.k;
64
62
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-input"] = true, _classNameObj[k + "-" + size] = size !== 'default', _classNameObj[k + "-group"] = $blocks.prepend || $blocks.append, _classNameObj[k + "-disabled"] = disabled, _classNameObj[k + "-clearable"] = clearable, _classNameObj[k + "-auto-width"] = autoWidth, _classNameObj[k + "-fluid"] = fluid, _classNameObj[k + "-stack-clear"] = stackClearIcon, _classNameObj[k + "-inline"] = inline, _classNameObj[k + "-flat"] = flat, _classNameObj[k + "-type-textarea"] = type === 'textarea', _classNameObj[k + "-focus"] = isFocus.value, _classNameObj[k + "-resize-" + resize] = type === 'textarea' && isNotAutoRows, _classNameObj[k + "-resize-none"] = type === 'textarea' && !isNotAutoRows, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
65
63
  var _this$showPassword = this.showPassword,
66
64
  isShowPassword = _this$showPassword.isShow,
@@ -98,7 +96,7 @@ export default function ($props, $blocks, $__proto__) {
98
96
  'children': function children(isInvalid) {
99
97
  var _$cn3, _$cn4;
100
98
  return _$cc(Wave, {
101
- 'disabled': waveDisabled || disabled || isInvalid || disableWave,
99
+ 'disabled': waveDisabled || disabled || isInvalid,
102
100
  'inset': '-2px',
103
101
  'children': _$ce(2, 'div', [$blocks.prefix ? _$ce(2, 'div', (_$blocks['prefix'] = function ($super) {
104
102
  return null;
@@ -22,9 +22,7 @@ export default function ($props, $blocks, $__proto__) {
22
22
  title = _this$get.title,
23
23
  rest = _objectWithoutPropertiesLoose(_this$get, _excluded);
24
24
  var isChecked = value === trueValue;
25
- var _this$config = this.config,
26
- k = _this$config.k,
27
- disableWave = _this$config.disableWave;
25
+ var k = this.config.k;
28
26
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-radio"] = true, _classNameObj[k + "-disabled"] = disabled, _classNameObj[k + "-checked"] = isChecked, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
29
27
 
30
28
  // let evClick;
@@ -49,7 +47,7 @@ export default function ($props, $blocks, $__proto__) {
49
47
  'ev-keypress': this.onKeypress,
50
48
  'ev-click': this.fixClick
51
49
  }), [_$cc(Wave, {
52
- 'disabled': disabled || disableWave,
50
+ 'disabled': disabled,
53
51
  'inset': '-2px',
54
52
  'children': _$ce(2, 'span', _$cv('input', _extends({}, getRestProps(this, rest), {
55
53
  'type': 'radio',
@@ -45,9 +45,7 @@ export default function ($props, $blocks, $__proto__) {
45
45
  flat = _flatInstanceProperty(_this$get),
46
46
  nowrap = _this$get.nowrap,
47
47
  draggable = _this$get.draggable;
48
- var _this$config = this.config,
49
- k = _this$config.k,
50
- disableWave = _this$config.disableWave;
48
+ var k = this.config.k;
51
49
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-select"] = true, _classNameObj[k + "-disabled"] = disabled, _classNameObj[k + "-" + size] = size !== 'default', _classNameObj[k + "-fluid"] = fluid, _classNameObj[k + "-inline"] = inline, _classNameObj[k + "-flat"] = flat, _classNameObj[k + "-nowrap"] = nowrap, _classNameObj[className] = className, _classNameObj[$props.className] = $props.className, _classNameObj[makeStyles(k)] = true, _classNameObj);
52
50
  var placeholder = this.getPlaceholder();
53
51
  var label = this.getLabel();
@@ -79,7 +77,7 @@ export default function ($props, $blocks, $__proto__) {
79
77
  'children': function children(isInvalid) {
80
78
  var _$cn2;
81
79
  return _$cc(Wave, {
82
- 'disabled': disabled || isInvalid || inline || disableWave,
80
+ 'disabled': disabled || isInvalid || inline,
83
81
  'inset': '-2px',
84
82
  'children': _$cc(Dropdown, {
85
83
  'trigger': 'click',
@@ -62,6 +62,8 @@ export var Wave = /*#__PURE__*/function (_Component) {
62
62
  var _this$get2 = this.get(),
63
63
  disabled = _this$get2.disabled;
64
64
  var node = e.target;
65
+ // configProvider全局禁用动效
66
+ if (this.config.disableWave) return;
65
67
  // 点击输入框中的icon时,此时输入框不需要动效
66
68
  var isInput = instance.classList.contains('k-input-wrapper');
67
69
  if (disabled || isInput && node.classList.contains(this.config.cls('icon'))) return;
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @king-design v3.3.0
2
+ * @king-design v3.3.2
3
3
  *
4
4
  * Copyright (c) Kingsoft Cloud
5
5
  * Released under the MIT License
@@ -63,7 +63,7 @@ export * from './components/treeSelect';
63
63
  export * from './components/upload';
64
64
  export * from './components/view';
65
65
  export * from './components/wave';
66
- export declare const version = "3.3.0";
66
+ export declare const version = "3.3.2";
67
67
 
68
68
 
69
69
  export {normalize} from 'intact-react';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @king-design v3.3.0
2
+ * @king-design v3.3.2
3
3
  *
4
4
  * Copyright (c) Kingsoft Cloud
5
5
  * Released under the MIT License
@@ -64,7 +64,7 @@ export * from './components/treeSelect';
64
64
  export * from './components/upload';
65
65
  export * from './components/view';
66
66
  export * from './components/wave';
67
- export var version = '3.3.0';
67
+ export var version = '3.3.2';
68
68
  /* generate end */
69
69
 
70
70
  export {normalize} from 'intact-react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@king-design/react",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "King-Design UI components for React.",
5
5
  "keywords": [
6
6
  "component",