sit-onyx 1.0.0-beta.152 → 1.0.0-beta.153
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/OnyxButton/ButtonOrLinkLayout.vue.d.ts +27 -0
- package/dist/components/OnyxButton/types.d.ts +6 -0
- package/dist/components/OnyxIconButton/types.d.ts +2 -2
- package/dist/components/OnyxSystemButton/types.d.ts +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.js +1366 -1336
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { OnyxButtonProps } from "./types";
|
|
2
|
+
type __VLS_Props = Pick<OnyxButtonProps, "disabled" | "link" | "loading" | "type" | "autofocus">;
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: Readonly<{
|
|
6
|
+
/**
|
|
7
|
+
* Button content.
|
|
8
|
+
*/
|
|
9
|
+
default(): unknown;
|
|
10
|
+
}> & {
|
|
11
|
+
/**
|
|
12
|
+
* Button content.
|
|
13
|
+
*/
|
|
14
|
+
default(): unknown;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
rootEl: any;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -2,6 +2,7 @@ import type { DensityProp } from "../../composables/density";
|
|
|
2
2
|
import type { SkeletonInjected } from "../../composables/useSkeletonState";
|
|
3
3
|
import type { AutofocusProp } from "../../types";
|
|
4
4
|
import type { FormInjected } from "../OnyxForm/OnyxForm.core";
|
|
5
|
+
import type { WithLinkProp } from "../OnyxRouterLink/types";
|
|
5
6
|
export type OnyxButtonProps = DensityProp & AutofocusProp & {
|
|
6
7
|
/**
|
|
7
8
|
* The text content of the button.
|
|
@@ -35,6 +36,11 @@ export type OnyxButtonProps = DensityProp & AutofocusProp & {
|
|
|
35
36
|
* Whether to show a skeleton button.
|
|
36
37
|
*/
|
|
37
38
|
skeleton?: SkeletonInjected;
|
|
39
|
+
/**
|
|
40
|
+
* If set, the button will be rendered as link.
|
|
41
|
+
* Note that not all button properties are supported when used as link, e.g. `disabled`, `type` and `autofocus` are not supported.
|
|
42
|
+
*/
|
|
43
|
+
link?: WithLinkProp["link"];
|
|
38
44
|
};
|
|
39
45
|
export declare const BUTTON_TYPES: readonly ["button", "submit", "reset"];
|
|
40
46
|
export type ButtonType = (typeof BUTTON_TYPES)[number];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { DensityProp } from "../../composables/density";
|
|
2
2
|
import type { SkeletonInjected } from "../../composables/useSkeletonState";
|
|
3
3
|
import type { AutofocusProp } from "../../types";
|
|
4
|
-
import type { ButtonColor, ButtonType } from "../OnyxButton/types";
|
|
4
|
+
import type { ButtonColor, ButtonType, OnyxButtonProps } from "../OnyxButton/types";
|
|
5
5
|
import type { FormInjected } from "../OnyxForm/OnyxForm.core";
|
|
6
|
-
export type OnyxIconButtonProps = DensityProp & AutofocusProp & {
|
|
6
|
+
export type OnyxIconButtonProps = DensityProp & AutofocusProp & Pick<OnyxButtonProps, "link"> & {
|
|
7
7
|
/**
|
|
8
8
|
* The aria-label of the button.
|
|
9
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OnyxButtonProps } from "../OnyxButton/types";
|
|
2
|
-
export type OnyxSystemButtonProps = Pick<OnyxButtonProps, "disabled" | "autofocus" | "skeleton"> & {
|
|
2
|
+
export type OnyxSystemButtonProps = Pick<OnyxButtonProps, "disabled" | "autofocus" | "skeleton" | "link"> & {
|
|
3
3
|
/**
|
|
4
4
|
* Button label / text to show. Is always required (even if `icon` is set) for screen readers / accessibility.
|
|
5
5
|
*/
|