@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,19 +1,15 @@
1
1
  import React from 'react';
2
- declare type SVGElementAttributes = JSX.IntrinsicElements['svg'];
3
- export interface UncheckIconProps extends SVGElementAttributes {
2
+ import { SvgIconProps } from '@digigov/react-core/SvgIcon';
3
+ export interface UnCheckIconProps extends SvgIconProps {
4
4
  /**
5
- * size prop declares the size of the svg icon.
6
- * size is optional. The default value is 'm'.
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.
7
8
  */
8
- size?: 's' | 'm' | 'l' | 'xl';
9
- /**
10
- * variant property styles svg icon with Gov.gr palette's basic colors.
11
- * variant property is optional. The default value is 'dark'
12
- */
13
- variant?: 'dark' | 'light' | 'gray' | 'primary' | 'success' | 'warning' | 'error' | 'focus' | 'link';
9
+ ref?: React.Ref<SVGSVGElement>;
14
10
  }
15
11
  /**
16
- * Use UncheckIcon component when you need a uncheck/decline icon.
12
+ * Use UnunCheckIcon component when you need a uncheck/decline icon.
17
13
  */
18
- export declare const UncheckIcon: React.ForwardRefExoticComponent<Pick<UncheckIconProps, "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" | "variant" | "size"> & React.RefAttributes<SVGSVGElement>>;
19
- export default UncheckIcon;
14
+ export declare const UnCheckIcon: React.FC<UnCheckIconProps>;
15
+ export default UnCheckIcon;
@@ -2,67 +2,43 @@
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
  });
10
- exports["default"] = exports.UncheckIcon = void 0;
8
+ exports["default"] = exports.UnCheckIcon = 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"));
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var _SvgIcon = _interopRequireDefault(require("@digigov/react-core/SvgIcon"));
19
17
 
20
18
  var _clsx = _interopRequireDefault(require("clsx"));
21
19
 
22
20
  var _excluded = ["size", "variant", "className"];
23
21
 
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); }
25
-
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; }
27
-
28
22
  var _ref2 = /*#__PURE__*/_react["default"].createElement("polygon", {
29
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"
30
24
  });
31
25
 
32
26
  /**
33
- * Use UncheckIcon component when you need a uncheck/decline icon.
27
+ * Use UnunCheckIcon component when you need a uncheck/decline icon.
34
28
  */
35
- var UncheckIcon = /*#__PURE__*/_react["default"].forwardRef(function UncheckIcon(_ref, ref) {
36
- var _ref$size = _ref.size,
37
- size = _ref$size === void 0 ? 'm' : _ref$size,
38
- _ref$variant = _ref.variant,
39
- variant = _ref$variant === void 0 ? 'dark' : _ref$variant,
29
+ var UnCheckIcon = /*#__PURE__*/_react["default"].forwardRef(function UnCheckIcon(_ref, ref) {
30
+ var size = _ref.size,
31
+ variant = _ref.variant,
40
32
  className = _ref.className,
41
33
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
42
-
43
- var _useState = (0, _react.useState)(size),
44
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
45
- uncheckSize = _useState2[0],
46
- setSize = _useState2[1];
47
-
48
- var _useState3 = (0, _react.useState)(variant),
49
- _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
50
- uncheckVariant = _useState4[0],
51
- setVariant = _useState4[1];
52
-
53
- (0, _react.useEffect)(function () {
54
- setSize(size);
55
- setVariant(variant);
56
- }, [size, variant]);
57
- return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
58
- ref: ref,
59
- className: (0, _clsx["default"])(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']),
60
- focusable: "false",
61
- viewBox: "0 0 24 24",
62
- "aria-hidden": "true"
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
63
39
  }, props), _ref2);
64
40
  });
65
41
 
66
- exports.UncheckIcon = UncheckIcon;
67
- var _default = UncheckIcon;
42
+ exports.UnCheckIcon = UnCheckIcon;
43
+ var _default = UnCheckIcon;
68
44
  exports["default"] = _default;