@king-design/vue 2.0.0-beta.1 → 2.0.2
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 +1795 -0
- package/__tests__/components/dropdown.spec.ts +72 -0
- package/__tests__/components/select.spec.ts +29 -0
- package/__tests__/index.ts +46 -0
- package/__tests__/karma.conf.js +54 -0
- package/__tests__/webpack.config.js +61 -0
- package/components/breadcrumb/item.d.ts +1 -1
- package/components/breadcrumb/item.js +3 -14
- package/components/breadcrumb/styles.js +1 -1
- package/components/button/index.vdt.js +26 -17
- package/components/button/styles.d.ts +82 -1
- package/components/button/styles.js +16 -2
- package/components/card/styles.js +1 -1
- package/components/carousel/styles.js +4 -1
- package/components/carousel/useSlide.js +10 -9
- package/components/cascader/index.spec.js +89 -1
- package/components/cascader/index.vdt.js +4 -4
- package/components/cascader/useLabel.js +8 -12
- package/components/checkbox/index.vdt.js +15 -10
- package/components/checkbox/styles.js +2 -2
- package/components/collapse/item.vdt.js +2 -1
- package/components/collapse/styles.js +5 -1
- package/components/colorpicker/index.d.ts +2 -0
- package/components/colorpicker/index.js +2 -1
- package/components/colorpicker/index.spec.js +1 -1
- package/components/colorpicker/index.vdt.js +3 -1
- package/components/context.d.ts +5 -2
- package/components/context.js +7 -4
- package/components/datepicker/helpers.d.ts +2 -1
- package/components/datepicker/helpers.js +8 -2
- package/components/datepicker/index.spec.js +1 -1
- package/components/datepicker/index.vdt.js +10 -5
- package/components/datepicker/styles.d.ts +46 -1
- package/components/diagram/shapes/generateShapes.js +3 -3
- package/components/diagram/shapes/line.d.ts +2 -2
- package/components/diagram/shapes/line.js +0 -1
- package/components/dialog/base.d.ts +2 -0
- package/components/dialog/base.js +2 -1
- package/components/dialog/index.spec.js +59 -94
- package/components/dialog/styles.js +5 -1
- package/components/dialog/useFixBody.d.ts +6 -0
- package/components/dialog/useFixBody.js +12 -0
- package/components/drawer/index.spec.js +5 -5
- package/components/drawer/styles.js +1 -1
- package/components/dropdown/dropdown.js +1 -0
- package/components/dropdown/index.js +1 -2
- package/components/dropdown/index.spec.js +3 -3
- package/components/dropdown/styles.js +1 -1
- package/components/editable/index.vdt.js +2 -1
- package/components/editable/styles.d.ts +8 -1
- package/components/form/index.spec.js +10 -12
- package/components/form/item.vdt.js +13 -9
- package/components/form/useError.d.ts +5 -1
- package/components/form/useError.js +3 -1
- package/components/form/useValidate.js +2 -2
- package/components/grid/col.vdt.js +4 -2
- package/components/grid/styles.js +1 -1
- package/components/grid/useGutter.d.ts +1 -1
- package/components/icon/index.vdt.js +3 -2
- package/components/icon/styles.js +8 -4
- package/components/input/index.d.ts +1 -0
- package/components/input/index.js +2 -1
- package/components/input/index.vdt.js +47 -32
- package/components/input/search.vdt.js +4 -2
- package/components/input/styles.js +8 -3
- package/components/layout/styles.d.ts +1 -1
- package/components/layout/styles.js +7 -3
- package/components/menu/index.spec.js +15 -8
- package/components/menu/item.d.ts +1 -2
- package/components/menu/item.js +10 -17
- package/components/menu/item.vdt.js +4 -4
- package/components/menu/menu.d.ts +3 -0
- package/components/menu/menu.js +4 -0
- package/components/menu/styles.d.ts +62 -1
- package/components/menu/styles.js +6 -2
- package/components/menu/useExpanded.d.ts +1 -4
- package/components/menu/useHighlight.d.ts +5 -8
- package/components/menu/useHighlight.js +44 -33
- package/components/message/index.spec.js +1 -1
- package/components/message/styles.js +6 -2
- package/components/pagination/styles.js +1 -1
- package/components/radio/index.vdt.js +14 -9
- package/components/radio/styles.js +9 -1
- package/components/rate/styles.js +5 -1
- package/components/scrollSelect/styles.d.ts +14 -1
- package/components/scrollSelect/styles.js +9 -1
- package/components/select/base.vdt.js +135 -121
- package/components/select/index.spec.js +1 -1
- package/components/select/menu.vdt.js +1 -0
- package/components/select/styles.js +9 -4
- package/components/select/useSearchable.d.ts +1 -1
- package/components/slider/styles.js +5 -1
- package/components/spinner/index.d.ts +1 -1
- package/components/spinner/index.js +1 -1
- package/components/split/style.js +1 -1
- package/components/steps/context.d.ts +1 -1
- package/components/steps/styles.js +5 -1
- package/components/switch/styles.js +5 -1
- package/components/table/index.d.ts +1 -0
- package/components/table/index.spec.js +2 -1
- package/components/table/row.vdt.js +12 -4
- package/components/table/styles.js +6 -1
- package/components/table/table.d.ts +1 -0
- package/components/table/table.js +2 -1
- package/components/table/table.vdt.js +30 -27
- package/components/table/useColumns.d.ts +1 -1
- package/components/table/useFixedColumns.d.ts +1 -1
- package/components/table/useFixedColumns.js +5 -2
- package/components/table/useGroup.d.ts +1 -1
- package/components/table/useResizable.d.ts +1 -1
- package/components/table/useSortable.d.ts +1 -1
- package/components/table/useWidth.js +7 -1
- package/components/tabs/index.spec.js +1 -1
- package/components/tabs/styles.js +9 -2
- package/components/tabs/tab.vdt.js +2 -1
- package/components/tabs/useActiveBar.js +6 -3
- package/components/tag/base.js +1 -0
- package/components/tag/styles.js +8 -2
- package/components/timepicker/constants.d.ts +2 -1
- package/components/timepicker/constants.js +3 -2
- package/components/timepicker/index.spec.js +36 -35
- package/components/timepicker/useStep.js +3 -3
- package/components/timepicker/useValue.js +2 -2
- package/components/tooltip/index.spec.js +32 -25
- package/components/transfer/index.spec.js +20 -19
- package/components/transfer/styles.js +2 -6
- package/components/tree/index.d.ts +1 -1
- package/components/tree/index.js +1 -1
- package/components/tree/index.spec.js +20 -19
- package/components/tree/index.vdt.js +1 -0
- package/components/tree/styles.js +5 -1
- package/components/treeSelect/index.spec.js +5 -5
- package/components/treeSelect/styles.js +5 -1
- package/components/upload/index.d.ts +1 -1
- package/components/upload/index.spec.js +1 -1
- package/components/upload/index.vdt.js +10 -11
- package/components/upload/styles.js +5 -1
- package/components/utils.d.ts +1 -1
- package/components/wave/index.d.ts +19 -0
- package/components/wave/index.js +120 -0
- package/components/wave/styles.d.ts +2 -0
- package/components/wave/styles.js +17 -0
- package/hooks/useRouter.d.ts +1 -0
- package/hooks/useRouter.js +10 -0
- package/i18n/en-US.d.ts +1 -0
- package/i18n/en-US.js +1 -0
- package/index.d.ts +3 -2
- package/index.js +3 -2
- package/install.d.ts +2 -0
- package/package.json +2 -12
- package/styles/global.js +4 -3
- package/styles/theme.d.ts +16 -7
- package/styles/theme.js +15 -7
- package/tsconfig.json +22 -0
package/components/menu/menu.js
CHANGED
|
@@ -2,6 +2,7 @@ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
|
2
2
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
3
|
import { Component, provide, inject } from 'intact-vue-next';
|
|
4
4
|
import template from './menu.vdt';
|
|
5
|
+
import { useHighlight } from './useHighlight';
|
|
5
6
|
var typeDefs = {
|
|
6
7
|
expandedKeys: Array,
|
|
7
8
|
selectedKey: [String, Number],
|
|
@@ -39,6 +40,8 @@ export var Menu = /*#__PURE__*/function (_Component) {
|
|
|
39
40
|
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
40
41
|
_this.rootMenu = inject(ROOT_MENU, null);
|
|
41
42
|
_this.parentMenu = inject(MENU, null);
|
|
43
|
+
_this.subExpandedKeys = void 0;
|
|
44
|
+
_this.highlight = void 0;
|
|
42
45
|
return _this;
|
|
43
46
|
}
|
|
44
47
|
|
|
@@ -49,6 +52,7 @@ export var Menu = /*#__PURE__*/function (_Component) {
|
|
|
49
52
|
|
|
50
53
|
if (!this.rootMenu) {
|
|
51
54
|
provide(ROOT_MENU, this);
|
|
55
|
+
this.highlight = useHighlight();
|
|
52
56
|
}
|
|
53
57
|
};
|
|
54
58
|
|
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
declare
|
|
2
|
+
declare const defaults: {
|
|
3
|
+
readonly transition: string;
|
|
4
|
+
width: string;
|
|
5
|
+
bgColor: string;
|
|
6
|
+
fontSize: string;
|
|
7
|
+
readonly borderRadius: string;
|
|
8
|
+
item: {
|
|
9
|
+
height: string;
|
|
10
|
+
padding: string;
|
|
11
|
+
color: string;
|
|
12
|
+
hoverColor: string;
|
|
13
|
+
readonly disabledColor: string;
|
|
14
|
+
readonly activeBgColor: string;
|
|
15
|
+
dotFontSize: string;
|
|
16
|
+
};
|
|
17
|
+
icon: {
|
|
18
|
+
width: string;
|
|
19
|
+
gap: string;
|
|
20
|
+
};
|
|
21
|
+
header: {
|
|
22
|
+
height: string;
|
|
23
|
+
fontSize: string;
|
|
24
|
+
borderBottom: string;
|
|
25
|
+
};
|
|
26
|
+
subBgColor: string;
|
|
27
|
+
light: {
|
|
28
|
+
bgColor: string;
|
|
29
|
+
subBgColor: string;
|
|
30
|
+
border: string;
|
|
31
|
+
item: {
|
|
32
|
+
readonly color: string;
|
|
33
|
+
readonly hoverColor: string;
|
|
34
|
+
disabledColor: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
white: {
|
|
38
|
+
bgColor: string;
|
|
39
|
+
subBgColor: string;
|
|
40
|
+
border: string;
|
|
41
|
+
item: {
|
|
42
|
+
readonly color: string;
|
|
43
|
+
readonly hoverColor: string;
|
|
44
|
+
readonly disabledColor: string;
|
|
45
|
+
};
|
|
46
|
+
active: {
|
|
47
|
+
readonly color: string;
|
|
48
|
+
readonly bgColor: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
dropdown: {
|
|
52
|
+
minWidth: string;
|
|
53
|
+
};
|
|
54
|
+
large: {
|
|
55
|
+
width: string;
|
|
56
|
+
readonly fontSize: string;
|
|
57
|
+
};
|
|
58
|
+
small: {
|
|
59
|
+
width: string;
|
|
60
|
+
readonly fontSize: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
declare let menu: typeof defaults;
|
|
3
64
|
export { menu };
|
|
4
65
|
export declare function makeMenuStyles(): string;
|
|
5
66
|
export declare function makeTitleStyles(): string;
|
|
@@ -5,6 +5,10 @@ import { deepDefaults, getLeft, palette } from '../../styles/utils';
|
|
|
5
5
|
import '../../styles/global';
|
|
6
6
|
var sizes = ['large', 'small'];
|
|
7
7
|
var defaults = {
|
|
8
|
+
get transition() {
|
|
9
|
+
return theme.transition.large;
|
|
10
|
+
},
|
|
11
|
+
|
|
8
12
|
width: '200px',
|
|
9
13
|
bgColor: '#262626',
|
|
10
14
|
fontSize: '14px',
|
|
@@ -118,7 +122,7 @@ export function makeMenuStyles() {
|
|
|
118
122
|
|
|
119
123
|
// we must increase the priority by adding &.k-menu
|
|
120
124
|
// to override the css of dropdownMenu
|
|
121
|
-
return /*#__PURE__*/css("&.k-menu{width:", menu.width, ";transition:width ",
|
|
125
|
+
return /*#__PURE__*/css("&.k-menu{width:", menu.width, ";transition:width ", menu.transition, ";background:", menu.bgColor, ";font-size:", menu.fontSize, ";}&:not(.k-dropdown-menu) &:not(.k-dropdown-menu){width:auto;background:", menu.subBgColor, ";.k-menu-title{padding-left:calc(", getLeft(menu.item.padding), " + ", menu.icon.width, " + ", menu.icon.gap, ");}}&:not(.k-dropdown-menu) &:not(.k-dropdown-menu) &:not(.k-dropdown-menu){.k-menu-title{padding-left:calc(", getLeft(menu.item.padding), " + ", menu.icon.width, " * 2 + ", menu.icon.gap, ");}}.k-icon{width:", menu.icon.width, ";margin-right:", menu.icon.gap, ";text-align:center;flex-shrink:0;}.k-menu-header{height:", menu.header.height, ";font-size:", menu.header.fontSize, ";font-weight:bold;border-bottom:", menu.header.borderBottom, ";}", _mapInstanceProperty(_context = ['light', 'white']).call(_context, function (theme) {
|
|
122
126
|
var styles = menu[theme];
|
|
123
127
|
return /*#__PURE__*/css("&.k-", theme, "{background:", styles.bgColor, ";.k-menu-header{color:", styles.item.color, ";border-bottom:", styles.border, ";}.k-menu-item{.k-menu-title{color:", styles.item.color, ";&:hover{color:", styles.item.hoverColor, ";}}&.k-highlighted{>.k-menu-title{color:", styles.item.hoverColor, ";}}&.k-disabled{>.k-menu-title{color:", styles.item.disabledColor, "!important;}}}.k-menu:not(.k-dropdown-menu){background:", styles.subBgColor, ";}&.k-horizontal{.k-menu-header{border-right:", styles.border, ";}}}");
|
|
124
128
|
}), " &.k-white{.k-menu-item.k-active{>.k-menu-title{color:", menu.white.active.color, "!important;background:", menu.white.active.bgColor, ";}}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
@@ -132,5 +136,5 @@ export function makeTitleStyles() {
|
|
|
132
136
|
}
|
|
133
137
|
export function makeItemStyles() {
|
|
134
138
|
var item = menu.item;
|
|
135
|
-
return /*#__PURE__*/css(".k-menu-title{cursor:pointer;height:", menu.item.height, ";transition:all ",
|
|
139
|
+
return /*#__PURE__*/css(".k-menu-title{cursor:pointer;height:", menu.item.height, ";transition:all ", menu.transition, ";&:hover{color:", menu.item.hoverColor, ";}}.k-menu-name{flex:1;display:flex;align-items:center;}.k-menu-arrow{transition:transform ", menu.transition, ";margin-left:", menu.icon.gap, ";}&.k-expanded{>.k-menu-title{color:", menu.item.hoverColor, ";.k-menu-arrow{transform:rotateX(180deg);}}}&.k-highlighted{>.k-menu-title{color:", menu.item.hoverColor, ";}}&.k-active{>.k-menu-title{color:", menu.item.hoverColor, "!important;background:", menu.item.activeBgColor, ";}}&.k-disabled{>.k-menu-title{color:", menu.item.disabledColor, "!important;cursor:not-allowed;}}.k-menu-dot{font-size:", menu.item.dotFontSize, ";transform:scale(.4);}");
|
|
136
140
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { Key } from 'intact-vue-next';
|
|
2
1
|
import type { Menu } from './';
|
|
3
|
-
export declare function useExpanded(rootMenu: Menu, parentMenu: Menu
|
|
4
|
-
subExpandedKeys?: Set<Key>;
|
|
5
|
-
}): {
|
|
2
|
+
export declare function useExpanded(rootMenu: Menu, parentMenu: Menu): {
|
|
6
3
|
isExpanded: () => boolean;
|
|
7
4
|
expand: () => void;
|
|
8
5
|
shrink: () => void;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { Key } from 'intact-vue-next';
|
|
2
|
-
|
|
3
|
-
export declare function useHighlight(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
updateStatus: (v: Key | undefined) => void;
|
|
8
|
-
select: () => void;
|
|
9
|
-
isSelected: () => boolean;
|
|
2
|
+
export declare const MENU_RECORD_KEY = "MenuKeys";
|
|
3
|
+
export declare function useHighlight(): {
|
|
4
|
+
isHighlighted: (key: Key) => boolean;
|
|
5
|
+
select: (key: Key) => void;
|
|
6
|
+
isSelected: (key: Key) => boolean;
|
|
10
7
|
};
|
|
@@ -2,56 +2,67 @@ import _Set from "@babel/runtime-corejs3/core-js/set";
|
|
|
2
2
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
3
3
|
import _Array$from from "@babel/runtime-corejs3/core-js/array/from";
|
|
4
4
|
import { useInstance } from 'intact-vue-next';
|
|
5
|
-
import {
|
|
5
|
+
import { useRecordParent } from '../../hooks/useRecordComponent';
|
|
6
|
+
import { inArray } from '../table/useChecked';
|
|
7
|
+
import { useState } from '../../hooks/useState';
|
|
8
|
+
export var MENU_RECORD_KEY = 'MenuKeys';
|
|
9
|
+
export function useHighlight() {
|
|
10
|
+
var instance = useInstance();
|
|
11
|
+
var menuItems = useRecordParent(MENU_RECORD_KEY);
|
|
12
|
+
var highlightedKeys = useState([]);
|
|
13
|
+
instance.watch('selectedKey', updateStatus, {
|
|
14
|
+
presented: true
|
|
15
|
+
});
|
|
6
16
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
17
|
+
function updateStatus(newValue) {
|
|
18
|
+
var _loop = function _loop(i) {
|
|
19
|
+
var menuItem = menuItems[i];
|
|
20
|
+
var key = menuItem.get('key');
|
|
21
|
+
if (newValue !== key) return "continue";
|
|
22
|
+
var items = [];
|
|
23
|
+
var parentItem = menuItem.parentMenuItem;
|
|
11
24
|
|
|
12
|
-
|
|
13
|
-
|
|
25
|
+
while (parentItem) {
|
|
26
|
+
items.push(parentItem);
|
|
27
|
+
parentItem = parentItem.parentMenuItem;
|
|
28
|
+
}
|
|
14
29
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
key =
|
|
30
|
+
var expandedKeys = new _Set(instance.get('expandedKeys'));
|
|
31
|
+
highlightedKeys.set(_mapInstanceProperty(items).call(items, function (item) {
|
|
32
|
+
var key = item.get('key');
|
|
33
|
+
expandedKeys.add(key);
|
|
34
|
+
return key;
|
|
35
|
+
}));
|
|
36
|
+
instance.set('expandedKeys', _Array$from(expandedKeys));
|
|
37
|
+
return {
|
|
38
|
+
v: void 0
|
|
39
|
+
};
|
|
40
|
+
};
|
|
18
41
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var parentItem = parentMenuItem;
|
|
42
|
+
for (var i = 0; i < menuItems.length; i++) {
|
|
43
|
+
var _ret = _loop(i);
|
|
22
44
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
parentItem = parentItem.parentMenuItem;
|
|
45
|
+
if (_ret === "continue") continue;
|
|
46
|
+
if (typeof _ret === "object") return _ret.v;
|
|
26
47
|
}
|
|
27
48
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var highlightedKeys = _mapInstanceProperty(items).call(items, function (item) {
|
|
31
|
-
var key = item.get('key');
|
|
32
|
-
expandedKeys.add(key);
|
|
33
|
-
return key;
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
rootMenu.highlightedKeys = highlightedKeys;
|
|
37
|
-
rootMenu.set('expandedKeys', _Array$from(expandedKeys));
|
|
49
|
+
highlightedKeys.set([]);
|
|
38
50
|
}
|
|
39
51
|
|
|
40
|
-
function isHighlighted() {
|
|
41
|
-
return inArray(
|
|
52
|
+
function isHighlighted(key) {
|
|
53
|
+
return inArray(highlightedKeys.value, key);
|
|
42
54
|
}
|
|
43
55
|
|
|
44
|
-
function select() {
|
|
45
|
-
|
|
56
|
+
function select(key) {
|
|
57
|
+
instance.set('selectedKey', key);
|
|
46
58
|
}
|
|
47
59
|
|
|
48
|
-
function isSelected() {
|
|
49
|
-
return
|
|
60
|
+
function isSelected(key) {
|
|
61
|
+
return instance.get('selectedKey') === key;
|
|
50
62
|
}
|
|
51
63
|
|
|
52
64
|
return {
|
|
53
65
|
isHighlighted: isHighlighted,
|
|
54
|
-
updateStatus: updateStatus,
|
|
55
66
|
select: select,
|
|
56
67
|
isSelected: isSelected
|
|
57
68
|
};
|
|
@@ -4,6 +4,10 @@ import { theme, setDefault } from '../../styles/theme';
|
|
|
4
4
|
import { deepDefaults, palette } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
6
|
var defaults = {
|
|
7
|
+
get transition() {
|
|
8
|
+
return theme.transition.middle;
|
|
9
|
+
},
|
|
10
|
+
|
|
7
11
|
top: "10px",
|
|
8
12
|
transform: "translateY(-10px)",
|
|
9
13
|
|
|
@@ -53,8 +57,8 @@ export function makeMessagesStyles() {
|
|
|
53
57
|
export function makeMessageStyles() {
|
|
54
58
|
var _context;
|
|
55
59
|
|
|
56
|
-
return /*#__PURE__*/css("text-align:center;width:100%;font-size:", message.fontSize, ";color:", message.color, ";.k-message-container{display:inline-block;box-shadow:", message.boxShadow, ";background:", message.bgColor, ";border-radius:", message.borderRadius, ";margin-bottom:", message.gap, ";pointer-events:all;min-width:", message.minWidth, ";max-width:", message.maxWidth, ";position:relative;text-align:", message.textAlign, ";border:", message.border, ";min-height:", message.minHeight, ";}.k-message-wrapper{position:relative;display:inline-block;&.k-with-icon{padding-left:calc(", message.icon.left, " + 14px);}}.k-message-content{display:inline-block;padding:", message.padding, ";vertical-align:middle;word-break:break-word;word-wrap:break-word;}.k-message-close{vertical-align:middle;position:absolute;right:0;top:0
|
|
60
|
+
return /*#__PURE__*/css("text-align:center;width:100%;font-size:", message.fontSize, ";color:", message.color, ";.k-message-container{display:inline-block;box-shadow:", message.boxShadow, ";background:", message.bgColor, ";border-radius:", message.borderRadius, ";margin-bottom:", message.gap, ";pointer-events:all;min-width:", message.minWidth, ";max-width:", message.maxWidth, ";position:relative;text-align:", message.textAlign, ";border:", message.border, ";min-height:", message.minHeight, ";}.k-message-wrapper{position:relative;display:inline-block;&.k-with-icon{padding-left:calc(", message.icon.left, " + 14px);}}.k-message-content{display:inline-block;padding:", message.padding, ";vertical-align:middle;word-break:break-word;word-wrap:break-word;}.k-message-close{vertical-align:middle;position:absolute;right:0;top:0;&:hover{background:none;}.k-icon{font-size:", message.closeFontSize, ";}}.k-message-icon{position:absolute;left:", message.icon.left, ";top:", message.icon.top, ";color:", message.icon.color, ";font-size:", message.icon.fontSize, ";}", _mapInstanceProperty(_context = ['error', 'success', 'warning']).call(_context, function (type) {
|
|
57
61
|
var color = theme.color[type === 'error' ? 'danger' : type];
|
|
58
62
|
return /*#__PURE__*/css("&.k-", type, "{.k-message-container{color:", color, ";border-color:", color, ";background:", palette(color, -4), ";}.k-message-close{color:", color, ";&:hover{color:", palette(color, 1), ";}}}");
|
|
59
|
-
}), "&.transition-enter-from,&.transition-leave-to{opacity:0;transform:", message.transform, ";}&.transition-enter-active,&.transition-leave-active{transition:transform ",
|
|
63
|
+
}), "&.transition-enter-from,&.transition-leave-to{opacity:0;transform:", message.transform, ";}&.transition-enter-active,&.transition-leave-active{transition:transform ", message.transition, ",opacity ", message.transition, ";}&.transition-move{transition:transform ", message.transition, ";}");
|
|
60
64
|
}
|
|
@@ -55,7 +55,7 @@ setDefault(function () {
|
|
|
55
55
|
}).pagination;
|
|
56
56
|
});
|
|
57
57
|
export function makeStyles() {
|
|
58
|
-
return /*#__PURE__*/css("font-size:", pagination.fontSize, ";.k-pagination-limits,.k-pagination-goto,.k-pagination-total{margin-left:", pagination.gap, ";display:inline-block;vertical-align:middle;}.k-pagination-ellipsis{background-color:transparent;border:
|
|
58
|
+
return /*#__PURE__*/css("font-size:", pagination.fontSize, ";.k-pagination-limits,.k-pagination-goto,.k-pagination-total{margin-left:", pagination.gap, ";display:inline-block;vertical-align:middle;}.k-pagination-ellipsis{background-color:transparent;border-color:transparent;}.k-btns{.k-btn{width:auto!important;min-width:", button.height, ";padding:", pagination.btn.padding, ";margin-right:", pagination.btn.gap, ";&:last-of-type{margin:0!important;}}.k-icon{font-size:18px;}}.k-pagination-goto{.k-input{font-size:inherit;width:", pagination.goto.width, ";margin:", pagination.goto.gap, ";}}.k-select{width:auto;}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
59
59
|
var styles = pagination[size];
|
|
60
60
|
var btnStyles = button[size];
|
|
61
61
|
return /*#__PURE__*/css("&.k-", size, "{font-size:", styles.fontSize, ";.k-btn{margin-right:", styles.btnGap, ";min-width:", btnStyles.height, ";.k-icon{font-size:", styles.iconFontSize, ";}}}");
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
var _excluded = ["className", "disabled", "trueValue", "style", "children", "value", "ref", "key", "title"];
|
|
4
|
-
import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce } from 'intact-vue-next';
|
|
4
|
+
import { createVNode as _$cv, className as _$cn, createUnknownComponentVNode as _$cc, createElementVNode as _$ce } from 'intact-vue-next';
|
|
5
5
|
import { getRestProps } from '../utils';
|
|
6
6
|
import { makeStyles } from './styles';
|
|
7
|
+
import { Wave } from '../wave';
|
|
7
8
|
export default function ($props, $blocks, $__proto__) {
|
|
8
9
|
var _classNameObj;
|
|
9
10
|
|
|
@@ -51,14 +52,18 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
51
52
|
'tabindex': disabled ? "-1" : "0",
|
|
52
53
|
'ev-keypress': this.onKeypress,
|
|
53
54
|
'ev-click': this.fixClick
|
|
54
|
-
}), [_$
|
|
55
|
-
'type': 'radio',
|
|
55
|
+
}), [_$cc(Wave, {
|
|
56
56
|
'disabled': disabled,
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
'inset': '-2px',
|
|
58
|
+
'children': _$ce(2, 'span', _$cv('input', _extends({}, getRestProps(this, rest), {
|
|
59
|
+
'type': 'radio',
|
|
60
|
+
'disabled': disabled,
|
|
61
|
+
'value': trueValue,
|
|
62
|
+
'tabindex': '-1',
|
|
63
|
+
'ref': this.elementRef,
|
|
64
|
+
'checked': isChecked,
|
|
65
|
+
'ev-click': this.onClick
|
|
66
|
+
})), 2, 'k-radio-wrapper')
|
|
67
|
+
}), children ? _$ce(2, 'span', children, 0, 'k-radio-text') : undefined]);
|
|
63
68
|
}
|
|
64
69
|
;
|
|
@@ -5,10 +5,18 @@ import '../../styles/global';
|
|
|
5
5
|
var defaults = {
|
|
6
6
|
width: '14px',
|
|
7
7
|
|
|
8
|
+
get transition() {
|
|
9
|
+
return theme.transition.small;
|
|
10
|
+
},
|
|
11
|
+
|
|
8
12
|
get borderColor() {
|
|
9
13
|
return theme.color.darkBorder;
|
|
10
14
|
},
|
|
11
15
|
|
|
16
|
+
get hoverBorderColor() {
|
|
17
|
+
return theme.color.primary;
|
|
18
|
+
},
|
|
19
|
+
|
|
12
20
|
bgColor: '#fff',
|
|
13
21
|
textGap: '8px',
|
|
14
22
|
innerWidth: '8px',
|
|
@@ -43,5 +51,5 @@ setDefault(function () {
|
|
|
43
51
|
}).radio;
|
|
44
52
|
});
|
|
45
53
|
export function makeStyles() {
|
|
46
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-radio-wrapper{
|
|
54
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-radio-wrapper{width:", radio.width, ";height:", radio.width, ";border:1px solid ", radio.borderColor, ";border-radius:50%;transition:all ", radio.transition, ";position:relative;background:", radio.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", radio.innerWidth, ";height:", radio.innerWidth, ";top:50%;left:50%;margin-left:calc(-", radio.innerWidth, " / 2);margin-top:calc(-", radio.innerWidth, " / 2);border-radius:50%;background-color:", radio.checkedColor, ";transform:scale(0);transition:all ", radio.transition, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;}.k-radio-text{margin-left:", radio.textGap, ";flex:0 1 auto;}&.k-checked{.k-radio-wrapper{border-color:", radio.checkedColor, ";&:before{transform:scale(1);}}}&:focus{outline:none;.k-radio-wrapper{border-color:", radio.checkedColor, ";}}&.k-disabled{color:", radio.disabled.color, ";cursor:not-allowed;.k-radio-wrapper{border-color:", radio.disabled.borderColor, ";background:", radio.disabled.bgColor, ";&:before{background:", radio.disabled.innerColor, ";}}input{cursor:not-allowed;}}");
|
|
47
55
|
}
|
|
@@ -5,6 +5,10 @@ import '../../styles/global';
|
|
|
5
5
|
var defaults = {
|
|
6
6
|
color: '#ccc',
|
|
7
7
|
|
|
8
|
+
get transition() {
|
|
9
|
+
return theme.transition.middle;
|
|
10
|
+
},
|
|
11
|
+
|
|
8
12
|
get activeColor() {
|
|
9
13
|
return theme.color.warning;
|
|
10
14
|
},
|
|
@@ -22,5 +26,5 @@ setDefault(function () {
|
|
|
22
26
|
}).rate;
|
|
23
27
|
});
|
|
24
28
|
export function makeStyles() {
|
|
25
|
-
return /*#__PURE__*/css("display:inline-block;.k-rate-item{display:inline-block;margin-right:", rate.item.gap, ";cursor:pointer;position:relative;color:", rate.color, ";transition:all ",
|
|
29
|
+
return /*#__PURE__*/css("display:inline-block;.k-rate-item{display:inline-block;margin-right:", rate.item.gap, ";cursor:pointer;position:relative;color:", rate.color, ";transition:all ", rate.transition, ";&:hover{transform:", rate.item.hoverTransform, ";}&.k-full{color:", rate.activeColor, ";}&.k-half{.k-rate-first{color:", rate.activeColor, ";}}}.k-rate-first{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;}.k-icon{font-size:", rate.iconFontSize, ";}&.k-disabled{.k-rate-item{cursor:default;&:hover{transform:none;}}}");
|
|
26
30
|
}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
declare
|
|
2
|
+
declare const defaults: {
|
|
3
|
+
readonly transition: string;
|
|
4
|
+
height: string;
|
|
5
|
+
item: {
|
|
6
|
+
height: string;
|
|
7
|
+
readonly color: string;
|
|
8
|
+
readonly activeColor: string;
|
|
9
|
+
readonly hoverBgColor: string;
|
|
10
|
+
activeFontSize: string;
|
|
11
|
+
readonly disabledColor: string;
|
|
12
|
+
border: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare let scrollSelect: typeof defaults;
|
|
3
16
|
export { scrollSelect };
|
|
4
17
|
export declare function makeStyles(): string;
|
|
@@ -3,6 +3,10 @@ import { theme, setDefault } from '../../styles/theme';
|
|
|
3
3
|
import { deepDefaults } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
5
|
var defaults = {
|
|
6
|
+
get transition() {
|
|
7
|
+
return theme.transition.middle;
|
|
8
|
+
},
|
|
9
|
+
|
|
6
10
|
height: "125px",
|
|
7
11
|
item: {
|
|
8
12
|
height: "30px",
|
|
@@ -15,6 +19,10 @@ var defaults = {
|
|
|
15
19
|
return theme.color.primary;
|
|
16
20
|
},
|
|
17
21
|
|
|
22
|
+
get hoverBgColor() {
|
|
23
|
+
return theme.color.bg;
|
|
24
|
+
},
|
|
25
|
+
|
|
18
26
|
activeFontSize: "1.1em",
|
|
19
27
|
|
|
20
28
|
get disabledColor() {
|
|
@@ -32,5 +40,5 @@ setDefault(function () {
|
|
|
32
40
|
});
|
|
33
41
|
export { scrollSelect };
|
|
34
42
|
export function makeStyles() {
|
|
35
|
-
return /*#__PURE__*/css("text-align:center;overflow:hidden;max-height:100%;height:", scrollSelect.height, ";user-select:none;position:relative;.k-scroll-select-wrapper{transition:transform ",
|
|
43
|
+
return /*#__PURE__*/css("text-align:center;overflow:hidden;max-height:100%;height:", scrollSelect.height, ";user-select:none;position:relative;.k-scroll-select-wrapper{transition:transform ", scrollSelect.transition, ";}&.k-dragging{.k-scroll-select-wrapper{transition:none;}}&.k-disabled{.k-scroll-select-item{cursor:not-allowed;color:", scrollSelect.item.disabledColor, ";}}.k-scroll-select-item{line-height:", scrollSelect.item.height, ";color:", scrollSelect.item.color, ";cursor:pointer;white-space:nowrap;&:hover{background:", scrollSelect.item.hoverBgColor, ";}&.k-active{color:", scrollSelect.item.activeColor, ";font-size:", scrollSelect.item.activeFontSize, ";}&.k-disabled{color:", scrollSelect.item.disabledColor, ";}}.k-scroll-select-append{position:absolute;top:50%;right:0;transform:translateY(-50%);}.k-scroll-select-border{position:absolute;width:100%;top:50%;margin-top:calc(-", scrollSelect.item.height, " / 2);height:", scrollSelect.item.height, ";border-top:", scrollSelect.item.border, ";border-bottom:", scrollSelect.item.border, ";pointer-events:none;}");
|
|
36
44
|
}
|