sit-onyx 1.0.0-beta.64 → 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/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/index.cjs +4 -4
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1231 -1133
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -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;
|