sit-onyx 1.0.0-beta.26 → 1.0.0-beta.28

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.
Files changed (31) hide show
  1. package/dist/components/OnyxCheckboxGroup/types.d.ts +2 -5
  2. package/dist/components/OnyxErrorTooltip/OnyxErrorTooltip.vue.d.ts +49 -0
  3. package/dist/components/OnyxNavBar/modules/OnyxFlyoutMenu/OnyxFlyoutMenu.vue.d.ts +4 -6
  4. package/dist/components/OnyxNavBar/modules/OnyxFlyoutMenu/types.d.ts +6 -0
  5. package/dist/components/OnyxNavBar/modules/OnyxNavButton/NavButtonLayout.vue.d.ts +40 -12
  6. package/dist/components/OnyxNavBar/modules/OnyxUserMenu/OnyxUserMenu.vue.d.ts +19 -9
  7. package/dist/components/OnyxNavBar/modules/OnyxUserMenu/UserMenuLayout.vue.d.ts +7 -7
  8. package/dist/components/OnyxNavBar/modules/OnyxUserMenu/types.d.ts +6 -0
  9. package/dist/components/OnyxRadioGroup/types.d.ts +2 -6
  10. package/dist/components/OnyxRipple/OnyxRipple.vue.d.ts +1 -1
  11. package/dist/components/OnyxSelect/types.d.ts +3 -2
  12. package/dist/components/OnyxTooltip/OnyxTooltip.vue.d.ts +1 -1
  13. package/dist/components/examples/GridPlayground/EditGridElementDialog/EditGridElementDialog.vue.d.ts +36 -0
  14. package/dist/components/examples/GridPlayground/{GridElement.vue.d.ts → GridBadge/GridBadge.vue.d.ts} +7 -5
  15. package/dist/components/examples/GridPlayground/GridElement/GridElement.vue.d.ts +43 -0
  16. package/dist/components/examples/GridPlayground/GridOverlay/GridOverlay.vue.d.ts +29 -0
  17. package/dist/components/examples/GridPlayground/GridPlayground.vue.d.ts +0 -25
  18. package/dist/composables/asymmetricComputed.d.ts +13 -0
  19. package/dist/composables/required.d.ts +1 -0
  20. package/dist/composables/scrollEnd.d.ts +1 -1
  21. package/dist/composables/useCustomValidity.d.ts +0 -5
  22. package/dist/composables/useManagedState.d.ts +7 -4
  23. package/dist/composables/useResizeObserver.d.ts +2 -2
  24. package/dist/composables/useRipple.d.ts +2 -2
  25. package/dist/composables/useTimer.d.ts +1 -1
  26. package/dist/index.cjs +4 -5
  27. package/dist/index.js +1334 -1277
  28. package/dist/style.css +1 -1
  29. package/package.json +1 -1
  30. package/dist/components/OnyxRadioGroup/OnyxRadioGroup.d.ts +0 -1
  31. package/dist/components/examples/GridPlayground/GridElementsIndicator.vue.d.ts +0 -22
@@ -2,7 +2,8 @@ import type { DensityProp } from "../../composables/density";
2
2
  import type { RequiredMarkerProp } from "../../composables/required";
3
3
  import type { CustomValidityProp } from "../../composables/useCustomValidity";
4
4
  import type { AutofocusProp, BaseSelectOption, Direction, SelectOptionValue } from "../../types";
5
- export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & Pick<BaseSelectOption, "truncation"> & {
5
+ import type { OnyxFormElementProps } from "../OnyxFormElement/types";
6
+ export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & Pick<BaseSelectOption, "truncation"> & Pick<OnyxFormElementProps, "label" | "hideLabel"> & {
6
7
  /**
7
8
  * Checkbox options.
8
9
  */
@@ -11,10 +12,6 @@ export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOpti
11
12
  * Currently checked checkboxes.
12
13
  */
13
14
  modelValue?: TValue[];
14
- /**
15
- * Headline to show above all checkboxes which is also the fieldset legend.
16
- */
17
- headline?: string;
18
15
  /**
19
16
  * Direction of the checkboxes.
20
17
  */
@@ -0,0 +1,49 @@
1
+ import { type FormErrorMessages } from "../../composables/useCustomValidity";
2
+ declare function __VLS_template(): Readonly<{
3
+ /**
4
+ * Any component. Will be wrapped in an OnyxTooltip showing
5
+ * an error message if an error message is set.
6
+ */
7
+ default(): unknown;
8
+ }> & {
9
+ /**
10
+ * Any component. Will be wrapped in an OnyxTooltip showing
11
+ * an error message if an error message is set.
12
+ */
13
+ default(): unknown;
14
+ };
15
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
16
+ /**
17
+ * The given component will be shown inside a tooltip when
18
+ * errorMessages are provided. Without errorMessages, the
19
+ * component will not be rendered inside a slot.
20
+ */
21
+ errorMessages?: FormErrorMessages;
22
+ /** We don't show an error if the content is not interactive */
23
+ disabled?: boolean;
24
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
25
+ /**
26
+ * The given component will be shown inside a tooltip when
27
+ * errorMessages are provided. Without errorMessages, the
28
+ * component will not be rendered inside a slot.
29
+ */
30
+ errorMessages?: FormErrorMessages;
31
+ /** We don't show an error if the content is not interactive */
32
+ disabled?: boolean;
33
+ }>>>, {}, {}>;
34
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
35
+ export default _default;
36
+ type __VLS_WithTemplateSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
41
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
42
+ type __VLS_TypePropsToOption<T> = {
43
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
44
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
45
+ } : {
46
+ type: import('vue').PropType<T[K]>;
47
+ required: true;
48
+ };
49
+ };
@@ -3,12 +3,10 @@ import type { SelectOptionValue } from "../../../../types";
3
3
  import type { OnyxFlyoutMenuProps } from "./types";
4
4
  declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
6
- "onUpdate:open"?: ((open: boolean) => any) | undefined;
6
+ "onUpdate:open"?: ((isOpen: boolean) => any) | undefined;
7
7
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
8
- "onUpdate:open"?: ((open: boolean) => any) | undefined;
9
- }, never>, "onUpdate:open"> & ({
10
- open?: boolean;
11
- } & OnyxFlyoutMenuProps)> & import("vue").PublicProps;
8
+ "onUpdate:open"?: ((isOpen: boolean) => any) | undefined;
9
+ }, never>, "onUpdate:open"> & OnyxFlyoutMenuProps> & import("vue").PublicProps;
12
10
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
13
11
  attrs: any;
14
12
  slots: ReturnType<() => Readonly<{
@@ -46,7 +44,7 @@ declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(_
46
44
  */
47
45
  footer?(): unknown;
48
46
  }>;
49
- emit: (evt: "update:open", open: boolean) => void;
47
+ emit: ((evt: "update:open", isOpen: boolean) => void) & {};
50
48
  }>) => VNode<import("vue").RendererNode, import("vue").RendererElement, {
51
49
  [key: string]: any;
52
50
  }> & {
@@ -1,4 +1,10 @@
1
+ import type { ManagedProp } from "../../../../composables/useManagedState";
1
2
  export type OnyxFlyoutMenuProps = {
3
+ /**
4
+ * If the flyout is expanded or not.
5
+ * If `undefined`, the state will be managed internally.
6
+ */
7
+ open?: ManagedProp<boolean>;
2
8
  /**
3
9
  * Aria label for the flyout.
4
10
  */
@@ -1,10 +1,4 @@
1
- import type { OnyxNavButtonProps } from "./types";
2
- declare let __VLS_typeProps: OnyxNavButtonProps & {
3
- isMobile: boolean;
4
- };
5
- type __VLS_PublicProps = {
6
- "mobileChildrenOpen"?: boolean;
7
- } & typeof __VLS_typeProps;
1
+ import { type ManagedProp } from "../../../../composables/useManagedState";
8
2
  declare function __VLS_template(): Readonly<{
9
3
  button?(): unknown;
10
4
  options?(): unknown;
@@ -12,13 +6,47 @@ declare function __VLS_template(): Readonly<{
12
6
  button?(): unknown;
13
7
  options?(): unknown;
14
8
  };
15
- declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
- "update:mobileChildrenOpen": (mobileChildrenOpen: boolean) => void;
17
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
18
- "onUpdate:mobileChildrenOpen"?: ((mobileChildrenOpen: boolean) => any) | undefined;
19
- }, {}, {}>;
9
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<import("../../../OnyxExternalLinkIcon/types").OnyxExternalLinkIcon & {
10
+ label: string;
11
+ active?: boolean;
12
+ } & {
13
+ isMobile: boolean;
14
+ /**
15
+ * Controls the open state for the mobile children.
16
+ * Is managed internally if not provided.
17
+ */
18
+ mobileChildrenOpen: ManagedProp<boolean>;
19
+ }>, {
20
+ mobileChildrenOpen: symbol;
21
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "update:mobileChildrenOpen": (isOpen: boolean) => void;
23
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<import("../../../OnyxExternalLinkIcon/types").OnyxExternalLinkIcon & {
24
+ label: string;
25
+ active?: boolean;
26
+ } & {
27
+ isMobile: boolean;
28
+ /**
29
+ * Controls the open state for the mobile children.
30
+ * Is managed internally if not provided.
31
+ */
32
+ mobileChildrenOpen: ManagedProp<boolean>;
33
+ }>, {
34
+ mobileChildrenOpen: symbol;
35
+ }>>> & {
36
+ "onUpdate:mobileChildrenOpen"?: ((isOpen: boolean) => any) | undefined;
37
+ }, {
38
+ mobileChildrenOpen: ManagedProp<boolean>;
39
+ }, {}>;
20
40
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
21
41
  export default _default;
42
+ type __VLS_WithDefaults<P, D> = {
43
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
44
+ default: D[K];
45
+ }> : P[K];
46
+ };
47
+ type __VLS_Prettify<T> = {
48
+ [K in keyof T]: T[K];
49
+ } & {};
22
50
  type __VLS_WithTemplateSlots<T, S> = T & {
23
51
  new (): {
24
52
  $slots: S;
@@ -1,8 +1,4 @@
1
1
  import type { OnyxUserMenuProps } from "./types";
2
- declare let __VLS_typeProps: OnyxUserMenuProps;
3
- type __VLS_PublicProps = {
4
- "flyoutOpen"?: boolean;
5
- } & typeof __VLS_typeProps;
6
2
  declare function __VLS_template(): Readonly<{
7
3
  /**
8
4
  * Slot for the menu options. Its recommended to use the `OnyxMenuItem` component here.
@@ -22,13 +18,27 @@ declare function __VLS_template(): Readonly<{
22
18
  */
23
19
  footer?(): unknown;
24
20
  };
25
- declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
- "update:flyoutOpen": (flyoutOpen: boolean) => void;
27
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
28
- "onUpdate:flyoutOpen"?: ((flyoutOpen: boolean) => any) | undefined;
29
- }, {}, {}>;
21
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxUserMenuProps>, {
22
+ flyoutOpen: symbol;
23
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "update:flyoutOpen": (isOpen: boolean) => void;
25
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxUserMenuProps>, {
26
+ flyoutOpen: symbol;
27
+ }>>> & {
28
+ "onUpdate:flyoutOpen"?: ((isOpen: boolean) => any) | undefined;
29
+ }, {
30
+ flyoutOpen: import("../../../../composables/useManagedState").ManagedProp<boolean>;
31
+ }, {}>;
30
32
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
31
33
  export default _default;
34
+ type __VLS_WithDefaults<P, D> = {
35
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
36
+ default: D[K];
37
+ }> : P[K];
38
+ };
39
+ type __VLS_Prettify<T> = {
40
+ [K in keyof T]: T[K];
41
+ } & {};
32
42
  type __VLS_WithTemplateSlots<T, S> = T & {
33
43
  new (): {
34
44
  $slots: S;
@@ -1,14 +1,14 @@
1
+ import { type ManagedProp } from "../../../../composables/useManagedState";
1
2
  import type { SelectOptionValue } from "../../../../types";
2
3
  declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
4
  props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
4
- "onUpdate:flyoutOpen"?: ((flyoutOpen: boolean) => any) | undefined;
5
+ "onUpdate:flyoutOpen"?: ((isOpen: boolean) => any) | undefined;
5
6
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
6
- "onUpdate:flyoutOpen"?: ((flyoutOpen: boolean) => any) | undefined;
7
- }, never>, "onUpdate:flyoutOpen"> & ({
8
- flyoutOpen?: boolean;
9
- } & {
7
+ "onUpdate:flyoutOpen"?: ((isOpen: boolean) => any) | undefined;
8
+ }, never>, "onUpdate:flyoutOpen"> & {
10
9
  isMobile: boolean;
11
- })> & import("vue").PublicProps;
10
+ flyoutOpen: ManagedProp<boolean>;
11
+ }> & import("vue").PublicProps;
12
12
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
13
13
  attrs: any;
14
14
  slots: ReturnType<() => Readonly<{
@@ -22,7 +22,7 @@ declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(_
22
22
  options?(): unknown;
23
23
  footer?(): unknown;
24
24
  }>;
25
- emit: (evt: "update:flyoutOpen", flyoutOpen: boolean) => void;
25
+ emit: ((evt: "update:flyoutOpen", isOpen: boolean) => void) & {};
26
26
  }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
27
27
  [key: string]: any;
28
28
  }> & {
@@ -1,3 +1,4 @@
1
+ import type { ManagedProp } from "../../../../composables/useManagedState";
1
2
  export type OnyxUserMenuProps = {
2
3
  /**
3
4
  * User name.
@@ -11,4 +12,9 @@ export type OnyxUserMenuProps = {
11
12
  * Optional user description that is displayed when the menu is opened.
12
13
  */
13
14
  description?: string;
15
+ /**
16
+ * If the flyout is expanded or not. Only has an effect in desktop (non-mobile) mode.
17
+ * If `undefined`, the state will be managed internally.
18
+ */
19
+ flyoutOpen?: ManagedProp<boolean>;
14
20
  };
@@ -2,7 +2,8 @@ import type { DensityProp } from "../../composables/density";
2
2
  import type { RequiredMarkerProp } from "../../composables/required";
3
3
  import type { CustomValidityProp } from "../../composables/useCustomValidity";
4
4
  import type { AutofocusProp, BaseSelectOption, Direction, SelectOptionValue } from "../../types";
5
- export type OnyxRadioGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & RequiredMarkerProp & CustomValidityProp & Pick<BaseSelectOption, "truncation"> & {
5
+ import type { OnyxFormElementProps } from "../OnyxFormElement/types";
6
+ export type OnyxRadioGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & RequiredMarkerProp & CustomValidityProp & Pick<BaseSelectOption, "truncation"> & Pick<OnyxFormElementProps, "label" | "hideLabel"> & {
6
7
  /**
7
8
  * Options for the individual radio buttons of the group.
8
9
  */
@@ -17,11 +18,6 @@ export type OnyxRadioGroupProps<TValue extends SelectOptionValue = SelectOptionV
17
18
  * The selected radio button option.
18
19
  */
19
20
  modelValue?: TValue;
20
- /**
21
- * Headline shown above the radio group, which is also the fieldset legend.
22
- * It will also show the required indicator, if `require` is set to `true`
23
- */
24
- headline?: string;
25
21
  /**
26
22
  * Disable the radio group.
27
23
  */
@@ -1,4 +1,4 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {
2
- events: import("vue").Ref<Record<string, (event: MouseEvent) => void>, Record<string, (event: MouseEvent) => void>>;
2
+ events: import("vue").Ref<Record<string, (event: MouseEvent) => void>>;
3
3
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
4
4
  export default _default;
@@ -1,4 +1,5 @@
1
1
  import type { DensityProp } from "../../composables/density";
2
+ import type { ManagedProp } from "../../composables/useManagedState";
2
3
  import type { AutofocusProp, BaseSelectOption, SelectOptionValue } from "../../types";
3
4
  import type { OnyxSelectInputProps } from "../OnyxSelectInput/types";
4
5
  import type { OnyxSelectOptionProps } from "../OnyxSelectOption/types";
@@ -20,7 +21,7 @@ export type SelectSearchProps = {
20
21
  * Then, you can handle the filtering yourself by reducing the `options` as desired.
21
22
  * Hint: Cover `valueLabel` to prevent the disappearance of the current selections label
22
23
  */
23
- searchTerm?: string;
24
+ searchTerm?: ManagedProp<string>;
24
25
  } | {
25
26
  withSearch?: false;
26
27
  searchTerm?: never;
@@ -69,7 +70,7 @@ export type OnyxSelectProps<TValue extends SelectOptionValue = SelectOptionValue
69
70
  * If true, the select popover is expanded and visible.
70
71
  * Property is managed internally, when undefined.
71
72
  */
72
- open?: boolean;
73
+ open?: ManagedProp<boolean>;
73
74
  /**
74
75
  * Label describing the list of options to support assistive technologies.
75
76
  * @example: { label: "Your Animal", listLabel: "List of animals" }
@@ -43,9 +43,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
43
43
  open: string;
44
44
  }>>>, {
45
45
  color: Extract<import("../..").OnyxColor, "neutral" | "danger">;
46
- open: import("./types").TooltipOpen;
47
46
  position: import("./types").TooltipPosition;
48
47
  fitParent: boolean;
48
+ open: import("./types").TooltipOpen;
49
49
  }, {}>;
50
50
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
51
51
  export default _default;
@@ -0,0 +1,36 @@
1
+ import { type OnyxBreakpoint } from "../../../../types";
2
+ export type GridElementConfig = {
3
+ columnCount: number;
4
+ breakpoints?: Partial<Record<OnyxBreakpoint, number>>;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
7
+ open?: boolean;
8
+ /**
9
+ * Initial value. Useful if editing an existing element.
10
+ */
11
+ initialValue?: GridElementConfig;
12
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ close: () => void;
14
+ submit: (element: GridElementConfig) => void;
15
+ delete: () => void;
16
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
17
+ open?: boolean;
18
+ /**
19
+ * Initial value. Useful if editing an existing element.
20
+ */
21
+ initialValue?: GridElementConfig;
22
+ }>>> & {
23
+ onSubmit?: ((element: GridElementConfig) => any) | undefined;
24
+ onClose?: (() => any) | undefined;
25
+ onDelete?: (() => any) | undefined;
26
+ }, {}, {}>;
27
+ export default _default;
28
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
29
+ type __VLS_TypePropsToOption<T> = {
30
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
31
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
32
+ } : {
33
+ type: import('vue').PropType<T[K]>;
34
+ required: true;
35
+ };
36
+ };
@@ -1,10 +1,12 @@
1
- import type { GridElementSettings } from "./GridPlayground.vue";
1
+ import type { OnyxColor } from "../../../../types";
2
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
- settings: GridElementSettings;
4
- selected?: boolean;
3
+ value: string | number;
4
+ label: string;
5
+ color: Extract<OnyxColor, "info" | "warning" | "danger">;
5
6
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
6
- settings: GridElementSettings;
7
- selected?: boolean;
7
+ value: string | number;
8
+ label: string;
9
+ color: Extract<OnyxColor, "info" | "warning" | "danger">;
8
10
  }>>>, {}, {}>;
9
11
  export default _default;
10
12
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -0,0 +1,43 @@
1
+ import type { GridElementConfig } from "../EditGridElementDialog/EditGridElementDialog.vue";
2
+ declare function __VLS_template(): Readonly<{
3
+ default?(props: {
4
+ /**
5
+ * Number of grid columns the element is currently spanning.
6
+ */
7
+ gridSpan: number;
8
+ }): unknown;
9
+ }> & {
10
+ default?(props: {
11
+ /**
12
+ * Number of grid columns the element is currently spanning.
13
+ */
14
+ gridSpan: number;
15
+ }): unknown;
16
+ };
17
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<GridElementConfig & {
18
+ label: string;
19
+ mode?: "default" | "outline";
20
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ click: () => void;
22
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<GridElementConfig & {
23
+ label: string;
24
+ mode?: "default" | "outline";
25
+ }>>> & {
26
+ onClick?: (() => any) | undefined;
27
+ }, {}, {}>;
28
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
29
+ export default _default;
30
+ type __VLS_WithTemplateSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
35
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
+ type __VLS_TypePropsToOption<T> = {
37
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
+ } : {
40
+ type: import('vue').PropType<T[K]>;
41
+ required: true;
42
+ };
43
+ };
@@ -0,0 +1,29 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
2
+ columns?: number;
3
+ }>, {
4
+ columns: number;
5
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
6
+ columns?: number;
7
+ }>, {
8
+ columns: number;
9
+ }>>>, {
10
+ columns: number;
11
+ }, {}>;
12
+ export default _default;
13
+ type __VLS_WithDefaults<P, D> = {
14
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
15
+ default: D[K];
16
+ }> : P[K];
17
+ };
18
+ type __VLS_Prettify<T> = {
19
+ [K in keyof T]: T[K];
20
+ } & {};
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToOption<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
@@ -1,27 +1,2 @@
1
- declare const BREAKPOINTS: {
2
- readonly "2xs": {
3
- readonly cols: 4;
4
- };
5
- readonly xs: {
6
- readonly cols: 8;
7
- };
8
- readonly sm: {
9
- readonly cols: 8;
10
- };
11
- readonly md: {
12
- readonly cols: 12;
13
- };
14
- readonly lg: {
15
- readonly cols: 16;
16
- };
17
- readonly xl: {
18
- readonly cols: 16;
19
- };
20
- };
21
- export type GridBreakpoints = keyof typeof BREAKPOINTS;
22
- export type GridElementSettings = {
23
- breakpoint?: GridBreakpoints;
24
- spans: number;
25
- }[];
26
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
27
2
  export default _default;
@@ -0,0 +1,13 @@
1
+ import { type Ref } from "vue";
2
+ export type AsymmetricComputedOptions<GetterT, SetterT> = {
3
+ set: (v: SetterT) => void;
4
+ get: () => GetterT;
5
+ };
6
+ export interface AsymmetricComputedRef<GetterT, SetterT> extends Ref {
7
+ get value(): GetterT;
8
+ set value(v: SetterT);
9
+ }
10
+ /**
11
+ * Wrapper for `computed` that allows different typings for getter and setter.
12
+ */
13
+ export declare const asymComputed: <GetT, SetT>(opts: AsymmetricComputedOptions<GetT, SetT>) => AsymmetricComputedRef<GetT, SetT>;
@@ -8,6 +8,7 @@ export type RequiredMarkerProp = {
8
8
  /**
9
9
  * Required mode: `optional` will show an `(optional)` text after the label for optional inputs.
10
10
  * `required` will show an `*` indicator for required inputs after the label instead.
11
+ * No marker will be visible if the label is hidden.
11
12
  * @default undefined By default the parents setting is used, if none is defined on any `required` is the default.
12
13
  */
13
14
  requiredMarker?: RequiredMarkerType;
@@ -24,5 +24,5 @@ export declare const useScrollEnd: (options: UseScrollEndOptions) => {
24
24
  vScrollEnd: {
25
25
  mounted: (el: Pick<HTMLElement, "addEventListener" | "removeEventListener">) => void;
26
26
  };
27
- isScrollEnd: Ref<boolean, boolean>;
27
+ isScrollEnd: Ref<boolean>;
28
28
  };
@@ -85,9 +85,4 @@ export declare const useCustomValidity: (options: UseCustomValidityOptions) => {
85
85
  * A custom error or the default translation of the first invalid state if one exists.
86
86
  */
87
87
  errorMessages: import("vue").ComputedRef<FormErrorMessages | undefined>;
88
- /**
89
- * A combination of a label (if it is hidden) and the error message (if an error exists).
90
- * Usage e.g. on OnyxRadioButton, OnyxCheckbox, OnyxSwitch where no error message footer exists.
91
- */
92
- title: import("vue").ComputedRef<string | undefined>;
93
88
  };
@@ -1,4 +1,7 @@
1
1
  import { type Ref } from "vue";
2
+ export type ManagedProp<T> = ManagedSymbolType | T;
3
+ export type ManagedSymbolType = typeof MANAGED_SYMBOL;
4
+ export declare const MANAGED_SYMBOL: unique symbol;
2
5
  /**
3
6
  * Composable for conditionally managing state based on the prop value.
4
7
  *
@@ -11,8 +14,8 @@ import { type Ref } from "vue";
11
14
  * @returns ref of the state and isManaged
12
15
  *
13
16
  * @example ```ts
14
- * // IMPORTANT: default value MUST be set to undefined
15
- * const props = withDefaults(defineProps<{ isExpanded?: boolean }>(), { isExpanded: undefined });
17
+ * // IMPORTANT: default value MUST be set to MANAGED_SYMBOL
18
+ * const props = withDefaults(defineProps<{ isExpanded?: ManagedProp<boolean> }>(), { isExpanded: MANAGED_SYMBOL });
16
19
  * const emit = defineEmits<{ "update:isExpanded": [isExpanded: boolean] }>();
17
20
  *
18
21
  * const { state: isExpanded } = useManagedState(
@@ -22,7 +25,7 @@ import { type Ref } from "vue";
22
25
  * );
23
26
  * ```
24
27
  */
25
- export declare const useManagedState: <Prop extends Readonly<Ref<T | undefined>>, T>(prop: Prop, initialState: T, emit: (val: T) => void) => {
26
- state: import("vue").WritableComputedRef<T>;
28
+ export declare const useManagedState: <T, Prop extends Readonly<Ref<T | ManagedSymbolType>>, Referable extends boolean = false, V = Referable extends true ? typeof MANAGED_SYMBOL | T : T>(prop: Prop, initialState: T, emit: (val: T) => void) => {
29
+ state: import("./asymmetricComputed").AsymmetricComputedRef<V, T>;
27
30
  isManaged: import("vue").ComputedRef<boolean>;
28
31
  };
@@ -8,6 +8,6 @@ export type UseResizeObserverOptions = {
8
8
  box?: ResizeObserverBoxOptions;
9
9
  };
10
10
  export declare const useResizeObserver: (target: Ref<HTMLElement | undefined>, options?: UseResizeObserverOptions) => {
11
- width: Ref<number, number>;
12
- height: Ref<number, number>;
11
+ width: Ref<number>;
12
+ height: Ref<number>;
13
13
  };
@@ -10,10 +10,10 @@ export type RippleInstance = {
10
10
  fadeIn: boolean;
11
11
  };
12
12
  export declare const useRipple: (config: Ref<RippleConfig>) => {
13
- isPointerDown: Ref<boolean, boolean>;
13
+ isPointerDown: Ref<boolean>;
14
14
  ripples: import("vue").Reactive<Map<string, RippleInstance>>;
15
15
  startRipple: (event: MouseEvent) => void;
16
16
  hideRipples: () => void;
17
17
  hideRipple: (el: Pick<HTMLElement, "dataset">) => void;
18
- events: Ref<Record<string, (event: MouseEvent) => void>, Record<string, (event: MouseEvent) => void>>;
18
+ events: Ref<Record<string, (event: MouseEvent) => void>>;
19
19
  };
@@ -6,7 +6,7 @@ export declare const useTimer: (endTime: Ref<ConstructorParameters<typeof Date>[
6
6
  /**
7
7
  * Time (in milliseconds) that the timer has left.
8
8
  */
9
- timeLeft: Ref<number, number>;
9
+ timeLeft: Ref<number>;
10
10
  /**
11
11
  * Whether the timer is ended.
12
12
  */