+ "text": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics)."
+ },
+ "attribute": "color",
+ "reflect": true
+ },
+ "activated": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the fab button will be show a close icon."
+ },
+ "attribute": "activated",
+ "reflect": false,
+ "defaultValue": "false"
+ },
+ "disabled": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the user cannot interact with the fab button."
+ },
+ "attribute": "disabled",
+ "reflect": false,
+ "defaultValue": "false"
+ },
+ "download": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string | undefined",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "This attribute instructs browsers to download a URL instead of navigating to\nit, so the user will be prompted to save it as a local file. If the attribute\nhas a value, it is used as the pre-filled file name in the Save prompt\n(the user can still change the file name if they want)."
+ },
+ "attribute": "download",
+ "reflect": false
+ },
+ "href": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string | undefined",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "Contains a URL or a URL fragment that the hyperlink points to.\nIf this property is set, an anchor tag will be rendered."
+ },
+ "attribute": "href",
+ "reflect": false
+ },
+ "rel": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string | undefined",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
+ "text": "When using a router, it specifies the transition animation when navigating to\nanother page using `href`."
+ }
+ },
+ "target": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string | undefined",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided.\nSpecial keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`."
+ },
+ "attribute": "target",
+ "reflect": false
+ },
+ "show": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the fab button will show when in a fab-list."
+ },
+ "attribute": "show",
+ "reflect": false,
+ "defaultValue": "false"
+ },
+ "translucent": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the fab button will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility)."
+ "text": "The size of the button. Set this to `small` in order to have a mini fab button."
+ },
+ "attribute": "size",
+ "reflect": false
+ },
+ "closeIcon": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "The icon name to use for the close icon. This will appear when the fab button\nis pressed. Only applies if it is the main button inside of a fab containing a\nfab list."
+ "text": "Where to align the fab vertically in the viewport."
+ },
+ "attribute": "vertical",
+ "reflect": false
+ },
+ "edge": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the fab will display on the edge of the header if\n`vertical` is `\"top\"`, and on the edge of the footer if\nit is `\"bottom\"`. Should be used with a `fixed` slot."
+ },
+ "attribute": "edge",
+ "reflect": false,
+ "defaultValue": "false"
+ },
+ "activated": {
+ "type": "boolean",
+ "mutable": true,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, both the `ion-fab-button` and all `ion-fab-list` inside `ion-fab` will become active.\nThat means `ion-fab-button` will become a `close` icon and `ion-fab-list` will become visible."
+ "text": "Describes the scroll effect that will be applied to the footer.\nOnly applies in iOS mode."
+ },
+ "attribute": "collapse",
+ "reflect": false
+ },
+ "translucent": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the footer will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).\n\nNote: In order to scroll content behind the footer, the `fullscreen`\nattribute needs to be set on the content."
+ "text": "Describes the scroll effect that will be applied to the header.\nOnly applies in iOS mode.\n\nTypically used for [Collapsible Large Titles](https://ionicframework.com/docs/api/title#collapsible-large-titles)"
+ },
+ "attribute": "collapse",
+ "reflect": false
+ },
+ "translucent": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the header will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).\n\nNote: In order to scroll content behind the header, the `fullscreen`\nattribute needs to be set on the content."
+ "text": "This attribute defines the alternative text describing the image.\nUsers will see this text displayed if the image URL is wrong,\nthe image is not in one of the supported formats, or if the image is not yet downloaded."
+ },
+ "attribute": "alt",
+ "reflect": false
+ },
+ "src": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "The image URL. This attribute is mandatory for the `<img>` element."
+ },
+ "attribute": "src",
+ "reflect": false
+ }
+ };
+ }
+ static get states() {
+ return {
+ "loadSrc": {},
+ "loadError": {}
+ };
+ }
+ static get events() {
+ return [{
+ "method": "ionImgWillLoad",
+ "name": "ionImgWillLoad",
+ "bubbles": true,
+ "cancelable": true,
+ "composed": true,
+ "docs": {
+ "tags": [],
+ "text": "Emitted when the img src has been set"
+ },
+ "complexType": {
+ "original": "void",
+ "resolved": "void",
+ "references": {}
+ }
+ }, {
+ "method": "ionImgDidLoad",
+ "name": "ionImgDidLoad",
+ "bubbles": true,
+ "cancelable": true,
+ "composed": true,
+ "docs": {
+ "tags": [],
+ "text": "Emitted when the image has finished loading"
+ },
+ "complexType": {
+ "original": "void",
+ "resolved": "void",
+ "references": {}
+ }
+ }, {
+ "method": "ionError",
+ "name": "ionError",
+ "bubbles": true,
+ "cancelable": true,
+ "composed": true,
+ "docs": {
+ "tags": [],
+ "text": "Emitted when the img fails to load"
+ },
+ "complexType": {
+ "original": "void",
+ "resolved": "void",
+ "references": {}
+ }
+ }];
+ }
+ static get elementRef() { return "el"; }
+ static get watchers() {
+ return [{
+ "propName": "src",
+ "methodName": "srcChanged"
+ }];
+ }
+}
+/**
+ * Enumerated strings must be set as booleans
+ * as Stencil will not render 'false' in the DOM.
+ * The need to explicitly render draggable="true"
+ * as only certain elements are draggable by default.
+ "text": "Optional text to display while loading.\n`loadingText` can accept either plaintext or HTML as a string.\nTo display characters normally reserved for HTML, they\nmust be escaped. For example `<Ionic>` would become\n`<Ionic>`\n\nFor more information: [Security Documentation](https://ionicframework.com/docs/faq/security)\n\nThis property accepts custom HTML as a string.\nContent is parsed as plaintext by default.\n`innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config\nbefore custom HTML can be used."
+ static get is() { return "ion-infinite-scroll"; }
+ static get originalStyleUrls() {
+ return {
+ "$": ["infinite-scroll.scss"]
+ };
+ }
+ static get styleUrls() {
+ return {
+ "$": ["infinite-scroll.css"]
+ };
+ }
+ static get properties() {
+ return {
+ "threshold": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "The threshold distance from the bottom\nof the content to call the `infinite` output event when scrolled.\nThe threshold value can be either a percent, or\nin pixels. For example, use the value of `10%` for the `infinite`\noutput event to get called when the user has scrolled 10%\nfrom the bottom of the page. Use the value `100px` when the\nscroll is within 100 pixels from the bottom of the page."
+ },
+ "attribute": "threshold",
+ "reflect": false,
+ "defaultValue": "'15%'"
+ },
+ "disabled": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the infinite scroll will be hidden and scroll event listeners\nwill be removed.\n\nSet this to true to disable the infinite scroll from actively\ntrying to receive new data while scrolling. This is useful\nwhen it is known that there is no more data that can be added, and\nthe infinite scroll is no longer needed."
+ },
+ "attribute": "disabled",
+ "reflect": false,
+ "defaultValue": "false"
+ },
+ "position": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "'top' | 'bottom'",
+ "resolved": "\"bottom\" | \"top\"",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "The position of the infinite scroll element.\nThe value can be either `top` or `bottom`."
+ },
+ "attribute": "position",
+ "reflect": false,
+ "defaultValue": "'bottom'"
+ }
+ };
+ }
+ static get states() {
+ return {
+ "isLoading": {}
+ };
+ }
+ static get events() {
+ return [{
+ "method": "ionInfinite",
+ "name": "ionInfinite",
+ "bubbles": true,
+ "cancelable": true,
+ "composed": true,
+ "docs": {
+ "tags": [],
+ "text": "Emitted when the scroll reaches\nthe threshold distance. From within your infinite handler,\nyou must call the infinite scroll's `complete()` method when\nyour async operation has completed."
+ },
+ "complexType": {
+ "original": "void",
+ "resolved": "void",
+ "references": {}
+ }
+ }];
+ }
+ static get methods() {
+ return {
+ "complete": {
+ "complexType": {
+ "signature": "() => Promise<void>",
+ "parameters": [],
+ "references": {
+ "Promise": {
+ "location": "global",
+ "id": "global::Promise"
+ }
+ },
+ "return": "Promise<void>"
+ },
+ "docs": {
+ "text": "Call `complete()` within the `ionInfinite` output event handler when\nyour async operation has completed. For example, the `loading`\nstate is while the app is performing an asynchronous operation,\nsuch as receiving more data from an AJAX request to add more items\nto a data list. Once the data has been received and UI updated, you\nthen call this method to signify that the loading has completed.\nThis method will change the infinite scroll's state from `loading`\nto `enabled`.",
+ * Whenever the input type changes we need to re-run validation to ensure the password
+ * toggle is being used with the correct input type. If the application changes the type
+ * outside of this component we also need to re-render so the correct icon is shown.
+ */
+ onTypeChange(newValue) {
+ if (newValue !== 'text' && newValue !== 'password') {
+ printIonWarning(`ion-input-password-toggle only supports inputs of type "text" or "password". Input of type "${newValue}" is not compatible.`, this.el);
+ "text": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics)."
+ },
+ "attribute": "color",
+ "reflect": true
+ },
+ "showIcon": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "The icon that can be used to represent showing a password. If not set, the \"eye\" Ionicon will be used."
+ },
+ "attribute": "show-icon",
+ "reflect": false
+ },
+ "hideIcon": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "The icon that can be used to represent hiding a password. If not set, the \"eyeOff\" Ionicon will be used."
+ * Fonts that participate in Dynamic Type should use
+ * dynamic font sizes.
+ * @param size - The initial font size including the unit (i.e. px or pt)
+ * @param unit (optional) - The unit to convert to. Use this if you want to
+ * convert to a unit other than $baselineUnit.
+ */
+/**
+ * Convert a font size to a dynamic font size but impose
+ * a maximum font size.
+ * @param size - The initial font size including the unit (i.e. px or pt)
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
+ * convert to a unit other than $baselineUnit.
+ */
+/**
+ * Convert a font size to a dynamic font size but impose
+ * a minimum font size.
+ * @param size - The initial font size including the unit (i.e. px or pt)
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
+ * convert to a unit other than $baselineUnit.
+ */
+/**
+ * Convert a font size to a dynamic font size but impose
+ * maximum and minimum font sizes.
+ * @param size - The initial font size including the unit (i.e. px or pt)
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
+ * convert to a unit other than $baselineUnit.
+ */
+/**
+ * A heuristic that applies CSS to tablet
+ * viewports.
+ *
+ * Usage:
+ * @include tablet-viewport() {
+ * :host {
+ * background-color: green;
+ * }
+ * }
+ */
+/**
+ * A heuristic that applies CSS to mobile
+ * viewports (i.e. phones, not tablets).
+ *
+ * Usage:
+ * @include mobile-viewport() {
+ * :host {
+ * background-color: blue;
+ * }
+ * }
+ */
+:host {
+ /**
+ * @prop --background: Background of the input
+ *
+ * @prop --color: Color of the input text
+ *
+ * @prop --padding-top: Top padding of the input
+ * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the input
+ * @prop --padding-bottom: Bottom padding of the input
+ * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the input
+ *
+ * @prop --placeholder-color: Color of the input placeholder text
+ * @prop --placeholder-font-style: Font style of the input placeholder text
+ * @prop --placeholder-font-weight: Font weight of the input placeholder text
+ * @prop --placeholder-opacity: Opacity of the input placeholder text
+ *
+ * @prop --highlight-height: The height of the highlight on the input. Only applies to md mode.
+ * @prop --highlight-color-focused: The color of the highlight on the input when focused
+ * @prop --highlight-color-valid: The color of the highlight on the input when valid
+ * @prop --highlight-color-invalid: The color of the highlight on the input when invalid
+ *
+ * @prop --border-color: Color of the border below the input when using helper text, error text, or counter
+ * @prop --border-radius: Radius of the input. A large radius may display unevenly when using fill="outline"; if needed, use shape="round" instead or increase --padding-start.
+ * @prop --border-style: Style of the border below the input when using helper text, error text, or counter
+ * @prop --border-width: Width of the border below the input when using helper text, error text, or counter
+ * (C) Ionic http://ionicframework.com - MIT License
+ */
+import { Build, Host, forceUpdate, h } from "@stencil/core";
+import { createNotchController } from "../../utils/forms/index";
+import { inheritAriaAttributes, debounceEvent, inheritAttributes, componentOnReady } from "../../utils/helpers";
+import { createSlotMutationController } from "../../utils/slot-mutation-controller";
+import { createColorClasses, hostContext } from "../../utils/theme";
+import { closeCircle, closeSharp } from "ionicons/icons";
+import { getIonMode } from "../../global/ionic-global";
+import { getCounterText } from "./input.utils";
+/**
+ * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
+ *
+ * @slot label - The label text to associate with the input. Use the `labelPlacement` property to control where the label is placed relative to the input. Use this if you need to render a label with custom HTML. (EXPERIMENTAL)
+ * @slot start - Content to display at the leading edge of the input. (EXPERIMENTAL)
+ * @slot end - Content to display at the trailing edge of the input. (EXPERIMENTAL)
+ */
+export class Input {
+ constructor() {
+ this.inputId = `ion-input-${inputIds++}`;
+ this.inheritedAttributes = {};
+ this.isComposing = false;
+ /**
+ * `true` if the input was cleared as a result of the user typing
+ * with `clearOnEdit` enabled.
+ *
+ * Resets when the input loses focus.
+ */
+ this.didInputClearOnEdit = false;
+ this.onInput = (ev) => {
+ const input = ev.target;
+ if (input) {
+ this.value = input.value || '';
+ }
+ this.emitInputChange(ev);
+ };
+ this.onChange = (ev) => {
+ this.emitValueChange(ev);
+ };
+ this.onBlur = (ev) => {
+ this.hasFocus = false;
+ if (this.focusedValue !== this.value) {
+ /**
+ * Emits the `ionChange` event when the input value
+ * is different than the value when the input was focused.
+ */
+ this.emitValueChange(ev);
+ }
+ this.didInputClearOnEdit = false;
+ this.ionBlur.emit(ev);
+ };
+ this.onFocus = (ev) => {
+ this.hasFocus = true;
+ this.focusedValue = this.value;
+ this.ionFocus.emit(ev);
+ };
+ this.onKeydown = (ev) => {
+ this.checkClearOnEdit(ev);
+ };
+ this.onCompositionStart = () => {
+ this.isComposing = true;
+ };
+ this.onCompositionEnd = () => {
+ this.isComposing = false;
+ };
+ this.clearTextInput = (ev) => {
+ if (this.clearInput && !this.readonly && !this.disabled && ev) {
+ ev.preventDefault();
+ ev.stopPropagation();
+ // Attempt to focus input again after pressing clear button
+ "text": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics)."
+ },
+ "attribute": "color",
+ "reflect": true
+ },
+ "autocapitalize": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\nAvailable options: `\"off\"`, `\"none\"`, `\"on\"`, `\"sentences\"`, `\"words\"`, `\"characters\"`."
+ "text": "Indicates whether the value of the control can be automatically completed by the browser."
+ },
+ "attribute": "autocomplete",
+ "reflect": false,
+ "defaultValue": "'off'"
+ },
+ "autocorrect": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "'on' | 'off'",
+ "resolved": "\"off\" | \"on\"",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "Whether auto correction should be enabled when the user is entering/editing the text value."
+ },
+ "attribute": "autocorrect",
+ "reflect": false,
+ "defaultValue": "'off'"
+ },
+ "autofocus": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "Sets the [`autofocus` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) on the native input element.\n\nThis may not be sufficient for the element to be focused on page load. See [managing focus](/docs/developing/managing-focus) for more information."
+ },
+ "attribute": "autofocus",
+ "reflect": false,
+ "defaultValue": "false"
+ },
+ "clearInput": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input."
+ },
+ "attribute": "clear-input",
+ "reflect": false,
+ "defaultValue": "false"
+ },
+ "clearInputIcon": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "The icon to use for the clear button. Only applies when `clearInput` is set to `true`."
+ },
+ "attribute": "clear-input-icon",
+ "reflect": false
+ },
+ "clearOnEdit": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types."
+ },
+ "attribute": "clear-on-edit",
+ "reflect": false
+ },
+ "counter": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, a character counter will display the ratio of characters used and the total character limit. Developers must also set the `maxlength` property for the counter to be calculated correctly."
+ "text": "A callback used to format the counter text.\nBy default the counter text is set to \"itemLength / maxLength\".\n\nSee https://ionicframework.com/docs/troubleshooting/runtime#accessing-this\nif you need to access `this` from within the callback."
+ }
+ },
+ "debounce": {
+ "type": "number",
+ "mutable": false,
+ "complexType": {
+ "original": "number",
+ "resolved": "number | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "Set the amount of time, in milliseconds, to wait to trigger the `ionInput` event after each keystroke."
+ },
+ "attribute": "debounce",
+ "reflect": false
+ },
+ "disabled": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the user cannot interact with the input."
+ "text": "A hint to the browser for which enter key to display.\nPossible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n`\"previous\"`, `\"search\"`, and `\"send\"`."
+ },
+ "attribute": "enterkeyhint",
+ "reflect": false
+ },
+ "errorText": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "Text that is placed under the input and displayed when an error is detected."
+ "text": "The fill for the item. If `\"solid\"` the item will have a background. If\n`\"outline\"` the item will be transparent with a border. Only available in `md` mode."
+ "text": "A hint to the browser for which keyboard to display.\nPossible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n`\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`."
+ },
+ "attribute": "inputmode",
+ "reflect": false
+ },
+ "helperText": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "Text that is placed under the input and displayed when no error is detected."
+ },
+ "attribute": "helper-text",
+ "reflect": false
+ },
+ "label": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "The visible label associated with the input.\n\nUse this if you need to render a plaintext label.\n\nThe `label` property will take priority over the `label` slot if both are used."
+ "text": "Where to place the label relative to the input.\n`\"start\"`: The label will appear to the left of the input in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the input in LTR and to the left in RTL.\n`\"floating\"`: The label will appear smaller and above the input when the input is focused or it has a value. Otherwise it will appear on top of the input.\n`\"stacked\"`: The label will appear smaller and above the input regardless even when the input is blurred or has no value.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\")."
+ },
+ "attribute": "label-placement",
+ "reflect": false,
+ "defaultValue": "'start'"
+ },
+ "max": {
+ "type": "any",
+ "mutable": false,
+ "complexType": {
+ "original": "string | number",
+ "resolved": "number | string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "The maximum value, which must not be less than its minimum (min attribute) value."
+ },
+ "attribute": "max",
+ "reflect": false
+ },
+ "maxlength": {
+ "type": "number",
+ "mutable": false,
+ "complexType": {
+ "original": "number",
+ "resolved": "number | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter."
+ },
+ "attribute": "maxlength",
+ "reflect": false
+ },
+ "min": {
+ "type": "any",
+ "mutable": false,
+ "complexType": {
+ "original": "string | number",
+ "resolved": "number | string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "The minimum value, which must not be greater than its maximum (max attribute) value."
+ },
+ "attribute": "min",
+ "reflect": false
+ },
+ "minlength": {
+ "type": "number",
+ "mutable": false,
+ "complexType": {
+ "original": "number",
+ "resolved": "number | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter."
+ },
+ "attribute": "minlength",
+ "reflect": false
+ },
+ "multiple": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"`, otherwise it is ignored."
+ },
+ "attribute": "multiple",
+ "reflect": false
+ },
+ "name": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "The name of the control, which is submitted with the form data."
+ },
+ "attribute": "name",
+ "reflect": false,
+ "defaultValue": "this.inputId"
+ },
+ "pattern": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, `\"date\"`, or `\"password\"`, otherwise it is ignored. When the type attribute is `\"date\"`, `pattern` will only be used in browsers that do not support the `\"date\"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for more information."
+ },
+ "attribute": "pattern",
+ "reflect": false
+ },
+ "placeholder": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "Instructional text that shows before the input has a value.\nThis property applies only when the `type` property is set to `\"email\"`,\n`\"number\"`, `\"password\"`, `\"search\"`, `\"tel\"`, `\"text\"`, or `\"url\"`, otherwise it is ignored."
+ },
+ "attribute": "placeholder",
+ "reflect": false
+ },
+ "readonly": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the user cannot modify the value."
+ },
+ "attribute": "readonly",
+ "reflect": true,
+ "defaultValue": "false"
+ },
+ "required": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the user must fill in a value before submitting a form."
+ },
+ "attribute": "required",
+ "reflect": false,
+ "defaultValue": "false"
+ },
+ "shape": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "'round'",
+ "resolved": "\"round\" | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "The shape of the input. If \"round\" it will have an increased border radius."
+ },
+ "attribute": "shape",
+ "reflect": false
+ },
+ "spellcheck": {
+ "type": "boolean",
+ "mutable": false,
+ "complexType": {
+ "original": "boolean",
+ "resolved": "boolean",
+ "references": {}
+ },
+ "required": false,
+ "optional": false,
+ "docs": {
+ "tags": [],
+ "text": "If `true`, the element will have its spelling and grammar checked."
+ },
+ "attribute": "spellcheck",
+ "reflect": false,
+ "defaultValue": "false"
+ },
+ "step": {
+ "type": "string",
+ "mutable": false,
+ "complexType": {
+ "original": "string",
+ "resolved": "string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "Works with the min and max attributes to limit the increments at which a value can be set.\nPossible values are: `\"any\"` or a positive floating point number."
+ "text": "The type of control to display. The default type is text."
+ },
+ "attribute": "type",
+ "reflect": false,
+ "defaultValue": "'text'"
+ },
+ "value": {
+ "type": "any",
+ "mutable": true,
+ "complexType": {
+ "original": "string | number | null",
+ "resolved": "null | number | string | undefined",
+ "references": {}
+ },
+ "required": false,
+ "optional": true,
+ "docs": {
+ "tags": [],
+ "text": "The value of the input."
+ },
+ "attribute": "value",
+ "reflect": false,
+ "defaultValue": "''"
+ }
+ };
+ }
+ static get states() {
+ return {
+ "hasFocus": {}
+ };
+ }
+ static get events() {
+ return [{
+ "method": "ionInput",
+ "name": "ionInput",
+ "bubbles": true,
+ "cancelable": true,
+ "composed": true,
+ "docs": {
+ "tags": [],
+ "text": "The `ionInput` event is fired each time the user modifies the input's value.\nUnlike the `ionChange` event, the `ionInput` event is fired for each alteration\nto the input's value. This typically happens for each keystroke as the user types.\n\nFor elements that accept text input (`type=text`, `type=tel`, etc.), the interface\nis [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,\nthe interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If\nthe input is cleared on edit, the type is `null`."
+ "text": "The `ionChange` event is fired when the user modifies the input's value.\nUnlike the `ionInput` event, the `ionChange` event is only fired when changes\nare committed, not as the user types.\n\nDepending on the way the users interacts with the element, the `ionChange`\nevent fires at a different moment:\n- When the user commits the change explicitly (e.g. by selecting a date\nfrom a date picker for `<ion-input type=\"date\">`, pressing the \"Enter\" key, etc.).\n- When the element loses focus after its value has changed: for elements\nwhere the user's interaction is typing.\n\nThis event will not emit when programmatically setting the `value` property."
+ "text": "Sets focus on the native `input` in `ion-input`. Use this method instead of the global\n`input.focus()`.\n\nDevelopers who wish to focus an input when a page enters\nshould call `setFocus()` in the `ionViewDidEnter()` lifecycle method.\n\nDevelopers who wish to focus an input when an overlay is presented\nshould call `setFocus` after `didPresent` has resolved.\n\nSee [managing focus](/docs/developing/managing-focus) for more information.",
+ "tags": []
+ }
+ },
+ "getInputElement": {
+ "complexType": {
+ "signature": "() => Promise<HTMLInputElement>",
+ "parameters": [],
+ "references": {
+ "Promise": {
+ "location": "global",
+ "id": "global::Promise"
+ },
+ "HTMLInputElement": {
+ "location": "global",
+ "id": "global::HTMLInputElement"
+ }
+ },
+ "return": "Promise<HTMLInputElement>"
+ },
+ "docs": {
+ "text": "Returns the native `<input>` element used under the hood.",
+ * Fonts that participate in Dynamic Type should use
+ * dynamic font sizes.
+ * @param size - The initial font size including the unit (i.e. px or pt)
+ * @param unit (optional) - The unit to convert to. Use this if you want to
+ * convert to a unit other than $baselineUnit.
+ */
+/**
+ * Convert a font size to a dynamic font size but impose
+ * a maximum font size.
+ * @param size - The initial font size including the unit (i.e. px or pt)
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
+ * convert to a unit other than $baselineUnit.
+ */
+/**
+ * Convert a font size to a dynamic font size but impose
+ * a minimum font size.
+ * @param size - The initial font size including the unit (i.e. px or pt)
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
+ * convert to a unit other than $baselineUnit.
+ */
+/**
+ * Convert a font size to a dynamic font size but impose
+ * maximum and minimum font sizes.
+ * @param size - The initial font size including the unit (i.e. px or pt)
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
+ * convert to a unit other than $baselineUnit.
+ */
+/**
+ * A heuristic that applies CSS to tablet
+ * viewports.
+ *
+ * Usage:
+ * @include tablet-viewport() {
+ * :host {
+ * background-color: green;
+ * }
+ * }
+ */
+/**
+ * A heuristic that applies CSS to mobile
+ * viewports (i.e. phones, not tablets).
+ *
+ * Usage:
+ * @include mobile-viewport() {
+ * :host {
+ * background-color: blue;
+ * }
+ * }
+ */
+:host {
+ /**
+ * @prop --background: Background of the input
+ *
+ * @prop --color: Color of the input text
+ *
+ * @prop --padding-top: Top padding of the input
+ * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the input
+ * @prop --padding-bottom: Bottom padding of the input
+ * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the input
+ *
+ * @prop --placeholder-color: Color of the input placeholder text
+ * @prop --placeholder-font-style: Font style of the input placeholder text
+ * @prop --placeholder-font-weight: Font weight of the input placeholder text
+ * @prop --placeholder-opacity: Opacity of the input placeholder text
+ *
+ * @prop --highlight-height: The height of the highlight on the input. Only applies to md mode.
+ * @prop --highlight-color-focused: The color of the highlight on the input when focused
+ * @prop --highlight-color-valid: The color of the highlight on the input when valid
+ * @prop --highlight-color-invalid: The color of the highlight on the input when invalid
+ *
+ * @prop --border-color: Color of the border below the input when using helper text, error text, or counter
+ * @prop --border-radius: Radius of the input. A large radius may display unevenly when using fill="outline"; if needed, use shape="round" instead or increase --padding-start.
+ * @prop --border-style: Style of the border below the input when using helper text, error text, or counter
+ * @prop --border-width: Width of the border below the input when using helper text, error text, or counter