@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.
- package/ArrowIcon/__snapshots__/index.test.tsx.snap +48 -32
- package/ArrowIcon/index.d.ts +4 -3
- package/ArrowIcon/index.js +13 -27
- package/BurgerIcon/__snapshots__/index.test.tsx.snap +323 -126
- package/BurgerIcon/index.d.ts +13 -7
- package/BurgerIcon/index.js +13 -33
- package/BurgerIcon/index.test.js +47 -5
- package/Button/index.d.ts +1 -1
- package/CHANGELOG.md +9 -1
- package/CaretIcon/__snapshots__/index.test.tsx.snap +48 -32
- package/CaretIcon/index.d.ts +4 -3
- package/CaretIcon/index.js +13 -27
- package/CheckIcon/__snapshots__/index.test.tsx.snap +196 -136
- package/CheckIcon/index.d.ts +7 -11
- package/CheckIcon/index.js +10 -34
- package/CheckboxItem/index.d.ts +1 -1
- package/CloseIcon/__snapshots__/index.test.tsx.snap +12 -8
- package/CloseIcon/index.d.ts +9 -3
- package/CloseIcon/index.js +10 -7
- package/DateInputItem/index.d.ts +1 -1
- package/FieldsetLegend/index.d.ts +1 -1
- package/FileUpload/index.d.ts +1 -1
- package/Grid/index.d.ts +1 -1
- package/LabelTitle/index.d.ts +1 -1
- package/MoreVertIcon/__snapshots__/index.test.tsx.snap +391 -315
- package/MoreVertIcon/index.d.ts +7 -11
- package/MoreVertIcon/index.js +10 -34
- package/NormalText/index.d.ts +1 -1
- package/Paragraph/index.d.ts +1 -1
- package/RadioItem/index.d.ts +1 -1
- package/Select/index.d.ts +1 -1
- package/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
- package/SvgIcon/index.d.ts +20 -0
- package/SvgIcon/index.js +41 -0
- package/SvgIcon/index.test.d.ts +1 -0
- package/SvgIcon/index.test.js +129 -0
- package/Table/index.d.ts +1 -1
- package/TextArea/index.d.ts +1 -1
- package/TextInput/index.d.ts +1 -1
- package/UncheckIcon/__snapshots__/index.test.tsx.snap +241 -165
- package/UncheckIcon/index.d.ts +9 -13
- package/UncheckIcon/index.js +15 -39
- package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +48 -32
- package/es/ArrowIcon/index.js +12 -19
- package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +323 -126
- package/es/BurgerIcon/index.js +12 -25
- package/es/BurgerIcon/index.test.js +47 -5
- package/es/CaretIcon/__snapshots__/index.test.tsx.snap +48 -32
- package/es/CaretIcon/index.js +12 -19
- package/es/CheckIcon/__snapshots__/index.test.tsx.snap +196 -136
- package/es/CheckIcon/index.js +9 -26
- package/es/CloseIcon/__snapshots__/index.test.tsx.snap +12 -8
- package/es/CloseIcon/index.js +9 -7
- package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +391 -315
- package/es/MoreVertIcon/index.js +9 -26
- package/es/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
- package/es/SvgIcon/index.js +26 -0
- package/es/SvgIcon/index.test.js +123 -0
- package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +241 -165
- package/es/UncheckIcon/index.js +12 -29
- package/es/index.js +1 -0
- package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +48 -32
- package/esm/ArrowIcon/index.js +12 -19
- package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +323 -126
- package/esm/BurgerIcon/index.js +12 -25
- package/esm/BurgerIcon/index.test.js +47 -5
- package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +48 -32
- package/esm/CaretIcon/index.js +12 -19
- package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +196 -136
- package/esm/CheckIcon/index.js +9 -26
- package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +12 -8
- package/esm/CloseIcon/index.js +9 -7
- package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +391 -315
- package/esm/MoreVertIcon/index.js +9 -26
- package/esm/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
- package/esm/SvgIcon/index.js +26 -0
- package/esm/SvgIcon/index.test.js +123 -0
- package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +241 -165
- package/esm/UncheckIcon/index.js +12 -29
- package/esm/index.js +2 -1
- package/index.d.ts +1 -0
- package/index.js +8 -0
- 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(
|
|
5
|
-
<
|
|
6
|
-
|
|
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
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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(
|
|
23
|
+
<ForwardRef(UnCheckIcon)
|
|
20
24
|
size="l"
|
|
21
25
|
>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
focusable="false"
|
|
26
|
-
viewBox="0 0 24 24"
|
|
26
|
+
<ForwardRef(SvgIcon)
|
|
27
|
+
className="govgr-svg-icon--check"
|
|
28
|
+
size="l"
|
|
27
29
|
>
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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(
|
|
45
|
+
<ForwardRef(UnCheckIcon)
|
|
37
46
|
size="m"
|
|
38
47
|
>
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
focusable="false"
|
|
43
|
-
viewBox="0 0 24 24"
|
|
48
|
+
<ForwardRef(SvgIcon)
|
|
49
|
+
className="govgr-svg-icon--check"
|
|
50
|
+
size="m"
|
|
44
51
|
>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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(
|
|
67
|
+
<ForwardRef(UnCheckIcon)
|
|
54
68
|
size="s"
|
|
55
69
|
>
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
focusable="false"
|
|
60
|
-
viewBox="0 0 24 24"
|
|
70
|
+
<ForwardRef(SvgIcon)
|
|
71
|
+
className="govgr-svg-icon--check"
|
|
72
|
+
size="s"
|
|
61
73
|
>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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(
|
|
89
|
+
<ForwardRef(UnCheckIcon)
|
|
71
90
|
size="xl"
|
|
72
91
|
>
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
focusable="false"
|
|
77
|
-
viewBox="0 0 24 24"
|
|
92
|
+
<ForwardRef(SvgIcon)
|
|
93
|
+
className="govgr-svg-icon--check"
|
|
94
|
+
size="xl"
|
|
78
95
|
>
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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(
|
|
111
|
+
<ForwardRef(UnCheckIcon)
|
|
88
112
|
variant="dark"
|
|
89
113
|
>
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
focusable="false"
|
|
94
|
-
viewBox="0 0 24 24"
|
|
114
|
+
<ForwardRef(SvgIcon)
|
|
115
|
+
className="govgr-svg-icon--check"
|
|
116
|
+
variant="dark"
|
|
95
117
|
>
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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(
|
|
133
|
+
<ForwardRef(UnCheckIcon)
|
|
105
134
|
variant="error"
|
|
106
135
|
>
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
focusable="false"
|
|
111
|
-
viewBox="0 0 24 24"
|
|
136
|
+
<ForwardRef(SvgIcon)
|
|
137
|
+
className="govgr-svg-icon--check"
|
|
138
|
+
variant="error"
|
|
112
139
|
>
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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(
|
|
155
|
+
<ForwardRef(UnCheckIcon)
|
|
122
156
|
size="xl"
|
|
123
157
|
variant="warning"
|
|
124
158
|
>
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
viewBox="0 0 24 24"
|
|
159
|
+
<ForwardRef(SvgIcon)
|
|
160
|
+
className="govgr-svg-icon--check"
|
|
161
|
+
size="xl"
|
|
162
|
+
variant="warning"
|
|
130
163
|
>
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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(
|
|
179
|
+
<ForwardRef(UnCheckIcon)
|
|
140
180
|
variant="focus"
|
|
141
181
|
>
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
focusable="false"
|
|
146
|
-
viewBox="0 0 24 24"
|
|
182
|
+
<ForwardRef(SvgIcon)
|
|
183
|
+
className="govgr-svg-icon--check"
|
|
184
|
+
variant="focus"
|
|
147
185
|
>
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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(
|
|
201
|
+
<ForwardRef(UnCheckIcon)
|
|
157
202
|
variant="gray"
|
|
158
203
|
>
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
focusable="false"
|
|
163
|
-
viewBox="0 0 24 24"
|
|
204
|
+
<ForwardRef(SvgIcon)
|
|
205
|
+
className="govgr-svg-icon--check"
|
|
206
|
+
variant="gray"
|
|
164
207
|
>
|
|
165
|
-
<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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(
|
|
223
|
+
<ForwardRef(UnCheckIcon)
|
|
174
224
|
variant="light"
|
|
175
225
|
>
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
focusable="false"
|
|
180
|
-
viewBox="0 0 24 24"
|
|
226
|
+
<ForwardRef(SvgIcon)
|
|
227
|
+
className="govgr-svg-icon--check"
|
|
228
|
+
variant="light"
|
|
181
229
|
>
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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(
|
|
245
|
+
<ForwardRef(UnCheckIcon)
|
|
191
246
|
variant="primary"
|
|
192
247
|
>
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
focusable="false"
|
|
197
|
-
viewBox="0 0 24 24"
|
|
248
|
+
<ForwardRef(SvgIcon)
|
|
249
|
+
className="govgr-svg-icon--check"
|
|
250
|
+
variant="primary"
|
|
198
251
|
>
|
|
199
|
-
<
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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(
|
|
267
|
+
<ForwardRef(UnCheckIcon)
|
|
208
268
|
variant="success"
|
|
209
269
|
>
|
|
210
|
-
<
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
focusable="false"
|
|
214
|
-
viewBox="0 0 24 24"
|
|
270
|
+
<ForwardRef(SvgIcon)
|
|
271
|
+
className="govgr-svg-icon--check"
|
|
272
|
+
variant="success"
|
|
215
273
|
>
|
|
216
|
-
<
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
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(
|
|
289
|
+
<ForwardRef(UnCheckIcon)
|
|
225
290
|
variant="warning"
|
|
226
291
|
>
|
|
227
|
-
<
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
focusable="false"
|
|
231
|
-
viewBox="0 0 24 24"
|
|
292
|
+
<ForwardRef(SvgIcon)
|
|
293
|
+
className="govgr-svg-icon--check"
|
|
294
|
+
variant="warning"
|
|
232
295
|
>
|
|
233
|
-
<
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
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(
|
|
311
|
+
<ForwardRef(UnCheckIcon)
|
|
242
312
|
size="s"
|
|
243
313
|
variant="warning"
|
|
244
314
|
>
|
|
245
|
-
<
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
viewBox="0 0 24 24"
|
|
315
|
+
<ForwardRef(SvgIcon)
|
|
316
|
+
className="govgr-svg-icon--check"
|
|
317
|
+
size="s"
|
|
318
|
+
variant="warning"
|
|
250
319
|
>
|
|
251
|
-
<
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
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
|
`;
|
package/UncheckIcon/index.d.ts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export interface
|
|
2
|
+
import { SvgIconProps } from '@digigov/react-core/SvgIcon';
|
|
3
|
+
export interface UnCheckIconProps extends SvgIconProps {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
|
-
|
|
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
|
|
12
|
+
* Use UnunCheckIcon component when you need a uncheck/decline icon.
|
|
17
13
|
*/
|
|
18
|
-
export declare const
|
|
19
|
-
export default
|
|
14
|
+
export declare const UnCheckIcon: React.FC<UnCheckIconProps>;
|
|
15
|
+
export default UnCheckIcon;
|
package/UncheckIcon/index.js
CHANGED
|
@@ -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.
|
|
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 =
|
|
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
|
|
27
|
+
* Use UnunCheckIcon component when you need a uncheck/decline icon.
|
|
34
28
|
*/
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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.
|
|
67
|
-
var _default =
|
|
42
|
+
exports.UnCheckIcon = UnCheckIcon;
|
|
43
|
+
var _default = UnCheckIcon;
|
|
68
44
|
exports["default"] = _default;
|