@launchpad-ui/form 0.5.1-alpha.0 → 0.6.1

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.
@@ -5,12 +5,14 @@ declare type CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {
5
5
  * The className to pass into the Checkbox's Label component
6
6
  */
7
7
  labelClassName?: string;
8
+ 'data-test-id'?: string;
8
9
  };
9
10
  declare const Checkbox: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
10
11
  /**
11
12
  * The className to pass into the Checkbox's Label component
12
13
  */
13
14
  labelClassName?: string | undefined;
15
+ 'data-test-id'?: string | undefined;
14
16
  } & import("react").RefAttributes<HTMLInputElement>>;
15
17
  export { Checkbox };
16
18
  export type { CheckboxProps };
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../src/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,mBAAmB,CAAC;AAE3B,aAAK,aAAa,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC3D;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,QAAQ;IANZ;;OAEG;;oDAyCJ,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../src/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,mBAAmB,CAAC;AAE3B,aAAK,aAAa,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC3D;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,QAAQ;IAPZ;;OAEG;;;oDA4CJ,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -10,6 +10,7 @@ declare const CompactTextField: import("react").ForwardRefExoticComponent<import
10
10
  suffix?: string | undefined;
11
11
  tiny?: boolean | undefined;
12
12
  overrideWidth?: string | undefined;
13
+ 'data-test-id'?: string | undefined;
13
14
  } & {
14
15
  label: string;
15
16
  needsErrorFeedback?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"CompactTextField.d.ts","sourceRoot":"","sources":["../src/CompactTextField.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQlD,OAAO,+BAA+B,CAAC;AACvC,OAAO,wBAAwB,CAAC;AAEhC,aAAK,qBAAqB,GAAG,cAAc,GAAG;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,QAAA,MAAM,gBAAgB;;;;;WAJb,MAAM;;oDA8Cd,CAAC;AAIF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"CompactTextField.d.ts","sourceRoot":"","sources":["../src/CompactTextField.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQlD,OAAO,+BAA+B,CAAC;AACvC,OAAO,wBAAwB,CAAC;AAEhC,aAAK,qBAAqB,GAAG,cAAc,GAAG;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,QAAA,MAAM,gBAAgB;;;;;;WAJb,MAAM;;oDA2Dd,CAAC;AAIF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
@@ -4,8 +4,9 @@ import './styles/Form.css';
4
4
  declare type FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {
5
5
  name: FieldPath;
6
6
  errorMessage?: string;
7
+ 'data-test-id'?: string;
7
8
  };
8
- declare const FieldError: ({ name, errorMessage, className, ...rest }: FieldErrorProps) => JSX.Element | null;
9
+ declare const FieldError: ({ name, errorMessage, className, "data-test-id": testId, ...rest }: FieldErrorProps) => JSX.Element | null;
9
10
  export { FieldError };
10
11
  export type { FieldErrorProps };
11
12
  //# sourceMappingURL=FieldError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldError.d.ts","sourceRoot":"","sources":["../src/FieldError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,mBAAmB,CAAC;AAG3B,aAAK,eAAe,GAAG,cAAc,CAAC,eAAe,CAAC,GAAG;IACvD,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,UAAU,+CAAgD,eAAe,uBAe9E,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"FieldError.d.ts","sourceRoot":"","sources":["../src/FieldError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,mBAAmB,CAAC;AAG3B,aAAK,eAAe,GAAG,cAAc,CAAC,eAAe,CAAC,GAAG;IACvD,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,UAAU,uEAMb,eAAe,uBAgBjB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import type { HTMLAttributes } from 'react';
2
2
  import './styles/FieldSet.css';
3
- declare type FieldSetProps = HTMLAttributes<HTMLFieldSetElement>;
4
- declare const FieldSet: ({ children, className, ...rest }: FieldSetProps) => JSX.Element;
3
+ declare type FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {
4
+ 'data-test-id'?: string;
5
+ };
6
+ declare const FieldSet: ({ children, className, "data-test-id": testId, ...rest }: FieldSetProps) => JSX.Element;
5
7
  export { FieldSet };
6
8
  export type { FieldSetProps };
7
9
  //# sourceMappingURL=FieldSet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldSet.d.ts","sourceRoot":"","sources":["../src/FieldSet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,uBAAuB,CAAC;AAE/B,aAAK,aAAa,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;AAEzD,QAAA,MAAM,QAAQ,kEAQb,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"FieldSet.d.ts","sourceRoot":"","sources":["../src/FieldSet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,uBAAuB,CAAC;AAE/B,aAAK,aAAa,GAAG,cAAc,CAAC,mBAAmB,CAAC,GAAG;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,QAAQ,6DAKX,aAAa,gBAQf,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
package/dist/Form.d.ts CHANGED
@@ -3,6 +3,7 @@ import './styles/Form.css';
3
3
  declare type FormProps = FormHTMLAttributes<HTMLFormElement> & {
4
4
  inline?: boolean;
5
5
  hasIncreasedErrorMargin?: boolean;
6
+ 'data-test-id'?: string;
6
7
  };
7
8
  declare const Form: (props: FormProps) => JSX.Element;
8
9
  export { Form };
@@ -1 +1 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../src/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAIhD,OAAO,mBAAmB,CAAC;AAE3B,aAAK,SAAS,GAAG,kBAAkB,CAAC,eAAe,CAAC,GAAG;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC;IAKjB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,IAAI,UAAW,SAAS,gBAe7B,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,YAAY,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../src/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAIhD,OAAO,mBAAmB,CAAC;AAE3B,aAAK,SAAS,GAAG,kBAAkB,CAAC,eAAe,CAAC,GAAG;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC;IAKjB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,IAAI,UAAW,SAAS,gBAsB7B,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,YAAY,EAAE,SAAS,EAAE,CAAC"}
@@ -12,7 +12,7 @@ declare type FormFieldProps = {
12
12
  children: JSX.Element;
13
13
  className?: string;
14
14
  onBlur?: (field: string) => void;
15
- 'data-test-id': string;
15
+ 'data-test-id'?: string;
16
16
  };
17
17
  declare const FormField: ({ isRequired, label, name, htmlFor, hint, errorMessage, ignoreValidation, isInvalid, children, className, onBlur, "data-test-id": testId, }: FormFieldProps) => JSX.Element;
18
18
  export type { FormFieldProps };
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../src/FormField.tsx"],"names":[],"mappings":";AAMA,OAAO,wBAAwB,CAAC;AAEhC,aAAK,cAAc,GAAG;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,SAAS,gJAaZ,cAAc,gBAyBhB,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../src/FormField.tsx"],"names":[],"mappings":";AAMA,OAAO,wBAAwB,CAAC;AAEhC,aAAK,cAAc,GAAG;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,SAAS,gJAaZ,cAAc,gBAyBhB,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -4,6 +4,7 @@ declare type FormGroupProps = HTMLAttributes<HTMLDivElement> & {
4
4
  name?: string | string[];
5
5
  ignoreValidation?: boolean;
6
6
  isInvalid?: boolean;
7
+ 'data-test-id'?: string;
7
8
  };
8
9
  declare const FormGroup: (props: FormGroupProps) => JSX.Element;
9
10
  export { FormGroup };
@@ -1 +1 @@
1
- {"version":3,"file":"FormGroup.d.ts","sourceRoot":"","sources":["../src/FormGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,mBAAmB,CAAC;AAE3B,aAAK,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACrD,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,SAAS,UAAW,cAAc,gBAUvC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"FormGroup.d.ts","sourceRoot":"","sources":["../src/FormGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,mBAAmB,CAAC;AAE3B,aAAK,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACrD,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,SAAS,UAAW,cAAc,gBAkBvC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import type { HTMLAttributes } from 'react';
2
2
  import './styles/FormHint.css';
3
- declare type FormHintProps = HTMLAttributes<HTMLDivElement>;
4
- declare const FormHint: ({ className, children, ...rest }: FormHintProps) => JSX.Element;
3
+ declare type FormHintProps = HTMLAttributes<HTMLDivElement> & {
4
+ 'data-test-id'?: string;
5
+ };
6
+ declare const FormHint: ({ className, children, "data-test-id": testId, ...rest }: FormHintProps) => JSX.Element;
5
7
  export { FormHint };
6
8
  export type { FormHintProps };
7
9
  //# sourceMappingURL=FormHint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormHint.d.ts","sourceRoot":"","sources":["../src/FormHint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,uBAAuB,CAAC;AAE/B,aAAK,aAAa,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEpD,QAAA,MAAM,QAAQ,kEAQb,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"FormHint.d.ts","sourceRoot":"","sources":["../src/FormHint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,uBAAuB,CAAC;AAE/B,aAAK,aAAa,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,QAAQ,6DAKX,aAAa,gBAQf,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -4,8 +4,9 @@ import './styles/IconField.css';
4
4
  declare type IconFieldProps = HTMLAttributes<HTMLDivElement> & {
5
5
  icon(args: IconProps): JSX.Element;
6
6
  children: JSX.Element | JSX.Element[];
7
+ 'data-test-id'?: string;
7
8
  };
8
- declare const IconField: ({ icon, children, className, ...rest }: IconFieldProps) => JSX.Element;
9
+ declare const IconField: ({ icon, children, className, "data-test-id": testId, ...rest }: IconFieldProps) => JSX.Element;
9
10
  export { IconField };
10
11
  export type { IconFieldProps };
11
12
  //# sourceMappingURL=IconField.d.ts.map
@@ -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;AAK5C,OAAO,wBAAwB,CAAC;AAEhC,aAAK,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACrD,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC;IACnC,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACvC,CAAC;AAEF,QAAA,MAAM,SAAS,2CAA4C,cAAc,gBAWxE,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,MAAM,OAAO,CAAC;AAI5C,OAAO,wBAAwB,CAAC;AAEhC,aAAK,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACrD,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,gBAWhB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
package/dist/Label.d.ts CHANGED
@@ -4,8 +4,9 @@ declare type LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {
4
4
  required?: boolean;
5
5
  optional?: boolean;
6
6
  disabled?: boolean;
7
+ 'data-test-id'?: string;
7
8
  };
8
- declare const Label: ({ disabled, className, children, required, optional, ...rest }: LabelProps) => JSX.Element;
9
+ declare const Label: ({ disabled, className, children, required, optional, "data-test-id": testId, ...rest }: LabelProps) => JSX.Element;
9
10
  export { Label };
10
11
  export type { LabelProps };
11
12
  //# sourceMappingURL=Label.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../src/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,mBAAmB,CAAC;AAE3B,aAAK,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,KAAK,mEAOR,UAAU,gBAUZ,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../src/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,mBAAmB,CAAC;AAE3B,aAAK,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,KAAK,2FAQR,UAAU,gBAUZ,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
package/dist/Radio.d.ts CHANGED
@@ -3,8 +3,9 @@ import './styles/Form.css';
3
3
  declare type RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {
4
4
  labelClassName?: string;
5
5
  labelStyle?: CSSProperties;
6
+ 'data-test-id'?: string;
6
7
  };
7
- declare const Radio: ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, checked, children, className, disabled, id, labelClassName, labelStyle, ...rest }: RadioProps) => JSX.Element;
8
+ declare const Radio: ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, checked, children, className, disabled, id, labelClassName, labelStyle, "data-test-id": testId, ...rest }: RadioProps) => JSX.Element;
8
9
  export { Radio };
9
10
  export type { RadioProps };
10
11
  //# sourceMappingURL=Radio.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../src/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKhE,OAAO,mBAAmB,CAAC;AAE3B,aAAK,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,KAAK,oJAWR,UAAU,gBA0BZ,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../src/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKhE,OAAO,mBAAmB,CAAC;AAE3B,aAAK,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,KAAK,4KAYR,UAAU,gBA2BZ,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -34,6 +34,7 @@ declare type RadioGroupProps = {
34
34
  * The value to compare against the Radio's value to determine if the Radio will be checked.
35
35
  */
36
36
  value: string;
37
+ 'data-test-id'?: string;
37
38
  };
38
39
  declare const RadioGroup: (props: RadioGroupProps) => JSX.Element;
39
40
  export { RadioGroup };
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../src/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AAO7E,OAAO,mBAAmB,CAAC;AAE3B,aAAK,eAAe,GAAG;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CA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AAM,UAAU,UAAW,eAAe,gBAoEzC,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import type { HTMLAttributes } from 'react';
2
2
  import './styles/RequiredAsterisk.css';
3
- declare type RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement>;
4
- declare const RequiredAsterisk: ({ className, ...rest }: RequiredAsteriskProps) => JSX.Element;
3
+ declare type RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {
4
+ 'data-test-id'?: string;
5
+ };
6
+ declare const RequiredAsterisk: ({ className, "data-test-id": testId, ...rest }: RequiredAsteriskProps) => JSX.Element;
5
7
  export { RequiredAsterisk };
6
8
  export type { RequiredAsteriskProps };
7
9
  //# sourceMappingURL=RequiredAsterisk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequiredAsterisk.d.ts","sourceRoot":"","sources":["../src/RequiredAsterisk.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,+BAA+B,CAAC;AAEvC,aAAK,qBAAqB,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AAE7D,QAAA,MAAM,gBAAgB,gEAQrB,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"RequiredAsterisk.d.ts","sourceRoot":"","sources":["../src/RequiredAsterisk.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,+BAA+B,CAAC;AAEvC,aAAK,qBAAqB,GAAG,cAAc,CAAC,eAAe,CAAC,GAAG;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,gBAAgB,mDAInB,qBAAqB,gBAQvB,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
package/dist/Select.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import type { SelectHTMLAttributes } from 'react';
2
2
  import './styles/FormInput.css';
3
- declare type SelectProps = SelectHTMLAttributes<HTMLSelectElement>;
4
- declare const Select: ({ className, children, ...rest }: SelectProps) => JSX.Element;
3
+ declare type SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {
4
+ 'data-test-id'?: string;
5
+ };
6
+ declare const Select: ({ className, children, "data-test-id": testId, ...rest }: SelectProps) => JSX.Element;
5
7
  export { Select };
6
8
  export type { SelectProps };
7
9
  //# sourceMappingURL=Select.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAIlD,OAAO,wBAAwB,CAAC;AAEhC,aAAK,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAE3D,QAAA,MAAM,MAAM,gEAQX,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAIlD,OAAO,wBAAwB,CAAC;AAEhC,aAAK,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,MAAM,6DAKT,WAAW,gBAQb,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -1,7 +1,11 @@
1
1
  import type { TextareaHTMLAttributes } from 'react';
2
2
  import './styles/FormInput.css';
3
- declare type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
4
- declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
3
+ declare type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
4
+ 'data-test-id'?: string;
5
+ };
6
+ declare const TextArea: import("react").ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & {
7
+ 'data-test-id'?: string | undefined;
8
+ } & import("react").RefAttributes<HTMLTextAreaElement>>;
5
9
  export { TextArea };
6
10
  export type { TextAreaProps };
7
11
  //# sourceMappingURL=TextArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../src/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAKnE,OAAO,wBAAwB,CAAC;AAGhC,aAAK,aAAa,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;AAEjE,QAAA,MAAM,QAAQ,+GAwBZ,CAAC;AAIH,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../src/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAKnE,OAAO,wBAAwB,CAAC;AAGhC,aAAK,aAAa,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,GAAG;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,QAAQ;;uDA2Bb,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -4,11 +4,13 @@ declare type TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {
4
4
  suffix?: string;
5
5
  tiny?: boolean;
6
6
  overrideWidth?: string;
7
+ 'data-test-id'?: string;
7
8
  };
8
9
  declare const TextField: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
9
10
  suffix?: string | undefined;
10
11
  tiny?: boolean | undefined;
11
12
  overrideWidth?: string | undefined;
13
+ 'data-test-id'?: string | undefined;
12
14
  } & import("react").RefAttributes<HTMLInputElement>>;
13
15
  export { TextField };
14
16
  export type { TextFieldProps };
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../src/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,wBAAwB,CAAC;AAGhC,aAAK,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,SAAS;;;;oDAuDd,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,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,wBAAwB,CAAC;AAGhC,aAAK,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC5D,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;;;;;oDAyDd,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
package/dist/index.es.js CHANGED
@@ -2,16 +2,17 @@ import './style.css';
2
2
  import { forwardRef, useState, useRef, Children, isValidElement, cloneElement } from "react";
3
3
  import { cx } from "classix";
4
4
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
- import { IconSize } from "@launchpad-ui/icons";
6
5
  import { VisuallyHidden } from "@react-aria/visually-hidden";
7
6
  const RequiredAsterisk$1 = "";
8
7
  const RequiredAsterisk = ({
9
8
  className,
9
+ "data-test-id": testId = "required-asterisk",
10
10
  ...rest
11
11
  }) => {
12
12
  const classes = cx("RequiredAsterisk", className);
13
13
  return /* @__PURE__ */ jsx("span", {
14
14
  ...rest,
15
+ "data-test-id": testId,
15
16
  className: classes,
16
17
  children: "*"
17
18
  });
@@ -23,11 +24,13 @@ const Label = ({
23
24
  children,
24
25
  required = false,
25
26
  optional = false,
27
+ "data-test-id": testId = "label",
26
28
  ...rest
27
29
  }) => {
28
30
  const classes = cx("Form-label", className, disabled && "Form-label--disabled");
29
31
  return /* @__PURE__ */ jsxs("label", {
30
32
  ...rest,
33
+ "data-test-id": testId,
31
34
  className: classes,
32
35
  children: [children, optional && !required && /* @__PURE__ */ jsx("small", {
33
36
  className: "Form-labelOptional",
@@ -42,6 +45,7 @@ const Checkbox = forwardRef(({
42
45
  disabled,
43
46
  checked,
44
47
  labelClassName,
48
+ "data-test-id": testId = "checkbox",
45
49
  ...rest
46
50
  }, ref) => {
47
51
  const hasAriaLabel = ariaLabel !== void 0 || ariaLabelledby !== void 0;
@@ -59,7 +63,8 @@ const Checkbox = forwardRef(({
59
63
  "aria-labelledby": ariaLabelledby,
60
64
  className: "Form-checkbox",
61
65
  disabled,
62
- type: "checkbox"
66
+ type: "checkbox",
67
+ "data-test-id": testId
63
68
  }), " ", disabled ? /* @__PURE__ */ jsx("span", {
64
69
  className: "Form-label--disabled",
65
70
  children
@@ -77,6 +82,7 @@ const TextField = forwardRef(({
77
82
  tabIndex = 0,
78
83
  suffix,
79
84
  overrideWidth,
85
+ "data-test-id": testId = "text-field",
80
86
  ...rest
81
87
  }, ref) => {
82
88
  const classes = overrideWidth ? className : cx("FormInput", `FormInput-${type}`, className, tiny && "FormInput--tiny");
@@ -86,6 +92,7 @@ const TextField = forwardRef(({
86
92
  children: [/* @__PURE__ */ jsx("input", {
87
93
  ...rest,
88
94
  type,
95
+ "data-test-id": testId,
89
96
  className: cx(classes, "FormInput-suffix"),
90
97
  readOnly,
91
98
  ref,
@@ -120,6 +127,7 @@ const CompactTextField = forwardRef(({
120
127
  value,
121
128
  onFocus,
122
129
  onBlur,
130
+ "data-test-id": testId = "compact-text-field",
123
131
  ...rest
124
132
  }, ref) => {
125
133
  const [isActive, setIsActive] = useState((typeof value === "boolean" || value ? value.toString() : "").trim().length !== 0);
@@ -141,6 +149,7 @@ const CompactTextField = forwardRef(({
141
149
  };
142
150
  return /* @__PURE__ */ jsxs("div", {
143
151
  className: classes,
152
+ "data-test-id": testId,
144
153
  children: [/* @__PURE__ */ jsx(Label, {
145
154
  htmlFor: id,
146
155
  children: label
@@ -160,6 +169,7 @@ const FieldError = ({
160
169
  name,
161
170
  errorMessage,
162
171
  className,
172
+ "data-test-id": testId = "field-error",
163
173
  ...rest
164
174
  }) => {
165
175
  if (!errorMessage) {
@@ -169,6 +179,7 @@ const FieldError = ({
169
179
  ...rest,
170
180
  className: cx("Form-fieldError", className),
171
181
  "aria-live": "polite",
182
+ "data-test-id": testId,
172
183
  id: createFieldErrorId(name),
173
184
  children: `Error - ${errorMessage}`
174
185
  });
@@ -177,10 +188,12 @@ const FieldSet$1 = "";
177
188
  const FieldSet = ({
178
189
  children,
179
190
  className,
191
+ "data-test-id": testId = "field-set",
180
192
  ...rest
181
193
  }) => {
182
194
  const classes = cx("FieldSet", className);
183
195
  return /* @__PURE__ */ jsx("fieldset", {
196
+ "data-test-id": testId,
184
197
  className: classes,
185
198
  ...rest,
186
199
  children
@@ -192,11 +205,13 @@ const Form = (props) => {
192
205
  inline,
193
206
  children,
194
207
  hasIncreasedErrorMargin,
208
+ "data-test-id": testId = "form",
195
209
  ...rest
196
210
  } = props;
197
211
  const classes = cx("Form", className, inline && "Form--inline", !!hasIncreasedErrorMargin && "Form--increasedErrorMargin");
198
212
  return /* @__PURE__ */ jsx("form", {
199
213
  ...rest,
214
+ "data-test-id": testId,
200
215
  className: classes,
201
216
  children
202
217
  });
@@ -208,11 +223,13 @@ const FormGroup = (props) => {
208
223
  ignoreValidation,
209
224
  isInvalid,
210
225
  children,
226
+ "data-test-id": testId = "form-group",
211
227
  ...rest
212
228
  } = props;
213
229
  const classes = cx("Form-group", className, !ignoreValidation && isInvalid && "is-invalid");
214
230
  return /* @__PURE__ */ jsx("div", {
215
231
  className: classes,
232
+ "data-test-id": testId,
216
233
  ...rest,
217
234
  children
218
235
  });
@@ -221,11 +238,13 @@ const FormHint$1 = "";
221
238
  const FormHint = ({
222
239
  className,
223
240
  children,
241
+ "data-test-id": testId = "form-hint",
224
242
  ...rest
225
243
  }) => {
226
244
  const classes = cx("Form-hint", className);
227
245
  return /* @__PURE__ */ jsx("div", {
228
246
  ...rest,
247
+ "data-test-id": testId,
229
248
  className: classes,
230
249
  children
231
250
  });
@@ -243,7 +262,7 @@ const FormField = ({
243
262
  children,
244
263
  className,
245
264
  onBlur,
246
- "data-test-id": testId
265
+ "data-test-id": testId = "form-field"
247
266
  }) => {
248
267
  const handleBlur = () => {
249
268
  onBlur && onBlur(name);
@@ -273,15 +292,17 @@ const IconField = ({
273
292
  icon,
274
293
  children,
275
294
  className,
295
+ "data-test-id": testId = "icon-field",
276
296
  ...rest
277
297
  }) => {
278
298
  const Icon = icon;
279
299
  const classes = cx("IconField", className);
280
300
  return /* @__PURE__ */ jsxs("div", {
281
301
  className: classes,
302
+ "data-test-id": testId,
282
303
  ...rest,
283
304
  children: [children, /* @__PURE__ */ jsx(Icon, {
284
- size: IconSize.SMALL
305
+ size: "small"
285
306
  })]
286
307
  });
287
308
  };
@@ -295,6 +316,7 @@ const Radio = ({
295
316
  id,
296
317
  labelClassName,
297
318
  labelStyle,
319
+ "data-test-id": testId = "radio",
298
320
  ...rest
299
321
  }) => {
300
322
  const hasAriaLabel = ariaLabel !== void 0 || ariaLabelledby !== void 0;
@@ -310,6 +332,7 @@ const Radio = ({
310
332
  checked,
311
333
  disabled,
312
334
  id,
335
+ "data-test-id": testId,
313
336
  type: "radio"
314
337
  }), /* @__PURE__ */ jsx(Label, {
315
338
  className: labelClassName,
@@ -330,6 +353,7 @@ const RadioGroup = (props) => {
330
353
  children,
331
354
  disabled,
332
355
  legend,
356
+ "data-test-id": testId = "radio-group",
333
357
  ...rest
334
358
  } = props;
335
359
  const fieldsetRef = useRef(null);
@@ -373,6 +397,7 @@ const RadioGroup = (props) => {
373
397
  }
374
398
  const radios = Children.map(children, (child) => updateRadioElems(child));
375
399
  return /* @__PURE__ */ jsxs("fieldset", {
400
+ "data-test-id": testId,
376
401
  ref: fieldsetRef,
377
402
  children: [legend && /* @__PURE__ */ jsx("legend", {
378
403
  children: /* @__PURE__ */ jsx(VisuallyHidden, {
@@ -387,17 +412,20 @@ const RadioGroup = (props) => {
387
412
  const Select = ({
388
413
  className,
389
414
  children,
415
+ "data-test-id": testId = "select",
390
416
  ...rest
391
417
  }) => {
392
418
  const classes = cx("FormInput", "FormInput-select", className);
393
419
  return /* @__PURE__ */ jsx("select", {
394
420
  ...rest,
421
+ "data-test-id": testId,
395
422
  className: classes,
396
423
  children
397
424
  });
398
425
  };
399
426
  const TextArea = forwardRef(({
400
427
  className,
428
+ "data-test-id": testId = "text-area",
401
429
  ...props
402
430
  }, ref) => {
403
431
  const onKeyDown = (e) => {
@@ -412,6 +440,7 @@ const TextArea = forwardRef(({
412
440
  ...props,
413
441
  className: cx("FormInput", className),
414
442
  ref,
443
+ "data-test-id": testId,
415
444
  "aria-describedby": props["aria-describedby"] || createFieldErrorId(props.id),
416
445
  onKeyDown
417
446
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/RequiredAsterisk.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement>;\n\nconst RequiredAsterisk = ({ className, ...rest }: RequiredAsteriskProps) => {\n const classes = cx('RequiredAsterisk', className);\n\n return (\n <span {...rest} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport './styles/Form.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n ...rest\n}: LabelProps) => {\n const classes = cx('Form-label', className, disabled && 'Form-label--disabled');\n\n return (\n <label {...rest} className={classes}>\n {children}\n {optional && !required && <small className=\"Form-labelOptional\">(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport './styles/Form.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: 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 ...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=\"Form-checkbox\"\n disabled={disabled}\n type=\"checkbox\"\n />{' '}\n {disabled ? <span className=\"Form-label--disabled\">{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport './styles/FormInput.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: 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 ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx('FormInput', `FormInput-${type}`, className, tiny && 'FormInput--tiny');\n\n if (suffix) {\n return (\n <div className=\"FormInput-suffixContainer\">\n <input\n {...rest}\n type={type}\n className={cx(classes, 'FormInput-suffix')}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className=\"FormInput-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 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/CompactTextField.css';\nimport './styles/FormInput.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n ({ className, id, label, needsErrorFeedback, value, onFocus, onBlur, ...rest }, ref) => {\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('CompactTextField', className, isActiveState && 'is-active');\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}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\n name: FieldPath;\n errorMessage?: string;\n};\n\nconst FieldError = ({ name, errorMessage, className, ...rest }: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx('Form-fieldError', className)}\n aria-live=\"polite\"\n id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FieldSet.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement>;\n\nconst FieldSet = ({ children, className, ...rest }: FieldSetProps) => {\n const classes = cx('FieldSet', className);\n\n return (\n <fieldset className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n};\n\nconst Form = (props: FormProps) => {\n const { className, inline, children, hasIncreasedErrorMargin, ...rest } = props;\n\n const classes = cx(\n 'Form',\n className,\n inline && 'Form--inline',\n !!hasIncreasedErrorMargin && 'Form--increasedErrorMargin'\n );\n\n return (\n <form {...rest} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLDivElement> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const { className, name, ignoreValidation, isInvalid, children, ...rest } = props;\n\n const classes = cx('Form-group', className, !ignoreValidation && isInvalid && 'is-invalid');\n\n return (\n <div className={classes} {...rest}>\n {children}\n </div>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FormHint.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement>;\n\nconst FormHint = ({ className, children, ...rest }: FormHintProps) => {\n const classes = cx('Form-hint', className);\n\n return (\n <div {...rest} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport './styles/FormField.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id': string;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId,\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx('FormField', className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <label htmlFor={htmlFor}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className=\"FormField-hint\">{hint}</FormHint>}\n {children}\n <FieldError className=\"FormField-errorMessage\" name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { IconSize } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\n\nimport './styles/IconField.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n};\n\nconst IconField = ({ icon, children, className, ...rest }: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx('IconField', className);\n\n return (\n <div className={classes} {...rest}>\n {children}\n <Icon size={IconSize.SMALL} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport './styles/Form.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\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 ...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('Form-radio', className)}\n checked={checked}\n disabled={disabled}\n id={id}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className=\"Form-label--disabled\">{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';\nimport './styles/Form.css';\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\nconst RadioGroup = (props: RadioGroupProps) => {\n const { name, value, onChange, children, disabled, legend, ...rest } = 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 ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FormInput.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement>;\n\nconst Select = ({ className, children, ...rest }: SelectProps) => {\n const classes = cx('FormInput', 'FormInput-select', className);\n\n return (\n <select {...rest} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport './styles/FormInput.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(({ className, ...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('FormInput', className)}\n ref={ref}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n});\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],"names":["RequiredAsterisk","className","rest","classes","cx","Label","disabled","children","required","optional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","createFieldErrorId","id","width","CompactTextField","label","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","FieldSet","Form","props","inline","hasIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","FormHint","FormField","isRequired","htmlFor","hint","testId","_jsxs","IconField","icon","Icon","IconSize","SMALL","Radio","labelStyle","_Fragment","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;AAQA,MAAMA,mBAAmB,CAAC;AAAA,EAAEC;AAAAA,KAAcC;AAAhB,MAAkD;AACpEC,QAAAA,UAAUC,GAAG,oBAAoBH,SAArB;AAElB;OACYC;AAAAA,IAAM,WAAWC;AAAAA,IAA3B,UAAA;AAAA,EAAA,CADF;AAKD;;ACHD,MAAME,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAL;AAAAA,EACAM;AAAAA,EACAC,WAAW;AAAA,EACXC,WAAW;AAAA,KACRP;AANU,MAOG;AAChB,QAAMC,UAAUC,GAAG,cAAcH,WAAWK,YAAY,sBAAtC;AAElB;OACaJ;AAAAA,IAAM,WAAWC;AAAAA,IAA5B,UAAA,CACGI,UACAE,YAAY,CAACD,gCAAY,SAAA;AAAA,MAAO,WAAU;AAAA,MAAjB,UAAA;AAAA,IAAA,CAF5B,GAGGA,YAAY,CAACC,YAAaC,oBAAA,kBAH7B,CAAA,CAAA,CAAA;AAAA,EAAA,CADF;AAOD;AChBKC,MAAAA,WAAWC,WACf,CACE;AAAA,EACE,cAAcC;AAAAA,EACd,mBAAmBC;AAAAA,EACnBP;AAAAA,EACAD;AAAAA,EACAS;AAAAA,EACAC;AAAAA,KACGd;AAPL,GASAe,QACG;AACGC,QAAAA,eAAeL,cAAcM,UAAaL,mBAAmBK;AAC/D,MAAA,CAACZ,YAAY,CAACW,cAAc;AAC9BE,YAAQC,KACN,kFADF;AAAA,EAGD;AAED,8BACG,OAAD;AAAA,IAAO,WAAWL;AAAAA,IAAlB,UAAA,CACEN;SACMR;AAAAA,MACJ;AAAA,MACA;AAAA,MACA,gBAAca,UAAU,SAAS;AAAA,MACjC,cAAYF;AAAAA,MACZ,mBAAiBC;AAAAA,MACjB,WAAU;AAAA,MACV;AAAA,MACA,MAAK;AAAA,IATP,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F,QAAAA,YAAY,CAACC,MAA0C;AAEzDA,QAAAA,EAAEC,QAAQ,gBACVD,EAAEC,QAAQ,eACVD,EAAEC,QAAQ,aACVD,EAAEC,QAAQ,aACV;AACAD,QAAEE,gBAAF;AAAA,IACD;AACGF,QAAAA,EAAEC,QAAQ,UAAU;AACtBD,QAAEG,YAAYC;IACf;AAAA,EAAA;AAGH;OAEQ9C;AAAAA,IACJ,WAAWpD,GAAG,aAAaH,SAAd;AAAA,IACb;AAAA,IACA,oBAAkBuD,MAAM,uBAAuB1B,mBAAmB0B,MAAMzB,EAAP;AAAA,IACjE;AAAA,EAAA,CANJ;AASD,CAxB0B;AA0B3BiE,SAAS1E,cAAc;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/RequiredAsterisk.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx('RequiredAsterisk', className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport './styles/Form.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx('Form-label', className, disabled && 'Form-label--disabled');\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className=\"Form-labelOptional\">(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport './styles/Form.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className=\"Form-checkbox\"\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className=\"Form-label--disabled\">{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport './styles/FormInput.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx('FormInput', `FormInput-${type}`, className, tiny && 'FormInput--tiny');\n\n if (suffix) {\n return (\n <div className=\"FormInput-suffixContainer\">\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n className={cx(classes, 'FormInput-suffix')}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className=\"FormInput-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 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/CompactTextField.css';\nimport './styles/FormInput.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('CompactTextField', className, isActiveState && 'is-active');\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx('Form-fieldError', className)}\n aria-live=\"polite\"\n data-test-id={testId}\n id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FieldSet.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx('FieldSet', className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n 'Form',\n className,\n inline && 'Form--inline',\n !!hasIncreasedErrorMargin && 'Form--increasedErrorMargin'\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLDivElement> & {\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('Form-group', className, !ignoreValidation && isInvalid && 'is-invalid');\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n </div>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FormHint.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx('Form-hint', className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport './styles/FormField.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx('FormField', className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <label htmlFor={htmlFor}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className=\"FormField-hint\">{hint}</FormHint>}\n {children}\n <FieldError className=\"FormField-errorMessage\" name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/IconField.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx('IconField', className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport './styles/Form.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx('Form-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=\"Form-label--disabled\">{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';\nimport './styles/Form.css';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FormInput.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx('FormInput', 'FormInput-select', className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport './styles/FormInput.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx('FormInput', className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","Label","disabled","children","required","optional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","createFieldErrorId","id","width","CompactTextField","label","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","FieldSet","Form","props","inline","hasIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","FormHint","FormField","isRequired","htmlFor","hint","_jsxs","IconField","icon","Icon","Radio","labelStyle","_Fragment","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AAHqB,MAIG;AACrBC,QAAAA,UAAUC,GAAG,oBAAoBJ,SAArB;AAElB;OACYE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAjD,UAAA;AAAA,EAAA,CADF;AAKD;;ACRD,MAAME,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAN;AAAAA,EACAO;AAAAA,EACAC,WAAW;AAAA,EACXC,WAAW;AAAA,EACX,gBAAgBR,SAAS;AAAA,KACtBC;AAPU,MAQG;AAChB,QAAMC,UAAUC,GAAG,cAAcJ,WAAWM,YAAY,sBAAtC;AAElB;OACaJ;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAlD,UAAA,CACGI,UACAE,YAAY,CAACD,gCAAY,SAAA;AAAA,MAAO,WAAU;AAAA,MAAjB,UAAA;AAAA,IAAA,CAF5B,GAGGA,YAAY,CAACC,YAAaC,oBAAA,kBAH7B,CAAA,CAAA,CAAA;AAAA,EAAA,CADF;AAOD;ACjBKC,MAAAA,WAAWC,WACf,CACE;AAAA,EACE,cAAcC;AAAAA,EACd,mBAAmBC;AAAAA,EACnBP;AAAAA,EACAD;AAAAA,EACAS;AAAAA,EACAC;AAAAA,EACA,gBAAgBf,SAAS;AAAA,KACtBC;AARL,GAUAe,QACG;AACGC,QAAAA,eAAeL,cAAcM,UAAaL,mBAAmBK;AAC/D,MAAA,CAACZ,YAAY,CAACW,cAAc;AAC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cAAc;"}
package/dist/index.js CHANGED
@@ -4,16 +4,17 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
4
4
  const react = require("react");
5
5
  const classix = require("classix");
6
6
  const jsxRuntime = require("react/jsx-runtime");
7
- const icons = require("@launchpad-ui/icons");
8
7
  const visuallyHidden = require("@react-aria/visually-hidden");
9
8
  const RequiredAsterisk$1 = "";
10
9
  const RequiredAsterisk = ({
11
10
  className,
11
+ "data-test-id": testId = "required-asterisk",
12
12
  ...rest
13
13
  }) => {
14
14
  const classes = classix.cx("RequiredAsterisk", className);
15
15
  return /* @__PURE__ */ jsxRuntime.jsx("span", {
16
16
  ...rest,
17
+ "data-test-id": testId,
17
18
  className: classes,
18
19
  children: "*"
19
20
  });
@@ -25,11 +26,13 @@ const Label = ({
25
26
  children,
26
27
  required = false,
27
28
  optional = false,
29
+ "data-test-id": testId = "label",
28
30
  ...rest
29
31
  }) => {
30
32
  const classes = classix.cx("Form-label", className, disabled && "Form-label--disabled");
31
33
  return /* @__PURE__ */ jsxRuntime.jsxs("label", {
32
34
  ...rest,
35
+ "data-test-id": testId,
33
36
  className: classes,
34
37
  children: [children, optional && !required && /* @__PURE__ */ jsxRuntime.jsx("small", {
35
38
  className: "Form-labelOptional",
@@ -44,6 +47,7 @@ const Checkbox = react.forwardRef(({
44
47
  disabled,
45
48
  checked,
46
49
  labelClassName,
50
+ "data-test-id": testId = "checkbox",
47
51
  ...rest
48
52
  }, ref) => {
49
53
  const hasAriaLabel = ariaLabel !== void 0 || ariaLabelledby !== void 0;
@@ -61,7 +65,8 @@ const Checkbox = react.forwardRef(({
61
65
  "aria-labelledby": ariaLabelledby,
62
66
  className: "Form-checkbox",
63
67
  disabled,
64
- type: "checkbox"
68
+ type: "checkbox",
69
+ "data-test-id": testId
65
70
  }), " ", disabled ? /* @__PURE__ */ jsxRuntime.jsx("span", {
66
71
  className: "Form-label--disabled",
67
72
  children
@@ -79,6 +84,7 @@ const TextField = react.forwardRef(({
79
84
  tabIndex = 0,
80
85
  suffix,
81
86
  overrideWidth,
87
+ "data-test-id": testId = "text-field",
82
88
  ...rest
83
89
  }, ref) => {
84
90
  const classes = overrideWidth ? className : classix.cx("FormInput", `FormInput-${type}`, className, tiny && "FormInput--tiny");
@@ -88,6 +94,7 @@ const TextField = react.forwardRef(({
88
94
  children: [/* @__PURE__ */ jsxRuntime.jsx("input", {
89
95
  ...rest,
90
96
  type,
97
+ "data-test-id": testId,
91
98
  className: classix.cx(classes, "FormInput-suffix"),
92
99
  readOnly,
93
100
  ref,
@@ -122,6 +129,7 @@ const CompactTextField = react.forwardRef(({
122
129
  value,
123
130
  onFocus,
124
131
  onBlur,
132
+ "data-test-id": testId = "compact-text-field",
125
133
  ...rest
126
134
  }, ref) => {
127
135
  const [isActive, setIsActive] = react.useState((typeof value === "boolean" || value ? value.toString() : "").trim().length !== 0);
@@ -143,6 +151,7 @@ const CompactTextField = react.forwardRef(({
143
151
  };
144
152
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
145
153
  className: classes,
154
+ "data-test-id": testId,
146
155
  children: [/* @__PURE__ */ jsxRuntime.jsx(Label, {
147
156
  htmlFor: id,
148
157
  children: label
@@ -162,6 +171,7 @@ const FieldError = ({
162
171
  name,
163
172
  errorMessage,
164
173
  className,
174
+ "data-test-id": testId = "field-error",
165
175
  ...rest
166
176
  }) => {
167
177
  if (!errorMessage) {
@@ -171,6 +181,7 @@ const FieldError = ({
171
181
  ...rest,
172
182
  className: classix.cx("Form-fieldError", className),
173
183
  "aria-live": "polite",
184
+ "data-test-id": testId,
174
185
  id: createFieldErrorId(name),
175
186
  children: `Error - ${errorMessage}`
176
187
  });
@@ -179,10 +190,12 @@ const FieldSet$1 = "";
179
190
  const FieldSet = ({
180
191
  children,
181
192
  className,
193
+ "data-test-id": testId = "field-set",
182
194
  ...rest
183
195
  }) => {
184
196
  const classes = classix.cx("FieldSet", className);
185
197
  return /* @__PURE__ */ jsxRuntime.jsx("fieldset", {
198
+ "data-test-id": testId,
186
199
  className: classes,
187
200
  ...rest,
188
201
  children
@@ -194,11 +207,13 @@ const Form = (props) => {
194
207
  inline,
195
208
  children,
196
209
  hasIncreasedErrorMargin,
210
+ "data-test-id": testId = "form",
197
211
  ...rest
198
212
  } = props;
199
213
  const classes = classix.cx("Form", className, inline && "Form--inline", !!hasIncreasedErrorMargin && "Form--increasedErrorMargin");
200
214
  return /* @__PURE__ */ jsxRuntime.jsx("form", {
201
215
  ...rest,
216
+ "data-test-id": testId,
202
217
  className: classes,
203
218
  children
204
219
  });
@@ -210,11 +225,13 @@ const FormGroup = (props) => {
210
225
  ignoreValidation,
211
226
  isInvalid,
212
227
  children,
228
+ "data-test-id": testId = "form-group",
213
229
  ...rest
214
230
  } = props;
215
231
  const classes = classix.cx("Form-group", className, !ignoreValidation && isInvalid && "is-invalid");
216
232
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
217
233
  className: classes,
234
+ "data-test-id": testId,
218
235
  ...rest,
219
236
  children
220
237
  });
@@ -223,11 +240,13 @@ const FormHint$1 = "";
223
240
  const FormHint = ({
224
241
  className,
225
242
  children,
243
+ "data-test-id": testId = "form-hint",
226
244
  ...rest
227
245
  }) => {
228
246
  const classes = classix.cx("Form-hint", className);
229
247
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
230
248
  ...rest,
249
+ "data-test-id": testId,
231
250
  className: classes,
232
251
  children
233
252
  });
@@ -245,7 +264,7 @@ const FormField = ({
245
264
  children,
246
265
  className,
247
266
  onBlur,
248
- "data-test-id": testId
267
+ "data-test-id": testId = "form-field"
249
268
  }) => {
250
269
  const handleBlur = () => {
251
270
  onBlur && onBlur(name);
@@ -275,15 +294,17 @@ const IconField = ({
275
294
  icon,
276
295
  children,
277
296
  className,
297
+ "data-test-id": testId = "icon-field",
278
298
  ...rest
279
299
  }) => {
280
300
  const Icon = icon;
281
301
  const classes = classix.cx("IconField", className);
282
302
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
283
303
  className: classes,
304
+ "data-test-id": testId,
284
305
  ...rest,
285
306
  children: [children, /* @__PURE__ */ jsxRuntime.jsx(Icon, {
286
- size: icons.IconSize.SMALL
307
+ size: "small"
287
308
  })]
288
309
  });
289
310
  };
@@ -297,6 +318,7 @@ const Radio = ({
297
318
  id,
298
319
  labelClassName,
299
320
  labelStyle,
321
+ "data-test-id": testId = "radio",
300
322
  ...rest
301
323
  }) => {
302
324
  const hasAriaLabel = ariaLabel !== void 0 || ariaLabelledby !== void 0;
@@ -312,6 +334,7 @@ const Radio = ({
312
334
  checked,
313
335
  disabled,
314
336
  id,
337
+ "data-test-id": testId,
315
338
  type: "radio"
316
339
  }), /* @__PURE__ */ jsxRuntime.jsx(Label, {
317
340
  className: labelClassName,
@@ -332,6 +355,7 @@ const RadioGroup = (props) => {
332
355
  children,
333
356
  disabled,
334
357
  legend,
358
+ "data-test-id": testId = "radio-group",
335
359
  ...rest
336
360
  } = props;
337
361
  const fieldsetRef = react.useRef(null);
@@ -375,6 +399,7 @@ const RadioGroup = (props) => {
375
399
  }
376
400
  const radios = react.Children.map(children, (child) => updateRadioElems(child));
377
401
  return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", {
402
+ "data-test-id": testId,
378
403
  ref: fieldsetRef,
379
404
  children: [legend && /* @__PURE__ */ jsxRuntime.jsx("legend", {
380
405
  children: /* @__PURE__ */ jsxRuntime.jsx(visuallyHidden.VisuallyHidden, {
@@ -389,17 +414,20 @@ const RadioGroup = (props) => {
389
414
  const Select = ({
390
415
  className,
391
416
  children,
417
+ "data-test-id": testId = "select",
392
418
  ...rest
393
419
  }) => {
394
420
  const classes = classix.cx("FormInput", "FormInput-select", className);
395
421
  return /* @__PURE__ */ jsxRuntime.jsx("select", {
396
422
  ...rest,
423
+ "data-test-id": testId,
397
424
  className: classes,
398
425
  children
399
426
  });
400
427
  };
401
428
  const TextArea = react.forwardRef(({
402
429
  className,
430
+ "data-test-id": testId = "text-area",
403
431
  ...props
404
432
  }, ref) => {
405
433
  const onKeyDown = (e) => {
@@ -414,6 +442,7 @@ const TextArea = react.forwardRef(({
414
442
  ...props,
415
443
  className: classix.cx("FormInput", className),
416
444
  ref,
445
+ "data-test-id": testId,
417
446
  "aria-describedby": props["aria-describedby"] || createFieldErrorId(props.id),
418
447
  onKeyDown
419
448
  });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/RequiredAsterisk.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement>;\n\nconst RequiredAsterisk = ({ className, ...rest }: RequiredAsteriskProps) => {\n const classes = cx('RequiredAsterisk', className);\n\n return (\n <span {...rest} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport './styles/Form.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n ...rest\n}: LabelProps) => {\n const classes = cx('Form-label', className, disabled && 'Form-label--disabled');\n\n return (\n <label {...rest} className={classes}>\n {children}\n {optional && !required && <small className=\"Form-labelOptional\">(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport './styles/Form.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: 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 ...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=\"Form-checkbox\"\n disabled={disabled}\n type=\"checkbox\"\n />{' '}\n {disabled ? <span className=\"Form-label--disabled\">{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport './styles/FormInput.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: 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 ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx('FormInput', `FormInput-${type}`, className, tiny && 'FormInput--tiny');\n\n if (suffix) {\n return (\n <div className=\"FormInput-suffixContainer\">\n <input\n {...rest}\n type={type}\n className={cx(classes, 'FormInput-suffix')}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className=\"FormInput-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 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/CompactTextField.css';\nimport './styles/FormInput.css';\n\ntype CompactTextFieldProps = TextFieldProps & {\n label: string;\n needsErrorFeedback?: boolean;\n};\n\nconst CompactTextField = forwardRef<HTMLInputElement, CompactTextFieldProps>(\n ({ className, id, label, needsErrorFeedback, value, onFocus, onBlur, ...rest }, ref) => {\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('CompactTextField', className, isActiveState && 'is-active');\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}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\n name: FieldPath;\n errorMessage?: string;\n};\n\nconst FieldError = ({ name, errorMessage, className, ...rest }: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx('Form-fieldError', className)}\n aria-live=\"polite\"\n id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FieldSet.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement>;\n\nconst FieldSet = ({ children, className, ...rest }: FieldSetProps) => {\n const classes = cx('FieldSet', className);\n\n return (\n <fieldset className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n};\n\nconst Form = (props: FormProps) => {\n const { className, inline, children, hasIncreasedErrorMargin, ...rest } = props;\n\n const classes = cx(\n 'Form',\n className,\n inline && 'Form--inline',\n !!hasIncreasedErrorMargin && 'Form--increasedErrorMargin'\n );\n\n return (\n <form {...rest} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLDivElement> & {\n name?: string | string[];\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n};\n\nconst FormGroup = (props: FormGroupProps) => {\n const { className, name, ignoreValidation, isInvalid, children, ...rest } = props;\n\n const classes = cx('Form-group', className, !ignoreValidation && isInvalid && 'is-invalid');\n\n return (\n <div className={classes} {...rest}>\n {children}\n </div>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FormHint.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement>;\n\nconst FormHint = ({ className, children, ...rest }: FormHintProps) => {\n const classes = cx('Form-hint', className);\n\n return (\n <div {...rest} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport './styles/FormField.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id': string;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId,\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx('FormField', className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <label htmlFor={htmlFor}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className=\"FormField-hint\">{hint}</FormHint>}\n {children}\n <FieldError className=\"FormField-errorMessage\" name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { IconSize } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\n\nimport './styles/IconField.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n};\n\nconst IconField = ({ icon, children, className, ...rest }: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx('IconField', className);\n\n return (\n <div className={classes} {...rest}>\n {children}\n <Icon size={IconSize.SMALL} />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport './styles/Form.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\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 ...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('Form-radio', className)}\n checked={checked}\n disabled={disabled}\n id={id}\n type=\"radio\"\n />\n <Label className={labelClassName} htmlFor={id} style={labelStyle}>\n {disabled ? <span className=\"Form-label--disabled\">{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';\nimport './styles/Form.css';\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\nconst RadioGroup = (props: RadioGroupProps) => {\n const { name, value, onChange, children, disabled, legend, ...rest } = 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 ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FormInput.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement>;\n\nconst Select = ({ className, children, ...rest }: SelectProps) => {\n const classes = cx('FormInput', 'FormInput-select', className);\n\n return (\n <select {...rest} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport './styles/FormInput.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(({ className, ...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('FormInput', className)}\n ref={ref}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n});\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],"names":["RequiredAsterisk","className","rest","classes","cx","Label","disabled","children","required","optional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","createFieldErrorId","id","width","CompactTextField","label","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","FieldSet","Form","props","inline","hasIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","FormHint","FormField","isRequired","htmlFor","hint","testId","_jsxs","IconField","icon","Icon","IconSize","SMALL","Radio","labelStyle","_Fragment","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","VisuallyHidden","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;;AAQA,MAAMA,mBAAmB,CAAC;AAAA,EAAEC;AAAAA,KAAcC;AAAhB,MAAkD;AACpEC,QAAAA,UAAUC,QAAAA,GAAG,oBAAoBH,SAArB;AAElB;OACYC;AAAAA,IAAM,WAAWC;AAAAA,IAA3B,UAAA;AAAA,EAAA,CADF;AAKD;;ACHD,MAAME,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAL;AAAAA,EACAM;AAAAA,EACAC,WAAW;AAAA,EACXC,WAAW;AAAA,KACRP;AANU,MAOG;AAChB,QAAMC,UAAUC,QAAAA,GAAG,cAAcH,WAAWK,YAAY,sBAAtC;AAElB;OACaJ;AAAAA,IAAM,WAAWC;AAAAA,IAA5B,UAAA,CACGI,UACAE,YAAY,CAACD,2CAAY,SAAA;AAAA,MAAO,WAAU;AAAA,MAAjB,UAAA;AAAA,IAAA,CAF5B,GAGGA,YAAY,CAACC,YAAaC,2BAAAA,IAAA,kBAH7B,CAAA,CAAA,CAAA;AAAA,EAAA,CADF;AAOD;AChBKC,MAAAA,WAAWC,iBACf,CACE;AAAA,EACE,cAAcC;AAAAA,EACd,mBAAmBC;AAAAA,EACnBP;AAAAA,EACAD;AAAAA,EACAS;AAAAA,EACAC;AAAAA,KACGd;AAPL,GASAe,QACG;AACGC,QAAAA,eAAeL,cAAcM,UAAaL,mBAAmBK;AAC/D,MAA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,IAAf,UAAA,CACGD,UACCrE,2BAAA,IAAA,UAAA;AAAA,MAAA,yCACGqF,+BAAD;AAAA,QAAA,UAAiBhB;AAAAA,MAAAA,CAAjB;AAAA,IAAA,CAHN,GAMErE,2BAAA;SAASR;AAAAA,MAAT,UAAgB2F;AAAAA,IAAAA,CANlB,CAAA;AAAA,EAAA,CADF;AAUD;AChGD,MAAMG,SAAS,CAAC;AAAA,EAAE/F;AAAAA,EAAWM;AAAAA,KAAaL;AAA1B,MAAkD;AAChE,QAAMC,UAAUC,QAAAA,GAAG,aAAa,oBAAoBH,SAAlC;AAElB;OACcC;AAAAA,IAAM,WAAWC;AAAAA,IAA7B;AAAA,EAAA,CADF;AAKD;ACNK8F,MAAAA,WAAWrF,iBAA+C,CAAC;AAAA,EAAEX;AAAAA,KAAcuD;AAAhB,GAAyBvC,QAAQ;AAC1FiF,QAAAA,YAAY,CAACC,MAA0C;AAEzDA,QAAAA,EAAEC,QAAQ,gBACVD,EAAEC,QAAQ,eACVD,EAAEC,QAAQ,aACVD,EAAEC,QAAQ,aACV;AACAD,QAAEE,gBAAF;AAAA,IACD;AACGF,QAAAA,EAAEC,QAAQ,UAAU;AACtBD,QAAEG,YAAYC;IACf;AAAA,EAAA;AAGH;OAEQ/C;AAAAA,IACJ,WAAWpD,QAAAA,GAAG,aAAaH,SAAd;AAAA,IACb;AAAA,IACA,oBAAkBuD,MAAM,uBAAuB1B,mBAAmB0B,MAAMzB,EAAP;AAAA,IACjE;AAAA,EAAA,CANJ;AASD,CAxB0B;AA0B3BkE,SAAS3E,cAAc;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/RequiredAsterisk.tsx","../src/Label.tsx","../src/Checkbox.tsx","../src/utils/index.ts","../src/TextField.tsx","../src/CompactTextField.tsx","../src/FieldError.tsx","../src/FieldSet.tsx","../src/Form.tsx","../src/FormGroup.tsx","../src/FormHint.tsx","../src/FormField.tsx","../src/IconField.tsx","../src/Radio.tsx","../src/RadioGroup.tsx","../src/Select.tsx","../src/TextArea.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/RequiredAsterisk.css';\n\ntype RequiredAsteriskProps = HTMLAttributes<HTMLSpanElement> & {\n 'data-test-id'?: string;\n};\n\nconst RequiredAsterisk = ({\n className,\n 'data-test-id': testId = 'required-asterisk',\n ...rest\n}: RequiredAsteriskProps) => {\n const classes = cx('RequiredAsterisk', className);\n\n return (\n <span {...rest} data-test-id={testId} className={classes}>\n *\n </span>\n );\n};\n\nexport { RequiredAsterisk };\nexport type { RequiredAsteriskProps };\n","import type { LabelHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport './styles/Form.css';\n\ntype LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\n required?: boolean;\n optional?: boolean;\n disabled?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Label = ({\n disabled,\n className,\n children,\n required = false,\n optional = false,\n 'data-test-id': testId = 'label',\n ...rest\n}: LabelProps) => {\n const classes = cx('Form-label', className, disabled && 'Form-label--disabled');\n\n return (\n <label {...rest} data-test-id={testId} className={classes}>\n {children}\n {optional && !required && <small className=\"Form-labelOptional\">(optional)</small>}\n {required && !optional && <RequiredAsterisk />}\n </label>\n );\n};\n\nexport { Label };\nexport type { LabelProps };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Label } from './Label';\nimport './styles/Form.css';\n\ntype CheckboxProps = InputHTMLAttributes<HTMLInputElement> & {\n /**\n * The className to pass into the Checkbox's Label component\n */\n labelClassName?: string;\n 'data-test-id'?: string;\n};\n\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n disabled,\n checked,\n labelClassName,\n 'data-test-id': testId = 'checkbox',\n ...rest\n },\n ref\n ) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <Label className={labelClassName}>\n <input\n {...rest}\n ref={ref}\n checked={checked}\n aria-checked={checked ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className=\"Form-checkbox\"\n disabled={disabled}\n type=\"checkbox\"\n data-test-id={testId}\n />{' '}\n {disabled ? <span className=\"Form-label--disabled\">{children}</span> : children}\n </Label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\nexport type { CheckboxProps };\n","type FieldPath = string | string[];\n\nconst createFieldErrorId = (fieldIdentifier?: FieldPath) =>\n fieldIdentifier ? `${[...fieldIdentifier].join('')}-err` : undefined;\n\nexport { createFieldErrorId };\nexport type { FieldPath };\n","import type { InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport './styles/FormInput.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextFieldProps = InputHTMLAttributes<HTMLInputElement> & {\n suffix?: string;\n tiny?: boolean;\n overrideWidth?: string;\n 'data-test-id'?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n type = 'text',\n tiny = false,\n readOnly,\n tabIndex = 0,\n suffix,\n overrideWidth,\n 'data-test-id': testId = 'text-field',\n ...rest\n },\n ref\n ) => {\n const classes = overrideWidth\n ? className\n : cx('FormInput', `FormInput-${type}`, className, tiny && 'FormInput--tiny');\n\n if (suffix) {\n return (\n <div className=\"FormInput-suffixContainer\">\n <input\n {...rest}\n type={type}\n data-test-id={testId}\n className={cx(classes, 'FormInput-suffix')}\n readOnly={readOnly}\n ref={ref}\n aria-describedby={rest['aria-describedby'] || createFieldErrorId(rest.id)}\n />\n <label className=\"FormInput-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 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/CompactTextField.css';\nimport './styles/FormInput.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('CompactTextField', className, isActiveState && 'is-active');\n\n const placeholder = isActiveState ? '' : label;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setIsActive(true);\n if (onFocus) {\n onFocus(event);\n }\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n const value = event.target.value || '';\n setIsActive(value.trim().length !== 0);\n if (onBlur) {\n onBlur(event);\n }\n };\n\n return (\n <div className={classes} data-test-id={testId}>\n <Label htmlFor={id}>{label}</Label>\n <TextField\n {...rest}\n id={id}\n placeholder={placeholder}\n value={value}\n ref={ref}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </div>\n );\n }\n);\n\nCompactTextField.displayName = 'CompactTextField';\n\nexport { CompactTextField };\nexport type { CompactTextFieldProps };\n","import type { FieldPath } from './utils';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\nimport { createFieldErrorId } from './utils';\n\ntype FieldErrorProps = HTMLAttributes<HTMLSpanElement> & {\n name: FieldPath;\n errorMessage?: string;\n 'data-test-id'?: string;\n};\n\nconst FieldError = ({\n name,\n errorMessage,\n className,\n 'data-test-id': testId = 'field-error',\n ...rest\n}: FieldErrorProps) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n <span\n {...rest}\n className={cx('Form-fieldError', className)}\n aria-live=\"polite\"\n data-test-id={testId}\n id={createFieldErrorId(name)}\n >\n {`Error - ${errorMessage}`}\n </span>\n );\n};\n\nexport { FieldError };\nexport type { FieldErrorProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FieldSet.css';\n\ntype FieldSetProps = HTMLAttributes<HTMLFieldSetElement> & {\n 'data-test-id'?: string;\n};\n\nconst FieldSet = ({\n children,\n className,\n 'data-test-id': testId = 'field-set',\n ...rest\n}: FieldSetProps) => {\n const classes = cx('FieldSet', className);\n\n return (\n <fieldset data-test-id={testId} className={classes} {...rest}>\n {children}\n </fieldset>\n );\n};\n\nexport { FieldSet };\nexport type { FieldSetProps };\n","import type { FormHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\n\ntype FormProps = FormHTMLAttributes<HTMLFormElement> & {\n inline?: boolean;\n // Increases margin between form fields to make room for error messages.\n // This prevents the form from shifting when rendering a field error.\n // This may be desired when the form contains external links that will\n // shift while clicking if the form shifts from validation.\n hasIncreasedErrorMargin?: boolean;\n 'data-test-id'?: string;\n};\n\nconst Form = (props: FormProps) => {\n const {\n className,\n inline,\n children,\n hasIncreasedErrorMargin,\n 'data-test-id': testId = 'form',\n ...rest\n } = props;\n\n const classes = cx(\n 'Form',\n className,\n inline && 'Form--inline',\n !!hasIncreasedErrorMargin && 'Form--increasedErrorMargin'\n );\n\n return (\n <form {...rest} data-test-id={testId} className={classes}>\n {children}\n </form>\n );\n};\n\nexport { Form };\nexport type { FormProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/Form.css';\n\ntype FormGroupProps = HTMLAttributes<HTMLDivElement> & {\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('Form-group', className, !ignoreValidation && isInvalid && 'is-invalid');\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n </div>\n );\n};\n\nexport { FormGroup };\nexport type { FormGroupProps };\n","import type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FormHint.css';\n\ntype FormHintProps = HTMLAttributes<HTMLDivElement> & {\n 'data-test-id'?: string;\n};\n\nconst FormHint = ({\n className,\n children,\n 'data-test-id': testId = 'form-hint',\n ...rest\n}: FormHintProps) => {\n const classes = cx('Form-hint', className);\n\n return (\n <div {...rest} data-test-id={testId} className={classes}>\n {children}\n </div>\n );\n};\n\nexport { FormHint };\nexport type { FormHintProps };\n","import { cx } from 'classix';\n\nimport { FieldError } from './FieldError';\nimport { FormGroup } from './FormGroup';\nimport { FormHint } from './FormHint';\nimport { RequiredAsterisk } from './RequiredAsterisk';\nimport './styles/FormField.css';\n\ntype FormFieldProps = {\n isRequired: boolean;\n label?: string;\n name: string;\n htmlFor: string;\n hint?: string;\n errorMessage?: string;\n ignoreValidation?: boolean;\n isInvalid?: boolean;\n children: JSX.Element;\n className?: string;\n onBlur?: (field: string) => void;\n 'data-test-id'?: string;\n};\n\nconst FormField = ({\n isRequired,\n label,\n name,\n htmlFor,\n hint,\n errorMessage,\n ignoreValidation,\n isInvalid,\n children,\n className,\n onBlur,\n 'data-test-id': testId = 'form-field',\n}: FormFieldProps) => {\n const handleBlur = () => {\n onBlur && onBlur(name);\n };\n\n return (\n <FormGroup\n className={cx('FormField', className)}\n name={name}\n ignoreValidation={ignoreValidation}\n isInvalid={isInvalid}\n onBlur={handleBlur}\n data-test-id={testId}\n >\n {label && (\n <label htmlFor={htmlFor}>\n {label}\n {isRequired && <RequiredAsterisk />}\n </label>\n )}\n {hint && <FormHint className=\"FormField-hint\">{hint}</FormHint>}\n {children}\n <FieldError className=\"FormField-errorMessage\" name={name} errorMessage={errorMessage} />\n </FormGroup>\n );\n};\n\nexport type { FormFieldProps };\nexport { FormField };\n","import type { IconProps } from '@launchpad-ui/icons';\nimport type { HTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/IconField.css';\n\ntype IconFieldProps = HTMLAttributes<HTMLDivElement> & {\n icon(args: IconProps): JSX.Element;\n children: JSX.Element | JSX.Element[];\n 'data-test-id'?: string;\n};\n\nconst IconField = ({\n icon,\n children,\n className,\n 'data-test-id': testId = 'icon-field',\n ...rest\n}: IconFieldProps) => {\n const Icon = icon;\n\n const classes = cx('IconField', className);\n\n return (\n <div className={classes} data-test-id={testId} {...rest}>\n {children}\n <Icon size=\"small\" />\n </div>\n );\n};\n\nexport { IconField };\nexport type { IconFieldProps };\n","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport { Label } from './Label';\nimport './styles/Form.css';\n\ntype RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {\n labelClassName?: string;\n labelStyle?: CSSProperties;\n 'data-test-id'?: string;\n};\n\nconst Radio = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n checked = false,\n children,\n className,\n disabled = false,\n id,\n labelClassName,\n labelStyle,\n 'data-test-id': testId = 'radio',\n ...rest\n}: RadioProps) => {\n const hasAriaLabel = ariaLabel !== undefined || ariaLabelledby !== undefined;\n\n if (!children && !hasAriaLabel) {\n console.warn(\n 'If you do not provide children, you must specify an aria-label for accessibility'\n );\n }\n\n return (\n <>\n <input\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n className={cx('Form-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=\"Form-label--disabled\">{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';\nimport './styles/Form.css';\n\ntype RadioGroupProps = {\n /**\n * The legend that describes this groups of radio buttons. The legend\n * is important for screen reader users.\n */\n legend?: string;\n /**\n * The children passed into the RadioGroup.\n */\n children?: ReactNode;\n /**\n * Custom classname(s) passed to the fieldset inner div.\n */\n className?: string;\n /**\n * Set the underlying Radio to disabled if the Radio's disabled prop is undefined.\n */\n disabled?: boolean;\n /**\n * The RadioGroup's id.\n */\n id?: string;\n /**\n * Name to apply to the underlying Radio. The same name value is passed to each Radio when grouping in a RadioGroup for screen reader support.\n */\n name: string;\n /**\n * This function is passed into each Radio onChange synthetic event handler.\n */\n onChange?(e: ChangeEvent | FormEvent<HTMLInputElement>): void;\n /**\n * The value to compare against the Radio's value to determine if the Radio will be checked.\n */\n value: string;\n\n 'data-test-id'?: string;\n};\n\nconst RadioGroup = (props: RadioGroupProps) => {\n const {\n name,\n value,\n onChange,\n children,\n disabled,\n legend,\n 'data-test-id': testId = 'radio-group',\n ...rest\n } = props;\n const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n\n function updateRadioElems(elem: ReactNode): ReactNode {\n if (!isValidElement(elem)) {\n return elem;\n }\n\n const item = elem as ReactElement;\n\n if (item?.type && item.type === Radio) {\n return cloneElement(item, {\n ...item.props,\n name,\n checked: item.props.value === value,\n onChange,\n disabled: typeof item.props?.disabled !== 'undefined' ? item.props.disabled : disabled,\n });\n }\n\n if (item?.type && item.type === Label) {\n return cloneElement(item, {\n ...item.props,\n onChange,\n disabled,\n });\n }\n\n const elemChildren = item?.props?.children;\n if (elemChildren) {\n if (Array.isArray(elemChildren)) {\n return cloneElement(item, {\n children: Children.map(elemChildren, (elemChild) => updateRadioElems(elemChild)),\n });\n }\n return cloneElement(item, {\n children: updateRadioElems(elemChildren),\n });\n }\n\n if (item?.type && item.type !== Radio && item.type !== Label) {\n return item;\n }\n\n return null;\n }\n\n const radios = Children.map(children, (child) => updateRadioElems(child));\n return (\n <fieldset data-test-id={testId} ref={fieldsetRef}>\n {legend && (\n <legend>\n <VisuallyHidden>{legend}</VisuallyHidden>\n </legend>\n )}\n <div {...rest}>{radios}</div>\n </fieldset>\n );\n};\n\nexport { RadioGroup };\nexport type { RadioGroupProps };\n","import type { SelectHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\n\nimport './styles/FormInput.css';\n\ntype SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {\n 'data-test-id'?: string;\n};\n\nconst Select = ({\n className,\n children,\n 'data-test-id': testId = 'select',\n ...rest\n}: SelectProps) => {\n const classes = cx('FormInput', 'FormInput-select', className);\n\n return (\n <select {...rest} data-test-id={testId} className={classes}>\n {children}\n </select>\n );\n};\n\nexport { Select };\nexport type { SelectProps };\n","import type { KeyboardEvent, TextareaHTMLAttributes } from 'react';\n\nimport { cx } from 'classix';\nimport { forwardRef } from 'react';\n\nimport './styles/FormInput.css';\nimport { createFieldErrorId } from './utils';\n\ntype TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {\n 'data-test-id'?: string;\n};\n\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n ({ className, 'data-test-id': testId = 'text-area', ...props }, ref) => {\n const onKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n e.key === 'ArrowRight' ||\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowLeft'\n ) {\n e.stopPropagation();\n }\n if (e.key === 'Escape') {\n e.nativeEvent.stopImmediatePropagation();\n }\n };\n\n return (\n <textarea\n {...props}\n className={cx('FormInput', className)}\n ref={ref}\n data-test-id={testId}\n aria-describedby={props['aria-describedby'] || createFieldErrorId(props.id)}\n onKeyDown={onKeyDown}\n />\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\nexport type { TextAreaProps };\n"],"names":["RequiredAsterisk","className","testId","rest","classes","cx","Label","disabled","children","required","optional","_jsx","Checkbox","forwardRef","ariaLabel","ariaLabelledby","checked","labelClassName","ref","hasAriaLabel","undefined","console","warn","displayName","TextField","type","tiny","readOnly","tabIndex","suffix","overrideWidth","createFieldErrorId","id","width","CompactTextField","label","needsErrorFeedback","value","onFocus","onBlur","isActive","setIsActive","useState","toString","trim","length","isActiveState","placeholder","handleFocus","event","handleBlur","target","FieldError","name","errorMessage","FieldSet","Form","props","inline","hasIncreasedErrorMargin","FormGroup","ignoreValidation","isInvalid","FormHint","FormField","isRequired","htmlFor","hint","_jsxs","IconField","icon","Icon","Radio","labelStyle","_Fragment","RadioGroup","onChange","legend","fieldsetRef","useRef","updateRadioElems","elem","isValidElement","item","cloneElement","elemChildren","Array","isArray","Children","map","elemChild","radios","child","VisuallyHidden","Select","TextArea","onKeyDown","e","key","stopPropagation","nativeEvent","stopImmediatePropagation"],"mappings":";;;;;;;AAUA,MAAMA,mBAAmB,CAAC;AAAA,EACxBC;AAAAA,EACA,gBAAgBC,SAAS;AAAA,KACtBC;AAHqB,MAIG;AACrBC,QAAAA,UAAUC,QAAAA,GAAG,oBAAoBJ,SAArB;AAElB;OACYE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAjD,UAAA;AAAA,EAAA,CADF;AAKD;;ACRD,MAAME,QAAQ,CAAC;AAAA,EACbC;AAAAA,EACAN;AAAAA,EACAO;AAAAA,EACAC,WAAW;AAAA,EACXC,WAAW;AAAA,EACX,gBAAgBR,SAAS;AAAA,KACtBC;AAPU,MAQG;A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;AAUD;ACzGD,MAAMG,SAAS,CAAC;AAAA,EACd7F;AAAAA,EACAO;AAAAA,EACA,gBAAgBN,SAAS;AAAA,KACtBC;AAJW,MAKG;AACjB,QAAMC,UAAUC,QAAAA,GAAG,aAAa,oBAAoBJ,SAAlC;AAElB;OACcE;AAAAA,IAAM,gBAAcD;AAAAA,IAAQ,WAAWE;AAAAA,IAAnD;AAAA,EAAA,CADF;AAKD;ACXK2F,MAAAA,WAAWlF,iBACf,CAAC;AAAA,EAAEZ;AAAAA,EAAW,gBAAgBC,SAAS;AAAA,KAAgBuD;AAAtD,GAA+DvC,QAAQ;AAChE8E,QAAAA,YAAY,CAACC,MAA0C;AAEzDA,QAAAA,EAAEC,QAAQ,gBACVD,EAAEC,QAAQ,eACVD,EAAEC,QAAQ,aACVD,EAAEC,QAAQ,aACV;AACAD,QAAEE,gBAAF;AAAA,IACD;AACGF,QAAAA,EAAEC,QAAQ,UAAU;AACtBD,QAAEG,YAAYC;IACf;AAAA,EAAA;AAGH;OAEQ5C;AAAAA,IACJ,WAAWpD,QAAAA,GAAG,aAAaJ,SAAd;AAAA,IACb;AAAA,IACA,gBAAcC;AAAAA,IACd,oBAAkBuD,MAAM,uBAAuB1B,mBAAmB0B,MAAMzB,EAAP;AAAA,IACjE;AAAA,EAAA,CAPJ;AAUD,CA1BwB;AA6B3B+D,SAASxE,cAAc;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchpad-ui/form",
3
- "version": "0.5.1-alpha.0",
3
+ "version": "0.6.1",
4
4
  "status": "beta",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "source": "src/index.ts",
28
28
  "dependencies": {
29
- "@launchpad-ui/icons": "~0.4.1-alpha.0",
29
+ "@launchpad-ui/icons": "~0.5.1",
30
30
  "@launchpad-ui/tokens": "~0.1.5",
31
31
  "@react-aria/visually-hidden": "^3.4.0",
32
32
  "classix": "^2.1.13"