sit-onyx 1.0.0-beta.63 → 1.0.0-beta.65
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.
- package/dist/components/OnyxBadge/OnyxBadge.vue.d.ts +1 -1
- package/dist/components/OnyxDataGrid/OnyxDataGrid.vue.d.ts +3 -2
- package/dist/components/OnyxDataGrid/features/all.d.ts +2 -0
- package/dist/components/OnyxDataGrid/features/index.d.ts +3 -5
- package/dist/components/OnyxDataGrid/features/sorting/SortAction.vue.d.ts +1 -1
- package/dist/components/OnyxDataGrid/features/sorting/sorting.d.ts +4 -4
- package/dist/components/OnyxDataGrid/features/sorting/types.d.ts +55 -0
- package/dist/components/OnyxDataGrid/types.d.ts +6 -1
- package/dist/components/OnyxIconButton/OnyxIconButton.vue.d.ts +2 -2
- package/dist/components/OnyxInfoTooltip/OnyxInfoTooltip.vue.d.ts +2 -2
- package/dist/components/OnyxMoreList/OnyxMoreList.vue.d.ts +40 -0
- package/dist/components/OnyxMoreList/types.d.ts +27 -0
- package/dist/components/OnyxNavBar/OnyxNavBar.vue.d.ts +2 -2
- package/dist/components/OnyxNavBar/modules/OnyxMenuItem/OnyxMenuItem.vue.d.ts +1 -1
- package/dist/components/OnyxNavBar/modules/OnyxNavButton/OnyxNavButton.vue.d.ts +75 -1
- package/dist/components/OnyxNavBar/modules/OnyxNavItem/OnyxNavItem.vue.d.ts +2 -2
- package/dist/components/OnyxNavBar/types.d.ts +3 -1
- package/dist/components/OnyxSelectOption/OnyxSelectOption.vue.d.ts +1 -1
- package/dist/components/OnyxSwitch/OnyxSwitch.vue.d.ts +1 -1
- package/dist/components/OnyxTab/OnyxTab.vue.d.ts +34 -0
- package/dist/components/OnyxTab/types.d.ts +11 -0
- package/dist/components/OnyxTabs/OnyxTabs.vue.d.ts +28 -0
- package/dist/components/OnyxTabs/types.d.ts +33 -0
- package/dist/components/OnyxTag/OnyxTag.vue.d.ts +1 -1
- package/dist/components/OnyxTextarea/OnyxTextarea.vue.d.ts +1 -1
- package/dist/components/OnyxToastMessage/OnyxToastMessage.vue.d.ts +1 -1
- package/dist/components/OnyxTooltip/OnyxTooltip.vue.d.ts +1 -1
- package/dist/components/examples/DataGrid/SortingDataGrid.vue.d.ts +9 -0
- package/dist/components/examples/GridPlayground/EditGridElementDialog/EditGridElementDialog.vue.d.ts +1 -1
- package/dist/composables/useMoreList.d.ts +118 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +9 -0
- package/dist/index.js +2132 -1762
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +0 -1
- package/package.json +10 -7
- package/src/styles/grid.ct.tsx +1 -1
- package/dist/types/breakpoints.d.ts +0 -13
- 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("
|
|
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
|
-
|
|
3
|
-
|
|
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: {};
|
|
@@ -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
|
|
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>[] | []
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import type { DataGridEntry } from "../../types";
|
|
2
|
-
|
|
2
|
+
import type { SortDirection, SortOptions, SortState } from "./types";
|
|
3
3
|
export declare const nextSortDirection: (current?: SortDirection) => SortDirection;
|
|
4
|
-
declare const
|
|
5
|
-
export declare const
|
|
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("
|
|
17
|
-
color: import("
|
|
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.
|
|
4
|
-
open: import("../OnyxTooltip/types.
|
|
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<
|
|
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("
|
|
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("
|
|
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.
|
|
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.
|
|
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 {
|
|
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.
|
|
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("
|
|
13
|
+
truncation: import("../../index.ts").TruncationType;
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { OnyxTabProps } from "./types";
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
/**
|
|
6
|
+
* Tab panel / content.
|
|
7
|
+
*/
|
|
8
|
+
default(): unknown;
|
|
9
|
+
/**
|
|
10
|
+
* Optional slot to override the tab content. By default, the `label` property will be displayed.
|
|
11
|
+
*/
|
|
12
|
+
tab?(): unknown;
|
|
13
|
+
}> & {
|
|
14
|
+
/**
|
|
15
|
+
* Tab panel / content.
|
|
16
|
+
*/
|
|
17
|
+
default(): unknown;
|
|
18
|
+
/**
|
|
19
|
+
* Optional slot to override the tab content. By default, the `label` property will be displayed.
|
|
20
|
+
*/
|
|
21
|
+
tab?(): unknown;
|
|
22
|
+
};
|
|
23
|
+
refs: {};
|
|
24
|
+
rootEl: any;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
27
|
+
declare const __VLS_component: import("vue").DefineComponent<OnyxTabProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OnyxTabProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DensityProp } from "../../composables/density";
|
|
2
|
+
export type OnyxTabProps = DensityProp & {
|
|
3
|
+
/**
|
|
4
|
+
* Value of the tab when its selected. Will be the `modelValue` / `v-model` of the `OnyxTabs` component.
|
|
5
|
+
*/
|
|
6
|
+
value: PropertyKey;
|
|
7
|
+
/**
|
|
8
|
+
* Tab label to display. Alternatively, the `tab` slot can be used.
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type OnyxTabsProps } from "./types";
|
|
2
|
+
declare const _default: <TValue extends PropertyKey = PropertyKey>(__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<{
|
|
4
|
+
readonly "onUpdate:modelValue"?: ((value: TValue) => any) | undefined;
|
|
5
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & Partial<{}> & OnyxTabsProps<TValue>> & import("vue").PublicProps;
|
|
6
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
/**
|
|
10
|
+
* Slots for tab components. Only `OnyxTab` should be used here.
|
|
11
|
+
*/
|
|
12
|
+
default(): unknown;
|
|
13
|
+
}> & {
|
|
14
|
+
/**
|
|
15
|
+
* Slots for tab components. Only `OnyxTab` should be used here.
|
|
16
|
+
*/
|
|
17
|
+
default(): unknown;
|
|
18
|
+
};
|
|
19
|
+
emit: (evt: "update:modelValue", value: TValue) => void;
|
|
20
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}> & {
|
|
23
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_PrettifyLocal<T> = {
|
|
27
|
+
[K in keyof T]: T[K];
|
|
28
|
+
} & {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { createTabs } from "@sit-onyx/headless";
|
|
2
|
+
import type { InjectionKey, Ref } from "vue";
|
|
3
|
+
import type { DensityProp } from "../../composables/density";
|
|
4
|
+
export type OnyxTabsProps<TValue extends PropertyKey = PropertyKey> = DensityProp & {
|
|
5
|
+
/**
|
|
6
|
+
* Label of the tabs. Needed for accessibility / screen readers.
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Currently selected tab (`value` property of `OnyxTab` component).
|
|
11
|
+
*/
|
|
12
|
+
modelValue: TValue;
|
|
13
|
+
/**
|
|
14
|
+
* If `true`, the tabs will be stretched to the full available width.
|
|
15
|
+
*/
|
|
16
|
+
stretched?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type TabsInjectionKey<TValue extends PropertyKey = PropertyKey> = InjectionKey<{
|
|
19
|
+
/**
|
|
20
|
+
* Headless composable provided for child tabs for correct accessibility and behavior.
|
|
21
|
+
*/
|
|
22
|
+
headless: ReturnType<typeof createTabs<TValue>>;
|
|
23
|
+
/**
|
|
24
|
+
* Ref to the parent tabs element where the child tabs should be teleported to
|
|
25
|
+
* to maintain the correct HTML structure.
|
|
26
|
+
*/
|
|
27
|
+
panelRef: Ref<HTMLElement | undefined>;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Injection key to provide relevant context data from the tabs parent to the
|
|
31
|
+
* individual child tab components.
|
|
32
|
+
*/
|
|
33
|
+
export declare const TABS_INJECTION_KEY: TabsInjectionKey;
|
|
@@ -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("
|
|
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("
|
|
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("
|
|
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("
|
|
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;
|