@launchpad-ui/form 0.7.1 → 0.7.4
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.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
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;AAAAA,EACAS;AAAAA,EACAC,WAAW;AAAA,EACXC,WAAW;AAAA,EACX,gBAAgBV,SAAS;AAAA,KACtBC;AACO,MAAM;AAChB,QAAMC,UAAUC,GAAGC,OAAOO,OAAOZ,WAAWQ,YAAYH,OAAOQ,aAAa;AAE5E,8BACE,SAAA;AAAA,IAAA,GAAWX;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ,UAAA,CACvDM,UACAE,YAAY,CAACD,gCAAY,SAAA;AAAA,MAAO,WAAWL,OAAOS;AAAAA,MAAc,UAAC;AAAA,IAAA,CAAkB,GACnFJ,YAAY,CAACC,YAAaI,oBAAA,kBAAmB,CAAA,CAAA,CAAA;AAAA,EAAA,CACxC;AAEZ;ACjBMC,MAAAA,WAAWC,WACf,CACE;AAAA,EACE,cAAcC;AAAAA,EACd,mBAAmBC;AAAAA,EACnBV;AAAAA,EACAD;AAAAA,EACAY;AAAAA,EACAC;AAAAA,EACA,gBAAgBpB,SAAS;AAAA,KACtBC;AACL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AA,EAAA,CAElD;AAEb;ACXM6G,MAAAA,WAAW/F,WACf,CAAC;AAAA,EAAEjB;AAAAA,EAAW,gBAAgBC,SAAS;AAAA,KAAgBkE;AAAM,GAAG7C,QAAQ;AAChE2F,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,6BACE,YAAA;AAAA,IAAA,GACMnD;AAAAA,IACJ,WAAW/D,GAAGC,OAAO+B,WAAWpC,SAAS;AAAA,IACzC;AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBkE,MAAM,uBAAuB5B,mBAAmB4B,MAAM3B,EAAE;AAAA,IAC1E;AAAA,EAAA,CACA;AAEN,CAAC;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","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmBA,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,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,KACtBC;AACO,MAAM;AAChB,QAAMC,UAAUC,GAAGC,OAAOO,OAAOZ,WAAWS,YAAYJ,OAAOQ,aAAa;AAE5E,8BACE,SAAA;AAAA,IAA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A,EAAAA,CACA;AAEN,CAAC;AAGHD,SAAStF,cAAc;"}
|
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","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AACkB,MAAM;AAC3B,QAAMC,UAAUC,QAAAA,GAAGC,OAAOC,kBAAkBN,SAAS;AAErD,wCACE,QAAA;AAAA,IAAA,GAAUE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ,UAAC;AAAA,EAAA,CAEnD;AAEX;ACRA,MAAMI,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAR;AAAAA,EACAS;AAAAA,EACAC,WAAW;AAAA,EACXC,WAAW;AAAA,EACX,gBAAgBV,SAAS;AAAA,KACtBC;AACO,MAAM;AAChB,QAAMC,UAAUC,QAAGC,GAAAA,OAAOO,OAAOZ,WAAWQ,YAAYH,OAAOQ,aAAa;AAE5E,yCACE,SAAA;AAAA,IAAA,GAAWX;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ,UAAA,CACvDM,UACAE,YAAY,CAACD,2CAAY,SAAA;AAAA,MAAO,WAAWL,OAAOS;AAAAA,MAAc,UAAC;AAAA,IAAA,CAAkB,GACnFJ,YAAY,CAACC,YAAaI,2BAAAA,IAAA,kBAAmB,CAAA,CAAA,CAAA;AAAA,EAAA,CACxC;AAEZ;ACjBMC,MAAAA,WAAWC,iBACf,CACE;AAAA,EACE,cAAcC;AAAAA,EACd,mBAAmBC;AAAAA,EACnBV;AAAAA,EACAD;AAAAA,EACAY;AAAAA,EACAC;AAAAA,EACA,gBAAgBpB,SAAS;AAAA,KACtBC;AACL,GACAoB,QACG;AACGC,QAAAA,eAAeL,cAAcM,UAAaL,mBAAmBK;AAC/D,MAAA,CAACf,YAAY,CAAC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AUC,QAAAA,GAAGC,OAAO+B,WAAWpC,SAAS;AAE9C,wCACE,UAAA;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,W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AYA,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,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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@launchpad-ui/form",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.4",
|
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.
|
32
|
-
"@launchpad-ui/tokens": "~0.4.
|
31
|
+
"@launchpad-ui/icons": "~0.7.1",
|
32
|
+
"@launchpad-ui/tokens": "~0.4.10"
|
33
33
|
},
|
34
34
|
"peerDependencies": {
|
35
35
|
"react": "18.2.0",
|