sit-onyx 1.0.0-beta.1 → 1.0.0-beta.3

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.
@@ -1,7 +1,7 @@
1
1
  import type { DensityProp } from "../../composables/density";
2
2
  import type { RequiredMarkerProp } from "../../composables/required";
3
3
  import type { AutofocusProp, BaseSelectOption, Direction, SelectOptionValue } from "../../types";
4
- export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & {
4
+ export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & Pick<BaseSelectOption, "truncation"> & {
5
5
  /**
6
6
  * Checkbox options.
7
7
  */
@@ -2,7 +2,7 @@ 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 & {
5
+ export type OnyxRadioGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & RequiredMarkerProp & CustomValidityProp & Pick<BaseSelectOption, "truncation"> & {
6
6
  /**
7
7
  * Options for the individual radio buttons of the group.
8
8
  */
@@ -51,7 +51,7 @@ export type SelectModelValueProps<TValue extends SelectOptionValue> = {
51
51
  label?: string;
52
52
  };
53
53
  };
54
- export type OnyxSelectProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & SelectModelValueProps<TValue> & SelectSearchProps & Omit<OnyxSelectInputProps<TValue>, "density" | "modelValue"> & AutofocusProp & {
54
+ export type OnyxSelectProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & SelectModelValueProps<TValue> & SelectSearchProps & Omit<OnyxSelectInputProps<TValue>, "density" | "modelValue"> & AutofocusProp & Pick<BaseSelectOption, "truncation"> & {
55
55
  /**
56
56
  * If true, the select popover is expanded and visible.
57
57
  * Property is managed internally, when undefined.
@@ -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
  };