{
  "timestamp": "2026-11-19T09:33:56",
  "compiler": {
    "name": "@stencil/core",
    "version": "4.45.4",
    "typescriptVersion": "5.8.3"
  },
  "storybook": "https://magma-design-system.github.io/magma/storybook/",
  "studio": "https://magma-design-system.github.io/magma/studio/",
  "components": [
    {
      "filePath": "src/components/mds-input/mds-input.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input",
      "docs": "This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
      "docsTags": [
        {
          "name": "part",
          "text": "color-picker-button - Selects the button that opens the colour picker of a `color` field"
        },
        {
          "name": "part",
          "text": "counter-button-decrease - Selects the button used to decrease the input value"
        },
        {
          "name": "part",
          "text": "counter-button-increase - Selects the button used to increase the input value"
        },
        {
          "name": "part",
          "text": "field - Selects the native input field used by the component"
        },
        {
          "name": "part",
          "text": "mic-toggle-button - Selects the button that starts and stops the speech to text"
        },
        {
          "name": "part",
          "text": "password-toggle-button - Selects the button used to show or hide password"
        },
        {
          "name": "part",
          "text": "password-mask-items - Selects the items wrapper used to mask the password"
        },
        {
          "name": "part",
          "text": "password-mask-item - Selects the item used to mask the password"
        },
        {
          "name": "part",
          "text": "tip-count - Selects the mds-input-tip-item shown when maxlength attribute is set, can be used to hide it if needed"
        },
        {
          "name": "part",
          "text": "tip-top - Selects the verbose status of input on top of element"
        },
        {
          "name": "part",
          "text": "tip-bottom - Selects the verbose status of input on bottom of element"
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input>` web component is the primary single- and multi-line text entry control of the Magma Design System. It wraps a native `<input>` (or `<textarea>` when `type=\"textarea\"`) and layers on form association, validation, inline tips, iconography, password masking, numeric steppers, colour codes with a swatch and the picker of the platform, datalist suggestions and speech-to-text dictation.\n\n#### Semantic Behavior\n\n- **Form association**: The component reports its value to the surrounding `<form>`, so it submits natively. On `disabled` the reported value is cleared. A form reset brings back the value the field had at load, both shown and submitted, and drops the `'success'` or `'error'` look of a past blur, like a native input.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: it cannot be changed and its value is left out of the form, until the fieldset is enabled.\n- **Form validity**: The validators below also decide the validity reported to the form, on every change of the value or of the rules: like a native control, an invalid field matches `:invalid` and stops the submit, the browser shows a message in the page language next to the field and focuses it, and the field switches to `'error'` as on blur. Disabled and read-only fields are left out, and `novalidate` on the `<form>` turns the check off. `type=\"email\"` and `type=\"url\"` check the format of the value as a native input does.\n- **Validation on blur**: Validation runs when the field loses focus (and re-runs on input once invalid). A `required` field waits for that first blur too: until then, typing only updates its required tip. It drives the `variant` automatically to `'success'` or `'error'`, emits `mdsInputValidation` with the boolean result, and reverts to `'primary'` when an optional field is emptied.\n- **Type-aware validators**: The active validator set is derived from `type` - `email` and `url` install the format validators of the native types, `cf` the codice fiscale format and length validators, `isbn` a checksum validator, `piva` the partita IVA one (11 digits, the last one the check digit) and `cc` the card number one (13 to 19 digits, in groups split by spaces or dashes, that pass the Luhn check) and `color` the colour code one (see Colour field); no type applies an input mask, while `required`, `min`/`max` (any number, `0` included), `minlength`/`maxlength` and `pattern` add the corresponding constraint validators. As on a native input, `pattern` has to match the whole value, an expression that does not compile sets no rule, and `number`, `date`, `time`, `textarea` and `color` ignore it. The set is rebuilt whenever one of these props changes, also after load, as with the React wrappers under SSR: a pristine field only updates its required tip, a field already validated on blur is validated again. Custom validators can be attached at runtime through the `addValidator`/`removeValidator`/`hasValidator`/`getErrors` methods.\n- **Localized messages**: The messages of the built-in validators, the ones `getErrors()` returns and `mds-input-field` shows, are in the language of the page when the value is validated (`el`, `en`, `es`, `it`, English for any other).\n- **Error keys**: `getErrors()` reports each failed rule under its own key: `required`, `max`, `min`, `maxlength`, `minlength`, `pattern`, `email`, `url`, `piva`, `cc`, `color`, `isbn-error`, `cf-regex` and `cf-length`, plus the keys the custom validators return. Up to 2.5.0, `maxlength` and `minlength` were both reported as `minLenght`.\n- **Disabled / read-only tips**: `disabled` and `readonly` surface a persistent top tip describing the state; read-only fields also auto-select their text on focus. The top tip (this badge, and the dot of `required`) stands on the top border of the field, half outside, clear of its rounded corner by its radius plus a margin, and stays there while the field has the focus: inside the field it covered the button at its end.\n- **No action that changes the value on a field the user cannot change**: a read-only or disabled field (a disabled `<fieldset>` included) has none of the buttons at its end that change the value (the steppers of a number, the dictation button, the picker of a colour); its text takes their room and its end is left to the badge of its state. The password toggle stays, since it shows the value without changing it (disabled with the field).\n- **Character counter**: When `maxlength` is set a bottom counter tip shows `current / max` and shifts through fullness variants as the value approaches the limit. A `maxlength` of `0` or less is treated as unset.\n- **Password masking**: With `type=\"password\"` a toggle button reveals/hides the value; it is disabled with the field.\n- **Colour field**: `type=\"color\"` keeps a text field, where a colour code is typed and validated, with a swatch of the colour at its start and a button at its end that opens the colour picker of the platform; it keeps the sizes, the variants, `readonly`, `required`, the form and the validation, and the label and message of `mds-input-field`. The value, in `mdsInputChange` and in the form, is the colour as `#rrggbb` in lower case, the valid lowercase simple colour of HTML, without alpha. The text also takes `#rgb` and the code without `#`, in upper or lower case (what Figma copies), and the field writes it back as `#rrggbb` when it is left. Any other text, a name or `rgb()` among them, is an error under the key `color` whose message says what to write: the text stays for the user to correct and the value becomes `''`, as a native number input does with a text that is no number (the form gets `''` and the field reports `badInput`), so the event and the form only ever carry a colour or `''`. A value set by code is read the same way: `#ABC` becomes `#aabbcc`, `red` is shown with its error and the value becomes `''`. A field that is not `required` can stay empty, where a native colour input always holds `#000000`.\n- **The swatch and the picker button**: the swatch is a disc of the colour of the value, as large as the glyph of an icon and where the icon goes, so it scales with `size`; while the text names no colour it is empty, its ring alone. The ring is the `border-strong` role, the 3:1 contrast a graphic needs on the fill of the field to show a white or a black colour. The button at the end, where the microphone of a text field goes, has a palette icon and the name \"Choose a colour for\" the name of the field in the page language, and comes after the text in the order of the keyboard: it opens the colour picker of the platform (a native `<input type=\"color\">` hidden under it) on the colour of the value, black for an empty field; the colour picked writes the text and the value and emits `mdsInputChange` as typing does. A click on the swatch opens it too, a shortcut for the pointer: the swatch is hidden from assistive technologies and out of the order of the keyboard, the button is the control. A read-only or disabled field (a disabled `<fieldset>` included) has no button: it offers no way to change the value, the swatch still shows the colour and opens nothing, and the end of the field is left to the badge of its state. Next to the other props: the swatch takes the place of `icon`, which a colour field ignores (one mark at the start, as on `mds-chip`), with the icon `variant=\"ai\"` adds; `await` leaves the swatch, which shows the value, and puts its spinner at the end, before the button (at the very end of a read-only or disabled field); `mic` is ignored, since a colour code is typed or picked, not dictated, and the end holds the button.\n- **Number steppers**: With `type=\"number\"` increment/decrement buttons are rendered; their placement follows `controlsLayout` and their glyphs follow `controlsIcon`. The side buttons of the horizontal layout are as tall as the field, with the icon of an `sm` button at `md` and `sm`, as the other buttons inside the field. A read-only or disabled number has no steppers: it is a plain field, with the padding of any field and its text at the start (the centring of the horizontal layout belongs to the buttons on its sides). The arrow keys still step the value of a field the user can change.\n- **A fill a step off its surface**: on a page the field paints `surface-overlay`; inside a surface that paints `overlay` (the window of a dialog, `mds-banner`, `mds-status-bar`, `mds-dropdown`, `mds-table`) it paints `surface-default`, the step below, passed down as `--magma-field-fill`, so the field never melts into the window. `--mds-input-background` still sets the fill outright.\n- **Speech-to-text**: When `mic` is set a dictation button transcribes speech into the value, replacing what was there, and emits `mdsInputSpeechEnd` when the user stops the dictation; when the Web Speech API is unavailable the button switches to an error state and the value is left as it is. A disabled or read-only field (a disabled `<fieldset>` included), which the user cannot change, has no dictation button, and leaves the end of the field to the badge of its state; a dictation in progress stops at once, emitting `mdsInputSpeechEnd`, when the field becomes so.\n- **Emitted events**: `mdsInputChange` carries the new value, `mdsInputKeydown` fires on every key pressed in the field with the native `KeyboardEvent` as detail (before the value changes: read the value from `mdsInputChange`), and `mdsInputFocus`/`mdsInputBlur` fire on focus transitions.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` ladder (color role) is defined in [`agents/variants.md`](../../../../agents/variants.md); `<mds-input>` consumes it for both intent styling and validation feedback, but does not expose a `tone` prop. It accepts `primary` (default), `ai`, `info`, `success`, `warning` and `error`.\n\n- **`type`** selects both the rendered control and the validation profile: it covers the native HTML types (`color` as a text field with a swatch and a picker button, see Colour field) plus format types (`'cf'`, `'piva'`, `'isbn'`, `'cc'`) and switches the host to a multi-line `<textarea>` for `'textarea'`.\n- **`variant=\"ai\"`** auto-assigns the AI chatbot icon when no `icon` is otherwise provided, signposting AI-assisted fields.\n- **`size`** sets the height of the field, the same as [`<mds-button>`](../mds-button/AGENTS.md): `sm` 28px, `md` 36px, `lg` 48px (default). Match it to the buttons next to the field, or go smaller in dense layouts (filter bars, table toolbars); the text style stays the same, the padding and the inner icon, stepper buttons and password and microphone toggles scale with it. A `textarea` keeps its own height (`--mds-input-textarea-min-height`).\n\n#### Other behavioral props\n\n- **`icon`** is an SVG filename slug from the Magma icon library shown at the leading (left) edge of the field; it is suppressed while `await` is active, since the spinner takes its place. A `color` field ignores it: its swatch stands there.\n- **`controlsLayout`** chooses between stacked (`'vertical'`) and split (`'horizontal'`) stepper buttons, and **`controlsIcon`** picks arrow vs. plus/minus glyphs - both apply only to `type=\"number\"`.\n- **`datalist`** supplies suggestion options for `type=\"search\"` style autocompletion.\n- **`tip`** renders inline helper text below the field, and **`typography`** selects the field's text scale.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Text Input\n\nThe simplest form: set `name` for form participation and `placeholder` for a visual hint. Wrap the component in [`mds-input-field`](../mds-input-field/AGENTS.md) to add a visible label and associated tip.\n\n```html\n<mds-input\n  name=\"cognome\"\n  placeholder=\"Inserisci il tuo cognome\"\n></mds-input>\n```\n\n#### Required Field with `tip` Helper Text\n\nUse `required` to validate that the field is not empty and `tip` to explain the constraint. The component surfaces a top-tip when focused and drives `variant` to `'error'` or `'success'` on blur. When the field collects the user's own data, set the matching `autocomplete` token (`email`, `given-name`, `tel`, ...) so browsers can identify its purpose (WCAG 2.1 SC 1.3.5) and offer autofill; without it the component default `autocomplete=\"off\"` applies.\n\n```html\n<mds-input\n  name=\"email\"\n  type=\"email\"\n  autocomplete=\"email\"\n  placeholder=\"nome@esempio.it\"\n  required\n  tip=\"Inserisci un indirizzo email valido\"\n></mds-input>\n```\n\n#### Textarea for Multi-line Content\n\nSet `type=\"textarea\"` to render a `<textarea>` instead of a single-line `<input>`. Use the `--mds-input-textarea-*` custom properties to control height and resize behaviour.\n\n```html\n<mds-input\n  name=\"descrizione\"\n  type=\"textarea\"\n  placeholder=\"Descrivi il problema...\"\n  maxlength=\"500\"\n></mds-input>\n```\n\n#### Character Counter via `maxlength`\n\nWhen `maxlength` is set the component renders a live `current / max` counter below the field. The counter shifts through fullness variants as the limit approaches. A value of `0` or less is treated as unset.\n\n```html\n<mds-input\n  name=\"titolo\"\n  placeholder=\"Titolo dell'articolo\"\n  maxlength=\"120\"\n></mds-input>\n```\n\n#### Numeric Input with Steppers\n\nSet `type=\"number\"` to enable built-in increment/decrement buttons. Use `controlsLayout` to choose between stacked (`'vertical'`, default) and split (`'horizontal'`) placement, and `controlsIcon` to pick arrow vs. plus/minus glyphs. Use `min`, `max`, and `step` to constrain the legal range. A `readonly` or `disabled` number shows no steppers: the value cannot change there.\n\n```html\n<!-- Stacked (default) - arrow glyphs -->\n<mds-input\n  name=\"quantita\"\n  type=\"number\"\n  min=\"1\"\n  max=\"99\"\n  step=\"1\"\n  placeholder=\"1\"\n></mds-input>\n\n<!-- Horizontal split - arithmetic glyphs -->\n<mds-input\n  name=\"quantita\"\n  type=\"number\"\n  min=\"0\"\n  max=\"100\"\n  controls-layout=\"horizontal\"\n  controls-icon=\"arithmetic\"\n  placeholder=\"0\"\n></mds-input>\n```\n\n#### Password Input\n\nSet `type=\"password\"` to render a masked field with a built-in visibility toggle. The component renders a custom dot-mask overlay and a show/hide button - no extra wiring is needed. Always set `autocomplete` to `new-password` (sign-up, password change) or `current-password` (login): the component default is `autocomplete=\"off\"`, which browsers and password managers ignore on credential fields, but the explicit token is what lets them pair the password with its username field and fill or generate the right value.\n\n```html\n<mds-input\n  name=\"password\"\n  type=\"password\"\n  autocomplete=\"new-password\"\n  placeholder=\"Scegli una password\"\n  required\n></mds-input>\n```\n\n#### Login Form\n\nPair a username field carrying `autocomplete=\"username\"` with a password field carrying `autocomplete=\"current-password\"` inside a `<form>`, and submit through `<mds-button type=\"submit\">`. The native fields live in the Shadow DOM of each `<mds-input>`: among the password managers tested, Bitwarden, LastPass, Chrome and Edge detect and fill them, Firefox's built-in manager and KeePassXC-Browser do not (they only look at the light DOM).\n\n```html\n<form action=\"/login\" method=\"post\">\n  <mds-input-field label=\"Email\">\n    <mds-input name=\"username\" type=\"email\" autocomplete=\"username\" required></mds-input>\n  </mds-input-field>\n  <mds-input-field label=\"Password\">\n    <mds-input name=\"password\" type=\"password\" autocomplete=\"current-password\" required></mds-input>\n  </mds-input-field>\n\n  <mds-button type=\"submit\" label=\"Accedi\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Italian-Specific Masked Types\n\n`type=\"cf\"` installs the codice fiscale format and length validators and `type=\"isbn\"` a checksum validator. `type=\"piva\"` accepts 11 digits whose last one is the check digit, without the `IT` prefix or spaces, and `type=\"cc\"` 13 to 19 digits, in groups split by spaces or dashes, that pass the Luhn check of card numbers. A value that breaks the format stops the submit of the form. No type applies a keyboard mask.\n\n```html\n<mds-input name=\"codice_fiscale\" type=\"cf\" placeholder=\"RSSMRA80A01H501Z\"></mds-input>\n<mds-input name=\"partita_iva\"    type=\"piva\" placeholder=\"01234567890\"></mds-input>\n```\n\n#### Colour Field\n\nSet `type=\"color\"` to ask for a colour: the code is typed in the field, or picked with the button at its end (or a click on the swatch at its start), which opens the picker of the platform. The value is `#rrggbb` in lower case, in `mdsInputChange` and in the form; the field also takes `#rgb` and the code without `#`, in any case, and writes it as `#rrggbb` when it is left. Wrap it in `mds-input-field`: the label names the field and its picker button, the message shows the error of a text that names no colour. A field that is not `required` can stay empty.\n\n```html\n<mds-input-field label=\"Colore di base\">\n  <mds-input name=\"base\" type=\"color\" value=\"#2f6fd0\" placeholder=\"#rrggbb\" required></mds-input>\n</mds-input-field>\n```\n\n```javascript\ndocument.querySelector('mds-input[type=\"color\"]').addEventListener('mdsInputChange', (e) => {\n  // a colour as #rrggbb, or '' while the field is empty or its text names no colour\n  if (e.detail.value) applyColour(e.detail.value);\n});\n```\n\n#### Search Input with Datalist\n\nUse `type=\"search\"` combined with the `datalist` prop to offer autocomplete suggestions from a fixed list. The list is rendered inside the shadow DOM and wired automatically.\n\n```html\n<mds-input\n  name=\"comune\"\n  type=\"search\"\n  placeholder=\"Cerca comune...\"\n></mds-input>\n```\n\n```javascript\n// Pass suggestions as a JavaScript array\ndocument.querySelector('mds-input').datalist = ['Roma', 'Milano', 'Napoli', 'Torino'];\n```\n\n#### Icon Decoration\n\nThe `icon` prop renders an SVG slug from the Magma icon library at the leading edge of the field. The icon is suppressed while `await` is active and the spinner takes its place.\n\n```html\n<mds-input\n  name=\"cerca\"\n  type=\"search\"\n  icon=\"mi/baseline/search\"\n  placeholder=\"Cerca...\"\n></mds-input>\n```\n\n#### AI-Assisted Field\n\nSet `variant=\"ai\"` to signal an AI-powered field. When no `icon` prop is present, the component auto-assigns the AI chatbot icon.\n\n```html\n<mds-input\n  name=\"prompt\"\n  type=\"text\"\n  variant=\"ai\"\n  placeholder=\"Chiedi qualcosa all'assistente...\"\n></mds-input>\n```\n\n#### Async Loading via `await`\n\nSet the `await` boolean attribute while an async operation (e.g. a lookup) is in flight. The component renders an inline spinner in place of the icon. Remove the attribute when done - do not set `await=\"false\"`.\n\n```html\n<mds-input name=\"codice\" placeholder=\"Verifica in corso...\" await></mds-input>\n```\n\n#### Speech-to-Text Dictation\n\nSet the `mic` boolean attribute to render a dictation button. Starting a dictation clears the current value and writes the recognized speech in its place; the component emits `mdsInputSpeechEnd` when the user stops the dictation. If the Web Speech API is unavailable the button switches to an error state and the value is kept. A read-only or disabled field has no dictation button.\n\n```html\n<mds-input\n  name=\"note_vocali\"\n  type=\"text\"\n  mic\n  placeholder=\"Parla o scrivi...\"\n></mds-input>\n```\n\n#### Listening to Events\n\nListen for `mdsInputChange` instead of native `input` or `change`: `change` does not cross the shadow boundary, and `input` reports only typing, not the values set by the steppers, the dictation or a script.\n\n```javascript\ndocument.querySelector('mds-input').addEventListener('mdsInputChange', (e) => {\n  console.log(e.detail.value);\n});\n\ndocument.querySelector('mds-input').addEventListener('mdsInputValidation', (e) => {\n  console.log('valido:', e.detail);\n});\n```\n\n#### Form Participation\n\n`<mds-input>` is form-associated. It submits natively inside a `<form>`; set `name` so the value is included in form data. Its validation is reported to the form too: an empty `required` field, or one that breaks another rule, stops the submit like a native input and shows the error. Add `novalidate` to the `<form>` when your own code validates on submit. A reset brings every field back to its value at load and to its pristine look.\n\n```html\n<form action=\"/salva\" method=\"post\">\n  <mds-input name=\"nome\"    type=\"text\"  placeholder=\"Nome\"   required></mds-input>\n  <mds-input name=\"cognome\" type=\"text\"  placeholder=\"Cognome\" required></mds-input>\n  <mds-input name=\"email\"   type=\"email\" placeholder=\"Email\"   required></mds-input>\n\n  <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button type=\"reset\"  label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n</form>\n```\n\n#### Read-Only Display\n\nUse `readonly` when the value should be visible but not editable. A persistent top tip, on the top border of the field, describes the state, and the field text is auto-selected on focus for easy copying. The buttons that change the value (steppers, dictation, colour picker) are not shown; the password toggle stays.\n\n```html\n<mds-input\n  name=\"codice_riferimento\"\n  value=\"REF-2024-00123\"\n  readonly\n></mds-input>\n```\n\n#### Styling Customization\n\nStyle the input only through its public `--mds-input-*` CSS custom properties. Set them on the host or a parent selector. Use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.search-bar mds-input {\n  --mds-input-background: rgb(var(--magma-wash-base));\n}\n\n/* Textarea: fixed height, allow resize */\n.notes-area mds-input {\n  --mds-input-textarea-min-height: 8rem;\n  --mds-input-textarea-max-height: 24rem;\n  --mds-input-textarea-resize: vertical;\n}\n```\n\n#### Sizing a Field to the Controls Next to It\n\nGive the fields of a row the `size` of the buttons beside them, so they share one height: `sm` 28px, `md` 36px, `lg` 48px (default), the sizes of [`<mds-button>`](../mds-button/AGENTS.md). `<mds-input-select>`, `<mds-input-date>` and `<mds-input-date-range>` take the same values.\n\n```html\n<div class=\"flex items-center gap-200\">\n  <mds-input size=\"md\" type=\"search\" icon=\"mi/baseline/search\" placeholder=\"Cerca\"></mds-input>\n  <mds-input-select size=\"md\" placeholder=\"Stato\">\n    <option value=\"open\">Aperte</option>\n    <option value=\"closed\">Chiuse</option>\n  </mds-input-select>\n  <mds-button size=\"md\" label=\"Filtra\"></mds-button>\n</div>\n```\n\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use a Raw `<input>` When `<mds-input>` Exists\n\nReaching for a plain `<input>` bypasses theming, validation, tips, accessible state announcements, and form-reset behavior provided by the component.\n\n```html\n<!-- INCORRECT -->\n<input type=\"text\" name=\"nome\" placeholder=\"Nome\" class=\"my-input\">\n\n<!-- CORRECT -->\n<mds-input name=\"nome\" type=\"text\" placeholder=\"Nome\"></mds-input>\n```\n\n#### Do Not Use a Native `<input type=\"color\">` in a Form of Magma\n\nThe native colour input looks like no other field of the form, has no text to type or paste a code into, no message, no variant and no label of `mds-input-field`, and always holds a colour (`#000000`), so it cannot be left empty. `type=\"color\"` gives the field of Magma with the picker of the platform on the button at its end.\n\n```html\n<!-- INCORRECT -->\n<label>Colore di base <input type=\"color\" name=\"base\" value=\"#2f6fd0\"></label>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Colore di base\">\n  <mds-input type=\"color\" name=\"base\" value=\"#2f6fd0\"></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Set Boolean Attributes to the String `\"false\"`\n\n`disabled`, `required`, `readonly`, `mic` and `await` are boolean attributes: remove the attribute entirely to turn it off. `mds-input` is form-associated, so as on a native control any value turns them on, `\"false\"` included: this markup renders a disabled, required field.\n\n```html\n<!-- INCORRECT -->\n<mds-input name=\"note\" disabled=\"false\" required=\"false\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input name=\"note\"></mds-input>\n```\n\n#### Do Not Force `variant` for Validation Feedback\n\nThe component drives `variant` to `'success'` or `'error'` automatically on blur when validators are active. Setting `variant` manually overrides the feedback and breaks the visual contract.\n\n```html\n<!-- INCORRECT -->\n<mds-input name=\"codice\" variant=\"error\" tip=\"Valore non valido\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input name=\"codice\" required tip=\"Inserisci un valore valido\"></mds-input>\n```\n\n#### Do Not Listen to Native `input` or `change` Events\n\nThe native `change` event does not cross the shadow boundary, and `input` reports only typing, not the values set by the steppers, the dictation or a script. Use the documented `mdsInputChange` event instead, which fires for every value change.\n\n```javascript\n// INCORRECT\ndocument.querySelector('mds-input').addEventListener('input', (e) => {\n  console.log(e.target.value);\n});\n\n// CORRECT\ndocument.querySelector('mds-input').addEventListener('mdsInputChange', (e) => {\n  console.log(e.detail.value);\n});\n```\n\n#### Do Not Use `type=\"number\"` Native Browser Spinners and Then Override the Input\n\nThe component renders its own increment/decrement buttons and hides the native browser spinners. Do not try to re-enable them via CSS, and do not add inline JS `stepUp`/`stepDown` calls - use the `controlsLayout` and `controlsIcon` props to configure the built-in controls.\n\n```html\n<!-- INCORRECT -->\n<mds-input type=\"number\" style=\"-moz-appearance: auto;\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input\n  type=\"number\"\n  controls-layout=\"horizontal\"\n  controls-icon=\"arithmetic\"\n  min=\"0\"\n  max=\"100\"\n></mds-input>\n```\n\n#### Do Not Use a Legacy or Invalid `type` Value\n\n`<mds-input>` accepts a specific set of `type` values: `text`, `email`, `number`, `password`, `search`, `tel`, `url`, `date`, `time`, `textarea`, `cf`, `piva`, `cc`, `isbn`. Supplying anything else (e.g. `\"checkbox\"`, `\"radio\"`, `\"file\"`) is passed straight to the inner native `<input>`, which renders a bare native control that the component neither styles nor reports correctly to the form. Use the dedicated Magma component for those controls.\n\n```html\n<!-- INCORRECT -->\n<mds-input type=\"checkbox\" name=\"accetto\"></mds-input>\n<mds-input type=\"file\"     name=\"allegato\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input-switch name=\"accetto\"></mds-input-switch>\n<mds-input-upload name=\"allegato\"></mds-input-upload>\n```\n\n#### Do Not Use `placeholder` as the Accessible Label\n\n`placeholder` disappears on input and is never read as a label by assistive tech. Always pair `<mds-input>` with [`mds-input-field`](../mds-input-field/AGENTS.md) (which shows a visible label and passes it down as the accessible name) or supply `aria-label` directly on the host.\n\n```html\n<!-- INCORRECT -->\n<mds-input name=\"ricerca\" placeholder=\"Cerca per nome\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Cerca per nome\">\n  <mds-input name=\"ricerca\" placeholder=\"Cerca per nome\"></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internal Parts\n\nThe supported customization surface is the public `--mds-input-*` CSS custom properties plus the documented shadow parts (`field`, `tip-top`, `tip-bottom`, `tip-count`, `password-toggle-button`, `counter-button-increase`, `counter-button-decrease`, `mic-toggle-button`, `color-picker-button`). Targeting undocumented internals via `>>>` or arbitrary class names couples your code to the Shadow DOM implementation.\n\n```css\n/* INCORRECT */\nmds-input >>> .input {\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-input {\n  --mds-input-ring: 0 0 0 2px rgb(var(--magma-danger-border));\n  --mds-input-background: rgb(var(--magma-danger-wash-base));\n}\nmds-input::part(field) {\n  font-style: italic;\n}\n```\n"
      },
      "props": [
        {
          "name": "accessibleName",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "aria-label",
          "reflectToAttr": false,
          "docs": "The accessible name of the native control: the label a screen reader announces. An\n`mds-input-field` around the component passes its own label down here, so the attribute\nis only written by hand when the input stands on its own. The placeholder is deliberately\nnot a fallback: it disappears as soon as the field is filled.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autocomplete",
          "type": "\"additional-name\" | \"address\" | \"address-level1\" | \"address-level2\" | \"address-level3\" | \"address-level4\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"cc-additional-name\" | \"cc-csc\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-family-name\" | \"cc-given-name\" | \"cc-name\" | \"cc-number\" | \"cc-type\" | \"country\" | \"country-name\" | \"current-password\" | \"email\" | \"family-name\" | \"given-name\" | \"honorific-prefix\" | \"honorific-suffix\" | \"impp\" | \"language\" | \"name\" | \"new-password\" | \"nickname\" | \"off\" | \"on\" | \"one-time-code\" | \"organization\" | \"organization-title\" | \"photo\" | \"postal-code\" | \"sex\" | \"street-address\" | \"tel\" | \"tel-area-code\" | \"tel-country-code\" | \"tel-extension\" | \"tel-local\" | \"tel-national\" | \"transaction-amount\" | \"transaction-currency\" | \"url\" | \"username\" | undefined",
          "complexType": {
            "original": "AutocompleteType",
            "resolved": "\"additional-name\" | \"address\" | \"address-level1\" | \"address-level2\" | \"address-level3\" | \"address-level4\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"cc-additional-name\" | \"cc-csc\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-family-name\" | \"cc-given-name\" | \"cc-name\" | \"cc-number\" | \"cc-type\" | \"country\" | \"country-name\" | \"current-password\" | \"email\" | \"family-name\" | \"given-name\" | \"honorific-prefix\" | \"honorific-suffix\" | \"impp\" | \"language\" | \"name\" | \"new-password\" | \"nickname\" | \"off\" | \"on\" | \"one-time-code\" | \"organization\" | \"organization-title\" | \"photo\" | \"postal-code\" | \"sex\" | \"street-address\" | \"tel\" | \"tel-area-code\" | \"tel-country-code\" | \"tel-extension\" | \"tel-local\" | \"tel-national\" | \"transaction-amount\" | \"transaction-currency\" | \"url\" | \"username\" | undefined",
            "references": {
              "AutocompleteType": {
                "location": "import",
                "path": "@type/autocomplete",
                "id": "src/type/autocomplete.ts::AutocompleteType",
                "referenceLocation": "AutocompleteType"
              }
            }
          },
          "mutable": false,
          "attr": "autocomplete",
          "reflectToAttr": true,
          "docs": "Specifies whether the element should have autocomplete enabled",
          "docsTags": [
            {
              "name": "default",
              "text": "'off'"
            }
          ],
          "default": "'off'",
          "values": [
            {
              "value": "additional-name",
              "type": "string"
            },
            {
              "value": "address",
              "type": "string"
            },
            {
              "value": "address-level1",
              "type": "string"
            },
            {
              "value": "address-level2",
              "type": "string"
            },
            {
              "value": "address-level3",
              "type": "string"
            },
            {
              "value": "address-level4",
              "type": "string"
            },
            {
              "value": "address-line1",
              "type": "string"
            },
            {
              "value": "address-line2",
              "type": "string"
            },
            {
              "value": "address-line3",
              "type": "string"
            },
            {
              "value": "bday",
              "type": "string"
            },
            {
              "value": "bday-day",
              "type": "string"
            },
            {
              "value": "bday-month",
              "type": "string"
            },
            {
              "value": "bday-year",
              "type": "string"
            },
            {
              "value": "cc-additional-name",
              "type": "string"
            },
            {
              "value": "cc-csc",
              "type": "string"
            },
            {
              "value": "cc-exp",
              "type": "string"
            },
            {
              "value": "cc-exp-month",
              "type": "string"
            },
            {
              "value": "cc-exp-year",
              "type": "string"
            },
            {
              "value": "cc-family-name",
              "type": "string"
            },
            {
              "value": "cc-given-name",
              "type": "string"
            },
            {
              "value": "cc-name",
              "type": "string"
            },
            {
              "value": "cc-number",
              "type": "string"
            },
            {
              "value": "cc-type",
              "type": "string"
            },
            {
              "value": "country",
              "type": "string"
            },
            {
              "value": "country-name",
              "type": "string"
            },
            {
              "value": "current-password",
              "type": "string"
            },
            {
              "value": "email",
              "type": "string"
            },
            {
              "value": "family-name",
              "type": "string"
            },
            {
              "value": "given-name",
              "type": "string"
            },
            {
              "value": "honorific-prefix",
              "type": "string"
            },
            {
              "value": "honorific-suffix",
              "type": "string"
            },
            {
              "value": "impp",
              "type": "string"
            },
            {
              "value": "language",
              "type": "string"
            },
            {
              "value": "name",
              "type": "string"
            },
            {
              "value": "new-password",
              "type": "string"
            },
            {
              "value": "nickname",
              "type": "string"
            },
            {
              "value": "off",
              "type": "string"
            },
            {
              "value": "on",
              "type": "string"
            },
            {
              "value": "one-time-code",
              "type": "string"
            },
            {
              "value": "organization",
              "type": "string"
            },
            {
              "value": "organization-title",
              "type": "string"
            },
            {
              "value": "photo",
              "type": "string"
            },
            {
              "value": "postal-code",
              "type": "string"
            },
            {
              "value": "sex",
              "type": "string"
            },
            {
              "value": "street-address",
              "type": "string"
            },
            {
              "value": "tel",
              "type": "string"
            },
            {
              "value": "tel-area-code",
              "type": "string"
            },
            {
              "value": "tel-country-code",
              "type": "string"
            },
            {
              "value": "tel-extension",
              "type": "string"
            },
            {
              "value": "tel-local",
              "type": "string"
            },
            {
              "value": "tel-national",
              "type": "string"
            },
            {
              "value": "transaction-amount",
              "type": "string"
            },
            {
              "value": "transaction-currency",
              "type": "string"
            },
            {
              "value": "url",
              "type": "string"
            },
            {
              "value": "username",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autofocus",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "autofocus",
          "reflectToAttr": true,
          "docs": "Specifies that the element should automatically get focus when the page loads",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "await",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "await",
          "reflectToAttr": true,
          "docs": "Specifies if the spinner icon is shown, replacing the icon if present. A `color` field keeps\nits swatch, which shows the value, and shows the spinner at its end, before the picker button\n(read-only or disabled, the field has no picker button and the spinner takes the end)",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "controlsIcon",
          "type": "\"arithmetic\" | \"arrow\" | undefined",
          "complexType": {
            "original": "InputControlsIconType",
            "resolved": "\"arithmetic\" | \"arrow\" | undefined",
            "references": {
              "InputControlsIconType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputControlsIconType",
                "referenceLocation": "InputControlsIconType"
              }
            }
          },
          "mutable": false,
          "attr": "controls-icon",
          "reflectToAttr": true,
          "docs": "Specifies the icon type of the counter buttons when the input type is set to `number`",
          "docsTags": [
            {
              "name": "default",
              "text": "'arrow'"
            }
          ],
          "default": "'arrow'",
          "values": [
            {
              "value": "arithmetic",
              "type": "string"
            },
            {
              "value": "arrow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "controlsLayout",
          "type": "\"horizontal\" | \"vertical\" | undefined",
          "complexType": {
            "original": "InputControlsLayoutType",
            "resolved": "\"horizontal\" | \"vertical\" | undefined",
            "references": {
              "InputControlsLayoutType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputControlsLayoutType",
                "referenceLocation": "InputControlsLayoutType"
              }
            }
          },
          "mutable": false,
          "attr": "controls-layout",
          "reflectToAttr": true,
          "docs": "Specifies the layout of the counter buttons when the input type is set to `number`: stacked at\nthe end (`vertical`) or one at each end (`horizontal`). A read-only or disabled field has no\ncounter buttons, and its text takes the room they leave",
          "docsTags": [
            {
              "name": "default",
              "text": "'vertical'"
            }
          ],
          "default": "'vertical'",
          "values": [
            {
              "value": "horizontal",
              "type": "string"
            },
            {
              "value": "vertical",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "datalist",
          "type": "string[] | undefined",
          "complexType": {
            "original": "string[]",
            "resolved": "string[] | undefined",
            "references": {}
          },
          "mutable": false,
          "reflectToAttr": false,
          "docs": "A list of search terms to be searched from the input field,\nit should be used with type=\"search\" input.",
          "docsTags": [],
          "values": [
            {
              "type": "string[]"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "If true, the element is displayed as disabled. The buttons that change the value (the counter\nbuttons of a number, the microphone, the picker of a colour) are not shown: the end of the\nfield is left to the badge of its state",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "An icon displayed at the left of the input, inside the field; the spinner of `await` takes\nits place. A `color` field ignores it: its swatch stands there, one mark at the start",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "max",
          "type": "number | string | undefined",
          "complexType": {
            "original": "string | number",
            "resolved": "number | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "max",
          "reflectToAttr": true,
          "docs": "Specifies the maximum value, with `type=\"number\"` or `type=\"date\"`: a number, or a date in ISO\nformat (YYYY-MM-DD) such as `2046-12-04`",
          "docsTags": [
            {
              "name": "example",
              "text": "'180'"
            }
          ],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "maxlength",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "maxlength",
          "reflectToAttr": true,
          "docs": "Specifies the maximum number of characters allowed in an element.\nUse it with input type=\"text\".\nIf maxlength is set to 0 or a negative number it will be considered as undefined.",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "mic",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "mic",
          "reflectToAttr": true,
          "docs": "Toggles text recognition. A read-only or disabled field has no dictation button. A `color`\nfield ignores it: a colour code is typed or picked, not dictated, and its end holds the button\nof the picker",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "min",
          "type": "number | string | undefined",
          "complexType": {
            "original": "string | number",
            "resolved": "number | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "min",
          "reflectToAttr": true,
          "docs": "Specifies the minimum value, with `type=\"number\"` or `type=\"date\"`: a number, or a date in ISO\nformat (YYYY-MM-DD) such as `1988-04-15`",
          "docsTags": [
            {
              "name": "example",
              "text": "'-3'"
            }
          ],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "minlength",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "minlength",
          "reflectToAttr": true,
          "docs": "Specifies the minimum number of characters allowed in an element\nuse it with input type=\"number\"",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Is needed to reference the form data after the form is submitted",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "pattern",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "pattern",
          "reflectToAttr": true,
          "docs": "Specifies a regular expression the whole value has to match, as the pattern attribute of a\nnative input: a value that does not match stops the submit of the form",
          "docsTags": [
            {
              "name": "example",
              "text": "'[0-9]{5}'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "placeholder",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "placeholder",
          "reflectToAttr": true,
          "docs": "Specifies a short hint that describes the expected value of the element",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "readonly",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "readonly",
          "reflectToAttr": true,
          "docs": "Specifies that the element is read-only. The buttons that change the value (the counter\nbuttons of a number, the microphone, the picker of a colour) are not shown, as on a disabled\nfield; the password toggle stays, since it shows the value without changing it",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "required",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "required",
          "reflectToAttr": true,
          "docs": "Specifies that the element must be filled out before submitting the form",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "InputSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | undefined",
            "references": {
              "InputSizeType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputSizeType",
                "referenceLocation": "InputSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the height of the field, the same as `mds-button`: `sm` 28px, `md` 36px, `lg` 48px.\nA textarea keeps its own height (`--mds-input-textarea-min-height`)",
          "docsTags": [
            {
              "name": "default",
              "text": "'lg'"
            }
          ],
          "default": "'lg'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "step",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "step",
          "reflectToAttr": true,
          "docs": "Specifies the interval between legal numbers in an input field",
          "docsTags": [
            {
              "name": "example",
              "text": "'0.01'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tip",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "tip",
          "reflectToAttr": true,
          "docs": "Sets the word(s) of the tip of the input field",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "type",
          "type": "\"cc\" | \"cf\" | \"color\" | \"date\" | \"email\" | \"isbn\" | \"number\" | \"password\" | \"piva\" | \"search\" | \"tel\" | \"text\" | \"textarea\" | \"time\" | \"url\" | undefined",
          "complexType": {
            "original": "InputTextType",
            "resolved": "\"cc\" | \"cf\" | \"color\" | \"date\" | \"email\" | \"isbn\" | \"number\" | \"password\" | \"piva\" | \"search\" | \"tel\" | \"text\" | \"textarea\" | \"time\" | \"url\" | undefined",
            "references": {
              "InputTextType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputTextType",
                "referenceLocation": "InputTextType"
              }
            }
          },
          "mutable": false,
          "attr": "type",
          "reflectToAttr": true,
          "docs": "Specifies the type of input element. `color` holds a colour: the field stays a text field,\nwhere the code is typed and validated, with a swatch of the colour at its start and a button\nat its end that opens the colour picker of the platform. Its value, in the change event and\nin the form, is the colour as\n`#rrggbb` in lower case, or `''` while the text is empty or names no colour, which is a\nvalidation error; the text also takes `#rgb` and the code without `#`, in any case, and is\nwritten back as `#rrggbb` when the field is left",
          "docsTags": [
            {
              "name": "default",
              "text": "'text'"
            }
          ],
          "default": "'text'",
          "values": [
            {
              "value": "cc",
              "type": "string"
            },
            {
              "value": "cf",
              "type": "string"
            },
            {
              "value": "color",
              "type": "string"
            },
            {
              "value": "date",
              "type": "string"
            },
            {
              "value": "email",
              "type": "string"
            },
            {
              "value": "isbn",
              "type": "string"
            },
            {
              "value": "number",
              "type": "string"
            },
            {
              "value": "password",
              "type": "string"
            },
            {
              "value": "piva",
              "type": "string"
            },
            {
              "value": "search",
              "type": "string"
            },
            {
              "value": "tel",
              "type": "string"
            },
            {
              "value": "text",
              "type": "string"
            },
            {
              "value": "textarea",
              "type": "string"
            },
            {
              "value": "time",
              "type": "string"
            },
            {
              "value": "url",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"detail\" | \"snippet\"",
          "complexType": {
            "original": "TypographyInputType",
            "resolved": "\"detail\" | \"snippet\"",
            "references": {
              "TypographyInputType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyInputType",
                "referenceLocation": "TypographyInputType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": true,
          "docs": "Specifies the typography of input element",
          "docsTags": [
            {
              "name": "default",
              "text": "'detail'"
            }
          ],
          "default": "'detail'",
          "values": [
            {
              "value": "detail",
              "type": "string"
            },
            {
              "value": "snippet",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": true,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Specifies the value of the input element. With `type=\"color\"`, a colour as `#rrggbb`: a value\nset as `#rgb`, without `#` or in upper case is written so, and one that names no colour is\nshown as it is, with its error, while the value becomes `''`",
          "docsTags": [
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeInputVariantType",
            "resolved": "\"ai\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeInputVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeInputVariantType",
                "referenceLocation": "ThemeInputVariantType"
              }
            }
          },
          "mutable": true,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the variant of the input field",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "addValidator",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(validator: MdsValidatorFn) => Promise<void>",
            "parameters": [
              {
                "name": "validator",
                "type": "(input: string) => MdsValidationErrors | null",
                "docs": "the validator function to add"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsValidatorFn": {
                "location": "import",
                "path": "./meta/validators",
                "id": "src/components/mds-input/meta/validators.ts::MdsValidatorFn",
                "referenceLocation": "MdsValidatorFn"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "addValidator(validator: MdsValidatorFn) => Promise<void>",
          "parameters": [
            {
              "name": "validator",
              "type": "(input: string) => MdsValidationErrors | null",
              "docs": "the validator function to add"
            }
          ],
          "docs": "Adds a validator to the input.",
          "docsTags": [
            {
              "name": "param",
              "text": "validator the validator function to add"
            }
          ]
        },
        {
          "name": "getErrors",
          "returns": {
            "type": "Promise<MdsValidationErrors | null>",
            "docs": "the validation errors, or `null` when valid"
          },
          "complexType": {
            "signature": "() => Promise<MdsValidationErrors | null>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsValidationErrors": {
                "location": "import",
                "path": "./meta/validators",
                "id": "src/components/mds-input/meta/validators.ts::MdsValidationErrors",
                "referenceLocation": "MdsValidationErrors"
              }
            },
            "return": "Promise<MdsValidationErrors | null>"
          },
          "signature": "getErrors() => Promise<MdsValidationErrors | null>",
          "parameters": [],
          "docs": "Returns the current validation errors, or `null` if the value is valid.",
          "docsTags": [
            {
              "name": "returns",
              "text": "the validation errors, or `null` when valid"
            }
          ]
        },
        {
          "name": "getInputElement",
          "returns": {
            "type": "Promise<HTMLTextAreaElement | HTMLInputElement>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<HTMLInputElement | HTMLTextAreaElement>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "HTMLTextAreaElement": {
                "location": "global",
                "id": "global::HTMLTextAreaElement"
              },
              "HTMLInputElement": {
                "location": "global",
                "id": "global::HTMLInputElement"
              }
            },
            "return": "Promise<HTMLTextAreaElement | HTMLInputElement>"
          },
          "signature": "getInputElement() => Promise<HTMLInputElement | HTMLTextAreaElement>",
          "parameters": [],
          "docs": "Returns the native `<input>` element used under the hood.",
          "docsTags": []
        },
        {
          "name": "hasValidator",
          "returns": {
            "type": "Promise<boolean>",
            "docs": "if a validator is present or not, if no validator given, return if there are at least one validator"
          },
          "complexType": {
            "signature": "(validator?: MdsValidatorFn) => Promise<boolean>",
            "parameters": [
              {
                "name": "validator",
                "type": "MdsValidatorFn | undefined",
                "docs": "validator to check if it is present"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsValidatorFn": {
                "location": "import",
                "path": "./meta/validators",
                "id": "src/components/mds-input/meta/validators.ts::MdsValidatorFn",
                "referenceLocation": "MdsValidatorFn"
              }
            },
            "return": "Promise<boolean>"
          },
          "signature": "hasValidator(validator?: MdsValidatorFn) => Promise<boolean>",
          "parameters": [
            {
              "name": "validator",
              "type": "MdsValidatorFn | undefined",
              "docs": "validator to check if it is present"
            }
          ],
          "docs": "Returns if validator is presen",
          "docsTags": [
            {
              "name": "param",
              "text": "validator validator to check if it is present"
            },
            {
              "name": "returns",
              "text": "if a validator is present or not, if no validator given, return if there are at least one validator"
            }
          ]
        },
        {
          "name": "removeValidator",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(validator: MdsValidatorFn) => Promise<void>",
            "parameters": [
              {
                "name": "validator",
                "type": "(input: string) => MdsValidationErrors | null",
                "docs": "the validator function to remove"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsValidatorFn": {
                "location": "import",
                "path": "./meta/validators",
                "id": "src/components/mds-input/meta/validators.ts::MdsValidatorFn",
                "referenceLocation": "MdsValidatorFn"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "removeValidator(validator: MdsValidatorFn) => Promise<void>",
          "parameters": [
            {
              "name": "validator",
              "type": "(input: string) => MdsValidationErrors | null",
              "docs": "the validator function to remove"
            }
          ],
          "docs": "Removes a previously added validator from the input.",
          "docsTags": [
            {
              "name": "param",
              "text": "validator the validator function to remove"
            }
          ]
        },
        {
          "name": "setFocus",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "setFocus() => Promise<void>",
          "parameters": [],
          "docs": "Sets focus on the specified `my-input`.\nUse this method instead\nof the global `input.focus()`.",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsInputBlur",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a void event when input element is blurred",
          "docsTags": []
        },
        {
          "event": "mdsInputChange",
          "detail": "MdsInputEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsInputEventDetail",
            "resolved": "MdsInputEventDetail",
            "references": {
              "MdsInputEventDetail": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::MdsInputEventDetail",
                "referenceLocation": "MdsInputEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits an InputChangeEventDetail when the value of the input element changes",
          "docsTags": []
        },
        {
          "event": "mdsInputFocus",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a void event when input element is focused",
          "docsTags": []
        },
        {
          "event": "mdsInputKeydown",
          "detail": "KeyboardEvent",
          "bubbles": true,
          "complexType": {
            "original": "KeyboardEvent",
            "resolved": "KeyboardEvent",
            "references": {
              "KeyboardEvent": {
                "location": "global",
                "id": "global::KeyboardEvent"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a KeyboardEvent when a keyboard key is pressed on the focused input element",
          "docsTags": []
        },
        {
          "event": "mdsInputSpeechEnd",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a void event when input speech recognition ends",
          "docsTags": []
        },
        {
          "event": "mdsInputValidation",
          "detail": "boolean",
          "bubbles": true,
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a boolean event when a input execute validation",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "invalid",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [
        {
          "name": "--mds-input-background",
          "annotation": "prop",
          "docs": "The background color of the input field.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-icon-color",
          "annotation": "prop",
          "docs": "The color of the icons inside the input.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-placeholder-default-color",
          "annotation": "prop",
          "docs": "The placeholder color in the default state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-placeholder-focus-color",
          "annotation": "prop",
          "docs": "The placeholder color when the input is focused.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-placeholder-hover-color",
          "annotation": "prop",
          "docs": "The placeholder color when the input is hovered.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-ring",
          "annotation": "prop",
          "docs": "The outline ring applied to the input on interactive states.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-shadow",
          "annotation": "prop",
          "docs": "The box-shadow applied to the input component.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-textarea-field-sizing",
          "annotation": "prop",
          "docs": "The field-sizing behavior of the textarea.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-textarea-max-height",
          "annotation": "prop",
          "docs": "The max-height applied to the textarea.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-textarea-min-height",
          "annotation": "prop",
          "docs": "The min-height applied to the textarea.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-textarea-resize",
          "annotation": "prop",
          "docs": "Controls whether the textarea is resizable.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-tip-background",
          "annotation": "prop",
          "docs": "The background color of the input tip/inline help.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-tip-horizontal-offset",
          "annotation": "prop",
          "docs": "The default horizontal offset applied to the bottom tip",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-tip-horizontal-offset-focused",
          "annotation": "prop",
          "docs": "The horizontal offset applied to the bottom tip when the input is focused",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-tip-vertical-offset",
          "annotation": "prop",
          "docs": "The vertical offset applied to the bottom tip",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-variant-color-rgb",
          "annotation": "prop",
          "docs": "The raw RGB channels used for variant-driven styling.",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "color-picker-button",
          "docs": "Selects the button that opens the colour picker of a `color` field"
        },
        {
          "name": "counter-button-decrease",
          "docs": "Selects the button used to decrease the input value"
        },
        {
          "name": "counter-button-increase",
          "docs": "Selects the button used to increase the input value"
        },
        {
          "name": "field",
          "docs": "Selects the native input field used by the component"
        },
        {
          "name": "mic-toggle-button",
          "docs": "Selects the button that starts and stops the speech to text"
        },
        {
          "name": "password-mask-item",
          "docs": "Selects the item used to mask the password"
        },
        {
          "name": "password-mask-items",
          "docs": "Selects the items wrapper used to mask the password"
        },
        {
          "name": "password-toggle-button",
          "docs": "Selects the button used to show or hide password"
        },
        {
          "name": "tip-bottom",
          "docs": "Selects the verbose status of input on bottom of element"
        },
        {
          "name": "tip-count",
          "docs": "Selects the mds-input-tip-item shown when maxlength attribute is set, can be used to hide it if needed"
        },
        {
          "name": "tip-top",
          "docs": "Selects the verbose status of input on top of element"
        }
      ],
      "states": [],
      "dependents": [
        "mds-input-otp"
      ],
      "dependencies": [
        "mds-button",
        "mds-input-tip",
        "mds-input-tip-item",
        "mds-icon",
        "mds-spinner"
      ],
      "dependencyGraph": {
        "mds-input": [
          "mds-button",
          "mds-input-tip",
          "mds-input-tip-item",
          "mds-icon",
          "mds-spinner"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-input-tip-item": [
          "mds-text"
        ],
        "mds-input-otp": [
          "mds-input"
        ]
      },
      "storybook": "form-input--docs"
    }
  ]
}
