{
  "name": "PhoneInput",
  "source": "src/components/PhoneInput.tsx",
  "propsType": "PhoneInputProps",
  "description": "PhoneInput — Figma `Input/Phone` (80:372).\n\nA dial-code block butted against an Input, sharing one outline: the block\ncarries the left radii and the control the right, so the seam is square on\nboth sides and reads as a single control. Both keep their full 1px border,\nwhich is what Figma draws — the 2px seam is the two strokes meeting, not an\naccident.\n\nThree sizes, no State axis. Every interaction state is the Input's, reached\nthrough the ordinary props, because Figma composes this from the same `Input`\ninstance rather than redrawing it.\n\nWHAT THIS DELIBERATELY DOES NOT DO\n\nIt does not pick countries. The chevron implies a menu and Figma specifies no\nopen state for it — no list, no flags, no search, no selected state. Country\ndata and the picker are application concerns with real editorial weight (which\nterritories, which names, which order), and inventing them here would be\ndesigning rather than implementing.\n\nSo the trigger is a real `<button>` with an accessible name, and\n`countryButtonProps` is how you wire it to a `Menu`, a popover or your own\nlistbox — including the `aria-haspopup` and `aria-expanded` that only the\nthing owning the popup can set honestly.",
  "import": "import { PhoneInput } from 'ionbase-ui';",
  "status": "stable",
  "summary": "A dial-code block butted against an Input, sharing one outline. It does not pick countries.",
  "useWhen": [
    "collecting a phone number where the country calling code matters"
  ],
  "useInstead": [
    {
      "when": "the number is free-form and the code does not matter",
      "use": "Input"
    }
  ],
  "variants": {
    "size": {
      "sm": {
        "use": "dense forms"
      },
      "md": {
        "use": "the default"
      },
      "lg": {
        "use": "prominent single-field forms"
      }
    }
  },
  "slots": {
    "trailingIcon": {
      "accepts": "Icon",
      "note": "passed through to the Input"
    },
    "countryButtonProps": {
      "accepts": "button props",
      "note": "how a country picker is attached — spread your trigger's props here, including the `aria-haspopup` and `aria-expanded` only the thing owning the popup can set honestly"
    }
  },
  "a11y": {
    "guarantees": [
      "the dial-code trigger is a real <button> with an accessible name",
      "every interaction state is the Input's, reached through the ordinary Input props"
    ],
    "requires": [
      "`label`, or `aria-label` when no visible label is rendered",
      "`countryLabel` if you change the default — the trigger shows only `+1`, which names a value rather than an action"
    ]
  },
  "antiPatterns": [
    {
      "dont": "expecting the chevron to open a country list",
      "why": "the picker is deliberately not implemented — country data and ordering are editorial application decisions, and Figma specifies no open state. Wire your own through `countryButtonProps`"
    },
    {
      "dont": "wrapping it in your own bordered container",
      "why": "the block and the control already share one outline; a second border reads as two controls"
    }
  ],
  "deprecated": [
    {
      "prop": "disabled",
      "replacement": "isDisabled"
    }
  ],
  "stylesheet": "src/styles/phone-input.css",
  "tokens": [
    "--border-default",
    "--border-disabled",
    "--border-focus",
    "--border-strong",
    "--border-width-default",
    "--border-width-thick",
    "--font-family-sans",
    "--font-weight-regular",
    "--icon-disabled",
    "--icon-size-md",
    "--icon-size-sm",
    "--icon-tertiary",
    "--ion-duration-base",
    "--ion-ease-out",
    "--ion-phone-input-border-width",
    "--ion-phone-input-font-size",
    "--ion-phone-input-gap",
    "--ion-phone-input-icon-size",
    "--ion-phone-input-line-height",
    "--ion-phone-input-padding-x",
    "--ion-phone-input-radius",
    "--radius-md",
    "--radius-sm",
    "--spacing-12",
    "--spacing-16",
    "--spacing-4",
    "--surface-disabled",
    "--surface-page",
    "--text-disabled",
    "--text-secondary",
    "--type-body",
    "--type-body-line-height",
    "--type-body-sm",
    "--type-body-sm-line-height"
  ],
  "props": {
    "dialCode": {
      "type": "string | undefined",
      "required": false,
      "origin": "own",
      "description": "The dial code shown in the leading block, e.g. `+1`.",
      "default": "+1"
    },
    "countryLabel": {
      "type": "string | undefined",
      "required": false,
      "origin": "own",
      "description": "Accessible name for the dial-code trigger. It shows only `+1`, which names\na value rather than an action, so the button needs a label of its own.",
      "default": "Select country calling code"
    },
    "countryButtonProps": {
      "type": "React.ButtonHTMLAttributes<HTMLButtonElement> | undefined",
      "required": false,
      "origin": "own",
      "description": "Spread onto the dial-code `<button>`. This is how a country picker gets\nattached — see the note on scope below."
    },
    "onChange": {
      "type": "((value: string) => void) | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when the value changes."
    },
    "defaultValue": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "The default value (uncontrolled)."
    },
    "autoCapitalize": {
      "type": "\"none\" | \"off\" | \"on\" | \"sentences\" | \"words\" | \"characters\" | undefined",
      "required": false,
      "origin": "own",
      "description": "Narrower than React's own typing, which also allows any `string`.\n`autoCapitalize` is declared on `AriaTextFieldOptions` rather than\n`AriaTextFieldProps`, so `keyof AriaTextFieldProps` above cannot omit it —\nand the wide DOM version does not satisfy what `useTextField` accepts.",
      "values": [
        "none",
        "off",
        "on",
        "sentences",
        "words",
        "characters"
      ]
    },
    "autoFocus": {
      "type": "boolean | undefined",
      "required": false,
      "origin": "aria",
      "description": "Whether the element should receive focus on render."
    },
    "className": {
      "type": "string | undefined",
      "required": false,
      "origin": "own",
      "description": "Class names for the control box (`.ion-input`). Always lands here —\nnever on the form-field wrapper. Use `wrapperClassName` for that."
    },
    "enterKeyHint": {
      "type": "\"done\" | \"enter\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined",
      "required": false,
      "origin": "aria",
      "description": "An enumerated attribute that defines what action label or icon to preset for the enter key on\nvirtual keyboards. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint).",
      "values": [
        "done",
        "enter",
        "go",
        "next",
        "previous",
        "search",
        "send"
      ]
    },
    "id": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "The element's unique identifier. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)."
    },
    "spellCheck": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "An enumerated attribute that defines whether the element may be checked for spelling errors.\nSee [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck)."
    },
    "autoCorrect": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "An attribute that takes as its value a space-separated string that describes what, if any, type\nof autocomplete functionality the input should provide. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#autocomplete)."
    },
    "inputMode": {
      "type": "\"none\" | \"search\" | \"text\" | \"url\" | \"tel\" | \"email\" | \"numeric\" | \"decimal\" | undefined",
      "required": false,
      "origin": "aria",
      "description": "Hints at the type of data that might be entered by the user while editing the element or its\ncontents. See\n[MDN](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute).",
      "values": [
        "none",
        "search",
        "text",
        "url",
        "tel",
        "email",
        "numeric",
        "decimal"
      ]
    },
    "aria-activedescendant": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Identifies the currently active element when DOM focus is on a composite widget, textbox,\ngroup, or application."
    },
    "aria-autocomplete": {
      "type": "\"inline\" | \"list\" | \"none\" | \"both\" | undefined",
      "required": false,
      "origin": "aria",
      "description": "Indicates whether inputting text could trigger display of one or more predictions of the user's\nintended value for an input and specifies how predictions would be presented if they are made.",
      "values": [
        "inline",
        "list",
        "none",
        "both"
      ]
    },
    "aria-controls": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Identifies the element (or elements) whose contents or presence are controlled by the current\nelement."
    },
    "aria-describedby": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Identifies the element (or elements) that describes the object."
    },
    "aria-details": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Identifies the element (or elements) that provide a detailed, extended description for the\nobject."
    },
    "aria-errormessage": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Identifies the element that provides an error message for the object."
    },
    "aria-haspopup": {
      "type": "boolean | \"true\" | \"false\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\" | undefined",
      "required": false,
      "origin": "aria",
      "description": "Indicates the availability and type of interactive popup element, such as menu or dialog, that\ncan be triggered by an element."
    },
    "aria-label": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Defines a string value that labels the current element."
    },
    "aria-labelledby": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Identifies the element (or elements) that labels the current element."
    },
    "onCopy": {
      "type": "ClipboardEventHandler<HTMLInputElement> | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when the user copies text. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/oncopy)."
    },
    "onCut": {
      "type": "ClipboardEventHandler<HTMLInputElement> | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when the user cuts text. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/oncut)."
    },
    "onPaste": {
      "type": "ClipboardEventHandler<HTMLInputElement> | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when the user pastes text. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/onpaste)."
    },
    "onCompositionEnd": {
      "type": "CompositionEventHandler<HTMLInputElement> | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when a text composition system completes or cancels the current text\ncomposition session. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionend_event)."
    },
    "onCompositionStart": {
      "type": "CompositionEventHandler<HTMLInputElement> | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when a text composition system starts a new text composition session.\nSee [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionstart_event)."
    },
    "onCompositionUpdate": {
      "type": "CompositionEventHandler<HTMLInputElement> | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when a new character is received in the current text composition\nsession. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionupdate_event)."
    },
    "onFocus": {
      "type": "((e: FocusEvent<HTMLInputElement, Element>) => void) | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when the element receives focus."
    },
    "onBlur": {
      "type": "((e: FocusEvent<HTMLInputElement, Element>) => void) | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when the element loses focus."
    },
    "onBeforeInput": {
      "type": "FormEventHandler<HTMLInputElement> | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when the input value is about to be modified. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforeinput_event)."
    },
    "onInput": {
      "type": "FormEventHandler<HTMLInputElement> | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when the input value is modified. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event)."
    },
    "onKeyDown": {
      "type": "((e: KeyboardEvent) => void) | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when a key is pressed."
    },
    "onKeyUp": {
      "type": "((e: KeyboardEvent) => void) | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when a key is released."
    },
    "onSelect": {
      "type": "ReactEventHandler<HTMLInputElement> | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when text in the input is selected. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/select_event)."
    },
    "type": {
      "type": "(string & {}) | \"search\" | \"text\" | \"url\" | \"tel\" | \"email\" | \"password\" | undefined",
      "required": false,
      "origin": "aria",
      "description": "The type of input to render. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdeftype).",
      "tags": {
        "default": "'text'"
      },
      "default": "tel"
    },
    "disabled": {
      "type": "boolean | undefined",
      "required": false,
      "origin": "own",
      "tags": {
        "deprecated": "Use `isDisabled`. Accepted as an alias for one minor version."
      }
    },
    "form": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "The `<form>` element to associate the input with.\nThe value of this attribute must be the id of a `<form>` in the same document.\nSee [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form)."
    },
    "name": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "The name of the input element, used when submitting an HTML form. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname)."
    },
    "value": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "The current value (controlled)."
    },
    "size": {
      "type": "InputSize | undefined",
      "required": false,
      "origin": "own",
      "description": "Matches the Figma `Size` variant: Small, Medium, Large.",
      "values": [
        "sm",
        "md",
        "lg"
      ],
      "default": "md"
    },
    "autoComplete": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Describes the type of autocomplete functionality the input should provide if any. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete)."
    },
    "maxLength": {
      "type": "number | undefined",
      "required": false,
      "origin": "aria",
      "description": "The maximum number of characters supported by the input. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmaxlength)."
    },
    "minLength": {
      "type": "number | undefined",
      "required": false,
      "origin": "aria",
      "description": "The minimum number of characters required by the input. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefminlength)."
    },
    "pattern": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Regex pattern that the value of the input must match to be valid. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefpattern)."
    },
    "placeholder": {
      "type": "string | undefined",
      "required": false,
      "origin": "aria",
      "description": "Temporary text that occupies the text input when it is empty."
    },
    "isDisabled": {
      "type": "boolean | undefined",
      "required": false,
      "origin": "aria",
      "description": "Whether the input is disabled."
    },
    "isReadOnly": {
      "type": "boolean | undefined",
      "required": false,
      "origin": "aria",
      "description": "Whether the input can be selected but not changed by the user."
    },
    "isRequired": {
      "type": "boolean | undefined",
      "required": false,
      "origin": "aria",
      "description": "Whether user input is required on the input before form submission."
    },
    "isInvalid": {
      "type": "boolean | undefined",
      "required": false,
      "origin": "aria",
      "description": "Whether the input value is invalid."
    },
    "validationState": {
      "type": "ValidationState | undefined",
      "required": false,
      "origin": "aria",
      "values": [
        "valid",
        "invalid"
      ],
      "tags": {
        "deprecated": "Use `isInvalid` instead."
      }
    },
    "validationBehavior": {
      "type": "\"aria\" | \"native\" | undefined",
      "required": false,
      "origin": "aria",
      "description": "Whether to use native HTML form validation to prevent form submission\nwhen the value is missing or invalid, or mark the field as required\nor invalid via ARIA.",
      "values": [
        "aria",
        "native"
      ],
      "tags": {
        "default": "'aria'"
      }
    },
    "validate": {
      "type": "((value: string) => ValidationError | true | null | undefined) | undefined",
      "required": false,
      "origin": "aria",
      "description": "A function that returns an error message if a given value is invalid.\nValidation errors are displayed to the user when the form is submitted\nif `validationBehavior=\"native\"`. For realtime validation, use the `isInvalid`\nprop instead."
    },
    "description": {
      "type": "ReactNode",
      "required": false,
      "origin": "aria",
      "description": "A description for the field. Provides a hint such as specific requirements for what to choose."
    },
    "errorMessage": {
      "type": "ReactNode | ((v: ValidationResult) => ReactNode)",
      "required": false,
      "origin": "aria",
      "description": "An error message for the field."
    },
    "onFocusChange": {
      "type": "((isFocused: boolean) => void) | undefined",
      "required": false,
      "origin": "aria",
      "description": "Handler that is called when the element's focus status changes."
    },
    "label": {
      "type": "ReactNode",
      "required": false,
      "origin": "aria",
      "description": "The content to display as the label."
    },
    "excludeFromTabOrder": {
      "type": "boolean | undefined",
      "required": false,
      "origin": "aria",
      "description": "Whether to exclude the element from the sequential tab order. If true,\nthe element will not be focusable via the keyboard by tabbing. This should\nbe avoided except in rare scenarios where an alternative means of accessing\nthe element or its functionality via the keyboard is available."
    },
    "trailingIcon": {
      "type": "React.ReactNode",
      "required": false,
      "origin": "own",
      "description": "Trailing icon. Figma's `Show Trailing Icon` + `Trailing Icon` swap."
    },
    "wrapperClassName": {
      "type": "string | undefined",
      "required": false,
      "origin": "own",
      "description": "Class names for the `.ion-field` wrapper when a label or helper is shown."
    }
  },
  "propCounts": {
    "own": 9,
    "aria": 51,
    "dom": 265,
    "other": 0
  }
}
