@king-design/vue 3.0.1 → 3.1.0-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/components/affix/index.d.ts +1 -0
- package/components/affix/index.js +2 -0
- package/components/affix/index.vdt.js +5 -5
- package/components/affix/styles.d.ts +1 -1
- package/components/affix/styles.js +1 -1
- package/components/badge/index.d.ts +1 -0
- package/components/badge/index.js +13 -1
- package/components/badge/index.vdt.js +5 -4
- package/components/badge/styles.d.ts +1 -1
- package/components/badge/styles.js +2 -2
- package/components/breadcrumb/index.d.ts +1 -0
- package/components/breadcrumb/index.js +13 -1
- package/components/breadcrumb/index.vdt.js +4 -5
- package/components/breadcrumb/item.d.ts +1 -0
- package/components/breadcrumb/item.js +2 -0
- package/components/breadcrumb/item.vdt.js +4 -5
- package/components/breadcrumb/styles.d.ts +1 -1
- package/components/breadcrumb/styles.js +2 -2
- package/components/button/group.d.ts +1 -0
- package/components/button/group.js +13 -1
- package/components/button/group.vdt.js +2 -6
- package/components/button/index.d.ts +1 -0
- package/components/button/index.js +2 -0
- package/components/button/index.vdt.js +7 -7
- package/components/button/styles.d.ts +2 -4
- package/components/button/styles.js +19 -20
- package/components/card/column.d.ts +1 -0
- package/components/card/column.js +13 -1
- package/components/card/column.vdt.js +2 -5
- package/components/card/index.d.ts +1 -0
- package/components/card/index.js +13 -1
- package/components/card/index.vdt.js +5 -11
- package/components/card/styles.d.ts +1 -1
- package/components/card/styles.js +2 -2
- package/components/carousel/index.d.ts +1 -0
- package/components/carousel/index.js +2 -0
- package/components/carousel/index.vdt.js +15 -19
- package/components/carousel/item.d.ts +1 -0
- package/components/carousel/item.js +13 -1
- package/components/carousel/item.vdt.js +2 -3
- package/components/carousel/styles.d.ts +2 -2
- package/components/carousel/styles.js +4 -4
- package/components/cascader/index.vdt.js +20 -29
- package/components/cascader/styles.d.ts +2 -2
- package/components/cascader/styles.js +3 -3
- package/components/checkbox/index.d.ts +1 -0
- package/components/checkbox/index.js +2 -0
- package/components/checkbox/index.vdt.js +4 -8
- package/components/checkbox/styles.d.ts +1 -1
- package/components/checkbox/styles.js +2 -2
- package/components/code/index.d.ts +1 -0
- package/components/code/index.js +2 -0
- package/components/code/index.vdt.js +2 -3
- package/components/code/styles.d.ts +1 -1
- package/components/code/styles.js +1 -1
- package/components/collapse/index.d.ts +1 -0
- package/components/collapse/index.js +13 -1
- package/components/collapse/index.vdt.js +2 -3
- package/components/collapse/item.d.ts +1 -0
- package/components/collapse/item.js +2 -0
- package/components/collapse/item.vdt.js +6 -8
- package/components/collapse/styles.d.ts +2 -3
- package/components/collapse/styles.js +5 -9
- package/components/colorpicker/drag.d.ts +1 -0
- package/components/colorpicker/drag.js +2 -0
- package/components/colorpicker/drag.vdt.js +3 -2
- package/components/colorpicker/index.d.ts +1 -0
- package/components/colorpicker/index.js +13 -1
- package/components/colorpicker/index.vdt.js +5 -6
- package/components/colorpicker/panel.d.ts +1 -0
- package/components/colorpicker/panel.js +2 -0
- package/components/colorpicker/panel.vdt.js +16 -19
- package/components/colorpicker/styles.d.ts +3 -3
- package/components/colorpicker/styles.js +8 -8
- package/components/config/index.d.ts +10 -0
- package/components/config/index.js +23 -0
- package/components/config/index.spec.d.ts +1 -0
- package/components/config/index.spec.js +71 -0
- package/components/context.d.ts +2 -1
- package/components/context.js +8 -2
- package/components/copy/index.d.ts +1 -0
- package/components/copy/index.js +2 -0
- package/components/copy/index.vdt.js +9 -9
- package/components/copy/styles.d.ts +1 -1
- package/components/copy/styles.js +1 -1
- package/components/datepicker/calendar.d.ts +1 -0
- package/components/datepicker/calendar.js +2 -0
- package/components/datepicker/calendar.vdt.js +38 -51
- package/components/datepicker/index.vdt.js +13 -16
- package/components/datepicker/styles.d.ts +3 -3
- package/components/datepicker/styles.js +6 -6
- package/components/datepicker/time.d.ts +1 -0
- package/components/datepicker/time.js +2 -0
- package/components/datepicker/time.vdt.js +2 -3
- package/components/diagram/diagram.d.ts +1 -0
- package/components/diagram/diagram.js +2 -0
- package/components/diagram/diagram.vdt.js +3 -4
- package/components/diagram/styles.d.ts +1 -1
- package/components/diagram/styles.js +1 -1
- package/components/dialog/alert.vdt.js +6 -10
- package/components/dialog/base.d.ts +4 -0
- package/components/dialog/base.js +2 -0
- package/components/dialog/base.vdt.js +15 -21
- package/components/dialog/index.d.ts +1 -1
- package/components/dialog/styles.d.ts +3 -3
- package/components/dialog/styles.js +12 -12
- package/components/drawer/index.vdt.js +3 -4
- package/components/drawer/styles.d.ts +1 -1
- package/components/drawer/styles.js +3 -3
- package/components/dropdown/dropdown.d.ts +1 -0
- package/components/dropdown/dropdown.js +4 -3
- package/components/dropdown/item.d.ts +1 -0
- package/components/dropdown/item.js +2 -0
- package/components/dropdown/item.vdt.js +2 -4
- package/components/dropdown/menu.d.ts +1 -0
- package/components/dropdown/menu.js +2 -0
- package/components/dropdown/menu.vdt.js +2 -3
- package/components/dropdown/styles.d.ts +2 -2
- package/components/dropdown/styles.js +4 -4
- package/components/editable/index.d.ts +1 -0
- package/components/editable/index.js +2 -0
- package/components/editable/index.vdt.js +3 -7
- package/components/editable/styles.d.ts +1 -1
- package/components/editable/styles.js +2 -2
- package/components/form/form.d.ts +1 -0
- package/components/form/form.js +2 -0
- package/components/form/form.vdt.js +2 -3
- package/components/form/item.d.ts +1 -0
- package/components/form/item.js +2 -0
- package/components/form/item.vdt.js +13 -19
- package/components/form/styles.d.ts +2 -2
- package/components/form/styles.js +5 -5
- package/components/form/useError.d.ts +1 -0
- package/components/grid/col.d.ts +1 -0
- package/components/grid/col.js +2 -0
- package/components/grid/col.vdt.js +3 -6
- package/components/grid/row.d.ts +1 -0
- package/components/grid/row.js +2 -0
- package/components/grid/row.vdt.js +2 -3
- package/components/grid/styles.d.ts +2 -2
- package/components/grid/styles.js +8 -18
- package/components/grid/useBreakpoints.d.ts +1 -1
- package/components/grid/useBreakpoints.js +2 -2
- package/components/grid/useGutter.d.ts +1 -0
- package/components/icon/index.d.ts +1 -0
- package/components/icon/index.js +2 -0
- package/components/icon/index.vdt.js +7 -11
- package/components/icon/styles.d.ts +1 -2
- package/components/icon/styles.js +7 -5
- package/components/input/index.d.ts +1 -0
- package/components/input/index.js +2 -0
- package/components/input/index.vdt.js +16 -26
- package/components/input/search.d.ts +1 -0
- package/components/input/search.js +2 -0
- package/components/input/search.vdt.js +5 -7
- package/components/input/styles.d.ts +2 -2
- package/components/input/styles.js +11 -11
- package/components/layout/aside.d.ts +1 -0
- package/components/layout/aside.js +2 -0
- package/components/layout/aside.vdt.js +5 -8
- package/components/layout/body.d.ts +1 -0
- package/components/layout/body.js +4 -3
- package/components/layout/footer.d.ts +1 -0
- package/components/layout/footer.js +15 -4
- package/components/layout/header.d.ts +1 -0
- package/components/layout/header.js +4 -6
- package/components/layout/layout.d.ts +1 -0
- package/components/layout/layout.js +4 -3
- package/components/layout/styles.d.ts +3 -3
- package/components/layout/styles.js +8 -8
- package/components/layout/template.vdt.js +2 -1
- package/components/menu/item.d.ts +1 -0
- package/components/menu/item.js +2 -0
- package/components/menu/item.vdt.js +7 -12
- package/components/menu/menu.d.ts +1 -0
- package/components/menu/menu.js +2 -0
- package/components/menu/menu.vdt.js +3 -6
- package/components/menu/styles.d.ts +3 -3
- package/components/menu/styles.js +10 -10
- package/components/message/message.d.ts +1 -0
- package/components/message/message.js +2 -0
- package/components/message/message.vdt.js +12 -17
- package/components/message/messages.d.ts +1 -0
- package/components/message/messages.js +2 -0
- package/components/message/messages.vdt.js +2 -3
- package/components/message/styles.d.ts +2 -2
- package/components/message/styles.js +4 -4
- package/components/pagination/index.d.ts +1 -0
- package/components/pagination/index.js +2 -0
- package/components/pagination/index.vdt.js +14 -17
- package/components/pagination/styles.d.ts +1 -1
- package/components/pagination/styles.js +4 -4
- package/components/popover/content.vdt.js +5 -4
- package/components/popover/styles.d.ts +1 -1
- package/components/popover/styles.js +2 -2
- package/components/portal.d.ts +1 -0
- package/components/portal.js +3 -1
- package/components/progress/index.d.ts +1 -0
- package/components/progress/index.js +2 -0
- package/components/progress/index.vdt.js +14 -17
- package/components/progress/styles.d.ts +1 -1
- package/components/progress/styles.js +6 -6
- package/components/radio/index.d.ts +1 -0
- package/components/radio/index.js +2 -0
- package/components/radio/index.vdt.js +4 -7
- package/components/radio/styles.d.ts +1 -1
- package/components/radio/styles.js +2 -2
- package/components/rate/index.d.ts +1 -0
- package/components/rate/index.js +2 -0
- package/components/rate/index.vdt.js +4 -8
- package/components/rate/styles.d.ts +1 -1
- package/components/rate/styles.js +2 -2
- package/components/scrollSelect/index.d.ts +1 -0
- package/components/scrollSelect/index.js +2 -0
- package/components/scrollSelect/index.vdt.js +7 -12
- package/components/scrollSelect/styles.d.ts +1 -1
- package/components/scrollSelect/styles.js +2 -2
- package/components/select/base.d.ts +4 -0
- package/components/select/base.js +2 -0
- package/components/select/base.vdt.js +17 -21
- package/components/select/group.d.ts +1 -0
- package/components/select/group.js +2 -0
- package/components/select/group.vdt.js +3 -4
- package/components/select/menu.d.ts +1 -0
- package/components/select/menu.js +2 -0
- package/components/select/menu.vdt.js +9 -13
- package/components/select/option.d.ts +1 -0
- package/components/select/option.js +2 -0
- package/components/select/option.vdt.js +6 -8
- package/components/select/styles.d.ts +3 -3
- package/components/select/styles.js +8 -8
- package/components/select/useSearchable.d.ts +1 -0
- package/components/skeleton/item.d.ts +1 -0
- package/components/skeleton/item.js +13 -1
- package/components/skeleton/item.vdt.js +4 -7
- package/components/skeleton/skeleton.d.ts +1 -0
- package/components/skeleton/skeleton.js +13 -1
- package/components/skeleton/skeleton.vdt.js +4 -6
- package/components/skeleton/styles.d.ts +6 -0
- package/components/skeleton/styles.js +35 -0
- package/components/slider/index.d.ts +1 -0
- package/components/slider/index.js +2 -0
- package/components/slider/index.vdt.js +18 -22
- package/components/slider/styles.d.ts +1 -1
- package/components/slider/styles.js +2 -2
- package/components/spin/index.d.ts +1 -0
- package/components/spin/index.js +13 -1
- package/components/spin/index.vdt.js +6 -7
- package/components/spin/styles.d.ts +1 -1
- package/components/spin/styles.js +4 -4
- package/components/spinner/index.d.ts +1 -0
- package/components/spinner/index.js +2 -0
- package/components/spinner/index.vdt.js +15 -21
- package/components/spinner/styles.d.ts +1 -1
- package/components/spinner/styles.js +7 -7
- package/components/split/index.d.ts +2 -1
- package/components/split/index.js +2 -0
- package/components/split/index.vdt.js +7 -9
- package/components/split/styles.d.ts +4 -0
- package/components/split/styles.js +55 -0
- package/components/steps/context.d.ts +1 -0
- package/components/steps/index.d.ts +1 -0
- package/components/steps/index.js +13 -1
- package/components/steps/index.vdt.js +2 -3
- package/components/steps/step.d.ts +1 -0
- package/components/steps/step.js +13 -1
- package/components/steps/step.vdt.js +10 -16
- package/components/steps/styles.d.ts +3 -3
- package/components/steps/styles.js +18 -18
- package/components/switch/index.d.ts +1 -0
- package/components/switch/index.js +2 -0
- package/components/switch/index.vdt.js +6 -7
- package/components/switch/styles.d.ts +1 -1
- package/components/switch/styles.js +4 -4
- package/components/table/cell.d.ts +1 -0
- package/components/table/cell.js +13 -1
- package/components/table/cell.vdt.js +6 -6
- package/components/table/column.d.ts +1 -0
- package/components/table/column.js +2 -0
- package/components/table/column.vdt.js +24 -32
- package/components/table/row.d.ts +1 -0
- package/components/table/row.js +13 -1
- package/components/table/row.vdt.js +3 -10
- package/components/table/styles.d.ts +2 -2
- package/components/table/styles.js +6 -6
- package/components/table/table.d.ts +1 -0
- package/components/table/table.js +2 -0
- package/components/table/table.vdt.js +16 -20
- package/components/table/useColumns.d.ts +1 -0
- package/components/table/useFixedColumns.d.ts +2 -1
- package/components/table/useGroup.d.ts +1 -0
- package/components/table/useResizable.d.ts +1 -0
- package/components/table/useSortable.d.ts +1 -0
- package/components/tabs/index.d.ts +4 -0
- package/components/tabs/index.js +2 -0
- package/components/tabs/index.vdt.js +9 -10
- package/components/tabs/styles.d.ts +1 -1
- package/components/tabs/styles.js +15 -15
- package/components/tabs/tab.d.ts +1 -0
- package/components/tabs/tab.js +2 -0
- package/components/tabs/tab.vdt.js +3 -5
- package/components/tabs/useActiveBar.js +2 -1
- package/components/tabs/useScroll.js +2 -1
- package/components/tag/base.d.ts +1 -0
- package/components/tag/base.js +13 -1
- package/components/tag/index.vdt.js +4 -5
- package/components/tag/styles.d.ts +2 -2
- package/components/tag/styles.js +7 -7
- package/components/tag/tags.d.ts +1 -0
- package/components/tag/tags.js +2 -0
- package/components/tag/tags.vdt.js +5 -11
- package/components/timeline/item.d.ts +1 -0
- package/components/timeline/item.js +13 -1
- package/components/timeline/item.vdt.js +4 -5
- package/components/timeline/styles.d.ts +2 -2
- package/components/timeline/styles.js +6 -6
- package/components/timeline/timeline.d.ts +1 -0
- package/components/timeline/timeline.js +13 -1
- package/components/timeline/timeline.vdt.js +2 -3
- package/components/timepicker/index.d.ts +2 -1
- package/components/timepicker/panelPicker.vdt.js +13 -17
- package/components/timepicker/selectPicker.d.ts +1 -0
- package/components/timepicker/selectPicker.js +2 -0
- package/components/timepicker/selectPicker.vdt.js +4 -4
- package/components/timepicker/styles.d.ts +1 -1
- package/components/timepicker/styles.js +2 -2
- package/components/tip/index.vdt.js +5 -6
- package/components/tip/styles.d.ts +1 -1
- package/components/tip/styles.js +2 -2
- package/components/tooltip/content.vdt.js +4 -9
- package/components/tooltip/styles.d.ts +1 -1
- package/components/tooltip/styles.js +6 -6
- package/components/transfer/index.d.ts +1 -0
- package/components/transfer/index.js +2 -0
- package/components/transfer/index.vdt.js +20 -25
- package/components/transfer/styles.d.ts +1 -1
- package/components/transfer/styles.js +2 -2
- package/components/tree/index.d.ts +1 -0
- package/components/tree/index.js +2 -0
- package/components/tree/index.vdt.js +19 -30
- package/components/tree/styles.d.ts +1 -1
- package/components/tree/styles.js +2 -2
- package/components/treeSelect/index.vdt.js +2 -3
- package/components/treeSelect/styles.d.ts +1 -1
- package/components/treeSelect/styles.js +1 -1
- package/components/upload/index.d.ts +1 -0
- package/components/upload/index.js +2 -0
- package/components/upload/index.vdt.js +39 -50
- package/components/upload/styles.d.ts +2 -2
- package/components/upload/styles.js +3 -3
- package/components/utils.d.ts +2 -1
- package/components/utils.js +20 -9
- package/components/wave/index.d.ts +1 -0
- package/components/wave/index.js +4 -2
- package/components/wave/styles.d.ts +1 -1
- package/components/wave/styles.js +2 -2
- package/index.d.ts +3 -2
- package/index.js +3 -2
- package/package.json +1 -1
- package/styles/fonts/iconfont.d.ts +1 -1
- package/styles/fonts/iconfont.js +4 -1
- package/styles/global.js +4 -4
- package/styles/theme.d.ts +1 -1
- package/styles/theme.js +4 -53
- package/components/skeleton/style.d.ts +0 -6
- package/components/skeleton/style.js +0 -35
- package/components/split/style.d.ts +0 -4
- package/components/split/style.js +0 -55
|
@@ -3,6 +3,7 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/con
|
|
|
3
3
|
import { Component, createRef } from 'intact-vue-next';
|
|
4
4
|
import template from './index.vdt';
|
|
5
5
|
import { useStyle } from './useStyle';
|
|
6
|
+
import { useConfigContext } from '../config';
|
|
6
7
|
var typeDefs = {
|
|
7
8
|
top: Number,
|
|
8
9
|
bottom: Number,
|
|
@@ -24,6 +25,7 @@ export var Affix = /*#__PURE__*/function (_Component) {
|
|
|
24
25
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
25
26
|
_this.elementRef = createRef();
|
|
26
27
|
_this.style = useStyle(_this.elementRef);
|
|
28
|
+
_this.config = useConfigContext();
|
|
27
29
|
return _this;
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -17,16 +17,16 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
17
17
|
var _this$style = this.style,
|
|
18
18
|
_style = _this$style.style,
|
|
19
19
|
containerStyle = _this$style.containerStyle;
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
|
|
20
|
+
var _this$config = this.config,
|
|
21
|
+
cls = _this$config.cls,
|
|
22
|
+
k = _this$config.k;
|
|
23
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-affix"] = true, _classNameObj[k + "-fixed"] = _style.value, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
|
|
24
24
|
return _$cv('div', _extends({
|
|
25
25
|
'className': _$cn(classNameObj)
|
|
26
26
|
}, getRestProps(this), {
|
|
27
27
|
'style': addStyle(style, containerStyle.value),
|
|
28
28
|
'ref': this.elementRef
|
|
29
|
-
}), _$ce(2, 'div', children, 0, '
|
|
29
|
+
}), _$ce(2, 'div', children, 0, _$cn(cls('affix-wrapper')), {
|
|
30
30
|
'style': _style.value
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare function makeStyles(): string;
|
|
2
|
+
export declare function makeStyles(k: string): string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
2
3
|
import { Component } from 'intact-vue-next';
|
|
3
4
|
import template from './index.vdt';
|
|
5
|
+
import { useConfigContext } from '../config';
|
|
4
6
|
var typeDefs = {
|
|
5
7
|
text: [String, Number],
|
|
6
8
|
max: Number,
|
|
@@ -10,7 +12,17 @@ export var Badge = /*#__PURE__*/function (_Component) {
|
|
|
10
12
|
_inheritsLoose(Badge, _Component);
|
|
11
13
|
|
|
12
14
|
function Badge() {
|
|
13
|
-
|
|
15
|
+
var _context;
|
|
16
|
+
|
|
17
|
+
var _this;
|
|
18
|
+
|
|
19
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20
|
+
args[_key] = arguments[_key];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
24
|
+
_this.config = useConfigContext();
|
|
25
|
+
return _this;
|
|
14
26
|
}
|
|
15
27
|
|
|
16
28
|
return Badge;
|
|
@@ -20,11 +20,12 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
20
20
|
text = max + "+";
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
var _this$config = this.config,
|
|
24
|
+
cls = _this$config.cls,
|
|
25
|
+
k = _this$config.k;
|
|
26
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-badge"] = true, _classNameObj[className] = className, _classNameObj[k + "-has-text"] = text != null, _classNameObj[k + "-alone"] = !children, _classNameObj[makeStyles(k)] = true, _classNameObj);
|
|
26
27
|
return _$cv('div', _extends({}, getRestProps(this), {
|
|
27
28
|
'className': _$cn(classNameObj)
|
|
28
|
-
}), [children, !disabled ? _$ce(2, 'sup', text, 0,
|
|
29
|
+
}), [children, !disabled ? _$ce(2, 'sup', text, 0, _$cn(k + "-badge-text")) : undefined]);
|
|
29
30
|
}
|
|
30
31
|
;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export default function makeStyles(): string;
|
|
2
|
+
export default function makeStyles(k: string): string;
|
|
@@ -21,6 +21,6 @@ setDefault(function () {
|
|
|
21
21
|
badge: defaults
|
|
22
22
|
}).badge;
|
|
23
23
|
});
|
|
24
|
-
export default function makeStyles() {
|
|
25
|
-
return /*#__PURE__*/css("display:inline-block;position:relative;vertical-align:middle;>.k-badge-text{display:inline-block;position:absolute;width:", badge.width, ";height:", badge.height, ";border-radius:50%;top:0;right:0;transform:translate(50%, -50%);background:", badge.bgColor, ";font-size:85%;vertical-align:baseline;}&.k-has-text>.k-badge-text{width:auto;height:", badge.textHeight, ";line-height:", badge.textHeight, ";border-radius:calc(", badge.textHeight, " / 2);padding:0 ", badge.textPadding, ";color:", badge.textColor, ";}&.k-alone>.k-badge-text{position:static;transform:none;}");
|
|
24
|
+
export default function makeStyles(k) {
|
|
25
|
+
return /*#__PURE__*/css("display:inline-block;position:relative;vertical-align:middle;>.", k, "-badge-text{display:inline-block;position:absolute;width:", badge.width, ";height:", badge.height, ";border-radius:50%;top:0;right:0;transform:translate(50%, -50%);background:", badge.bgColor, ";font-size:85%;vertical-align:baseline;}&.", k, "-has-text>.", k, "-badge-text{width:auto;height:", badge.textHeight, ";line-height:", badge.textHeight, ";border-radius:calc(", badge.textHeight, " / 2);padding:0 ", badge.textPadding, ";color:", badge.textColor, ";}&.", k, "-alone>.", k, "-badge-text{position:static;transform:none;}");
|
|
26
26
|
}
|
|
@@ -12,4 +12,5 @@ export declare class Breadcrumb extends Component<BreadcrumbProps, BreadcrumbEve
|
|
|
12
12
|
static template: string | import("intact").Template<any>;
|
|
13
13
|
static typeDefs: Required<TypeDefs<BreadcrumbProps>>;
|
|
14
14
|
static defaults: () => Partial<BreadcrumbProps>;
|
|
15
|
+
private config;
|
|
15
16
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
2
3
|
import { Component } from 'intact-vue-next';
|
|
3
4
|
import template from './index.vdt';
|
|
5
|
+
import { useConfigContext } from '../config';
|
|
4
6
|
export * from './item';
|
|
5
7
|
var typeDefs = {
|
|
6
8
|
separator: String
|
|
@@ -16,7 +18,17 @@ export var Breadcrumb = /*#__PURE__*/function (_Component) {
|
|
|
16
18
|
_inheritsLoose(Breadcrumb, _Component);
|
|
17
19
|
|
|
18
20
|
function Breadcrumb() {
|
|
19
|
-
|
|
21
|
+
var _context;
|
|
22
|
+
|
|
23
|
+
var _this;
|
|
24
|
+
|
|
25
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
+
args[_key] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
30
|
+
_this.config = useConfigContext();
|
|
31
|
+
return _this;
|
|
20
32
|
}
|
|
21
33
|
|
|
22
34
|
return Breadcrumb;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
|
|
3
|
-
import { createElementVNode as _$ce, noop as _$no,
|
|
3
|
+
import { createElementVNode as _$ce, noop as _$no, className as _$cn, createVNode as _$cv } from 'intact-vue-next';
|
|
4
4
|
import { getRestProps, mapChildren } from '../utils';
|
|
5
5
|
import { BreadcrumbItem } from './item';
|
|
6
6
|
import makeStyles from './styles';
|
|
@@ -18,9 +18,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
18
18
|
separator = _this$get.separator,
|
|
19
19
|
className = _this$get.className;
|
|
20
20
|
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
}, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
|
|
21
|
+
var k = this.config.k;
|
|
22
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-breadcrumb"] = true, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
|
|
24
23
|
|
|
25
24
|
var separatorVNode = _$ce(2, 'span', (_$blocks['separator'] = function ($super) {
|
|
26
25
|
return separator;
|
|
@@ -32,7 +31,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
32
31
|
};
|
|
33
32
|
|
|
34
33
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
35
|
-
}, __$blocks['separator'](_$no)), 0,
|
|
34
|
+
}, __$blocks['separator'](_$no)), 0, _$cn(k + "-breadcrumb-separator"));
|
|
36
35
|
|
|
37
36
|
var vNodes = [];
|
|
38
37
|
var lastIndex = -1;
|
|
@@ -5,6 +5,7 @@ import { Component } from 'intact-vue-next';
|
|
|
5
5
|
import { bind } from '../utils';
|
|
6
6
|
import template from './item.vdt';
|
|
7
7
|
import { useRouter, navigate } from '../../hooks/useRouter';
|
|
8
|
+
import { useConfigContext } from '../config';
|
|
8
9
|
var typeDefs = {
|
|
9
10
|
to: [String, Object]
|
|
10
11
|
};
|
|
@@ -22,6 +23,7 @@ export var BreadcrumbItem = /*#__PURE__*/function (_Component) {
|
|
|
22
23
|
|
|
23
24
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
24
25
|
_this.router = useRouter();
|
|
26
|
+
_this.config = useConfigContext();
|
|
25
27
|
return _this;
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -13,13 +13,12 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
13
13
|
children = _this$get.children,
|
|
14
14
|
className = _this$get.className;
|
|
15
15
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
}, _classNameObj[className] = className, _classNameObj);
|
|
16
|
+
var k = this.config.k;
|
|
17
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-breadcrumb-item"] = true, _classNameObj[className] = className, _classNameObj);
|
|
19
18
|
return _$cv('div', _extends({
|
|
20
19
|
'className': _$cn(classNameObj)
|
|
21
|
-
}, getRestProps(this)), to ? _$ce(2, 'a', children, 0,
|
|
20
|
+
}, getRestProps(this)), to ? _$ce(2, 'a', children, 0, _$cn(k + "-breadcrumb-link"), {
|
|
22
21
|
'ev-click': this.onClick
|
|
23
|
-
}) : _$ce(2, 'span', children, 0,
|
|
22
|
+
}) : _$ce(2, 'span', children, 0, _$cn(k + "-breadcrumb-link")));
|
|
24
23
|
}
|
|
25
24
|
;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export default function makeStyles(): string;
|
|
2
|
+
export default function makeStyles(k: string): string;
|
|
@@ -23,6 +23,6 @@ setDefault(function () {
|
|
|
23
23
|
breadcrumb: defaults
|
|
24
24
|
}).breadcrumb;
|
|
25
25
|
});
|
|
26
|
-
export default function makeStyles() {
|
|
27
|
-
return /*#__PURE__*/css("font-size:", breadcrumb.fontSize, ";display:flex;align-items:center;.k-breadcrumb-item{&:last-of-type .k-breadcrumb-link{font-weight:", breadcrumb.activeFontWeight, ";color:", breadcrumb.activeColor, ";}}.k-breadcrumb-link,.k-breadcrumb-link a{color:", breadcrumb.color, ";}a.k-breadcrumb-link,.k-breadcrumb-link a{cursor:pointer;&:hover{color:", breadcrumb.hoverColor, ";}}.k-breadcrumb-separator{margin:0 ", breadcrumb.gap, ";}");
|
|
26
|
+
export default function makeStyles(k) {
|
|
27
|
+
return /*#__PURE__*/css("font-size:", breadcrumb.fontSize, ";display:flex;align-items:center;.", k, "-breadcrumb-item{&:last-of-type .", k, "-breadcrumb-link{font-weight:", breadcrumb.activeFontWeight, ";color:", breadcrumb.activeColor, ";}}.", k, "-breadcrumb-link,.", k, "-breadcrumb-link a{color:", breadcrumb.color, ";}a.", k, "-breadcrumb-link,.", k, "-breadcrumb-link a{cursor:pointer;&:hover{color:", breadcrumb.hoverColor, ";}}.", k, "-breadcrumb-separator{margin:0 ", breadcrumb.gap, ";}");
|
|
28
28
|
}
|
|
@@ -10,6 +10,7 @@ export declare class ButtonGroup extends Component<ButtonGroupProps> {
|
|
|
10
10
|
static template: string | import("intact").Template<any>;
|
|
11
11
|
static typeDefs: Required<TypeDefs<ButtonGroupProps>>;
|
|
12
12
|
static defaults: () => Partial<ButtonGroupProps>;
|
|
13
|
+
private config;
|
|
13
14
|
init(): void;
|
|
14
15
|
setValue(v: any): void;
|
|
15
16
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
2
3
|
import { Component, provide } from 'intact-vue-next';
|
|
3
4
|
import template from './group.vdt';
|
|
4
5
|
import { toggleArray } from '../utils';
|
|
5
6
|
import { BUTTON_GROUP } from './constants';
|
|
7
|
+
import { useConfigContext } from '../config';
|
|
6
8
|
var typeDefs = {
|
|
7
9
|
vertical: Boolean,
|
|
8
10
|
value: null,
|
|
@@ -21,7 +23,17 @@ export var ButtonGroup = /*#__PURE__*/function (_Component) {
|
|
|
21
23
|
_inheritsLoose(ButtonGroup, _Component);
|
|
22
24
|
|
|
23
25
|
function ButtonGroup() {
|
|
24
|
-
|
|
26
|
+
var _context;
|
|
27
|
+
|
|
28
|
+
var _this;
|
|
29
|
+
|
|
30
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
+
args[_key] = arguments[_key];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
35
|
+
_this.config = useConfigContext();
|
|
36
|
+
return _this;
|
|
25
37
|
}
|
|
26
38
|
|
|
27
39
|
var _proto = ButtonGroup.prototype;
|
|
@@ -16,12 +16,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
16
16
|
fluid = _this$get.fluid,
|
|
17
17
|
seperate = _this$get.seperate;
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
'k-vertical': vertical,
|
|
22
|
-
'k-fluid': fluid,
|
|
23
|
-
'k-seperate': seperate
|
|
24
|
-
}, _classNameObj[className] = className, _classNameObj[makeButtonGroupStyles()] = true, _classNameObj);
|
|
19
|
+
var k = this.config.k;
|
|
20
|
+
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);
|
|
25
21
|
return _$cv('div', _extends({
|
|
26
22
|
'className': _$cn(classNameObj)
|
|
27
23
|
}, getRestProps(this)), children);
|
|
@@ -5,6 +5,7 @@ import { Component, inject, createRef } from 'intact-vue-next';
|
|
|
5
5
|
import template from './index.vdt';
|
|
6
6
|
import { bind } from '../utils';
|
|
7
7
|
import { BUTTON_GROUP } from './constants';
|
|
8
|
+
import { useConfigContext } from '../config';
|
|
8
9
|
export * from './group';
|
|
9
10
|
var typeDefs = {
|
|
10
11
|
type: ['default', 'primary', 'warning', 'danger', 'success', 'none', 'secondary', 'link', 'flat'],
|
|
@@ -47,6 +48,7 @@ export var Button = /*#__PURE__*/function (_Component) {
|
|
|
47
48
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
48
49
|
_this.buttonGroup = inject(BUTTON_GROUP, null);
|
|
49
50
|
_this.elementRef = createRef();
|
|
51
|
+
_this.config = useConfigContext();
|
|
50
52
|
return _this;
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -32,6 +32,10 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
32
32
|
ghost = _this$get.ghost;
|
|
33
33
|
|
|
34
34
|
var checked = this.isChecked();
|
|
35
|
+
if (!this.config) debugger;
|
|
36
|
+
var _this$config = this.config,
|
|
37
|
+
cls = _this$config.cls,
|
|
38
|
+
k = _this$config.k;
|
|
35
39
|
|
|
36
40
|
var isIcon = function isIcon(child) {
|
|
37
41
|
return child.tag === Icon || child.className && child.className.indexOf('icon') > -1;
|
|
@@ -56,14 +60,10 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
56
60
|
});
|
|
57
61
|
}
|
|
58
62
|
|
|
59
|
-
var classNameObj = (_classNameObj = {
|
|
60
|
-
'k-btn': true
|
|
61
|
-
}, _classNameObj["k-" + type] = type !== 'default', _classNameObj["k-" + size] = size !== 'default', _classNameObj['k-btn-icon'] = icon, _classNameObj[className] = className, _classNameObj['k-circle'] = circle, _classNameObj['k-loading'] = loading, _classNameObj['k-fluid'] = fluid, _classNameObj['k-active'] = checked, _classNameObj['k-disabled'] = disabled || loading, _classNameObj['k-ghost'] = ghost, _classNameObj[makeButtonStyles({
|
|
62
|
-
iconSide: iconSide
|
|
63
|
-
})] = true, _classNameObj);
|
|
63
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[cls('btn')] = true, _classNameObj[cls(type)] = type !== 'default', _classNameObj[cls(size)] = size !== 'default', _classNameObj[cls("btn-icon")] = icon, _classNameObj[className] = className, _classNameObj[cls('circle')] = circle, _classNameObj[cls('loading')] = loading, _classNameObj[cls('fluid')] = fluid, _classNameObj[cls('active')] = checked, _classNameObj[cls('disabled')] = disabled || loading, _classNameObj[cls('ghost')] = ghost, _classNameObj[makeButtonStyles(k, iconSide)] = true, _classNameObj);
|
|
64
64
|
|
|
65
65
|
var loadingIcon = _$cc(Icon, {
|
|
66
|
-
'className':
|
|
66
|
+
'className': _$cn("ion-load-c " + k + "-icon-loading"),
|
|
67
67
|
'size': size
|
|
68
68
|
/*loadingSizeMap[size]*/
|
|
69
69
|
,
|
|
@@ -90,7 +90,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
90
90
|
'ev-mouseup': this.onMouseUp,
|
|
91
91
|
'htmlType': htmlType,
|
|
92
92
|
'name': isCheckType ? null : name,
|
|
93
|
-
'children': [loading ? iconSide === 'right' ? [children, loadingIcon] : [loadingIcon, children] : children, isCheckType ? _$ce(64, 'input', null, 1,
|
|
93
|
+
'children': [loading ? iconSide === 'right' ? [children, loadingIcon] : [loadingIcon, children] : children, isCheckType ? _$ce(64, 'input', null, 1, _$cn(k + "-button-input"), {
|
|
94
94
|
'type': checkType,
|
|
95
95
|
'name': name,
|
|
96
96
|
'checked': checked,
|
|
@@ -83,7 +83,5 @@ declare const defaults: {
|
|
|
83
83
|
};
|
|
84
84
|
declare let button: typeof defaults;
|
|
85
85
|
export { button };
|
|
86
|
-
export declare function makeButtonStyles(
|
|
87
|
-
|
|
88
|
-
}): string;
|
|
89
|
-
export declare function makeButtonGroupStyles(): string;
|
|
86
|
+
export declare function makeButtonStyles(k: string, iconSide?: string): string;
|
|
87
|
+
export declare function makeButtonGroupStyles(k: string): string;
|
|
@@ -232,43 +232,42 @@ setDefault(function () {
|
|
|
232
232
|
}).button;
|
|
233
233
|
});
|
|
234
234
|
export { button };
|
|
235
|
-
export function makeButtonStyles(
|
|
236
|
-
var iconSide = _ref.iconSide;
|
|
235
|
+
export function makeButtonStyles(k, iconSide) {
|
|
237
236
|
var _button = button,
|
|
238
237
|
secondary = _button.secondary,
|
|
239
238
|
link = _button.link;
|
|
240
239
|
return cx(
|
|
241
240
|
/*#__PURE__*/
|
|
242
241
|
// extract static styles to individual css method for performance
|
|
243
|
-
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;}&: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) {
|
|
242
|
+
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;}&: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) {
|
|
244
243
|
var typeStyles = button[type];
|
|
245
|
-
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), ";}}");
|
|
246
|
-
}), "&.k-secondary{color:", secondary.color, ";border-color:", secondary.borderColor, ";&:hover,&:focus{background:", secondary.hoverBgColor, ";}&:active{background:", secondary.activeBgColor, ";}}&.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{&,&: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) {
|
|
244
|
+
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), ";}}");
|
|
245
|
+
}), "&.", k, "-secondary{color:", secondary.color, ";border-color:", secondary.borderColor, ";&:hover,&:focus{background:", secondary.hoverBgColor, ";}&:active{background:", secondary.activeBgColor, ";}}&.", 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{&,&: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) {
|
|
247
246
|
var styles = button[size];
|
|
248
|
-
return /*#__PURE__*/css("&.k-", size, "{font-size:", styles.fontSize, ";height:", styles.height, ";padding:", styles.padding, ";&.k-btn-icon{width:", styles.height, ";}}");
|
|
249
|
-
}), "&.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) {
|
|
247
|
+
return /*#__PURE__*/css("&.", k, "-", size, "{font-size:", styles.fontSize, ";height:", styles.height, ";padding:", styles.padding, ";&.", k, "-btn-icon{width:", styles.height, ";}}");
|
|
248
|
+
}), "&.", 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) {
|
|
250
249
|
var styles = button[type];
|
|
251
|
-
return /*#__PURE__*/css("&.k-", type, "{&,&:hover{background:", palette(styles.bgColor, -2), ";color:", palette(styles.color, -2), ";border-color:", palette(styles.borderColor, -2), ";}}");
|
|
252
|
-
}), ";&,&:hover{background:", palette(button.bgColor, -2), ";color:", palette(button.color, -2), ";border-color:", palette(button.borderColor, -2), ";}.k-icon:not(.k-icon-loading){display:none;}}&:not(button){display:inline-flex;align-items:center;justify-content:center;}&.k-ghost{background:transparent;color:", button.ghost.color, ";border-color:", button.ghost.borderColor, ";&:hover,&:active{background:transparent;}&:hover{color:", button.ghost.hoverColor, ";border-color:", button.ghost.hoverBorderColor, ";}&:active{color:", theme.color.primary, ";border-color:", theme.color.primary, ";}", _mapInstanceProperty(types).call(types, function (type) {
|
|
250
|
+
return /*#__PURE__*/css("&.", k, "-", type, "{&,&:hover{background:", palette(styles.bgColor, -2), ";color:", palette(styles.color, -2), ";border-color:", palette(styles.borderColor, -2), ";}}");
|
|
251
|
+
}), ";&,&:hover{background:", palette(button.bgColor, -2), ";color:", palette(button.color, -2), ";border-color:", palette(button.borderColor, -2), ";}.", k, "-icon:not(.", k, "-icon-loading){display:none;}}&:not(button){display:inline-flex;align-items:center;justify-content:center;}&.", k, "-ghost{background:transparent;color:", button.ghost.color, ";border-color:", button.ghost.borderColor, ";&:hover,&:active{background:transparent;}&:hover{color:", button.ghost.hoverColor, ";border-color:", button.ghost.hoverBorderColor, ";}&:active{color:", theme.color.primary, ";border-color:", theme.color.primary, ";}", _mapInstanceProperty(types).call(types, function (type) {
|
|
253
252
|
var _button$type = button[type],
|
|
254
253
|
ghostColor = _button$type.ghostColor,
|
|
255
254
|
borderColor = _button$type.borderColor;
|
|
256
|
-
return /*#__PURE__*/css("&.k-", type, "{color:", ghostColor, ";border-color:", borderColor, ";&:hover{color:", palette(ghostColor, -1), ";border-color:", palette(ghostColor, -1), ";}&:active{color:", palette(ghostColor, 1), ";border-color:", palette(ghostColor, 1), ";}}");
|
|
257
|
-
}), "&.k-disabled{&,&:hover{color:", button.disabled.color, ";border-color:", button.disabled.ghostBorderColor, ";background:transparent;}}}"),
|
|
255
|
+
return /*#__PURE__*/css("&.", k, "-", type, "{color:", ghostColor, ";border-color:", borderColor, ";&:hover{color:", palette(ghostColor, -1), ";border-color:", palette(ghostColor, -1), ";}&:active{color:", palette(ghostColor, 1), ";border-color:", palette(ghostColor, 1), ";}}");
|
|
256
|
+
}), "&.", k, "-disabled{&,&:hover{color:", button.disabled.color, ";border-color:", button.disabled.ghostBorderColor, ";background:transparent;}}}"),
|
|
258
257
|
/*#__PURE__*/
|
|
259
258
|
// dynamic styles
|
|
260
|
-
css(".k-icon{", iconSide === 'right' ? "margin-left: " + button.icon.gap + ";" : "margin-right: " + button.icon.gap + ";", ";}", !iconSide && "
|
|
261
|
-
return /*#__PURE__*/css("&.k-", size, "{padding-left:calc(", getLeft(button[size].padding), " + 1em);}");
|
|
262
|
-
})
|
|
259
|
+
css(".", k, "-icon{", iconSide === 'right' ? "margin-left: " + button.icon.gap + ";" : "margin-right: " + button.icon.gap + ";", ";}", !iconSide && /*#__PURE__*/css("&.", k, "-loading{&:not(.", k, "-btn-icon){padding-left:calc(", getLeft(button.padding), " + 1em);", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
260
|
+
return /*#__PURE__*/css("&.", k, "-", size, "{padding-left:calc(", getLeft(button[size].padding), " + 1em);}");
|
|
261
|
+
}), ";.", k, "-icon-loading{margin-left:-1em;}}}"), ";"));
|
|
263
262
|
}
|
|
264
|
-
export function makeButtonGroupStyles() {
|
|
265
|
-
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){>.k-btn{", _mapInstanceProperty(types).call(types, function (type) {
|
|
263
|
+
export function makeButtonGroupStyles(k) {
|
|
264
|
+
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){>.", k, "-btn{", _mapInstanceProperty(types).call(types, function (type) {
|
|
266
265
|
if (type === 'active') return;
|
|
267
266
|
var borderColor = button.group[type].borderColor;
|
|
268
|
-
return /*#__PURE__*/css("&.k-", type, ":not(:first-child){border-left-color:", borderColor, ";}&.k-", type, ":not(:last-child){border-right-color:", borderColor, ";}");
|
|
269
|
-
}), ";&: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{flex-direction:column;>.k-btn{", _mapInstanceProperty(types).call(types, function (type) {
|
|
267
|
+
return /*#__PURE__*/css("&.", k, "-", type, ":not(:first-child){border-left-color:", borderColor, ";}&.", k, "-", type, ":not(:last-child){border-right-color:", borderColor, ";}");
|
|
268
|
+
}), ";&: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{flex-direction:column;>.", k, "-btn{", _mapInstanceProperty(types).call(types, function (type) {
|
|
270
269
|
if (type === 'active') return;
|
|
271
270
|
var borderColor = button.group[type].borderColor;
|
|
272
|
-
return /*#__PURE__*/css("&.k-", type, ":not(:first-child){border-top-color:", borderColor, ";}&.k-", type, ":not(:last-child){border-bottom-color:", borderColor, ";}");
|
|
273
|
-
}), ";&: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;>.k-btn{border-radius:", button.borderRadius, "!important;}}");
|
|
271
|
+
return /*#__PURE__*/css("&.", k, "-", type, ":not(:first-child){border-top-color:", borderColor, ";}&.", k, "-", type, ":not(:last-child){border-bottom-color:", borderColor, ";}");
|
|
272
|
+
}), ";&: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;>.", k, "-btn{border-radius:", button.borderRadius, "!important;}}");
|
|
274
273
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
2
3
|
import { Component } from 'intact-vue-next';
|
|
3
4
|
import template from './column.vdt';
|
|
5
|
+
import { useConfigContext } from '../config';
|
|
4
6
|
var typeDefs = {
|
|
5
7
|
width: String,
|
|
6
8
|
center: Boolean
|
|
@@ -9,7 +11,17 @@ export var CardColumn = /*#__PURE__*/function (_Component) {
|
|
|
9
11
|
_inheritsLoose(CardColumn, _Component);
|
|
10
12
|
|
|
11
13
|
function CardColumn() {
|
|
12
|
-
|
|
14
|
+
var _context;
|
|
15
|
+
|
|
16
|
+
var _this;
|
|
17
|
+
|
|
18
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19
|
+
args[_key] = arguments[_key];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
23
|
+
_this.config = useConfigContext();
|
|
24
|
+
return _this;
|
|
13
25
|
}
|
|
14
26
|
|
|
15
27
|
return CardColumn;
|
|
@@ -15,6 +15,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
15
15
|
style = _this$get.style,
|
|
16
16
|
center = _this$get.center;
|
|
17
17
|
|
|
18
|
+
var k = this.config.k;
|
|
18
19
|
var _style = style;
|
|
19
20
|
|
|
20
21
|
if (width) {
|
|
@@ -23,11 +24,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
var classNameObj = (_classNameObj = {
|
|
27
|
-
'k-card-column': true,
|
|
28
|
-
'k-fluid': !width,
|
|
29
|
-
'k-center': center
|
|
30
|
-
}, _classNameObj[className] = className, _classNameObj);
|
|
27
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-card-column"] = true, _classNameObj[k + "-fluid"] = !width, _classNameObj[k + "-center"] = center, _classNameObj[className] = className, _classNameObj);
|
|
31
28
|
return _$cv('div', _extends({
|
|
32
29
|
'className': _$cn(classNameObj),
|
|
33
30
|
'style': _style
|
package/components/card/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
2
3
|
import { Component, VNode } from 'intact-vue-next';
|
|
3
4
|
import template from './index.vdt';
|
|
4
5
|
export * from './column';
|
|
6
|
+
import { useConfigContext } from '../config';
|
|
5
7
|
var typeDefs = {
|
|
6
8
|
title: [String, VNode],
|
|
7
9
|
type: ['shadow', 'border', 'none']
|
|
@@ -17,7 +19,17 @@ export var Card = /*#__PURE__*/function (_Component) {
|
|
|
17
19
|
_inheritsLoose(Card, _Component);
|
|
18
20
|
|
|
19
21
|
function Card() {
|
|
20
|
-
|
|
22
|
+
var _context;
|
|
23
|
+
|
|
24
|
+
var _this;
|
|
25
|
+
|
|
26
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27
|
+
args[_key] = arguments[_key];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
31
|
+
_this.config = useConfigContext();
|
|
32
|
+
return _this;
|
|
21
33
|
}
|
|
22
34
|
|
|
23
35
|
return Card;
|
|
@@ -18,6 +18,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
18
18
|
title = _this$get.title,
|
|
19
19
|
type = _this$get.type;
|
|
20
20
|
|
|
21
|
+
var k = this.config.k;
|
|
21
22
|
var hasHeader = $blocks.header || $blocks.title || title || $blocks.extra;
|
|
22
23
|
var hasColumn = false;
|
|
23
24
|
|
|
@@ -32,14 +33,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
var classNameObj = (_classNameObj = {
|
|
36
|
-
'k-card': true,
|
|
37
|
-
'k-shadow': type === 'shadow',
|
|
38
|
-
'k-border': type === 'border',
|
|
39
|
-
'k-none': type === 'none',
|
|
40
|
-
'k-no-header': !hasHeader,
|
|
41
|
-
'k-card-grid': hasColumn
|
|
42
|
-
}, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
|
|
36
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-card"] = true, _classNameObj[k + "-shadow"] = type === 'shadow', _classNameObj[k + "-border"] = type === 'border', _classNameObj[k + "-none"] = type === 'none', _classNameObj[k + "-no-header"] = !hasHeader, _classNameObj[k + "-card-grid"] = hasColumn, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
|
|
43
37
|
return _$cv('div', _extends({
|
|
44
38
|
'className': _$cn(classNameObj)
|
|
45
39
|
}, getRestProps(this)), [hasHeader ? _$ce(2, 'div', (_$blocks['header'] = function ($super) {
|
|
@@ -53,7 +47,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
53
47
|
};
|
|
54
48
|
|
|
55
49
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
56
|
-
}, __$blocks['title'](_$no)), 0,
|
|
50
|
+
}, __$blocks['title'](_$no)), 0, _$cn(k + "-card-title")), $blocks.extra ? _$ce(2, 'div', (_$blocks['extra'] = function ($super) {
|
|
57
51
|
return null;
|
|
58
52
|
}, __$blocks['extra'] = function ($super, data) {
|
|
59
53
|
var block = $blocks['extra'];
|
|
@@ -63,7 +57,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
63
57
|
};
|
|
64
58
|
|
|
65
59
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
66
|
-
}, __$blocks['extra'](_$no)), 0,
|
|
60
|
+
}, __$blocks['extra'](_$no)), 0, _$cn(k + "-card-extra")) : undefined];
|
|
67
61
|
}, __$blocks['header'] = function ($super, data) {
|
|
68
62
|
var block = $blocks['header'];
|
|
69
63
|
|
|
@@ -72,6 +66,6 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
72
66
|
};
|
|
73
67
|
|
|
74
68
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
75
|
-
}, __$blocks['header'](_$no)), 0,
|
|
69
|
+
}, __$blocks['header'](_$no)), 0, _$cn(k + "-card-header c-clearfix")) : undefined, _$ce(2, 'div', children, 0, _$cn(k + "-card-body"))]);
|
|
76
70
|
}
|
|
77
71
|
;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare function makeStyles(): string;
|
|
2
|
+
export declare function makeStyles(k: string): string;
|