sit-onyx 1.0.0-beta.46 → 1.0.0-beta.48

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 (29) hide show
  1. package/dist/components/OnyxButton/OnyxButton.vue.d.ts +1 -1
  2. package/dist/components/OnyxButton/types.d.ts +2 -1
  3. package/dist/components/OnyxCheckboxGroup/types.d.ts +2 -1
  4. package/dist/components/OnyxDataGrid/OnyxDataGridRenderer/OnyxDataGridRenderer.vue.d.ts +17 -0
  5. package/dist/components/OnyxDataGrid/OnyxDataGridRenderer/types.d.ts +87 -0
  6. package/dist/components/OnyxDataGrid/types.d.ts +8 -0
  7. package/dist/components/OnyxForm/OnyxForm.core.d.ts +58 -0
  8. package/dist/components/OnyxForm/OnyxForm.vue.d.ts +25 -0
  9. package/dist/components/OnyxForm/types.d.ts +3 -0
  10. package/dist/components/OnyxIconButton/OnyxIconButton.vue.d.ts +1 -1
  11. package/dist/components/OnyxIconButton/types.d.ts +2 -1
  12. package/dist/components/OnyxInput/OnyxInput.vue.d.ts +1 -1
  13. package/dist/components/OnyxInput/types.d.ts +2 -1
  14. package/dist/components/OnyxRadioGroup/types.d.ts +2 -1
  15. package/dist/components/OnyxSelect/types.d.ts +6 -1
  16. package/dist/components/OnyxSelectInput/types.d.ts +2 -1
  17. package/dist/components/OnyxStepper/OnyxStepper.vue.d.ts +1 -1
  18. package/dist/components/OnyxStepper/types.d.ts +2 -1
  19. package/dist/components/OnyxSwitch/OnyxSwitch.vue.d.ts +1 -1
  20. package/dist/components/OnyxSwitch/types.d.ts +2 -1
  21. package/dist/components/OnyxTable/types.d.ts +23 -0
  22. package/dist/components/OnyxTextarea/OnyxTextarea.vue.d.ts +1 -1
  23. package/dist/index.cjs +4 -4
  24. package/dist/index.d.ts +3 -0
  25. package/dist/index.js +1486 -1416
  26. package/dist/style.css +1 -1
  27. package/dist/types/components.d.ts +2 -1
  28. package/dist/types/utils.d.ts +5 -0
  29. package/package.json +3 -2
@@ -2,7 +2,7 @@ import type { OnyxButtonProps } from "./types";
2
2
  declare const _default: import("vue").DefineComponent<OnyxButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxButtonProps> & Readonly<{}>, {
3
3
  type: import("./types").ButtonType;
4
4
  color: import("./types").ButtonColor;
5
- disabled: boolean;
5
+ disabled: import("../OnyxForm/OnyxForm.core").FormInjected<boolean>;
6
6
  loading: boolean;
7
7
  mode: import("./types").ButtonMode;
8
8
  skeleton: boolean;
@@ -1,5 +1,6 @@
1
1
  import type { DensityProp } from "../../composables/density";
2
2
  import type { AutofocusProp } from "../../types";
3
+ import type { FormInjected } from "../OnyxForm/OnyxForm.core";
3
4
  export type OnyxButtonProps = DensityProp & AutofocusProp & {
4
5
  /**
5
6
  * The text content of the button.
@@ -8,7 +9,7 @@ export type OnyxButtonProps = DensityProp & AutofocusProp & {
8
9
  /**
9
10
  * If the button should be disabled or not.
10
11
  */
11
- disabled?: boolean;
12
+ disabled?: FormInjected<boolean>;
12
13
  /**
13
14
  * Shows a loading indicator.
14
15
  */
@@ -2,6 +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
+ import type { FormInjected } from "../OnyxForm/OnyxForm.core";
5
6
  import type { OnyxFormElementProps } from "../OnyxFormElement/types";
6
7
  export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & Pick<BaseSelectOption, "truncation"> & Pick<OnyxFormElementProps, "label" | "hideLabel"> & {
7
8
  /**
@@ -30,7 +31,7 @@ export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOpti
30
31
  /**
31
32
  * Whether all checkboxes should be disabled.
32
33
  */
33
- disabled?: boolean;
34
+ disabled?: FormInjected<boolean>;
34
35
  /**
35
36
  * If set, the specified number of skeleton radio buttons will be shown.
36
37
  */
@@ -0,0 +1,17 @@
1
+ import type { DataGridEntry, DataGridMetadata } from "../types";
2
+ import type { OnyxDataGridRendererProps } from "./types";
3
+ declare const _default: <TEntry extends DataGridEntry, TMetadata extends DataGridMetadata>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<{}> & Readonly<{}>, never>, never> & OnyxDataGridRendererProps<TEntry, TMetadata>> & import("vue").PublicProps;
5
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
6
+ attrs: any;
7
+ slots: {};
8
+ emit: {};
9
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
10
+ [key: string]: any;
11
+ }> & {
12
+ __ctx?: Awaited<typeof __VLS_setup>;
13
+ };
14
+ export default _default;
15
+ type __VLS_PrettifyLocal<T> = {
16
+ [K in keyof T]: T[K];
17
+ } & {};
@@ -0,0 +1,87 @@
1
+ import type { FunctionalComponent, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from "vue";
2
+ import type { WithHTMLAttributes } from "../../../types";
3
+ import type { OnyxTableProps } from "../../OnyxTable/types";
4
+ import type { DataGridEntry, DataGridMetadata } from "../types";
5
+ export type OnyxDataGridRendererProps<TEntry extends DataGridEntry = DataGridEntry, TMetadata extends DataGridMetadata = DataGridMetadata> = OnyxTableProps & {
6
+ /**
7
+ * Will define which columns and their headers are rendered in which order.
8
+ */
9
+ columns: DataGridRendererColumn<TEntry, object>[];
10
+ rows: DataGridRendererRow<TEntry, TMetadata>[];
11
+ };
12
+ /**
13
+ * Describes how a column header is rendered in the data grid.
14
+ */
15
+ export type DataGridRendererColumn<TEntry extends DataGridEntry, TProps extends object> = {
16
+ /**
17
+ * (Unique) Key of the column - usually a key of the table data.
18
+ * But can also be used for custom columns.
19
+ */
20
+ key: keyof TEntry;
21
+ /**
22
+ * The component that renders the header content and is placed into the `<th>` element.
23
+ */
24
+ component: FunctionalComponent<WithHTMLAttributes<TProps>>;
25
+ /**
26
+ * Attributes and data that is provided to the component using `v-bind`.
27
+ */
28
+ props: WithHTMLAttributes<TProps>;
29
+ /**
30
+ * Attributes that are bound directly to the `<th>` element of the column.
31
+ */
32
+ thAttributes?: ThHTMLAttributes;
33
+ };
34
+ /**
35
+ * Describes how a specific row is rendered in the data grid.
36
+ */
37
+ export type DataGridRendererRow<TEntry extends DataGridEntry, TMetadata extends DataGridMetadata = DataGridMetadata> = {
38
+ /**
39
+ * Unique id of the row.
40
+ */
41
+ id: PropertyKey;
42
+ /**
43
+ * Describes how a cell in a specific row is rendered in the data grid.
44
+ * Only cells that are defined in the columns will be rendered in the defined order.
45
+ */
46
+ cells: Partial<Record<keyof TEntry, DataGridRendererCell<TEntry, TMetadata>>>;
47
+ /**
48
+ * Attributes that are bound directly to the `<tr>` element of the row.
49
+ */
50
+ trAttributes?: HTMLAttributes;
51
+ };
52
+ /**
53
+ * Describes how a single cell in a specific row is rendered in the data grid.
54
+ */
55
+ export type DataGridRendererCell<TEntry extends DataGridEntry, TMetadata extends DataGridMetadata = DataGridMetadata> = {
56
+ /**
57
+ * The component that renders the actual cell content and is placed into the `<td>` element.
58
+ */
59
+ component: DataGridRendererCellComponent<TEntry, TMetadata>;
60
+ /**
61
+ * Attributes and data that is provided to the component using `v-bind`.
62
+ */
63
+ props: DataGridRendererCellComponentProps<TEntry, TMetadata>;
64
+ /**
65
+ * Attributes that are bound directly to the `<td>` element of the cell.
66
+ */
67
+ tdAttributes?: TdHTMLAttributes;
68
+ };
69
+ /**
70
+ * Vue component that renders the actual content of a single data grid cell.
71
+ */
72
+ export type DataGridRendererCellComponent<TEntry extends DataGridEntry, TMetadata extends DataGridMetadata = DataGridMetadata> = FunctionalComponent<WithHTMLAttributes<DataGridRendererCellComponentProps<TEntry, TMetadata>, TdHTMLAttributes>>;
73
+ export type DataGridRendererCellComponentProps<TEntry extends DataGridEntry, TMetadata extends DataGridMetadata> = {
74
+ /**
75
+ * Complete row data.
76
+ */
77
+ row: TEntry;
78
+ /**
79
+ * Cell data that is provided to the component via the `metadata` prop.
80
+ */
81
+ metadata?: TMetadata;
82
+ /**
83
+ * Cell data that is provided to the component via the `modelValue` prop.
84
+ * If the cell renders readonly, this will just be the non-editable value.
85
+ */
86
+ modelValue?: TEntry[keyof TEntry];
87
+ };
@@ -0,0 +1,8 @@
1
+ export type DataGridMetadata = Record<string, unknown>;
2
+ /**
3
+ * "Raw" user data for a data grid entry/row, e.g. fetched from a backend service.
4
+ */
5
+ export type DataGridEntry = {
6
+ id: PropertyKey;
7
+ [key: PropertyKey]: unknown;
8
+ };
@@ -0,0 +1,58 @@
1
+ import { type Reactive, type Ref } from "vue";
2
+ /**
3
+ * Props on the `OnyxForm` component.
4
+ * These are injected, so that they can be used in the form child components.
5
+ */
6
+ export type FormInjectedProps = {
7
+ disabled: boolean;
8
+ };
9
+ /**
10
+ * Props that may be used by the form child components.
11
+ */
12
+ type LocalProps = {
13
+ [TKey in keyof FormInjectedProps]?: FormInjected<FormInjectedProps[TKey]>;
14
+ };
15
+ /**
16
+ * Symbol for the injected form injected properties.
17
+ */
18
+ export declare const FORM_INJECTED_SYMBOL: unique symbol;
19
+ export type FORM_INJECTED = typeof FORM_INJECTED_SYMBOL;
20
+ /**
21
+ * Prop type used by form child elements, which indicates that the prop value is taken from the parent form by default.
22
+ * The props **MUST** use `FORM_INJECTED_SYMBOL` as default value.
23
+ * `useFormContext` is used to access the injected form properties.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const props = withDefaults(defineProps<OnyxComponentProps>(), {
28
+ * readonly: FORM_INJECTED_SYMBOL,
29
+ * disabled: FORM_INJECTED_SYMBOL,
30
+ * });
31
+ *
32
+ * const { disabled, readonly } = useFormContext(props);
33
+ * ```
34
+ */
35
+ export type FormInjected<T> = T | FORM_INJECTED;
36
+ export declare const provideFormContext: (formProps: Reactive<FormInjectedProps> | undefined) => void;
37
+ /**
38
+ * Provides the injected form properties (if available).
39
+ * Otherwise a defined default is used.
40
+ * A prop defined on the child component will always take precedence over the injected form properties.
41
+ *
42
+ * The props **MUST** use `FORM_INJECTED_SYMBOL` as default value.
43
+ * The type `FormInjected<T>` can be used as PropType wrapper.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const props = withDefaults(defineProps<OnyxComponentProps>(), {
48
+ * readonly: FORM_INJECTED_SYMBOL, // By default, the forms injected value is used
49
+ * disabled: FORM_INJECTED_SYMBOL, // By default, the forms injected value is used
50
+ * });
51
+ *
52
+ * const { disabled, readonly } = useFormContext(props);
53
+ * ```
54
+ */
55
+ export declare const useFormContext: (props: Reactive<LocalProps>) => {
56
+ disabled: Ref<boolean, boolean>;
57
+ };
58
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { OnyxFormProps } from "./types";
2
+ declare function __VLS_template(): {
3
+ slots: Readonly<{
4
+ /**
5
+ * Any form content
6
+ */
7
+ default?(): unknown;
8
+ }> & {
9
+ /**
10
+ * Any form content
11
+ */
12
+ default?(): unknown;
13
+ };
14
+ refs: {};
15
+ attrs: Partial<{}>;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import("vue").DefineComponent<OnyxFormProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxFormProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ export default _default;
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,3 @@
1
+ import type { DensityProp } from "../../composables/density";
2
+ import type { FormInjectedProps } from "./OnyxForm.core";
3
+ export type OnyxFormProps = Partial<FormInjectedProps> & DensityProp;
@@ -14,7 +14,7 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
14
  declare const __VLS_component: import("vue").DefineComponent<OnyxIconButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxIconButtonProps> & Readonly<{}>, {
15
15
  type: import("../..").ButtonType;
16
16
  color: import("../..").ButtonColor;
17
- disabled: boolean;
17
+ disabled: import("../OnyxForm/OnyxForm.core").FormInjected<boolean>;
18
18
  skeleton: boolean;
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,6 +1,7 @@
1
1
  import type { DensityProp } from "../../composables/density";
2
2
  import type { AutofocusProp } from "../../types";
3
3
  import type { ButtonColor, ButtonType } from "../OnyxButton/types";
4
+ import type { FormInjected } from "../OnyxForm/OnyxForm.core";
4
5
  export type OnyxIconButtonProps = DensityProp & AutofocusProp & {
5
6
  /**
6
7
  * The aria-label of the button.
@@ -9,7 +10,7 @@ export type OnyxIconButtonProps = DensityProp & AutofocusProp & {
9
10
  /**
10
11
  * If the button should be disabled or not.
11
12
  */
12
- disabled?: boolean;
13
+ disabled?: FormInjected<boolean>;
13
14
  /**
14
15
  * The button type.
15
16
  */
@@ -8,8 +8,8 @@ declare const _default: import("vue").DefineComponent<OnyxInputProps, {}, {}, {}
8
8
  }>, {
9
9
  type: import("./types").InputType;
10
10
  required: boolean;
11
+ disabled: import("../OnyxForm/OnyxForm.core").FormInjected<boolean>;
11
12
  autocapitalize: import("./types").Autocapitalize;
12
- disabled: boolean;
13
13
  loading: boolean;
14
14
  skeleton: boolean;
15
15
  modelValue: string;
@@ -2,6 +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 } from "../../types";
5
+ import type { FormInjected } from "../OnyxForm/OnyxForm.core";
5
6
  import type { OnyxFormElementProps } from "../OnyxFormElement/types";
6
7
  export type OnyxInputProps = DensityProp & RequiredMarkerProp & CustomValidityProp & Omit<OnyxFormElementProps, "modelValue" | "errorMessages"> & AutofocusProp & {
7
8
  /**
@@ -49,7 +50,7 @@ export type OnyxInputProps = DensityProp & RequiredMarkerProp & CustomValidityPr
49
50
  /**
50
51
  * Whether the input should be disabled.
51
52
  */
52
- disabled?: boolean;
53
+ disabled?: FormInjected<boolean>;
53
54
  /**
54
55
  * Whether the input is loading. User interaction will be disabled.
55
56
  */
@@ -2,6 +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
+ import type { FormInjected } from "../OnyxForm/OnyxForm.core";
5
6
  import type { OnyxFormElementProps } from "../OnyxFormElement/types";
6
7
  export type OnyxRadioGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & RequiredMarkerProp & CustomValidityProp & Pick<BaseSelectOption, "truncation"> & Pick<OnyxFormElementProps, "label" | "hideLabel"> & {
7
8
  /**
@@ -21,7 +22,7 @@ export type OnyxRadioGroupProps<TValue extends SelectOptionValue = SelectOptionV
21
22
  /**
22
23
  * Disable the radio group.
23
24
  */
24
- disabled?: boolean;
25
+ disabled?: FormInjected<boolean>;
25
26
  /**
26
27
  * Direction of the checkboxes. Can be vertical (default) or horizontal.
27
28
  */
@@ -1,6 +1,7 @@
1
1
  import type { DensityProp } from "../../composables/density";
2
2
  import type { ManagedProp } from "../../composables/useManagedState";
3
3
  import type { AutofocusProp, BaseSelectOption, SelectOptionValue } from "../../types";
4
+ import type { FormInjected } from "../OnyxForm/OnyxForm.core";
4
5
  import type { OnyxSelectInputProps } from "../OnyxSelectInput/types";
5
6
  import type { OnyxSelectOptionProps } from "../OnyxSelectOption/types";
6
7
  export type SelectSearchProps = {
@@ -58,7 +59,11 @@ export type SelectModelValueProps<TValue extends SelectOptionValue> = {
58
59
  label?: string;
59
60
  };
60
61
  };
61
- export type OnyxSelectProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & SelectModelValueProps<TValue> & SelectSearchProps & Omit<OnyxSelectInputProps, "density" | "modelValue" | "showFocus"> & AutofocusProp & Pick<BaseSelectOption, "truncation"> & {
62
+ export type OnyxSelectProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & SelectModelValueProps<TValue> & SelectSearchProps & Omit<OnyxSelectInputProps, "density" | "modelValue" | "showFocus" | "disabled"> & AutofocusProp & Pick<BaseSelectOption, "truncation"> & {
63
+ /**
64
+ * Whether the select should be disabled.
65
+ */
66
+ disabled?: FormInjected<boolean>;
62
67
  /**
63
68
  * Label that will be shown in the input of OnyxSelect.
64
69
  * If unset, will be managed internally by comparing `modelValue` with `options`.
@@ -2,6 +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 } from "../../types";
5
+ import type { FormInjected } from "../OnyxForm/OnyxForm.core";
5
6
  import type { OnyxFormElementProps } from "../OnyxFormElement/types";
6
7
  export declare const MULTISELECT_TEXT_MODE: readonly ["summary", "preview"];
7
8
  export type MultiselectTextMode = (typeof MULTISELECT_TEXT_MODE)[number];
@@ -20,7 +21,7 @@ export type OnyxSelectInputProps = DensityProp & RequiredMarkerProp & CustomVali
20
21
  /**
21
22
  * Whether the select should be disabled.
22
23
  */
23
- disabled?: boolean;
24
+ disabled?: FormInjected<boolean>;
24
25
  /**
25
26
  * Whether to show a skeleton select.
26
27
  */
@@ -6,7 +6,7 @@ declare const _default: import("vue").DefineComponent<OnyxStepperProps, {}, {},
6
6
  onValidityChange?: ((validity: ValidityState) => any) | undefined;
7
7
  "onUpdate:modelValue"?: ((value?: number | undefined) => any) | undefined;
8
8
  }>, {
9
- disabled: boolean;
9
+ disabled: import("../OnyxForm/OnyxForm.core").FormInjected<boolean>;
10
10
  loading: boolean;
11
11
  skeleton: boolean;
12
12
  step: number;
@@ -1,6 +1,7 @@
1
1
  import type { DensityProp } from "../../composables/density";
2
2
  import type { CustomValidityProp } from "../../composables/useCustomValidity";
3
3
  import type { AutofocusProp } from "../../types";
4
+ import type { FormInjected } from "../OnyxForm/OnyxForm.core";
4
5
  import type { OnyxFormElementProps } from "../OnyxFormElement/types";
5
6
  import type { Autocomplete } from "../OnyxInput/types";
6
7
  export type OnyxStepperProps = DensityProp & CustomValidityProp & Omit<OnyxFormElementProps, "modelValue" | "errorMessages" | "withCounter" | "maxlength"> & AutofocusProp & {
@@ -40,7 +41,7 @@ export type OnyxStepperProps = DensityProp & CustomValidityProp & Omit<OnyxFormE
40
41
  /**
41
42
  * Whether to disable the input and prevent user interaction.
42
43
  */
43
- disabled?: boolean;
44
+ disabled?: FormInjected<boolean>;
44
45
  /**
45
46
  * Whether the input should be readonly.
46
47
  */
@@ -6,7 +6,7 @@ declare const _default: import("vue").DefineComponent<OnyxSwitchProps, {}, {}, {
6
6
  onValidityChange?: ((validity: ValidityState) => any) | undefined;
7
7
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
8
8
  }>, {
9
- disabled: boolean;
9
+ disabled: import("../OnyxForm/OnyxForm.core").FormInjected<boolean>;
10
10
  loading: boolean;
11
11
  skeleton: boolean;
12
12
  modelValue: boolean;
@@ -2,6 +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, TruncationType } from "../../types";
5
+ import type { FormInjected } from "../OnyxForm/OnyxForm.core";
5
6
  export type OnyxSwitchProps = DensityProp & RequiredMarkerProp & CustomValidityProp & AutofocusProp & {
6
7
  /**
7
8
  * Whether the switch should be checked or not.
@@ -14,7 +15,7 @@ export type OnyxSwitchProps = DensityProp & RequiredMarkerProp & CustomValidityP
14
15
  /**
15
16
  * Whether to disable the switch and prevent user interaction.
16
17
  */
17
- disabled?: boolean;
18
+ disabled?: FormInjected<boolean>;
18
19
  /**
19
20
  * Shows a loading indicator.
20
21
  */
@@ -15,4 +15,27 @@ export type OnyxTableProps = DensityProp & {
15
15
  * - Warning: Don't set a max-height/width on the table when `withPageScrolling` is set.
16
16
  */
17
17
  withPageScrolling?: boolean;
18
+ /**
19
+ * Optional column groups that are rendered above the table head to group columns together.
20
+ * Slot `head` must be filled for this to work and `withVerticalBorders` property should be set.
21
+ */
22
+ columnGroups?: TableColumnGroup[];
23
+ };
24
+ /**
25
+ * Table group that is rendered as `<colgroup>` and corresponding `<th scope="colgroup">` inside the table.
26
+ */
27
+ export type TableColumnGroup = {
28
+ /**
29
+ * Unique key to identify the column group.
30
+ */
31
+ key: PropertyKey;
32
+ /**
33
+ * Number of columns to span. Must be >= 1.
34
+ * Sum of all column group spans must add up to the total number of table columns.
35
+ */
36
+ span: number;
37
+ /**
38
+ * Header text to display.
39
+ */
40
+ header?: string;
18
41
  };
@@ -7,8 +7,8 @@ declare const _default: import("vue").DefineComponent<OnyxTextareaProps, {}, {},
7
7
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
8
8
  }>, {
9
9
  required: boolean;
10
+ disabled: import("../OnyxForm/OnyxForm.core").FormInjected<boolean>;
10
11
  autocapitalize: import("../..").Autocapitalize;
11
- disabled: boolean;
12
12
  skeleton: boolean;
13
13
  modelValue: string;
14
14
  readonly: boolean;