framework7-vue 7.0.8 → 8.0.0-beta.1
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/accordion-content.js +2 -5
- package/components/accordion-item.js +0 -13
- package/components/accordion-toggle.js +2 -5
- package/components/accordion.js +0 -4
- package/components/actions-button.d.ts +1 -1
- package/components/actions-button.js +2 -9
- package/components/actions-group.js +2 -5
- package/components/actions-label.d.ts +1 -1
- package/components/actions-label.js +2 -8
- package/components/actions.js +2 -14
- package/components/app.d.ts +7 -12
- package/components/app.js +11 -24
- package/components/appbar.js +2 -5
- package/components/area-chart.js +4 -41
- package/components/badge.js +0 -4
- package/components/block-footer.js +2 -5
- package/components/block-header.js +2 -5
- package/components/block-title.js +0 -4
- package/components/block.d.ts +61 -9
- package/components/block.js +52 -17
- package/components/breadcrumbs-collapsed.js +0 -5
- package/components/breadcrumbs-item.js +0 -4
- package/components/breadcrumbs-separator.js +0 -4
- package/components/breadcrumbs.js +0 -4
- package/components/button.d.ts +9 -25
- package/components/button.js +9 -25
- package/components/card-content.js +0 -4
- package/components/card-footer.js +2 -5
- package/components/card-header.js +2 -5
- package/components/card.d.ts +17 -5
- package/components/card.js +10 -20
- package/components/checkbox.js +0 -7
- package/components/chip.d.ts +0 -4
- package/components/chip.js +0 -7
- package/components/col.js +3 -9
- package/components/fab-backdrop.js +2 -5
- package/components/fab-button.js +0 -6
- package/components/fab-buttons.js +0 -4
- package/components/fab.js +0 -9
- package/components/gauge.js +0 -4
- package/components/icon.d.ts +0 -4
- package/components/icon.js +1 -18
- package/components/input.js +0 -56
- package/components/link.d.ts +0 -4
- package/components/link.js +4 -13
- package/components/list-button.js +0 -6
- package/components/list-group.js +0 -4
- package/components/list-index.d.ts +0 -5
- package/components/list-index.js +0 -14
- package/components/list-input.d.ts +0 -4
- package/components/list-input.js +0 -53
- package/components/list-item-cell.js +3 -5
- package/components/list-item-row.js +3 -5
- package/components/list-item.d.ts +0 -4
- package/components/list-item.js +9 -52
- package/components/list.d.ts +71 -23
- package/components/list.js +42 -33
- package/components/login-screen-title.js +2 -5
- package/components/login-screen.js +2 -17
- package/components/menu-dropdown-item.js +1 -6
- package/components/menu-dropdown.js +1 -4
- package/components/menu-item.js +4 -18
- package/components/menu.js +3 -5
- package/components/message.js +0 -16
- package/components/messagebar-attachment.js +0 -7
- package/components/messagebar-attachments.js +2 -5
- package/components/messagebar-sheet-image.js +7 -15
- package/components/messagebar-sheet-item.js +2 -5
- package/components/messagebar-sheet.js +2 -5
- package/components/messagebar.js +0 -16
- package/components/messages-title.js +2 -5
- package/components/messages.js +0 -13
- package/components/nav-left.js +0 -9
- package/components/nav-right.js +0 -4
- package/components/nav-title-large.js +2 -5
- package/components/nav-title.js +0 -4
- package/components/navbar.d.ts +5 -8
- package/components/navbar.js +6 -29
- package/components/page-content.js +0 -16
- package/components/page.d.ts +0 -4
- package/components/page.js +2 -67
- package/components/panel.d.ts +4 -0
- package/components/panel.js +2 -23
- package/components/photo-browser.js +2 -18
- package/components/pie-chart.js +4 -20
- package/components/popover.d.ts +5 -0
- package/components/popover.js +8 -16
- package/components/popup.js +3 -19
- package/components/preloader.js +4 -23
- package/components/progressbar.js +0 -6
- package/components/radio.js +0 -7
- package/components/range.js +0 -7
- package/components/routable-modals.js +0 -7
- package/components/row.js +3 -9
- package/components/searchbar.d.ts +5 -8
- package/components/searchbar.js +7 -28
- package/components/segmented.d.ts +0 -12
- package/components/segmented.js +2 -12
- package/components/sheet.js +2 -18
- package/components/stepper.d.ts +0 -20
- package/components/stepper.js +1 -27
- package/components/subnavbar.js +0 -4
- package/components/swipeout-actions.js +0 -6
- package/components/swipeout-button.js +0 -6
- package/components/tab.js +2 -15
- package/components/tabs.js +0 -4
- package/components/text-editor.js +0 -17
- package/components/toggle.js +0 -9
- package/components/toolbar.d.ts +4 -21
- package/components/toolbar.js +12 -34
- package/components/treeview-item.d.ts +0 -4
- package/components/treeview-item.js +0 -13
- package/components/treeview.js +2 -5
- package/components/use-icon.js +0 -4
- package/components/view.d.ts +0 -28
- package/components/view.js +4 -50
- package/components/views.js +0 -4
- package/framework7-vue-bundle.js +3 -21
- package/framework7-vue-web-types.json +1 -94
- package/framework7-vue.d.ts +3 -15
- package/framework7-vue.js +3 -12
- package/package.json +8 -1
- package/shared/components-router.js +0 -32
- package/shared/f7.js +5 -19
- package/shared/get-router-initial-component.js +0 -4
- package/shared/mixins.js +3 -15
- package/shared/plugin.js +2 -8
- package/shared/router-open-in.js +4 -13
- package/shared/use-icon.js +1 -6
- package/shared/use-smart-select.js +0 -1
- package/shared/use-store.js +2 -6
- package/shared/use-tab.js +0 -2
- package/shared/use-theme.js +0 -2
- package/shared/use-tooltip.js +0 -2
- package/shared/utils.js +0 -14
- package/components/appbar.d.ts +0 -67
- package/components/col.d.ts +0 -94
- package/components/list-item-cell.d.ts +0 -46
- package/components/list-item-row.d.ts +0 -46
- package/components/menu-dropdown-item.d.ts +0 -223
- package/components/menu-dropdown.d.ts +0 -66
- package/components/menu-item.d.ts +0 -267
- package/components/menu.d.ts +0 -46
- package/components/row.d.ts +0 -73
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
class: _normalizeClass(_ctx.classes)
|
|
6
5
|
}, [_renderSlot(_ctx.$slots, "default")], 2);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
import { computed } from 'vue';
|
|
10
8
|
import { classNames } from '../shared/utils.js';
|
|
11
9
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -19,12 +17,10 @@ export default {
|
|
|
19
17
|
},
|
|
20
18
|
...colorProps
|
|
21
19
|
},
|
|
22
|
-
|
|
23
20
|
setup(props) {
|
|
24
21
|
const classes = computed(() => classNames('fab-buttons', `fab-buttons-${props.position}`, colorClasses(props)));
|
|
25
22
|
return {
|
|
26
23
|
classes
|
|
27
24
|
};
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
};
|
package/components/fab.js
CHANGED
|
@@ -18,24 +18,20 @@ export default {
|
|
|
18
18
|
...colorProps
|
|
19
19
|
},
|
|
20
20
|
emits: ['click'],
|
|
21
|
-
|
|
22
21
|
setup(props, _ref) {
|
|
23
22
|
let {
|
|
24
23
|
emit,
|
|
25
24
|
slots
|
|
26
25
|
} = _ref;
|
|
27
26
|
const elRef = ref(null);
|
|
28
|
-
|
|
29
27
|
const onClick = e => {
|
|
30
28
|
emit('click', e);
|
|
31
29
|
};
|
|
32
|
-
|
|
33
30
|
useTooltip(elRef, props);
|
|
34
31
|
const hrefComputed = computed(() => {
|
|
35
32
|
let href = props.href;
|
|
36
33
|
if (href === true) href = '#';
|
|
37
34
|
if (href === false) href = undefined; // no href attribute
|
|
38
|
-
|
|
39
35
|
return href;
|
|
40
36
|
});
|
|
41
37
|
return () => {
|
|
@@ -49,7 +45,6 @@ export default {
|
|
|
49
45
|
root: rootSlots,
|
|
50
46
|
text: textSlots
|
|
51
47
|
} = slots;
|
|
52
|
-
|
|
53
48
|
if (defaultSlots) {
|
|
54
49
|
defaultSlots().forEach(vnode => {
|
|
55
50
|
if (typeof vnode === 'undefined') return;
|
|
@@ -57,13 +52,11 @@ export default {
|
|
|
57
52
|
if (tag === 'FabButtons' || tag === 'f7-fab-buttons') rootChildren.push(vnode);else linkChildren.push(vnode);
|
|
58
53
|
});
|
|
59
54
|
}
|
|
60
|
-
|
|
61
55
|
if (props.text || textSlots) {
|
|
62
56
|
textEl = h('div', {
|
|
63
57
|
class: 'fab-text'
|
|
64
58
|
}, [props.text, textSlots && textSlots()]);
|
|
65
59
|
}
|
|
66
|
-
|
|
67
60
|
if (linkChildren.length || linkSlots || textEl) {
|
|
68
61
|
linkEl = h('a', {
|
|
69
62
|
target: props.target,
|
|
@@ -71,7 +64,6 @@ export default {
|
|
|
71
64
|
onClick
|
|
72
65
|
}, [linkChildren, textEl, linkSlots && linkSlots()]);
|
|
73
66
|
}
|
|
74
|
-
|
|
75
67
|
const classes = classNames('fab', `fab-${props.position}`, {
|
|
76
68
|
'fab-morph': props.morphTo,
|
|
77
69
|
'fab-extended': typeof textEl !== 'undefined'
|
|
@@ -83,5 +75,4 @@ export default {
|
|
|
83
75
|
}, [linkEl, rootChildren, rootSlots && rootSlots()]);
|
|
84
76
|
};
|
|
85
77
|
}
|
|
86
|
-
|
|
87
78
|
};
|
package/components/gauge.js
CHANGED
|
@@ -9,7 +9,6 @@ const _hoisted_5 = ["stroke", "stroke-width", "fill", "cx", "cy", "r"];
|
|
|
9
9
|
const _hoisted_6 = ["transform", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "fill", "cx", "cy", "r"];
|
|
10
10
|
const _hoisted_7 = ["y", "font-weight", "font-size", "fill", "dy", "dominant-baseline"];
|
|
11
11
|
const _hoisted_8 = ["y", "font-weight", "font-size", "fill", "dy", "dominant-baseline"];
|
|
12
|
-
|
|
13
12
|
function render(_ctx, _cache) {
|
|
14
13
|
return _openBlock(), _createElementBlock("div", _hoisted_1, [(_openBlock(), _createElementBlock("svg", {
|
|
15
14
|
class: "gauge-svg",
|
|
@@ -77,7 +76,6 @@ function render(_ctx, _cache) {
|
|
|
77
76
|
"dominant-baseline": !_ctx.semiCircle ? 'middle' : null
|
|
78
77
|
}, _toDisplayString(_ctx.labelText), 9, _hoisted_8)) : _createCommentVNode("", true)], 8, _hoisted_2))]);
|
|
79
78
|
}
|
|
80
|
-
|
|
81
79
|
import { computed } from 'vue';
|
|
82
80
|
export default {
|
|
83
81
|
name: 'f7-gauge',
|
|
@@ -138,7 +136,6 @@ export default {
|
|
|
138
136
|
default: 400
|
|
139
137
|
}
|
|
140
138
|
},
|
|
141
|
-
|
|
142
139
|
setup(props) {
|
|
143
140
|
const semiCircle = computed(() => props.type === 'semicircle');
|
|
144
141
|
const radius = computed(() => props.size / 2 - props.borderWidth / 2);
|
|
@@ -151,5 +148,4 @@ export default {
|
|
|
151
148
|
progress
|
|
152
149
|
};
|
|
153
150
|
}
|
|
154
|
-
|
|
155
151
|
};
|
package/components/icon.d.ts
CHANGED
package/components/icon.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { toDisplayString as _toDisplayString, renderSlot as _renderSlot, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("i", {
|
|
5
4
|
ref: "elRef",
|
|
@@ -11,7 +10,6 @@ function render(_ctx, _cache) {
|
|
|
11
10
|
class: _normalizeClass(_ctx.classesComputed)
|
|
12
11
|
}, [_createTextVNode(_toDisplayString(_ctx.iconText) + " ", 1), _renderSlot(_ctx.$slots, "default")], 6);
|
|
13
12
|
}
|
|
14
|
-
|
|
15
13
|
import { ref, computed } from 'vue';
|
|
16
14
|
import { classNames } from '../shared/utils.js';
|
|
17
15
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -25,14 +23,12 @@ export default {
|
|
|
25
23
|
f7: String,
|
|
26
24
|
icon: String,
|
|
27
25
|
ios: String,
|
|
28
|
-
aurora: String,
|
|
29
26
|
md: String,
|
|
30
27
|
tooltip: String,
|
|
31
28
|
tooltipTrigger: String,
|
|
32
29
|
size: [String, Number],
|
|
33
30
|
...colorProps
|
|
34
31
|
},
|
|
35
|
-
|
|
36
32
|
setup(props) {
|
|
37
33
|
const elRef = ref(null);
|
|
38
34
|
const theme = useTheme();
|
|
@@ -41,7 +37,6 @@ export default {
|
|
|
41
37
|
const {
|
|
42
38
|
ios,
|
|
43
39
|
md,
|
|
44
|
-
aurora,
|
|
45
40
|
f7,
|
|
46
41
|
material,
|
|
47
42
|
icon
|
|
@@ -50,18 +45,15 @@ export default {
|
|
|
50
45
|
icon: true
|
|
51
46
|
};
|
|
52
47
|
let themeIcon;
|
|
53
|
-
if (theme.value && theme.value.ios) themeIcon = ios;else if (theme.value && theme.value.md) themeIcon = md;
|
|
54
|
-
|
|
48
|
+
if (theme.value && theme.value.ios) themeIcon = ios;else if (theme.value && theme.value.md) themeIcon = md;
|
|
55
49
|
if (themeIcon) {
|
|
56
50
|
const parts = themeIcon.split(':');
|
|
57
51
|
const prop = parts[0];
|
|
58
52
|
const value = parts[1];
|
|
59
|
-
|
|
60
53
|
if (prop === 'material' || prop === 'f7') {
|
|
61
54
|
classes['material-icons'] = prop === 'material';
|
|
62
55
|
classes['f7-icons'] = prop === 'f7';
|
|
63
56
|
}
|
|
64
|
-
|
|
65
57
|
if (prop === 'icon') {
|
|
66
58
|
classes[value] = true;
|
|
67
59
|
}
|
|
@@ -73,36 +65,28 @@ export default {
|
|
|
73
65
|
};
|
|
74
66
|
if (icon) classes[icon] = true;
|
|
75
67
|
}
|
|
76
|
-
|
|
77
68
|
return classNames(classes, colorClasses(props));
|
|
78
69
|
});
|
|
79
70
|
const sizeComputed = computed(() => {
|
|
80
71
|
let size = props.size;
|
|
81
|
-
|
|
82
72
|
if (typeof props.size === 'number' || parseFloat(props.size) === props.size * 1) {
|
|
83
73
|
size = `${props.size}px`;
|
|
84
74
|
}
|
|
85
|
-
|
|
86
75
|
return size;
|
|
87
76
|
});
|
|
88
77
|
const iconText = computed(() => {
|
|
89
78
|
const {
|
|
90
79
|
ios,
|
|
91
80
|
md,
|
|
92
|
-
aurora,
|
|
93
81
|
f7,
|
|
94
82
|
material
|
|
95
83
|
} = props;
|
|
96
84
|
let text = material || f7;
|
|
97
|
-
|
|
98
85
|
if (md && theme.value && theme.value.md && (md.indexOf('material:') >= 0 || md.indexOf('f7:') >= 0)) {
|
|
99
86
|
text = md.split(':')[1];
|
|
100
87
|
} else if (ios && theme.value && theme.value.ios && (ios.indexOf('material:') >= 0 || ios.indexOf('f7:') >= 0)) {
|
|
101
88
|
text = ios.split(':')[1];
|
|
102
|
-
} else if (aurora && theme.value && theme.value.aurora && (aurora.indexOf('material:') >= 0 || aurora.indexOf('f7:') >= 0)) {
|
|
103
|
-
text = aurora.split(':')[1];
|
|
104
89
|
}
|
|
105
|
-
|
|
106
90
|
return text;
|
|
107
91
|
});
|
|
108
92
|
return {
|
|
@@ -112,5 +96,4 @@ export default {
|
|
|
112
96
|
iconText
|
|
113
97
|
};
|
|
114
98
|
}
|
|
115
|
-
|
|
116
99
|
};
|
package/components/input.js
CHANGED
|
@@ -71,7 +71,6 @@ export default {
|
|
|
71
71
|
...colorProps
|
|
72
72
|
},
|
|
73
73
|
emits: ['input', 'focus', 'blur', 'change', 'textarea:resize', 'input:notempty', 'input:empty', 'input:clear', 'texteditor:change', 'calendar:change', 'colorpicker:change', 'update:value'],
|
|
74
|
-
|
|
75
74
|
setup(props, _ref) {
|
|
76
75
|
let {
|
|
77
76
|
emit,
|
|
@@ -84,113 +83,87 @@ export default {
|
|
|
84
83
|
const elRef = ref(null);
|
|
85
84
|
const inputElRef = ref(null);
|
|
86
85
|
let updateInputOnDidUpdate = false;
|
|
87
|
-
|
|
88
86
|
const getDomValue = () => {
|
|
89
87
|
if (!inputElRef.value) return undefined;
|
|
90
88
|
return inputElRef.value.value;
|
|
91
89
|
};
|
|
92
|
-
|
|
93
90
|
const domValue = ref(getDomValue());
|
|
94
91
|
const inputHasValue = computed(() => {
|
|
95
92
|
if (props.type === 'datepicker' && Array.isArray(props.value) && props.value.length === 0) {
|
|
96
93
|
return false;
|
|
97
94
|
}
|
|
98
|
-
|
|
99
95
|
return typeof props.value === 'undefined' ? domValue.value || domValue.value === 0 : props.value || props.value === 0;
|
|
100
96
|
});
|
|
101
|
-
|
|
102
97
|
const validateInput = () => {
|
|
103
98
|
if (!f7 || !inputElRef.value) return;
|
|
104
99
|
const validity = inputElRef.value.validity;
|
|
105
100
|
if (!validity) return;
|
|
106
|
-
|
|
107
101
|
if (!validity.valid) {
|
|
108
102
|
if (props.onValidate) props.onValidate(false);
|
|
109
|
-
|
|
110
103
|
if (inputInvalid.value !== true) {
|
|
111
104
|
inputInvalid.value = true;
|
|
112
105
|
}
|
|
113
106
|
} else {
|
|
114
107
|
if (props.onValidate) props.onValidate(true);
|
|
115
|
-
|
|
116
108
|
if (inputInvalid.value !== false) {
|
|
117
109
|
inputInvalid.value = false;
|
|
118
110
|
}
|
|
119
111
|
}
|
|
120
112
|
};
|
|
121
|
-
|
|
122
113
|
const onTextareaResize = event => {
|
|
123
114
|
emit('textarea:resize', event);
|
|
124
115
|
};
|
|
125
|
-
|
|
126
116
|
const onInputNotEmpty = event => {
|
|
127
117
|
emit('input:notempty', event);
|
|
128
118
|
};
|
|
129
|
-
|
|
130
119
|
const onInputEmpty = event => {
|
|
131
120
|
emit('input:empty', event);
|
|
132
121
|
};
|
|
133
|
-
|
|
134
122
|
const onInputClear = event => {
|
|
135
123
|
emit('input:clear', event);
|
|
136
124
|
};
|
|
137
|
-
|
|
138
125
|
const onInput = function () {
|
|
139
126
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
140
127
|
args[_key] = arguments[_key];
|
|
141
128
|
}
|
|
142
|
-
|
|
143
129
|
emit('input', ...args);
|
|
144
|
-
|
|
145
130
|
if (inputElRef.value) {
|
|
146
131
|
domValue.value = inputElRef.value.value;
|
|
147
132
|
}
|
|
148
|
-
|
|
149
133
|
if (!(props.validateOnBlur || props.validateOnBlur === '') && (props.validate || props.validate === '') && inputElRef.value) {
|
|
150
134
|
validateInput();
|
|
151
135
|
}
|
|
152
|
-
|
|
153
136
|
if (inputElRef.value && props.type !== 'texteditor' && props.type !== 'colorpicker' && props.type !== 'datepicker') {
|
|
154
137
|
emit('update:value', inputElRef.value.value);
|
|
155
138
|
}
|
|
156
139
|
};
|
|
157
|
-
|
|
158
140
|
const onFocus = function () {
|
|
159
141
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
160
142
|
args[_key2] = arguments[_key2];
|
|
161
143
|
}
|
|
162
|
-
|
|
163
144
|
emit('focus', ...args);
|
|
164
145
|
inputFocused.value = true;
|
|
165
146
|
};
|
|
166
|
-
|
|
167
147
|
const onBlur = function () {
|
|
168
148
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
169
149
|
args[_key3] = arguments[_key3];
|
|
170
150
|
}
|
|
171
|
-
|
|
172
151
|
emit('blur', ...args);
|
|
173
|
-
|
|
174
152
|
if ((props.validate || props.validate === '' || props.validateOnBlur || props.validateOnBlur === '') && inputElRef.value) {
|
|
175
153
|
validateInput();
|
|
176
154
|
}
|
|
177
|
-
|
|
178
155
|
inputFocused.value = false;
|
|
179
156
|
};
|
|
180
|
-
|
|
181
157
|
const onChange = function () {
|
|
182
158
|
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
183
159
|
args[_key4] = arguments[_key4];
|
|
184
160
|
}
|
|
185
|
-
|
|
186
161
|
emit('change', ...args);
|
|
187
|
-
|
|
188
162
|
if (props.type === 'texteditor') {
|
|
189
163
|
emit('texteditor:change', args[1]);
|
|
190
164
|
emit('update:value', args[1]);
|
|
191
165
|
}
|
|
192
166
|
};
|
|
193
|
-
|
|
194
167
|
onMounted(() => {
|
|
195
168
|
const {
|
|
196
169
|
type,
|
|
@@ -206,16 +179,13 @@ export default {
|
|
|
206
179
|
if (type === 'range' || type === 'toggle') return;
|
|
207
180
|
if (!inputElRef.value) return;
|
|
208
181
|
inputElRef.value.addEventListener('input:notempty', onInputNotEmpty, false);
|
|
209
|
-
|
|
210
182
|
if (type === 'textarea' && resizable) {
|
|
211
183
|
inputElRef.value.addEventListener('textarea:resize', onTextareaResize, false);
|
|
212
184
|
}
|
|
213
|
-
|
|
214
185
|
if (clearButton) {
|
|
215
186
|
inputElRef.value.addEventListener('input:empty', onInputEmpty, false);
|
|
216
187
|
inputElRef.value.addEventListener('input:clear', onInputClear, false);
|
|
217
188
|
}
|
|
218
|
-
|
|
219
189
|
if (type === 'datepicker') {
|
|
220
190
|
f7Calendar = f7.calendar.create({
|
|
221
191
|
inputEl: inputElRef.value,
|
|
@@ -225,12 +195,10 @@ export default {
|
|
|
225
195
|
emit('calendar:change', calendarValue);
|
|
226
196
|
emit('update:value', calendarValue);
|
|
227
197
|
}
|
|
228
|
-
|
|
229
198
|
},
|
|
230
199
|
...(calendarParams || {})
|
|
231
200
|
});
|
|
232
201
|
}
|
|
233
|
-
|
|
234
202
|
if (type === 'colorpicker') {
|
|
235
203
|
f7ColorPicker = f7.colorPicker.create({
|
|
236
204
|
inputEl: inputElRef.value,
|
|
@@ -240,20 +208,16 @@ export default {
|
|
|
240
208
|
emit('colorpicker:change', colorPickerValue);
|
|
241
209
|
emit('update:value', colorPickerValue);
|
|
242
210
|
}
|
|
243
|
-
|
|
244
211
|
},
|
|
245
212
|
...(colorPickerParams || {})
|
|
246
213
|
});
|
|
247
214
|
}
|
|
248
|
-
|
|
249
215
|
f7.input.checkEmptyState(inputElRef.value);
|
|
250
|
-
|
|
251
216
|
if (!(validateOnBlur || validateOnBlur === '') && (validate || validate === '') && typeof value !== 'undefined' && value !== null && value !== '') {
|
|
252
217
|
setTimeout(() => {
|
|
253
218
|
validateInput();
|
|
254
219
|
}, 0);
|
|
255
220
|
}
|
|
256
|
-
|
|
257
221
|
if (resizable) {
|
|
258
222
|
f7.input.resizeTextarea(inputElRef.value);
|
|
259
223
|
}
|
|
@@ -263,21 +227,17 @@ export default {
|
|
|
263
227
|
if (props.type === 'range' || props.type === 'toggle') return;
|
|
264
228
|
if (!inputElRef.value) return;
|
|
265
229
|
inputElRef.value.removeEventListener('input:notempty', onInputNotEmpty, false);
|
|
266
|
-
|
|
267
230
|
if (props.type === 'textarea' && props.resizable) {
|
|
268
231
|
inputElRef.value.removeEventListener('textarea:resize', onTextareaResize, false);
|
|
269
232
|
}
|
|
270
|
-
|
|
271
233
|
if (props.clearButton) {
|
|
272
234
|
inputElRef.value.removeEventListener('input:empty', onInputEmpty, false);
|
|
273
235
|
inputElRef.value.removeEventListener('input:clear', onInputClear, false);
|
|
274
236
|
}
|
|
275
|
-
|
|
276
237
|
if (f7Calendar && f7Calendar.destroy) {
|
|
277
238
|
f7Calendar.destroy();
|
|
278
239
|
f7Calendar = null;
|
|
279
240
|
}
|
|
280
|
-
|
|
281
241
|
if (f7ColorPicker && f7ColorPicker.destroy) {
|
|
282
242
|
f7ColorPicker.destroy();
|
|
283
243
|
f7ColorPicker = null;
|
|
@@ -285,16 +245,13 @@ export default {
|
|
|
285
245
|
});
|
|
286
246
|
onUpdated(() => {
|
|
287
247
|
if (!f7) return;
|
|
288
|
-
|
|
289
248
|
if (updateInputOnDidUpdate) {
|
|
290
249
|
if (!inputElRef.value) return;
|
|
291
250
|
updateInputOnDidUpdate = false;
|
|
292
251
|
f7.input.checkEmptyState(inputElRef.value);
|
|
293
|
-
|
|
294
252
|
if (props.validate && !props.validateOnBlur) {
|
|
295
253
|
validateInput();
|
|
296
254
|
}
|
|
297
|
-
|
|
298
255
|
if (props.resizable) {
|
|
299
256
|
f7.input.resizeTextarea(inputElRef.value);
|
|
300
257
|
}
|
|
@@ -311,25 +268,20 @@ export default {
|
|
|
311
268
|
watch(() => props.value, newValue => {
|
|
312
269
|
if (props.type === 'range' || props.type === 'toggle' || !f7) return;
|
|
313
270
|
updateInputOnDidUpdate = true;
|
|
314
|
-
|
|
315
271
|
if (f7Calendar) {
|
|
316
272
|
f7Calendar.setValue(newValue);
|
|
317
273
|
}
|
|
318
|
-
|
|
319
274
|
if (f7ColorPicker) {
|
|
320
275
|
f7ColorPicker.setValue(newValue);
|
|
321
276
|
}
|
|
322
277
|
});
|
|
323
|
-
|
|
324
278
|
const createInput = (InputTag, children) => {
|
|
325
279
|
const needsValue = props.type !== 'file' && props.type !== 'datepicker' && props.type !== 'colorpicker';
|
|
326
280
|
const needsType = InputTag === 'input';
|
|
327
281
|
let inputType = props.type;
|
|
328
|
-
|
|
329
282
|
if (inputType === 'datepicker' || inputType === 'colorpicker') {
|
|
330
283
|
inputType = 'text';
|
|
331
284
|
}
|
|
332
|
-
|
|
333
285
|
const inputClassName = classNames({
|
|
334
286
|
resizable: inputType === 'textarea' && props.resizable,
|
|
335
287
|
'no-store-data': props.noFormStoreData || props.noStoreData || props.ignoreStoreData,
|
|
@@ -338,17 +290,13 @@ export default {
|
|
|
338
290
|
'input-focused': inputFocused.value
|
|
339
291
|
});
|
|
340
292
|
let inputValue;
|
|
341
|
-
|
|
342
293
|
if (needsValue) {
|
|
343
294
|
if (typeof props.value !== 'undefined') inputValue = props.value;else inputValue = domValue.value;
|
|
344
295
|
}
|
|
345
|
-
|
|
346
296
|
const valueProps = {};
|
|
347
|
-
|
|
348
297
|
if (props.type !== 'datepicker' && props.type !== 'colorpicker') {
|
|
349
298
|
if ('value' in props) valueProps.value = inputValue;
|
|
350
299
|
}
|
|
351
|
-
|
|
352
300
|
const inputProps = noUndefinedProps({
|
|
353
301
|
name: props.name,
|
|
354
302
|
type: needsType ? inputType : undefined,
|
|
@@ -392,7 +340,6 @@ export default {
|
|
|
392
340
|
...valueProps
|
|
393
341
|
}, [children]);
|
|
394
342
|
};
|
|
395
|
-
|
|
396
343
|
const wrapClasses = computed(() => classNames('input', {
|
|
397
344
|
'input-outline': props.outline,
|
|
398
345
|
'input-dropdown': props.dropdown === 'auto' ? props.type === 'select' : props.dropdown,
|
|
@@ -400,7 +347,6 @@ export default {
|
|
|
400
347
|
}, colorClasses(props)));
|
|
401
348
|
return () => {
|
|
402
349
|
let inputEl;
|
|
403
|
-
|
|
404
350
|
if (props.type === 'select' || props.type === 'textarea' || props.type === 'file') {
|
|
405
351
|
if (props.type === 'select') {
|
|
406
352
|
inputEl = createInput('select', slots.default && slots.default());
|
|
@@ -447,7 +393,6 @@ export default {
|
|
|
447
393
|
} else {
|
|
448
394
|
inputEl = createInput('input');
|
|
449
395
|
}
|
|
450
|
-
|
|
451
396
|
if (!props.wrap) return inputEl;
|
|
452
397
|
return h('div', {
|
|
453
398
|
class: wrapClasses.value,
|
|
@@ -461,5 +406,4 @@ export default {
|
|
|
461
406
|
}, [props.info, slots.info && slots.info()])]);
|
|
462
407
|
};
|
|
463
408
|
}
|
|
464
|
-
|
|
465
409
|
};
|
package/components/link.d.ts
CHANGED
package/components/link.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, renderSlot as _renderSlot, mergeProps as _mergeProps } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
const _component_f7_use_icon = _resolveComponent("f7-use-icon");
|
|
5
|
-
|
|
6
4
|
const _component_f7_badge = _resolveComponent("f7-badge");
|
|
7
|
-
|
|
8
5
|
return _openBlock(), _createElementBlock("a", _mergeProps({
|
|
9
6
|
ref: "elRef",
|
|
10
7
|
class: _ctx.classes
|
|
@@ -13,7 +10,7 @@ function render(_ctx, _cache) {
|
|
|
13
10
|
icon: _ctx.icon
|
|
14
11
|
}, null, 8, ["icon"])) : _createCommentVNode("", true), _ctx.text ? (_openBlock(), _createElementBlock("span", {
|
|
15
12
|
key: 1,
|
|
16
|
-
class: _normalizeClass(_ctx.
|
|
13
|
+
class: _normalizeClass(_ctx.isTabbarIcons ? 'tabbar-label' : '')
|
|
17
14
|
}, [_createTextVNode(_toDisplayString(_ctx.text) + " ", 1), _ctx.badge ? (_openBlock(), _createBlock(_component_f7_badge, {
|
|
18
15
|
key: 0,
|
|
19
16
|
color: _ctx.badgeColor
|
|
@@ -22,7 +19,6 @@ function render(_ctx, _cache) {
|
|
|
22
19
|
_: 1
|
|
23
20
|
}, 8, ["color"])) : _createCommentVNode("", true)], 2)) : _createCommentVNode("", true), _renderSlot(_ctx.$slots, "default")], 16);
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
import { computed, ref, inject } from 'vue';
|
|
27
23
|
import { classNames, isStringProp } from '../shared/utils.js';
|
|
28
24
|
import { colorClasses, routerAttrs, routerClasses, actionsAttrs, actionsClasses, colorProps, actionsProps, routerProps, iconProps } from '../shared/mixins.js';
|
|
@@ -62,7 +58,6 @@ export default {
|
|
|
62
58
|
...actionsProps,
|
|
63
59
|
...routerProps
|
|
64
60
|
},
|
|
65
|
-
|
|
66
61
|
setup(props, _ref) {
|
|
67
62
|
let {
|
|
68
63
|
slots
|
|
@@ -79,7 +74,7 @@ export default {
|
|
|
79
74
|
const TabbarContext = inject('TabbarContext', {
|
|
80
75
|
value: {}
|
|
81
76
|
});
|
|
82
|
-
const
|
|
77
|
+
const isTabbarIcons = computed(() => props.tabbarLabel || TabbarContext.value.tabbarHasIcons);
|
|
83
78
|
const attrs = computed(() => {
|
|
84
79
|
const {
|
|
85
80
|
href,
|
|
@@ -89,7 +84,6 @@ export default {
|
|
|
89
84
|
let hrefComputed = href;
|
|
90
85
|
if (href === true) hrefComputed = '#';
|
|
91
86
|
if (href === false) hrefComputed = undefined; // no href attribute
|
|
92
|
-
|
|
93
87
|
return {
|
|
94
88
|
href: hrefComputed,
|
|
95
89
|
target,
|
|
@@ -109,15 +103,13 @@ export default {
|
|
|
109
103
|
} = props;
|
|
110
104
|
let iconOnlyComputed;
|
|
111
105
|
const hasChildren = slots && slots.default;
|
|
112
|
-
|
|
113
106
|
if (iconOnly || !text && !hasChildren) {
|
|
114
107
|
iconOnlyComputed = true;
|
|
115
108
|
} else {
|
|
116
109
|
iconOnlyComputed = false;
|
|
117
110
|
}
|
|
118
|
-
|
|
119
111
|
return classNames({
|
|
120
|
-
link: !(noLinkClass ||
|
|
112
|
+
link: !(noLinkClass || isTabbarIcons.value),
|
|
121
113
|
'icon-only': iconOnlyComputed,
|
|
122
114
|
'tab-link': tabLink || tabLink === '',
|
|
123
115
|
'tab-link-active': tabLinkActive,
|
|
@@ -128,11 +120,10 @@ export default {
|
|
|
128
120
|
return {
|
|
129
121
|
elRef,
|
|
130
122
|
icon,
|
|
131
|
-
|
|
123
|
+
isTabbarIcons,
|
|
132
124
|
attrs,
|
|
133
125
|
classes,
|
|
134
126
|
f7SmartSelect
|
|
135
127
|
};
|
|
136
128
|
}
|
|
137
|
-
|
|
138
129
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { toDisplayString as _toDisplayString, renderSlot as _renderSlot, createTextVNode as _createTextVNode, mergeProps as _mergeProps, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("li", null, [_createElementVNode("a", _mergeProps({
|
|
5
4
|
ref: "linkElRef",
|
|
@@ -10,7 +9,6 @@ function render(_ctx, _cache) {
|
|
|
10
9
|
})
|
|
11
10
|
}), [_createTextVNode(_toDisplayString(_ctx.title) + " " + _toDisplayString(_ctx.text) + " ", 1), _renderSlot(_ctx.$slots, "default")], 16)]);
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
import { computed, ref } from 'vue';
|
|
15
13
|
import { classNames, isStringProp } from '../shared/utils.js';
|
|
16
14
|
import { colorClasses, colorProps, actionsAttrs, actionsClasses, actionsProps, routerAttrs, routerClasses, routerProps } from '../shared/mixins.js';
|
|
@@ -34,17 +32,14 @@ export default {
|
|
|
34
32
|
...routerProps
|
|
35
33
|
},
|
|
36
34
|
emits: ['click'],
|
|
37
|
-
|
|
38
35
|
setup(props, _ref) {
|
|
39
36
|
let {
|
|
40
37
|
emit
|
|
41
38
|
} = _ref;
|
|
42
39
|
const linkElRef = ref(null);
|
|
43
|
-
|
|
44
40
|
const onClick = e => {
|
|
45
41
|
emit('click', e);
|
|
46
42
|
};
|
|
47
|
-
|
|
48
43
|
useTooltip(linkElRef, props);
|
|
49
44
|
useRouteProps(linkElRef, props);
|
|
50
45
|
const linkAttrs = computed(() => {
|
|
@@ -73,5 +68,4 @@ export default {
|
|
|
73
68
|
linkElRef
|
|
74
69
|
};
|
|
75
70
|
}
|
|
76
|
-
|
|
77
71
|
};
|
package/components/list-group.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
2
|
const _hoisted_1 = ["data-sortable-move-elements"];
|
|
3
|
-
|
|
4
3
|
function render(_ctx, _cache) {
|
|
5
4
|
return _openBlock(), _createElementBlock("div", {
|
|
6
5
|
class: _normalizeClass(_ctx.classes),
|
|
7
6
|
"data-sortable-move-elements": typeof _ctx.sortableMoveElements !== 'undefined' ? _ctx.sortableMoveElements.toString() : undefined
|
|
8
7
|
}, [_createElementVNode("ul", null, [_renderSlot(_ctx.$slots, "default")])], 10, _hoisted_1);
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
import { computed, provide, inject } from 'vue';
|
|
12
10
|
import { classNames } from '../shared/utils.js';
|
|
13
11
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -26,7 +24,6 @@ export default {
|
|
|
26
24
|
},
|
|
27
25
|
...colorProps
|
|
28
26
|
},
|
|
29
|
-
|
|
30
27
|
setup(props) {
|
|
31
28
|
const ListContextParent = inject('ListContext', {
|
|
32
29
|
value: {
|
|
@@ -53,5 +50,4 @@ export default {
|
|
|
53
50
|
classes
|
|
54
51
|
};
|
|
55
52
|
}
|
|
56
|
-
|
|
57
53
|
};
|