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

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 (35) hide show
  1. package/dist/components/OnyxBadge/OnyxBadge.vue.d.ts +1 -1
  2. package/dist/components/OnyxDataGrid/OnyxDataGrid.vue.d.ts +3 -2
  3. package/dist/components/OnyxDataGrid/features/all.d.ts +2 -0
  4. package/dist/components/OnyxDataGrid/features/index.d.ts +3 -5
  5. package/dist/components/OnyxDataGrid/features/sorting/SortAction.vue.d.ts +1 -1
  6. package/dist/components/OnyxDataGrid/features/sorting/sorting.d.ts +4 -4
  7. package/dist/components/OnyxDataGrid/features/sorting/types.d.ts +55 -0
  8. package/dist/components/OnyxDataGrid/types.d.ts +6 -1
  9. package/dist/components/OnyxIconButton/OnyxIconButton.vue.d.ts +2 -2
  10. package/dist/components/OnyxInfoTooltip/OnyxInfoTooltip.vue.d.ts +2 -2
  11. package/dist/components/OnyxMoreList/OnyxMoreList.vue.d.ts +40 -0
  12. package/dist/components/OnyxMoreList/types.d.ts +27 -0
  13. package/dist/components/OnyxNavBar/OnyxNavBar.vue.d.ts +2 -2
  14. package/dist/components/OnyxNavBar/modules/OnyxMenuItem/OnyxMenuItem.vue.d.ts +1 -1
  15. package/dist/components/OnyxNavBar/modules/OnyxNavButton/OnyxNavButton.vue.d.ts +75 -1
  16. package/dist/components/OnyxNavBar/modules/OnyxNavItem/OnyxNavItem.vue.d.ts +2 -2
  17. package/dist/components/OnyxNavBar/types.d.ts +3 -1
  18. package/dist/components/OnyxSelectOption/OnyxSelectOption.vue.d.ts +1 -1
  19. package/dist/components/OnyxSwitch/OnyxSwitch.vue.d.ts +1 -1
  20. package/dist/components/OnyxTag/OnyxTag.vue.d.ts +1 -1
  21. package/dist/components/OnyxTextarea/OnyxTextarea.vue.d.ts +1 -1
  22. package/dist/components/OnyxToastMessage/OnyxToastMessage.vue.d.ts +1 -1
  23. package/dist/components/OnyxTooltip/OnyxTooltip.vue.d.ts +1 -1
  24. package/dist/components/examples/DataGrid/SortingDataGrid.vue.d.ts +9 -0
  25. package/dist/components/examples/GridPlayground/EditGridElementDialog/EditGridElementDialog.vue.d.ts +1 -1
  26. package/dist/composables/useMoreList.d.ts +118 -0
  27. package/dist/index.cjs +4 -4
  28. package/dist/index.d.ts +5 -0
  29. package/dist/index.js +2078 -1806
  30. package/dist/style.css +1 -1
  31. package/dist/types/index.d.ts +0 -1
  32. package/package.json +9 -6
  33. package/src/styles/grid.ct.tsx +1 -1
  34. package/dist/types/breakpoints.d.ts +0 -13
  35. package/src/styles/variables/themes/onyx.json +0 -120
@@ -17,7 +17,7 @@ declare function __VLS_template(): {
17
17
  };
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxBadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxBadgeProps> & Readonly<{}>, {
20
- color: import("../..").OnyxColor;
20
+ color: import("../../index.ts").OnyxColor;
21
21
  dot: boolean;
22
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
23
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,6 +1,7 @@
1
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;
2
+ import { type DataGridFeature } from "./features";
3
+ declare const _default: <TEntry extends DataGridEntry, TFeatures extends DataGridFeature<TEntry, symbol>[] | []>(__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> & Partial<{}> & OnyxDataGridProps<TEntry, TFeatures>> & import("vue").PublicProps;
4
5
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
5
6
  attrs: any;
6
7
  slots: {};
@@ -0,0 +1,2 @@
1
+ export * from "./sorting/types";
2
+ export { useDataGridSorting as useSorting } from "./sorting/sorting";
@@ -1,5 +1,5 @@
1
1
  import { type Component, type WatchSource } from "vue";
2
- import type { DataGridRendererColumn, DataGridRendererRow } from "../../..";
2
+ import type { DataGridRendererColumn, DataGridRendererRow } from "../OnyxDataGridRenderer/types";
3
3
  import type { DataGridEntry, DataGridMetadata } from "../types";
4
4
  export type DataGridFeature<TEntry extends DataGridEntry, TFeatureName extends symbol> = {
5
5
  /**
@@ -51,8 +51,7 @@ export type DataGridFeature<TEntry extends DataGridEntry, TFeatureName extends s
51
51
  * });
52
52
  * ```
53
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;
54
+ export declare function createFeature<TFeatureName extends symbol, TArgs extends unknown[]>(featureDefinition: <TEntry extends DataGridEntry>(...args: TArgs) => DataGridFeature<TEntry, TFeatureName>): <TEntry extends DataGridEntry>(...args: TArgs) => DataGridFeature<TEntry, TFeatureName>;
56
55
  /**
57
56
  * Uses the defined datagrid features to provide factory functions.
58
57
  * These factories are to be used to map data and configuration to `OnyxDataGridRenderer` properties.
@@ -87,11 +86,10 @@ type ExtractTEntry<T> = T extends DataGridFeature<infer I, symbol>[] ? I : never
87
86
  * </template>
88
87
  * ```
89
88
  */
90
- export declare const useDataGridFeatures: <T extends DataGridFeature<TEntry, symbol>[] | [], TEntry extends DataGridEntry = ExtractTEntry<T>>(features: T) => {
89
+ export declare const useDataGridFeatures: <TEntry extends DataGridEntry, T extends DataGridFeature<TEntry, symbol>[] | []>(features: T) => {
91
90
  /** Takes the column definition and maps all, calls mutation func and maps at the end to RendererCell */
92
91
  createRendererRows: (entries: TEntry[], columns: (keyof TEntry)[]) => DataGridRendererRow<TEntry, DataGridMetadata>[];
93
92
  /** Takes the column definition and creates a RenderHeader for each, adds actions from features */
94
93
  createRendererColumns: (columns: (keyof TEntry)[]) => DataGridRendererColumn<TEntry, object>[];
95
94
  watchSources: WatchSource[];
96
95
  };
97
- export {};
@@ -1,4 +1,4 @@
1
- import type { SortDirection } from "./sorting";
1
+ import type { SortDirection } from "./types";
2
2
  type __VLS_Props = {
3
3
  /**
4
4
  * Label of this Column.
@@ -1,6 +1,6 @@
1
1
  import type { DataGridEntry } from "../../types";
2
- export type SortDirection = "asc" | "desc" | "none";
2
+ import type { SortDirection, SortOptions, SortState } from "./types";
3
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 {};
4
+ export declare const nextSortState: <TEntry extends DataGridEntry>(column: keyof TEntry, current?: SortState<TEntry>) => SortState<TEntry>;
5
+ export declare const SORTING_FEATURE: unique symbol;
6
+ export declare const useDataGridSorting: <TEntry extends DataGridEntry>(options?: SortOptions<DataGridEntry> | undefined) => import("..").DataGridFeature<TEntry, typeof SORTING_FEATURE>;
@@ -0,0 +1,55 @@
1
+ import { type MaybeRef, type MaybeRefOrGetter } from "vue";
2
+ import type { DataGridEntry } from "../../types";
3
+ export type SortDirection = "asc" | "desc" | "none";
4
+ /**
5
+ * A function to compare two values of type T.
6
+ * The returned number value indicates the relative order of two values:
7
+ * -1: less than, 0: equal to, 1: greater than
8
+ */
9
+ export type Compare<T> = (a: T, b: T) => number;
10
+ /**
11
+ * The values by which the data is currently sorted.
12
+ * A `undefined` column or a direction of "none" means no sorting is applied.
13
+ */
14
+ export type SortState<TEntry extends DataGridEntry> = {
15
+ /**
16
+ * The column which is used to sort by.
17
+ * `undefined` means no sorting is applied.
18
+ */
19
+ column: keyof TEntry | undefined;
20
+ /**
21
+ * The sorting direction by which the `column` is sorted.
22
+ * `none` means no sorting is applied.
23
+ */
24
+ direction: SortDirection;
25
+ };
26
+ /**
27
+ * Per column sorting configuration.
28
+ * If at least one column has configuration, sorting must be explicitly enabled for all columns.
29
+ */
30
+ export type SortColumnOptions<TEntry extends DataGridEntry> = {
31
+ [TKey in keyof TEntry]?: {
32
+ /**
33
+ * If sorting is enabled for this column.
34
+ */
35
+ enabled: boolean;
36
+ /**
37
+ * A custom sorting function for this column.
38
+ * By default the `Intl.Collator` with the current locale is used.
39
+ */
40
+ sortFunc?: Compare<TEntry[TKey]>;
41
+ };
42
+ };
43
+ /**
44
+ * The options of the sorting feature for the OnyxDataGrid component.
45
+ */
46
+ export type SortOptions<TEntry extends DataGridEntry> = {
47
+ /**
48
+ * The currently applied sorting. Will be updated by the data grid, can be used for reading, updating and watching the applied sorting.
49
+ */
50
+ sortState?: MaybeRef<SortState<TEntry>>;
51
+ /**
52
+ * The options for each column, including whether sorting is enabled and a custom sorting function. If undefined, sorting is enabled for all columns (default).
53
+ */
54
+ columns?: MaybeRefOrGetter<SortColumnOptions<TEntry>>;
55
+ };
@@ -1,8 +1,13 @@
1
+ import type { DataGridFeature } from "./features";
1
2
  export type DataGridMetadata = Record<string, unknown>;
2
3
  /**
3
4
  * @experimental The DataGrid is still working in progress and the props will change in the future.
4
5
  */
5
- export type OnyxDataGridProps<TEntry extends DataGridEntry> = {
6
+ export type OnyxDataGridProps<TEntry extends DataGridEntry = DataGridEntry, TFeatures extends DataGridFeature<TEntry, symbol>[] = DataGridFeature<TEntry, symbol>[]> = {
7
+ /**
8
+ * Features that should be applied.
9
+ */
10
+ features?: TFeatures;
6
11
  /**
7
12
  * The order of and which columns should be rendered.
8
13
  */
@@ -13,8 +13,8 @@ declare function __VLS_template(): {
13
13
  };
14
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
15
  declare const __VLS_component: import("vue").DefineComponent<OnyxIconButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxIconButtonProps> & Readonly<{}>, {
16
- type: import("../..").ButtonType;
17
- color: import("../..").ButtonColor;
16
+ type: import("../OnyxButton/types.ts").ButtonType;
17
+ color: import("../OnyxButton/types.ts").ButtonColor;
18
18
  skeleton: import("../../composables/useSkeletonState").SkeletonInjected;
19
19
  disabled: import("../OnyxForm/OnyxForm.core").FormInjected<boolean>;
20
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,6 +1,6 @@
1
1
  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
- color: Extract<import("../../index.js").OnyxColor, "neutral" | "danger">;
4
- open: import("../OnyxTooltip/types.js").TooltipOpen;
3
+ color: Extract<import("../../index.ts").OnyxColor, "neutral" | "danger">;
4
+ open: import("../OnyxTooltip/types.ts").TooltipOpen;
5
5
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLSpanElement>;
6
6
  export default _default;
@@ -0,0 +1,40 @@
1
+ import type { MoreListSlotBindings, OnyxMoreListProps } from "./types";
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: Readonly<{
5
+ /**
6
+ * List of components to render. Each child must implement the `useMoreChild()` composable.
7
+ */
8
+ default(): unknown;
9
+ /**
10
+ * Slot to display at the end if not all default slot elements fit in the available width.
11
+ */
12
+ more(props: MoreListSlotBindings): unknown;
13
+ }> & {
14
+ /**
15
+ * List of components to render. Each child must implement the `useMoreChild()` composable.
16
+ */
17
+ default(): unknown;
18
+ /**
19
+ * Slot to display at the end if not all default slot elements fit in the available width.
20
+ */
21
+ more(props: MoreListSlotBindings): unknown;
22
+ };
23
+ refs: {
24
+ parentRef: unknown;
25
+ };
26
+ rootEl: any;
27
+ };
28
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
+ declare const __VLS_component: import("vue").DefineComponent<OnyxMoreListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
+ visibilityChange: (args_0: MoreListSlotBindings) => any;
31
+ }, string, import("vue").PublicProps, Readonly<OnyxMoreListProps> & Readonly<{
32
+ onVisibilityChange?: ((args_0: MoreListSlotBindings) => any) | undefined;
33
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
35
+ export default _default;
36
+ type __VLS_WithTemplateSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
@@ -0,0 +1,27 @@
1
+ import type { MoreListInjectionKey } from "../../composables/useMoreList";
2
+ export type OnyxMoreListProps = {
3
+ /**
4
+ * Component to render (e.g. `<ul>` or `<div>`).
5
+ */
6
+ is: string;
7
+ /**
8
+ * Injection key to use. Must match the one used in the child components.
9
+ * Will not be reactive so it must not be changed.
10
+ */
11
+ injectionKey: MoreListInjectionKey;
12
+ /**
13
+ * Whether the intersection observer should be disabled (e.g. when more feature is currently not needed due to mobile layout).
14
+ * Can increase performance.
15
+ */
16
+ disabled?: boolean;
17
+ };
18
+ export type MoreListSlotBindings = {
19
+ /**
20
+ * Number of currently fully visible elements.
21
+ */
22
+ visibleElements: number;
23
+ /**
24
+ * Number of currently completely or partially hidden elements.
25
+ */
26
+ hiddenElements: number;
27
+ };
@@ -67,7 +67,7 @@ declare const __VLS_component: import("vue").DefineComponent<OnyxNavBarProps, {
67
67
  *
68
68
  * ```ts
69
69
  * const route = useRoute();
70
- * const navBarRef = ref<InstanceType<typeof OnyxNavBar>>();
70
+ * const navBarRef = ref<ComponentInstance<typeof OnyxNavBar>>();
71
71
  *
72
72
  * watch(() => route.path, () => navBarRef.value?.closeMobileMenus());
73
73
  * ```
@@ -80,7 +80,7 @@ declare const __VLS_component: import("vue").DefineComponent<OnyxNavBarProps, {
80
80
  onNavigateToStart?: ((event: MouseEvent) => any) | undefined;
81
81
  onNavigateBack?: ((event: MouseEvent) => any) | undefined;
82
82
  }>, {
83
- mobileBreakpoint: import("../..").OnyxBreakpoint | number;
83
+ mobileBreakpoint: import("@sit-onyx/shared/breakpoints").OnyxBreakpoint | number;
84
84
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLElement>;
85
85
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
86
86
  export default _default;
@@ -17,7 +17,7 @@ declare function __VLS_template(): {
17
17
  };
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxMenuItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxMenuItemProps> & Readonly<{}>, {
20
- target: import("../../../..").LinkTarget;
20
+ target: import("../../../OnyxLink/types.ts").LinkTarget;
21
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLIElement>;
22
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
23
  export default _default;
@@ -20,7 +20,81 @@ declare function __VLS_template(): {
20
20
  */
21
21
  children?(): unknown;
22
22
  };
23
- refs: {};
23
+ refs: {
24
+ componentRef: ({
25
+ $: import("vue").ComponentInternalInstance;
26
+ $data: {};
27
+ $props: {
28
+ readonly href?: string | undefined;
29
+ readonly withExternalIcon?: (boolean | "auto") | undefined;
30
+ readonly mobileChildrenOpen?: import("../../../../composables/useManagedState").ManagedProp<boolean> | undefined;
31
+ readonly label: string;
32
+ readonly active?: boolean | undefined;
33
+ readonly isMobile: boolean;
34
+ readonly "onUpdate:mobileChildrenOpen"?: ((isOpen: boolean) => any) | undefined;
35
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
36
+ $attrs: {
37
+ [x: string]: unknown;
38
+ };
39
+ $refs: {
40
+ [x: string]: unknown;
41
+ };
42
+ $slots: Readonly<{
43
+ [name: string]: import("vue").Slot<any> | undefined;
44
+ }>;
45
+ $root: import("vue").ComponentPublicInstance | null;
46
+ $parent: import("vue").ComponentPublicInstance | null;
47
+ $host: Element | null;
48
+ $emit: (event: "update:mobileChildrenOpen", isOpen: boolean) => void;
49
+ $el: HTMLLIElement;
50
+ $options: import("vue").ComponentOptionsBase<Readonly<import("../../../OnyxExternalLinkIcon/types.ts").OnyxExternalLinkIcon & {
51
+ mobileChildrenOpen?: import("../../../../composables/useManagedState").ManagedProp<boolean>;
52
+ label: string;
53
+ active?: boolean;
54
+ } & {
55
+ isMobile: boolean;
56
+ }> & Readonly<{
57
+ "onUpdate:mobileChildrenOpen"?: ((isOpen: boolean) => any) | undefined;
58
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
59
+ "update:mobileChildrenOpen": (isOpen: boolean) => any;
60
+ }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
61
+ beforeCreate?: (() => void) | (() => void)[];
62
+ created?: (() => void) | (() => void)[];
63
+ beforeMount?: (() => void) | (() => void)[];
64
+ mounted?: (() => void) | (() => void)[];
65
+ beforeUpdate?: (() => void) | (() => void)[];
66
+ updated?: (() => void) | (() => void)[];
67
+ activated?: (() => void) | (() => void)[];
68
+ deactivated?: (() => void) | (() => void)[];
69
+ beforeDestroy?: (() => void) | (() => void)[];
70
+ beforeUnmount?: (() => void) | (() => void)[];
71
+ destroyed?: (() => void) | (() => void)[];
72
+ unmounted?: (() => void) | (() => void)[];
73
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
74
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
75
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
76
+ };
77
+ $forceUpdate: () => void;
78
+ $nextTick: typeof import("vue").nextTick;
79
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
80
+ } & Readonly<{}> & Omit<Readonly<import("../../../OnyxExternalLinkIcon/types.ts").OnyxExternalLinkIcon & {
81
+ mobileChildrenOpen?: import("../../../../composables/useManagedState").ManagedProp<boolean>;
82
+ label: string;
83
+ active?: boolean;
84
+ } & {
85
+ isMobile: boolean;
86
+ }> & Readonly<{
87
+ "onUpdate:mobileChildrenOpen"?: ((isOpen: boolean) => any) | undefined;
88
+ }>, never> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
89
+ $slots: Readonly<{
90
+ button?(): unknown;
91
+ options?(): unknown;
92
+ }> & {
93
+ button?(): unknown;
94
+ options?(): unknown;
95
+ };
96
+ }) | null;
97
+ };
24
98
  rootEl: HTMLLIElement;
25
99
  };
26
100
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -15,9 +15,9 @@ declare function __VLS_template(): {
15
15
  rootEl: HTMLLIElement;
16
16
  };
17
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
- declare const __VLS_component: import("vue").DefineComponent<import("../index.js").OnyxNavButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ declare const __VLS_component: import("vue").DefineComponent<import("../index.ts").OnyxNavButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
19
  navigate: (href: string) => any;
20
- }, string, import("vue").PublicProps, Readonly<import("../index.js").OnyxNavButtonProps> & Readonly<{
20
+ }, string, import("vue").PublicProps, Readonly<import("../index.ts").OnyxNavButtonProps> & Readonly<{
21
21
  onNavigate?: ((href: string) => any) | undefined;
22
22
  }>, {
23
23
  withExternalIcon: boolean | "auto";
@@ -1,5 +1,6 @@
1
+ import type { OnyxBreakpoint } from "@sit-onyx/shared/breakpoints";
1
2
  import type { ComputedRef, InjectionKey } from "vue";
2
- import type { OnyxBreakpoint } from "../../types";
3
+ import type { MoreListInjectionKey } from "../../composables/useMoreList";
3
4
  import type { OnyxNavAppAreaProps } from "../OnyxNavAppArea/types";
4
5
  export type OnyxNavBarProps = Omit<OnyxNavAppAreaProps, "label"> & {
5
6
  /**
@@ -27,3 +28,4 @@ export type OnyxNavBarProps = Omit<OnyxNavAppAreaProps, "label"> & {
27
28
  * @returns `true` if mobile, `false` otherwise
28
29
  */
29
30
  export declare const MOBILE_NAV_BAR_INJECTION_KEY: InjectionKey<ComputedRef<boolean>>;
31
+ export declare const NAV_BAR_MORE_LIST_INJECTION_KEY: MoreListInjectionKey;
@@ -17,7 +17,7 @@ declare function __VLS_template(): {
17
17
  };
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: import("vue").DefineComponent<OnyxSelectOptionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxSelectOptionProps> & Readonly<{}>, {
20
- truncation: import("../../index.js").TruncationType;
20
+ truncation: import("../../index.ts").TruncationType;
21
21
  multiple: boolean;
22
22
  active: boolean;
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLIElement>;
@@ -10,6 +10,6 @@ declare const _default: import("vue").DefineComponent<OnyxSwitchProps, {}, {}, {
10
10
  disabled: boolean | symbol;
11
11
  loading: boolean;
12
12
  modelValue: boolean;
13
- truncation: import("../..").TruncationType;
13
+ truncation: import("../../index.ts").TruncationType;
14
14
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { OnyxTagProps } from "./types";
2
2
  declare const _default: import("vue").DefineComponent<OnyxTagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxTagProps> & Readonly<{}>, {
3
- color: import("../..").OnyxColor;
3
+ color: import("../../index.ts").OnyxColor;
4
4
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
5
5
  export default _default;
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<OnyxTextareaProps, {}, {},
9
9
  required: boolean;
10
10
  skeleton: import("../../composables/useSkeletonState").SkeletonInjected;
11
11
  disabled: boolean | symbol;
12
- autocapitalize: import("../..").Autocapitalize;
12
+ autocapitalize: import("../OnyxInput/types.ts").Autocapitalize;
13
13
  modelValue: string;
14
14
  readonly: boolean;
15
15
  disableManualResize: boolean;
@@ -5,7 +5,7 @@ declare const _default: import("vue").DefineComponent<OnyxToastMessageProps, {},
5
5
  onClose?: (() => any) | undefined;
6
6
  }>, {
7
7
  icon: string | false;
8
- color: Extract<import("../..").OnyxColor, "neutral" | "danger" | "warning" | "success">;
8
+ color: Extract<import("../../index.ts").OnyxColor, "neutral" | "danger" | "warning" | "success">;
9
9
  duration: number;
10
10
  clickable: boolean;
11
11
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -41,7 +41,7 @@ declare function __VLS_template(): {
41
41
  };
42
42
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
43
43
  declare const __VLS_component: import("vue").DefineComponent<OnyxTooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxTooltipProps> & Readonly<{}>, {
44
- color: Extract<import("../..").OnyxColor, "neutral" | "danger">;
44
+ color: Extract<import("../../index.ts").OnyxColor, "neutral" | "danger">;
45
45
  position: import("./types").TooltipPosition;
46
46
  alignment: import("../../composables/useWedgePosition").WedgePosition | "auto";
47
47
  fitParent: boolean;
@@ -0,0 +1,9 @@
1
+ import type { DataGridEntry, OnyxDataGridProps } from "../../..";
2
+ import { DataGridFeatures } from "../../..";
3
+ type __VLS_Props = Pick<OnyxDataGridProps, "columns" | "data">;
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ sortChange: (sortState: DataGridFeatures.SortState<DataGridEntry>) => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
7
+ onSortChange?: ((sortState: DataGridFeatures.SortState<DataGridEntry>) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { type OnyxBreakpoint } from "../../../../types";
1
+ import { type OnyxBreakpoint } from "@sit-onyx/shared/breakpoints";
2
2
  export type GridElementConfig = {
3
3
  columnCount: number;
4
4
  breakpoints?: Partial<Record<OnyxBreakpoint, number>>;
@@ -0,0 +1,118 @@
1
+ import { type InjectionKey, type Ref } from "vue";
2
+ /**
3
+ * Template ref of either a native HTML element or a custom Vue component.
4
+ */
5
+ export type HTMLOrInstanceRef = Element | {
6
+ $el: Element;
7
+ } | null | undefined;
8
+ /**
9
+ * Injection key for providing "more" data to child components of a list to e.g. render a "+3 more" indicator.
10
+ */
11
+ export type MoreListInjectionKey = InjectionKey<{
12
+ /**
13
+ * Map of components in the list. Key = unique ID, value = component template ref
14
+ */
15
+ components: Map<string, Ref<HTMLOrInstanceRef>>;
16
+ /**
17
+ * List of component IDs that are currently fully visible.
18
+ */
19
+ visibleElements: Ref<string[]>;
20
+ /**
21
+ * Whether the intersection observer should be disabled (e.g. when more feature is currently not needed due to mobile layout).
22
+ */
23
+ disabled: Ref<boolean>;
24
+ }>;
25
+ export type UseMoreListOptions = {
26
+ /**
27
+ * Vue template ref for the parent element containing the list of components.
28
+ */
29
+ parentRef: Ref<HTMLOrInstanceRef>;
30
+ /**
31
+ * Refs for the individual components in the list.
32
+ */
33
+ componentRefs: Map<string, Ref<HTMLOrInstanceRef>>;
34
+ /**
35
+ * Whether the intersection observer should be disabled (e.g. when more feature is currently not needed due to mobile layout).
36
+ */
37
+ disabled?: Ref<boolean>;
38
+ };
39
+ /**
40
+ * Composable for managing a list of components where e.g. a "+3" more indicator should be shown if not all components
41
+ * fit into the available width.
42
+ *
43
+ * @example
44
+ *
45
+ * ```vue
46
+ * <script lang="ts" setup>
47
+ * import { ref, type ComponentInstance } from "vue";
48
+ * import { useMore } from "../../composables/useMore";
49
+ * import OnyxNavButton from "../OnyxNavBar/modules/OnyxNavButton/OnyxNavButton.vue";
50
+ *
51
+ * const parentRef = ref<HTMLElement>();
52
+ * const componentRefs = ref<ComponentInstance<typeof OnyxNavButton>[]>([]);
53
+ *
54
+ * const { visibleElements, hiddenElements } = useMore({ parentRef, componentRefs });
55
+ * </script>
56
+ *
57
+ * <template>
58
+ * <div ref="parentRef" class="onyx-more">
59
+ * <OnyxNavButton v-for="i in 16" ref="componentRefs" :key="i" :label="`Nav button ${i}`" />
60
+ * </div>
61
+ * </template>
62
+ *
63
+ * <style lang="scss">
64
+ * @use "../../styles/mixins/layers.scss";
65
+ *
66
+ * .onyx-more {
67
+ * @include layers.component() {
68
+ * display: flex;
69
+ * align-items: center;
70
+ * overflow-x: clip;
71
+ * }
72
+ * }
73
+ * </style>
74
+ * ```
75
+ */
76
+ export declare const useMoreList: (options: UseMoreListOptions) => {
77
+ /**
78
+ * IDs of currently completely visible components in the list.
79
+ */
80
+ visibleElements: Ref<string[], string[]>;
81
+ /**
82
+ * IDs of currently fully or partially hidden components in the list.
83
+ */
84
+ hiddenElements: import("vue").ComputedRef<string[]>;
85
+ };
86
+ /**
87
+ * Composable that must be implemented in all list children when using `useMore` to correctly observe the visibility of the elements.
88
+ *
89
+ * @example
90
+ *
91
+ * ```vue
92
+ * <script lang="ts" setup
93
+ * const { componentRef, isVisible } = useMoreChild();
94
+ * </script>
95
+ *
96
+ * <template
97
+ * <div ref="componentRef" :class="{ hidden: !isVisible }"> Your content... </div>
98
+ * </template>
99
+ *
100
+ * <style>
101
+ * .hidden {
102
+ * visibility: hidden;
103
+ * }
104
+ * </style>
105
+ * ```
106
+ */
107
+ export declare const useMoreListChild: (injectionKey: MoreListInjectionKey) => {
108
+ /**
109
+ * Component template ref.
110
+ */
111
+ componentRef: Ref<HTMLOrInstanceRef, HTMLOrInstanceRef>;
112
+ /**
113
+ * Whether the component is currently visible.
114
+ * Should hide itself visually (e.g. using "visibility: hidden").
115
+ * Do not use v-if, v-show or "display: none" since the more feature does not work then when resizing
116
+ */
117
+ isVisible: import("vue").ComputedRef<boolean>;
118
+ };