UNPKG

@synergy-design-system/vue

Version:

Vue3 wrappers for the Synergy Design System

278 lines (277 loc) 11.5 kB
import { SynRepositionEvent } from '@synergy-design-system/components'; import { default as SynPopup } from '@synergy-design-system/components/components/popup/popup.component.js'; export type { SynRepositionEvent } from '@synergy-design-system/components'; declare const _default: typeof __VLS_export; export default _default; declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{ /** * The element the popup will be anchored to. * If the anchor lives outside of the popup, you can provide the anchor element `id`, a DOM element reference, or a `VirtualElement`. * If the anchor lives inside the popup, use the `anchor` slot instead. */ anchor?: SynPopup["anchor"]; /** * Activates the positioning logic and shows the popup. * When this attribute is removed, the positioning logic is torn down and the popup will be hidden. */ active?: SynPopup["active"]; /** * The preferred placement of the popup. * Note that the actual placement will vary as configured to keep the panel inside of the viewport. */ placement?: SynPopup["placement"]; /** * The distance in pixels from which to offset the panel away from its anchor. */ distance?: SynPopup["distance"]; /** * The distance in pixels from which to offset the panel along its anchor. */ skidding?: SynPopup["skidding"]; /** * Attaches an arrow to the popup. * The arrow's size and color can be customized using the `--arrow-size` and `--arrow-color` custom properties. * For additional customizations, you can also target the arrow using `::part(arrow)` in your stylesheet. */ arrow?: SynPopup["arrow"]; /** * The placement of the arrow. * The default is `anchor`, which will align the arrow as close to the center of the anchor as possible, considering available space and `arrow-padding`. * A value of `start`, `end`, or `center` will align the arrow to the start, end, or center of the popover instead. */ arrowPlacement?: SynPopup["arrowPlacement"]; /** * The amount of padding between the arrow and the edges of the popup. * If the popup has a border-radius, for example, this will prevent it from overflowing the corners. */ arrowPadding?: SynPopup["arrowPadding"]; /** * When set, placement of the popup will flip to the opposite site to keep it in view. * You can use `flipFallbackPlacements` to further configure how the fallback placement is determined. */ flip?: SynPopup["flip"]; /** * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. * Must be a string of any number of placements separated by a space, e.g. * "top bottom left". * If no placement fits, the flip fallback strategy will be used instead. */ flipFallbackPlacements?: SynPopup["flipFallbackPlacements"]; /** * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether the popup should be positioned using the best available fit based on available space or as it was initially preferred. */ flipFallbackStrategy?: SynPopup["flipFallbackStrategy"]; /** * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. * By default, the boundary includes overflow ancestors that will cause the element to be clipped. * If needed, you can change the boundary by passing a reference to one or more elements to this property. */ flipBoundary?: SynPopup["flipBoundary"]; /** * The amount of padding, in pixels, to exceed before the flip behavior will occur. */ flipPadding?: SynPopup["flipPadding"]; /** * Moves the popup along the axis to keep it in view when clipped. */ shift?: SynPopup["shift"]; /** * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. * By default, the boundary includes overflow ancestors that will cause the element to be clipped. * If needed, you can change the boundary by passing a reference to one or more elements to this property. */ shiftBoundary?: SynPopup["shiftBoundary"]; /** * The amount of padding, in pixels, to exceed before the shift behavior will occur. */ shiftPadding?: SynPopup["shiftPadding"]; /** * When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */ autoSize?: SynPopup["autoSize"]; /** * Syncs the popup's width or height to that of the anchor element. */ sync?: SynPopup["sync"]; /** * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. * By default, the boundary includes overflow ancestors that will cause the element to be clipped. * If needed, you can change the boundary by passing a reference to one or more elements to this property. */ autoSizeBoundary?: SynPopup["autoSizeBoundary"]; /** * The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */ autoSizePadding?: SynPopup["autoSizePadding"]; /** * When a gap exists between the anchor and the popup element, this option will add a "hover bridge" that fills the gap using an invisible element. * This makes listening for events such as `mouseenter` and `mouseleave` more sane because the pointer never technically leaves the element. * The hover bridge will only be drawn when the popover is active. */ hoverBridge?: SynPopup["hoverBridge"]; }, { nativeElement: import('vue').Ref<SynPopup | undefined, SynPopup | undefined>; }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { "syn-reposition": (e: SynRepositionEvent) => any; }, string, import('vue').PublicProps, Readonly<{ /** * The element the popup will be anchored to. * If the anchor lives outside of the popup, you can provide the anchor element `id`, a DOM element reference, or a `VirtualElement`. * If the anchor lives inside the popup, use the `anchor` slot instead. */ anchor?: SynPopup["anchor"]; /** * Activates the positioning logic and shows the popup. * When this attribute is removed, the positioning logic is torn down and the popup will be hidden. */ active?: SynPopup["active"]; /** * The preferred placement of the popup. * Note that the actual placement will vary as configured to keep the panel inside of the viewport. */ placement?: SynPopup["placement"]; /** * The distance in pixels from which to offset the panel away from its anchor. */ distance?: SynPopup["distance"]; /** * The distance in pixels from which to offset the panel along its anchor. */ skidding?: SynPopup["skidding"]; /** * Attaches an arrow to the popup. * The arrow's size and color can be customized using the `--arrow-size` and `--arrow-color` custom properties. * For additional customizations, you can also target the arrow using `::part(arrow)` in your stylesheet. */ arrow?: SynPopup["arrow"]; /** * The placement of the arrow. * The default is `anchor`, which will align the arrow as close to the center of the anchor as possible, considering available space and `arrow-padding`. * A value of `start`, `end`, or `center` will align the arrow to the start, end, or center of the popover instead. */ arrowPlacement?: SynPopup["arrowPlacement"]; /** * The amount of padding between the arrow and the edges of the popup. * If the popup has a border-radius, for example, this will prevent it from overflowing the corners. */ arrowPadding?: SynPopup["arrowPadding"]; /** * When set, placement of the popup will flip to the opposite site to keep it in view. * You can use `flipFallbackPlacements` to further configure how the fallback placement is determined. */ flip?: SynPopup["flip"]; /** * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. * Must be a string of any number of placements separated by a space, e.g. * "top bottom left". * If no placement fits, the flip fallback strategy will be used instead. */ flipFallbackPlacements?: SynPopup["flipFallbackPlacements"]; /** * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether the popup should be positioned using the best available fit based on available space or as it was initially preferred. */ flipFallbackStrategy?: SynPopup["flipFallbackStrategy"]; /** * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. * By default, the boundary includes overflow ancestors that will cause the element to be clipped. * If needed, you can change the boundary by passing a reference to one or more elements to this property. */ flipBoundary?: SynPopup["flipBoundary"]; /** * The amount of padding, in pixels, to exceed before the flip behavior will occur. */ flipPadding?: SynPopup["flipPadding"]; /** * Moves the popup along the axis to keep it in view when clipped. */ shift?: SynPopup["shift"]; /** * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. * By default, the boundary includes overflow ancestors that will cause the element to be clipped. * If needed, you can change the boundary by passing a reference to one or more elements to this property. */ shiftBoundary?: SynPopup["shiftBoundary"]; /** * The amount of padding, in pixels, to exceed before the shift behavior will occur. */ shiftPadding?: SynPopup["shiftPadding"]; /** * When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */ autoSize?: SynPopup["autoSize"]; /** * Syncs the popup's width or height to that of the anchor element. */ sync?: SynPopup["sync"]; /** * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. * By default, the boundary includes overflow ancestors that will cause the element to be clipped. * If needed, you can change the boundary by passing a reference to one or more elements to this property. */ autoSizeBoundary?: SynPopup["autoSizeBoundary"]; /** * The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */ autoSizePadding?: SynPopup["autoSizePadding"]; /** * When a gap exists between the anchor and the popup element, this option will add a "hover bridge" that fills the gap using an invisible element. * This makes listening for events such as `mouseenter` and `mouseleave` more sane because the pointer never technically leaves the element. * The hover bridge will only be drawn when the popover is active. */ hoverBridge?: SynPopup["hoverBridge"]; }> & Readonly<{ "onSyn-reposition"?: ((e: SynRepositionEvent) => any) | undefined; }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, { default?: (props: {}) => any; }>; type __VLS_WithSlots<T, S> = T & { new (): { $slots: S; }; };