@king-design/vue 3.4.1 → 3.4.3-beta.0
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/__tests__/__snapshots__/Vue Next Demos.md +215 -177
- package/__tests__/components/editable.spec.ts +1 -1
- package/components/button/index.vdt.js +1 -1
- package/components/button/styles.js +3 -3
- package/components/descriptions/item.vdt.js +2 -3
- package/components/diagram/shapes/callout.d.ts +1 -1
- package/components/diagram/shapes/circle.d.ts +1 -1
- package/components/diagram/shapes/document.d.ts +1 -1
- package/components/diagram/shapes/ellipse.d.ts +1 -1
- package/components/diagram/shapes/hexagon.d.ts +1 -1
- package/components/diagram/shapes/image.d.ts +1 -1
- package/components/diagram/shapes/parallelogram.d.ts +1 -1
- package/components/diagram/shapes/rectangle.d.ts +1 -1
- package/components/diagram/shapes/square.d.ts +1 -1
- package/components/diagram/shapes/text.d.ts +1 -1
- package/components/dialog/styles.js +3 -3
- package/components/dropdown/item.js +5 -2
- package/components/editable/index.spec.js +8 -8
- package/components/editable/index.vdt.js +3 -1
- package/components/editable/styles.d.ts +1 -0
- package/components/editable/styles.js +4 -1
- package/components/ellipsis/index.vdt.js +1 -0
- package/components/menu/styles.js +1 -1
- package/components/select/base.d.ts +4 -0
- package/components/select/base.js +11 -1
- package/components/select/base.vdt.js +2 -1
- package/components/select/useImmutable.d.ts +4 -0
- package/components/select/useImmutable.js +46 -0
- package/components/switch/index.js +1 -1
- package/components/table/cell.d.ts +1 -0
- package/components/table/cell.vdt.js +13 -3
- package/components/table/column.d.ts +1 -0
- package/components/table/column.js +1 -0
- package/components/table/row.d.ts +2 -1
- package/components/table/row.js +3 -2
- package/components/table/row.vdt.js +3 -1
- package/components/table/styles.js +1 -1
- package/components/table/table.d.ts +2 -0
- package/components/table/table.js +2 -1
- package/components/table/table.vdt.js +14 -0
- package/components/table/useTree.d.ts +1 -1
- package/components/table/useTree.js +30 -2
- package/components/tooltip/tooltip.d.ts +1 -0
- package/components/tooltip/tooltip.js +9 -1
- package/components/treeSelect/index.vdt.js +1 -0
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
|
@@ -35,7 +35,7 @@ describe('Editable', () => {
|
|
|
35
35
|
container.querySelector<HTMLDivElement>('.k-icon')!.click();
|
|
36
36
|
await wait();
|
|
37
37
|
|
|
38
|
-
const input = container.querySelector('.k-input
|
|
38
|
+
const input = container.querySelector('.k-input textarea') as HTMLTextAreaElement;
|
|
39
39
|
expect(input.selectionStart).to.eql(0);
|
|
40
40
|
expect(input.selectionEnd).to.eql(1);
|
|
41
41
|
|
|
@@ -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('
|
|
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);
|
|
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
|
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), ";}}");
|
|
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) {
|
|
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) {
|
|
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) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce, noop as _$no, createUnknownComponentVNode as _$cc } from 'intact-vue-next';
|
|
3
3
|
import { makeStyles } from './styles';
|
|
4
|
-
import { getRestProps
|
|
5
|
-
import {
|
|
6
|
-
import { Ellipsis } from 'kpc';
|
|
4
|
+
import { getRestProps } from '../utils';
|
|
5
|
+
import { Ellipsis } from '../ellipsis';
|
|
7
6
|
export default function ($props, $blocks, $__proto__) {
|
|
8
7
|
var _classNameObj;
|
|
9
8
|
$blocks || ($blocks = {});
|
|
@@ -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?: "
|
|
15
|
+
strokeStyle?: "dashed" | "dotted" | "solid" | 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?: "
|
|
15
|
+
strokeStyle?: "dashed" | "dotted" | "solid" | 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?: "
|
|
15
|
+
strokeStyle?: "dashed" | "dotted" | "solid" | 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?: "
|
|
15
|
+
strokeStyle?: "dashed" | "dotted" | "solid" | 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?: "
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
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: '
|
|
62
|
-
tipIconLineHeight: '
|
|
61
|
+
tipIconFontSize: '24px',
|
|
62
|
+
tipIconLineHeight: '24px',
|
|
63
63
|
// with title
|
|
64
64
|
titleFontWeight: '500',
|
|
65
|
-
titleTipIconFontSize: '
|
|
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
|
|
54
|
-
|
|
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() {
|
|
@@ -24,7 +24,7 @@ describe('Editable', function () {
|
|
|
24
24
|
case 5:
|
|
25
25
|
expect(element.innerHTML).to.matchSnapshot();
|
|
26
26
|
// input
|
|
27
|
-
input = element.querySelector('
|
|
27
|
+
input = element.querySelector('textarea');
|
|
28
28
|
input.value = 'test';
|
|
29
29
|
dispatchEvent(input, 'blur');
|
|
30
30
|
_context.next = 11;
|
|
@@ -39,7 +39,7 @@ describe('Editable', function () {
|
|
|
39
39
|
return wait();
|
|
40
40
|
case 16:
|
|
41
41
|
expect(element.innerHTML).to.matchSnapshot();
|
|
42
|
-
input = element.querySelector('
|
|
42
|
+
input = element.querySelector('textarea');
|
|
43
43
|
input.value = 'new';
|
|
44
44
|
dispatchEvent(input, 'keydown', {
|
|
45
45
|
keyCode: 27
|
|
@@ -56,7 +56,7 @@ describe('Editable', function () {
|
|
|
56
56
|
return wait();
|
|
57
57
|
case 27:
|
|
58
58
|
expect(element.innerHTML).to.matchSnapshot();
|
|
59
|
-
input = element.querySelector('
|
|
59
|
+
input = element.querySelector('textarea');
|
|
60
60
|
input.value = 'new';
|
|
61
61
|
dispatchEvent(input, 'keydown', {
|
|
62
62
|
keyCode: 13
|
|
@@ -84,7 +84,7 @@ describe('Editable', function () {
|
|
|
84
84
|
_context2.next = 5;
|
|
85
85
|
return wait();
|
|
86
86
|
case 5:
|
|
87
|
-
input = findDomFromVNode(first.$lastInput, true).querySelector('
|
|
87
|
+
input = findDomFromVNode(first.$lastInput, true).querySelector('textarea');
|
|
88
88
|
dispatchEvent(input, 'focus');
|
|
89
89
|
input.value = 'a';
|
|
90
90
|
dispatchEvent(input, 'input');
|
|
@@ -98,7 +98,7 @@ describe('Editable', function () {
|
|
|
98
98
|
_context2.next = 16;
|
|
99
99
|
return wait();
|
|
100
100
|
case 16:
|
|
101
|
-
input = findDomFromVNode(second.$lastInput, true).querySelector('
|
|
101
|
+
input = findDomFromVNode(second.$lastInput, true).querySelector('textarea');
|
|
102
102
|
input.value = 'a';
|
|
103
103
|
dispatchEvent(input, 'input');
|
|
104
104
|
dispatchEvent(input, 'blur');
|
|
@@ -111,7 +111,7 @@ describe('Editable', function () {
|
|
|
111
111
|
_context2.next = 26;
|
|
112
112
|
return wait();
|
|
113
113
|
case 26:
|
|
114
|
-
input = findDomFromVNode(third.$lastInput, true).querySelector('
|
|
114
|
+
input = findDomFromVNode(third.$lastInput, true).querySelector('textarea');
|
|
115
115
|
input.value = 'a';
|
|
116
116
|
dispatchEvent(input, 'input');
|
|
117
117
|
dispatchEvent(input, 'blur');
|
|
@@ -164,7 +164,7 @@ describe('Editable', function () {
|
|
|
164
164
|
_context4.next = 7;
|
|
165
165
|
return wait();
|
|
166
166
|
case 7:
|
|
167
|
-
input = element.querySelector("
|
|
167
|
+
input = element.querySelector("textarea");
|
|
168
168
|
input.value = 'aa';
|
|
169
169
|
dispatchEvent(input, 'blur');
|
|
170
170
|
_context4.next = 12;
|
|
@@ -175,7 +175,7 @@ describe('Editable', function () {
|
|
|
175
175
|
_context4.next = 16;
|
|
176
176
|
return wait();
|
|
177
177
|
case 16:
|
|
178
|
-
input = element.querySelector("
|
|
178
|
+
input = element.querySelector("textarea");
|
|
179
179
|
expect(input.value).to.eql('aa');
|
|
180
180
|
case 18:
|
|
181
181
|
case "end":
|
|
@@ -31,7 +31,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
31
31
|
'ref': this.inputRef,
|
|
32
32
|
'frozenOnInput': true,
|
|
33
33
|
'ev-$mounted': this.select,
|
|
34
|
-
'
|
|
34
|
+
'width': 300,
|
|
35
|
+
'type': 'textarea',
|
|
36
|
+
'rows': 'auto'
|
|
35
37
|
}, null, this.inputRef), 0, 'c-ellipsis'), !disabled && !editing ? _$cc(Tooltip, {
|
|
36
38
|
'content': tip,
|
|
37
39
|
'children': _$cc(Icon, {
|
|
@@ -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() {
|
|
@@ -21,5 +24,5 @@ setDefault(function () {
|
|
|
21
24
|
});
|
|
22
25
|
export { editable };
|
|
23
26
|
export var makeStyles = cache(function makeStyles(k) {
|
|
24
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;.", k, "-editable-icon{margin:", editable.iconGap, ";}&.", k, "-invalid{.", k, "-input-wrapper{border:", editable.invalid.border, "!important;}}");
|
|
27
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;.", k, "-editable-icon{margin:", editable.iconGap, ";}&.", k, "-invalid{.", k, "-input-wrapper{border:", editable.invalid.border, "!important;}}&.", k, "-editable{.", k, "-type-textarea{.", k, "-textarea{padding:0 ", editable.smallPadding, ";}}}");
|
|
25
28
|
});
|
|
@@ -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-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;
|
|
@@ -51,6 +51,10 @@ export declare abstract class BaseSelect<T extends BaseSelectProps<any> = BaseSe
|
|
|
51
51
|
};
|
|
52
52
|
private focusout;
|
|
53
53
|
private draggable;
|
|
54
|
+
immutable: {
|
|
55
|
+
immutableValues: State<any[]>;
|
|
56
|
+
isClosable: (key: string) => boolean;
|
|
57
|
+
};
|
|
54
58
|
protected config: {
|
|
55
59
|
cls: (name: string) => string;
|
|
56
60
|
readonly k: string;
|
|
@@ -2,6 +2,8 @@ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
|
2
2
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
3
|
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/slice";
|
|
4
4
|
import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
|
|
5
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js/instance/filter";
|
|
6
|
+
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/includes";
|
|
5
7
|
import { __decorate } from "tslib";
|
|
6
8
|
import { Component, provide, createRef } from 'intact-vue-next';
|
|
7
9
|
import template from './base.vdt';
|
|
@@ -14,6 +16,7 @@ import { useInput } from './useInput';
|
|
|
14
16
|
import { useFocusout } from './useFocusout';
|
|
15
17
|
import { isNullOrUndefined } from 'intact-shared';
|
|
16
18
|
import { useDraggable } from './useDraggble';
|
|
19
|
+
import { useImmutable } from './useImmutable';
|
|
17
20
|
import { useConfigContext } from '../config';
|
|
18
21
|
var typeDefs = {
|
|
19
22
|
value: null,
|
|
@@ -60,6 +63,7 @@ export var BaseSelect = /*#__PURE__*/function (_Component) {
|
|
|
60
63
|
_this.input = useInput(_this.resetKeywords);
|
|
61
64
|
_this.focusout = useFocusout();
|
|
62
65
|
_this.draggable = useDraggable();
|
|
66
|
+
_this.immutable = useImmutable();
|
|
63
67
|
_this.config = useConfigContext();
|
|
64
68
|
return _this;
|
|
65
69
|
}
|
|
@@ -104,7 +108,13 @@ export var BaseSelect = /*#__PURE__*/function (_Component) {
|
|
|
104
108
|
};
|
|
105
109
|
_proto.clear = function clear(e) {
|
|
106
110
|
e.stopPropagation();
|
|
107
|
-
|
|
111
|
+
var _this$get2 = this.get(),
|
|
112
|
+
value = _this$get2.value,
|
|
113
|
+
multiple = _this$get2.multiple;
|
|
114
|
+
var immutableValues = this.immutable.immutableValues.value;
|
|
115
|
+
this.set('value', multiple ? Array.isArray(value) ? _filterInstanceProperty(value).call(value, function (key) {
|
|
116
|
+
return _includesInstanceProperty(immutableValues).call(immutableValues, key);
|
|
117
|
+
}) : [] : null);
|
|
108
118
|
};
|
|
109
119
|
_proto.onKeydown = function onKeydown(e) {
|
|
110
120
|
this.trigger('keydown', e);
|
|
@@ -57,6 +57,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
57
57
|
var _this$focusout = this.focusout,
|
|
58
58
|
onFocusout = _this$focusout.onFocusout,
|
|
59
59
|
triggerRef = _this$focusout.triggerRef;
|
|
60
|
+
var isClosable = this.immutable.isClosable;
|
|
60
61
|
var filterInput = filterable ? _$cc(Input, {
|
|
61
62
|
'className': _$cn(k + "-select-input"),
|
|
62
63
|
'value': keywords,
|
|
@@ -139,7 +140,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
139
140
|
'children': _$ma(label, function ($label, $key) {
|
|
140
141
|
return _$cc(Tag, {
|
|
141
142
|
'key': isStringOrNumber($label) ? $label : isStringOrNumber(value[$key]) ? value[$key] : $key,
|
|
142
|
-
'closable':
|
|
143
|
+
'closable': isClosable(value[$key]),
|
|
143
144
|
'ev-close': this.delete.bind(this, $key),
|
|
144
145
|
'disabled': disabled,
|
|
145
146
|
'size': size,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/includes";
|
|
2
|
+
import { useInstance } from 'intact-vue-next';
|
|
3
|
+
import { Option } from './option';
|
|
4
|
+
import { OptionGroup } from './group';
|
|
5
|
+
import { eachChildren, isComponentVNode } from '../utils';
|
|
6
|
+
import { useState } from '../../hooks/useState';
|
|
7
|
+
export function useImmutable() {
|
|
8
|
+
var instance = useInstance();
|
|
9
|
+
var immutableValues = useState([]);
|
|
10
|
+
function setImmutableValues() {
|
|
11
|
+
var _instance$get = instance.get(),
|
|
12
|
+
children = _instance$get.children,
|
|
13
|
+
multiple = _instance$get.multiple;
|
|
14
|
+
if (!multiple) return;
|
|
15
|
+
updateImmutableValues(children);
|
|
16
|
+
}
|
|
17
|
+
function updateImmutableValues(children) {
|
|
18
|
+
var _immutableValues = [];
|
|
19
|
+
var loop = function loop(children) {
|
|
20
|
+
eachChildren(children, function (vNode) {
|
|
21
|
+
if (isComponentVNode(vNode, Option)) {
|
|
22
|
+
var _vNode$props = vNode.props,
|
|
23
|
+
disabled = _vNode$props.disabled,
|
|
24
|
+
value = _vNode$props.value;
|
|
25
|
+
if (disabled) {
|
|
26
|
+
_immutableValues.push(value);
|
|
27
|
+
}
|
|
28
|
+
} else if (isComponentVNode(vNode, OptionGroup)) {
|
|
29
|
+
loop(vNode.props.children);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
loop(children);
|
|
34
|
+
immutableValues.set(_immutableValues);
|
|
35
|
+
}
|
|
36
|
+
function isClosable(key) {
|
|
37
|
+
var _context;
|
|
38
|
+
return !_includesInstanceProperty(_context = immutableValues.value).call(_context, key);
|
|
39
|
+
}
|
|
40
|
+
setImmutableValues();
|
|
41
|
+
// instance.on('$receive:children', setImmutableValues);
|
|
42
|
+
return {
|
|
43
|
+
immutableValues: immutableValues,
|
|
44
|
+
isClosable: isClosable
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -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-vue-next').Template<any>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createUnknownComponentVNode as _$cc, createElementVNode as _$ce, className as _$cn } from 'intact-vue-next';
|
|
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,12 @@ 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
|
+
'children': loaded !== false ? _$cc(Icon, {
|
|
50
57
|
'className': _$cn(k + "-icon-right"),
|
|
51
58
|
'size': 'small'
|
|
59
|
+
}) : _$cc(Icon, {
|
|
60
|
+
'className': _$cn(k + "-tree-icon ion-load-c"),
|
|
61
|
+
'rotate': true
|
|
52
62
|
})
|
|
53
63
|
}) : undefined, children], 0, _$cn(classNameObj), {
|
|
54
64
|
'style': style,
|
|
@@ -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;
|
package/components/table/row.js
CHANGED
|
@@ -70,8 +70,9 @@ export var TableRow = /*#__PURE__*/function (_Component) {
|
|
|
70
70
|
e.stopPropagation();
|
|
71
71
|
var _this$get3 = this.get(),
|
|
72
72
|
onToggleSpreadRow = _this$get3.onToggleSpreadRow,
|
|
73
|
-
key = _this$get3.key
|
|
74
|
-
|
|
73
|
+
key = _this$get3.key,
|
|
74
|
+
data = _this$get3.data;
|
|
75
|
+
onToggleSpreadRow(key, data);
|
|
75
76
|
};
|
|
76
77
|
_proto.onMouseEnter = function onMouseEnter(e) {
|
|
77
78
|
// 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,7 +90,7 @@ setDefault(function () {
|
|
|
90
90
|
makeGroupMenuStyles == null || makeGroupMenuStyles.clearCache();
|
|
91
91
|
});
|
|
92
92
|
export var makeStyles = cache(function makeStyles(k) {
|
|
93
|
-
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";position:sticky;top:0;z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&.", 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, ";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) {
|
|
94
94
|
return /*#__PURE__*/css(".", k, "-align-", type, "{text-align:", type, ";}");
|
|
95
95
|
}), ">.", k, "-pagination{margin:16px 0;}&.", k, "-fix-header{min-height:0;.", k, "-table-wrapper{height:100%;}}");
|
|
96
96
|
});
|