@digigov/react-core 0.6.1 → 0.6.4

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 (118) hide show
  1. package/ArrowIcon/__snapshots__/index.test.tsx.snap +48 -32
  2. package/ArrowIcon/index.d.ts +4 -3
  3. package/ArrowIcon/index.js +13 -27
  4. package/BurgerIcon/__snapshots__/index.test.tsx.snap +323 -126
  5. package/BurgerIcon/index.d.ts +13 -7
  6. package/BurgerIcon/index.js +13 -33
  7. package/BurgerIcon/index.test.js +47 -5
  8. package/Button/index.d.ts +1 -1
  9. package/CHANGELOG.md +23 -1
  10. package/CaretIcon/__snapshots__/index.test.tsx.snap +48 -32
  11. package/CaretIcon/index.d.ts +4 -3
  12. package/CaretIcon/index.js +13 -27
  13. package/CheckIcon/__snapshots__/index.test.tsx.snap +196 -136
  14. package/CheckIcon/index.d.ts +7 -11
  15. package/CheckIcon/index.js +10 -34
  16. package/CheckboxItem/index.d.ts +1 -1
  17. package/CloseIcon/__snapshots__/index.test.tsx.snap +12 -8
  18. package/CloseIcon/index.d.ts +9 -3
  19. package/CloseIcon/index.js +10 -7
  20. package/DateInputItem/index.d.ts +1 -1
  21. package/Dropdown/__snapshots__/index.test.tsx.snap +144 -0
  22. package/Dropdown/index.d.ts +30 -0
  23. package/Dropdown/index.js +42 -0
  24. package/Dropdown/index.test.d.ts +1 -0
  25. package/Dropdown/index.test.js +101 -0
  26. package/DropdownButton/__snapshots__/index.test.tsx.snap +375 -0
  27. package/DropdownButton/index.d.ts +28 -0
  28. package/DropdownButton/index.js +47 -0
  29. package/DropdownButton/index.test.d.ts +1 -0
  30. package/DropdownButton/index.test.js +195 -0
  31. package/DropdownContent/__snapshots__/index.test.tsx.snap +11 -0
  32. package/DropdownContent/index.d.ts +9 -0
  33. package/DropdownContent/index.js +35 -0
  34. package/DropdownContent/index.test.d.ts +1 -0
  35. package/DropdownContent/index.test.js +15 -0
  36. package/FieldsetLegend/index.d.ts +1 -1
  37. package/FileUpload/index.d.ts +1 -1
  38. package/Grid/index.d.ts +1 -1
  39. package/LabelTitle/index.d.ts +1 -1
  40. package/MoreVertIcon/__snapshots__/index.test.tsx.snap +391 -315
  41. package/MoreVertIcon/index.d.ts +7 -11
  42. package/MoreVertIcon/index.js +10 -34
  43. package/NormalText/index.d.ts +1 -1
  44. package/Paragraph/index.d.ts +1 -1
  45. package/RadioItem/index.d.ts +1 -1
  46. package/Select/index.d.ts +1 -1
  47. package/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  48. package/SvgIcon/index.d.ts +20 -0
  49. package/SvgIcon/index.js +41 -0
  50. package/SvgIcon/index.test.d.ts +1 -0
  51. package/SvgIcon/index.test.js +129 -0
  52. package/Table/index.d.ts +1 -1
  53. package/TableDataCell/index.d.ts +1 -1
  54. package/TableHeaderCell/index.d.ts +1 -1
  55. package/TextArea/index.d.ts +1 -1
  56. package/TextInput/index.d.ts +1 -1
  57. package/UncheckIcon/__snapshots__/index.test.tsx.snap +241 -165
  58. package/UncheckIcon/index.d.ts +9 -13
  59. package/UncheckIcon/index.js +15 -39
  60. package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +48 -32
  61. package/es/ArrowIcon/index.js +12 -19
  62. package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +323 -126
  63. package/es/BurgerIcon/index.js +12 -25
  64. package/es/BurgerIcon/index.test.js +47 -5
  65. package/es/CaretIcon/__snapshots__/index.test.tsx.snap +48 -32
  66. package/es/CaretIcon/index.js +12 -19
  67. package/es/CheckIcon/__snapshots__/index.test.tsx.snap +196 -136
  68. package/es/CheckIcon/index.js +9 -26
  69. package/es/CloseIcon/__snapshots__/index.test.tsx.snap +12 -8
  70. package/es/CloseIcon/index.js +9 -7
  71. package/es/Dropdown/__snapshots__/index.test.tsx.snap +144 -0
  72. package/es/Dropdown/index.js +27 -0
  73. package/es/Dropdown/index.test.js +95 -0
  74. package/es/DropdownButton/__snapshots__/index.test.tsx.snap +375 -0
  75. package/es/DropdownButton/index.js +31 -0
  76. package/es/DropdownButton/index.test.js +189 -0
  77. package/es/DropdownContent/__snapshots__/index.test.tsx.snap +11 -0
  78. package/es/DropdownContent/index.js +20 -0
  79. package/es/DropdownContent/index.test.js +9 -0
  80. package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +391 -315
  81. package/es/MoreVertIcon/index.js +9 -26
  82. package/es/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  83. package/es/SvgIcon/index.js +26 -0
  84. package/es/SvgIcon/index.test.js +123 -0
  85. package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +241 -165
  86. package/es/UncheckIcon/index.js +12 -29
  87. package/es/index.js +4 -0
  88. package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +48 -32
  89. package/esm/ArrowIcon/index.js +12 -19
  90. package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +323 -126
  91. package/esm/BurgerIcon/index.js +12 -25
  92. package/esm/BurgerIcon/index.test.js +47 -5
  93. package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +48 -32
  94. package/esm/CaretIcon/index.js +12 -19
  95. package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +196 -136
  96. package/esm/CheckIcon/index.js +9 -26
  97. package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +12 -8
  98. package/esm/CloseIcon/index.js +9 -7
  99. package/esm/Dropdown/__snapshots__/index.test.tsx.snap +144 -0
  100. package/esm/Dropdown/index.js +27 -0
  101. package/esm/Dropdown/index.test.js +95 -0
  102. package/esm/DropdownButton/__snapshots__/index.test.tsx.snap +375 -0
  103. package/esm/DropdownButton/index.js +31 -0
  104. package/esm/DropdownButton/index.test.js +189 -0
  105. package/esm/DropdownContent/__snapshots__/index.test.tsx.snap +11 -0
  106. package/esm/DropdownContent/index.js +20 -0
  107. package/esm/DropdownContent/index.test.js +9 -0
  108. package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +391 -315
  109. package/esm/MoreVertIcon/index.js +9 -26
  110. package/esm/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  111. package/esm/SvgIcon/index.js +26 -0
  112. package/esm/SvgIcon/index.test.js +123 -0
  113. package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +241 -165
  114. package/esm/UncheckIcon/index.js +12 -29
  115. package/esm/index.js +5 -1
  116. package/index.d.ts +4 -0
  117. package/index.js +32 -0
  118. package/package.json +2 -2
@@ -1,256 +1,332 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`renders the UncheckIcon with no props 1`] = `
4
- <ForwardRef(UncheckIcon)>
5
- <svg
6
- aria-hidden="true"
7
- className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
8
- focusable="false"
9
- viewBox="0 0 24 24"
4
+ <ForwardRef(UnCheckIcon)>
5
+ <ForwardRef(SvgIcon)
6
+ className="govgr-svg-icon--check"
10
7
  >
11
- <polygon
12
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
13
- />
14
- </svg>
15
- </ForwardRef(UncheckIcon)>
8
+ <svg
9
+ aria-hidden="true"
10
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
11
+ focusable="false"
12
+ viewBox="0 0 24 24"
13
+ >
14
+ <polygon
15
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
16
+ />
17
+ </svg>
18
+ </ForwardRef(SvgIcon)>
19
+ </ForwardRef(UnCheckIcon)>
16
20
  `;
17
21
 
18
22
  exports[`renders the UncheckIcon with prop size=l 1`] = `
19
- <ForwardRef(UncheckIcon)
23
+ <ForwardRef(UnCheckIcon)
20
24
  size="l"
21
25
  >
22
- <svg
23
- aria-hidden="true"
24
- className="govgr-svg-icon--dark govgr-svg-icon--l govgr-svg-icon govgr-svg-icon--uncheck"
25
- focusable="false"
26
- viewBox="0 0 24 24"
26
+ <ForwardRef(SvgIcon)
27
+ className="govgr-svg-icon--check"
28
+ size="l"
27
29
  >
28
- <polygon
29
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
30
- />
31
- </svg>
32
- </ForwardRef(UncheckIcon)>
30
+ <svg
31
+ aria-hidden="true"
32
+ className="govgr-svg-icon--dark govgr-svg-icon--l govgr-svg-icon--check govgr-svg-icon"
33
+ focusable="false"
34
+ viewBox="0 0 24 24"
35
+ >
36
+ <polygon
37
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
38
+ />
39
+ </svg>
40
+ </ForwardRef(SvgIcon)>
41
+ </ForwardRef(UnCheckIcon)>
33
42
  `;
34
43
 
35
44
  exports[`renders the UncheckIcon with prop size=m 1`] = `
36
- <ForwardRef(UncheckIcon)
45
+ <ForwardRef(UnCheckIcon)
37
46
  size="m"
38
47
  >
39
- <svg
40
- aria-hidden="true"
41
- className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
42
- focusable="false"
43
- viewBox="0 0 24 24"
48
+ <ForwardRef(SvgIcon)
49
+ className="govgr-svg-icon--check"
50
+ size="m"
44
51
  >
45
- <polygon
46
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
47
- />
48
- </svg>
49
- </ForwardRef(UncheckIcon)>
52
+ <svg
53
+ aria-hidden="true"
54
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
55
+ focusable="false"
56
+ viewBox="0 0 24 24"
57
+ >
58
+ <polygon
59
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
60
+ />
61
+ </svg>
62
+ </ForwardRef(SvgIcon)>
63
+ </ForwardRef(UnCheckIcon)>
50
64
  `;
51
65
 
52
66
  exports[`renders the UncheckIcon with prop size=s 1`] = `
53
- <ForwardRef(UncheckIcon)
67
+ <ForwardRef(UnCheckIcon)
54
68
  size="s"
55
69
  >
56
- <svg
57
- aria-hidden="true"
58
- className="govgr-svg-icon--dark govgr-svg-icon--s govgr-svg-icon govgr-svg-icon--uncheck"
59
- focusable="false"
60
- viewBox="0 0 24 24"
70
+ <ForwardRef(SvgIcon)
71
+ className="govgr-svg-icon--check"
72
+ size="s"
61
73
  >
62
- <polygon
63
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
64
- />
65
- </svg>
66
- </ForwardRef(UncheckIcon)>
74
+ <svg
75
+ aria-hidden="true"
76
+ className="govgr-svg-icon--dark govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
77
+ focusable="false"
78
+ viewBox="0 0 24 24"
79
+ >
80
+ <polygon
81
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
82
+ />
83
+ </svg>
84
+ </ForwardRef(SvgIcon)>
85
+ </ForwardRef(UnCheckIcon)>
67
86
  `;
68
87
 
69
88
  exports[`renders the UncheckIcon with prop size=xl 1`] = `
70
- <ForwardRef(UncheckIcon)
89
+ <ForwardRef(UnCheckIcon)
71
90
  size="xl"
72
91
  >
73
- <svg
74
- aria-hidden="true"
75
- className="govgr-svg-icon--dark govgr-svg-icon--xl govgr-svg-icon govgr-svg-icon--uncheck"
76
- focusable="false"
77
- viewBox="0 0 24 24"
92
+ <ForwardRef(SvgIcon)
93
+ className="govgr-svg-icon--check"
94
+ size="xl"
78
95
  >
79
- <polygon
80
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
81
- />
82
- </svg>
83
- </ForwardRef(UncheckIcon)>
96
+ <svg
97
+ aria-hidden="true"
98
+ className="govgr-svg-icon--dark govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
99
+ focusable="false"
100
+ viewBox="0 0 24 24"
101
+ >
102
+ <polygon
103
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
104
+ />
105
+ </svg>
106
+ </ForwardRef(SvgIcon)>
107
+ </ForwardRef(UnCheckIcon)>
84
108
  `;
85
109
 
86
110
  exports[`renders the UncheckIcon with prop variant=dark 1`] = `
87
- <ForwardRef(UncheckIcon)
111
+ <ForwardRef(UnCheckIcon)
88
112
  variant="dark"
89
113
  >
90
- <svg
91
- aria-hidden="true"
92
- className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
93
- focusable="false"
94
- viewBox="0 0 24 24"
114
+ <ForwardRef(SvgIcon)
115
+ className="govgr-svg-icon--check"
116
+ variant="dark"
95
117
  >
96
- <polygon
97
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
98
- />
99
- </svg>
100
- </ForwardRef(UncheckIcon)>
118
+ <svg
119
+ aria-hidden="true"
120
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
121
+ focusable="false"
122
+ viewBox="0 0 24 24"
123
+ >
124
+ <polygon
125
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
126
+ />
127
+ </svg>
128
+ </ForwardRef(SvgIcon)>
129
+ </ForwardRef(UnCheckIcon)>
101
130
  `;
102
131
 
103
132
  exports[`renders the UncheckIcon with prop variant=error 1`] = `
104
- <ForwardRef(UncheckIcon)
133
+ <ForwardRef(UnCheckIcon)
105
134
  variant="error"
106
135
  >
107
- <svg
108
- aria-hidden="true"
109
- className="govgr-svg-icon--error govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
110
- focusable="false"
111
- viewBox="0 0 24 24"
136
+ <ForwardRef(SvgIcon)
137
+ className="govgr-svg-icon--check"
138
+ variant="error"
112
139
  >
113
- <polygon
114
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
115
- />
116
- </svg>
117
- </ForwardRef(UncheckIcon)>
140
+ <svg
141
+ aria-hidden="true"
142
+ className="govgr-svg-icon--error govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
143
+ focusable="false"
144
+ viewBox="0 0 24 24"
145
+ >
146
+ <polygon
147
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
148
+ />
149
+ </svg>
150
+ </ForwardRef(SvgIcon)>
151
+ </ForwardRef(UnCheckIcon)>
118
152
  `;
119
153
 
120
154
  exports[`renders the UncheckIcon with prop variant=error and size= xl 1`] = `
121
- <ForwardRef(UncheckIcon)
155
+ <ForwardRef(UnCheckIcon)
122
156
  size="xl"
123
157
  variant="warning"
124
158
  >
125
- <svg
126
- aria-hidden="true"
127
- className="govgr-svg-icon--warning govgr-svg-icon--xl govgr-svg-icon govgr-svg-icon--uncheck"
128
- focusable="false"
129
- viewBox="0 0 24 24"
159
+ <ForwardRef(SvgIcon)
160
+ className="govgr-svg-icon--check"
161
+ size="xl"
162
+ variant="warning"
130
163
  >
131
- <polygon
132
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
133
- />
134
- </svg>
135
- </ForwardRef(UncheckIcon)>
164
+ <svg
165
+ aria-hidden="true"
166
+ className="govgr-svg-icon--warning govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
167
+ focusable="false"
168
+ viewBox="0 0 24 24"
169
+ >
170
+ <polygon
171
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
172
+ />
173
+ </svg>
174
+ </ForwardRef(SvgIcon)>
175
+ </ForwardRef(UnCheckIcon)>
136
176
  `;
137
177
 
138
178
  exports[`renders the UncheckIcon with prop variant=focus 1`] = `
139
- <ForwardRef(UncheckIcon)
179
+ <ForwardRef(UnCheckIcon)
140
180
  variant="focus"
141
181
  >
142
- <svg
143
- aria-hidden="true"
144
- className="govgr-svg-icon--focus govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
145
- focusable="false"
146
- viewBox="0 0 24 24"
182
+ <ForwardRef(SvgIcon)
183
+ className="govgr-svg-icon--check"
184
+ variant="focus"
147
185
  >
148
- <polygon
149
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
150
- />
151
- </svg>
152
- </ForwardRef(UncheckIcon)>
186
+ <svg
187
+ aria-hidden="true"
188
+ className="govgr-svg-icon--focus govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
189
+ focusable="false"
190
+ viewBox="0 0 24 24"
191
+ >
192
+ <polygon
193
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
194
+ />
195
+ </svg>
196
+ </ForwardRef(SvgIcon)>
197
+ </ForwardRef(UnCheckIcon)>
153
198
  `;
154
199
 
155
200
  exports[`renders the UncheckIcon with prop variant=gray 1`] = `
156
- <ForwardRef(UncheckIcon)
201
+ <ForwardRef(UnCheckIcon)
157
202
  variant="gray"
158
203
  >
159
- <svg
160
- aria-hidden="true"
161
- className="govgr-svg-icon--gray govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
162
- focusable="false"
163
- viewBox="0 0 24 24"
204
+ <ForwardRef(SvgIcon)
205
+ className="govgr-svg-icon--check"
206
+ variant="gray"
164
207
  >
165
- <polygon
166
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
167
- />
168
- </svg>
169
- </ForwardRef(UncheckIcon)>
208
+ <svg
209
+ aria-hidden="true"
210
+ className="govgr-svg-icon--gray govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
211
+ focusable="false"
212
+ viewBox="0 0 24 24"
213
+ >
214
+ <polygon
215
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
216
+ />
217
+ </svg>
218
+ </ForwardRef(SvgIcon)>
219
+ </ForwardRef(UnCheckIcon)>
170
220
  `;
171
221
 
172
222
  exports[`renders the UncheckIcon with prop variant=light 1`] = `
173
- <ForwardRef(UncheckIcon)
223
+ <ForwardRef(UnCheckIcon)
174
224
  variant="light"
175
225
  >
176
- <svg
177
- aria-hidden="true"
178
- className="govgr-svg-icon--light govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
179
- focusable="false"
180
- viewBox="0 0 24 24"
226
+ <ForwardRef(SvgIcon)
227
+ className="govgr-svg-icon--check"
228
+ variant="light"
181
229
  >
182
- <polygon
183
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
184
- />
185
- </svg>
186
- </ForwardRef(UncheckIcon)>
230
+ <svg
231
+ aria-hidden="true"
232
+ className="govgr-svg-icon--light govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
233
+ focusable="false"
234
+ viewBox="0 0 24 24"
235
+ >
236
+ <polygon
237
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
238
+ />
239
+ </svg>
240
+ </ForwardRef(SvgIcon)>
241
+ </ForwardRef(UnCheckIcon)>
187
242
  `;
188
243
 
189
244
  exports[`renders the UncheckIcon with prop variant=primary 1`] = `
190
- <ForwardRef(UncheckIcon)
245
+ <ForwardRef(UnCheckIcon)
191
246
  variant="primary"
192
247
  >
193
- <svg
194
- aria-hidden="true"
195
- className="govgr-svg-icon--primary govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
196
- focusable="false"
197
- viewBox="0 0 24 24"
248
+ <ForwardRef(SvgIcon)
249
+ className="govgr-svg-icon--check"
250
+ variant="primary"
198
251
  >
199
- <polygon
200
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
201
- />
202
- </svg>
203
- </ForwardRef(UncheckIcon)>
252
+ <svg
253
+ aria-hidden="true"
254
+ className="govgr-svg-icon--primary govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
255
+ focusable="false"
256
+ viewBox="0 0 24 24"
257
+ >
258
+ <polygon
259
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
260
+ />
261
+ </svg>
262
+ </ForwardRef(SvgIcon)>
263
+ </ForwardRef(UnCheckIcon)>
204
264
  `;
205
265
 
206
266
  exports[`renders the UncheckIcon with prop variant=success 1`] = `
207
- <ForwardRef(UncheckIcon)
267
+ <ForwardRef(UnCheckIcon)
208
268
  variant="success"
209
269
  >
210
- <svg
211
- aria-hidden="true"
212
- className="govgr-svg-icon--success govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
213
- focusable="false"
214
- viewBox="0 0 24 24"
270
+ <ForwardRef(SvgIcon)
271
+ className="govgr-svg-icon--check"
272
+ variant="success"
215
273
  >
216
- <polygon
217
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
218
- />
219
- </svg>
220
- </ForwardRef(UncheckIcon)>
274
+ <svg
275
+ aria-hidden="true"
276
+ className="govgr-svg-icon--success govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
277
+ focusable="false"
278
+ viewBox="0 0 24 24"
279
+ >
280
+ <polygon
281
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
282
+ />
283
+ </svg>
284
+ </ForwardRef(SvgIcon)>
285
+ </ForwardRef(UnCheckIcon)>
221
286
  `;
222
287
 
223
288
  exports[`renders the UncheckIcon with prop variant=warning 1`] = `
224
- <ForwardRef(UncheckIcon)
289
+ <ForwardRef(UnCheckIcon)
225
290
  variant="warning"
226
291
  >
227
- <svg
228
- aria-hidden="true"
229
- className="govgr-svg-icon--warning govgr-svg-icon--m govgr-svg-icon govgr-svg-icon--uncheck"
230
- focusable="false"
231
- viewBox="0 0 24 24"
292
+ <ForwardRef(SvgIcon)
293
+ className="govgr-svg-icon--check"
294
+ variant="warning"
232
295
  >
233
- <polygon
234
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
235
- />
236
- </svg>
237
- </ForwardRef(UncheckIcon)>
296
+ <svg
297
+ aria-hidden="true"
298
+ className="govgr-svg-icon--warning govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
299
+ focusable="false"
300
+ viewBox="0 0 24 24"
301
+ >
302
+ <polygon
303
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
304
+ />
305
+ </svg>
306
+ </ForwardRef(SvgIcon)>
307
+ </ForwardRef(UnCheckIcon)>
238
308
  `;
239
309
 
240
310
  exports[`renders the UncheckIcon with prop variant=warning and size=s 1`] = `
241
- <ForwardRef(UncheckIcon)
311
+ <ForwardRef(UnCheckIcon)
242
312
  size="s"
243
313
  variant="warning"
244
314
  >
245
- <svg
246
- aria-hidden="true"
247
- className="govgr-svg-icon--warning govgr-svg-icon--s govgr-svg-icon govgr-svg-icon--uncheck"
248
- focusable="false"
249
- viewBox="0 0 24 24"
315
+ <ForwardRef(SvgIcon)
316
+ className="govgr-svg-icon--check"
317
+ size="s"
318
+ variant="warning"
250
319
  >
251
- <polygon
252
- points="21.7,4.7 19.3,2.3 12,9.7 4.7,2.3 2.3,4.7 9.7,12 2.3,19.3 4.7,21.7 12,14.3 19.3,21.7 21.7,19.3 14.3,12 "
253
- />
254
- </svg>
255
- </ForwardRef(UncheckIcon)>
320
+ <svg
321
+ aria-hidden="true"
322
+ className="govgr-svg-icon--warning govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
323
+ focusable="false"
324
+ viewBox="0 0 24 24"
325
+ >
326
+ <polygon
327
+ points="20.59 5.74 18.26 3.41 12 9.67 5.742 3.41 3.41 5.74 9.67 12 3.41 18.26 5.74 20.6 12 14.33 18.26 20.59 20.59 18.26 14.33 12 20.59 5.74"
328
+ />
329
+ </svg>
330
+ </ForwardRef(SvgIcon)>
331
+ </ForwardRef(UnCheckIcon)>
256
332
  `;
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
3
  var _excluded = ["size", "variant", "className"];
5
- import React, { useEffect, useState } from 'react';
4
+ import React from 'react';
5
+ import SvgIcon from '@digigov/react-core/SvgIcon';
6
6
  import clsx from 'clsx';
7
7
 
8
8
  var _ref2 = /*#__PURE__*/React.createElement("polygon", {
@@ -10,36 +10,19 @@ var _ref2 = /*#__PURE__*/React.createElement("polygon", {
10
10
  });
11
11
 
12
12
  /**
13
- * Use UncheckIcon component when you need a uncheck/decline icon.
13
+ * Use UnunCheckIcon component when you need a uncheck/decline icon.
14
14
  */
15
- export var UncheckIcon = /*#__PURE__*/React.forwardRef(function UncheckIcon(_ref, ref) {
16
- var _ref$size = _ref.size,
17
- size = _ref$size === void 0 ? 'm' : _ref$size,
18
- _ref$variant = _ref.variant,
19
- variant = _ref$variant === void 0 ? 'dark' : _ref$variant,
15
+ export var UnCheckIcon = /*#__PURE__*/React.forwardRef(function UnCheckIcon(_ref, ref) {
16
+ var size = _ref.size,
17
+ variant = _ref.variant,
20
18
  className = _ref.className,
21
19
  props = _objectWithoutProperties(_ref, _excluded);
22
20
 
23
- var _useState = useState(size),
24
- _useState2 = _slicedToArray(_useState, 2),
25
- uncheckSize = _useState2[0],
26
- setSize = _useState2[1];
27
-
28
- var _useState3 = useState(variant),
29
- _useState4 = _slicedToArray(_useState3, 2),
30
- uncheckVariant = _useState4[0],
31
- setVariant = _useState4[1];
32
-
33
- useEffect(function () {
34
- setSize(size);
35
- setVariant(variant);
36
- }, [size, variant]);
37
- return /*#__PURE__*/React.createElement("svg", _extends({
38
- ref: ref,
39
- className: clsx(uncheckVariant === 'success' && 'govgr-svg-icon--success', uncheckVariant === 'primary' && 'govgr-svg-icon--primary', uncheckVariant === 'warning' && 'govgr-svg-icon--warning', uncheckVariant === 'light' && 'govgr-svg-icon--light', uncheckVariant === 'error' && 'govgr-svg-icon--error', uncheckVariant === 'focus' && 'govgr-svg-icon--focus', uncheckVariant === 'dark' && 'govgr-svg-icon--dark', uncheckVariant === 'gray' && 'govgr-svg-icon--gray', uncheckVariant === 'link' && 'govgr-svg-icon--link', uncheckSize === 'xl' && 'govgr-svg-icon--xl', uncheckSize === 's' && 'govgr-svg-icon--s', uncheckSize === 'm' && 'govgr-svg-icon--m', uncheckSize === 'l' && 'govgr-svg-icon--l', className && className, true && ['govgr-svg-icon', 'govgr-svg-icon--uncheck']),
40
- focusable: "false",
41
- viewBox: "0 0 24 24",
42
- "aria-hidden": "true"
21
+ return /*#__PURE__*/React.createElement(SvgIcon, _extends({
22
+ size: size,
23
+ variant: variant,
24
+ className: clsx(className && className, true && 'govgr-svg-icon--check'),
25
+ ref: ref
43
26
  }, props), _ref2);
44
27
  });
45
- export default UncheckIcon;
28
+ export default UnCheckIcon;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v0.6.1
1
+ /** @license Digigov v0.6.4
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -42,6 +42,9 @@ export { default as DateInputItem } from '@digigov/react-core/DateInputItem';
42
42
  export { default as Details } from '@digigov/react-core/Details';
43
43
  export { default as DetailsContent } from '@digigov/react-core/DetailsContent';
44
44
  export { default as DetailsSummary } from '@digigov/react-core/DetailsSummary';
45
+ export { default as Dropdown } from '@digigov/react-core/Dropdown';
46
+ export { default as DropdownButton } from '@digigov/react-core/DropdownButton';
47
+ export { default as DropdownContent } from '@digigov/react-core/DropdownContent';
45
48
  export { default as ErrorMessage } from '@digigov/react-core/ErrorMessage';
46
49
  export { default as ErrorSummary } from '@digigov/react-core/ErrorSummary';
47
50
  export { default as Fieldset } from '@digigov/react-core/Fieldset';
@@ -119,6 +122,7 @@ export { default as SummaryListItem } from '@digigov/react-core/SummaryListItem'
119
122
  export { default as SummaryListItemAction } from '@digigov/react-core/SummaryListItemAction';
120
123
  export { default as SummaryListItemKey } from '@digigov/react-core/SummaryListItemKey';
121
124
  export { default as SummaryListItemValue } from '@digigov/react-core/SummaryListItemValue';
125
+ export { default as SvgIcon } from '@digigov/react-core/SvgIcon';
122
126
  export { default as Table } from '@digigov/react-core/Table';
123
127
  export { default as TableBody } from '@digigov/react-core/TableBody';
124
128
  export { default as TableCaption } from '@digigov/react-core/TableCaption';
package/index.d.ts CHANGED
@@ -37,6 +37,9 @@ export { default as DateInputItem } from '@digigov/react-core/DateInputItem';
37
37
  export { default as Details } from '@digigov/react-core/Details';
38
38
  export { default as DetailsContent } from '@digigov/react-core/DetailsContent';
39
39
  export { default as DetailsSummary } from '@digigov/react-core/DetailsSummary';
40
+ export { default as Dropdown } from '@digigov/react-core/Dropdown';
41
+ export { default as DropdownButton } from '@digigov/react-core/DropdownButton';
42
+ export { default as DropdownContent } from '@digigov/react-core/DropdownContent';
40
43
  export { default as ErrorMessage } from '@digigov/react-core/ErrorMessage';
41
44
  export { default as ErrorSummary } from '@digigov/react-core/ErrorSummary';
42
45
  export { default as Fieldset } from '@digigov/react-core/Fieldset';
@@ -114,6 +117,7 @@ export { default as SummaryListItem } from '@digigov/react-core/SummaryListItem'
114
117
  export { default as SummaryListItemAction } from '@digigov/react-core/SummaryListItemAction';
115
118
  export { default as SummaryListItemKey } from '@digigov/react-core/SummaryListItemKey';
116
119
  export { default as SummaryListItemValue } from '@digigov/react-core/SummaryListItemValue';
120
+ export { default as SvgIcon } from '@digigov/react-core/SvgIcon';
117
121
  export { default as Table } from '@digigov/react-core/Table';
118
122
  export { default as TableBody } from '@digigov/react-core/TableBody';
119
123
  export { default as TableCaption } from '@digigov/react-core/TableCaption';
package/index.js CHANGED
@@ -233,6 +233,24 @@ Object.defineProperty(exports, "DetailsSummary", {
233
233
  return _DetailsSummary["default"];
234
234
  }
235
235
  });
236
+ Object.defineProperty(exports, "Dropdown", {
237
+ enumerable: true,
238
+ get: function get() {
239
+ return _Dropdown["default"];
240
+ }
241
+ });
242
+ Object.defineProperty(exports, "DropdownButton", {
243
+ enumerable: true,
244
+ get: function get() {
245
+ return _DropdownButton["default"];
246
+ }
247
+ });
248
+ Object.defineProperty(exports, "DropdownContent", {
249
+ enumerable: true,
250
+ get: function get() {
251
+ return _DropdownContent["default"];
252
+ }
253
+ });
236
254
  Object.defineProperty(exports, "ErrorMessage", {
237
255
  enumerable: true,
238
256
  get: function get() {
@@ -695,6 +713,12 @@ Object.defineProperty(exports, "SummaryListItemValue", {
695
713
  return _SummaryListItemValue["default"];
696
714
  }
697
715
  });
716
+ Object.defineProperty(exports, "SvgIcon", {
717
+ enumerable: true,
718
+ get: function get() {
719
+ return _SvgIcon["default"];
720
+ }
721
+ });
698
722
  Object.defineProperty(exports, "Table", {
699
723
  enumerable: true,
700
724
  get: function get() {
@@ -882,6 +906,12 @@ var _DetailsContent = _interopRequireDefault(require("@digigov/react-core/Detail
882
906
 
883
907
  var _DetailsSummary = _interopRequireDefault(require("@digigov/react-core/DetailsSummary"));
884
908
 
909
+ var _Dropdown = _interopRequireDefault(require("@digigov/react-core/Dropdown"));
910
+
911
+ var _DropdownButton = _interopRequireDefault(require("@digigov/react-core/DropdownButton"));
912
+
913
+ var _DropdownContent = _interopRequireDefault(require("@digigov/react-core/DropdownContent"));
914
+
885
915
  var _ErrorMessage = _interopRequireDefault(require("@digigov/react-core/ErrorMessage"));
886
916
 
887
917
  var _ErrorSummary = _interopRequireDefault(require("@digigov/react-core/ErrorSummary"));
@@ -1036,6 +1066,8 @@ var _SummaryListItemKey = _interopRequireDefault(require("@digigov/react-core/Su
1036
1066
 
1037
1067
  var _SummaryListItemValue = _interopRequireDefault(require("@digigov/react-core/SummaryListItemValue"));
1038
1068
 
1069
+ var _SvgIcon = _interopRequireDefault(require("@digigov/react-core/SvgIcon"));
1070
+
1039
1071
  var _Table = _interopRequireDefault(require("@digigov/react-core/Table"));
1040
1072
 
1041
1073
  var _TableBody = _interopRequireDefault(require("@digigov/react-core/TableBody"));