@semcore/radio 5.0.10 → 5.0.12
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.
- package/CHANGELOG.md +12 -0
- package/lib/cjs/Radio.js +14 -14
- package/lib/cjs/index.d.js +2 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/cjs/style/radio.shadow.css +3 -1
- package/lib/es6/Radio.js +14 -14
- package/lib/es6/index.d.js +2 -0
- package/lib/es6/index.d.js.map +1 -0
- package/lib/es6/style/radio.shadow.css +3 -1
- package/package.json +3 -2
- package/lib/cjs/index.d.ts +0 -78
- package/lib/es6/index.d.ts +0 -78
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [5.0.12] - 2022-10-04
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [3.37.1 ~> 3.37.2], `@semcore/flex-box` [4.5.11 ~> 4.5.12]).
|
|
10
|
+
|
|
11
|
+
## [5.0.11] - 2022-09-22
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Fixed arrangement of internal and external circles in `checked` state.
|
|
16
|
+
|
|
5
17
|
## [5.0.10] - 2022-08-30
|
|
6
18
|
|
|
7
19
|
### Changed
|
package/lib/cjs/Radio.js
CHANGED
|
@@ -62,23 +62,23 @@ var style = (
|
|
|
62
62
|
/*__reshadow_css_start__*/
|
|
63
63
|
_core.sstyled.insert(
|
|
64
64
|
/*__inner_css_start__*/
|
|
65
|
-
".
|
|
65
|
+
".___SRadio_t56y7_gg_{display:inline-flex;align-items:flex-start;cursor:pointer}.___SRadio_t56y7_gg_.__disabled_t56y7_gg_{opacity:0.3;cursor:default;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SText_t56y7_gg_{margin-left:8px}.___SText_t56y7_gg_._size_m_t56y7_gg_{font-size:14px;line-height:1.42}.___SText_t56y7_gg_._size_l_t56y7_gg_{font-size:16px;line-height:1.5}.___SValue_t56y7_gg_{position:relative;flex-shrink:0;padding:0;outline:none;z-index:0;margin-top:2px}.___SValue_t56y7_gg_:before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background:#fff;border:1px solid;border-radius:50%}.___SValue_t56y7_gg_:after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0;border-radius:50%;background:#fff}.___SValue_t56y7_gg_._size_m_t56y7_gg_{width:16px;height:16px}.___SValue_t56y7_gg_._size_l_t56y7_gg_{width:20px;height:20px}.___SValue_t56y7_gg_._state_normal_t56y7_gg_:before{border-color:#c4c7cf}.___SValue_t56y7_gg_._state_invalid_t56y7_gg_:before{border-color:#ff4953}.___SControl_t56y7_gg_{position:absolute;clip:rect(1px,1px,1px,1px)}.___SControl_t56y7_gg_:checked~.___SValue_t56y7_gg_:before{border-color:#008ff8;background-color:#008ff8}.___SControl_t56y7_gg_:checked~.___SValue_t56y7_gg_._size_m_t56y7_gg_:after{width:6px;height:6px}.___SControl_t56y7_gg_:checked~.___SValue_t56y7_gg_._size_l_t56y7_gg_:after{width:8px;height:8px}.___SValue_t56y7_gg_._state_normal_t56y7_gg_.__keyboardFocused_t56y7_gg_:before{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2);border-color:#008ff8}.___SValue_t56y7_gg_._state_invalid_t56y7_gg_.__keyboardFocused_t56y7_gg_:before{box-shadow:0px 0px 0px 3px rgba(255, 73, 83, 0.2)}.___SControl_t56y7_gg_:checked~.___SValue_t56y7_gg_.__theme_t56y7_gg_:before{border-color:var(--theme_t56y7);background-color:var(--theme_t56y7)}.___SValue_t56y7_gg_._state_normal_t56y7_gg_.__theme_t56y7_gg_:before{border-color:var(--theme_t56y7)}"
|
|
66
66
|
/*__inner_css_end__*/
|
|
67
|
-
, "
|
|
67
|
+
, "t56y7_gg_")
|
|
68
68
|
/*__reshadow_css_end__*/
|
|
69
69
|
, {
|
|
70
|
-
"__SRadio": "
|
|
71
|
-
"_disabled": "
|
|
72
|
-
"__SText": "
|
|
73
|
-
"_size_m": "
|
|
74
|
-
"_size_l": "
|
|
75
|
-
"__SValue": "
|
|
76
|
-
"_state_normal": "
|
|
77
|
-
"_state_invalid": "
|
|
78
|
-
"__SControl": "
|
|
79
|
-
"_keyboardFocused": "
|
|
80
|
-
"_theme": "
|
|
81
|
-
"--theme": "--
|
|
70
|
+
"__SRadio": "___SRadio_t56y7_gg_",
|
|
71
|
+
"_disabled": "__disabled_t56y7_gg_",
|
|
72
|
+
"__SText": "___SText_t56y7_gg_",
|
|
73
|
+
"_size_m": "_size_m_t56y7_gg_",
|
|
74
|
+
"_size_l": "_size_l_t56y7_gg_",
|
|
75
|
+
"__SValue": "___SValue_t56y7_gg_",
|
|
76
|
+
"_state_normal": "_state_normal_t56y7_gg_",
|
|
77
|
+
"_state_invalid": "_state_invalid_t56y7_gg_",
|
|
78
|
+
"__SControl": "___SControl_t56y7_gg_",
|
|
79
|
+
"_keyboardFocused": "__keyboardFocused_t56y7_gg_",
|
|
80
|
+
"_theme": "__theme_t56y7_gg_",
|
|
81
|
+
"--theme": "--theme_t56y7"
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
var RadioGroupRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\nimport { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { Text } from '@semcore/typography';\n\nexport type RadioSize = 'm' | 'l';\nexport type RadioState = 'normal' | 'invalid';\nexport type RadioValue = string | number | boolean;\n\nexport interface IRadioProps extends IBoxProps {\n /**\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * Radio button size\n * @default m\n **/\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n}\n\nexport interface IRadioGroupProps {\n /** Radio group name */\n name?: string;\n /** Active default value */\n defaultValue?: RadioValue;\n /** Active value */\n value?: RadioValue;\n /** Called when the selected element is changed */\n onChange?: (value: RadioValue, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n /** Radio button size */\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Blocks access and changes to the form field */\n disabled?: boolean;\n}\n\nexport interface IRadioValueProps extends IBoxProps, IKeyboardFocusProps {\n /** List of elements that can be put on a hidden input */\n includeInputProps?: string[];\n /**\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Radio button size */\n size?: RadioSize;\n /** The element value is required for RadioGroup */\n value?: RadioValue;\n /** Default value if `value` property is not provided */\n defaultValue?: RadioValue;\n /** Called when the value changes */\n onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n /** Blocks access and changes to the form field */\n disabled?: boolean;\n}\n\nexport interface IRadioCtx {\n getValueProps: PropGetterFn;\n getTextProps: PropGetterFn;\n}\n\ndeclare const RadioGroup: <T>(props: CProps<IRadioGroupProps & T>) => ReturnEl;\n\nexport { RadioGroup };\n\ndeclare const Radio: (<T>(props: CProps<IRadioProps & T, IRadioCtx>) => ReturnEl) & {\n Value: <T>(props: IRadioValueProps & T) => ReturnEl;\n Text: typeof Text;\n};\n\nexport default Radio;\n"],"mappings":""}
|
package/lib/es6/Radio.js
CHANGED
|
@@ -31,23 +31,23 @@ var style = (
|
|
|
31
31
|
/*__reshadow_css_start__*/
|
|
32
32
|
_sstyled.insert(
|
|
33
33
|
/*__inner_css_start__*/
|
|
34
|
-
".
|
|
34
|
+
".___SRadio_t56y7_gg_{display:inline-flex;align-items:flex-start;cursor:pointer}.___SRadio_t56y7_gg_.__disabled_t56y7_gg_{opacity:0.3;cursor:default;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SText_t56y7_gg_{margin-left:8px}.___SText_t56y7_gg_._size_m_t56y7_gg_{font-size:14px;line-height:1.42}.___SText_t56y7_gg_._size_l_t56y7_gg_{font-size:16px;line-height:1.5}.___SValue_t56y7_gg_{position:relative;flex-shrink:0;padding:0;outline:none;z-index:0;margin-top:2px}.___SValue_t56y7_gg_:before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background:#fff;border:1px solid;border-radius:50%}.___SValue_t56y7_gg_:after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0;border-radius:50%;background:#fff}.___SValue_t56y7_gg_._size_m_t56y7_gg_{width:16px;height:16px}.___SValue_t56y7_gg_._size_l_t56y7_gg_{width:20px;height:20px}.___SValue_t56y7_gg_._state_normal_t56y7_gg_:before{border-color:#c4c7cf}.___SValue_t56y7_gg_._state_invalid_t56y7_gg_:before{border-color:#ff4953}.___SControl_t56y7_gg_{position:absolute;clip:rect(1px,1px,1px,1px)}.___SControl_t56y7_gg_:checked~.___SValue_t56y7_gg_:before{border-color:#008ff8;background-color:#008ff8}.___SControl_t56y7_gg_:checked~.___SValue_t56y7_gg_._size_m_t56y7_gg_:after{width:6px;height:6px}.___SControl_t56y7_gg_:checked~.___SValue_t56y7_gg_._size_l_t56y7_gg_:after{width:8px;height:8px}.___SValue_t56y7_gg_._state_normal_t56y7_gg_.__keyboardFocused_t56y7_gg_:before{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2);border-color:#008ff8}.___SValue_t56y7_gg_._state_invalid_t56y7_gg_.__keyboardFocused_t56y7_gg_:before{box-shadow:0px 0px 0px 3px rgba(255, 73, 83, 0.2)}.___SControl_t56y7_gg_:checked~.___SValue_t56y7_gg_.__theme_t56y7_gg_:before{border-color:var(--theme_t56y7);background-color:var(--theme_t56y7)}.___SValue_t56y7_gg_._state_normal_t56y7_gg_.__theme_t56y7_gg_:before{border-color:var(--theme_t56y7)}"
|
|
35
35
|
/*__inner_css_end__*/
|
|
36
|
-
, "
|
|
36
|
+
, "t56y7_gg_")
|
|
37
37
|
/*__reshadow_css_end__*/
|
|
38
38
|
, {
|
|
39
|
-
"__SRadio": "
|
|
40
|
-
"_disabled": "
|
|
41
|
-
"__SText": "
|
|
42
|
-
"_size_m": "
|
|
43
|
-
"_size_l": "
|
|
44
|
-
"__SValue": "
|
|
45
|
-
"_state_normal": "
|
|
46
|
-
"_state_invalid": "
|
|
47
|
-
"__SControl": "
|
|
48
|
-
"_keyboardFocused": "
|
|
49
|
-
"_theme": "
|
|
50
|
-
"--theme": "--
|
|
39
|
+
"__SRadio": "___SRadio_t56y7_gg_",
|
|
40
|
+
"_disabled": "__disabled_t56y7_gg_",
|
|
41
|
+
"__SText": "___SText_t56y7_gg_",
|
|
42
|
+
"_size_m": "_size_m_t56y7_gg_",
|
|
43
|
+
"_size_l": "_size_l_t56y7_gg_",
|
|
44
|
+
"__SValue": "___SValue_t56y7_gg_",
|
|
45
|
+
"_state_normal": "_state_normal_t56y7_gg_",
|
|
46
|
+
"_state_invalid": "_state_invalid_t56y7_gg_",
|
|
47
|
+
"__SControl": "___SControl_t56y7_gg_",
|
|
48
|
+
"_keyboardFocused": "__keyboardFocused_t56y7_gg_",
|
|
49
|
+
"_theme": "__theme_t56y7_gg_",
|
|
50
|
+
"--theme": "--theme_t56y7"
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
var RadioGroupRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\nimport { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { Text } from '@semcore/typography';\n\nexport type RadioSize = 'm' | 'l';\nexport type RadioState = 'normal' | 'invalid';\nexport type RadioValue = string | number | boolean;\n\nexport interface IRadioProps extends IBoxProps {\n /**\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /**\n * Radio button size\n * @default m\n **/\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n}\n\nexport interface IRadioGroupProps {\n /** Radio group name */\n name?: string;\n /** Active default value */\n defaultValue?: RadioValue;\n /** Active value */\n value?: RadioValue;\n /** Called when the selected element is changed */\n onChange?: (value: RadioValue, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n /** Radio button size */\n size?: RadioSize;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Blocks access and changes to the form field */\n disabled?: boolean;\n}\n\nexport interface IRadioValueProps extends IBoxProps, IKeyboardFocusProps {\n /** List of elements that can be put on a hidden input */\n includeInputProps?: string[];\n /**\n * The value displaying the state of the component\n * @default normal\n */\n state?: RadioState;\n /** The theme of the radio button that you can send your color to */\n theme?: string;\n /** Radio button size */\n size?: RadioSize;\n /** The element value is required for RadioGroup */\n value?: RadioValue;\n /** Default value if `value` property is not provided */\n defaultValue?: RadioValue;\n /** Called when the value changes */\n onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n /** Blocks access and changes to the form field */\n disabled?: boolean;\n}\n\nexport interface IRadioCtx {\n getValueProps: PropGetterFn;\n getTextProps: PropGetterFn;\n}\n\ndeclare const RadioGroup: <T>(props: CProps<IRadioGroupProps & T>) => ReturnEl;\n\nexport { RadioGroup };\n\ndeclare const Radio: (<T>(props: CProps<IRadioProps & T, IRadioCtx>) => ReturnEl) & {\n Value: <T>(props: IRadioValueProps & T) => ReturnEl;\n Text: typeof Text;\n};\n\nexport default Radio;\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/radio",
|
|
3
3
|
"description": "Semrush Radio Component",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.12",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "
|
|
12
|
+
"build": "pnpm semcore-builder --source=js",
|
|
13
13
|
"test": "jest"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"directory": "semcore/radio"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
+
"@types/react": "16.8 - 17",
|
|
33
34
|
"@semcore/jest-preset-ui": "1.0.0"
|
|
34
35
|
}
|
|
35
36
|
}
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
2
|
-
import { IBoxProps } from '@semcore/flex-box';
|
|
3
|
-
import { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
4
|
-
import { Text } from '@semcore/typography';
|
|
5
|
-
|
|
6
|
-
export type RadioSize = 'm' | 'l';
|
|
7
|
-
export type RadioState = 'normal' | 'invalid';
|
|
8
|
-
export type RadioValue = string | number | boolean;
|
|
9
|
-
|
|
10
|
-
export interface IRadioProps extends IBoxProps {
|
|
11
|
-
/**
|
|
12
|
-
* The value displaying the state of the component
|
|
13
|
-
* @default normal
|
|
14
|
-
*/
|
|
15
|
-
state?: RadioState;
|
|
16
|
-
/**
|
|
17
|
-
* Radio button size
|
|
18
|
-
* @default m
|
|
19
|
-
**/
|
|
20
|
-
size?: RadioSize;
|
|
21
|
-
/** The theme of the radio button that you can send your color to */
|
|
22
|
-
theme?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface IRadioGroupProps {
|
|
26
|
-
/** Radio group name */
|
|
27
|
-
name?: string;
|
|
28
|
-
/** Active default value */
|
|
29
|
-
defaultValue?: RadioValue;
|
|
30
|
-
/** Active value */
|
|
31
|
-
value?: RadioValue;
|
|
32
|
-
/** Called when the selected element is changed */
|
|
33
|
-
onChange?: (value: RadioValue, e?: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
34
|
-
/** Radio button size */
|
|
35
|
-
size?: RadioSize;
|
|
36
|
-
/** The theme of the radio button that you can send your color to */
|
|
37
|
-
theme?: string;
|
|
38
|
-
/** Blocks access and changes to the form field */
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IRadioValueProps extends IBoxProps, IKeyboardFocusProps {
|
|
43
|
-
/** List of elements that can be put on a hidden input */
|
|
44
|
-
includeInputProps?: string[];
|
|
45
|
-
/**
|
|
46
|
-
* The value displaying the state of the component
|
|
47
|
-
* @default normal
|
|
48
|
-
*/
|
|
49
|
-
state?: RadioState;
|
|
50
|
-
/** The theme of the radio button that you can send your color to */
|
|
51
|
-
theme?: string;
|
|
52
|
-
/** Radio button size */
|
|
53
|
-
size?: RadioSize;
|
|
54
|
-
/** The element value is required for RadioGroup */
|
|
55
|
-
value?: RadioValue;
|
|
56
|
-
/** Default value if `value` property is not provided */
|
|
57
|
-
defaultValue?: RadioValue;
|
|
58
|
-
/** Called when the value changes */
|
|
59
|
-
onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
60
|
-
/** Blocks access and changes to the form field */
|
|
61
|
-
disabled?: boolean;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface IRadioCtx {
|
|
65
|
-
getValueProps: PropGetterFn;
|
|
66
|
-
getTextProps: PropGetterFn;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
declare const RadioGroup: <T>(props: CProps<IRadioGroupProps & T>) => ReturnEl;
|
|
70
|
-
|
|
71
|
-
export { RadioGroup };
|
|
72
|
-
|
|
73
|
-
declare const Radio: (<T>(props: CProps<IRadioProps & T, IRadioCtx>) => ReturnEl) & {
|
|
74
|
-
Value: <T>(props: IRadioValueProps & T) => ReturnEl;
|
|
75
|
-
Text: typeof Text;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export default Radio;
|
package/lib/es6/index.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
2
|
-
import { IBoxProps } from '@semcore/flex-box';
|
|
3
|
-
import { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
4
|
-
import { Text } from '@semcore/typography';
|
|
5
|
-
|
|
6
|
-
export type RadioSize = 'm' | 'l';
|
|
7
|
-
export type RadioState = 'normal' | 'invalid';
|
|
8
|
-
export type RadioValue = string | number | boolean;
|
|
9
|
-
|
|
10
|
-
export interface IRadioProps extends IBoxProps {
|
|
11
|
-
/**
|
|
12
|
-
* The value displaying the state of the component
|
|
13
|
-
* @default normal
|
|
14
|
-
*/
|
|
15
|
-
state?: RadioState;
|
|
16
|
-
/**
|
|
17
|
-
* Radio button size
|
|
18
|
-
* @default m
|
|
19
|
-
**/
|
|
20
|
-
size?: RadioSize;
|
|
21
|
-
/** The theme of the radio button that you can send your color to */
|
|
22
|
-
theme?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface IRadioGroupProps {
|
|
26
|
-
/** Radio group name */
|
|
27
|
-
name?: string;
|
|
28
|
-
/** Active default value */
|
|
29
|
-
defaultValue?: RadioValue;
|
|
30
|
-
/** Active value */
|
|
31
|
-
value?: RadioValue;
|
|
32
|
-
/** Called when the selected element is changed */
|
|
33
|
-
onChange?: (value: RadioValue, e?: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
34
|
-
/** Radio button size */
|
|
35
|
-
size?: RadioSize;
|
|
36
|
-
/** The theme of the radio button that you can send your color to */
|
|
37
|
-
theme?: string;
|
|
38
|
-
/** Blocks access and changes to the form field */
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IRadioValueProps extends IBoxProps, IKeyboardFocusProps {
|
|
43
|
-
/** List of elements that can be put on a hidden input */
|
|
44
|
-
includeInputProps?: string[];
|
|
45
|
-
/**
|
|
46
|
-
* The value displaying the state of the component
|
|
47
|
-
* @default normal
|
|
48
|
-
*/
|
|
49
|
-
state?: RadioState;
|
|
50
|
-
/** The theme of the radio button that you can send your color to */
|
|
51
|
-
theme?: string;
|
|
52
|
-
/** Radio button size */
|
|
53
|
-
size?: RadioSize;
|
|
54
|
-
/** The element value is required for RadioGroup */
|
|
55
|
-
value?: RadioValue;
|
|
56
|
-
/** Default value if `value` property is not provided */
|
|
57
|
-
defaultValue?: RadioValue;
|
|
58
|
-
/** Called when the value changes */
|
|
59
|
-
onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
60
|
-
/** Blocks access and changes to the form field */
|
|
61
|
-
disabled?: boolean;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface IRadioCtx {
|
|
65
|
-
getValueProps: PropGetterFn;
|
|
66
|
-
getTextProps: PropGetterFn;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
declare const RadioGroup: <T>(props: CProps<IRadioGroupProps & T>) => ReturnEl;
|
|
70
|
-
|
|
71
|
-
export { RadioGroup };
|
|
72
|
-
|
|
73
|
-
declare const Radio: (<T>(props: CProps<IRadioProps & T, IRadioCtx>) => ReturnEl) & {
|
|
74
|
-
Value: <T>(props: IRadioValueProps & T) => ReturnEl;
|
|
75
|
-
Text: typeof Text;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export default Radio;
|