sit-onyx 1.0.0-beta.56 → 1.0.0-beta.58

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.
@@ -32,9 +32,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("../../../On
32
32
  isMobile: boolean;
33
33
  }> & Readonly<{
34
34
  "onUpdate:mobileChildrenOpen"?: ((isOpen: boolean) => any) | undefined;
35
- }>, {
36
- mobileChildrenOpen: import("../../../../composables/useManagedState").ManagedProp<boolean>;
37
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
36
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
37
  export default _default;
40
38
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -24,12 +24,15 @@ declare function __VLS_template(): {
24
24
  };
25
25
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
26
26
  declare const __VLS_component: import("vue").DefineComponent<OnyxNavButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
+ "update:mobileChildrenOpen": (isOpen: boolean) => any;
27
28
  navigate: (href: string, event: MouseEvent) => any;
28
29
  }, string, import("vue").PublicProps, Readonly<OnyxNavButtonProps> & Readonly<{
30
+ "onUpdate:mobileChildrenOpen"?: ((isOpen: boolean) => any) | undefined;
29
31
  onNavigate?: ((href: string, event: MouseEvent) => any) | undefined;
30
32
  }>, {
31
33
  withExternalIcon: boolean | "auto";
32
34
  active: boolean;
35
+ mobileChildrenOpen: import("../../../../composables/useManagedState").ManagedProp<boolean>;
33
36
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
37
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
35
38
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { HTMLAttributes, VNode } from "vue";
1
+ import type { VNode } from "vue";
2
2
  import type { OnyxTooltipProps } from "./types";
3
3
  declare function __VLS_template(): {
4
4
  slots: Readonly<{
@@ -8,7 +8,7 @@ declare function __VLS_template(): {
8
8
  * **Accessibility**: You must ensure that the trigger attributes are bound to a button when the `open` prop is not `hover`!
9
9
  */
10
10
  default(params: {
11
- trigger: HTMLAttributes;
11
+ trigger: object;
12
12
  }): VNode;
13
13
  /**
14
14
  * Optional slot to place custom content for the tooltip text.
@@ -23,7 +23,7 @@ declare function __VLS_template(): {
23
23
  * **Accessibility**: You must ensure that the trigger attributes are bound to a button when the `open` prop is not `hover`!
24
24
  */
25
25
  default(params: {
26
- trigger: HTMLAttributes;
26
+ trigger: object;
27
27
  }): VNode;
28
28
  /**
29
29
  * Optional slot to place custom content for the tooltip text.
@@ -32,13 +32,17 @@ declare function __VLS_template(): {
32
32
  */
33
33
  tooltip?(): unknown;
34
34
  };
35
- refs: {};
35
+ refs: {
36
+ tooltipWrapperRef: HTMLDivElement;
37
+ tooltipRef: HTMLDivElement;
38
+ };
36
39
  attrs: Partial<{}>;
37
40
  };
38
41
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
39
42
  declare const __VLS_component: import("vue").DefineComponent<OnyxTooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxTooltipProps> & Readonly<{}>, {
40
43
  color: Extract<import("../..").OnyxColor, "neutral" | "danger">;
41
44
  position: import("./types").TooltipPosition;
45
+ alignment: import("../../composables/useWedgePosition").WedgePosition | "auto";
42
46
  fitParent: boolean;
43
47
  open: import("./types").TooltipOpen;
44
48
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,5 +1,6 @@
1
1
  import type { MaybeRefOrGetter } from "vue";
2
2
  import type { DensityProp } from "../../composables/density";
3
+ import type { WedgePosition } from "../../composables/useWedgePosition";
3
4
  import type { OnyxColor } from "../../types";
4
5
  export type TooltipOptions = {
5
6
  /**
@@ -25,6 +26,10 @@ export type OnyxTooltipProps = DensityProp & {
25
26
  * How to position the tooltip relative to the parent element.
26
27
  */
27
28
  position?: TooltipPosition;
29
+ /**
30
+ * How to align the wedge relative to the parent element.
31
+ */
32
+ alignment?: WedgePosition | "auto";
28
33
  /**
29
34
  * If `true`, the tooltip will match the width of the parent/slot element.
30
35
  */
@@ -40,7 +45,7 @@ export type OnyxTooltipProps = DensityProp & {
40
45
  */
41
46
  open?: TooltipOpen;
42
47
  };
43
- export declare const TOOLTIP_POSITIONS: readonly ["top", "bottom"];
48
+ export declare const TOOLTIP_POSITIONS: readonly ["top", "bottom", "auto"];
44
49
  export type TooltipPosition = (typeof TOOLTIP_POSITIONS)[number];
45
50
  export type TooltipOpen = "hover" | "click" | boolean | ({
46
51
  type: "hover";
@@ -1,5 +1,5 @@
1
- declare const REQUIRED_MARKER: readonly ["optional", "required"];
2
- export type RequiredMarkerType = (typeof REQUIRED_MARKER)[number];
1
+ export declare const RequiredMarkerTypes: readonly ["optional", "required"];
2
+ export type RequiredMarkerType = (typeof RequiredMarkerTypes)[number];
3
3
  export type RequiredMarkerProp = {
4
4
  /**
5
5
  * Whether the a value for this form element is required.
@@ -25,4 +25,3 @@ export declare const useRequired: (props: RequiredMarkerProp) => {
25
25
  "onyx-optional-marker": boolean;
26
26
  }>;
27
27
  };
28
- export {};
@@ -1,6 +1,6 @@
1
1
  import { type MaybeRef } from "vue";
2
2
  export type OpenDirection = "top" | "bottom";
3
- export declare const useOpenDirection: (element: MaybeRef<Element | undefined>) => {
3
+ export declare const useOpenDirection: (element: MaybeRef<Element | undefined>, defaultDirection?: OpenDirection) => {
4
4
  /**
5
5
  * Direction in which the flyout etc. should open to.
6
6
  */
@@ -11,3 +11,4 @@ export declare const useOpenDirection: (element: MaybeRef<Element | undefined>)
11
11
  */
12
12
  updateOpenDirection: () => void;
13
13
  };
14
+ export declare const findParentWithHiddenOverflow: (element?: Element) => Element | undefined;
@@ -0,0 +1,13 @@
1
+ import { type MaybeRef } from "vue";
2
+ export type WedgePosition = "center" | "left" | "right";
3
+ export declare const useWedgePosition: (element: MaybeRef<Element | undefined>, tooltipElement: MaybeRef<Element | undefined>) => {
4
+ /**
5
+ * Direction in which the flyout etc. should open to.
6
+ */
7
+ wedgePosition: import("vue").Ref<WedgePosition, WedgePosition>;
8
+ /**
9
+ * Detects in which direction a flyout etc. should be opened, depending on the available space in each direction.
10
+ * Should only be called onBeforeMount or later to support server side rendering.
11
+ */
12
+ updateWedgePosition: () => void;
13
+ };