@king-design/react 3.2.2-beta.0 → 3.3.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.
Files changed (63) hide show
  1. package/__tests__/__snapshots__/React Demos.md +61 -15
  2. package/components/breadcrumb/index.js +1 -1
  3. package/components/breadcrumb/index.vdt.js +6 -2
  4. package/components/button/index.vdt.js +3 -2
  5. package/components/cascader/index.js +2 -1
  6. package/components/cascader/index.spec.js +32 -0
  7. package/components/cascader/index.vdt.js +8 -3
  8. package/components/cascader/styles.js +1 -1
  9. package/components/cascader/useFilterable.d.ts +2 -1
  10. package/components/cascader/useFilterable.js +15 -4
  11. package/components/checkbox/index.vdt.js +4 -2
  12. package/components/config/index.d.ts +2 -0
  13. package/components/config/index.js +3 -0
  14. package/components/datepicker/index.d.ts +1 -0
  15. package/components/datepicker/index.js +2 -0
  16. package/components/dialog/base.d.ts +1 -0
  17. package/components/divider/index.d.ts +14 -0
  18. package/components/divider/index.js +38 -0
  19. package/components/divider/index.spec.d.ts +1 -0
  20. package/components/divider/index.spec.js +1 -0
  21. package/components/divider/index.vdt.js +31 -0
  22. package/components/divider/styles.d.ts +5 -0
  23. package/components/divider/styles.js +35 -0
  24. package/components/dropdown/dropdown.js +2 -2
  25. package/components/dropdown/menu.js +1 -1
  26. package/components/ellipsis/index.d.ts +16 -0
  27. package/components/ellipsis/index.js +36 -0
  28. package/components/ellipsis/index.spec.d.ts +1 -0
  29. package/components/ellipsis/index.spec.js +94 -0
  30. package/components/ellipsis/index.vdt.js +50 -0
  31. package/components/ellipsis/styles.d.ts +5 -0
  32. package/components/ellipsis/styles.js +10 -0
  33. package/components/ellipsis/useEllipsis.d.ts +4 -0
  34. package/components/ellipsis/useEllipsis.js +21 -0
  35. package/components/input/index.d.ts +1 -1
  36. package/components/input/index.js +1 -1
  37. package/components/input/index.vdt.js +4 -2
  38. package/components/menu/item.vdt.js +8 -3
  39. package/components/menu/styles.d.ts +1 -1
  40. package/components/menu/styles.js +8 -7
  41. package/components/menu/title.vdt.js +6 -2
  42. package/components/radio/index.vdt.js +4 -2
  43. package/components/select/base.d.ts +1 -0
  44. package/components/select/base.vdt.js +4 -2
  45. package/components/select/useInput.js +5 -1
  46. package/components/table/styles.js +3 -3
  47. package/components/table/table.vdt.js +1 -1
  48. package/components/tabs/index.d.ts +1 -0
  49. package/components/tag/index.spec.js +4 -2
  50. package/components/tag/tags.vdt.js +2 -1
  51. package/components/tooltip/styles.js +1 -1
  52. package/components/upload/index.vdt.js +4 -2
  53. package/components/upload/styles.js +1 -1
  54. package/components/view/index.d.ts +15 -0
  55. package/components/view/index.js +30 -0
  56. package/i18n/en-US.d.ts +1 -1
  57. package/i18n/en-US.js +1 -1
  58. package/index.d.ts +5 -2
  59. package/index.js +5 -2
  60. package/package.json +2 -2
  61. package/styles/theme.d.ts +8 -0
  62. package/styles/theme.js +8 -4
  63. package/yarn-error.log +0 -528
@@ -0,0 +1,50 @@
1
+ import _extends from "@babel/runtime-corejs3/helpers/extends";
2
+ import { createElementVNode as _$ce, className as _$cn, createVNode as _$cv, createUnknownComponentVNode as _$cc, extend as _$ex, EMPTY_OBJ as _$em } from 'intact-react';
3
+ import { makeStyles } from './styles';
4
+ import { Tooltip } from '../tooltip';
5
+ import { getRestProps, addStyle } from '../utils';
6
+ export default function ($props, $blocks, $__proto__) {
7
+ var _$cn2, _$cn3;
8
+ $blocks || ($blocks = {});
9
+ $props || ($props = {});
10
+ var $this = this;
11
+ var _this$get = this.get(),
12
+ children = _this$get.children,
13
+ className = _this$get.className,
14
+ maxLines = _this$get.maxLines,
15
+ disabled = _this$get.disabled,
16
+ position = _this$get.position,
17
+ theme = _this$get.theme,
18
+ style = _this$get.style;
19
+ var k = this.config.k;
20
+ var _this$ellipsis = this.ellipsis,
21
+ showTooltip = _this$ellipsis.showTooltip,
22
+ ellipsisRef = _this$ellipsis.ellipsisRef;
23
+ var tooltip = showTooltip.value && !disabled;
24
+ var wrapper = _$ce(2, 'div', children, 0, _$cn((_$cn2 = {
25
+ 'c-ellipsis': true
26
+ }, _$cn2[k + "-ellipsis-wrapper"] = true, _$cn2[className] = className && !tooltip, _$cn2)));
27
+ return _$cv('div', _extends({}, getRestProps(this), {
28
+ 'className': _$cn((_$cn3 = {}, _$cn3[k + "-ellipsis"] = true, _$cn3[k + "-multiline"] = maxLines, _$cn3[makeStyles(k, maxLines)] = true, _$cn3)),
29
+ 'ref': ellipsisRef
30
+ }), tooltip ? _$cc(Tooltip, {
31
+ 'position': position,
32
+ 'theme': theme,
33
+ 'className': _$cn(className),
34
+ 'children': wrapper,
35
+ '$blocks': function ($blocks) {
36
+ var _$blocks = {},
37
+ __$blocks = _$ex({}, $blocks);
38
+ return (_$blocks['content'] = function ($super) {
39
+ return children;
40
+ }, __$blocks['content'] = function ($super, data) {
41
+ var block = $blocks['content'];
42
+ var callBlock = function callBlock() {
43
+ return _$blocks['content'].call($this, $super, data);
44
+ };
45
+ return block ? block.call($this, callBlock, data) : callBlock();
46
+ }), __$blocks;
47
+ }.call($this, _$em)
48
+ }) : wrapper);
49
+ }
50
+ ;
@@ -0,0 +1,5 @@
1
+ import '../../styles/global';
2
+ export declare const makeStyles: {
3
+ (k: string, maxLines: number): string;
4
+ clearCache(): {};
5
+ };
@@ -0,0 +1,10 @@
1
+ import { css } from '@emotion/css';
2
+ import { setDefault } from '../../styles/theme';
3
+ import '../../styles/global';
4
+ import { cache } from '../utils';
5
+ setDefault(function () {
6
+ makeStyles == null || makeStyles.clearCache();
7
+ });
8
+ export var makeStyles = cache(function makeStyles(k, maxLines) {
9
+ return /*#__PURE__*/css("width:100%;&.", k, "-multiline{.k-ellipsis-wrapper{white-space:normal;display:-webkit-box;-webkit-line-clamp:", maxLines, ";-webkit-box-orient:vertical;}}");
10
+ });
@@ -0,0 +1,4 @@
1
+ export declare function useEllipsis(): {
2
+ ellipsisRef: import('intact-react').RefObject<HTMLDivElement>;
3
+ showTooltip: import("../../hooks/useState").State<boolean>;
4
+ };
@@ -0,0 +1,21 @@
1
+ import { useInstance, createRef } from 'intact-react';
2
+ import { useResizeObserver } from '../../hooks/useResizeObserver';
3
+ import { useState } from '../../hooks/useState';
4
+ export function useEllipsis() {
5
+ var instance = useInstance();
6
+ var ellipsisRef = createRef();
7
+ var showTooltip = useState(false);
8
+ useResizeObserver(ellipsisRef, isShowTooltip);
9
+ function isShowTooltip() {
10
+ var isMulti = instance.get('maxLines');
11
+ var element = ellipsisRef.value.children[0];
12
+ var _showTooltip = isMulti ? element.scrollHeight > element.clientHeight : element.offsetWidth < element.scrollWidth;
13
+ requestAnimationFrame(function () {
14
+ showTooltip.set(_showTooltip);
15
+ });
16
+ }
17
+ return {
18
+ ellipsisRef: ellipsisRef,
19
+ showTooltip: showTooltip
20
+ };
21
+ }
@@ -15,7 +15,7 @@ export interface InputProps<V extends Value = Value> extends InputHTMLAttributes
15
15
  type?: HTMLInputTypes;
16
16
  value?: V;
17
17
  defaultValue?: string | number;
18
- placeholder?: string;
18
+ placeholder?: string | number;
19
19
  readonly?: boolean;
20
20
  clearable?: boolean;
21
21
  disabled?: boolean;
@@ -16,7 +16,7 @@ var typeDefs = {
16
16
  type: String,
17
17
  value: [String, Number],
18
18
  defaultValue: [String, Number],
19
- placeholder: String,
19
+ placeholder: [String, Number],
20
20
  readonly: Boolean,
21
21
  clearable: Boolean,
22
22
  disabled: Boolean,
@@ -58,7 +58,9 @@ 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 k = this.config.k;
61
+ var _this$config = this.config,
62
+ k = _this$config.k,
63
+ disableWave = _this$config.disableWave;
62
64
  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);
63
65
  var _this$showPassword = this.showPassword,
64
66
  isShowPassword = _this$showPassword.isShow,
@@ -96,7 +98,7 @@ export default function ($props, $blocks, $__proto__) {
96
98
  'children': function children(isInvalid) {
97
99
  var _$cn3, _$cn4;
98
100
  return _$cc(Wave, {
99
- 'disabled': waveDisabled || disabled || isInvalid,
101
+ 'disabled': waveDisabled || disabled || isInvalid || disableWave,
100
102
  'inset': '-2px',
101
103
  'children': _$ce(2, 'div', [$blocks.prefix ? _$ce(2, 'div', (_$blocks['prefix'] = function ($super) {
102
104
  return null;
@@ -5,6 +5,7 @@ import { Dropdown, DropdownItem } from '../dropdown';
5
5
  import { Tooltip } from '../tooltip';
6
6
  import { Icon } from '../icon';
7
7
  import { Menu } from './menu';
8
+ import { Ellipsis } from '../ellipsis';
8
9
  import { getRestProps, expandAnimationCallbacks } from '../utils';
9
10
  import { isNullOrUndefined } from 'intact-shared';
10
11
  import { makeItemStyles, makeTitleStyles, makeNestedMenuStyles } from './styles';
@@ -18,7 +19,8 @@ export default function ($props, $blocks, $__proto__) {
18
19
  var _rootMenu$get = rootMenu.get(),
19
20
  theme = _rootMenu$get.theme,
20
21
  type = _rootMenu$get.type,
21
- rootDot = _rootMenu$get.dot;
22
+ rootDot = _rootMenu$get.dot,
23
+ size = _rootMenu$get.size;
22
24
  var _this$get = this.get(),
23
25
  children = _this$get.children,
24
26
  key = _this$get.key,
@@ -46,7 +48,10 @@ export default function ($props, $blocks, $__proto__) {
46
48
  var _$cn2;
47
49
  return _$ce(2, 'div', [showDot ? _$cc(Icon, {
48
50
  'className': _$cn(k + "-menu-dot ion-record")
49
- }) : undefined, _$ce(2, 'div', children, 0, _$cn(k + "-menu-name")), subMenuVNode ? _$cc(Icon, {
51
+ }) : undefined, _$ce(2, 'div', _$cc(Ellipsis, {
52
+ 'position': 'bottom',
53
+ 'children': children
54
+ }), 2, _$cn(k + "-menu-name")), subMenuVNode ? _$cc(Icon, {
50
55
  'className': _$cn(k + "-menu-item-arrow ion-arrow-down-b")
51
56
  }) : undefined], 0, _$cn((_$cn2 = {}, _$cn2[k + "-menu-item-title"] = true, _$cn2[makeTitleStyles(k)] = true, _$cn2)), {
52
57
  'ev-click': _this.onClick.bind(_this, subMenuVNode)
@@ -62,7 +67,7 @@ export default function ($props, $blocks, $__proto__) {
62
67
  if (subMenuVNode) {
63
68
  var _$cn3;
64
69
  var paddingLeft = _this.parentMenu.get('_paddingLeft');
65
- var _makeNestedMenuStyles = makeNestedMenuStyles(k, showDot || !!iconVNode, paddingLeft),
70
+ var _makeNestedMenuStyles = makeNestedMenuStyles(k, showDot || !!iconVNode, paddingLeft, size),
66
71
  _classname = _makeNestedMenuStyles[0],
67
72
  _paddingLeft = _makeNestedMenuStyles[1];
68
73
  var _className = _$cn((_$cn3 = {}, _$cn3[_classname] = true, _$cn3[subMenuVNode.className] = subMenuVNode.className, _$cn3[k + "-sub-menu"] = true, _$cn3));
@@ -78,6 +78,6 @@ export declare const makeItemStyles: {
78
78
  clearCache(): {};
79
79
  };
80
80
  export declare const makeNestedMenuStyles: {
81
- (k: string, hasIcon: boolean, parentPaddingLeft?: string | undefined): string;
81
+ (k: string, hasIcon: boolean, parentPaddingLeft: string | undefined, size: "small" | "large" | "default" | undefined): string;
82
82
  clearCache(): {};
83
83
  };
@@ -20,7 +20,7 @@ var defaults = {
20
20
  },
21
21
  item: {
22
22
  height: '40px',
23
- padding: '0 17px',
23
+ padding: '0 12px',
24
24
  bodyPadding: '0 4px',
25
25
  color: '#aeaeb9',
26
26
  hoverColor: '#fff',
@@ -36,7 +36,7 @@ var defaults = {
36
36
  },
37
37
  title: {
38
38
  height: '40px',
39
- padding: '0 17px',
39
+ padding: '0 12px',
40
40
  color: '#fff'
41
41
  },
42
42
  icon: {
@@ -112,7 +112,7 @@ export { menu };
112
112
  export var makeMenuStyles = cache(function makeMenuStyles(k) {
113
113
  // we must increase the priority by adding &.${k}-menu
114
114
  // to override the css of dropdownMenu
115
- return /*#__PURE__*/css("&.", k, "-menu{width:", menu.width, ";transition:width ", menu.transition, ";background:", menu.bgColor, ";font-size:", menu.fontSize, ";position:relative;}.", k, "-icon{width:", menu.icon.width, ";margin-right:", menu.icon.gap, ";text-align:center;flex-shrink:0;}.", k, "-menu-header{height:", menu.header.height, ";padding:0 21px;color:", menu.header.color, ";font-size:", menu.header.fontSize, ";font-weight:bold;}.", k, "-menu-body{padding:", menu.item.bodyPadding, ";max-height:calc(100vh - ", menu.header.height, ");overflow-y:auto;overflow-x:hidden;}.", k, "-menu-title{height:", menu.title.height, ";border-top:", menu.border, ";margin-top:4px;.", k, "-menu-name{transition:all ", menu.transition, ";height:", menu.title.height, ";color:", menu.title.color, ";font-weight:bold;}}.", k, "-menu-arrow-box{width:14px;height:60px;cursor:pointer;background:", menu.bgColor, ";border-radius:0 8px 8px 0;position:absolute;display:flex;align-items:center;justify-content:center;top:50%;left:calc(", menu.width, " - 2px);transition:left ", menu.transition, ";transform:translateY(-50%);border:", menu.border, ";border-left:none;.", k, "-icon{margin-right:0;}&:hover{.", k, "-menu-arrow:before{color:", menu.item.activeBgColor, ";}}}&.", k, "-light{border:1px solid ", theme.color.disabledBg, ";background:", menu.light.bgColor, ";.", k, "-menu-header{color:", menu.light.title.color, ";}.", k, "-menu-item{.", k, "-menu-item-title{color:", menu.light.item.color, ";&:hover{background:", menu.light.item.hoverBg, ";}}.", k, "-menu-item-arrow{color:", menu.light.item.color, ";}&.", k, "-highlighted{>.", k, "-menu-item-title{color:", menu.light.item.hoverColor, ";}}&.", k, "-disabled{>.", k, "-menu-item-title{color:", menu.light.item.disabledColor, "!important;}}}.", k, "-menu-title{border-top:", menu.light.border, ";.", k, "-menu-name{color:", menu.light.title.color, ";}}.", k, "-menu-arrow-box{background:", menu.light.bgColor, ";border:", menu.light.border, ";border-left:none;&:hover{.", k, "-menu-arrow:before{color:", menu.light.active.color, ";}}}.", k, "-menu:not(.", k, "-dropdown-menu){background:", menu.light.bgColor, ";}&.", k, "-horizontal{.", k, "-menu-header{border-right:", menu.light.border, ";}.", k, "-menu-body>.", k, "-menu-title{border-right:", menu.light.border, ";}}.", k, "-menu-item.", k, "-active{>.", k, "-menu-item-title{color:", menu.light.active.color, "!important;background:", menu.light.active.bgColor, ";}}.", k, "-sub-menu{.", k, "-menu-item-title,.", k, "-menu-item-arrow{color:", menu.light.item.subTitleColor, "!important;}}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
115
+ return /*#__PURE__*/css("&.", k, "-menu{width:", menu.width, ";transition:width ", menu.transition, ";background:", menu.bgColor, ";font-size:", menu.fontSize, ";position:relative;}.", k, "-icon{width:", menu.icon.width, ";margin-right:", menu.icon.gap, ";text-align:center;flex-shrink:0;}.", k, "-menu-header{height:", menu.header.height, ";padding:0 16px;color:", menu.header.color, ";font-size:", menu.header.fontSize, ";font-weight:bold;}.", k, "-menu-body{padding:", menu.item.bodyPadding, ";max-height:calc(100% - ", menu.header.height, ");overflow-y:auto;overflow-x:hidden;scrollbar-width:none;}.", k, "-menu-title{height:", menu.title.height, ";border-top:", menu.border, ";margin-top:4px;.", k, "-menu-name{transition:all ", menu.transition, ";height:", menu.title.height, ";color:", menu.title.color, ";font-weight:bold;}}.", k, "-menu-arrow-box{width:14px;height:60px;cursor:pointer;background:", menu.bgColor, ";border-radius:0 8px 8px 0;position:absolute;display:flex;align-items:center;justify-content:center;top:50%;left:calc(", menu.width, " - 2px);transition:left ", menu.transition, ";transform:translateY(-50%);border:", menu.border, ";border-left:none;.", k, "-icon{margin-right:0;}&:hover{.", k, "-menu-arrow:before{color:", menu.item.activeBgColor, ";}}}&.", k, "-light{border-right:1px solid ", theme.color.disabledBg, ";background:", menu.light.bgColor, ";.", k, "-menu-header{color:", menu.light.title.color, ";}.", k, "-menu-item{.", k, "-menu-item-title{color:", menu.light.item.color, ";&:hover{background:", menu.light.item.hoverBg, ";}}.", k, "-menu-item-arrow{color:", menu.light.item.color, ";}&.", k, "-highlighted{>.", k, "-menu-item-title{color:", menu.light.item.hoverColor, ";}}&.", k, "-disabled{>.", k, "-menu-item-title{color:", menu.light.item.disabledColor, "!important;}}}.", k, "-menu-title{border-top:", menu.light.border, ";.", k, "-menu-name{color:", menu.light.title.color, ";}}.", k, "-menu-arrow-box{background:", menu.light.bgColor, ";border:", menu.light.border, ";border-left:none;&:hover{.", k, "-menu-arrow:before{color:", menu.light.active.color, ";}}}.", k, "-menu:not(.", k, "-dropdown-menu){background:", menu.light.bgColor, ";}&.", k, "-horizontal{.", k, "-menu-header{border-right:", menu.light.border, ";}.", k, "-menu-body>.", k, "-menu-title{border-right:", menu.light.border, ";}}.", k, "-menu-item.", k, "-active{>.", k, "-menu-item-title{color:", menu.light.active.color, "!important;background:", menu.light.active.bgColor, ";}}.", k, "-sub-menu{.", k, "-menu-item-title,.", k, "-menu-item-arrow{color:", menu.light.item.subTitleColor, "!important;}}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
116
116
  var styles = menu[size];
117
117
  return /*#__PURE__*/css("&.", k, "-", size, "{width:", styles.width, ";font-size:", styles.fontSize, ";.", k, "-menu{font-size:", styles.fontSize, ";}.", k, "-menu-arrow-box{left:calc(", styles.width, " - 2px);}}");
118
118
  }), "&.", k, "-collapsed{width:calc(", menu.icon.width, " + (", getLeft(menu.item.padding), " + ", getLeft(menu.item.bodyPadding), ") * 2);.", k, "-icon{margin-right:0;}.", k, "-menu-item-arrow{display:none;}}&.", k, "-collapsed-arrow{width:0px;border-left:none;.", k, "-menu-body{overflow:hidden;padding:0;}.", k, "-menu-arrow-box{left:0;.", k, "-menu-arrow:before{transform:rotateY(180deg);}}}&.", k, "-dropdown-menu{width:fit-content;min-width:", menu.dropdown.minWidth, ";.", k, "-menu-item-arrow{transform:rotate(-90deg);}}&.", k, "-horizontal{width:auto;display:flex;.", k, "-menu-body{display:flex;align-items:center;.", k, "-menu-title{border-top:none;border-right:", menu.border, ";}}}");
@@ -123,12 +123,13 @@ export var makeTitleStyles = cache(function makeTitleStyles(k) {
123
123
  });
124
124
  export var makeItemStyles = cache(function makeItemStyles(k) {
125
125
  var item = menu.item;
126
- return /*#__PURE__*/css(".", k, "-menu-item-title{transition:all ", menu.transition, ";cursor:pointer;height:", item.height, ";&:hover{padding:", item.padding, ";border-radius:", menu.borderRadius, ";background:#2a2a30;}&>.", k, "-menu-item-arrow:before{font-size:small;}}.", k, "-menu-name{flex:1;display:flex;align-items:center;min-width:0;span{overflow:hidden;text-overflow:ellipsis;min-width:0;}.", k, "-icon{color:inherit;}}.", k, "-menu-item-arrow{color:", item.color, ";margin:0 0 0 ", menu.icon.gap, ";transition:transform ", menu.transition, ";}&.", k, "-expanded{>.", k, "-menu-item-title{color:", item.hoverColor, ";.", k, "-menu-item-arrow{transform:rotate(180deg);}}}&.", k, "-highlighted{>.", k, "-menu-item-title{color:", menu.light.item.hoverColor, ";}}&.", k, "-active{>.", k, "-menu-item-title{border-radius:", menu.borderRadius, ";color:", item.activeBgColor, "!important;background:", item.hoverBgColor, ";}}&.", k, "-disabled{>.", k, "-menu-item-title{color:", item.disabledColor, "!important;cursor:not-allowed;}}.", k, "-menu-dot{font-size:", item.dotFontSize, ";transform:scale(.4);}");
126
+ return /*#__PURE__*/css(".", k, "-menu-item-title{transition:all ", menu.transition, ";cursor:pointer;height:", item.height, ";&:hover{padding:", item.padding, ";border-radius:", menu.borderRadius, ";background:#2a2a30;}&>.", k, "-menu-item-arrow:before{font-size:small;}}.", k, "-menu-name{flex:1;display:flex;align-items:center;min-width:0;.", k, "-icon{color:inherit;display:inline-block;}}.", k, "-menu-item-arrow{color:", item.color, ";margin:0 0 0 ", menu.icon.gap, ";transition:transform ", menu.transition, ";}&.", k, "-expanded{>.", k, "-menu-item-title{color:", item.hoverColor, ";.", k, "-menu-item-arrow{transform:rotate(180deg);}}}&.", k, "-highlighted{>.", k, "-menu-item-title{color:", menu.light.item.hoverColor, ";}}&.", k, "-active{>.", k, "-menu-item-title{border-radius:", menu.borderRadius, ";color:", item.activeBgColor, "!important;background:", item.hoverBgColor, ";}}&.", k, "-disabled{>.", k, "-menu-item-title{color:", item.disabledColor, "!important;cursor:not-allowed;}}.", k, "-menu-dot{font-size:", item.dotFontSize, ";transform:scale(.4);}");
127
127
  });
128
- export var makeNestedMenuStyles = cache(function makeNestedMenuStyles(k, hasIcon, parentPaddingLeft) {
128
+ export var makeNestedMenuStyles = cache(function makeNestedMenuStyles(k, hasIcon, parentPaddingLeft, size) {
129
129
  if (parentPaddingLeft === void 0) {
130
130
  parentPaddingLeft = getLeft(menu.item.padding);
131
131
  }
132
- var paddingLeft = "" + parentPaddingLeft + (hasIcon ? ' + ' + menu.icon.width + ' + ' + menu.icon.gap : '');
133
- return [/*#__PURE__*/css("&.", k, "-menu{position:relative;width:auto;background:", menu.bgColor, ";border:none;.", k, "-menu-body{padding:0;.", k, "-menu-item-title{padding-left:calc(", paddingLeft, ");}.", k, "-menu-item-title,.", k, "-menu-item-arrow{color:", menu.item.subTitleColor, ";}}}"), paddingLeft];
132
+ var fontSize = "" + (size === 'small' ? menu.small.fontSize : menu.fontSize);
133
+ var paddingLeft = "" + parentPaddingLeft + (hasIcon ? ' + ' + menu.icon.width + ' + ' + menu.icon.gap : ' + ' + fontSize);
134
+ return [/*#__PURE__*/css("&.", k, "-menu{position:relative;width:auto;background:", menu.bgColor, ";border:none;.", k, "-menu-body{padding:0;max-height:100%;.", k, "-menu-item-title{padding-left:calc(", paddingLeft, ");}.", k, "-menu-item-title,.", k, "-menu-item-arrow{color:", menu.item.subTitleColor, ";}}}"), paddingLeft];
134
135
  });
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
- import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce } from 'intact-react';
2
+ import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce, createUnknownComponentVNode as _$cc } from 'intact-react';
3
3
  import { Icon } from '../icon';
4
+ import { Ellipsis } from '../ellipsis';
4
5
  import { getRestProps, findChildren, isComponentVNode } from '../utils';
5
6
  import { makeTitleStyles } from './styles';
6
7
  export default function ($props, $blocks, $__proto__) {
@@ -18,7 +19,10 @@ export default function ($props, $blocks, $__proto__) {
18
19
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-menu-title"] = true, _classNameObj[className] = className, _classNameObj);
19
20
  return _$cv('div', _extends({
20
21
  'className': _$cn(classNameObj)
21
- }, getRestProps(this)), _$ce(2, 'div', !collapse ? _$ce(2, 'span', children, 0) : findChildren(children, function (vNode) {
22
+ }, getRestProps(this)), _$ce(2, 'div', !collapse ? _$cc(Ellipsis, {
23
+ 'position': 'bottom',
24
+ 'children': children
25
+ }) : findChildren(children, function (vNode) {
22
26
  return isComponentVNode(vNode, Icon);
23
27
  }), 0, _$cn((_$cn2 = {}, _$cn2[k + "-menu-name"] = true, _$cn2[makeTitleStyles(k)] = true, _$cn2))));
24
28
  }
@@ -22,7 +22,9 @@ 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 k = this.config.k;
25
+ var _this$config = this.config,
26
+ k = _this$config.k,
27
+ disableWave = _this$config.disableWave;
26
28
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-radio"] = true, _classNameObj[k + "-disabled"] = disabled, _classNameObj[k + "-checked"] = isChecked, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
27
29
 
28
30
  // let evClick;
@@ -47,7 +49,7 @@ export default function ($props, $blocks, $__proto__) {
47
49
  'ev-keypress': this.onKeypress,
48
50
  'ev-click': this.fixClick
49
51
  }), [_$cc(Wave, {
50
- 'disabled': disabled,
52
+ 'disabled': disabled || disableWave,
51
53
  'inset': '-2px',
52
54
  'children': _$ce(2, 'span', _$cv('input', _extends({}, getRestProps(this, rest), {
53
55
  'type': 'radio',
@@ -54,6 +54,7 @@ export declare abstract class BaseSelect<T extends BaseSelectProps<any> = BaseSe
54
54
  protected config: {
55
55
  cls: (name: string) => string;
56
56
  readonly k: string;
57
+ readonly disableWave: boolean;
57
58
  };
58
59
  init(): void;
59
60
  protected abstract getPlaceholder(): Children;
@@ -45,7 +45,9 @@ 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 k = this.config.k;
48
+ var _this$config = this.config,
49
+ k = _this$config.k,
50
+ disableWave = _this$config.disableWave;
49
51
  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);
50
52
  var placeholder = this.getPlaceholder();
51
53
  var label = this.getLabel();
@@ -77,7 +79,7 @@ export default function ($props, $blocks, $__proto__) {
77
79
  'children': function children(isInvalid) {
78
80
  var _$cn2;
79
81
  return _$cc(Wave, {
80
- 'disabled': disabled || isInvalid || inline,
82
+ 'disabled': disabled || isInvalid || inline || disableWave,
81
83
  'inset': '-2px',
82
84
  'children': _$cc(Dropdown, {
83
85
  'trigger': 'click',
@@ -36,7 +36,11 @@ export function useInput(resetKeywords) {
36
36
  filterable = _component$get.filterable;
37
37
  if (multiple && filterable) {
38
38
  focusInput();
39
- resetKeywords(keywords);
39
+ /**
40
+ * don't reset keywords on multiple mode for continue selection
41
+ * https://github.com/ksc-fe/kpc/issues/983
42
+ */
43
+ // resetKeywords(keywords);
40
44
  }
41
45
  });
42
46
  return {
@@ -29,7 +29,7 @@ var defaults = {
29
29
  get color() {
30
30
  return theme.color.lightBlack;
31
31
  },
32
- padding: "0 5px 0 12px",
32
+ padding: "0 8px 0 12px",
33
33
  fontSize: "12px",
34
34
  fontWeight: "bold",
35
35
  textAlign: 'left',
@@ -42,7 +42,7 @@ var defaults = {
42
42
  get hoverBgcolor() {
43
43
  return theme.color.bg;
44
44
  },
45
- padding: "11px 5px 11px 12px"
45
+ padding: "11px 8px 11px 12px"
46
46
  },
47
47
  // stripe
48
48
  stripeBgColor: '#f9f9fc',
@@ -90,7 +90,7 @@ setDefault(function () {
90
90
  makeGroupMenuStyles == null || makeGroupMenuStyles.clearCache();
91
91
  });
92
92
  export var makeStyles = cache(function makeStyles(k) {
93
- return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";position:sticky;top:0;z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&:first-of-type:before{display:none;}}.", k, "-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.", k, "-table-title-text{flex:1;display:inline-flex;line-height:1.4;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.", k, "-fixed-left,.", k, "-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.", k, "-fixed-left:after{right:-11px;}.", k, "-fixed-right:after{left:-11px;}&.", k, "-scroll-left .", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.", k, "-scroll-right .", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.", k, "-scroll-middle{.", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.", k, "-fixed-right+.", k, "-fixed-right:after{display:none;}.", k, "-table-affix-header{position:sticky;top:0;left:0;.", k, "-affix-wrapper{overflow:hidden;}&.", k, "-fixed{position:relative;}}&.", k, "-border,&.", k, "-grid{.", k, "-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.", k, "-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.", k, "-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.", k, "-table-group{margin-left:", table.group.gap, ";}.", k, "-table-check{.", k, "-checkbox,.", k, "-radio{position:relative;top:-1px;}}.", k, "-column-sortable{cursor:pointer;}.", k, "-column-sort{.", k, "-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.", k, "-desc .", k, "-icon.", k, "-desc,&.", k, "-asc .", k, "-icon.", k, "-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.", k, "-table-spin.", k, "-overlay{z-index:2;}.", k, "-table-empty{text-align:center;}tr.", k, "-expand{td{padding:0;background:#fdfcff;}}&.", k, "-with-expand{tr:not(.", k, "-expand){td{border-bottom:none;}}}.", k, "-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.", k, "-selected td{background:", table.selectedBgColor, ";}.", k, "-table-arrow{width:", table.arrow.width, "!important;margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.", k, "-spreaded{.", k, "-table-arrow{transform:rotate(90deg);}}.", k, "-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.", k, "-dragging{opacity:", table.draggingOpacity, ";}.", k, "-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.", k, "-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
93
+ return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";position:sticky;top:0;z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&.", k, "-fixed-right:before{left:-2px;}&:first-of-type:before{display:none;}}.", k, "-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.", k, "-table-title-text{flex:1;display:inline-flex;line-height:1.4;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.", k, "-fixed-left,.", k, "-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.", k, "-fixed-left:after{right:-11px;}.", k, "-fixed-right:after{left:-11px;}&.", k, "-scroll-left .", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.", k, "-scroll-right .", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.", k, "-scroll-middle{.", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.", k, "-fixed-right+.", k, "-fixed-right:after{display:none;}.", k, "-table-affix-header{position:sticky;top:0;left:0;.", k, "-affix-wrapper{overflow:hidden;}&.", k, "-fixed{position:relative;}}&.", k, "-border,&.", k, "-grid{.", k, "-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.", k, "-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.", k, "-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.", k, "-table-group{margin-left:", table.group.gap, ";}.", k, "-table-check{.", k, "-checkbox,.", k, "-radio{position:relative;top:-1px;}}.", k, "-column-sortable{cursor:pointer;}.", k, "-column-sort{.", k, "-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.", k, "-desc .", k, "-icon.", k, "-desc,&.", k, "-asc .", k, "-icon.", k, "-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.", k, "-table-spin.", k, "-overlay{z-index:2;}.", k, "-table-empty{text-align:center;}tr.", k, "-expand{td{padding:0;background:#fdfcff;}}&.", k, "-with-expand{tr:not(.", k, "-expand){td{border-bottom:none;}}}.", k, "-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.", k, "-selected td{background:", table.selectedBgColor, ";}.", k, "-table-arrow{width:", table.arrow.width, "!important;margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.", k, "-spreaded{.", k, "-table-arrow{transform:rotate(90deg);}}.", k, "-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.", k, "-dragging{opacity:", table.draggingOpacity, ";}.", k, "-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.", k, "-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
94
94
  return /*#__PURE__*/css(".", k, "-align-", type, "{text-align:", type, ";}");
95
95
  }), ">.", k, "-pagination{margin:16px 0;}&.", k, "-fix-header{min-height:0;.", k, "-table-wrapper{height:100%;}}");
96
96
  });
@@ -160,7 +160,7 @@ export default function ($props, $blocks, $__proto__) {
160
160
  onRowDragEnd = _this$draggable.onRowDragEnd,
161
161
  draggingKey = _this$draggable.draggingKey;
162
162
  var tbody = _$ce(2, 'tbody', !hasData ? _$ce(2, 'tr', _$ce(2, 'td', (_$blocks['empty'] = function ($super) {
163
- return _$('/(ㄒoㄒ)/~~ 没有找到亲要的数据哦~');
163
+ return _$('暂无数据');
164
164
  }, __$blocks['empty'] = function ($super, data) {
165
165
  var block = $blocks['empty'];
166
166
  var callBlock = function callBlock() {
@@ -24,6 +24,7 @@ export declare class Tabs<T = any> extends Component<TabsProps<T>, TabsEvents<T>
24
24
  config: {
25
25
  cls: (name: string) => string;
26
26
  readonly k: string;
27
+ readonly disableWave: boolean;
27
28
  };
28
29
  init(): void;
29
30
  changeTab(tabProps: TabProps): Promise<void>;
@@ -1,11 +1,13 @@
1
1
  import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
3
3
  import ClosableDemo from '~/components/tag/demos/closable';
4
- import { mount, wait, dispatchEvent, getElement } from '../../test/utils';
4
+ import { mount, unmount, wait, dispatchEvent, getElement } from '../../test/utils';
5
5
  import TagsDemo from '~/components/tag/demos/tags';
6
6
  import DraggableDemo from '~/components/tag/demos/draggable';
7
7
  describe('Tag', function () {
8
- // afterEach(() => unmount());
8
+ afterEach(function () {
9
+ return unmount();
10
+ });
9
11
  it('should not close tag if we has prevented default', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
10
12
  var _mount, instance, element, btns, preventDefaultBtn, commonBtn;
11
13
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -55,7 +55,8 @@ export default function ($props, $blocks, $__proto__) {
55
55
  var _$blocks = {},
56
56
  __$blocks = _$ex({}, $blocks);
57
57
  return (_$blocks['content'] = function ($super) {
58
- return _$ce(2, 'div', hiddenChildren.value, 0, _$cn(classNameObj));
58
+ var _extends2;
59
+ return _$ce(2, 'div', hiddenChildren.value, 0, _$cn(_extends({}, classNameObj, (_extends2 = {}, _extends2[k + "-nowrap"] = false, _extends2))));
59
60
  }, __$blocks['content'] = function ($super, data) {
60
61
  var block = $blocks['content'];
61
62
  var callBlock = function callBlock() {
@@ -71,7 +71,7 @@ export var makeStyles = cache(function makeStyles(k) {
71
71
  }
72
72
  return /*#__PURE__*/css("&.", k, "-", theme, "{background:", bgColor, ";color:", color, ";.", k, "-tooltip-arrow{", _mapInstanceProperty(_context = _Object$keys(directionMap)).call(_context, function (direction) {
73
73
  var borderDirection = directionMap[direction];
74
- return /*#__PURE__*/css("&.", k, "-", direction, "{border-", borderDirection, "-color:", borderColor, ";&:before{border-", borderDirection, "-color:", bgColor, ";}}");
74
+ return /*#__PURE__*/css("&.", k, "-", direction, "{&:before{border-", borderDirection, "-color:", bgColor, ";}}");
75
75
  }), ";}}");
76
76
  }), ".", k, "-tooltip-footer{padding-top:", tooltip.confirm.gaps, ";.", k, "-btn:not(:first-of-type){margin-left:", tooltip.confirm.gaps, ";}}&.", k, "-small{padding:", tooltip.smallPadding, ";}}");
77
77
  });
@@ -24,10 +24,11 @@ export default function ($props, $blocks, $__proto__) {
24
24
  files = _this$get.files,
25
25
  children = _this$get.children,
26
26
  type = _this$get.type,
27
- directory = _this$get.directory;
27
+ directory = _this$get.directory,
28
+ disabled = _this$get.disabled;
28
29
  var drag = this.drag;
29
30
  var k = this.config.k;
30
- var classNameObj = (_classNameObj = {}, _classNameObj[k + "-upload"] = true, _classNameObj[className] = className, _classNameObj[k + "-drag"] = type === 'drag', _classNameObj[k + "-dragover"] = drag.dragOver.value, _classNameObj[k + "-gallery"] = type === 'gallery', _classNameObj[makeStyles(k)] = true, _classNameObj);
31
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-upload"] = true, _classNameObj[className] = className, _classNameObj[k + "-drag"] = type === 'drag', _classNameObj[k + "-dragover"] = drag.dragOver.value, _classNameObj[k + "-gallery"] = type === 'gallery', _classNameObj[k + "-disabled"] = disabled, _classNameObj[makeStyles(k)] = true, _classNameObj);
31
32
  var events = {
32
33
  'ev-click': this.selectFile
33
34
  };
@@ -49,6 +50,7 @@ export default function ($props, $blocks, $__proto__) {
49
50
  };
50
51
  return block ? block.call($this, callBlock, data) : callBlock();
51
52
  }, __$blocks['children'](_$no)) : type !== 'gallery' ? type === 'select' ? _$cc(Button, {
53
+ 'disabled': disabled,
52
54
  'children': [_$cc(Icon, {
53
55
  'className': _$cn(k + "-icon-upload")
54
56
  }), _$('点击上传')]
@@ -113,7 +113,7 @@ setDefault(function () {
113
113
  makeUploadDialogStyles == null || makeUploadDialogStyles.clearCache();
114
114
  });
115
115
  export var makeStyles = cache(function makeStyles(k) {
116
- return /*#__PURE__*/css("font-size:", upload.fontSize, ";position:relative;.", k, "-icon-upload{position:relative;top:-1px;}.", k, "-upload-handle{display:inline-block;vertical-align:middle;color:", upload.color, ";}.", k, "-upload-tip{margin-top:", upload.tip.gap, ";color:", upload.color, ";}.", k, "-upload-files{margin-top:", upload.filesGap, ";}.", k, "-upload-file{margin:", upload.file.margin, ";padding-right:", upload.file.delete.width, ";position:relative;&:hover{.", k, "-upload-close{display:inline-flex;position:absolute;right:", upload.file.delete.right, ";top:", upload.file.delete.top, ";}.", k, "-upload-file-main{background:", upload.file.bgColor, ";}}}.", k, "-upload-file-main{padding:", upload.file.padding, ";border-radius:", upload.file.borderRadius, ";}.", k, "-upload-name{display:flex;align-items:center;height:", upload.file.height, ";}.", k, "-upload-file-icon{margin-right:", upload.file.fileIconGap, ";}.", k, "-upload-file-name{flex:1;}.", k, "-upload-status-icon{color:", upload.file.status.color, ";margin-right:", upload.file.status.offsetRight, ";}.", k, "-upload-close{display:none;}.", k, "-upload-file.", k, "-error{color:", upload.file.errorColor, ";.", k, "-upload-status-icon{color:", upload.file.status.errorColor, ";}}.", k, "-upload-progress{.", k, "-progress-text{width:auto!important;}}&.", k, "-drag{.", k, "-upload-handle{display:block;border:", upload.drag.border, ";border-radius:", upload.drag.borderRadius, ";cursor:pointer;text-align:center;transition:border-color ", upload.transition, ";background:", upload.drag.bgColor, ";&:hover{border-color:", upload.drag.hoverBorderColor, ";}}.", k, "-upload-area{padding:", upload.drag.padding, ";.", k, "-icon{display:inline-block;font-size:", upload.drag.icon.fontSize, ";margin-bottom:", upload.drag.icon.gap, ";}}&.", k, "-dragover{.", k, "-upload-handle{border-color:", upload.drag.overBorderColor, ";}}}.", k, "-upload-pictures{display:inline-block;vertical-align:middle;}.", k, "-upload-picture{padding:", upload.gallery.padding, ";position:relative;vertical-align:middle;&.", k, "-error{border-color:", upload.gallery.errorBorderColor, ";}.", k, "-upload-close{display:inline-flex;}&:hover{.", k, "-upload-icons{opacity:1;}}.", k, "-upload-img{display:inline-block;width:100%;height:100%;}.", k, "-upload-icons{opacity:0;transition:opacity ", upload.transition, ";}}.", k, "-upload-picture-card{display:inline-flex;width:", upload.gallery.width, ";height:", upload.gallery.height, ";border-radius:", upload.gallery.borderRadius, ";border:", upload.gallery.border, ";margin:", upload.gallery.margin, ";background:", upload.gallery.bgColor, ";align-items:center;justify-content:center;flex-direction:column;}.", k, "-upload-add{border:", upload.gallery.add.border, ";cursor:pointer;&:hover{border-color:", upload.gallery.add.hoverBorderColor, ";}}.", k, "-upload-overlap{position:absolute;width:100%;height:100%;left:0;top:0;background:", upload.overlap.bgColor, ";display:flex;align-items:center;justify-content:center;gap:", upload.overlap.iconGap, ";color:", upload.overlap.color, ";.", k, "-icon:not(:hover){color:inherit;}.", k, "-upload-progress{position:absolute;width:100%;top:50%;padding:", upload.gallery.padding, ";transform:translateY(-50%);}}");
116
+ return /*#__PURE__*/css("font-size:", upload.fontSize, ";position:relative;.", k, "-icon-upload{position:relative;top:-1px;}.", k, "-upload-handle{display:inline-block;vertical-align:middle;color:", upload.color, ";}.", k, "-upload-tip{margin-top:", upload.tip.gap, ";color:", upload.color, ";}.", k, "-upload-files{margin-top:", upload.filesGap, ";}.", k, "-upload-file{margin:", upload.file.margin, ";padding-right:", upload.file.delete.width, ";position:relative;&:hover{.", k, "-upload-close{display:inline-flex;position:absolute;right:", upload.file.delete.right, ";top:", upload.file.delete.top, ";}.", k, "-upload-file-main{background:", upload.file.bgColor, ";}}}.", k, "-upload-file-main{padding:", upload.file.padding, ";border-radius:", upload.file.borderRadius, ";}.", k, "-upload-name{display:flex;align-items:center;height:", upload.file.height, ";}.", k, "-upload-file-icon{margin-right:", upload.file.fileIconGap, ";}.", k, "-upload-file-name{flex:1;}.", k, "-upload-status-icon{color:", upload.file.status.color, ";margin-right:", upload.file.status.offsetRight, ";}.", k, "-upload-close{display:none;}.", k, "-upload-file.", k, "-error{color:", upload.file.errorColor, ";.", k, "-upload-status-icon{color:", upload.file.status.errorColor, ";}}.", k, "-upload-progress{.", k, "-progress-text{width:auto!important;}}&.", k, "-drag{.", k, "-upload-handle{display:block;border:", upload.drag.border, ";border-radius:", upload.drag.borderRadius, ";cursor:pointer;text-align:center;transition:border-color ", upload.transition, ";background:", upload.drag.bgColor, ";&:hover{border-color:", upload.drag.hoverBorderColor, ";}}.", k, "-upload-area{padding:", upload.drag.padding, ";.", k, "-icon{display:inline-block;font-size:", upload.drag.icon.fontSize, ";margin-bottom:", upload.drag.icon.gap, ";}}&.", k, "-dragover{.", k, "-upload-handle{border-color:", upload.drag.overBorderColor, ";}}}.", k, "-upload-pictures{display:inline-block;vertical-align:middle;}.", k, "-upload-picture{padding:", upload.gallery.padding, ";position:relative;vertical-align:middle;&.", k, "-error{border-color:", upload.gallery.errorBorderColor, ";}.", k, "-upload-close{display:inline-flex;}&:hover{.", k, "-upload-icons{opacity:1;}}.", k, "-upload-img{display:inline-block;width:100%;height:100%;}.", k, "-upload-icons{opacity:0;transition:opacity ", upload.transition, ";}}.", k, "-upload-picture-card{display:inline-flex;width:", upload.gallery.width, ";height:", upload.gallery.height, ";border-radius:", upload.gallery.borderRadius, ";border:", upload.gallery.border, ";margin:", upload.gallery.margin, ";background:", upload.gallery.bgColor, ";align-items:center;justify-content:center;flex-direction:column;}.", k, "-upload-add{border:", upload.gallery.add.border, ";cursor:pointer;&:hover{border-color:", upload.gallery.add.hoverBorderColor, ";}}.", k, "-upload-overlap{position:absolute;width:100%;height:100%;left:0;top:0;background:", upload.overlap.bgColor, ";display:flex;align-items:center;justify-content:center;gap:", upload.overlap.iconGap, ";color:", upload.overlap.color, ";.", k, "-icon:not(:hover){color:inherit;}.", k, "-upload-progress{position:absolute;width:100%;top:50%;padding:", upload.gallery.padding, ";transform:translateY(-50%);}}&.", k, "-disabled{.", k, "-upload-add,.", k, "-upload-handle{cursor:auto;a{color:", upload.color, ";}&:hover{border-color:", theme.color.border, ";}}}");
117
117
  });
118
118
  export var makeUploadDialogStyles = cache(function makeUploadDialogStyles(k) {
119
119
  return /*#__PURE__*/css(process.env.NODE_ENV === "production" ? {
@@ -0,0 +1,15 @@
1
+ import { Component, TypeDefs } from 'intact-react';
2
+ export interface ViewProps {
3
+ tag?: string;
4
+ }
5
+ /**
6
+ * A component only used in React or Vue to bind event, so that
7
+ * it can use Intact Event system to stop propagation (stopPropagation).
8
+ */
9
+ export declare class View extends Component<ViewProps> {
10
+ static template(this: View): import('intact-react').VNode<string>;
11
+ static typeDefs: Required<TypeDefs<ViewProps>>;
12
+ static defaults(): {
13
+ tag: string;
14
+ };
15
+ }
@@ -0,0 +1,30 @@
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
2
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
3
+ var _excluded = ["tag"];
4
+ import { Component, createVNode as h } from 'intact-react';
5
+ var typeDefs = {
6
+ tag: String
7
+ };
8
+ /**
9
+ * A component only used in React or Vue to bind event, so that
10
+ * it can use Intact Event system to stop propagation (stopPropagation).
11
+ */
12
+ export var View = /*#__PURE__*/function (_Component) {
13
+ _inheritsLoose(View, _Component);
14
+ function View() {
15
+ return _Component.apply(this, arguments) || this;
16
+ }
17
+ View.template = function template() {
18
+ var _this$get = this.get(),
19
+ tag = _this$get.tag,
20
+ rest = _objectWithoutPropertiesLoose(_this$get, _excluded);
21
+ return h(tag, rest);
22
+ };
23
+ View.defaults = function defaults() {
24
+ return {
25
+ tag: 'div'
26
+ };
27
+ };
28
+ return View;
29
+ }(Component);
30
+ View.typeDefs = typeDefs;
package/i18n/en-US.d.ts CHANGED
@@ -73,7 +73,7 @@ declare const i18n: {
73
73
  前往: string;
74
74
  页: string;
75
75
  '\u5171 {n} \u6761': string;
76
- '/(\u3112o\u3112)/~~ \u6CA1\u6709\u627E\u5230\u4EB2\u8981\u7684\u6570\u636E\u54E6~': string;
76
+ 暂无数据: string;
77
77
  重置: string;
78
78
  请输入: string;
79
79
  请选择: string;
package/i18n/en-US.js CHANGED
@@ -80,7 +80,7 @@ var i18n = {
80
80
  '页': '',
81
81
  '共 {n} 条': 'Total {n}',
82
82
  // table
83
- '/(ㄒoㄒ)/~~ 没有找到亲要的数据哦~': '/(ㄒoㄒ)/~~ No data to display.',
83
+ '暂无数据': 'No data to display.',
84
84
  '重置': 'Reset',
85
85
  // transfer
86
86
  '请输入': 'Please enter',
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @king-design v3.2.2-beta.0
2
+ * @king-design v3.3.0
3
3
  *
4
4
  * Copyright (c) Kingsoft Cloud
5
5
  * Released under the MIT License
@@ -24,9 +24,11 @@ export * from './components/config';
24
24
  export * from './components/copy';
25
25
  export * from './components/datepicker';
26
26
  export * from './components/dialog';
27
+ export * from './components/divider';
27
28
  export * from './components/drawer';
28
29
  export * from './components/dropdown';
29
30
  export * from './components/editable';
31
+ export * from './components/ellipsis';
30
32
  export * from './components/form';
31
33
  export * from './components/grid';
32
34
  export * from './components/icon';
@@ -59,8 +61,9 @@ export * from './components/transfer';
59
61
  export * from './components/tree';
60
62
  export * from './components/treeSelect';
61
63
  export * from './components/upload';
64
+ export * from './components/view';
62
65
  export * from './components/wave';
63
- export declare const version = "3.2.2-beta.0";
66
+ export declare const version = "3.3.0";
64
67
 
65
68
 
66
69
  export {normalize} from 'intact-react';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @king-design v3.2.2-beta.0
2
+ * @king-design v3.3.0
3
3
  *
4
4
  * Copyright (c) Kingsoft Cloud
5
5
  * Released under the MIT License
@@ -25,9 +25,11 @@ export * from './components/config';
25
25
  export * from './components/copy';
26
26
  export * from './components/datepicker';
27
27
  export * from './components/dialog';
28
+ export * from './components/divider';
28
29
  export * from './components/drawer';
29
30
  export * from './components/dropdown';
30
31
  export * from './components/editable';
32
+ export * from './components/ellipsis';
31
33
  export * from './components/form';
32
34
  export * from './components/grid';
33
35
  export * from './components/icon';
@@ -60,8 +62,9 @@ export * from './components/transfer';
60
62
  export * from './components/tree';
61
63
  export * from './components/treeSelect';
62
64
  export * from './components/upload';
65
+ export * from './components/view';
63
66
  export * from './components/wave';
64
- export var version = '3.2.2-beta.0';
67
+ export var version = '3.3.0';
65
68
  /* generate end */
66
69
 
67
70
  export {normalize} from 'intact-react';