UNPKG

3.83 kBTypeScriptView Raw
1import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
2import { AnimationBuilder, Color, RouterDirection } from '../../interface';
3import { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
4/**
5 * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
6 *
7 * @slot - Content is placed between the named slots if provided without a slot.
8 * @slot icon-only - Should be used on an icon in a button that has no text.
9 * @slot start - Content is placed to the left of the button text in LTR, and to the right in RTL.
10 * @slot end - Content is placed to the right of the button text in LTR, and to the left in RTL.
11 *
12 * @part native - The native HTML button or anchor element that wraps all child elements.
13 */
14export declare class Button implements ComponentInterface, AnchorInterface, ButtonInterface {
15 private inItem;
16 private inListHeader;
17 private inToolbar;
18 private inheritedAttributes;
19 el: HTMLElement;
20 /**
21 * The color to use from your application's color palette.
22 * Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
23 * For more information on colors, see [theming](/docs/theming/basics).
24 */
25 color?: Color;
26 /**
27 * The type of button.
28 */
29 buttonType: string;
30 /**
31 * If `true`, the user cannot interact with the button.
32 */
33 disabled: boolean;
34 /**
35 * Set to `"block"` for a full-width button or to `"full"` for a full-width button
36 * without left and right borders.
37 */
38 expand?: 'full' | 'block';
39 /**
40 * Set to `"clear"` for a transparent button, to `"outline"` for a transparent
41 * button with a border, or to `"solid"`. The default style is `"solid"` except inside of
42 * a toolbar, where the default is `"clear"`.
43 */
44 fill?: 'clear' | 'outline' | 'solid' | 'default';
45 /**
46 * When using a router, it specifies the transition direction when navigating to
47 * another page using `href`.
48 */
49 routerDirection: RouterDirection;
50 /**
51 * When using a router, it specifies the transition animation when navigating to
52 * another page using `href`.
53 */
54 routerAnimation: AnimationBuilder | undefined;
55 /**
56 * This attribute instructs browsers to download a URL instead of navigating to
57 * it, so the user will be prompted to save it as a local file. If the attribute
58 * has a value, it is used as the pre-filled file name in the Save prompt
59 * (the user can still change the file name if they want).
60 */
61 download: string | undefined;
62 /**
63 * Contains a URL or a URL fragment that the hyperlink points to.
64 * If this property is set, an anchor tag will be rendered.
65 */
66 href: string | undefined;
67 /**
68 * Specifies the relationship of the target object to the link object.
69 * The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
70 */
71 rel: string | undefined;
72 /**
73 * The button shape.
74 */
75 shape?: 'round';
76 /**
77 * The button size.
78 */
79 size?: 'small' | 'default' | 'large';
80 /**
81 * If `true`, activates a button with a heavier font weight.
82 */
83 strong: boolean;
84 /**
85 * Specifies where to display the linked URL.
86 * Only applies when an `href` is provided.
87 * Special keywords: `"_blank"`, `"_self"`, `"_parent"`, `"_top"`.
88 */
89 target: string | undefined;
90 /**
91 * The type of the button.
92 */
93 type: 'submit' | 'reset' | 'button';
94 /**
95 * Emitted when the button has focus.
96 */
97 ionFocus: EventEmitter<void>;
98 /**
99 * Emitted when the button loses focus.
100 */
101 ionBlur: EventEmitter<void>;
102 componentWillLoad(): void;
103 private get hasIconOnly();
104 private get rippleType();
105 private handleClick;
106 private onFocus;
107 private onBlur;
108 render(): any;
109}