sit-onyx 1.0.0-beta.0 → 1.0.0-beta.2

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.
@@ -72,7 +72,7 @@ export type OnyxSelectProps<TValue extends SelectOptionValue = SelectOptionValue
72
72
  */
73
73
  lazyLoading?: SelectLazyLoading;
74
74
  };
75
- export type SelectOption<TValue extends SelectOptionValue = SelectOptionValue> = Pick<BaseSelectOption<TValue>, "value" | "label" | "disabled"> & Pick<OnyxSelectOptionProps, "icon"> & {
75
+ export type SelectOption<TValue extends SelectOptionValue = SelectOptionValue> = Pick<BaseSelectOption<TValue>, "value" | "label" | "disabled" | "truncation"> & Pick<OnyxSelectOptionProps, "icon"> & {
76
76
  /**
77
77
  * Optional group name. If set, all options will be grouped under that group name.
78
78
  */
@@ -13,11 +13,14 @@ declare function __VLS_template(): Readonly<{
13
13
  declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxSelectOptionProps>, {
14
14
  active: boolean;
15
15
  multiple: boolean;
16
+ truncation: string;
16
17
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxSelectOptionProps>, {
17
18
  active: boolean;
18
19
  multiple: boolean;
20
+ truncation: string;
19
21
  }>>>, {
20
22
  multiple: boolean;
23
+ truncation: import("../../index.js").TruncationType;
21
24
  active: boolean;
22
25
  }, {}>;
23
26
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -1,3 +1,4 @@
1
+ import type { TruncationType } from "../../types";
1
2
  import type { OnyxListItemProps } from "../OnyxListItem/types";
2
3
  export type OnyxSelectOptionProps = Pick<OnyxListItemProps, "active" | "density"> & {
3
4
  /**
@@ -13,4 +14,8 @@ export type OnyxSelectOptionProps = Pick<OnyxListItemProps, "active" | "density"
13
14
  * Optional icon.
14
15
  */
15
16
  icon?: string;
17
+ /**
18
+ * How to truncate the option label / text content if it exceeds the max width.
19
+ */
20
+ truncation?: TruncationType;
16
21
  };
@@ -1,41 +1,2 @@
1
- import type { OnyxToastProps } from "./types";
2
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxToastProps>, {
3
- color: string;
4
- duration: number;
5
- clickable: boolean;
6
- icon: undefined;
7
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
- click: () => void;
9
- close: () => void;
10
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxToastProps>, {
11
- color: string;
12
- duration: number;
13
- clickable: boolean;
14
- icon: undefined;
15
- }>>> & {
16
- onClick?: (() => any) | undefined;
17
- onClose?: (() => any) | undefined;
18
- }, {
19
- icon: string | false;
20
- color: Extract<import("../..").OnyxColor, "neutral" | "danger" | "warning" | "success">;
21
- duration: number;
22
- clickable: boolean;
23
- }, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
24
2
  export default _default;
25
- type __VLS_WithDefaults<P, D> = {
26
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
27
- default: D[K];
28
- }> : P[K];
29
- };
30
- type __VLS_Prettify<T> = {
31
- [K in keyof T]: T[K];
32
- } & {};
33
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
34
- type __VLS_TypePropsToOption<T> = {
35
- [K in keyof T]-?: {} extends Pick<T, K> ? {
36
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
37
- } : {
38
- type: import('vue').PropType<T[K]>;
39
- required: true;
40
- };
41
- };
@@ -1,5 +1,5 @@
1
1
  import { type ComputedRef, type InjectionKey } from "vue";
2
- import type { OnyxToastProps } from "../OnyxToast/types";
2
+ import type { OnyxToastMessageProps } from "../OnyxToastMessage/types";
3
3
  export type ToastProvider = {
4
4
  /**
5
5
  * Readonly list of currently active toasts.
@@ -25,7 +25,7 @@ export type ProvidedToast = ShowToastOptions & {
25
25
  */
26
26
  onClose: () => void;
27
27
  };
28
- export type ShowToastOptions = OnyxToastProps & {
28
+ export type ShowToastOptions = OnyxToastMessageProps & {
29
29
  /**
30
30
  * Callback when the toast is clicked. Requires `clickable` to be enabled.
31
31
  */
@@ -0,0 +1,41 @@
1
+ import type { OnyxToastMessageProps } from "./types";
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxToastMessageProps>, {
3
+ color: string;
4
+ duration: number;
5
+ clickable: boolean;
6
+ icon: undefined;
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ click: () => void;
9
+ close: () => void;
10
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxToastMessageProps>, {
11
+ color: string;
12
+ duration: number;
13
+ clickable: boolean;
14
+ icon: undefined;
15
+ }>>> & {
16
+ onClick?: (() => any) | undefined;
17
+ onClose?: (() => any) | undefined;
18
+ }, {
19
+ icon: string | false;
20
+ color: Extract<import("../..").OnyxColor, "neutral" | "danger" | "warning" | "success">;
21
+ duration: number;
22
+ clickable: boolean;
23
+ }, {}>;
24
+ export default _default;
25
+ type __VLS_WithDefaults<P, D> = {
26
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
27
+ default: D[K];
28
+ }> : P[K];
29
+ };
30
+ type __VLS_Prettify<T> = {
31
+ [K in keyof T]: T[K];
32
+ } & {};
33
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
34
+ type __VLS_TypePropsToOption<T> = {
35
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
36
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
37
+ } : {
38
+ type: import('vue').PropType<T[K]>;
39
+ required: true;
40
+ };
41
+ };
@@ -1,6 +1,6 @@
1
1
  import type { DensityProp } from "../../composables/density";
2
2
  import type { OnyxColor } from "../../types";
3
- export type OnyxToastProps = DensityProp & {
3
+ export type OnyxToastMessageProps = DensityProp & {
4
4
  /**
5
5
  * Main toast headline.
6
6
  */