@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
@@ -1,88 +1,235 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the BurgerIcon prop hidden="l" 1`] = `
4
+ <ForwardRef(BurgerIcon)
5
+ hidden="l"
6
+ >
7
+ <ForwardRef(SvgIcon)
8
+ className="govgr-burger-icon--hidden-l govgr-burger-icon"
9
+ >
10
+ <svg
11
+ aria-hidden="true"
12
+ className="govgr-burger-icon--hidden-l govgr-burger-icon govgr-svg-icon"
13
+ focusable="false"
14
+ viewBox="0 0 24 24"
15
+ >
16
+ <rect
17
+ height="3.3"
18
+ id="govgr-burger-icon__line-1"
19
+ width="20"
20
+ />
21
+ <rect
22
+ height="3.3"
23
+ id="govgr-burger-icon__line-2"
24
+ width="20"
25
+ />
26
+ <rect
27
+ height="3.3"
28
+ id="govgr-burger-icon__line-3"
29
+ width="20"
30
+ />
31
+ </svg>
32
+ </ForwardRef(SvgIcon)>
33
+ </ForwardRef(BurgerIcon)>
34
+ `;
35
+
36
+ exports[`renders the BurgerIcon prop hidden="m" 1`] = `
37
+ <ForwardRef(BurgerIcon)
38
+ hidden="m"
39
+ >
40
+ <ForwardRef(SvgIcon)
41
+ className="govgr-burger-icon--hidden-m govgr-burger-icon"
42
+ >
43
+ <svg
44
+ aria-hidden="true"
45
+ className="govgr-burger-icon--hidden-m govgr-burger-icon govgr-svg-icon"
46
+ focusable="false"
47
+ viewBox="0 0 24 24"
48
+ >
49
+ <rect
50
+ height="3.3"
51
+ id="govgr-burger-icon__line-1"
52
+ width="20"
53
+ />
54
+ <rect
55
+ height="3.3"
56
+ id="govgr-burger-icon__line-2"
57
+ width="20"
58
+ />
59
+ <rect
60
+ height="3.3"
61
+ id="govgr-burger-icon__line-3"
62
+ width="20"
63
+ />
64
+ </svg>
65
+ </ForwardRef(SvgIcon)>
66
+ </ForwardRef(BurgerIcon)>
67
+ `;
68
+
69
+ exports[`renders the BurgerIcon prop hidden="s" 1`] = `
70
+ <ForwardRef(BurgerIcon)
71
+ hidden="s"
72
+ >
73
+ <ForwardRef(SvgIcon)
74
+ className="govgr-burger-icon--hidden-s govgr-burger-icon"
75
+ >
76
+ <svg
77
+ aria-hidden="true"
78
+ className="govgr-burger-icon--hidden-s govgr-burger-icon govgr-svg-icon"
79
+ focusable="false"
80
+ viewBox="0 0 24 24"
81
+ >
82
+ <rect
83
+ height="3.3"
84
+ id="govgr-burger-icon__line-1"
85
+ width="20"
86
+ />
87
+ <rect
88
+ height="3.3"
89
+ id="govgr-burger-icon__line-2"
90
+ width="20"
91
+ />
92
+ <rect
93
+ height="3.3"
94
+ id="govgr-burger-icon__line-3"
95
+ width="20"
96
+ />
97
+ </svg>
98
+ </ForwardRef(SvgIcon)>
99
+ </ForwardRef(BurgerIcon)>
100
+ `;
101
+
102
+ exports[`renders the BurgerIcon prop variant= "error" 1`] = `
103
+ <ForwardRef(BurgerIcon)
104
+ variant="error"
105
+ >
106
+ <ForwardRef(SvgIcon)
107
+ className="govgr-burger-icon"
108
+ variant="error"
109
+ >
110
+ <svg
111
+ aria-hidden="true"
112
+ className="govgr-svg-icon--error govgr-burger-icon govgr-svg-icon"
113
+ focusable="false"
114
+ viewBox="0 0 24 24"
115
+ >
116
+ <rect
117
+ height="3.3"
118
+ id="govgr-burger-icon__line-1"
119
+ width="20"
120
+ />
121
+ <rect
122
+ height="3.3"
123
+ id="govgr-burger-icon__line-2"
124
+ width="20"
125
+ />
126
+ <rect
127
+ height="3.3"
128
+ id="govgr-burger-icon__line-3"
129
+ width="20"
130
+ />
131
+ </svg>
132
+ </ForwardRef(SvgIcon)>
133
+ </ForwardRef(BurgerIcon)>
134
+ `;
135
+
3
136
  exports[`renders the BurgerIcon prop variant= "light" 1`] = `
4
137
  <ForwardRef(BurgerIcon)
5
138
  variant="light"
6
139
  >
7
- <svg
8
- aria-hidden="true"
9
- className="govgr-svg-icon--light govgr-burger-icon"
10
- focusable="false"
11
- viewBox="0 0 24 24"
140
+ <ForwardRef(SvgIcon)
141
+ className="govgr-burger-icon"
142
+ variant="light"
12
143
  >
13
- <rect
14
- height="3.3"
15
- id="govgr-burger-icon__line-1"
16
- width="20"
17
- />
18
- <rect
19
- height="3.3"
20
- id="govgr-burger-icon__line-2"
21
- width="20"
22
- />
23
- <rect
24
- height="3.3"
25
- id="govgr-burger-icon__line-3"
26
- width="20"
27
- />
28
- </svg>
144
+ <svg
145
+ aria-hidden="true"
146
+ className="govgr-svg-icon--light govgr-burger-icon govgr-svg-icon"
147
+ focusable="false"
148
+ viewBox="0 0 24 24"
149
+ >
150
+ <rect
151
+ height="3.3"
152
+ id="govgr-burger-icon__line-1"
153
+ width="20"
154
+ />
155
+ <rect
156
+ height="3.3"
157
+ id="govgr-burger-icon__line-2"
158
+ width="20"
159
+ />
160
+ <rect
161
+ height="3.3"
162
+ id="govgr-burger-icon__line-3"
163
+ width="20"
164
+ />
165
+ </svg>
166
+ </ForwardRef(SvgIcon)>
29
167
  </ForwardRef(BurgerIcon)>
30
168
  `;
31
169
 
32
- exports[`renders the BurgerIcon props active hidden="md" variant= "light" 1`] = `
170
+ exports[`renders the BurgerIcon props active hidden="no" variant= "light" 1`] = `
33
171
  <ForwardRef(BurgerIcon)
34
172
  active={true}
35
173
  variant="light"
36
174
  >
37
- <svg
38
- aria-hidden="true"
39
- className="govgr-svg-icon--light govgr-burger-icon--active govgr-burger-icon"
40
- focusable="false"
41
- viewBox="0 0 24 24"
175
+ <ForwardRef(SvgIcon)
176
+ className="govgr-burger-icon--active govgr-burger-icon"
177
+ variant="light"
42
178
  >
43
- <rect
44
- height="3.3"
45
- id="govgr-burger-icon__line-1"
46
- width="20"
47
- />
48
- <rect
49
- height="3.3"
50
- id="govgr-burger-icon__line-2"
51
- width="20"
52
- />
53
- <rect
54
- height="3.3"
55
- id="govgr-burger-icon__line-3"
56
- width="20"
57
- />
58
- </svg>
179
+ <svg
180
+ aria-hidden="true"
181
+ className="govgr-svg-icon--light govgr-burger-icon--active govgr-burger-icon govgr-svg-icon"
182
+ focusable="false"
183
+ viewBox="0 0 24 24"
184
+ >
185
+ <rect
186
+ height="3.3"
187
+ id="govgr-burger-icon__line-1"
188
+ width="20"
189
+ />
190
+ <rect
191
+ height="3.3"
192
+ id="govgr-burger-icon__line-2"
193
+ width="20"
194
+ />
195
+ <rect
196
+ height="3.3"
197
+ id="govgr-burger-icon__line-3"
198
+ width="20"
199
+ />
200
+ </svg>
201
+ </ForwardRef(SvgIcon)>
59
202
  </ForwardRef(BurgerIcon)>
60
203
  `;
61
204
 
62
205
  exports[`renders the BurgerIcon with no props 1`] = `
63
206
  <ForwardRef(BurgerIcon)>
64
- <svg
65
- aria-hidden="true"
207
+ <ForwardRef(SvgIcon)
66
208
  className="govgr-burger-icon"
67
- focusable="false"
68
- viewBox="0 0 24 24"
69
209
  >
70
- <rect
71
- height="3.3"
72
- id="govgr-burger-icon__line-1"
73
- width="20"
74
- />
75
- <rect
76
- height="3.3"
77
- id="govgr-burger-icon__line-2"
78
- width="20"
79
- />
80
- <rect
81
- height="3.3"
82
- id="govgr-burger-icon__line-3"
83
- width="20"
84
- />
85
- </svg>
210
+ <svg
211
+ aria-hidden="true"
212
+ className="govgr-burger-icon govgr-svg-icon"
213
+ focusable="false"
214
+ viewBox="0 0 24 24"
215
+ >
216
+ <rect
217
+ height="3.3"
218
+ id="govgr-burger-icon__line-1"
219
+ width="20"
220
+ />
221
+ <rect
222
+ height="3.3"
223
+ id="govgr-burger-icon__line-2"
224
+ width="20"
225
+ />
226
+ <rect
227
+ height="3.3"
228
+ id="govgr-burger-icon__line-3"
229
+ width="20"
230
+ />
231
+ </svg>
232
+ </ForwardRef(SvgIcon)>
86
233
  </ForwardRef(BurgerIcon)>
87
234
  `;
88
235
 
@@ -90,28 +237,32 @@ exports[`renders the BurgerIcon with prop active=true 1`] = `
90
237
  <ForwardRef(BurgerIcon)
91
238
  active={true}
92
239
  >
93
- <svg
94
- aria-hidden="true"
240
+ <ForwardRef(SvgIcon)
95
241
  className="govgr-burger-icon--active govgr-burger-icon"
96
- focusable="false"
97
- viewBox="0 0 24 24"
98
242
  >
99
- <rect
100
- height="3.3"
101
- id="govgr-burger-icon__line-1"
102
- width="20"
103
- />
104
- <rect
105
- height="3.3"
106
- id="govgr-burger-icon__line-2"
107
- width="20"
108
- />
109
- <rect
110
- height="3.3"
111
- id="govgr-burger-icon__line-3"
112
- width="20"
113
- />
114
- </svg>
243
+ <svg
244
+ aria-hidden="true"
245
+ className="govgr-burger-icon--active govgr-burger-icon govgr-svg-icon"
246
+ focusable="false"
247
+ viewBox="0 0 24 24"
248
+ >
249
+ <rect
250
+ height="3.3"
251
+ id="govgr-burger-icon__line-1"
252
+ width="20"
253
+ />
254
+ <rect
255
+ height="3.3"
256
+ id="govgr-burger-icon__line-2"
257
+ width="20"
258
+ />
259
+ <rect
260
+ height="3.3"
261
+ id="govgr-burger-icon__line-3"
262
+ width="20"
263
+ />
264
+ </svg>
265
+ </ForwardRef(SvgIcon)>
115
266
  </ForwardRef(BurgerIcon)>
116
267
  `;
117
268
 
@@ -119,57 +270,103 @@ exports[`renders the BurgerIcon with prop variant=dark 1`] = `
119
270
  <ForwardRef(BurgerIcon)
120
271
  variant="dark"
121
272
  >
122
- <svg
123
- aria-hidden="true"
124
- className="govgr-svg-icon--dark govgr-burger-icon"
125
- focusable="false"
126
- viewBox="0 0 24 24"
273
+ <ForwardRef(SvgIcon)
274
+ className="govgr-burger-icon"
275
+ variant="dark"
127
276
  >
128
- <rect
129
- height="3.3"
130
- id="govgr-burger-icon__line-1"
131
- width="20"
132
- />
133
- <rect
134
- height="3.3"
135
- id="govgr-burger-icon__line-2"
136
- width="20"
137
- />
138
- <rect
139
- height="3.3"
140
- id="govgr-burger-icon__line-3"
141
- width="20"
142
- />
143
- </svg>
277
+ <svg
278
+ aria-hidden="true"
279
+ className="govgr-svg-icon--dark govgr-burger-icon govgr-svg-icon"
280
+ focusable="false"
281
+ viewBox="0 0 24 24"
282
+ >
283
+ <rect
284
+ height="3.3"
285
+ id="govgr-burger-icon__line-1"
286
+ width="20"
287
+ />
288
+ <rect
289
+ height="3.3"
290
+ id="govgr-burger-icon__line-2"
291
+ width="20"
292
+ />
293
+ <rect
294
+ height="3.3"
295
+ id="govgr-burger-icon__line-3"
296
+ width="20"
297
+ />
298
+ </svg>
299
+ </ForwardRef(SvgIcon)>
144
300
  </ForwardRef(BurgerIcon)>
145
301
  `;
146
302
 
147
- exports[`renders the BurgerIcon with props active hidden=md and variant="dark" 1`] = `
303
+ exports[`renders the BurgerIcon with props active hidden="s" and variant="dark" 1`] = `
148
304
  <ForwardRef(BurgerIcon)
149
305
  active={true}
306
+ hidden="s"
150
307
  variant="dark"
151
308
  >
152
- <svg
153
- aria-hidden="true"
154
- className="govgr-svg-icon--dark govgr-burger-icon--active govgr-burger-icon"
155
- focusable="false"
156
- viewBox="0 0 24 24"
309
+ <ForwardRef(SvgIcon)
310
+ className="govgr-burger-icon--active govgr-burger-icon--hidden-s govgr-burger-icon"
311
+ variant="dark"
312
+ >
313
+ <svg
314
+ aria-hidden="true"
315
+ className="govgr-svg-icon--dark govgr-burger-icon--active govgr-burger-icon--hidden-s govgr-burger-icon govgr-svg-icon"
316
+ focusable="false"
317
+ viewBox="0 0 24 24"
318
+ >
319
+ <rect
320
+ height="3.3"
321
+ id="govgr-burger-icon__line-1"
322
+ width="20"
323
+ />
324
+ <rect
325
+ height="3.3"
326
+ id="govgr-burger-icon__line-2"
327
+ width="20"
328
+ />
329
+ <rect
330
+ height="3.3"
331
+ id="govgr-burger-icon__line-3"
332
+ width="20"
333
+ />
334
+ </svg>
335
+ </ForwardRef(SvgIcon)>
336
+ </ForwardRef(BurgerIcon)>
337
+ `;
338
+
339
+ exports[`renders the BurgerIcon with props hidden="l" and variant="success" 1`] = `
340
+ <ForwardRef(BurgerIcon)
341
+ hidden="l"
342
+ variant="success"
343
+ >
344
+ <ForwardRef(SvgIcon)
345
+ className="govgr-burger-icon--hidden-l govgr-burger-icon"
346
+ variant="success"
157
347
  >
158
- <rect
159
- height="3.3"
160
- id="govgr-burger-icon__line-1"
161
- width="20"
162
- />
163
- <rect
164
- height="3.3"
165
- id="govgr-burger-icon__line-2"
166
- width="20"
167
- />
168
- <rect
169
- height="3.3"
170
- id="govgr-burger-icon__line-3"
171
- width="20"
172
- />
173
- </svg>
348
+ <svg
349
+ aria-hidden="true"
350
+ className="govgr-svg-icon--success govgr-burger-icon--hidden-l govgr-burger-icon govgr-svg-icon"
351
+ focusable="false"
352
+ viewBox="0 0 24 24"
353
+ >
354
+ <rect
355
+ height="3.3"
356
+ id="govgr-burger-icon__line-1"
357
+ width="20"
358
+ />
359
+ <rect
360
+ height="3.3"
361
+ id="govgr-burger-icon__line-2"
362
+ width="20"
363
+ />
364
+ <rect
365
+ height="3.3"
366
+ id="govgr-burger-icon__line-3"
367
+ width="20"
368
+ />
369
+ </svg>
370
+ </ForwardRef(SvgIcon)>
174
371
  </ForwardRef(BurgerIcon)>
175
372
  `;
@@ -1,6 +1,12 @@
1
1
  import React from 'react';
2
- declare type SVGElementAttributes = JSX.IntrinsicElements['svg'];
3
- export interface BurgerIconProps extends SVGElementAttributes {
2
+ import { SvgIconProps } from '@digigov/react-core/SvgIcon';
3
+ export interface BurgerIconProps extends SvgIconProps {
4
+ /**
5
+ * ref is optional.
6
+ * ref prop declares the reference of the svg icon component.
7
+ * It can be used to to access the DOM element and the React element.
8
+ */
9
+ ref?: React.Ref<SVGSVGElement>;
4
10
  /**
5
11
  * active is optional.
6
12
  * The default is 'false'.
@@ -8,15 +14,15 @@ export interface BurgerIconProps extends SVGElementAttributes {
8
14
  */
9
15
  active?: boolean;
10
16
  /**
11
- *
12
- * `variant` property is optional.
13
- * Variant property styles svg icon with color dark or light(white).
17
+ * hidden is optional.
18
+ * The default is 's'.
19
+ * It can be used to control the visibility of the icon across screens.
14
20
  */
15
- variant?: 'dark' | 'light';
21
+ hidden?: 's' | 'm' | 'l';
16
22
  }
17
23
  /**
18
24
  * BurgerIcon is used inside the Header component.
19
25
  * It should be linked with the NavHorizontal component. It is hidden when the NavHorizontal is visible and vice versa.
20
26
  */
21
- export declare const BurgerIcon: React.ForwardRefExoticComponent<Pick<BurgerIconProps, "string" | "className" | "children" | "key" | "id" | "lang" | "style" | "tabIndex" | "role" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "clipPath" | "filter" | "mask" | "path" | "direction" | "height" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "active" | "variant"> & React.RefAttributes<SVGSVGElement>>;
27
+ export declare const BurgerIcon: React.FC<BurgerIconProps>;
22
28
  export default BurgerIcon;
@@ -2,8 +2,6 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
@@ -11,19 +9,15 @@ exports["default"] = exports.BurgerIcon = void 0;
11
9
 
12
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
11
 
14
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
-
16
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
13
 
18
- var _react = _interopRequireWildcard(require("react"));
19
-
20
- var _clsx = _interopRequireDefault(require("clsx"));
14
+ var _react = _interopRequireDefault(require("react"));
21
15
 
22
- var _excluded = ["active", "className", "variant"];
16
+ var _SvgIcon = _interopRequireDefault(require("@digigov/react-core/SvgIcon"));
23
17
 
24
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
+ var _clsx = _interopRequireDefault(require("clsx"));
25
19
 
26
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+ var _excluded = ["variant", "size", "active", "hidden", "className"];
27
21
 
28
22
  var _ref2 = /*#__PURE__*/_react["default"].createElement("rect", {
29
23
  id: "govgr-burger-icon__line-1",
@@ -48,31 +42,17 @@ var _ref4 = /*#__PURE__*/_react["default"].createElement("rect", {
48
42
  * It should be linked with the NavHorizontal component. It is hidden when the NavHorizontal is visible and vice versa.
49
43
  */
50
44
  var BurgerIcon = /*#__PURE__*/_react["default"].forwardRef(function BurgerIcon(_ref, ref) {
51
- var active = _ref.active,
45
+ var variant = _ref.variant,
46
+ size = _ref.size,
47
+ active = _ref.active,
48
+ hidden = _ref.hidden,
52
49
  className = _ref.className,
53
- variant = _ref.variant,
54
50
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
55
-
56
- var _useState = (0, _react.useState)(active),
57
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
58
- iconActive = _useState2[0],
59
- setActive = _useState2[1];
60
-
61
- var _useState3 = (0, _react.useState)(variant),
62
- _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
63
- iconVariant = _useState4[0],
64
- setVariant = _useState4[1];
65
-
66
- (0, _react.useEffect)(function () {
67
- setActive(active);
68
- setVariant(variant);
69
- }, [active, variant]);
70
- return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
71
- ref: ref,
72
- className: (0, _clsx["default"])(iconVariant === 'light' && 'govgr-svg-icon--light', iconVariant === 'dark' && 'govgr-svg-icon--dark', iconActive === true && 'govgr-burger-icon--active', className && className, true && 'govgr-burger-icon'),
73
- focusable: "false",
74
- viewBox: "0 0 24 24",
75
- "aria-hidden": "true"
51
+ return /*#__PURE__*/_react["default"].createElement(_SvgIcon["default"], (0, _extends2["default"])({
52
+ variant: variant,
53
+ size: size,
54
+ className: (0, _clsx["default"])(active === true && 'govgr-burger-icon--active', hidden === 's' && 'govgr-burger-icon--hidden-s', hidden === 'm' && 'govgr-burger-icon--hidden-m', hidden === 'l' && 'govgr-burger-icon--hidden-l', className && className, true && 'govgr-burger-icon'),
55
+ ref: ref
76
56
  }, props), _ref2, _ref3, _ref4);
77
57
  });
78
58