sit-onyx 1.0.0-beta.2 → 1.0.0-beta.21
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/OnyxCheckbox/OnyxCheckbox.vue.d.ts +2 -2
- package/dist/components/OnyxCheckboxGroup/OnyxCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/OnyxCheckboxGroup/types.d.ts +3 -2
- package/dist/components/OnyxEmpty/OnyxEmpty.vue.d.ts +11 -1
- package/dist/components/OnyxFormElement/OnyxFormElement.vue.d.ts +9 -2
- package/dist/components/OnyxFormElement/types.d.ts +6 -0
- package/dist/components/OnyxMobileNavButton/OnyxMobileNavButton.vue.d.ts +2 -2
- package/dist/components/OnyxMobileNavButton/types.d.ts +4 -0
- package/dist/components/OnyxNavBar/modules/OnyxFlyoutMenu/OnyxFlyoutMenu.vue.d.ts +9 -3
- package/dist/components/OnyxNavBar/modules/OnyxMenuItem/types.d.ts +1 -1
- package/dist/components/OnyxNavBar/modules/OnyxUserMenu/OnyxUserMenu.vue.d.ts +9 -1
- package/dist/components/OnyxNavBar/modules/OnyxUserMenu/UserMenuLayout.vue.d.ts +10 -4
- package/dist/components/OnyxRadioButton/OnyxRadioButton.vue.d.ts +2 -2
- package/dist/components/OnyxRadioGroup/OnyxRadioGroup.vue.d.ts +2 -2
- package/dist/components/OnyxRadioGroup/types.d.ts +1 -1
- package/dist/components/OnyxSelect/OnyxSelect.vue.d.ts +5 -5
- package/dist/components/OnyxSelect/types.d.ts +21 -5
- package/dist/components/OnyxSelectInput/OnyxSelectInput.vue.d.ts +2 -2
- package/dist/components/OnyxSelectInput/types.d.ts +5 -12
- package/dist/components/OnyxSelectOption/OnyxSelectOption.vue.d.ts +1 -1
- package/dist/components/OnyxStepper/OnyxStepper.vue.d.ts +50 -0
- package/dist/components/OnyxStepper/types.d.ts +56 -0
- package/dist/components/OnyxSwitch/OnyxSwitch.vue.d.ts +1 -1
- package/dist/components/OnyxTooltip/OnyxTooltip.vue.d.ts +1 -1
- package/dist/components/OnyxTooltip/types.d.ts +2 -1
- package/dist/composables/useCustomValidity.d.ts +13 -1
- package/dist/index.cjs +5 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1682 -1417
- package/dist/style.css +1 -1
- package/dist/utils/attrs.d.ts +3 -3
- package/package.json +5 -8
- package/src/i18n/locales/de-DE.json +6 -1
- package/src/i18n/locales/en-US.json +6 -1
- package/src/styles/global.css +1 -1
- package/src/styles/index.scss +7 -4
- package/src/styles/mixins/checkbox.scss +1 -13
- package/src/styles/mixins/input.scss +49 -5
- package/src/styles/mixins/list.scss +2 -11
- package/src/styles/required.scss +1 -1
- package/src/styles/{dark.css → variables/dark.css} +1 -13
- package/src/styles/variables/density-compact.css +17 -0
- package/src/styles/variables/density-cozy.css +17 -0
- package/src/styles/variables/density-default.css +18 -0
- package/src/styles/{light.css → variables/light.css} +1 -13
- package/src/styles/variables/spacing.css +20 -0
- package/src/styles/{themes → variables/themes}/kaufland.css +2 -2
- package/src/styles/{themes → variables/themes}/lidl.css +2 -2
- package/src/styles/{themes → variables/themes}/onyx.css +2 -2
- package/src/styles/{themes → variables/themes}/onyx.json +1 -1
- package/src/styles/{themes → variables/themes}/twogo.css +2 -2
- package/src/styles/density.scss +0 -41
- package/src/types/breakpoints.ts +0 -14
- package/src/types/colors.ts +0 -10
- package/src/types/components.ts +0 -59
- package/src/types/fonts.ts +0 -7
- package/src/types/i18n.ts +0 -68
- package/src/types/index.ts +0 -10
- package/src/types/themes.ts +0 -1
- package/src/types/utils.ts +0 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { SelectOptionValue } from "../../types";
|
|
2
2
|
import type { OnyxCheckboxProps } from "./types";
|
|
3
|
-
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: Awaited<typeof __VLS_setup
|
|
3
|
+
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
5
5
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
6
6
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
7
7
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
8
8
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
9
9
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
10
|
-
}, never>, "onValidityChange" | "onUpdate:modelValue"> & OnyxCheckboxProps<TValue>> &
|
|
10
|
+
}, never>, "onValidityChange" | "onUpdate:modelValue"> & OnyxCheckboxProps<TValue>> & import("vue").PublicProps;
|
|
11
11
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: ReturnType<() => {}>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { SelectOptionValue } from "../../types";
|
|
2
2
|
import type { OnyxCheckboxGroupProps } from "./types";
|
|
3
|
-
declare const _default: <TValue extends SelectOptionValue>(__VLS_props: Awaited<typeof __VLS_setup
|
|
3
|
+
declare const _default: <TValue extends SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
5
5
|
"onUpdate:modelValue"?: ((value: TValue[]) => any) | undefined;
|
|
6
6
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
7
7
|
"onUpdate:modelValue"?: ((value: TValue[]) => any) | undefined;
|
|
8
|
-
}, never>, "onUpdate:modelValue"> & OnyxCheckboxGroupProps<TValue>> &
|
|
8
|
+
}, never>, "onUpdate:modelValue"> & OnyxCheckboxGroupProps<TValue>> & import("vue").PublicProps;
|
|
9
9
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
10
10
|
attrs: any;
|
|
11
11
|
slots: ReturnType<() => {}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { DensityProp } from "../../composables/density";
|
|
2
2
|
import type { RequiredMarkerProp } from "../../composables/required";
|
|
3
|
+
import type { CustomValidityProp } from "../../composables/useCustomValidity";
|
|
3
4
|
import type { AutofocusProp, BaseSelectOption, Direction, SelectOptionValue } from "../../types";
|
|
4
|
-
export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & {
|
|
5
|
+
export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & Pick<BaseSelectOption, "truncation"> & {
|
|
5
6
|
/**
|
|
6
7
|
* Checkbox options.
|
|
7
8
|
*/
|
|
@@ -38,4 +39,4 @@ export type OnyxCheckboxGroupProps<TValue extends SelectOptionValue = SelectOpti
|
|
|
38
39
|
*/
|
|
39
40
|
skeleton?: number;
|
|
40
41
|
};
|
|
41
|
-
export type CheckboxGroupOption<TValue extends SelectOptionValue = SelectOptionValue> = BaseSelectOption<TValue> & RequiredMarkerProp & AutofocusProp;
|
|
42
|
+
export type CheckboxGroupOption<TValue extends SelectOptionValue = SelectOptionValue> = BaseSelectOption<TValue> & RequiredMarkerProp & CustomValidityProp & AutofocusProp;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type DensityProp } from "../../composables/density";
|
|
1
2
|
declare function __VLS_template(): Readonly<{
|
|
2
3
|
/**
|
|
3
4
|
* Label / text to display.
|
|
@@ -17,7 +18,7 @@ declare function __VLS_template(): Readonly<{
|
|
|
17
18
|
*/
|
|
18
19
|
icon?(): unknown;
|
|
19
20
|
};
|
|
20
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
21
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<DensityProp>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<DensityProp>>>, {}, {}>;
|
|
21
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
22
23
|
export default _default;
|
|
23
24
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -25,3 +26,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
25
26
|
$slots: S;
|
|
26
27
|
};
|
|
27
28
|
};
|
|
29
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
+
type __VLS_TypePropsToOption<T> = {
|
|
31
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
+
} : {
|
|
34
|
+
type: import('vue').PropType<T[K]>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import type { OnyxFormElementProps } from "./types";
|
|
2
2
|
declare function __VLS_template(): Readonly<{
|
|
3
3
|
/** The place for the actual form element */
|
|
4
|
-
default(
|
|
4
|
+
default(props: {
|
|
5
|
+
id: string;
|
|
6
|
+
}): unknown;
|
|
5
7
|
}> & {
|
|
6
8
|
/** The place for the actual form element */
|
|
7
|
-
default(
|
|
9
|
+
default(props: {
|
|
10
|
+
id: string;
|
|
11
|
+
}): unknown;
|
|
8
12
|
};
|
|
9
13
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxFormElementProps>, {
|
|
10
14
|
required: boolean;
|
|
15
|
+
id: string;
|
|
11
16
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxFormElementProps>, {
|
|
12
17
|
required: boolean;
|
|
18
|
+
id: string;
|
|
13
19
|
}>>>, {
|
|
14
20
|
required: boolean;
|
|
21
|
+
id: string;
|
|
15
22
|
}, {}>;
|
|
16
23
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
17
24
|
export default _default;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { RequiredMarkerProp } from "../../composables/required";
|
|
2
2
|
import type { FormErrorMessages } from "../../composables/useCustomValidity";
|
|
3
3
|
export type OnyxFormElementProps = RequiredMarkerProp & {
|
|
4
|
+
/**
|
|
5
|
+
* The id of a labelable form-related element.
|
|
6
|
+
* If not given an id will be generated.
|
|
7
|
+
* The id is passed as a `default` slot property.
|
|
8
|
+
*/
|
|
9
|
+
id?: string;
|
|
4
10
|
/**
|
|
5
11
|
* Current value of the form element.
|
|
6
12
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { OnyxMobileNavButtonProps } from "./types";
|
|
2
2
|
declare function __VLS_template(): Readonly<{
|
|
3
3
|
/**
|
|
4
|
-
* Slot for the menu content when
|
|
4
|
+
* Slot for the menu content when it's open.
|
|
5
5
|
*/
|
|
6
6
|
default(): unknown;
|
|
7
7
|
}> & {
|
|
8
8
|
/**
|
|
9
|
-
* Slot for the menu content when
|
|
9
|
+
* Slot for the menu content when it's open.
|
|
10
10
|
*/
|
|
11
11
|
default(): unknown;
|
|
12
12
|
};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { type VNode } from "vue";
|
|
2
2
|
import type { SelectOptionValue } from "../../../../types";
|
|
3
3
|
import type { OnyxFlyoutMenuProps } from "./types";
|
|
4
|
-
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: Awaited<typeof __VLS_setup
|
|
5
|
-
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
4
|
+
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
6
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
7
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
8
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
9
|
+
}, never>, "onUpdate:open"> & ({
|
|
10
|
+
open?: boolean;
|
|
11
|
+
} & OnyxFlyoutMenuProps)> & import("vue").PublicProps;
|
|
6
12
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
7
13
|
attrs: any;
|
|
8
14
|
slots: ReturnType<() => Readonly<{
|
|
@@ -40,7 +46,7 @@ declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(_
|
|
|
40
46
|
*/
|
|
41
47
|
footer?(): unknown;
|
|
42
48
|
}>;
|
|
43
|
-
emit:
|
|
49
|
+
emit: (evt: "update:open", open: boolean) => void;
|
|
44
50
|
}>) => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
51
|
[key: string]: any;
|
|
46
52
|
}> & {
|
|
@@ -2,7 +2,7 @@ import type { OnyxColor } from "../../../../types";
|
|
|
2
2
|
export type OnyxMenuItemProps = {
|
|
3
3
|
/**
|
|
4
4
|
* URL that the menu item points to.
|
|
5
|
-
* If the property is set
|
|
5
|
+
* If the property is set the menuitem will act as an anchor, otherwise it will act as an button.
|
|
6
6
|
*/
|
|
7
7
|
href?: string;
|
|
8
8
|
/**
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { OnyxUserMenuProps } from "./types";
|
|
2
|
+
declare let __VLS_typeProps: OnyxUserMenuProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
"flyoutOpen"?: boolean;
|
|
5
|
+
} & typeof __VLS_typeProps;
|
|
2
6
|
declare function __VLS_template(): Readonly<{
|
|
3
7
|
/**
|
|
4
8
|
* Slot for the menu options. Its recommended to use the `OnyxMenuItem` component here.
|
|
@@ -18,7 +22,11 @@ declare function __VLS_template(): Readonly<{
|
|
|
18
22
|
*/
|
|
19
23
|
footer?(): unknown;
|
|
20
24
|
};
|
|
21
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<
|
|
25
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:flyoutOpen": (flyoutOpen: boolean) => void;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
28
|
+
"onUpdate:flyoutOpen"?: ((flyoutOpen: boolean) => any) | undefined;
|
|
29
|
+
}, {}, {}>;
|
|
22
30
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
23
31
|
export default _default;
|
|
24
32
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { SelectOptionValue } from "../../../../types";
|
|
2
|
-
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: Awaited<typeof __VLS_setup
|
|
3
|
-
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
2
|
+
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
4
|
+
"onUpdate:flyoutOpen"?: ((flyoutOpen: boolean) => any) | undefined;
|
|
5
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
6
|
+
"onUpdate:flyoutOpen"?: ((flyoutOpen: boolean) => any) | undefined;
|
|
7
|
+
}, never>, "onUpdate:flyoutOpen"> & ({
|
|
8
|
+
flyoutOpen?: boolean;
|
|
9
|
+
} & {
|
|
4
10
|
isMobile: boolean;
|
|
5
|
-
}> &
|
|
11
|
+
})> & import("vue").PublicProps;
|
|
6
12
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
7
13
|
attrs: any;
|
|
8
14
|
slots: ReturnType<() => Readonly<{
|
|
@@ -16,7 +22,7 @@ declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(_
|
|
|
16
22
|
options?(): unknown;
|
|
17
23
|
footer?(): unknown;
|
|
18
24
|
}>;
|
|
19
|
-
emit:
|
|
25
|
+
emit: (evt: "update:flyoutOpen", flyoutOpen: boolean) => void;
|
|
20
26
|
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
21
27
|
[key: string]: any;
|
|
22
28
|
}> & {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { SelectOptionValue } from "../../types";
|
|
2
2
|
import type { OnyxRadioButtonProps } from "./types";
|
|
3
|
-
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: Awaited<typeof __VLS_setup
|
|
3
|
+
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
5
5
|
onChange?: ((value: boolean) => any) | undefined;
|
|
6
6
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
7
7
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
8
8
|
onChange?: ((value: boolean) => any) | undefined;
|
|
9
9
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
10
|
-
}, never>, "onChange" | "onValidityChange"> & OnyxRadioButtonProps<TValue>> &
|
|
10
|
+
}, never>, "onChange" | "onValidityChange"> & OnyxRadioButtonProps<TValue>> & import("vue").PublicProps;
|
|
11
11
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: ReturnType<() => {}>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { SelectOptionValue } from "../../types";
|
|
2
2
|
import type { OnyxRadioGroupProps } from "./types";
|
|
3
|
-
declare const _default: <TValue extends SelectOptionValue>(__VLS_props: Awaited<typeof __VLS_setup
|
|
3
|
+
declare const _default: <TValue extends SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
5
5
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
6
6
|
"onUpdate:modelValue"?: ((selected: TValue) => any) | undefined;
|
|
7
7
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
8
8
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
9
9
|
"onUpdate:modelValue"?: ((selected: TValue) => any) | undefined;
|
|
10
|
-
}, never>, "onValidityChange" | "onUpdate:modelValue"> & OnyxRadioGroupProps<TValue>> &
|
|
10
|
+
}, never>, "onValidityChange" | "onUpdate:modelValue"> & OnyxRadioGroupProps<TValue>> & import("vue").PublicProps;
|
|
11
11
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: ReturnType<() => {}>;
|
|
@@ -2,7 +2,7 @@ import type { DensityProp } from "../../composables/density";
|
|
|
2
2
|
import type { RequiredMarkerProp } from "../../composables/required";
|
|
3
3
|
import type { CustomValidityProp } from "../../composables/useCustomValidity";
|
|
4
4
|
import type { AutofocusProp, BaseSelectOption, Direction, SelectOptionValue } from "../../types";
|
|
5
|
-
export type OnyxRadioGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & RequiredMarkerProp & CustomValidityProp & {
|
|
5
|
+
export type OnyxRadioGroupProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & RequiredMarkerProp & CustomValidityProp & Pick<BaseSelectOption, "truncation"> & {
|
|
6
6
|
/**
|
|
7
7
|
* Options for the individual radio buttons of the group.
|
|
8
8
|
*/
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { SelectOptionValue } from "../../types";
|
|
2
2
|
import type { OnyxSelectProps, SelectOption } from "./types";
|
|
3
|
-
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: Awaited<typeof __VLS_setup
|
|
3
|
+
declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
5
5
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
6
|
-
"onUpdate:modelValue"?: ((value:
|
|
6
|
+
"onUpdate:modelValue"?: ((value: TValue | TValue[] | undefined) => any) | undefined;
|
|
7
7
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
8
8
|
"onUpdate:searchTerm"?: ((searchTerm: string) => any) | undefined;
|
|
9
9
|
onLazyLoad?: (() => any) | undefined;
|
|
10
10
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
11
11
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
12
|
-
"onUpdate:modelValue"?: ((value:
|
|
12
|
+
"onUpdate:modelValue"?: ((value: TValue | TValue[] | undefined) => any) | undefined;
|
|
13
13
|
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
14
14
|
"onUpdate:searchTerm"?: ((searchTerm: string) => any) | undefined;
|
|
15
15
|
onLazyLoad?: (() => any) | undefined;
|
|
16
|
-
}, never>, "onValidityChange" | "onUpdate:modelValue" | "onUpdate:open" | "onUpdate:searchTerm" | "onLazyLoad"> & OnyxSelectProps<TValue>> &
|
|
16
|
+
}, never>, "onValidityChange" | "onUpdate:modelValue" | "onUpdate:open" | "onUpdate:searchTerm" | "onLazyLoad"> & OnyxSelectProps<TValue>> & import("vue").PublicProps;
|
|
17
17
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
18
18
|
attrs: any;
|
|
19
19
|
slots: ReturnType<() => Readonly<{
|
|
@@ -55,7 +55,7 @@ declare const _default: <TValue extends SelectOptionValue = SelectOptionValue>(_
|
|
|
55
55
|
*/
|
|
56
56
|
option?(props: SelectOption<TValue>): unknown;
|
|
57
57
|
}>;
|
|
58
|
-
emit: (((evt: "validityChange", validity: ValidityState) => void) & ((evt: "update:modelValue", value:
|
|
58
|
+
emit: (((evt: "validityChange", validity: ValidityState) => void) & ((evt: "update:modelValue", value: TValue | TValue[] | undefined) => void) & ((evt: "update:open", open: boolean) => void) & ((evt: "update:searchTerm", searchTerm: string) => void) & ((evt: "lazyLoad") => void)) & {};
|
|
59
59
|
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
60
60
|
[key: string]: any;
|
|
61
61
|
}> & {
|
|
@@ -15,9 +15,18 @@ export type SelectSearchProps = {
|
|
|
15
15
|
* Property is managed internally, when undefined.
|
|
16
16
|
*/
|
|
17
17
|
searchTerm?: string;
|
|
18
|
+
/**
|
|
19
|
+
* As default, onyx will handle the search by comparing
|
|
20
|
+
* the option labels with the `searchTerm`.
|
|
21
|
+
* When `manualSearch` is set, this behavior is disabled.
|
|
22
|
+
* Handle your own filtering by reducing the `options` as desired.
|
|
23
|
+
* Hint: Cover `valueLabel` to prevent the disappearance of the current selections label
|
|
24
|
+
*/
|
|
25
|
+
manualSearch?: boolean;
|
|
18
26
|
} | {
|
|
19
27
|
withSearch?: false;
|
|
20
28
|
searchTerm?: never;
|
|
29
|
+
manualSearch?: never;
|
|
21
30
|
};
|
|
22
31
|
export type SelectModelValueProps<TValue extends SelectOptionValue> = {
|
|
23
32
|
/**
|
|
@@ -25,9 +34,9 @@ export type SelectModelValueProps<TValue extends SelectOptionValue> = {
|
|
|
25
34
|
*/
|
|
26
35
|
multiple?: false;
|
|
27
36
|
/**
|
|
28
|
-
*
|
|
37
|
+
* Value of the currently selected option.
|
|
29
38
|
*/
|
|
30
|
-
modelValue?:
|
|
39
|
+
modelValue?: TValue;
|
|
31
40
|
withCheckAll?: never;
|
|
32
41
|
} | {
|
|
33
42
|
/**
|
|
@@ -35,9 +44,9 @@ export type SelectModelValueProps<TValue extends SelectOptionValue> = {
|
|
|
35
44
|
*/
|
|
36
45
|
multiple: true;
|
|
37
46
|
/**
|
|
38
|
-
*
|
|
47
|
+
* Values of the currently selected options.
|
|
39
48
|
*/
|
|
40
|
-
modelValue?:
|
|
49
|
+
modelValue?: TValue[];
|
|
41
50
|
/**
|
|
42
51
|
* If true, a checkbox will be displayed to check/uncheck all options.
|
|
43
52
|
* Disabled and skeleton checkboxes will be excluded from the check/uncheck behavior.
|
|
@@ -51,7 +60,14 @@ export type SelectModelValueProps<TValue extends SelectOptionValue> = {
|
|
|
51
60
|
label?: string;
|
|
52
61
|
};
|
|
53
62
|
};
|
|
54
|
-
export type OnyxSelectProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & SelectModelValueProps<TValue> & SelectSearchProps & Omit<OnyxSelectInputProps
|
|
63
|
+
export type OnyxSelectProps<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & SelectModelValueProps<TValue> & SelectSearchProps & Omit<OnyxSelectInputProps, "density" | "modelValue"> & AutofocusProp & Pick<BaseSelectOption, "truncation"> & {
|
|
64
|
+
/**
|
|
65
|
+
* Label that will be shown in the input of OnyxSelect.
|
|
66
|
+
* If unset, will be managed internally by comparing `modelValue` with `options`.
|
|
67
|
+
* Recommended to be used if not all options can be provided at once
|
|
68
|
+
* or a manual search is implemented.
|
|
69
|
+
*/
|
|
70
|
+
valueLabel?: string | string[];
|
|
55
71
|
/**
|
|
56
72
|
* If true, the select popover is expanded and visible.
|
|
57
73
|
* Property is managed internally, when undefined.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { SelectOptionValue } from "../../types";
|
|
2
2
|
import type { OnyxSelectInputProps } from "./types";
|
|
3
|
-
declare const _default: <TValue extends SelectOptionValue>(__VLS_props: Awaited<typeof __VLS_setup
|
|
3
|
+
declare const _default: <TValue extends SelectOptionValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
|
5
5
|
onClick?: (() => any) | undefined;
|
|
6
6
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
7
7
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
8
8
|
onClick?: (() => any) | undefined;
|
|
9
9
|
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
10
|
-
}, never>, "onClick" | "onValidityChange"> & OnyxSelectInputProps
|
|
10
|
+
}, never>, "onClick" | "onValidityChange"> & OnyxSelectInputProps> & import("vue").PublicProps;
|
|
11
11
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
12
12
|
focus: () => void | undefined;
|
|
13
13
|
}>): void;
|
|
@@ -1,29 +1,22 @@
|
|
|
1
|
-
import type { SelectOption } from "../..";
|
|
2
1
|
import type { DensityProp } from "../../composables/density";
|
|
3
2
|
import type { RequiredMarkerProp } from "../../composables/required";
|
|
4
3
|
import type { CustomValidityProp } from "../../composables/useCustomValidity";
|
|
5
|
-
import type { AutofocusProp
|
|
4
|
+
import type { AutofocusProp } from "../../types";
|
|
6
5
|
import type { OnyxFormElementProps } from "../OnyxFormElement/types";
|
|
7
6
|
export declare const MULTISELECT_TEXT_MODE: readonly ["summary", "preview"];
|
|
8
7
|
export type MultiselectTextMode = (typeof MULTISELECT_TEXT_MODE)[number];
|
|
9
|
-
|
|
10
|
-
* Whether multiple values can be selected.
|
|
11
|
-
*/
|
|
12
|
-
export type SelectionInput<TValue extends SelectOptionValue = SelectOptionValue> = {
|
|
8
|
+
export type OnyxSelectInputProps = DensityProp & RequiredMarkerProp & CustomValidityProp & AutofocusProp & Omit<OnyxFormElementProps, "modelValue" | "maxlength" | "withCounter"> & {
|
|
13
9
|
/**
|
|
14
|
-
* Current
|
|
10
|
+
* Current label(s) of the select.
|
|
15
11
|
*/
|
|
16
|
-
modelValue?:
|
|
12
|
+
modelValue?: string[];
|
|
17
13
|
/**
|
|
18
|
-
* How
|
|
14
|
+
* How multiselect labels will be displayed in the input.
|
|
19
15
|
* - summary (default): will show "x Selected" if more than 1 is selected.
|
|
20
16
|
* - preview: will show the names of the selection as a truncated list.
|
|
21
17
|
* A number-badge appears next to it including a tooltip with all selected names.
|
|
22
18
|
*/
|
|
23
19
|
textMode?: MultiselectTextMode;
|
|
24
|
-
};
|
|
25
|
-
export type SelectInputModelValue<TValue extends SelectOptionValue = SelectOptionValue> = Pick<SelectOption<TValue>, "value" | "label">;
|
|
26
|
-
export type OnyxSelectInputProps<TValue extends SelectOptionValue> = DensityProp & RequiredMarkerProp & CustomValidityProp & SelectionInput<TValue> & AutofocusProp & Omit<OnyxFormElementProps, "modelValue" | "maxlength" | "withCounter"> & {
|
|
27
20
|
/**
|
|
28
21
|
* Whether the select should be disabled.
|
|
29
22
|
*/
|
|
@@ -19,8 +19,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
19
19
|
multiple: boolean;
|
|
20
20
|
truncation: string;
|
|
21
21
|
}>>>, {
|
|
22
|
-
multiple: boolean;
|
|
23
22
|
truncation: import("../../index.js").TruncationType;
|
|
23
|
+
multiple: boolean;
|
|
24
24
|
active: boolean;
|
|
25
25
|
}, {}>;
|
|
26
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { OnyxStepperProps } from "./types";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxStepperProps>, {
|
|
3
|
+
step: number;
|
|
4
|
+
stripStep: boolean;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
readonly: boolean;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
skeleton: boolean;
|
|
9
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
validityChange: (validity: ValidityState) => void;
|
|
11
|
+
blur: () => void;
|
|
12
|
+
focus: () => void;
|
|
13
|
+
"update:modelValue": (value?: number | undefined) => void;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<OnyxStepperProps>, {
|
|
15
|
+
step: number;
|
|
16
|
+
stripStep: boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
readonly: boolean;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
skeleton: boolean;
|
|
21
|
+
}>>> & {
|
|
22
|
+
onFocus?: (() => any) | undefined;
|
|
23
|
+
onBlur?: (() => any) | undefined;
|
|
24
|
+
onValidityChange?: ((validity: ValidityState) => any) | undefined;
|
|
25
|
+
"onUpdate:modelValue"?: ((value?: number | undefined) => any) | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
readonly: boolean;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
loading: boolean;
|
|
30
|
+
skeleton: boolean;
|
|
31
|
+
step: number;
|
|
32
|
+
}, {}>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithDefaults<P, D> = {
|
|
35
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
36
|
+
default: D[K];
|
|
37
|
+
}> : P[K];
|
|
38
|
+
};
|
|
39
|
+
type __VLS_Prettify<T> = {
|
|
40
|
+
[K in keyof T]: T[K];
|
|
41
|
+
} & {};
|
|
42
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
43
|
+
type __VLS_TypePropsToOption<T> = {
|
|
44
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
45
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
46
|
+
} : {
|
|
47
|
+
type: import('vue').PropType<T[K]>;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { DensityProp } from "../../composables/density";
|
|
2
|
+
import type { CustomValidityProp } from "../../composables/useCustomValidity";
|
|
3
|
+
import type { AutofocusProp } from "../../types";
|
|
4
|
+
import type { OnyxFormElementProps } from "../OnyxFormElement/types";
|
|
5
|
+
import type { Autocomplete } from "../OnyxInput/types";
|
|
6
|
+
export type OnyxStepperProps = DensityProp & CustomValidityProp & Omit<OnyxFormElementProps, "modelValue" | "errorMessages" | "withCounter" | "maxlength"> & AutofocusProp & {
|
|
7
|
+
/**
|
|
8
|
+
* Current value of the input.
|
|
9
|
+
*/
|
|
10
|
+
modelValue?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Same as the native `name` attribute of `<input>`.
|
|
13
|
+
* Used to reference the input in JavaScript or in submitted form data.
|
|
14
|
+
*/
|
|
15
|
+
name?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Placeholder to show when the value is empty.
|
|
18
|
+
*/
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The minimum allowed value.
|
|
22
|
+
*/
|
|
23
|
+
min?: number;
|
|
24
|
+
/**
|
|
25
|
+
* The maximum allowed value.
|
|
26
|
+
*/
|
|
27
|
+
max?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Incremental step.
|
|
30
|
+
*/
|
|
31
|
+
step?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Specify how to provide automated assistance in filling out the input.
|
|
34
|
+
* Some autocomplete values might required specific browser permissions to be allowed by the user.
|
|
35
|
+
* Also browsers might require a `name` property.
|
|
36
|
+
*
|
|
37
|
+
* @see [MDN autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
|
|
38
|
+
*/
|
|
39
|
+
autocomplete?: Autocomplete;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to disable the input and prevent user interaction.
|
|
42
|
+
*/
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the input should be readonly.
|
|
46
|
+
*/
|
|
47
|
+
readonly?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the input is loading. User interaction will be disabled.
|
|
50
|
+
*/
|
|
51
|
+
loading?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Whether to show a skeleton input.
|
|
54
|
+
*/
|
|
55
|
+
skeleton?: boolean;
|
|
56
|
+
};
|
|
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
22
22
|
loading: boolean;
|
|
23
23
|
skeleton: boolean;
|
|
24
24
|
modelValue: boolean;
|
|
25
|
-
truncation: import("
|
|
25
|
+
truncation: import("../..").TruncationType;
|
|
26
26
|
}, {}>;
|
|
27
27
|
export default _default;
|
|
28
28
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -39,7 +39,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
39
39
|
fitParent: boolean;
|
|
40
40
|
open: string;
|
|
41
41
|
}>>>, {
|
|
42
|
-
color: Extract<import("
|
|
42
|
+
color: Extract<import("../..").OnyxColor, "neutral" | "danger">;
|
|
43
43
|
open: import("./types").TooltipOpen;
|
|
44
44
|
position: import("./types").TooltipPosition;
|
|
45
45
|
fitParent: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { DensityProp } from "../../composables/density";
|
|
1
2
|
import type { OnyxColor } from "../../types";
|
|
2
|
-
export type OnyxTooltipProps = {
|
|
3
|
+
export type OnyxTooltipProps = DensityProp & {
|
|
3
4
|
/**
|
|
4
5
|
* Text to display inside the tooltip.
|
|
5
6
|
* Must be set unless the custom "tooltip" slot is used.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { InputType } from "../components/OnyxInput/types";
|
|
2
2
|
import enUS from "../i18n/locales/en-US.json";
|
|
3
|
+
import type { BaseSelectOption } from "../types";
|
|
3
4
|
export type CustomErrorType = string | FormErrorMessages;
|
|
4
5
|
export type CustomValidityProp = {
|
|
5
6
|
/**
|
|
@@ -16,7 +17,10 @@ export type UseCustomValidityOptions = {
|
|
|
16
17
|
type?: InputType;
|
|
17
18
|
maxlength?: number;
|
|
18
19
|
minlength?: number;
|
|
19
|
-
|
|
20
|
+
min?: number;
|
|
21
|
+
max?: number;
|
|
22
|
+
step?: number;
|
|
23
|
+
} & Pick<BaseSelectOption, "hideLabel" | "label">;
|
|
20
24
|
/**
|
|
21
25
|
* Component emit as defined with `const emit = defineEmits()`
|
|
22
26
|
*/
|
|
@@ -77,5 +81,13 @@ export declare const useCustomValidity: (options: UseCustomValidityOptions) => {
|
|
|
77
81
|
vCustomValidity: {
|
|
78
82
|
mounted: (el: InputValidationElement) => void;
|
|
79
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* A custom error or the default translation of the first invalid state if one exists.
|
|
86
|
+
*/
|
|
80
87
|
errorMessages: import("vue").ComputedRef<FormErrorMessages | undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* A combination of a label (if it is hidden) and the error message (if an error exists).
|
|
90
|
+
* Usage e.g. on OnyxRadioButton, OnyxCheckbox, OnyxSwitch where no error message footer exists.
|
|
91
|
+
*/
|
|
92
|
+
title: import("vue").ComputedRef<string | undefined>;
|
|
81
93
|
};
|