framework7-vue 7.0.9 → 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.
Files changed (144) hide show
  1. package/components/accordion-content.js +2 -5
  2. package/components/accordion-item.js +0 -13
  3. package/components/accordion-toggle.js +2 -5
  4. package/components/accordion.js +0 -4
  5. package/components/actions-button.d.ts +1 -1
  6. package/components/actions-button.js +2 -9
  7. package/components/actions-group.js +2 -5
  8. package/components/actions-label.d.ts +1 -1
  9. package/components/actions-label.js +2 -8
  10. package/components/actions.js +2 -14
  11. package/components/app.d.ts +7 -12
  12. package/components/app.js +11 -24
  13. package/components/appbar.js +2 -5
  14. package/components/area-chart.js +4 -41
  15. package/components/badge.js +0 -4
  16. package/components/block-footer.js +2 -5
  17. package/components/block-header.js +2 -5
  18. package/components/block-title.js +0 -4
  19. package/components/block.d.ts +61 -9
  20. package/components/block.js +52 -17
  21. package/components/breadcrumbs-collapsed.js +0 -5
  22. package/components/breadcrumbs-item.js +0 -4
  23. package/components/breadcrumbs-separator.js +0 -4
  24. package/components/breadcrumbs.js +0 -4
  25. package/components/button.d.ts +9 -25
  26. package/components/button.js +9 -25
  27. package/components/card-content.js +0 -4
  28. package/components/card-footer.js +2 -5
  29. package/components/card-header.js +2 -5
  30. package/components/card.d.ts +17 -5
  31. package/components/card.js +10 -20
  32. package/components/checkbox.js +0 -7
  33. package/components/chip.d.ts +0 -4
  34. package/components/chip.js +0 -7
  35. package/components/col.js +3 -9
  36. package/components/fab-backdrop.js +2 -5
  37. package/components/fab-button.js +0 -6
  38. package/components/fab-buttons.js +0 -4
  39. package/components/fab.js +0 -9
  40. package/components/gauge.js +0 -4
  41. package/components/icon.d.ts +0 -4
  42. package/components/icon.js +1 -18
  43. package/components/input.js +0 -56
  44. package/components/link.d.ts +0 -4
  45. package/components/link.js +4 -13
  46. package/components/list-button.js +0 -6
  47. package/components/list-group.js +0 -4
  48. package/components/list-index.d.ts +0 -5
  49. package/components/list-index.js +0 -14
  50. package/components/list-input.d.ts +0 -4
  51. package/components/list-input.js +0 -53
  52. package/components/list-item-cell.js +3 -5
  53. package/components/list-item-row.js +3 -5
  54. package/components/list-item.d.ts +0 -4
  55. package/components/list-item.js +9 -52
  56. package/components/list.d.ts +71 -23
  57. package/components/list.js +42 -33
  58. package/components/login-screen-title.js +2 -5
  59. package/components/login-screen.js +2 -17
  60. package/components/menu-dropdown-item.js +1 -6
  61. package/components/menu-dropdown.js +1 -4
  62. package/components/menu-item.js +4 -18
  63. package/components/menu.js +3 -5
  64. package/components/message.js +0 -16
  65. package/components/messagebar-attachment.js +0 -7
  66. package/components/messagebar-attachments.js +2 -5
  67. package/components/messagebar-sheet-image.js +7 -15
  68. package/components/messagebar-sheet-item.js +2 -5
  69. package/components/messagebar-sheet.js +2 -5
  70. package/components/messagebar.js +0 -16
  71. package/components/messages-title.js +2 -5
  72. package/components/messages.js +0 -13
  73. package/components/nav-left.js +0 -9
  74. package/components/nav-right.js +0 -4
  75. package/components/nav-title-large.js +2 -5
  76. package/components/nav-title.js +0 -4
  77. package/components/navbar.d.ts +5 -8
  78. package/components/navbar.js +6 -29
  79. package/components/page-content.js +0 -16
  80. package/components/page.d.ts +0 -4
  81. package/components/page.js +2 -67
  82. package/components/panel.d.ts +4 -0
  83. package/components/panel.js +2 -23
  84. package/components/photo-browser.js +2 -18
  85. package/components/pie-chart.js +4 -20
  86. package/components/popover.d.ts +5 -0
  87. package/components/popover.js +8 -16
  88. package/components/popup.js +3 -19
  89. package/components/preloader.js +4 -23
  90. package/components/progressbar.js +0 -6
  91. package/components/radio.js +0 -7
  92. package/components/range.js +0 -7
  93. package/components/routable-modals.js +0 -7
  94. package/components/row.js +3 -9
  95. package/components/searchbar.d.ts +5 -8
  96. package/components/searchbar.js +7 -28
  97. package/components/segmented.d.ts +0 -12
  98. package/components/segmented.js +2 -12
  99. package/components/sheet.js +2 -18
  100. package/components/stepper.d.ts +0 -20
  101. package/components/stepper.js +1 -27
  102. package/components/subnavbar.js +0 -4
  103. package/components/swipeout-actions.js +0 -6
  104. package/components/swipeout-button.js +0 -6
  105. package/components/tab.js +2 -15
  106. package/components/tabs.js +0 -4
  107. package/components/text-editor.js +0 -17
  108. package/components/toggle.js +0 -9
  109. package/components/toolbar.d.ts +4 -21
  110. package/components/toolbar.js +12 -34
  111. package/components/treeview-item.d.ts +0 -4
  112. package/components/treeview-item.js +0 -13
  113. package/components/treeview.js +2 -5
  114. package/components/use-icon.js +0 -4
  115. package/components/view.d.ts +0 -28
  116. package/components/view.js +4 -50
  117. package/components/views.js +0 -4
  118. package/framework7-vue-bundle.js +3 -21
  119. package/framework7-vue-web-types.json +85 -644
  120. package/framework7-vue.d.ts +2 -12
  121. package/framework7-vue.js +3 -12
  122. package/package.json +1 -1
  123. package/shared/components-router.js +0 -32
  124. package/shared/f7.js +5 -19
  125. package/shared/get-router-initial-component.js +0 -4
  126. package/shared/mixins.js +3 -15
  127. package/shared/plugin.js +2 -8
  128. package/shared/router-open-in.js +4 -13
  129. package/shared/use-icon.js +1 -6
  130. package/shared/use-smart-select.js +0 -1
  131. package/shared/use-store.js +2 -6
  132. package/shared/use-tab.js +0 -2
  133. package/shared/use-theme.js +0 -2
  134. package/shared/use-tooltip.js +0 -2
  135. package/shared/utils.js +0 -14
  136. package/components/appbar.d.ts +0 -67
  137. package/components/col.d.ts +0 -94
  138. package/components/list-item-cell.d.ts +0 -46
  139. package/components/list-item-row.d.ts +0 -46
  140. package/components/menu-dropdown-item.d.ts +0 -223
  141. package/components/menu-dropdown.d.ts +0 -66
  142. package/components/menu-item.d.ts +0 -267
  143. package/components/menu.d.ts +0 -46
  144. package/components/row.d.ts +0 -73
@@ -1,12 +1,10 @@
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
  ref: "elRef",
6
5
  class: _normalizeClass(_ctx.classes)
7
6
  }, [_renderSlot(_ctx.$slots, "default")], 2);
8
7
  }
9
-
10
8
  import { computed, ref, onMounted, onBeforeUnmount, watch } from 'vue';
11
9
  import { classNames } from '../shared/utils.js';
12
10
  import { colorClasses, colorProps } from '../shared/mixins.js';
@@ -40,31 +38,23 @@ export default {
40
38
  type: Number,
41
39
  default: 14
42
40
  },
43
- auroraItemHeight: {
44
- type: Number,
45
- default: 14
46
- },
47
41
  ...colorProps
48
42
  },
49
43
  emits: ['listindex:select'],
50
-
51
44
  setup(props, _ref) {
52
45
  let {
53
46
  emit
54
47
  } = _ref;
55
48
  let f7ListIndex = null;
56
49
  const elRef = ref(null);
57
-
58
50
  const update = () => {
59
51
  if (!f7ListIndex) return;
60
52
  f7ListIndex.update();
61
53
  };
62
-
63
54
  const scrollListToIndex = indexContent => {
64
55
  if (!f7ListIndex) return;
65
56
  f7ListIndex.scrollListToIndex(indexContent);
66
57
  };
67
-
68
58
  watch(() => props.indexes, newValue => {
69
59
  if (!f7ListIndex) return;
70
60
  f7ListIndex.params.indexes = newValue;
@@ -79,14 +69,12 @@ export default {
79
69
  indexes: props.indexes,
80
70
  iosItemHeight: props.iosItemHeight,
81
71
  mdItemHeight: props.mdItemHeight,
82
- auroraItemHeight: props.auroraItemHeight,
83
72
  scrollList: props.scrollList,
84
73
  label: props.label,
85
74
  on: {
86
75
  select(index, itemContent, itemIndex) {
87
76
  emit('listindex:select', itemContent, itemIndex);
88
77
  }
89
-
90
78
  }
91
79
  });
92
80
  });
@@ -95,7 +83,6 @@ export default {
95
83
  if (f7ListIndex && f7ListIndex.destroy) {
96
84
  f7ListIndex.destroy();
97
85
  }
98
-
99
86
  f7ListIndex = null;
100
87
  });
101
88
  const classes = computed(() => classNames('list-index', colorClasses(props)));
@@ -106,5 +93,4 @@ export default {
106
93
  scrollListToIndex
107
94
  };
108
95
  }
109
-
110
96
  };
@@ -157,10 +157,6 @@ declare const ListInput: DefineComponent<
157
157
  type: StringConstructor | NumberConstructor;
158
158
  },
159
159
 
160
- inlineLabel: {
161
- type: BooleanConstructor;
162
- },
163
-
164
160
  floatingLabel: {
165
161
  type: BooleanConstructor;
166
162
  },
@@ -73,7 +73,6 @@ export default {
73
73
  outline: Boolean,
74
74
  // Label
75
75
  label: [String, Number],
76
- inlineLabel: Boolean,
77
76
  floatingLabel: Boolean,
78
77
  // Datepicker
79
78
  calendarParams: Object,
@@ -84,7 +83,6 @@ export default {
84
83
  ...colorProps
85
84
  },
86
85
  emits: ['textarea:resize', 'input:notempty', 'input:empty', 'input:clear', 'texteditor:change', 'calendar:change', 'colorpicker:change', 'change', 'focus', 'blur', 'input', 'update:value'],
87
-
88
86
  setup(props, _ref) {
89
87
  let {
90
88
  emit,
@@ -106,113 +104,87 @@ export default {
106
104
  const inputElRef = ref(null);
107
105
  const itemContentElRef = ref(null);
108
106
  let updateInputOnDidUpdate = false;
109
-
110
107
  const getDomValue = () => {
111
108
  if (!inputElRef.value) return undefined;
112
109
  return inputElRef.value.value;
113
110
  };
114
-
115
111
  const domValue = ref(getDomValue());
116
112
  const inputHasValue = computed(() => {
117
113
  if (props.type === 'datepicker' && Array.isArray(props.value) && props.value.length === 0) {
118
114
  return false;
119
115
  }
120
-
121
116
  return typeof props.value === 'undefined' ? domValue.value || domValue.value === 0 : props.value || props.value === 0;
122
117
  });
123
-
124
118
  const validateInput = () => {
125
119
  if (!f7 || !inputElRef.value) return;
126
120
  const validity = inputElRef.value.validity;
127
121
  if (!validity) return;
128
-
129
122
  if (!validity.valid) {
130
123
  if (props.onValidate) props.onValidate(false);
131
-
132
124
  if (inputInvalid.value !== true) {
133
125
  inputInvalid.value = true;
134
126
  }
135
127
  } else {
136
128
  if (props.onValidate) props.onValidate(true);
137
-
138
129
  if (inputInvalid.value !== false) {
139
130
  inputInvalid.value = false;
140
131
  }
141
132
  }
142
133
  };
143
-
144
134
  const onTextareaResize = event => {
145
135
  emit('textarea:resize', event);
146
136
  };
147
-
148
137
  const onInputNotEmpty = event => {
149
138
  emit('input:notempty', event);
150
139
  };
151
-
152
140
  const onInputEmpty = event => {
153
141
  emit('input:empty', event);
154
142
  };
155
-
156
143
  const onInputClear = event => {
157
144
  emit('input:clear', event);
158
145
  };
159
-
160
146
  const onInput = function () {
161
147
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
162
148
  args[_key] = arguments[_key];
163
149
  }
164
-
165
150
  emit('input', ...args);
166
-
167
151
  if (inputElRef.value) {
168
152
  domValue.value = inputElRef.value.value;
169
153
  }
170
-
171
154
  if (!(props.validateOnBlur || props.validateOnBlur === '') && (props.validate || props.validate === '') && inputElRef.value) {
172
155
  validateInput(inputElRef.value);
173
156
  }
174
-
175
157
  if (inputElRef.value && props.type !== 'texteditor' && props.type !== 'colorpicker' && props.type !== 'datepicker') {
176
158
  emit('update:value', inputElRef.value.value);
177
159
  }
178
160
  };
179
-
180
161
  const onFocus = function () {
181
162
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
182
163
  args[_key2] = arguments[_key2];
183
164
  }
184
-
185
165
  emit('focus', ...args);
186
166
  inputFocused.value = true;
187
167
  };
188
-
189
168
  const onBlur = function () {
190
169
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
191
170
  args[_key3] = arguments[_key3];
192
171
  }
193
-
194
172
  emit('blur', ...args);
195
-
196
173
  if ((props.validate || props.validate === '' || props.validateOnBlur || props.validateOnBlur === '') && inputElRef.value) {
197
174
  validateInput(inputElRef.value);
198
175
  }
199
-
200
176
  inputFocused.value = false;
201
177
  };
202
-
203
178
  const onChange = function () {
204
179
  for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
205
180
  args[_key4] = arguments[_key4];
206
181
  }
207
-
208
182
  emit('change', ...args);
209
-
210
183
  if (props.type === 'texteditor') {
211
184
  emit('texteditor:change', args[0]);
212
185
  emit('update:value', args[0]);
213
186
  }
214
187
  };
215
-
216
188
  onMounted(() => {
217
189
  if (!elRef.value && !itemContentElRef.value) return;
218
190
  f7ready(() => {
@@ -221,7 +193,6 @@ export default {
221
193
  inputElRef.value.addEventListener('textarea:resize', onTextareaResize, false);
222
194
  inputElRef.value.addEventListener('input:empty', onInputEmpty, false);
223
195
  inputElRef.value.addEventListener('input:clear', onInputClear, false);
224
-
225
196
  if (props.type === 'datepicker') {
226
197
  f7Calendar = f7.calendar.create({
227
198
  inputEl: inputElRef.value,
@@ -231,12 +202,10 @@ export default {
231
202
  emit('update:value', calendarValue);
232
203
  emit('calendar:change', calendarValue);
233
204
  }
234
-
235
205
  },
236
206
  ...(props.calendarParams || {})
237
207
  });
238
208
  }
239
-
240
209
  if (props.type === 'colorpicker') {
241
210
  f7ColorPicker = f7.colorPicker.create({
242
211
  inputEl: inputElRef.value,
@@ -246,18 +215,15 @@ export default {
246
215
  emit('update:value', colorPickerValue);
247
216
  emit('colorpicker:change', colorPickerValue);
248
217
  }
249
-
250
218
  },
251
219
  ...(props.colorPickerParams || {})
252
220
  });
253
221
  }
254
-
255
222
  if (!(props.validateOnBlur || props.validateOnBlur === '') && (props.validate || props.validate === '') && typeof props.value !== 'undefined' && props.value !== null && props.value !== '') {
256
223
  setTimeout(() => {
257
224
  validateInput();
258
225
  }, 0);
259
226
  }
260
-
261
227
  if (props.type === 'textarea' && props.resizable) {
262
228
  f7.input.resizeTextarea(inputElRef.value);
263
229
  }
@@ -270,12 +236,10 @@ export default {
270
236
  inputElRef.value.removeEventListener('input:empty', onInputEmpty, false);
271
237
  inputElRef.value.removeEventListener('input:clear', onInputClear, false);
272
238
  }
273
-
274
239
  if (f7Calendar && f7Calendar.destroy) {
275
240
  f7Calendar.destroy();
276
241
  f7Calendar = null;
277
242
  }
278
-
279
243
  if (f7ColorPicker && f7ColorPicker.destroy) {
280
244
  f7ColorPicker.destroy();
281
245
  f7ColorPicker = null;
@@ -283,15 +247,12 @@ export default {
283
247
  });
284
248
  onUpdated(() => {
285
249
  if (!f7) return;
286
-
287
250
  if (updateInputOnDidUpdate) {
288
251
  if (!inputElRef.value) return;
289
252
  updateInputOnDidUpdate = false;
290
-
291
253
  if (props.validate && !props.validateOnBlur) {
292
254
  validateInput();
293
255
  }
294
-
295
256
  if (props.type === 'textarea' && props.resizable) {
296
257
  f7.input.resizeTextarea(inputElRef.value);
297
258
  }
@@ -308,26 +269,21 @@ export default {
308
269
  watch(() => props.value, newValue => {
309
270
  if (!f7) return;
310
271
  updateInputOnDidUpdate = true;
311
-
312
272
  if (f7Calendar) {
313
273
  f7Calendar.setValue(newValue);
314
274
  }
315
-
316
275
  if (f7ColorPicker) {
317
276
  f7ColorPicker.setValue(newValue);
318
277
  }
319
278
  });
320
279
  const isSortableComputed = computed(() => props.sortable === true || props.sortable === false ? props.sortable : ListContext.value.listIsSortable || false);
321
-
322
280
  const createInput = (InputTag, children) => {
323
281
  const needsValue = props.type !== 'file' && props.type !== 'datepicker' && props.type !== 'colorpicker';
324
282
  const needsType = InputTag === 'input';
325
283
  let inputType = props.type;
326
-
327
284
  if (inputType === 'datepicker' || inputType === 'colorpicker') {
328
285
  inputType = 'text';
329
286
  }
330
-
331
287
  const inputClassName = classNames({
332
288
  resizable: inputType === 'textarea' && props.resizable,
333
289
  'no-store-data': props.noFormStoreData || props.noStoreData || props.ignoreStoreData,
@@ -336,17 +292,13 @@ export default {
336
292
  'input-focused': inputFocused.value
337
293
  });
338
294
  let inputValue;
339
-
340
295
  if (needsValue) {
341
296
  if (typeof props.value !== 'undefined') inputValue = props.value;else inputValue = domValue.value;
342
297
  }
343
-
344
298
  const valueProps = {};
345
-
346
299
  if (props.type !== 'datepicker' && props.type !== 'colorpicker') {
347
300
  if ('value' in props) valueProps.value = inputValue;
348
301
  }
349
-
350
302
  const inputProps = noUndefinedProps({
351
303
  name: props.name,
352
304
  type: needsType ? inputType : undefined,
@@ -389,10 +341,8 @@ export default {
389
341
  ...valueProps
390
342
  }, [children]);
391
343
  };
392
-
393
344
  return () => {
394
345
  let inputEl;
395
-
396
346
  if (props.input) {
397
347
  if (props.type === 'select' || props.type === 'textarea' || props.type === 'file') {
398
348
  if (props.type === 'select') {
@@ -417,14 +367,12 @@ export default {
417
367
  inputEl = createInput('input');
418
368
  }
419
369
  }
420
-
421
370
  const hasErrorMessage = !!props.errorMessage || slots['error-message'];
422
371
  const ItemContent = h('div', {
423
372
  ref: itemContentElRef,
424
373
  class: classNames('item-content item-input', !props.wrap && {
425
374
  disabled: props.disabled
426
375
  }, !props.wrap && colorClasses(props), {
427
- 'inline-label': props.inlineLabel,
428
376
  'item-input-outline': props.outline,
429
377
  'item-input-focused': inputFocused.value,
430
378
  'item-input-with-info': !!props.info || slots.info,
@@ -464,5 +412,4 @@ export default {
464
412
  }), slots.root && slots.root(), slots['root-end'] && slots['root-end']()]);
465
413
  };
466
414
  }
467
-
468
415
  };
@@ -1,9 +1,8 @@
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
- }, [_renderSlot(_ctx.$slots, "default")], 2);
5
+ }, [_renderSlot(_ctx.$slots, "default")], 2 /* CLASS */);
7
6
  }
8
7
 
9
8
  import { computed } from 'vue';
@@ -12,14 +11,13 @@ import { colorClasses, colorProps } from '../shared/mixins.js';
12
11
  export default {
13
12
  name: 'f7-list-item-cell',
14
13
  render,
15
- props: { ...colorProps
14
+ props: {
15
+ ...colorProps
16
16
  },
17
-
18
17
  setup(props) {
19
18
  const classes = computed(() => classNames('item-cell', colorClasses(props)));
20
19
  return {
21
20
  classes
22
21
  };
23
22
  }
24
-
25
23
  };
@@ -1,9 +1,8 @@
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
- }, [_renderSlot(_ctx.$slots, "default")], 2);
5
+ }, [_renderSlot(_ctx.$slots, "default")], 2 /* CLASS */);
7
6
  }
8
7
 
9
8
  import { computed } from 'vue';
@@ -12,14 +11,13 @@ import { colorClasses, colorProps } from '../shared/mixins.js';
12
11
  export default {
13
12
  name: 'f7-list-item-row',
14
13
  render,
15
- props: { ...colorProps
14
+ props: {
15
+ ...colorProps
16
16
  },
17
-
18
17
  setup(props) {
19
18
  const classes = computed(() => classNames('item-row', colorClasses(props)));
20
19
  return {
21
20
  classes
22
21
  };
23
22
  }
24
-
25
23
  };
@@ -77,10 +77,6 @@ declare const ListItem: DefineComponent<
77
77
  type: BooleanConstructor;
78
78
  },
79
79
 
80
- divider: {
81
- type: BooleanConstructor;
82
- },
83
-
84
80
  groupTitle: {
85
81
  type: BooleanConstructor;
86
82
  },