@dhis2-ui/radio 8.15.0-alpha.2 → 8.15.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/package.json +4 -6
- package/types/index.d.ts +0 -67
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/radio",
|
|
3
|
-
"version": "8.15.0
|
|
3
|
+
"version": "8.15.0",
|
|
4
4
|
"description": "UI Radio",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,18 +32,16 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@dhis2/prop-types": "^3.1.2",
|
|
35
|
-
"@dhis2/ui-constants": "8.15.0
|
|
35
|
+
"@dhis2/ui-constants": "8.15.0",
|
|
36
36
|
"classnames": "^2.3.1",
|
|
37
37
|
"prop-types": "^15.7.2"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
|
-
"build"
|
|
41
|
-
"types"
|
|
40
|
+
"build"
|
|
42
41
|
],
|
|
43
42
|
"devDependencies": {
|
|
44
43
|
"react": "16.13",
|
|
45
44
|
"react-dom": "16.13",
|
|
46
45
|
"styled-jsx": "^4.0.1"
|
|
47
|
-
}
|
|
48
|
-
"types": "types"
|
|
46
|
+
}
|
|
49
47
|
}
|
package/types/index.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
|
|
3
|
-
export type RadioEventPayload = {
|
|
4
|
-
value?: string
|
|
5
|
-
name?: string
|
|
6
|
-
checked: boolean
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type RadioEventHandler<Event extends React.SyntheticEvent> = (
|
|
10
|
-
payload: RadioEventPayload,
|
|
11
|
-
event: Event
|
|
12
|
-
) => void
|
|
13
|
-
|
|
14
|
-
type RadioFocusHandler = RadioEventHandler<React.FocusEvent<HTMLInputElement>>
|
|
15
|
-
type RadioChangeHandler = RadioEventHandler<React.ChangeEvent<HTMLInputElement>>
|
|
16
|
-
type RadioKeyHandler = RadioEventHandler<React.KeyboardEvent<HTMLInputElement>>
|
|
17
|
-
|
|
18
|
-
export interface RadioProps {
|
|
19
|
-
checked?: boolean
|
|
20
|
-
className?: string
|
|
21
|
-
dataTest?: string
|
|
22
|
-
dense?: boolean
|
|
23
|
-
disabled?: boolean
|
|
24
|
-
/**
|
|
25
|
-
* Adds 'error' styling for feedback. Mutually exclusive with `valid` and `warning` props
|
|
26
|
-
*/
|
|
27
|
-
error?: boolean
|
|
28
|
-
initialFocus?: boolean
|
|
29
|
-
label?: React.ReactNode
|
|
30
|
-
/**
|
|
31
|
-
* Name associated with this element. Passed in object to event handler functions
|
|
32
|
-
*/
|
|
33
|
-
name?: string
|
|
34
|
-
tabIndex?: string
|
|
35
|
-
/**
|
|
36
|
-
* Adds 'valid' styling for feedback. Mutually exclusive with `error` and `warning` props
|
|
37
|
-
*/
|
|
38
|
-
valid?: boolean
|
|
39
|
-
/**
|
|
40
|
-
* Value associated with this element. Passed in object to event handler functions
|
|
41
|
-
*/
|
|
42
|
-
value?: string
|
|
43
|
-
/**
|
|
44
|
-
* Adds 'warning' styling for feedback. Mutually exclusive with `valid` and `error` props
|
|
45
|
-
*/
|
|
46
|
-
warning?: boolean
|
|
47
|
-
/**
|
|
48
|
-
* Called with the signature `({ name: string, value: string, checked: bool }, event)`
|
|
49
|
-
*/
|
|
50
|
-
onBlur?: RadioFocusHandler
|
|
51
|
-
/**
|
|
52
|
-
* Called with the signature `({ name: string, value: string, checked: bool }, event)`
|
|
53
|
-
*/
|
|
54
|
-
onChange?: RadioChangeHandler
|
|
55
|
-
/**
|
|
56
|
-
* Called with the signature `({ name: string, value: string, checked: bool }, event)`
|
|
57
|
-
*/
|
|
58
|
-
onFocus?: RadioFocusHandler
|
|
59
|
-
/**
|
|
60
|
-
* Called with the signature `({ name: string, value: string, checked: bool }, event)`
|
|
61
|
-
*/
|
|
62
|
-
onKeyDown?: RadioKeyHandler
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export class Radio extends React.Component<RadioProps, any> {
|
|
66
|
-
render(): JSX.Element
|
|
67
|
-
}
|