@launchpad-ui/form 0.10.10 → 0.10.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/SelectField.tsx","../src/TextArea.tsx","../src/useNumberField.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = ComponentProps<'span'> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = ComponentProps<'label'> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { ComponentProps } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = ComponentProps<'input'> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","import { useMemo, useRef } from 'react';\n\ntype FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nfunction hasObjectChanged<T extends object>(obj1: T, obj2: T): boolean {\n return (\n Object.keys(obj1).length !== Object.keys(obj2).length ||\n Object.keys(obj1).some((k) => {\n const key = k as keyof T;\n return typeof obj1[key] === 'object' && typeof obj2[key] === 'object'\n ? hasObjectChanged(obj1[key] as T, obj2[key] as T)\n : obj1[key] !== obj2[key];\n })\n );\n}\n\nfunction useObjectMemo<T extends object>(obj: T) {\n const objRef = useRef(obj);\n\n return useMemo(() => {\n if (hasObjectChanged(obj, objRef.current)) {\n objRef.current = obj;\n }\n\n return objRef.current;\n }, [obj]);\n}\n\nexport { createFieldErrorId, useObjectMemo };\nexport type { FieldPath };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = ComponentProps<'input'> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n autoComplete,\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n const disablePasswordManagers = autoComplete === 'off';\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n autoComplete={autoComplete}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n data-1p-ignore={disablePasswordManagers} // \"data-1p-ignore\" is added to prevent 1Password from injecting a password autofill icon\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n autoComplete={autoComplete}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { ComponentProps } from 'react';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = ComponentProps<'span'> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n aria-label=\"Error\"\n id={createFieldErrorId(name)}\n >\n <Icon name=\"alert-rhombus\" size=\"small\" /> {errorMessage}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = ComponentProps<'fieldset'> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = ComponentProps<'form'> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = ComponentProps<'fieldset'> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = ComponentProps<'div'> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import type { FieldErrorProps } from './FieldError';\nimport type { FormHintProps } from './FormHint';\nimport type { LabelProps } from './Label';\n\nimport { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n LabelProps?: Partial<LabelProps>;\n FormHintProps?: Partial<FormHintProps>;\n FieldErrorProps?: Partial<FieldErrorProps>;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n LabelProps = {},\n FormHintProps = {},\n FieldErrorProps = {},\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <Label htmlFor={htmlFor} required={isRequired} {...LabelProps}>\n {label}\n </Label>\n )}\n {hint && (\n <FormHint className={styles.hint} {...FormHintProps}>\n {hint}\n </FormHint>\n )}\n {children}\n <FieldError\n className={styles.fieldErrorMessage}\n name={name}\n errorMessage={errorMessage}\n {...FieldErrorProps}\n />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { ComponentProps, ReactElement } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { cx } from 'classix';\nimport { cloneElement } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = ComponentProps<'div'> & {\n icon: ReactElement<IconProps>;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n tooltip?: string | JSX.Element;\n renderIconLast?: boolean;\n ariaLabel?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n tooltip,\n renderIconLast = false,\n ariaLabel = 'More info',\n ...rest\n}: IconFieldProps) => {\n const iconElement = cloneElement(icon, {\n size: 'small',\n className: cx(styles.iconFieldIcon, styles.iconFieldIconFill),\n });\n\n const classes = cx(styles.iconField, renderIconLast ? 'IconAfter' : 'IconBefore', className);\n\n const renderIcon = tooltip ? (\n <Tooltip content={tooltip} targetClassName={styles.iconFieldButton}>\n <IconButton\n icon={cloneElement(icon, {\n className: styles.iconFieldIconFill,\n })}\n size=\"small\"\n className={styles.iconFieldIcon}\n style={renderIconLast ? { right: '0.313rem' } : { left: '0.313rem' }}\n aria-label={ariaLabel}\n />\n </Tooltip>\n ) : (\n iconElement\n );\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {!renderIconLast && renderIcon}\n {children}\n {renderIconLast && renderIcon}\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<ComponentProps<'input'>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectFieldProps = ComponentProps<'select'> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = forwardRef<HTMLSelectElement, SelectFieldProps>(\n ({ className, children, 'data-test-id': testId = 'select', ...rest }: SelectFieldProps, ref) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes} ref={ref}>\n {children}\n </select>\n );\n }\n);\n\nSelectField.displayName = 'SelectField';\n\nexport { SelectField };\nexport type { SelectFieldProps };\n","import type { KeyboardEvent, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = ComponentProps<'textarea'> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n","import type { AriaButtonProps } from '@react-aria/button';\nimport type { AriaNumberFieldProps } from '@react-aria/numberfield';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { useButton } from '@react-aria/button';\nimport { useLocale } from '@react-aria/i18n';\nimport { useNumberField as useReactAriaNumberField } from '@react-aria/numberfield';\nimport { useNumberFieldState } from '@react-stately/numberfield';\nimport { cx } from 'classix';\nimport { useRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { useObjectMemo } from './utils';\n\ntype UseNumberFieldProps = AriaNumberFieldProps & {\n className?: string;\n 'data-test-id'?: string;\n id?: string;\n name?: string;\n};\n\nconst defaultFormatOptions: Intl.NumberFormatOptions = {\n maximumFractionDigits: 6,\n};\n\nconst useNumberField = ({\n className: rootClassName,\n 'data-test-id': testId = 'input',\n id,\n name,\n ...otherProps\n}: UseNumberFieldProps = {}): {\n fieldErrorProps: ReturnType<typeof useReactAriaNumberField>['errorMessageProps'];\n formHintProps: ReturnType<typeof useReactAriaNumberField>['descriptionProps'];\n labelProps: ReturnType<typeof useReactAriaNumberField>['labelProps'];\n renderNumberField: () => JSX.Element;\n} => {\n // @react-aria's hooks have a state-updating effect somewhere that depends on \"formatOptions\",\n // so we need to memoize it to prevent an infinite render loop.\n const formatOptions = useObjectMemo({\n ...defaultFormatOptions,\n ...otherProps.formatOptions,\n });\n const { locale } = useLocale();\n const numberFieldState = useNumberFieldState({ ...otherProps, locale, formatOptions });\n const inputRef = useRef<HTMLInputElement>(null);\n const {\n descriptionProps: formHintProps,\n errorMessageProps: fieldErrorProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useReactAriaNumberField({ ...otherProps, formatOptions, id }, numberFieldState, inputRef);\n\n return {\n fieldErrorProps,\n formHintProps,\n labelProps,\n renderNumberField: () => (\n <div {...groupProps} className={styles.numberField}>\n <input\n {...inputProps}\n className={cx(styles.formInput, styles['numberField-input'])}\n data-test-id={testId}\n name={name}\n ref={inputRef}\n />\n <div className={styles['numberField-stepperContainer']}>\n <Stepper {...incrementButtonProps}>\n <Icon name=\"chevron-up\" />\n </Stepper>\n <Stepper {...decrementButtonProps}>\n <Icon name=\"chevron-down\" />\n </Stepper>\n </div>\n </div>\n ),\n };\n};\n\nconst Stepper = (props: AriaButtonProps) => {\n const buttonRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(props, buttonRef);\n\n return (\n <button {...buttonProps} className={styles['numberField-stepper']} ref={buttonRef}>\n {props.children}\n </button>\n );\n};\n\nexport { useNumberField };\nexport type { UseNumberFieldProps };\n"],"names":["suffix","label","isActive","value","isInvalid","hint","useReactAriaNumberField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA,gBAAgB,SAAS;AAAA,EAC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AAA,EACtB,WAAW;AAAA,EACX,gBAAgB,SAAS;AAAA,EACzB;AAAA,EACA;AAAA,EACA,GAAG;AACL,IAAyB,OAKpB;AAGH,QAAM,gBAAgB,cAAc;AAAA,IAClC,GAAG;AAAA,IACH,GAAG,WAAW;AAAA,EAAA,CACf;AACK,QAAA;AAAA,IACN;AAAA,EACM,IAAA,UAAA;AACA,QAAA,mBAAA,oBAAA;AAAA,IACJ,GAAkB;AAAA,IAClB;AAAA,IACA;AAAA,EAAA,CACA;AACA,QAAA,WAAA,OAAA,IAAA;AACA,QAAA;AAAA,IACA,kBAAA;AAAA,IACF;IAEO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAEI,IAAAC,iBAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,IAAA;AAAA,EACK,GAAA,kBACU,QAAO;AAAsC,SAAA;AAAA,IAE3D;AAAA,IAAA;AAAA,IACK;AAAA,IACP,mBAAA,MAAA,qBAAA,OAAA;AAAA,MACA,GAAC;AAAA,MACC,WAAA,OAAA;AAAA,MAGA,UAAA,8BAAa;AAAA,QAGf,GAAA;AAAA,QACF,WAAA,GAAA,OAAA,WAAA,OAAA,mBAAA,CAAA;AAAA,QAEJ,gBAAA;AAAA,QACF;AAAA,QAEM,KAAA;AAAA,MACJ,CAAM,wBAA0C,OAAA;AAAA,QAC1C,WAAE,OAAgB,8BAA0B;AAAA,QAGhD,UAAA,CAAS,oBAAA,SAAgB;AAAA,UAI7B,GAAA;AAAA,UAES,UAAA,oBAAA,MAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/SelectField.tsx","../src/TextArea.tsx","../src/useNumberField.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = ComponentProps<'span'> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = ComponentProps<'label'> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { ComponentProps } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = ComponentProps<'input'> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","import { useMemo, useRef } from 'react';\n\ntype FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nfunction hasObjectChanged<T extends object>(obj1: T, obj2: T): boolean {\n return (\n Object.keys(obj1).length !== Object.keys(obj2).length ||\n Object.keys(obj1).some((k) => {\n const key = k as keyof T;\n return typeof obj1[key] === 'object' && typeof obj2[key] === 'object'\n ? hasObjectChanged(obj1[key] as T, obj2[key] as T)\n : obj1[key] !== obj2[key];\n })\n );\n}\n\nfunction useObjectMemo<T extends object>(obj: T) {\n const objRef = useRef(obj);\n\n return useMemo(() => {\n if (hasObjectChanged(obj, objRef.current)) {\n objRef.current = obj;\n }\n\n return objRef.current;\n }, [obj]);\n}\n\nexport { createFieldErrorId, useObjectMemo };\nexport type { FieldPath };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = ComponentProps<'input'> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n autoComplete,\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n const disablePasswordManagers = autoComplete === 'off';\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n autoComplete={autoComplete}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n data-1p-ignore={disablePasswordManagers} // \"data-1p-ignore\" is added to prevent 1Password from injecting a password autofill icon\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n autoComplete={autoComplete}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { ComponentProps } from 'react';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = ComponentProps<'span'> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n aria-label=\"Error\"\n id={createFieldErrorId(name)}\n >\n <Icon name=\"alert-rhombus\" size=\"small\" /> {errorMessage}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = ComponentProps<'fieldset'> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = ComponentProps<'form'> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = ComponentProps<'fieldset'> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = ComponentProps<'div'> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import type { FieldErrorProps } from './FieldError';\nimport type { FormHintProps } from './FormHint';\nimport type { LabelProps } from './Label';\n\nimport { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n LabelProps?: Partial<LabelProps>;\n FormHintProps?: Partial<FormHintProps>;\n FieldErrorProps?: Partial<FieldErrorProps>;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n LabelProps = {},\n FormHintProps = {},\n FieldErrorProps = {},\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <Label htmlFor={htmlFor} required={isRequired} {...LabelProps}>\n {label}\n </Label>\n )}\n {hint && (\n <FormHint className={styles.hint} {...FormHintProps}>\n {hint}\n </FormHint>\n )}\n {children}\n <FieldError\n className={styles.fieldErrorMessage}\n name={name}\n errorMessage={errorMessage}\n {...FieldErrorProps}\n />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { ComponentProps, ReactElement } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { cx } from 'classix';\nimport { cloneElement } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = ComponentProps<'div'> & {\n icon: ReactElement<IconProps>;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n tooltip?: string | JSX.Element;\n renderIconLast?: boolean;\n ariaLabel?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n tooltip,\n renderIconLast = false,\n ariaLabel = 'More info',\n ...rest\n}: IconFieldProps) => {\n const iconElement = cloneElement(icon, {\n size: 'small',\n className: cx(styles.iconFieldIcon, styles.iconFieldIconFill),\n });\n\n const classes = cx(styles.iconField, renderIconLast ? 'IconAfter' : 'IconBefore', className);\n\n const renderIcon = tooltip ? (\n <Tooltip content={tooltip} targetClassName={styles.iconFieldButton}>\n <IconButton\n icon={cloneElement(icon, {\n className: styles.iconFieldIconFill,\n })}\n size=\"small\"\n className={styles.iconFieldIcon}\n style={renderIconLast ? { right: '0.313rem' } : { left: '0.313rem' }}\n aria-label={ariaLabel}\n />\n </Tooltip>\n ) : (\n iconElement\n );\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {!renderIconLast && renderIcon}\n {children}\n {renderIconLast && renderIcon}\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<ComponentProps<'input'>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectFieldProps = ComponentProps<'select'> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = forwardRef<HTMLSelectElement, SelectFieldProps>(\n ({ className, children, 'data-test-id': testId = 'select', ...rest }: SelectFieldProps, ref) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes} ref={ref}>\n {children}\n </select>\n );\n }\n);\n\nSelectField.displayName = 'SelectField';\n\nexport { SelectField };\nexport type { SelectFieldProps };\n","import type { KeyboardEvent, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = ComponentProps<'textarea'> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n","import type { AriaButtonProps } from '@react-aria/button';\nimport type { AriaNumberFieldProps } from '@react-aria/numberfield';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { useButton } from '@react-aria/button';\nimport { useLocale } from '@react-aria/i18n';\nimport { useNumberField as useReactAriaNumberField } from '@react-aria/numberfield';\nimport { useNumberFieldState } from '@react-stately/numberfield';\nimport { cx } from 'classix';\nimport { useRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { useObjectMemo } from './utils';\n\ntype UseNumberFieldProps = AriaNumberFieldProps & {\n className?: string;\n 'data-test-id'?: string;\n id?: string;\n name?: string;\n};\n\nconst defaultFormatOptions: Intl.NumberFormatOptions = {\n maximumFractionDigits: 6,\n};\n\nconst useNumberField = ({\n className: rootClassName,\n 'data-test-id': testId = 'input',\n id,\n name,\n ...otherProps\n}: UseNumberFieldProps = {}): {\n fieldErrorProps: ReturnType<typeof useReactAriaNumberField>['errorMessageProps'];\n formHintProps: ReturnType<typeof useReactAriaNumberField>['descriptionProps'];\n labelProps: ReturnType<typeof useReactAriaNumberField>['labelProps'];\n renderNumberField: () => JSX.Element;\n} => {\n // @react-aria's hooks have a state-updating effect somewhere that depends on \"formatOptions\",\n // so we need to memoize it to prevent an infinite render loop.\n const formatOptions = useObjectMemo({\n ...defaultFormatOptions,\n ...otherProps.formatOptions,\n });\n const { locale } = useLocale();\n const numberFieldState = useNumberFieldState({ ...otherProps, locale, formatOptions });\n const inputRef = useRef<HTMLInputElement>(null);\n const {\n descriptionProps: formHintProps,\n errorMessageProps: fieldErrorProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useReactAriaNumberField({ ...otherProps, formatOptions, id }, numberFieldState, inputRef);\n\n return {\n fieldErrorProps,\n formHintProps,\n labelProps,\n renderNumberField: () => (\n <div {...groupProps} className={styles.numberField}>\n <input\n {...inputProps}\n className={cx(styles.formInput, styles['numberField-input'])}\n data-test-id={testId}\n name={name}\n ref={inputRef}\n />\n <div className={styles['numberField-stepperContainer']}>\n <Stepper {...incrementButtonProps}>\n <Icon name=\"chevron-up\" />\n </Stepper>\n <Stepper {...decrementButtonProps}>\n <Icon name=\"chevron-down\" />\n </Stepper>\n </div>\n </div>\n ),\n };\n};\n\nconst Stepper = (props: AriaButtonProps) => {\n const buttonRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(props, buttonRef);\n\n return (\n <button {...buttonProps} className={styles['numberField-stepper']} ref={buttonRef}>\n {props.children}\n </button>\n );\n};\n\nexport { useNumberField };\nexport type { UseNumberFieldProps };\n"],"names":["suffix","label","isActive","value","isInvalid","hint","useReactAriaNumberField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA,gBAAgB,SAAS;AAAA,EACzB,GAAG;AACL,MAA6B;AAC3B,QAAM,UAAU,GAAG,OAAO,kBAAkB,SAAS;AAGnD,SAAA,oBAAC,UAAM,GAAG,MAAM,gBAAc,QAAQ,WAAW,SAAS,UAE1D,IAAA,CAAA;AAEJ;ACRA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB,SAAS;AAAA,EACzB,GAAG;AACL,MAAkB;AAChB,QAAM,UAAU,GAAG,OAAO,OAAO,WAAW,YAAY,OAAO,aA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