@progress/kendo-vue-layout 3.6.3 → 3.6.4-dev.202210071340
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/dist/cdn/js/kendo-vue-layout.js +1 -1
- package/dist/es/appbar/AppBar.d.ts +44 -0
- package/dist/es/appbar/AppBar.js +90 -0
- package/dist/es/appbar/AppBarSection.d.ts +44 -0
- package/dist/es/appbar/AppBarSection.js +40 -0
- package/dist/es/appbar/AppBarSpacer.d.ts +44 -0
- package/dist/es/appbar/AppBarSpacer.js +57 -0
- package/dist/es/appbar/interfaces/AppBarProps.d.ts +66 -0
- package/dist/es/appbar/interfaces/AppBarProps.js +1 -0
- package/dist/es/appbar/interfaces/AppBarSectionProps.d.ts +5 -0
- package/dist/es/appbar/interfaces/AppBarSectionProps.js +1 -0
- package/dist/es/appbar/interfaces/AppBarSpacerProps.d.ts +7 -0
- package/dist/es/appbar/interfaces/AppBarSpacerProps.js +1 -0
- package/dist/es/bottomnavigation/BottomNavigation.d.ts +45 -0
- package/dist/es/bottomnavigation/BottomNavigation.js +179 -0
- package/dist/es/bottomnavigation/BottomNavigationItem.d.ts +44 -0
- package/dist/es/bottomnavigation/BottomNavigationItem.js +124 -0
- package/dist/es/bottomnavigation/BottomNavigationItemProps.d.ts +54 -0
- package/dist/es/bottomnavigation/BottomNavigationItemProps.js +1 -0
- package/dist/es/bottomnavigation/BottomNavigationProps.d.ts +143 -0
- package/dist/es/bottomnavigation/BottomNavigationProps.js +1 -0
- package/dist/es/bottomnavigation/models/events.d.ts +18 -0
- package/dist/es/bottomnavigation/models/events.js +1 -0
- package/dist/es/bottomnavigation/models/utils.d.ts +36 -0
- package/dist/es/bottomnavigation/models/utils.js +36 -0
- package/dist/es/expansionpanel/ExpansionPanel.d.ts +42 -0
- package/dist/es/expansionpanel/ExpansionPanel.js +185 -0
- package/dist/es/expansionpanel/ExpansionPanelContent.d.ts +19 -0
- package/dist/es/expansionpanel/ExpansionPanelContent.js +39 -0
- package/dist/es/expansionpanel/interfaces.d.ts +79 -0
- package/dist/es/expansionpanel/interfaces.js +1 -0
- package/dist/es/expansionpanel/main.d.ts +3 -0
- package/dist/es/expansionpanel/main.js +3 -0
- package/dist/es/main.d.ts +12 -0
- package/dist/es/main.js +12 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/stepper/interfaces/StepProps.d.ts +0 -4
- package/dist/es/stepper/interfaces/StepperProps.d.ts +0 -4
- package/dist/esm/appbar/AppBar.d.ts +44 -0
- package/dist/esm/appbar/AppBar.js +90 -0
- package/dist/esm/appbar/AppBarSection.d.ts +44 -0
- package/dist/esm/appbar/AppBarSection.js +40 -0
- package/dist/esm/appbar/AppBarSpacer.d.ts +44 -0
- package/dist/esm/appbar/AppBarSpacer.js +57 -0
- package/dist/esm/appbar/interfaces/AppBarProps.d.ts +66 -0
- package/dist/esm/appbar/interfaces/AppBarProps.js +1 -0
- package/dist/esm/appbar/interfaces/AppBarSectionProps.d.ts +5 -0
- package/dist/esm/appbar/interfaces/AppBarSectionProps.js +1 -0
- package/dist/esm/appbar/interfaces/AppBarSpacerProps.d.ts +7 -0
- package/dist/esm/appbar/interfaces/AppBarSpacerProps.js +1 -0
- package/dist/esm/bottomnavigation/BottomNavigation.d.ts +45 -0
- package/dist/esm/bottomnavigation/BottomNavigation.js +179 -0
- package/dist/esm/bottomnavigation/BottomNavigationItem.d.ts +44 -0
- package/dist/esm/bottomnavigation/BottomNavigationItem.js +124 -0
- package/dist/esm/bottomnavigation/BottomNavigationItemProps.d.ts +54 -0
- package/dist/esm/bottomnavigation/BottomNavigationItemProps.js +1 -0
- package/dist/esm/bottomnavigation/BottomNavigationProps.d.ts +143 -0
- package/dist/esm/bottomnavigation/BottomNavigationProps.js +1 -0
- package/dist/esm/bottomnavigation/models/events.d.ts +18 -0
- package/dist/esm/bottomnavigation/models/events.js +1 -0
- package/dist/esm/bottomnavigation/models/utils.d.ts +36 -0
- package/dist/esm/bottomnavigation/models/utils.js +36 -0
- package/dist/esm/expansionpanel/ExpansionPanel.d.ts +42 -0
- package/dist/esm/expansionpanel/ExpansionPanel.js +185 -0
- package/dist/esm/expansionpanel/ExpansionPanelContent.d.ts +19 -0
- package/dist/esm/expansionpanel/ExpansionPanelContent.js +39 -0
- package/dist/esm/expansionpanel/interfaces.d.ts +79 -0
- package/dist/esm/expansionpanel/interfaces.js +1 -0
- package/dist/esm/expansionpanel/main.d.ts +3 -0
- package/dist/esm/expansionpanel/main.js +3 -0
- package/dist/esm/main.d.ts +12 -0
- package/dist/esm/main.js +12 -0
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/stepper/interfaces/StepProps.d.ts +0 -4
- package/dist/esm/stepper/interfaces/StepperProps.d.ts +0 -4
- package/dist/npm/appbar/AppBar.d.ts +44 -0
- package/dist/npm/appbar/AppBar.js +101 -0
- package/dist/npm/appbar/AppBarSection.d.ts +44 -0
- package/dist/npm/appbar/AppBarSection.js +50 -0
- package/dist/npm/appbar/AppBarSpacer.d.ts +44 -0
- package/dist/npm/appbar/AppBarSpacer.js +67 -0
- package/dist/npm/appbar/interfaces/AppBarProps.d.ts +66 -0
- package/dist/npm/appbar/interfaces/AppBarProps.js +2 -0
- package/dist/npm/appbar/interfaces/AppBarSectionProps.d.ts +5 -0
- package/dist/npm/appbar/interfaces/AppBarSectionProps.js +2 -0
- package/dist/npm/appbar/interfaces/AppBarSpacerProps.d.ts +7 -0
- package/dist/npm/appbar/interfaces/AppBarSpacerProps.js +2 -0
- package/dist/npm/bottomnavigation/BottomNavigation.d.ts +45 -0
- package/dist/npm/bottomnavigation/BottomNavigation.js +192 -0
- package/dist/npm/bottomnavigation/BottomNavigationItem.d.ts +44 -0
- package/dist/npm/bottomnavigation/BottomNavigationItem.js +135 -0
- package/dist/npm/bottomnavigation/BottomNavigationItemProps.d.ts +54 -0
- package/dist/npm/bottomnavigation/BottomNavigationItemProps.js +2 -0
- package/dist/npm/bottomnavigation/BottomNavigationProps.d.ts +143 -0
- package/dist/npm/bottomnavigation/BottomNavigationProps.js +2 -0
- package/dist/npm/bottomnavigation/models/events.d.ts +18 -0
- package/dist/npm/bottomnavigation/models/events.js +2 -0
- package/dist/npm/bottomnavigation/models/utils.d.ts +36 -0
- package/dist/npm/bottomnavigation/models/utils.js +39 -0
- package/dist/npm/expansionpanel/ExpansionPanel.d.ts +42 -0
- package/dist/npm/expansionpanel/ExpansionPanel.js +196 -0
- package/dist/npm/expansionpanel/ExpansionPanelContent.d.ts +19 -0
- package/dist/npm/expansionpanel/ExpansionPanelContent.js +50 -0
- package/dist/npm/expansionpanel/interfaces.d.ts +79 -0
- package/dist/npm/expansionpanel/interfaces.js +2 -0
- package/dist/npm/expansionpanel/main.d.ts +3 -0
- package/dist/npm/expansionpanel/main.js +36 -0
- package/dist/npm/main.d.ts +12 -0
- package/dist/npm/main.js +12 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/stepper/interfaces/StepProps.d.ts +0 -4
- package/dist/npm/stepper/interfaces/StepperProps.d.ts +0 -4
- package/package.json +11 -10
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AppBarSpacerVue2 = exports.AppBarSpacer = void 0; // @ts-ignore
|
|
7
|
+
|
|
8
|
+
var Vue = require("vue");
|
|
9
|
+
|
|
10
|
+
var allVue = Vue;
|
|
11
|
+
var gh = allVue.h;
|
|
12
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
13
|
+
|
|
14
|
+
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var AppBarSpacerVue2 = {
|
|
21
|
+
name: 'KendoAppBarSpacer',
|
|
22
|
+
props: {
|
|
23
|
+
width: [String, Number]
|
|
24
|
+
},
|
|
25
|
+
computed: {
|
|
26
|
+
spacerClasses: function spacerClasses() {
|
|
27
|
+
return {
|
|
28
|
+
'k-appbar-spacer': true,
|
|
29
|
+
'k-appbar-spacer-sized': this.width !== undefined
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
spacerStyles: function spacerStyles() {
|
|
33
|
+
return {
|
|
34
|
+
flexBasis: this.width !== undefined ? this.width : undefined
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
setup: !isV3 ? undefined : function () {
|
|
40
|
+
var v3 = !!isV3;
|
|
41
|
+
return {
|
|
42
|
+
v3: v3
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
render: function render(createElement) {
|
|
46
|
+
var h = gh || createElement;
|
|
47
|
+
var defaultSlot = (0, kendo_vue_common_1.getDefaultSlots)(this);
|
|
48
|
+
return h("span", {
|
|
49
|
+
"class": this.spacerClasses,
|
|
50
|
+
style: this.spacerStyles
|
|
51
|
+
}, [defaultSlot]);
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
focus: function focus() {
|
|
55
|
+
if (this.$el) {
|
|
56
|
+
(0, kendo_vue_common_1.focusFirstFocusableChild)(this.$el);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.AppBarSpacerVue2 = AppBarSpacerVue2;
|
|
62
|
+
/**
|
|
63
|
+
* @hidden
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
var AppBarSpacer = AppBarSpacerVue2;
|
|
67
|
+
exports.AppBarSpacer = AppBarSpacer;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the props of the [Kendo UI for Vue AppBar component]({% slug overview_appbar %}).
|
|
3
|
+
* Used to display information, actions, branding titles and additional navigation on the current screen.
|
|
4
|
+
*/
|
|
5
|
+
export interface AppBarProps {
|
|
6
|
+
/**
|
|
7
|
+
* Sets the `id` property of the root AppBar element.
|
|
8
|
+
*/
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Specifies the position of the AppBar ([see example]({% slug positioning_appbar %}#toc-position)).
|
|
12
|
+
*
|
|
13
|
+
* * The possible values are:
|
|
14
|
+
* * 'top' (Default)
|
|
15
|
+
* * 'bottom'
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
position?: AppBarPosition | string;
|
|
19
|
+
/**
|
|
20
|
+
* Specifies the positionMode of the AppBar ([see example]({% slug positioning_appbar %}#toc-positionmode)).
|
|
21
|
+
*
|
|
22
|
+
* * The possible values are:
|
|
23
|
+
* * 'static' (Default)
|
|
24
|
+
* * 'sticky'
|
|
25
|
+
* * 'fixed'
|
|
26
|
+
*/
|
|
27
|
+
positionMode?: AppBarPositionMode | string;
|
|
28
|
+
/**
|
|
29
|
+
* Specifies the theme color of the AppBar ([see example]({% slug appearance_appbar %})).
|
|
30
|
+
*
|
|
31
|
+
* * The possible values are:
|
|
32
|
+
* * `inherit`
|
|
33
|
+
* * `light` (Default)
|
|
34
|
+
* * `dark`
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
themeColor?: AppBarThemeColor | string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Specifies the position of the AppBar ([see example]({% slug positioning_appbar %}#toc-position)).
|
|
41
|
+
*
|
|
42
|
+
* * The possible values are:
|
|
43
|
+
* * 'top' (Default)
|
|
44
|
+
* * 'bottom'
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
export declare type AppBarPosition = 'top' | 'bottom';
|
|
48
|
+
/**
|
|
49
|
+
* Specifies the positionMode of the AppBar ([see example]({% slug positioning_appbar %}#toc-positionmode)).
|
|
50
|
+
*
|
|
51
|
+
* * The possible values are:
|
|
52
|
+
* * 'static' (Default)
|
|
53
|
+
* * 'sticky'
|
|
54
|
+
* * 'fixed'
|
|
55
|
+
*/
|
|
56
|
+
export declare type AppBarPositionMode = 'static' | 'sticky' | 'fixed';
|
|
57
|
+
/**
|
|
58
|
+
* Specifies the theme color of the AppBar ([see example]({% slug appearance_appbar %})).
|
|
59
|
+
*
|
|
60
|
+
* * The possible values are:
|
|
61
|
+
* * `inherit`
|
|
62
|
+
* * `light` (Default)
|
|
63
|
+
* * `dark`
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
export declare type AppBarThemeColor = 'light' | 'dark' | 'inherit';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the props of the [Kendo UI for Vue AppBarSpacer component]({% slug contentarrangement_appbar %}#toc-defining-spacings).
|
|
3
|
+
* Used to give additional white space between the AppBar sections and provides a way for customizing its width.
|
|
4
|
+
*/
|
|
5
|
+
export interface AppBarSpacerProps {
|
|
6
|
+
width?: string | number;
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
import { BottomNavigationProps } from './BottomNavigationProps';
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export interface BottomNavigationState {
|
|
11
|
+
navId: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export interface BottomNavigationComputed {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
navClasses: object;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export interface BottomNavigationMethods {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
focus: (e: any) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
export interface BottomNavigationData {
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export interface BottomNavigationAll extends Vue2type, BottomNavigationMethods, BottomNavigationData, BottomNavigationComputed, BottomNavigationState {
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @hidden
|
|
39
|
+
*/
|
|
40
|
+
declare let BottomNavigationVue2: ComponentOptions<BottomNavigationAll, DefaultData<BottomNavigationData>, DefaultMethods<BottomNavigationAll>, BottomNavigationComputed, RecordPropsDefinition<BottomNavigationProps>>;
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
declare const BottomNavigation: DefineComponent<BottomNavigationProps, any, BottomNavigationData, BottomNavigationComputed, BottomNavigationMethods, {}, {}, {}, string, BottomNavigationProps, BottomNavigationProps, {}>;
|
|
45
|
+
export { BottomNavigation, BottomNavigationVue2 };
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BottomNavigationVue2 = exports.BottomNavigation = void 0; // @ts-ignore
|
|
7
|
+
|
|
8
|
+
var Vue = require("vue");
|
|
9
|
+
|
|
10
|
+
var allVue = Vue;
|
|
11
|
+
var gh = allVue.h;
|
|
12
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
13
|
+
|
|
14
|
+
var package_metadata_1 = require("../package-metadata");
|
|
15
|
+
|
|
16
|
+
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
17
|
+
|
|
18
|
+
var utils_1 = require("./models/utils");
|
|
19
|
+
|
|
20
|
+
var BottomNavigationItem_1 = require("./BottomNavigationItem");
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
var BottomNavigationVue2 = {
|
|
27
|
+
name: 'KendoBottomNavigation',
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
emits: {
|
|
30
|
+
'keydown': null,
|
|
31
|
+
'select': null
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
dir: String,
|
|
35
|
+
themeColor: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'primary',
|
|
38
|
+
validator: function validator(value) {
|
|
39
|
+
return ['primary', 'secondary', 'tertiary', 'info', 'success', 'warning', 'error', 'dark', 'light', 'inverse'].includes(value);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
fill: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'flat',
|
|
45
|
+
validator: function validator(value) {
|
|
46
|
+
return ['solid', 'flat'].includes(value);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
items: Array,
|
|
50
|
+
itemFlow: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'vertical',
|
|
53
|
+
validator: function validator(value) {
|
|
54
|
+
return ['vertical', 'horizontal'].includes(value);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
positionMode: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: 'fixed',
|
|
60
|
+
validator: function validator(value) {
|
|
61
|
+
return ['sticky', 'fixed'].includes(value);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
border: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: true
|
|
67
|
+
},
|
|
68
|
+
disabled: Boolean,
|
|
69
|
+
selected: Number
|
|
70
|
+
},
|
|
71
|
+
created: function created() {
|
|
72
|
+
(0, kendo_vue_common_1.validatePackage)(package_metadata_1.packageMetadata);
|
|
73
|
+
this.navId = (0, kendo_vue_common_1.guid)();
|
|
74
|
+
},
|
|
75
|
+
computed: {
|
|
76
|
+
navClasses: function navClasses() {
|
|
77
|
+
var _a;
|
|
78
|
+
|
|
79
|
+
var _b = this.$props,
|
|
80
|
+
themeColor = _b.themeColor,
|
|
81
|
+
fill = _b.fill,
|
|
82
|
+
positionMode = _b.positionMode,
|
|
83
|
+
itemFlow = _b.itemFlow,
|
|
84
|
+
border = _b.border,
|
|
85
|
+
disabled = _b.disabled;
|
|
86
|
+
return _a = {
|
|
87
|
+
'k-bottom-nav': true
|
|
88
|
+
}, _a[utils_1.POSITION_MODE_CLASSES[positionMode]] = true, _a[utils_1.THEME_COLOR_CLASSES[themeColor]] = true, _a[utils_1.FILL_CLASSES[fill]] = true, _a[utils_1.ITEM_FLOW_CLASSES[itemFlow]] = true, _a['k-bottom-nav-border'] = border, _a['k-disabled'] = disabled, _a;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
setup: !isV3 ? undefined : function () {
|
|
93
|
+
var v3 = !!isV3;
|
|
94
|
+
return {
|
|
95
|
+
v3: v3
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
render: function render(createElement) {
|
|
100
|
+
var h = gh || createElement;
|
|
101
|
+
var _a = this.$props,
|
|
102
|
+
id = _a.id,
|
|
103
|
+
items = _a.items,
|
|
104
|
+
item = _a.item,
|
|
105
|
+
disabled = _a.disabled; // const dir = useDir(elementRef, props.dir);
|
|
106
|
+
|
|
107
|
+
return h("nav", {
|
|
108
|
+
"class": this.navClasses,
|
|
109
|
+
id: id || this.navId,
|
|
110
|
+
attrs: this.v3 ? undefined : {
|
|
111
|
+
id: id || this.navId
|
|
112
|
+
}
|
|
113
|
+
}, [items && items.map(function (element, index) {
|
|
114
|
+
var content = kendo_vue_common_1.templateRendering.call(this, element.item || item, kendo_vue_common_1.getListeners.call(this));
|
|
115
|
+
return (// @ts-ignore
|
|
116
|
+
h(BottomNavigationItem_1.BottomNavigationItem, {
|
|
117
|
+
key: index,
|
|
118
|
+
index: index,
|
|
119
|
+
attrs: this.v3 ? undefined : {
|
|
120
|
+
index: index,
|
|
121
|
+
id: "".concat(id || this.navId, "-").concat(index),
|
|
122
|
+
disabled: disabled || element.disabled,
|
|
123
|
+
selected: this.selected === index || element.selected,
|
|
124
|
+
dataItem: element,
|
|
125
|
+
item: content
|
|
126
|
+
},
|
|
127
|
+
style: element.style,
|
|
128
|
+
"class": element.class,
|
|
129
|
+
id: "".concat(id || this.navId, "-").concat(index),
|
|
130
|
+
disabled: disabled || element.disabled,
|
|
131
|
+
selected: this.selected === index || element.selected,
|
|
132
|
+
dataItem: element,
|
|
133
|
+
item: content,
|
|
134
|
+
onSelect: this.handleSelect,
|
|
135
|
+
on: this.v3 ? undefined : {
|
|
136
|
+
"select": this.handleSelect,
|
|
137
|
+
"keydown": this.handleKeyDown
|
|
138
|
+
},
|
|
139
|
+
onKeydown: this.handleKeyDown
|
|
140
|
+
})
|
|
141
|
+
);
|
|
142
|
+
}, this)]);
|
|
143
|
+
},
|
|
144
|
+
methods: {
|
|
145
|
+
focus: function focus() {
|
|
146
|
+
if (this.$el) {
|
|
147
|
+
(0, kendo_vue_common_1.focusFirstFocusableChild)(this.$el);
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
dispatchSelectEvent: function dispatchSelectEvent(dispatchedEvent, index) {
|
|
151
|
+
if (!this.items) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (!this.items[index].disabled) {
|
|
156
|
+
this.$emit('select', {
|
|
157
|
+
event: dispatchedEvent,
|
|
158
|
+
itemTarget: this.items[index],
|
|
159
|
+
itemIndex: index
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
handleSelect: function handleSelect(event, clickedItemIndex) {
|
|
164
|
+
this.dispatchSelectEvent(event, clickedItemIndex);
|
|
165
|
+
},
|
|
166
|
+
handleKeyDown: function handleKeyDown(event, clickedItemIndex) {
|
|
167
|
+
switch (event.keyCode) {
|
|
168
|
+
case kendo_vue_common_1.Keys.enter:
|
|
169
|
+
case kendo_vue_common_1.Keys.space:
|
|
170
|
+
this.dispatchSelectEvent(event, clickedItemIndex);
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
break;
|
|
173
|
+
|
|
174
|
+
default:
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
this.$emit('keydown', {
|
|
179
|
+
event: event,
|
|
180
|
+
itemTarget: this.items[clickedItemIndex],
|
|
181
|
+
itemIndex: clickedItemIndex
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
exports.BottomNavigationVue2 = BottomNavigationVue2;
|
|
187
|
+
/**
|
|
188
|
+
* @hidden
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
var BottomNavigation = BottomNavigationVue2;
|
|
192
|
+
exports.BottomNavigation = BottomNavigation;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
import { BottomNavigationItemProps } from './BottomNavigationItemProps';
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export interface BottomNavigationItemState {
|
|
11
|
+
calculatedId: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export interface BottomNavigationItemComputed {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
itemClasses: object;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export interface BottomNavigationItemMethods {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
export interface BottomNavigationItemData {
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
export interface BottomNavigationItemAll extends Vue2type, BottomNavigationItemMethods, BottomNavigationItemData, BottomNavigationItemComputed, BottomNavigationItemState {
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
declare let BottomNavigationItemVue2: ComponentOptions<BottomNavigationItemAll, DefaultData<BottomNavigationItemData>, DefaultMethods<BottomNavigationItemAll>, BottomNavigationItemComputed, RecordPropsDefinition<BottomNavigationItemProps>>;
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
declare const BottomNavigationItem: DefineComponent<BottomNavigationItemProps, any, BottomNavigationItemData, BottomNavigationItemComputed, BottomNavigationItemMethods, {}, {}, {}, string, BottomNavigationItemProps, BottomNavigationItemProps, {}>;
|
|
44
|
+
export { BottomNavigationItem, BottomNavigationItemVue2 };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BottomNavigationItemVue2 = exports.BottomNavigationItem = void 0; // @ts-ignore
|
|
7
|
+
|
|
8
|
+
var Vue = require("vue");
|
|
9
|
+
|
|
10
|
+
var allVue = Vue;
|
|
11
|
+
var gh = allVue.h;
|
|
12
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
13
|
+
|
|
14
|
+
var package_metadata_1 = require("../package-metadata");
|
|
15
|
+
|
|
16
|
+
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var BottomNavigationItemVue2 = {
|
|
23
|
+
name: 'KendoBottomNavigationItem',
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
emits: {
|
|
26
|
+
'keydown': null,
|
|
27
|
+
'select': null
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
id: String,
|
|
31
|
+
disabled: Boolean,
|
|
32
|
+
selected: Boolean,
|
|
33
|
+
icon: String,
|
|
34
|
+
text: String,
|
|
35
|
+
dataItem: Object,
|
|
36
|
+
index: Number,
|
|
37
|
+
tabIndex: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 0
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
created: function created() {
|
|
43
|
+
(0, kendo_vue_common_1.validatePackage)(package_metadata_1.packageMetadata);
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
itemClasses: function itemClasses() {
|
|
47
|
+
var _a = this.$props,
|
|
48
|
+
selected = _a.selected,
|
|
49
|
+
disabled = _a.disabled;
|
|
50
|
+
return {
|
|
51
|
+
'k-bottom-nav-item': true,
|
|
52
|
+
'k-selected': selected,
|
|
53
|
+
'k-disabled': disabled
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
setup: !isV3 ? undefined : function () {
|
|
59
|
+
var v3 = !!isV3;
|
|
60
|
+
return {
|
|
61
|
+
v3: v3
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
render: function render(createElement) {
|
|
66
|
+
var h = gh || createElement;
|
|
67
|
+
var _a = this.$props,
|
|
68
|
+
selected = _a.selected,
|
|
69
|
+
disabled = _a.disabled,
|
|
70
|
+
item = _a.item,
|
|
71
|
+
dataItem = _a.dataItem,
|
|
72
|
+
id = _a.id,
|
|
73
|
+
index = _a.index,
|
|
74
|
+
tabIndex = _a.tabIndex;
|
|
75
|
+
var icon = dataItem.icon,
|
|
76
|
+
text = dataItem.text;
|
|
77
|
+
var content = kendo_vue_common_1.getTemplate.call(this, {
|
|
78
|
+
h: h,
|
|
79
|
+
template: item,
|
|
80
|
+
defaultRendering: null,
|
|
81
|
+
additionalProps: {
|
|
82
|
+
itemIndex: index,
|
|
83
|
+
item: dataItem
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
var bottomNavItem = h("span", {
|
|
87
|
+
"class": this.itemClasses,
|
|
88
|
+
role: 'link',
|
|
89
|
+
attrs: this.v3 ? undefined : {
|
|
90
|
+
role: 'link',
|
|
91
|
+
id: id,
|
|
92
|
+
tabIndex: tabIndex,
|
|
93
|
+
"aria-selected": selected,
|
|
94
|
+
"aria-disabled": disabled
|
|
95
|
+
},
|
|
96
|
+
id: id,
|
|
97
|
+
tabIndex: tabIndex,
|
|
98
|
+
onClick: this.handleClick,
|
|
99
|
+
on: this.v3 ? undefined : {
|
|
100
|
+
"click": this.handleClick,
|
|
101
|
+
"keydown": this.handleKeyDown
|
|
102
|
+
},
|
|
103
|
+
onKeydown: this.handleKeyDown,
|
|
104
|
+
"aria-selected": selected,
|
|
105
|
+
"aria-disabled": disabled
|
|
106
|
+
}, [this.$props.item ? content : [icon && h("span", {
|
|
107
|
+
"class": "k-bottom-nav-item-icon k-icon k-i-".concat(icon)
|
|
108
|
+
}), text && h("span", {
|
|
109
|
+
"class": 'k-bottom-nav-item-text',
|
|
110
|
+
style: {
|
|
111
|
+
userSelect: 'none'
|
|
112
|
+
}
|
|
113
|
+
}, [text])]]);
|
|
114
|
+
return bottomNavItem;
|
|
115
|
+
},
|
|
116
|
+
methods: {
|
|
117
|
+
handleClick: function handleClick(event) {
|
|
118
|
+
if (this.index !== undefined && !this.disabled) {
|
|
119
|
+
this.$emit('select', event, this.index);
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
handleKeyDown: function handleKeyDown(event) {
|
|
123
|
+
if (this.index !== undefined && !this.disabled) {
|
|
124
|
+
this.$emit('keydown', event, this.index);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.BottomNavigationItemVue2 = BottomNavigationItemVue2;
|
|
130
|
+
/**
|
|
131
|
+
* @hidden
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
var BottomNavigationItem = BottomNavigationItemVue2;
|
|
135
|
+
exports.BottomNavigationItem = BottomNavigationItem;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The interface for describing items that can be passed to the `items` property of the BottomNavigation component.
|
|
3
|
+
*/
|
|
4
|
+
export interface BottomNavigationItemProps {
|
|
5
|
+
/**
|
|
6
|
+
* Style the BottomNavigation item.
|
|
7
|
+
*/
|
|
8
|
+
style?: object;
|
|
9
|
+
/**
|
|
10
|
+
* Class the BottomNavigation item.
|
|
11
|
+
*/
|
|
12
|
+
class?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Disables the BottomNavigation item.
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Specifies if the BottomNavigation item is selected.
|
|
19
|
+
*/
|
|
20
|
+
selected?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Defines the name for an existing icon in a KendoReact theme.
|
|
23
|
+
* The icon is rendered inside the BottomNavigation item by a `span.k-icon` element.
|
|
24
|
+
*/
|
|
25
|
+
icon?: any;
|
|
26
|
+
/**
|
|
27
|
+
* Specifies the text content of the BottomNavigation item.
|
|
28
|
+
*/
|
|
29
|
+
text?: any;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the `tabIndex` property of the BottomNavigation item. Defaults to `0`.
|
|
32
|
+
*/
|
|
33
|
+
tabIndex?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Sets a custom property. Contained in the BottomNavItem props that are returned from the `onSelect` BottomNavigation event.
|
|
36
|
+
*/
|
|
37
|
+
[customProp: string]: any;
|
|
38
|
+
/**
|
|
39
|
+
* @hidden
|
|
40
|
+
*/
|
|
41
|
+
index?: number;
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
*/
|
|
45
|
+
item?: any;
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
49
|
+
dataItem?: any;
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
id?: string;
|
|
54
|
+
}
|