@digigov/react-core 0.5.5 → 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 (133) hide show
  1. package/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
  2. package/ArrowIcon/index.d.ts +16 -0
  3. package/ArrowIcon/index.js +59 -0
  4. package/ArrowIcon/index.test.d.ts +1 -0
  5. package/ArrowIcon/index.test.js +39 -0
  6. package/BackLink/index.d.ts +1 -1
  7. package/BackLink/index.js +5 -3
  8. package/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
  9. package/BurgerIcon/index.d.ts +15 -3
  10. package/BurgerIcon/index.js +31 -12
  11. package/BurgerIcon/index.test.js +74 -6
  12. package/Button/index.d.ts +1 -1
  13. package/ButtonLink/index.d.ts +1 -1
  14. package/CHANGELOG.md +27 -1
  15. package/CallToAction/index.d.ts +1 -1
  16. package/CallToAction/index.js +3 -8
  17. package/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
  18. package/CaretIcon/index.d.ts +16 -0
  19. package/CaretIcon/index.js +59 -0
  20. package/CaretIcon/index.test.d.ts +1 -0
  21. package/CaretIcon/index.test.js +39 -0
  22. package/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
  23. package/CheckIcon/index.d.ts +15 -0
  24. package/CheckIcon/index.js +44 -0
  25. package/CheckIcon/index.test.d.ts +1 -0
  26. package/CheckIcon/index.test.js +129 -0
  27. package/CheckboxItem/index.d.ts +1 -1
  28. package/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
  29. package/CloseIcon/index.d.ts +16 -0
  30. package/CloseIcon/index.js +45 -0
  31. package/CloseIcon/index.test.d.ts +1 -0
  32. package/CloseIcon/index.test.js +15 -0
  33. package/DateInputItem/index.d.ts +2 -2
  34. package/DateInputItem/index.js +5 -5
  35. package/Fieldset/index.d.ts +1 -1
  36. package/FieldsetLegend/index.d.ts +1 -1
  37. package/FileUpload/index.d.ts +1 -1
  38. package/FooterContainer/index.d.ts +8 -1
  39. package/FooterContainer/index.js +4 -2
  40. package/FooterImage/index.d.ts +1 -1
  41. package/FooterLink/index.d.ts +1 -1
  42. package/GovGRLogo/index.d.ts +1 -1
  43. package/Grid/index.d.ts +1 -1
  44. package/HeaderLogo/index.d.ts +1 -1
  45. package/HeaderSecondaryLogo/index.d.ts +1 -1
  46. package/HeaderTitle/index.d.ts +1 -1
  47. package/HellenicRepublicLogo/index.d.ts +1 -1
  48. package/LabelTitle/index.d.ts +1 -1
  49. package/Link/index.d.ts +1 -1
  50. package/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
  51. package/MoreVertIcon/index.d.ts +15 -0
  52. package/MoreVertIcon/index.js +58 -0
  53. package/MoreVertIcon/index.test.d.ts +1 -0
  54. package/MoreVertIcon/index.test.js +129 -0
  55. package/NavHorizontalListItem/index.d.ts +1 -1
  56. package/NavVerticalItem/index.d.ts +1 -1
  57. package/NotificationBannerLink/index.d.ts +1 -1
  58. package/RadioItem/index.d.ts +1 -1
  59. package/Select/index.d.ts +1 -1
  60. package/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  61. package/SvgIcon/index.d.ts +20 -0
  62. package/SvgIcon/index.js +41 -0
  63. package/SvgIcon/index.test.d.ts +1 -0
  64. package/SvgIcon/index.test.js +129 -0
  65. package/TabsListItem/index.d.ts +1 -1
  66. package/TextArea/index.d.ts +1 -1
  67. package/TextInput/index.d.ts +1 -1
  68. package/UncheckIcon/__snapshots__/index.test.tsx.snap +332 -0
  69. package/UncheckIcon/index.d.ts +15 -0
  70. package/UncheckIcon/index.js +44 -0
  71. package/UncheckIcon/index.test.d.ts +1 -0
  72. package/UncheckIcon/index.test.js +129 -0
  73. package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
  74. package/es/ArrowIcon/index.js +43 -0
  75. package/es/ArrowIcon/index.test.js +33 -0
  76. package/es/BackLink/index.js +4 -3
  77. package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
  78. package/es/BurgerIcon/index.js +30 -12
  79. package/es/BurgerIcon/index.test.js +74 -6
  80. package/es/CallToAction/index.js +2 -8
  81. package/es/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
  82. package/es/CaretIcon/index.js +43 -0
  83. package/es/CaretIcon/index.test.js +33 -0
  84. package/es/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
  85. package/es/CheckIcon/index.js +28 -0
  86. package/es/CheckIcon/index.test.js +123 -0
  87. package/es/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
  88. package/es/CloseIcon/index.js +29 -0
  89. package/es/CloseIcon/index.test.js +9 -0
  90. package/es/DateInputItem/index.js +5 -5
  91. package/es/FooterContainer/index.js +4 -2
  92. package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
  93. package/es/MoreVertIcon/index.js +42 -0
  94. package/es/MoreVertIcon/index.test.js +123 -0
  95. package/es/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  96. package/es/SvgIcon/index.js +26 -0
  97. package/es/SvgIcon/index.test.js +123 -0
  98. package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +332 -0
  99. package/es/UncheckIcon/index.js +28 -0
  100. package/es/UncheckIcon/index.test.js +123 -0
  101. package/es/index.js +7 -0
  102. package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
  103. package/esm/ArrowIcon/index.js +43 -0
  104. package/esm/ArrowIcon/index.test.js +33 -0
  105. package/esm/BackLink/index.js +4 -3
  106. package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
  107. package/esm/BurgerIcon/index.js +30 -12
  108. package/esm/BurgerIcon/index.test.js +74 -6
  109. package/esm/CallToAction/index.js +2 -8
  110. package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
  111. package/esm/CaretIcon/index.js +43 -0
  112. package/esm/CaretIcon/index.test.js +33 -0
  113. package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
  114. package/esm/CheckIcon/index.js +28 -0
  115. package/esm/CheckIcon/index.test.js +123 -0
  116. package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
  117. package/esm/CloseIcon/index.js +29 -0
  118. package/esm/CloseIcon/index.test.js +9 -0
  119. package/esm/DateInputItem/index.js +5 -5
  120. package/esm/FooterContainer/index.js +4 -2
  121. package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
  122. package/esm/MoreVertIcon/index.js +42 -0
  123. package/esm/MoreVertIcon/index.test.js +123 -0
  124. package/esm/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
  125. package/esm/SvgIcon/index.js +26 -0
  126. package/esm/SvgIcon/index.test.js +123 -0
  127. package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +332 -0
  128. package/esm/UncheckIcon/index.js +28 -0
  129. package/esm/UncheckIcon/index.test.js +123 -0
  130. package/esm/index.js +8 -1
  131. package/index.d.ts +7 -0
  132. package/index.js +56 -0
  133. package/package.json +2 -2
@@ -0,0 +1,332 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders the UncheckIcon with no props 1`] = `
4
+ <ForwardRef(UnCheckIcon)>
5
+ <ForwardRef(SvgIcon)
6
+ className="govgr-svg-icon--check"
7
+ >
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)>
20
+ `;
21
+
22
+ exports[`renders the UncheckIcon with prop size=l 1`] = `
23
+ <ForwardRef(UnCheckIcon)
24
+ size="l"
25
+ >
26
+ <ForwardRef(SvgIcon)
27
+ className="govgr-svg-icon--check"
28
+ size="l"
29
+ >
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)>
42
+ `;
43
+
44
+ exports[`renders the UncheckIcon with prop size=m 1`] = `
45
+ <ForwardRef(UnCheckIcon)
46
+ size="m"
47
+ >
48
+ <ForwardRef(SvgIcon)
49
+ className="govgr-svg-icon--check"
50
+ size="m"
51
+ >
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)>
64
+ `;
65
+
66
+ exports[`renders the UncheckIcon with prop size=s 1`] = `
67
+ <ForwardRef(UnCheckIcon)
68
+ size="s"
69
+ >
70
+ <ForwardRef(SvgIcon)
71
+ className="govgr-svg-icon--check"
72
+ size="s"
73
+ >
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)>
86
+ `;
87
+
88
+ exports[`renders the UncheckIcon with prop size=xl 1`] = `
89
+ <ForwardRef(UnCheckIcon)
90
+ size="xl"
91
+ >
92
+ <ForwardRef(SvgIcon)
93
+ className="govgr-svg-icon--check"
94
+ size="xl"
95
+ >
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)>
108
+ `;
109
+
110
+ exports[`renders the UncheckIcon with prop variant=dark 1`] = `
111
+ <ForwardRef(UnCheckIcon)
112
+ variant="dark"
113
+ >
114
+ <ForwardRef(SvgIcon)
115
+ className="govgr-svg-icon--check"
116
+ variant="dark"
117
+ >
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)>
130
+ `;
131
+
132
+ exports[`renders the UncheckIcon with prop variant=error 1`] = `
133
+ <ForwardRef(UnCheckIcon)
134
+ variant="error"
135
+ >
136
+ <ForwardRef(SvgIcon)
137
+ className="govgr-svg-icon--check"
138
+ variant="error"
139
+ >
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)>
152
+ `;
153
+
154
+ exports[`renders the UncheckIcon with prop variant=error and size= xl 1`] = `
155
+ <ForwardRef(UnCheckIcon)
156
+ size="xl"
157
+ variant="warning"
158
+ >
159
+ <ForwardRef(SvgIcon)
160
+ className="govgr-svg-icon--check"
161
+ size="xl"
162
+ variant="warning"
163
+ >
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)>
176
+ `;
177
+
178
+ exports[`renders the UncheckIcon with prop variant=focus 1`] = `
179
+ <ForwardRef(UnCheckIcon)
180
+ variant="focus"
181
+ >
182
+ <ForwardRef(SvgIcon)
183
+ className="govgr-svg-icon--check"
184
+ variant="focus"
185
+ >
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)>
198
+ `;
199
+
200
+ exports[`renders the UncheckIcon with prop variant=gray 1`] = `
201
+ <ForwardRef(UnCheckIcon)
202
+ variant="gray"
203
+ >
204
+ <ForwardRef(SvgIcon)
205
+ className="govgr-svg-icon--check"
206
+ variant="gray"
207
+ >
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)>
220
+ `;
221
+
222
+ exports[`renders the UncheckIcon with prop variant=light 1`] = `
223
+ <ForwardRef(UnCheckIcon)
224
+ variant="light"
225
+ >
226
+ <ForwardRef(SvgIcon)
227
+ className="govgr-svg-icon--check"
228
+ variant="light"
229
+ >
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)>
242
+ `;
243
+
244
+ exports[`renders the UncheckIcon with prop variant=primary 1`] = `
245
+ <ForwardRef(UnCheckIcon)
246
+ variant="primary"
247
+ >
248
+ <ForwardRef(SvgIcon)
249
+ className="govgr-svg-icon--check"
250
+ variant="primary"
251
+ >
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)>
264
+ `;
265
+
266
+ exports[`renders the UncheckIcon with prop variant=success 1`] = `
267
+ <ForwardRef(UnCheckIcon)
268
+ variant="success"
269
+ >
270
+ <ForwardRef(SvgIcon)
271
+ className="govgr-svg-icon--check"
272
+ variant="success"
273
+ >
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)>
286
+ `;
287
+
288
+ exports[`renders the UncheckIcon with prop variant=warning 1`] = `
289
+ <ForwardRef(UnCheckIcon)
290
+ variant="warning"
291
+ >
292
+ <ForwardRef(SvgIcon)
293
+ className="govgr-svg-icon--check"
294
+ variant="warning"
295
+ >
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)>
308
+ `;
309
+
310
+ exports[`renders the UncheckIcon with prop variant=warning and size=s 1`] = `
311
+ <ForwardRef(UnCheckIcon)
312
+ size="s"
313
+ variant="warning"
314
+ >
315
+ <ForwardRef(SvgIcon)
316
+ className="govgr-svg-icon--check"
317
+ size="s"
318
+ variant="warning"
319
+ >
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)>
332
+ `;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@digigov/react-core/SvgIcon';
3
+ export interface UnCheckIconProps 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>;
10
+ }
11
+ /**
12
+ * Use UnunCheckIcon component when you need a uncheck/decline icon.
13
+ */
14
+ export declare const UnCheckIcon: React.FC<UnCheckIconProps>;
15
+ export default UnCheckIcon;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.UnCheckIcon = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
+
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var _SvgIcon = _interopRequireDefault(require("@digigov/react-core/SvgIcon"));
17
+
18
+ var _clsx = _interopRequireDefault(require("clsx"));
19
+
20
+ var _excluded = ["size", "variant", "className"];
21
+
22
+ var _ref2 = /*#__PURE__*/_react["default"].createElement("polygon", {
23
+ 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"
24
+ });
25
+
26
+ /**
27
+ * Use UnunCheckIcon component when you need a uncheck/decline icon.
28
+ */
29
+ var UnCheckIcon = /*#__PURE__*/_react["default"].forwardRef(function UnCheckIcon(_ref, ref) {
30
+ var size = _ref.size,
31
+ variant = _ref.variant,
32
+ className = _ref.className,
33
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
34
+ return /*#__PURE__*/_react["default"].createElement(_SvgIcon["default"], (0, _extends2["default"])({
35
+ size: size,
36
+ variant: variant,
37
+ className: (0, _clsx["default"])(className && className, true && 'govgr-svg-icon--check'),
38
+ ref: ref
39
+ }, props), _ref2);
40
+ });
41
+
42
+ exports.UnCheckIcon = UnCheckIcon;
43
+ var _default = UnCheckIcon;
44
+ exports["default"] = _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _react = _interopRequireDefault(require("react"));
6
+
7
+ var _enzyme = require("enzyme");
8
+
9
+ var _UncheckIcon = _interopRequireDefault(require("@digigov/react-core/UncheckIcon"));
10
+
11
+ var _ref = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], null);
12
+
13
+ it('renders the UncheckIcon with no props', function () {
14
+ expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
15
+ });
16
+
17
+ var _ref2 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
18
+ size: "s"
19
+ });
20
+
21
+ it('renders the UncheckIcon with prop size=s', function () {
22
+ expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
23
+ });
24
+
25
+ var _ref3 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
26
+ size: "m"
27
+ });
28
+
29
+ it('renders the UncheckIcon with prop size=m', function () {
30
+ expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
31
+ });
32
+
33
+ var _ref4 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
34
+ size: "l"
35
+ });
36
+
37
+ it('renders the UncheckIcon with prop size=l', function () {
38
+ expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
39
+ });
40
+
41
+ var _ref5 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
42
+ size: "xl"
43
+ });
44
+
45
+ it('renders the UncheckIcon with prop size=xl', function () {
46
+ expect((0, _enzyme.mount)(_ref5)).toMatchSnapshot();
47
+ });
48
+
49
+ var _ref6 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
50
+ variant: "dark"
51
+ });
52
+
53
+ it('renders the UncheckIcon with prop variant=dark', function () {
54
+ expect((0, _enzyme.mount)(_ref6)).toMatchSnapshot();
55
+ });
56
+
57
+ var _ref7 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
58
+ variant: "light"
59
+ });
60
+
61
+ it('renders the UncheckIcon with prop variant=light', function () {
62
+ expect((0, _enzyme.mount)(_ref7)).toMatchSnapshot();
63
+ });
64
+
65
+ var _ref8 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
66
+ variant: "gray"
67
+ });
68
+
69
+ it('renders the UncheckIcon with prop variant=gray', function () {
70
+ expect((0, _enzyme.mount)(_ref8)).toMatchSnapshot();
71
+ });
72
+
73
+ var _ref9 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
74
+ variant: "primary"
75
+ });
76
+
77
+ it('renders the UncheckIcon with prop variant=primary', function () {
78
+ expect((0, _enzyme.mount)(_ref9)).toMatchSnapshot();
79
+ });
80
+
81
+ var _ref10 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
82
+ variant: "success"
83
+ });
84
+
85
+ it('renders the UncheckIcon with prop variant=success', function () {
86
+ expect((0, _enzyme.mount)(_ref10)).toMatchSnapshot();
87
+ });
88
+
89
+ var _ref11 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
90
+ variant: "warning"
91
+ });
92
+
93
+ it('renders the UncheckIcon with prop variant=warning', function () {
94
+ expect((0, _enzyme.mount)(_ref11)).toMatchSnapshot();
95
+ });
96
+
97
+ var _ref12 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
98
+ variant: "error"
99
+ });
100
+
101
+ it('renders the UncheckIcon with prop variant=error', function () {
102
+ expect((0, _enzyme.mount)(_ref12)).toMatchSnapshot();
103
+ });
104
+
105
+ var _ref13 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
106
+ variant: "focus"
107
+ });
108
+
109
+ it('renders the UncheckIcon with prop variant=focus', function () {
110
+ expect((0, _enzyme.mount)(_ref13)).toMatchSnapshot();
111
+ });
112
+
113
+ var _ref14 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
114
+ variant: "warning",
115
+ size: "s"
116
+ });
117
+
118
+ it('renders the UncheckIcon with prop variant=warning and size=s', function () {
119
+ expect((0, _enzyme.mount)(_ref14)).toMatchSnapshot();
120
+ });
121
+
122
+ var _ref15 = /*#__PURE__*/_react["default"].createElement(_UncheckIcon["default"], {
123
+ variant: "warning",
124
+ size: "xl"
125
+ });
126
+
127
+ it('renders the UncheckIcon with prop variant=error and size= xl', function () {
128
+ expect((0, _enzyme.mount)(_ref15)).toMatchSnapshot();
129
+ });
@@ -0,0 +1,83 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders the ArrowIcon with direction down prop 1`] = `
4
+ <ForwardRef(ArrowIcon)
5
+ direction="down"
6
+ >
7
+ <ForwardRef(SvgIcon)
8
+ className="govgr-arrow--down"
9
+ >
10
+ <svg
11
+ aria-hidden="true"
12
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-arrow--down govgr-svg-icon"
13
+ focusable="false"
14
+ viewBox="0 0 24 24"
15
+ >
16
+ <path
17
+ d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
18
+ />
19
+ </svg>
20
+ </ForwardRef(SvgIcon)>
21
+ </ForwardRef(ArrowIcon)>
22
+ `;
23
+
24
+ exports[`renders the ArrowIcon with direction left prop 1`] = `
25
+ <ForwardRef(ArrowIcon)
26
+ direction="left"
27
+ >
28
+ <ForwardRef(SvgIcon)
29
+ className="govgr-arrow--left"
30
+ >
31
+ <svg
32
+ aria-hidden="true"
33
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-arrow--left govgr-svg-icon"
34
+ focusable="false"
35
+ viewBox="0 0 24 24"
36
+ >
37
+ <path
38
+ d="M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z"
39
+ />
40
+ </svg>
41
+ </ForwardRef(SvgIcon)>
42
+ </ForwardRef(ArrowIcon)>
43
+ `;
44
+
45
+ exports[`renders the ArrowIcon with direction up prop 1`] = `
46
+ <ForwardRef(ArrowIcon)
47
+ direction="up"
48
+ >
49
+ <ForwardRef(SvgIcon)
50
+ className="govgr-arrow--up"
51
+ >
52
+ <svg
53
+ aria-hidden="true"
54
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-arrow--up govgr-svg-icon"
55
+ focusable="false"
56
+ viewBox="0 0 24 24"
57
+ >
58
+ <path
59
+ d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
60
+ />
61
+ </svg>
62
+ </ForwardRef(SvgIcon)>
63
+ </ForwardRef(ArrowIcon)>
64
+ `;
65
+
66
+ exports[`renders the ArrowIcon with no props, direction prop is right by default 1`] = `
67
+ <ForwardRef(ArrowIcon)>
68
+ <ForwardRef(SvgIcon)
69
+ className="govgr-arrow--right"
70
+ >
71
+ <svg
72
+ aria-hidden="true"
73
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-arrow--right govgr-svg-icon"
74
+ focusable="false"
75
+ viewBox="0 0 24 24"
76
+ >
77
+ <path
78
+ d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
79
+ />
80
+ </svg>
81
+ </ForwardRef(SvgIcon)>
82
+ </ForwardRef(ArrowIcon)>
83
+ `;
@@ -0,0 +1,43 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["size", "variant", "direction", "className"];
4
+ import React from 'react';
5
+ import SvgIcon from '@digigov/react-core/SvgIcon';
6
+ import clsx from 'clsx';
7
+
8
+ var _ref2 = /*#__PURE__*/React.createElement("path", {
9
+ d: "M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z"
10
+ });
11
+
12
+ var _ref3 = /*#__PURE__*/React.createElement("path", {
13
+ d: "M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
14
+ });
15
+
16
+ var _ref4 = /*#__PURE__*/React.createElement("path", {
17
+ d: "M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
18
+ });
19
+
20
+ var _ref5 = /*#__PURE__*/React.createElement("path", {
21
+ d: "M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
22
+ });
23
+
24
+ /**
25
+ * ArrowIcon component is used to add arrow icon.
26
+ * ArrowIcon component can be used inside other components, for example CallToAction component.
27
+ */
28
+ export var ArrowIcon = /*#__PURE__*/React.forwardRef(function ArrowIcon(_ref, ref) {
29
+ var size = _ref.size,
30
+ variant = _ref.variant,
31
+ _ref$direction = _ref.direction,
32
+ direction = _ref$direction === void 0 ? 'right' : _ref$direction,
33
+ className = _ref.className,
34
+ props = _objectWithoutProperties(_ref, _excluded);
35
+
36
+ return /*#__PURE__*/React.createElement(SvgIcon, _extends({
37
+ size: size,
38
+ variant: variant,
39
+ className: clsx(direction === 'right' && 'govgr-arrow--right', direction === 'left' && 'govgr-arrow--left', direction === 'down' && 'govgr-arrow--down', direction === 'up' && 'govgr-arrow--up', className && className),
40
+ ref: ref
41
+ }, props), direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
42
+ });
43
+ export default ArrowIcon;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { mount } from 'enzyme';
3
+ import ArrowIcon from '@digigov/react-core/ArrowIcon';
4
+
5
+ var _ref = /*#__PURE__*/React.createElement(ArrowIcon, null);
6
+
7
+ it('renders the ArrowIcon with no props, direction prop is right by default', function () {
8
+ expect(mount(_ref)).toMatchSnapshot();
9
+ });
10
+
11
+ var _ref2 = /*#__PURE__*/React.createElement(ArrowIcon, {
12
+ direction: "left"
13
+ });
14
+
15
+ it('renders the ArrowIcon with direction left prop', function () {
16
+ expect(mount(_ref2)).toMatchSnapshot();
17
+ });
18
+
19
+ var _ref3 = /*#__PURE__*/React.createElement(ArrowIcon, {
20
+ direction: "up"
21
+ });
22
+
23
+ it('renders the ArrowIcon with direction up prop', function () {
24
+ expect(mount(_ref3)).toMatchSnapshot();
25
+ });
26
+
27
+ var _ref4 = /*#__PURE__*/React.createElement(ArrowIcon, {
28
+ direction: "down"
29
+ });
30
+
31
+ it('renders the ArrowIcon with direction down prop', function () {
32
+ expect(mount(_ref4)).toMatchSnapshot();
33
+ });