@dhis2-ui/radio 8.15.0-alpha.3 → 8.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +4 -7
  2. 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-alpha.3",
3
+ "version": "8.15.1",
4
4
  "description": "UI Radio",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,6 @@
13
13
  "main": "./build/cjs/index.js",
14
14
  "module": "./build/es/index.js",
15
15
  "exports": {
16
- "types": "./types/index.d.ts",
17
16
  "import": "./build/es/index.js",
18
17
  "require": "./build/cjs/index.js"
19
18
  },
@@ -33,18 +32,16 @@
33
32
  },
34
33
  "dependencies": {
35
34
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2/ui-constants": "8.15.0-alpha.3",
35
+ "@dhis2/ui-constants": "8.15.1",
37
36
  "classnames": "^2.3.1",
38
37
  "prop-types": "^15.7.2"
39
38
  },
40
39
  "files": [
41
- "build",
42
- "types"
40
+ "build"
43
41
  ],
44
42
  "devDependencies": {
45
43
  "react": "16.13",
46
44
  "react-dom": "16.13",
47
45
  "styled-jsx": "^4.0.1"
48
- },
49
- "types": "types"
46
+ }
50
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
- }