@xenknight/framework7-vue 0.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/LICENSE +20 -0
- package/README.md +33 -0
- package/components/accordion-content.d.ts +46 -0
- package/components/accordion-content.js +22 -0
- package/components/accordion-item.d.ts +51 -0
- package/components/accordion-item.js +77 -0
- package/components/accordion-toggle.d.ts +46 -0
- package/components/accordion-toggle.js +22 -0
- package/components/accordion.d.ts +50 -0
- package/components/accordion.js +23 -0
- package/components/actions-button.d.ts +56 -0
- package/components/actions-button.js +58 -0
- package/components/actions-group.d.ts +46 -0
- package/components/actions-group.js +22 -0
- package/components/actions-label.d.ts +51 -0
- package/components/actions-label.js +36 -0
- package/components/actions.d.ts +109 -0
- package/components/actions.js +157 -0
- package/components/app.d.ts +310 -0
- package/components/app.js +267 -0
- package/components/area-chart.d.ts +88 -0
- package/components/area-chart.js +364 -0
- package/components/badge.d.ts +54 -0
- package/components/badge.js +29 -0
- package/components/block-footer.d.ts +46 -0
- package/components/block-footer.js +22 -0
- package/components/block-header.d.ts +46 -0
- package/components/block-header.js +22 -0
- package/components/block-title.d.ts +54 -0
- package/components/block-title.js +35 -0
- package/components/block.d.ts +163 -0
- package/components/block.js +123 -0
- package/components/breadcrumbs-collapsed.d.ts +19 -0
- package/components/breadcrumbs-collapsed.js +21 -0
- package/components/breadcrumbs-item.d.ts +22 -0
- package/components/breadcrumbs-item.js +24 -0
- package/components/breadcrumbs-separator.d.ts +19 -0
- package/components/breadcrumbs-separator.js +20 -0
- package/components/breadcrumbs.d.ts +19 -0
- package/components/breadcrumbs.js +20 -0
- package/components/button.d.ts +371 -0
- package/components/button.js +182 -0
- package/components/card-content.d.ts +51 -0
- package/components/card-content.js +28 -0
- package/components/card-footer.d.ts +46 -0
- package/components/card-footer.js +22 -0
- package/components/card-header.d.ts +46 -0
- package/components/card-header.js +22 -0
- package/components/card.d.ts +145 -0
- package/components/card.js +192 -0
- package/components/checkbox.d.ts +72 -0
- package/components/checkbox.js +70 -0
- package/components/chip.d.ts +107 -0
- package/components/chip.js +81 -0
- package/components/fab-backdrop.d.ts +46 -0
- package/components/fab-backdrop.js +22 -0
- package/components/fab-button.d.ts +67 -0
- package/components/fab-button.js +52 -0
- package/components/fab-buttons.d.ts +51 -0
- package/components/fab-buttons.js +26 -0
- package/components/fab.d.ts +76 -0
- package/components/fab.js +78 -0
- package/components/gauge.d.ts +91 -0
- package/components/gauge.js +151 -0
- package/components/icon.d.ts +78 -0
- package/components/icon.js +100 -0
- package/components/input.d.ts +226 -0
- package/components/input.js +409 -0
- package/components/link.d.ts +287 -0
- package/components/link.js +129 -0
- package/components/list-button.d.ts +239 -0
- package/components/list-button.js +71 -0
- package/components/list-group.d.ts +71 -0
- package/components/list-group.js +53 -0
- package/components/list-index.d.ts +81 -0
- package/components/list-index.js +96 -0
- package/components/list-input.d.ts +245 -0
- package/components/list-input.js +415 -0
- package/components/list-item.d.ts +370 -0
- package/components/list-item.js +451 -0
- package/components/list.d.ts +236 -0
- package/components/list.js +222 -0
- package/components/login-screen-title.d.ts +46 -0
- package/components/login-screen-title.js +22 -0
- package/components/login-screen.d.ts +61 -0
- package/components/login-screen.js +104 -0
- package/components/message.d.ts +116 -0
- package/components/message.js +169 -0
- package/components/messagebar-attachment.d.ts +56 -0
- package/components/messagebar-attachment.js +52 -0
- package/components/messagebar-attachments.d.ts +46 -0
- package/components/messagebar-attachments.js +22 -0
- package/components/messagebar-sheet-image.d.ts +55 -0
- package/components/messagebar-sheet-image.js +48 -0
- package/components/messagebar-sheet-item.d.ts +46 -0
- package/components/messagebar-sheet-item.js +22 -0
- package/components/messagebar-sheet.d.ts +46 -0
- package/components/messagebar-sheet.js +22 -0
- package/components/messagebar.d.ts +117 -0
- package/components/messagebar.js +193 -0
- package/components/messages-title.d.ts +46 -0
- package/components/messages-title.js +22 -0
- package/components/messages.d.ts +116 -0
- package/components/messages.js +134 -0
- package/components/nav-left.d.ts +68 -0
- package/components/nav-left.js +66 -0
- package/components/nav-right.d.ts +50 -0
- package/components/nav-right.js +25 -0
- package/components/nav-title-large.d.ts +46 -0
- package/components/nav-title-large.js +25 -0
- package/components/nav-title.d.ts +58 -0
- package/components/nav-title.js +31 -0
- package/components/navbar.d.ts +110 -0
- package/components/navbar.js +248 -0
- package/components/page-content.d.ts +113 -0
- package/components/page-content.js +147 -0
- package/components/page.d.ts +150 -0
- package/components/page.js +331 -0
- package/components/panel.d.ts +139 -0
- package/components/panel.js +198 -0
- package/components/photo-browser.d.ts +164 -0
- package/components/photo-browser.js +181 -0
- package/components/pie-chart.d.ts +37 -0
- package/components/pie-chart.js +172 -0
- package/components/popover.d.ts +101 -0
- package/components/popover.js +157 -0
- package/components/popup.d.ts +99 -0
- package/components/popup.js +161 -0
- package/components/preloader.d.ts +50 -0
- package/components/preloader.js +65 -0
- package/components/progressbar.d.ts +54 -0
- package/components/progressbar.js +44 -0
- package/components/radio.d.ts +68 -0
- package/components/radio.js +59 -0
- package/components/range.d.ts +141 -0
- package/components/range.js +139 -0
- package/components/routable-modals.d.ts +19 -0
- package/components/routable-modals.js +58 -0
- package/components/searchbar.d.ts +182 -0
- package/components/searchbar.js +285 -0
- package/components/segmented.d.ts +87 -0
- package/components/segmented.js +53 -0
- package/components/sheet.d.ts +132 -0
- package/components/sheet.js +213 -0
- package/components/skeleton-avatar.d.ts +6 -0
- package/components/skeleton-avatar.js +3 -0
- package/components/skeleton-block.d.ts +6 -0
- package/components/skeleton-block.js +3 -0
- package/components/skeleton-image.d.ts +6 -0
- package/components/skeleton-image.js +3 -0
- package/components/skeleton-text.d.ts +6 -0
- package/components/skeleton-text.js +3 -0
- package/components/stepper.d.ts +197 -0
- package/components/stepper.js +230 -0
- package/components/subnavbar.d.ts +59 -0
- package/components/subnavbar.js +40 -0
- package/components/swipeout-actions.d.ts +58 -0
- package/components/swipeout-actions.js +33 -0
- package/components/swipeout-button.d.ts +75 -0
- package/components/swipeout-button.js +48 -0
- package/components/tab.d.ts +51 -0
- package/components/tab.js +128 -0
- package/components/tabs.d.ts +63 -0
- package/components/tabs.js +59 -0
- package/components/text-editor.d.ts +95 -0
- package/components/text-editor.js +147 -0
- package/components/toggle.d.ts +80 -0
- package/components/toggle.js +89 -0
- package/components/toolbar.d.ts +108 -0
- package/components/toolbar.js +135 -0
- package/components/treeview-item.d.ts +265 -0
- package/components/treeview-item.js +140 -0
- package/components/treeview.d.ts +46 -0
- package/components/treeview.js +22 -0
- package/components/use-icon.d.ts +19 -0
- package/components/use-icon.js +27 -0
- package/components/view.d.ts +296 -0
- package/components/view.js +373 -0
- package/components/views.d.ts +50 -0
- package/components/views.js +25 -0
- package/framework7-vue-bundle.js +190 -0
- package/framework7-vue.d.ts +121 -0
- package/framework7-vue.js +108 -0
- package/package.json +65 -0
- package/shared/components-router.js +203 -0
- package/shared/f7.js +71 -0
- package/shared/get-router-initial-component.js +35 -0
- package/shared/mixins.js +233 -0
- package/shared/modal-state-classes.js +10 -0
- package/shared/plugin.js +37 -0
- package/shared/router-open-in.js +105 -0
- package/shared/use-icon.js +37 -0
- package/shared/use-route-props.js +18 -0
- package/shared/use-smart-select.js +24 -0
- package/shared/use-store.js +24 -0
- package/shared/use-tab.js +24 -0
- package/shared/use-theme.js +11 -0
- package/shared/use-tooltip.js +43 -0
- package/shared/utils.js +110 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString } from "vue";
|
|
2
|
+
const _hoisted_1 = {
|
|
3
|
+
class: "gauge"
|
|
4
|
+
};
|
|
5
|
+
const _hoisted_2 = ["width", "height", "viewBox"];
|
|
6
|
+
const _hoisted_3 = ["d", "stroke", "stroke-width", "fill"];
|
|
7
|
+
const _hoisted_4 = ["d", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "fill"];
|
|
8
|
+
const _hoisted_5 = ["stroke", "stroke-width", "fill", "cx", "cy", "r"];
|
|
9
|
+
const _hoisted_6 = ["transform", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "fill", "cx", "cy", "r"];
|
|
10
|
+
const _hoisted_7 = ["y", "font-weight", "font-size", "fill", "dy", "dominant-baseline"];
|
|
11
|
+
const _hoisted_8 = ["y", "font-weight", "font-size", "fill", "dy", "dominant-baseline"];
|
|
12
|
+
function render(_ctx, _cache) {
|
|
13
|
+
return _openBlock(), _createElementBlock("div", _hoisted_1, [(_openBlock(), _createElementBlock("svg", {
|
|
14
|
+
class: "gauge-svg",
|
|
15
|
+
width: `${_ctx.size}px`,
|
|
16
|
+
height: `${_ctx.semiCircle ? _ctx.size / 2 : _ctx.size}px`,
|
|
17
|
+
viewBox: `0 0 ${_ctx.size} ${_ctx.semiCircle ? _ctx.size / 2 : _ctx.size}`
|
|
18
|
+
}, [_ctx.semiCircle ? (_openBlock(), _createElementBlock("path", {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "gauge-back-semi",
|
|
21
|
+
d: `M${_ctx.size - _ctx.borderWidth / 2},${_ctx.size / 2} a1,1 0 0,0 -${_ctx.size - _ctx.borderWidth},0`,
|
|
22
|
+
stroke: _ctx.borderBgColor,
|
|
23
|
+
"stroke-width": _ctx.borderWidth,
|
|
24
|
+
fill: _ctx.bgColor || 'none'
|
|
25
|
+
}, null, 8, _hoisted_3)) : _createCommentVNode("", true), _ctx.semiCircle ? (_openBlock(), _createElementBlock("path", {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "gauge-front-semi",
|
|
28
|
+
d: `M${_ctx.size - _ctx.borderWidth / 2},${_ctx.size / 2} a1,1 0 0,0 -${_ctx.size - _ctx.borderWidth},0`,
|
|
29
|
+
stroke: _ctx.borderColor,
|
|
30
|
+
"stroke-width": _ctx.borderWidth,
|
|
31
|
+
"stroke-dasharray": _ctx.length / 2,
|
|
32
|
+
"stroke-dashoffset": _ctx.length / 2 * (1 + _ctx.progress),
|
|
33
|
+
fill: _ctx.borderBgColor ? 'none' : _ctx.bgColor || 'none'
|
|
34
|
+
}, null, 8, _hoisted_4)) : _createCommentVNode("", true), !_ctx.semiCircle && _ctx.borderBgColor ? (_openBlock(), _createElementBlock("circle", {
|
|
35
|
+
key: 2,
|
|
36
|
+
class: "gauge-back-circle",
|
|
37
|
+
stroke: _ctx.borderBgColor,
|
|
38
|
+
"stroke-width": _ctx.borderWidth,
|
|
39
|
+
fill: _ctx.bgColor || 'none',
|
|
40
|
+
cx: _ctx.size / 2,
|
|
41
|
+
cy: _ctx.size / 2,
|
|
42
|
+
r: _ctx.radius
|
|
43
|
+
}, null, 8, _hoisted_5)) : _createCommentVNode("", true), !_ctx.semiCircle ? (_openBlock(), _createElementBlock("circle", {
|
|
44
|
+
key: 3,
|
|
45
|
+
class: "gauge-front-circle",
|
|
46
|
+
transform: `rotate(-90 ${_ctx.size / 2} ${_ctx.size / 2})`,
|
|
47
|
+
stroke: _ctx.borderColor,
|
|
48
|
+
"stroke-width": _ctx.borderWidth,
|
|
49
|
+
"stroke-dasharray": _ctx.length,
|
|
50
|
+
"stroke-dashoffset": _ctx.length * (1 - _ctx.progress),
|
|
51
|
+
fill: _ctx.borderBgColor ? 'none' : _ctx.bgColor || 'none',
|
|
52
|
+
cx: _ctx.size / 2,
|
|
53
|
+
cy: _ctx.size / 2,
|
|
54
|
+
r: _ctx.radius
|
|
55
|
+
}, null, 8, _hoisted_6)) : _createCommentVNode("", true), _ctx.valueText ? (_openBlock(), _createElementBlock("text", {
|
|
56
|
+
key: 4,
|
|
57
|
+
class: "gauge-value-text",
|
|
58
|
+
x: "50%",
|
|
59
|
+
y: _ctx.semiCircle ? '100%' : '50%',
|
|
60
|
+
"font-weight": _ctx.valueFontWeight,
|
|
61
|
+
"font-size": _ctx.valueFontSize,
|
|
62
|
+
fill: _ctx.valueTextColor,
|
|
63
|
+
dy: _ctx.semiCircle ? _ctx.labelText ? -_ctx.labelFontSize - 15 : -5 : 0,
|
|
64
|
+
"text-anchor": "middle",
|
|
65
|
+
"dominant-baseline": !_ctx.semiCircle ? 'middle' : null
|
|
66
|
+
}, _toDisplayString(_ctx.valueText), 9, _hoisted_7)) : _createCommentVNode("", true), _ctx.labelText ? (_openBlock(), _createElementBlock("text", {
|
|
67
|
+
key: 5,
|
|
68
|
+
class: "gauge-label-text",
|
|
69
|
+
x: "50%",
|
|
70
|
+
y: _ctx.semiCircle ? '100%' : '50%',
|
|
71
|
+
"font-weight": _ctx.labelFontWeight,
|
|
72
|
+
"font-size": _ctx.labelFontSize,
|
|
73
|
+
fill: _ctx.labelTextColor,
|
|
74
|
+
dy: _ctx.semiCircle ? -5 : _ctx.valueText ? _ctx.valueFontSize / 2 + 10 : 0,
|
|
75
|
+
"text-anchor": "middle",
|
|
76
|
+
"dominant-baseline": !_ctx.semiCircle ? 'middle' : null
|
|
77
|
+
}, _toDisplayString(_ctx.labelText), 9, _hoisted_8)) : _createCommentVNode("", true)], 8, _hoisted_2))]);
|
|
78
|
+
}
|
|
79
|
+
import { computed } from 'vue';
|
|
80
|
+
export default {
|
|
81
|
+
name: 'f7-gauge',
|
|
82
|
+
render,
|
|
83
|
+
props: {
|
|
84
|
+
type: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: 'circle'
|
|
87
|
+
},
|
|
88
|
+
value: {
|
|
89
|
+
type: [Number, String],
|
|
90
|
+
default: 0
|
|
91
|
+
},
|
|
92
|
+
size: {
|
|
93
|
+
type: [Number, String],
|
|
94
|
+
default: 200
|
|
95
|
+
},
|
|
96
|
+
bgColor: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: 'transparent'
|
|
99
|
+
},
|
|
100
|
+
borderBgColor: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: '#eeeeee'
|
|
103
|
+
},
|
|
104
|
+
borderColor: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: '#000000'
|
|
107
|
+
},
|
|
108
|
+
borderWidth: {
|
|
109
|
+
type: [Number, String],
|
|
110
|
+
default: 10
|
|
111
|
+
},
|
|
112
|
+
valueText: [Number, String],
|
|
113
|
+
valueTextColor: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: '#000000'
|
|
116
|
+
},
|
|
117
|
+
valueFontSize: {
|
|
118
|
+
type: [Number, String],
|
|
119
|
+
default: 31
|
|
120
|
+
},
|
|
121
|
+
valueFontWeight: {
|
|
122
|
+
type: [Number, String],
|
|
123
|
+
default: 500
|
|
124
|
+
},
|
|
125
|
+
labelText: String,
|
|
126
|
+
labelTextColor: {
|
|
127
|
+
type: String,
|
|
128
|
+
default: '#888888'
|
|
129
|
+
},
|
|
130
|
+
labelFontSize: {
|
|
131
|
+
type: [Number, String],
|
|
132
|
+
default: 14
|
|
133
|
+
},
|
|
134
|
+
labelFontWeight: {
|
|
135
|
+
type: [Number, String],
|
|
136
|
+
default: 400
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
setup(props) {
|
|
140
|
+
const semiCircle = computed(() => props.type === 'semicircle');
|
|
141
|
+
const radius = computed(() => props.size / 2 - props.borderWidth / 2);
|
|
142
|
+
const length = computed(() => 2 * Math.PI * radius.value);
|
|
143
|
+
const progress = computed(() => Math.max(Math.min(props.value, 1), 0));
|
|
144
|
+
return {
|
|
145
|
+
semiCircle,
|
|
146
|
+
radius,
|
|
147
|
+
length,
|
|
148
|
+
progress
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare const Icon: DefineComponent<
|
|
6
|
+
{
|
|
7
|
+
|
|
8
|
+
material: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
f7: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
icon: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
ios: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
md: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
tooltip: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
tooltipTrigger: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
size: {
|
|
37
|
+
type: StringConstructor | NumberConstructor;
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
color: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
colorTheme: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
textColor: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
bgColor: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
borderColor: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
rippleColor: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
dark: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
() => JSX.Element,
|
|
69
|
+
unknown,
|
|
70
|
+
{},
|
|
71
|
+
{},
|
|
72
|
+
ComponentOptionsMixin,
|
|
73
|
+
ComponentOptionsMixin,
|
|
74
|
+
|
|
75
|
+
>;
|
|
76
|
+
|
|
77
|
+
export default Icon;
|
|
78
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
function render(_ctx, _cache) {
|
|
3
|
+
return _openBlock(), _createElementBlock("i", {
|
|
4
|
+
ref: "elRef",
|
|
5
|
+
style: _normalizeStyle({
|
|
6
|
+
fontSize: _ctx.sizeComputed,
|
|
7
|
+
width: _ctx.sizeComputed,
|
|
8
|
+
height: _ctx.sizeComputed
|
|
9
|
+
}),
|
|
10
|
+
class: _normalizeClass(_ctx.classesComputed)
|
|
11
|
+
}, [_createTextVNode(_toDisplayString(_ctx.iconText) + " ", 1), _renderSlot(_ctx.$slots, "default")], 6);
|
|
12
|
+
}
|
|
13
|
+
import { ref, computed } from 'vue';
|
|
14
|
+
import { classNames } from '../shared/utils.js';
|
|
15
|
+
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
16
|
+
import { useTooltip } from '../shared/use-tooltip.js';
|
|
17
|
+
import { useTheme } from '../shared/use-theme.js';
|
|
18
|
+
export default {
|
|
19
|
+
name: 'f7-icon',
|
|
20
|
+
render,
|
|
21
|
+
props: {
|
|
22
|
+
material: String,
|
|
23
|
+
f7: String,
|
|
24
|
+
icon: String,
|
|
25
|
+
ios: String,
|
|
26
|
+
md: String,
|
|
27
|
+
tooltip: String,
|
|
28
|
+
tooltipTrigger: String,
|
|
29
|
+
size: [String, Number],
|
|
30
|
+
...colorProps
|
|
31
|
+
},
|
|
32
|
+
setup(props) {
|
|
33
|
+
const elRef = ref(null);
|
|
34
|
+
const theme = useTheme();
|
|
35
|
+
useTooltip(elRef, props);
|
|
36
|
+
const classesComputed = computed(() => {
|
|
37
|
+
const {
|
|
38
|
+
ios,
|
|
39
|
+
md,
|
|
40
|
+
f7,
|
|
41
|
+
material,
|
|
42
|
+
icon
|
|
43
|
+
} = props;
|
|
44
|
+
let classes = {
|
|
45
|
+
icon: true
|
|
46
|
+
};
|
|
47
|
+
let themeIcon;
|
|
48
|
+
if (theme.value && theme.value.ios) themeIcon = ios;else if (theme.value && theme.value.md) themeIcon = md;
|
|
49
|
+
if (themeIcon) {
|
|
50
|
+
const parts = themeIcon.split(':');
|
|
51
|
+
const prop = parts[0];
|
|
52
|
+
const value = parts[1];
|
|
53
|
+
if (prop === 'material' || prop === 'f7') {
|
|
54
|
+
classes['material-icons'] = prop === 'material';
|
|
55
|
+
classes['f7-icons'] = prop === 'f7';
|
|
56
|
+
}
|
|
57
|
+
if (prop === 'icon') {
|
|
58
|
+
classes[value] = true;
|
|
59
|
+
}
|
|
60
|
+
if (icon) classes[icon] = true;
|
|
61
|
+
} else {
|
|
62
|
+
classes = {
|
|
63
|
+
icon: true,
|
|
64
|
+
'material-icons': material,
|
|
65
|
+
'f7-icons': f7
|
|
66
|
+
};
|
|
67
|
+
if (icon) classes[icon] = true;
|
|
68
|
+
}
|
|
69
|
+
return classNames(classes, colorClasses(props));
|
|
70
|
+
});
|
|
71
|
+
const sizeComputed = computed(() => {
|
|
72
|
+
let size = props.size;
|
|
73
|
+
if (typeof props.size === 'number' || parseFloat(props.size) === props.size * 1) {
|
|
74
|
+
size = `${props.size}px`;
|
|
75
|
+
}
|
|
76
|
+
return size;
|
|
77
|
+
});
|
|
78
|
+
const iconText = computed(() => {
|
|
79
|
+
const {
|
|
80
|
+
ios,
|
|
81
|
+
md,
|
|
82
|
+
f7,
|
|
83
|
+
material
|
|
84
|
+
} = props;
|
|
85
|
+
let text = material || f7;
|
|
86
|
+
if (md && theme.value && theme.value.md && (md.indexOf('material:') >= 0 || md.indexOf('f7:') >= 0)) {
|
|
87
|
+
text = md.split(':')[1];
|
|
88
|
+
} else if (ios && theme.value && theme.value.ios && (ios.indexOf('material:') >= 0 || ios.indexOf('f7:') >= 0)) {
|
|
89
|
+
text = ios.split(':')[1];
|
|
90
|
+
}
|
|
91
|
+
return text;
|
|
92
|
+
});
|
|
93
|
+
return {
|
|
94
|
+
elRef,
|
|
95
|
+
sizeComputed,
|
|
96
|
+
classesComputed,
|
|
97
|
+
iconText
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare const Input: DefineComponent<
|
|
6
|
+
{
|
|
7
|
+
|
|
8
|
+
type: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
name: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
inputmode: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
placeholder: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
inputId: {
|
|
25
|
+
type: StringConstructor | NumberConstructor;
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
size: {
|
|
29
|
+
type: StringConstructor | NumberConstructor;
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
accept: {
|
|
33
|
+
type: StringConstructor | NumberConstructor;
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
autocomplete: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
autocorrect: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
autocapitalize: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
spellcheck: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
autofocus: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
autosave: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
checked: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
disabled: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
max: {
|
|
69
|
+
type: StringConstructor | NumberConstructor;
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
min: {
|
|
73
|
+
type: StringConstructor | NumberConstructor;
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
step: {
|
|
77
|
+
type: StringConstructor | NumberConstructor;
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
maxlength: {
|
|
81
|
+
type: StringConstructor | NumberConstructor;
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
minlength: {
|
|
85
|
+
type: StringConstructor | NumberConstructor;
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
multiple: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
readonly: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
required: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
inputStyle: {
|
|
101
|
+
type: StringConstructor | ObjectConstructor;
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
pattern: {
|
|
105
|
+
type: StringConstructor;
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
validate: {
|
|
109
|
+
type: BooleanConstructor | StringConstructor;
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
validateOnBlur: {
|
|
113
|
+
type: BooleanConstructor;
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
onValidate: {
|
|
117
|
+
type: FunctionConstructor;
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
tabindex: {
|
|
121
|
+
type: StringConstructor | NumberConstructor;
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
resizable: {
|
|
125
|
+
type: BooleanConstructor;
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
clearButton: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
noFormStoreData: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
noStoreData: {
|
|
137
|
+
type: BooleanConstructor;
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
ignoreStoreData: {
|
|
141
|
+
type: BooleanConstructor;
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
errorMessage: {
|
|
145
|
+
type: StringConstructor;
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
errorMessageForce: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
info: {
|
|
153
|
+
type: StringConstructor;
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
outline: {
|
|
157
|
+
type: BooleanConstructor;
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
calendarParams: {
|
|
161
|
+
type: ObjectConstructor;
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
colorPickerParams: {
|
|
165
|
+
type: ObjectConstructor;
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
textEditorParams: {
|
|
169
|
+
type: ObjectConstructor;
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
value: {
|
|
173
|
+
type: StringConstructor | NumberConstructor | ArrayConstructor | any | ObjectConstructor;
|
|
174
|
+
default: undefined;
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
wrap: {
|
|
178
|
+
type: BooleanConstructor;
|
|
179
|
+
default: boolean;
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
dropdown: {
|
|
183
|
+
type: StringConstructor | BooleanConstructor;
|
|
184
|
+
default: string;
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
color: {
|
|
188
|
+
type: StringConstructor;
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
colorTheme: {
|
|
192
|
+
type: StringConstructor;
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
textColor: {
|
|
196
|
+
type: StringConstructor;
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
bgColor: {
|
|
200
|
+
type: StringConstructor;
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
borderColor: {
|
|
204
|
+
type: StringConstructor;
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
rippleColor: {
|
|
208
|
+
type: StringConstructor;
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
dark: {
|
|
212
|
+
type: BooleanConstructor;
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
() => JSX.Element,
|
|
216
|
+
unknown,
|
|
217
|
+
{},
|
|
218
|
+
{},
|
|
219
|
+
ComponentOptionsMixin,
|
|
220
|
+
ComponentOptionsMixin,
|
|
221
|
+
("input" | "focus" | "blur" | "change" | "textarea:resize" | "input:notempty" | "input:empty" | "input:clear" | "texteditor:change" | "calendar:change" | "colorpicker:change" | "update:value")[],
|
|
222
|
+
"input" | "focus" | "blur" | "change" | "textarea:resize" | "input:notempty" | "input:empty" | "input:clear" | "texteditor:change" | "calendar:change" | "colorpicker:change" | "update:value"
|
|
223
|
+
>;
|
|
224
|
+
|
|
225
|
+
export default Input;
|
|
226
|
+
|