@instructure/ui-radio-input 8.8.1-snapshot.8 → 8.9.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/es/RadioInput/index.js +23 -49
  3. package/{src/RadioInputGroup/types.ts → es/RadioInput/props.js} +24 -15
  4. package/es/RadioInputGroup/index.js +5 -49
  5. package/es/RadioInputGroup/props.js +68 -0
  6. package/lib/RadioInput/index.js +23 -49
  7. package/lib/RadioInput/props.js +60 -0
  8. package/lib/RadioInputGroup/index.js +4 -53
  9. package/lib/RadioInputGroup/props.js +81 -0
  10. package/package.json +15 -16
  11. package/src/RadioInput/index.tsx +13 -43
  12. package/src/RadioInput/{types.ts → props.ts} +52 -3
  13. package/src/RadioInput/styles.ts +1 -1
  14. package/src/RadioInputGroup/index.tsx +6 -44
  15. package/src/RadioInputGroup/props.ts +107 -0
  16. package/src/index.ts +2 -2
  17. package/types/RadioInput/index.d.ts +32 -30
  18. package/types/RadioInput/index.d.ts.map +1 -1
  19. package/types/RadioInput/props.d.ts +26 -0
  20. package/types/RadioInput/props.d.ts.map +1 -0
  21. package/types/RadioInput/styles.d.ts +1 -1
  22. package/types/RadioInputGroup/index.d.ts +30 -43
  23. package/types/RadioInputGroup/index.d.ts.map +1 -1
  24. package/types/RadioInputGroup/props.d.ts +25 -0
  25. package/types/RadioInputGroup/props.d.ts.map +1 -0
  26. package/types/index.d.ts +2 -2
  27. package/LICENSE.md +0 -27
  28. package/es/RadioInput/types.js +0 -1
  29. package/es/RadioInputGroup/types.js +0 -1
  30. package/lib/RadioInput/types.js +0 -1
  31. package/lib/RadioInputGroup/types.js +0 -1
  32. package/types/RadioInput/types.d.ts +0 -19
  33. package/types/RadioInput/types.d.ts.map +0 -1
  34. package/types/RadioInputGroup/types.d.ts +0 -16
  35. package/types/RadioInputGroup/types.d.ts.map +0 -1
@@ -23,7 +23,7 @@
23
23
  */
24
24
 
25
25
  import { RadioInputTheme } from '@instructure/shared-types'
26
- import { RadioInputProps } from './types'
26
+ import { RadioInputProps } from './props'
27
27
 
28
28
  /**
29
29
  * ---
@@ -23,10 +23,8 @@
23
23
  */
24
24
 
25
25
  import React, { Children, Component, ReactElement } from 'react'
26
- import PropTypes from 'prop-types'
27
26
 
28
- import { controllable } from '@instructure/ui-prop-types'
29
- import { FormPropTypes, FormFieldGroup } from '@instructure/ui-form-field'
27
+ import { FormFieldGroup } from '@instructure/ui-form-field'
30
28
  import { uid } from '@instructure/uid'
31
29
  import { testable } from '@instructure/ui-testable'
32
30
  import {
@@ -37,7 +35,8 @@ import {
37
35
  } from '@instructure/ui-react-utils'
38
36
 
39
37
  import { RadioInput } from '../RadioInput'
40
- import { RadioInputGroupProps } from './types'
38
+ import type { RadioInputGroupProps } from './props'
39
+ import { allowedProps, propTypes } from './props'
41
40
 
42
41
  /**
43
42
  ---
@@ -48,41 +47,8 @@ category: components
48
47
  class RadioInputGroup extends Component<RadioInputGroupProps> {
49
48
  static readonly componentId = 'RadioInputGroup'
50
49
 
51
- static propTypes = {
52
- name: PropTypes.string.isRequired,
53
- description: PropTypes.node.isRequired,
54
- /**
55
- * value to set on initial render
56
- */
57
- defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
58
- /**
59
- * the selected value (must be accompanied by an `onChange` prop)
60
- */
61
- value: controllable(
62
- PropTypes.oneOfType([PropTypes.string, PropTypes.number])
63
- ),
64
- /**
65
- * when used with the `value` prop, the component will not control its own state
66
- */
67
- onChange: PropTypes.func,
68
- disabled: PropTypes.bool,
69
- /** works just like disabled but keeps the same styles as if it were active */
70
- readOnly: PropTypes.bool,
71
- /**
72
- * object with shape: `{
73
- * text: PropTypes.string,
74
- * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
75
- * }`
76
- */
77
- messages: PropTypes.arrayOf(FormPropTypes.message),
78
- /**
79
- * any children (ones that aren't `RadioInput` are passed through)
80
- */
81
- children: PropTypes.node,
82
- variant: PropTypes.oneOf(['simple', 'toggle']), // TODO: split toggle out to its own component
83
- size: PropTypes.oneOf(['small', 'medium', 'large']),
84
- layout: PropTypes.oneOf(['stacked', 'columns', 'inline'])
85
- }
50
+ static allowedProps = allowedProps
51
+ static propTypes = propTypes
86
52
 
87
53
  static defaultProps = {
88
54
  disabled: false,
@@ -90,11 +56,7 @@ class RadioInputGroup extends Component<RadioInputGroupProps> {
90
56
  size: 'medium',
91
57
  layout: 'stacked',
92
58
  readOnly: false,
93
- defaultValue: undefined,
94
- value: undefined,
95
- children: null,
96
- messages: undefined,
97
- onChange: undefined
59
+ children: null
98
60
  }
99
61
 
100
62
  // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'props' implicitly has an 'any' type.
@@ -0,0 +1,107 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ import React from 'react'
26
+ import PropTypes from 'prop-types'
27
+
28
+ import { controllable } from '@instructure/ui-prop-types'
29
+ import { FormPropTypes } from '@instructure/ui-form-field'
30
+
31
+ import type { FormMessage } from '@instructure/ui-form-field'
32
+ import type { PropValidators } from '@instructure/shared-types'
33
+
34
+ type RadioInputGroupOwnProps = {
35
+ name: string
36
+ description: React.ReactNode
37
+ defaultValue?: string | number
38
+ value?: any // TODO: controllable( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) )
39
+ onChange?: (...args: any[]) => any
40
+ disabled?: boolean
41
+ readOnly?: boolean
42
+ messages?: FormMessage[]
43
+ variant?: 'simple' | 'toggle'
44
+ size?: 'small' | 'medium' | 'large'
45
+ layout?: 'stacked' | 'columns' | 'inline'
46
+ children?: React.ReactNode
47
+ }
48
+
49
+ type PropKeys = keyof RadioInputGroupOwnProps
50
+
51
+ type AllowedPropKeys = Readonly<Array<PropKeys>>
52
+
53
+ type RadioInputGroupProps = RadioInputGroupOwnProps
54
+
55
+ const propTypes: PropValidators<PropKeys> = {
56
+ name: PropTypes.string.isRequired,
57
+ description: PropTypes.node.isRequired,
58
+ /**
59
+ * value to set on initial render
60
+ */
61
+ defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
62
+ /**
63
+ * the selected value (must be accompanied by an `onChange` prop)
64
+ */
65
+ value: controllable(
66
+ PropTypes.oneOfType([PropTypes.string, PropTypes.number])
67
+ ),
68
+ /**
69
+ * when used with the `value` prop, the component will not control its own state
70
+ */
71
+ onChange: PropTypes.func,
72
+ disabled: PropTypes.bool,
73
+ /** works just like disabled but keeps the same styles as if it were active */
74
+ readOnly: PropTypes.bool,
75
+ /**
76
+ * object with shape: `{
77
+ * text: PropTypes.string,
78
+ * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
79
+ * }`
80
+ */
81
+ messages: PropTypes.arrayOf(FormPropTypes.message),
82
+ /**
83
+ * any children (ones that aren't `RadioInput` are passed through)
84
+ */
85
+ children: PropTypes.node,
86
+ variant: PropTypes.oneOf(['simple', 'toggle']), // TODO: split toggle out to its own component
87
+ size: PropTypes.oneOf(['small', 'medium', 'large']),
88
+ layout: PropTypes.oneOf(['stacked', 'columns', 'inline'])
89
+ }
90
+
91
+ const allowedProps: AllowedPropKeys = [
92
+ 'name',
93
+ 'description',
94
+ 'defaultValue',
95
+ 'value',
96
+ 'onChange',
97
+ 'disabled',
98
+ 'readOnly',
99
+ 'messages',
100
+ 'children',
101
+ 'variant',
102
+ 'size',
103
+ 'layout'
104
+ ]
105
+
106
+ export type { RadioInputGroupProps }
107
+ export { propTypes, allowedProps }
package/src/index.ts CHANGED
@@ -24,5 +24,5 @@
24
24
  export { RadioInput } from './RadioInput'
25
25
  export { RadioInputGroup } from './RadioInputGroup'
26
26
 
27
- export type { RadioInputProps } from './RadioInput/types'
28
- export type { RadioInputGroupProps } from './RadioInputGroup/types'
27
+ export type { RadioInputProps } from './RadioInput/props'
28
+ export type { RadioInputGroupProps } from './RadioInputGroup/props'
@@ -1,8 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import { jsx } from '@instructure/emotion';
5
- import { RadioInputProps } from './types';
4
+ import type { RadioInputProps } from './props';
6
5
  /**
7
6
  ---
8
7
  category: components
@@ -10,29 +9,36 @@ category: components
10
9
  **/
11
10
  declare class RadioInput extends Component<RadioInputProps> {
12
11
  static readonly componentId = "RadioInput";
13
- static propTypes: {
14
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
15
- styles: PropTypes.Requireable<object>;
16
- label: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
17
- value: PropTypes.Requireable<string | number>;
18
- id: PropTypes.Requireable<string>;
19
- name: PropTypes.Requireable<string>;
20
- checked: PropTypes.Requireable<boolean>;
21
- /**
22
- * Whether or not to disable the input
23
- */
24
- disabled: PropTypes.Requireable<boolean>;
25
- /**
26
- * Works just like disabled but keeps the same styles as if it were active
27
- */
28
- readOnly: PropTypes.Requireable<boolean>;
29
- variant: PropTypes.Requireable<string>;
30
- size: PropTypes.Requireable<string>;
31
- context: PropTypes.Requireable<string>;
32
- inline: PropTypes.Requireable<boolean>;
33
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
34
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
35
- };
12
+ static allowedProps: readonly (keyof {
13
+ label: import("react").ReactNode;
14
+ value?: string | number | undefined;
15
+ id?: string | undefined;
16
+ name?: string | undefined;
17
+ checked?: boolean | undefined;
18
+ disabled?: boolean | undefined;
19
+ readOnly?: boolean | undefined;
20
+ variant?: "simple" | "toggle" | undefined;
21
+ size?: "small" | "medium" | "large" | undefined;
22
+ context?: "success" | "warning" | "danger" | "off" | undefined;
23
+ inline?: boolean | undefined;
24
+ onClick?: ((...args: any[]) => any) | undefined;
25
+ onChange?: ((...args: any[]) => any) | undefined;
26
+ })[];
27
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
28
+ label: import("react").ReactNode;
29
+ value?: string | number | undefined;
30
+ id?: string | undefined;
31
+ name?: string | undefined;
32
+ checked?: boolean | undefined;
33
+ disabled?: boolean | undefined;
34
+ readOnly?: boolean | undefined;
35
+ variant?: "simple" | "toggle" | undefined;
36
+ size?: "small" | "medium" | "large" | undefined;
37
+ context?: "success" | "warning" | "danger" | "off" | undefined;
38
+ inline?: boolean | undefined;
39
+ onClick?: ((...args: any[]) => any) | undefined;
40
+ onChange?: ((...args: any[]) => any) | undefined;
41
+ }>;
36
42
  static defaultProps: {
37
43
  onClick: (event: any) => void;
38
44
  onChange: (event: any) => void;
@@ -42,14 +48,10 @@ declare class RadioInput extends Component<RadioInputProps> {
42
48
  inline: boolean;
43
49
  context: string;
44
50
  readOnly: boolean;
45
- checked: undefined;
46
- id: undefined;
47
- name: undefined;
48
- value: undefined;
49
51
  };
50
52
  constructor(props: any);
51
53
  componentDidMount(): void;
52
- componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
54
+ componentDidUpdate(): void;
53
55
  handleClick: (e: any) => void;
54
56
  handleChange: (e: any) => void;
55
57
  focus(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioInput/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,SAAS,MAAM,YAAY,CAAA;AAOlC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC;;;;GAIG;AACH,cAEM,UAAW,SAAQ,SAAS,CAAC,eAAe,CAAC;IACjD,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,SAAS;;;;;;;;QAUd;;WAEG;;QAEH;;WAEG;;;;;;;;MAQJ;IAED,MAAM,CAAC,YAAY;;;;;;;;;;;;;MAelB;gBAGW,KAAK,KAAA;IAcjB,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAMjD,WAAW,mBAQV;IAGD,YAAY,mBAaX;IAED,KAAK;IAKL,IAAI,EAAE,QAGL;IAED,IAAI,OAAO,YAGV;IAED,IAAI,OAAO,QAKV;IAED,MAAM;CAgCP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioInput/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG9C;;;;GAIG;AACH,cAEM,UAAW,SAAQ,SAAS,CAAC,eAAe,CAAC;IACjD,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;;;MAWlB;gBAGW,KAAK,KAAA;IAcjB,iBAAiB;IAIjB,kBAAkB;IAKlB,WAAW,mBAQV;IAGD,YAAY,mBAaX;IAED,KAAK;IAKL,IAAI,EAAE,QAGL;IAED,IAAI,OAAO,YAGV;IAED,IAAI,OAAO,QAKV;IAED,MAAM;CAgCP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import type { PropValidators } from '@instructure/shared-types';
3
+ import type { WithStyleProps } from '@instructure/emotion';
4
+ declare type RadioInputOwnProps = {
5
+ label: React.ReactNode;
6
+ value?: string | number;
7
+ id?: string;
8
+ name?: string;
9
+ checked?: boolean;
10
+ disabled?: boolean;
11
+ readOnly?: boolean;
12
+ variant?: 'simple' | 'toggle';
13
+ size?: 'small' | 'medium' | 'large';
14
+ context?: 'success' | 'warning' | 'danger' | 'off';
15
+ inline?: boolean;
16
+ onClick?: (...args: any[]) => any;
17
+ onChange?: (...args: any[]) => any;
18
+ };
19
+ declare type PropKeys = keyof RadioInputOwnProps;
20
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
21
+ declare type RadioInputProps = RadioInputOwnProps & WithStyleProps;
22
+ declare const propTypes: PropValidators<PropKeys>;
23
+ declare const allowedProps: AllowedPropKeys;
24
+ export type { RadioInputProps };
25
+ export { propTypes, allowedProps };
26
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/RadioInput/props.ts"],"names":[],"mappings":";AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,aAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAA;IAClD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CACnC,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,eAAe,GAAG,kBAAkB,GAAG,cAAc,CAAA;AAE1D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAoBvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAcnB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { RadioInputTheme } from '@instructure/shared-types';
2
- import { RadioInputProps } from './types';
2
+ import { RadioInputProps } from './props';
3
3
  /**
4
4
  * ---
5
5
  * private: true
@@ -1,6 +1,5 @@
1
- import { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { RadioInputGroupProps } from './types';
1
+ import React, { Component } from 'react';
2
+ import type { RadioInputGroupProps } from './props';
4
3
  /**
5
4
  ---
6
5
  category: components
@@ -8,53 +7,41 @@ category: components
8
7
  **/
9
8
  declare class RadioInputGroup extends Component<RadioInputGroupProps> {
10
9
  static readonly componentId = "RadioInputGroup";
11
- static propTypes: {
12
- name: PropTypes.Validator<string>;
13
- description: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
14
- /**
15
- * value to set on initial render
16
- */
17
- defaultValue: PropTypes.Requireable<string | number>;
18
- /**
19
- * the selected value (must be accompanied by an `onChange` prop)
20
- */
21
- value: (props: Record<string, any>, propName: string, componentName: string) => Error | null;
22
- /**
23
- * when used with the `value` prop, the component will not control its own state
24
- */
25
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
26
- disabled: PropTypes.Requireable<boolean>;
27
- /** works just like disabled but keeps the same styles as if it were active */
28
- readOnly: PropTypes.Requireable<boolean>;
29
- /**
30
- * object with shape: `{
31
- * text: PropTypes.string,
32
- * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
33
- * }`
34
- */
35
- messages: PropTypes.Requireable<(PropTypes.InferProps<{
36
- text: PropTypes.Requireable<string>;
37
- type: PropTypes.Requireable<string>;
38
- }> | null | undefined)[]>;
39
- /**
40
- * any children (ones that aren't `RadioInput` are passed through)
41
- */
42
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
43
- variant: PropTypes.Requireable<string>;
44
- size: PropTypes.Requireable<string>;
45
- layout: PropTypes.Requireable<string>;
46
- };
10
+ static allowedProps: readonly (keyof {
11
+ name: string;
12
+ description: React.ReactNode;
13
+ defaultValue?: string | number | undefined;
14
+ value?: any;
15
+ onChange?: ((...args: any[]) => any) | undefined;
16
+ disabled?: boolean | undefined;
17
+ readOnly?: boolean | undefined;
18
+ messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
19
+ variant?: "simple" | "toggle" | undefined;
20
+ size?: "small" | "medium" | "large" | undefined;
21
+ layout?: "inline" | "columns" | "stacked" | undefined;
22
+ children?: React.ReactNode;
23
+ })[];
24
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
25
+ name: string;
26
+ description: React.ReactNode;
27
+ defaultValue?: string | number | undefined;
28
+ value?: any;
29
+ onChange?: ((...args: any[]) => any) | undefined;
30
+ disabled?: boolean | undefined;
31
+ readOnly?: boolean | undefined;
32
+ messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
33
+ variant?: "simple" | "toggle" | undefined;
34
+ size?: "small" | "medium" | "large" | undefined;
35
+ layout?: "inline" | "columns" | "stacked" | undefined;
36
+ children?: React.ReactNode;
37
+ }>;
47
38
  static defaultProps: {
48
39
  disabled: boolean;
49
40
  variant: string;
50
41
  size: string;
51
42
  layout: string;
52
43
  readOnly: boolean;
53
- defaultValue: undefined;
54
- value: undefined;
55
44
  children: null;
56
- messages: undefined;
57
- onChange: undefined;
58
45
  };
59
46
  constructor(props: any);
60
47
  get hasMessages(): boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioInputGroup/index.tsx"],"names":[],"mappings":"AAwBA,OAAc,EAAY,SAAS,EAAgB,MAAM,OAAO,CAAA;AAChE,OAAO,SAAS,MAAM,YAAY,CAAA;AAclC,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE9C;;;;GAIG;AACH,cACM,eAAgB,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,SAAS;;;QAGd;;WAEG;;QAEH;;WAEG;;QAIH;;WAEG;;;QAGH,8EAA8E;;QAE9E;;;;;WAKG;;;;;QAEH;;WAEG;;;;;MAKJ;IAED,MAAM,CAAC,YAAY;;;;;;;;;;;MAWlB;gBAGW,KAAK,KAAA;IAcjB,IAAI,WAAW,wBAEd;IAGD,YAAY,mBAeX;IAED,IAAI,KAAK,QAKR;IAED,cAAc;IAmCd,MAAM;CAuBP;AAED,eAAe,eAAe,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioInputGroup/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAY,SAAS,EAAgB,MAAM,OAAO,CAAA;AAahE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAGnD;;;;GAIG;AACH,cACM,eAAgB,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,YAAY;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;MAOlB;gBAGW,KAAK,KAAA;IAcjB,IAAI,WAAW,wBAEd;IAGD,YAAY,mBAeX;IAED,IAAI,KAAK,QAKR;IAED,cAAc;IAmCd,MAAM;CAuBP;AAED,eAAe,eAAe,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import type { FormMessage } from '@instructure/ui-form-field';
3
+ import type { PropValidators } from '@instructure/shared-types';
4
+ declare type RadioInputGroupOwnProps = {
5
+ name: string;
6
+ description: React.ReactNode;
7
+ defaultValue?: string | number;
8
+ value?: any;
9
+ onChange?: (...args: any[]) => any;
10
+ disabled?: boolean;
11
+ readOnly?: boolean;
12
+ messages?: FormMessage[];
13
+ variant?: 'simple' | 'toggle';
14
+ size?: 'small' | 'medium' | 'large';
15
+ layout?: 'stacked' | 'columns' | 'inline';
16
+ children?: React.ReactNode;
17
+ };
18
+ declare type PropKeys = keyof RadioInputGroupOwnProps;
19
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
20
+ declare type RadioInputGroupProps = RadioInputGroupOwnProps;
21
+ declare const propTypes: PropValidators<PropKeys>;
22
+ declare const allowedProps: AllowedPropKeys;
23
+ export type { RadioInputGroupProps };
24
+ export { propTypes, allowedProps };
25
+ //# sourceMappingURL=props.d.ts.map