@volverjs/ui-vue 0.0.9-beta.20 → 0.0.9-beta.21
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/dist/components/VvAccordion/VvAccordion.es.js +8 -7
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +8 -7
- package/dist/components/VvAction/VvAction.es.js +8 -7
- package/dist/components/VvAlert/VvAlert.es.js +8 -7
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +8 -7
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +3 -3
- package/dist/components/VvAlertGroup/index.d.ts +1 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +8 -7
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +8 -7
- package/dist/components/VvBadge/VvBadge.es.js +8 -7
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +8 -7
- package/dist/components/VvButton/VvButton.es.js +8 -7
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +8 -7
- package/dist/components/VvCard/VvCard.es.js +8 -7
- package/dist/components/VvCheckbox/VvCheckbox.es.js +8 -7
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +8 -7
- package/dist/components/VvCombobox/VvCombobox.es.js +14 -13
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +7 -7
- package/dist/components/VvCombobox/index.d.ts +4 -6
- package/dist/components/VvDialog/VvDialog.es.js +8 -7
- package/dist/components/VvDropdown/VvDropdown.es.js +14 -13
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +10 -9
- package/dist/components/VvDropdown/index.d.ts +3 -3
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +8 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +8 -7
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +8 -7
- package/dist/components/VvInputText/VvInputText.es.js +8 -7
- package/dist/components/VvInputText/index.d.ts +2 -10
- package/dist/components/VvNav/VvNav.es.js +8 -7
- package/dist/components/VvProgress/VvProgress.es.js +8 -7
- package/dist/components/VvRadio/VvRadio.es.js +8 -7
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +8 -7
- package/dist/components/VvSelect/VvSelect.es.js +8 -7
- package/dist/components/VvTab/VvTab.es.js +8 -7
- package/dist/components/VvTextarea/VvTextarea.es.js +8 -7
- package/dist/components/VvTooltip/VvTooltip.es.js +8 -7
- package/dist/components/index.es.js +14 -13
- package/dist/components/index.umd.js +1 -1
- package/dist/constants.d.ts +4 -0
- package/dist/directives/index.es.js +8 -7
- package/dist/directives/v-tooltip.es.js +8 -7
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +4 -4
- package/package.json +1 -1
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvDropdown/VvDropdown.vue +11 -10
- package/src/constants.ts +5 -0
- package/src/props/index.ts +7 -11
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
ShiftOptions,
|
|
26
26
|
SizeOptions,
|
|
27
27
|
} from '../../types/floating-ui'
|
|
28
|
+
import { Side, Strategy } from '../../constants'
|
|
28
29
|
|
|
29
30
|
// props, emit and attrs
|
|
30
31
|
const props = defineProps(VvDropdownProps)
|
|
@@ -157,13 +158,13 @@
|
|
|
157
158
|
|
|
158
159
|
return toReturn
|
|
159
160
|
})
|
|
160
|
-
const { x, y,
|
|
161
|
+
const { x, y, middlewareData, placement, strategy } = useFloating(
|
|
161
162
|
referenceEl,
|
|
162
163
|
floatingEl,
|
|
163
164
|
{
|
|
164
165
|
whileElementsMounted: (...args) => {
|
|
165
166
|
return autoUpdate(...args, {
|
|
166
|
-
animationFrame: props.strategy ===
|
|
167
|
+
animationFrame: props.strategy === Strategy.fixed,
|
|
167
168
|
})
|
|
168
169
|
},
|
|
169
170
|
placement: computed(() => props.placement),
|
|
@@ -193,20 +194,20 @@
|
|
|
193
194
|
const side = computed(
|
|
194
195
|
() =>
|
|
195
196
|
placement.value.split('-')[0] as
|
|
196
|
-
|
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
197
|
+
| Side.top
|
|
198
|
+
| Side.right
|
|
199
|
+
| Side.bottom
|
|
200
|
+
| Side.left,
|
|
200
201
|
)
|
|
201
202
|
const arrowPlacement = computed(() => {
|
|
202
203
|
if (hasCustomPosition.value) {
|
|
203
204
|
return undefined
|
|
204
205
|
}
|
|
205
206
|
const staticSide = {
|
|
206
|
-
top:
|
|
207
|
-
right:
|
|
208
|
-
bottom:
|
|
209
|
-
left:
|
|
207
|
+
[Side.top]: Side.bottom,
|
|
208
|
+
[Side.right]: Side.left,
|
|
209
|
+
[Side.bottom]: Side.top,
|
|
210
|
+
[Side.left]: Side.right,
|
|
210
211
|
}[side.value]
|
|
211
212
|
return {
|
|
212
213
|
left:
|
package/src/constants.ts
CHANGED
package/src/props/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
} from '../types/floating-ui'
|
|
10
10
|
import {
|
|
11
11
|
Placement,
|
|
12
|
+
Strategy,
|
|
12
13
|
Position,
|
|
13
14
|
Side,
|
|
14
15
|
AnchorTarget,
|
|
@@ -228,22 +229,17 @@ export const DropdownProps = {
|
|
|
228
229
|
placement: {
|
|
229
230
|
type: String as PropType<`${Side}` | `${Placement}`>,
|
|
230
231
|
default: Side.bottom,
|
|
231
|
-
validator: (value: Side & Placement) =>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
Object.values(Placement).includes(value)
|
|
235
|
-
)
|
|
236
|
-
},
|
|
232
|
+
validator: (value: Side & Placement) =>
|
|
233
|
+
Object.values(Side).includes(value) ||
|
|
234
|
+
Object.values(Placement).includes(value),
|
|
237
235
|
},
|
|
238
236
|
/**
|
|
239
237
|
* Dropdown strategy
|
|
240
238
|
*/
|
|
241
239
|
strategy: {
|
|
242
|
-
type: String as PropType
|
|
243
|
-
default:
|
|
244
|
-
validator: (value:
|
|
245
|
-
return ['fixed', 'absolute'].includes(value)
|
|
246
|
-
},
|
|
240
|
+
type: String as PropType<`${Strategy}`>,
|
|
241
|
+
default: undefined,
|
|
242
|
+
validator: (value: Strategy) => Object.values(Strategy).includes(value),
|
|
247
243
|
},
|
|
248
244
|
/**
|
|
249
245
|
* Dropdown show / hide transition name
|