@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.
Files changed (199) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +33 -0
  3. package/components/accordion-content.d.ts +46 -0
  4. package/components/accordion-content.js +22 -0
  5. package/components/accordion-item.d.ts +51 -0
  6. package/components/accordion-item.js +77 -0
  7. package/components/accordion-toggle.d.ts +46 -0
  8. package/components/accordion-toggle.js +22 -0
  9. package/components/accordion.d.ts +50 -0
  10. package/components/accordion.js +23 -0
  11. package/components/actions-button.d.ts +56 -0
  12. package/components/actions-button.js +58 -0
  13. package/components/actions-group.d.ts +46 -0
  14. package/components/actions-group.js +22 -0
  15. package/components/actions-label.d.ts +51 -0
  16. package/components/actions-label.js +36 -0
  17. package/components/actions.d.ts +109 -0
  18. package/components/actions.js +157 -0
  19. package/components/app.d.ts +310 -0
  20. package/components/app.js +267 -0
  21. package/components/area-chart.d.ts +88 -0
  22. package/components/area-chart.js +364 -0
  23. package/components/badge.d.ts +54 -0
  24. package/components/badge.js +29 -0
  25. package/components/block-footer.d.ts +46 -0
  26. package/components/block-footer.js +22 -0
  27. package/components/block-header.d.ts +46 -0
  28. package/components/block-header.js +22 -0
  29. package/components/block-title.d.ts +54 -0
  30. package/components/block-title.js +35 -0
  31. package/components/block.d.ts +163 -0
  32. package/components/block.js +123 -0
  33. package/components/breadcrumbs-collapsed.d.ts +19 -0
  34. package/components/breadcrumbs-collapsed.js +21 -0
  35. package/components/breadcrumbs-item.d.ts +22 -0
  36. package/components/breadcrumbs-item.js +24 -0
  37. package/components/breadcrumbs-separator.d.ts +19 -0
  38. package/components/breadcrumbs-separator.js +20 -0
  39. package/components/breadcrumbs.d.ts +19 -0
  40. package/components/breadcrumbs.js +20 -0
  41. package/components/button.d.ts +371 -0
  42. package/components/button.js +182 -0
  43. package/components/card-content.d.ts +51 -0
  44. package/components/card-content.js +28 -0
  45. package/components/card-footer.d.ts +46 -0
  46. package/components/card-footer.js +22 -0
  47. package/components/card-header.d.ts +46 -0
  48. package/components/card-header.js +22 -0
  49. package/components/card.d.ts +145 -0
  50. package/components/card.js +192 -0
  51. package/components/checkbox.d.ts +72 -0
  52. package/components/checkbox.js +70 -0
  53. package/components/chip.d.ts +107 -0
  54. package/components/chip.js +81 -0
  55. package/components/fab-backdrop.d.ts +46 -0
  56. package/components/fab-backdrop.js +22 -0
  57. package/components/fab-button.d.ts +67 -0
  58. package/components/fab-button.js +52 -0
  59. package/components/fab-buttons.d.ts +51 -0
  60. package/components/fab-buttons.js +26 -0
  61. package/components/fab.d.ts +76 -0
  62. package/components/fab.js +78 -0
  63. package/components/gauge.d.ts +91 -0
  64. package/components/gauge.js +151 -0
  65. package/components/icon.d.ts +78 -0
  66. package/components/icon.js +100 -0
  67. package/components/input.d.ts +226 -0
  68. package/components/input.js +409 -0
  69. package/components/link.d.ts +287 -0
  70. package/components/link.js +129 -0
  71. package/components/list-button.d.ts +239 -0
  72. package/components/list-button.js +71 -0
  73. package/components/list-group.d.ts +71 -0
  74. package/components/list-group.js +53 -0
  75. package/components/list-index.d.ts +81 -0
  76. package/components/list-index.js +96 -0
  77. package/components/list-input.d.ts +245 -0
  78. package/components/list-input.js +415 -0
  79. package/components/list-item.d.ts +370 -0
  80. package/components/list-item.js +451 -0
  81. package/components/list.d.ts +236 -0
  82. package/components/list.js +222 -0
  83. package/components/login-screen-title.d.ts +46 -0
  84. package/components/login-screen-title.js +22 -0
  85. package/components/login-screen.d.ts +61 -0
  86. package/components/login-screen.js +104 -0
  87. package/components/message.d.ts +116 -0
  88. package/components/message.js +169 -0
  89. package/components/messagebar-attachment.d.ts +56 -0
  90. package/components/messagebar-attachment.js +52 -0
  91. package/components/messagebar-attachments.d.ts +46 -0
  92. package/components/messagebar-attachments.js +22 -0
  93. package/components/messagebar-sheet-image.d.ts +55 -0
  94. package/components/messagebar-sheet-image.js +48 -0
  95. package/components/messagebar-sheet-item.d.ts +46 -0
  96. package/components/messagebar-sheet-item.js +22 -0
  97. package/components/messagebar-sheet.d.ts +46 -0
  98. package/components/messagebar-sheet.js +22 -0
  99. package/components/messagebar.d.ts +117 -0
  100. package/components/messagebar.js +193 -0
  101. package/components/messages-title.d.ts +46 -0
  102. package/components/messages-title.js +22 -0
  103. package/components/messages.d.ts +116 -0
  104. package/components/messages.js +134 -0
  105. package/components/nav-left.d.ts +68 -0
  106. package/components/nav-left.js +66 -0
  107. package/components/nav-right.d.ts +50 -0
  108. package/components/nav-right.js +25 -0
  109. package/components/nav-title-large.d.ts +46 -0
  110. package/components/nav-title-large.js +25 -0
  111. package/components/nav-title.d.ts +58 -0
  112. package/components/nav-title.js +31 -0
  113. package/components/navbar.d.ts +110 -0
  114. package/components/navbar.js +248 -0
  115. package/components/page-content.d.ts +113 -0
  116. package/components/page-content.js +147 -0
  117. package/components/page.d.ts +150 -0
  118. package/components/page.js +331 -0
  119. package/components/panel.d.ts +139 -0
  120. package/components/panel.js +198 -0
  121. package/components/photo-browser.d.ts +164 -0
  122. package/components/photo-browser.js +181 -0
  123. package/components/pie-chart.d.ts +37 -0
  124. package/components/pie-chart.js +172 -0
  125. package/components/popover.d.ts +101 -0
  126. package/components/popover.js +157 -0
  127. package/components/popup.d.ts +99 -0
  128. package/components/popup.js +161 -0
  129. package/components/preloader.d.ts +50 -0
  130. package/components/preloader.js +65 -0
  131. package/components/progressbar.d.ts +54 -0
  132. package/components/progressbar.js +44 -0
  133. package/components/radio.d.ts +68 -0
  134. package/components/radio.js +59 -0
  135. package/components/range.d.ts +141 -0
  136. package/components/range.js +139 -0
  137. package/components/routable-modals.d.ts +19 -0
  138. package/components/routable-modals.js +58 -0
  139. package/components/searchbar.d.ts +182 -0
  140. package/components/searchbar.js +285 -0
  141. package/components/segmented.d.ts +87 -0
  142. package/components/segmented.js +53 -0
  143. package/components/sheet.d.ts +132 -0
  144. package/components/sheet.js +213 -0
  145. package/components/skeleton-avatar.d.ts +6 -0
  146. package/components/skeleton-avatar.js +3 -0
  147. package/components/skeleton-block.d.ts +6 -0
  148. package/components/skeleton-block.js +3 -0
  149. package/components/skeleton-image.d.ts +6 -0
  150. package/components/skeleton-image.js +3 -0
  151. package/components/skeleton-text.d.ts +6 -0
  152. package/components/skeleton-text.js +3 -0
  153. package/components/stepper.d.ts +197 -0
  154. package/components/stepper.js +230 -0
  155. package/components/subnavbar.d.ts +59 -0
  156. package/components/subnavbar.js +40 -0
  157. package/components/swipeout-actions.d.ts +58 -0
  158. package/components/swipeout-actions.js +33 -0
  159. package/components/swipeout-button.d.ts +75 -0
  160. package/components/swipeout-button.js +48 -0
  161. package/components/tab.d.ts +51 -0
  162. package/components/tab.js +128 -0
  163. package/components/tabs.d.ts +63 -0
  164. package/components/tabs.js +59 -0
  165. package/components/text-editor.d.ts +95 -0
  166. package/components/text-editor.js +147 -0
  167. package/components/toggle.d.ts +80 -0
  168. package/components/toggle.js +89 -0
  169. package/components/toolbar.d.ts +108 -0
  170. package/components/toolbar.js +135 -0
  171. package/components/treeview-item.d.ts +265 -0
  172. package/components/treeview-item.js +140 -0
  173. package/components/treeview.d.ts +46 -0
  174. package/components/treeview.js +22 -0
  175. package/components/use-icon.d.ts +19 -0
  176. package/components/use-icon.js +27 -0
  177. package/components/view.d.ts +296 -0
  178. package/components/view.js +373 -0
  179. package/components/views.d.ts +50 -0
  180. package/components/views.js +25 -0
  181. package/framework7-vue-bundle.js +190 -0
  182. package/framework7-vue.d.ts +121 -0
  183. package/framework7-vue.js +108 -0
  184. package/package.json +65 -0
  185. package/shared/components-router.js +203 -0
  186. package/shared/f7.js +71 -0
  187. package/shared/get-router-initial-component.js +35 -0
  188. package/shared/mixins.js +233 -0
  189. package/shared/modal-state-classes.js +10 -0
  190. package/shared/plugin.js +37 -0
  191. package/shared/router-open-in.js +105 -0
  192. package/shared/use-icon.js +37 -0
  193. package/shared/use-route-props.js +18 -0
  194. package/shared/use-smart-select.js +24 -0
  195. package/shared/use-store.js +24 -0
  196. package/shared/use-tab.js +24 -0
  197. package/shared/use-theme.js +11 -0
  198. package/shared/use-tooltip.js +43 -0
  199. package/shared/utils.js +110 -0
@@ -0,0 +1,222 @@
1
+ import { computed, ref, onMounted, onBeforeUnmount, h, provide, toRaw } from 'vue';
2
+ import { classNames, extend } from '../shared/utils.js';
3
+ import { colorClasses, colorProps } from '../shared/mixins.js';
4
+ import { f7, f7ready } from '../shared/f7.js';
5
+ import { useTab } from '../shared/use-tab.js';
6
+ export default {
7
+ name: 'f7-list',
8
+ props: {
9
+ inset: Boolean,
10
+ insetIos: Boolean,
11
+ insetMd: Boolean,
12
+ xsmallInset: Boolean,
13
+ xsmallInsetIos: Boolean,
14
+ xsmallInsetMd: Boolean,
15
+ smallInset: Boolean,
16
+ smallInsetIos: Boolean,
17
+ smallInsetMd: Boolean,
18
+ mediumInset: Boolean,
19
+ mediumInsetIos: Boolean,
20
+ mediumInsetMd: Boolean,
21
+ largeInset: Boolean,
22
+ largeInsetIos: Boolean,
23
+ largeInsetMd: Boolean,
24
+ xlargeInset: Boolean,
25
+ xlargeInsetIos: Boolean,
26
+ xlargeInsetMd: Boolean,
27
+ strong: Boolean,
28
+ strongIos: Boolean,
29
+ strongMd: Boolean,
30
+ outline: Boolean,
31
+ outlineIos: Boolean,
32
+ outlineMd: Boolean,
33
+ dividers: Boolean,
34
+ dividersIos: Boolean,
35
+ dividersMd: Boolean,
36
+ mediaList: Boolean,
37
+ sortable: Boolean,
38
+ sortableTapHold: Boolean,
39
+ sortableEnabled: Boolean,
40
+ sortableMoveElements: {
41
+ type: Boolean,
42
+ default: undefined
43
+ },
44
+ sortableOpposite: Boolean,
45
+ accordionList: Boolean,
46
+ accordionOpposite: Boolean,
47
+ contactsList: Boolean,
48
+ simpleList: Boolean,
49
+ linksList: Boolean,
50
+ menuList: Boolean,
51
+ // Links Chevron (Arrow) Icon
52
+ noChevron: Boolean,
53
+ chevronCenter: Boolean,
54
+ // Tab
55
+ tab: Boolean,
56
+ tabActive: Boolean,
57
+ // Form
58
+ form: Boolean,
59
+ formStoreData: Boolean,
60
+ // Virtual List
61
+ virtualList: Boolean,
62
+ virtualListParams: Object,
63
+ ...colorProps
64
+ },
65
+ emits: ['submit', 'sortable:enable', 'sortable:disable', 'sortable:sort', 'sortable:move', 'virtual:itembeforeinsert', 'virtual:beforeclear', 'virtual:itemsbeforeinsert', 'virtual:itemsafterinsert', 'tab:hide', 'tab:show'],
66
+ setup(props, _ref) {
67
+ let {
68
+ emit,
69
+ slots
70
+ } = _ref;
71
+ let f7VirtualList = null;
72
+ const elRef = ref(null);
73
+ const onSubmit = event => {
74
+ emit('submit', event);
75
+ };
76
+ const onSortableEnable = el => {
77
+ if (elRef.value !== el) return;
78
+ emit('sortable:enable');
79
+ };
80
+ const onSortableDisable = el => {
81
+ if (elRef.value !== el) return;
82
+ emit('sortable:disable');
83
+ };
84
+ const onSortableSort = (el, sortData, listEl) => {
85
+ if (elRef.value !== listEl) return;
86
+ emit('sortable:sort', sortData);
87
+ };
88
+ const onSortableMove = (el, listEl) => {
89
+ if (elRef.value !== listEl) return;
90
+ emit('sortable:move', el, listEl);
91
+ };
92
+ useTab(elRef, emit);
93
+ onMounted(() => {
94
+ f7ready(() => {
95
+ f7.on('sortableEnable', onSortableEnable);
96
+ f7.on('sortableDisable', onSortableDisable);
97
+ f7.on('sortableSort', onSortableSort);
98
+ f7.on('sortableMove', onSortableMove);
99
+ if (!props.virtualList) return;
100
+ const vlParams = props.virtualListParams || {};
101
+ if (!vlParams.renderItem && !vlParams.renderExternal) return;
102
+ if (vlParams.items) vlParams.items = toRaw(vlParams.items);
103
+ f7VirtualList = f7.virtualList.create(extend({
104
+ el: elRef.value,
105
+ on: {
106
+ itemBeforeInsert(itemEl, item) {
107
+ const vl = this;
108
+ emit('virtual:itembeforeinsert', vl, itemEl, item);
109
+ },
110
+ beforeClear(fragment) {
111
+ const vl = this;
112
+ emit('virtual:beforeclear', vl, fragment);
113
+ },
114
+ itemsBeforeInsert(fragment) {
115
+ const vl = this;
116
+ emit('virtual:itemsbeforeinsert', vl, fragment);
117
+ },
118
+ itemsAfterInsert(fragment) {
119
+ const vl = this;
120
+ emit('virtual:itemsafterinsert', vl, fragment);
121
+ }
122
+ }
123
+ }, vlParams));
124
+ });
125
+ });
126
+ onBeforeUnmount(() => {
127
+ if (!f7) return;
128
+ f7.off('sortableEnable', onSortableEnable);
129
+ f7.off('sortableDisable', onSortableDisable);
130
+ f7.off('sortableSort', onSortableSort);
131
+ f7.off('sortableMove', onSortableMove);
132
+ if (!(props.virtualList && f7VirtualList)) return;
133
+ if (f7VirtualList.destroy) f7VirtualList.destroy();
134
+ f7VirtualList = null;
135
+ });
136
+ const classes = computed(() => classNames('list', {
137
+ inset: props.inset,
138
+ 'inset-ios': props.insetIos,
139
+ 'inset-md': props.insetMd,
140
+ 'xsmall-inset': props.xsmallInset,
141
+ 'xsmall-inset-ios': props.xsmallInsetIos,
142
+ 'xsmall-inset-md': props.xsmallInsetMd,
143
+ 'small-inset': props.smallInset,
144
+ 'small-inset-ios': props.smallInsetIos,
145
+ 'small-inset-md': props.smallInsetMd,
146
+ 'medium-inset': props.mediumInset,
147
+ 'medium-inset-ios': props.mediumInsetIos,
148
+ 'medium-inset-md': props.mediumInsetMd,
149
+ 'large-inset': props.largeInset,
150
+ 'large-inset-ios': props.largeInsetIos,
151
+ 'large-inset-md': props.largeInsetMd,
152
+ 'xlarge-inset': props.xlargeInset,
153
+ 'xlarge-inset-ios': props.xlargeInsetIos,
154
+ 'xlarge-inset-md': props.xlargeInsetMd,
155
+ 'list-strong': props.strong,
156
+ 'list-strong-ios': props.strongIos,
157
+ 'list-strong-md': props.strongMd,
158
+ 'list-outline': props.outline,
159
+ 'list-outline-ios': props.outlineIos,
160
+ 'list-outline-md': props.outlineMd,
161
+ 'list-dividers': props.dividers,
162
+ 'list-dividers-ios': props.dividersIos,
163
+ 'list-dividers-md': props.dividersMd,
164
+ 'media-list': props.mediaList,
165
+ 'simple-list': props.simpleList,
166
+ 'links-list': props.linksList,
167
+ 'menu-list': props.menuList,
168
+ sortable: props.sortable,
169
+ 'sortable-tap-hold': props.sortableTapHold,
170
+ 'sortable-enabled': props.sortableEnabled,
171
+ 'sortable-opposite': props.sortableOpposite,
172
+ 'accordion-list': props.accordionList,
173
+ 'accordion-opposite': props.accordionOpposite,
174
+ 'contacts-list': props.contactsList,
175
+ 'virtual-list': props.virtualList,
176
+ tab: props.tab,
177
+ 'tab-active': props.tabActive,
178
+ 'form-store-data': props.formStoreData,
179
+ 'no-chevron': props.noChevron,
180
+ 'chevron-center': props.chevronCenter
181
+ }, colorClasses(props)));
182
+ const ListTag = computed(() => props.form ? 'form' : 'div');
183
+ const ListContext = computed(() => ({
184
+ listIsMedia: props.mediaList,
185
+ listIsSimple: props.simpleList,
186
+ listIsSortable: props.sortable,
187
+ listIsSortableOpposite: props.sortableOpposite
188
+ }));
189
+ provide('ListContext', ListContext);
190
+ return () => {
191
+ const {
192
+ list: slotsList,
193
+ default: slotsDefault
194
+ } = slots;
195
+ const rootChildrenBeforeList = [];
196
+ const rootChildrenAfterList = [];
197
+ const ulChildren = slotsList && typeof slotsList === 'function' ? [slotsList()] : [];
198
+ let wasUlChild = false;
199
+ if (slotsDefault) {
200
+ slotsDefault().forEach(vnode => {
201
+ if (typeof vnode === 'undefined') return;
202
+ const tag = vnode.type && vnode.type.name ? vnode.type.name : vnode.type;
203
+ if (tag && typeof tag === 'symbol') {
204
+ wasUlChild = true;
205
+ ulChildren.push(vnode);
206
+ } else if (!tag || tag && !(tag === 'li' || tag.indexOf('f7-list-item') >= 0 || tag.indexOf('f7-list-button') >= 0 || tag.indexOf('f7-list-input') >= 0)) {
207
+ if (wasUlChild) rootChildrenAfterList.push(vnode);else rootChildrenBeforeList.push(vnode);
208
+ } else if (tag) {
209
+ wasUlChild = true;
210
+ ulChildren.push(vnode);
211
+ }
212
+ });
213
+ }
214
+ return h(ListTag.value, {
215
+ ref: elRef,
216
+ class: classes.value,
217
+ 'data-sortable-move-elements': typeof props.sortableMoveElements !== 'undefined' ? props.sortableMoveElements.toString() : undefined,
218
+ onSubmit
219
+ }, [slots['before-list'] && slots['before-list'](), rootChildrenBeforeList, ulChildren.length > 0 && h('ul', ulChildren), slots['after-list'] && slots['after-list'](), rootChildrenAfterList]);
220
+ };
221
+ }
222
+ };
@@ -0,0 +1,46 @@
1
+
2
+ import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
3
+
4
+
5
+ declare const LoginScreenTitle: DefineComponent<
6
+ {
7
+
8
+ color: {
9
+ type: StringConstructor;
10
+ },
11
+
12
+ colorTheme: {
13
+ type: StringConstructor;
14
+ },
15
+
16
+ textColor: {
17
+ type: StringConstructor;
18
+ },
19
+
20
+ bgColor: {
21
+ type: StringConstructor;
22
+ },
23
+
24
+ borderColor: {
25
+ type: StringConstructor;
26
+ },
27
+
28
+ rippleColor: {
29
+ type: StringConstructor;
30
+ },
31
+
32
+ dark: {
33
+ type: BooleanConstructor;
34
+ }
35
+ },
36
+ () => JSX.Element,
37
+ unknown,
38
+ {},
39
+ {},
40
+ ComponentOptionsMixin,
41
+ ComponentOptionsMixin,
42
+
43
+ >;
44
+
45
+ export default LoginScreenTitle;
46
+
@@ -0,0 +1,22 @@
1
+ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
2
+ function render(_ctx, _cache) {
3
+ return _openBlock(), _createElementBlock("div", {
4
+ class: _normalizeClass(_ctx.classes)
5
+ }, [_renderSlot(_ctx.$slots, "default")], 2);
6
+ }
7
+ import { computed } from 'vue';
8
+ import { classNames } from '../shared/utils.js';
9
+ import { colorClasses, colorProps } from '../shared/mixins.js';
10
+ export default {
11
+ name: 'f7-login-screen-title',
12
+ render,
13
+ props: {
14
+ ...colorProps
15
+ },
16
+ setup(props) {
17
+ const classes = computed(() => classNames('login-screen-title', colorClasses(props)));
18
+ return {
19
+ classes
20
+ };
21
+ }
22
+ };
@@ -0,0 +1,61 @@
1
+
2
+ import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
3
+
4
+
5
+ declare const LoginScreen: DefineComponent<
6
+ {
7
+
8
+ opened: {
9
+ type: BooleanConstructor;
10
+ },
11
+
12
+ animate: {
13
+ type: BooleanConstructor;
14
+ default: undefined;
15
+ },
16
+
17
+ containerEl: {
18
+ type: StringConstructor | ObjectConstructor;
19
+ default: undefined;
20
+ },
21
+
22
+ color: {
23
+ type: StringConstructor;
24
+ },
25
+
26
+ colorTheme: {
27
+ type: StringConstructor;
28
+ },
29
+
30
+ textColor: {
31
+ type: StringConstructor;
32
+ },
33
+
34
+ bgColor: {
35
+ type: StringConstructor;
36
+ },
37
+
38
+ borderColor: {
39
+ type: StringConstructor;
40
+ },
41
+
42
+ rippleColor: {
43
+ type: StringConstructor;
44
+ },
45
+
46
+ dark: {
47
+ type: BooleanConstructor;
48
+ }
49
+ },
50
+ () => JSX.Element,
51
+ unknown,
52
+ {},
53
+ {},
54
+ ComponentOptionsMixin,
55
+ ComponentOptionsMixin,
56
+ ("loginscreen:open" | "loginscreen:opened" | "loginscreen:close" | "loginscreen:closed" | "update:opened")[],
57
+ "loginscreen:open" | "loginscreen:opened" | "loginscreen:close" | "loginscreen:closed" | "update:opened"
58
+ >;
59
+
60
+ export default LoginScreen;
61
+
@@ -0,0 +1,104 @@
1
+ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
2
+ function render(_ctx, _cache) {
3
+ return _openBlock(), _createElementBlock("div", {
4
+ ref: "elRef",
5
+ class: _normalizeClass(_ctx.classes)
6
+ }, [_renderSlot(_ctx.$slots, "default")], 2);
7
+ }
8
+ import { computed, ref, watch, onMounted, onBeforeUnmount } from 'vue';
9
+ import { classNames } from '../shared/utils.js';
10
+ import { colorClasses, colorProps } from '../shared/mixins.js';
11
+ import { f7ready, f7 } from '../shared/f7.js';
12
+ import { modalStateClasses } from '../shared/modal-state-classes.js';
13
+ export default {
14
+ name: 'f7-login-screen',
15
+ render,
16
+ props: {
17
+ opened: Boolean,
18
+ animate: {
19
+ type: Boolean,
20
+ default: undefined
21
+ },
22
+ containerEl: {
23
+ type: [String, Object],
24
+ default: undefined
25
+ },
26
+ ...colorProps
27
+ },
28
+ emits: ['loginscreen:open', 'loginscreen:opened', 'loginscreen:close', 'loginscreen:closed', 'update:opened'],
29
+ setup(props, _ref) {
30
+ let {
31
+ emit
32
+ } = _ref;
33
+ const f7LoginScreen = ref(null);
34
+ // eslint-disable-next-line
35
+ let isOpened = props.opened;
36
+ let isClosing = false;
37
+ const elRef = ref(null);
38
+ const onOpen = instance => {
39
+ isOpened = true;
40
+ isClosing = false;
41
+ emit('loginscreen:open', instance);
42
+ emit('update:opened', true);
43
+ };
44
+ const onOpened = instance => {
45
+ emit('loginscreen:opened', instance);
46
+ };
47
+ const onClose = instance => {
48
+ isOpened = false;
49
+ isClosing = true;
50
+ emit('loginscreen:close', instance);
51
+ };
52
+ const onClosed = instance => {
53
+ isClosing = false;
54
+ emit('loginscreen:closed', instance);
55
+ emit('update:opened', false);
56
+ };
57
+ watch(() => props.opened, value => {
58
+ if (!f7LoginScreen.value) return;
59
+ if (value) {
60
+ f7LoginScreen.value.open();
61
+ } else {
62
+ f7LoginScreen.value.close();
63
+ }
64
+ });
65
+ onMounted(() => {
66
+ if (!elRef.value) return;
67
+ f7ready(() => {
68
+ const loginScreenParams = {
69
+ el: elRef.value,
70
+ on: {
71
+ open: onOpen,
72
+ opened: onOpened,
73
+ close: onClose,
74
+ closed: onClosed
75
+ }
76
+ };
77
+ if (typeof props.animate !== 'undefined') {
78
+ loginScreenParams.animate = props.animate;
79
+ }
80
+ if (typeof props.containerEl !== 'undefined') {
81
+ loginScreenParams.containerEl = props.containerEl;
82
+ }
83
+ f7LoginScreen.value = f7.loginScreen.create(loginScreenParams);
84
+ if (props.opened) {
85
+ f7LoginScreen.value.open(false);
86
+ }
87
+ });
88
+ });
89
+ onBeforeUnmount(() => {
90
+ if (f7LoginScreen.value) {
91
+ f7LoginScreen.value.destroy();
92
+ }
93
+ f7LoginScreen.value = null;
94
+ });
95
+ const classes = computed(() => classNames('login-screen', modalStateClasses({
96
+ isOpened,
97
+ isClosing
98
+ }), colorClasses(props)));
99
+ return {
100
+ elRef,
101
+ classes
102
+ };
103
+ }
104
+ };
@@ -0,0 +1,116 @@
1
+
2
+ import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
3
+
4
+
5
+ declare const Message: DefineComponent<
6
+ {
7
+
8
+ text: {
9
+ type: StringConstructor;
10
+ },
11
+
12
+ name: {
13
+ type: StringConstructor;
14
+ },
15
+
16
+ avatar: {
17
+ type: StringConstructor;
18
+ },
19
+
20
+ image: {
21
+ type: StringConstructor;
22
+ },
23
+
24
+ header: {
25
+ type: StringConstructor;
26
+ },
27
+
28
+ footer: {
29
+ type: StringConstructor;
30
+ },
31
+
32
+ textHeader: {
33
+ type: StringConstructor;
34
+ },
35
+
36
+ textFooter: {
37
+ type: StringConstructor;
38
+ },
39
+
40
+ first: {
41
+ type: BooleanConstructor;
42
+ },
43
+
44
+ last: {
45
+ type: BooleanConstructor;
46
+ },
47
+
48
+ tail: {
49
+ type: BooleanConstructor;
50
+ },
51
+
52
+ sameName: {
53
+ type: BooleanConstructor;
54
+ },
55
+
56
+ sameHeader: {
57
+ type: BooleanConstructor;
58
+ },
59
+
60
+ sameFooter: {
61
+ type: BooleanConstructor;
62
+ },
63
+
64
+ sameAvatar: {
65
+ type: BooleanConstructor;
66
+ },
67
+
68
+ typing: {
69
+ type: BooleanConstructor;
70
+ },
71
+
72
+ type: {
73
+ type: StringConstructor;
74
+ default: string;
75
+ },
76
+
77
+ color: {
78
+ type: StringConstructor;
79
+ },
80
+
81
+ colorTheme: {
82
+ type: StringConstructor;
83
+ },
84
+
85
+ textColor: {
86
+ type: StringConstructor;
87
+ },
88
+
89
+ bgColor: {
90
+ type: StringConstructor;
91
+ },
92
+
93
+ borderColor: {
94
+ type: StringConstructor;
95
+ },
96
+
97
+ rippleColor: {
98
+ type: StringConstructor;
99
+ },
100
+
101
+ dark: {
102
+ type: BooleanConstructor;
103
+ }
104
+ },
105
+ () => JSX.Element,
106
+ unknown,
107
+ {},
108
+ {},
109
+ ComponentOptionsMixin,
110
+ ComponentOptionsMixin,
111
+ ("click" | "click:name" | "click:text" | "click:avatar" | "click:header" | "click:footer" | "click:bubble")[],
112
+ "click" | "click:name" | "click:text" | "click:avatar" | "click:header" | "click:footer" | "click:bubble"
113
+ >;
114
+
115
+ export default Message;
116
+