@digigov/react-core 0.6.0 → 0.6.3

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 +21 -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
@@ -2,16 +2,18 @@
2
2
 
3
3
  exports[`renders the CheckIcon with no props 1`] = `
4
4
  <ForwardRef(CheckIcon)>
5
- <svg
6
- aria-hidden="true"
7
- className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
8
- focusable="false"
9
- viewBox="0 0 24 24"
10
- >
11
- <polygon
12
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
13
- />
14
- </svg>
5
+ <ForwardRef(SvgIcon)>
6
+ <svg
7
+ aria-hidden="true"
8
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
9
+ focusable="false"
10
+ viewBox="0 0 24 24"
11
+ >
12
+ <polygon
13
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
14
+ />
15
+ </svg>
16
+ </ForwardRef(SvgIcon)>
15
17
  </ForwardRef(CheckIcon)>
16
18
  `;
17
19
 
@@ -19,16 +21,20 @@ exports[`renders the CheckIcon with prop size=l 1`] = `
19
21
  <ForwardRef(CheckIcon)
20
22
  size="l"
21
23
  >
22
- <svg
23
- aria-hidden="true"
24
- className="govgr-svg-icon--dark govgr-svg-icon--l govgr-svg-icon--check govgr-svg-icon"
25
- focusable="false"
26
- viewBox="0 0 24 24"
24
+ <ForwardRef(SvgIcon)
25
+ size="l"
27
26
  >
28
- <polygon
29
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
30
- />
31
- </svg>
27
+ <svg
28
+ aria-hidden="true"
29
+ className="govgr-svg-icon--dark govgr-svg-icon--l govgr-svg-icon--check govgr-svg-icon"
30
+ focusable="false"
31
+ viewBox="0 0 24 24"
32
+ >
33
+ <polygon
34
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
35
+ />
36
+ </svg>
37
+ </ForwardRef(SvgIcon)>
32
38
  </ForwardRef(CheckIcon)>
33
39
  `;
34
40
 
@@ -36,16 +42,20 @@ exports[`renders the CheckIcon with prop size=m 1`] = `
36
42
  <ForwardRef(CheckIcon)
37
43
  size="m"
38
44
  >
39
- <svg
40
- aria-hidden="true"
41
- className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
42
- focusable="false"
43
- viewBox="0 0 24 24"
45
+ <ForwardRef(SvgIcon)
46
+ size="m"
44
47
  >
45
- <polygon
46
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
47
- />
48
- </svg>
48
+ <svg
49
+ aria-hidden="true"
50
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
51
+ focusable="false"
52
+ viewBox="0 0 24 24"
53
+ >
54
+ <polygon
55
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
56
+ />
57
+ </svg>
58
+ </ForwardRef(SvgIcon)>
49
59
  </ForwardRef(CheckIcon)>
50
60
  `;
51
61
 
@@ -53,16 +63,20 @@ exports[`renders the CheckIcon with prop size=s 1`] = `
53
63
  <ForwardRef(CheckIcon)
54
64
  size="s"
55
65
  >
56
- <svg
57
- aria-hidden="true"
58
- className="govgr-svg-icon--dark govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
59
- focusable="false"
60
- viewBox="0 0 24 24"
66
+ <ForwardRef(SvgIcon)
67
+ size="s"
61
68
  >
62
- <polygon
63
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
64
- />
65
- </svg>
69
+ <svg
70
+ aria-hidden="true"
71
+ className="govgr-svg-icon--dark govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
72
+ focusable="false"
73
+ viewBox="0 0 24 24"
74
+ >
75
+ <polygon
76
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
77
+ />
78
+ </svg>
79
+ </ForwardRef(SvgIcon)>
66
80
  </ForwardRef(CheckIcon)>
67
81
  `;
68
82
 
@@ -70,16 +84,20 @@ exports[`renders the CheckIcon with prop size=xl 1`] = `
70
84
  <ForwardRef(CheckIcon)
71
85
  size="xl"
72
86
  >
73
- <svg
74
- aria-hidden="true"
75
- className="govgr-svg-icon--dark govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
76
- focusable="false"
77
- viewBox="0 0 24 24"
87
+ <ForwardRef(SvgIcon)
88
+ size="xl"
78
89
  >
79
- <polygon
80
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
81
- />
82
- </svg>
90
+ <svg
91
+ aria-hidden="true"
92
+ className="govgr-svg-icon--dark govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
93
+ focusable="false"
94
+ viewBox="0 0 24 24"
95
+ >
96
+ <polygon
97
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
98
+ />
99
+ </svg>
100
+ </ForwardRef(SvgIcon)>
83
101
  </ForwardRef(CheckIcon)>
84
102
  `;
85
103
 
@@ -87,16 +105,20 @@ exports[`renders the CheckIcon with prop variant=dark 1`] = `
87
105
  <ForwardRef(CheckIcon)
88
106
  variant="dark"
89
107
  >
90
- <svg
91
- aria-hidden="true"
92
- className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
93
- focusable="false"
94
- viewBox="0 0 24 24"
108
+ <ForwardRef(SvgIcon)
109
+ variant="dark"
95
110
  >
96
- <polygon
97
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
98
- />
99
- </svg>
111
+ <svg
112
+ aria-hidden="true"
113
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
114
+ focusable="false"
115
+ viewBox="0 0 24 24"
116
+ >
117
+ <polygon
118
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
119
+ />
120
+ </svg>
121
+ </ForwardRef(SvgIcon)>
100
122
  </ForwardRef(CheckIcon)>
101
123
  `;
102
124
 
@@ -104,16 +126,20 @@ exports[`renders the CheckIcon with prop variant=error 1`] = `
104
126
  <ForwardRef(CheckIcon)
105
127
  variant="error"
106
128
  >
107
- <svg
108
- aria-hidden="true"
109
- className="govgr-svg-icon--error govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
110
- focusable="false"
111
- viewBox="0 0 24 24"
129
+ <ForwardRef(SvgIcon)
130
+ variant="error"
112
131
  >
113
- <polygon
114
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
115
- />
116
- </svg>
132
+ <svg
133
+ aria-hidden="true"
134
+ className="govgr-svg-icon--error govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
135
+ focusable="false"
136
+ viewBox="0 0 24 24"
137
+ >
138
+ <polygon
139
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
140
+ />
141
+ </svg>
142
+ </ForwardRef(SvgIcon)>
117
143
  </ForwardRef(CheckIcon)>
118
144
  `;
119
145
 
@@ -122,16 +148,21 @@ exports[`renders the CheckIcon with prop variant=error and size= xl 1`] = `
122
148
  size="xl"
123
149
  variant="warning"
124
150
  >
125
- <svg
126
- aria-hidden="true"
127
- className="govgr-svg-icon--warning govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
128
- focusable="false"
129
- viewBox="0 0 24 24"
151
+ <ForwardRef(SvgIcon)
152
+ size="xl"
153
+ variant="warning"
130
154
  >
131
- <polygon
132
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
133
- />
134
- </svg>
155
+ <svg
156
+ aria-hidden="true"
157
+ className="govgr-svg-icon--warning govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
158
+ focusable="false"
159
+ viewBox="0 0 24 24"
160
+ >
161
+ <polygon
162
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
163
+ />
164
+ </svg>
165
+ </ForwardRef(SvgIcon)>
135
166
  </ForwardRef(CheckIcon)>
136
167
  `;
137
168
 
@@ -139,16 +170,20 @@ exports[`renders the CheckIcon with prop variant=focus 1`] = `
139
170
  <ForwardRef(CheckIcon)
140
171
  variant="focus"
141
172
  >
142
- <svg
143
- aria-hidden="true"
144
- className="govgr-svg-icon--focus govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
145
- focusable="false"
146
- viewBox="0 0 24 24"
173
+ <ForwardRef(SvgIcon)
174
+ variant="focus"
147
175
  >
148
- <polygon
149
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
150
- />
151
- </svg>
176
+ <svg
177
+ aria-hidden="true"
178
+ className="govgr-svg-icon--focus govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
179
+ focusable="false"
180
+ viewBox="0 0 24 24"
181
+ >
182
+ <polygon
183
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
184
+ />
185
+ </svg>
186
+ </ForwardRef(SvgIcon)>
152
187
  </ForwardRef(CheckIcon)>
153
188
  `;
154
189
 
@@ -156,16 +191,20 @@ exports[`renders the CheckIcon with prop variant=gray 1`] = `
156
191
  <ForwardRef(CheckIcon)
157
192
  variant="gray"
158
193
  >
159
- <svg
160
- aria-hidden="true"
161
- className="govgr-svg-icon--gray govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
162
- focusable="false"
163
- viewBox="0 0 24 24"
194
+ <ForwardRef(SvgIcon)
195
+ variant="gray"
164
196
  >
165
- <polygon
166
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
167
- />
168
- </svg>
197
+ <svg
198
+ aria-hidden="true"
199
+ className="govgr-svg-icon--gray govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
200
+ focusable="false"
201
+ viewBox="0 0 24 24"
202
+ >
203
+ <polygon
204
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
205
+ />
206
+ </svg>
207
+ </ForwardRef(SvgIcon)>
169
208
  </ForwardRef(CheckIcon)>
170
209
  `;
171
210
 
@@ -173,16 +212,20 @@ exports[`renders the CheckIcon with prop variant=light 1`] = `
173
212
  <ForwardRef(CheckIcon)
174
213
  variant="light"
175
214
  >
176
- <svg
177
- aria-hidden="true"
178
- className="govgr-svg-icon--light govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
179
- focusable="false"
180
- viewBox="0 0 24 24"
215
+ <ForwardRef(SvgIcon)
216
+ variant="light"
181
217
  >
182
- <polygon
183
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
184
- />
185
- </svg>
218
+ <svg
219
+ aria-hidden="true"
220
+ className="govgr-svg-icon--light govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
221
+ focusable="false"
222
+ viewBox="0 0 24 24"
223
+ >
224
+ <polygon
225
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
226
+ />
227
+ </svg>
228
+ </ForwardRef(SvgIcon)>
186
229
  </ForwardRef(CheckIcon)>
187
230
  `;
188
231
 
@@ -190,16 +233,20 @@ exports[`renders the CheckIcon with prop variant=primary 1`] = `
190
233
  <ForwardRef(CheckIcon)
191
234
  variant="primary"
192
235
  >
193
- <svg
194
- aria-hidden="true"
195
- className="govgr-svg-icon--primary govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
196
- focusable="false"
197
- viewBox="0 0 24 24"
236
+ <ForwardRef(SvgIcon)
237
+ variant="primary"
198
238
  >
199
- <polygon
200
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
201
- />
202
- </svg>
239
+ <svg
240
+ aria-hidden="true"
241
+ className="govgr-svg-icon--primary govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
242
+ focusable="false"
243
+ viewBox="0 0 24 24"
244
+ >
245
+ <polygon
246
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
247
+ />
248
+ </svg>
249
+ </ForwardRef(SvgIcon)>
203
250
  </ForwardRef(CheckIcon)>
204
251
  `;
205
252
 
@@ -207,16 +254,20 @@ exports[`renders the CheckIcon with prop variant=success 1`] = `
207
254
  <ForwardRef(CheckIcon)
208
255
  variant="success"
209
256
  >
210
- <svg
211
- aria-hidden="true"
212
- className="govgr-svg-icon--success govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
213
- focusable="false"
214
- viewBox="0 0 24 24"
257
+ <ForwardRef(SvgIcon)
258
+ variant="success"
215
259
  >
216
- <polygon
217
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
218
- />
219
- </svg>
260
+ <svg
261
+ aria-hidden="true"
262
+ className="govgr-svg-icon--success govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
263
+ focusable="false"
264
+ viewBox="0 0 24 24"
265
+ >
266
+ <polygon
267
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
268
+ />
269
+ </svg>
270
+ </ForwardRef(SvgIcon)>
220
271
  </ForwardRef(CheckIcon)>
221
272
  `;
222
273
 
@@ -224,16 +275,20 @@ exports[`renders the CheckIcon with prop variant=warning 1`] = `
224
275
  <ForwardRef(CheckIcon)
225
276
  variant="warning"
226
277
  >
227
- <svg
228
- aria-hidden="true"
229
- className="govgr-svg-icon--warning govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
230
- focusable="false"
231
- viewBox="0 0 24 24"
278
+ <ForwardRef(SvgIcon)
279
+ variant="warning"
232
280
  >
233
- <polygon
234
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
235
- />
236
- </svg>
281
+ <svg
282
+ aria-hidden="true"
283
+ className="govgr-svg-icon--warning govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
284
+ focusable="false"
285
+ viewBox="0 0 24 24"
286
+ >
287
+ <polygon
288
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
289
+ />
290
+ </svg>
291
+ </ForwardRef(SvgIcon)>
237
292
  </ForwardRef(CheckIcon)>
238
293
  `;
239
294
 
@@ -242,15 +297,20 @@ exports[`renders the CheckIcon with prop variant=warning and size=s 1`] = `
242
297
  size="s"
243
298
  variant="warning"
244
299
  >
245
- <svg
246
- aria-hidden="true"
247
- className="govgr-svg-icon--warning govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
248
- focusable="false"
249
- viewBox="0 0 24 24"
300
+ <ForwardRef(SvgIcon)
301
+ size="s"
302
+ variant="warning"
250
303
  >
251
- <polygon
252
- points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
253
- />
254
- </svg>
304
+ <svg
305
+ aria-hidden="true"
306
+ className="govgr-svg-icon--warning govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
307
+ focusable="false"
308
+ viewBox="0 0 24 24"
309
+ >
310
+ <polygon
311
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
312
+ />
313
+ </svg>
314
+ </ForwardRef(SvgIcon)>
255
315
  </ForwardRef(CheckIcon)>
256
316
  `;
@@ -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", {
@@ -13,33 +13,16 @@ var _ref2 = /*#__PURE__*/React.createElement("polygon", {
13
13
  * Use CheckIcon component when you need a check icon.
14
14
  */
15
15
  export var CheckIcon = /*#__PURE__*/React.forwardRef(function CheckIcon(_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,
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
- checkSize = _useState2[0],
26
- setSize = _useState2[1];
27
-
28
- var _useState3 = useState(variant),
29
- _useState4 = _slicedToArray(_useState3, 2),
30
- checkVariant = _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(checkVariant === 'success' && 'govgr-svg-icon--success', checkVariant === 'primary' && 'govgr-svg-icon--primary', checkVariant === 'warning' && 'govgr-svg-icon--warning', checkVariant === 'light' && 'govgr-svg-icon--light', checkVariant === 'error' && 'govgr-svg-icon--error', checkVariant === 'focus' && 'govgr-svg-icon--focus', checkVariant === 'dark' && 'govgr-svg-icon--dark', checkVariant === 'gray' && 'govgr-svg-icon--gray', checkVariant === 'link' && 'govgr-svg-icon--link', checkSize === 'xl' && 'govgr-svg-icon--xl', checkSize === 's' && 'govgr-svg-icon--s', checkSize === 'm' && 'govgr-svg-icon--m', checkSize === 'l' && 'govgr-svg-icon--l', className && className, true && ['govgr-svg-icon--check', 'govgr-svg-icon']),
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
28
  export default CheckIcon;
@@ -2,15 +2,19 @@
2
2
 
3
3
  exports[`renders the CloseIcon with no props 1`] = `
4
4
  <ForwardRef(CloseIcon)>
5
- <svg
6
- aria-hidden="true"
5
+ <ForwardRef(SvgIcon)
7
6
  className="govgr-close-icon"
8
- focusable="false"
9
- viewBox="0 0 24 24"
10
7
  >
11
- <polygon
12
- points="14.4,11.8 22,4.2 19.7,1.8 12,9.4 4.4,1.8 2,4.2 9.7,11.9 2.1,19.5 4.4,21.9 12.1,14.3 19.7,21.9 22.1,19.5 "
13
- />
14
- </svg>
8
+ <svg
9
+ aria-hidden="true"
10
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-close-icon govgr-svg-icon"
11
+ focusable="false"
12
+ viewBox="0 0 24 24"
13
+ >
14
+ <polygon
15
+ points="14.4,11.8 22,4.2 19.7,1.8 12,9.4 4.4,1.8 2,4.2 9.7,11.9 2.1,19.5 4.4,21.9 12.1,14.3 19.7,21.9 22.1,19.5 "
16
+ />
17
+ </svg>
18
+ </ForwardRef(SvgIcon)>
15
19
  </ForwardRef(CloseIcon)>
16
20
  `;
@@ -1,7 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["className"];
3
+ var _excluded = ["size", "variant", "className"];
4
4
  import React from 'react';
5
+ import SvgIcon from '@digigov/react-core/SvgIcon';
5
6
  import clsx from 'clsx';
6
7
 
7
8
  var _ref2 = /*#__PURE__*/React.createElement("polygon", {
@@ -13,15 +14,16 @@ var _ref2 = /*#__PURE__*/React.createElement("polygon", {
13
14
  * CloseIcon component can be used for dismissing contents
14
15
  */
15
16
  export var CloseIcon = /*#__PURE__*/React.forwardRef(function CloseIcon(_ref, ref) {
16
- var className = _ref.className,
17
+ var size = _ref.size,
18
+ variant = _ref.variant,
19
+ className = _ref.className,
17
20
  props = _objectWithoutProperties(_ref, _excluded);
18
21
 
19
- return /*#__PURE__*/React.createElement("svg", _extends({
20
- ref: ref,
22
+ return /*#__PURE__*/React.createElement(SvgIcon, _extends({
23
+ size: size,
24
+ variant: variant,
21
25
  className: clsx(className && className, true && 'govgr-close-icon'),
22
- focusable: "false",
23
- viewBox: "0 0 24 24",
24
- "aria-hidden": "true"
26
+ ref: ref
25
27
  }, props), _ref2);
26
28
  });
27
29
  export default CloseIcon;