@king-design/intact 3.4.3-beta.2 → 3.4.3

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 (126) hide show
  1. package/components/button/demos/disabled.md +14 -3
  2. package/components/button/index.vdt +1 -1
  3. package/components/button/styles.ts +14 -1
  4. package/components/dialog/styles.ts +3 -3
  5. package/components/dropdown/item.ts +7 -2
  6. package/components/editable/demos/textarea.md +53 -0
  7. package/components/editable/index.md +7 -1
  8. package/components/editable/index.spec.ts +27 -0
  9. package/components/editable/index.ts +4 -1
  10. package/components/editable/index.vdt +13 -4
  11. package/components/editable/styles.ts +1 -1
  12. package/components/ellipsis/demos/hoverable.md +23 -0
  13. package/components/ellipsis/index.ts +4 -1
  14. package/components/ellipsis/index.vdt +3 -1
  15. package/components/input/demos/size.md +9 -1
  16. package/components/input/styles.ts +12 -2
  17. package/components/menu/styles.ts +0 -3
  18. package/components/select/demos/immutable.md +7 -6
  19. package/components/select/index.spec.ts +31 -0
  20. package/components/select/useImmutable.ts +1 -1
  21. package/components/switch/styles.ts +5 -0
  22. package/components/table/cell.ts +1 -0
  23. package/components/table/cell.vdt +9 -2
  24. package/components/table/column.ts +2 -0
  25. package/components/table/demos/asyncTree.md +70 -0
  26. package/components/table/demos/ellipsis.md +29 -0
  27. package/components/table/demos/fixFooter.md +52 -0
  28. package/components/table/demos/footer.md +38 -0
  29. package/components/table/index.md +4 -0
  30. package/components/table/row.ts +26 -17
  31. package/components/table/row.vdt +2 -2
  32. package/components/table/styles.ts +24 -3
  33. package/components/table/table.ts +5 -0
  34. package/components/table/table.vdt +15 -2
  35. package/components/table/useTree.ts +9 -2
  36. package/components/tooltip/demos/content.md +17 -2
  37. package/components/tooltip/index.spec.ts +21 -2
  38. package/components/tooltip/tooltip.ts +2 -0
  39. package/components/treeSelect/demos/basic.md +1 -0
  40. package/components/treeSelect/index.vdt +1 -0
  41. package/es/components/button/index.vdt.js +1 -1
  42. package/es/components/button/styles.js +3 -3
  43. package/es/components/diagram/shapes/callout.d.ts +1 -1
  44. package/es/components/diagram/shapes/circle.d.ts +1 -1
  45. package/es/components/diagram/shapes/document.d.ts +1 -1
  46. package/es/components/diagram/shapes/ellipse.d.ts +1 -1
  47. package/es/components/diagram/shapes/hexagon.d.ts +1 -1
  48. package/es/components/diagram/shapes/image.d.ts +1 -1
  49. package/es/components/diagram/shapes/parallelogram.d.ts +1 -1
  50. package/es/components/diagram/shapes/rectangle.d.ts +1 -1
  51. package/es/components/diagram/shapes/square.d.ts +1 -1
  52. package/es/components/diagram/shapes/text.d.ts +1 -1
  53. package/es/components/dialog/styles.js +3 -3
  54. package/es/components/dropdown/item.js +5 -2
  55. package/es/components/editable/index.d.ts +2 -0
  56. package/es/components/editable/index.js +4 -2
  57. package/es/components/editable/index.spec.js +39 -0
  58. package/es/components/editable/index.vdt.js +17 -6
  59. package/es/components/editable/styles.d.ts +1 -0
  60. package/es/components/editable/styles.js +3 -0
  61. package/es/components/ellipsis/index.d.ts +1 -0
  62. package/es/components/ellipsis/index.js +4 -2
  63. package/es/components/ellipsis/index.vdt.js +3 -1
  64. package/es/components/input/styles.js +11 -1
  65. package/es/components/menu/styles.js +1 -1
  66. package/es/components/select/index.spec.js +47 -0
  67. package/es/components/switch/styles.js +1 -1
  68. package/es/components/table/cell.d.ts +1 -0
  69. package/es/components/table/cell.vdt.js +14 -3
  70. package/es/components/table/column.d.ts +1 -0
  71. package/es/components/table/column.js +1 -0
  72. package/es/components/table/row.d.ts +2 -1
  73. package/es/components/table/row.js +24 -15
  74. package/es/components/table/row.vdt.js +3 -1
  75. package/es/components/table/styles.js +2 -2
  76. package/es/components/table/table.d.ts +3 -0
  77. package/es/components/table/table.js +3 -1
  78. package/es/components/table/table.vdt.js +19 -3
  79. package/es/components/table/useTree.d.ts +1 -1
  80. package/es/components/table/useTree.js +30 -2
  81. package/es/components/tooltip/index.spec.js +99 -67
  82. package/es/components/tooltip/tooltip.d.ts +1 -0
  83. package/es/components/tooltip/tooltip.js +9 -1
  84. package/es/components/treeSelect/index.vdt.js +1 -0
  85. package/es/index.d.ts +2 -2
  86. package/es/index.js +2 -2
  87. package/es/site/data/components/button/demos/disabled/index.d.ts +1 -0
  88. package/es/site/data/components/button/demos/disabled/index.js +1 -0
  89. package/es/site/data/components/button/demos/disabled/react.d.ts +1 -0
  90. package/es/site/data/components/button/demos/disabled/react.js +27 -8
  91. package/es/site/data/components/editable/demos/textarea/index.d.ts +16 -0
  92. package/es/site/data/components/editable/demos/textarea/index.js +21 -0
  93. package/es/site/data/components/editable/demos/textarea/react.d.ts +17 -0
  94. package/es/site/data/components/editable/demos/textarea/react.js +72 -0
  95. package/es/site/data/components/ellipsis/demos/hoverable/index.d.ts +6 -0
  96. package/es/site/data/components/ellipsis/demos/hoverable/index.js +14 -0
  97. package/es/site/data/components/ellipsis/demos/hoverable/react.d.ts +5 -0
  98. package/es/site/data/components/ellipsis/demos/hoverable/react.js +21 -0
  99. package/es/site/data/components/input/demos/size/react.js +20 -0
  100. package/es/site/data/components/select/demos/immutable/index.d.ts +2 -2
  101. package/es/site/data/components/select/demos/immutable/index.js +1 -1
  102. package/es/site/data/components/select/demos/immutable/react.d.ts +1 -1
  103. package/es/site/data/components/select/demos/immutable/react.js +5 -5
  104. package/es/site/data/components/table/demos/asyncTree/index.d.ts +20 -0
  105. package/es/site/data/components/table/demos/asyncTree/index.js +53 -0
  106. package/es/site/data/components/table/demos/asyncTree/react.d.ts +20 -0
  107. package/es/site/data/components/table/demos/asyncTree/react.js +76 -0
  108. package/es/site/data/components/table/demos/ellipsis/index.d.ts +11 -0
  109. package/es/site/data/components/table/demos/ellipsis/index.js +24 -0
  110. package/es/site/data/components/table/demos/ellipsis/react.d.ts +10 -0
  111. package/es/site/data/components/table/demos/ellipsis/react.js +43 -0
  112. package/es/site/data/components/table/demos/fixFooter/index.d.ts +6 -0
  113. package/es/site/data/components/table/demos/fixFooter/index.js +14 -0
  114. package/es/site/data/components/table/demos/fixFooter/react.d.ts +5 -0
  115. package/es/site/data/components/table/demos/fixFooter/react.js +69 -0
  116. package/es/site/data/components/table/demos/footer/index.d.ts +12 -0
  117. package/es/site/data/components/table/demos/footer/index.js +25 -0
  118. package/es/site/data/components/table/demos/footer/react.d.ts +11 -0
  119. package/es/site/data/components/table/demos/footer/react.js +46 -0
  120. package/es/site/data/components/tooltip/demos/content/index.d.ts +2 -0
  121. package/es/site/data/components/tooltip/demos/content/index.js +3 -1
  122. package/es/site/data/components/tooltip/demos/content/react.d.ts +2 -0
  123. package/es/site/data/components/tooltip/demos/content/react.js +21 -3
  124. package/es/site/data/components/treeSelect/demos/basic/react.js +2 -1
  125. package/index.ts +2 -2
  126. package/package.json +2 -2
@@ -12,7 +12,7 @@ export declare class DHexagon extends DShape {
12
12
  rotatable?: boolean | undefined;
13
13
  editable?: boolean | undefined;
14
14
  connectable?: boolean | undefined;
15
- strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
15
+ strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
16
16
  label?: string | number | undefined;
17
17
  style?: Record<string, string | number> | undefined;
18
18
  data?: any;
@@ -18,7 +18,7 @@ export declare class DImage extends DShape<DImageProps> {
18
18
  rotatable?: boolean | undefined;
19
19
  editable?: boolean | undefined;
20
20
  connectable?: boolean | undefined;
21
- strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
21
+ strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
22
22
  label?: string | number | undefined;
23
23
  style?: Record<string, string | number> | undefined;
24
24
  data?: any;
@@ -12,7 +12,7 @@ export declare class DParallelogram extends DShape {
12
12
  rotatable?: boolean | undefined;
13
13
  editable?: boolean | undefined;
14
14
  connectable?: boolean | undefined;
15
- strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
15
+ strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
16
16
  label?: string | number | undefined;
17
17
  style?: Record<string, string | number> | undefined;
18
18
  data?: any;
@@ -18,7 +18,7 @@ export declare class DRectangle extends DShape<DRectangleProps> {
18
18
  rotatable?: boolean | undefined;
19
19
  editable?: boolean | undefined;
20
20
  connectable?: boolean | undefined;
21
- strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
21
+ strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
22
22
  label?: string | number | undefined;
23
23
  style?: Record<string, string | number> | undefined;
24
24
  data?: any;
@@ -13,7 +13,7 @@ export declare class DSquare extends DRectangle {
13
13
  rotatable?: boolean | undefined;
14
14
  editable?: boolean | undefined;
15
15
  connectable?: boolean | undefined;
16
- strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
16
+ strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
17
17
  label?: string | number | undefined;
18
18
  style?: Record<string, string | number> | undefined;
19
19
  data?: any;
@@ -12,7 +12,7 @@ export declare class DText extends DShape {
12
12
  rotatable?: boolean | undefined;
13
13
  editable?: boolean | undefined;
14
14
  connectable?: boolean | undefined;
15
- strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
15
+ strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
16
16
  label?: string | number | undefined;
17
17
  style?: Record<string, string | number> | undefined;
18
18
  data?: any;
@@ -58,11 +58,11 @@ var defaults = {
58
58
  padding: "0 24px",
59
59
  bodyMarginTop: "-25px",
60
60
  tipIconMarginBottom: '10px',
61
- tipIconFontSize: '37px',
62
- tipIconLineHeight: '37px',
61
+ tipIconFontSize: '24px',
62
+ tipIconLineHeight: '24px',
63
63
  // with title
64
64
  titleFontWeight: '500',
65
- titleTipIconFontSize: '37px',
65
+ titleTipIconFontSize: '24px',
66
66
  titleFontSize: '14px',
67
67
  wrapperPaddingLeft: '8px',
68
68
  titleBodyMarginTop: '-36px'
@@ -50,8 +50,11 @@ export var DropdownItem = /*#__PURE__*/function (_Component) {
50
50
  // hide all dropdowns
51
51
  var dropdown = this.dropdown;
52
52
  do {
53
- dropdown.hide(true);
54
- } while (dropdown = dropdown.dropdown);
53
+ if (!dropdown.$isTooltip) {
54
+ dropdown.hide(true);
55
+ }
56
+ dropdown = dropdown.dropdown;
57
+ } while (dropdown);
55
58
  }
56
59
  };
57
60
  _proto.hasSubMenu = function hasSubMenu() {
@@ -1,4 +1,5 @@
1
1
  import { Component, TypeDefs } from 'intact';
2
+ import type { AutoRows } from '../input';
2
3
  import type { Events } from '../types';
3
4
  type Value = string | number;
4
5
  export interface EditableProps<V extends Value = Value> {
@@ -10,6 +11,7 @@ export interface EditableProps<V extends Value = Value> {
10
11
  tip?: Value;
11
12
  trim?: boolean;
12
13
  invalid?: boolean;
14
+ rows?: string | number | 'auto' | AutoRows;
13
15
  }
14
16
  export interface EditableEvents<V extends Value = Value> {
15
17
  error: [string];
@@ -15,13 +15,15 @@ var typeDefs = {
15
15
  disabled: Boolean,
16
16
  tip: [String, Number],
17
17
  trim: Boolean,
18
- invalid: Boolean
18
+ invalid: Boolean,
19
+ rows: [String, Number, 'auto', Object]
19
20
  };
20
21
  var defaults = function defaults() {
21
22
  return {
22
23
  required: true,
23
24
  tip: _$('编辑'),
24
- trim: true
25
+ trim: true,
26
+ rows: 1
25
27
  };
26
28
  };
27
29
  var events = {
@@ -4,6 +4,7 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/con
4
4
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
5
5
  import BasicDemo from '~/components/editable/demos/basic';
6
6
  import ValidateDemo from '~/components/editable/demos/validate';
7
+ import TextAreaDemo from '~/components/editable/demos/textarea';
7
8
  import { mount, unmount, dispatchEvent, wait } from '../../test/utils';
8
9
  import { Editable } from './';
9
10
  import { Component, findDomFromVNode } from 'intact';
@@ -183,4 +184,42 @@ describe('Editable', function () {
183
184
  }
184
185
  }, _callee3);
185
186
  })));
187
+ it('should auto use input or textarea', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
188
+ var _mount4, instance, element, editable, input, textarea, textarea2;
189
+ return _regeneratorRuntime.wrap(function _callee4$(_context5) {
190
+ while (1) switch (_context5.prev = _context5.next) {
191
+ case 0:
192
+ _mount4 = mount(TextAreaDemo), instance = _mount4[0], element = _mount4[1];
193
+ editable = instance.refs.__test; // @ts-ignore
194
+ editable.edit();
195
+ _context5.next = 5;
196
+ return wait();
197
+ case 5:
198
+ expect(element.innerHTML).to.matchSnapshot();
199
+ input = element.querySelector('input');
200
+ textarea = element.querySelector('textarea');
201
+ expect(input).to.be.null;
202
+ textarea.value = 'test';
203
+ dispatchEvent(textarea, 'blur');
204
+ _context5.next = 13;
205
+ return wait();
206
+ case 13:
207
+ expect(instance.get('text')).to.eql('test');
208
+ editable.set('rows', 1);
209
+ _context5.next = 17;
210
+ return wait();
211
+ case 17:
212
+ // @ts-ignore
213
+ editable.edit();
214
+ _context5.next = 20;
215
+ return wait();
216
+ case 20:
217
+ textarea2 = element.querySelector('textarea');
218
+ expect(textarea2).to.be.null;
219
+ case 22:
220
+ case "end":
221
+ return _context5.stop();
222
+ }
223
+ }, _callee4);
224
+ })));
186
225
  });
@@ -5,6 +5,7 @@ import { Input } from '../input';
5
5
  import { Icon } from '../icon';
6
6
  import { makeStyles } from './styles';
7
7
  import { Tooltip } from '../tooltip';
8
+ import { isNullOrUndefined } from 'intact-shared';
8
9
  export default function ($props, $blocks, $__proto__) {
9
10
  var _classNameObj;
10
11
  $blocks || ($blocks = {});
@@ -18,21 +19,31 @@ export default function ($props, $blocks, $__proto__) {
18
19
  validate = _this$get.validate,
19
20
  disabled = _this$get.disabled,
20
21
  tip = _this$get.tip,
21
- invalid = _this$get.invalid;
22
+ invalid = _this$get.invalid,
23
+ rows = _this$get.rows;
22
24
  var k = this.config.k;
23
25
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-editable"] = true, _classNameObj[k + "-editing"] = editing, _classNameObj[k + "-disabled"] = disabled, _classNameObj[k + "-invalid"] = invalid, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
26
+ var isTextArea = !isNullOrUndefined(rows) && rows != '1';
27
+ var inputProps = _extends({
28
+ autoWidth: !isTextArea,
29
+ fluid: isTextArea
30
+ }, isTextArea && {
31
+ type: 'textarea'
32
+ }, {
33
+ rows: rows
34
+ }, (!isTextArea || rows === 'auto') && {
35
+ size: 'mini'
36
+ });
24
37
  return _$cv('div', _extends({}, getRestProps(this), {
25
38
  'className': _$cn(classNameObj)
26
- }), [_$ce(2, 'div', !editing ? children : _$cc(Input, {
27
- 'size': 'mini',
39
+ }), [_$ce(2, 'div', !editing ? children : _$cc(Input, _extends({
28
40
  'defaultValue': value,
29
41
  'ev-blur': this.onBlur,
30
42
  'ev-keydown': this.onKeydown,
31
43
  'ref': this.inputRef,
32
44
  'frozenOnInput': true,
33
- 'ev-$mounted': this.select,
34
- 'autoWidth': true
35
- }, null, this.inputRef), 0, 'c-ellipsis'), !disabled && !editing ? _$cc(Tooltip, {
45
+ 'ev-$mounted': this.select
46
+ }, inputProps), null, this.inputRef), 0, 'c-ellipsis'), !disabled && !editing ? _$cc(Tooltip, {
36
47
  'content': tip,
37
48
  'children': _$cc(Icon, {
38
49
  'className': _$cn(k + "-icon-edit " + k + "-editable-icon"),
@@ -1,6 +1,7 @@
1
1
  import '../../styles/global';
2
2
  declare const defaults: {
3
3
  iconGap: string;
4
+ readonly smallPadding: string;
4
5
  invalid: {
5
6
  readonly border: string;
6
7
  };
@@ -5,6 +5,9 @@ import '../../styles/global';
5
5
  import { cache } from '../utils';
6
6
  var defaults = {
7
7
  iconGap: '0 0 0 8px',
8
+ get smallPadding() {
9
+ return theme.small.padding;
10
+ },
8
11
  // invalid
9
12
  invalid: {
10
13
  get border() {
@@ -6,6 +6,7 @@ export interface EllipsisProps {
6
6
  disabled?: boolean;
7
7
  position?: Position | 'left' | 'bottom' | 'right' | 'top';
8
8
  theme?: 'light' | 'dark';
9
+ hoverable?: boolean;
9
10
  }
10
11
  export declare class Ellipsis extends Component<EllipsisProps> {
11
12
  static template: string | import("intact").Template<any>;
@@ -8,12 +8,14 @@ var typeDefs = {
8
8
  maxLines: Number,
9
9
  disabled: Boolean,
10
10
  position: [Object, 'left', 'bottom', 'right', 'top'],
11
- theme: ['light', 'dark']
11
+ theme: ['light', 'dark'],
12
+ hoverable: Boolean
12
13
  };
13
14
  var defaults = function defaults() {
14
15
  return {
15
16
  disabled: false,
16
- theme: 'light'
17
+ theme: 'light',
18
+ hoverable: false
17
19
  };
18
20
  };
19
21
  export var Ellipsis = /*#__PURE__*/function (_Component) {
@@ -15,7 +15,8 @@ export default function ($props, $blocks, $__proto__) {
15
15
  disabled = _this$get.disabled,
16
16
  position = _this$get.position,
17
17
  theme = _this$get.theme,
18
- style = _this$get.style;
18
+ style = _this$get.style,
19
+ hoverable = _this$get.hoverable;
19
20
  var k = this.config.k;
20
21
  var _this$ellipsis = this.ellipsis,
21
22
  showTooltip = _this$ellipsis.showTooltip,
@@ -31,6 +32,7 @@ export default function ($props, $blocks, $__proto__) {
31
32
  'position': position,
32
33
  'theme': theme,
33
34
  'className': _$cn(className),
35
+ 'hoverable': hoverable,
34
36
  'children': wrapper,
35
37
  '$blocks': function ($blocks) {
36
38
  var _$blocks = {},
@@ -6,6 +6,12 @@ import { deepDefaults, sizes } from '../../styles/utils';
6
6
  import '../../styles/global';
7
7
  import { Input } from './';
8
8
  import { cache } from '../utils';
9
+ var textareaSize = {
10
+ mini: '0',
11
+ small: '1px',
12
+ default: '5px',
13
+ large: '7px'
14
+ };
9
15
  var defaults = deepDefaults({
10
16
  get transition() {
11
17
  return theme.transition.middle;
@@ -85,6 +91,7 @@ var defaults = deepDefaults({
85
91
  }
86
92
  }, sizes.reduce(function (memo, size) {
87
93
  var styles = theme[size];
94
+ var textareaStyles = textareaSize[size];
88
95
  memo[size] = {
89
96
  get fontSize() {
90
97
  return styles.fontSize;
@@ -94,6 +101,9 @@ var defaults = deepDefaults({
94
101
  },
95
102
  get paddingGap() {
96
103
  return styles.padding;
104
+ },
105
+ get padding() {
106
+ return textareaStyles;
97
107
  }
98
108
  };
99
109
  return memo;
@@ -110,7 +120,7 @@ export var makeStyles = cache(function makeStyles(k) {
110
120
  var _context;
111
121
  return /*#__PURE__*/css("display:inline-block;width:", input.width, ";color:", input.color, ";vertical-align:middle;.", k, "-input-wrapper{display:inline-flex;align-items:center;width:100%;position:relative;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";&:hover{border:", input.hoverBorder, ";z-index:1;}}&.", k, "-focus .", k, "-input-wrapper{border:", input.focusBorder, ";z-index:1;}.", k, "-input-inner{flex:1;outline:none;color:inherit;font-size:inherit;border:none;background:transparent;padding:0;width:0;max-width:100%;&::placeholder{color:", input.placeholderColor, ";}}&.", k, "-fluid{width:100%;}.", k, "-input-prefix,.", k, "-input-suffix{display:flex;align-items:center;gap:", input.clearIconGap, ";color:", theme.color.lightBlack, ";position:relative;}.", k, "-input-prefix{margin-right:", input.clearIconGap, ";}.", k, "-input-suffix{margin-left:", input.clearIconGap, ";}.", k, "-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";}&:hover .", k, "-input-clear.", k, "-input-show{opacity:1;pointer-events:all;}.", k, "-input-show-password{color:", input.clearIconColor, ";}&.", k, "-stack-clear{.", k, "-input-clear{position:absolute;z-index:1;right:0;&.", k, "-input-show+*{transition:opacity ", input.transition, ";}}&:hover{.", k, "-input-clear.", k, "-input-show+*{opacity:0;}}}&.", k, "-group{display:inline-flex;.", k, "-input-wrapper{border-radius:0;flex:1;}.", k, "-input-wrapper:first-child{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}.", k, "-input-wrapper:last-child{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-prepend,.", k, "-input-append{display:inline-flex;align-items:center;background-color:", input.groupBgColor, ";border:", input.border, ";white-space:nowrap;.", k, "-btn{margin:-1px;&.", k, "-none:hover{background:transparent;}}.", k, "-select{margin:-1px;text-align:left;}}.", k, "-input-prepend{&,.", k, "-btn,.", k, "-select{z-index:1;border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}}.", k, "-input-append{&,.", k, "-btn,.", k, "-select{z-index:1;border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-padding{padding:0 ", input.groupPaddingGap, ";}.", k, "-input-prepend{border-right:none;}.", k, "-input-append{border-left:none;}&.", k, "-flat{color:", _flatInstanceProperty(input).color, ";.", k, "-input-wrapper{border:none;background:", _flatInstanceProperty(input).bgColor, ";}}&.", k, "-disabled{color:", input.disabledColor, ";cursor:not-allowed;.", k, "-input-wrapper{border-color:", input.disabledBorderColor, ";background:", input.disabledBgColor, ";}.", k, "-input-inner{cursor:not-allowed;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
112
122
  var styles = input[size];
113
- var sizeClassName = /*#__PURE__*/css("font-size:", styles.fontSize, ";.", k, "-input-wrapper{height:", styles.height, ";padding:0 ", styles.paddingGap, ";}");
123
+ var sizeClassName = /*#__PURE__*/css("font-size:", styles.fontSize, ";.", k, "-input-wrapper{height:", styles.height, ";padding:0 ", styles.paddingGap, ";.", k, "-textarea{padding:", styles.padding, " ", styles.paddingGap, ";}}");
114
124
  if (size === 'default') return sizeClassName;
115
125
  return /*#__PURE__*/css("&.", k, "-", size, "{", sizeClassName, ";}");
116
126
  }), "&.", k, "-inline{.", k, "-input-wrapper{height:auto;border:none;border-radius:0;padding:0;}}&.", k, "-type-textarea{.", k, "-input-wrapper{display:inline-block;padding:0;height:auto;}.", k, "-textarea{width:100%;padding:", input.textareaPadding, ";line-height:1.5;vertical-align:top;}.", k, "-input-suffix{margin:0;justify-content:flex-end;}}", _mapInstanceProperty(_context = Input.typeDefs.resize).call(_context, function (type) {
@@ -115,7 +115,7 @@ export var makeMenuStyles = cache(function makeMenuStyles(k) {
115
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
- }), "&.", 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-header{padding:0;}.", k, "-menu-header{padding:0;}.", 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, ";}}}");
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-header{padding:0;}.", 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, ";}}}");
119
119
  });
120
120
  export var makeTitleStyles = cache(function makeTitleStyles(k) {
121
121
  var item = menu.item;
@@ -13,6 +13,7 @@ import { Tooltip } from '../tooltip';
13
13
  import { Component } from 'intact';
14
14
  import { Select, Option } from '../select';
15
15
  import SearchableDemo from '~/components/select/demos/searchable';
16
+ import ImmutableDemo from '~/components/select/demos/immutable';
16
17
  describe('Select', function () {
17
18
  afterEach(function (done) {
18
19
  unmount();
@@ -449,6 +450,52 @@ describe('Select', function () {
449
450
  }
450
451
  }, _callee10);
451
452
  })));
453
+ it('disabled option does not allow clearable and close', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
454
+ var _mount12, instance, element, _element$querySelecto7, clear1, _element$querySelecto8, tag1, _element$querySelecto9, clear2, _element$querySelecto10, clear3;
455
+ return _regeneratorRuntime.wrap(function _callee11$(_context13) {
456
+ while (1) switch (_context13.prev = _context13.next) {
457
+ case 0:
458
+ _mount12 = mount(ImmutableDemo), instance = _mount12[0], element = _mount12[1];
459
+ instance.set('days', ['Tuesday', 'Friday']);
460
+ _context13.next = 4;
461
+ return wait();
462
+ case 4:
463
+ expect(element.outerHTML).to.matchSnapshot();
464
+ _element$querySelecto7 = element.querySelectorAll('.k-select-clear'), clear1 = _element$querySelecto7[0];
465
+ clear1.click();
466
+ _context13.next = 9;
467
+ return wait();
468
+ case 9:
469
+ _element$querySelecto8 = element.querySelectorAll('.k-tag'), tag1 = _element$querySelecto8[0];
470
+ expect(tag1.className).not.contain("k-closable");
471
+ expect(instance.get('days')).to.eql(['Tuesday', 'Friday']);
472
+ instance.set('days', ['Monday', 'Tuesday']);
473
+ _context13.next = 15;
474
+ return wait();
475
+ case 15:
476
+ _element$querySelecto9 = element.querySelectorAll('.k-select-clear'), clear2 = _element$querySelecto9[0];
477
+ clear2.click();
478
+ _context13.next = 19;
479
+ return wait();
480
+ case 19:
481
+ expect(instance.get('days')).to.eql(['Tuesday']);
482
+ instance.set('days', ['Monday', 'Wednesday']);
483
+ _context13.next = 23;
484
+ return wait();
485
+ case 23:
486
+ _element$querySelecto10 = element.querySelectorAll('.k-select-clear'), clear3 = _element$querySelecto10[0];
487
+ clear3.click();
488
+ _context13.next = 27;
489
+ return wait();
490
+ case 27:
491
+ expect(instance.get('days')).to.eql([]);
492
+ // expect(clear).to.be.null;
493
+ case 28:
494
+ case "end":
495
+ return _context13.stop();
496
+ }
497
+ }, _callee11);
498
+ })));
452
499
  // it('should trigger change event correctly', async () => {
453
500
  // const spy = sinon.spy();
454
501
  // class Demo extends Component {
@@ -78,5 +78,5 @@ export var makeStyles = cache(function makeStyles(k) {
78
78
  padding = _kswitch$size.padding,
79
79
  iconSize = _kswitch$size.iconSize;
80
80
  return /*#__PURE__*/css("&.", k, "-", size, ",&.", k, "-", size, " .", k, "-switch-on,&.", k, "-", size, " .", k, "-switch-off{width:", width, ";height:", height, ";}&.", k, "-", size, "{border-radius:", height, ";.", k, "-switch-bar{width:", height, ";border-radius:", height, ";}.", k, "-switch-wrapper{padding:", padding, ";}.", k, "-switch-on,.", k, "-switch-off{line-height:", height, ";left:0;}.", k, "-switch-on{padding:0 ", height, " 0 calc(", height, " / 3);}.", k, "-switch-off{padding:0 calc(", height, " / 3) 0 ", height, ";}.", k, "-switch-icon{font-size:", iconSize, ";}}");
81
- }), "&.", k, "-checked{.", k, "-switch-bar,.", k, "-switch-wrapper{background:", kswitch.checked.bgColor, ";}.", k, "-switch-bar{width:100%;}&:hover{.", k, "-switch-bar,.", k, "-switch-wrapper{background:", kswitch.checked.hoverBgColor, ";}}}&.", k, "-disabled{&,.", k, "-switch-handle{cursor:not-allowed;}&,.", k, "-switch-bar,.", k, "-switch-wrapper{background:", kswitch.disabledBgColor, ";}&.", k, "-checked{&,.", k, "-switch-bar,.", k, "-switch-wrapper{background:", kswitch.checked.disabledBgColor, ";}}}");
81
+ }), " &.", k, "-small .", k, "-switch-on,&.", k, "-small .", k, "-switch-off{font-size:10px;}&.", k, "-checked{.", k, "-switch-bar,.", k, "-switch-wrapper{background:", kswitch.checked.bgColor, ";}.", k, "-switch-bar{width:100%;}&:hover{.", k, "-switch-bar,.", k, "-switch-wrapper{background:", kswitch.checked.hoverBgColor, ";}}}&.", k, "-disabled{&,.", k, "-switch-handle{cursor:not-allowed;}&,.", k, "-switch-bar,.", k, "-switch-wrapper{background:", kswitch.disabledBgColor, ";}&.", k, "-checked{&,.", k, "-switch-bar,.", k, "-switch-wrapper{background:", kswitch.checked.disabledBgColor, ";}}}");
82
82
  });
@@ -15,6 +15,7 @@ export interface TableCellProps {
15
15
  rowspan: number;
16
16
  onClickArrow: (e: MouseEvent) => void;
17
17
  hasChildren: boolean;
18
+ loaded: boolean;
18
19
  }
19
20
  export declare class TableCell extends Component<TableCellProps> {
20
21
  static template: string | import("intact").Template<any>;
@@ -1,9 +1,10 @@
1
- import { createElementVNode as _$ce, createUnknownComponentVNode as _$cc, className as _$cn } from 'intact';
1
+ import { createUnknownComponentVNode as _$cc, createElementVNode as _$ce, className as _$cn } from 'intact';
2
2
  import { getClassAndStyleForFixed } from './useFixedColumns';
3
3
  import { get, noop } from 'intact-shared';
4
4
  import { Button } from '../button';
5
5
  import { Icon } from '../icon';
6
6
  import { getTextByChildren } from '../utils';
7
+ import { Ellipsis } from '../ellipsis';
7
8
  export default function ($props, $blocks, $__proto__) {
8
9
  var _classNameObj;
9
10
  $blocks || ($blocks = {});
@@ -21,7 +22,8 @@ export default function ($props, $blocks, $__proto__) {
21
22
  colspan = _this$get.colspan,
22
23
  rowspan = _this$get.rowspan,
23
24
  onClickArrow = _this$get.onClickArrow,
24
- hasChildren = _this$get.hasChildren;
25
+ hasChildren = _this$get.hasChildren,
26
+ loaded = _this$get.loaded;
25
27
  var k = this.config.k;
26
28
  var blocks = props.$blocks;
27
29
  var children = get(data, props.key);
@@ -31,6 +33,11 @@ export default function ($props, $blocks, $__proto__) {
31
33
  children = template(noop, [data, rowIndex]);
32
34
  }
33
35
  }
36
+ if (props.ellipsis) {
37
+ children = _$cc(Ellipsis, {
38
+ 'children': children
39
+ });
40
+ }
34
41
  var _getClassAndStyleForF = getClassAndStyleForFixed(props, offset, k, checkType),
35
42
  className = _getClassAndStyleForF.className,
36
43
  style = _getClassAndStyleForF.style;
@@ -46,9 +53,13 @@ export default function ($props, $blocks, $__proto__) {
46
53
  'size': 'mini',
47
54
  'className': _$cn(k + "-table-arrow"),
48
55
  'ev-click': onClickArrow,
49
- 'children': _$cc(Icon, {
56
+ 'disabled': loaded === false,
57
+ 'children': loaded !== false ? _$cc(Icon, {
50
58
  'className': _$cn(k + "-icon-right"),
51
59
  'size': 'small'
60
+ }) : _$cc(Icon, {
61
+ 'className': _$cn(k + "-tree-icon ion-load-c"),
62
+ 'rotate': true
52
63
  })
53
64
  }) : undefined, children], 0, _$cn(classNameObj), {
54
65
  'style': style,
@@ -14,6 +14,7 @@ export interface TableColumnProps {
14
14
  exportCell?: (data: any, index: number) => string;
15
15
  minWidth?: number;
16
16
  hidden?: boolean;
17
+ ellipsis?: boolean;
17
18
  cols?: number;
18
19
  rows?: number;
19
20
  prevVNode?: VNodeComponentClass<TableColumn> | null;
@@ -22,6 +22,7 @@ var typeDefs = {
22
22
  exportCell: Function,
23
23
  minWidth: Number,
24
24
  hidden: Boolean,
25
+ ellipsis: Boolean,
25
26
  // offset: null,
26
27
  cols: null,
27
28
  rows: null,
@@ -20,10 +20,11 @@ export interface TableRowProps {
20
20
  spreaded: boolean;
21
21
  hasChildren: boolean;
22
22
  indent: number;
23
- onToggleSpreadRow: (key: TableRowKey) => void;
23
+ onToggleSpreadRow: (key: TableRowKey, rowData?: any) => void;
24
24
  onBeforeUnmount: (key: TableRowKey) => void;
25
25
  offsetMap: Record<Key, number>;
26
26
  animation: boolean;
27
+ loaded: boolean;
27
28
  draggable: boolean;
28
29
  draggingKey: TableRowKey | null;
29
30
  onRowDragStart: DragCallback;
@@ -6,6 +6,7 @@ import template from './row.vdt';
6
6
  import { bind } from '../utils';
7
7
  import { isEqualObject } from '../utils';
8
8
  import { useConfigContext } from '../config';
9
+ import { hasOwn } from 'intact-shared';
9
10
  export var TableRow = /*#__PURE__*/function (_Component) {
10
11
  _inheritsLoose(TableRow, _Component);
11
12
  function TableRow() {
@@ -23,19 +24,26 @@ export var TableRow = /*#__PURE__*/function (_Component) {
23
24
  var lastProps = lastVNode.props;
24
25
  var nextProps = nextVNode.props;
25
26
  var isSame = true;
26
- var key;
27
- for (key in lastProps) {
28
- // ignore index
29
- if (key === 'index') continue;
30
- var lastValue = lastProps[key];
31
- var nextValue = nextProps[key];
32
- // deeply compare for offsetMap
33
- if (key === 'offsetMap' && isEqualObject(lastValue, nextValue)) {
34
- continue;
35
- }
36
- if (lastValue !== nextValue) {
37
- isSame = false;
38
- break;
27
+ if (hasOwn.call(this, 'vueInstance')) {
28
+ // In Vue, we may change value by modifing the same reference,
29
+ // and the new row may be expanded by click tree arrow
30
+ // so we can not compare in this case, #1030
31
+ isSame = false;
32
+ } else {
33
+ var key;
34
+ for (key in lastProps) {
35
+ // ignore index
36
+ if (key === 'index') continue;
37
+ var lastValue = lastProps[key];
38
+ var nextValue = nextProps[key];
39
+ // deeply compare for offsetMap
40
+ if (key === 'offsetMap' && isEqualObject(lastValue, nextValue)) {
41
+ continue;
42
+ }
43
+ if (lastValue !== nextValue) {
44
+ isSame = false;
45
+ break;
46
+ }
39
47
  }
40
48
  }
41
49
  if (!isSame) {
@@ -70,8 +78,9 @@ export var TableRow = /*#__PURE__*/function (_Component) {
70
78
  e.stopPropagation();
71
79
  var _this$get3 = this.get(),
72
80
  onToggleSpreadRow = _this$get3.onToggleSpreadRow,
73
- key = _this$get3.key;
74
- onToggleSpreadRow(key);
81
+ key = _this$get3.key,
82
+ data = _this$get3.data;
83
+ onToggleSpreadRow(key, data);
75
84
  };
76
85
  _proto.onMouseEnter = function onMouseEnter(e) {
77
86
  // for tooltip
@@ -33,7 +33,8 @@ export default function ($props, $blocks, $__proto__) {
33
33
  offsetMap = _this$get.offsetMap,
34
34
  draggable = _this$get.draggable,
35
35
  draggingKey = _this$get.draggingKey,
36
- animation = _this$get.animation;
36
+ animation = _this$get.animation,
37
+ loaded = _this$get.loaded;
37
38
  var k = this.config.k;
38
39
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-disabled"] = disabled, _classNameObj[k + "-checked"] = checked, _classNameObj[k + "-selected"] = selected, _classNameObj[k + "-spreaded"] = spreaded, _classNameObj[k + "-dragging"] = draggingKey === key, _classNameObj[className] = className, _classNameObj);
39
40
  var getGridItem = function getGridItem(columnIndex) {
@@ -82,6 +83,7 @@ export default function ($props, $blocks, $__proto__) {
82
83
  'columnIndex': columnIndex,
83
84
  'rowIndex': rowIndex,
84
85
  'data': data,
86
+ 'loaded': loaded,
85
87
  'offset': offsetMap[columnKey],
86
88
  'checkType': checkType,
87
89
  'indent': indent,
@@ -90,9 +90,9 @@ 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%);}&.", 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, "-hidden{display:none;}.", 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-collapse:separate;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}tfoot{z-index:2;tr{td{border-top:", 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, "-hidden{display:none;}.", 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
- }), ">.", k, "-pagination{margin:16px 0;}&.", k, "-fix-header{min-height:0;.", k, "-table-wrapper{height:100%;}}");
95
+ }), ">.", k, "-pagination{margin:16px 0;}&.", k, "-fix-header{min-height:0;.", k, "-table-wrapper{height:100%;}thead{position:sticky;top:0;}}&.", k, "-fix-footer{min-height:0;.", k, "-table-wrapper{height:100%;}tfoot{position:sticky;bottom:0;}}");
96
96
  });
97
97
  export var makeGroupMenuStyles = cache(function makeGroupMenuStyles(k) {
98
98
  return /*#__PURE__*/css("min-width:", table.group.menuMinWidth, "!important;.", k, "-dropdown-item.", k, "-active{color:", table.group.activeColor, ";}.", k, "-table-group-header{padding:", table.group.headerPadding, ";border-bottom:", table.group.headerBorder, ";}.", k, "-table-group-body{max-height:", table.group.menuMaxHeight, ";overflow:auto;}.", k, "-table-group-footer{text-align:right;border-top:", table.group.headerBorder, ";padding:8px;.", k, "-btn{margin-left:8px;}}");