@launchpad-ui/form 0.8.17 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import type { IconProps } from '@launchpad-ui/icons';
2
- import type { ComponentProps } from 'react';
2
+ import type { ComponentProps, ReactElement } from 'react';
3
3
  type IconFieldProps = ComponentProps<'div'> & {
4
- icon(args: IconProps): JSX.Element;
4
+ icon: ReactElement<IconProps>;
5
5
  children: JSX.Element | JSX.Element[];
6
6
  'data-test-id'?: string;
7
7
  };
@@ -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,MAAM,OAAO,CAAC;AAM5C,KAAK,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC5C,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC;IACnC,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,SAAS,mEAMZ,cAAc,4CAWhB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,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;AAO1D,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;CACzB,CAAC;AAEF,QAAA,MAAM,SAAS,mEAMZ,cAAc,4CAWhB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../src/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAQ5C,KAAK,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,SAAS,0HA0Dd,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../src/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAQ5C,KAAK,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,SAAS,0HAgEd,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
package/dist/index.es.js CHANGED
@@ -1,42 +1,42 @@
1
1
  import './style.css';
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
- import { forwardRef, useRef, useMemo, useState, Children, isValidElement, cloneElement } from "react";
3
+ import { forwardRef, useRef, useMemo, useState, cloneElement, Children, isValidElement } from "react";
4
4
  import { cx } from "classix";
5
- import { AlertRhombus, ExpandLess, ExpandMore } from "@launchpad-ui/icons";
5
+ import { Icon } from "@launchpad-ui/icons";
6
6
  import { VisuallyHidden } from "@react-aria/visually-hidden";
7
7
  import { useButton } from "@react-aria/button";
8
8
  import { useLocale } from "@react-aria/i18n";
9
9
  import { useNumberField as useNumberField$1 } from "@react-aria/numberfield";
10
10
  import { useNumberFieldState } from "@react-stately/numberfield";
11
- const formGroup = "_formGroup_1u9hb_10";
12
- const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1u9hb_18";
13
- const formInline = "_formInline_1u9hb_22";
14
- const form = "_form_1u9hb_10";
15
- const formInput = "_formInput_1u9hb_36";
16
- const isFocused = "_isFocused_1u9hb_56";
17
- const iconField = "_iconField_1u9hb_73";
18
- const suffixContainer = "_suffixContainer_1u9hb_77";
19
- const isInvalid = "_isInvalid_1u9hb_82";
20
- const inlineForm = "_inlineForm_1u9hb_93";
21
- const label = "_label_1u9hb_98";
22
- const labelDisabled = "_labelDisabled_1u9hb_104";
23
- const labelOptional = "_labelOptional_1u9hb_108";
24
- const compactTextField = "_compactTextField_1u9hb_114";
25
- const fieldError = "_fieldError_1u9hb_138";
26
- const hint = "_hint_1u9hb_184";
27
- const field = "_field_1u9hb_138";
28
- const fieldErrorMessage = "_fieldErrorMessage_1u9hb_204";
29
- const isDisabled = "_isDisabled_1u9hb_217";
30
- const checkbox = "_checkbox_1u9hb_284";
31
- const radio = "_radio_1u9hb_291";
32
- const number = "_number_1u9hb_295";
33
- const suffix = "_suffix_1u9hb_77";
34
- const iconFieldIcon = "_iconFieldIcon_1u9hb_333";
35
- const formInputTiny = "_formInputTiny_1u9hb_341";
36
- const requiredAsterisk = "_requiredAsterisk_1u9hb_350";
37
- const fieldSet = "_fieldSet_1u9hb_354";
38
- const isActive = "_isActive_1u9hb_365";
39
- const numberField = "_numberField_1u9hb_372";
11
+ const formGroup = "_formGroup_19syx_10";
12
+ const formIncreasedErrorMargin = "_formIncreasedErrorMargin_19syx_18";
13
+ const formInline = "_formInline_19syx_22";
14
+ const form = "_form_19syx_10";
15
+ const formInput = "_formInput_19syx_36";
16
+ const isFocused = "_isFocused_19syx_56";
17
+ const iconField = "_iconField_19syx_75";
18
+ const suffixContainer = "_suffixContainer_19syx_79";
19
+ const isInvalid = "_isInvalid_19syx_84";
20
+ const inlineForm = "_inlineForm_19syx_95";
21
+ const label = "_label_19syx_100";
22
+ const labelDisabled = "_labelDisabled_19syx_106";
23
+ const labelOptional = "_labelOptional_19syx_110";
24
+ const compactTextField = "_compactTextField_19syx_116";
25
+ const fieldError = "_fieldError_19syx_140";
26
+ const hint = "_hint_19syx_186";
27
+ const field = "_field_19syx_140";
28
+ const fieldErrorMessage = "_fieldErrorMessage_19syx_206";
29
+ const isDisabled = "_isDisabled_19syx_219";
30
+ const checkbox = "_checkbox_19syx_286";
31
+ const radio = "_radio_19syx_293";
32
+ const number = "_number_19syx_297";
33
+ const suffix = "_suffix_19syx_79";
34
+ const iconFieldIcon = "_iconFieldIcon_19syx_335";
35
+ const formInputTiny = "_formInputTiny_19syx_343";
36
+ const requiredAsterisk = "_requiredAsterisk_19syx_352";
37
+ const fieldSet = "_fieldSet_19syx_356";
38
+ const isActive = "_isActive_19syx_367";
39
+ const numberField = "_numberField_19syx_374";
40
40
  const styles = {
41
41
  formGroup,
42
42
  formIncreasedErrorMargin,
@@ -67,9 +67,9 @@ const styles = {
67
67
  fieldSet,
68
68
  isActive,
69
69
  numberField,
70
- "numberField-input": "_numberField-input_1u9hb_376",
71
- "numberField-stepperContainer": "_numberField-stepperContainer_1u9hb_380",
72
- "numberField-stepper": "_numberField-stepper_1u9hb_380"
70
+ "numberField-input": "_numberField-input_19syx_378",
71
+ "numberField-stepperContainer": "_numberField-stepperContainer_19syx_382",
72
+ "numberField-stepper": "_numberField-stepper_19syx_382"
73
73
  };
74
74
  const RequiredAsterisk = ({
75
75
  className,
@@ -160,9 +160,11 @@ const TextField = forwardRef(
160
160
  suffix: suffix2,
161
161
  overrideWidth,
162
162
  "data-test-id": testId = "text-field",
163
+ autoComplete,
163
164
  ...rest
164
165
  }, ref) => {
165
166
  const classes = overrideWidth ? className : cx(styles.formInput, tiny && styles.formInputTiny, className);
167
+ const disablePasswordManagers = autoComplete === "off";
166
168
  if (suffix2) {
167
169
  return /* @__PURE__ */ jsxs("div", { className: styles.suffixContainer, children: [
168
170
  /* @__PURE__ */ jsx(
@@ -171,6 +173,7 @@ const TextField = forwardRef(
171
173
  ...rest,
172
174
  type,
173
175
  "data-test-id": testId,
176
+ autoComplete,
174
177
  className: classes,
175
178
  readOnly,
176
179
  ref,
@@ -184,10 +187,12 @@ const TextField = forwardRef(
184
187
  "input",
185
188
  {
186
189
  ...rest,
190
+ "data-1p-ignore": disablePasswordManagers,
187
191
  type,
188
192
  className: classes,
189
193
  readOnly,
190
194
  tabIndex,
195
+ autoComplete,
191
196
  ref,
192
197
  "data-test-id": testId,
193
198
  style: overrideWidth ? {
@@ -268,7 +273,7 @@ const FieldError = ({
268
273
  "aria-label": "Error",
269
274
  id: createFieldErrorId(name),
270
275
  children: [
271
- /* @__PURE__ */ jsx(AlertRhombus, { size: "small" }),
276
+ /* @__PURE__ */ jsx(Icon, { name: "alert-rhombus", size: "small" }),
272
277
  " ",
273
278
  errorMessage
274
279
  ]
@@ -380,11 +385,11 @@ const IconField = ({
380
385
  "data-test-id": testId = "icon-field",
381
386
  ...rest
382
387
  }) => {
383
- const Icon = icon;
388
+ const renderIcon = cloneElement(icon, { size: "small", className: styles.iconFieldIcon });
384
389
  const classes = cx(styles.iconField, className);
385
390
  return /* @__PURE__ */ jsxs("div", { className: classes, "data-test-id": testId, ...rest, children: [
386
391
  children,
387
- /* @__PURE__ */ jsx(Icon, { size: "small", className: styles.iconFieldIcon })
392
+ renderIcon
388
393
  ] });
389
394
  };
390
395
  const Radio = ({
@@ -553,8 +558,8 @@ const useNumberField = ({
553
558
  }
554
559
  ),
555
560
  /* @__PURE__ */ jsxs("div", { className: styles["numberField-stepperContainer"], children: [
556
- /* @__PURE__ */ jsx(Stepper, { ...incrementButtonProps, children: /* @__PURE__ */ jsx(ExpandLess, {}) }),
557
- /* @__PURE__ */ jsx(Stepper, { ...decrementButtonProps, children: /* @__PURE__ */ jsx(ExpandMore, {}) })
561
+ /* @__PURE__ */ jsx(Stepper, { ...incrementButtonProps, children: /* @__PURE__ */ jsx(Icon, { name: "expand-less" }) }),
562
+ /* @__PURE__ */ jsx(Stepper, { ...decrementButtonProps, children: /* @__PURE__ */ jsx(Icon, { name: "expand-more" }) })
558
563
  ] })
559
564
  ] })
560
565
  };
@@ -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 ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { ComponentProps } from 'react';\n\nimport { AlertRhombus } 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 <AlertRhombus 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 } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = ComponentProps<'div'> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, 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 { ExpandLess, ExpandMore } 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 <ExpandLess />\n </Stepper>\n <Stepper {...decrementButtonProps}>\n <ExpandMore />\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;ACRA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB,SAAS;AAAA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E,WAAW;AACnB,QAAM,mBAAmB,oBAAoB,EAAE,GAAG,YAAY,QAAQ,eAAe;AAC/E,QAAA,WAAW,OAAyB,IAAI;AACxC,QAAA;AAAA,IACJ,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEC,iBAAwB,EAAE,GAAG,YAAY,eAAe,MAAM,kBAAkB,QAAQ;AAErF,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,mBAAmB,MAChB,qBAAA,OAAA,EAAK,GAAG,YAAY,WAAW,OAAO,aACrC,UAAA;AAAA,MAAA;AAAA,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,SAAS,EAAA,GAAG,sBACX,UAAA,oBAAC,aAAW,CAAA,GACd;AAAA,4BACC,SAAS,EAAA,GAAG,sBACX,UAAA,oBAAC,aAAW,CAAA,GACd;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;"}
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;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,UAAU,GAAG,OAAO,OAAO,WAAW,YAAY,OAAO,aAAa;AAE5E,8BACG,SAAO,EAAA,GAAG,MAAM,gBAAc,QAAQ,WAAW,SAC/C,UAAA;AAAA,IAAA;AAAA,IACA,YAAY,CAAC,YAAY,oBAAC,WAAM,WAAW,OAAO,eAAe,UAAU,cAAA;AAAA,IAC3E,YAAY,CAAC,YAAY,oBAAC,kBAAiB,CAAA,CAAA;AAAA,EAC9C,EAAA,CAAA;AAEJ;ACjBA,MAAM,WAAW;AAAA,EACf,CACE;AAAA,IACE,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,SAAS;AAAA,IACzB,GAA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O,aACrC,UAAA;AAAA,MAAA;AAAA,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
@@ -10,35 +10,35 @@ const button = require("@react-aria/button");
10
10
  const i18n = require("@react-aria/i18n");
11
11
  const numberfield$1 = require("@react-aria/numberfield");
12
12
  const numberfield = require("@react-stately/numberfield");
13
- const formGroup = "_formGroup_1u9hb_10";
14
- const formIncreasedErrorMargin = "_formIncreasedErrorMargin_1u9hb_18";
15
- const formInline = "_formInline_1u9hb_22";
16
- const form = "_form_1u9hb_10";
17
- const formInput = "_formInput_1u9hb_36";
18
- const isFocused = "_isFocused_1u9hb_56";
19
- const iconField = "_iconField_1u9hb_73";
20
- const suffixContainer = "_suffixContainer_1u9hb_77";
21
- const isInvalid = "_isInvalid_1u9hb_82";
22
- const inlineForm = "_inlineForm_1u9hb_93";
23
- const label = "_label_1u9hb_98";
24
- const labelDisabled = "_labelDisabled_1u9hb_104";
25
- const labelOptional = "_labelOptional_1u9hb_108";
26
- const compactTextField = "_compactTextField_1u9hb_114";
27
- const fieldError = "_fieldError_1u9hb_138";
28
- const hint = "_hint_1u9hb_184";
29
- const field = "_field_1u9hb_138";
30
- const fieldErrorMessage = "_fieldErrorMessage_1u9hb_204";
31
- const isDisabled = "_isDisabled_1u9hb_217";
32
- const checkbox = "_checkbox_1u9hb_284";
33
- const radio = "_radio_1u9hb_291";
34
- const number = "_number_1u9hb_295";
35
- const suffix = "_suffix_1u9hb_77";
36
- const iconFieldIcon = "_iconFieldIcon_1u9hb_333";
37
- const formInputTiny = "_formInputTiny_1u9hb_341";
38
- const requiredAsterisk = "_requiredAsterisk_1u9hb_350";
39
- const fieldSet = "_fieldSet_1u9hb_354";
40
- const isActive = "_isActive_1u9hb_365";
41
- const numberField = "_numberField_1u9hb_372";
13
+ const formGroup = "_formGroup_19syx_10";
14
+ const formIncreasedErrorMargin = "_formIncreasedErrorMargin_19syx_18";
15
+ const formInline = "_formInline_19syx_22";
16
+ const form = "_form_19syx_10";
17
+ const formInput = "_formInput_19syx_36";
18
+ const isFocused = "_isFocused_19syx_56";
19
+ const iconField = "_iconField_19syx_75";
20
+ const suffixContainer = "_suffixContainer_19syx_79";
21
+ const isInvalid = "_isInvalid_19syx_84";
22
+ const inlineForm = "_inlineForm_19syx_95";
23
+ const label = "_label_19syx_100";
24
+ const labelDisabled = "_labelDisabled_19syx_106";
25
+ const labelOptional = "_labelOptional_19syx_110";
26
+ const compactTextField = "_compactTextField_19syx_116";
27
+ const fieldError = "_fieldError_19syx_140";
28
+ const hint = "_hint_19syx_186";
29
+ const field = "_field_19syx_140";
30
+ const fieldErrorMessage = "_fieldErrorMessage_19syx_206";
31
+ const isDisabled = "_isDisabled_19syx_219";
32
+ const checkbox = "_checkbox_19syx_286";
33
+ const radio = "_radio_19syx_293";
34
+ const number = "_number_19syx_297";
35
+ const suffix = "_suffix_19syx_79";
36
+ const iconFieldIcon = "_iconFieldIcon_19syx_335";
37
+ const formInputTiny = "_formInputTiny_19syx_343";
38
+ const requiredAsterisk = "_requiredAsterisk_19syx_352";
39
+ const fieldSet = "_fieldSet_19syx_356";
40
+ const isActive = "_isActive_19syx_367";
41
+ const numberField = "_numberField_19syx_374";
42
42
  const styles = {
43
43
  formGroup,
44
44
  formIncreasedErrorMargin,
@@ -69,9 +69,9 @@ const styles = {
69
69
  fieldSet,
70
70
  isActive,
71
71
  numberField,
72
- "numberField-input": "_numberField-input_1u9hb_376",
73
- "numberField-stepperContainer": "_numberField-stepperContainer_1u9hb_380",
74
- "numberField-stepper": "_numberField-stepper_1u9hb_380"
72
+ "numberField-input": "_numberField-input_19syx_378",
73
+ "numberField-stepperContainer": "_numberField-stepperContainer_19syx_382",
74
+ "numberField-stepper": "_numberField-stepper_19syx_382"
75
75
  };
76
76
  const RequiredAsterisk = ({
77
77
  className,
@@ -162,9 +162,11 @@ const TextField = react.forwardRef(
162
162
  suffix: suffix2,
163
163
  overrideWidth,
164
164
  "data-test-id": testId = "text-field",
165
+ autoComplete,
165
166
  ...rest
166
167
  }, ref) => {
167
168
  const classes = overrideWidth ? className : classix.cx(styles.formInput, tiny && styles.formInputTiny, className);
169
+ const disablePasswordManagers = autoComplete === "off";
168
170
  if (suffix2) {
169
171
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.suffixContainer, children: [
170
172
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -173,6 +175,7 @@ const TextField = react.forwardRef(
173
175
  ...rest,
174
176
  type,
175
177
  "data-test-id": testId,
178
+ autoComplete,
176
179
  className: classes,
177
180
  readOnly,
178
181
  ref,
@@ -186,10 +189,12 @@ const TextField = react.forwardRef(
186
189
  "input",
187
190
  {
188
191
  ...rest,
192
+ "data-1p-ignore": disablePasswordManagers,
189
193
  type,
190
194
  className: classes,
191
195
  readOnly,
192
196
  tabIndex,
197
+ autoComplete,
193
198
  ref,
194
199
  "data-test-id": testId,
195
200
  style: overrideWidth ? {
@@ -270,7 +275,7 @@ const FieldError = ({
270
275
  "aria-label": "Error",
271
276
  id: createFieldErrorId(name),
272
277
  children: [
273
- /* @__PURE__ */ jsxRuntime.jsx(icons.AlertRhombus, { size: "small" }),
278
+ /* @__PURE__ */ jsxRuntime.jsx(icons.Icon, { name: "alert-rhombus", size: "small" }),
274
279
  " ",
275
280
  errorMessage
276
281
  ]
@@ -382,11 +387,11 @@ const IconField = ({
382
387
  "data-test-id": testId = "icon-field",
383
388
  ...rest
384
389
  }) => {
385
- const Icon = icon;
390
+ const renderIcon = react.cloneElement(icon, { size: "small", className: styles.iconFieldIcon });
386
391
  const classes = classix.cx(styles.iconField, className);
387
392
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, "data-test-id": testId, ...rest, children: [
388
393
  children,
389
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "small", className: styles.iconFieldIcon })
394
+ renderIcon
390
395
  ] });
391
396
  };
392
397
  const Radio = ({
@@ -555,8 +560,8 @@ const useNumberField = ({
555
560
  }
556
561
  ),
557
562
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles["numberField-stepperContainer"], children: [
558
- /* @__PURE__ */ jsxRuntime.jsx(Stepper, { ...incrementButtonProps, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ExpandLess, {}) }),
559
- /* @__PURE__ */ jsxRuntime.jsx(Stepper, { ...decrementButtonProps, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ExpandMore, {}) })
563
+ /* @__PURE__ */ jsxRuntime.jsx(Stepper, { ...incrementButtonProps, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Icon, { name: "expand-less" }) }),
564
+ /* @__PURE__ */ jsxRuntime.jsx(Stepper, { ...decrementButtonProps, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Icon, { name: "expand-more" }) })
560
565
  ] })
561
566
  ] })
562
567
  };
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 ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx(styles.formInput, tiny && styles.formInputTiny, className);\n\n if (suffix) {\n return (\n <div className={styles.suffixContainer}>\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n className={classes}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className={styles.suffix} htmlFor={rest.id}>\n {suffix}\n </label>\n </div>\n );\n }\n\n return (\n <input\n {...rest}\n type={type}\n className={classes}\n readOnly={readOnly}\n tabIndex={tabIndex}\n ref={ref}\n data-test-id={testId}\n style={\n overrideWidth\n ? {\n width: overrideWidth,\n }\n : undefined\n }\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n );\n }\n);\n\nTextField.displayName = 'TextField';\n\nexport { TextField };\nexport type { TextFieldProps };\n","import type { TextFieldProps } from './TextField';\nimport type { FocusEvent } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef, useState } from 'react';\n\nimport { Label } from './Label';\nimport { TextField } from './TextField';\nimport styles from './styles/Form.module.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n (\n {\n className,\n id,\n label,\n needsErrorFeedback,\n value,\n onFocus,\n onBlur,\n 'data-test-id': testId = 'compact-text-field',\n ...rest\n },\n ref\n ) => {\n const [isActive, setIsActive] = useState(\n (typeof value === 'boolean' || value ? value.toString() : '').trim().length !== 0\n );\n\n const isActiveState = isActive || needsErrorFeedback;\n\n const classes = cx(styles.compactTextField, className, isActiveState && styles.isActive);\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { ComponentProps } from 'react';\n\nimport { AlertRhombus } 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 <AlertRhombus 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 } from 'react';\n\nimport { cx } from 'classix';\n\nimport styles from './styles/Form.module.css';\n\ntype IconFieldProps = ComponentProps<'div'> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx(styles.iconField, className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" className={styles.iconFieldIcon} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, 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 { ExpandLess, ExpandMore } 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 <ExpandLess />\n </Stepper>\n <Stepper {...decrementButtonProps}>\n <ExpandMore />\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","AlertRhombus","isInvalid","hint","Fragment","isValidElement","cloneElement","Children","VisuallyHidden","useLocale","useNumberFieldState","useReactAriaNumberField","ExpandLess","ExpandMore","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,MAAA;AAAA,EACf,CACE;AAAA,IACE,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IAC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AQ,eAAe;AAC/E,QAAA,WAAWhB,aAAyB,IAAI;AACxC,QAAA;AAAA,IACJ,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEiB,6BAAwB,EAAE,GAAG,YAAY,eAAe,MAAM,kBAAkB,QAAQ;AAErF,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,mBAAmB,MAChBlB,gCAAA,OAAA,EAAK,GAAG,YAAY,WAAW,OAAO,aACrC,UAAA;AAAA,MAAAF,2BAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACE,GAAG;AAAA,UACJ,WAAWD,QAAG,GAAA,OAAO,WAAW,OAAO,mBAAmB,CAAC;AAAA,UAC3D,gBAAc;AAAA,UACd;AAAA,UACA,KAAK;AAAA,QAAA;AAAA,MACP;AAAA,MACCG,2BAAA,KAAA,OAAA,EAAI,WAAW,OAAO,8BAA8B,GACnD,UAAA;AAAA,QAAAF,+BAAC,SAAS,EAAA,GAAG,sBACX,UAAAA,+BAACqB,MAAAA,aAAW,CAAA,GACd;AAAA,uCACC,SAAS,EAAA,GAAG,sBACX,UAAArB,+BAACsB,MAAAA,aAAW,CAAA,GACd;AAAA,MAAA,GACF;AAAA,IAAA,GACF;AAAA,EAAA;AAGN;AAEA,MAAM,UAAU,CAAC,UAA2B;AACpC,QAAA,YAAYnB,aAA0B,IAAI;AAChD,QAAM,EAAE,YAAgB,IAAAoB,OAAA,UAAU,OAAO,SAAS;AAGhD,SAAAvB,2BAAA,IAAC,UAAQ,EAAA,GAAG,aAAa,WAAW,OAAO,qBAAqB,GAAG,KAAK,WACrE,UAAA,MAAM,SACT,CAAA;AAEJ;;;;;;;;;;;;;;;;;;"}
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","cloneElement","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,+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;ACj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GAAG,aAAa,WAAW,OAAO,qBAAqB,GAAG,KAAK,WACrE,UAAA,MAAM,SACT,CAAA;AAEJ;;;;;;;;;;;;;;;;;;"}
package/dist/style.css CHANGED
@@ -7,7 +7,7 @@
7
7
  --lp-component-form-color-text-label-disabled: var(--lp-color-gray-400);
8
8
  }
9
9
 
10
- ._formGroup_1u9hb_10 {
10
+ ._formGroup_19syx_10 {
11
11
  margin: 2rem 0;
12
12
  padding: 0;
13
13
  border: none;
@@ -16,57 +16,57 @@
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
- ._formIncreasedErrorMargin_1u9hb_18 ._formGroup_1u9hb_10 {
19
+ ._formIncreasedErrorMargin_19syx_18 ._formGroup_19syx_10 {
20
20
  margin: 2.8rem 0;
21
21
  }
22
22
 
23
- ._formInline_1u9hb_22 ._formGroup_1u9hb_10 {
23
+ ._formInline_19syx_22 ._formGroup_19syx_10 {
24
24
  display: inline-block;
25
25
  vertical-align: middle;
26
26
  margin: 0;
27
27
  }
28
28
 
29
- ._form_1u9hb_10 ._formGroup_1u9hb_10:first-child {
29
+ ._form_19syx_10 ._formGroup_19syx_10:first-child {
30
30
  margin-top: 0;
31
31
  }
32
32
 
33
- ._form_1u9hb_10 ._formGroup_1u9hb_10:last-child {
33
+ ._form_19syx_10 ._formGroup_19syx_10:last-child {
34
34
  margin-bottom: 0;
35
35
  }
36
36
 
37
- ._formInput_1u9hb_36 {
37
+ ._formInput_19syx_36 {
38
38
  display: block;
39
39
  width: 100%;
40
40
  padding: 0.6rem 1rem;
41
41
  font-size: 1.3rem;
42
42
  font-family: var(--lp-font-family-base);
43
43
  line-height: var(--lp-line-height-300);
44
- background-color: var(--lp-color-bg-field);
45
- color: var(--lp-color-text-ui-primary);
46
- border: 1px solid var(--lp-color-border-field);
44
+ background-color: var(--lp-color-bg-field-base);
45
+ color: var(--lp-color-text-ui-primary-base);
46
+ border: 1px solid var(--lp-color-border-field-base);
47
47
  border-radius: var(--lp-border-radius-regular);
48
48
  transition: all var(--lp-duration-100) linear;
49
49
  height: 3.2rem;
50
50
  }
51
51
 
52
- ._formInput_1u9hb_36:-moz-placeholder-shown {
52
+ ._formInput_19syx_36:-moz-placeholder-shown {
53
53
  overflow: hidden;
54
54
  text-overflow: ellipsis;
55
55
  }
56
56
 
57
- ._formInput_1u9hb_36:placeholder-shown {
57
+ ._formInput_19syx_36:placeholder-shown {
58
58
  overflow: hidden;
59
59
  text-overflow: ellipsis;
60
60
  }
61
61
 
62
- ._formInput_1u9hb_36._isFocused_1u9hb_56,
63
- ._formInput_1u9hb_36:focus {
62
+ ._formInput_19syx_36._isFocused_19syx_56,
63
+ ._formInput_19syx_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._formInput_1u9hb_36 {
69
+ select._formInput_19syx_36 {
70
70
  -webkit-appearance: none;
71
71
  -moz-appearance: none;
72
72
  appearance: none;
@@ -74,58 +74,60 @@ select._formInput_1u9hb_36 {
74
74
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 8.84L12 13.42l4.59-4.58L18 10.25l-6 6-6-6 1.41-1.41z" fill="%23646f7a"/></svg>');
75
75
  background-size: 2rem;
76
76
  background-repeat: no-repeat;
77
- background-position: right 0.4em top 50%, 0 0;
77
+ background-position:
78
+ right 0.4em top 50%,
79
+ 0 0;
78
80
  padding-right: 2rem;
79
81
  }
80
82
 
81
- ._iconField_1u9hb_73 ._formInput_1u9hb_36 {
83
+ ._iconField_19syx_75 ._formInput_19syx_36 {
82
84
  padding-left: 3rem;
83
85
  }
84
86
 
85
- ._suffixContainer_1u9hb_77 ._formInput_1u9hb_36 {
87
+ ._suffixContainer_19syx_79 ._formInput_19syx_36 {
86
88
  border: none;
87
89
  border-radius: var(--lp-border-radius-regular) 0 0 var(--lp-border-radius-regular);
88
90
  }
89
91
 
90
- ._isInvalid_1u9hb_82 ._formInput_1u9hb_36,
91
- ._form_1u9hb_10 ._isInvalid_1u9hb_82 .Select-control,
92
- ._form_1u9hb_10 ._isInvalid_1u9hb_82 .CustomSelect > div,
93
- ._form_1u9hb_10 ._isInvalid_1u9hb_82 ._formInput_1u9hb_36 {
92
+ ._isInvalid_19syx_84 ._formInput_19syx_36,
93
+ ._form_19syx_10 ._isInvalid_19syx_84 .Select-control,
94
+ ._form_19syx_10 ._isInvalid_19syx_84 .CustomSelect > div,
95
+ ._form_19syx_10 ._isInvalid_19syx_84 ._formInput_19syx_36 {
94
96
  border-color: var(--lp-color-border-field-error);
95
97
  }
96
98
 
97
- ._suffixContainer_1u9hb_77 ._formInput_1u9hb_36:focus {
99
+ ._suffixContainer_19syx_79 ._formInput_19syx_36:focus {
98
100
  box-shadow: none;
99
101
  }
100
102
 
101
- ._inlineForm_1u9hb_93 ._formGroup_1u9hb_10 + ._formGroup_1u9hb_10,
102
- ._inlineForm_1u9hb_93 ._formGroup_1u9hb_10 + .Button {
103
+ ._inlineForm_19syx_95 ._formGroup_19syx_10 + ._formGroup_19syx_10,
104
+ ._inlineForm_19syx_95 ._formGroup_19syx_10 + .Button {
103
105
  margin-left: 1rem;
104
106
  }
105
107
 
106
- ._label_1u9hb_98 {
108
+ ._label_19syx_100 {
107
109
  font-size: 1.3rem;
108
110
  font-family: var(--lp-font-family-base);
109
111
  word-break: break-word;
110
112
  }
111
113
 
112
- ._labelDisabled_1u9hb_104 {
114
+ ._labelDisabled_19syx_106 {
113
115
  color: var(--lp-color-gray-800);
114
116
  color: var(--lp-component-form-color-text-label-disabled);
115
117
  }
116
118
 
117
- ._labelOptional_1u9hb_108 {
119
+ ._labelOptional_19syx_110 {
118
120
  margin-left: 0.4em;
119
121
  color: var(--lp-color-text-ui-secondary);
120
122
  fill: var(--lp-color-text-ui-secondary);
121
123
  }
122
124
 
123
- ._compactTextField_1u9hb_114 ._label_1u9hb_98 {
125
+ ._compactTextField_19syx_116 ._label_19syx_100 {
124
126
  position: absolute;
125
127
  top: -2px;
126
128
  left: 10px;
127
129
  padding: 0 3px;
128
- color: var(--lp-color-text-ui-primary);
130
+ color: var(--lp-color-text-ui-primary-base);
129
131
  opacity: 0;
130
132
  pointer-events: none;
131
133
  background-color: var(--lp-color-bg-ui-primary);
@@ -134,68 +136,68 @@ select._formInput_1u9hb_36 {
134
136
  z-index: 1; /* Fixes layout issue in Firefox */
135
137
  }
136
138
 
137
- ._formGroup_1u9hb_10 ._label_1u9hb_98 {
139
+ ._formGroup_19syx_10 ._label_19syx_100 {
138
140
  display: flex;
139
141
  align-items: center;
140
142
  margin-bottom: 0.2rem;
141
143
  }
142
144
 
143
- ._formGroup_1u9hb_10 ._label_1u9hb_98 + ._label_1u9hb_98 {
145
+ ._formGroup_19syx_10 ._label_19syx_100 + ._label_19syx_100 {
144
146
  margin-top: 0.5rem;
145
147
  }
146
148
 
147
- ._fieldError_1u9hb_138 {
149
+ ._fieldError_19syx_140 {
148
150
  color: var(--lp-color-text-feedback-error);
149
151
  font-size: 1.3rem;
150
152
  }
151
153
 
152
- ._fieldError_1u9hb_138 svg {
154
+ ._fieldError_19syx_140 svg {
153
155
  transform: translateY(-1px);
154
156
  }
155
157
 
156
158
  /* The margin for .formGroup and the min-height of .form-fieldError
157
159
  should be equal to avoid content shift when errors are shown */
158
160
 
159
- ._formIncreasedErrorMargin_1u9hb_18 ._fieldError_1u9hb_138 {
161
+ ._formIncreasedErrorMargin_19syx_18 ._fieldError_19syx_140 {
160
162
  min-height: 2.8rem;
161
163
  }
162
164
 
163
- ._label_1u9hb_98 ._fieldError_1u9hb_138 {
165
+ ._label_19syx_100 ._fieldError_19syx_140 {
164
166
  float: right;
165
167
  }
166
168
 
167
- ._form_1u9hb_10:not(._inlineForm_1u9hb_93) ._fieldError_1u9hb_138 {
169
+ ._form_19syx_10:not(._inlineForm_19syx_95) ._fieldError_19syx_140 {
168
170
  display: block;
169
171
  padding-top: 0.5rem;
170
172
  text-align: left;
171
173
  }
172
174
 
173
- ._formIncreasedErrorMargin_1u9hb_18:not(._inlineForm_1u9hb_93) ._fieldError_1u9hb_138 {
175
+ ._formIncreasedErrorMargin_19syx_18:not(._inlineForm_19syx_95) ._fieldError_19syx_140 {
174
176
  padding-top: 0.1rem;
175
177
  padding-bottom: 0.5rem;
176
178
  }
177
179
 
178
- ._form_1u9hb_10 ._isInvalid_1u9hb_82 ._label_1u9hb_98 {
180
+ ._form_19syx_10 ._isInvalid_19syx_84 ._label_19syx_100 {
179
181
  color: var(--lp-color-text-feedback-error);
180
182
  }
181
183
 
182
- ._formInput_1u9hb_36::-moz-placeholder {
184
+ ._formInput_19syx_36::-moz-placeholder {
183
185
  color: var(--lp-color-text-field-placeholder);
184
186
  }
185
187
 
186
- ._formInput_1u9hb_36::placeholder {
188
+ ._formInput_19syx_36::placeholder {
187
189
  color: var(--lp-color-text-field-placeholder);
188
190
  }
189
191
 
190
- ._formIncreasedErrorMargin_1u9hb_18 ._formGroup_1u9hb_10._isInvalid_1u9hb_82 {
192
+ ._formIncreasedErrorMargin_19syx_18 ._formGroup_19syx_10._isInvalid_19syx_84 {
191
193
  margin-bottom: 0;
192
194
  }
193
195
 
194
- ._formIncreasedErrorMargin_1u9hb_18 ._formGroup_1u9hb_10._isInvalid_1u9hb_82 + ._formGroup_1u9hb_10 {
196
+ ._formIncreasedErrorMargin_19syx_18 ._formGroup_19syx_10._isInvalid_19syx_84 + ._formGroup_19syx_10 {
195
197
  margin-top: 0;
196
198
  }
197
199
 
198
- ._hint_1u9hb_184 {
200
+ ._hint_19syx_186 {
199
201
  display: block;
200
202
  margin-top: 0.3rem;
201
203
  font-size: 1.3rem;
@@ -203,76 +205,76 @@ select._formInput_1u9hb_36 {
203
205
  color: var(--lp-color-text-ui-secondary);
204
206
  }
205
207
 
206
- ._field_1u9hb_138 ._hint_1u9hb_184 {
208
+ ._field_19syx_140 ._hint_19syx_186 {
207
209
  margin: 0;
208
210
  font-size: 1.3rem;
209
211
  color: var(--lp-color-text-ui-secondary);
210
212
  fill: var(--lp-color-text-ui-secondary);
211
213
  }
212
214
 
213
- ._form_1u9hb_10 ._field_1u9hb_138 label,
214
- ._form_1u9hb_10 ._field_1u9hb_138 ._isInvalid_1u9hb_82 label {
215
- color: var(--lp-color-text-ui-primary);
215
+ ._form_19syx_10 ._field_19syx_140 label,
216
+ ._form_19syx_10 ._field_19syx_140 ._isInvalid_19syx_84 label {
217
+ color: var(--lp-color-text-ui-primary-base);
216
218
  }
217
219
 
218
- ._fieldErrorMessage_1u9hb_204 {
220
+ ._fieldErrorMessage_19syx_206 {
219
221
  color: var(--lp-color-text-feedback-error);
220
222
  font-size: 1.3rem;
221
223
  }
222
224
 
223
- ._field_1u9hb_138._formGroup_1u9hb_10 {
225
+ ._field_19syx_140._formGroup_19syx_10 {
224
226
  margin: 1rem 0;
225
227
  }
226
228
 
227
- ._field_1u9hb_138._formGroup_1u9hb_10:first-child {
229
+ ._field_19syx_140._formGroup_19syx_10:first-child {
228
230
  margin-top: 0;
229
231
  }
230
232
 
231
- input._formInput_1u9hb_36:-moz-read-only {
233
+ input._formInput_19syx_36:-moz-read-only {
232
234
  opacity: 1;
233
235
  background-color: var(--lp-color-bg-field-disabled);
234
236
  color: var(--lp-color-text-field-disabled);
235
237
  border-color: var(--lp-color-border-field-disabled);
236
238
  }
237
239
 
238
- ._formInput_1u9hb_36._isDisabled_1u9hb_217,
239
- input._formInput_1u9hb_36:disabled,
240
- select._formInput_1u9hb_36:disabled,
241
- input._formInput_1u9hb_36:read-only {
240
+ ._formInput_19syx_36._isDisabled_19syx_219,
241
+ input._formInput_19syx_36:disabled,
242
+ select._formInput_19syx_36:disabled,
243
+ input._formInput_19syx_36:read-only {
242
244
  opacity: 1;
243
245
  background-color: var(--lp-color-bg-field-disabled);
244
246
  color: var(--lp-color-text-field-disabled);
245
247
  border-color: var(--lp-color-border-field-disabled);
246
248
  }
247
249
 
248
- ._formInput_1u9hb_36._isDisabled_1u9hb_217:hover,
249
- ._formInput_1u9hb_36:disabled:hover {
250
+ ._formInput_19syx_36._isDisabled_19syx_219:hover,
251
+ ._formInput_19syx_36:disabled:hover {
250
252
  cursor: not-allowed;
251
253
  }
252
254
 
253
- textarea._formInput_1u9hb_36 {
255
+ textarea._formInput_19syx_36 {
254
256
  min-height: 2.5em;
255
257
  height: auto;
256
258
  resize: none;
257
259
  }
258
260
 
259
- textarea._formInput_1u9hb_36:-moz-read-only {
261
+ textarea._formInput_19syx_36:-moz-read-only {
260
262
  opacity: 1;
261
263
  color: var(--lp-color-text-field-disabled);
262
264
  background-color: var(--lp-color-bg-field-disabled);
263
265
  border-color: var(--lp-color-border-field-disabled);
264
266
  }
265
267
 
266
- textarea._formInput_1u9hb_36:disabled,
267
- textarea._formInput_1u9hb_36:read-only {
268
+ textarea._formInput_19syx_36:disabled,
269
+ textarea._formInput_19syx_36:read-only {
268
270
  opacity: 1;
269
271
  color: var(--lp-color-text-field-disabled);
270
272
  background-color: var(--lp-color-bg-field-disabled);
271
273
  border-color: var(--lp-color-border-field-disabled);
272
274
  }
273
275
 
274
- input._formInput_1u9hb_36::-webkit-autofill {
275
- box-shadow: 0 0 0 50px var(--lp-color-bg-field) inset;
276
+ input._formInput_19syx_36::-webkit-autofill {
277
+ box-shadow: 0 0 0 50px var(--lp-color-bg-field-base) inset;
276
278
  }
277
279
 
278
280
  /* Hide the type=search cancel button in Webkit for consistency */
@@ -304,42 +306,42 @@ input[type='checkbox']:disabled {
304
306
  pointer-events: none;
305
307
  }
306
308
 
307
- ._formInput_1u9hb_36[readonly],
308
- ._formInput_1u9hb_36[readonly]:focus {
309
+ ._formInput_19syx_36[readonly],
310
+ ._formInput_19syx_36[readonly]:focus {
309
311
  color: var(--lp-color-text-ui-secondary);
310
312
  border-color: var(--lp-color-gray-500);
311
313
  box-shadow: none;
312
314
  }
313
315
 
314
- ._checkbox_1u9hb_284 {
316
+ ._checkbox_19syx_286 {
315
317
  align-self: flex-start; /* Default for .label is center, but this looks bad on multi-line checkbox labels */
316
318
  flex-shrink: 0; /* Make sure the input itself doesn't shrink in flex layouts */
317
319
  margin-right: 0.5rem;
318
320
  margin-top: 0.4rem;
319
321
  }
320
322
 
321
- ._radio_1u9hb_291 {
323
+ ._radio_19syx_293 {
322
324
  margin-right: 0.5rem;
323
325
  }
324
326
 
325
- ._number_1u9hb_295 {
327
+ ._number_19syx_297 {
326
328
  min-width: 4.5rem;
327
329
  }
328
330
 
329
- ._suffixContainer_1u9hb_77 {
331
+ ._suffixContainer_19syx_79 {
330
332
  display: inline-flex;
331
- border: 1px solid var(--lp-color-border-field);
333
+ border: 1px solid var(--lp-color-border-field-base);
332
334
  border-radius: var(--lp-border-radius-regular);
333
335
  overflow: hidden;
334
336
  transition: all 0.1s linear;
335
337
  }
336
338
 
337
- ._suffixContainer_1u9hb_77:focus-within {
339
+ ._suffixContainer_19syx_79:focus-within {
338
340
  border-color: var(--lp-color-border-field-focus);
339
341
  box-shadow: 0 0 0 3px hsla(231.5, 100%, 62.5%, 0.1);
340
342
  }
341
343
 
342
- ._suffixContainer_1u9hb_77 ._suffix_1u9hb_77 {
344
+ ._suffixContainer_19syx_79 ._suffix_19syx_79 {
343
345
  padding: 0 2px;
344
346
  background-color: var(--lp-color-bg-field-aside);
345
347
  color: var(--lp-color-text-ui-secondary);
@@ -350,8 +352,8 @@ input[type='checkbox']:disabled {
350
352
  position: initial;
351
353
  }
352
354
 
353
- ._suffix_1u9hb_77::-webkit-outer-spin-button,
354
- ._suffix_1u9hb_77::-webkit-inner-spin-button {
355
+ ._suffix_19syx_79::-webkit-outer-spin-button,
356
+ ._suffix_19syx_79::-webkit-inner-spin-button {
355
357
  -webkit-appearance: none;
356
358
  appearance: none;
357
359
  margin: 0;
@@ -359,61 +361,61 @@ input[type='checkbox']:disabled {
359
361
 
360
362
  /* Firefox */
361
363
 
362
- ._suffix_1u9hb_77[type='number'] {
364
+ ._suffix_19syx_79[type='number'] {
363
365
  -webkit-appearance: textfield;
364
366
  -moz-appearance: textfield;
365
367
  appearance: textfield;
366
368
  }
367
369
 
368
- ._iconFieldIcon_1u9hb_333 {
370
+ ._iconFieldIcon_19syx_335 {
369
371
  position: absolute;
370
- fill: var(--lp-color-fill-field);
372
+ fill: var(--lp-color-fill-field-base);
371
373
  top: 50%;
372
374
  transform: translateY(-50%);
373
375
  left: 1rem;
374
376
  }
375
377
 
376
- ._formInputTiny_1u9hb_341 {
378
+ ._formInputTiny_19syx_343 {
377
379
  padding: 0.1rem 0.6rem;
378
380
  height: 2.4rem;
379
381
  }
380
382
 
381
- ._iconField_1u9hb_73 {
383
+ ._iconField_19syx_75 {
382
384
  position: relative;
383
385
  }
384
386
 
385
- ._requiredAsterisk_1u9hb_350 {
387
+ ._requiredAsterisk_19syx_352 {
386
388
  color: var(--lp-color-text-feedback-error);
387
389
  }
388
390
 
389
- ._fieldSet_1u9hb_354 {
391
+ ._fieldSet_19syx_356 {
390
392
  border: none;
391
393
  margin: 2rem 0;
392
394
  padding: 0;
393
395
  }
394
396
 
395
- ._compactTextField_1u9hb_114 {
397
+ ._compactTextField_19syx_116 {
396
398
  position: relative;
397
399
  width: 100%;
398
400
  }
399
401
 
400
- ._compactTextField_1u9hb_114._isActive_1u9hb_365 ._label_1u9hb_98 {
402
+ ._compactTextField_19syx_116._isActive_19syx_367 ._label_19syx_100 {
401
403
  border-radius: var(--lp-border-radius-regular);
402
404
  opacity: 1;
403
405
  pointer-events: auto;
404
406
  transform: translate(0, -8px) scale(0.9); /* 2d transform to avoid webkit blurry text */
405
407
  }
406
408
 
407
- ._numberField_1u9hb_372 {
409
+ ._numberField_19syx_374 {
408
410
  display: flex;
409
411
  position: relative;
410
412
  }
411
413
 
412
- ._numberField_1u9hb_372 ._numberField-input_1u9hb_376 {
414
+ ._numberField_19syx_374 ._numberField-input_19syx_378 {
413
415
  padding-right: 2.4rem;
414
416
  }
415
417
 
416
- ._numberField_1u9hb_372 ._numberField-stepperContainer_1u9hb_380 {
418
+ ._numberField_19syx_374 ._numberField-stepperContainer_19syx_382 {
417
419
  display: flex;
418
420
  opacity: 0;
419
421
  flex-direction: column;
@@ -425,11 +427,11 @@ input[type='checkbox']:disabled {
425
427
  transition: all var(--lp-duration-100) linear;
426
428
  }
427
429
 
428
- ._numberField_1u9hb_372 ._numberField-stepperContainer_1u9hb_380 ._numberField-stepper_1u9hb_380 {
430
+ ._numberField_19syx_374 ._numberField-stepperContainer_19syx_382 ._numberField-stepper_19syx_382 {
429
431
  --numberField-stepper-padding: 0.4rem;
430
432
  --numberField-stepper-border-radius: calc(var(--lp-border-radius-regular) - 0.1rem);
431
433
 
432
- background-color: var(--lp-color-bg-field);
434
+ background-color: var(--lp-color-bg-field-base);
433
435
  flex: auto;
434
436
  display: flex;
435
437
  justify-content: center;
@@ -443,29 +445,29 @@ input[type='checkbox']:disabled {
443
445
  overflow: hidden;
444
446
  }
445
447
 
446
- ._numberField_1u9hb_372 ._numberField-stepperContainer_1u9hb_380 ._numberField-stepper_1u9hb_380:first-child {
448
+ ._numberField_19syx_374 ._numberField-stepperContainer_19syx_382 ._numberField-stepper_19syx_382:first-child {
447
449
  border-top-right-radius: var(--numberField-stepper-border-radius);
448
450
  padding-top: var(--numberField-stepper-padding);
449
451
  }
450
452
 
451
- ._numberField_1u9hb_372 ._numberField-stepperContainer_1u9hb_380 ._numberField-stepper_1u9hb_380:last-child {
453
+ ._numberField_19syx_374 ._numberField-stepperContainer_19syx_382 ._numberField-stepper_19syx_382:last-child {
452
454
  border-bottom-right-radius: var(--numberField-stepper-border-radius);
453
455
  padding-bottom: var(--numberField-stepper-padding);
454
456
  }
455
457
 
456
- ._numberField_1u9hb_372 ._numberField-stepperContainer_1u9hb_380 ._numberField-stepper_1u9hb_380:hover {
458
+ ._numberField_19syx_374 ._numberField-stepperContainer_19syx_382 ._numberField-stepper_19syx_382:hover {
457
459
  background-color: var(--lp-color-bg-interactive-secondary-hover);
458
460
  }
459
461
 
460
- ._numberField_1u9hb_372 ._numberField-stepperContainer_1u9hb_380 ._numberField-stepper_1u9hb_380:active {
462
+ ._numberField_19syx_374 ._numberField-stepperContainer_19syx_382 ._numberField-stepper_19syx_382:active {
461
463
  background-color: var(--lp-color-bg-interactive-secondary-active);
462
464
  }
463
465
 
464
- ._numberField_1u9hb_372 ._numberField-stepperContainer_1u9hb_380 ._numberField-stepper_1u9hb_380 span:has(svg) {
466
+ ._numberField_19syx_374 ._numberField-stepperContainer_19syx_382 ._numberField-stepper_19syx_382 span:has(svg) {
465
467
  width: 100%;
466
- color: var(--lp-color-text-ui-primary);
468
+ color: var(--lp-color-text-ui-primary-base);
467
469
  }
468
470
 
469
- ._numberField_1u9hb_372:hover ._numberField-stepperContainer_1u9hb_380, ._numberField_1u9hb_372:has(input:focus) ._numberField-stepperContainer_1u9hb_380 {
471
+ ._numberField_19syx_374:hover ._numberField-stepperContainer_19syx_382, ._numberField_19syx_374:has(input:focus) ._numberField-stepperContainer_19syx_382 {
470
472
  opacity: 1;
471
473
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchpad-ui/form",
3
- "version": "0.8.17",
3
+ "version": "0.9.0",
4
4
  "status": "beta",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,8 +32,8 @@
32
32
  "@react-aria/visually-hidden": "3.8.1",
33
33
  "@react-stately/numberfield": "3.5.0",
34
34
  "classix": "2.1.17",
35
- "@launchpad-ui/icons": "~0.8.8",
36
- "@launchpad-ui/tokens": "~0.5.8"
35
+ "@launchpad-ui/icons": "~0.9.0",
36
+ "@launchpad-ui/tokens": "~0.6.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "18.2.0",