@instructure/ui-form-field 8.12.1-snapshot.46 → 8.12.1-snapshot.52

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.
@@ -33,7 +33,7 @@ const propTypes = {
33
33
 
34
34
  /**
35
35
  * object with shape: `{
36
- * text: PropTypes.string,
36
+ * text: PropTypes.node,
37
37
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
38
38
  * }`
39
39
  */
@@ -33,7 +33,7 @@ const propTypes = {
33
33
 
34
34
  /**
35
35
  * object with shape: `{
36
- * text: PropTypes.string,
36
+ * text: PropTypes.node,
37
37
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
38
38
  * }`
39
39
  */
@@ -38,7 +38,7 @@ const propTypes = {
38
38
 
39
39
  /**
40
40
  * object with shape: `{
41
- * text: PropTypes.string,
41
+ * text: PropTypes.node,
42
42
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
43
43
  * }`
44
44
  */
@@ -21,10 +21,10 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import PropTypes from 'prop-types';
24
+ import { formMessageTypePropType, formMessageChildPropType } from '../FormPropTypes';
25
25
  const propTypes = {
26
- variant: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only']),
27
- children: PropTypes.node
26
+ variant: formMessageTypePropType,
27
+ children: formMessageChildPropType
28
28
  };
29
29
  const allowedProps = ['variant', 'children'];
30
30
  export { propTypes, allowedProps };
@@ -26,7 +26,7 @@ import { FormPropTypes } from '../FormPropTypes';
26
26
  const propTypes = {
27
27
  /**
28
28
  * object with shape: `{
29
- * text: PropTypes.string,
29
+ * text: PropTypes.node,
30
30
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
31
31
  * }`
32
32
  */
@@ -22,6 +22,9 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  import PropTypes from 'prop-types';
25
+ const formMessageTypePropType = PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only']);
26
+ const formMessageChildPropType = PropTypes.node;
27
+
25
28
  /**
26
29
  * ---
27
30
  * category: utilities/form
@@ -29,12 +32,11 @@ import PropTypes from 'prop-types';
29
32
  * Custom prop types for React components.
30
33
  * @module FormPropTypes
31
34
  */
32
-
33
35
  const FormPropTypes = {
34
36
  message: PropTypes.shape({
35
- text: PropTypes.string,
36
- type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
37
+ type: formMessageTypePropType,
38
+ text: formMessageChildPropType
37
39
  })
38
40
  };
39
41
  export default FormPropTypes;
40
- export { FormPropTypes };
42
+ export { FormPropTypes, formMessageTypePropType, formMessageChildPropType };
@@ -44,7 +44,7 @@ const propTypes = {
44
44
 
45
45
  /**
46
46
  * object with shape: `{
47
- * text: PropTypes.string,
47
+ * text: PropTypes.node,
48
48
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
49
49
  * }`
50
50
  */
@@ -44,7 +44,7 @@ const propTypes = {
44
44
 
45
45
  /**
46
46
  * object with shape: `{
47
- * text: PropTypes.string,
47
+ * text: PropTypes.node,
48
48
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
49
49
  * }`
50
50
  */
@@ -49,7 +49,7 @@ const propTypes = {
49
49
 
50
50
  /**
51
51
  * object with shape: `{
52
- * text: PropTypes.string,
52
+ * text: PropTypes.node,
53
53
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
54
54
  * }`
55
55
  */
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.propTypes = exports.allowedProps = void 0;
9
7
 
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _FormPropTypes = require("../FormPropTypes");
11
9
 
12
10
  /*
13
11
  * The MIT License (MIT)
@@ -33,8 +31,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
33
31
  * SOFTWARE.
34
32
  */
35
33
  const propTypes = {
36
- variant: _propTypes.default.oneOf(['error', 'hint', 'success', 'screenreader-only']),
37
- children: _propTypes.default.node
34
+ variant: _FormPropTypes.formMessageTypePropType,
35
+ children: _FormPropTypes.formMessageChildPropType
38
36
  };
39
37
  exports.propTypes = propTypes;
40
38
  const allowedProps = ['variant', 'children'];
@@ -37,7 +37,7 @@ var _FormPropTypes = require("../FormPropTypes");
37
37
  const propTypes = {
38
38
  /**
39
39
  * object with shape: `{
40
- * text: PropTypes.string,
40
+ * text: PropTypes.node,
41
41
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
42
42
  * }`
43
43
  */
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = exports.FormPropTypes = void 0;
8
+ exports.formMessageTypePropType = exports.formMessageChildPropType = exports.default = exports.FormPropTypes = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -32,6 +32,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
32
32
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
33
  * SOFTWARE.
34
34
  */
35
+ const formMessageTypePropType = _propTypes.default.oneOf(['error', 'hint', 'success', 'screenreader-only']);
36
+
37
+ exports.formMessageTypePropType = formMessageTypePropType;
38
+ const formMessageChildPropType = _propTypes.default.node;
39
+ exports.formMessageChildPropType = formMessageChildPropType;
35
40
 
36
41
  /**
37
42
  * ---
@@ -42,8 +47,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
42
47
  */
43
48
  const FormPropTypes = {
44
49
  message: _propTypes.default.shape({
45
- text: _propTypes.default.string,
46
- type: _propTypes.default.oneOf(['error', 'hint', 'success', 'screenreader-only'])
50
+ type: formMessageTypePropType,
51
+ text: formMessageChildPropType
47
52
  })
48
53
  };
49
54
  exports.FormPropTypes = FormPropTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-form-field",
3
- "version": "8.12.1-snapshot.46+51e6aff75",
3
+ "version": "8.12.1-snapshot.52+07b0037b0",
4
4
  "description": "Form layout components.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -24,22 +24,22 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@instructure/ui-babel-preset": "8.12.1-snapshot.46+51e6aff75",
28
- "@instructure/ui-test-utils": "8.12.1-snapshot.46+51e6aff75",
29
- "@instructure/ui-themes": "8.12.1-snapshot.46+51e6aff75"
27
+ "@instructure/ui-babel-preset": "8.12.1-snapshot.52+07b0037b0",
28
+ "@instructure/ui-test-utils": "8.12.1-snapshot.52+07b0037b0",
29
+ "@instructure/ui-themes": "8.12.1-snapshot.52+07b0037b0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.13.10",
33
- "@instructure/console": "8.12.1-snapshot.46+51e6aff75",
34
- "@instructure/emotion": "8.12.1-snapshot.46+51e6aff75",
35
- "@instructure/shared-types": "8.12.1-snapshot.46+51e6aff75",
36
- "@instructure/ui-a11y-content": "8.12.1-snapshot.46+51e6aff75",
37
- "@instructure/ui-a11y-utils": "8.12.1-snapshot.46+51e6aff75",
38
- "@instructure/ui-grid": "8.12.1-snapshot.46+51e6aff75",
39
- "@instructure/ui-icons": "8.12.1-snapshot.46+51e6aff75",
40
- "@instructure/ui-react-utils": "8.12.1-snapshot.46+51e6aff75",
41
- "@instructure/ui-utils": "8.12.1-snapshot.46+51e6aff75",
42
- "@instructure/uid": "8.12.1-snapshot.46+51e6aff75",
33
+ "@instructure/console": "8.12.1-snapshot.52+07b0037b0",
34
+ "@instructure/emotion": "8.12.1-snapshot.52+07b0037b0",
35
+ "@instructure/shared-types": "8.12.1-snapshot.52+07b0037b0",
36
+ "@instructure/ui-a11y-content": "8.12.1-snapshot.52+07b0037b0",
37
+ "@instructure/ui-a11y-utils": "8.12.1-snapshot.52+07b0037b0",
38
+ "@instructure/ui-grid": "8.12.1-snapshot.52+07b0037b0",
39
+ "@instructure/ui-icons": "8.12.1-snapshot.52+07b0037b0",
40
+ "@instructure/ui-react-utils": "8.12.1-snapshot.52+07b0037b0",
41
+ "@instructure/ui-utils": "8.12.1-snapshot.52+07b0037b0",
42
+ "@instructure/uid": "8.12.1-snapshot.52+07b0037b0",
43
43
  "prop-types": "^15"
44
44
  },
45
45
  "peerDependencies": {
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "51e6aff7502e7b0b22b107c9d39c2a8dc2c267f4"
51
+ "gitHead": "07b0037b0ddaf6d4f19cca140fc82fc9a2f1efc9"
52
52
  }
@@ -62,7 +62,7 @@ const propTypes: PropValidators<PropKeys> = {
62
62
  id: PropTypes.string.isRequired,
63
63
  /**
64
64
  * object with shape: `{
65
- * text: PropTypes.string,
65
+ * text: PropTypes.node,
66
66
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
67
67
  * }`
68
68
  */
@@ -72,7 +72,7 @@ const propTypes: PropValidators<PropKeys> = {
72
72
  as: PropTypes.elementType,
73
73
  /**
74
74
  * object with shape: `{
75
- * text: PropTypes.string,
75
+ * text: PropTypes.node,
76
76
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
77
77
  * }`
78
78
  */
@@ -71,7 +71,7 @@ const propTypes: PropValidators<PropKeys> = {
71
71
  as: PropTypes.elementType,
72
72
  /**
73
73
  * object with shape: `{
74
- * text: PropTypes.string,
74
+ * text: PropTypes.node,
75
75
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
76
76
  * }`
77
77
  */
@@ -22,18 +22,21 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import PropTypes from 'prop-types'
25
+ import {
26
+ formMessageTypePropType,
27
+ formMessageChildPropType
28
+ } from '../FormPropTypes'
26
29
 
27
30
  import type {
28
31
  PropValidators,
29
32
  FormFieldMessageTheme
30
33
  } from '@instructure/shared-types'
31
34
  import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
32
- import type { FormMessageType } from '../FormPropTypes'
35
+ import type { FormMessageType, FormMessageChild } from '../FormPropTypes'
33
36
 
34
37
  type FormFieldMessageOwnProps = {
35
38
  variant?: FormMessageType
36
- children?: React.ReactNode
39
+ children?: FormMessageChild
37
40
  }
38
41
 
39
42
  type PropKeys = keyof FormFieldMessageOwnProps
@@ -46,8 +49,8 @@ type FormFieldMessageProps = FormFieldMessageOwnProps &
46
49
  type FormFieldMessageStyle = ComponentStyle<'formFieldMessage'>
47
50
 
48
51
  const propTypes: PropValidators<PropKeys> = {
49
- variant: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only']),
50
- children: PropTypes.node
52
+ variant: formMessageTypePropType,
53
+ children: formMessageChildPropType
51
54
  }
52
55
 
53
56
  const allowedProps: AllowedPropKeys = ['variant', 'children']
@@ -51,7 +51,7 @@ type FormFieldMessagesStyle = ComponentStyle<'formFieldMessages' | 'message'>
51
51
  const propTypes: PropValidators<PropKeys> = {
52
52
  /**
53
53
  * object with shape: `{
54
- * text: PropTypes.string,
54
+ * text: PropTypes.node,
55
55
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
56
56
  * }`
57
57
  */
@@ -22,8 +22,20 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
+ import React from 'react'
25
26
  import PropTypes from 'prop-types'
26
27
 
28
+ const formMessageTypePropType = PropTypes.oneOf([
29
+ 'error',
30
+ 'hint',
31
+ 'success',
32
+ 'screenreader-only'
33
+ ])
34
+ const formMessageChildPropType = PropTypes.node
35
+
36
+ type FormMessageType = 'error' | 'hint' | 'success' | 'screenreader-only'
37
+ type FormMessageChild = React.ReactNode
38
+
27
39
  /**
28
40
  * ---
29
41
  * category: utilities/form
@@ -33,17 +45,16 @@ import PropTypes from 'prop-types'
33
45
  */
34
46
  const FormPropTypes = {
35
47
  message: PropTypes.shape({
36
- text: PropTypes.string,
37
- type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
48
+ type: formMessageTypePropType,
49
+ text: formMessageChildPropType
38
50
  })
39
51
  }
40
52
 
41
- export type FormMessageType = 'error' | 'hint' | 'success' | 'screenreader-only'
42
-
43
- export type FormMessage = {
44
- text: string
53
+ type FormMessage = {
45
54
  type: FormMessageType
55
+ text: FormMessageChild
46
56
  }
47
57
 
48
58
  export default FormPropTypes
49
- export { FormPropTypes }
59
+ export { FormPropTypes, formMessageTypePropType, formMessageChildPropType }
60
+ export type { FormMessage, FormMessageType, FormMessageChild }
@@ -10,7 +10,7 @@ declare class FormField extends Component<FormFieldProps> {
10
10
  static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
11
11
  label: React.ReactNode;
12
12
  id: string;
13
- messages?: import("..").FormMessage[] | undefined;
13
+ messages?: import("../FormPropTypes").FormMessage[] | undefined;
14
14
  messagesId?: string | undefined;
15
15
  children?: React.ReactNode;
16
16
  inline?: boolean | undefined;
@@ -24,7 +24,7 @@ declare class FormField extends Component<FormFieldProps> {
24
24
  static allowedProps: readonly (keyof {
25
25
  label: React.ReactNode;
26
26
  id: string;
27
- messages?: import("..").FormMessage[] | undefined;
27
+ messages?: import("../FormPropTypes").FormMessage[] | undefined;
28
28
  messagesId?: string | undefined;
29
29
  children?: React.ReactNode;
30
30
  inline?: boolean | undefined;
@@ -12,7 +12,7 @@ declare class FormFieldGroup extends Component<FormFieldGroupProps> {
12
12
  static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
13
13
  description: import("react").ReactNode;
14
14
  as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
15
- messages?: import("..").FormMessage[] | undefined;
15
+ messages?: import("../FormPropTypes").FormMessage[] | undefined;
16
16
  messagesId?: string | undefined;
17
17
  disabled?: boolean | undefined;
18
18
  children?: import("react").ReactNode;
@@ -26,7 +26,7 @@ declare class FormFieldGroup extends Component<FormFieldGroupProps> {
26
26
  static allowedProps: readonly (keyof {
27
27
  description: import("react").ReactNode;
28
28
  as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
29
- messages?: import("..").FormMessage[] | undefined;
29
+ messages?: import("../FormPropTypes").FormMessage[] | undefined;
30
30
  messagesId?: string | undefined;
31
31
  disabled?: boolean | undefined;
32
32
  children?: import("react").ReactNode;
@@ -13,7 +13,7 @@ declare class FormFieldLayout extends Component<FormFieldLayoutProps> {
13
13
  label: import("react").ReactNode;
14
14
  id?: string | undefined;
15
15
  as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
16
- messages?: import("..").FormMessage[] | undefined;
16
+ messages?: import("../FormPropTypes").FormMessage[] | undefined;
17
17
  messagesId?: string | undefined;
18
18
  children?: import("react").ReactNode;
19
19
  inline?: boolean | undefined;
@@ -27,7 +27,7 @@ declare class FormFieldLayout extends Component<FormFieldLayoutProps> {
27
27
  label: import("react").ReactNode;
28
28
  id?: string | undefined;
29
29
  as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
30
- messages?: import("..").FormMessage[] | undefined;
30
+ messages?: import("../FormPropTypes").FormMessage[] | undefined;
31
31
  messagesId?: string | undefined;
32
32
  children?: import("react").ReactNode;
33
33
  inline?: boolean | undefined;
@@ -20,11 +20,11 @@ example: true
20
20
  declare class FormFieldMessage extends Component<FormFieldMessageProps> {
21
21
  static readonly componentId = "FormFieldMessage";
22
22
  static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
23
- variant?: import("..").FormMessageType | undefined;
23
+ variant?: import("../FormPropTypes").FormMessageType | undefined;
24
24
  children?: import("react").ReactNode;
25
25
  }>;
26
26
  static allowedProps: readonly (keyof {
27
- variant?: import("..").FormMessageType | undefined;
27
+ variant?: import("../FormPropTypes").FormMessageType | undefined;
28
28
  children?: import("react").ReactNode;
29
29
  })[];
30
30
  static defaultProps: {
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import type { PropValidators, FormFieldMessageTheme } from '@instructure/shared-types';
3
2
  import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
4
- import type { FormMessageType } from '../FormPropTypes';
3
+ import type { FormMessageType, FormMessageChild } from '../FormPropTypes';
5
4
  declare type FormFieldMessageOwnProps = {
6
5
  variant?: FormMessageType;
7
- children?: React.ReactNode;
6
+ children?: FormMessageChild;
8
7
  };
9
8
  declare type PropKeys = keyof FormFieldMessageOwnProps;
10
9
  declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/FormFieldMessage/props.ts"],"names":[],"mappings":";AA0BA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEvD,aAAK,wBAAwB,GAAG;IAC9B,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,wBAAwB,CAAA;AAE9C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,qBAAqB,GAAG,wBAAwB,GACnD,cAAc,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAA;AAE9D,aAAK,qBAAqB,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAA;AAE/D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAGvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAAyC,CAAA;AAE7D,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/FormFieldMessage/props.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEzE,aAAK,wBAAwB,GAAG;IAC9B,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC5B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,wBAAwB,CAAA;AAE9C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,qBAAqB,GAAG,wBAAwB,GACnD,cAAc,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAA;AAE9D,aAAK,qBAAqB,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAA;AAE/D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAGvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAAyC,CAAA;AAE7D,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,4 +1,9 @@
1
+ import React from 'react';
1
2
  import PropTypes from 'prop-types';
3
+ declare const formMessageTypePropType: PropTypes.Requireable<string>;
4
+ declare const formMessageChildPropType: PropTypes.Requireable<PropTypes.ReactNodeLike>;
5
+ declare type FormMessageType = 'error' | 'hint' | 'success' | 'screenreader-only';
6
+ declare type FormMessageChild = React.ReactNode;
2
7
  /**
3
8
  * ---
4
9
  * category: utilities/form
@@ -8,15 +13,15 @@ import PropTypes from 'prop-types';
8
13
  */
9
14
  declare const FormPropTypes: {
10
15
  message: PropTypes.Requireable<PropTypes.InferProps<{
11
- text: PropTypes.Requireable<string>;
12
16
  type: PropTypes.Requireable<string>;
17
+ text: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
18
  }>>;
14
19
  };
15
- export declare type FormMessageType = 'error' | 'hint' | 'success' | 'screenreader-only';
16
- export declare type FormMessage = {
17
- text: string;
20
+ declare type FormMessage = {
18
21
  type: FormMessageType;
22
+ text: FormMessageChild;
19
23
  };
20
24
  export default FormPropTypes;
21
- export { FormPropTypes };
25
+ export { FormPropTypes, formMessageTypePropType, formMessageChildPropType };
26
+ export type { FormMessage, FormMessageType, FormMessageChild };
22
27
  //# sourceMappingURL=FormPropTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormPropTypes.d.ts","sourceRoot":"","sources":["../src/FormPropTypes.ts"],"names":[],"mappings":"AAwBA,OAAO,SAAS,MAAM,YAAY,CAAA;AAElC;;;;;;GAMG;AACH,QAAA,MAAM,aAAa;;;;;CAKlB,CAAA;AAED,oBAAY,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAAA;AAEhF,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,eAAe,CAAA;CACtB,CAAA;AAED,eAAe,aAAa,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"FormPropTypes.d.ts","sourceRoot":"","sources":["../src/FormPropTypes.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,SAAS,MAAM,YAAY,CAAA;AAElC,QAAA,MAAM,uBAAuB,+BAK3B,CAAA;AACF,QAAA,MAAM,wBAAwB,gDAAiB,CAAA;AAE/C,aAAK,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAAA;AACzE,aAAK,gBAAgB,GAAG,KAAK,CAAC,SAAS,CAAA;AAEvC;;;;;;GAMG;AACH,QAAA,MAAM,aAAa;;;;;CAKlB,CAAA;AAED,aAAK,WAAW,GAAG;IACjB,IAAI,EAAE,eAAe,CAAA;IACrB,IAAI,EAAE,gBAAgB,CAAA;CACvB,CAAA;AAED,eAAe,aAAa,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,CAAA;AAC3E,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA"}