{"version":3,"file":"InputField.mjs","sources":["../../../src/components/InputField/InputField.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { ChangeEventHandler, ReactNode } from 'react';\nimport React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport { getMinValue } from '../../util/getMinValue';\nimport type {\n  EitherInclusive,\n  ForwardedRefComponent,\n  IconOrContent,\n} from '../../util/utility-types';\nimport type { Status } from '../../util/variant-types';\nimport Button from '../Button';\nimport Counter from '../Counter';\nimport FieldLabel from '../FieldLabel';\nimport FieldNote from '../FieldNote';\nimport { hasSlotContent, IconSlot } from '../Icon';\nimport Input from '../Input';\nimport Text from '../Text';\nimport styles from './InputField.module.css';\n\nexport type InputFieldProps = React.InputHTMLAttributes<HTMLInputElement> & {\n  // Component API\n  /**\n   * CSS class names that can be appended to the component.\n   */\n  className?: string;\n  /**\n   * Default value passed down from higher levels for initial state\n   */\n  defaultValue?: string | number;\n  /**\n   * Disables the field and prevents editing the contents\n   */\n  disabled?: boolean;\n  /**\n   * HTML id for the component\n   */\n  id?: string;\n  /**\n   * Gives a hint as to the type of data needed for text input (e.g., to render the correct input keyboard on mobile).\n   */\n  inputMode?: React.InputHTMLAttributes<HTMLInputElement>['inputMode'];\n  /**\n   * Node(s) that can be nested within the input field (e.g., secondary and tertiary `Button` components)\n   *\n   * The space reserved for this content is measured from what you pass in, so the content is free\n   * to be as wide as it needs. To reserve a fixed amount instead, set\n   * `--input-field__input-within-width` via `style`.\n   */\n  inputWithin?: ReactNode;\n  /**\n   * Maximum value allowed for the input, if type is 'number'.\n   */\n  max?: number | string;\n  /**\n   * Minimum value allowed for the input, if type is 'number'.\n   */\n  min?: number | string;\n  /**\n   * HTML name attribute for the input\n   */\n  name?: string;\n  /**\n   * Function that runs on change of the input\n   */\n  onChange?: ChangeEventHandler<HTMLInputElement>;\n  /**\n   * Toggles the form control's interactivity. When `readOnly` is set to `true`, the form control is not interactive\n   */\n  readOnly?: boolean;\n  /**\n   * CSS properties defined for the input element. Includes the component's CSS Custom Properties:\n   *\n   * - `--input-field__input-within-width`\n   */\n  style?: InputFieldCSSProperties;\n  /**\n   * Title attribute on input\n   */\n  title?: string;\n  /**\n   * HTML type attribute, allowing switching between text, password, and other HTML5 input field types\n   *\n   * **NOTE**: this excludes types that correspond to non-text controls, like `checkbox`, `radio`, etc.\n   */\n  type?: Extract<\n    React.InputHTMLAttributes<HTMLInputElement>['type'],\n    | 'text'\n    | 'password'\n    | 'datetime-local'\n    | 'date'\n    | 'month'\n    | 'time'\n    | 'week'\n    | 'number'\n    | 'email'\n    | 'url'\n    | 'search'\n    | 'tel'\n  >;\n  /**\n   * Value passed down from higher levels for initial state\n   */\n  value?: string | number;\n  // Design API\n  /**\n   * Text under the textarea used to provide validation hints or error message to describe the input error.\n   */\n  fieldNote?: ReactNode;\n  /**\n   * Content that prefixes the field input. Pass an EDS icon name to render a decorative\n   * icon, or a node to render it as-is.\n   */\n  leadingContent?: IconOrContent;\n  /**\n   * Placeholder attribute for input. Note: placeholder should be used sparingly\n   */\n  placeholder?: string;\n  /**\n   * Behaves similar to `maxLength` but allows the user to continue typing more text.\n   * Should not be larger than `maxLength`, if present.\n   */\n  recommendedMaxLength?: number;\n  /**\n   * Indicates that field is required for form to be successfully submitted. Consumers must implement handling for error states using `status=\"critical\"`\n   */\n  required?: boolean;\n  /**\n   * Whether it should show the field hint or not\n   *\n   * **Default is `\"false\"`**.\n   */\n  showHint?: boolean;\n  /**\n   * Status for the field state. Use `\"critical\"` for an error state.\n   *\n   * **Default is `\"default\"`**.\n   */\n  status?: 'default' | Extract<Status, 'warning' | 'critical'>;\n  /**\n   * Add additional descriptive text for the field name.\n   */\n  subLabel?: ReactNode;\n} & EitherInclusive<\n    {\n      /**\n       * Visible text label for the component.\n       */\n      label: string;\n    },\n    {\n      /**\n       * Aria-label to provide an accesible name for the text input if no visible label is provided.\n       */\n      'aria-label': string;\n    }\n  >;\n\nexport interface InputFieldCSSProperties extends React.CSSProperties {\n  /**\n   * The space reserved at the trailing edge of the input for `inputWithin` content. The component\n   * measures this from the rendered content, so it only needs setting to override that measurement\n   * with a fixed size.\n   */\n  '--input-field__input-within-width'?: string;\n}\n\ntype InputFieldType = ForwardedRefComponent<\n  HTMLInputElement,\n  InputFieldProps\n> & {\n  Input?: typeof Input;\n  Label?: typeof FieldLabel;\n};\n\n/**\n * ## Usage\n *\n * **NOTE**: This component requires a `label` or `aria-label` prop.\n *\n * | Type/Use | Description | Example |\n * |----------|-------------|---------|\n * | Text | Standard single-line input for free-form text. | Name fields, search bars, tags. |\n * | Search | Optimized for searching, often with a search icon or clear button. | Site/app search bars, filter queries. |\n * | Date/Time | Opens a date/time picker depending on browser support. | Scheduling. |\n * | Masked | Formats input while typing. | Passwords, phone numbers, credit card entries. |\n * | Disabled/Read-Only | Prevents user interaction or editing. | Prefilled info, summary/review forms. |\n * | Validation | Displays real-time validation (e.g., success, error states). | Required fields, format enforcement. |\n *\n * ## Interaction\n *\n * When the text exceeds the available space, it scrolls to show the end of the string.\n *\n * ## Content & Accessibility\n *\n * ### Do's\n *\n * * Use short, precise labels in sentence case.\n * * Use helper text only when necessary, preferring examples (e.g., yourname@emaildomain.com) over instructions.\n * * For errors, provide instructions for fixing the issue and explain what is happening.\n * * Use `fieldNote` for examples or instructions explaining what should be entered.\n * * Set `maxLength` on every free-text field (`text`, `search`, `email`, `url`, `tel`, `password`) so there's a hard cap on what can be entered. Use `recommendedMaxLength` alongside it to show a lower, soft limit. Enforce the same limit on the server, since `maxLength` only constrains the browser.\n *\n * ### Don'ts\n *\n * * Don't use colons or periods at the end of labels, and don't omit labels.\n * * Don't use placeholder text within the field; it can cause accessibility issues.\n * * Don't stack field notes on top of error messages.\n */\nexport const InputField: InputFieldType = forwardRef(\n  (\n    {\n      'aria-describedby': ariaDescribedBy,\n      className,\n      disabled,\n      fieldNote,\n      id,\n      inputWithin,\n      label,\n      leadingContent,\n      maxLength,\n      onChange,\n      readOnly,\n      recommendedMaxLength,\n      required,\n      showHint,\n      status = 'default',\n      subLabel,\n      type = 'text',\n      ...other\n    },\n    ref,\n  ) => {\n    const shouldRenderOverline = !!(label || required);\n    // Default to `.value` to match React's preference order\n    const [fieldText, setFieldText] = useState(\n      other.value || other.defaultValue,\n    );\n\n    // Handling of behavior when field type is password. Show/hide button\n    const revealShowHideButton = type === 'password';\n    const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n\n    // The slot renders for caller-provided content and for the password show/hide button\n    const shouldRenderInputWithin = !!(inputWithin || revealShowHideButton);\n\n    // Measure the slot so the input's trailing padding can track the width of whatever is rendered\n    // in it, rather than constraining that content to a fixed size.\n    const inputWithinRef = useRef<HTMLDivElement>(null);\n    const [inputWithinWidth, setInputWithinWidth] = useState<number>();\n\n    useEffect(() => {\n      const inputWithinNode = inputWithinRef.current;\n\n      if (!inputWithinNode || typeof ResizeObserver === 'undefined') {\n        return;\n      }\n\n      const observer = new ResizeObserver(([entry]) => {\n        // Round up, so a fractional width can't leave the content overlapping the text area\n        setInputWithinWidth(\n          Math.ceil(\n            entry.borderBoxSize?.[0]?.inlineSize ?? entry.contentRect.width,\n          ),\n        );\n      });\n\n      observer.observe(inputWithinNode);\n\n      return () => observer.disconnect();\n    }, [shouldRenderInputWithin]);\n\n    // set up base and conditional styles\n    const overlineClassName = clsx(\n      styles['input-field__overline'],\n      !label && styles['input-field__overline--no-label'],\n    );\n\n    const labelClassName = clsx(\n      styles['input-field__label'],\n      disabled && styles['input-field__label--disabled'],\n    );\n\n    const subLabelClassName = clsx(\n      styles['input-field__subLabel'],\n      disabled && styles['input-field__label--disabled'],\n    );\n\n    const requiredTextClassName = clsx(\n      styles['input-field__required-text'],\n      disabled && styles['input-field__required-text--disabled'],\n    );\n\n    const inputBodyClassName = clsx(\n      styles['input-field__body'],\n      fieldNote && styles['input-field--has-fieldNote'],\n    );\n\n    // Modify the padding of `Input` to account for trailing/leading content and trailing buttons\n    const inputOverlayClassName = clsx(\n      hasSlotContent(leadingContent) &&\n        styles['input-field__input--leading-content'],\n      shouldRenderInputWithin && styles['input-field__input--input-within'],\n    );\n\n    // Publish the measured slot width for the input's trailing padding to consume. Left unset until\n    // measured, so the stylesheet's fallback covers the first render (and non-browser environments).\n    // A caller-supplied value in `style` lands on the input itself, so it takes precedence.\n    const inputBodyStyle =\n      inputWithinWidth === undefined\n        ? undefined\n        : ({\n            '--input-field__input-within-width': `${inputWithinWidth}px`,\n          } as InputFieldCSSProperties);\n\n    // When field length is specified, handle calculations for current and total size (with styles)\n    const fieldLength = fieldText?.toString().length ?? 0;\n\n    const textExceedsMaxLength =\n      maxLength !== undefined && fieldLength ? fieldLength > maxLength : false;\n\n    const textExceedsRecommendedLength =\n      recommendedMaxLength !== undefined && fieldLength\n        ? fieldLength > recommendedMaxLength\n        : false;\n\n    const shouldRenderError =\n      textExceedsMaxLength || textExceedsRecommendedLength;\n\n    // Pick the smallest of the lengths to set as the maximum value allowed\n    const maxLengthShown = getMinValue(maxLength, recommendedMaxLength);\n\n    const generatedIdVar = React.useId();\n    const idVar = id || generatedIdVar;\n\n    // Accessibility: attach the IDs of fieldnote and/or subLabel to the input\n    const generatedFieldNoteId = React.useId();\n    const generatedSubLabelId = React.useId();\n\n    // set up the aria-describedby based on the following rules:\n    // - describedby is blank if subLabel and fieldnote are not defined\n    // - for each subLabel/fieldnote, append the space-separated, generated IDs to aria-describedby\n    // - if the user has given a aria-describedby prop, override the calculation\n    const completeDescribedByVar = ariaDescribedBy\n      ? ariaDescribedBy\n      : `${subLabel ? generatedSubLabelId : ''}${fieldNote ? ' ' + generatedFieldNoteId : ''}`;\n\n    return (\n      <div className={className}>\n        {shouldRenderOverline && (\n          <div className={overlineClassName}>\n            {label && (\n              <FieldLabel\n                className={labelClassName}\n                disabled={disabled}\n                htmlFor={idVar}\n                size=\"md\"\n              >\n                {label}\n              </FieldLabel>\n            )}\n            {required && showHint && (\n              <Text\n                aria-disabled={disabled ?? undefined}\n                as=\"span\"\n                className={requiredTextClassName}\n                preset=\"body-sm\"\n              >\n                (Required)\n              </Text>\n            )}\n            {!required && showHint && (\n              <Text\n                aria-disabled={disabled ?? undefined}\n                as=\"span\"\n                className={requiredTextClassName}\n                preset=\"body-sm\"\n              >\n                (Optional)\n              </Text>\n            )}\n            {maxLengthShown && (\n              <Counter\n                className={styles['input-field__character-counter']}\n                count={fieldLength}\n                total={maxLengthShown}\n              />\n            )}\n            {label && subLabel && (\n              <div className={subLabelClassName}>\n                <Text as=\"span\" id={generatedSubLabelId} preset=\"body-sm\">\n                  {subLabel}\n                </Text>\n              </div>\n            )}\n          </div>\n        )}\n\n        <div className={inputBodyClassName} style={inputBodyStyle}>\n          <Input\n            aria-describedby={completeDescribedByVar ?? undefined}\n            aria-invalid={!!(status === 'critical')}\n            className={inputOverlayClassName}\n            disabled={disabled}\n            id={idVar}\n            maxLength={maxLength}\n            onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n              // when uncontrolled, update field text counter source\n              // when controlled, only update when onchange is specified\n              other.defaultValue && setFieldText(e.target.value);\n              if (onChange) {\n                setFieldText(e.target.value);\n                onChange(e);\n              }\n            }}\n            readOnly={readOnly}\n            ref={ref}\n            required={required}\n            status={shouldRenderError ? 'critical' : status}\n            type={isPasswordVisible ? 'text' : type}\n            {...other}\n          />\n          {shouldRenderInputWithin && (\n            <div\n              className={styles['input-field__input-within']}\n              ref={inputWithinRef}\n            >\n              {inputWithin}\n              {revealShowHideButton && (\n                <Button\n                  aria-label={`${isPasswordVisible ? 'Hide' : 'Show'} password`}\n                  icon={isPasswordVisible ? 'eye-closed' : 'eye-open'}\n                  iconLayout=\"icon-only\"\n                  onClick={() => {\n                    setIsPasswordVisible(!isPasswordVisible);\n                  }}\n                  rank=\"tertiary\"\n                  size=\"md\"\n                />\n              )}\n            </div>\n          )}\n          {hasSlotContent(leadingContent) && (\n            <div className={styles['input-field__leading-content']}>\n              <IconSlot content={leadingContent} size=\"24px\" />\n            </div>\n          )}\n        </div>\n        {fieldNote && (\n          <div className={styles['input-field__footer']}>\n            <FieldNote\n              disabled={disabled}\n              id={generatedFieldNoteId}\n              status={shouldRenderError ? 'critical' : status}\n            >\n              {fieldNote}\n            </FieldNote>\n          </div>\n        )}\n      </div>\n    );\n  },\n);\n\nInputField.displayName = 'InputField';\nInputField.Input = Input;\nInputField.Label = FieldLabel;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;AA8KA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACI,MAAM,UAAU,GAAmB,UAAU,CAClD,CACE,EACE,kBAAkB,EAAE,eAAe,EACnC,SAAS,EACT,QAAQ,EACR,SAAS,EACT,EAAE,EACF,WAAW,EACX,KAAK,EACL,cAAc,EACd,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,QAAQ,EACR,QAAQ,EACR,MAAM,GAAG,SAAS,EAClB,QAAQ,EACR,IAAI,GAAG,MAAM,EACb,GAAG,KAAK,EACT,EACD,GAAG,KACD;;IACF,MAAM,oBAAoB,GAAG,CAAC,EAAE,KAAK,IAAI,QAAQ,CAAC;;AAElD,IAAA,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CACxC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,CAClC;;AAGD,IAAA,MAAM,oBAAoB,GAAG,IAAI,KAAK,UAAU;IAChD,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;;IAGjE,MAAM,uBAAuB,GAAG,CAAC,EAAE,WAAW,IAAI,oBAAoB,CAAC;;;AAIvE,IAAA,MAAM,cAAc,GAAG,MAAM,CAAiB,IAAI,CAAC;IACnD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,EAAU;IAElE,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO;QAE9C,IAAI,CAAC,eAAe,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;YAC7D;QACF;QAEA,MAAM,QA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