You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
2.0 KiB
99 lines
2.0 KiB
import { placements } from '@popperjs/core';
|
|
import { buildProps, definePropType } from '../../../utils/props.mjs';
|
|
|
|
const effects = ["light", "dark"];
|
|
const triggers = ["click", "contextmenu", "hover", "focus"];
|
|
const Effect = {
|
|
LIGHT: "light",
|
|
DARK: "dark"
|
|
};
|
|
const usePopperArrowProps = buildProps({
|
|
arrowOffset: {
|
|
type: Number,
|
|
default: 5
|
|
}
|
|
});
|
|
const usePopperCoreConfigProps = buildProps({
|
|
boundariesPadding: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
fallbackPlacements: {
|
|
type: definePropType(Array),
|
|
default: () => []
|
|
},
|
|
gpuAcceleration: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
offset: {
|
|
type: Number,
|
|
default: 12
|
|
},
|
|
placement: {
|
|
type: String,
|
|
values: placements,
|
|
default: "bottom"
|
|
},
|
|
popperOptions: {
|
|
type: definePropType(Object),
|
|
default: () => ({})
|
|
},
|
|
strategy: {
|
|
type: String,
|
|
values: ["fixed", "absolute"],
|
|
default: "absolute"
|
|
}
|
|
});
|
|
const usePopperProps = buildProps({
|
|
autoClose: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
cutoff: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
disabled: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
});
|
|
const usePopperContentProps = buildProps({
|
|
...usePopperCoreConfigProps,
|
|
style: { type: definePropType([String, Array, Object]) },
|
|
className: { type: definePropType([String, Array, Object]) },
|
|
effect: {
|
|
type: String,
|
|
default: "dark"
|
|
},
|
|
enterable: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
pure: {
|
|
type: Boolean
|
|
},
|
|
popperClass: {
|
|
type: definePropType([String, Array, Object])
|
|
},
|
|
popperStyle: {
|
|
type: definePropType([String, Array, Object])
|
|
},
|
|
referenceEl: {
|
|
type: definePropType(Object)
|
|
},
|
|
stopPopperMouseEvent: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
zIndex: Number
|
|
});
|
|
const usePopperTriggerProps = buildProps({
|
|
virtualRef: { type: definePropType(Object) },
|
|
virtualTriggering: { type: Boolean }
|
|
});
|
|
|
|
export { Effect, usePopperArrowProps, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps };
|
|
//# sourceMappingURL=popper.mjs.map
|