@launchpad-ui/form 0.9.11 → 0.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IconField.d.ts +4 -1
- package/dist/IconField.d.ts.map +1 -1
- package/dist/index.es.js +62 -37
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +64 -39
- package/dist/index.js.map +1 -1
- package/dist/style.css +109 -91
- package/package.json +5 -3
package/dist/IconField.d.ts
CHANGED
@@ -4,8 +4,11 @@ type IconFieldProps = ComponentProps<'div'> & {
|
|
4
4
|
icon: ReactElement<IconProps>;
|
5
5
|
children: JSX.Element | JSX.Element[];
|
6
6
|
'data-test-id'?: string;
|
7
|
+
tooltip?: string | JSX.Element;
|
8
|
+
renderIconLast?: boolean;
|
9
|
+
ariaLabel?: string;
|
7
10
|
};
|
8
|
-
declare const IconField: ({ icon, children, className, "data-test-id": testId, ...rest }: IconFieldProps) => import("react/jsx-runtime").JSX.Element;
|
11
|
+
declare const IconField: ({ icon, children, className, "data-test-id": testId, tooltip, renderIconLast, ariaLabel, ...rest }: IconFieldProps) => import("react/jsx-runtime").JSX.Element;
|
9
12
|
export { IconField };
|
10
13
|
export type { IconFieldProps };
|
11
14
|
//# sourceMappingURL=IconField.d.ts.map
|
package/dist/IconField.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IconField.d.ts","sourceRoot":"","sources":["../src/IconField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"IconField.d.ts","sourceRoot":"","sources":["../src/IconField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAS1D,KAAK,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC5C,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IAC9B,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,SAAS,uGASZ,cAAc,4CA+BhB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/index.es.js
CHANGED
@@ -3,40 +3,44 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef, useRef, useMemo, useState, cloneElement, Children, isValidElement } from "react";
|
4
4
|
import { cx } from "classix";
|
5
5
|
import { Icon } from "@launchpad-ui/icons";
|
6
|
+
import { IconButton } from "@launchpad-ui/button";
|
7
|
+
import { Tooltip } from "@launchpad-ui/tooltip";
|
6
8
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
7
9
|
import { useButton } from "@react-aria/button";
|
8
10
|
import { useLocale } from "@react-aria/i18n";
|
9
11
|
import { useNumberField as useNumberField$1 } from "@react-aria/numberfield";
|
10
12
|
import { useNumberFieldState } from "@react-stately/numberfield";
|
11
|
-
const formGroup = "
|
12
|
-
const formIncreasedErrorMargin = "
|
13
|
-
const formInline = "
|
14
|
-
const form = "
|
15
|
-
const formInput = "
|
16
|
-
const isFocused = "
|
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
|
31
|
-
const
|
32
|
-
const
|
33
|
-
const
|
34
|
-
const
|
35
|
-
const
|
36
|
-
const
|
37
|
-
const
|
38
|
-
const
|
39
|
-
const
|
13
|
+
const formGroup = "_formGroup_186je_10";
|
14
|
+
const formIncreasedErrorMargin = "_formIncreasedErrorMargin_186je_18";
|
15
|
+
const formInline = "_formInline_186je_22";
|
16
|
+
const form = "_form_186je_10";
|
17
|
+
const formInput = "_formInput_186je_36";
|
18
|
+
const isFocused = "_isFocused_186je_56";
|
19
|
+
const suffixContainer = "_suffixContainer_186je_75";
|
20
|
+
const isInvalid = "_isInvalid_186je_80";
|
21
|
+
const iconField = "_iconField_186je_87";
|
22
|
+
const iconFieldIcon = "_iconFieldIcon_186je_95";
|
23
|
+
const inlineForm = "_inlineForm_186je_113";
|
24
|
+
const label = "_label_186je_118";
|
25
|
+
const labelDisabled = "_labelDisabled_186je_124";
|
26
|
+
const labelOptional = "_labelOptional_186je_128";
|
27
|
+
const compactTextField = "_compactTextField_186je_134";
|
28
|
+
const fieldError = "_fieldError_186je_158";
|
29
|
+
const hint = "_hint_186je_204";
|
30
|
+
const field = "_field_186je_158";
|
31
|
+
const fieldErrorMessage = "_fieldErrorMessage_186je_224";
|
32
|
+
const isDisabled = "_isDisabled_186je_237";
|
33
|
+
const checkbox = "_checkbox_186je_304";
|
34
|
+
const radio = "_radio_186je_311";
|
35
|
+
const number = "_number_186je_315";
|
36
|
+
const suffix = "_suffix_186je_75";
|
37
|
+
const iconFieldIconFill = "_iconFieldIconFill_186je_353";
|
38
|
+
const iconFieldButton = "_iconFieldButton_186je_357";
|
39
|
+
const formInputTiny = "_formInputTiny_186je_361";
|
40
|
+
const requiredAsterisk = "_requiredAsterisk_186je_370";
|
41
|
+
const fieldSet = "_fieldSet_186je_374";
|
42
|
+
const isActive = "_isActive_186je_385";
|
43
|
+
const numberField = "_numberField_186je_392";
|
40
44
|
const styles = {
|
41
45
|
formGroup,
|
42
46
|
formIncreasedErrorMargin,
|
@@ -44,9 +48,10 @@ const styles = {
|
|
44
48
|
form,
|
45
49
|
formInput,
|
46
50
|
isFocused,
|
47
|
-
iconField,
|
48
51
|
suffixContainer,
|
49
52
|
isInvalid,
|
53
|
+
iconField,
|
54
|
+
iconFieldIcon,
|
50
55
|
inlineForm,
|
51
56
|
label,
|
52
57
|
labelDisabled,
|
@@ -61,15 +66,16 @@ const styles = {
|
|
61
66
|
radio,
|
62
67
|
number,
|
63
68
|
suffix,
|
64
|
-
|
69
|
+
iconFieldIconFill,
|
70
|
+
iconFieldButton,
|
65
71
|
formInputTiny,
|
66
72
|
requiredAsterisk,
|
67
73
|
fieldSet,
|
68
74
|
isActive,
|
69
75
|
numberField,
|
70
|
-
"numberField-input": "_numberField-
|
71
|
-
"numberField-stepperContainer": "_numberField-
|
72
|
-
"numberField-stepper": "_numberField-
|
76
|
+
"numberField-input": "_numberField-input_186je_396",
|
77
|
+
"numberField-stepperContainer": "_numberField-stepperContainer_186je_400",
|
78
|
+
"numberField-stepper": "_numberField-stepper_186je_400"
|
73
79
|
};
|
74
80
|
const RequiredAsterisk = ({
|
75
81
|
className,
|
@@ -383,13 +389,32 @@ const IconField = ({
|
|
383
389
|
children,
|
384
390
|
className,
|
385
391
|
"data-test-id": testId = "icon-field",
|
392
|
+
tooltip,
|
393
|
+
renderIconLast = false,
|
394
|
+
ariaLabel = "More info",
|
386
395
|
...rest
|
387
396
|
}) => {
|
388
|
-
const
|
389
|
-
|
397
|
+
const iconElement = /* @__PURE__ */ cloneElement(icon, {
|
398
|
+
size: "small",
|
399
|
+
className: cx(styles.iconFieldIcon, styles.iconFieldIconFill)
|
400
|
+
});
|
401
|
+
const classes = cx(styles.iconField, renderIconLast ? "IconAfter" : "IconBefore", className);
|
402
|
+
const renderIcon = tooltip ? /* @__PURE__ */ jsx(Tooltip, { content: tooltip, targetClassName: styles.iconFieldButton, children: /* @__PURE__ */ jsx(
|
403
|
+
IconButton,
|
404
|
+
{
|
405
|
+
icon: /* @__PURE__ */ cloneElement(icon, {
|
406
|
+
className: styles.iconFieldIconFill
|
407
|
+
}),
|
408
|
+
size: "small",
|
409
|
+
className: styles.iconFieldIcon,
|
410
|
+
style: renderIconLast ? { right: "0.5rem" } : { left: "0.5rem" },
|
411
|
+
"aria-label": ariaLabel
|
412
|
+
}
|
413
|
+
) }) : iconElement;
|
390
414
|
return /* @__PURE__ */ jsxs("div", { className: classes, "data-test-id": testId, ...rest, children: [
|
415
|
+
!renderIconLast && renderIcon,
|
391
416
|
children,
|
392
|
-
renderIcon
|
417
|
+
renderIconLast && renderIcon
|
393
418
|
] });
|
394
419
|
};
|
395
420
|
const Radio = ({
|
package/dist/index.es.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/SelectField.tsx","../src/TextArea.tsx","../src/useNumberField.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = ComponentProps<'span'> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = ComponentProps<'label'> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { ComponentProps } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = ComponentProps<'input'> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","import { useMemo, useRef } from 'react';\n\ntype FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nfunction hasObjectChanged<T extends object>(obj1: T, obj2: T): boolean {\n return (\n Object.keys(obj1).length !== Object.keys(obj2).length ||\n Object.keys(obj1).some((k) => {\n const key = k as keyof T;\n return typeof obj1[key] === 'object' && typeof obj2[key] === 'object'\n ? hasObjectChanged(obj1[key] as T, obj2[key] as T)\n : obj1[key] !== obj2[key];\n })\n );\n}\n\nfunction useObjectMemo<T extends object>(obj: T) {\n const objRef = useRef(obj);\n\n return useMemo(() => {\n if (hasObjectChanged(obj, objRef.current)) {\n objRef.current = obj;\n }\n\n return objRef.current;\n }, [obj]);\n}\n\nexport { createFieldErrorId, useObjectMemo };\nexport type { FieldPath };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = ComponentProps<'input'> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n autoComplete,\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n const disablePasswordManagers = autoComplete === 'off';\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n autoComplete={autoComplete}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n data-1p-ignore={disablePasswordManagers} // \"data-1p-ignore\" is added to prevent 1Password from injecting a password autofill icon\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n autoComplete={autoComplete}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { ComponentProps } from 'react';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = ComponentProps<'span'> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n aria-label=\"Error\"\n id={createFieldErrorId(name)}\n >\n <Icon name=\"alert-rhombus\" size=\"small\" /> {errorMessage}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = ComponentProps<'fieldset'> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = ComponentProps<'form'> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = ComponentProps<'fieldset'> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = ComponentProps<'div'> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import type { FieldErrorProps } from './FieldError';\nimport type { FormHintProps } from './FormHint';\nimport type { LabelProps } from './Label';\n\nimport { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n LabelProps?: Partial<LabelProps>;\n FormHintProps?: Partial<FormHintProps>;\n FieldErrorProps?: Partial<FieldErrorProps>;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n LabelProps = {},\n FormHintProps = {},\n FieldErrorProps = {},\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <Label htmlFor={htmlFor} required={isRequired} {...LabelProps}>\n {label}\n </Label>\n )}\n {hint && (\n <FormHint className={styles.hint} {...FormHintProps}>\n {hint}\n </FormHint>\n )}\n {children}\n <FieldError\n className={styles.fieldErrorMessage}\n name={name}\n errorMessage={errorMessage}\n {...FieldErrorProps}\n />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { ComponentProps, ReactElement } from 'react';\n\nimport { cx } from 'classix';\nimport { cloneElement } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = ComponentProps<'div'> & {\n icon: ReactElement<IconProps>;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const renderIcon = cloneElement(icon, { size: 'small', className: styles.iconFieldIcon });\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n {renderIcon}\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<ComponentProps<'input'>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectFieldProps = ComponentProps<'select'> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = forwardRef<HTMLSelectElement, SelectFieldProps>(\n ({ className, children, 'data-test-id': testId = 'select', ...rest }: SelectFieldProps, ref) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes} ref={ref}>\n {children}\n </select>\n );\n }\n);\n\nSelectField.displayName = 'SelectField';\n\nexport { SelectField };\nexport type { SelectFieldProps };\n","import type { KeyboardEvent, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = ComponentProps<'textarea'> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n","import type { AriaButtonProps } from '@react-aria/button';\nimport type { AriaNumberFieldProps } from '@react-aria/numberfield';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { useButton } from '@react-aria/button';\nimport { useLocale } from '@react-aria/i18n';\nimport { useNumberField as useReactAriaNumberField } from '@react-aria/numberfield';\nimport { useNumberFieldState } from '@react-stately/numberfield';\nimport { cx } from 'classix';\nimport { useRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { useObjectMemo } from './utils';\n\ntype UseNumberFieldProps = AriaNumberFieldProps & {\n className?: string;\n 'data-test-id'?: string;\n id?: string;\n name?: string;\n};\n\nconst defaultFormatOptions: Intl.NumberFormatOptions = {\n maximumFractionDigits: 6,\n};\n\nconst useNumberField = ({\n className: rootClassName,\n 'data-test-id': testId = 'input',\n id,\n name,\n ...otherProps\n}: UseNumberFieldProps = {}): {\n fieldErrorProps: ReturnType<typeof useReactAriaNumberField>['errorMessageProps'];\n formHintProps: ReturnType<typeof useReactAriaNumberField>['descriptionProps'];\n labelProps: ReturnType<typeof useReactAriaNumberField>['labelProps'];\n renderNumberField: () => JSX.Element;\n} => {\n // @react-aria's hooks have a state-updating effect somewhere that depends on \"formatOptions\",\n // so we need to memoize it to prevent an infinite render loop.\n const formatOptions = useObjectMemo({\n ...defaultFormatOptions,\n ...otherProps.formatOptions,\n });\n const { locale } = useLocale();\n const numberFieldState = useNumberFieldState({ ...otherProps, locale, formatOptions });\n const inputRef = useRef<HTMLInputElement>(null);\n const {\n descriptionProps: formHintProps,\n errorMessageProps: fieldErrorProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useReactAriaNumberField({ ...otherProps, formatOptions, id }, numberFieldState, inputRef);\n\n return {\n fieldErrorProps,\n formHintProps,\n labelProps,\n renderNumberField: () => (\n <div {...groupProps} className={styles.numberField}>\n <input\n {...inputProps}\n className={cx(styles.formInput, styles['numberField-input'])}\n data-test-id={testId}\n name={name}\n ref={inputRef}\n />\n <div className={styles['numberField-stepperContainer']}>\n <Stepper {...incrementButtonProps}>\n <Icon name=\"expand-less\" />\n </Stepper>\n <Stepper {...decrementButtonProps}>\n <Icon name=\"expand-more\" />\n </Stepper>\n </div>\n </div>\n ),\n };\n};\n\nconst Stepper = (props: AriaButtonProps) => {\n const buttonRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(props, buttonRef);\n\n return (\n <button {...buttonProps} className={styles['numberField-stepper']} ref={buttonRef}>\n {props.children}\n </button>\n );\n};\n\nexport { useNumberField };\nexport type { UseNumberFieldProps };\n"],"names":["suffix","label","isActive","value","isInvalid","hint","useReactAriaNumberField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA,gBAAgB,SAAS;AAAA,EACzB,GAAG;AACL,MAA6B;AAC3B,QAAM,UAAU,GAAG,OAAO,kBAAkB,SAAS;AAGnD,SAAA,oBAAC,UAAM,GAAG,MAAM,gBAAc,QAAQ,WAAW,SAAS,UAE1D,IAAA,CAAA;AAEJ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AAW,OAAO,qBAAqB,GAAG,KAAK,WACrE,UAAA,MAAM,SACT,CAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/SelectField.tsx","../src/TextArea.tsx","../src/useNumberField.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = ComponentProps<'span'> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = ComponentProps<'label'> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { ComponentProps } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = ComponentProps<'input'> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","import { useMemo, useRef } from 'react';\n\ntype FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nfunction hasObjectChanged<T extends object>(obj1: T, obj2: T): boolean {\n return (\n Object.keys(obj1).length !== Object.keys(obj2).length ||\n Object.keys(obj1).some((k) => {\n const key = k as keyof T;\n return typeof obj1[key] === 'object' && typeof obj2[key] === 'object'\n ? hasObjectChanged(obj1[key] as T, obj2[key] as T)\n : obj1[key] !== obj2[key];\n })\n );\n}\n\nfunction useObjectMemo<T extends object>(obj: T) {\n const objRef = useRef(obj);\n\n return useMemo(() => {\n if (hasObjectChanged(obj, objRef.current)) {\n objRef.current = obj;\n }\n\n return objRef.current;\n }, [obj]);\n}\n\nexport { createFieldErrorId, useObjectMemo };\nexport type { FieldPath };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = ComponentProps<'input'> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n autoComplete,\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n const disablePasswordManagers = autoComplete === 'off';\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n autoComplete={autoComplete}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n data-1p-ignore={disablePasswordManagers} // \"data-1p-ignore\" is added to prevent 1Password from injecting a password autofill icon\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n autoComplete={autoComplete}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { ComponentProps } from 'react';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = ComponentProps<'span'> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n aria-label=\"Error\"\n id={createFieldErrorId(name)}\n >\n <Icon name=\"alert-rhombus\" size=\"small\" /> {errorMessage}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = ComponentProps<'fieldset'> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = ComponentProps<'form'> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = ComponentProps<'fieldset'> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = ComponentProps<'div'> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import type { FieldErrorProps } from './FieldError';\nimport type { FormHintProps } from './FormHint';\nimport type { LabelProps } from './Label';\n\nimport { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n LabelProps?: Partial<LabelProps>;\n FormHintProps?: Partial<FormHintProps>;\n FieldErrorProps?: Partial<FieldErrorProps>;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n LabelProps = {},\n FormHintProps = {},\n FieldErrorProps = {},\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <Label htmlFor={htmlFor} required={isRequired} {...LabelProps}>\n {label}\n </Label>\n )}\n {hint && (\n <FormHint className={styles.hint} {...FormHintProps}>\n {hint}\n </FormHint>\n )}\n {children}\n <FieldError\n className={styles.fieldErrorMessage}\n name={name}\n errorMessage={errorMessage}\n {...FieldErrorProps}\n />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { ComponentProps, ReactElement } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { cx } from 'classix';\nimport { cloneElement } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = ComponentProps<'div'> & {\n icon: ReactElement<IconProps>;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n tooltip?: string | JSX.Element;\n renderIconLast?: boolean;\n ariaLabel?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n tooltip,\n renderIconLast = false,\n ariaLabel = 'More info',\n ...rest\n}: IconFieldProps) => {\n const iconElement = cloneElement(icon, {\n size: 'small',\n className: cx(styles.iconFieldIcon, styles.iconFieldIconFill),\n });\n\n const classes = cx(styles.iconField, renderIconLast ? 'IconAfter' : 'IconBefore', className);\n\n const renderIcon = tooltip ? (\n <Tooltip content={tooltip} targetClassName={styles.iconFieldButton}>\n <IconButton\n icon={cloneElement(icon, {\n className: styles.iconFieldIconFill,\n })}\n size=\"small\"\n className={styles.iconFieldIcon}\n style={renderIconLast ? { right: '0.5rem' } : { left: '0.5rem' }}\n aria-label={ariaLabel}\n />\n </Tooltip>\n ) : (\n iconElement\n );\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {!renderIconLast && renderIcon}\n {children}\n {renderIconLast && renderIcon}\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<ComponentProps<'input'>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectFieldProps = ComponentProps<'select'> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = forwardRef<HTMLSelectElement, SelectFieldProps>(\n ({ className, children, 'data-test-id': testId = 'select', ...rest }: SelectFieldProps, ref) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes} ref={ref}>\n {children}\n </select>\n );\n }\n);\n\nSelectField.displayName = 'SelectField';\n\nexport { SelectField };\nexport type { SelectFieldProps };\n","import type { KeyboardEvent, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = ComponentProps<'textarea'> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n","import type { AriaButtonProps } from '@react-aria/button';\nimport type { AriaNumberFieldProps } from '@react-aria/numberfield';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { useButton } from '@react-aria/button';\nimport { useLocale } from '@react-aria/i18n';\nimport { useNumberField as useReactAriaNumberField } from '@react-aria/numberfield';\nimport { useNumberFieldState } from '@react-stately/numberfield';\nimport { cx } from 'classix';\nimport { useRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { useObjectMemo } from './utils';\n\ntype UseNumberFieldProps = AriaNumberFieldProps & {\n className?: string;\n 'data-test-id'?: string;\n id?: string;\n name?: string;\n};\n\nconst defaultFormatOptions: Intl.NumberFormatOptions = {\n maximumFractionDigits: 6,\n};\n\nconst useNumberField = ({\n className: rootClassName,\n 'data-test-id': testId = 'input',\n id,\n name,\n ...otherProps\n}: UseNumberFieldProps = {}): {\n fieldErrorProps: ReturnType<typeof useReactAriaNumberField>['errorMessageProps'];\n formHintProps: ReturnType<typeof useReactAriaNumberField>['descriptionProps'];\n labelProps: ReturnType<typeof useReactAriaNumberField>['labelProps'];\n renderNumberField: () => JSX.Element;\n} => {\n // @react-aria's hooks have a state-updating effect somewhere that depends on \"formatOptions\",\n // so we need to memoize it to prevent an infinite render loop.\n const formatOptions = useObjectMemo({\n ...defaultFormatOptions,\n ...otherProps.formatOptions,\n });\n const { locale } = useLocale();\n const numberFieldState = useNumberFieldState({ ...otherProps, locale, formatOptions });\n const inputRef = useRef<HTMLInputElement>(null);\n const {\n descriptionProps: formHintProps,\n errorMessageProps: fieldErrorProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useReactAriaNumberField({ ...otherProps, formatOptions, id }, numberFieldState, inputRef);\n\n return {\n fieldErrorProps,\n formHintProps,\n labelProps,\n renderNumberField: () => (\n <div {...groupProps} className={styles.numberField}>\n <input\n {...inputProps}\n className={cx(styles.formInput, styles['numberField-input'])}\n data-test-id={testId}\n name={name}\n ref={inputRef}\n />\n <div className={styles['numberField-stepperContainer']}>\n <Stepper {...incrementButtonProps}>\n <Icon name=\"expand-less\" />\n </Stepper>\n <Stepper {...decrementButtonProps}>\n <Icon name=\"expand-more\" />\n </Stepper>\n </div>\n </div>\n ),\n };\n};\n\nconst Stepper = (props: AriaButtonProps) => {\n const buttonRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(props, buttonRef);\n\n return (\n <button {...buttonProps} className={styles['numberField-stepper']} ref={buttonRef}>\n {props.children}\n </button>\n );\n};\n\nexport { useNumberField };\nexport type { UseNumberFieldProps };\n"],"names":["suffix","label","isActive","value","isInvalid","hint","useReactAriaNumberField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA,gBAAgB,SAAS;AAAA,EACzB,GAAG;AACL,MAA6B;AAC3B,QAAM,UAAU,GAAG,OAAO,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,QAAC;AAAA,QAAA;AAAA,UACE,GAAG;AAAA,UACJ,WAAW,GAAG,OAAO,WAAW,OAAO,mBAAmB,CAAC;AAAA,UAC3D,gBAAc;AAAA,UACd;AAAA,UACA,KAAK;AAAA,QAAA;AAAA,MACP;AAAA,MACC,qBAAA,OAAA,EAAI,WAAW,OAAO,8BAA8B,GACnD,UAAA;AAAA,QAAA,oBAAC,WAAS,GAAG,sBACX,8BAAC,MAAK,EAAA,MAAK,eAAc,EAC3B,CAAA;AAAA,QACA,oBAAC,WAAS,GAAG,sBACX,8BAAC,MAAK,EAAA,MAAK,eAAc,EAC3B,CAAA;AAAA,MAAA,GACF;AAAA,IAAA,GACF;AAAA,EAAA;AAGN;AAEA,MAAM,UAAU,CAAC,UAA2B;AACpC,QAAA,YAAY,OAA0B,IAAI;AAChD,QAAM,EAAE,YAAgB,IAAA,UAAU,OAAO,SAAS;AAGhD,SAAA,oBAAC,UAAQ,EAAA,GAAG,aAAa,WAAW,OAAO,qBAAqB,GAAG,KAAK,WACrE,UAAA,MAAM,SACT,CAAA;AAEJ;"}
|
package/dist/index.js
CHANGED
@@ -5,40 +5,44 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
5
5
|
const react = require("react");
|
6
6
|
const classix = require("classix");
|
7
7
|
const icons = require("@launchpad-ui/icons");
|
8
|
+
const button = require("@launchpad-ui/button");
|
9
|
+
const tooltip = require("@launchpad-ui/tooltip");
|
8
10
|
const visuallyHidden = require("@react-aria/visually-hidden");
|
9
|
-
const button = require("@react-aria/button");
|
11
|
+
const button$1 = require("@react-aria/button");
|
10
12
|
const i18n = require("@react-aria/i18n");
|
11
13
|
const numberfield$1 = require("@react-aria/numberfield");
|
12
14
|
const numberfield = require("@react-stately/numberfield");
|
13
|
-
const formGroup = "
|
14
|
-
const formIncreasedErrorMargin = "
|
15
|
-
const formInline = "
|
16
|
-
const form = "
|
17
|
-
const formInput = "
|
18
|
-
const isFocused = "
|
19
|
-
const
|
20
|
-
const
|
21
|
-
const
|
22
|
-
const
|
23
|
-
const
|
24
|
-
const
|
25
|
-
const
|
26
|
-
const
|
27
|
-
const
|
28
|
-
const
|
29
|
-
const
|
30
|
-
const
|
31
|
-
const
|
32
|
-
const
|
33
|
-
const
|
34
|
-
const
|
35
|
-
const
|
36
|
-
const
|
37
|
-
const
|
38
|
-
const
|
39
|
-
const
|
40
|
-
const
|
41
|
-
const
|
15
|
+
const formGroup = "_formGroup_186je_10";
|
16
|
+
const formIncreasedErrorMargin = "_formIncreasedErrorMargin_186je_18";
|
17
|
+
const formInline = "_formInline_186je_22";
|
18
|
+
const form = "_form_186je_10";
|
19
|
+
const formInput = "_formInput_186je_36";
|
20
|
+
const isFocused = "_isFocused_186je_56";
|
21
|
+
const suffixContainer = "_suffixContainer_186je_75";
|
22
|
+
const isInvalid = "_isInvalid_186je_80";
|
23
|
+
const iconField = "_iconField_186je_87";
|
24
|
+
const iconFieldIcon = "_iconFieldIcon_186je_95";
|
25
|
+
const inlineForm = "_inlineForm_186je_113";
|
26
|
+
const label = "_label_186je_118";
|
27
|
+
const labelDisabled = "_labelDisabled_186je_124";
|
28
|
+
const labelOptional = "_labelOptional_186je_128";
|
29
|
+
const compactTextField = "_compactTextField_186je_134";
|
30
|
+
const fieldError = "_fieldError_186je_158";
|
31
|
+
const hint = "_hint_186je_204";
|
32
|
+
const field = "_field_186je_158";
|
33
|
+
const fieldErrorMessage = "_fieldErrorMessage_186je_224";
|
34
|
+
const isDisabled = "_isDisabled_186je_237";
|
35
|
+
const checkbox = "_checkbox_186je_304";
|
36
|
+
const radio = "_radio_186je_311";
|
37
|
+
const number = "_number_186je_315";
|
38
|
+
const suffix = "_suffix_186je_75";
|
39
|
+
const iconFieldIconFill = "_iconFieldIconFill_186je_353";
|
40
|
+
const iconFieldButton = "_iconFieldButton_186je_357";
|
41
|
+
const formInputTiny = "_formInputTiny_186je_361";
|
42
|
+
const requiredAsterisk = "_requiredAsterisk_186je_370";
|
43
|
+
const fieldSet = "_fieldSet_186je_374";
|
44
|
+
const isActive = "_isActive_186je_385";
|
45
|
+
const numberField = "_numberField_186je_392";
|
42
46
|
const styles = {
|
43
47
|
formGroup,
|
44
48
|
formIncreasedErrorMargin,
|
@@ -46,9 +50,10 @@ const styles = {
|
|
46
50
|
form,
|
47
51
|
formInput,
|
48
52
|
isFocused,
|
49
|
-
iconField,
|
50
53
|
suffixContainer,
|
51
54
|
isInvalid,
|
55
|
+
iconField,
|
56
|
+
iconFieldIcon,
|
52
57
|
inlineForm,
|
53
58
|
label,
|
54
59
|
labelDisabled,
|
@@ -63,15 +68,16 @@ const styles = {
|
|
63
68
|
radio,
|
64
69
|
number,
|
65
70
|
suffix,
|
66
|
-
|
71
|
+
iconFieldIconFill,
|
72
|
+
iconFieldButton,
|
67
73
|
formInputTiny,
|
68
74
|
requiredAsterisk,
|
69
75
|
fieldSet,
|
70
76
|
isActive,
|
71
77
|
numberField,
|
72
|
-
"numberField-input": "_numberField-
|
73
|
-
"numberField-stepperContainer": "_numberField-
|
74
|
-
"numberField-stepper": "_numberField-
|
78
|
+
"numberField-input": "_numberField-input_186je_396",
|
79
|
+
"numberField-stepperContainer": "_numberField-stepperContainer_186je_400",
|
80
|
+
"numberField-stepper": "_numberField-stepper_186je_400"
|
75
81
|
};
|
76
82
|
const RequiredAsterisk = ({
|
77
83
|
className,
|
@@ -385,13 +391,32 @@ const IconField = ({
|
|
385
391
|
children,
|
386
392
|
className,
|
387
393
|
"data-test-id": testId = "icon-field",
|
394
|
+
tooltip: tooltip$1,
|
395
|
+
renderIconLast = false,
|
396
|
+
ariaLabel = "More info",
|
388
397
|
...rest
|
389
398
|
}) => {
|
390
|
-
const
|
391
|
-
|
399
|
+
const iconElement = /* @__PURE__ */ react.cloneElement(icon, {
|
400
|
+
size: "small",
|
401
|
+
className: classix.cx(styles.iconFieldIcon, styles.iconFieldIconFill)
|
402
|
+
});
|
403
|
+
const classes = classix.cx(styles.iconField, renderIconLast ? "IconAfter" : "IconBefore", className);
|
404
|
+
const renderIcon = tooltip$1 ? /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip, { content: tooltip$1, targetClassName: styles.iconFieldButton, children: /* @__PURE__ */ jsxRuntime.jsx(
|
405
|
+
button.IconButton,
|
406
|
+
{
|
407
|
+
icon: /* @__PURE__ */ react.cloneElement(icon, {
|
408
|
+
className: styles.iconFieldIconFill
|
409
|
+
}),
|
410
|
+
size: "small",
|
411
|
+
className: styles.iconFieldIcon,
|
412
|
+
style: renderIconLast ? { right: "0.5rem" } : { left: "0.5rem" },
|
413
|
+
"aria-label": ariaLabel
|
414
|
+
}
|
415
|
+
) }) : iconElement;
|
392
416
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, "data-test-id": testId, ...rest, children: [
|
417
|
+
!renderIconLast && renderIcon,
|
393
418
|
children,
|
394
|
-
renderIcon
|
419
|
+
renderIconLast && renderIcon
|
395
420
|
] });
|
396
421
|
};
|
397
422
|
const Radio = ({
|
@@ -568,7 +593,7 @@ const useNumberField = ({
|
|
568
593
|
};
|
569
594
|
const Stepper = (props) => {
|
570
595
|
const buttonRef = react.useRef(null);
|
571
|
-
const { buttonProps } = button.useButton(props, buttonRef);
|
596
|
+
const { buttonProps } = button$1.useButton(props, buttonRef);
|
572
597
|
return /* @__PURE__ */ jsxRuntime.jsx("button", { ...buttonProps, className: styles["numberField-stepper"], ref: buttonRef, children: props.children });
|
573
598
|
};
|
574
599
|
exports.Checkbox = Checkbox;
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/SelectField.tsx","../src/TextArea.tsx","../src/useNumberField.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = ComponentProps<'span'> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = ComponentProps<'label'> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { ComponentProps } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = ComponentProps<'input'> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","import { useMemo, useRef } from 'react';\n\ntype FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nfunction hasObjectChanged<T extends object>(obj1: T, obj2: T): boolean {\n return (\n Object.keys(obj1).length !== Object.keys(obj2).length ||\n Object.keys(obj1).some((k) => {\n const key = k as keyof T;\n return typeof obj1[key] === 'object' && typeof obj2[key] === 'object'\n ? hasObjectChanged(obj1[key] as T, obj2[key] as T)\n : obj1[key] !== obj2[key];\n })\n );\n}\n\nfunction useObjectMemo<T extends object>(obj: T) {\n const objRef = useRef(obj);\n\n return useMemo(() => {\n if (hasObjectChanged(obj, objRef.current)) {\n objRef.current = obj;\n }\n\n return objRef.current;\n }, [obj]);\n}\n\nexport { createFieldErrorId, useObjectMemo };\nexport type { FieldPath };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = ComponentProps<'input'> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n autoComplete,\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n const disablePasswordManagers = autoComplete === 'off';\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n autoComplete={autoComplete}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n data-1p-ignore={disablePasswordManagers} // \"data-1p-ignore\" is added to prevent 1Password from injecting a password autofill icon\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n autoComplete={autoComplete}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { ComponentProps } from 'react';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = ComponentProps<'span'> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n aria-label=\"Error\"\n id={createFieldErrorId(name)}\n >\n <Icon name=\"alert-rhombus\" size=\"small\" /> {errorMessage}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = ComponentProps<'fieldset'> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = ComponentProps<'form'> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = ComponentProps<'fieldset'> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = ComponentProps<'div'> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import type { FieldErrorProps } from './FieldError';\nimport type { FormHintProps } from './FormHint';\nimport type { LabelProps } from './Label';\n\nimport { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n LabelProps?: Partial<LabelProps>;\n FormHintProps?: Partial<FormHintProps>;\n FieldErrorProps?: Partial<FieldErrorProps>;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n LabelProps = {},\n FormHintProps = {},\n FieldErrorProps = {},\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <Label htmlFor={htmlFor} required={isRequired} {...LabelProps}>\n {label}\n </Label>\n )}\n {hint && (\n <FormHint className={styles.hint} {...FormHintProps}>\n {hint}\n </FormHint>\n )}\n {children}\n <FieldError\n className={styles.fieldErrorMessage}\n name={name}\n errorMessage={errorMessage}\n {...FieldErrorProps}\n />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { ComponentProps, ReactElement } from 'react';\n\nimport { cx } from 'classix';\nimport { cloneElement } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = ComponentProps<'div'> & {\n icon: ReactElement<IconProps>;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const renderIcon = cloneElement(icon, { size: 'small', className: styles.iconFieldIcon });\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n {renderIcon}\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<ComponentProps<'input'>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectFieldProps = ComponentProps<'select'> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = forwardRef<HTMLSelectElement, SelectFieldProps>(\n ({ className, children, 'data-test-id': testId = 'select', ...rest }: SelectFieldProps, ref) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes} ref={ref}>\n {children}\n </select>\n );\n }\n);\n\nSelectField.displayName = 'SelectField';\n\nexport { SelectField };\nexport type { SelectFieldProps };\n","import type { KeyboardEvent, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = ComponentProps<'textarea'> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n","import type { AriaButtonProps } from '@react-aria/button';\nimport type { AriaNumberFieldProps } from '@react-aria/numberfield';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { useButton } from '@react-aria/button';\nimport { useLocale } from '@react-aria/i18n';\nimport { useNumberField as useReactAriaNumberField } from '@react-aria/numberfield';\nimport { useNumberFieldState } from '@react-stately/numberfield';\nimport { cx } from 'classix';\nimport { useRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { useObjectMemo } from './utils';\n\ntype UseNumberFieldProps = AriaNumberFieldProps & {\n className?: string;\n 'data-test-id'?: string;\n id?: string;\n name?: string;\n};\n\nconst defaultFormatOptions: Intl.NumberFormatOptions = {\n maximumFractionDigits: 6,\n};\n\nconst useNumberField = ({\n className: rootClassName,\n 'data-test-id': testId = 'input',\n id,\n name,\n ...otherProps\n}: UseNumberFieldProps = {}): {\n fieldErrorProps: ReturnType<typeof useReactAriaNumberField>['errorMessageProps'];\n formHintProps: ReturnType<typeof useReactAriaNumberField>['descriptionProps'];\n labelProps: ReturnType<typeof useReactAriaNumberField>['labelProps'];\n renderNumberField: () => JSX.Element;\n} => {\n // @react-aria's hooks have a state-updating effect somewhere that depends on \"formatOptions\",\n // so we need to memoize it to prevent an infinite render loop.\n const formatOptions = useObjectMemo({\n ...defaultFormatOptions,\n ...otherProps.formatOptions,\n });\n const { locale } = useLocale();\n const numberFieldState = useNumberFieldState({ ...otherProps, locale, formatOptions });\n const inputRef = useRef<HTMLInputElement>(null);\n const {\n descriptionProps: formHintProps,\n errorMessageProps: fieldErrorProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useReactAriaNumberField({ ...otherProps, formatOptions, id }, numberFieldState, inputRef);\n\n return {\n fieldErrorProps,\n formHintProps,\n labelProps,\n renderNumberField: () => (\n <div {...groupProps} className={styles.numberField}>\n <input\n {...inputProps}\n className={cx(styles.formInput, styles['numberField-input'])}\n data-test-id={testId}\n name={name}\n ref={inputRef}\n />\n <div className={styles['numberField-stepperContainer']}>\n <Stepper {...incrementButtonProps}>\n <Icon name=\"expand-less\" />\n </Stepper>\n <Stepper {...decrementButtonProps}>\n <Icon name=\"expand-more\" />\n </Stepper>\n </div>\n </div>\n ),\n };\n};\n\nconst Stepper = (props: AriaButtonProps) => {\n const buttonRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(props, buttonRef);\n\n return (\n <button {...buttonProps} className={styles['numberField-stepper']} ref={buttonRef}>\n {props.children}\n </button>\n );\n};\n\nexport { useNumberField };\nexport type { UseNumberFieldProps };\n"],"names":["cx","jsx","forwardRef","jsxs","useRef","useMemo","suffix","label","isActive","useState","value","Icon","isInvalid","hint","Fragment","isValidElement","cloneElement","Children","VisuallyHidden","useLocale","useNumberFieldState","useReactAriaNumberField","useButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA,gBAAgB,SAAS;AAAA,EACzB,GAAG;AACL,MAA6B;AAC3B,QAAM,UAAUA,QAAA,GAAG,OAAO,kBAAkB,SAAS;AAGnD,SAAAC,+BAAC,UAAM,GAAG,MAAM,gBAAc,QAAQ,WAAW,SAAS,UAE1D,IAAA,CAAA;AAEJ;ACRA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB,SAAS;AAAA,EACzB,GAAG;AACL,MAAkB;AAChB,QAAM,UAAUD,QAAG,GAAA,OAAO,OAAO,WAAW,YAAY,OAAO,aAAa;AAE5E,yCACG,SAAO,EAAA,GAAG,MAAM,gBAAc,QAAQ,WAAW,SAC/C,UAAA;AAAA,IAAA;AAAA,IACA,YAAY,CAAC,YAAYC,2BAAA,IAAC,WAAM,WAAW,OAAO,eAAe,UAAU,cAAA;AAAA,IAC3E,YAAY,CAAC,YAAYA,+BAAC,kBAAiB,CAAA,CAAA;AAAA,EAC9C,EAAA,CAAA;AAEJ;ACjBA,MAAM,WAAWC,sBAAA;AAAA,EACf,CACE;AAAA,IACE,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,SAAS;AAAA,IACzB,GA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/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/SelectField.tsx","../src/TextArea.tsx","../src/useNumberField.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype RequiredAsteriskProps = ComponentProps<'span'> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx(styles.requiredAsterisk, className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport styles from './styles/Form.module.css';\n\ntype LabelProps = ComponentProps<'label'> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx(styles.label, className, disabled && styles.labelDisabled);\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className={styles.labelOptional}>(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { ComponentProps } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype CheckboxProps = ComponentProps<'input'> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={styles.checkbox}\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","import { useMemo, useRef } from 'react';\n\ntype FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nfunction hasObjectChanged<T extends object>(obj1: T, obj2: T): boolean {\n return (\n Object.keys(obj1).length !== Object.keys(obj2).length ||\n Object.keys(obj1).some((k) => {\n const key = k as keyof T;\n return typeof obj1[key] === 'object' && typeof obj2[key] === 'object'\n ? hasObjectChanged(obj1[key] as T, obj2[key] as T)\n : obj1[key] !== obj2[key];\n })\n );\n}\n\nfunction useObjectMemo<T extends object>(obj: T) {\n const objRef = useRef(obj);\n\n return useMemo(() => {\n if (hasObjectChanged(obj, objRef.current)) {\n objRef.current = obj;\n }\n\n return objRef.current;\n }, [obj]);\n}\n\nexport { createFieldErrorId, useObjectMemo };\nexport type { FieldPath };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = ComponentProps<'input'> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n autoComplete,\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n const disablePasswordManagers = autoComplete === 'off';\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n autoComplete={autoComplete}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n data-1p-ignore={disablePasswordManagers} // \"data-1p-ignore\" is added to prevent 1Password from injecting a password autofill icon\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n autoComplete={autoComplete}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { ComponentProps } from 'react';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = ComponentProps<'span'> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx(styles.fieldError, className)}\n aria-live=\"polite\"\n data-test-id={testId}\n aria-label=\"Error\"\n id={createFieldErrorId(name)}\n >\n <Icon name=\"alert-rhombus\" size=\"small\" /> {errorMessage}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FieldSetProps = ComponentProps<'fieldset'> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx(styles.fieldSet, className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormProps = ComponentProps<'form'> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n styles.form,\n className,\n inline && styles.formInline,\n !!hasIncreasedErrorMargin && styles.formIncreasedErrorMargin\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormGroupProps = ComponentProps<'fieldset'> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n 'data-test-id'?: string;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const {\n className,\n name,\n ignoreValidation,\n isInvalid,\n children,\n 'data-test-id': testId = 'form-group',\n ...rest\n } = props;\n\n const classes = cx(\n styles.formGroup,\n className,\n !ignoreValidation && isInvalid && styles.isInvalid\n );\n\n return (\n <fieldset className={classes} data-test-id={testId} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype FormHintProps = ComponentProps<'div'> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx(styles.hint, className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import type { FieldErrorProps } from './FieldError';\nimport type { FormHintProps } from './FormHint';\nimport type { LabelProps } from './Label';\n\nimport { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n LabelProps?: Partial<LabelProps>;\n FormHintProps?: Partial<FormHintProps>;\n FieldErrorProps?: Partial<FieldErrorProps>;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n LabelProps = {},\n FormHintProps = {},\n FieldErrorProps = {},\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx(styles.field, className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <Label htmlFor={htmlFor} required={isRequired} {...LabelProps}>\n {label}\n </Label>\n )}\n {hint && (\n <FormHint className={styles.hint} {...FormHintProps}>\n {hint}\n </FormHint>\n )}\n {children}\n <FieldError\n className={styles.fieldErrorMessage}\n name={name}\n errorMessage={errorMessage}\n {...FieldErrorProps}\n />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { ComponentProps, ReactElement } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { cx } from 'classix';\nimport { cloneElement } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = ComponentProps<'div'> & {\n icon: ReactElement<IconProps>;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n tooltip?: string | JSX.Element;\n renderIconLast?: boolean;\n ariaLabel?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n tooltip,\n renderIconLast = false,\n ariaLabel = 'More info',\n ...rest\n}: IconFieldProps) => {\n const iconElement = cloneElement(icon, {\n size: 'small',\n className: cx(styles.iconFieldIcon, styles.iconFieldIconFill),\n });\n\n const classes = cx(styles.iconField, renderIconLast ? 'IconAfter' : 'IconBefore', className);\n\n const renderIcon = tooltip ? (\n <Tooltip content={tooltip} targetClassName={styles.iconFieldButton}>\n <IconButton\n icon={cloneElement(icon, {\n className: styles.iconFieldIconFill,\n })}\n size=\"small\"\n className={styles.iconFieldIcon}\n style={renderIconLast ? { right: '0.5rem' } : { left: '0.5rem' }}\n aria-label={ariaLabel}\n />\n </Tooltip>\n ) : (\n iconElement\n );\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {!renderIconLast && renderIcon}\n {children}\n {renderIconLast && renderIcon}\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport styles from './styles/Form.module.css';\n\ntype RadioProps = Omit<ComponentProps<'input'>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx(styles.radio, className)}\n checked={checked}\n disabled={disabled}\n id={id}\n data-test-id={testId}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className={styles.labelDisabled}>{children}</span> : children}\n </Label>\n </>\n );\n};\n\nexport { Radio };\nexport type { RadioProps };\n","import type { ChangeEvent, FormEvent, ReactElement, ReactNode } from 'react';\n\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { Children, cloneElement, isValidElement, useRef } from 'react';\n\nimport { Label } from './Label';\nimport { Radio } from './Radio';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\n\ntype SelectFieldProps = ComponentProps<'select'> & {\n 'data-test-id'?: string;\n};\n\nconst SelectField = forwardRef<HTMLSelectElement, SelectFieldProps>(\n ({ className, children, 'data-test-id': testId = 'select', ...rest }: SelectFieldProps, ref) => {\n const classes = cx(styles.formInput, className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes} ref={ref}>\n {children}\n </select>\n );\n }\n);\n\nSelectField.displayName = 'SelectField';\n\nexport { SelectField };\nexport type { SelectFieldProps };\n","import type { KeyboardEvent, ComponentProps } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = ComponentProps<'textarea'> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx(styles.formInput, className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n","import type { AriaButtonProps } from '@react-aria/button';\nimport type { AriaNumberFieldProps } from '@react-aria/numberfield';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { useButton } from '@react-aria/button';\nimport { useLocale } from '@react-aria/i18n';\nimport { useNumberField as useReactAriaNumberField } from '@react-aria/numberfield';\nimport { useNumberFieldState } from '@react-stately/numberfield';\nimport { cx } from 'classix';\nimport { useRef } from 'react';\n\nimport styles from './styles/Form.module.css';\nimport { useObjectMemo } from './utils';\n\ntype UseNumberFieldProps = AriaNumberFieldProps & {\n className?: string;\n 'data-test-id'?: string;\n id?: string;\n name?: string;\n};\n\nconst defaultFormatOptions: Intl.NumberFormatOptions = {\n maximumFractionDigits: 6,\n};\n\nconst useNumberField = ({\n className: rootClassName,\n 'data-test-id': testId = 'input',\n id,\n name,\n ...otherProps\n}: UseNumberFieldProps = {}): {\n fieldErrorProps: ReturnType<typeof useReactAriaNumberField>['errorMessageProps'];\n formHintProps: ReturnType<typeof useReactAriaNumberField>['descriptionProps'];\n labelProps: ReturnType<typeof useReactAriaNumberField>['labelProps'];\n renderNumberField: () => JSX.Element;\n} => {\n // @react-aria's hooks have a state-updating effect somewhere that depends on \"formatOptions\",\n // so we need to memoize it to prevent an infinite render loop.\n const formatOptions = useObjectMemo({\n ...defaultFormatOptions,\n ...otherProps.formatOptions,\n });\n const { locale } = useLocale();\n const numberFieldState = useNumberFieldState({ ...otherProps, locale, formatOptions });\n const inputRef = useRef<HTMLInputElement>(null);\n const {\n descriptionProps: formHintProps,\n errorMessageProps: fieldErrorProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useReactAriaNumberField({ ...otherProps, formatOptions, id }, numberFieldState, inputRef);\n\n return {\n fieldErrorProps,\n formHintProps,\n labelProps,\n renderNumberField: () => (\n <div {...groupProps} className={styles.numberField}>\n <input\n {...inputProps}\n className={cx(styles.formInput, styles['numberField-input'])}\n data-test-id={testId}\n name={name}\n ref={inputRef}\n />\n <div className={styles['numberField-stepperContainer']}>\n <Stepper {...incrementButtonProps}>\n <Icon name=\"expand-less\" />\n </Stepper>\n <Stepper {...decrementButtonProps}>\n <Icon name=\"expand-more\" />\n </Stepper>\n </div>\n </div>\n ),\n };\n};\n\nconst Stepper = (props: AriaButtonProps) => {\n const buttonRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(props, buttonRef);\n\n return (\n <button {...buttonProps} className={styles['numberField-stepper']} ref={buttonRef}>\n {props.children}\n </button>\n );\n};\n\nexport { useNumberField };\nexport type { UseNumberFieldProps };\n"],"names":["cx","jsx","forwardRef","jsxs","useRef","useMemo","suffix","label","isActive","useState","value","Icon","isInvalid","hint","tooltip","cloneElement","Tooltip","IconButton","Fragment","isValidElement","Children","VisuallyHidden","useLocale","useNumberFieldState","useReactAriaNumberField","useButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA,gBAAgB,SAAS;AAAA,EACzB,GAAG;AACL,MAA6B;AAC3B,QAAM,UAAUA,QAAA,GAAG,OAAO,kBAAkB,SAAS;AAGnD,SAAAC,+BA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-form-color-text-label-disabled: var(--lp-color-gray-400);
|
8
8
|
}
|
9
9
|
|
10
|
-
.
|
10
|
+
._formGroup_186je_10 {
|
11
11
|
margin: 2rem 0;
|
12
12
|
padding: 0;
|
13
13
|
border: none;
|
@@ -16,25 +16,25 @@
|
|
16
16
|
/* The margin for .formGroup and the min-height of .form-fieldError
|
17
17
|
should be equal to avoid content shift when errors are shown */
|
18
18
|
|
19
|
-
.
|
19
|
+
._formIncreasedErrorMargin_186je_18 ._formGroup_186je_10 {
|
20
20
|
margin: 2.8rem 0;
|
21
21
|
}
|
22
22
|
|
23
|
-
.
|
23
|
+
._formInline_186je_22 ._formGroup_186je_10 {
|
24
24
|
display: inline-block;
|
25
25
|
vertical-align: middle;
|
26
26
|
margin: 0;
|
27
27
|
}
|
28
28
|
|
29
|
-
.
|
29
|
+
._form_186je_10 ._formGroup_186je_10:first-child {
|
30
30
|
margin-top: 0;
|
31
31
|
}
|
32
32
|
|
33
|
-
.
|
33
|
+
._form_186je_10 ._formGroup_186je_10:last-child {
|
34
34
|
margin-bottom: 0;
|
35
35
|
}
|
36
36
|
|
37
|
-
.
|
37
|
+
._formInput_186je_36 {
|
38
38
|
display: block;
|
39
39
|
width: 100%;
|
40
40
|
padding: 0.6rem 1rem;
|
@@ -49,24 +49,24 @@
|
|
49
49
|
height: 3.2rem;
|
50
50
|
}
|
51
51
|
|
52
|
-
.
|
52
|
+
._formInput_186je_36:-moz-placeholder-shown {
|
53
53
|
overflow: hidden;
|
54
54
|
text-overflow: ellipsis;
|
55
55
|
}
|
56
56
|
|
57
|
-
.
|
57
|
+
._formInput_186je_36:placeholder-shown {
|
58
58
|
overflow: hidden;
|
59
59
|
text-overflow: ellipsis;
|
60
60
|
}
|
61
61
|
|
62
|
-
.
|
63
|
-
.
|
62
|
+
._formInput_186je_36._isFocused_186je_56,
|
63
|
+
._formInput_186je_36:focus {
|
64
64
|
outline: 0;
|
65
65
|
border-color: var(--lp-color-border-field-focus);
|
66
66
|
box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
|
67
67
|
}
|
68
68
|
|
69
|
-
select.
|
69
|
+
select._formInput_186je_36 {
|
70
70
|
-webkit-appearance: none;
|
71
71
|
-moz-appearance: none;
|
72
72
|
appearance: none;
|
@@ -80,49 +80,67 @@ select._formInput_19syx_36 {
|
|
80
80
|
padding-right: 2rem;
|
81
81
|
}
|
82
82
|
|
83
|
-
.
|
84
|
-
padding-left: 3rem;
|
85
|
-
}
|
86
|
-
|
87
|
-
._suffixContainer_19syx_79 ._formInput_19syx_36 {
|
83
|
+
._suffixContainer_186je_75 ._formInput_186je_36 {
|
88
84
|
border: none;
|
89
85
|
border-radius: var(--lp-border-radius-regular) 0 0 var(--lp-border-radius-regular);
|
90
86
|
}
|
91
87
|
|
92
|
-
.
|
93
|
-
.
|
94
|
-
.
|
95
|
-
.
|
88
|
+
._isInvalid_186je_80 ._formInput_186je_36,
|
89
|
+
._form_186je_10 ._isInvalid_186je_80 .Select-control,
|
90
|
+
._form_186je_10 ._isInvalid_186je_80 .CustomSelect > div,
|
91
|
+
._form_186je_10 ._isInvalid_186je_80 ._formInput_186je_36 {
|
96
92
|
border-color: var(--lp-color-border-field-error);
|
97
93
|
}
|
98
94
|
|
99
|
-
.
|
95
|
+
._iconField_186je_87.IconBefore ._formInput_186je_36 {
|
96
|
+
padding-left: 3rem;
|
97
|
+
}
|
98
|
+
|
99
|
+
._iconField_186je_87.IconAfter ._formInput_186je_36 {
|
100
|
+
padding-right: 3rem;
|
101
|
+
}
|
102
|
+
|
103
|
+
._iconFieldIcon_186je_95 {
|
104
|
+
position: absolute;
|
105
|
+
top: 50%;
|
106
|
+
transform: translateY(-50%);
|
107
|
+
}
|
108
|
+
|
109
|
+
._iconField_186je_87.IconBefore ._iconFieldIcon_186je_95 {
|
110
|
+
left: 1rem;
|
111
|
+
}
|
112
|
+
|
113
|
+
._iconField_186je_87.IconAfter ._iconFieldIcon_186je_95 {
|
114
|
+
right: 1rem;
|
115
|
+
}
|
116
|
+
|
117
|
+
._suffixContainer_186je_75 ._formInput_186je_36:focus {
|
100
118
|
box-shadow: none;
|
101
119
|
}
|
102
120
|
|
103
|
-
.
|
104
|
-
.
|
121
|
+
._inlineForm_186je_113 ._formGroup_186je_10 + ._formGroup_186je_10,
|
122
|
+
._inlineForm_186je_113 ._formGroup_186je_10 + .Button {
|
105
123
|
margin-left: 1rem;
|
106
124
|
}
|
107
125
|
|
108
|
-
.
|
126
|
+
._label_186je_118 {
|
109
127
|
font-size: 1.3rem;
|
110
128
|
font-family: var(--lp-font-family-base);
|
111
129
|
word-break: break-word;
|
112
130
|
}
|
113
131
|
|
114
|
-
.
|
132
|
+
._labelDisabled_186je_124 {
|
115
133
|
color: var(--lp-color-gray-800);
|
116
134
|
color: var(--lp-component-form-color-text-label-disabled);
|
117
135
|
}
|
118
136
|
|
119
|
-
.
|
137
|
+
._labelOptional_186je_128 {
|
120
138
|
margin-left: 0.4em;
|
121
139
|
color: var(--lp-color-text-ui-secondary);
|
122
140
|
fill: var(--lp-color-text-ui-secondary);
|
123
141
|
}
|
124
142
|
|
125
|
-
.
|
143
|
+
._compactTextField_186je_134 ._label_186je_118 {
|
126
144
|
position: absolute;
|
127
145
|
top: -2px;
|
128
146
|
left: 10px;
|
@@ -136,68 +154,68 @@ select._formInput_19syx_36 {
|
|
136
154
|
z-index: 1; /* Fixes layout issue in Firefox */
|
137
155
|
}
|
138
156
|
|
139
|
-
.
|
157
|
+
._formGroup_186je_10 ._label_186je_118 {
|
140
158
|
display: flex;
|
141
159
|
align-items: center;
|
142
160
|
margin-bottom: 0.2rem;
|
143
161
|
}
|
144
162
|
|
145
|
-
.
|
163
|
+
._formGroup_186je_10 ._label_186je_118 + ._label_186je_118 {
|
146
164
|
margin-top: 0.5rem;
|
147
165
|
}
|
148
166
|
|
149
|
-
.
|
167
|
+
._fieldError_186je_158 {
|
150
168
|
color: var(--lp-color-text-feedback-error);
|
151
169
|
font-size: 1.3rem;
|
152
170
|
}
|
153
171
|
|
154
|
-
.
|
172
|
+
._fieldError_186je_158 svg {
|
155
173
|
transform: translateY(-1px);
|
156
174
|
}
|
157
175
|
|
158
176
|
/* The margin for .formGroup and the min-height of .form-fieldError
|
159
177
|
should be equal to avoid content shift when errors are shown */
|
160
178
|
|
161
|
-
.
|
179
|
+
._formIncreasedErrorMargin_186je_18 ._fieldError_186je_158 {
|
162
180
|
min-height: 2.8rem;
|
163
181
|
}
|
164
182
|
|
165
|
-
.
|
183
|
+
._label_186je_118 ._fieldError_186je_158 {
|
166
184
|
float: right;
|
167
185
|
}
|
168
186
|
|
169
|
-
.
|
187
|
+
._form_186je_10:not(._inlineForm_186je_113) ._fieldError_186je_158 {
|
170
188
|
display: block;
|
171
189
|
padding-top: 0.5rem;
|
172
190
|
text-align: left;
|
173
191
|
}
|
174
192
|
|
175
|
-
.
|
193
|
+
._formIncreasedErrorMargin_186je_18:not(._inlineForm_186je_113) ._fieldError_186je_158 {
|
176
194
|
padding-top: 0.1rem;
|
177
195
|
padding-bottom: 0.5rem;
|
178
196
|
}
|
179
197
|
|
180
|
-
.
|
198
|
+
._form_186je_10 ._isInvalid_186je_80 ._label_186je_118 {
|
181
199
|
color: var(--lp-color-text-feedback-error);
|
182
200
|
}
|
183
201
|
|
184
|
-
.
|
202
|
+
._formInput_186je_36::-moz-placeholder {
|
185
203
|
color: var(--lp-color-text-field-placeholder);
|
186
204
|
}
|
187
205
|
|
188
|
-
.
|
206
|
+
._formInput_186je_36::placeholder {
|
189
207
|
color: var(--lp-color-text-field-placeholder);
|
190
208
|
}
|
191
209
|
|
192
|
-
.
|
210
|
+
._formIncreasedErrorMargin_186je_18 ._formGroup_186je_10._isInvalid_186je_80 {
|
193
211
|
margin-bottom: 0;
|
194
212
|
}
|
195
213
|
|
196
|
-
.
|
214
|
+
._formIncreasedErrorMargin_186je_18 ._formGroup_186je_10._isInvalid_186je_80 + ._formGroup_186je_10 {
|
197
215
|
margin-top: 0;
|
198
216
|
}
|
199
217
|
|
200
|
-
.
|
218
|
+
._hint_186je_204 {
|
201
219
|
display: block;
|
202
220
|
margin-top: 0.3rem;
|
203
221
|
font-size: 1.3rem;
|
@@ -205,75 +223,75 @@ select._formInput_19syx_36 {
|
|
205
223
|
color: var(--lp-color-text-ui-secondary);
|
206
224
|
}
|
207
225
|
|
208
|
-
.
|
226
|
+
._field_186je_158 ._hint_186je_204 {
|
209
227
|
margin: 0;
|
210
228
|
font-size: 1.3rem;
|
211
229
|
color: var(--lp-color-text-ui-secondary);
|
212
230
|
fill: var(--lp-color-text-ui-secondary);
|
213
231
|
}
|
214
232
|
|
215
|
-
.
|
216
|
-
.
|
233
|
+
._form_186je_10 ._field_186je_158 label,
|
234
|
+
._form_186je_10 ._field_186je_158 ._isInvalid_186je_80 label {
|
217
235
|
color: var(--lp-color-text-ui-primary-base);
|
218
236
|
}
|
219
237
|
|
220
|
-
.
|
238
|
+
._fieldErrorMessage_186je_224 {
|
221
239
|
color: var(--lp-color-text-feedback-error);
|
222
240
|
font-size: 1.3rem;
|
223
241
|
}
|
224
242
|
|
225
|
-
.
|
243
|
+
._field_186je_158._formGroup_186je_10 {
|
226
244
|
margin: 1rem 0;
|
227
245
|
}
|
228
246
|
|
229
|
-
.
|
247
|
+
._field_186je_158._formGroup_186je_10:first-child {
|
230
248
|
margin-top: 0;
|
231
249
|
}
|
232
250
|
|
233
|
-
input.
|
251
|
+
input._formInput_186je_36:-moz-read-only {
|
234
252
|
opacity: 1;
|
235
253
|
background-color: var(--lp-color-bg-field-disabled);
|
236
254
|
color: var(--lp-color-text-field-disabled);
|
237
255
|
border-color: var(--lp-color-border-field-disabled);
|
238
256
|
}
|
239
257
|
|
240
|
-
.
|
241
|
-
input.
|
242
|
-
select.
|
243
|
-
input.
|
258
|
+
._formInput_186je_36._isDisabled_186je_237,
|
259
|
+
input._formInput_186je_36:disabled,
|
260
|
+
select._formInput_186je_36:disabled,
|
261
|
+
input._formInput_186je_36:read-only {
|
244
262
|
opacity: 1;
|
245
263
|
background-color: var(--lp-color-bg-field-disabled);
|
246
264
|
color: var(--lp-color-text-field-disabled);
|
247
265
|
border-color: var(--lp-color-border-field-disabled);
|
248
266
|
}
|
249
267
|
|
250
|
-
.
|
251
|
-
.
|
268
|
+
._formInput_186je_36._isDisabled_186je_237:hover,
|
269
|
+
._formInput_186je_36:disabled:hover {
|
252
270
|
cursor: not-allowed;
|
253
271
|
}
|
254
272
|
|
255
|
-
textarea.
|
273
|
+
textarea._formInput_186je_36 {
|
256
274
|
min-height: 2.5em;
|
257
275
|
height: auto;
|
258
276
|
resize: none;
|
259
277
|
}
|
260
278
|
|
261
|
-
textarea.
|
279
|
+
textarea._formInput_186je_36:-moz-read-only {
|
262
280
|
opacity: 1;
|
263
281
|
color: var(--lp-color-text-field-disabled);
|
264
282
|
background-color: var(--lp-color-bg-field-disabled);
|
265
283
|
border-color: var(--lp-color-border-field-disabled);
|
266
284
|
}
|
267
285
|
|
268
|
-
textarea.
|
269
|
-
textarea.
|
286
|
+
textarea._formInput_186je_36:disabled,
|
287
|
+
textarea._formInput_186je_36:read-only {
|
270
288
|
opacity: 1;
|
271
289
|
color: var(--lp-color-text-field-disabled);
|
272
290
|
background-color: var(--lp-color-bg-field-disabled);
|
273
291
|
border-color: var(--lp-color-border-field-disabled);
|
274
292
|
}
|
275
293
|
|
276
|
-
input.
|
294
|
+
input._formInput_186je_36::-webkit-autofill {
|
277
295
|
box-shadow: 0 0 0 50px var(--lp-color-bg-field-base) inset;
|
278
296
|
}
|
279
297
|
|
@@ -306,29 +324,29 @@ input[type='checkbox']:disabled {
|
|
306
324
|
pointer-events: none;
|
307
325
|
}
|
308
326
|
|
309
|
-
.
|
310
|
-
.
|
327
|
+
._formInput_186je_36[readonly],
|
328
|
+
._formInput_186je_36[readonly]:focus {
|
311
329
|
color: var(--lp-color-text-ui-secondary);
|
312
330
|
border-color: var(--lp-color-gray-500);
|
313
331
|
box-shadow: none;
|
314
332
|
}
|
315
333
|
|
316
|
-
.
|
334
|
+
._checkbox_186je_304 {
|
317
335
|
align-self: flex-start; /* Default for .label is center, but this looks bad on multi-line checkbox labels */
|
318
336
|
flex-shrink: 0; /* Make sure the input itself doesn't shrink in flex layouts */
|
319
337
|
margin-right: 0.5rem;
|
320
338
|
margin-top: 0.4rem;
|
321
339
|
}
|
322
340
|
|
323
|
-
.
|
341
|
+
._radio_186je_311 {
|
324
342
|
margin-right: 0.5rem;
|
325
343
|
}
|
326
344
|
|
327
|
-
.
|
345
|
+
._number_186je_315 {
|
328
346
|
min-width: 4.5rem;
|
329
347
|
}
|
330
348
|
|
331
|
-
.
|
349
|
+
._suffixContainer_186je_75 {
|
332
350
|
display: inline-flex;
|
333
351
|
border: 1px solid var(--lp-color-border-field-base);
|
334
352
|
border-radius: var(--lp-border-radius-regular);
|
@@ -336,12 +354,12 @@ input[type='checkbox']:disabled {
|
|
336
354
|
transition: all 0.1s linear;
|
337
355
|
}
|
338
356
|
|
339
|
-
.
|
357
|
+
._suffixContainer_186je_75:focus-within {
|
340
358
|
border-color: var(--lp-color-border-field-focus);
|
341
359
|
box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
|
342
360
|
}
|
343
361
|
|
344
|
-
.
|
362
|
+
._suffixContainer_186je_75 ._suffix_186je_75 {
|
345
363
|
padding: 0 2px;
|
346
364
|
background-color: var(--lp-color-bg-field-aside);
|
347
365
|
color: var(--lp-color-text-ui-secondary);
|
@@ -352,8 +370,8 @@ input[type='checkbox']:disabled {
|
|
352
370
|
position: initial;
|
353
371
|
}
|
354
372
|
|
355
|
-
.
|
356
|
-
.
|
373
|
+
._suffix_186je_75::-webkit-outer-spin-button,
|
374
|
+
._suffix_186je_75::-webkit-inner-spin-button {
|
357
375
|
-webkit-appearance: none;
|
358
376
|
appearance: none;
|
359
377
|
margin: 0;
|
@@ -361,61 +379,61 @@ input[type='checkbox']:disabled {
|
|
361
379
|
|
362
380
|
/* Firefox */
|
363
381
|
|
364
|
-
.
|
382
|
+
._suffix_186je_75[type='number'] {
|
365
383
|
-webkit-appearance: textfield;
|
366
384
|
-moz-appearance: textfield;
|
367
385
|
appearance: textfield;
|
368
386
|
}
|
369
387
|
|
370
|
-
.
|
371
|
-
position: absolute;
|
388
|
+
._iconFieldIconFill_186je_353 {
|
372
389
|
fill: var(--lp-color-fill-field-base);
|
373
|
-
top: 50%;
|
374
|
-
transform: translateY(-50%);
|
375
|
-
left: 1rem;
|
376
390
|
}
|
377
391
|
|
378
|
-
.
|
392
|
+
[class*='_Popover-target_']._iconFieldButton_186je_357 {
|
393
|
+
display: block;
|
394
|
+
}
|
395
|
+
|
396
|
+
._formInputTiny_186je_361 {
|
379
397
|
padding: 0.1rem 0.6rem;
|
380
398
|
height: 2.4rem;
|
381
399
|
}
|
382
400
|
|
383
|
-
.
|
401
|
+
._iconField_186je_87 {
|
384
402
|
position: relative;
|
385
403
|
}
|
386
404
|
|
387
|
-
.
|
405
|
+
._requiredAsterisk_186je_370 {
|
388
406
|
color: var(--lp-color-text-feedback-error);
|
389
407
|
}
|
390
408
|
|
391
|
-
.
|
409
|
+
._fieldSet_186je_374 {
|
392
410
|
border: none;
|
393
411
|
margin: 2rem 0;
|
394
412
|
padding: 0;
|
395
413
|
}
|
396
414
|
|
397
|
-
.
|
415
|
+
._compactTextField_186je_134 {
|
398
416
|
position: relative;
|
399
417
|
width: 100%;
|
400
418
|
}
|
401
419
|
|
402
|
-
.
|
420
|
+
._compactTextField_186je_134._isActive_186je_385 ._label_186je_118 {
|
403
421
|
border-radius: var(--lp-border-radius-regular);
|
404
422
|
opacity: 1;
|
405
423
|
pointer-events: auto;
|
406
424
|
transform: translate(0, -8px) scale(0.9); /* 2d transform to avoid webkit blurry text */
|
407
425
|
}
|
408
426
|
|
409
|
-
.
|
427
|
+
._numberField_186je_392 {
|
410
428
|
display: flex;
|
411
429
|
position: relative;
|
412
430
|
}
|
413
431
|
|
414
|
-
.
|
432
|
+
._numberField_186je_392 ._numberField-input_186je_396 {
|
415
433
|
padding-right: 2.4rem;
|
416
434
|
}
|
417
435
|
|
418
|
-
.
|
436
|
+
._numberField_186je_392 ._numberField-stepperContainer_186je_400 {
|
419
437
|
display: flex;
|
420
438
|
opacity: 0;
|
421
439
|
flex-direction: column;
|
@@ -427,7 +445,7 @@ input[type='checkbox']:disabled {
|
|
427
445
|
transition: all var(--lp-duration-100) linear;
|
428
446
|
}
|
429
447
|
|
430
|
-
.
|
448
|
+
._numberField_186je_392 ._numberField-stepperContainer_186je_400 ._numberField-stepper_186je_400 {
|
431
449
|
--numberField-stepper-padding: 0.4rem;
|
432
450
|
--numberField-stepper-border-radius: calc(var(--lp-border-radius-regular) - 0.1rem);
|
433
451
|
|
@@ -445,29 +463,29 @@ input[type='checkbox']:disabled {
|
|
445
463
|
overflow: hidden;
|
446
464
|
}
|
447
465
|
|
448
|
-
.
|
466
|
+
._numberField_186je_392 ._numberField-stepperContainer_186je_400 ._numberField-stepper_186je_400:first-child {
|
449
467
|
border-top-right-radius: var(--numberField-stepper-border-radius);
|
450
468
|
padding-top: var(--numberField-stepper-padding);
|
451
469
|
}
|
452
470
|
|
453
|
-
.
|
471
|
+
._numberField_186je_392 ._numberField-stepperContainer_186je_400 ._numberField-stepper_186je_400:last-child {
|
454
472
|
border-bottom-right-radius: var(--numberField-stepper-border-radius);
|
455
473
|
padding-bottom: var(--numberField-stepper-padding);
|
456
474
|
}
|
457
475
|
|
458
|
-
.
|
476
|
+
._numberField_186je_392 ._numberField-stepperContainer_186je_400 ._numberField-stepper_186je_400:hover {
|
459
477
|
background-color: var(--lp-color-bg-interactive-secondary-hover);
|
460
478
|
}
|
461
479
|
|
462
|
-
.
|
480
|
+
._numberField_186je_392 ._numberField-stepperContainer_186je_400 ._numberField-stepper_186je_400:active {
|
463
481
|
background-color: var(--lp-color-bg-interactive-secondary-active);
|
464
482
|
}
|
465
483
|
|
466
|
-
.
|
484
|
+
._numberField_186je_392 ._numberField-stepperContainer_186je_400 ._numberField-stepper_186je_400 span:has(svg) {
|
467
485
|
width: 100%;
|
468
486
|
color: var(--lp-color-text-ui-primary-base);
|
469
487
|
}
|
470
488
|
|
471
|
-
.
|
489
|
+
._numberField_186je_392:hover ._numberField-stepperContainer_186je_400, ._numberField_186je_392:has(input:focus) ._numberField-stepperContainer_186je_400 {
|
472
490
|
opacity: 1;
|
473
491
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@launchpad-ui/form",
|
3
|
-
"version": "0.9.
|
3
|
+
"version": "0.9.12",
|
4
4
|
"status": "beta",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -32,8 +32,10 @@
|
|
32
32
|
"@react-aria/visually-hidden": "3.8.3",
|
33
33
|
"@react-stately/numberfield": "3.6.0",
|
34
34
|
"classix": "2.1.17",
|
35
|
-
"@launchpad-ui/
|
36
|
-
"@launchpad-ui/
|
35
|
+
"@launchpad-ui/button": "~0.10.4",
|
36
|
+
"@launchpad-ui/icons": "~0.12.2",
|
37
|
+
"@launchpad-ui/tokens": "~0.7.0",
|
38
|
+
"@launchpad-ui/tooltip": "~0.7.23"
|
37
39
|
},
|
38
40
|
"peerDependencies": {
|
39
41
|
"react": "18.2.0",
|