framework7-vue 8.0.0-beta.4 → 8.0.0-beta.5

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.
@@ -9,31 +9,16 @@ declare const App: DefineComponent<
9
9
  type: ObjectConstructor;
10
10
  },
11
11
 
12
- id: {
13
- type: any;
14
- default: undefined;
15
- },
16
-
17
12
  name: {
18
13
  type: any;
19
14
  default: undefined;
20
15
  },
21
16
 
22
- version: {
23
- type: any;
24
- default: undefined;
25
- },
26
-
27
17
  theme: {
28
18
  type: any;
29
19
  default: undefined;
30
20
  },
31
21
 
32
- language: {
33
- type: any;
34
- default: undefined;
35
- },
36
-
37
22
  routes: {
38
23
  type: any;
39
24
  default: () => [];
package/components/app.js CHANGED
@@ -20,26 +20,14 @@ export default {
20
20
  },
21
21
  inheritAttrs: false,
22
22
  props: {
23
- id: {
24
- type: String,
25
- default: undefined
26
- },
27
23
  name: {
28
24
  type: String,
29
25
  default: undefined
30
26
  },
31
- version: {
32
- type: String,
33
- default: undefined
34
- },
35
27
  theme: {
36
28
  type: String,
37
29
  default: undefined
38
30
  },
39
- language: {
40
- type: String,
41
- default: undefined
42
- },
43
31
  routes: {
44
32
  type: Array,
45
33
  default: () => []
@@ -19,7 +19,7 @@ declare const Popover: DefineComponent<
19
19
  default: undefined;
20
20
  },
21
21
 
22
- angle: {
22
+ arrow: {
23
23
  type: BooleanConstructor;
24
24
  default: undefined;
25
25
  },
@@ -1,6 +1,6 @@
1
1
  import { createElementVNode as _createElementVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
2
2
  const _hoisted_1 = /*#__PURE__*/_createElementVNode("div", {
3
- class: "popover-angle"
3
+ class: "popover-arrow"
4
4
  }, null, -1);
5
5
  const _hoisted_2 = {
6
6
  class: "popover-inner"
@@ -29,7 +29,7 @@ export default {
29
29
  type: [String, Object],
30
30
  default: undefined
31
31
  },
32
- angle: {
32
+ arrow: {
33
33
  type: Boolean,
34
34
  default: undefined
35
35
  },
@@ -116,7 +116,7 @@ export default {
116
116
  closeByBackdropClick,
117
117
  closeByOutsideClick,
118
118
  closeOnEscape,
119
- angle,
119
+ arrow,
120
120
  backdrop,
121
121
  backdropEl,
122
122
  containerEl,
@@ -126,7 +126,7 @@ export default {
126
126
  if (typeof closeByBackdropClick !== 'undefined') popoverParams.closeByBackdropClick = closeByBackdropClick;
127
127
  if (typeof closeByOutsideClick !== 'undefined') popoverParams.closeByOutsideClick = closeByOutsideClick;
128
128
  if (typeof closeOnEscape !== 'undefined') popoverParams.closeOnEscape = closeOnEscape;
129
- if (typeof angle !== 'undefined') popoverParams.angle = angle;
129
+ if (typeof arrow !== 'undefined') popoverParams.arrow = arrow;
130
130
  if (typeof backdrop !== 'undefined') popoverParams.backdrop = backdrop;
131
131
  if (typeof backdropEl !== 'undefined') popoverParams.backdropEl = backdropEl;
132
132
  if (typeof containerEl !== 'undefined') popoverParams.containerEl = containerEl;
@@ -125,7 +125,7 @@ declare const Searchbar: DefineComponent<
125
125
  default: boolean;
126
126
  },
127
127
 
128
- hideDividers: {
128
+ hideGroupTitles: {
129
129
  type: BooleanConstructor;
130
130
  default: boolean;
131
131
  },
@@ -143,7 +143,7 @@ export default {
143
143
  type: Boolean,
144
144
  default: false
145
145
  },
146
- hideDividers: {
146
+ hideGroupTitles: {
147
147
  type: Boolean,
148
148
  default: true
149
149
  },
@@ -227,7 +227,7 @@ export default {
227
227
  ignore: props.ignore,
228
228
  customSearch: props.customSearch,
229
229
  removeDiacritics: props.removeDiacritics,
230
- hideDividers: props.hideDividers,
230
+ hideGroupTitles: props.hideGroupTitles,
231
231
  hideGroups: props.hideGroups,
232
232
  expandable: props.expandable,
233
233
  inline: props.inline,
package/components/tab.js CHANGED
@@ -1,6 +1,16 @@
1
1
  import { resolveDynamicComponent as _resolveDynamicComponent, mergeProps as _mergeProps, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from "vue";
2
2
  function render(_ctx, _cache) {
3
- return _openBlock(), _createElementBlock("div", {
3
+ return _ctx.isSwiper ? (_openBlock(), _createElementBlock("swiper-slide", {
4
+ key: 0,
5
+ ref: "elRef",
6
+ class: _normalizeClass(_ctx.classes)
7
+ }, [_ctx.tabContent ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.getComponent(_ctx.tabContent)), _mergeProps({
8
+ key: 0,
9
+ key: _ctx.tabContent.id
10
+ }, _ctx.getProps(_ctx.tabContent)), null, 16)) : _renderSlot(_ctx.$slots, "default", {
11
+ key: 1
12
+ })], 2)) : (_openBlock(), _createElementBlock("div", {
13
+ key: 1,
4
14
  ref: "elRef",
5
15
  class: _normalizeClass(_ctx.classes)
6
16
  }, [_ctx.tabContent ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.getComponent(_ctx.tabContent)), _mergeProps({
@@ -8,7 +18,7 @@ function render(_ctx, _cache) {
8
18
  key: _ctx.tabContent.id
9
19
  }, _ctx.getProps(_ctx.tabContent)), null, 16)) : _renderSlot(_ctx.$slots, "default", {
10
20
  key: 1
11
- })], 2);
21
+ })], 2));
12
22
  }
13
23
  import { computed, ref, inject, onMounted, onBeforeUnmount, onUpdated, toRaw } from 'vue';
14
24
  import { classNames, getComponentId } from '../shared/utils.js';
@@ -31,6 +41,7 @@ export default {
31
41
  const routerData = ref(null);
32
42
  const route = inject('f7route', null);
33
43
  const router = inject('f7route', null);
44
+ const isSwiper = inject('TabsSwipeableContext', false);
34
45
  let initialTabContent = null;
35
46
  if (!routerData.value && route && route.route && route.route.tab && route.route.tab.id === props.id) {
36
47
  const {
@@ -112,7 +123,8 @@ export default {
112
123
  classes,
113
124
  tabContent,
114
125
  getComponent,
115
- getProps
126
+ getProps,
127
+ isSwiper
116
128
  };
117
129
  }
118
130
  };
@@ -1,18 +1,24 @@
1
1
  import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from "vue";
2
+ const _hoisted_1 = ["init"];
2
3
  function render(_ctx, _cache) {
3
- return _ctx.animated || _ctx.swipeable ? (_openBlock(), _createElementBlock("div", {
4
+ return _ctx.animated ? (_openBlock(), _createElementBlock("div", {
4
5
  key: 0,
5
6
  ref: "elRef",
6
- class: _normalizeClass(_ctx.classNames(_ctx.wrapClasses, _ctx.classes))
7
+ class: _normalizeClass(_ctx.classNames('tabs-animated-wrap', _ctx.classes))
7
8
  }, [_createElementVNode("div", {
8
9
  class: _normalizeClass(_ctx.tabsClasses)
9
- }, [_renderSlot(_ctx.$slots, "default")], 2)], 2)) : (_openBlock(), _createElementBlock("div", {
10
+ }, [_renderSlot(_ctx.$slots, "default")], 2)], 2)) : _ctx.swipeable ? (_openBlock(), _createElementBlock("swiper-container", {
10
11
  key: 1,
11
12
  ref: "elRef",
13
+ class: _normalizeClass(_ctx.classNames(_ctx.tabsClasses, _ctx.classes)),
14
+ init: _ctx.swiperParams ? 'false' : 'true'
15
+ }, [_renderSlot(_ctx.$slots, "default")], 10, _hoisted_1)) : (_openBlock(), _createElementBlock("div", {
16
+ key: 2,
17
+ ref: "elRef",
12
18
  class: _normalizeClass(_ctx.classNames(_ctx.tabsClasses, _ctx.classes))
13
19
  }, [_renderSlot(_ctx.$slots, "default")], 2));
14
20
  }
15
- import { computed, ref, onMounted } from 'vue';
21
+ import { computed, ref, onMounted, provide } from 'vue';
16
22
  import { classNames } from '../shared/utils.js';
17
23
  import { colorClasses, colorProps } from '../shared/mixins.js';
18
24
  export default {
@@ -33,21 +39,19 @@ export default {
33
39
  onMounted(() => {
34
40
  if (!props.swipeable || !props.swiperParams) return;
35
41
  if (!elRef.value) return;
36
- elRef.value.f7SwiperParams = props.swiperParams;
42
+ Object.assign(elRef.value, props.swiperParams);
43
+ elRef.value.initialize();
37
44
  });
38
45
  const classes = computed(() => classNames(colorClasses(props)));
39
- const wrapClasses = computed(() => classNames({
40
- 'tabs-animated-wrap': props.animated,
41
- 'tabs-swipeable-wrap': props.swipeable
42
- }));
43
46
  const tabsClasses = computed(() => classNames({
44
47
  tabs: true,
45
48
  'tabs-routable': props.routable
46
49
  }));
50
+ const TabsSwipeableContext = computed(() => props.swipeable);
51
+ provide('TabsSwipeableContext', TabsSwipeableContext);
47
52
  return {
48
53
  elRef,
49
54
  classes,
50
- wrapClasses,
51
55
  tabsClasses,
52
56
  classNames
53
57
  };
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-04/schema#",
3
3
  "framework": "vue",
4
4
  "name": "framework7-vue",
5
- "version": "8.0.0-beta.4",
5
+ "version": "8.0.0-beta.5",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
package/framework7-vue.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Framework7 Vue 8.0.0-beta.4
2
+ * Framework7 Vue 8.0.0-beta.5
3
3
  * Build full featured iOS & Android apps using Framework7 & Vue
4
4
  * https://framework7.io/vue/
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 14, 2023
10
+ * Released on: March 23, 2023
11
11
  */
12
12
  import Framework7Vue from './shared/plugin.js';
13
13
  import { f7, f7ready, theme } from './shared/f7.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framework7-vue",
3
- "version": "8.0.0-beta.4",
3
+ "version": "8.0.0-beta.5",
4
4
  "description": "Build full featured iOS & Android apps using Framework7 & Vue",
5
5
  "type": "module",
6
6
  "exports": {
@@ -55,5 +55,5 @@
55
55
  "type": "patreon",
56
56
  "url": "https://www.patreon.com/framework7"
57
57
  },
58
- "releaseDate": "March 14, 2023"
58
+ "releaseDate": "March 23, 2023"
59
59
  }
@@ -1,41 +0,0 @@
1
- import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from "vue";
2
- function render(_ctx, _cache) {
3
- return _openBlock(), _createElementBlock("div", {
4
- class: _normalizeClass(_ctx.classes)
5
- }, [_renderSlot(_ctx.$slots, "before-inner"), _ctx.inner ? (_openBlock(), _createElementBlock("div", {
6
- key: 0,
7
- class: _normalizeClass(_ctx.innerClasses)
8
- }, [_renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)) : _renderSlot(_ctx.$slots, "default", {
9
- key: 1
10
- }), _renderSlot(_ctx.$slots, "after-inner")], 2 /* CLASS */);
11
- }
12
-
13
- import { computed } from 'vue';
14
- import { classNames } from '../shared/utils.js';
15
- import { colorClasses, colorProps } from '../shared/mixins.js';
16
- export default {
17
- name: 'f7-appbar',
18
- render,
19
- props: {
20
- noShadow: Boolean,
21
- noHairline: Boolean,
22
- inner: {
23
- type: Boolean,
24
- default: true
25
- },
26
- innerClass: String,
27
- innerClassName: String,
28
- ...colorProps
29
- },
30
- setup(props) {
31
- const classes = computed(() => classNames('appbar', {
32
- 'no-shadow': props.noShadow,
33
- 'no-hairline': props.noHairline
34
- }, colorClasses(props)));
35
- const innerClasses = computed(() => classNames('appbar-inner', props.innerClass, props.innerClassName));
36
- return {
37
- classes,
38
- innerClasses
39
- };
40
- }
41
- };
package/components/col.js DELETED
@@ -1,91 +0,0 @@
1
- import { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, withCtx as _withCtx, createBlock as _createBlock } from "vue";
2
- const _hoisted_1 = {
3
- key: 0,
4
- class: "resize-handler"
5
- };
6
- function render(_ctx, _cache) {
7
- return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {
8
- ref: "elRef",
9
- class: _normalizeClass(_ctx.classes)
10
- }, {
11
- default: _withCtx(() => [_renderSlot(_ctx.$slots, "default"), _ctx.resizable && _ctx.resizableHandler ? (_openBlock(), _createElementBlock("span", _hoisted_1)) : _createCommentVNode("v-if", true)]),
12
- _: 3 /* FORWARDED */
13
- }, 8 /* PROPS */, ["class"]);
14
- }
15
- import { ref, computed, onBeforeUnmount, onMounted } from 'vue';
16
- import { classNames } from '../shared/utils.js';
17
- import { colorClasses, colorProps } from '../shared/mixins.js';
18
- import { f7ready, f7 } from '../shared/f7.js';
19
- export default {
20
- name: 'f7-col',
21
- render,
22
- props: {
23
- tag: {
24
- type: String,
25
- default: 'div'
26
- },
27
- width: {
28
- type: [Number, String],
29
- default: 'auto'
30
- },
31
- xsmall: {
32
- type: [Number, String]
33
- },
34
- small: {
35
- type: [Number, String]
36
- },
37
- medium: {
38
- type: [Number, String]
39
- },
40
- large: {
41
- type: [Number, String]
42
- },
43
- xlarge: {
44
- type: [Number, String]
45
- },
46
- resizable: Boolean,
47
- resizableFixed: Boolean,
48
- resizableAbsolute: Boolean,
49
- resizableHandler: {
50
- type: Boolean,
51
- default: true
52
- },
53
- ...colorProps
54
- },
55
- emits: ['grid:resize'],
56
- setup(props, _ref) {
57
- let {
58
- emit
59
- } = _ref;
60
- const elRef = ref(null);
61
- const onResize = el => {
62
- if (el === elRef.value) {
63
- emit('grid:resize');
64
- }
65
- };
66
- onMounted(() => {
67
- f7ready(() => {
68
- f7.on('gridResize', onResize);
69
- });
70
- });
71
- onBeforeUnmount(() => {
72
- f7.off('gridResize', onResize);
73
- });
74
- const classes = computed(() => classNames({
75
- col: props.width === 'auto',
76
- [`col-${props.width}`]: props.width !== 'auto',
77
- [`xsmall-${props.xsmall}`]: props.xsmall,
78
- [`small-${props.small}`]: props.small,
79
- [`medium-${props.medium}`]: props.medium,
80
- [`large-${props.large}`]: props.large,
81
- [`xlarge-${props.xlarge}`]: props.xlarge,
82
- resizable: props.resizable,
83
- 'resizable-fixed': props.resizableFixed,
84
- 'resizable-absolute': props.resizableAbsolute
85
- }, colorClasses(props)));
86
- return {
87
- classes,
88
- elRef
89
- };
90
- }
91
- };
@@ -1,23 +0,0 @@
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 /* CLASS */);
6
- }
7
-
8
- import { computed } from 'vue';
9
- import { classNames } from '../shared/utils.js';
10
- import { colorClasses, colorProps } from '../shared/mixins.js';
11
- export default {
12
- name: 'f7-list-item-cell',
13
- render,
14
- props: {
15
- ...colorProps
16
- },
17
- setup(props) {
18
- const classes = computed(() => classNames('item-cell', colorClasses(props)));
19
- return {
20
- classes
21
- };
22
- }
23
- };
@@ -1,23 +0,0 @@
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 /* CLASS */);
6
- }
7
-
8
- import { computed } from 'vue';
9
- import { classNames } from '../shared/utils.js';
10
- import { colorClasses, colorProps } from '../shared/mixins.js';
11
- export default {
12
- name: 'f7-list-item-row',
13
- render,
14
- props: {
15
- ...colorProps
16
- },
17
- setup(props) {
18
- const classes = computed(() => classNames('item-row', colorClasses(props)));
19
- return {
20
- classes
21
- };
22
- }
23
- };
@@ -1,69 +0,0 @@
1
- import { toDisplayString as _toDisplayString, renderSlot as _renderSlot, createTextVNode as _createTextVNode, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
2
- function render(_ctx, _cache) {
3
- return _openBlock(), _createElementBlock("div", _mergeProps({
4
- ref: "elRef",
5
- class: _ctx.classes
6
- }, _ctx.attrs, {
7
- onClick: _cache[0] || (_cache[0] = function () {
8
- return _ctx.onClick && _ctx.onClick(...arguments);
9
- })
10
- }), [_createTextVNode(_toDisplayString(_ctx.text) + " ", 1 /* TEXT */), _renderSlot(_ctx.$slots, "default")], 16 /* FULL_PROPS */);
11
- }
12
-
13
- import { computed, ref } from 'vue';
14
- import { classNames } from '../shared/utils.js';
15
- import { colorClasses, colorProps, routerProps, routerAttrs, routerClasses, actionsProps, actionsAttrs, actionsClasses } from '../shared/mixins.js';
16
- import { useRouteProps } from '../shared/use-route-props.js';
17
- export default {
18
- name: 'f7-menu-dropdown-item',
19
- render,
20
- props: {
21
- text: String,
22
- link: Boolean,
23
- href: String,
24
- target: String,
25
- divider: Boolean,
26
- ...colorProps,
27
- ...routerProps,
28
- ...actionsProps
29
- },
30
- emits: ['click'],
31
- setup(props, _ref) {
32
- let {
33
- emit
34
- } = _ref;
35
- const elRef = ref(null);
36
- const onClick = e => {
37
- emit('click', e);
38
- };
39
- useRouteProps(elRef, props);
40
- const isLink = computed(() => props.link || props.href || props.href === '');
41
- const tag = computed(() => isLink.value ? 'a' : 'div');
42
- const classes = computed(() => {
43
- return classNames({
44
- 'menu-dropdown-link': isLink.value && !props.divider,
45
- 'menu-dropdown-item': !isLink.value && !props.divider,
46
- 'menu-dropdown-divider': props.divider
47
- }, colorClasses(props), routerClasses(props), actionsClasses(props), {
48
- 'menu-close': typeof props.menuClose === 'undefined'
49
- });
50
- });
51
- const attrs = computed(() => {
52
- let hrefComputed = props.href;
53
- if (typeof hrefComputed === 'undefined' && props.link) hrefComputed = '#';
54
- return {
55
- href: hrefComputed,
56
- target: props.target,
57
- ...routerAttrs(props),
58
- ...actionsAttrs(props)
59
- };
60
- });
61
- return {
62
- classes,
63
- attrs,
64
- tag,
65
- onClick,
66
- elRef
67
- };
68
- }
69
- };
@@ -1,39 +0,0 @@
1
- import { renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, 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
- }, [_createElementVNode("div", {
6
- class: "menu-dropdown-content",
7
- style: _normalizeStyle({
8
- height: _ctx.contentHeight
9
- })
10
- }, [_renderSlot(_ctx.$slots, "default")], 4 /* STYLE */)], 2 /* CLASS */);
11
- }
12
-
13
- import { computed } from 'vue';
14
- import { classNames } from '../shared/utils.js';
15
- import { colorClasses, colorProps } from '../shared/mixins.js';
16
- export default {
17
- name: 'f7-menu-dropdown',
18
- render,
19
- props: {
20
- contentHeight: String,
21
- position: String,
22
- left: Boolean,
23
- center: Boolean,
24
- right: Boolean,
25
- ...colorProps
26
- },
27
- setup(props) {
28
- const classes = computed(() => {
29
- let positionComputed = props.position || 'left';
30
- if (props.left) positionComputed = 'left';
31
- if (props.center) positionComputed = 'center';
32
- if (props.right) positionComputed = 'right';
33
- return classNames('menu-dropdown', `menu-dropdown-${positionComputed}`, colorClasses(props));
34
- });
35
- return {
36
- classes
37
- };
38
- }
39
- };
@@ -1,119 +0,0 @@
1
- import { toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, createTextVNode as _createTextVNode, createElementBlock as _createElementBlock, resolveDynamicComponent as _resolveDynamicComponent, mergeProps as _mergeProps, withCtx as _withCtx } from "vue";
2
- const _hoisted_1 = {
3
- key: 0,
4
- class: "menu-item-content"
5
- };
6
- function render(_ctx, _cache) {
7
- const _component_f7_use_icon = _resolveComponent("f7-use-icon");
8
- return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), _mergeProps({
9
- ref: "elRef",
10
- class: _ctx.classes
11
- }, _ctx.attrs, {
12
- onClick: _ctx.onClick
13
- }), {
14
- default: _withCtx(() => [_ctx.text || _ctx.$slots.text || _ctx.icon ? (_openBlock(), _createElementBlock("div", _hoisted_1, [_createTextVNode(_toDisplayString(_ctx.text) + " ", 1 /* TEXT */), _ctx.icon ? (_openBlock(), _createBlock(_component_f7_use_icon, {
15
- key: 0,
16
- icon: _ctx.icon
17
- }, null, 8 /* PROPS */, ["icon"])) : _createCommentVNode("v-if", true), _renderSlot(_ctx.$slots, "text")])) : _createCommentVNode("v-if", true), _renderSlot(_ctx.$slots, "default")]),
18
- _: 3 /* FORWARDED */
19
- }, 16 /* FULL_PROPS */, ["class", "onClick"]);
20
- }
21
- import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
22
- import { classNames } from '../shared/utils.js';
23
- import { colorClasses, colorProps, routerProps, routerAttrs, routerClasses, actionsProps, actionsClasses, actionsAttrs, iconProps } from '../shared/mixins.js';
24
- import { useRouteProps } from '../shared/use-route-props.js';
25
- import { useIcon } from '../shared/use-icon.js';
26
- import { f7ready, f7 } from '../shared/f7.js';
27
- import { useTooltip } from '../shared/use-tooltip.js';
28
- import f7UseIcon from './use-icon.js';
29
- export default {
30
- name: 'f7-menu-item',
31
- render,
32
- components: {
33
- f7UseIcon
34
- },
35
- props: {
36
- text: String,
37
- iconOnly: Boolean,
38
- href: String,
39
- link: Boolean,
40
- target: String,
41
- dropdown: Boolean,
42
- tooltip: String,
43
- tooltipTrigger: String,
44
- ...colorProps,
45
- ...routerProps,
46
- ...actionsProps,
47
- ...iconProps
48
- },
49
- emits: ['click', 'menu:opened', 'menu:closed'],
50
- setup(props, _ref) {
51
- let {
52
- slots,
53
- emit
54
- } = _ref;
55
- const elRef = ref(null);
56
- useTooltip(elRef, props);
57
- const onClick = e => {
58
- emit('click', e);
59
- };
60
- const onOpened = el => {
61
- if (elRef.value !== el) return;
62
- emit('menu:opened', el);
63
- };
64
- const onClosed = el => {
65
- if (elRef.value !== el) return;
66
- emit('menu:closed', el);
67
- };
68
- useRouteProps(elRef, props);
69
- const attachEvents = () => {
70
- f7ready(() => {
71
- f7.on('menuOpened', onOpened);
72
- f7.on('menuClosed', onClosed);
73
- });
74
- };
75
- const detachEvents = () => {
76
- f7.off('menuOpened', onOpened);
77
- f7.off('menuClosed', onOpened);
78
- };
79
- onMounted(() => attachEvents());
80
- onBeforeUnmount(() => detachEvents());
81
- const icon = computed(() => useIcon(props));
82
- const tag = computed(() => {
83
- const isLink = props.link || props.href || props.href === '';
84
- return isLink ? 'a' : 'div';
85
- });
86
- const classes = computed(() => {
87
- let iconOnlyComputed;
88
- if (props.iconOnly || !props.text && !slots.text) {
89
- iconOnlyComputed = true;
90
- } else {
91
- iconOnlyComputed = false;
92
- }
93
- const isDropdown = props.dropdown || props.dropdown === '';
94
- return classNames({
95
- 'menu-item': true,
96
- 'menu-item-dropdown': isDropdown,
97
- 'icon-only': iconOnlyComputed
98
- }, colorClasses(props), routerClasses(props), actionsClasses(props));
99
- });
100
- const attrs = computed(() => {
101
- let hrefComputed = props.href;
102
- if (typeof hrefComputed === 'undefined' && props.link) hrefComputed = '#';
103
- return {
104
- href: hrefComputed,
105
- target: props.target,
106
- ...routerAttrs(props),
107
- ...actionsAttrs(props)
108
- };
109
- });
110
- return {
111
- tag,
112
- classes,
113
- attrs,
114
- icon,
115
- onClick,
116
- elRef
117
- };
118
- }
119
- };
@@ -1,26 +0,0 @@
1
- import { renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
2
- const _hoisted_1 = {
3
- class: "menu-inner"
4
- };
5
- function render(_ctx, _cache) {
6
- return _openBlock(), _createElementBlock("div", {
7
- class: _normalizeClass(_ctx.classes)
8
- }, [_createElementVNode("div", _hoisted_1, [_renderSlot(_ctx.$slots, "default")])], 2 /* CLASS */);
9
- }
10
-
11
- import { computed } from 'vue';
12
- import { classNames } from '../shared/utils.js';
13
- import { colorClasses, colorProps } from '../shared/mixins.js';
14
- export default {
15
- name: 'f7-menu',
16
- render,
17
- props: {
18
- ...colorProps
19
- },
20
- setup(props) {
21
- const classes = computed(() => classNames('menu', colorClasses(props)));
22
- return {
23
- classes
24
- };
25
- }
26
- };
package/components/row.js DELETED
@@ -1,67 +0,0 @@
1
- import { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, withCtx as _withCtx, createBlock as _createBlock } from "vue";
2
- const _hoisted_1 = {
3
- key: 0,
4
- class: "resize-handler"
5
- };
6
- function render(_ctx, _cache) {
7
- return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {
8
- ref: "elRef",
9
- class: _normalizeClass(_ctx.classes)
10
- }, {
11
- default: _withCtx(() => [_renderSlot(_ctx.$slots, "default"), _ctx.resizable && _ctx.resizableHandler ? (_openBlock(), _createElementBlock("span", _hoisted_1)) : _createCommentVNode("v-if", true)]),
12
- _: 3 /* FORWARDED */
13
- }, 8 /* PROPS */, ["class"]);
14
- }
15
- import { ref, computed, onBeforeUnmount, onMounted } from 'vue';
16
- import { classNames } from '../shared/utils.js';
17
- import { colorClasses, colorProps } from '../shared/mixins.js';
18
- import { f7ready, f7 } from '../shared/f7.js';
19
- export default {
20
- name: 'f7-row',
21
- render,
22
- props: {
23
- noGap: Boolean,
24
- tag: {
25
- type: String,
26
- default: 'div'
27
- },
28
- resizable: Boolean,
29
- resizableFixed: Boolean,
30
- resizableAbsolute: Boolean,
31
- resizableHandler: {
32
- type: Boolean,
33
- default: true
34
- },
35
- ...colorProps
36
- },
37
- emits: ['grid:resize'],
38
- setup(props, _ref) {
39
- let {
40
- emit
41
- } = _ref;
42
- const elRef = ref(null);
43
- const onResize = el => {
44
- if (el === elRef.value) {
45
- emit('grid:resize');
46
- }
47
- };
48
- onMounted(() => {
49
- f7ready(() => {
50
- f7.on('gridResize', onResize);
51
- });
52
- });
53
- onBeforeUnmount(() => {
54
- f7.off('gridResize', onResize);
55
- });
56
- const classes = computed(() => classNames('row', {
57
- 'no-gap': props.noGap,
58
- resizable: props.resizable,
59
- 'resizable-fixed': props.resizableFixed,
60
- 'resizable-absolute': props.resizableAbsolute
61
- }, colorClasses(props)));
62
- return {
63
- classes,
64
- elRef
65
- };
66
- }
67
- };
@@ -1,2 +0,0 @@
1
- import { SwiperSlide } from 'swiper/vue';
2
- export default SwiperSlide;
@@ -1,2 +0,0 @@
1
- import { Swiper } from 'swiper/vue';
2
- export default Swiper;