@vue-interface/dropdown-menu 2.0.0-beta.1 → 2.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-interface/dropdown-menu",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "A Vue dropdown menu component.",
5
5
  "files": [
6
6
  "index.js",
@@ -47,19 +47,19 @@
47
47
  "vue": "^3.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@rollup/plugin-babel": "^5.3.1",
51
- "@vitejs/plugin-vue": "^3.0.3",
52
- "autoprefixer": "^10.4.8",
50
+ "@rollup/plugin-babel": "^6.0.0",
51
+ "@vitejs/plugin-vue": "^3.1.2",
52
+ "autoprefixer": "^10.4.12",
53
53
  "babel-eslint": "^10.1.0",
54
54
  "babel-preset-vue": "^2.0.2",
55
55
  "change-case": "^4.1.2",
56
- "eslint": "^8.22.0",
57
- "eslint-plugin-vue": "^9.4.0",
56
+ "eslint": "^8.25.0",
57
+ "eslint-plugin-vue": "^9.6.0",
58
58
  "pascalcase": "^2.0.0",
59
- "postcss": "^8.4.16",
59
+ "postcss": "^8.4.18",
60
60
  "tailwindcss": "^3.1.8",
61
- "vite": "^3.0.9",
62
- "vue": "^3.2.37",
63
- "vue-router": "^4.1.4"
61
+ "vite": "^3.1.7",
62
+ "vue": "^3.2.40",
63
+ "vue-router": "^4.1.5"
64
64
  }
65
65
  }
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { h } from 'vue';
2
+ import { h, isVNode } from 'vue';
3
3
 
4
4
  function appendClass(vnode, str) {
5
5
  vnode.props.class = `${vnode.props.class || ''} ${str}`.trim();
@@ -25,13 +25,17 @@ function listener(vnode, key) {
25
25
  );
26
26
  }
27
27
 
28
+ function isDropdownItem(vnode) {
29
+ return vnode && vnode.type && vnode.type.name === 'DropdownItem';
30
+ }
31
+
28
32
  function isFragment(vnode) {
29
33
  // We'll go ahead and assume that if the type is a symbol, then the vnode is fragment.
30
34
  // This may be a faulty assumption; if it is, it'll need to be changed.
31
35
  return vnode && vnode.type && (vnode.type === 'fragment' || typeof vnode.type === 'symbol');
32
36
  }
33
37
 
34
- function changeMenuItems(items) {
38
+ function changeMenuItems(items) {
35
39
  for(const vnode of items) {
36
40
  if(isFragment(vnode)) {
37
41
  return changeMenuItems(vnode.children);