@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,46 @@
1
+
2
+ import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
3
+
4
+
5
+ declare const CardFooter: 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 CardFooter;
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-card-footer',
12
+ render,
13
+ props: {
14
+ ...colorProps
15
+ },
16
+ setup(props) {
17
+ const classes = computed(() => classNames('card-footer', colorClasses(props)));
18
+ return {
19
+ classes
20
+ };
21
+ }
22
+ };
@@ -0,0 +1,46 @@
1
+
2
+ import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
3
+
4
+
5
+ declare const CardHeader: 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 CardHeader;
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-card-header',
12
+ render,
13
+ props: {
14
+ ...colorProps
15
+ },
16
+ setup(props) {
17
+ const classes = computed(() => classNames('card-header', colorClasses(props)));
18
+ return {
19
+ classes
20
+ };
21
+ }
22
+ };
@@ -0,0 +1,145 @@
1
+
2
+ import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
3
+
4
+
5
+ declare const Card: DefineComponent<
6
+ {
7
+
8
+ title: {
9
+ type: StringConstructor | NumberConstructor;
10
+ },
11
+
12
+ content: {
13
+ type: StringConstructor | NumberConstructor;
14
+ },
15
+
16
+ footer: {
17
+ type: StringConstructor | NumberConstructor;
18
+ },
19
+
20
+ raised: {
21
+ type: BooleanConstructor;
22
+ },
23
+
24
+ outline: {
25
+ type: BooleanConstructor;
26
+ },
27
+
28
+ outlineIos: {
29
+ type: BooleanConstructor;
30
+ },
31
+
32
+ outlineMd: {
33
+ type: BooleanConstructor;
34
+ },
35
+
36
+ headerDivider: {
37
+ type: BooleanConstructor;
38
+ },
39
+
40
+ footerDivider: {
41
+ type: BooleanConstructor;
42
+ },
43
+
44
+ expandable: {
45
+ type: BooleanConstructor;
46
+ },
47
+
48
+ expandableAnimateWidth: {
49
+ type: BooleanConstructor;
50
+ },
51
+
52
+ expandableOpened: {
53
+ type: BooleanConstructor;
54
+ },
55
+
56
+ animate: {
57
+ type: BooleanConstructor;
58
+ default: undefined;
59
+ },
60
+
61
+ hideNavbarOnOpen: {
62
+ type: BooleanConstructor;
63
+ default: undefined;
64
+ },
65
+
66
+ hideToolbarOnOpen: {
67
+ type: BooleanConstructor;
68
+ default: undefined;
69
+ },
70
+
71
+ hideStatusbarOnOpen: {
72
+ type: BooleanConstructor;
73
+ default: undefined;
74
+ },
75
+
76
+ scrollableEl: {
77
+ type: StringConstructor;
78
+ default: undefined;
79
+ },
80
+
81
+ swipeToClose: {
82
+ type: BooleanConstructor;
83
+ default: undefined;
84
+ },
85
+
86
+ closeByBackdropClick: {
87
+ type: BooleanConstructor;
88
+ default: undefined;
89
+ },
90
+
91
+ backdrop: {
92
+ type: BooleanConstructor;
93
+ default: undefined;
94
+ },
95
+
96
+ backdropEl: {
97
+ type: StringConstructor;
98
+ default: undefined;
99
+ },
100
+
101
+ padding: {
102
+ type: BooleanConstructor;
103
+ default: boolean;
104
+ },
105
+
106
+ color: {
107
+ type: StringConstructor;
108
+ },
109
+
110
+ colorTheme: {
111
+ type: StringConstructor;
112
+ },
113
+
114
+ textColor: {
115
+ type: StringConstructor;
116
+ },
117
+
118
+ bgColor: {
119
+ type: StringConstructor;
120
+ },
121
+
122
+ borderColor: {
123
+ type: StringConstructor;
124
+ },
125
+
126
+ rippleColor: {
127
+ type: StringConstructor;
128
+ },
129
+
130
+ dark: {
131
+ type: BooleanConstructor;
132
+ }
133
+ },
134
+ () => JSX.Element,
135
+ unknown,
136
+ {},
137
+ {},
138
+ ComponentOptionsMixin,
139
+ ComponentOptionsMixin,
140
+ ("card:beforeopen" | "card:open" | "card:opened" | "card:close" | "card:closed" | "update:expandableOpened")[],
141
+ "card:beforeopen" | "card:open" | "card:opened" | "card:close" | "card:closed" | "update:expandableOpened"
142
+ >;
143
+
144
+ export default Card;
145
+
@@ -0,0 +1,192 @@
1
+ import { toDisplayString as _toDisplayString, renderSlot as _renderSlot, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from "vue";
2
+ const _hoisted_1 = ["data-animate", "data-hide-navbar-on-open", "data-hide-toolbar-on-open", "data-hide-statusbar-on-open", "data-scrollable-el", "data-swipe-to-close", "data-close-by-backdrop-click", "data-backdrop", "data-backdrop-el"];
3
+ function render(_ctx, _cache) {
4
+ const _component_f7_card_header = _resolveComponent("f7-card-header");
5
+ const _component_f7_card_content = _resolveComponent("f7-card-content");
6
+ const _component_f7_card_footer = _resolveComponent("f7-card-footer");
7
+ return _openBlock(), _createElementBlock("div", {
8
+ ref: "elRef",
9
+ class: _normalizeClass(_ctx.classes),
10
+ "data-animate": typeof _ctx.animate === 'undefined' ? _ctx.animate : _ctx.animate.toString(),
11
+ "data-hide-navbar-on-open": typeof _ctx.hideNavbarOnOpen === 'undefined' ? _ctx.hideNavbarOnOpen : _ctx.hideNavbarOnOpen.toString(),
12
+ "data-hide-toolbar-on-open": typeof _ctx.hideToolbarOnOpen === 'undefined' ? _ctx.hideToolbarOnOpen : _ctx.hideToolbarOnOpen.toString(),
13
+ "data-hide-statusbar-on-open": typeof _ctx.hideStatusbarOnOpen === 'undefined' ? _ctx.hideStatusbarOnOpen : _ctx.hideStatusbarOnOpen.toString(),
14
+ "data-scrollable-el": _ctx.scrollableEl,
15
+ "data-swipe-to-close": typeof _ctx.swipeToClose === 'undefined' ? _ctx.swipeToClose : _ctx.swipeToClose.toString(),
16
+ "data-close-by-backdrop-click": typeof _ctx.closeByBackdropClick === 'undefined' ? _ctx.closeByBackdropClick : _ctx.closeByBackdropClick.toString(),
17
+ "data-backdrop": typeof _ctx.backdrop === 'undefined' ? _ctx.backdrop : _ctx.backdrop.toString(),
18
+ "data-backdrop-el": _ctx.backdropEl
19
+ }, [_ctx.hasHeader ? (_openBlock(), _createBlock(_component_f7_card_header, {
20
+ key: 0
21
+ }, {
22
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.title) + " ", 1), _renderSlot(_ctx.$slots, "header")]),
23
+ _: 3
24
+ })) : _createCommentVNode("", true), _ctx.hasContent ? (_openBlock(), _createBlock(_component_f7_card_content, {
25
+ key: 1,
26
+ padding: _ctx.padding
27
+ }, {
28
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.content) + " ", 1), _renderSlot(_ctx.$slots, "content")]),
29
+ _: 3
30
+ }, 8, ["padding"])) : _createCommentVNode("", true), _ctx.hasFooter ? (_openBlock(), _createBlock(_component_f7_card_footer, {
31
+ key: 2
32
+ }, {
33
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.footer) + " ", 1), _renderSlot(_ctx.$slots, "footer")]),
34
+ _: 3
35
+ })) : _createCommentVNode("", true), _renderSlot(_ctx.$slots, "default")], 10, _hoisted_1);
36
+ }
37
+ import { computed, ref, onMounted, onBeforeUnmount, watch } from 'vue';
38
+ import { classNames } from '../shared/utils.js';
39
+ import { colorClasses, colorProps } from '../shared/mixins.js';
40
+ import { f7, f7ready } from '../shared/f7.js';
41
+ import f7CardHeader from './card-header.js';
42
+ import f7CardContent from './card-content.js';
43
+ import f7CardFooter from './card-footer.js';
44
+ export default {
45
+ name: 'f7-card',
46
+ render,
47
+ components: {
48
+ f7CardHeader,
49
+ f7CardContent,
50
+ f7CardFooter
51
+ },
52
+ props: {
53
+ title: [String, Number],
54
+ content: [String, Number],
55
+ footer: [String, Number],
56
+ raised: Boolean,
57
+ outline: Boolean,
58
+ outlineIos: Boolean,
59
+ outlineMd: Boolean,
60
+ headerDivider: Boolean,
61
+ footerDivider: Boolean,
62
+ expandable: Boolean,
63
+ expandableAnimateWidth: Boolean,
64
+ expandableOpened: Boolean,
65
+ animate: {
66
+ type: Boolean,
67
+ default: undefined
68
+ },
69
+ hideNavbarOnOpen: {
70
+ type: Boolean,
71
+ default: undefined
72
+ },
73
+ hideToolbarOnOpen: {
74
+ type: Boolean,
75
+ default: undefined
76
+ },
77
+ hideStatusbarOnOpen: {
78
+ type: Boolean,
79
+ default: undefined
80
+ },
81
+ scrollableEl: {
82
+ type: String,
83
+ default: undefined
84
+ },
85
+ swipeToClose: {
86
+ type: Boolean,
87
+ default: undefined
88
+ },
89
+ closeByBackdropClick: {
90
+ type: Boolean,
91
+ default: undefined
92
+ },
93
+ backdrop: {
94
+ type: Boolean,
95
+ default: undefined
96
+ },
97
+ backdropEl: {
98
+ type: String,
99
+ default: undefined
100
+ },
101
+ padding: {
102
+ type: Boolean,
103
+ default: true
104
+ },
105
+ ...colorProps
106
+ },
107
+ emits: ['card:beforeopen', 'card:open', 'card:opened', 'card:close', 'card:closed', 'update:expandableOpened'],
108
+ setup(props, _ref) {
109
+ let {
110
+ emit,
111
+ slots
112
+ } = _ref;
113
+ const elRef = ref(null);
114
+ const open = () => {
115
+ if (!elRef.value) return;
116
+ f7.card.open(elRef.value);
117
+ };
118
+ const close = () => {
119
+ if (!elRef.value) return;
120
+ f7.card.close(elRef.value);
121
+ };
122
+ const onBeforeOpen = (el, prevent) => {
123
+ if (elRef.value !== el) return;
124
+ emit('card:beforeopen', el, prevent);
125
+ };
126
+ const onOpen = el => {
127
+ if (elRef.value !== el) return;
128
+ emit('card:open', el);
129
+ emit('update:expandableOpened', true);
130
+ };
131
+ const onOpened = (el, pageEl) => {
132
+ if (elRef.value !== el) return;
133
+ emit('card:opened', el, pageEl);
134
+ };
135
+ const onClose = el => {
136
+ if (elRef.value !== el) return;
137
+ emit('card:close', el);
138
+ };
139
+ const onClosed = (el, pageEl) => {
140
+ if (elRef.value !== el) return;
141
+ emit('card:closed', el, pageEl);
142
+ emit('update:expandableOpened', false);
143
+ };
144
+ onMounted(() => {
145
+ if (!props.expandable || !elRef.value) return;
146
+ f7ready(() => {
147
+ if (props.expandable && props.expandableOpened) {
148
+ f7.card.open(elRef.value, false);
149
+ }
150
+ f7.on('cardBeforeOpen', onBeforeOpen);
151
+ f7.on('cardOpen', onOpen);
152
+ f7.on('cardOpened', onOpened);
153
+ f7.on('cardClose', onClose);
154
+ f7.on('cardClosed', onClosed);
155
+ });
156
+ });
157
+ onBeforeUnmount(() => {
158
+ f7.off('cardBeforeOpen', onBeforeOpen);
159
+ f7.off('cardOpen', onOpen);
160
+ f7.off('cardOpened', onOpened);
161
+ f7.off('cardClose', onClose);
162
+ f7.off('cardClosed', onClosed);
163
+ });
164
+ watch(() => props.expandableOpened, value => {
165
+ if (value) {
166
+ open();
167
+ } else {
168
+ close();
169
+ }
170
+ });
171
+ const hasHeader = computed(() => props.title || slots.header);
172
+ const hasContent = computed(() => props.content || slots.content);
173
+ const hasFooter = computed(() => props.footer || slots.footer);
174
+ const classes = computed(() => classNames('card', {
175
+ 'card-raised': props.raised,
176
+ 'card-outline': props.outline,
177
+ 'card-outline-ios': props.outlineIos,
178
+ 'card-outline-md': props.outlineMd,
179
+ 'card-expandable': props.expandable,
180
+ 'card-expandable-animate-width': props.expandableAnimateWidth,
181
+ 'card-header-divider': props.headerDivider,
182
+ 'card-footer-divider': props.footerDivider
183
+ }, colorClasses(props)));
184
+ return {
185
+ elRef,
186
+ classes,
187
+ hasHeader,
188
+ hasContent,
189
+ hasFooter
190
+ };
191
+ }
192
+ };
@@ -0,0 +1,72 @@
1
+
2
+ import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
3
+
4
+
5
+ declare const Checkbox: DefineComponent<
6
+ {
7
+
8
+ checked: {
9
+ type: BooleanConstructor;
10
+ },
11
+
12
+ indeterminate: {
13
+ type: BooleanConstructor;
14
+ },
15
+
16
+ name: {
17
+ type: NumberConstructor | StringConstructor;
18
+ },
19
+
20
+ disabled: {
21
+ type: BooleanConstructor;
22
+ },
23
+
24
+ readonly: {
25
+ type: BooleanConstructor;
26
+ },
27
+
28
+ value: {
29
+ type: NumberConstructor | StringConstructor | BooleanConstructor;
30
+ default: undefined;
31
+ },
32
+
33
+ color: {
34
+ type: StringConstructor;
35
+ },
36
+
37
+ colorTheme: {
38
+ type: StringConstructor;
39
+ },
40
+
41
+ textColor: {
42
+ type: StringConstructor;
43
+ },
44
+
45
+ bgColor: {
46
+ type: StringConstructor;
47
+ },
48
+
49
+ borderColor: {
50
+ type: StringConstructor;
51
+ },
52
+
53
+ rippleColor: {
54
+ type: StringConstructor;
55
+ },
56
+
57
+ dark: {
58
+ type: BooleanConstructor;
59
+ }
60
+ },
61
+ () => JSX.Element,
62
+ unknown,
63
+ {},
64
+ {},
65
+ ComponentOptionsMixin,
66
+ ComponentOptionsMixin,
67
+ ("update:checked" | "change")[],
68
+ "update:checked" | "change"
69
+ >;
70
+
71
+ export default Checkbox;
72
+
@@ -0,0 +1,70 @@
1
+ import { createElementVNode as _createElementVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
2
+ const _hoisted_1 = ["name", "value", "disabled", "readonly", "checked"];
3
+ const _hoisted_2 = /*#__PURE__*/_createElementVNode("i", {
4
+ class: "icon-checkbox"
5
+ }, null, -1);
6
+ function render(_ctx, _cache) {
7
+ return _openBlock(), _createElementBlock("label", {
8
+ class: _normalizeClass(_ctx.classes)
9
+ }, [_createElementVNode("input", {
10
+ ref: "inputElRef",
11
+ type: "checkbox",
12
+ name: _ctx.name,
13
+ value: _ctx.value,
14
+ disabled: _ctx.disabled,
15
+ readonly: _ctx.readonly,
16
+ checked: _ctx.checked,
17
+ onChange: _cache[0] || (_cache[0] = function () {
18
+ return _ctx.onChange && _ctx.onChange(...arguments);
19
+ })
20
+ }, null, 40, _hoisted_1), _hoisted_2, _renderSlot(_ctx.$slots, "default")], 2);
21
+ }
22
+ import { ref, computed, onMounted, watch } from 'vue';
23
+ import { classNames } from '../shared/utils.js';
24
+ import { colorClasses, colorProps } from '../shared/mixins.js';
25
+ export default {
26
+ name: 'f7-checkbox',
27
+ render,
28
+ props: {
29
+ checked: Boolean,
30
+ indeterminate: Boolean,
31
+ name: [Number, String],
32
+ value: {
33
+ type: [Number, String, Boolean],
34
+ default: undefined
35
+ },
36
+ disabled: Boolean,
37
+ readonly: Boolean,
38
+ ...colorProps
39
+ },
40
+ emits: ['update:checked', 'change'],
41
+ setup(props, _ref) {
42
+ let {
43
+ emit
44
+ } = _ref;
45
+ const inputElRef = ref(null);
46
+ const onChange = event => {
47
+ emit('update:checked', event.target.checked);
48
+ emit('change', event);
49
+ };
50
+ onMounted(() => {
51
+ if (inputElRef.value) {
52
+ inputElRef.value.indeterminate = !!props.indeterminate;
53
+ }
54
+ });
55
+ watch(() => props.indeterminate, newValue => {
56
+ if (inputElRef.value) {
57
+ inputElRef.value.indeterminate = !!newValue;
58
+ }
59
+ });
60
+ const classes = computed(() => classNames({
61
+ checkbox: true,
62
+ disabled: props.disabled
63
+ }, colorClasses(props)));
64
+ return {
65
+ inputElRef,
66
+ classes,
67
+ onChange
68
+ };
69
+ }
70
+ };