@launchpad-ui/form 0.6.12 → 0.6.14

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.
package/dist/index.es.js CHANGED
@@ -3,34 +3,34 @@ import { forwardRef, useState, useRef, Children, isValidElement, cloneElement }
3
3
  import { cx } from "classix";
4
4
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
5
  import { VisuallyHidden } from "@react-aria/visually-hidden";
6
- const formGroup = "_formGroup_1lvq8_1";
7
- const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1lvq8_9";
8
- const formInline = "_formInline_1lvq8_13";
9
- const form = "_form_1lvq8_1";
10
- const formInput = "_formInput_1lvq8_27";
11
- const isFocused = "_isFocused_1lvq8_47";
12
- const iconField = "_iconField_1lvq8_64";
13
- const suffixContainer = "_suffixContainer_1lvq8_68";
14
- const inlineForm = "_inlineForm_1lvq8_77";
15
- const label = "_label_1lvq8_82";
16
- const labelDisabled = "_labelDisabled_1lvq8_88";
17
- const labelOptional = "_labelOptional_1lvq8_92";
18
- const compactTextField = "_compactTextField_1lvq8_98";
19
- const fieldError = "_fieldError_1lvq8_122";
20
- const isInvalid = "_isInvalid_1lvq8_148";
21
- const hint = "_hint_1lvq8_170";
22
- const field = "_field_1lvq8_122";
23
- const fieldErrorMessage = "_fieldErrorMessage_1lvq8_190";
24
- const isDisabled = "_isDisabled_1lvq8_203";
25
- const checkbox = "_checkbox_1lvq8_264";
26
- const radio = "_radio_1lvq8_271";
27
- const number = "_number_1lvq8_275";
28
- const suffix = "_suffix_1lvq8_68";
29
- const iconFieldIcon = "_iconFieldIcon_1lvq8_313";
30
- const formInputTiny = "_formInputTiny_1lvq8_321";
31
- const requiredAsterisk = "_requiredAsterisk_1lvq8_330";
32
- const fieldSet = "_fieldSet_1lvq8_334";
33
- const isActive = "_isActive_1lvq8_345";
6
+ const formGroup = "_formGroup_1cqcq_1";
7
+ const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1cqcq_9";
8
+ const formInline = "_formInline_1cqcq_13";
9
+ const form = "_form_1cqcq_1";
10
+ const formInput = "_formInput_1cqcq_27";
11
+ const isFocused = "_isFocused_1cqcq_47";
12
+ const iconField = "_iconField_1cqcq_64";
13
+ const suffixContainer = "_suffixContainer_1cqcq_68";
14
+ const inlineForm = "_inlineForm_1cqcq_77";
15
+ const label = "_label_1cqcq_82";
16
+ const labelDisabled = "_labelDisabled_1cqcq_88";
17
+ const labelOptional = "_labelOptional_1cqcq_92";
18
+ const compactTextField = "_compactTextField_1cqcq_98";
19
+ const fieldError = "_fieldError_1cqcq_122";
20
+ const isInvalid = "_isInvalid_1cqcq_148";
21
+ const hint = "_hint_1cqcq_170";
22
+ const field = "_field_1cqcq_122";
23
+ const fieldErrorMessage = "_fieldErrorMessage_1cqcq_190";
24
+ const isDisabled = "_isDisabled_1cqcq_203";
25
+ const checkbox = "_checkbox_1cqcq_264";
26
+ const radio = "_radio_1cqcq_271";
27
+ const number = "_number_1cqcq_275";
28
+ const suffix = "_suffix_1cqcq_68";
29
+ const iconFieldIcon = "_iconFieldIcon_1cqcq_313";
30
+ const formInputTiny = "_formInputTiny_1cqcq_321";
31
+ const requiredAsterisk = "_requiredAsterisk_1cqcq_330";
32
+ const fieldSet = "_fieldSet_1cqcq_334";
33
+ const isActive = "_isActive_1cqcq_345";
34
34
  const styles = {
35
35
  formGroup,
36
36
  formIncreasedErrorMargin,
@@ -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/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\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 { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\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 { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\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","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } 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 = InputHTMLAttributes<HTMLInputElement> & {\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 ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\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 type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\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 id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\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 { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLFieldSetElement> & {\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\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 { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\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};\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}: 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}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className={styles.hint}>{hint}</FormHint>}\n {children}\n <FieldError className={styles.fieldErrorMessage} name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, '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 { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } 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 = TextareaHTMLAttributes<HTMLTextAreaElement> & {\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"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","styles","requiredAsterisk","Label","disabled","children","required","optional","label","labelDisabled","labelOptional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","checkbox","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","width","CompactTextField","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","compactTextField","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","fieldError","FieldSet","fieldSet","Form","props","inline","hasIncreasedErrorMargin","form","formInline","formIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","formGroup","FormHint","hint","FormField","isRequired","htmlFor","field","_jsxs","fieldErrorMessage","IconField","icon","Icon","iconField","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AAHqB,MAIG;AAC3B,QAAMC,UAAUC,GAAGC,OAAOC,kBAAkBN,SAA1B;AAElB;OACYE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAjD,UAAA;AAAA,EAAA,CADF;AAKD;ACRD,MAAMI,QAAQ,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IAAQ,KAAKgG;AAAAA,IAArC,UAAA,CACGD,UACCjF,oBAAA,UAAA;AAAA,MAAA,8BACG,gBAAD;AAAA,QAAA,UAAiBiF;AAAAA,MAAAA,CAAjB;AAAA,IAAA,CAHN,GAMEjF;SAASb;AAAAA,MAAT,UAAgB4G;AAAAA,IAAAA,CANlB,CAAA;AAAA,EAAA,CADF;AAUD;ACxGD,MAAME,SAAS,CAAC;AAAA,EACdhH;AAAAA,EACAS;AAAAA,EACA,gBAAgBR,SAAS;AAAA,KACtBC;AAJW,MAKG;AACjB,QAAMC,UAAUC,GAAGC,OAAO+B,WAAWpC,SAAnB;AAElB;OACcE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAnD;AAAA,EAAA,CADF;AAKD;ACXK8G,MAAAA,WAAWhG,WACf,CAAC;AAAA,EAAEjB;AAAAA,EAAW,gBAAgBC,SAAS;AAAA,KAAgBkE;AAAtD,GAA+D7C,QAAQ;AAChE4F,QAAAA,YAAY,CAACC,MAA0C;AAEzDA,QAAAA,EAAEC,QAAQ,gBACVD,EAAEC,QAAQ,eACVD,EAAEC,QAAQ,aACVD,EAAEC,QAAQ,aACV;AACAD,QAAEE,gBAAF;AAAA,IACD;AACGF,QAAAA,EAAEC,QAAQ,UAAU;AACtBD,QAAEG,YAAYC;IACf;AAAA,EAAA;AAGH;OAEQpD;AAAAA,IACJ,WAAW/D,GAAGC,OAAO+B,WAAWpC,SAAnB;AAAA,IACb;AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBkE,MAAM,uBAAuB5B,mBAAmB4B,MAAM3B,EAAP;AAAA,IACjE;AAAA,EAAA,CAPJ;AAUD,CA1BwB;AA6B3ByE,SAASrF,cAAc;"}
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/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\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 { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\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 { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\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","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } 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 = InputHTMLAttributes<HTMLInputElement> & {\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 ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\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 type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\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 id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\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 { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLFieldSetElement> & {\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\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 { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\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};\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}: 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}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className={styles.hint}>{hint}</FormHint>}\n {children}\n <FieldError className={styles.fieldErrorMessage} name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, '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 { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } 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 = TextareaHTMLAttributes<HTMLTextAreaElement> & {\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"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","styles","requiredAsterisk","Label","disabled","children","required","optional","label","labelDisabled","labelOptional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","checkbox","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","width","CompactTextField","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","compactTextField","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","fieldError","FieldSet","fieldSet","Form","props","inline","hasIncreasedErrorMargin","form","formInline","formIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","formGroup","FormHint","hint","FormField","isRequired","htmlFor","field","_jsxs","fieldErrorMessage","IconField","icon","Icon","iconField","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AACkB,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AACtBD,QAAEG,YAAYC;IAChB;AAAA,EAAA;AAGF,6BACE,YAAA;AAAA,IAAA,GACMpD;AAAAA,IACJ,WAAW/D,GAAGC,OAAO+B,WAAWpC,SAAS;AAAA,IACzC;AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBkE,MAAM,uBAAuB5B,mBAAmB4B,MAAM3B,EAAE;AAAA,IAC1E;AAAA,EAAA,CACA;AAEN,CAAC;AAGHyE,SAASrF,cAAc;"}
package/dist/index.js CHANGED
@@ -5,34 +5,34 @@ const react = require("react");
5
5
  const classix = require("classix");
6
6
  const jsxRuntime = require("react/jsx-runtime");
7
7
  const visuallyHidden = require("@react-aria/visually-hidden");
8
- const formGroup = "_formGroup_1lvq8_1";
9
- const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1lvq8_9";
10
- const formInline = "_formInline_1lvq8_13";
11
- const form = "_form_1lvq8_1";
12
- const formInput = "_formInput_1lvq8_27";
13
- const isFocused = "_isFocused_1lvq8_47";
14
- const iconField = "_iconField_1lvq8_64";
15
- const suffixContainer = "_suffixContainer_1lvq8_68";
16
- const inlineForm = "_inlineForm_1lvq8_77";
17
- const label = "_label_1lvq8_82";
18
- const labelDisabled = "_labelDisabled_1lvq8_88";
19
- const labelOptional = "_labelOptional_1lvq8_92";
20
- const compactTextField = "_compactTextField_1lvq8_98";
21
- const fieldError = "_fieldError_1lvq8_122";
22
- const isInvalid = "_isInvalid_1lvq8_148";
23
- const hint = "_hint_1lvq8_170";
24
- const field = "_field_1lvq8_122";
25
- const fieldErrorMessage = "_fieldErrorMessage_1lvq8_190";
26
- const isDisabled = "_isDisabled_1lvq8_203";
27
- const checkbox = "_checkbox_1lvq8_264";
28
- const radio = "_radio_1lvq8_271";
29
- const number = "_number_1lvq8_275";
30
- const suffix = "_suffix_1lvq8_68";
31
- const iconFieldIcon = "_iconFieldIcon_1lvq8_313";
32
- const formInputTiny = "_formInputTiny_1lvq8_321";
33
- const requiredAsterisk = "_requiredAsterisk_1lvq8_330";
34
- const fieldSet = "_fieldSet_1lvq8_334";
35
- const isActive = "_isActive_1lvq8_345";
8
+ const formGroup = "_formGroup_1cqcq_1";
9
+ const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1cqcq_9";
10
+ const formInline = "_formInline_1cqcq_13";
11
+ const form = "_form_1cqcq_1";
12
+ const formInput = "_formInput_1cqcq_27";
13
+ const isFocused = "_isFocused_1cqcq_47";
14
+ const iconField = "_iconField_1cqcq_64";
15
+ const suffixContainer = "_suffixContainer_1cqcq_68";
16
+ const inlineForm = "_inlineForm_1cqcq_77";
17
+ const label = "_label_1cqcq_82";
18
+ const labelDisabled = "_labelDisabled_1cqcq_88";
19
+ const labelOptional = "_labelOptional_1cqcq_92";
20
+ const compactTextField = "_compactTextField_1cqcq_98";
21
+ const fieldError = "_fieldError_1cqcq_122";
22
+ const isInvalid = "_isInvalid_1cqcq_148";
23
+ const hint = "_hint_1cqcq_170";
24
+ const field = "_field_1cqcq_122";
25
+ const fieldErrorMessage = "_fieldErrorMessage_1cqcq_190";
26
+ const isDisabled = "_isDisabled_1cqcq_203";
27
+ const checkbox = "_checkbox_1cqcq_264";
28
+ const radio = "_radio_1cqcq_271";
29
+ const number = "_number_1cqcq_275";
30
+ const suffix = "_suffix_1cqcq_68";
31
+ const iconFieldIcon = "_iconFieldIcon_1cqcq_313";
32
+ const formInputTiny = "_formInputTiny_1cqcq_321";
33
+ const requiredAsterisk = "_requiredAsterisk_1cqcq_330";
34
+ const fieldSet = "_fieldSet_1cqcq_334";
35
+ const isActive = "_isActive_1cqcq_345";
36
36
  const styles = {
37
37
  formGroup,
38
38
  formIncreasedErrorMargin,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.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/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\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 { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\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 { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\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","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } 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 = InputHTMLAttributes<HTMLInputElement> & {\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 ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\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 type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\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 id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\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 { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLFieldSetElement> & {\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\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 { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\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};\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}: 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}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className={styles.hint}>{hint}</FormHint>}\n {children}\n <FieldError className={styles.fieldErrorMessage} name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, '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 { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } 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 = TextareaHTMLAttributes<HTMLTextAreaElement> & {\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"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","styles","requiredAsterisk","Label","disabled","children","required","optional","label","labelDisabled","labelOptional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","checkbox","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","width","CompactTextField","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","compactTextField","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","fieldError","FieldSet","fieldSet","Form","props","inline","hasIncreasedErrorMargin","form","formInline","formIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","formGroup","FormHint","hint","FormField","isRequired","htmlFor","field","_jsxs","fieldErrorMessage","IconField","icon","Icon","iconField","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","VisuallyHidden","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AAHqB,MAIG;AAC3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AEG,YAAYC;IACf;AAAA,EAAA;AAGH;OAEQrD;AAAAA,IACJ,WAAW/D,QAAAA,GAAGC,OAAO+B,WAAWpC,SAAnB;AAAA,IACb;AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBkE,MAAM,uBAAuB5B,mBAAmB4B,MAAM3B,EAAP;AAAA,IACjE;AAAA,EAAA,CAPJ;AAUD,CA1BwB;AA6B3B0E,SAAStF,cAAc;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.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/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\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 { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\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 { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\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","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } 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 = InputHTMLAttributes<HTMLInputElement> & {\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 ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\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 type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\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 id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\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 { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLFieldSetElement> & {\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 { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\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 { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\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};\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}: 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}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className={styles.hint}>{hint}</FormHint>}\n {children}\n <FieldError className={styles.fieldErrorMessage} name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, '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 { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } 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 = TextareaHTMLAttributes<HTMLTextAreaElement> & {\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"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","styles","requiredAsterisk","Label","disabled","children","required","optional","label","labelDisabled","labelOptional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","checkbox","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","width","CompactTextField","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","compactTextField","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","fieldError","FieldSet","fieldSet","Form","props","inline","hasIncreasedErrorMargin","form","formInline","formIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","formGroup","FormHint","hint","FormField","isRequired","htmlFor","field","_jsxs","fieldErrorMessage","IconField","icon","Icon","iconField","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","VisuallyHidden","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AACkB,MAAM;AAC3B,QAAMC,UAAUC,QAAAA,GAAGC,OAAOC,kBAAkBN,SAAS;AAErD,wCACE,QAAA;AAAA,IAAA,GAAUE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ,UAAA;AAAA,EAAA,CAElD;AAEX;ACRA,MAAMI,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAR;AAAAA,EACAS;AAAAA,EACAC,WAAW;AAAA,EACXC,WAAW;AAAA,EACX,gBAAgBV,SAAS;AAAA,KACtBC;AACO,MAAM;AAChB,QAAMC,UAAUC,QAAGC,GAAAA,OAAOO,OAAOZ,WAAWQ,YAAYH,OAAOQ,aAAa;AAE5E,yCACE,SAAA;AAAA,IAAA,GAAWX;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ,UAAA,CACvDM,UACAE,YAAY,CAACD,2CAAY,SAAA;AAAA,MAAO,WAAWL,OAAOS;AAAAA,MAAc,UAAA;AAAA,IAAA,CAAmB,GACnFJ,YAAY,CAACC,YAAaI,2BAAAA,IAAA,kBAAmB,CAAA,CAAA,CAAA;AAAA,EAAA,CACxC;AAEZ;ACjBMC,MAAAA,WAAWC,iBACf,CACE;AAAA,EACE,cAA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F,2BAAA,IAAA,OAAA;AAAA,MAAA,GAASb;AAAAA,MAAI,UAAG4G;AAAAA,IAAAA,CAAa,CAAA;AAAA,EAAA,CACpB;AAEf;ACxGA,MAAMG,SAAS,CAAC;AAAA,EACdjH;AAAAA,EACAS;AAAAA,EACA,gBAAgBR,SAAS;AAAA,KACtBC;AACQ,MAAM;AACjB,QAAMC,UAAUC,QAAAA,GAAGC,OAAO+B,WAAWpC,SAAS;AAE9C,wCACE,UAAA;AAAA,IAAA,GAAYE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ;AAAA,EAAA,CAElD;AAEb;ACXM+G,MAAAA,WAAWjG,iBACf,CAAC;AAAA,EAAEjB;AAAAA,EAAW,gBAAgBC,SAAS;AAAA,KAAgBkE;AAAM,GAAG7C,QAAQ;AAChE6F,QAAAA,YAAY,CAACC,MAA0C;AAEzDA,QAAAA,EAAEC,QAAQ,gBACVD,EAAEC,QAAQ,eACVD,EAAEC,QAAQ,aACVD,EAAEC,QAAQ,aACV;AACAD,QAAEE,gBAAiB;AAAA,IACrB;AACIF,QAAAA,EAAEC,QAAQ,UAAU;AACtBD,QAAEG,YAAYC;IAChB;AAAA,EAAA;AAGF,wCACE,YAAA;AAAA,IAAA,GACMrD;AAAAA,IACJ,WAAW/D,QAAAA,GAAGC,OAAO+B,WAAWpC,SAAS;AAAA,IACzC;AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBkE,MAAM,uBAAuB5B,mBAAmB4B,MAAM3B,EAAE;AAAA,IAC1E;AAAA,EAAA,CACA;AAEN,CAAC;AAGH0E,SAAStF,cAAc;;;;;;;;;;;;;;;;;"}
package/dist/style.css CHANGED
@@ -1,4 +1,4 @@
1
- ._formGroup_1lvq8_1 {
1
+ ._formGroup_1cqcq_1 {
2
2
  margin: 2rem 0;
3
3
  padding: 0;
4
4
  border: none;
@@ -7,57 +7,57 @@
7
7
  /* The margin for .formGroup and the min-height of .form-fieldError
8
8
  should be equal to avoid content shift when errors are shown */
9
9
 
10
- ._formIncreasedErrorMargin_1lvq8_9 ._formGroup_1lvq8_1 {
10
+ ._formIncreasedErrorMargin_1cqcq_9 ._formGroup_1cqcq_1 {
11
11
  margin: 2.8rem 0;
12
12
  }
13
13
 
14
- ._formInline_1lvq8_13 ._formGroup_1lvq8_1 {
14
+ ._formInline_1cqcq_13 ._formGroup_1cqcq_1 {
15
15
  display: inline-block;
16
16
  vertical-align: middle;
17
17
  margin: 0;
18
18
  }
19
19
 
20
- ._form_1lvq8_1 ._formGroup_1lvq8_1:first-child {
20
+ ._form_1cqcq_1 ._formGroup_1cqcq_1:first-child {
21
21
  margin-top: 0;
22
22
  }
23
23
 
24
- ._form_1lvq8_1 ._formGroup_1lvq8_1:last-child {
24
+ ._form_1cqcq_1 ._formGroup_1cqcq_1:last-child {
25
25
  margin-bottom: 0;
26
26
  }
27
27
 
28
- ._formInput_1lvq8_27 {
28
+ ._formInput_1cqcq_27 {
29
29
  display: block;
30
30
  width: 100%;
31
31
  padding: 0.6rem 1rem;
32
32
  font-size: 1.3rem;
33
- font-family: var(--font-family-base);
34
- line-height: var(--line-height-base);
35
- background-color: var(--color-background-field);
36
- color: var(--color-text);
37
- border: 1px solid var(--color-gray-500);
38
- border-radius: var(--border-radius);
33
+ font-family: var(--lp-font-family-base);
34
+ line-height: var(--lp-line-height-300);
35
+ background-color: var(--lp-color-background-field);
36
+ color: var(--lp-color-text);
37
+ border: 1px solid var(--lp-color-gray-500);
38
+ border-radius: var(--lp-border-radius);
39
39
  transition: all 100ms linear;
40
40
  height: 3.2rem;
41
41
  }
42
42
 
43
- ._formInput_1lvq8_27:-moz-placeholder-shown {
43
+ ._formInput_1cqcq_27:-moz-placeholder-shown {
44
44
  overflow: hidden;
45
45
  text-overflow: ellipsis;
46
46
  }
47
47
 
48
- ._formInput_1lvq8_27:placeholder-shown {
48
+ ._formInput_1cqcq_27:placeholder-shown {
49
49
  overflow: hidden;
50
50
  text-overflow: ellipsis;
51
51
  }
52
52
 
53
- ._formInput_1lvq8_27._isFocused_1lvq8_47,
54
- ._formInput_1lvq8_27:focus {
53
+ ._formInput_1cqcq_27._isFocused_1cqcq_47,
54
+ ._formInput_1cqcq_27:focus {
55
55
  outline: 0;
56
- border-color: var(--color-focus);
56
+ border-color: var(--lp-color-focus);
57
57
  box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
58
58
  }
59
59
 
60
- select._formInput_1lvq8_27 {
60
+ select._formInput_1cqcq_27 {
61
61
  -webkit-appearance: none;
62
62
  -moz-appearance: none;
63
63
  appearance: none;
@@ -69,183 +69,183 @@ select._formInput_1lvq8_27 {
69
69
  padding-right: 2rem;
70
70
  }
71
71
 
72
- ._iconField_1lvq8_64 ._formInput_1lvq8_27 {
72
+ ._iconField_1cqcq_64 ._formInput_1cqcq_27 {
73
73
  padding-left: 3rem;
74
74
  }
75
75
 
76
- ._suffixContainer_1lvq8_68 ._formInput_1lvq8_27 {
76
+ ._suffixContainer_1cqcq_68 ._formInput_1cqcq_27 {
77
77
  border: none;
78
- border-radius: var(--border-radius) 0 0 var(--border-radius);
78
+ border-radius: var(--lp-border-radius) 0 0 var(--lp-border-radius);
79
79
  }
80
80
 
81
- ._suffixContainer_1lvq8_68 ._formInput_1lvq8_27:focus {
81
+ ._suffixContainer_1cqcq_68 ._formInput_1cqcq_27:focus {
82
82
  box-shadow: none;
83
83
  }
84
84
 
85
- ._inlineForm_1lvq8_77 ._formGroup_1lvq8_1 + ._formGroup_1lvq8_1,
86
- ._inlineForm_1lvq8_77 ._formGroup_1lvq8_1 + .Button {
85
+ ._inlineForm_1cqcq_77 ._formGroup_1cqcq_1 + ._formGroup_1cqcq_1,
86
+ ._inlineForm_1cqcq_77 ._formGroup_1cqcq_1 + .Button {
87
87
  margin-left: 1rem;
88
88
  }
89
89
 
90
- ._label_1lvq8_82 {
90
+ ._label_1cqcq_82 {
91
91
  font-size: 1.3rem;
92
- font-family: var(--font-family-base);
92
+ font-family: var(--lp-font-family-base);
93
93
  word-break: break-word;
94
94
  }
95
95
 
96
- ._labelDisabled_1lvq8_88 {
97
- color: var(--color-gray-800);
96
+ ._labelDisabled_1cqcq_88 {
97
+ color: var(--lp-color-gray-800);
98
98
  }
99
99
 
100
- ._labelOptional_1lvq8_92 {
100
+ ._labelOptional_1cqcq_92 {
101
101
  margin-left: 0.4em;
102
- color: var(--color-text-subtle-primary);
103
- fill: var(--color-text-subtle-primary);
102
+ color: var(--lp-color-text-subtle-primary);
103
+ fill: var(--lp-color-text-subtle-primary);
104
104
  }
105
105
 
106
- ._compactTextField_1lvq8_98 ._label_1lvq8_82 {
106
+ ._compactTextField_1cqcq_98 ._label_1cqcq_82 {
107
107
  position: absolute;
108
108
  top: -2px;
109
109
  left: 10px;
110
110
  padding: 0 3px;
111
- color: var(--color-text);
111
+ color: var(--lp-color-text);
112
112
  opacity: 0;
113
113
  pointer-events: none;
114
- background-color: var(--color-background);
114
+ background-color: var(--lp-color-background);
115
115
  transform-origin: 0 0; /* preserve left alignment after scaling */
116
116
  transition: all 100ms ease-in-out;
117
117
  z-index: 1; /* Fixes layout issue in Firefox */
118
118
  }
119
119
 
120
- ._formGroup_1lvq8_1 ._label_1lvq8_82 {
120
+ ._formGroup_1cqcq_1 ._label_1cqcq_82 {
121
121
  display: flex;
122
122
  align-items: center;
123
123
  margin-bottom: 0.2rem;
124
124
  }
125
125
 
126
- ._formGroup_1lvq8_1 ._label_1lvq8_82 + ._label_1lvq8_82 {
126
+ ._formGroup_1cqcq_1 ._label_1cqcq_82 + ._label_1cqcq_82 {
127
127
  margin-top: 0.5rem;
128
128
  }
129
129
 
130
- ._fieldError_1lvq8_122 {
131
- color: var(--color-system-red-600);
130
+ ._fieldError_1cqcq_122 {
131
+ color: var(--lp-color-system-red-600);
132
132
  font-size: 1.3rem;
133
133
  }
134
134
 
135
135
  /* The margin for .formGroup and the min-height of .form-fieldError
136
136
  should be equal to avoid content shift when errors are shown */
137
137
 
138
- ._formIncreasedErrorMargin_1lvq8_9 ._fieldError_1lvq8_122 {
138
+ ._formIncreasedErrorMargin_1cqcq_9 ._fieldError_1cqcq_122 {
139
139
  min-height: 2.8rem;
140
140
  }
141
141
 
142
- ._label_1lvq8_82 ._fieldError_1lvq8_122 {
142
+ ._label_1cqcq_82 ._fieldError_1cqcq_122 {
143
143
  float: right;
144
144
  }
145
145
 
146
- ._form_1lvq8_1:not(._inlineForm_1lvq8_77) ._fieldError_1lvq8_122 {
146
+ ._form_1cqcq_1:not(._inlineForm_1cqcq_77) ._fieldError_1cqcq_122 {
147
147
  display: block;
148
148
  padding-top: 0.5rem;
149
149
  text-align: left;
150
150
  }
151
151
 
152
- ._formIncreasedErrorMargin_1lvq8_9:not(._inlineForm_1lvq8_77) ._fieldError_1lvq8_122 {
152
+ ._formIncreasedErrorMargin_1cqcq_9:not(._inlineForm_1cqcq_77) ._fieldError_1cqcq_122 {
153
153
  padding-top: 0.1rem;
154
154
  padding-bottom: 0.5rem;
155
155
  }
156
156
 
157
- ._form_1lvq8_1 ._isInvalid_1lvq8_148 ._label_1lvq8_82 {
158
- color: var(--color-system-red-600);
157
+ ._form_1cqcq_1 ._isInvalid_1cqcq_148 ._label_1cqcq_82 {
158
+ color: var(--lp-color-system-red-600);
159
159
  }
160
160
 
161
161
  ::-moz-placeholder {
162
- color: var(--color-gray-600);
162
+ color: var(--lp-color-gray-600);
163
163
  }
164
164
 
165
165
  ::placeholder {
166
- color: var(--color-gray-600);
166
+ color: var(--lp-color-gray-600);
167
167
  }
168
168
 
169
- ._form_1lvq8_1 ._isInvalid_1lvq8_148 .Select-control,
170
- ._form_1lvq8_1 ._isInvalid_1lvq8_148 .CustomSelect > div,
171
- ._form_1lvq8_1 ._isInvalid_1lvq8_148 ._formInput_1lvq8_27 {
172
- border-color: var(--color-system-red-600);
169
+ ._form_1cqcq_1 ._isInvalid_1cqcq_148 .Select-control,
170
+ ._form_1cqcq_1 ._isInvalid_1cqcq_148 .CustomSelect > div,
171
+ ._form_1cqcq_1 ._isInvalid_1cqcq_148 ._formInput_1cqcq_27 {
172
+ border-color: var(--lp-color-system-red-600);
173
173
  }
174
174
 
175
- ._formIncreasedErrorMargin_1lvq8_9 ._formGroup_1lvq8_1._isInvalid_1lvq8_148 {
175
+ ._formIncreasedErrorMargin_1cqcq_9 ._formGroup_1cqcq_1._isInvalid_1cqcq_148 {
176
176
  margin-bottom: 0;
177
177
  }
178
178
 
179
- ._formIncreasedErrorMargin_1lvq8_9 ._formGroup_1lvq8_1._isInvalid_1lvq8_148 + ._formGroup_1lvq8_1 {
179
+ ._formIncreasedErrorMargin_1cqcq_9 ._formGroup_1cqcq_1._isInvalid_1cqcq_148 + ._formGroup_1cqcq_1 {
180
180
  margin-top: 0;
181
181
  }
182
182
 
183
- ._hint_1lvq8_170 {
183
+ ._hint_1cqcq_170 {
184
184
  display: block;
185
185
  margin-top: 0.3rem;
186
186
  font-size: 1.3rem;
187
- font-weight: var(--font-weight-regular);
188
- color: var(--color-text-subtle-primary);
187
+ font-weight: var(--lp-font-weight-regular);
188
+ color: var(--lp-color-text-subtle-primary);
189
189
  }
190
190
 
191
- ._field_1lvq8_122 ._hint_1lvq8_170 {
191
+ ._field_1cqcq_122 ._hint_1cqcq_170 {
192
192
  margin: 0;
193
193
  font-size: 1.3rem;
194
- color: var(--color-text-subtle-primary);
195
- fill: var(--color-text-subtle-primary);
194
+ color: var(--lp-color-text-subtle-primary);
195
+ fill: var(--lp-color-text-subtle-primary);
196
196
  }
197
197
 
198
- ._form_1lvq8_1 ._field_1lvq8_122 label,
199
- ._form_1lvq8_1 ._field_1lvq8_122 ._isInvalid_1lvq8_148 label {
200
- color: var(--color-text);
198
+ ._form_1cqcq_1 ._field_1cqcq_122 label,
199
+ ._form_1cqcq_1 ._field_1cqcq_122 ._isInvalid_1cqcq_148 label {
200
+ color: var(--lp-color-text);
201
201
  }
202
202
 
203
- ._fieldErrorMessage_1lvq8_190 {
204
- color: var(--color-system-red-600);
203
+ ._fieldErrorMessage_1cqcq_190 {
204
+ color: var(--lp-color-system-red-600);
205
205
  font-size: 1.3rem;
206
206
  }
207
207
 
208
- ._field_1lvq8_122._formGroup_1lvq8_1 {
208
+ ._field_1cqcq_122._formGroup_1cqcq_1 {
209
209
  margin: 1rem 0;
210
210
  }
211
211
 
212
- ._field_1lvq8_122._formGroup_1lvq8_1:first-child {
212
+ ._field_1cqcq_122._formGroup_1cqcq_1:first-child {
213
213
  margin-top: 0;
214
214
  }
215
215
 
216
- input._formInput_1lvq8_27:-moz-read-only {
217
- background-color: var(--color-white-100);
216
+ input._formInput_1cqcq_27:-moz-read-only {
217
+ background-color: var(--lp-color-white-100);
218
218
  }
219
219
 
220
- ._formInput_1lvq8_27._isDisabled_1lvq8_203,
221
- input._formInput_1lvq8_27:disabled,
222
- select._formInput_1lvq8_27:disabled,
223
- input._formInput_1lvq8_27:read-only {
224
- background-color: var(--color-white-100);
220
+ ._formInput_1cqcq_27._isDisabled_1cqcq_203,
221
+ input._formInput_1cqcq_27:disabled,
222
+ select._formInput_1cqcq_27:disabled,
223
+ input._formInput_1cqcq_27:read-only {
224
+ background-color: var(--lp-color-white-100);
225
225
  }
226
226
 
227
- ._formInput_1lvq8_27._isDisabled_1lvq8_203:hover,
228
- ._formInput_1lvq8_27:disabled:hover {
227
+ ._formInput_1cqcq_27._isDisabled_1cqcq_203:hover,
228
+ ._formInput_1cqcq_27:disabled:hover {
229
229
  cursor: not-allowed;
230
230
  }
231
231
 
232
- textarea._formInput_1lvq8_27 {
232
+ textarea._formInput_1cqcq_27 {
233
233
  min-height: 2.5em;
234
234
  height: auto;
235
235
  resize: none;
236
236
  }
237
237
 
238
- textarea._formInput_1lvq8_27:-moz-read-only {
239
- background-color: var(--color-white-100);
238
+ textarea._formInput_1cqcq_27:-moz-read-only {
239
+ background-color: var(--lp-color-white-100);
240
240
  }
241
241
 
242
- textarea._formInput_1lvq8_27:disabled,
243
- textarea._formInput_1lvq8_27:read-only {
244
- background-color: var(--color-white-100);
242
+ textarea._formInput_1cqcq_27:disabled,
243
+ textarea._formInput_1cqcq_27:read-only {
244
+ background-color: var(--lp-color-white-100);
245
245
  }
246
246
 
247
- input._formInput_1lvq8_27::-webkit-autofill {
248
- box-shadow: 0 0 0 50px var(--color-background-field) inset;
247
+ input._formInput_1cqcq_27::-webkit-autofill {
248
+ box-shadow: 0 0 0 50px var(--lp-color-background-field) inset;
249
249
  }
250
250
 
251
251
  /* Hide the type=search cancel button in Webkit for consistency */
@@ -277,55 +277,55 @@ input[type='checkbox']:disabled {
277
277
  pointer-events: none;
278
278
  }
279
279
 
280
- ._formInput_1lvq8_27[readonly],
281
- ._formInput_1lvq8_27[readonly]:focus {
282
- color: var(--color-text-subtle-primary);
283
- border-color: var(--color-gray-500);
280
+ ._formInput_1cqcq_27[readonly],
281
+ ._formInput_1cqcq_27[readonly]:focus {
282
+ color: var(--lp-color-text-subtle-primary);
283
+ border-color: var(--lp-color-gray-500);
284
284
  box-shadow: none;
285
285
  }
286
286
 
287
- ._checkbox_1lvq8_264 {
287
+ ._checkbox_1cqcq_264 {
288
288
  align-self: flex-start; /* Default for .label is center, but this looks bad on multi-line checkbox labels */
289
289
  flex-shrink: 0; /* Make sure the input itself doesn't shrink in flex layouts */
290
290
  margin-right: 0.5rem;
291
291
  margin-top: 0.4rem;
292
292
  }
293
293
 
294
- ._radio_1lvq8_271 {
294
+ ._radio_1cqcq_271 {
295
295
  margin-right: 0.5rem;
296
296
  }
297
297
 
298
- ._number_1lvq8_275 {
298
+ ._number_1cqcq_275 {
299
299
  min-width: 4.5rem;
300
300
  }
301
301
 
302
- ._suffixContainer_1lvq8_68 {
302
+ ._suffixContainer_1cqcq_68 {
303
303
  display: inline-flex;
304
- border: 1px solid var(--color-gray-500);
305
- border-radius: var(--border-radius);
304
+ border: 1px solid var(--lp-color-gray-500);
305
+ border-radius: var(--lp-border-radius);
306
306
  overflow: hidden;
307
307
  transition: all 0.1s linear;
308
308
  }
309
309
 
310
- ._suffixContainer_1lvq8_68[focus-within] {
311
- border-color: var(--color-focus);
310
+ ._suffixContainer_1cqcq_68[focus-within] {
311
+ border-color: var(--lp-color-focus);
312
312
  box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
313
313
  }
314
314
 
315
- ._suffixContainer_1lvq8_68[focus-within] {
316
- border-color: var(--color-focus);
315
+ ._suffixContainer_1cqcq_68[focus-within] {
316
+ border-color: var(--lp-color-focus);
317
317
  box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
318
318
  }
319
319
 
320
- ._suffixContainer_1lvq8_68:focus-within {
321
- border-color: var(--color-focus);
320
+ ._suffixContainer_1cqcq_68:focus-within {
321
+ border-color: var(--lp-color-focus);
322
322
  box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
323
323
  }
324
324
 
325
- ._suffixContainer_1lvq8_68 ._suffix_1lvq8_68 {
325
+ ._suffixContainer_1cqcq_68 ._suffix_1cqcq_68 {
326
326
  padding: 0 2px;
327
- background-color: var(--color-gray-100);
328
- color: var(--color-gray-500);
327
+ background-color: var(--lp-color-gray-100);
328
+ color: var(--lp-color-gray-500);
329
329
  cursor: text;
330
330
  display: inline-flex;
331
331
  align-items: center;
@@ -333,8 +333,8 @@ input[type='checkbox']:disabled {
333
333
  position: initial;
334
334
  }
335
335
 
336
- ._suffix_1lvq8_68::-webkit-outer-spin-button,
337
- ._suffix_1lvq8_68::-webkit-inner-spin-button {
336
+ ._suffix_1cqcq_68::-webkit-outer-spin-button,
337
+ ._suffix_1cqcq_68::-webkit-inner-spin-button {
338
338
  -webkit-appearance: none;
339
339
  appearance: none;
340
340
  margin: 0;
@@ -342,46 +342,46 @@ input[type='checkbox']:disabled {
342
342
 
343
343
  /* Firefox */
344
344
 
345
- ._suffix_1lvq8_68[type='number'] {
345
+ ._suffix_1cqcq_68[type='number'] {
346
346
  -webkit-appearance: textfield;
347
347
  -moz-appearance: textfield;
348
348
  appearance: textfield;
349
349
  }
350
350
 
351
- ._iconFieldIcon_1lvq8_313 {
351
+ ._iconFieldIcon_1cqcq_313 {
352
352
  position: absolute;
353
- fill: var(--color-gray-600);
353
+ fill: var(--lp-color-gray-600);
354
354
  top: 50%;
355
355
  transform: translateY(-50%);
356
356
  left: 1rem;
357
357
  }
358
358
 
359
- ._formInputTiny_1lvq8_321 {
359
+ ._formInputTiny_1cqcq_321 {
360
360
  padding: 0.1rem 0.6rem;
361
361
  height: 2.4rem;
362
362
  }
363
363
 
364
- ._iconField_1lvq8_64 {
364
+ ._iconField_1cqcq_64 {
365
365
  position: relative;
366
366
  }
367
367
 
368
- ._requiredAsterisk_1lvq8_330 {
369
- color: var(--color-system-red-700);
368
+ ._requiredAsterisk_1cqcq_330 {
369
+ color: var(--lp-color-system-red-700);
370
370
  }
371
371
 
372
- ._fieldSet_1lvq8_334 {
372
+ ._fieldSet_1cqcq_334 {
373
373
  border: none;
374
374
  margin: 2rem 0;
375
375
  padding: 0;
376
376
  }
377
377
 
378
- ._compactTextField_1lvq8_98 {
378
+ ._compactTextField_1cqcq_98 {
379
379
  position: relative;
380
380
  width: 100%;
381
381
  }
382
382
 
383
- ._compactTextField_1lvq8_98._isActive_1lvq8_345 ._label_1lvq8_82 {
384
- border-radius: var(--border-radius);
383
+ ._compactTextField_1cqcq_98._isActive_1cqcq_345 ._label_1cqcq_82 {
384
+ border-radius: var(--lp-border-radius);
385
385
  opacity: 1;
386
386
  pointer-events: auto;
387
387
  transform: translate(0, -8px) scale(0.9); /* 2d transform to avoid webkit blurry text */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchpad-ui/form",
3
- "version": "0.6.12",
3
+ "version": "0.6.14",
4
4
  "status": "beta",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "source": "src/index.ts",
28
28
  "dependencies": {
29
- "@launchpad-ui/icons": "~0.5.8",
30
- "@launchpad-ui/tokens": "~0.1.5",
29
+ "@launchpad-ui/icons": "~0.6.0",
30
+ "@launchpad-ui/tokens": "~0.2.0",
31
31
  "@react-aria/visually-hidden": "^3.5.0",
32
32
  "classix": "^2.1.13"
33
33
  },