@king-design/vue 3.4.3 → 3.4.4

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.
@@ -5,6 +5,7 @@ export interface ButtonGroupProps {
5
5
  checkType?: 'none' | 'radio' | 'checkbox';
6
6
  fluid?: boolean;
7
7
  seperate?: boolean;
8
+ separate?: boolean;
8
9
  btnWidth?: number | string;
9
10
  }
10
11
  export declare class ButtonGroup extends Component<ButtonGroupProps> {
@@ -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 + "-seperate"] = seperate, _classNameObj[className] = className, _classNameObj[makeButtonGroupStyles(k)] = true, _classNameObj);
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, "-seperate){>.", k, "-btn{", _mapInstanceProperty(types).call(types, function (type) {
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, "-seperate){flex-direction:column;>.", k, "-btn{", _mapInstanceProperty(types).call(types, function (type) {
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, "-seperate{gap:8px;}");
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 (columnIndex === 0 && indent) {
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', [columnIndex === 0 && hasChildren ? _$cc(Button, {
51
+ return _$ce(2, 'td', [hasChildren && isTree ? _$cc(Button, {
50
52
  'type': 'none',
51
53
  'icon': true,
52
54
  'circle': true,
@@ -1,6 +1,7 @@
1
1
  import _sortInstanceProperty from "@babel/runtime-corejs3/core-js/instance/sort";
2
2
  import { createUnknownComponentVNode as _$cc, createElementVNode as _$ce, className as _$cn, noop as _$no, extend as _$ex, EMPTY_OBJ as _$em, map as _$ma } from 'intact-vue-next';
3
3
  import { getClassAndStyleForFixed } from './useFixedColumns';
4
+ import { getStyleForLastColumn } from './useColumns';
4
5
  import { Dropdown, DropdownMenu, DropdownItem } from '../dropdown';
5
6
  import { Button } from '../button';
6
7
  import { Icon } from '../icon';
@@ -13,7 +14,7 @@ import { linkEvent } from 'intact-vue-next';
13
14
  import { context as TableContext } from './useColumns';
14
15
  import { context as ResizableContext } from './useResizable';
15
16
  import { context as FixedColumnsContext } from './useFixedColumns';
16
- import { stopPropagation } from '../utils';
17
+ import { stopPropagation, addStyle } from '../utils';
17
18
  import { Input } from '../input';
18
19
  import { _$ } from '../../i18n';
19
20
  import { ignoreSortable } from './useSortable';
@@ -49,19 +50,22 @@ export default function ($props, $blocks, $__proto__) {
49
50
  checkAll = _this$group.checkAll;
50
51
  var k = this.config.k;
51
52
  return _$cc(TableContext.Consumer, {
52
- 'children': function children(checkType) {
53
+ 'children': function children(_ref) {
54
+ var checkType = _ref.checkType,
55
+ lastCellKey = _ref.lastCellKey,
56
+ lastCellStyle = _ref.lastCellStyle;
53
57
  return _$cc(GroupContext.Consumer, {
54
- 'children': function children(_ref) {
55
- var currentGroup = _ref.group,
56
- onChange = _ref.onChange;
58
+ 'children': function children(_ref2) {
59
+ var currentGroup = _ref2.group,
60
+ onChange = _ref2.onChange;
57
61
  return _$cc(SortableContext.Consumer, {
58
- 'children': function children(_ref2) {
59
- var sort = _sortInstanceProperty(_ref2),
60
- onChangeSort = _ref2.onChange;
62
+ 'children': function children(_ref3) {
63
+ var sort = _sortInstanceProperty(_ref3),
64
+ onChangeSort = _ref3.onChange;
61
65
  return _$cc(ResizableContext.Consumer, {
62
- 'children': function children(_ref3) {
63
- var resizable = _ref3.resizable,
64
- onStart = _ref3.onStart;
66
+ 'children': function children(_ref4) {
67
+ var resizable = _ref4.resizable,
68
+ onStart = _ref4.onStart;
65
69
  return _$cc(FixedColumnsContext.Consumer, {
66
70
  'children': function children(offsetMap) {
67
71
  var _classNameObj, _$cn2, _$cn4;
@@ -168,7 +172,7 @@ export default function ($props, $blocks, $__proto__) {
168
172
  'className': _$cn(k + "-icon-down-bold " + k + "-desc"),
169
173
  'size': 'mini'
170
174
  })], 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,
175
+ 'style': key === lastCellKey ? addStyle(style, lastCellStyle) : style,
172
176
  'title': isStringOrNumber(title) ? title : null,
173
177
  'ev-click': sortable ? linkEvent(key, onChangeSort) : null,
174
178
  'colspan': cols,
@@ -24,6 +24,7 @@ export interface TableRowProps {
24
24
  onBeforeUnmount: (key: TableRowKey) => void;
25
25
  offsetMap: Record<Key, number>;
26
26
  animation: boolean;
27
+ spreadArrowIndex: number;
27
28
  loaded: boolean;
28
29
  draggable: boolean;
29
30
  draggingKey: TableRowKey | null;
@@ -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> {
@@ -63,6 +63,7 @@ var typeDefs = {
63
63
  hideHeader: Boolean,
64
64
  pagination: [Boolean, Object],
65
65
  fixFooter: Boolean,
66
+ spreadArrowIndex: Number,
66
67
  load: Function
67
68
  };
68
69
  var defaults = function defaults() {
@@ -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': checkType,
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("vdt").Template<any>;
14
+ static template: string | import('intact-vue-next').Template<any>;
15
+ static typeDefs: Required<TypeDefs<TipProps>>;
16
+ static defaults: () => Partial<TipProps>;
12
17
  }
@@ -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 { superCall as _$su, className as _$cn, extend as _$ex, EMPTY_OBJ as _$em, createElementVNode as _$ce, noop as _$no, createUnknownComponentVNode as _$cc } from 'intact-vue-next';
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
- return _$ce(2, 'div', [$blocks.title ? _$ce(2, 'div', (_$blocks['title'] = function ($super) {
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() {
@@ -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
- return /*#__PURE__*/css("&.", k, "-tip{display:flex;height:auto;padding:0;color:", tip.color, "!important;align-items:flex-start;}.", 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, ";}&.", k, "-fade-leave-active{position:relative;}.", k, "-tip-close:hover{background:none;}");
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
- if (this.get('disabled')) return;
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': 'primary',
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': 'primary',
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', $value.name, 0, _$cn(k + "-upload-file-name")), $value.status === UploadFileStatus.Done ? _$cc(Icon, {
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")