@king-design/intact 2.0.13-beta.0 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/cascader/index.md +1 -0
- package/components/cascader/useValue.ts +1 -1
- package/components/code/index.md +2 -2
- package/components/code/index.ts +2 -2
- package/components/code/useEditor.ts +1 -1
- package/components/datepicker/index.md +1 -0
- package/components/form/styles.ts +5 -2
- package/components/select/base.ts +5 -7
- package/components/select/base.vdt +5 -7
- package/components/select/demos/basic.md +1 -1
- package/components/select/index.md +1 -0
- package/components/select/useEqualWidth.ts +1 -1
- package/components/select/useFocusout.ts +1 -1
- package/components/select/useInput.ts +1 -1
- package/components/table/demos/animation.md +7 -0
- package/components/table/index.md +1 -0
- package/components/table/row.ts +1 -0
- package/components/table/row.vdt +5 -3
- package/components/table/table.ts +3 -0
- package/components/table/table.vdt +97 -89
- package/components/tooltip/index.ts +1 -1
- package/components/treeSelect/index.md +1 -0
- package/components/wave/index.ts +1 -1
- package/components/wave/styles.ts +2 -1
- package/es/components/cascader/useValue.js +1 -1
- package/es/components/code/index.d.ts +2 -2
- package/es/components/code/useEditor.js +1 -1
- package/es/components/form/styles.js +1 -1
- package/es/components/select/base.d.ts +1 -1
- package/es/components/select/base.js +4 -4
- package/es/components/select/base.vdt.js +6 -6
- package/es/components/select/useEqualWidth.js +1 -1
- package/es/components/select/useFocusout.js +1 -1
- package/es/components/select/useInput.js +1 -1
- package/es/components/table/row.d.ts +1 -0
- package/es/components/table/row.vdt.js +5 -6
- package/es/components/table/table.d.ts +1 -0
- package/es/components/table/table.js +4 -2
- package/es/components/table/table.vdt.js +111 -104
- package/es/components/tooltip/index.d.ts +1 -1
- package/es/components/wave/styles.js +1 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/packages/kpc-react/__tests__/components/drawer.spec.js +23 -8
- package/es/site/data/components/select/demos/basic/react.js +2 -1
- package/es/site/data/components/table/demos/animation/react.js +16 -0
- package/es/styles/global.js +1 -1
- package/index.ts +2 -2
- package/package.json +2 -2
- package/styles/global.ts +1 -1
- package/es/site/data/components/menu/demos/collapse/react.d.ts +0 -11
- package/es/site/data/components/menu/demos/size/react.d.ts +0 -7
|
@@ -20,7 +20,7 @@ export interface BaseSelectProps<V, Multipe extends boolean = boolean, Attach =
|
|
|
20
20
|
placeholder?: Children;
|
|
21
21
|
container?: Container;
|
|
22
22
|
width?: string | number;
|
|
23
|
-
|
|
23
|
+
show?: boolean;
|
|
24
24
|
}
|
|
25
25
|
export interface BaseSelectEvents {
|
|
26
26
|
keydown: [KeyboardEvent];
|
|
@@ -27,7 +27,7 @@ var typeDefs = {
|
|
|
27
27
|
placeholder: [String, Number],
|
|
28
28
|
container: [Function, String],
|
|
29
29
|
width: [String, Number],
|
|
30
|
-
|
|
30
|
+
show: Boolean
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
var defaults = function defaults() {
|
|
@@ -65,7 +65,7 @@ export var BaseSelect = /*#__PURE__*/function (_Component) {
|
|
|
65
65
|
|
|
66
66
|
_proto.init = function init() {
|
|
67
67
|
provide(SELECT, this);
|
|
68
|
-
useShowHideEvents('
|
|
68
|
+
useShowHideEvents('show'); // this.input = useInput();
|
|
69
69
|
|
|
70
70
|
this.watch('value', this.position, {
|
|
71
71
|
presented: true
|
|
@@ -81,11 +81,11 @@ export var BaseSelect = /*#__PURE__*/function (_Component) {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
_proto.show = function show() {
|
|
84
|
-
this.set('
|
|
84
|
+
this.set('show', true);
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
_proto.hide = function hide() {
|
|
88
|
-
this.set('
|
|
88
|
+
this.set('show', false);
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
_proto.resetKeywords = function resetKeywords(keywords) {
|
|
@@ -40,7 +40,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
40
40
|
inline = _this$get.inline,
|
|
41
41
|
style = _this$get.style,
|
|
42
42
|
width = _this$get.width,
|
|
43
|
-
|
|
43
|
+
show = _this$get.show;
|
|
44
44
|
|
|
45
45
|
var classNameObj = (_classNameObj = {
|
|
46
46
|
'k-select': true,
|
|
@@ -94,7 +94,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
94
94
|
'name': 'k-fade',
|
|
95
95
|
'appear': false,
|
|
96
96
|
'children': !multiple && filterable ? _$cc(Input, {
|
|
97
|
-
'value':
|
|
97
|
+
'value': show ? keywords : label,
|
|
98
98
|
'ev-$change:value': onInput,
|
|
99
99
|
'disabled': disabled,
|
|
100
100
|
'placeholder': label || placeholder,
|
|
@@ -103,7 +103,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
103
103
|
'fluid': true,
|
|
104
104
|
'inline': true,
|
|
105
105
|
'key': 'input',
|
|
106
|
-
'readonly': !
|
|
106
|
+
'readonly': !show,
|
|
107
107
|
'waveDisabled': true
|
|
108
108
|
}, 'input', inputRef) : !filterable && !hasValue ? _$ce(2, 'div', placeholder, 0, 'k-select-placeholder c-ellipsis', null, 'placeholder') : !multiple ? _$ce(2, 'div', (_$blocks['value'] = function ($super) {
|
|
109
109
|
return label;
|
|
@@ -155,7 +155,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
155
155
|
'inline': true,
|
|
156
156
|
'size': size,
|
|
157
157
|
'key': 'filter',
|
|
158
|
-
'readonly': !
|
|
158
|
+
'readonly': !show,
|
|
159
159
|
'waveDisabled': true
|
|
160
160
|
}, 'filter', inputRef) : undefined], 0, _$cn({
|
|
161
161
|
"k-select-values": true,
|
|
@@ -195,9 +195,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
195
195
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
196
196
|
}, __$blocks['base-menu'](_$no))],
|
|
197
197
|
'ev-$model:value': function ev$modelValue($v) {
|
|
198
|
-
$this.set('
|
|
198
|
+
$this.set('show', $v);
|
|
199
199
|
},
|
|
200
|
-
'value': $this.get('
|
|
200
|
+
'value': $this.get('show')
|
|
201
201
|
}, null, _this.dropdownRef)
|
|
202
202
|
});
|
|
203
203
|
}
|
|
@@ -23,6 +23,7 @@ export interface TableRowProps {
|
|
|
23
23
|
onToggleSpreadRow: (key: TableRowKey) => void;
|
|
24
24
|
onBeforeUnmount: (key: TableRowKey) => void;
|
|
25
25
|
offsetMap: Record<Key, number>;
|
|
26
|
+
animation: boolean;
|
|
26
27
|
draggable: boolean;
|
|
27
28
|
draggingKey: TableRowKey | null;
|
|
28
29
|
onRowDragStart: DragCallback;
|
|
@@ -5,7 +5,7 @@ import { getClassAndStyleForFixed } from './useFixedColumns';
|
|
|
5
5
|
import { Checkbox } from '../checkbox';
|
|
6
6
|
import { Radio } from '../radio';
|
|
7
7
|
import { TableCell } from './cell';
|
|
8
|
-
import { createElementVNode, className as cx } from 'intact';
|
|
8
|
+
import { createElementVNode, className as cx, createFragment } from 'intact';
|
|
9
9
|
export default function ($props, $blocks, $__proto__) {
|
|
10
10
|
var _classNameObj,
|
|
11
11
|
_this = this;
|
|
@@ -34,7 +34,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
34
34
|
key = _this$get.key,
|
|
35
35
|
offsetMap = _this$get.offsetMap,
|
|
36
36
|
draggable = _this$get.draggable,
|
|
37
|
-
draggingKey = _this$get.draggingKey
|
|
37
|
+
draggingKey = _this$get.draggingKey,
|
|
38
|
+
animation = _this$get.animation;
|
|
38
39
|
|
|
39
40
|
var classNameObj = (_classNameObj = {
|
|
40
41
|
'k-disabled': disabled,
|
|
@@ -110,16 +111,14 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
110
111
|
'key': columnKey
|
|
111
112
|
}, columnKey));
|
|
112
113
|
});
|
|
113
|
-
|
|
114
|
-
var rows = _$cc(TransitionGroup, {
|
|
114
|
+
var rows = animation ? _$cc(TransitionGroup, {
|
|
115
115
|
'name': 'k-fade-expand',
|
|
116
116
|
'move': false,
|
|
117
117
|
'children': vNodes
|
|
118
|
-
});
|
|
118
|
+
}) : createFragment(vNodes, 8);
|
|
119
119
|
/* const rows = vNodes; */
|
|
120
120
|
// for performance, no normalize
|
|
121
121
|
|
|
122
|
-
|
|
123
122
|
return createElementVNode(2, 'tr', rows, 2, cx(classNameObj), {
|
|
124
123
|
'data-key': key,
|
|
125
124
|
'ev-mouseenter': this.onMouseEnter,
|
|
@@ -34,6 +34,7 @@ export interface TableProps<T = any, K extends TableRowKey = TableRowKey, C exte
|
|
|
34
34
|
minColWidth?: number;
|
|
35
35
|
widthStoreKey?: string;
|
|
36
36
|
draggable?: boolean;
|
|
37
|
+
animation?: boolean | [boolean, boolean];
|
|
37
38
|
}
|
|
38
39
|
export interface TableEvents<T = any, K extends TableRowKey = number> {
|
|
39
40
|
clickRow: [T, number, K];
|
|
@@ -56,7 +56,8 @@ var typeDefs = {
|
|
|
56
56
|
resizable: Boolean,
|
|
57
57
|
minColWidth: Number,
|
|
58
58
|
widthStoreKey: String,
|
|
59
|
-
draggable: Boolean
|
|
59
|
+
draggable: Boolean,
|
|
60
|
+
animation: [Boolean, Array]
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
var defaults = function defaults() {
|
|
@@ -69,7 +70,8 @@ var defaults = function defaults() {
|
|
|
69
70
|
rowExpandable: true,
|
|
70
71
|
childrenKey: 'children',
|
|
71
72
|
indent: 32,
|
|
72
|
-
minColWidth: 40
|
|
73
|
+
minColWidth: 40,
|
|
74
|
+
animation: true
|
|
73
75
|
};
|
|
74
76
|
};
|
|
75
77
|
|
|
@@ -57,7 +57,10 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
57
57
|
tooltipContainer = _this$get.tooltipContainer,
|
|
58
58
|
showIndeterminate = _this$get.showIndeterminate,
|
|
59
59
|
resizable = _this$get.resizable,
|
|
60
|
-
draggable = _this$get.draggable
|
|
60
|
+
draggable = _this$get.draggable,
|
|
61
|
+
_animation = _this$get.animation;
|
|
62
|
+
|
|
63
|
+
var animation = !Array.isArray(_animation) ? [_animation, _animation] : _animation;
|
|
61
64
|
|
|
62
65
|
var _this$columns$getData = this.columns.getData(),
|
|
63
66
|
columns = _this$columns$getData.columns,
|
|
@@ -130,10 +133,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
130
133
|
'children': _$cc(FixedColumnsContext.Provider, {
|
|
131
134
|
'value': offsetMap,
|
|
132
135
|
'children': _$ce(2, 'thead', _$ma(columns, function ($value, $key) {
|
|
133
|
-
return _$ce(2, 'tr',
|
|
134
|
-
'
|
|
135
|
-
'move': false,
|
|
136
|
-
'children': [$key === 0 && checkType !== 'none' ? _$cv('th', _extends({}, getClassAndStyleForFixed({
|
|
136
|
+
return _$ce(2, 'tr', function () {
|
|
137
|
+
var ths = [$key === 0 && checkType !== 'none' ? _$cv('th', _extends({}, getClassAndStyleForFixed({
|
|
137
138
|
fixed: hasFixedLeft ? 'left' : false
|
|
138
139
|
}, 0), {
|
|
139
140
|
'rowspan': maxRows,
|
|
@@ -143,8 +144,13 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
143
144
|
'indeterminate': showIndeterminate && allCheckedStatus == AllCheckedStatus.Indeterminate,
|
|
144
145
|
'ev-$change:value': toggleCheckedAll,
|
|
145
146
|
'disabled': !hasData
|
|
146
|
-
}) : undefined) : undefined, $value]
|
|
147
|
-
|
|
147
|
+
}) : undefined) : undefined, $value];
|
|
148
|
+
return animation[1] ? _$cc(TransitionGroup, {
|
|
149
|
+
'name': 'k-fade-expand',
|
|
150
|
+
'move': false,
|
|
151
|
+
'children': ths
|
|
152
|
+
}) : ths;
|
|
153
|
+
}(), 0);
|
|
148
154
|
}, $this), 4)
|
|
149
155
|
})
|
|
150
156
|
})
|
|
@@ -181,115 +187,116 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
181
187
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
182
188
|
}, __$blocks['empty'](_$no)), 0, 'k-table-empty', {
|
|
183
189
|
'colspan': colCount
|
|
184
|
-
}), 2, null, null, 'table-empty') :
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
var spreaded = isSpreaded(key);
|
|
195
|
-
var hasChildren = !!childrenKey && Array.isArray(value[childrenKey]);
|
|
196
|
-
var indentSize = indent ? indent * level : 0;
|
|
190
|
+
}), 2, null, null, 'table-empty') : function () {
|
|
191
|
+
var rows = [];
|
|
192
|
+
loopData(function (value, index, level, hidden) {
|
|
193
|
+
// don't render if row is hidden
|
|
194
|
+
if (hidden) return hidden;
|
|
195
|
+
var status = allStatus[index];
|
|
196
|
+
var key = allKeys[index];
|
|
197
|
+
var spreaded = isSpreaded(key);
|
|
198
|
+
var hasChildren = !!childrenKey && Array.isArray(value[childrenKey]);
|
|
199
|
+
var indentSize = indent ? indent * level : 0;
|
|
197
200
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
201
|
+
var row = _$cc(TableRow, {
|
|
202
|
+
'key': key,
|
|
203
|
+
'cols': cols,
|
|
204
|
+
'data': value,
|
|
205
|
+
'checkType': checkType,
|
|
206
|
+
'hasFixedLeft': hasFixedLeft,
|
|
207
|
+
'onClick': _this.clickRow,
|
|
208
|
+
'checked': status.checked,
|
|
209
|
+
'indeterminate': status.indeterminate,
|
|
210
|
+
'index': index,
|
|
211
|
+
'disabled': status.disabled,
|
|
212
|
+
'allDisabled': status.allDisabled,
|
|
213
|
+
'className': _$cn(rowClassName && rowClassName(value, index, key)),
|
|
214
|
+
'merge': merge,
|
|
215
|
+
'grid': getGrid(),
|
|
216
|
+
'onChangeChecked': onChangeChecked,
|
|
217
|
+
'selected': isSelected(key),
|
|
218
|
+
'spreaded': spreaded,
|
|
219
|
+
'hasChildren': hasChildren,
|
|
220
|
+
'indent': indentSize,
|
|
221
|
+
'onToggleSpreadRow': toggleSpreadRow,
|
|
222
|
+
'onBeforeUnmount': _this.resetRowStatus.onRowBeforeUnmount,
|
|
223
|
+
'offsetMap': offsetMap,
|
|
224
|
+
'animation': animation[1],
|
|
225
|
+
'draggable': draggable,
|
|
226
|
+
'draggingKey': draggingKey.value,
|
|
227
|
+
'onRowDragStart': onRowDragStart,
|
|
228
|
+
'onRowDragEnd': onRowDragEnd,
|
|
229
|
+
'onRowDragOver': onRowDragOver
|
|
230
|
+
}, key);
|
|
227
231
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
if ($blocks.tooltip) {
|
|
233
|
+
var content = (_$blocks['tooltip'] = function ($super) {
|
|
234
|
+
return null;
|
|
235
|
+
}, __$blocks['tooltip'] = function ($super, data) {
|
|
236
|
+
var block = $blocks['tooltip'];
|
|
233
237
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
238
|
+
var callBlock = function callBlock() {
|
|
239
|
+
return _$blocks['tooltip'].call($this, $super, data);
|
|
240
|
+
};
|
|
237
241
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
242
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
243
|
+
}, __$blocks['tooltip'](_$no, [value, index]));
|
|
244
|
+
row = _$cc(Tooltip, {
|
|
245
|
+
'key': key,
|
|
246
|
+
'position': tooltipPosition,
|
|
247
|
+
'container': tooltipContainer,
|
|
248
|
+
'children': row,
|
|
249
|
+
'$blocks': function ($blocks) {
|
|
250
|
+
var _$blocks = {},
|
|
251
|
+
__$blocks = _$ex({}, $blocks);
|
|
248
252
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
+
return (_$blocks['content'] = function ($super) {
|
|
254
|
+
return content;
|
|
255
|
+
}, __$blocks['content'] = function ($super, data) {
|
|
256
|
+
var block = $blocks['content'];
|
|
253
257
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
258
|
+
var callBlock = function callBlock() {
|
|
259
|
+
return _$blocks['content'].call($this, $super, data);
|
|
260
|
+
};
|
|
257
261
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
262
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
263
|
+
}), __$blocks;
|
|
264
|
+
}.call($this, _$em)
|
|
265
|
+
}, key);
|
|
266
|
+
}
|
|
263
267
|
|
|
264
|
-
|
|
268
|
+
rows.push(row);
|
|
265
269
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
if ($blocks.expand) {
|
|
271
|
+
var expanded = isExpanded(key);
|
|
272
|
+
rows.push(_$ce(2, 'tr', _$ce(2, 'td', _$cc(Transition, _extends({}, expandAnimationCallbacks, {
|
|
273
|
+
'children': expanded ? _$ce(2, 'div', (_$blocks['expand'] = function ($super) {
|
|
274
|
+
return null;
|
|
275
|
+
}, __$blocks['expand'] = function ($super, data) {
|
|
276
|
+
var block = $blocks['expand'];
|
|
273
277
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
278
|
+
var callBlock = function callBlock() {
|
|
279
|
+
return _$blocks['expand'].call($this, $super, data);
|
|
280
|
+
};
|
|
277
281
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
282
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
283
|
+
}, __$blocks['expand'](_$no, [value, index])), 0, 'k-table-expand') : undefined
|
|
284
|
+
})), 2, null, {
|
|
285
|
+
'colspan': colCount
|
|
286
|
+
}), 2, _$cn({
|
|
287
|
+
"k-expand": true,
|
|
288
|
+
'k-expanded': expanded
|
|
289
|
+
}), null, key + ".$expand"));
|
|
290
|
+
}
|
|
287
291
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
return hidden || !spreaded;
|
|
293
|
+
});
|
|
294
|
+
return animation[0] ? _$cc(TransitionGroup, {
|
|
295
|
+
'name': 'k-fade-in-left',
|
|
296
|
+
'move': !draggingKey.value,
|
|
297
|
+
'children': rows
|
|
298
|
+
}) : rows;
|
|
299
|
+
}(), 0);
|
|
293
300
|
|
|
294
301
|
var tableWidthPx = tableWidth.value ? tableWidth.value + "px" : null;
|
|
295
302
|
var _this$stickyScrollbar = this.stickyScrollbar,
|
|
@@ -8,6 +8,6 @@ export interface TooltipProps extends BaseTooltipProps {
|
|
|
8
8
|
export interface TooltipBlocks extends BaseTooltipBlocks, TooltipContentBlocks {
|
|
9
9
|
content: null;
|
|
10
10
|
}
|
|
11
|
-
declare class _Tooltip extends BaseTooltip<TooltipProps, TooltipEvents, TooltipBlocks> {
|
|
11
|
+
export declare class _Tooltip extends BaseTooltip<TooltipProps, TooltipEvents, TooltipBlocks> {
|
|
12
12
|
}
|
|
13
13
|
export declare const Tooltip: typeof _Tooltip;
|
|
@@ -13,5 +13,5 @@ setDefault(function () {
|
|
|
13
13
|
});
|
|
14
14
|
export function makeStyles(color, inset) {
|
|
15
15
|
var waveEffect = /*#__PURE__*/keyframes("100%{top:calc(", inset, " + ", wave.inset, ");bottom:calc(", inset, " + ", wave.inset, ");left:calc(", inset, " + ", wave.inset, ");right:calc(", inset, " + ", wave.inset, ");opacity:0.05;}");
|
|
16
|
-
return /*#__PURE__*/css("position:relative;&::after{display:block;content:'';position:absolute;top:", inset, ";bottom:", inset, ";left:", inset, ";right:", inset, ";opacity:0.4;border-radius:4px;z-index:2;animation:", waveEffect, " .2s ease-in;animation-fill-mode:forwards;border:2px solid ", color, ";}&.k-circle,&.k-radio-wrapper{&:after{border-radius:calc(", theme.large.height, " / 2 + 4px);}}");
|
|
16
|
+
return /*#__PURE__*/css("position:relative;&::after{display:block;content:'';position:absolute;top:", inset, ";bottom:", inset, ";left:", inset, ";right:", inset, ";opacity:0.4;border-radius:4px;z-index:2;animation:", waveEffect, " .2s ease-in;animation-fill-mode:forwards;border:2px solid ", color, ";pointer-events:none;}&.k-circle,&.k-radio-wrapper{&:after{border-radius:calc(", theme.large.height, " / 2 + 4px);}}");
|
|
17
17
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.14
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -57,4 +57,4 @@ export * from './components/tree';
|
|
|
57
57
|
export * from './components/treeSelect';
|
|
58
58
|
export * from './components/upload';
|
|
59
59
|
export * from './components/wave';
|
|
60
|
-
export declare const version = "2.0.
|
|
60
|
+
export declare const version = "2.0.14";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.14
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -59,5 +59,5 @@ export * from './components/tree';
|
|
|
59
59
|
export * from './components/treeSelect';
|
|
60
60
|
export * from './components/upload';
|
|
61
61
|
export * from './components/wave';
|
|
62
|
-
export var version = '2.0.
|
|
62
|
+
export var version = '2.0.14';
|
|
63
63
|
/* generate end */
|
|
@@ -64,7 +64,7 @@ describe('Drawer', function () {
|
|
|
64
64
|
}, _callee);
|
|
65
65
|
})));
|
|
66
66
|
it('should handle event correctly', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
67
|
-
var click1, click2, _document$querySelect, element1, element2;
|
|
67
|
+
var click1, click2, click3, _document$querySelect, element1, element2, element3;
|
|
68
68
|
|
|
69
69
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
70
70
|
while (1) {
|
|
@@ -76,6 +76,9 @@ describe('Drawer', function () {
|
|
|
76
76
|
click2 = sinon.spy(function () {
|
|
77
77
|
return console.log(2);
|
|
78
78
|
});
|
|
79
|
+
click3 = sinon.spy(function () {
|
|
80
|
+
return console.log(3);
|
|
81
|
+
});
|
|
79
82
|
ReactDOM.render( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Drawer, {
|
|
80
83
|
value: true,
|
|
81
84
|
title: "1"
|
|
@@ -97,22 +100,34 @@ describe('Drawer', function () {
|
|
|
97
100
|
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
98
101
|
className: "click",
|
|
99
102
|
onClick: click2
|
|
100
|
-
}, "click")))
|
|
101
|
-
|
|
103
|
+
}, "click"))), /*#__PURE__*/React.createElement(Drawer, {
|
|
104
|
+
value: true,
|
|
105
|
+
title: "3"
|
|
106
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
107
|
+
className: "click",
|
|
108
|
+
onClick: click3
|
|
109
|
+
}, "click"))))), container);
|
|
110
|
+
_document$querySelect = document.querySelectorAll('.click'), element1 = _document$querySelect[0], element2 = _document$querySelect[1], element3 = _document$querySelect[2];
|
|
102
111
|
dispatchEvent(element1, 'click');
|
|
103
|
-
_context2.next =
|
|
112
|
+
_context2.next = 8;
|
|
104
113
|
return wait();
|
|
105
114
|
|
|
106
|
-
case
|
|
115
|
+
case 8:
|
|
107
116
|
expect(click1.callCount).to.eql(1);
|
|
108
117
|
dispatchEvent(element2, 'click');
|
|
109
|
-
_context2.next =
|
|
118
|
+
_context2.next = 12;
|
|
110
119
|
return wait();
|
|
111
120
|
|
|
112
|
-
case
|
|
121
|
+
case 12:
|
|
113
122
|
expect(click2.callCount).to.eql(1);
|
|
123
|
+
dispatchEvent(element3, 'click');
|
|
124
|
+
_context2.next = 16;
|
|
125
|
+
return wait();
|
|
114
126
|
|
|
115
|
-
case
|
|
127
|
+
case 16:
|
|
128
|
+
expect(click3.callCount).to.eql(1);
|
|
129
|
+
|
|
130
|
+
case 17:
|
|
116
131
|
case "end":
|
|
117
132
|
return _context2.stop();
|
|
118
133
|
}
|
|
@@ -37,7 +37,8 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
37
37
|
return _this2.setState({
|
|
38
38
|
day: day
|
|
39
39
|
});
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
|
+
show: true
|
|
41
42
|
}, /*#__PURE__*/React.createElement(Option, {
|
|
42
43
|
value: "Monday"
|
|
43
44
|
}, "\u661F\u671F\u4E00"), /*#__PURE__*/React.createElement(Option, {
|
|
@@ -98,6 +98,22 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
98
98
|
}) : undefined, /*#__PURE__*/React.createElement(TableColumn, {
|
|
99
99
|
key: "c",
|
|
100
100
|
title: "Title 3"
|
|
101
|
+
})), /*#__PURE__*/React.createElement(Table, {
|
|
102
|
+
data: this.state.data,
|
|
103
|
+
resizable: true,
|
|
104
|
+
rowKey: function rowKey(row) {
|
|
105
|
+
return row.a;
|
|
106
|
+
},
|
|
107
|
+
animation: false
|
|
108
|
+
}, /*#__PURE__*/React.createElement(TableColumn, {
|
|
109
|
+
key: "a",
|
|
110
|
+
title: "Title 1"
|
|
111
|
+
}), this.state.isShow ? /*#__PURE__*/React.createElement(TableColumn, {
|
|
112
|
+
key: "b",
|
|
113
|
+
title: "Title 2"
|
|
114
|
+
}) : undefined, /*#__PURE__*/React.createElement(TableColumn, {
|
|
115
|
+
key: "c",
|
|
116
|
+
title: "Title 3"
|
|
101
117
|
})));
|
|
102
118
|
};
|
|
103
119
|
|
package/es/styles/global.js
CHANGED
|
@@ -12,6 +12,6 @@ var slideDirections = {
|
|
|
12
12
|
right: 'left center 0'
|
|
13
13
|
}; // TODO: update global when theme changed
|
|
14
14
|
|
|
15
|
-
injectGlobal("html{--var-wave-color:", theme.color.primary, ";box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,SF Pro SC,SF Pro Text,Helvetica Neue,Helvetica,PingFang SC,Segoe UI,Roboto,Hiragino Sans GB,arial,microsoft yahei ui,Microsoft YaHei,
|
|
15
|
+
injectGlobal("html{--var-wave-color:", theme.color.primary, ";box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,SF Pro SC,SF Pro Text,Helvetica Neue,Helvetica,PingFang SC,Segoe UI,Roboto,Hiragino Sans GB,arial,microsoft yahei ui,Microsoft YaHei,sans-serif;}body{font-size:", theme.fontSize, ";line-height:", theme.lineHeight, ";margin:0;padding:0;color:", theme.color.text, ";}*,*:before,*:after{box-sizing:inherit;}", _mapInstanceProperty(_context = _Object$keys(slideDirections)).call(_context, function (direction) {
|
|
16
16
|
return "\n .k-slide" + direction + "-enter-from,\n .k-slide" + direction + "-leave-to {\n transform-origin: " + slideDirections[direction] + ";\n opacity: 0;\n transform: " + (direction === 'down' || direction === 'up' ? "scaleY(.8)" : 'scaleX(.8)') + ";\n }\n .k-slide" + direction + "-enter-active,\n .k-slide" + direction + "-leave-active {\n transform-origin: " + slideDirections[direction] + ";\n transition: opacity " + theme.transition.large + ", transform " + theme.transition.large + " !important;\n pointer-events: none;\n }\n ";
|
|
17
17
|
}).join(''), " .k-fade-enter-from,.k-fade-leave-to{opacity:0!important;}.k-fade-enter-active,.k-fade-leave-active{transition:opacity ", theme.transition.large, ";}.k-fade-leave-active:not(tr){position:absolute;}.k-fade-move{transition:transform ", theme.transition.large, ";}.k-scale-enter-from,.k-scale-leave-to{transform:scale(0);}.k-scale-enter-active,.k-scale-leave-active{transition:transform ", theme.transition.large, ";}.k-expand-enter-from,.k-expand-leave-to{opacity:0;overflow:hidden;}.k-expand-enter-active,.k-expand-leave-active{transition:all ", theme.transition.large, "!important;overflow:hidden;}.k-expand-move{transition:transform ", theme.transition.large, ";}.k-dropdown-enter-from,.k-dropdown-leave-to{opacity:0;transform:translateY(-20px);}.k-dropdown-enter-active,.k-dropdown-leave-active,.k-dropdown-move{transition:all ", theme.transition.large, ";}.k-dropdown-leave-active{position:absolute!important;}.k-dropdown-move{transition:transform ", theme.transition.large, ";}.k-fade-in-left-enter-from,.k-fade-in-left-leave-to{opacity:0;transform:translate3d(-15px, 0, 0);}.k-fade-in-left-enter-active,.k-fade-in-left-leave-active{transition:all ", theme.transition.large, ";td{background:", palette(theme.color.primary, -4), "!important;}}.k-fade-in-left-move{transition:transform ", theme.transition.large, ";}.k-fade-expand-enter-from,.k-fade-expand-leave-to{opacity:0;}.k-fade-expand-enter-active,.k-fade-expand-leave-active{transition:all ", theme.transition.large, ";background:", palette(theme.color.primary, -4), "!important;}.c-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.c-hidden{display:none;}.c-middle{display:inline-block;vertical-align:middle;}");
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.14
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -62,6 +62,6 @@ export * from './components/treeSelect';
|
|
|
62
62
|
export * from './components/upload';
|
|
63
63
|
export * from './components/wave';
|
|
64
64
|
|
|
65
|
-
export const version = '2.0.
|
|
65
|
+
export const version = '2.0.14';
|
|
66
66
|
|
|
67
67
|
/* generate end */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/intact",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14",
|
|
4
4
|
"description": "A component library written in Intact for Intact, Vue, React and Angular",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"highlight.js": "^10.4.1",
|
|
117
117
|
"history": "^5.0.0",
|
|
118
118
|
"html-webpack-plugin": "5.3.1",
|
|
119
|
-
"intact-react": "^3.0.
|
|
119
|
+
"intact-react": "^3.0.14",
|
|
120
120
|
"istanbul-instrumenter-loader": "^3.0.0",
|
|
121
121
|
"js-yaml": "^4.1.0",
|
|
122
122
|
"karma": "^6.3.2",
|