@launchpad-ui/form 0.6.11 → 0.6.13
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 +32 -32
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +32 -32
- package/dist/index.js.map +1 -1
- package/dist/style.css +154 -158
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
@@ -3,57 +3,57 @@ 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
|
11
|
-
const
|
12
|
-
const
|
13
|
-
const
|
14
|
-
const
|
15
|
-
const
|
16
|
-
const
|
17
|
-
const
|
18
|
-
const
|
19
|
-
const
|
20
|
-
const
|
21
|
-
const
|
22
|
-
const
|
23
|
-
const
|
24
|
-
const
|
25
|
-
const
|
26
|
-
const
|
27
|
-
const
|
28
|
-
const suffix = "
|
29
|
-
const iconFieldIcon = "
|
30
|
-
const formInputTiny = "
|
31
|
-
const requiredAsterisk = "
|
32
|
-
const fieldSet = "
|
33
|
-
const isActive = "
|
6
|
+
const formGroup = "_formGroup_1cqcq_1";
|
7
|
+
const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1cqcq_9";
|
8
|
+
const formInline = "_formInline_1cqcq_13";
|
9
|
+
const form = "_form_1cqcq_1";
|
10
|
+
const formInput = "_formInput_1cqcq_27";
|
11
|
+
const isFocused = "_isFocused_1cqcq_47";
|
12
|
+
const iconField = "_iconField_1cqcq_64";
|
13
|
+
const suffixContainer = "_suffixContainer_1cqcq_68";
|
14
|
+
const inlineForm = "_inlineForm_1cqcq_77";
|
15
|
+
const label = "_label_1cqcq_82";
|
16
|
+
const labelDisabled = "_labelDisabled_1cqcq_88";
|
17
|
+
const labelOptional = "_labelOptional_1cqcq_92";
|
18
|
+
const compactTextField = "_compactTextField_1cqcq_98";
|
19
|
+
const fieldError = "_fieldError_1cqcq_122";
|
20
|
+
const isInvalid = "_isInvalid_1cqcq_148";
|
21
|
+
const hint = "_hint_1cqcq_170";
|
22
|
+
const field = "_field_1cqcq_122";
|
23
|
+
const fieldErrorMessage = "_fieldErrorMessage_1cqcq_190";
|
24
|
+
const isDisabled = "_isDisabled_1cqcq_203";
|
25
|
+
const checkbox = "_checkbox_1cqcq_264";
|
26
|
+
const radio = "_radio_1cqcq_271";
|
27
|
+
const number = "_number_1cqcq_275";
|
28
|
+
const suffix = "_suffix_1cqcq_68";
|
29
|
+
const iconFieldIcon = "_iconFieldIcon_1cqcq_313";
|
30
|
+
const formInputTiny = "_formInputTiny_1cqcq_321";
|
31
|
+
const requiredAsterisk = "_requiredAsterisk_1cqcq_330";
|
32
|
+
const fieldSet = "_fieldSet_1cqcq_334";
|
33
|
+
const isActive = "_isActive_1cqcq_345";
|
34
34
|
const styles = {
|
35
35
|
formGroup,
|
36
36
|
formIncreasedErrorMargin,
|
37
37
|
formInline,
|
38
38
|
form,
|
39
|
+
formInput,
|
40
|
+
isFocused,
|
41
|
+
iconField,
|
42
|
+
suffixContainer,
|
39
43
|
inlineForm,
|
40
44
|
label,
|
41
45
|
labelDisabled,
|
42
46
|
labelOptional,
|
43
47
|
compactTextField,
|
44
48
|
fieldError,
|
45
|
-
iconField,
|
46
|
-
formInput,
|
47
49
|
isInvalid,
|
48
50
|
hint,
|
49
51
|
field,
|
50
52
|
fieldErrorMessage,
|
51
53
|
isDisabled,
|
52
|
-
isFocused,
|
53
54
|
checkbox,
|
54
55
|
radio,
|
55
56
|
number,
|
56
|
-
suffixContainer,
|
57
57
|
suffix,
|
58
58
|
iconFieldIcon,
|
59
59
|
formInputTiny,
|
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/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLFieldSetElement> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <label htmlFor={htmlFor}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className={styles.hint}>{hint}</FormHint>}\n {children}\n <FieldError className={styles.fieldErrorMessage} name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","styles","requiredAsterisk","Label","disabled","children","required","optional","label","labelDisabled","labelOptional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","checkbox","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","width","CompactTextField","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","compactTextField","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","fieldError","FieldSet","fieldSet","Form","props","inline","hasIncreasedErrorMargin","form","formInline","formIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","formGroup","FormHint","hint","FormField","isRequired","htmlFor","field","_jsxs","fieldErrorMessage","IconField","icon","Icon","iconField","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;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AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBkE,MAAM,uBAAuB5B,mBAAmB4B,MAAM3B,EAAP;AAAA,IACjE;AAAA,EAAA,CAPJ;AAUD,CA1BwB;AA6B3ByE,SAASrF,cAAc;"}
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLFieldSetElement> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <label htmlFor={htmlFor}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className={styles.hint}>{hint}</FormHint>}\n {children}\n <FieldError className={styles.fieldErrorMessage} name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","styles","requiredAsterisk","Label","disabled","children","required","optional","label","labelDisabled","labelOptional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","checkbox","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","width","CompactTextField","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","compactTextField","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","fieldError","FieldSet","fieldSet","Form","props","inline","hasIncreasedErrorMargin","form","formInline","formIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","formGroup","FormHint","hint","FormField","isRequired","htmlFor","field","_jsxs","fieldErrorMessage","IconField","icon","Icon","iconField","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AACkB,MAAM;AAC3B,QAAMC,UAAUC,GAAGC,OAAOC,kBAAkBN,SAAS;AAErD,6BACE,QAAA;AAAA,IAAA,GAAUE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ,UAAA;AAAA,EAAA,CAElD;AAEX;ACRA,MAAMI,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAR;AAAAA,EACAS;AAAAA,EACAC,WAAW;AAAA,EACXC,WAAW;AAAA,EACX,gBAAgBV,SAAS;AAAA,KACtBC;AACO,MAAM;AAChB,QAAMC,UAAUC,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,UAAA;AAAA,IAAA,CAAmB,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,GACAoB,QACG;AACGC,QAAAA,eAAeL,cAA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AAEb;ACXM8G,MAAAA,WAAWhG,WACf,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,6BACE,YAAA;AAAA,IAAA,GACMpD;AAAAA,IACJ,WAAW/D,GAAGC,OAAO+B,WAAWpC,SAAS;AAAA,IACzC;AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBkE,MAAM,uBAAuB5B,mBAAmB4B,MAAM3B,EAAE;AAAA,IAC1E;AAAA,EAAA,CACA;AAEN,CAAC;AAGHyE,SAASrF,cAAc;"}
|
package/dist/index.js
CHANGED
@@ -5,57 +5,57 @@ 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
|
13
|
-
const
|
14
|
-
const
|
15
|
-
const
|
16
|
-
const
|
17
|
-
const
|
18
|
-
const
|
19
|
-
const
|
20
|
-
const
|
21
|
-
const
|
22
|
-
const
|
23
|
-
const
|
24
|
-
const
|
25
|
-
const
|
26
|
-
const
|
27
|
-
const
|
28
|
-
const
|
29
|
-
const
|
30
|
-
const suffix = "
|
31
|
-
const iconFieldIcon = "
|
32
|
-
const formInputTiny = "
|
33
|
-
const requiredAsterisk = "
|
34
|
-
const fieldSet = "
|
35
|
-
const isActive = "
|
8
|
+
const formGroup = "_formGroup_1cqcq_1";
|
9
|
+
const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1cqcq_9";
|
10
|
+
const formInline = "_formInline_1cqcq_13";
|
11
|
+
const form = "_form_1cqcq_1";
|
12
|
+
const formInput = "_formInput_1cqcq_27";
|
13
|
+
const isFocused = "_isFocused_1cqcq_47";
|
14
|
+
const iconField = "_iconField_1cqcq_64";
|
15
|
+
const suffixContainer = "_suffixContainer_1cqcq_68";
|
16
|
+
const inlineForm = "_inlineForm_1cqcq_77";
|
17
|
+
const label = "_label_1cqcq_82";
|
18
|
+
const labelDisabled = "_labelDisabled_1cqcq_88";
|
19
|
+
const labelOptional = "_labelOptional_1cqcq_92";
|
20
|
+
const compactTextField = "_compactTextField_1cqcq_98";
|
21
|
+
const fieldError = "_fieldError_1cqcq_122";
|
22
|
+
const isInvalid = "_isInvalid_1cqcq_148";
|
23
|
+
const hint = "_hint_1cqcq_170";
|
24
|
+
const field = "_field_1cqcq_122";
|
25
|
+
const fieldErrorMessage = "_fieldErrorMessage_1cqcq_190";
|
26
|
+
const isDisabled = "_isDisabled_1cqcq_203";
|
27
|
+
const checkbox = "_checkbox_1cqcq_264";
|
28
|
+
const radio = "_radio_1cqcq_271";
|
29
|
+
const number = "_number_1cqcq_275";
|
30
|
+
const suffix = "_suffix_1cqcq_68";
|
31
|
+
const iconFieldIcon = "_iconFieldIcon_1cqcq_313";
|
32
|
+
const formInputTiny = "_formInputTiny_1cqcq_321";
|
33
|
+
const requiredAsterisk = "_requiredAsterisk_1cqcq_330";
|
34
|
+
const fieldSet = "_fieldSet_1cqcq_334";
|
35
|
+
const isActive = "_isActive_1cqcq_345";
|
36
36
|
const styles = {
|
37
37
|
formGroup,
|
38
38
|
formIncreasedErrorMargin,
|
39
39
|
formInline,
|
40
40
|
form,
|
41
|
+
formInput,
|
42
|
+
isFocused,
|
43
|
+
iconField,
|
44
|
+
suffixContainer,
|
41
45
|
inlineForm,
|
42
46
|
label,
|
43
47
|
labelDisabled,
|
44
48
|
labelOptional,
|
45
49
|
compactTextField,
|
46
50
|
fieldError,
|
47
|
-
iconField,
|
48
|
-
formInput,
|
49
51
|
isInvalid,
|
50
52
|
hint,
|
51
53
|
field,
|
52
54
|
fieldErrorMessage,
|
53
55
|
isDisabled,
|
54
|
-
isFocused,
|
55
56
|
checkbox,
|
56
57
|
radio,
|
57
58
|
number,
|
58
|
-
suffixContainer,
|
59
59
|
suffix,
|
60
60
|
iconFieldIcon,
|
61
61
|
formInputTiny,
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLFieldSetElement> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <label htmlFor={htmlFor}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className={styles.hint}>{hint}</FormHint>}\n {children}\n <FieldError className={styles.fieldErrorMessage} name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","styles","requiredAsterisk","Label","disabled","children","required","optional","label","labelDisabled","labelOptional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","checkbox","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","width","CompactTextField","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","compactTextField","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","fieldError","FieldSet","fieldSet","Form","props","inline","hasIncreasedErrorMargin","form","formInline","formIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","formGroup","FormHint","hint","FormField","isRequired","htmlFor","field","_jsxs","fieldErrorMessage","IconField","icon","Icon","iconField","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","VisuallyHidden","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AAHqB,MAIG;AAC3B,QAAMC,UAAUC,QAAAA,GAAGC,OAAOC,kBAAkBN,SAA1B;AAElB;OACYE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAjD,UAAA;AAAA,EAAA,CADF;AAKD;ACRD,MAAMI,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAR;AAAAA,EACAS;AAAAA,EACAC,WAAW;AAAA,EACXC,WAAW;AAAA,EACX,gBAAgBV,SAAS;AAAA,KACtBC;AAPU,MAQG;AAChB,QAAMC,UAAUC,QAAGC,GAAAA,OAAOO,OAAOZ,WAAWQ,YAAYH,OAAOQ,aAA7C;AAElB;OACaX;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAlD,UAAA,CACGM,UACAE,YAAY,CAACD,2CAAY,SAAA;AAAA,MAAO,WAAWL,OAAOS;AAAAA,MAAzB,UAAA;AAAA,IAAA,CAF5B,GAGGJ,YAAY,CAACC,YAAaI,2BAAAA,IAAA,kBAH7B,CAAA,CAAA,CAAA;AAAA,EAAA,CADF;AAOD;ACjBKC,MAAAA,WAAWC,iBACf,CACE;AAAA,EACE,cAAcC;AAAAA,EACd,mBA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;AAAA,KACtBC;AAJW,MAKG;AACjB,QAAMC,UAAUC,QAAAA,GAAGC,OAAO+B,WAAWpC,SAAnB;AAElB;OACcE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAnD;AAAA,EAAA,CADF;AAKD;ACXK+G,MAAAA,WAAWjG,iBACf,CAAC;AAAA,EAAEjB;AAAAA,EAAW,gBAAgBC,SAAS;AAAA,KAAgBkE;AAAtD,GAA+D7C,QAAQ;AAChE6F,QAAAA,YAAY,CAACC,MAA0C;AAEzDA,QAAAA,EAAEC,QAAQ,gBACVD,EAAEC,QAAQ,eACVD,EAAEC,QAAQ,aACVD,EAAEC,QAAQ,aACV;AACAD,QAAEE,gBAAF;AAAA,IACD;AACGF,QAAAA,EAAEC,QAAQ,UAAU;AACtBD,QAAEG,YAAYC;IACf;AAAA,EAAA;AAGH;OAEQrD;AAAAA,IACJ,WAAW/D,QAAAA,GAAGC,OAAO+B,WAAWpC,SAAnB;AAAA,IACb;AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBkE,MAAM,uBAAuB5B,mBAAmB4B,MAAM3B,EAAP;AAAA,IACjE;AAAA,EAAA,CAPJ;AAUD,CA1BwB;AA6B3B0E,SAAStF,cAAc;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLFieldSetElement> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <label htmlFor={htmlFor}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className={styles.hint}>{hint}</FormHint>}\n {children}\n <FieldError className={styles.fieldErrorMessage} name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","styles","requiredAsterisk","Label","disabled","children","required","optional","label","labelDisabled","labelOptional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","checkbox","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","formInput","formInputTiny","suffixContainer","createFieldErrorId","id","width","CompactTextField","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","compactTextField","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","fieldError","FieldSet","fieldSet","Form","props","inline","hasIncreasedErrorMargin","form","formInline","formIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","formGroup","FormHint","hint","FormField","isRequired","htmlFor","field","_jsxs","fieldErrorMessage","IconField","icon","Icon","iconField","iconFieldIcon","Radio","labelStyle","_Fragment","radio","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","VisuallyHidden","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AACkB,MAAM;AAC3B,QAAMC,UAAUC,QAAAA,GAAGC,OAAOC,kBAAkBN,SAAS;AAErD,wCACE,QAAA;AAAA,IAAA,GAAUE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAQ,UAAA;AAAA,EAAA,CAElD;AAEX;ACRA,MAAMI,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAR;AAAAA,EACAS;AAAAA,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EG,YAAYC;IAChB;AAAA,EAAA;AAGF,wCACE,YAAA;AAAA,IAAA,GACMrD;AAAAA,IACJ,WAAW/D,QAAAA,GAAGC,OAAO+B,WAAWpC,SAAS;AAAA,IACzC;AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBkE,MAAM,uBAAuB5B,mBAAmB4B,MAAM3B,EAAE;AAAA,IAC1E;AAAA,EAAA,CACA;AAEN,CAAC;AAGH0E,SAAStF,cAAc;;;;;;;;;;;;;;;;;"}
|
package/dist/style.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.
|
1
|
+
._formGroup_1cqcq_1 {
|
2
2
|
margin: 2rem 0;
|
3
3
|
padding: 0;
|
4
4
|
border: none;
|
@@ -7,219 +7,245 @@
|
|
7
7
|
/* The margin for .formGroup and the min-height of .form-fieldError
|
8
8
|
should be equal to avoid content shift when errors are shown */
|
9
9
|
|
10
|
-
.
|
10
|
+
._formIncreasedErrorMargin_1cqcq_9 ._formGroup_1cqcq_1 {
|
11
11
|
margin: 2.8rem 0;
|
12
12
|
}
|
13
13
|
|
14
|
-
.
|
14
|
+
._formInline_1cqcq_13 ._formGroup_1cqcq_1 {
|
15
15
|
display: inline-block;
|
16
16
|
vertical-align: middle;
|
17
17
|
margin: 0;
|
18
18
|
}
|
19
19
|
|
20
|
-
.
|
20
|
+
._form_1cqcq_1 ._formGroup_1cqcq_1:first-child {
|
21
21
|
margin-top: 0;
|
22
22
|
}
|
23
23
|
|
24
|
-
.
|
24
|
+
._form_1cqcq_1 ._formGroup_1cqcq_1:last-child {
|
25
25
|
margin-bottom: 0;
|
26
26
|
}
|
27
27
|
|
28
|
-
.
|
29
|
-
|
28
|
+
._formInput_1cqcq_27 {
|
29
|
+
display: block;
|
30
|
+
width: 100%;
|
31
|
+
padding: 0.6rem 1rem;
|
32
|
+
font-size: 1.3rem;
|
33
|
+
font-family: var(--lp-font-family-base);
|
34
|
+
line-height: var(--lp-line-height-300);
|
35
|
+
background-color: var(--lp-color-background-field);
|
36
|
+
color: var(--lp-color-text);
|
37
|
+
border: 1px solid var(--lp-color-gray-500);
|
38
|
+
border-radius: var(--lp-border-radius);
|
39
|
+
transition: all 100ms linear;
|
40
|
+
height: 3.2rem;
|
41
|
+
}
|
42
|
+
|
43
|
+
._formInput_1cqcq_27:-moz-placeholder-shown {
|
44
|
+
overflow: hidden;
|
45
|
+
text-overflow: ellipsis;
|
46
|
+
}
|
47
|
+
|
48
|
+
._formInput_1cqcq_27:placeholder-shown {
|
49
|
+
overflow: hidden;
|
50
|
+
text-overflow: ellipsis;
|
51
|
+
}
|
52
|
+
|
53
|
+
._formInput_1cqcq_27._isFocused_1cqcq_47,
|
54
|
+
._formInput_1cqcq_27:focus {
|
55
|
+
outline: 0;
|
56
|
+
border-color: var(--lp-color-focus);
|
57
|
+
box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
|
58
|
+
}
|
59
|
+
|
60
|
+
select._formInput_1cqcq_27 {
|
61
|
+
-webkit-appearance: none;
|
62
|
+
-moz-appearance: none;
|
63
|
+
appearance: none;
|
64
|
+
background: transparent;
|
65
|
+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.84L12 13.42l4.59-4.58L18 10.25l-6 6-6-6 1.41-1.41z" fill="%23646f7a"/></svg>');
|
66
|
+
background-size: 2rem;
|
67
|
+
background-repeat: no-repeat;
|
68
|
+
background-position: right 0.4em top 50%, 0 0;
|
69
|
+
padding-right: 2rem;
|
70
|
+
}
|
71
|
+
|
72
|
+
._iconField_1cqcq_64 ._formInput_1cqcq_27 {
|
73
|
+
padding-left: 3rem;
|
74
|
+
}
|
75
|
+
|
76
|
+
._suffixContainer_1cqcq_68 ._formInput_1cqcq_27 {
|
77
|
+
border: none;
|
78
|
+
border-radius: var(--lp-border-radius) 0 0 var(--lp-border-radius);
|
79
|
+
}
|
80
|
+
|
81
|
+
._suffixContainer_1cqcq_68 ._formInput_1cqcq_27:focus {
|
82
|
+
box-shadow: none;
|
83
|
+
}
|
84
|
+
|
85
|
+
._inlineForm_1cqcq_77 ._formGroup_1cqcq_1 + ._formGroup_1cqcq_1,
|
86
|
+
._inlineForm_1cqcq_77 ._formGroup_1cqcq_1 + .Button {
|
30
87
|
margin-left: 1rem;
|
31
88
|
}
|
32
89
|
|
33
|
-
.
|
90
|
+
._label_1cqcq_82 {
|
34
91
|
font-size: 1.3rem;
|
35
|
-
font-family: var(--font-family-base);
|
92
|
+
font-family: var(--lp-font-family-base);
|
36
93
|
word-break: break-word;
|
37
94
|
}
|
38
95
|
|
39
|
-
.
|
40
|
-
color: var(--color-gray-800);
|
96
|
+
._labelDisabled_1cqcq_88 {
|
97
|
+
color: var(--lp-color-gray-800);
|
41
98
|
}
|
42
99
|
|
43
|
-
.
|
100
|
+
._labelOptional_1cqcq_92 {
|
44
101
|
margin-left: 0.4em;
|
45
|
-
color: var(--color-text-subtle-primary);
|
46
|
-
fill: var(--color-text-subtle-primary);
|
102
|
+
color: var(--lp-color-text-subtle-primary);
|
103
|
+
fill: var(--lp-color-text-subtle-primary);
|
47
104
|
}
|
48
105
|
|
49
|
-
.
|
106
|
+
._compactTextField_1cqcq_98 ._label_1cqcq_82 {
|
50
107
|
position: absolute;
|
51
108
|
top: -2px;
|
52
109
|
left: 10px;
|
53
110
|
padding: 0 3px;
|
54
|
-
color: var(--color-text);
|
111
|
+
color: var(--lp-color-text);
|
55
112
|
opacity: 0;
|
56
113
|
pointer-events: none;
|
57
|
-
background-color: var(--color-background);
|
114
|
+
background-color: var(--lp-color-background);
|
58
115
|
transform-origin: 0 0; /* preserve left alignment after scaling */
|
59
116
|
transition: all 100ms ease-in-out;
|
60
117
|
z-index: 1; /* Fixes layout issue in Firefox */
|
61
118
|
}
|
62
119
|
|
63
|
-
.
|
120
|
+
._formGroup_1cqcq_1 ._label_1cqcq_82 {
|
64
121
|
display: flex;
|
65
122
|
align-items: center;
|
66
123
|
margin-bottom: 0.2rem;
|
67
124
|
}
|
68
125
|
|
69
|
-
.
|
126
|
+
._formGroup_1cqcq_1 ._label_1cqcq_82 + ._label_1cqcq_82 {
|
70
127
|
margin-top: 0.5rem;
|
71
128
|
}
|
72
129
|
|
73
|
-
.
|
74
|
-
color: var(--color-system-red-600);
|
130
|
+
._fieldError_1cqcq_122 {
|
131
|
+
color: var(--lp-color-system-red-600);
|
75
132
|
font-size: 1.3rem;
|
76
133
|
}
|
77
134
|
|
78
135
|
/* The margin for .formGroup and the min-height of .form-fieldError
|
79
136
|
should be equal to avoid content shift when errors are shown */
|
80
137
|
|
81
|
-
.
|
138
|
+
._formIncreasedErrorMargin_1cqcq_9 ._fieldError_1cqcq_122 {
|
82
139
|
min-height: 2.8rem;
|
83
140
|
}
|
84
141
|
|
85
|
-
.
|
142
|
+
._label_1cqcq_82 ._fieldError_1cqcq_122 {
|
86
143
|
float: right;
|
87
144
|
}
|
88
145
|
|
89
|
-
.
|
146
|
+
._form_1cqcq_1:not(._inlineForm_1cqcq_77) ._fieldError_1cqcq_122 {
|
90
147
|
display: block;
|
91
148
|
padding-top: 0.5rem;
|
92
149
|
text-align: left;
|
93
150
|
}
|
94
151
|
|
95
|
-
.
|
152
|
+
._formIncreasedErrorMargin_1cqcq_9:not(._inlineForm_1cqcq_77) ._fieldError_1cqcq_122 {
|
96
153
|
padding-top: 0.1rem;
|
97
154
|
padding-bottom: 0.5rem;
|
98
155
|
}
|
99
156
|
|
100
|
-
.
|
101
|
-
|
102
|
-
}
|
103
|
-
|
104
|
-
._form_1w090_1 ._isInvalid_1w090_102 ._label_1w090_32 {
|
105
|
-
color: var(--color-system-red-600);
|
157
|
+
._form_1cqcq_1 ._isInvalid_1cqcq_148 ._label_1cqcq_82 {
|
158
|
+
color: var(--lp-color-system-red-600);
|
106
159
|
}
|
107
160
|
|
108
161
|
::-moz-placeholder {
|
109
|
-
color: var(--color-gray-600);
|
162
|
+
color: var(--lp-color-gray-600);
|
110
163
|
}
|
111
164
|
|
112
165
|
::placeholder {
|
113
|
-
color: var(--color-gray-600);
|
166
|
+
color: var(--lp-color-gray-600);
|
114
167
|
}
|
115
168
|
|
116
|
-
.
|
117
|
-
.
|
118
|
-
.
|
119
|
-
border-color: var(--color-system-red-600);
|
169
|
+
._form_1cqcq_1 ._isInvalid_1cqcq_148 .Select-control,
|
170
|
+
._form_1cqcq_1 ._isInvalid_1cqcq_148 .CustomSelect > div,
|
171
|
+
._form_1cqcq_1 ._isInvalid_1cqcq_148 ._formInput_1cqcq_27 {
|
172
|
+
border-color: var(--lp-color-system-red-600);
|
120
173
|
}
|
121
174
|
|
122
|
-
.
|
175
|
+
._formIncreasedErrorMargin_1cqcq_9 ._formGroup_1cqcq_1._isInvalid_1cqcq_148 {
|
123
176
|
margin-bottom: 0;
|
124
177
|
}
|
125
178
|
|
126
|
-
.
|
179
|
+
._formIncreasedErrorMargin_1cqcq_9 ._formGroup_1cqcq_1._isInvalid_1cqcq_148 + ._formGroup_1cqcq_1 {
|
127
180
|
margin-top: 0;
|
128
181
|
}
|
129
182
|
|
130
|
-
.
|
183
|
+
._hint_1cqcq_170 {
|
131
184
|
display: block;
|
132
185
|
margin-top: 0.3rem;
|
133
186
|
font-size: 1.3rem;
|
134
|
-
font-weight: var(--font-weight-regular);
|
135
|
-
color: var(--color-text-subtle-primary);
|
187
|
+
font-weight: var(--lp-font-weight-regular);
|
188
|
+
color: var(--lp-color-text-subtle-primary);
|
136
189
|
}
|
137
190
|
|
138
|
-
.
|
191
|
+
._field_1cqcq_122 ._hint_1cqcq_170 {
|
139
192
|
margin: 0;
|
140
193
|
font-size: 1.3rem;
|
141
|
-
color: var(--color-text-subtle-primary);
|
142
|
-
fill: var(--color-text-subtle-primary);
|
194
|
+
color: var(--lp-color-text-subtle-primary);
|
195
|
+
fill: var(--lp-color-text-subtle-primary);
|
143
196
|
}
|
144
197
|
|
145
|
-
.
|
146
|
-
.
|
147
|
-
color: var(--color-text);
|
198
|
+
._form_1cqcq_1 ._field_1cqcq_122 label,
|
199
|
+
._form_1cqcq_1 ._field_1cqcq_122 ._isInvalid_1cqcq_148 label {
|
200
|
+
color: var(--lp-color-text);
|
148
201
|
}
|
149
202
|
|
150
|
-
.
|
151
|
-
color: var(--color-system-red-600);
|
203
|
+
._fieldErrorMessage_1cqcq_190 {
|
204
|
+
color: var(--lp-color-system-red-600);
|
152
205
|
font-size: 1.3rem;
|
153
206
|
}
|
154
207
|
|
155
|
-
.
|
208
|
+
._field_1cqcq_122._formGroup_1cqcq_1 {
|
156
209
|
margin: 1rem 0;
|
157
210
|
}
|
158
211
|
|
159
|
-
.
|
212
|
+
._field_1cqcq_122._formGroup_1cqcq_1:first-child {
|
160
213
|
margin-top: 0;
|
161
214
|
}
|
162
215
|
|
163
|
-
|
164
|
-
|
165
|
-
._formInput_1w090_98 {
|
166
|
-
display: block;
|
167
|
-
width: 100%;
|
168
|
-
padding: 0.6rem 1rem;
|
169
|
-
font-size: 1.3rem;
|
170
|
-
font-family: var(--font-family-base);
|
171
|
-
line-height: var(--line-height-base);
|
172
|
-
background-color: var(--color-background-field);
|
173
|
-
color: var(--color-text);
|
174
|
-
border: 1px solid var(--color-gray-500);
|
175
|
-
border-radius: var(--border-radius);
|
176
|
-
transition: all 100ms linear;
|
177
|
-
height: 3.2rem;
|
216
|
+
input._formInput_1cqcq_27:-moz-read-only {
|
217
|
+
background-color: var(--lp-color-white-100);
|
178
218
|
}
|
179
219
|
|
180
|
-
.
|
181
|
-
|
182
|
-
|
220
|
+
._formInput_1cqcq_27._isDisabled_1cqcq_203,
|
221
|
+
input._formInput_1cqcq_27:disabled,
|
222
|
+
select._formInput_1cqcq_27:disabled,
|
223
|
+
input._formInput_1cqcq_27:read-only {
|
224
|
+
background-color: var(--lp-color-white-100);
|
183
225
|
}
|
184
226
|
|
185
|
-
.
|
186
|
-
|
187
|
-
text-overflow: ellipsis;
|
188
|
-
}
|
189
|
-
|
190
|
-
input._formInput_1w090_98:-moz-read-only {
|
191
|
-
background-color: var(--color-white-100);
|
192
|
-
}
|
193
|
-
|
194
|
-
._formInput_1w090_98._isDisabled_1w090_179,
|
195
|
-
input._formInput_1w090_98:disabled,
|
196
|
-
select._formInput_1w090_98:disabled,
|
197
|
-
input._formInput_1w090_98:read-only {
|
198
|
-
background-color: var(--color-white-100);
|
199
|
-
}
|
200
|
-
|
201
|
-
._formInput_1w090_98._isDisabled_1w090_179:hover,
|
202
|
-
._formInput_1w090_98:disabled:hover {
|
227
|
+
._formInput_1cqcq_27._isDisabled_1cqcq_203:hover,
|
228
|
+
._formInput_1cqcq_27:disabled:hover {
|
203
229
|
cursor: not-allowed;
|
204
230
|
}
|
205
231
|
|
206
|
-
textarea.
|
232
|
+
textarea._formInput_1cqcq_27 {
|
207
233
|
min-height: 2.5em;
|
208
234
|
height: auto;
|
209
235
|
resize: none;
|
210
236
|
}
|
211
237
|
|
212
|
-
textarea.
|
213
|
-
background-color: var(--color-white-100);
|
238
|
+
textarea._formInput_1cqcq_27:-moz-read-only {
|
239
|
+
background-color: var(--lp-color-white-100);
|
214
240
|
}
|
215
241
|
|
216
|
-
textarea.
|
217
|
-
textarea.
|
218
|
-
background-color: var(--color-white-100);
|
242
|
+
textarea._formInput_1cqcq_27:disabled,
|
243
|
+
textarea._formInput_1cqcq_27:read-only {
|
244
|
+
background-color: var(--lp-color-white-100);
|
219
245
|
}
|
220
246
|
|
221
|
-
input.
|
222
|
-
box-shadow: 0 0 0 50px var(--color-background-field) inset;
|
247
|
+
input._formInput_1cqcq_27::-webkit-autofill {
|
248
|
+
box-shadow: 0 0 0 50px var(--lp-color-background-field) inset;
|
223
249
|
}
|
224
250
|
|
225
251
|
/* Hide the type=search cancel button in Webkit for consistency */
|
@@ -251,83 +277,55 @@ input[type='checkbox']:disabled {
|
|
251
277
|
pointer-events: none;
|
252
278
|
}
|
253
279
|
|
254
|
-
.
|
255
|
-
.
|
256
|
-
|
257
|
-
border-color: var(--color-
|
258
|
-
box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
|
259
|
-
}
|
260
|
-
|
261
|
-
._formInput_1w090_98[readonly],
|
262
|
-
._formInput_1w090_98[readonly]:focus {
|
263
|
-
color: var(--color-text-subtle-primary);
|
264
|
-
border-color: var(--color-gray-500);
|
280
|
+
._formInput_1cqcq_27[readonly],
|
281
|
+
._formInput_1cqcq_27[readonly]:focus {
|
282
|
+
color: var(--lp-color-text-subtle-primary);
|
283
|
+
border-color: var(--lp-color-gray-500);
|
265
284
|
box-shadow: none;
|
266
285
|
}
|
267
286
|
|
268
|
-
.
|
287
|
+
._checkbox_1cqcq_264 {
|
269
288
|
align-self: flex-start; /* Default for .label is center, but this looks bad on multi-line checkbox labels */
|
270
289
|
flex-shrink: 0; /* Make sure the input itself doesn't shrink in flex layouts */
|
271
290
|
margin-right: 0.5rem;
|
272
291
|
margin-top: 0.4rem;
|
273
292
|
}
|
274
293
|
|
275
|
-
.
|
294
|
+
._radio_1cqcq_271 {
|
276
295
|
margin-right: 0.5rem;
|
277
296
|
}
|
278
297
|
|
279
|
-
|
280
|
-
-webkit-appearance: none;
|
281
|
-
-moz-appearance: none;
|
282
|
-
appearance: none;
|
283
|
-
background: transparent;
|
284
|
-
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.84L12 13.42l4.59-4.58L18 10.25l-6 6-6-6 1.41-1.41z" fill="%23646f7a"/></svg>');
|
285
|
-
background-size: 2rem;
|
286
|
-
background-repeat: no-repeat;
|
287
|
-
background-position: right 0.4em top 50%, 0 0;
|
288
|
-
padding-right: 2rem;
|
289
|
-
}
|
290
|
-
|
291
|
-
._number_1w090_268 {
|
298
|
+
._number_1cqcq_275 {
|
292
299
|
min-width: 4.5rem;
|
293
300
|
}
|
294
301
|
|
295
|
-
.
|
302
|
+
._suffixContainer_1cqcq_68 {
|
296
303
|
display: inline-flex;
|
297
|
-
border: 1px solid var(--color-gray-500);
|
298
|
-
border-radius: var(--border-radius);
|
304
|
+
border: 1px solid var(--lp-color-gray-500);
|
305
|
+
border-radius: var(--lp-border-radius);
|
299
306
|
overflow: hidden;
|
300
307
|
transition: all 0.1s linear;
|
301
308
|
}
|
302
309
|
|
303
|
-
.
|
304
|
-
border-color: var(--color-focus);
|
310
|
+
._suffixContainer_1cqcq_68[focus-within] {
|
311
|
+
border-color: var(--lp-color-focus);
|
305
312
|
box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
|
306
313
|
}
|
307
314
|
|
308
|
-
.
|
309
|
-
border-color: var(--color-focus);
|
315
|
+
._suffixContainer_1cqcq_68[focus-within] {
|
316
|
+
border-color: var(--lp-color-focus);
|
310
317
|
box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
|
311
318
|
}
|
312
319
|
|
313
|
-
.
|
314
|
-
border-color: var(--color-focus);
|
320
|
+
._suffixContainer_1cqcq_68:focus-within {
|
321
|
+
border-color: var(--lp-color-focus);
|
315
322
|
box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
|
316
323
|
}
|
317
324
|
|
318
|
-
.
|
319
|
-
border: none;
|
320
|
-
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
321
|
-
}
|
322
|
-
|
323
|
-
._suffixContainer_1w090_272 ._formInput_1w090_98:focus {
|
324
|
-
box-shadow: none;
|
325
|
-
}
|
326
|
-
|
327
|
-
._suffixContainer_1w090_272 ._suffix_1w090_272 {
|
325
|
+
._suffixContainer_1cqcq_68 ._suffix_1cqcq_68 {
|
328
326
|
padding: 0 2px;
|
329
|
-
background-color: var(--color-gray-100);
|
330
|
-
color: var(--color-gray-500);
|
327
|
+
background-color: var(--lp-color-gray-100);
|
328
|
+
color: var(--lp-color-gray-500);
|
331
329
|
cursor: text;
|
332
330
|
display: inline-flex;
|
333
331
|
align-items: center;
|
@@ -335,8 +333,8 @@ select._formInput_1w090_98 {
|
|
335
333
|
position: initial;
|
336
334
|
}
|
337
335
|
|
338
|
-
.
|
339
|
-
.
|
336
|
+
._suffix_1cqcq_68::-webkit-outer-spin-button,
|
337
|
+
._suffix_1cqcq_68::-webkit-inner-spin-button {
|
340
338
|
-webkit-appearance: none;
|
341
339
|
appearance: none;
|
342
340
|
margin: 0;
|
@@ -344,48 +342,46 @@ select._formInput_1w090_98 {
|
|
344
342
|
|
345
343
|
/* Firefox */
|
346
344
|
|
347
|
-
.
|
345
|
+
._suffix_1cqcq_68[type='number'] {
|
348
346
|
-webkit-appearance: textfield;
|
349
347
|
-moz-appearance: textfield;
|
350
348
|
appearance: textfield;
|
351
349
|
}
|
352
350
|
|
353
|
-
|
354
|
-
|
355
|
-
._iconFieldIcon_1w090_317 {
|
351
|
+
._iconFieldIcon_1cqcq_313 {
|
356
352
|
position: absolute;
|
357
|
-
fill: var(--color-gray-600);
|
353
|
+
fill: var(--lp-color-gray-600);
|
358
354
|
top: 50%;
|
359
355
|
transform: translateY(-50%);
|
360
356
|
left: 1rem;
|
361
357
|
}
|
362
358
|
|
363
|
-
.
|
359
|
+
._formInputTiny_1cqcq_321 {
|
364
360
|
padding: 0.1rem 0.6rem;
|
365
361
|
height: 2.4rem;
|
366
362
|
}
|
367
363
|
|
368
|
-
.
|
364
|
+
._iconField_1cqcq_64 {
|
369
365
|
position: relative;
|
370
366
|
}
|
371
367
|
|
372
|
-
.
|
373
|
-
color: var(--color-system-red-700);
|
368
|
+
._requiredAsterisk_1cqcq_330 {
|
369
|
+
color: var(--lp-color-system-red-700);
|
374
370
|
}
|
375
371
|
|
376
|
-
.
|
372
|
+
._fieldSet_1cqcq_334 {
|
377
373
|
border: none;
|
378
374
|
margin: 2rem 0;
|
379
375
|
padding: 0;
|
380
376
|
}
|
381
377
|
|
382
|
-
.
|
378
|
+
._compactTextField_1cqcq_98 {
|
383
379
|
position: relative;
|
384
380
|
width: 100%;
|
385
381
|
}
|
386
382
|
|
387
|
-
.
|
388
|
-
border-radius: var(--border-radius);
|
383
|
+
._compactTextField_1cqcq_98._isActive_1cqcq_345 ._label_1cqcq_82 {
|
384
|
+
border-radius: var(--lp-border-radius);
|
389
385
|
opacity: 1;
|
390
386
|
pointer-events: auto;
|
391
387
|
transform: translate(0, -8px) scale(0.9); /* 2d transform to avoid webkit blurry text */
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@launchpad-ui/form",
|
3
|
-
"version": "0.6.
|
3
|
+
"version": "0.6.13",
|
4
4
|
"status": "beta",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -26,8 +26,8 @@
|
|
26
26
|
},
|
27
27
|
"source": "src/index.ts",
|
28
28
|
"dependencies": {
|
29
|
-
"@launchpad-ui/icons": "~0.5.
|
30
|
-
"@launchpad-ui/tokens": "~0.
|
29
|
+
"@launchpad-ui/icons": "~0.5.9",
|
30
|
+
"@launchpad-ui/tokens": "~0.2.0",
|
31
31
|
"@react-aria/visually-hidden": "^3.5.0",
|
32
32
|
"classix": "^2.1.13"
|
33
33
|
},
|