@digigov/react-core 0.6.1 → 0.6.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.
Files changed (83) 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 +9 -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/FieldsetLegend/index.d.ts +1 -1
  22. package/FileUpload/index.d.ts +1 -1
  23. package/Grid/index.d.ts +1 -1
  24. package/LabelTitle/index.d.ts +1 -1
  25. package/MoreVertIcon/__snapshots__/index.test.tsx.snap +391 -315
  26. package/MoreVertIcon/index.d.ts +7 -11
  27. package/MoreVertIcon/index.js +10 -34
  28. package/NormalText/index.d.ts +1 -1
  29. package/Paragraph/index.d.ts +1 -1
  30. package/RadioItem/index.d.ts +1 -1
  31. package/Select/index.d.ts +1 -1
  32. package/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  33. package/SvgIcon/index.d.ts +20 -0
  34. package/SvgIcon/index.js +41 -0
  35. package/SvgIcon/index.test.d.ts +1 -0
  36. package/SvgIcon/index.test.js +129 -0
  37. package/Table/index.d.ts +1 -1
  38. package/TextArea/index.d.ts +1 -1
  39. package/TextInput/index.d.ts +1 -1
  40. package/UncheckIcon/__snapshots__/index.test.tsx.snap +241 -165
  41. package/UncheckIcon/index.d.ts +9 -13
  42. package/UncheckIcon/index.js +15 -39
  43. package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +48 -32
  44. package/es/ArrowIcon/index.js +12 -19
  45. package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +323 -126
  46. package/es/BurgerIcon/index.js +12 -25
  47. package/es/BurgerIcon/index.test.js +47 -5
  48. package/es/CaretIcon/__snapshots__/index.test.tsx.snap +48 -32
  49. package/es/CaretIcon/index.js +12 -19
  50. package/es/CheckIcon/__snapshots__/index.test.tsx.snap +196 -136
  51. package/es/CheckIcon/index.js +9 -26
  52. package/es/CloseIcon/__snapshots__/index.test.tsx.snap +12 -8
  53. package/es/CloseIcon/index.js +9 -7
  54. package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +391 -315
  55. package/es/MoreVertIcon/index.js +9 -26
  56. package/es/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  57. package/es/SvgIcon/index.js +26 -0
  58. package/es/SvgIcon/index.test.js +123 -0
  59. package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +241 -165
  60. package/es/UncheckIcon/index.js +12 -29
  61. package/es/index.js +1 -0
  62. package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +48 -32
  63. package/esm/ArrowIcon/index.js +12 -19
  64. package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +323 -126
  65. package/esm/BurgerIcon/index.js +12 -25
  66. package/esm/BurgerIcon/index.test.js +47 -5
  67. package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +48 -32
  68. package/esm/CaretIcon/index.js +12 -19
  69. package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +196 -136
  70. package/esm/CheckIcon/index.js +9 -26
  71. package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +12 -8
  72. package/esm/CloseIcon/index.js +9 -7
  73. package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +391 -315
  74. package/esm/MoreVertIcon/index.js +9 -26
  75. package/esm/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  76. package/esm/SvgIcon/index.js +26 -0
  77. package/esm/SvgIcon/index.test.js +123 -0
  78. package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +241 -165
  79. package/esm/UncheckIcon/index.js +12 -29
  80. package/esm/index.js +2 -1
  81. package/index.d.ts +1 -0
  82. package/index.js +8 -0
  83. 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.2
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.
@@ -119,6 +119,7 @@ export { default as SummaryListItem } from '@digigov/react-core/SummaryListItem'
119
119
  export { default as SummaryListItemAction } from '@digigov/react-core/SummaryListItemAction';
120
120
  export { default as SummaryListItemKey } from '@digigov/react-core/SummaryListItemKey';
121
121
  export { default as SummaryListItemValue } from '@digigov/react-core/SummaryListItemValue';
122
+ export { default as SvgIcon } from '@digigov/react-core/SvgIcon';
122
123
  export { default as Table } from '@digigov/react-core/Table';
123
124
  export { default as TableBody } from '@digigov/react-core/TableBody';
124
125
  export { default as TableCaption } from '@digigov/react-core/TableCaption';
package/index.d.ts CHANGED
@@ -114,6 +114,7 @@ export { default as SummaryListItem } from '@digigov/react-core/SummaryListItem'
114
114
  export { default as SummaryListItemAction } from '@digigov/react-core/SummaryListItemAction';
115
115
  export { default as SummaryListItemKey } from '@digigov/react-core/SummaryListItemKey';
116
116
  export { default as SummaryListItemValue } from '@digigov/react-core/SummaryListItemValue';
117
+ export { default as SvgIcon } from '@digigov/react-core/SvgIcon';
117
118
  export { default as Table } from '@digigov/react-core/Table';
118
119
  export { default as TableBody } from '@digigov/react-core/TableBody';
119
120
  export { default as TableCaption } from '@digigov/react-core/TableCaption';
package/index.js CHANGED
@@ -695,6 +695,12 @@ Object.defineProperty(exports, "SummaryListItemValue", {
695
695
  return _SummaryListItemValue["default"];
696
696
  }
697
697
  });
698
+ Object.defineProperty(exports, "SvgIcon", {
699
+ enumerable: true,
700
+ get: function get() {
701
+ return _SvgIcon["default"];
702
+ }
703
+ });
698
704
  Object.defineProperty(exports, "Table", {
699
705
  enumerable: true,
700
706
  get: function get() {
@@ -1036,6 +1042,8 @@ var _SummaryListItemKey = _interopRequireDefault(require("@digigov/react-core/Su
1036
1042
 
1037
1043
  var _SummaryListItemValue = _interopRequireDefault(require("@digigov/react-core/SummaryListItemValue"));
1038
1044
 
1045
+ var _SvgIcon = _interopRequireDefault(require("@digigov/react-core/SvgIcon"));
1046
+
1039
1047
  var _Table = _interopRequireDefault(require("@digigov/react-core/Table"));
1040
1048
 
1041
1049
  var _TableBody = _interopRequireDefault(require("@digigov/react-core/TableBody"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/react-core",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "@digigov react core components",
5
5
  "author": "GRNET Developers <devs@lists.grnet.gr>",
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  "directory": "dist"
12
12
  },
13
13
  "peerDependencies": {
14
- "@digigov/css": "0.10.0",
14
+ "@digigov/css": "0.11.0",
15
15
  "clsx": "1.1.1",
16
16
  "react": "16.14.0",
17
17
  "react-dom": "16.14.0"