@dhis2/ui 8.2.6 → 8.4.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.
Files changed (2) hide show
  1. package/API.md +21 -3
  2. package/package.json +48 -48
package/API.md CHANGED
@@ -111,6 +111,7 @@ import { Button } from '@dhis2/ui'
111
111
  |onBlur|function|||Callback to trigger on de-focus (blur).<br/>Called with same args as `onClick`|
112
112
  |onClick|function|||Callback to trigger on click.<br/>Called with args `({ value, name }, event)`|
113
113
  |onFocus|function|||Callback to trigger on focus. Called with same args as `onClick`|
114
+ |onKeyDown|function|||Callback to trigger on key-down. Called with same args as `onClick`|
114
115
 
115
116
  ### ButtonStrip
116
117
 
@@ -277,6 +278,7 @@ import { Checkbox } from '@dhis2/ui'
277
278
  |onBlur|function||||
278
279
  |onChange|function|||Called with signature `(object, event)`|
279
280
  |onFocus|function||||
281
+ |onKeyDown|function||||
280
282
 
281
283
  ### CheckboxField
282
284
 
@@ -313,6 +315,7 @@ import { CheckboxField } from '@dhis2/ui'
313
315
  |onBlur|function|||Called with signature `({ name: string, value: string, checked: bool }, event)`|
314
316
  |onChange|function|||Called with signature `({ name: string, value: string, checked: bool }, event)`|
315
317
  |onFocus|function|||Called with signature `({ name: string, value: string, checked: bool }, event)`|
318
+ |onKeyDown|function|||Called with signature `({ name: string, value: string, checked: bool }, event)`|
316
319
 
317
320
  ### Chip
318
321
 
@@ -535,6 +538,7 @@ import { FileInput } from '@dhis2/ui'
535
538
  |onBlur|function|||Called with signature `(object, event)`|
536
539
  |onChange|function|||Called with signature `(object, event)`|
537
540
  |onFocus|function|||Called with signature `(object, event)`|
541
+ |onKeyDown|function|||Called with signature `(object, event)`|
538
542
 
539
543
  ### FileInputField
540
544
 
@@ -574,7 +578,8 @@ import { FileInputField } from '@dhis2/ui'
574
578
  |warning|custom|||Applies 'warning' styling to the validation text. Mutually exclusive with `valid` and `error` props|
575
579
  |onBlur|function||||
576
580
  |onChange|function|||Called with signature `({ name: string, files: [] }, event)`|
577
- |onFocus|function||||
581
+ |onFocus|function|||Called with signature `({ name: string, files: [] }, event)`|
582
+ |onKeyDown|function|||Called with signature `({ name: string, files: [] }, event)`|
578
583
 
579
584
  ### FileListItem
580
585
 
@@ -734,6 +739,7 @@ import { Input } from '@dhis2/ui'
734
739
  |onBlur|function|||Called with signature `({ name: string, value: string }, event)`|
735
740
  |onChange|function|||Called with signature `({ name: string, value: string }, event)`|
736
741
  |onFocus|function|||Called with signature `({ name: string, value: string }, event)`|
742
+ |onKeyDown|function|||Called with signature `({ name: string, value: string }, event)`|
737
743
 
738
744
  ### InputField
739
745
 
@@ -778,6 +784,7 @@ import { InputField } from '@dhis2/ui'
778
784
  |onBlur|function|||Called with signature `({ name: string, value: string }, event)`|
779
785
  |onChange|function|||Called with signature `({ name: string, value: string }, event)`|
780
786
  |onFocus|function|||Called with signature `({ name: string, value: string }, event)`|
787
+ |onKeyDown|function|||Called with signature `({ name: string, value: string }, event)`|
781
788
 
782
789
  ### IntersectionDetector
783
790
 
@@ -848,7 +855,8 @@ import { Layer } from '@dhis2/ui'
848
855
  |level|number │ string|`'auto'`||Z-index level|
849
856
  |position|'absolute' │ 'fixed'|`'fixed'`|||
850
857
  |translucent|boolean|||Adds a semi-transparent background|
851
- |onClick|function|||Click handler|
858
+ |onBackdropClick|function|||Backdrop click handler|
859
+ |onClick|custom|||Click handler - DEPRECATED|
852
860
 
853
861
  ### Legend
854
862
 
@@ -1438,6 +1446,7 @@ import { Radio } from '@dhis2/ui'
1438
1446
  |onBlur|function|||Called with the signature `({ name: string, value: string, checked: bool }, event)`|
1439
1447
  |onChange|function|||Called with the signature `({ name: string, value: string, checked: bool }, event)`|
1440
1448
  |onFocus|function|||Called with the signature `({ name: string, value: string, checked: bool }, event)`|
1449
+ |onKeyDown|function|||Called with the signature `({ name: string, value: string, checked: bool }, event)`|
1441
1450
 
1442
1451
  ### Required
1443
1452
 
@@ -1569,6 +1578,7 @@ import { MultiSelect } from '@dhis2/ui'
1569
1578
  |onBlur|function||||
1570
1579
  |onChange|function||||
1571
1580
  |onFocus|function||||
1581
+ |onKeyDown|function||||
1572
1582
 
1573
1583
  ### MultiSelectField
1574
1584
 
@@ -1617,6 +1627,7 @@ import { MultiSelectField } from '@dhis2/ui'
1617
1627
  |onBlur|function|||Called with signature `({ selected: [String] }, event)`|
1618
1628
  |onChange|function|||Called with signature `({ selected: [String] }, event)`|
1619
1629
  |onFocus|function|||Called with signature `({ selected: [String] }, event)`|
1630
+ |onKeyDown|function|||Called with signature `({ selected: [String] }, event)`|
1620
1631
 
1621
1632
  ### MultiSelectOption
1622
1633
 
@@ -1736,6 +1747,7 @@ import { SingleSelect } from '@dhis2/ui'
1736
1747
  |onBlur|function||||
1737
1748
  |onChange|function||||
1738
1749
  |onFocus|function||||
1750
+ |onKeyDown|function||||
1739
1751
 
1740
1752
  ### SingleSelectField
1741
1753
 
@@ -1784,6 +1796,7 @@ import { SingleSelectField } from '@dhis2/ui'
1784
1796
  |onBlur|function|||Called with signature `({ selected: string }, event)`|
1785
1797
  |onChange|function|||Called with signature `({ selected: string }, event)`|
1786
1798
  |onFocus|function|||Called with signature `({ selected: string }, event)`|
1799
+ |onKeyDown|function|||Called with signature `({ selected: string }, event)`|
1787
1800
 
1788
1801
  ### SingleSelectOption
1789
1802
 
@@ -1973,6 +1986,7 @@ import { Switch } from '@dhis2/ui'
1973
1986
  |onBlur|function|||Called with signature `({ name: string, value: string, checked: bool }, event)`|
1974
1987
  |onChange|function|||Called with signature `({ name: string, value: string, checked: bool }, event)`|
1975
1988
  |onFocus|function|||Called with signature `({ name: string, value: string, checked: bool }, event)`|
1989
+ |onKeyDown|function|||Called with signature `({ name: string, value: string, checked: bool }, event)`|
1976
1990
 
1977
1991
  ### SwitchField
1978
1992
 
@@ -2009,6 +2023,7 @@ import { SwitchField } from '@dhis2/ui'
2009
2023
  |onBlur|function|||Called with signature ({ name: string, value: string, checked: bool }, event)|
2010
2024
  |onChange|function|||Called with signature ({ name: string, value: string, checked: bool }, event)|
2011
2025
  |onFocus|function|||Called with signature ({ name: string, value: string, checked: bool }, event)|
2026
+ |onKeyDown|function|||Called with signature ({ name: string, value: string, checked: bool }, event)|
2012
2027
 
2013
2028
  ### Tab
2014
2029
 
@@ -2072,8 +2087,9 @@ import { DataTableCell } from '@dhis2/ui'
2072
2087
 
2073
2088
  |Name|Type|Default|Required|Description|
2074
2089
  |---|---|---|---|---|
2075
- |active|boolean|||To toggle background color, for example for editing|
2090
+ |active|boolean|||To toggle border color, for example for editing|
2076
2091
  |align|'left' │ 'center' │ 'right'|`'left'`|||
2092
+ |backgroundColor|string|||Sets background color of the cell. Disables dynamic background colors from active, hover, and selected states|
2077
2093
  |bordered|boolean||||
2078
2094
  |children|node||||
2079
2095
  |className|string||||
@@ -2721,6 +2737,7 @@ import { TextArea } from '@dhis2/ui'
2721
2737
  |onBlur|function|||Called with signature ({ name: string, value: string }, event)|
2722
2738
  |onChange|function|||Called with signature ({ name: string, value: string }, event)|
2723
2739
  |onFocus|function|||Called with signature ({ name: string, value: string }, event)|
2740
+ |onKeyDown|function|||Called with signature ({ name: string, value: string }, event)|
2724
2741
 
2725
2742
  ### TextAreaField
2726
2743
 
@@ -2763,6 +2780,7 @@ import { TextAreaField } from '@dhis2/ui'
2763
2780
  |onBlur|function|||Called with signature ({ name: string, value: string }, event)|
2764
2781
  |onChange|function|||Called with signature ({ name: string, value: string }, event)|
2765
2782
  |onFocus|function|||Called with signature ({ name: string, value: string }, event)|
2783
+ |onKeyDown|function|||Called with signature ({ name: string, value: string }, event)|
2766
2784
 
2767
2785
  ### Tooltip
2768
2786
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/ui",
3
- "version": "8.2.6",
3
+ "version": "8.4.0",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {
@@ -20,53 +20,53 @@
20
20
  "build": "d2-app-scripts build"
21
21
  },
22
22
  "dependencies": {
23
- "@dhis2-ui/alert": "8.2.6",
24
- "@dhis2-ui/box": "8.2.6",
25
- "@dhis2-ui/button": "8.2.6",
26
- "@dhis2-ui/card": "8.2.6",
27
- "@dhis2-ui/center": "8.2.6",
28
- "@dhis2-ui/checkbox": "8.2.6",
29
- "@dhis2-ui/chip": "8.2.6",
30
- "@dhis2-ui/cover": "8.2.6",
31
- "@dhis2-ui/css": "8.2.6",
32
- "@dhis2-ui/divider": "8.2.6",
33
- "@dhis2-ui/field": "8.2.6",
34
- "@dhis2-ui/file-input": "8.2.6",
35
- "@dhis2-ui/header-bar": "8.2.6",
36
- "@dhis2-ui/help": "8.2.6",
37
- "@dhis2-ui/input": "8.2.6",
38
- "@dhis2-ui/intersection-detector": "8.2.6",
39
- "@dhis2-ui/label": "8.2.6",
40
- "@dhis2-ui/layer": "8.2.6",
41
- "@dhis2-ui/legend": "8.2.6",
42
- "@dhis2-ui/loader": "8.2.6",
43
- "@dhis2-ui/logo": "8.2.6",
44
- "@dhis2-ui/menu": "8.2.6",
45
- "@dhis2-ui/modal": "8.2.6",
46
- "@dhis2-ui/node": "8.2.6",
47
- "@dhis2-ui/notice-box": "8.2.6",
48
- "@dhis2-ui/organisation-unit-tree": "8.2.6",
49
- "@dhis2-ui/pagination": "8.2.6",
50
- "@dhis2-ui/popover": "8.2.6",
51
- "@dhis2-ui/popper": "8.2.6",
52
- "@dhis2-ui/portal": "8.2.6",
53
- "@dhis2-ui/radio": "8.2.6",
54
- "@dhis2-ui/required": "8.2.6",
55
- "@dhis2-ui/segmented-control": "8.2.6",
56
- "@dhis2-ui/select": "8.2.6",
57
- "@dhis2-ui/selector-bar": "8.2.6",
58
- "@dhis2-ui/sharing-dialog": "8.2.6",
59
- "@dhis2-ui/switch": "8.2.6",
60
- "@dhis2-ui/tab": "8.2.6",
61
- "@dhis2-ui/table": "8.2.6",
62
- "@dhis2-ui/tag": "8.2.6",
63
- "@dhis2-ui/text-area": "8.2.6",
64
- "@dhis2-ui/tooltip": "8.2.6",
65
- "@dhis2-ui/transfer": "8.2.6",
66
- "@dhis2-ui/user-avatar": "8.2.6",
67
- "@dhis2/ui-constants": "8.2.6",
68
- "@dhis2/ui-forms": "8.2.6",
69
- "@dhis2/ui-icons": "8.2.6",
23
+ "@dhis2-ui/alert": "8.4.0",
24
+ "@dhis2-ui/box": "8.4.0",
25
+ "@dhis2-ui/button": "8.4.0",
26
+ "@dhis2-ui/card": "8.4.0",
27
+ "@dhis2-ui/center": "8.4.0",
28
+ "@dhis2-ui/checkbox": "8.4.0",
29
+ "@dhis2-ui/chip": "8.4.0",
30
+ "@dhis2-ui/cover": "8.4.0",
31
+ "@dhis2-ui/css": "8.4.0",
32
+ "@dhis2-ui/divider": "8.4.0",
33
+ "@dhis2-ui/field": "8.4.0",
34
+ "@dhis2-ui/file-input": "8.4.0",
35
+ "@dhis2-ui/header-bar": "8.4.0",
36
+ "@dhis2-ui/help": "8.4.0",
37
+ "@dhis2-ui/input": "8.4.0",
38
+ "@dhis2-ui/intersection-detector": "8.4.0",
39
+ "@dhis2-ui/label": "8.4.0",
40
+ "@dhis2-ui/layer": "8.4.0",
41
+ "@dhis2-ui/legend": "8.4.0",
42
+ "@dhis2-ui/loader": "8.4.0",
43
+ "@dhis2-ui/logo": "8.4.0",
44
+ "@dhis2-ui/menu": "8.4.0",
45
+ "@dhis2-ui/modal": "8.4.0",
46
+ "@dhis2-ui/node": "8.4.0",
47
+ "@dhis2-ui/notice-box": "8.4.0",
48
+ "@dhis2-ui/organisation-unit-tree": "8.4.0",
49
+ "@dhis2-ui/pagination": "8.4.0",
50
+ "@dhis2-ui/popover": "8.4.0",
51
+ "@dhis2-ui/popper": "8.4.0",
52
+ "@dhis2-ui/portal": "8.4.0",
53
+ "@dhis2-ui/radio": "8.4.0",
54
+ "@dhis2-ui/required": "8.4.0",
55
+ "@dhis2-ui/segmented-control": "8.4.0",
56
+ "@dhis2-ui/select": "8.4.0",
57
+ "@dhis2-ui/selector-bar": "8.4.0",
58
+ "@dhis2-ui/sharing-dialog": "8.4.0",
59
+ "@dhis2-ui/switch": "8.4.0",
60
+ "@dhis2-ui/tab": "8.4.0",
61
+ "@dhis2-ui/table": "8.4.0",
62
+ "@dhis2-ui/tag": "8.4.0",
63
+ "@dhis2-ui/text-area": "8.4.0",
64
+ "@dhis2-ui/tooltip": "8.4.0",
65
+ "@dhis2-ui/transfer": "8.4.0",
66
+ "@dhis2-ui/user-avatar": "8.4.0",
67
+ "@dhis2/ui-constants": "8.4.0",
68
+ "@dhis2/ui-forms": "8.4.0",
69
+ "@dhis2/ui-icons": "8.4.0",
70
70
  "prop-types": "^15.7.2"
71
71
  },
72
72
  "peerDependencies": {