@king-design/intact 3.4.3-beta.0 → 3.4.3-beta.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 (93) hide show
  1. package/components/button/demos/disabled.md +4 -14
  2. package/components/button/index.vdt +1 -1
  3. package/components/button/styles.ts +1 -14
  4. package/components/dialog/styles.ts +3 -3
  5. package/components/dropdown/item.ts +2 -7
  6. package/components/editable/index.spec.ts +8 -8
  7. package/components/editable/index.vdt +1 -3
  8. package/components/editable/styles.ts +1 -8
  9. package/components/ellipsis/index.vdt +0 -1
  10. package/components/select/base.ts +1 -7
  11. package/components/select/base.vdt +1 -2
  12. package/components/switch/index.ts +1 -1
  13. package/components/table/cell.ts +0 -1
  14. package/components/table/cell.vdt +2 -8
  15. package/components/table/column.ts +0 -2
  16. package/components/table/index.md +0 -3
  17. package/components/table/row.ts +3 -4
  18. package/components/table/row.vdt +2 -2
  19. package/components/table/styles.ts +1 -1
  20. package/components/table/table.ts +0 -3
  21. package/components/table/table.vdt +2 -10
  22. package/components/table/useGroup.ts +1 -1
  23. package/components/table/useTree.ts +2 -9
  24. package/components/tooltip/tooltip.ts +0 -2
  25. package/components/treeSelect/demos/basic.md +0 -1
  26. package/components/treeSelect/index.vdt +0 -1
  27. package/es/components/button/index.vdt.js +1 -1
  28. package/es/components/button/styles.js +3 -3
  29. package/es/components/diagram/shapes/callout.d.ts +1 -1
  30. package/es/components/diagram/shapes/circle.d.ts +1 -1
  31. package/es/components/diagram/shapes/document.d.ts +1 -1
  32. package/es/components/diagram/shapes/ellipse.d.ts +1 -1
  33. package/es/components/diagram/shapes/hexagon.d.ts +1 -1
  34. package/es/components/diagram/shapes/image.d.ts +1 -1
  35. package/es/components/diagram/shapes/parallelogram.d.ts +1 -1
  36. package/es/components/diagram/shapes/rectangle.d.ts +1 -1
  37. package/es/components/diagram/shapes/square.d.ts +1 -1
  38. package/es/components/diagram/shapes/text.d.ts +1 -1
  39. package/es/components/dialog/styles.js +3 -3
  40. package/es/components/dropdown/item.js +2 -5
  41. package/es/components/editable/index.spec.js +8 -8
  42. package/es/components/editable/index.vdt.js +1 -3
  43. package/es/components/editable/styles.d.ts +0 -1
  44. package/es/components/editable/styles.js +1 -4
  45. package/es/components/ellipsis/index.vdt.js +0 -1
  46. package/es/components/select/base.d.ts +0 -4
  47. package/es/components/select/base.js +1 -11
  48. package/es/components/select/base.vdt.js +1 -2
  49. package/es/components/switch/index.js +1 -1
  50. package/es/components/table/cell.d.ts +0 -1
  51. package/es/components/table/cell.vdt.js +3 -13
  52. package/es/components/table/column.d.ts +0 -1
  53. package/es/components/table/column.js +0 -1
  54. package/es/components/table/row.d.ts +1 -2
  55. package/es/components/table/row.js +2 -3
  56. package/es/components/table/row.vdt.js +1 -3
  57. package/es/components/table/styles.js +1 -1
  58. package/es/components/table/table.d.ts +0 -2
  59. package/es/components/table/table.js +1 -2
  60. package/es/components/table/table.vdt.js +0 -14
  61. package/es/components/table/useGroup.js +1 -1
  62. package/es/components/table/useTree.d.ts +1 -1
  63. package/es/components/table/useTree.js +2 -30
  64. package/es/components/tooltip/tooltip.d.ts +0 -1
  65. package/es/components/tooltip/tooltip.js +1 -9
  66. package/es/components/treeSelect/index.vdt.js +0 -1
  67. package/es/index.d.ts +2 -2
  68. package/es/index.js +2 -2
  69. package/es/site/data/components/button/demos/disabled/index.d.ts +0 -1
  70. package/es/site/data/components/button/demos/disabled/index.js +0 -1
  71. package/es/site/data/components/button/demos/disabled/react.d.ts +0 -1
  72. package/es/site/data/components/button/demos/disabled/react.js +15 -28
  73. package/es/site/data/components/treeSelect/demos/basic/react.js +1 -2
  74. package/index.ts +2 -2
  75. package/package.json +2 -2
  76. package/components/select/demos/immutable.md +0 -38
  77. package/components/select/useImmutable.ts +0 -46
  78. package/components/table/demos/asyncTree.md +0 -70
  79. package/components/table/demos/footer.md +0 -38
  80. package/es/components/select/useImmutable.d.ts +0 -4
  81. package/es/components/select/useImmutable.js +0 -46
  82. package/es/site/data/components/select/demos/immutable/index.d.ts +0 -9
  83. package/es/site/data/components/select/demos/immutable/index.js +0 -18
  84. package/es/site/data/components/select/demos/immutable/react.d.ts +0 -9
  85. package/es/site/data/components/select/demos/immutable/react.js +0 -53
  86. package/es/site/data/components/table/demos/asyncTree/index.d.ts +0 -20
  87. package/es/site/data/components/table/demos/asyncTree/index.js +0 -53
  88. package/es/site/data/components/table/demos/asyncTree/react.d.ts +0 -20
  89. package/es/site/data/components/table/demos/asyncTree/react.js +0 -76
  90. package/es/site/data/components/table/demos/footer/index.d.ts +0 -12
  91. package/es/site/data/components/table/demos/footer/index.js +0 -25
  92. package/es/site/data/components/table/demos/footer/react.d.ts +0 -11
  93. package/es/site/data/components/table/demos/footer/react.js +0 -46
@@ -10,19 +10,9 @@ import {Button, Icon} from 'kpc';
10
10
 
11
11
  <div>
12
12
  <Button disabled>disabled</Button>
13
- <Button type="primary" disabled>primary</Button>
14
- <Button type="secondary" disabled>secondary</Button>
15
- <Button type="warning" disabled>warning</Button>
16
- <Button type="danger" disabled>danger</Button>
17
- <Button type="success" disabled>success</Button>
18
- <Button type="none" disabled>none</Button>
19
- <Button type="link" disabled>link</Button>
20
- <Button type="flat" disabled>flat</Button>
21
- <Button color="red" disabled>custom</Button>
13
+ <Button disabled type="none">disabled text</Button>
14
+ <Button disabled icon circle><Icon class="k-icon-search" /></Button>
15
+ <Button disabled type="link">link</Button>
16
+ <Button disabled type="flat">flat</Button>
22
17
  </div>
23
18
  ```
24
-
25
- ```styl
26
- .k-btn
27
- margin 0 20px 20px 0
28
- ```
@@ -49,9 +49,9 @@ const classNameObj = {
49
49
  [cls('loading')]: loading,
50
50
  [cls('fluid')]: fluid,
51
51
  [cls('active')]: checked,
52
- [cls('custom')]: color,
53
52
  [cls('disabled')]: disabled || loading,
54
53
  [cls('ghost')]: ghost,
54
+ [cls('custom')]: color,
55
55
  [makeButtonStyles(k, iconSide, color)]: true,
56
56
  };
57
57
 
@@ -31,7 +31,7 @@ const sizes = ['large', 'small', 'mini'] as const;
31
31
  const btnStyles = {
32
32
  get color() { return theme.color.text },
33
33
  bgColor: '#fff',
34
- lineHeight: '1',
34
+ lineHeight: '1.15',
35
35
  get padding() { return `0 16px` },
36
36
  get borderColor() { return theme.color.border },
37
37
  get borderRadius() { return theme.borderRadius },
@@ -230,13 +230,6 @@ export const makeButtonStyles = cache(function makeButtonStyles(k: string, iconS
230
230
  background: ${palette(typeStyles.bgColor, 1)};
231
231
  border-color: ${palette(typeStyles.borderColor, 1)};
232
232
  }
233
- &.${k}-disabled {
234
- &, &:hover {
235
- background: ${palette(typeStyles.bgColor, -2)};
236
- color: ${palette(typeStyles.color, -2)};
237
- border-color: ${palette(typeStyles.borderColor, -2)};
238
- }
239
- }
240
233
  }
241
234
  `;
242
235
  })}
@@ -252,9 +245,6 @@ export const makeButtonStyles = cache(function makeButtonStyles(k: string, iconS
252
245
  &:active {
253
246
  background: ${secondary.activeBgColor};
254
247
  }
255
- &.${k}-disabled {
256
- border: none;
257
- }
258
248
  }
259
249
 
260
250
 
@@ -270,9 +260,6 @@ export const makeButtonStyles = cache(function makeButtonStyles(k: string, iconS
270
260
  &:active {
271
261
  background: ${palette(color, -3)};
272
262
  }
273
- &.${k}-disabled {
274
- border: none;
275
- }
276
263
  }
277
264
  `}
278
265
 
@@ -52,12 +52,12 @@ const defaults = {
52
52
  padding: `0 24px`,
53
53
  bodyMarginTop: `-25px`,
54
54
  tipIconMarginBottom: '10px',
55
- tipIconFontSize: '24px',
56
- tipIconLineHeight: '24px',
55
+ tipIconFontSize: '37px',
56
+ tipIconLineHeight: '37px',
57
57
 
58
58
  // with title
59
59
  titleFontWeight: '500',
60
- titleTipIconFontSize: '24px',
60
+ titleTipIconFontSize: '37px',
61
61
  titleFontSize: '14px',
62
62
  wrapperPaddingLeft: '8px',
63
63
  titleBodyMarginTop: '-36px',
@@ -7,7 +7,6 @@ import {DropdownMenu, DROPDOWN_MENU} from './menu';
7
7
  import {IgnoreClickEvent} from '../../hooks/useDocumentClick';
8
8
  import { Dropdown as ExportDropdown, DropdownMenu as ExportDropdownMenu } from '.';
9
9
  import { useConfigContext } from '../config';
10
- import type { Tooltip } from '../tooltip/tooltip';
11
10
 
12
11
  export interface DropdownItemProps {
13
12
  disabled?: boolean
@@ -62,12 +61,8 @@ export class DropdownItem extends Component<DropdownItemProps, DropdownItemEvent
62
61
  if (this.get('hideOnSelect')) {
63
62
  // hide all dropdowns
64
63
  let dropdown = this.dropdown;
65
- do {
66
- if (!(dropdown as Tooltip).$isTooltip) {
67
- dropdown!.hide(true);
68
- }
69
- dropdown = dropdown!.dropdown;
70
- } while (dropdown);
64
+ do { dropdown!.hide(true); }
65
+ while (dropdown = dropdown!.dropdown);
71
66
  }
72
67
  }
73
68
 
@@ -17,7 +17,7 @@ describe('Editable', () => {
17
17
  expect(element.innerHTML).to.matchSnapshot();
18
18
 
19
19
  // input
20
- let input = element.querySelector('textarea') as HTMLTextAreaElement;
20
+ let input = element.querySelector('input') as HTMLInputElement;
21
21
  input.value = 'test';
22
22
  dispatchEvent(input, 'blur');
23
23
  await wait();
@@ -29,7 +29,7 @@ describe('Editable', () => {
29
29
  editable.edit();
30
30
  await wait();
31
31
  expect(element.innerHTML).to.matchSnapshot();
32
- input = element.querySelector('textarea') as HTMLTextAreaElement;
32
+ input = element.querySelector('input') as HTMLInputElement;
33
33
  input.value = 'new';
34
34
  dispatchEvent(input, 'keydown', {keyCode: 27});
35
35
  await wait();
@@ -41,7 +41,7 @@ describe('Editable', () => {
41
41
  editable.edit();
42
42
  await wait();
43
43
  expect(element.innerHTML).to.matchSnapshot();
44
- input = element.querySelector('textarea') as HTMLTextAreaElement;
44
+ input = element.querySelector('input') as HTMLInputElement;
45
45
  input.value = 'new';
46
46
  dispatchEvent(input, 'keydown', {keyCode: 13});
47
47
  await wait();
@@ -58,7 +58,7 @@ describe('Editable', () => {
58
58
  // @ts-ignore
59
59
  first.edit();
60
60
  await wait();
61
- let input = (findDomFromVNode(first.$lastInput!, true) as HTMLElement).querySelector('textarea') as HTMLTextAreaElement;
61
+ let input = (findDomFromVNode(first.$lastInput!, true) as HTMLElement).querySelector('input') as HTMLInputElement;
62
62
  dispatchEvent(input, 'focus');
63
63
  input.value = 'a';
64
64
  dispatchEvent(input, 'input');
@@ -69,7 +69,7 @@ describe('Editable', () => {
69
69
  // @ts-ignore
70
70
  second.edit();
71
71
  await wait();
72
- input = (findDomFromVNode(second.$lastInput!, true) as HTMLElement).querySelector('textarea') as HTMLTextAreaElement;
72
+ input = (findDomFromVNode(second.$lastInput!, true) as HTMLElement).querySelector('input') as HTMLInputElement;
73
73
  input.value = 'a';
74
74
  dispatchEvent(input, 'input');
75
75
  dispatchEvent(input, 'blur');
@@ -79,7 +79,7 @@ describe('Editable', () => {
79
79
  // @ts-ignore
80
80
  third.edit();
81
81
  await wait();
82
- input = (findDomFromVNode(third.$lastInput!, true) as HTMLElement).querySelector('textarea') as HTMLTextAreaElement;
82
+ input = (findDomFromVNode(third.$lastInput!, true) as HTMLElement).querySelector('input') as HTMLInputElement;
83
83
  input.value = 'a';
84
84
  dispatchEvent(input, 'input');
85
85
  dispatchEvent(input, 'blur');
@@ -110,14 +110,14 @@ describe('Editable', () => {
110
110
  expect(element.outerHTML).to.matchSnapshot();
111
111
  element.querySelector<HTMLElement>('.k-editable-icon')!.click();
112
112
  await wait();
113
- let input = element.querySelector("textarea") as HTMLTextAreaElement;
113
+ let input = element.querySelector("input") as HTMLInputElement;
114
114
  input.value = 'aa';
115
115
  dispatchEvent(input, 'blur');
116
116
  await wait();
117
117
  expect(element.innerText).to.eql('test');
118
118
  element.querySelector<HTMLElement>('.k-editable-icon')!.click();
119
119
  await wait();
120
- input = element.querySelector("textarea") as HTMLTextAreaElement;
120
+ input = element.querySelector("input") as HTMLInputElement;
121
121
  expect(input.value).to.eql('aa');
122
122
  });
123
123
  });
@@ -31,9 +31,7 @@ const classNameObj = {
31
31
  ref={this.inputRef}
32
32
  frozenOnInput
33
33
  ev-$mounted={this.select}
34
- width={300}
35
- type="textarea"
36
- rows="auto"
34
+ autoWidth
37
35
  />
38
36
  </div>
39
37
  <Tooltip v-if={!disabled && !editing} content={tip}>
@@ -6,7 +6,7 @@ import { cache } from '../utils';
6
6
 
7
7
  const defaults = {
8
8
  iconGap: '0 0 0 8px',
9
- get smallPadding() { return theme.small.padding },
9
+
10
10
  // invalid
11
11
  invalid: {
12
12
  get border() { return `1px solid ${theme.color.danger}`},
@@ -35,12 +35,5 @@ export const makeStyles = cache(function makeStyles(k: string) {
35
35
  border: ${editable.invalid.border} !important;
36
36
  }
37
37
  }
38
- &.${k}-editable {
39
- .${k}-type-textarea {
40
- .${k}-textarea {
41
- padding: 0 ${editable.smallPadding};
42
- }
43
- }
44
- }
45
38
  `;
46
39
  });
@@ -30,7 +30,6 @@ const wrapper = <div class={{
30
30
  position={position}
31
31
  theme={theme}
32
32
  class={className}
33
- hoverable
34
33
  >
35
34
  {wrapper}
36
35
  <b:content>{children}</b:content>
@@ -19,7 +19,6 @@ import {useFocusout} from './useFocusout';
19
19
  import type {Events} from '../types';
20
20
  import {isNullOrUndefined} from 'intact-shared';
21
21
  import { useDraggable } from './useDraggble';
22
- import { useImmutable } from './useImmutable';
23
22
  import { useConfigContext } from '../config';
24
23
 
25
24
  export interface BaseSelectProps<V, Multipe extends boolean = boolean, Attach = V | null> {
@@ -108,7 +107,6 @@ export abstract class BaseSelect<
108
107
  public input = useInput(this.resetKeywords);
109
108
  private focusout = useFocusout();
110
109
  private draggable = useDraggable();
111
- public immutable = useImmutable();
112
110
  protected config = useConfigContext();
113
111
 
114
112
  init() {
@@ -162,11 +160,7 @@ export abstract class BaseSelect<
162
160
  @bind
163
161
  protected clear(e: MouseEvent) {
164
162
  e.stopPropagation();
165
- const {value, multiple} = this.get();
166
- const immutableValues = this.immutable.immutableValues.value;
167
-
168
- this.set('value', multiple ? (Array.isArray(value) ? value.filter(key => immutableValues.includes(key)) : []) : null);
169
-
163
+ this.set('value', this.get('multiple') ? [] : null);
170
164
  }
171
165
 
172
166
  @bind
@@ -39,7 +39,6 @@ const label = this.getLabel();
39
39
  const hasValue = this.hasValue();
40
40
  const {onInput, inputRef, keywords: {value: keywords}} = this.input;
41
41
  const {onFocusout, triggerRef} = this.focusout;
42
- const {isClosable} = this.immutable;
43
42
  const filterInput = <Input v-if={filterable}
44
43
  class={`${k}-select-input`}
45
44
  value={keywords}
@@ -123,7 +122,7 @@ const filterInput = <Input v-if={filterable}
123
122
  value[$key] :
124
123
  $key
125
124
  }
126
- closable={isClosable(value[$key])}
125
+ closable
127
126
  ev-close={this.delete.bind(this, $key)}
128
127
  disabled={disabled}
129
128
  size={size}
@@ -50,7 +50,7 @@ const defaults = (): Partial<SwitchProps> => ({
50
50
  value: false,
51
51
  trueValue: true,
52
52
  falseValue: false,
53
- size: 'small',
53
+ size: 'default',
54
54
  loading: false,
55
55
  });
56
56
 
@@ -18,7 +18,6 @@ export interface TableCellProps {
18
18
  rowspan: number
19
19
  onClickArrow: (e: MouseEvent) => void
20
20
  hasChildren: boolean
21
- loaded: boolean
22
21
  }
23
22
 
24
23
  export class TableCell extends Component<TableCellProps> {
@@ -3,12 +3,11 @@ import {get, noop} from 'intact-shared';
3
3
  import {Button} from '../button';
4
4
  import {Icon} from '../icon';
5
5
  import {getTextByChildren} from '../utils';
6
- import {Ellipsis} from '../ellipsis';
7
6
 
8
7
  const {
9
8
  props, rowIndex, columnIndex, offset,
10
9
  data, checkType, indent, grid,
11
- colspan, rowspan, onClickArrow, hasChildren, loaded
10
+ colspan, rowspan, onClickArrow, hasChildren,
12
11
  } = this.get();
13
12
  const { k } = this.config;
14
13
 
@@ -21,10 +20,6 @@ if (blocks) {
21
20
  }
22
21
  }
23
22
 
24
- if (props.ellipsis) {
25
- children = <Ellipsis>{children}</Ellipsis>
26
- }
27
-
28
23
  let {className, style} = getClassAndStyleForFixed(props, offset, k, checkType);
29
24
  if (columnIndex === 0 && indent) {
30
25
  style || (style = {});
@@ -47,8 +42,7 @@ const classNameObj = {
47
42
  class={`${k}-table-arrow`}
48
43
  ev-click={onClickArrow}
49
44
  >
50
- <Icon v-if={loaded !== false} class={`${k}-icon-right`} size="small" />
51
- <Icon v-else class={`${k}-tree-icon ion-load-c`} rotate />
45
+ <Icon class={`${k}-icon-right`} size="small" />
52
46
  </Button>
53
47
  {children}
54
48
  </td>
@@ -18,7 +18,6 @@ export interface TableColumnProps {
18
18
  exportCell?: (data: any, index: number) => string
19
19
  minWidth?: number
20
20
  hidden?: boolean
21
- ellipsis?: boolean
22
21
 
23
22
  // passed by Table
24
23
  // offset: number
@@ -59,7 +58,6 @@ const typeDefs: Required<TypeDefs<TableColumnProps>> = {
59
58
  exportCell: Function,
60
59
  minWidth: Number,
61
60
  hidden: Boolean,
62
- ellipsis: Boolean,
63
61
 
64
62
  // offset: null,
65
63
  cols: null,
@@ -45,7 +45,6 @@ sidebar: doc
45
45
  | animation | 是否开启动效,默认开启。可以通过`true` `false`全部设置,或者通过数组单独设置行和列的动效 | `boolean` &#124 `[boolean, boolean]` | `true` |
46
46
  | hideHeader | 是否隐藏表头 | `boolean` | `false` |
47
47
  | pagination | 是否支持分页 | `boolean` &#124; `PaginationProps` | `false` |
48
- | load | 指定异步加载节点数据的函数,该函数通过`Promise`返回数组来添加子节点数据 | <code>(node: any) => Promise<void> &#124; void</code> | `undefined` |
49
48
 
50
49
  ```ts
51
50
  import {Props} from 'intact';
@@ -114,7 +113,6 @@ export interface PaginationProps {
114
113
  | minWidth | 指定当前列拖动时的最小宽度,优先级高于`Table`的`minColWidth` | `number` | `undefined` |
115
114
  | className | 给当前列添加className | `string` &#124; `Record<string, any>` | `undefined` |
116
115
  | hidden | 是否隐藏当前列,仅为不可见,不影响`exportTable`导出表格 | `boolean` | `false` |
117
- | ellipsis | 是否开启超长省略 | `boolean` | `false` |
118
116
 
119
117
  ```ts
120
118
  import {VNode} from 'intact';
@@ -134,7 +132,6 @@ export type TableColumnGroupItem = {
134
132
  | empty | 自定义无数据展示模板 | - |
135
133
  | expand | 指定行展开后要展示的模板内容 | `([data: T, index: number]) => Children` |
136
134
  | tooltip | 行提示内容 | `([data: T, index: number]) => Children` |
137
- | footer | 自定义`Table`底部 | - |
138
135
 
139
136
  ## TableColumn
140
137
 
@@ -34,11 +34,10 @@ export interface TableRowProps {
34
34
  spreaded: boolean
35
35
  hasChildren: boolean
36
36
  indent: number
37
- onToggleSpreadRow: (key: TableRowKey, rowData?: any) => void
37
+ onToggleSpreadRow: (key: TableRowKey) => void
38
38
  onBeforeUnmount: (key: TableRowKey) => void
39
39
  offsetMap: Record<Key, number>
40
40
  animation: boolean
41
- loaded: boolean
42
41
 
43
42
  draggable: boolean
44
43
  draggingKey: TableRowKey | null
@@ -110,8 +109,8 @@ export class TableRow extends Component<TableRowProps> {
110
109
  @bind
111
110
  onClickArrow(e: MouseEvent) {
112
111
  e.stopPropagation();
113
- const {onToggleSpreadRow, key, data} = this.get();
114
- onToggleSpreadRow(key, data);
112
+ const {onToggleSpreadRow, key} = this.get();
113
+ onToggleSpreadRow(key);
115
114
  }
116
115
 
117
116
  @bind
@@ -11,7 +11,7 @@ const {
11
11
  grid, index: rowIndex, indeterminate,
12
12
  allDisabled, selected, /* hidden, */spreaded,
13
13
  hasChildren, indent, key, offsetMap,
14
- draggable, draggingKey, animation, loaded,
14
+ draggable, draggingKey, animation,
15
15
  } = this.get();
16
16
  const { k } = this.config;
17
17
 
@@ -71,13 +71,13 @@ cols.forEach((props, columnIndex) => {
71
71
  if (!render) return;
72
72
 
73
73
  const columnKey = props.key;
74
+
74
75
  vNodes.push(
75
76
  <TableCell
76
77
  props={props}
77
78
  columnIndex={columnIndex}
78
79
  rowIndex={rowIndex}
79
80
  data={data}
80
- loaded={loaded}
81
81
  offset={offsetMap[columnKey]}
82
82
  checkType={checkType}
83
83
  indent={indent}
@@ -90,7 +90,7 @@ export const makeStyles = cache(function makeStyles(k: string) {
90
90
  }
91
91
  table {
92
92
  width: 100%;
93
- border-collapse: separate;
93
+ // border-collapse: collapse;
94
94
  border-spacing: 0;
95
95
  table-layout: fixed;
96
96
  // td,
@@ -65,7 +65,6 @@ export interface TableProps<
65
65
  animation?: boolean | [boolean, boolean]
66
66
  hideHeader?: boolean
67
67
  pagination?: boolean | PaginationProps
68
- load?: (value: T) => Promise<void> | void
69
68
  }
70
69
 
71
70
  export interface TableEvents<T = any, K extends TableRowKey = number> {
@@ -83,7 +82,6 @@ export interface TableBlocks<T = unknown> {
83
82
  empty: null
84
83
  tooltip: [T, number]
85
84
  expand: [T, number]
86
- footer: null
87
85
  }
88
86
 
89
87
  type CheckType = 'checkbox' | 'radio' | 'none'
@@ -132,7 +130,6 @@ const typeDefs: Required<TypeDefs<TableProps<unknown>>> = {
132
130
  animation: [Boolean, Array],
133
131
  hideHeader: Boolean,
134
132
  pagination: [Boolean, Object],
135
- load: Function,
136
133
  };
137
134
 
138
135
  const defaults = (): Partial<TableProps> => ({
@@ -137,11 +137,11 @@ const tbody = (
137
137
  const spreaded = isSpreaded(key);
138
138
  const hasChildren = !!childrenKey && Array.isArray(value[childrenKey]);
139
139
  const indentSize = indent ? indent * level : 0;
140
+
140
141
  let row = <TableRow
141
142
  key={key}
142
143
  cols={cols}
143
144
  data={value}
144
- loaded={value.loaded}
145
145
  checkType={checkType}
146
146
  hasFixedLeft={hasFixedLeft}
147
147
  onClick={this.clickRow}
@@ -199,15 +199,7 @@ const tbody = (
199
199
 
200
200
  return hidden || !spreaded;
201
201
  });
202
- if ($blocks.footer) {
203
- rows.push(
204
- <tr key="table-footer">
205
- <td colspan={colCount} class={`${k}-table-footer`}>
206
- <b:footer />
207
- </td>
208
- </tr>
209
- );
210
- }
202
+
211
203
  return animation[0] ?
212
204
  <TransitionGroup name="k-fade-in-left" move={!draggingKey.value}>{rows}</TransitionGroup> :
213
205
  rows;
@@ -65,7 +65,7 @@ export function useGroup() {
65
65
 
66
66
  function isEmptyValue(groupValue: any) {
67
67
  const {multiple} = instance.get();
68
- return !groupValue || multiple && (!isArray(groupValue) || groupValue.every(value => !value));
68
+ return (!groupValue && groupValue !== 0) || multiple && (!isArray(groupValue) || groupValue.every(value => !value));
69
69
  }
70
70
 
71
71
  watchState(keywords, (v) => {
@@ -11,15 +11,8 @@ export function useTree(data: State<any[] | undefined>) {
11
11
  return inArray(instance.get('spreadKeys'), key);
12
12
  }
13
13
 
14
- async function toggleSpreadRow(key: TableRowKey, rowData?: any) {
15
- const {spreadKeys, load} = instance.get();
16
- instance.set('spreadKeys', toggleArray(spreadKeys, key));
17
- if (load && data.value && !rowData.loaded) {
18
- rowData.loaded = false;
19
- await load(rowData);
20
- rowData.loaded = true;
21
- instance.forceUpdate();
22
- }
14
+ function toggleSpreadRow(key: TableRowKey) {
15
+ instance.set('spreadKeys', toggleArray(instance.get('spreadKeys'), key));
23
16
  }
24
17
 
25
18
  function loopData<T>(
@@ -73,8 +73,6 @@ export class Tooltip<
73
73
  static defaults = defaults;
74
74
  static events = events;
75
75
 
76
- public $isTooltip = true;
77
-
78
76
  show(shouldFocus: boolean = false) {
79
77
  if (this.get('disabled')) return;
80
78
 
@@ -19,7 +19,6 @@ import {TreeSelect} from 'kpc';
19
19
  <TreeSelect
20
20
  v-model="value"
21
21
  data={this.get('data')}
22
- showLine={false}
23
22
  />
24
23
  ```
25
24
 
@@ -37,7 +37,6 @@ const { k } = this.config;
37
37
  multiple={multiple}
38
38
  selectable={!checkbox}
39
39
  load={load}
40
- showLine={showLine}
41
40
  filter={filterable ? this.filter : null}
42
41
 
43
42
  ev-transitionEnd={this.position}
@@ -55,7 +55,7 @@ export default function ($props, $blocks, $__proto__) {
55
55
  }
56
56
  });
57
57
  }
58
- var classNameObj = (_classNameObj = {}, _classNameObj[cls('btn')] = true, _classNameObj[cls(size)] = size !== 'default', _classNameObj[cls(type)] = !color, _classNameObj[cls("btn-icon")] = icon, _classNameObj[className] = className, _classNameObj[cls('circle')] = circle, _classNameObj[cls('loading')] = loading, _classNameObj[cls('fluid')] = fluid, _classNameObj[cls('active')] = checked, _classNameObj[cls('custom')] = color, _classNameObj[cls('disabled')] = disabled || loading, _classNameObj[cls('ghost')] = ghost, _classNameObj[makeButtonStyles(k, iconSide, color)] = true, _classNameObj);
58
+ var classNameObj = (_classNameObj = {}, _classNameObj[cls('btn')] = true, _classNameObj[cls(size)] = size !== 'default', _classNameObj[cls(type)] = !color, _classNameObj[cls("btn-icon")] = icon, _classNameObj[className] = className, _classNameObj[cls('circle')] = circle, _classNameObj[cls('loading')] = loading, _classNameObj[cls('fluid')] = fluid, _classNameObj[cls('active')] = checked, _classNameObj[cls('disabled')] = disabled || loading, _classNameObj[cls('ghost')] = ghost, _classNameObj[cls('custom')] = color, _classNameObj[makeButtonStyles(k, iconSide, color)] = true, _classNameObj);
59
59
  var loadingIcon = _$cc(Icon, {
60
60
  'className': _$cn("ion-load-c " + k + "-icon-loading"),
61
61
  'size': size /*loadingSizeMap[size]*/,
@@ -11,7 +11,7 @@ var btnStyles = {
11
11
  return theme.color.text;
12
12
  },
13
13
  bgColor: '#fff',
14
- lineHeight: '1',
14
+ lineHeight: '1.15',
15
15
  get padding() {
16
16
  return "0 16px";
17
17
  },
@@ -199,8 +199,8 @@ export var makeButtonStyles = cache(function makeButtonStyles(k, iconSide, color
199
199
  // extract static styles to individual css method for performance
200
200
  css("display:inline-flex;align-items:center;justify-content:center;cursor:pointer;height:", button.height, ";padding:", button.padding, ";outline:none;vertical-align:middle;color:", button.color, ";background:", button.bgColor, ";border-radius:", button.borderRadius, ";border:1px solid ", button.borderColor, ";font-size:", button.fontSize, ";white-space:nowrap;transition:all ", button.transition, ";line-height:", button.lineHeight, ";.", k, "-icon{color:inherit;}&.", k, "-default,&.", k, "-none,&.", k, "-flat{.", k, "-icon{color:", theme.color.lightBlack, ";}&:hover{.", k, "-icon{color:inherit;}}}&:hover,&:focus{border-color:", button.hoverBorderColor, ";color:", button.hoverColor, ";}&:active{background:", palette(theme.color.primary, -4), ";}.", k, "-button-input{position:absolute;opacity:0;width:0;height:0;}", _mapInstanceProperty(types).call(types, function (type) {
201
201
  var typeStyles = button[type];
202
- return /*#__PURE__*/css("&.", k, "-", type, "{background:", typeStyles.bgColor, ";color:", typeStyles.color, ";border-color:", typeStyles.borderColor, ";&:hover,&:focus{background:", palette(typeStyles.bgColor, -1), ";border-color:", typeStyles.hoverBorderColor, ";color:", typeStyles.color, ";}&:active{background:", palette(typeStyles.bgColor, 1), ";border-color:", palette(typeStyles.borderColor, 1), ";}&.", k, "-disabled{&,&:hover{background:", palette(typeStyles.bgColor, -2), ";color:", palette(typeStyles.color, -2), ";border-color:", palette(typeStyles.borderColor, -2), ";}}}");
203
- }), "&.", k, "-secondary{color:", secondary.color, ";border-color:", secondary.borderColor, ";&:hover,&:focus{background:", secondary.hoverBgColor, ";}&:active{background:", secondary.activeBgColor, ";}&.", k, "-disabled{border:none;}}", color && /*#__PURE__*/css("&.", k, "-custom{color:", color, ";border-color:", color, ";&:hover,&:focus{background:", palette(color, -4), ";}&:active{background:", palette(color, -3), ";}&.", k, "-disabled{border:none;}}"), " &.", k, "-link{color:", link.color, ";&:hover{color:", link.hoverColor, ";background:", link.hoverBgColor, ";}}&.", k, "-none,&.", k, "-link,&.", k, "-flat{background:transparent;&,&:hover{border:none;}&.", k, "-active{color:", theme.color.primary, ";}}&.", k, "-none:hover{background:", button.none.hoverBgColor, ";}&.", k, "-flat{background:", button.none.hoverBgColor, ";}&.", k, "-disabled{.", k, "-icon{color:inherit;}&,&:hover{color:", button.disabled.color, ";background:", button.disabled.bgColor, ";border-color:", button.disabled.borderColor, ";cursor:not-allowed;}}&.", k, "-none.", k, "-disabled,&.", k, "-link.", k, "-disabled{&,&:hover{background:transparent;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
202
+ return /*#__PURE__*/css("&.", k, "-", type, "{background:", typeStyles.bgColor, ";color:", typeStyles.color, ";border-color:", typeStyles.borderColor, ";&:hover,&:focus{background:", palette(typeStyles.bgColor, -1), ";border-color:", typeStyles.hoverBorderColor, ";color:", typeStyles.color, ";}&:active{background:", palette(typeStyles.bgColor, 1), ";border-color:", palette(typeStyles.borderColor, 1), ";}}");
203
+ }), "&.", k, "-secondary{color:", secondary.color, ";border-color:", secondary.borderColor, ";&:hover,&:focus{background:", secondary.hoverBgColor, ";}&:active{background:", secondary.activeBgColor, ";}}", color && /*#__PURE__*/css("&.", k, "-custom{color:", color, ";border-color:", color, ";&:hover,&:focus{background:", palette(color, -4), ";}&:active{background:", palette(color, -3), ";}}"), " &.", k, "-link{color:", link.color, ";&:hover{color:", link.hoverColor, ";background:", link.hoverBgColor, ";}}&.", k, "-none,&.", k, "-link,&.", k, "-flat{background:transparent;&,&:hover{border:none;}&.", k, "-active{color:", theme.color.primary, ";}}&.", k, "-none:hover{background:", button.none.hoverBgColor, ";}&.", k, "-flat{background:", button.none.hoverBgColor, ";}&.", k, "-disabled{.", k, "-icon{color:inherit;}&,&:hover{color:", button.disabled.color, ";background:", button.disabled.bgColor, ";border-color:", button.disabled.borderColor, ";cursor:not-allowed;}}&.", k, "-none.", k, "-disabled,&.", k, "-link.", k, "-disabled{&,&:hover{background:transparent;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
204
204
  var styles = button[size];
205
205
  return /*#__PURE__*/css("&.", k, "-", size, "{font-size:", styles.fontSize, ";height:", styles.height, ";padding:", styles.padding, ";&.", k, "-btn-icon{width:", styles.height, ";}}");
206
206
  }), "&.", k, "-btn-icon{width:", button.height, ";padding:0;.", k, "-icon{margin:0;}}&.", k, "-fluid{width:100%;padding:0;}&.", k, "-circle{border-radius:calc(", button.large.height, " / 2);}&.", k, "-loading{", _mapInstanceProperty(types).call(types, function (type) {
@@ -12,7 +12,7 @@ export declare class DCallout extends DShape {
12
12
  rotatable?: boolean | undefined;
13
13
  editable?: boolean | undefined;
14
14
  connectable?: boolean | undefined;
15
- strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
15
+ strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
16
16
  label?: string | number | undefined;
17
17
  style?: Record<string, string | number> | undefined;
18
18
  data?: any;
@@ -12,7 +12,7 @@ export declare class DCircle extends DShape {
12
12
  rotatable?: boolean | undefined;
13
13
  editable?: boolean | undefined;
14
14
  connectable?: boolean | undefined;
15
- strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
15
+ strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
16
16
  label?: string | number | undefined;
17
17
  style?: Record<string, string | number> | undefined;
18
18
  data?: any;
@@ -12,7 +12,7 @@ export declare class DDocument extends DShape {
12
12
  rotatable?: boolean | undefined;
13
13
  editable?: boolean | undefined;
14
14
  connectable?: boolean | undefined;
15
- strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
15
+ strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
16
16
  label?: string | number | undefined;
17
17
  style?: Record<string, string | number> | undefined;
18
18
  data?: any;
@@ -12,7 +12,7 @@ export declare class DEllipse extends DShape {
12
12
  rotatable?: boolean | undefined;
13
13
  editable?: boolean | undefined;
14
14
  connectable?: boolean | undefined;
15
- strokeStyle?: "dashed" | "dotted" | "solid" | undefined;
15
+ strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
16
16
  label?: string | number | undefined;
17
17
  style?: Record<string, string | number> | undefined;
18
18
  data?: any;
@@ -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?: "dashed" | "dotted" | "solid" | undefined;
15
+ strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
16
16
  label?: string | number | undefined;
17
17
  style?: Record<string, string | number> | undefined;
18
18
  data?: any;