@cloudflare/component-radio 3.2.92 → 3.3.2
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 +47 -0
- package/dist/Radio.d.ts +79 -0
- package/dist/RadioGroup.d.ts +74 -0
- package/dist/index.d.ts +3 -0
- package/es/Radio.js +66 -82
- package/es/RadioGroup.js +27 -28
- package/lib/Radio.js +73 -117
- package/lib/RadioGroup.js +24 -62
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,53 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.3.2](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-radio@3.3.1...@cloudflare/component-radio@3.3.2) (2022-01-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **component-radio:** UI-5035: yarn test -u ([e3e444a](http://stash.cfops.it:7999/fe/stratus/commits/e3e444a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [3.3.1](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-radio@3.3.0...@cloudflare/component-radio@3.3.1) (2022-01-14)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **component-radio:** UI-5035: wrap <Radio /> in div element ([0d075aa](http://stash.cfops.it:7999/fe/stratus/commits/0d075aa))
|
|
23
|
+
* **component-radio:** UI-5035: yarn test -u ([64225c2](http://stash.cfops.it:7999/fe/stratus/commits/64225c2))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# [3.3.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-radio@3.2.93...@cloudflare/component-radio@3.3.0) (2022-01-07)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **component-radio:** A11Y-584 More permission typing ([6631e07](http://stash.cfops.it:7999/fe/stratus/commits/6631e07))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* **component-radio:** A11Y-584 Update styling, add invalid prop, typesc ([2ac84e7](http://stash.cfops.it:7999/fe/stratus/commits/2ac84e7))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## [3.2.93](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-radio@3.2.92...@cloudflare/component-radio@3.2.93) (2021-12-28)
|
|
46
|
+
|
|
47
|
+
**Note:** Version bump only for package @cloudflare/component-radio
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
6
53
|
## [3.2.92](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-radio@3.2.90...@cloudflare/component-radio@3.2.92) (2021-12-21)
|
|
7
54
|
|
|
8
55
|
**Note:** Version bump only for package @cloudflare/component-radio
|
package/dist/Radio.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: React.ComponentType<{
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
name?: string | undefined;
|
|
6
|
+
value?: any;
|
|
7
|
+
checked?: boolean | undefined;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
testId?: string | undefined;
|
|
10
|
+
onChange?: ((value: any) => void) | undefined;
|
|
11
|
+
invalid?: boolean | undefined;
|
|
12
|
+
noLabel?: boolean | undefined;
|
|
13
|
+
p?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
14
|
+
color?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
15
|
+
height?: import("csstype").HeightProperty<string | number> | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | undefined;
|
|
16
|
+
width?: import("csstype").WidthProperty<string | number> | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | undefined;
|
|
17
|
+
cursor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
18
|
+
display?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
19
|
+
fontSize?: import("csstype").FontSizeProperty<string | number> | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | undefined;
|
|
20
|
+
fontWeight?: import("csstype").FontWeightProperty | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | undefined;
|
|
21
|
+
textDecoration?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
22
|
+
textAlign?: import("csstype").TextAlignProperty | [import("csstype").TextAlignProperty | undefined, import("csstype").TextAlignProperty | undefined] | [import("csstype").TextAlignProperty | undefined, import("csstype").TextAlignProperty | undefined, import("csstype").TextAlignProperty | undefined] | undefined;
|
|
23
|
+
backgroundColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
24
|
+
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
25
|
+
borderLeftColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
26
|
+
borderRightColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
27
|
+
borderTopColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
28
|
+
borderBottomColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
29
|
+
minWidth?: import("csstype").MinWidthProperty<string | number> | [import("csstype").MinWidthProperty<string | number> | undefined, import("csstype").MinWidthProperty<string | number> | undefined] | [import("csstype").MinWidthProperty<string | number> | undefined, import("csstype").MinWidthProperty<string | number> | undefined, import("csstype").MinWidthProperty<string | number> | undefined] | undefined;
|
|
30
|
+
minHeight?: import("csstype").MinHeightProperty<string | number> | [import("csstype").MinHeightProperty<string | number> | undefined, import("csstype").MinHeightProperty<string | number> | undefined] | [import("csstype").MinHeightProperty<string | number> | undefined, import("csstype").MinHeightProperty<string | number> | undefined, import("csstype").MinHeightProperty<string | number> | undefined] | undefined;
|
|
31
|
+
maxWidth?: import("csstype").MaxWidthProperty<string | number> | [import("csstype").MaxWidthProperty<string | number> | undefined, import("csstype").MaxWidthProperty<string | number> | undefined] | [import("csstype").MaxWidthProperty<string | number> | undefined, import("csstype").MaxWidthProperty<string | number> | undefined, import("csstype").MaxWidthProperty<string | number> | undefined] | undefined;
|
|
32
|
+
maxHeight?: import("csstype").MaxHeightProperty<string | number> | [import("csstype").MaxHeightProperty<string | number> | undefined, import("csstype").MaxHeightProperty<string | number> | undefined] | [import("csstype").MaxHeightProperty<string | number> | undefined, import("csstype").MaxHeightProperty<string | number> | undefined, import("csstype").MaxHeightProperty<string | number> | undefined] | undefined;
|
|
33
|
+
margin?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
34
|
+
marginTop?: import("csstype").MarginTopProperty<string | number> | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | undefined;
|
|
35
|
+
marginRight?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
36
|
+
marginLeft?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
37
|
+
padding?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
38
|
+
paddingTop?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
39
|
+
paddingRight?: import("csstype").PaddingRightProperty<string | number> | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | undefined;
|
|
40
|
+
paddingLeft?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
41
|
+
borderRadius?: import("csstype").BorderRadiusProperty<string | number> | [import("csstype").BorderRadiusProperty<string | number> | undefined, import("csstype").BorderRadiusProperty<string | number> | undefined] | [import("csstype").BorderRadiusProperty<string | number> | undefined, import("csstype").BorderRadiusProperty<string | number> | undefined, import("csstype").BorderRadiusProperty<string | number> | undefined] | undefined;
|
|
42
|
+
verticalAlign?: import("csstype").VerticalAlignProperty<string | number> | [import("csstype").VerticalAlignProperty<string | number> | undefined, import("csstype").VerticalAlignProperty<string | number> | undefined] | [import("csstype").VerticalAlignProperty<string | number> | undefined, import("csstype").VerticalAlignProperty<string | number> | undefined, import("csstype").VerticalAlignProperty<string | number> | undefined] | undefined;
|
|
43
|
+
alignItems?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
44
|
+
alignSelf?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
45
|
+
borderBottomLeftRadius?: import("csstype").BorderBottomLeftRadiusProperty<string | number> | [import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined, import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined] | [import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined, import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined, import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined] | undefined;
|
|
46
|
+
borderBottomStyle?: import("csstype").BorderBottomStyleProperty | [import("csstype").BorderBottomStyleProperty | undefined, import("csstype").BorderBottomStyleProperty | undefined] | [import("csstype").BorderBottomStyleProperty | undefined, import("csstype").BorderBottomStyleProperty | undefined, import("csstype").BorderBottomStyleProperty | undefined] | undefined;
|
|
47
|
+
borderBottomWidth?: import("csstype").BorderBottomWidthProperty<string | number> | [import("csstype").BorderBottomWidthProperty<string | number> | undefined, import("csstype").BorderBottomWidthProperty<string | number> | undefined] | [import("csstype").BorderBottomWidthProperty<string | number> | undefined, import("csstype").BorderBottomWidthProperty<string | number> | undefined, import("csstype").BorderBottomWidthProperty<string | number> | undefined] | undefined;
|
|
48
|
+
borderLeftStyle?: import("csstype").BorderLeftStyleProperty | [import("csstype").BorderLeftStyleProperty | undefined, import("csstype").BorderLeftStyleProperty | undefined] | [import("csstype").BorderLeftStyleProperty | undefined, import("csstype").BorderLeftStyleProperty | undefined, import("csstype").BorderLeftStyleProperty | undefined] | undefined;
|
|
49
|
+
borderLeftWidth?: import("csstype").BorderLeftWidthProperty<string | number> | [import("csstype").BorderLeftWidthProperty<string | number> | undefined, import("csstype").BorderLeftWidthProperty<string | number> | undefined] | [import("csstype").BorderLeftWidthProperty<string | number> | undefined, import("csstype").BorderLeftWidthProperty<string | number> | undefined, import("csstype").BorderLeftWidthProperty<string | number> | undefined] | undefined;
|
|
50
|
+
borderRightStyle?: import("csstype").BorderRightStyleProperty | [import("csstype").BorderRightStyleProperty | undefined, import("csstype").BorderRightStyleProperty | undefined] | [import("csstype").BorderRightStyleProperty | undefined, import("csstype").BorderRightStyleProperty | undefined, import("csstype").BorderRightStyleProperty | undefined] | undefined;
|
|
51
|
+
borderRightWidth?: import("csstype").BorderRightWidthProperty<string | number> | [import("csstype").BorderRightWidthProperty<string | number> | undefined, import("csstype").BorderRightWidthProperty<string | number> | undefined] | [import("csstype").BorderRightWidthProperty<string | number> | undefined, import("csstype").BorderRightWidthProperty<string | number> | undefined, import("csstype").BorderRightWidthProperty<string | number> | undefined] | undefined;
|
|
52
|
+
borderTopLeftRadius?: import("csstype").BorderTopLeftRadiusProperty<string | number> | [import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined, import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined] | [import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined, import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined, import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined] | undefined;
|
|
53
|
+
borderTopRightRadius?: import("csstype").BorderTopRightRadiusProperty<string | number> | [import("csstype").BorderTopRightRadiusProperty<string | number> | undefined, import("csstype").BorderTopRightRadiusProperty<string | number> | undefined] | [import("csstype").BorderTopRightRadiusProperty<string | number> | undefined, import("csstype").BorderTopRightRadiusProperty<string | number> | undefined, import("csstype").BorderTopRightRadiusProperty<string | number> | undefined] | undefined;
|
|
54
|
+
borderTopStyle?: import("csstype").BorderTopStyleProperty | [import("csstype").BorderTopStyleProperty | undefined, import("csstype").BorderTopStyleProperty | undefined] | [import("csstype").BorderTopStyleProperty | undefined, import("csstype").BorderTopStyleProperty | undefined, import("csstype").BorderTopStyleProperty | undefined] | undefined;
|
|
55
|
+
borderTopWidth?: import("csstype").BorderTopWidthProperty<string | number> | [import("csstype").BorderTopWidthProperty<string | number> | undefined, import("csstype").BorderTopWidthProperty<string | number> | undefined] | [import("csstype").BorderTopWidthProperty<string | number> | undefined, import("csstype").BorderTopWidthProperty<string | number> | undefined, import("csstype").BorderTopWidthProperty<string | number> | undefined] | undefined;
|
|
56
|
+
boxSizing?: import("csstype").BoxSizingProperty | [import("csstype").BoxSizingProperty | undefined, import("csstype").BoxSizingProperty | undefined] | [import("csstype").BoxSizingProperty | undefined, import("csstype").BoxSizingProperty | undefined, import("csstype").BoxSizingProperty | undefined] | undefined;
|
|
57
|
+
justifyContent?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
58
|
+
marginBottom?: import("csstype").MarginBottomProperty<string | number> | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | undefined;
|
|
59
|
+
paddingBottom?: import("csstype").PaddingBottomProperty<string | number> | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | undefined;
|
|
60
|
+
textTransform?: import("csstype").TextTransformProperty | [import("csstype").TextTransformProperty | undefined, import("csstype").TextTransformProperty | undefined] | [import("csstype").TextTransformProperty | undefined, import("csstype").TextTransformProperty | undefined, import("csstype").TextTransformProperty | undefined] | undefined;
|
|
61
|
+
borderStyle?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
62
|
+
borderWidth?: import("csstype").BorderWidthProperty<string | number> | [import("csstype").BorderWidthProperty<string | number> | undefined, import("csstype").BorderWidthProperty<string | number> | undefined] | [import("csstype").BorderWidthProperty<string | number> | undefined, import("csstype").BorderWidthProperty<string | number> | undefined, import("csstype").BorderWidthProperty<string | number> | undefined] | undefined;
|
|
63
|
+
m?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
64
|
+
ml?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
65
|
+
mr?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
66
|
+
mt?: import("csstype").MarginTopProperty<string | number> | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | undefined;
|
|
67
|
+
mb?: import("csstype").MarginBottomProperty<string | number> | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | undefined;
|
|
68
|
+
mx?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
69
|
+
my?: import("csstype").MarginTopProperty<string | number> | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | undefined;
|
|
70
|
+
pl?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
71
|
+
pr?: import("csstype").PaddingRightProperty<string | number> | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | undefined;
|
|
72
|
+
pt?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
73
|
+
pb?: import("csstype").PaddingBottomProperty<string | number> | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | undefined;
|
|
74
|
+
px?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
75
|
+
py?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
76
|
+
borderbottomRightRadius?: ([never, never] | [never, never, never]) | undefined;
|
|
77
|
+
innerRef?: React.Ref<never> | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
export default _default;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: React.ComponentType<{
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
value: any;
|
|
6
|
+
onChange: (value: any) => void;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
p?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
9
|
+
color?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
10
|
+
height?: import("csstype").HeightProperty<string | number> | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | undefined;
|
|
11
|
+
width?: import("csstype").WidthProperty<string | number> | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | undefined;
|
|
12
|
+
cursor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
13
|
+
display?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
14
|
+
fontSize?: import("csstype").FontSizeProperty<string | number> | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | undefined;
|
|
15
|
+
fontWeight?: import("csstype").FontWeightProperty | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | undefined;
|
|
16
|
+
textDecoration?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
17
|
+
textAlign?: import("csstype").TextAlignProperty | [import("csstype").TextAlignProperty | undefined, import("csstype").TextAlignProperty | undefined] | [import("csstype").TextAlignProperty | undefined, import("csstype").TextAlignProperty | undefined, import("csstype").TextAlignProperty | undefined] | undefined;
|
|
18
|
+
backgroundColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
19
|
+
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
20
|
+
borderLeftColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
21
|
+
borderRightColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
22
|
+
borderTopColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
23
|
+
borderBottomColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
24
|
+
minWidth?: import("csstype").MinWidthProperty<string | number> | [import("csstype").MinWidthProperty<string | number> | undefined, import("csstype").MinWidthProperty<string | number> | undefined] | [import("csstype").MinWidthProperty<string | number> | undefined, import("csstype").MinWidthProperty<string | number> | undefined, import("csstype").MinWidthProperty<string | number> | undefined] | undefined;
|
|
25
|
+
minHeight?: import("csstype").MinHeightProperty<string | number> | [import("csstype").MinHeightProperty<string | number> | undefined, import("csstype").MinHeightProperty<string | number> | undefined] | [import("csstype").MinHeightProperty<string | number> | undefined, import("csstype").MinHeightProperty<string | number> | undefined, import("csstype").MinHeightProperty<string | number> | undefined] | undefined;
|
|
26
|
+
maxWidth?: import("csstype").MaxWidthProperty<string | number> | [import("csstype").MaxWidthProperty<string | number> | undefined, import("csstype").MaxWidthProperty<string | number> | undefined] | [import("csstype").MaxWidthProperty<string | number> | undefined, import("csstype").MaxWidthProperty<string | number> | undefined, import("csstype").MaxWidthProperty<string | number> | undefined] | undefined;
|
|
27
|
+
maxHeight?: import("csstype").MaxHeightProperty<string | number> | [import("csstype").MaxHeightProperty<string | number> | undefined, import("csstype").MaxHeightProperty<string | number> | undefined] | [import("csstype").MaxHeightProperty<string | number> | undefined, import("csstype").MaxHeightProperty<string | number> | undefined, import("csstype").MaxHeightProperty<string | number> | undefined] | undefined;
|
|
28
|
+
margin?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
29
|
+
marginTop?: import("csstype").MarginTopProperty<string | number> | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | undefined;
|
|
30
|
+
marginRight?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
31
|
+
marginLeft?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
32
|
+
padding?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
33
|
+
paddingTop?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
34
|
+
paddingRight?: import("csstype").PaddingRightProperty<string | number> | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | undefined;
|
|
35
|
+
paddingLeft?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
36
|
+
borderRadius?: import("csstype").BorderRadiusProperty<string | number> | [import("csstype").BorderRadiusProperty<string | number> | undefined, import("csstype").BorderRadiusProperty<string | number> | undefined] | [import("csstype").BorderRadiusProperty<string | number> | undefined, import("csstype").BorderRadiusProperty<string | number> | undefined, import("csstype").BorderRadiusProperty<string | number> | undefined] | undefined;
|
|
37
|
+
verticalAlign?: import("csstype").VerticalAlignProperty<string | number> | [import("csstype").VerticalAlignProperty<string | number> | undefined, import("csstype").VerticalAlignProperty<string | number> | undefined] | [import("csstype").VerticalAlignProperty<string | number> | undefined, import("csstype").VerticalAlignProperty<string | number> | undefined, import("csstype").VerticalAlignProperty<string | number> | undefined] | undefined;
|
|
38
|
+
alignItems?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
39
|
+
alignSelf?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
40
|
+
borderBottomLeftRadius?: import("csstype").BorderBottomLeftRadiusProperty<string | number> | [import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined, import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined] | [import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined, import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined, import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined] | undefined;
|
|
41
|
+
borderBottomStyle?: import("csstype").BorderBottomStyleProperty | [import("csstype").BorderBottomStyleProperty | undefined, import("csstype").BorderBottomStyleProperty | undefined] | [import("csstype").BorderBottomStyleProperty | undefined, import("csstype").BorderBottomStyleProperty | undefined, import("csstype").BorderBottomStyleProperty | undefined] | undefined;
|
|
42
|
+
borderBottomWidth?: import("csstype").BorderBottomWidthProperty<string | number> | [import("csstype").BorderBottomWidthProperty<string | number> | undefined, import("csstype").BorderBottomWidthProperty<string | number> | undefined] | [import("csstype").BorderBottomWidthProperty<string | number> | undefined, import("csstype").BorderBottomWidthProperty<string | number> | undefined, import("csstype").BorderBottomWidthProperty<string | number> | undefined] | undefined;
|
|
43
|
+
borderLeftStyle?: import("csstype").BorderLeftStyleProperty | [import("csstype").BorderLeftStyleProperty | undefined, import("csstype").BorderLeftStyleProperty | undefined] | [import("csstype").BorderLeftStyleProperty | undefined, import("csstype").BorderLeftStyleProperty | undefined, import("csstype").BorderLeftStyleProperty | undefined] | undefined;
|
|
44
|
+
borderLeftWidth?: import("csstype").BorderLeftWidthProperty<string | number> | [import("csstype").BorderLeftWidthProperty<string | number> | undefined, import("csstype").BorderLeftWidthProperty<string | number> | undefined] | [import("csstype").BorderLeftWidthProperty<string | number> | undefined, import("csstype").BorderLeftWidthProperty<string | number> | undefined, import("csstype").BorderLeftWidthProperty<string | number> | undefined] | undefined;
|
|
45
|
+
borderRightStyle?: import("csstype").BorderRightStyleProperty | [import("csstype").BorderRightStyleProperty | undefined, import("csstype").BorderRightStyleProperty | undefined] | [import("csstype").BorderRightStyleProperty | undefined, import("csstype").BorderRightStyleProperty | undefined, import("csstype").BorderRightStyleProperty | undefined] | undefined;
|
|
46
|
+
borderRightWidth?: import("csstype").BorderRightWidthProperty<string | number> | [import("csstype").BorderRightWidthProperty<string | number> | undefined, import("csstype").BorderRightWidthProperty<string | number> | undefined] | [import("csstype").BorderRightWidthProperty<string | number> | undefined, import("csstype").BorderRightWidthProperty<string | number> | undefined, import("csstype").BorderRightWidthProperty<string | number> | undefined] | undefined;
|
|
47
|
+
borderTopLeftRadius?: import("csstype").BorderTopLeftRadiusProperty<string | number> | [import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined, import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined] | [import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined, import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined, import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined] | undefined;
|
|
48
|
+
borderTopRightRadius?: import("csstype").BorderTopRightRadiusProperty<string | number> | [import("csstype").BorderTopRightRadiusProperty<string | number> | undefined, import("csstype").BorderTopRightRadiusProperty<string | number> | undefined] | [import("csstype").BorderTopRightRadiusProperty<string | number> | undefined, import("csstype").BorderTopRightRadiusProperty<string | number> | undefined, import("csstype").BorderTopRightRadiusProperty<string | number> | undefined] | undefined;
|
|
49
|
+
borderTopStyle?: import("csstype").BorderTopStyleProperty | [import("csstype").BorderTopStyleProperty | undefined, import("csstype").BorderTopStyleProperty | undefined] | [import("csstype").BorderTopStyleProperty | undefined, import("csstype").BorderTopStyleProperty | undefined, import("csstype").BorderTopStyleProperty | undefined] | undefined;
|
|
50
|
+
borderTopWidth?: import("csstype").BorderTopWidthProperty<string | number> | [import("csstype").BorderTopWidthProperty<string | number> | undefined, import("csstype").BorderTopWidthProperty<string | number> | undefined] | [import("csstype").BorderTopWidthProperty<string | number> | undefined, import("csstype").BorderTopWidthProperty<string | number> | undefined, import("csstype").BorderTopWidthProperty<string | number> | undefined] | undefined;
|
|
51
|
+
boxSizing?: import("csstype").BoxSizingProperty | [import("csstype").BoxSizingProperty | undefined, import("csstype").BoxSizingProperty | undefined] | [import("csstype").BoxSizingProperty | undefined, import("csstype").BoxSizingProperty | undefined, import("csstype").BoxSizingProperty | undefined] | undefined;
|
|
52
|
+
justifyContent?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
53
|
+
marginBottom?: import("csstype").MarginBottomProperty<string | number> | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | undefined;
|
|
54
|
+
paddingBottom?: import("csstype").PaddingBottomProperty<string | number> | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | undefined;
|
|
55
|
+
textTransform?: import("csstype").TextTransformProperty | [import("csstype").TextTransformProperty | undefined, import("csstype").TextTransformProperty | undefined] | [import("csstype").TextTransformProperty | undefined, import("csstype").TextTransformProperty | undefined, import("csstype").TextTransformProperty | undefined] | undefined;
|
|
56
|
+
borderStyle?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
57
|
+
borderWidth?: import("csstype").BorderWidthProperty<string | number> | [import("csstype").BorderWidthProperty<string | number> | undefined, import("csstype").BorderWidthProperty<string | number> | undefined] | [import("csstype").BorderWidthProperty<string | number> | undefined, import("csstype").BorderWidthProperty<string | number> | undefined, import("csstype").BorderWidthProperty<string | number> | undefined] | undefined;
|
|
58
|
+
m?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
59
|
+
ml?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
60
|
+
mr?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
61
|
+
mt?: import("csstype").MarginTopProperty<string | number> | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | undefined;
|
|
62
|
+
mb?: import("csstype").MarginBottomProperty<string | number> | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | undefined;
|
|
63
|
+
mx?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
64
|
+
my?: import("csstype").MarginTopProperty<string | number> | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | undefined;
|
|
65
|
+
pl?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
66
|
+
pr?: import("csstype").PaddingRightProperty<string | number> | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | undefined;
|
|
67
|
+
pt?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
68
|
+
pb?: import("csstype").PaddingBottomProperty<string | number> | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | undefined;
|
|
69
|
+
px?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
70
|
+
py?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
71
|
+
borderbottomRightRadius?: ([never, never] | [never, never, never]) | undefined;
|
|
72
|
+
innerRef?: React.Ref<never> | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
export default _default;
|
package/dist/index.d.ts
ADDED
package/es/Radio.js
CHANGED
|
@@ -1,37 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { createComponent, createStyledComponent } from '@cloudflare/style-container';
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
display: 'block',
|
|
11
|
-
margin: 'initial',
|
|
12
|
-
padding: 0,
|
|
13
|
-
'&:first-child': {
|
|
14
|
-
marginTop: 'initial'
|
|
15
|
-
},
|
|
16
|
-
'&:hover input': disabled ? undefined : {
|
|
17
|
-
borderColor: theme.colors.blue[1]
|
|
18
|
-
}
|
|
19
|
-
});
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
20
8
|
|
|
9
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { createComponent, createStyledComponent } from '@cloudflare/style-container';
|
|
21
13
|
const Input = createComponent(({
|
|
22
14
|
theme,
|
|
23
15
|
checked,
|
|
24
|
-
disabled
|
|
25
|
-
|
|
16
|
+
disabled,
|
|
17
|
+
invalid
|
|
18
|
+
}) => _objectSpread({
|
|
26
19
|
zIndex: 0,
|
|
27
|
-
border: `1px solid ${theme.colors.gray[5]}`,
|
|
28
20
|
verticalAlign: 'middle',
|
|
29
|
-
fontFamily: 'Open Sans,Helvetica,Arial,sans-serif',
|
|
30
|
-
fontSize: theme.fontSizes[2],
|
|
31
|
-
background: theme.colors.white,
|
|
32
|
-
color: theme.colors.gray[1],
|
|
33
|
-
outline: 'none',
|
|
34
|
-
transition: 'border-color 0.2s ease',
|
|
35
21
|
position: 'relative',
|
|
36
22
|
height: 16,
|
|
37
23
|
width: 16,
|
|
@@ -39,17 +25,15 @@ const Input = createComponent(({
|
|
|
39
25
|
padding: 0,
|
|
40
26
|
lineHeight: 'normal',
|
|
41
27
|
appearance: 'none',
|
|
42
|
-
top: -1
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
outlineOffset: -1
|
|
52
|
-
},
|
|
28
|
+
top: -1
|
|
29
|
+
}, theme.mixins.focus({
|
|
30
|
+
invalid,
|
|
31
|
+
border: true
|
|
32
|
+
}), theme.mixins.input({
|
|
33
|
+
invalid,
|
|
34
|
+
disabled,
|
|
35
|
+
radius: '50%'
|
|
36
|
+
}), {
|
|
53
37
|
'&::before': {
|
|
54
38
|
content: "''",
|
|
55
39
|
position: 'absolute',
|
|
@@ -58,10 +42,12 @@ const Input = createComponent(({
|
|
|
58
42
|
'-webkit-text-stroke': 0,
|
|
59
43
|
transition: 'all 0.2s ease-out',
|
|
60
44
|
borderRadius: '50%',
|
|
45
|
+
top: '50%',
|
|
46
|
+
left: '50%',
|
|
61
47
|
height: checked ? 8 : 4,
|
|
62
48
|
width: checked ? 8 : 4,
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
marginLeft: checked ? '-4px' : '-2px',
|
|
50
|
+
marginTop: checked ? '-4px' : '-2px'
|
|
65
51
|
}
|
|
66
52
|
}), 'input');
|
|
67
53
|
const Label = createComponent(({
|
|
@@ -75,48 +61,46 @@ const Label = createComponent(({
|
|
|
75
61
|
opacity: disabled ? 0.4 : undefined
|
|
76
62
|
}), 'span');
|
|
77
63
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
render() {
|
|
89
|
-
return /*#__PURE__*/React.createElement("label", {
|
|
90
|
-
htmlFor: this.props.name,
|
|
91
|
-
className: this.props.className
|
|
92
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
93
|
-
type: "radio",
|
|
94
|
-
id: this.props.name,
|
|
95
|
-
"data-testid": this.props.testId,
|
|
96
|
-
name: this.props.name,
|
|
97
|
-
value: this.props.value,
|
|
98
|
-
checked: this.props.checked,
|
|
99
|
-
disabled: this.props.disabled,
|
|
100
|
-
onChange: this.handleChange
|
|
101
|
-
}), this.props.label && /*#__PURE__*/React.createElement(Label, {
|
|
102
|
-
disabled: this.props.disabled
|
|
103
|
-
}, this.props.label));
|
|
104
|
-
}
|
|
64
|
+
function Radio(_ref) {
|
|
65
|
+
let label = _ref.label,
|
|
66
|
+
name = _ref.name,
|
|
67
|
+
testId = _ref.testId,
|
|
68
|
+
onChange = _ref.onChange,
|
|
69
|
+
className = _ref.className,
|
|
70
|
+
noLabel = _ref.noLabel,
|
|
71
|
+
_ref$disabled = _ref.disabled,
|
|
72
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
73
|
+
rest = _objectWithoutProperties(_ref, ["label", "name", "testId", "onChange", "className", "noLabel", "disabled"]);
|
|
105
74
|
|
|
75
|
+
const input = /*#__PURE__*/React.createElement(Input, _extends({
|
|
76
|
+
type: "radio",
|
|
77
|
+
id: name,
|
|
78
|
+
name: name,
|
|
79
|
+
"data-testid": testId,
|
|
80
|
+
onChange: onChange && (e => onChange(e.target.value)),
|
|
81
|
+
className: noLabel ? className : undefined,
|
|
82
|
+
disabled: disabled
|
|
83
|
+
}, rest));
|
|
84
|
+
return noLabel ? input : /*#__PURE__*/React.createElement("label", {
|
|
85
|
+
htmlFor: name,
|
|
86
|
+
className: className
|
|
87
|
+
}, input, label && /*#__PURE__*/React.createElement(Label, {
|
|
88
|
+
disabled: disabled
|
|
89
|
+
}, label));
|
|
106
90
|
}
|
|
107
91
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
disabled:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
92
|
+
export default createStyledComponent(({
|
|
93
|
+
theme,
|
|
94
|
+
disabled
|
|
95
|
+
}) => ({
|
|
96
|
+
cursor: disabled ? 'default' : 'pointer',
|
|
97
|
+
display: 'block',
|
|
98
|
+
margin: 'initial',
|
|
99
|
+
padding: 0,
|
|
100
|
+
'&:first-child': {
|
|
101
|
+
marginTop: 'initial'
|
|
102
|
+
},
|
|
103
|
+
'&:hover input': disabled ? undefined : {
|
|
104
|
+
borderColor: theme.colors.blue[1]
|
|
105
|
+
}
|
|
106
|
+
}), Radio);
|
package/es/RadioGroup.js
CHANGED
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { createComponent } from '@cloudflare/style-container';
|
|
2
|
+
import { createStyledComponent } from '@cloudflare/style-container';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
checked: this.props.value === Radio.props.value,
|
|
19
|
-
onChange: this.props.onChange
|
|
20
|
-
})));
|
|
21
|
-
}
|
|
4
|
+
function RadioGroup({
|
|
5
|
+
className,
|
|
6
|
+
children,
|
|
7
|
+
value,
|
|
8
|
+
onChange,
|
|
9
|
+
disabled
|
|
10
|
+
}) {
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: className
|
|
13
|
+
}, React.Children.map(children, child => {
|
|
14
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
15
|
+
return child;
|
|
16
|
+
}
|
|
22
17
|
|
|
18
|
+
const radio = child;
|
|
19
|
+
return /*#__PURE__*/React.cloneElement(radio, {
|
|
20
|
+
key: radio.props.name,
|
|
21
|
+
disabled: disabled || radio.props.disabled,
|
|
22
|
+
checked: value === radio.props.value,
|
|
23
|
+
onChange
|
|
24
|
+
});
|
|
25
|
+
}));
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
disabled: PropTypes.bool
|
|
31
|
-
};
|
|
32
|
-
RadioGroup.displayName = 'RadioGroup';
|
|
33
|
-
export default createComponent(styles, RadioGroup);
|
|
28
|
+
export default createStyledComponent(() => ({
|
|
29
|
+
textAlign: 'left',
|
|
30
|
+
display: 'inline-block',
|
|
31
|
+
verticalAlign: 'middle'
|
|
32
|
+
}), RadioGroup);
|
package/lib/Radio.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -9,59 +7,28 @@ exports.default = void 0;
|
|
|
9
7
|
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
10
|
var _styleContainer = require("@cloudflare/style-container");
|
|
15
11
|
|
|
16
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
13
|
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
14
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
15
|
|
|
22
|
-
function
|
|
16
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
17
|
|
|
24
|
-
function
|
|
18
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25
19
|
|
|
26
|
-
function
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
27
21
|
|
|
28
|
-
function
|
|
22
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
-
|
|
34
|
-
var styles = function styles(_ref) {
|
|
24
|
+
var Input = (0, _styleContainer.createComponent)(function (_ref) {
|
|
35
25
|
var theme = _ref.theme,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
margin: 'initial',
|
|
41
|
-
padding: 0,
|
|
42
|
-
'&:first-child': {
|
|
43
|
-
marginTop: 'initial'
|
|
44
|
-
},
|
|
45
|
-
'&:hover input': disabled ? undefined : {
|
|
46
|
-
borderColor: theme.colors.blue[1]
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
var Input = (0, _styleContainer.createComponent)(function (_ref2) {
|
|
52
|
-
var theme = _ref2.theme,
|
|
53
|
-
checked = _ref2.checked,
|
|
54
|
-
disabled = _ref2.disabled;
|
|
55
|
-
return {
|
|
26
|
+
checked = _ref.checked,
|
|
27
|
+
disabled = _ref.disabled,
|
|
28
|
+
invalid = _ref.invalid;
|
|
29
|
+
return _objectSpread({
|
|
56
30
|
zIndex: 0,
|
|
57
|
-
border: "1px solid ".concat(theme.colors.gray[5]),
|
|
58
31
|
verticalAlign: 'middle',
|
|
59
|
-
fontFamily: 'Open Sans,Helvetica,Arial,sans-serif',
|
|
60
|
-
fontSize: theme.fontSizes[2],
|
|
61
|
-
background: theme.colors.white,
|
|
62
|
-
color: theme.colors.gray[1],
|
|
63
|
-
outline: 'none',
|
|
64
|
-
transition: 'border-color 0.2s ease',
|
|
65
32
|
position: 'relative',
|
|
66
33
|
height: 16,
|
|
67
34
|
width: 16,
|
|
@@ -69,17 +36,15 @@ var Input = (0, _styleContainer.createComponent)(function (_ref2) {
|
|
|
69
36
|
padding: 0,
|
|
70
37
|
lineHeight: 'normal',
|
|
71
38
|
appearance: 'none',
|
|
72
|
-
top: -1
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
outlineOffset: -1
|
|
82
|
-
},
|
|
39
|
+
top: -1
|
|
40
|
+
}, theme.mixins.focus({
|
|
41
|
+
invalid: invalid,
|
|
42
|
+
border: true
|
|
43
|
+
}), theme.mixins.input({
|
|
44
|
+
invalid: invalid,
|
|
45
|
+
disabled: disabled,
|
|
46
|
+
radius: '50%'
|
|
47
|
+
}), {
|
|
83
48
|
'&::before': {
|
|
84
49
|
content: "''",
|
|
85
50
|
position: 'absolute',
|
|
@@ -88,16 +53,18 @@ var Input = (0, _styleContainer.createComponent)(function (_ref2) {
|
|
|
88
53
|
'-webkit-text-stroke': 0,
|
|
89
54
|
transition: 'all 0.2s ease-out',
|
|
90
55
|
borderRadius: '50%',
|
|
56
|
+
top: '50%',
|
|
57
|
+
left: '50%',
|
|
91
58
|
height: checked ? 8 : 4,
|
|
92
59
|
width: checked ? 8 : 4,
|
|
93
|
-
|
|
94
|
-
|
|
60
|
+
marginLeft: checked ? '-4px' : '-2px',
|
|
61
|
+
marginTop: checked ? '-4px' : '-2px'
|
|
95
62
|
}
|
|
96
|
-
};
|
|
63
|
+
});
|
|
97
64
|
}, 'input');
|
|
98
|
-
var Label = (0, _styleContainer.createComponent)(function (
|
|
99
|
-
var theme =
|
|
100
|
-
disabled =
|
|
65
|
+
var Label = (0, _styleContainer.createComponent)(function (_ref2) {
|
|
66
|
+
var theme = _ref2.theme,
|
|
67
|
+
disabled = _ref2.disabled;
|
|
101
68
|
return {
|
|
102
69
|
display: 'inline',
|
|
103
70
|
fontSize: theme.fontSizes[2],
|
|
@@ -107,63 +74,52 @@ var Label = (0, _styleContainer.createComponent)(function (_ref3) {
|
|
|
107
74
|
};
|
|
108
75
|
}, 'span');
|
|
109
76
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
77
|
+
function Radio(_ref3) {
|
|
78
|
+
var label = _ref3.label,
|
|
79
|
+
name = _ref3.name,
|
|
80
|
+
testId = _ref3.testId,
|
|
81
|
+
onChange = _ref3.onChange,
|
|
82
|
+
className = _ref3.className,
|
|
83
|
+
noLabel = _ref3.noLabel,
|
|
84
|
+
_ref3$disabled = _ref3.disabled,
|
|
85
|
+
disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
|
|
86
|
+
rest = _objectWithoutProperties(_ref3, ["label", "name", "testId", "onChange", "className", "noLabel", "disabled"]);
|
|
87
|
+
|
|
88
|
+
var input = /*#__PURE__*/_react.default.createElement(Input, _extends({
|
|
89
|
+
type: "radio",
|
|
90
|
+
id: name,
|
|
91
|
+
name: name,
|
|
92
|
+
"data-testid": testId,
|
|
93
|
+
onChange: onChange && function (e) {
|
|
94
|
+
return onChange(e.target.value);
|
|
95
|
+
},
|
|
96
|
+
className: noLabel ? className : undefined,
|
|
97
|
+
disabled: disabled
|
|
98
|
+
}, rest));
|
|
99
|
+
|
|
100
|
+
return noLabel ? input : /*#__PURE__*/_react.default.createElement("label", {
|
|
101
|
+
htmlFor: name,
|
|
102
|
+
className: className
|
|
103
|
+
}, input, label && /*#__PURE__*/_react.default.createElement(Label, {
|
|
104
|
+
disabled: disabled
|
|
105
|
+
}, label));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
var _default = (0, _styleContainer.createStyledComponent)(function (_ref4) {
|
|
109
|
+
var theme = _ref4.theme,
|
|
110
|
+
disabled = _ref4.disabled;
|
|
111
|
+
return {
|
|
112
|
+
cursor: disabled ? 'default' : 'pointer',
|
|
113
|
+
display: 'block',
|
|
114
|
+
margin: 'initial',
|
|
115
|
+
padding: 0,
|
|
116
|
+
'&:first-child': {
|
|
117
|
+
marginTop: 'initial'
|
|
118
|
+
},
|
|
119
|
+
'&:hover input': disabled ? undefined : {
|
|
120
|
+
borderColor: theme.colors.blue[1]
|
|
146
121
|
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return Radio;
|
|
150
|
-
}(_react.default.Component);
|
|
151
|
-
|
|
152
|
-
Radio.propTypes = {
|
|
153
|
-
className: _propTypes.default.string,
|
|
154
|
-
label: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.oneOf([false])]).isRequired,
|
|
155
|
-
name: _propTypes.default.string.isRequired,
|
|
156
|
-
value: _propTypes.default.string.isRequired,
|
|
157
|
-
checked: _propTypes.default.bool.isRequired,
|
|
158
|
-
disabled: _propTypes.default.bool,
|
|
159
|
-
testId: _propTypes.default.string,
|
|
160
|
-
onChange: _propTypes.default.func.isRequired
|
|
161
|
-
};
|
|
162
|
-
Radio.defaultProps = {
|
|
163
|
-
disabled: false
|
|
164
|
-
};
|
|
165
|
-
Radio.displayName = 'Radio';
|
|
166
|
-
|
|
167
|
-
var _default = (0, _styleContainer.createStyledComponent)(styles, Radio);
|
|
122
|
+
};
|
|
123
|
+
}, Radio);
|
|
168
124
|
|
|
169
125
|
exports.default = _default;
|
package/lib/RadioGroup.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -9,75 +7,39 @@ exports.default = void 0;
|
|
|
9
7
|
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
10
|
var _styleContainer = require("@cloudflare/style-container");
|
|
15
11
|
|
|
16
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
13
|
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
31
|
-
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
|
+
function RadioGroup(_ref) {
|
|
15
|
+
var className = _ref.className,
|
|
16
|
+
children = _ref.children,
|
|
17
|
+
value = _ref.value,
|
|
18
|
+
onChange = _ref.onChange,
|
|
19
|
+
disabled = _ref.disabled;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
+
className: className
|
|
22
|
+
}, _react.default.Children.map(children, function (child) {
|
|
23
|
+
if (! /*#__PURE__*/_react.default.isValidElement(child)) {
|
|
24
|
+
return child;
|
|
25
|
+
}
|
|
33
26
|
|
|
34
|
-
var
|
|
27
|
+
var radio = child;
|
|
28
|
+
return /*#__PURE__*/_react.default.cloneElement(radio, {
|
|
29
|
+
key: radio.props.name,
|
|
30
|
+
disabled: disabled || radio.props.disabled,
|
|
31
|
+
checked: value === radio.props.value,
|
|
32
|
+
onChange: onChange
|
|
33
|
+
});
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var _default = (0, _styleContainer.createStyledComponent)(function () {
|
|
35
38
|
return {
|
|
36
39
|
textAlign: 'left',
|
|
37
40
|
display: 'inline-block',
|
|
38
41
|
verticalAlign: 'middle'
|
|
39
42
|
};
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var RadioGroup = /*#__PURE__*/function (_React$Component) {
|
|
43
|
-
_inherits(RadioGroup, _React$Component);
|
|
44
|
-
|
|
45
|
-
function RadioGroup() {
|
|
46
|
-
_classCallCheck(this, RadioGroup);
|
|
47
|
-
|
|
48
|
-
return _possibleConstructorReturn(this, _getPrototypeOf(RadioGroup).apply(this, arguments));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_createClass(RadioGroup, [{
|
|
52
|
-
key: "render",
|
|
53
|
-
value: function render() {
|
|
54
|
-
var _this = this;
|
|
55
|
-
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
-
className: this.props.className
|
|
58
|
-
}, _react.default.Children.map(this.props.children, function (Radio) {
|
|
59
|
-
return /*#__PURE__*/_react.default.cloneElement(Radio, {
|
|
60
|
-
key: Radio.props.name,
|
|
61
|
-
disabled: _this.props.disabled || Radio.props.disabled,
|
|
62
|
-
checked: _this.props.value === Radio.props.value,
|
|
63
|
-
onChange: _this.props.onChange
|
|
64
|
-
});
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
}]);
|
|
68
|
-
|
|
69
|
-
return RadioGroup;
|
|
70
|
-
}(_react.default.Component);
|
|
71
|
-
|
|
72
|
-
RadioGroup.propTypes = {
|
|
73
|
-
className: _propTypes.default.string,
|
|
74
|
-
children: _propTypes.default.node,
|
|
75
|
-
value: _propTypes.default.string.isRequired,
|
|
76
|
-
onChange: _propTypes.default.func.isRequired,
|
|
77
|
-
disabled: _propTypes.default.bool
|
|
78
|
-
};
|
|
79
|
-
RadioGroup.displayName = 'RadioGroup';
|
|
80
|
-
|
|
81
|
-
var _default = (0, _styleContainer.createComponent)(styles, RadioGroup);
|
|
43
|
+
}, RadioGroup);
|
|
82
44
|
|
|
83
45
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/component-radio",
|
|
3
3
|
"description": "Cloudflare Radio Component",
|
|
4
|
-
"version": "3.2
|
|
4
|
+
"version": "3.3.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
7
7
|
"author": "James Kyle <jkyle@cloudflare.com>",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@cloudflare/style-container": "^7.
|
|
14
|
+
"@cloudflare/style-container": "^7.6.0",
|
|
15
15
|
"prop-types": "^15.6.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"test-coverage": "stratus test --coverage",
|
|
29
29
|
"test-watch": "stratus test --watch"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "6989c2f0a11d63379663352647b8c12a21c08b02"
|
|
32
32
|
}
|