sit-onyx 1.0.0-beta.61 → 1.0.0-beta.63

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 (68) hide show
  1. package/dist/components/OnyxAppLayout/OnyxAppLayout.vue.d.ts +3 -2
  2. package/dist/components/OnyxAvatar/OnyxAvatar.vue.d.ts +3 -2
  3. package/dist/components/OnyxAvatarStack/OnyxAvatarStack.vue.d.ts +3 -2
  4. package/dist/components/OnyxBadge/OnyxBadge.vue.d.ts +3 -2
  5. package/dist/components/OnyxCheckbox/OnyxCheckbox.vue.d.ts +1 -1
  6. package/dist/components/OnyxCheckboxGroup/OnyxCheckboxGroup.vue.d.ts +1 -1
  7. package/dist/components/OnyxDataGrid/OnyxDataGrid.vue.d.ts +16 -0
  8. package/dist/components/OnyxDataGrid/OnyxDataGridRenderer/OnyxDataGridRenderer.vue.d.ts +1 -1
  9. package/dist/components/OnyxDataGrid/OnyxDataGridRenderer/types.d.ts +1 -1
  10. package/dist/components/OnyxDataGrid/features/HeaderCell.vue.d.ts +25 -0
  11. package/dist/components/OnyxDataGrid/features/index.d.ts +97 -0
  12. package/dist/components/OnyxDataGrid/features/sorting/SortAction.vue.d.ts +13 -0
  13. package/dist/components/OnyxDataGrid/features/sorting/sorting.d.ts +6 -0
  14. package/dist/components/OnyxDataGrid/types.d.ts +13 -0
  15. package/dist/components/OnyxDialog/OnyxDialog.vue.d.ts +2 -1
  16. package/dist/components/OnyxEmpty/OnyxEmpty.vue.d.ts +3 -2
  17. package/dist/components/OnyxErrorTooltip/OnyxErrorTooltip.vue.d.ts +14 -21
  18. package/dist/components/OnyxForm/OnyxForm.vue.d.ts +3 -2
  19. package/dist/components/OnyxFormElement/OnyxFormElement.vue.d.ts +3 -2
  20. package/dist/components/OnyxFormElement/types.d.ts +2 -2
  21. package/dist/components/OnyxHeadline/OnyxHeadline.vue.d.ts +2 -1
  22. package/dist/components/OnyxIconButton/OnyxIconButton.vue.d.ts +2 -1
  23. package/dist/components/OnyxInfoTooltip/OnyxInfoTooltip.vue.d.ts +1 -1
  24. package/dist/components/OnyxLink/OnyxLink.vue.d.ts +3 -2
  25. package/dist/components/OnyxListItem/OnyxListItem.vue.d.ts +3 -2
  26. package/dist/components/OnyxLoadingIndicator/CircleSpinner.vue.d.ts +1 -1
  27. package/dist/components/OnyxLoadingIndicator/LoadingDots.vue.d.ts +1 -1
  28. package/dist/components/OnyxMobileNavButton/OnyxMobileNavButton.vue.d.ts +3 -2
  29. package/dist/components/OnyxNavAppArea/OnyxNavAppArea.vue.d.ts +3 -2
  30. package/dist/components/OnyxNavBar/OnyxNavBar.vue.d.ts +3 -2
  31. package/dist/components/OnyxNavBar/modules/OnyxColorSchemeMenuItem/OnyxColorSchemeMenuItem.vue.d.ts +1 -1
  32. package/dist/components/OnyxNavBar/modules/OnyxFlyoutMenu/OnyxFlyoutMenu.vue.d.ts +1 -1
  33. package/dist/components/OnyxNavBar/modules/OnyxMenuItem/OnyxMenuItem.vue.d.ts +3 -2
  34. package/dist/components/OnyxNavBar/modules/OnyxNavButton/NavButtonLayout.vue.d.ts +12 -22
  35. package/dist/components/OnyxNavBar/modules/OnyxNavButton/OnyxNavButton.vue.d.ts +3 -2
  36. package/dist/components/OnyxNavBar/modules/OnyxNavItem/OnyxNavItem.vue.d.ts +3 -2
  37. package/dist/components/OnyxNavBar/modules/OnyxNavSeparator/OnyxNavSeparator.vue.d.ts +1 -1
  38. package/dist/components/OnyxNavBar/modules/OnyxTimer/OnyxTimer.vue.d.ts +1 -1
  39. package/dist/components/OnyxNavBar/modules/OnyxUserMenu/OnyxUserMenu.vue.d.ts +2 -1
  40. package/dist/components/OnyxNavBar/modules/OnyxUserMenu/UserMenuLayout.vue.d.ts +1 -1
  41. package/dist/components/OnyxPageLayout/OnyxPageLayout.vue.d.ts +3 -2
  42. package/dist/components/OnyxPagination/SelectPagination.vue.d.ts +1 -1
  43. package/dist/components/OnyxRadioButton/OnyxRadioButton.vue.d.ts +1 -1
  44. package/dist/components/OnyxRadioGroup/OnyxRadioGroup.vue.d.ts +1 -1
  45. package/dist/components/OnyxRipple/OnyxRipple.vue.d.ts +1 -1
  46. package/dist/components/OnyxSelect/OnyxSelect.vue.d.ts +1 -1
  47. package/dist/components/OnyxSelectInput/OnyxSelectInput.vue.d.ts +1 -1
  48. package/dist/components/OnyxSelectOption/OnyxSelectOption.vue.d.ts +3 -2
  49. package/dist/components/OnyxSkeleton/OnyxSkeleton.vue.d.ts +1 -1
  50. package/dist/components/OnyxStepper/OnyxStepper.vue.d.ts +4 -4
  51. package/dist/components/OnyxTable/OnyxTable.vue.d.ts +3 -2
  52. package/dist/components/OnyxTag/OnyxTag.vue.d.ts +1 -1
  53. package/dist/components/OnyxToast/StorybookExample.vue.d.ts +1 -1
  54. package/dist/components/OnyxTooltip/OnyxTooltip.vue.d.ts +3 -2
  55. package/dist/components/OnyxVisuallyHidden/OnyxVisuallyHidden.vue.d.ts +2 -1
  56. package/dist/components/examples/ComponentShowcase/ComponentShowcase.vue.d.ts +3 -3
  57. package/dist/components/examples/FormExample/FormExample.vue.d.ts +1 -1
  58. package/dist/components/examples/GridPlayground/EditGridElementDialog/EditGridElementDialog.vue.d.ts +4 -13
  59. package/dist/components/examples/GridPlayground/GridBadge/GridBadge.vue.d.ts +3 -15
  60. package/dist/components/examples/GridPlayground/GridElement/GridElement.vue.d.ts +13 -20
  61. package/dist/components/examples/GridPlayground/GridOverlay/GridOverlay.vue.d.ts +4 -8
  62. package/dist/components/examples/GridPlayground/GridPlayground.vue.d.ts +1 -1
  63. package/dist/composables/useCustomValidity.d.ts +20 -13
  64. package/dist/index.cjs +4 -4
  65. package/dist/index.js +935 -913
  66. package/dist/playwright/ScreenshotMatrix.vue.d.ts +14 -29
  67. package/package.json +5 -5
  68. package/src/i18n/locales/en-US.json +9 -0
@@ -1,5 +1,6 @@
1
1
  import type { OnyxAppLayoutProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /** Navigation area of the application */
5
6
  navBar?(): unknown;
@@ -20,12 +21,12 @@ declare function __VLS_template(): {
20
21
  appOverlay?(): unknown;
21
22
  };
22
23
  refs: {};
23
- attrs: Partial<{}>;
24
+ rootEl: HTMLDivElement;
24
25
  };
25
26
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
26
27
  declare const __VLS_component: import("vue").DefineComponent<OnyxAppLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxAppLayoutProps> & Readonly<{}>, {
27
28
  navBarAlignment: "top" | "left";
28
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
29
30
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
31
  export default _default;
31
32
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,6 @@
1
1
  import type { OnyxAvatarProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Optional slot to override the default initials. Will only be used if `type` is `initials`.
@@ -12,12 +13,12 @@ declare function __VLS_template(): {
12
13
  default?(): unknown;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: HTMLElement;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxAvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxAvatarProps> & Readonly<{}>, {
19
20
  size: "16px" | "24px" | "32px" | "48px" | "64px" | "96px";
20
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLElement>;
21
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
23
  export default _default;
23
24
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,4 +1,5 @@
1
1
  declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
2
3
  slots: Readonly<{
3
4
  /**
4
5
  * Default slot to place the avatars.
@@ -11,10 +12,10 @@ declare function __VLS_template(): {
11
12
  default(): unknown;
12
13
  };
13
14
  refs: {};
14
- attrs: Partial<{}>;
15
+ rootEl: HTMLDivElement;
15
16
  };
16
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
- declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
18
19
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
20
  export default _default;
20
21
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,6 @@
1
1
  import type { OnyxBadgeProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Badge content.
@@ -12,13 +13,13 @@ declare function __VLS_template(): {
12
13
  default?(): unknown;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: HTMLDivElement;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxBadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxBadgeProps> & Readonly<{}>, {
19
20
  color: import("../..").OnyxColor;
20
21
  dot: boolean;
21
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
22
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
24
  export default _default;
24
25
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -4,7 +4,7 @@ declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(_
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
5
  readonly onValidityChange?: ((validity: ValidityState) => any) | undefined;
6
6
  readonly "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
7
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onValidityChange" | "onUpdate:modelValue"> & OnyxCheckboxProps<TValue>> & import("vue").PublicProps;
7
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onValidityChange" | "onUpdate:modelValue"> & Partial<{}> & OnyxCheckboxProps<TValue>> & import("vue").PublicProps;
8
8
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
9
9
  attrs: any;
10
10
  slots: {};
@@ -3,7 +3,7 @@ import type { OnyxCheckboxGroupProps } from "./types";
3
3
  declare const _default: <TValue extends SelectOptionValue>(__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
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
5
  readonly "onUpdate:modelValue"?: ((value: TValue[]) => any) | undefined;
6
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & OnyxCheckboxGroupProps<TValue>> & import("vue").PublicProps;
6
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & Partial<{}> & OnyxCheckboxGroupProps<TValue>> & import("vue").PublicProps;
7
7
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
8
8
  attrs: any;
9
9
  slots: {};
@@ -0,0 +1,16 @@
1
+ import { type DataGridEntry, type OnyxDataGridProps } from "../..";
2
+ declare const _default: <TEntry extends DataGridEntry>(__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<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & OnyxDataGridProps<TEntry>> & import("vue").PublicProps;
4
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
5
+ attrs: any;
6
+ slots: {};
7
+ emit: {};
8
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
9
+ [key: string]: any;
10
+ }> & {
11
+ __ctx?: Awaited<typeof __VLS_setup>;
12
+ };
13
+ export default _default;
14
+ type __VLS_PrettifyLocal<T> = {
15
+ [K in keyof T]: T[K];
16
+ } & {};
@@ -1,7 +1,7 @@
1
1
  import type { DataGridEntry, DataGridMetadata } from "../types";
2
2
  import type { OnyxDataGridRendererProps } from "./types";
3
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, never>, never> & OnyxDataGridRendererProps<TEntry, TMetadata>> & import("vue").PublicProps;
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & OnyxDataGridRendererProps<TEntry, TMetadata>> & import("vue").PublicProps;
5
5
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
6
6
  attrs: any;
7
7
  slots: {};
@@ -74,7 +74,7 @@ export type DataGridRendererCellComponentProps<TEntry extends DataGridEntry, TMe
74
74
  /**
75
75
  * Complete row data.
76
76
  */
77
- row: TEntry;
77
+ row: Readonly<TEntry>;
78
78
  /**
79
79
  * Cell data that is provided to the component via the `metadata` prop.
80
80
  */
@@ -0,0 +1,25 @@
1
+ type __VLS_Props = {
2
+ /**
3
+ * label of the column
4
+ */
5
+ label: string;
6
+ };
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: Readonly<{
10
+ actions?(): unknown;
11
+ }> & {
12
+ actions?(): unknown;
13
+ };
14
+ refs: {};
15
+ rootEl: HTMLDivElement;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
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,97 @@
1
+ import { type Component, type WatchSource } from "vue";
2
+ import type { DataGridRendererColumn, DataGridRendererRow } from "../../..";
3
+ import type { DataGridEntry, DataGridMetadata } from "../types";
4
+ export type DataGridFeature<TEntry extends DataGridEntry, TFeatureName extends symbol> = {
5
+ /**
6
+ * Unique name and identifier of the datagrid feature
7
+ */
8
+ name: TFeatureName;
9
+ /**
10
+ * An array of reactive states that should trigger a datagrid re-generation
11
+ */
12
+ watch: WatchSource[];
13
+ /**
14
+ * Allows modifying the datagrid state as a whole.
15
+ */
16
+ mutation?: {
17
+ func: (state: Readonly<TEntry>[]) => void;
18
+ };
19
+ /**
20
+ * Allows the modification of the headers.
21
+ */
22
+ header?: {
23
+ /**
24
+ * Adds header icon button(s).
25
+ * `iconComponent` of an action is shown after the header label.
26
+ * The components must be ARIA-conform buttons.
27
+ */
28
+ actions?: (column: keyof TEntry) => {
29
+ iconComponent: Component;
30
+ listComponent?: never;
31
+ }[];
32
+ };
33
+ };
34
+ /**
35
+ * Helper function that infers the generics of the DataGridFeature type.
36
+ * @example
37
+ * ```ts
38
+ *
39
+ * const MY_FEATURE = Symbol("TABLE_HEADER_BUTTON");
40
+ * export const useDataGridHeaderButton = createFeature(<TEntry extends DataGridEntry>() => {
41
+ * return {
42
+ * name: MY_FEATURE,
43
+ * header: {
44
+ * actions: (column) => [
45
+ * {
46
+ * iconComponent: h('button', { onClick: (column) => console.log(`Clicked on ${column}`) },),
47
+ * },
48
+ * ],
49
+ * },
50
+ * };
51
+ * });
52
+ * ```
53
+ */
54
+ export declare const createFeature: <TFeatureName extends symbol, TArgs extends unknown[]>(featureDefinition: <TEntry extends DataGridEntry>(...args: TArgs) => DataGridFeature<TEntry, TFeatureName>) => <TEntry extends DataGridEntry>(...args: TArgs) => DataGridFeature<TEntry, TFeatureName>;
55
+ type ExtractTEntry<T> = T extends DataGridFeature<infer I, symbol>[] ? I : never;
56
+ /**
57
+ * Uses the defined datagrid features to provide factory functions.
58
+ * These factories are to be used to map data and configuration to `OnyxDataGridRenderer` properties.
59
+ * The properties are then used to render the data grid.
60
+ *
61
+ * Make use of the `watchSources` to trigger re-rendering when state changes occur.
62
+ * @example
63
+ * ```vue
64
+ * <script setup lang="ts">
65
+ * // ...
66
+ * // imports, props, emits, etc.
67
+ * const withHeaderButton = useDataGridHeaderButton<TEntry>();
68
+ *
69
+ * const { watchSources, createRendererRows, createRendererColumns } = useDataGridFeatures([withHeaderButton]);
70
+ *
71
+ * const renderCols: Ref<DataGridRendererColumn<TEntry, object>[]> = ref([]);
72
+ * const renderRows: Ref<DataGridRendererRow<TEntry, DataGridMetadata>[]> = ref([]);
73
+ *
74
+ * const { columns, data } = toRefs(props);
75
+ *
76
+ * watch(
77
+ * [columns, data, ...watchSources],
78
+ * ([newColumns, newData]) => {
79
+ * renderCols.value = createRendererColumns(newColumns);
80
+ * renderRows.value = createRendererRows(newData, newColumns);
81
+ * },
82
+ * { immediate: true },
83
+ * );
84
+ * </script>
85
+ * <template>
86
+ * <OnyxDataGridRenderer :columns="renderCols" :rows="renderRows" />
87
+ * </template>
88
+ * ```
89
+ */
90
+ export declare const useDataGridFeatures: <T extends DataGridFeature<TEntry, symbol>[] | [], TEntry extends DataGridEntry = ExtractTEntry<T>>(features: T) => {
91
+ /** Takes the column definition and maps all, calls mutation func and maps at the end to RendererCell */
92
+ createRendererRows: (entries: TEntry[], columns: (keyof TEntry)[]) => DataGridRendererRow<TEntry, DataGridMetadata>[];
93
+ /** Takes the column definition and creates a RenderHeader for each, adds actions from features */
94
+ createRendererColumns: (columns: (keyof TEntry)[]) => DataGridRendererColumn<TEntry, object>[];
95
+ watchSources: WatchSource[];
96
+ };
97
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { SortDirection } from "./sorting";
2
+ type __VLS_Props = {
3
+ /**
4
+ * Label of this Column.
5
+ */
6
+ columnLabel: string;
7
+ /**
8
+ * The current sorting direction, that should be indicated.
9
+ */
10
+ sortDirection?: SortDirection;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { DataGridEntry } from "../../types";
2
+ export type SortDirection = "asc" | "desc" | "none";
3
+ export declare const nextSortDirection: (current?: SortDirection) => SortDirection;
4
+ declare const SORTING_FEATURE: unique symbol;
5
+ export declare const useDataGridSorting: <TEntry extends DataGridEntry>() => import("..").DataGridFeature<TEntry, typeof SORTING_FEATURE>;
6
+ export {};
@@ -1,4 +1,17 @@
1
1
  export type DataGridMetadata = Record<string, unknown>;
2
+ /**
3
+ * @experimental The DataGrid is still working in progress and the props will change in the future.
4
+ */
5
+ export type OnyxDataGridProps<TEntry extends DataGridEntry> = {
6
+ /**
7
+ * The order of and which columns should be rendered.
8
+ */
9
+ columns: (keyof TEntry)[];
10
+ /**
11
+ * The data that should be used to fill the datagrid.
12
+ */
13
+ data: TEntry[];
14
+ };
2
15
  /**
3
16
  * "Raw" user data for a data grid entry/row, e.g. fetched from a backend service.
4
17
  */
@@ -1,5 +1,6 @@
1
1
  import type { OnyxDialogProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Dialog content. For accessibility purposes it is strongly recommended
@@ -18,7 +19,7 @@ declare function __VLS_template(): {
18
19
  refs: {
19
20
  dialogRef: HTMLDialogElement;
20
21
  };
21
- attrs: Partial<{}>;
22
+ rootEl: any;
22
23
  };
23
24
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
25
  declare const __VLS_component: import("vue").DefineComponent<OnyxDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -1,5 +1,6 @@
1
1
  import { type DensityProp } from "../../composables/density";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Label / text to display.
@@ -20,10 +21,10 @@ declare function __VLS_template(): {
20
21
  icon?(): unknown;
21
22
  };
22
23
  refs: {};
23
- attrs: Partial<{}>;
24
+ rootEl: HTMLDivElement;
24
25
  };
25
26
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
26
- declare const __VLS_component: import("vue").DefineComponent<DensityProp, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DensityProp> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_component: import("vue").DefineComponent<DensityProp, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DensityProp> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
27
28
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
29
  export default _default;
29
30
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,16 @@
1
- import { type FormErrorMessages } from "../../composables/useCustomValidity";
1
+ import { type FormMessages } from "../../composables/useCustomValidity";
2
+ type __VLS_Props = {
3
+ /**
4
+ * The given component will be shown inside a tooltip when
5
+ * errorMessages are provided. Without errorMessages, the
6
+ * component will not be rendered inside a slot.
7
+ */
8
+ errorMessages?: FormMessages;
9
+ /** We don't show an error if the content is not interactive */
10
+ disabled?: boolean;
11
+ };
2
12
  declare function __VLS_template(): {
13
+ attrs: Partial<{}>;
3
14
  slots: Readonly<{
4
15
  /**
5
16
  * Any component. Will be wrapped in an OnyxTooltip showing
@@ -16,28 +27,10 @@ declare function __VLS_template(): {
16
27
  refs: {
17
28
  targetRef: HTMLDivElement;
18
29
  };
19
- attrs: Partial<{}>;
30
+ rootEl: HTMLDivElement;
20
31
  };
21
32
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
- declare const __VLS_component: import("vue").DefineComponent<{
23
- /**
24
- * The given component will be shown inside a tooltip when
25
- * errorMessages are provided. Without errorMessages, the
26
- * component will not be rendered inside a slot.
27
- */
28
- errorMessages?: FormErrorMessages;
29
- /** We don't show an error if the content is not interactive */
30
- disabled?: boolean;
31
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
32
- /**
33
- * The given component will be shown inside a tooltip when
34
- * errorMessages are provided. Without errorMessages, the
35
- * component will not be rendered inside a slot.
36
- */
37
- errorMessages?: FormErrorMessages;
38
- /** We don't show an error if the content is not interactive */
39
- disabled?: boolean;
40
- }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
41
34
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
42
35
  export default _default;
43
36
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,6 @@
1
1
  import type { OnyxFormProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Any form content
@@ -12,13 +13,13 @@ declare function __VLS_template(): {
12
13
  default?(): unknown;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: HTMLFormElement;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxFormProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxFormProps> & Readonly<{}>, {
19
20
  disabled: boolean;
20
21
  showError: import("../../composables/useErrorClass").ShowErrorMode;
21
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLFormElement>;
22
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
24
  export default _default;
24
25
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,6 @@
1
1
  import type { OnyxFormElementProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /** The place for the actual form element */
5
6
  default(props: {
@@ -12,13 +13,13 @@ declare function __VLS_template(): {
12
13
  }): unknown;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: HTMLDivElement;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxFormElementProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxFormElementProps> & Readonly<{}>, {
19
20
  required: boolean;
20
21
  id: string;
21
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
22
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
24
  export default _default;
24
25
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import type { RequiredMarkerProp } from "../../composables/required";
2
- import type { FormErrorMessages } from "../../composables/useCustomValidity";
2
+ import type { FormMessages } from "../../composables/useCustomValidity";
3
3
  export type OnyxFormElementProps = RequiredMarkerProp & {
4
4
  /**
5
5
  * The id of a labelable form-related element.
@@ -39,7 +39,7 @@ export type OnyxFormElementProps = RequiredMarkerProp & {
39
39
  /**
40
40
  * Error messages that inform about causes for invalidity of form components
41
41
  */
42
- errorMessages?: FormErrorMessages;
42
+ errorMessages?: FormMessages;
43
43
  /**
44
44
  * Maximum number of characters that are allowed to be entered.
45
45
  * Warning: when the value is (pre)set programmatically,
@@ -1,5 +1,6 @@
1
1
  import type { OnyxHeadlineProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Headline content.
@@ -12,7 +13,7 @@ declare function __VLS_template(): {
12
13
  default(): unknown;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: any;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxHeadlineProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxHeadlineProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,5 +1,6 @@
1
1
  import type { OnyxIconButtonProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /** Slot for an custom icon. Will have no effect if property `icon` is passed. */
5
6
  default(): unknown;
@@ -8,7 +9,7 @@ declare function __VLS_template(): {
8
9
  default(): unknown;
9
10
  };
10
11
  refs: {};
11
- attrs: Partial<{}>;
12
+ rootEl: any;
12
13
  };
13
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
15
  declare const __VLS_component: import("vue").DefineComponent<OnyxIconButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxIconButtonProps> & Readonly<{}>, {
@@ -2,5 +2,5 @@ import type { OnyxInfoTooltipProps } from "./types";
2
2
  declare const _default: import("vue").DefineComponent<OnyxInfoTooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxInfoTooltipProps> & Readonly<{}>, {
3
3
  color: Extract<import("../../index.js").OnyxColor, "neutral" | "danger">;
4
4
  open: import("../OnyxTooltip/types.js").TooltipOpen;
5
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLSpanElement>;
6
6
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import type { OnyxLinkProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Link label.
@@ -12,13 +13,13 @@ declare function __VLS_template(): {
12
13
  default(): unknown;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: HTMLAnchorElement;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxLinkProps> & Readonly<{}>, {
19
20
  target: import("./types").LinkTarget;
20
21
  withExternalIcon: boolean | "auto";
21
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLAnchorElement>;
22
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
24
  export default _default;
24
25
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,6 @@
1
1
  import type { OnyxListItemProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Option content.
@@ -12,7 +13,7 @@ declare function __VLS_template(): {
12
13
  default(): unknown;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: HTMLLIElement;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxListItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxListItemProps> & Readonly<{}>, {
@@ -20,7 +21,7 @@ declare const __VLS_component: import("vue").DefineComponent<OnyxListItemProps,
20
21
  checked: boolean;
21
22
  selected: boolean;
22
23
  active: boolean;
23
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLIElement>;
24
25
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
26
  export default _default;
26
27
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, SVGSVGElement>;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
2
2
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import type { OnyxMobileNavButtonProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Slot for the menu content when it's open.
@@ -12,7 +13,7 @@ declare function __VLS_template(): {
12
13
  default(): unknown;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: HTMLDivElement;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxMobileNavButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -21,7 +22,7 @@ declare const __VLS_component: import("vue").DefineComponent<OnyxMobileNavButton
21
22
  "onUpdate:open"?: ((isOpen: boolean) => any) | undefined;
22
23
  }>, {
23
24
  open: boolean;
24
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
25
26
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
27
  export default _default;
27
28
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,6 @@
1
1
  import type { OnyxNavAppAreaProps } from "./types";
2
2
  declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
5
  /**
5
6
  * Optional slot to override the content.
@@ -12,10 +13,10 @@ declare function __VLS_template(): {
12
13
  default?(): unknown;
13
14
  };
14
15
  refs: {};
15
- attrs: Partial<{}>;
16
+ rootEl: HTMLButtonElement;
16
17
  };
17
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
- declare const __VLS_component: import("vue").DefineComponent<OnyxNavAppAreaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxNavAppAreaProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_component: import("vue").DefineComponent<OnyxNavAppAreaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxNavAppAreaProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLButtonElement>;
19
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
21
  export default _default;
21
22
  type __VLS_WithTemplateSlots<T, S> = T & {