@launchpad-ui/form 0.7.3 → 0.8.0
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 +28 -28
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/dist/style.css +83 -77
- package/package.json +3 -3
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 = "
|
7
|
-
const formIncreasedErrorMargin = "
|
8
|
-
const formInline = "
|
9
|
-
const form = "
|
10
|
-
const formInput = "
|
11
|
-
const isFocused = "
|
12
|
-
const iconField = "
|
13
|
-
const suffixContainer = "
|
14
|
-
const isInvalid = "
|
15
|
-
const inlineForm = "
|
16
|
-
const label = "
|
17
|
-
const labelDisabled = "
|
18
|
-
const labelOptional = "
|
19
|
-
const compactTextField = "
|
20
|
-
const fieldError = "
|
21
|
-
const hint = "
|
22
|
-
const field = "
|
23
|
-
const fieldErrorMessage = "
|
24
|
-
const isDisabled = "
|
25
|
-
const checkbox = "
|
26
|
-
const radio = "
|
27
|
-
const number = "
|
28
|
-
const suffix = "
|
29
|
-
const iconFieldIcon = "
|
30
|
-
const formInputTiny = "
|
31
|
-
const requiredAsterisk = "
|
32
|
-
const fieldSet = "
|
33
|
-
const isActive = "
|
6
|
+
const formGroup = "_formGroup_1icaj_10";
|
7
|
+
const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1icaj_18";
|
8
|
+
const formInline = "_formInline_1icaj_22";
|
9
|
+
const form = "_form_1icaj_10";
|
10
|
+
const formInput = "_formInput_1icaj_36";
|
11
|
+
const isFocused = "_isFocused_1icaj_56";
|
12
|
+
const iconField = "_iconField_1icaj_73";
|
13
|
+
const suffixContainer = "_suffixContainer_1icaj_77";
|
14
|
+
const isInvalid = "_isInvalid_1icaj_82";
|
15
|
+
const inlineForm = "_inlineForm_1icaj_93";
|
16
|
+
const label = "_label_1icaj_98";
|
17
|
+
const labelDisabled = "_labelDisabled_1icaj_104";
|
18
|
+
const labelOptional = "_labelOptional_1icaj_108";
|
19
|
+
const compactTextField = "_compactTextField_1icaj_114";
|
20
|
+
const fieldError = "_fieldError_1icaj_138";
|
21
|
+
const hint = "_hint_1icaj_180";
|
22
|
+
const field = "_field_1icaj_138";
|
23
|
+
const fieldErrorMessage = "_fieldErrorMessage_1icaj_200";
|
24
|
+
const isDisabled = "_isDisabled_1icaj_213";
|
25
|
+
const checkbox = "_checkbox_1icaj_280";
|
26
|
+
const radio = "_radio_1icaj_287";
|
27
|
+
const number = "_number_1icaj_291";
|
28
|
+
const suffix = "_suffix_1icaj_77";
|
29
|
+
const iconFieldIcon = "_iconFieldIcon_1icaj_329";
|
30
|
+
const formInputTiny = "_formInputTiny_1icaj_337";
|
31
|
+
const requiredAsterisk = "_requiredAsterisk_1icaj_346";
|
32
|
+
const fieldSet = "_fieldSet_1icaj_350";
|
33
|
+
const isActive = "_isActive_1icaj_361";
|
34
34
|
const styles = {
|
35
35
|
formGroup,
|
36
36
|
formIncreasedErrorMargin,
|
package/dist/index.es.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/SelectField.tsx","../src/TextArea.tsx"],"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 { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\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} required={isRequired}>\n {label}\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 SelectFieldProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectFieldProps) => {\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 { SelectField };\nexport type { SelectFieldProps };\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","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","SelectField","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,GAAGC,OAAOC,kBAAkBN,SAAS;AAErD,6BACE,QAAA;AAAA,IAAA,GAAUE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ,UAAC;AAAA,EAAA,CAEnD;AAEX;ACRA,MAAMI,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAR;AAA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,CAAC;AAGHwE,SAASpF,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/SelectField.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 { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\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} required={isRequired}>\n {label}\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 SelectFieldProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectFieldProps) => {\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 { SelectField };\nexport type { SelectFieldProps };\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","children","Label","disabled","required","optional","label","labelDisabled","labelOptional","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","_jsx","checkbox","type","displayName","TextField","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","htmlFor","style","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","field","fieldErrorMessage","IconField","icon","Icon","iconField","size","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","VisuallyHidden","SelectField","TextArea","onKeyDown","e","key","stopProp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AAcD;AAAAA,IAAQD,WAAWG;AAAAA,IAAQI;AAAAA,EAAAA,CAElD;AAEb;ACXM4G,MAAAA,WAAWnG,WACf,CAAC;AAAA,EAAEhB;AAAAA,EAAW,gBAAgBC,SAAS;AAAA,KAAgBoE;AAAM,GAAGhD,QAAQ;AAChE+F,QAAAA,YAAYA,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,6BACE,YAAA;AAAA,IAAA,GACMpD;AAAAA,IACJrE,WAAWI,GAAGC,OAAO+B,WAAWpC,SAAS;AAAA,IACzCqB;AAAAA,IACA,gBAAcpB;AAAAA,IACd,oBAAkBoE,MAAM,uBAAuB9B,mBAAmB8B,MAAM7B,EAAE;AAAA,IAC1E4E;AAAAA,EAAAA,CACA;AAEN,CAAC;AAGHD,SAAStF,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 = "
|
9
|
-
const formIncreasedErrorMargin = "
|
10
|
-
const formInline = "
|
11
|
-
const form = "
|
12
|
-
const formInput = "
|
13
|
-
const isFocused = "
|
14
|
-
const iconField = "
|
15
|
-
const suffixContainer = "
|
16
|
-
const isInvalid = "
|
17
|
-
const inlineForm = "
|
18
|
-
const label = "
|
19
|
-
const labelDisabled = "
|
20
|
-
const labelOptional = "
|
21
|
-
const compactTextField = "
|
22
|
-
const fieldError = "
|
23
|
-
const hint = "
|
24
|
-
const field = "
|
25
|
-
const fieldErrorMessage = "
|
26
|
-
const isDisabled = "
|
27
|
-
const checkbox = "
|
28
|
-
const radio = "
|
29
|
-
const number = "
|
30
|
-
const suffix = "
|
31
|
-
const iconFieldIcon = "
|
32
|
-
const formInputTiny = "
|
33
|
-
const requiredAsterisk = "
|
34
|
-
const fieldSet = "
|
35
|
-
const isActive = "
|
8
|
+
const formGroup = "_formGroup_1icaj_10";
|
9
|
+
const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1icaj_18";
|
10
|
+
const formInline = "_formInline_1icaj_22";
|
11
|
+
const form = "_form_1icaj_10";
|
12
|
+
const formInput = "_formInput_1icaj_36";
|
13
|
+
const isFocused = "_isFocused_1icaj_56";
|
14
|
+
const iconField = "_iconField_1icaj_73";
|
15
|
+
const suffixContainer = "_suffixContainer_1icaj_77";
|
16
|
+
const isInvalid = "_isInvalid_1icaj_82";
|
17
|
+
const inlineForm = "_inlineForm_1icaj_93";
|
18
|
+
const label = "_label_1icaj_98";
|
19
|
+
const labelDisabled = "_labelDisabled_1icaj_104";
|
20
|
+
const labelOptional = "_labelOptional_1icaj_108";
|
21
|
+
const compactTextField = "_compactTextField_1icaj_114";
|
22
|
+
const fieldError = "_fieldError_1icaj_138";
|
23
|
+
const hint = "_hint_1icaj_180";
|
24
|
+
const field = "_field_1icaj_138";
|
25
|
+
const fieldErrorMessage = "_fieldErrorMessage_1icaj_200";
|
26
|
+
const isDisabled = "_isDisabled_1icaj_213";
|
27
|
+
const checkbox = "_checkbox_1icaj_280";
|
28
|
+
const radio = "_radio_1icaj_287";
|
29
|
+
const number = "_number_1icaj_291";
|
30
|
+
const suffix = "_suffix_1icaj_77";
|
31
|
+
const iconFieldIcon = "_iconFieldIcon_1icaj_329";
|
32
|
+
const formInputTiny = "_formInputTiny_1icaj_337";
|
33
|
+
const requiredAsterisk = "_requiredAsterisk_1icaj_346";
|
34
|
+
const fieldSet = "_fieldSet_1icaj_350";
|
35
|
+
const isActive = "_isActive_1icaj_361";
|
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/SelectField.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 { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\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} required={isRequired}>\n {label}\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 SelectFieldProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectFieldProps) => {\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 { SelectField };\nexport type { SelectFieldProps };\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","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","SelectField","TextArea","onKeyDown","e","key","stopPropagation","nativeEv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;AAAA,IAAA,GAAYE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ;AAAA,EAAA,CAElD;AAEb;ACXM8G,MAAAA,WAAWhG,iBACf,CAAC;AAAA,EAAEjB;AAAAA,EAAW,gBAAgBC,SAAS;AAAA,KAAgBkE;AAAM,GAAG7C,QAAQ;AAChE4F,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,GACMpD;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;AAGHyE,SAASrF,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/SelectField.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 { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\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} required={isRequired}>\n {label}\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 SelectFieldProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectFieldProps) => {\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 { SelectField };\nexport type { SelectFieldProps };\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","children","Label","disabled","required","optional","label","labelDisabled","labelOptional","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","_jsx","checkbox","type","displayName","TextField","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","htmlFor","style","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","field","fieldErrorMessage","IconField","icon","Icon","iconField","size","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","VisuallyHidden","SelectField","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmBA,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,IAAQD,WAAWG;AAAAA,IAAQI,UAAC;AAAA,EAAA,CAEnD;AAEX;ACRA,MAAMC,QAAQA,CAAC;AAAA,EACbC;AAAAA,EACAT;AAAAA,EACAO;AAAAA,EACAG,WAAW;AAAA,EACXC,WAAW;AAAA,EACX,gBAAgBV,SAAS;AAAA,KACtB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C,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,GACMpD;AAAAA,IACJrE,WAAWI,QAAAA,GAAGC,OAAO+B,WAAWpC,SAAS;AAAA,IACzCqB;AAAAA,IACA,gBAAcpB;AAAAA,IACd,oBAAkBoE,MAAM,uBAAuB9B,mBAAmB8B,MAAM7B,EAAE;AAAA,IAC1E4E;AAAAA,EAAAA,CACA;AAEN,CAAC;AAGHD,SAAStF,cAAc;;;;;;;;;;;;;;;;;"}
|
package/dist/style.css
CHANGED
@@ -1,4 +1,13 @@
|
|
1
|
-
|
1
|
+
:root,
|
2
|
+
[data-theme='default'] {
|
3
|
+
--lp-component-form-color-text-label-disabled: var(--lp-color-gray-800);
|
4
|
+
}
|
5
|
+
|
6
|
+
[data-theme='dark'] {
|
7
|
+
--lp-component-form-color-text-label-disabled: var(--lp-color-gray-400);
|
8
|
+
}
|
9
|
+
|
10
|
+
._formGroup_1icaj_10 {
|
2
11
|
margin: 2rem 0;
|
3
12
|
padding: 0;
|
4
13
|
border: none;
|
@@ -7,25 +16,25 @@
|
|
7
16
|
/* The margin for .formGroup and the min-height of .form-fieldError
|
8
17
|
should be equal to avoid content shift when errors are shown */
|
9
18
|
|
10
|
-
.
|
19
|
+
._formIncreasedErrorMargin_1icaj_18 ._formGroup_1icaj_10 {
|
11
20
|
margin: 2.8rem 0;
|
12
21
|
}
|
13
22
|
|
14
|
-
.
|
23
|
+
._formInline_1icaj_22 ._formGroup_1icaj_10 {
|
15
24
|
display: inline-block;
|
16
25
|
vertical-align: middle;
|
17
26
|
margin: 0;
|
18
27
|
}
|
19
28
|
|
20
|
-
.
|
29
|
+
._form_1icaj_10 ._formGroup_1icaj_10:first-child {
|
21
30
|
margin-top: 0;
|
22
31
|
}
|
23
32
|
|
24
|
-
.
|
33
|
+
._form_1icaj_10 ._formGroup_1icaj_10:last-child {
|
25
34
|
margin-bottom: 0;
|
26
35
|
}
|
27
36
|
|
28
|
-
.
|
37
|
+
._formInput_1icaj_36 {
|
29
38
|
display: block;
|
30
39
|
width: 100%;
|
31
40
|
padding: 0.6rem 1rem;
|
@@ -40,24 +49,24 @@
|
|
40
49
|
height: 3.2rem;
|
41
50
|
}
|
42
51
|
|
43
|
-
.
|
52
|
+
._formInput_1icaj_36:-moz-placeholder-shown {
|
44
53
|
overflow: hidden;
|
45
54
|
text-overflow: ellipsis;
|
46
55
|
}
|
47
56
|
|
48
|
-
.
|
57
|
+
._formInput_1icaj_36:placeholder-shown {
|
49
58
|
overflow: hidden;
|
50
59
|
text-overflow: ellipsis;
|
51
60
|
}
|
52
61
|
|
53
|
-
.
|
54
|
-
.
|
62
|
+
._formInput_1icaj_36._isFocused_1icaj_56,
|
63
|
+
._formInput_1icaj_36:focus {
|
55
64
|
outline: 0;
|
56
65
|
border-color: var(--lp-color-border-field-focus);
|
57
66
|
box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
|
58
67
|
}
|
59
68
|
|
60
|
-
select.
|
69
|
+
select._formInput_1icaj_36 {
|
61
70
|
-webkit-appearance: none;
|
62
71
|
-moz-appearance: none;
|
63
72
|
appearance: none;
|
@@ -69,52 +78,49 @@ select._formInput_14n27_27 {
|
|
69
78
|
padding-right: 2rem;
|
70
79
|
}
|
71
80
|
|
72
|
-
.
|
81
|
+
._iconField_1icaj_73 ._formInput_1icaj_36 {
|
73
82
|
padding-left: 3rem;
|
74
83
|
}
|
75
84
|
|
76
|
-
.
|
85
|
+
._suffixContainer_1icaj_77 ._formInput_1icaj_36 {
|
77
86
|
border: none;
|
78
87
|
border-radius: var(--lp-border-radius-regular) 0 0 var(--lp-border-radius-regular);
|
79
88
|
}
|
80
89
|
|
81
|
-
.
|
82
|
-
.
|
83
|
-
.
|
84
|
-
.
|
90
|
+
._isInvalid_1icaj_82 ._formInput_1icaj_36,
|
91
|
+
._form_1icaj_10 ._isInvalid_1icaj_82 .Select-control,
|
92
|
+
._form_1icaj_10 ._isInvalid_1icaj_82 .CustomSelect > div,
|
93
|
+
._form_1icaj_10 ._isInvalid_1icaj_82 ._formInput_1icaj_36 {
|
85
94
|
border-color: var(--lp-color-border-field-error);
|
86
95
|
}
|
87
96
|
|
88
|
-
.
|
97
|
+
._suffixContainer_1icaj_77 ._formInput_1icaj_36:focus {
|
89
98
|
box-shadow: none;
|
90
99
|
}
|
91
100
|
|
92
|
-
.
|
93
|
-
.
|
101
|
+
._inlineForm_1icaj_93 ._formGroup_1icaj_10 + ._formGroup_1icaj_10,
|
102
|
+
._inlineForm_1icaj_93 ._formGroup_1icaj_10 + .Button {
|
94
103
|
margin-left: 1rem;
|
95
104
|
}
|
96
105
|
|
97
|
-
.
|
106
|
+
._label_1icaj_98 {
|
98
107
|
font-size: 1.3rem;
|
99
108
|
font-family: var(--lp-font-family-base);
|
100
109
|
word-break: break-word;
|
101
110
|
}
|
102
111
|
|
103
|
-
.
|
112
|
+
._labelDisabled_1icaj_104 {
|
104
113
|
color: var(--lp-color-gray-800);
|
114
|
+
color: var(--lp-component-form-color-text-label-disabled);
|
105
115
|
}
|
106
116
|
|
107
|
-
|
108
|
-
color: var(--lp-color-gray-400);
|
109
|
-
}
|
110
|
-
|
111
|
-
._labelOptional_14n27_103 {
|
117
|
+
._labelOptional_1icaj_108 {
|
112
118
|
margin-left: 0.4em;
|
113
119
|
color: var(--lp-color-text-ui-secondary);
|
114
120
|
fill: var(--lp-color-text-ui-secondary);
|
115
121
|
}
|
116
122
|
|
117
|
-
.
|
123
|
+
._compactTextField_1icaj_114 ._label_1icaj_98 {
|
118
124
|
position: absolute;
|
119
125
|
top: -2px;
|
120
126
|
left: 10px;
|
@@ -128,17 +134,17 @@ select._formInput_14n27_27 {
|
|
128
134
|
z-index: 1; /* Fixes layout issue in Firefox */
|
129
135
|
}
|
130
136
|
|
131
|
-
.
|
137
|
+
._formGroup_1icaj_10 ._label_1icaj_98 {
|
132
138
|
display: flex;
|
133
139
|
align-items: center;
|
134
140
|
margin-bottom: 0.2rem;
|
135
141
|
}
|
136
142
|
|
137
|
-
.
|
143
|
+
._formGroup_1icaj_10 ._label_1icaj_98 + ._label_1icaj_98 {
|
138
144
|
margin-top: 0.5rem;
|
139
145
|
}
|
140
146
|
|
141
|
-
.
|
147
|
+
._fieldError_1icaj_138 {
|
142
148
|
color: var(--lp-color-text-feedback-error);
|
143
149
|
font-size: 1.3rem;
|
144
150
|
}
|
@@ -146,46 +152,46 @@ select._formInput_14n27_27 {
|
|
146
152
|
/* The margin for .formGroup and the min-height of .form-fieldError
|
147
153
|
should be equal to avoid content shift when errors are shown */
|
148
154
|
|
149
|
-
.
|
155
|
+
._formIncreasedErrorMargin_1icaj_18 ._fieldError_1icaj_138 {
|
150
156
|
min-height: 2.8rem;
|
151
157
|
}
|
152
158
|
|
153
|
-
.
|
159
|
+
._label_1icaj_98 ._fieldError_1icaj_138 {
|
154
160
|
float: right;
|
155
161
|
}
|
156
162
|
|
157
|
-
.
|
163
|
+
._form_1icaj_10:not(._inlineForm_1icaj_93) ._fieldError_1icaj_138 {
|
158
164
|
display: block;
|
159
165
|
padding-top: 0.5rem;
|
160
166
|
text-align: left;
|
161
167
|
}
|
162
168
|
|
163
|
-
.
|
169
|
+
._formIncreasedErrorMargin_1icaj_18:not(._inlineForm_1icaj_93) ._fieldError_1icaj_138 {
|
164
170
|
padding-top: 0.1rem;
|
165
171
|
padding-bottom: 0.5rem;
|
166
172
|
}
|
167
173
|
|
168
|
-
.
|
174
|
+
._form_1icaj_10 ._isInvalid_1icaj_82 ._label_1icaj_98 {
|
169
175
|
color: var(--lp-color-text-feedback-error);
|
170
176
|
}
|
171
177
|
|
172
|
-
.
|
178
|
+
._formInput_1icaj_36::-moz-placeholder {
|
173
179
|
color: var(--lp-color-text-field-placeholder);
|
174
180
|
}
|
175
181
|
|
176
|
-
.
|
182
|
+
._formInput_1icaj_36::placeholder {
|
177
183
|
color: var(--lp-color-text-field-placeholder);
|
178
184
|
}
|
179
185
|
|
180
|
-
.
|
186
|
+
._formIncreasedErrorMargin_1icaj_18 ._formGroup_1icaj_10._isInvalid_1icaj_82 {
|
181
187
|
margin-bottom: 0;
|
182
188
|
}
|
183
189
|
|
184
|
-
.
|
190
|
+
._formIncreasedErrorMargin_1icaj_18 ._formGroup_1icaj_10._isInvalid_1icaj_82 + ._formGroup_1icaj_10 {
|
185
191
|
margin-top: 0;
|
186
192
|
}
|
187
193
|
|
188
|
-
.
|
194
|
+
._hint_1icaj_180 {
|
189
195
|
display: block;
|
190
196
|
margin-top: 0.3rem;
|
191
197
|
font-size: 1.3rem;
|
@@ -193,75 +199,75 @@ select._formInput_14n27_27 {
|
|
193
199
|
color: var(--lp-color-text-ui-secondary);
|
194
200
|
}
|
195
201
|
|
196
|
-
.
|
202
|
+
._field_1icaj_138 ._hint_1icaj_180 {
|
197
203
|
margin: 0;
|
198
204
|
font-size: 1.3rem;
|
199
205
|
color: var(--lp-color-text-ui-secondary);
|
200
206
|
fill: var(--lp-color-text-ui-secondary);
|
201
207
|
}
|
202
208
|
|
203
|
-
.
|
204
|
-
.
|
209
|
+
._form_1icaj_10 ._field_1icaj_138 label,
|
210
|
+
._form_1icaj_10 ._field_1icaj_138 ._isInvalid_1icaj_82 label {
|
205
211
|
color: var(--lp-color-text-ui-primary);
|
206
212
|
}
|
207
213
|
|
208
|
-
.
|
214
|
+
._fieldErrorMessage_1icaj_200 {
|
209
215
|
color: var(--lp-color-text-feedback-error);
|
210
216
|
font-size: 1.3rem;
|
211
217
|
}
|
212
218
|
|
213
|
-
.
|
219
|
+
._field_1icaj_138._formGroup_1icaj_10 {
|
214
220
|
margin: 1rem 0;
|
215
221
|
}
|
216
222
|
|
217
|
-
.
|
223
|
+
._field_1icaj_138._formGroup_1icaj_10:first-child {
|
218
224
|
margin-top: 0;
|
219
225
|
}
|
220
226
|
|
221
|
-
input.
|
227
|
+
input._formInput_1icaj_36:-moz-read-only {
|
222
228
|
opacity: 1;
|
223
229
|
background-color: var(--lp-color-bg-field-disabled);
|
224
230
|
color: var(--lp-color-text-field-disabled);
|
225
231
|
border-color: var(--lp-color-border-field-disabled);
|
226
232
|
}
|
227
233
|
|
228
|
-
.
|
229
|
-
input.
|
230
|
-
select.
|
231
|
-
input.
|
234
|
+
._formInput_1icaj_36._isDisabled_1icaj_213,
|
235
|
+
input._formInput_1icaj_36:disabled,
|
236
|
+
select._formInput_1icaj_36:disabled,
|
237
|
+
input._formInput_1icaj_36:read-only {
|
232
238
|
opacity: 1;
|
233
239
|
background-color: var(--lp-color-bg-field-disabled);
|
234
240
|
color: var(--lp-color-text-field-disabled);
|
235
241
|
border-color: var(--lp-color-border-field-disabled);
|
236
242
|
}
|
237
243
|
|
238
|
-
.
|
239
|
-
.
|
244
|
+
._formInput_1icaj_36._isDisabled_1icaj_213:hover,
|
245
|
+
._formInput_1icaj_36:disabled:hover {
|
240
246
|
cursor: not-allowed;
|
241
247
|
}
|
242
248
|
|
243
|
-
textarea.
|
249
|
+
textarea._formInput_1icaj_36 {
|
244
250
|
min-height: 2.5em;
|
245
251
|
height: auto;
|
246
252
|
resize: none;
|
247
253
|
}
|
248
254
|
|
249
|
-
textarea.
|
255
|
+
textarea._formInput_1icaj_36:-moz-read-only {
|
250
256
|
opacity: 1;
|
251
257
|
color: var(--lp-color-text-field-disabled);
|
252
258
|
background-color: var(--lp-color-bg-field-disabled);
|
253
259
|
border-color: var(--lp-color-border-field-disabled);
|
254
260
|
}
|
255
261
|
|
256
|
-
textarea.
|
257
|
-
textarea.
|
262
|
+
textarea._formInput_1icaj_36:disabled,
|
263
|
+
textarea._formInput_1icaj_36:read-only {
|
258
264
|
opacity: 1;
|
259
265
|
color: var(--lp-color-text-field-disabled);
|
260
266
|
background-color: var(--lp-color-bg-field-disabled);
|
261
267
|
border-color: var(--lp-color-border-field-disabled);
|
262
268
|
}
|
263
269
|
|
264
|
-
input.
|
270
|
+
input._formInput_1icaj_36::-webkit-autofill {
|
265
271
|
box-shadow: 0 0 0 50px var(--lp-color-bg-field) inset;
|
266
272
|
}
|
267
273
|
|
@@ -294,29 +300,29 @@ input[type='checkbox']:disabled {
|
|
294
300
|
pointer-events: none;
|
295
301
|
}
|
296
302
|
|
297
|
-
.
|
298
|
-
.
|
303
|
+
._formInput_1icaj_36[readonly],
|
304
|
+
._formInput_1icaj_36[readonly]:focus {
|
299
305
|
color: var(--lp-color-text-ui-secondary);
|
300
306
|
border-color: var(--lp-color-gray-500);
|
301
307
|
box-shadow: none;
|
302
308
|
}
|
303
309
|
|
304
|
-
.
|
310
|
+
._checkbox_1icaj_280 {
|
305
311
|
align-self: flex-start; /* Default for .label is center, but this looks bad on multi-line checkbox labels */
|
306
312
|
flex-shrink: 0; /* Make sure the input itself doesn't shrink in flex layouts */
|
307
313
|
margin-right: 0.5rem;
|
308
314
|
margin-top: 0.4rem;
|
309
315
|
}
|
310
316
|
|
311
|
-
.
|
317
|
+
._radio_1icaj_287 {
|
312
318
|
margin-right: 0.5rem;
|
313
319
|
}
|
314
320
|
|
315
|
-
.
|
321
|
+
._number_1icaj_291 {
|
316
322
|
min-width: 4.5rem;
|
317
323
|
}
|
318
324
|
|
319
|
-
.
|
325
|
+
._suffixContainer_1icaj_77 {
|
320
326
|
display: inline-flex;
|
321
327
|
border: 1px solid var(--lp-color-border-field);
|
322
328
|
border-radius: var(--lp-border-radius-regular);
|
@@ -324,12 +330,12 @@ input[type='checkbox']:disabled {
|
|
324
330
|
transition: all 0.1s linear;
|
325
331
|
}
|
326
332
|
|
327
|
-
.
|
333
|
+
._suffixContainer_1icaj_77:focus-within {
|
328
334
|
border-color: var(--lp-color-border-field-focus);
|
329
335
|
box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
|
330
336
|
}
|
331
337
|
|
332
|
-
.
|
338
|
+
._suffixContainer_1icaj_77 ._suffix_1icaj_77 {
|
333
339
|
padding: 0 2px;
|
334
340
|
background-color: var(--lp-color-bg-field-aside);
|
335
341
|
color: var(--lp-color-text-ui-secondary);
|
@@ -340,8 +346,8 @@ input[type='checkbox']:disabled {
|
|
340
346
|
position: initial;
|
341
347
|
}
|
342
348
|
|
343
|
-
.
|
344
|
-
.
|
349
|
+
._suffix_1icaj_77::-webkit-outer-spin-button,
|
350
|
+
._suffix_1icaj_77::-webkit-inner-spin-button {
|
345
351
|
-webkit-appearance: none;
|
346
352
|
appearance: none;
|
347
353
|
margin: 0;
|
@@ -349,13 +355,13 @@ input[type='checkbox']:disabled {
|
|
349
355
|
|
350
356
|
/* Firefox */
|
351
357
|
|
352
|
-
.
|
358
|
+
._suffix_1icaj_77[type='number'] {
|
353
359
|
-webkit-appearance: textfield;
|
354
360
|
-moz-appearance: textfield;
|
355
361
|
appearance: textfield;
|
356
362
|
}
|
357
363
|
|
358
|
-
.
|
364
|
+
._iconFieldIcon_1icaj_329 {
|
359
365
|
position: absolute;
|
360
366
|
fill: var(--lp-color-fill-field);
|
361
367
|
top: 50%;
|
@@ -363,31 +369,31 @@ input[type='checkbox']:disabled {
|
|
363
369
|
left: 1rem;
|
364
370
|
}
|
365
371
|
|
366
|
-
.
|
372
|
+
._formInputTiny_1icaj_337 {
|
367
373
|
padding: 0.1rem 0.6rem;
|
368
374
|
height: 2.4rem;
|
369
375
|
}
|
370
376
|
|
371
|
-
.
|
377
|
+
._iconField_1icaj_73 {
|
372
378
|
position: relative;
|
373
379
|
}
|
374
380
|
|
375
|
-
.
|
381
|
+
._requiredAsterisk_1icaj_346 {
|
376
382
|
color: var(--lp-color-text-feedback-error);
|
377
383
|
}
|
378
384
|
|
379
|
-
.
|
385
|
+
._fieldSet_1icaj_350 {
|
380
386
|
border: none;
|
381
387
|
margin: 2rem 0;
|
382
388
|
padding: 0;
|
383
389
|
}
|
384
390
|
|
385
|
-
.
|
391
|
+
._compactTextField_1icaj_114 {
|
386
392
|
position: relative;
|
387
393
|
width: 100%;
|
388
394
|
}
|
389
395
|
|
390
|
-
.
|
396
|
+
._compactTextField_1icaj_114._isActive_1icaj_361 ._label_1icaj_98 {
|
391
397
|
border-radius: var(--lp-border-radius-regular);
|
392
398
|
opacity: 1;
|
393
399
|
pointer-events: auto;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@launchpad-ui/form",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.8.0",
|
4
4
|
"status": "beta",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -28,8 +28,8 @@
|
|
28
28
|
"dependencies": {
|
29
29
|
"@react-aria/visually-hidden": "3.6.0",
|
30
30
|
"classix": "2.1.17",
|
31
|
-
"@launchpad-ui/icons": "~0.7.
|
32
|
-
"@launchpad-ui/tokens": "~0.
|
31
|
+
"@launchpad-ui/icons": "~0.7.2",
|
32
|
+
"@launchpad-ui/tokens": "~0.5.0"
|
33
33
|
},
|
34
34
|
"peerDependencies": {
|
35
35
|
"react": "18.2.0",
|