@abgov/react-components 6.0.0 → 6.0.1-alpha.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.
@@ -12,7 +12,7 @@ interface WCProps extends Margins {
12
12
  declare global {
13
13
  namespace JSX {
14
14
  interface IntrinsicElements {
15
- "goa-fieldset": WCProps & React.HTMLAttributes<HTMLElement>;
15
+ "goa-public-form-page": WCProps & React.HTMLAttributes<HTMLElement>;
16
16
  }
17
17
  }
18
18
  }
@@ -17,7 +17,7 @@ declare global {
17
17
  }
18
18
  }
19
19
  }
20
- export interface GoabFormItemprops extends Margins {
20
+ export interface GoabFormItemProps extends Margins {
21
21
  label?: string;
22
22
  labelSize?: GoabFormItemLabelSize;
23
23
  requirement?: GoabFormItemRequirement;
@@ -28,5 +28,5 @@ export interface GoabFormItemprops extends Margins {
28
28
  testId?: string;
29
29
  id?: string;
30
30
  }
31
- export declare function GoabFormItem({ children, helpText, error, requirement, label, labelSize, maxWidth, mt, mr, mb, ml, testId, id, }: GoabFormItemprops): JSX.Element;
31
+ export declare function GoabFormItem({ children, helpText, error, requirement, label, labelSize, maxWidth, mt, mr, mb, ml, testId, id, }: GoabFormItemProps): JSX.Element;
32
32
  export default GoabFormItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "6.0.0",
3
+ "version": "6.0.1-alpha.1",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -1,50 +0,0 @@
1
- export type FieldValidator = (value: unknown) => string;
2
- export declare class FormValidator {
3
- private validators;
4
- constructor(validators?: Record<string, FieldValidator[]>);
5
- add(fieldName: string, ...validators: FieldValidator[]): void;
6
- validate(data: Record<string, string>): {
7
- errors: Record<string, string>;
8
- valid: boolean;
9
- };
10
- }
11
- export declare function relay<T>(el: HTMLElement | Element | null | undefined, eventName: string, data: T, opts?: {
12
- bubbles?: boolean;
13
- }): void;
14
- export type RelayedError = {
15
- name: string;
16
- msg: string;
17
- };
18
- export declare function relayErrors(el: HTMLElement, errors: Record<string, string>): void;
19
- export declare function birthDayValidator(): FieldValidator[];
20
- export declare function birthMonthValidator(): FieldValidator[];
21
- export declare function birthYearValidator(): FieldValidator[];
22
- export declare function requiredValidator(msg?: string): FieldValidator;
23
- export declare function phoneNumberValidator(msg?: string): FieldValidator;
24
- export declare function emailValidator(msg?: string): FieldValidator;
25
- export declare function regexValidator(regex: RegExp, msg: string): FieldValidator;
26
- interface DateValidatorOptions {
27
- invalidMsg?: string;
28
- startMsg?: string;
29
- endMsg?: string;
30
- start?: Date;
31
- end?: Date;
32
- }
33
- export declare function dateValidator({ invalidMsg, startMsg, endMsg, start, end, }: DateValidatorOptions): FieldValidator;
34
- interface NumericValidatorOptions {
35
- invalidTypeMsg?: string;
36
- minMsg?: string;
37
- maxMsg?: string;
38
- min?: number;
39
- max?: number;
40
- }
41
- export declare function numericValidator({ invalidTypeMsg, minMsg, maxMsg, min, max, }: NumericValidatorOptions): FieldValidator;
42
- interface LengthValidatorOptions {
43
- invalidTypeMsg?: string;
44
- minMsg?: string;
45
- maxMsg?: string;
46
- max?: number;
47
- min?: number;
48
- }
49
- export declare function lengthValidator({ invalidTypeMsg, minMsg, maxMsg, min, max, }: LengthValidatorOptions): FieldValidator;
50
- export {};