@synergy-design-system/vue
Version:
Vue3 wrappers for the Synergy Design System
210 lines (209 loc) • 7.42 kB
TypeScript
import { SynBlurEvent, SynFocusEvent, SynInvalidEvent, SynButton } from '@synergy-design-system/components';
export type { SynBlurEvent } from '@synergy-design-system/components';
export type { SynFocusEvent } from '@synergy-design-system/components';
export type { SynInvalidEvent } from '@synergy-design-system/components';
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
title?: SynButton["title"];
/**
* The button's theme variant.
*/
variant?: SynButton["variant"];
/**
* The button's size.
*/
size?: SynButton["size"];
/**
* Draws the button with a caret.
* Used to indicate that the button triggers a dropdown menu or similar behavior.
*/
caret?: SynButton["caret"];
/**
* Disables the button.
*/
disabled?: SynButton["disabled"];
/**
* Draws the button in a loading state.
*/
loading?: SynButton["loading"];
/**
* The type of button.
* Note that the default value is `button` instead of `submit`, which is opposite of how native
`<button>` elements behave.
* When the type is `submit`, the button will submit the surrounding form.
*/
type?: SynButton["type"];
/**
* The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.
This attribute is ignored when `href` is present.
*/
name?: SynButton["name"];
/**
* The value of the button, submitted as a pair with the button's name as part of the form data, but only when this
button is the submitter.
* This attribute is ignored when `href` is present.
*/
value?: SynButton["value"];
/**
* When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.
*/
href?: SynButton["href"];
/**
* Tells the browser where to open the link.
* Only used when `href` is present.
*/
target?: SynButton["target"];
/**
* When using `href`, this attribute will map to the underlying link's `rel` attribute.
* Unlike regular links, the
default is `noreferrer noopener` to prevent security exploits.
* However, if you're using `target` to point to a
specific tab/window, this will prevent that from working correctly.
* You can remove or change the default value by
setting the attribute to an empty string or a value of your choice, respectively.
*/
rel?: SynButton["rel"];
/**
* Tells the browser to download the linked file as this filename.
* Only used when `href` is present.
*/
download?: SynButton["download"];
/**
* The "form owner" to associate the button with.
* If omitted, the closest containing form will be used instead.
* The
value of this attribute must be an id of a form in the same document or shadow root as the button.
*/
form?: SynButton["form"];
/**
* Used to override the form owner's `action` attribute.
*/
formAction?: SynButton["formAction"];
/**
* Used to override the form owner's `enctype` attribute.
*/
formEnctype?: SynButton["formEnctype"];
/**
* Used to override the form owner's `method` attribute.
*/
formMethod?: SynButton["formMethod"];
/**
* Used to override the form owner's `novalidate` attribute.
*/
formNoValidate?: SynButton["formNoValidate"];
/**
* Used to override the form owner's `target` attribute.
*/
formTarget?: SynButton["formTarget"];
}, {
nativeElement: import('vue').Ref<SynButton | undefined, SynButton | undefined>;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
"syn-blur": (e: SynBlurEvent) => any;
"syn-focus": (e: SynFocusEvent) => any;
"syn-invalid": (e: SynInvalidEvent) => any;
}, string, import('vue').PublicProps, Readonly<{
title?: SynButton["title"];
/**
* The button's theme variant.
*/
variant?: SynButton["variant"];
/**
* The button's size.
*/
size?: SynButton["size"];
/**
* Draws the button with a caret.
* Used to indicate that the button triggers a dropdown menu or similar behavior.
*/
caret?: SynButton["caret"];
/**
* Disables the button.
*/
disabled?: SynButton["disabled"];
/**
* Draws the button in a loading state.
*/
loading?: SynButton["loading"];
/**
* The type of button.
* Note that the default value is `button` instead of `submit`, which is opposite of how native
`<button>` elements behave.
* When the type is `submit`, the button will submit the surrounding form.
*/
type?: SynButton["type"];
/**
* The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.
This attribute is ignored when `href` is present.
*/
name?: SynButton["name"];
/**
* The value of the button, submitted as a pair with the button's name as part of the form data, but only when this
button is the submitter.
* This attribute is ignored when `href` is present.
*/
value?: SynButton["value"];
/**
* When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.
*/
href?: SynButton["href"];
/**
* Tells the browser where to open the link.
* Only used when `href` is present.
*/
target?: SynButton["target"];
/**
* When using `href`, this attribute will map to the underlying link's `rel` attribute.
* Unlike regular links, the
default is `noreferrer noopener` to prevent security exploits.
* However, if you're using `target` to point to a
specific tab/window, this will prevent that from working correctly.
* You can remove or change the default value by
setting the attribute to an empty string or a value of your choice, respectively.
*/
rel?: SynButton["rel"];
/**
* Tells the browser to download the linked file as this filename.
* Only used when `href` is present.
*/
download?: SynButton["download"];
/**
* The "form owner" to associate the button with.
* If omitted, the closest containing form will be used instead.
* The
value of this attribute must be an id of a form in the same document or shadow root as the button.
*/
form?: SynButton["form"];
/**
* Used to override the form owner's `action` attribute.
*/
formAction?: SynButton["formAction"];
/**
* Used to override the form owner's `enctype` attribute.
*/
formEnctype?: SynButton["formEnctype"];
/**
* Used to override the form owner's `method` attribute.
*/
formMethod?: SynButton["formMethod"];
/**
* Used to override the form owner's `novalidate` attribute.
*/
formNoValidate?: SynButton["formNoValidate"];
/**
* Used to override the form owner's `target` attribute.
*/
formTarget?: SynButton["formTarget"];
}> & Readonly<{
"onSyn-blur"?: ((e: SynBlurEvent) => any) | undefined;
"onSyn-focus"?: ((e: SynFocusEvent) => any) | undefined;
"onSyn-invalid"?: ((e: SynInvalidEvent) => any) | undefined;
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
nativeElement: unknown;
}, any>, {
default?(_: {}): any;
}>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};