@king-design/vue 3.4.3 → 3.4.5
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 +162 -150
- package/components/button/group.d.ts +1 -0
- package/components/button/group.js +4 -0
- package/components/button/group.vdt.js +3 -2
- package/components/button/styles.js +3 -3
- package/components/table/cell.d.ts +1 -0
- package/components/table/cell.vdt.js +5 -3
- package/components/table/column.vdt.js +15 -12
- package/components/table/row.d.ts +1 -0
- package/components/table/row.vdt.js +4 -2
- package/components/table/styles.d.ts +49 -0
- package/components/table/styles.js +2 -1
- package/components/table/table.d.ts +1 -0
- package/components/table/table.js +1 -0
- package/components/table/table.vdt.js +11 -2
- package/components/table/useColumns.d.ts +9 -0
- package/components/table/useColumns.js +29 -1
- package/components/tip/index.d.ts +6 -1
- package/components/tip/index.js +12 -1
- package/components/tip/index.vdt.js +25 -5
- package/components/tip/styles.js +44 -2
- package/components/tooltip/tooltip.js +5 -1
- package/components/transfer/index.vdt.js +2 -4
- package/components/upload/index.vdt.js +4 -1
- package/components/upload/styles.js +1 -1
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/install.js +6 -1
- package/package.json +2 -2
|
@@ -11,6 +11,7 @@ var typeDefs = {
|
|
|
11
11
|
fluid: Boolean,
|
|
12
12
|
checkType: ['none', 'radio', 'checkbox'],
|
|
13
13
|
seperate: Boolean,
|
|
14
|
+
separate: Boolean,
|
|
14
15
|
btnWidth: [Number, String]
|
|
15
16
|
};
|
|
16
17
|
var defaults = function defaults() {
|
|
@@ -33,6 +34,9 @@ export var ButtonGroup = /*#__PURE__*/function (_Component) {
|
|
|
33
34
|
var _proto = ButtonGroup.prototype;
|
|
34
35
|
_proto.init = function init() {
|
|
35
36
|
provide(BUTTON_GROUP, this);
|
|
37
|
+
if (typeof this.get().seperate === 'boolean') {
|
|
38
|
+
console.warn("`seperate` is a typo which will be removed in next version, please using `separate` instead");
|
|
39
|
+
}
|
|
36
40
|
};
|
|
37
41
|
_proto.setValue = function setValue(v) {
|
|
38
42
|
var _this$get = this.get(),
|
|
@@ -12,9 +12,10 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
12
12
|
vertical = _this$get.vertical,
|
|
13
13
|
children = _this$get.children,
|
|
14
14
|
fluid = _this$get.fluid,
|
|
15
|
-
seperate = _this$get.seperate
|
|
15
|
+
seperate = _this$get.seperate,
|
|
16
|
+
separate = _this$get.separate;
|
|
16
17
|
var k = this.config.k;
|
|
17
|
-
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-btns"] = true, _classNameObj[k + "-vertical"] = vertical, _classNameObj[k + "-fluid"] = fluid, _classNameObj[k + "-
|
|
18
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-btns"] = true, _classNameObj[k + "-vertical"] = vertical, _classNameObj[k + "-fluid"] = fluid, _classNameObj[k + "-separate"] = typeof separate === 'boolean' ? separate : separate, _classNameObj[className] = className, _classNameObj[makeButtonGroupStyles(k)] = true, _classNameObj);
|
|
18
19
|
return _$cv('div', _extends({
|
|
19
20
|
'className': _$cn(classNameObj)
|
|
20
21
|
}, getRestProps(this)), children);
|
|
@@ -219,13 +219,13 @@ export var makeButtonStyles = cache(function makeButtonStyles(k, iconSide, color
|
|
|
219
219
|
}), ";.", k, "-icon-loading{margin-left:-1em;}}}"), ";"));
|
|
220
220
|
});
|
|
221
221
|
export var makeButtonGroupStyles = cache(function makeButtonGroupStyles(k) {
|
|
222
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;flex-wrap:wrap;vertical-align:middle;.", k, "-btn{margin:0;vertical-align:middle;&:hover,&:focus,&.", k, "-active{z-index:1;position:relative;}}&.", k, "-fluid{width:100%;}&:not(.", k, "-vertical):not(.", k, "-
|
|
222
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;flex-wrap:wrap;vertical-align:middle;.", k, "-btn{margin:0;vertical-align:middle;&:hover,&:focus,&.", k, "-active{z-index:1;position:relative;}}&.", k, "-fluid{width:100%;}&:not(.", k, "-vertical):not(.", k, "-separate){>.", k, "-btn{", _mapInstanceProperty(types).call(types, function (type) {
|
|
223
223
|
if (type === 'active') return;
|
|
224
224
|
var borderColor = button.group[type].borderColor;
|
|
225
225
|
return /*#__PURE__*/css("&.", k, "-", type, ":not(:first-child){border-left-color:", borderColor, ";}&.", k, "-", type, ":not(:last-child){border-right-color:", borderColor, ";}");
|
|
226
|
-
}), ";&:not(:first-child){margin-left:-1px;&:not(:last-child){border-radius:0;}}&:not(:only-child):first-child{border-top-right-radius:0;border-bottom-right-radius:0;}&:not(:only-child):last-child{border-top-left-radius:0;border-bottom-left-radius:0;}}&.", k, "-fluid{display:flex;>.", k, "-btn{flex:1;}}}&.", k, "-vertical:not(.", k, "-
|
|
226
|
+
}), ";&:not(:first-child){margin-left:-1px;&:not(:last-child){border-radius:0;}}&:not(:only-child):first-child{border-top-right-radius:0;border-bottom-right-radius:0;}&:not(:only-child):last-child{border-top-left-radius:0;border-bottom-left-radius:0;}}&.", k, "-fluid{display:flex;>.", k, "-btn{flex:1;}}}&.", k, "-vertical:not(.", k, "-separate){flex-direction:column;>.", k, "-btn{", _mapInstanceProperty(types).call(types, function (type) {
|
|
227
227
|
if (type === 'active') return;
|
|
228
228
|
var borderColor = button.group[type].borderColor;
|
|
229
229
|
return /*#__PURE__*/css("&.", k, "-", type, ":not(:first-child){border-top-color:", borderColor, ";}&.", k, "-", type, ":not(:last-child){border-bottom-color:", borderColor, ";}");
|
|
230
|
-
}), ";&:not(.", k, "-btn-icon){width:100%;}&:not(:first-child){margin-top:-1px;&:not(:last-child){border-radius:0;}}&:not(:only-child):first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;}&:not(:only-child):last-child{border-top-left-radius:0;border-top-right-radius:0;}}}&.", k, "-
|
|
230
|
+
}), ";&:not(.", k, "-btn-icon){width:100%;}&:not(:first-child){margin-top:-1px;&:not(:last-child){border-radius:0;}}&:not(:only-child):first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;}&:not(:only-child):last-child{border-top-left-radius:0;border-top-right-radius:0;}}}&.", k, "-separate{gap:8px;}");
|
|
231
231
|
});
|
|
@@ -16,6 +16,7 @@ export interface TableCellProps {
|
|
|
16
16
|
onClickArrow: (e: MouseEvent) => void;
|
|
17
17
|
hasChildren: boolean;
|
|
18
18
|
loaded: boolean;
|
|
19
|
+
spreadArrowIndex: number;
|
|
19
20
|
}
|
|
20
21
|
export declare class TableCell extends Component<TableCellProps> {
|
|
21
22
|
static template: string | import('intact-vue-next').Template<any>;
|
|
@@ -23,10 +23,12 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
23
23
|
rowspan = _this$get.rowspan,
|
|
24
24
|
onClickArrow = _this$get.onClickArrow,
|
|
25
25
|
hasChildren = _this$get.hasChildren,
|
|
26
|
-
loaded = _this$get.loaded
|
|
26
|
+
loaded = _this$get.loaded,
|
|
27
|
+
spreadArrowIndex = _this$get.spreadArrowIndex;
|
|
27
28
|
var k = this.config.k;
|
|
28
29
|
var blocks = props.$blocks;
|
|
29
30
|
var children = get(data, props.key);
|
|
31
|
+
var isTree = !spreadArrowIndex ? columnIndex === 0 : columnIndex === spreadArrowIndex;
|
|
30
32
|
if (blocks) {
|
|
31
33
|
var template = blocks.template || blocks.default;
|
|
32
34
|
if (template) {
|
|
@@ -41,12 +43,12 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
41
43
|
var _getClassAndStyleForF = getClassAndStyleForFixed(props, offset, k, checkType),
|
|
42
44
|
className = _getClassAndStyleForF.className,
|
|
43
45
|
style = _getClassAndStyleForF.style;
|
|
44
|
-
if (
|
|
46
|
+
if (isTree && indent) {
|
|
45
47
|
style || (style = {});
|
|
46
48
|
style.paddingLeft = indent + "px";
|
|
47
49
|
}
|
|
48
50
|
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-hidden"] = props.hidden, _classNameObj[className] = className, _classNameObj);
|
|
49
|
-
return _$ce(2, 'td', [
|
|
51
|
+
return _$ce(2, 'td', [hasChildren && isTree ? _$cc(Button, {
|
|
50
52
|
'type': 'none',
|
|
51
53
|
'icon': true,
|
|
52
54
|
'circle': true,
|
|
@@ -13,7 +13,7 @@ import { linkEvent } from 'intact-vue-next';
|
|
|
13
13
|
import { context as TableContext } from './useColumns';
|
|
14
14
|
import { context as ResizableContext } from './useResizable';
|
|
15
15
|
import { context as FixedColumnsContext } from './useFixedColumns';
|
|
16
|
-
import { stopPropagation } from '../utils';
|
|
16
|
+
import { stopPropagation, addStyle } from '../utils';
|
|
17
17
|
import { Input } from '../input';
|
|
18
18
|
import { _$ } from '../../i18n';
|
|
19
19
|
import { ignoreSortable } from './useSortable';
|
|
@@ -49,19 +49,22 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
49
49
|
checkAll = _this$group.checkAll;
|
|
50
50
|
var k = this.config.k;
|
|
51
51
|
return _$cc(TableContext.Consumer, {
|
|
52
|
-
'children': function children(
|
|
52
|
+
'children': function children(_ref) {
|
|
53
|
+
var checkType = _ref.checkType,
|
|
54
|
+
lastCellKey = _ref.lastCellKey,
|
|
55
|
+
lastCellStyle = _ref.lastCellStyle;
|
|
53
56
|
return _$cc(GroupContext.Consumer, {
|
|
54
|
-
'children': function children(
|
|
55
|
-
var currentGroup =
|
|
56
|
-
onChange =
|
|
57
|
+
'children': function children(_ref2) {
|
|
58
|
+
var currentGroup = _ref2.group,
|
|
59
|
+
onChange = _ref2.onChange;
|
|
57
60
|
return _$cc(SortableContext.Consumer, {
|
|
58
|
-
'children': function children(
|
|
59
|
-
var sort = _sortInstanceProperty(
|
|
60
|
-
onChangeSort =
|
|
61
|
+
'children': function children(_ref3) {
|
|
62
|
+
var sort = _sortInstanceProperty(_ref3),
|
|
63
|
+
onChangeSort = _ref3.onChange;
|
|
61
64
|
return _$cc(ResizableContext.Consumer, {
|
|
62
|
-
'children': function children(
|
|
63
|
-
var resizable =
|
|
64
|
-
onStart =
|
|
65
|
+
'children': function children(_ref4) {
|
|
66
|
+
var resizable = _ref4.resizable,
|
|
67
|
+
onStart = _ref4.onStart;
|
|
65
68
|
return _$cc(FixedColumnsContext.Consumer, {
|
|
66
69
|
'children': function children(offsetMap) {
|
|
67
70
|
var _classNameObj, _$cn2, _$cn4;
|
|
@@ -168,7 +171,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
168
171
|
'className': _$cn(k + "-icon-down-bold " + k + "-desc"),
|
|
169
172
|
'size': 'mini'
|
|
170
173
|
})], 4, _$cn((_$cn4 = {}, _$cn4[k + "-column-sort"] = true, _$cn4[k + "-" + type] = type, _$cn4))) : undefined], 0, _$cn(k + "-table-title"))], 0, _$cn(classNameObj), {
|
|
171
|
-
'style': style,
|
|
174
|
+
'style': key === lastCellKey ? addStyle(style, lastCellStyle) : style,
|
|
172
175
|
'title': isStringOrNumber(title) ? title : null,
|
|
173
176
|
'ev-click': sortable ? linkEvent(key, onChangeSort) : null,
|
|
174
177
|
'colspan': cols,
|
|
@@ -34,7 +34,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
34
34
|
draggable = _this$get.draggable,
|
|
35
35
|
draggingKey = _this$get.draggingKey,
|
|
36
36
|
animation = _this$get.animation,
|
|
37
|
-
loaded = _this$get.loaded
|
|
37
|
+
loaded = _this$get.loaded,
|
|
38
|
+
spreadArrowIndex = _this$get.spreadArrowIndex;
|
|
38
39
|
var k = this.config.k;
|
|
39
40
|
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);
|
|
40
41
|
var getGridItem = function getGridItem(columnIndex) {
|
|
@@ -92,7 +93,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
92
93
|
'rowspan': spans ? spans.rowspan : undefined,
|
|
93
94
|
'onClickArrow': _this.onClickArrow,
|
|
94
95
|
'hasChildren': hasChildren,
|
|
95
|
-
'key': columnKey
|
|
96
|
+
'key': columnKey,
|
|
97
|
+
'spreadArrowIndex': spreadArrowIndex
|
|
96
98
|
}, columnKey));
|
|
97
99
|
});
|
|
98
100
|
var rows = animation ? _$cc(TransitionGroup, {
|
|
@@ -1,4 +1,53 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
+
declare const defaults: {
|
|
3
|
+
readonly transition: string;
|
|
4
|
+
border: string;
|
|
5
|
+
readonly borderRadius: string;
|
|
6
|
+
fontSize: string;
|
|
7
|
+
bgColor: string;
|
|
8
|
+
readonly color: string;
|
|
9
|
+
fixLeftShadow: string;
|
|
10
|
+
fixRightShadow: string;
|
|
11
|
+
thead: {
|
|
12
|
+
readonly bgColor: string;
|
|
13
|
+
readonly color: string;
|
|
14
|
+
padding: string;
|
|
15
|
+
fontSize: string;
|
|
16
|
+
fontWeight: string;
|
|
17
|
+
textAlign: string;
|
|
18
|
+
height: string;
|
|
19
|
+
delimiterHeight: string;
|
|
20
|
+
delimiterColor: string;
|
|
21
|
+
};
|
|
22
|
+
tbody: {
|
|
23
|
+
readonly hoverBgcolor: string;
|
|
24
|
+
padding: string;
|
|
25
|
+
};
|
|
26
|
+
stripeBgColor: string;
|
|
27
|
+
group: {
|
|
28
|
+
gap: string;
|
|
29
|
+
menuMaxHeight: string;
|
|
30
|
+
menuMinWidth: string;
|
|
31
|
+
readonly activeColor: string;
|
|
32
|
+
headerPadding: string;
|
|
33
|
+
readonly headerBorder: string;
|
|
34
|
+
};
|
|
35
|
+
sort: {
|
|
36
|
+
iconHeight: string;
|
|
37
|
+
gap: string;
|
|
38
|
+
readonly enabledColor: string;
|
|
39
|
+
};
|
|
40
|
+
expandBgColor: string;
|
|
41
|
+
readonly selectedBgColor: string;
|
|
42
|
+
arrow: {
|
|
43
|
+
gap: string;
|
|
44
|
+
width: string;
|
|
45
|
+
};
|
|
46
|
+
resizeWidth: string;
|
|
47
|
+
draggingOpacity: string;
|
|
48
|
+
};
|
|
49
|
+
declare let table: typeof defaults;
|
|
50
|
+
export { table };
|
|
2
51
|
export declare const makeStyles: {
|
|
3
52
|
(k: string): string;
|
|
4
53
|
clearCache(): {};
|
|
@@ -89,8 +89,9 @@ setDefault(function () {
|
|
|
89
89
|
makeStyles == null || makeStyles.clearCache();
|
|
90
90
|
makeGroupMenuStyles == null || makeGroupMenuStyles.clearCache();
|
|
91
91
|
});
|
|
92
|
+
export { table };
|
|
92
93
|
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-collapse:separate;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}tfoot{z-index:2;tr{td{border-top:", table.border, ";}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&.", k, "-fixed-right:before{left:-2px;}&:first-of-type:before{display:none;}}.", k, "-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.", k, "-table-title-text{flex:1;display:inline-flex;line-height:1.4;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.", k, "-fixed-left,.", k, "-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.", k, "-fixed-left:after{right:-11px;}.", k, "-fixed-right:after{left:-11px;}&.", k, "-scroll-left .", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.", k, "-scroll-right .", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.", k, "-scroll-middle{.", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.", k, "-fixed-right+.", k, "-fixed-right:after{display:none;}.", k, "-table-affix-header{position:sticky;top:0;left:0;.", k, "-affix-wrapper{overflow:hidden;}&.", k, "-fixed{position:relative;}}&.", k, "-border,&.", k, "-grid{.", k, "-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.", k, "-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.", k, "-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.", k, "-table-group{margin-left:", table.group.gap, ";}.", k, "-table-check{.", k, "-checkbox,.", k, "-radio{position:relative;top:-1px;}}.", k, "-column-sortable{cursor:pointer;}.", k, "-column-sort{.", k, "-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.", k, "-desc .", k, "-icon.", k, "-desc,&.", k, "-asc .", k, "-icon.", k, "-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.", k, "-table-spin.", k, "-overlay{z-index:2;}.", k, "-table-empty{text-align:center;}tr.", k, "-expand{td{padding:0;background:#fdfcff;}}&.", k, "-with-expand{tr:not(.", k, "-expand){td{border-bottom:none;}}}.", k, "-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.", k, "-selected td{background:", table.selectedBgColor, ";}.", k, "-hidden{display:none;}.", k, "-table-arrow{width:", table.arrow.width, "!important;margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.", k, "-spreaded{.", k, "-table-arrow{transform:rotate(90deg);}}.", k, "-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.", k, "-dragging{opacity:", table.draggingOpacity, ";}.", k, "-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.", k, "-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
|
|
94
|
+
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}tfoot{z-index:2;tr{td{border-top:", table.border, ";border-bottom-color:transparent;}}}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
95
|
return /*#__PURE__*/css(".", k, "-align-", type, "{text-align:", type, ";}");
|
|
95
96
|
}), ">.", k, "-pagination{margin:16px 0;}&.", k, "-fix-header{min-height:0;.", k, "-table-wrapper{height:100%;}thead{position:sticky;top:0;}}&.", k, "-fix-footer{min-height:0;.", k, "-table-wrapper{height:100%;}tfoot{position:sticky;bottom:0;}}");
|
|
96
97
|
});
|
|
@@ -39,6 +39,7 @@ export interface TableProps<T = any, K extends TableRowKey = TableRowKey, C exte
|
|
|
39
39
|
hideHeader?: boolean;
|
|
40
40
|
pagination?: boolean | PaginationProps;
|
|
41
41
|
fixFooter?: boolean;
|
|
42
|
+
spreadArrowIndex?: number;
|
|
42
43
|
load?: (value: T) => Promise<void> | void;
|
|
43
44
|
}
|
|
44
45
|
export interface TableEvents<T = any, K extends TableRowKey = number> {
|
|
@@ -55,13 +55,17 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
55
55
|
_animation = _this$get.animation,
|
|
56
56
|
hideHeader = _this$get.hideHeader,
|
|
57
57
|
pagination = _this$get.pagination,
|
|
58
|
-
fixFooter = _this$get.fixFooter
|
|
58
|
+
fixFooter = _this$get.fixFooter,
|
|
59
|
+
spreadArrowIndex = _this$get.spreadArrowIndex;
|
|
59
60
|
var animation = !Array.isArray(_animation) ? [_animation, _animation] : _animation;
|
|
60
61
|
var _this$columns$getData = this.columns.getData(),
|
|
61
62
|
columns = _this$columns$getData.columns,
|
|
62
63
|
cols = _this$columns$getData.cols,
|
|
63
64
|
maxRows = _this$columns$getData.maxRows,
|
|
64
65
|
maxCols = _this$columns$getData.maxCols;
|
|
66
|
+
var _this$columns$getStyl = this.columns.getStyleForLastColumn(),
|
|
67
|
+
lastCellKey = _this$columns$getStyl.lastCellKey,
|
|
68
|
+
lastCellStyle = _this$columns$getStyl.lastCellStyle;
|
|
65
69
|
var _this$fixedColumns = this.fixedColumns,
|
|
66
70
|
scrollPosition = _this$fixedColumns.scrollPosition,
|
|
67
71
|
hasFixed = _this$fixedColumns.hasFixed,
|
|
@@ -101,7 +105,11 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
101
105
|
onChangeChecked = _this$checked.onChangeChecked;
|
|
102
106
|
var allCheckedStatus = getAllCheckedStatus();
|
|
103
107
|
var thead = hideHeader ? null : _$cc(TableContext.Provider, {
|
|
104
|
-
'value':
|
|
108
|
+
'value': {
|
|
109
|
+
checkType: checkType,
|
|
110
|
+
lastCellKey: lastCellKey,
|
|
111
|
+
lastCellStyle: lastCellStyle
|
|
112
|
+
},
|
|
105
113
|
'children': _$cc(GroupContext.Provider, {
|
|
106
114
|
'value': {
|
|
107
115
|
group: group,
|
|
@@ -205,6 +213,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
205
213
|
'onBeforeUnmount': _this.resetRowStatus.onRowBeforeUnmount,
|
|
206
214
|
'offsetMap': offsetMap.value,
|
|
207
215
|
'animation': animation[1],
|
|
216
|
+
'spreadArrowIndex': spreadArrowIndex,
|
|
208
217
|
'draggable': draggable,
|
|
209
218
|
'draggingKey': draggingKey.value,
|
|
210
219
|
'onRowDragStart': onRowDragStart,
|
|
@@ -14,4 +14,13 @@ export declare function useColumns(): {
|
|
|
14
14
|
maxRows: number;
|
|
15
15
|
maxCols: number;
|
|
16
16
|
};
|
|
17
|
+
getStyleForLastColumn: () => {
|
|
18
|
+
lastCellKey: null;
|
|
19
|
+
lastCellStyle: null;
|
|
20
|
+
} | {
|
|
21
|
+
lastCellKey: import('intact-vue-next').Key | null;
|
|
22
|
+
lastCellStyle: {
|
|
23
|
+
'border-right': string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
17
26
|
};
|
|
@@ -3,6 +3,7 @@ import { useInstance, directClone } from 'intact-vue-next';
|
|
|
3
3
|
import { eachChildren, isComponentVNode } from '../utils';
|
|
4
4
|
import { TableColumn } from './column';
|
|
5
5
|
import { createContext } from '../context';
|
|
6
|
+
import { table as theme } from './styles';
|
|
6
7
|
export var context = createContext();
|
|
7
8
|
export function useColumns() {
|
|
8
9
|
var instance = useInstance();
|
|
@@ -89,9 +90,36 @@ export function useColumns() {
|
|
|
89
90
|
maxCols: maxCols
|
|
90
91
|
};
|
|
91
92
|
}
|
|
93
|
+
function getStyleForLastColumn() {
|
|
94
|
+
if (instance.get('type') !== 'grid' || !columns.length || !cols.length) {
|
|
95
|
+
return {
|
|
96
|
+
lastCellKey: null,
|
|
97
|
+
lastCellStyle: null
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
var lastRow = columns[columns.length - 1];
|
|
101
|
+
var lastTrItem = lastRow[lastRow.length - 1];
|
|
102
|
+
var lastCol = cols[cols.length - 1];
|
|
103
|
+
if (!lastTrItem || !lastCol) {
|
|
104
|
+
return {
|
|
105
|
+
lastCellKey: null,
|
|
106
|
+
lastCellStyle: null
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return lastCol.key === lastTrItem.key ? {
|
|
110
|
+
lastCellKey: null,
|
|
111
|
+
lastCellStyle: null
|
|
112
|
+
} : {
|
|
113
|
+
lastCellKey: lastTrItem.key,
|
|
114
|
+
lastCellStyle: {
|
|
115
|
+
'border-right': "" + theme.border
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
}
|
|
92
119
|
return {
|
|
93
120
|
getColumns: getColumns,
|
|
94
121
|
getCols: getCols,
|
|
95
|
-
getData: getData
|
|
122
|
+
getData: getData,
|
|
123
|
+
getStyleForLastColumn: getStyleForLastColumn
|
|
96
124
|
};
|
|
97
125
|
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { TypeDefs } from 'intact-vue-next';
|
|
1
2
|
import { Tag, TagProps, TagEvents, TagBlocks } from '../tag/base';
|
|
2
3
|
export interface TipProps extends TagProps {
|
|
4
|
+
showIcon?: boolean;
|
|
3
5
|
}
|
|
4
6
|
export interface TipEvents extends TagEvents {
|
|
5
7
|
}
|
|
6
8
|
export interface TipBlocks extends TagBlocks {
|
|
7
9
|
title: null;
|
|
8
10
|
close: null;
|
|
11
|
+
icon: null;
|
|
9
12
|
}
|
|
10
13
|
export declare class Tip extends Tag<TipProps, TipEvents, TipBlocks> {
|
|
11
|
-
static template: string | import(
|
|
14
|
+
static template: string | import('intact-vue-next').Template<any>;
|
|
15
|
+
static typeDefs: Required<TypeDefs<TipProps>>;
|
|
16
|
+
static defaults: () => Partial<TipProps>;
|
|
12
17
|
}
|
package/components/tip/index.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
3
|
import template from './index.vdt';
|
|
3
4
|
import { Tag } from '../tag/base';
|
|
5
|
+
var typeDefs = _extends({}, Tag.typeDefs, {
|
|
6
|
+
showIcon: Boolean
|
|
7
|
+
});
|
|
8
|
+
var defaults = function defaults() {
|
|
9
|
+
return _extends({}, Tag.defaults(), {
|
|
10
|
+
showIcon: false
|
|
11
|
+
});
|
|
12
|
+
};
|
|
4
13
|
export var Tip = /*#__PURE__*/function (_Tag) {
|
|
5
14
|
_inheritsLoose(Tip, _Tag);
|
|
6
15
|
function Tip() {
|
|
@@ -8,4 +17,6 @@ export var Tip = /*#__PURE__*/function (_Tag) {
|
|
|
8
17
|
}
|
|
9
18
|
return Tip;
|
|
10
19
|
}(Tag);
|
|
11
|
-
Tip.template = template;
|
|
20
|
+
Tip.template = template;
|
|
21
|
+
Tip.typeDefs = typeDefs;
|
|
22
|
+
Tip.defaults = defaults;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createUnknownComponentVNode as _$cc, className as _$cn, noop as _$no, superCall as _$su, extend as _$ex, EMPTY_OBJ as _$em, createElementVNode as _$ce } from 'intact-vue-next';
|
|
2
2
|
import { Button } from '../button';
|
|
3
3
|
import { Icon } from '../icon';
|
|
4
4
|
import { makeStyles } from './styles';
|
|
5
5
|
export default function ($props, $blocks, $__proto__) {
|
|
6
|
-
var _classNameObj;
|
|
6
|
+
var _classNameObj, _$cn2;
|
|
7
7
|
$blocks || ($blocks = {});
|
|
8
8
|
$props || ($props = {});
|
|
9
9
|
var $this = this;
|
|
@@ -13,9 +13,28 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
13
13
|
children = _this$get.children,
|
|
14
14
|
closable = _this$get.closable,
|
|
15
15
|
type = _this$get.type,
|
|
16
|
-
disabled = _this$get.disabled
|
|
16
|
+
disabled = _this$get.disabled,
|
|
17
|
+
showIcon = _this$get.showIcon;
|
|
17
18
|
var k = this.config.k;
|
|
19
|
+
var iconMap = {
|
|
20
|
+
default: 'information-fill',
|
|
21
|
+
info: 'information-fill',
|
|
22
|
+
warning: 'warning-fill',
|
|
23
|
+
success: 'success-fill',
|
|
24
|
+
error: 'error-fill'
|
|
25
|
+
};
|
|
18
26
|
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-tip"] = true, _classNameObj[makeStyles(k)] = true, _classNameObj);
|
|
27
|
+
var iconWrapper = !$blocks.icon ? _$cc(Icon, {
|
|
28
|
+
'className': _$cn((_$cn2 = {}, _$cn2[k + "-icon-" + (iconMap[type] || iconMap.info)] = true, _$cn2[k + "-tip-icon"] = true, _$cn2))
|
|
29
|
+
}) : (_$blocks['icon'] = function ($super) {
|
|
30
|
+
return null;
|
|
31
|
+
}, __$blocks['icon'] = function ($super, data) {
|
|
32
|
+
var block = $blocks['icon'];
|
|
33
|
+
var callBlock = function callBlock() {
|
|
34
|
+
return _$blocks['icon'].call($this, $super, data);
|
|
35
|
+
};
|
|
36
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
37
|
+
}, __$blocks['icon'](_$no));
|
|
19
38
|
return _$su.call($this, {
|
|
20
39
|
'className': _$cn(classNameObj),
|
|
21
40
|
'name': 'k-fade'
|
|
@@ -23,7 +42,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
23
42
|
var _$blocks = {},
|
|
24
43
|
__$blocks = _$ex({}, $blocks);
|
|
25
44
|
return (_$blocks['body'] = function ($super) {
|
|
26
|
-
|
|
45
|
+
var _$cn3, _$cn4;
|
|
46
|
+
return _$ce(2, 'div', [!$blocks.title && (showIcon || $blocks.icon) ? iconWrapper : undefined, $blocks.title ? _$ce(2, 'div', [showIcon ? iconWrapper : undefined, _$ce(2, 'span', (_$blocks['title'] = function ($super) {
|
|
27
47
|
return null;
|
|
28
48
|
}, __$blocks['title'] = function ($super, data) {
|
|
29
49
|
var block = $blocks['title'];
|
|
@@ -31,7 +51,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
31
51
|
return _$blocks['title'].call($this, $super, data);
|
|
32
52
|
};
|
|
33
53
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
34
|
-
}, __$blocks['title'](_$no)), 0, _$cn(k + "-tip-title")) : undefined, children], 0, _$cn(k + "-tip-wrapper"));
|
|
54
|
+
}, __$blocks['title'](_$no)), 0, _$cn(k + "-title-content"))], 0, _$cn((_$cn3 = {}, _$cn3[k + "-tip-title"] = true, _$cn3[k + "-with-icon"] = showIcon, _$cn3))) : undefined, _$ce(2, 'div', children, 0, _$cn(k + "-tip-content"))], 0, _$cn((_$cn4 = {}, _$cn4[k + "-tip-wrapper"] = true, _$cn4[k + "-with-icon"] = !$blocks.title && (showIcon || $blocks.icon), _$cn4)));
|
|
35
55
|
}, __$blocks['body'] = function ($super, data) {
|
|
36
56
|
var block = $blocks['body'];
|
|
37
57
|
var callBlock = function callBlock() {
|
package/components/tip/styles.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
1
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
2
3
|
import { css } from '@emotion/css';
|
|
3
4
|
import '../../styles/global';
|
|
4
|
-
import { deepDefaults } from '../../styles/utils';
|
|
5
|
+
import { deepDefaults, sizes } from '../../styles/utils';
|
|
5
6
|
import { cache } from '../utils';
|
|
6
7
|
var defaults = {
|
|
7
8
|
title: {
|
|
@@ -14,6 +15,39 @@ var defaults = {
|
|
|
14
15
|
},
|
|
15
16
|
get padding() {
|
|
16
17
|
return "6px " + theme.default.padding;
|
|
18
|
+
},
|
|
19
|
+
content: {
|
|
20
|
+
padding: '7px 33px 8px 8px'
|
|
21
|
+
},
|
|
22
|
+
icon: {
|
|
23
|
+
fontSize: "18px",
|
|
24
|
+
left: "16px",
|
|
25
|
+
top: "6px"
|
|
26
|
+
},
|
|
27
|
+
large: {
|
|
28
|
+
padding: "12px",
|
|
29
|
+
get fontSize() {
|
|
30
|
+
return theme.default.fontSize;
|
|
31
|
+
},
|
|
32
|
+
close: {
|
|
33
|
+
height: '42px'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
small: {
|
|
37
|
+
padding: "4px 12px",
|
|
38
|
+
get fontSize() {
|
|
39
|
+
return theme.small.fontSize;
|
|
40
|
+
},
|
|
41
|
+
close: {
|
|
42
|
+
height: '26px'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
mini: {
|
|
46
|
+
padding: "2px 12px",
|
|
47
|
+
fontSize: '11px',
|
|
48
|
+
close: {
|
|
49
|
+
height: '20px'
|
|
50
|
+
}
|
|
17
51
|
}
|
|
18
52
|
};
|
|
19
53
|
var tip;
|
|
@@ -24,5 +58,13 @@ setDefault(function () {
|
|
|
24
58
|
makeStyles == null || makeStyles.clearCache();
|
|
25
59
|
});
|
|
26
60
|
export var makeStyles = cache(function makeStyles(k) {
|
|
27
|
-
|
|
61
|
+
var _context;
|
|
62
|
+
return /*#__PURE__*/css("&.", k, "-tip{display:flex;height:auto;padding:0;color:", tip.color, "!important;align-items:flex-start;", _mapInstanceProperty(sizes).call(sizes, function (s) {
|
|
63
|
+
if (s === 'default') return;
|
|
64
|
+
var styles = tip[s];
|
|
65
|
+
return /*#__PURE__*/css("&.", k, "-", s, "{padding:0;height:auto;font-size:", styles.fontSize, ";.", k, "-tip-wrapper{padding:", styles.padding, ";}.", k, "-tip-close{height:", styles.close.height, ";}}");
|
|
66
|
+
}), ";}.", k, "-tip-wrapper{flex:1;padding:", tip.padding, ";}.", k, "-tip-title{font-size:", tip.title.fontSize, ";margin-bottom:", tip.title.gap, ";font-weight:", tip.title.fontWeight, " display:flex;align-items:center;}&.", k, "-fade-leave-active{position:relative;}.", k, "-tip-close{height:30px;&:hover{background:none;}}.", k, "-with-icon{display:flex;.", k, "-tip-icon{font-size:18px;vertical-align:middle;}.", k, "-title-content{display:inline-block;padding-left:8px;}.", k, "-tip-content{display:inline-block;padding-left:8px;vertical-align:middle;word-break:break-word;overflow-wrap:break-word;}}", _mapInstanceProperty(_context = ['primary', 'danger', 'success', 'warning']).call(_context, function (type) {
|
|
67
|
+
var color = theme.color[type];
|
|
68
|
+
return /*#__PURE__*/css("&.", k, "-", type, "{.", k, "-tip-icon{color:", color, ";}}");
|
|
69
|
+
}), ";");
|
|
28
70
|
});
|
|
@@ -54,7 +54,11 @@ export var Tooltip = /*#__PURE__*/function (_Dropdown) {
|
|
|
54
54
|
if (shouldFocus === void 0) {
|
|
55
55
|
shouldFocus = false;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
var _this$get = this.get(),
|
|
58
|
+
disabled = _this$get.disabled,
|
|
59
|
+
always = _this$get.always,
|
|
60
|
+
value = _this$get.value;
|
|
61
|
+
if (disabled || always && !value) return;
|
|
58
62
|
clearTimeout(this.timer);
|
|
59
63
|
this.set('value', true);
|
|
60
64
|
};
|
|
@@ -128,8 +128,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
128
128
|
'icon': true,
|
|
129
129
|
'disabled': !enableRemove(),
|
|
130
130
|
'ev-click': remove,
|
|
131
|
-
'type': '
|
|
132
|
-
'size': 'large',
|
|
131
|
+
'type': 'secondary',
|
|
133
132
|
'children': _$cc(Icon, {
|
|
134
133
|
'className': _$cn(k + "-transfer-icon " + k + "-icon-left")
|
|
135
134
|
})
|
|
@@ -138,8 +137,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
138
137
|
'icon': true,
|
|
139
138
|
'disabled': !enableAdd(),
|
|
140
139
|
'ev-click': add,
|
|
141
|
-
'type': '
|
|
142
|
-
'size': 'large',
|
|
140
|
+
'type': 'secondary',
|
|
143
141
|
'children': _$cc(Icon, {
|
|
144
142
|
'className': _$cn(k + "-transfer-icon " + k + "-icon-right")
|
|
145
143
|
})
|
|
@@ -3,6 +3,7 @@ import { createVNode as _$cv, className as _$cn, noop as _$no, createUnknownComp
|
|
|
3
3
|
import { Button } from '../button';
|
|
4
4
|
import { Progress } from '../progress';
|
|
5
5
|
import { Dialog } from '../dialog';
|
|
6
|
+
import { Ellipsis } from '../ellipsis';
|
|
6
7
|
import { expandAnimationCallbacks, getRestProps } from '../utils';
|
|
7
8
|
import { makeStyles, makeUploadDialogStyles } from './styles';
|
|
8
9
|
import { TransitionGroup, Transition, linkEvent } from 'intact-vue-next';
|
|
@@ -128,7 +129,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
128
129
|
var _$cn3;
|
|
129
130
|
return _$ce(2, 'div', [_$ce(2, 'div', [_$ce(2, 'div', [_$cc(Icon, {
|
|
130
131
|
'className': _$cn(k + "-upload-file-icon ion-document")
|
|
131
|
-
}), _$ce(2, 'span',
|
|
132
|
+
}), _$ce(2, 'span', _$cc(Ellipsis, {
|
|
133
|
+
'children': $value.name
|
|
134
|
+
}), 2, _$cn(k + "-upload-file-name")), $value.status === UploadFileStatus.Done ? _$cc(Icon, {
|
|
132
135
|
'className': _$cn(k + "-upload-status-icon " + k + "-icon-success-fill")
|
|
133
136
|
}) : $value.status === UploadFileStatus.Error ? _$cc(Icon, {
|
|
134
137
|
'className': _$cn(k + "-upload-status-icon " + k + "-icon-error-fill")
|
|
@@ -113,7 +113,7 @@ setDefault(function () {
|
|
|
113
113
|
makeUploadDialogStyles == null || makeUploadDialogStyles.clearCache();
|
|
114
114
|
});
|
|
115
115
|
export var makeStyles = cache(function makeStyles(k) {
|
|
116
|
-
return /*#__PURE__*/css("font-size:", upload.fontSize, ";position:relative;.", k, "-icon-upload{position:relative;top:-1px;}.", k, "-upload-handle{display:inline-block;vertical-align:middle;color:", upload.color, ";}.", k, "-upload-tip{margin-top:", upload.tip.gap, ";color:", upload.color, ";}.", k, "-upload-files{margin-top:", upload.filesGap, ";}.", k, "-upload-file{margin:", upload.file.margin, ";padding-right:", upload.file.delete.width, ";position:relative;&:hover{.", k, "-upload-close{display:inline-flex;position:absolute;right:", upload.file.delete.right, ";top:", upload.file.delete.top, ";}.", k, "-upload-file-main{background:", upload.file.bgColor, ";}}}.", k, "-upload-file-main{padding:", upload.file.padding, ";border-radius:", upload.file.borderRadius, ";}.", k, "-upload-name{display:flex;align-items:center;height:", upload.file.height, ";}.", k, "-upload-file-icon{margin-right:", upload.file.fileIconGap, ";}.", k, "-upload-file-name{flex:1;}.", k, "-upload-status-icon{color:", upload.file.status.color, ";margin-right:", upload.file.status.offsetRight, ";}.", k, "-upload-close{display:none;}.", k, "-upload-file.", k, "-error{color:", upload.file.errorColor, ";.", k, "-upload-status-icon{color:", upload.file.status.errorColor, ";}}.", k, "-upload-progress{.", k, "-progress-text{width:auto!important;}}&.", k, "-drag{.", k, "-upload-handle{display:block;border:", upload.drag.border, ";border-radius:", upload.drag.borderRadius, ";cursor:pointer;text-align:center;transition:border-color ", upload.transition, ";background:", upload.drag.bgColor, ";&:hover{border-color:", upload.drag.hoverBorderColor, ";}}.", k, "-upload-area{padding:", upload.drag.padding, ";.", k, "-icon{display:inline-block;font-size:", upload.drag.icon.fontSize, ";margin-bottom:", upload.drag.icon.gap, ";}}&.", k, "-dragover{.", k, "-upload-handle{border-color:", upload.drag.overBorderColor, ";}}}.", k, "-upload-pictures{display:inline-block;vertical-align:middle;}.", k, "-upload-picture{padding:", upload.gallery.padding, ";position:relative;vertical-align:middle;&.", k, "-error{border-color:", upload.gallery.errorBorderColor, ";}.", k, "-upload-close{display:inline-flex;}&:hover{.", k, "-upload-icons{opacity:1;}}.", k, "-upload-img{display:inline-block;width:100%;height:100%;}.", k, "-upload-icons{opacity:0;transition:opacity ", upload.transition, ";}}.", k, "-upload-picture-card{display:inline-flex;width:", upload.gallery.width, ";height:", upload.gallery.height, ";border-radius:", upload.gallery.borderRadius, ";border:", upload.gallery.border, ";margin:", upload.gallery.margin, ";background:", upload.gallery.bgColor, ";align-items:center;justify-content:center;flex-direction:column;}.", k, "-upload-add{border:", upload.gallery.add.border, ";cursor:pointer;&:hover{border-color:", upload.gallery.add.hoverBorderColor, ";}}.", k, "-upload-overlap{position:absolute;width:100%;height:100%;left:0;top:0;background:", upload.overlap.bgColor, ";display:flex;align-items:center;justify-content:center;gap:", upload.overlap.iconGap, ";color:", upload.overlap.color, ";.", k, "-icon:not(:hover){color:inherit;}.", k, "-upload-progress{position:absolute;width:100%;top:50%;padding:", upload.gallery.padding, ";transform:translateY(-50%);}}&.", k, "-disabled{.", k, "-upload-add,.", k, "-upload-handle{cursor:auto;a{color:", upload.color, ";}&:hover{border-color:", theme.color.border, ";}}}");
|
|
116
|
+
return /*#__PURE__*/css("font-size:", upload.fontSize, ";position:relative;.", k, "-icon-upload{position:relative;top:-1px;}.", k, "-upload-handle{display:inline-block;vertical-align:middle;color:", upload.color, ";}.", k, "-upload-tip{margin-top:", upload.tip.gap, ";color:", upload.color, ";}.", k, "-upload-files{margin-top:", upload.filesGap, ";}.", k, "-upload-file{margin:", upload.file.margin, ";padding-right:", upload.file.delete.width, ";position:relative;&:hover{.", k, "-upload-close{display:inline-flex;position:absolute;right:", upload.file.delete.right, ";top:", upload.file.delete.top, ";}.", k, "-upload-file-main{background:", upload.file.bgColor, ";}}}.", k, "-upload-file-main{padding:", upload.file.padding, ";border-radius:", upload.file.borderRadius, ";}.", k, "-upload-name{display:flex;align-items:center;height:", upload.file.height, ";}.", k, "-upload-file-icon{margin-right:", upload.file.fileIconGap, ";}.", k, "-upload-file-name{flex:1;min-width:0;}.", k, "-upload-status-icon{color:", upload.file.status.color, ";margin-right:", upload.file.status.offsetRight, ";}.", k, "-upload-close{display:none;}.", k, "-upload-file.", k, "-error{color:", upload.file.errorColor, ";.", k, "-upload-status-icon{color:", upload.file.status.errorColor, ";}}.", k, "-upload-progress{.", k, "-progress-text{width:auto!important;}}&.", k, "-drag{.", k, "-upload-handle{display:block;border:", upload.drag.border, ";border-radius:", upload.drag.borderRadius, ";cursor:pointer;text-align:center;transition:border-color ", upload.transition, ";background:", upload.drag.bgColor, ";&:hover{border-color:", upload.drag.hoverBorderColor, ";}}.", k, "-upload-area{padding:", upload.drag.padding, ";.", k, "-icon{display:inline-block;font-size:", upload.drag.icon.fontSize, ";margin-bottom:", upload.drag.icon.gap, ";}}&.", k, "-dragover{.", k, "-upload-handle{border-color:", upload.drag.overBorderColor, ";}}}.", k, "-upload-pictures{display:inline-block;vertical-align:middle;}.", k, "-upload-picture{padding:", upload.gallery.padding, ";position:relative;vertical-align:middle;&.", k, "-error{border-color:", upload.gallery.errorBorderColor, ";}.", k, "-upload-close{display:inline-flex;}&:hover{.", k, "-upload-icons{opacity:1;}}.", k, "-upload-img{display:inline-block;width:100%;height:100%;}.", k, "-upload-icons{opacity:0;transition:opacity ", upload.transition, ";}}.", k, "-upload-picture-card{display:inline-flex;width:", upload.gallery.width, ";height:", upload.gallery.height, ";border-radius:", upload.gallery.borderRadius, ";border:", upload.gallery.border, ";margin:", upload.gallery.margin, ";background:", upload.gallery.bgColor, ";align-items:center;justify-content:center;flex-direction:column;}.", k, "-upload-add{border:", upload.gallery.add.border, ";cursor:pointer;&:hover{border-color:", upload.gallery.add.hoverBorderColor, ";}}.", k, "-upload-overlap{position:absolute;width:100%;height:100%;left:0;top:0;background:", upload.overlap.bgColor, ";display:flex;align-items:center;justify-content:center;gap:", upload.overlap.iconGap, ";color:", upload.overlap.color, ";.", k, "-icon:not(:hover){color:inherit;}.", k, "-upload-progress{position:absolute;width:100%;top:50%;padding:", upload.gallery.padding, ";transform:translateY(-50%);}}&.", k, "-disabled{.", k, "-upload-add,.", k, "-upload-handle{cursor:auto;a{color:", upload.color, ";}&:hover{border-color:", theme.color.border, ";}}}");
|
|
117
117
|
});
|
|
118
118
|
export var makeUploadDialogStyles = cache(function makeUploadDialogStyles(k) {
|
|
119
119
|
return /*#__PURE__*/css(process.env.NODE_ENV === "production" ? {
|