@maas/vue-equipment 0.29.4 → 0.29.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment/nuxt",
3
3
  "configKey": "vueEquipment",
4
- "version": "0.29.3",
4
+ "version": "0.29.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.0",
7
7
  "unbuild": "unknown"
@@ -75,14 +75,53 @@ const hasArrow = computed(
75
75
  )
76
76
 
77
77
  const mappedMiddleware = computed(() => {
78
- const middleware = [flip()]
78
+ const middleware = []
79
79
 
80
- if (view?.parent.item) {
81
- middleware.push(shift({ crossAxis: true, limiter: limitShift() }))
82
- }
83
-
84
- if (hasArrow.value) {
85
- middleware.push(arrow({ element: arrowRef }))
80
+ switch (state.options.mode) {
81
+ case 'menubar':
82
+ if (!view?.parent.item) {
83
+ middleware.push(
84
+ flip({
85
+ crossAxis: true,
86
+ })
87
+ )
88
+ } else if (!!view?.parent.item) {
89
+ middleware.push(
90
+ flip({
91
+ crossAxis: false,
92
+ })
93
+ )
94
+ middleware.push(
95
+ shift({
96
+ crossAxis: true,
97
+ limiter: limitShift(),
98
+ })
99
+ )
100
+ }
101
+ break
102
+ case 'dropdown':
103
+ middleware.push(
104
+ flip({
105
+ mainAxis: true,
106
+ crossAxis: false,
107
+ })
108
+ )
109
+ middleware.push(
110
+ shift({
111
+ mainAxis: true,
112
+ crossAxis: false,
113
+ limiter: limitShift(),
114
+ })
115
+ )
116
+ break
117
+ case 'context':
118
+ middleware.push(
119
+ flip({
120
+ mainAxis: true,
121
+ crossAxis: true,
122
+ })
123
+ )
124
+ break
86
125
  }
87
126
 
88
127
  return middleware
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "description": "A magic collection of Vue composables, plugins, components and directives",
4
- "version": "0.29.4",
4
+ "version": "0.29.5",
5
5
  "author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
6
6
  "devDependencies": {
7
7
  "@antfu/ni": "^0.21.12",