@semcore/radio 6.9.2 → 6.10.0
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 +10 -1
- package/lib/cjs/Radio.js +245 -106
- package/lib/cjs/Radio.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/style/radio.shadow.css +7 -7
- package/lib/es6/Radio.js +246 -105
- package/lib/es6/Radio.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/style/radio.shadow.css +7 -7
- package/lib/types/index.d.ts +43 -8
- package/package.json +5 -5
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
|
|
3
|
-
import { BoxProps, Flex } from '@semcore/flex-box';
|
|
3
|
+
import { Box, BoxProps, Flex } from '@semcore/flex-box';
|
|
4
4
|
import { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
5
5
|
import { Text } from '@semcore/typography';
|
|
6
6
|
|
|
@@ -11,6 +11,12 @@ export type RadioValue = string | number | boolean;
|
|
|
11
11
|
/** @deprecated */
|
|
12
12
|
export interface IRadioProps extends RadioProps, UnknownProperties {}
|
|
13
13
|
export type RadioProps = BoxProps & {
|
|
14
|
+
/** Radio item value **/
|
|
15
|
+
value?: string;
|
|
16
|
+
|
|
17
|
+
/** Radio item checked flag **/
|
|
18
|
+
checked?: boolean;
|
|
19
|
+
|
|
14
20
|
/**
|
|
15
21
|
* The value displaying the state of the component
|
|
16
22
|
* @default normal
|
|
@@ -23,6 +29,10 @@ export type RadioProps = BoxProps & {
|
|
|
23
29
|
size?: RadioSize;
|
|
24
30
|
/** The theme of the radio button that you can send your color to */
|
|
25
31
|
theme?: string;
|
|
32
|
+
/** Radio item text **/
|
|
33
|
+
label?: string;
|
|
34
|
+
/** Blocks access and changes to the radio item **/
|
|
35
|
+
disabled?: boolean;
|
|
26
36
|
};
|
|
27
37
|
|
|
28
38
|
/** @deprecated */
|
|
@@ -58,21 +68,40 @@ export type RadioValueProps = BoxProps &
|
|
|
58
68
|
/** List of elements that can be put on a hidden input */
|
|
59
69
|
includeInputProps?: string[];
|
|
60
70
|
/**
|
|
71
|
+
* @deprecated set `state` on root Radio instead
|
|
61
72
|
* The value displaying the state of the component
|
|
62
73
|
* @default normal
|
|
63
74
|
*/
|
|
64
75
|
state?: RadioState;
|
|
65
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated
|
|
78
|
+
* The theme of the radio button that you can send your color to
|
|
79
|
+
*/
|
|
66
80
|
theme?: string;
|
|
67
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated set `size` on root RadioGroup instead
|
|
83
|
+
* Radio button size
|
|
84
|
+
*/
|
|
68
85
|
size?: RadioSize;
|
|
69
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated set `value` on root Radio instead
|
|
88
|
+
* The element value is required for RadioGroup
|
|
89
|
+
*/
|
|
70
90
|
value?: RadioValue;
|
|
71
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated set `defaultValue` on root RadioGroup instead
|
|
93
|
+
* Default value if `value` property is not provided
|
|
94
|
+
*/
|
|
72
95
|
defaultValue?: RadioValue;
|
|
73
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated set `onChange` on root RadioGroup instead
|
|
98
|
+
* Called when the value changes
|
|
99
|
+
*/
|
|
74
100
|
onChange?: (value: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
75
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated set `disabled` on root Radio instead
|
|
103
|
+
* Blocks access and changes to the form field
|
|
104
|
+
*/
|
|
76
105
|
disabled?: boolean;
|
|
77
106
|
};
|
|
78
107
|
|
|
@@ -91,12 +120,18 @@ type IntergalacticRadioGroupComponent = (<
|
|
|
91
120
|
) => Intergalactic.InternalTypings.ComponentRenderingResults) &
|
|
92
121
|
Intergalactic.InternalTypings.ComponentAdditive<'div'>;
|
|
93
122
|
|
|
123
|
+
export type RadioValueControlProps = {};
|
|
124
|
+
export type RadioValueMarkProps = {};
|
|
125
|
+
|
|
94
126
|
declare const RadioGroup: IntergalacticRadioGroupComponent;
|
|
95
127
|
|
|
96
128
|
export { RadioGroup };
|
|
97
129
|
|
|
98
130
|
declare const Radio: Intergalactic.Component<'label', RadioProps, RadioCtx> & {
|
|
99
|
-
Value: Intergalactic.Component<'input', RadioValueProps
|
|
131
|
+
Value: Intergalactic.Component<'input', RadioValueProps> & {
|
|
132
|
+
Control: Intergalactic.Component<'input', RadioValueControlProps>;
|
|
133
|
+
RadioMark: Intergalactic.Component<typeof Box, RadioValueMarkProps>;
|
|
134
|
+
};
|
|
100
135
|
Text: typeof Text;
|
|
101
136
|
};
|
|
102
137
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/radio",
|
|
3
3
|
"description": "Semrush Radio Component",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.10.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/utils": "4.
|
|
13
|
-
"@semcore/flex-box": "5.7.
|
|
14
|
-
"@semcore/typography": "5.11.
|
|
12
|
+
"@semcore/utils": "4.8.0",
|
|
13
|
+
"@semcore/flex-box": "5.7.3",
|
|
14
|
+
"@semcore/typography": "5.11.3"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@semcore/core": "^2.7.
|
|
17
|
+
"@semcore/core": "^2.7.3",
|
|
18
18
|
"react": "16.8 - 18",
|
|
19
19
|
"react-dom": "16.8 - 18"
|
|
20
20
|
},
|