@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.
- package/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/ArrowIcon/index.d.ts +16 -0
- package/ArrowIcon/index.js +59 -0
- package/ArrowIcon/index.test.d.ts +1 -0
- package/ArrowIcon/index.test.js +39 -0
- package/BackLink/index.d.ts +1 -1
- package/BackLink/index.js +5 -3
- package/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
- package/BurgerIcon/index.d.ts +15 -3
- package/BurgerIcon/index.js +31 -12
- package/BurgerIcon/index.test.js +74 -6
- package/Button/index.d.ts +1 -1
- package/ButtonLink/index.d.ts +1 -1
- package/CHANGELOG.md +27 -1
- package/CallToAction/index.d.ts +1 -1
- package/CallToAction/index.js +3 -8
- package/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/CaretIcon/index.d.ts +16 -0
- package/CaretIcon/index.js +59 -0
- package/CaretIcon/index.test.d.ts +1 -0
- package/CaretIcon/index.test.js +39 -0
- package/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
- package/CheckIcon/index.d.ts +15 -0
- package/CheckIcon/index.js +44 -0
- package/CheckIcon/index.test.d.ts +1 -0
- package/CheckIcon/index.test.js +129 -0
- package/CheckboxItem/index.d.ts +1 -1
- package/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
- package/CloseIcon/index.d.ts +16 -0
- package/CloseIcon/index.js +45 -0
- package/CloseIcon/index.test.d.ts +1 -0
- package/CloseIcon/index.test.js +15 -0
- package/DateInputItem/index.d.ts +2 -2
- package/DateInputItem/index.js +5 -5
- package/Fieldset/index.d.ts +1 -1
- package/FieldsetLegend/index.d.ts +1 -1
- package/FileUpload/index.d.ts +1 -1
- package/FooterContainer/index.d.ts +8 -1
- package/FooterContainer/index.js +4 -2
- package/FooterImage/index.d.ts +1 -1
- package/FooterLink/index.d.ts +1 -1
- package/GovGRLogo/index.d.ts +1 -1
- package/Grid/index.d.ts +1 -1
- package/HeaderLogo/index.d.ts +1 -1
- package/HeaderSecondaryLogo/index.d.ts +1 -1
- package/HeaderTitle/index.d.ts +1 -1
- package/HellenicRepublicLogo/index.d.ts +1 -1
- package/LabelTitle/index.d.ts +1 -1
- package/Link/index.d.ts +1 -1
- package/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
- package/MoreVertIcon/index.d.ts +15 -0
- package/MoreVertIcon/index.js +58 -0
- package/MoreVertIcon/index.test.d.ts +1 -0
- package/MoreVertIcon/index.test.js +129 -0
- package/NavHorizontalListItem/index.d.ts +1 -1
- package/NavVerticalItem/index.d.ts +1 -1
- package/NotificationBannerLink/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/TabsListItem/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 +332 -0
- package/UncheckIcon/index.d.ts +15 -0
- package/UncheckIcon/index.js +44 -0
- package/UncheckIcon/index.test.d.ts +1 -0
- package/UncheckIcon/index.test.js +129 -0
- package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/es/ArrowIcon/index.js +43 -0
- package/es/ArrowIcon/index.test.js +33 -0
- package/es/BackLink/index.js +4 -3
- package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
- package/es/BurgerIcon/index.js +30 -12
- package/es/BurgerIcon/index.test.js +74 -6
- package/es/CallToAction/index.js +2 -8
- package/es/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/es/CaretIcon/index.js +43 -0
- package/es/CaretIcon/index.test.js +33 -0
- package/es/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
- package/es/CheckIcon/index.js +28 -0
- package/es/CheckIcon/index.test.js +123 -0
- package/es/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
- package/es/CloseIcon/index.js +29 -0
- package/es/CloseIcon/index.test.js +9 -0
- package/es/DateInputItem/index.js +5 -5
- package/es/FooterContainer/index.js +4 -2
- package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
- package/es/MoreVertIcon/index.js +42 -0
- package/es/MoreVertIcon/index.test.js +123 -0
- 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 +332 -0
- package/es/UncheckIcon/index.js +28 -0
- package/es/UncheckIcon/index.test.js +123 -0
- package/es/index.js +7 -0
- package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/esm/ArrowIcon/index.js +43 -0
- package/esm/ArrowIcon/index.test.js +33 -0
- package/esm/BackLink/index.js +4 -3
- package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
- package/esm/BurgerIcon/index.js +30 -12
- package/esm/BurgerIcon/index.test.js +74 -6
- package/esm/CallToAction/index.js +2 -8
- package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/esm/CaretIcon/index.js +43 -0
- package/esm/CaretIcon/index.test.js +33 -0
- package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
- package/esm/CheckIcon/index.js +28 -0
- package/esm/CheckIcon/index.test.js +123 -0
- package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
- package/esm/CloseIcon/index.js +29 -0
- package/esm/CloseIcon/index.test.js +9 -0
- package/esm/DateInputItem/index.js +5 -5
- package/esm/FooterContainer/index.js +4 -2
- package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
- package/esm/MoreVertIcon/index.js +42 -0
- package/esm/MoreVertIcon/index.test.js +123 -0
- 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 +332 -0
- package/esm/UncheckIcon/index.js +28 -0
- package/esm/UncheckIcon/index.test.js +123 -0
- package/esm/index.js +8 -1
- package/index.d.ts +7 -0
- package/index.js +56 -0
- package/package.json +2 -2
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the SvgIcon with no props 1`] = `
|
|
4
|
+
<ForwardRef(SvgIcon)>
|
|
5
|
+
<svg
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon"
|
|
8
|
+
focusable="false"
|
|
9
|
+
viewBox="0 0 24 24"
|
|
10
|
+
/>
|
|
11
|
+
</ForwardRef(SvgIcon)>
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
exports[`renders the SvgIcon with prop size=l 1`] = `
|
|
15
|
+
<ForwardRef(SvgIcon)
|
|
16
|
+
size="l"
|
|
17
|
+
>
|
|
18
|
+
<svg
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
className="govgr-svg-icon--dark govgr-svg-icon--l govgr-svg-icon"
|
|
21
|
+
focusable="false"
|
|
22
|
+
viewBox="0 0 24 24"
|
|
23
|
+
>
|
|
24
|
+
hello
|
|
25
|
+
</svg>
|
|
26
|
+
</ForwardRef(SvgIcon)>
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
exports[`renders the SvgIcon with prop size=m 1`] = `
|
|
30
|
+
<ForwardRef(SvgIcon)
|
|
31
|
+
size="m"
|
|
32
|
+
>
|
|
33
|
+
<svg
|
|
34
|
+
aria-hidden="true"
|
|
35
|
+
className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon"
|
|
36
|
+
focusable="false"
|
|
37
|
+
viewBox="0 0 24 24"
|
|
38
|
+
>
|
|
39
|
+
hello
|
|
40
|
+
</svg>
|
|
41
|
+
</ForwardRef(SvgIcon)>
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
exports[`renders the SvgIcon with prop size=s 1`] = `
|
|
45
|
+
<ForwardRef(SvgIcon)
|
|
46
|
+
size="s"
|
|
47
|
+
>
|
|
48
|
+
<svg
|
|
49
|
+
aria-hidden="true"
|
|
50
|
+
className="govgr-svg-icon--dark govgr-svg-icon--s govgr-svg-icon"
|
|
51
|
+
focusable="false"
|
|
52
|
+
viewBox="0 0 24 24"
|
|
53
|
+
>
|
|
54
|
+
hello
|
|
55
|
+
</svg>
|
|
56
|
+
</ForwardRef(SvgIcon)>
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
exports[`renders the SvgIcon with prop size=xl 1`] = `
|
|
60
|
+
<ForwardRef(SvgIcon)
|
|
61
|
+
size="xl"
|
|
62
|
+
>
|
|
63
|
+
<svg
|
|
64
|
+
aria-hidden="true"
|
|
65
|
+
className="govgr-svg-icon--dark govgr-svg-icon--xl govgr-svg-icon"
|
|
66
|
+
focusable="false"
|
|
67
|
+
viewBox="0 0 24 24"
|
|
68
|
+
>
|
|
69
|
+
hello
|
|
70
|
+
</svg>
|
|
71
|
+
</ForwardRef(SvgIcon)>
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
exports[`renders the SvgIcon with prop variant=dark 1`] = `
|
|
75
|
+
<ForwardRef(SvgIcon)
|
|
76
|
+
variant="dark"
|
|
77
|
+
>
|
|
78
|
+
<svg
|
|
79
|
+
aria-hidden="true"
|
|
80
|
+
className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon"
|
|
81
|
+
focusable="false"
|
|
82
|
+
viewBox="0 0 24 24"
|
|
83
|
+
>
|
|
84
|
+
hello
|
|
85
|
+
</svg>
|
|
86
|
+
</ForwardRef(SvgIcon)>
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
exports[`renders the SvgIcon with prop variant=error 1`] = `
|
|
90
|
+
<ForwardRef(SvgIcon)
|
|
91
|
+
variant="error"
|
|
92
|
+
>
|
|
93
|
+
<svg
|
|
94
|
+
aria-hidden="true"
|
|
95
|
+
className="govgr-svg-icon--error govgr-svg-icon--m govgr-svg-icon"
|
|
96
|
+
focusable="false"
|
|
97
|
+
viewBox="0 0 24 24"
|
|
98
|
+
>
|
|
99
|
+
hello
|
|
100
|
+
</svg>
|
|
101
|
+
</ForwardRef(SvgIcon)>
|
|
102
|
+
`;
|
|
103
|
+
|
|
104
|
+
exports[`renders the SvgIcon with prop variant=error and size= xl 1`] = `
|
|
105
|
+
<ForwardRef(SvgIcon)
|
|
106
|
+
size="xl"
|
|
107
|
+
variant="warning"
|
|
108
|
+
>
|
|
109
|
+
<svg
|
|
110
|
+
aria-hidden="true"
|
|
111
|
+
className="govgr-svg-icon--warning govgr-svg-icon--xl govgr-svg-icon"
|
|
112
|
+
focusable="false"
|
|
113
|
+
viewBox="0 0 24 24"
|
|
114
|
+
>
|
|
115
|
+
hello
|
|
116
|
+
</svg>
|
|
117
|
+
</ForwardRef(SvgIcon)>
|
|
118
|
+
`;
|
|
119
|
+
|
|
120
|
+
exports[`renders the SvgIcon with prop variant=focus 1`] = `
|
|
121
|
+
<ForwardRef(SvgIcon)
|
|
122
|
+
variant="focus"
|
|
123
|
+
>
|
|
124
|
+
<svg
|
|
125
|
+
aria-hidden="true"
|
|
126
|
+
className="govgr-svg-icon--focus govgr-svg-icon--m govgr-svg-icon"
|
|
127
|
+
focusable="false"
|
|
128
|
+
viewBox="0 0 24 24"
|
|
129
|
+
>
|
|
130
|
+
hello
|
|
131
|
+
</svg>
|
|
132
|
+
</ForwardRef(SvgIcon)>
|
|
133
|
+
`;
|
|
134
|
+
|
|
135
|
+
exports[`renders the SvgIcon with prop variant=gray 1`] = `
|
|
136
|
+
<ForwardRef(SvgIcon)
|
|
137
|
+
variant="gray"
|
|
138
|
+
>
|
|
139
|
+
<svg
|
|
140
|
+
aria-hidden="true"
|
|
141
|
+
className="govgr-svg-icon--gray govgr-svg-icon--m govgr-svg-icon"
|
|
142
|
+
focusable="false"
|
|
143
|
+
viewBox="0 0 24 24"
|
|
144
|
+
>
|
|
145
|
+
hello
|
|
146
|
+
</svg>
|
|
147
|
+
</ForwardRef(SvgIcon)>
|
|
148
|
+
`;
|
|
149
|
+
|
|
150
|
+
exports[`renders the SvgIcon with prop variant=light 1`] = `
|
|
151
|
+
<ForwardRef(SvgIcon)
|
|
152
|
+
variant="light"
|
|
153
|
+
>
|
|
154
|
+
<svg
|
|
155
|
+
aria-hidden="true"
|
|
156
|
+
className="govgr-svg-icon--light govgr-svg-icon--m govgr-svg-icon"
|
|
157
|
+
focusable="false"
|
|
158
|
+
viewBox="0 0 24 24"
|
|
159
|
+
>
|
|
160
|
+
hello
|
|
161
|
+
</svg>
|
|
162
|
+
</ForwardRef(SvgIcon)>
|
|
163
|
+
`;
|
|
164
|
+
|
|
165
|
+
exports[`renders the SvgIcon with prop variant=primary 1`] = `
|
|
166
|
+
<ForwardRef(SvgIcon)
|
|
167
|
+
variant="primary"
|
|
168
|
+
>
|
|
169
|
+
<svg
|
|
170
|
+
aria-hidden="true"
|
|
171
|
+
className="govgr-svg-icon--primary govgr-svg-icon--m govgr-svg-icon"
|
|
172
|
+
focusable="false"
|
|
173
|
+
viewBox="0 0 24 24"
|
|
174
|
+
>
|
|
175
|
+
hello
|
|
176
|
+
</svg>
|
|
177
|
+
</ForwardRef(SvgIcon)>
|
|
178
|
+
`;
|
|
179
|
+
|
|
180
|
+
exports[`renders the SvgIcon with prop variant=success 1`] = `
|
|
181
|
+
<ForwardRef(SvgIcon)
|
|
182
|
+
variant="success"
|
|
183
|
+
>
|
|
184
|
+
<svg
|
|
185
|
+
aria-hidden="true"
|
|
186
|
+
className="govgr-svg-icon--success govgr-svg-icon--m govgr-svg-icon"
|
|
187
|
+
focusable="false"
|
|
188
|
+
viewBox="0 0 24 24"
|
|
189
|
+
>
|
|
190
|
+
hello
|
|
191
|
+
</svg>
|
|
192
|
+
</ForwardRef(SvgIcon)>
|
|
193
|
+
`;
|
|
194
|
+
|
|
195
|
+
exports[`renders the SvgIcon with prop variant=warning 1`] = `
|
|
196
|
+
<ForwardRef(SvgIcon)
|
|
197
|
+
variant="warning"
|
|
198
|
+
>
|
|
199
|
+
<svg
|
|
200
|
+
aria-hidden="true"
|
|
201
|
+
className="govgr-svg-icon--warning govgr-svg-icon--m govgr-svg-icon"
|
|
202
|
+
focusable="false"
|
|
203
|
+
viewBox="0 0 24 24"
|
|
204
|
+
>
|
|
205
|
+
hello
|
|
206
|
+
</svg>
|
|
207
|
+
</ForwardRef(SvgIcon)>
|
|
208
|
+
`;
|
|
209
|
+
|
|
210
|
+
exports[`renders the SvgIcon with prop variant=warning and size=s 1`] = `
|
|
211
|
+
<ForwardRef(SvgIcon)
|
|
212
|
+
size="s"
|
|
213
|
+
variant="warning"
|
|
214
|
+
>
|
|
215
|
+
<svg
|
|
216
|
+
aria-hidden="true"
|
|
217
|
+
className="govgr-svg-icon--warning govgr-svg-icon--s govgr-svg-icon"
|
|
218
|
+
focusable="false"
|
|
219
|
+
viewBox="0 0 24 24"
|
|
220
|
+
>
|
|
221
|
+
hello
|
|
222
|
+
</svg>
|
|
223
|
+
</ForwardRef(SvgIcon)>
|
|
224
|
+
`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["size", "variant", "children", "className"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Use SvgIcon as global svg component.
|
|
9
|
+
* SvgIcon can be used inside other svg components as childern such as CheckIcon, CaretIcon etc.
|
|
10
|
+
*/
|
|
11
|
+
export var SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(_ref, ref) {
|
|
12
|
+
var size = _ref.size,
|
|
13
|
+
variant = _ref.variant,
|
|
14
|
+
children = _ref.children,
|
|
15
|
+
className = _ref.className,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
|
|
18
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
19
|
+
ref: ref,
|
|
20
|
+
className: clsx(variant === 'success' && 'govgr-svg-icon--success', variant === 'primary' && 'govgr-svg-icon--primary', variant === 'warning' && 'govgr-svg-icon--warning', variant === 'light' && 'govgr-svg-icon--light', variant === 'error' && 'govgr-svg-icon--error', variant === 'focus' && 'govgr-svg-icon--focus', variant === 'dark' && 'govgr-svg-icon--dark', variant === 'gray' && 'govgr-svg-icon--gray', variant === 'link' && 'govgr-svg-icon--link', size === 'xl' && 'govgr-svg-icon--xl', size === 's' && 'govgr-svg-icon--s', size === 'm' && 'govgr-svg-icon--m', size === 'l' && 'govgr-svg-icon--l', className && className, true && 'govgr-svg-icon'),
|
|
21
|
+
focusable: "false",
|
|
22
|
+
viewBox: "0 0 24 24",
|
|
23
|
+
"aria-hidden": "true"
|
|
24
|
+
}, props), children);
|
|
25
|
+
});
|
|
26
|
+
export default SvgIcon;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import SvgIcon from '@digigov/react-core/SvgIcon';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(SvgIcon, null);
|
|
6
|
+
|
|
7
|
+
it('renders the SvgIcon with no props', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
var _ref2 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
12
|
+
size: "s"
|
|
13
|
+
}, "hello");
|
|
14
|
+
|
|
15
|
+
it('renders the SvgIcon with prop size=s', function () {
|
|
16
|
+
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _ref3 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
20
|
+
size: "m"
|
|
21
|
+
}, "hello");
|
|
22
|
+
|
|
23
|
+
it('renders the SvgIcon with prop size=m', function () {
|
|
24
|
+
expect(mount(_ref3)).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var _ref4 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
28
|
+
size: "l"
|
|
29
|
+
}, "hello");
|
|
30
|
+
|
|
31
|
+
it('renders the SvgIcon with prop size=l', function () {
|
|
32
|
+
expect(mount(_ref4)).toMatchSnapshot();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
var _ref5 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
36
|
+
size: "xl"
|
|
37
|
+
}, "hello");
|
|
38
|
+
|
|
39
|
+
it('renders the SvgIcon with prop size=xl', function () {
|
|
40
|
+
expect(mount(_ref5)).toMatchSnapshot();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
var _ref6 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
44
|
+
variant: "dark"
|
|
45
|
+
}, "hello");
|
|
46
|
+
|
|
47
|
+
it('renders the SvgIcon with prop variant=dark', function () {
|
|
48
|
+
expect(mount(_ref6)).toMatchSnapshot();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
var _ref7 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
52
|
+
variant: "light"
|
|
53
|
+
}, "hello");
|
|
54
|
+
|
|
55
|
+
it('renders the SvgIcon with prop variant=light', function () {
|
|
56
|
+
expect(mount(_ref7)).toMatchSnapshot();
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
var _ref8 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
60
|
+
variant: "gray"
|
|
61
|
+
}, "hello");
|
|
62
|
+
|
|
63
|
+
it('renders the SvgIcon with prop variant=gray', function () {
|
|
64
|
+
expect(mount(_ref8)).toMatchSnapshot();
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
var _ref9 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
68
|
+
variant: "primary"
|
|
69
|
+
}, "hello");
|
|
70
|
+
|
|
71
|
+
it('renders the SvgIcon with prop variant=primary', function () {
|
|
72
|
+
expect(mount(_ref9)).toMatchSnapshot();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
var _ref10 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
76
|
+
variant: "success"
|
|
77
|
+
}, "hello");
|
|
78
|
+
|
|
79
|
+
it('renders the SvgIcon with prop variant=success', function () {
|
|
80
|
+
expect(mount(_ref10)).toMatchSnapshot();
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
var _ref11 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
84
|
+
variant: "warning"
|
|
85
|
+
}, "hello");
|
|
86
|
+
|
|
87
|
+
it('renders the SvgIcon with prop variant=warning', function () {
|
|
88
|
+
expect(mount(_ref11)).toMatchSnapshot();
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
var _ref12 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
92
|
+
variant: "error"
|
|
93
|
+
}, "hello");
|
|
94
|
+
|
|
95
|
+
it('renders the SvgIcon with prop variant=error', function () {
|
|
96
|
+
expect(mount(_ref12)).toMatchSnapshot();
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
var _ref13 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
100
|
+
variant: "focus"
|
|
101
|
+
}, "hello");
|
|
102
|
+
|
|
103
|
+
it('renders the SvgIcon with prop variant=focus', function () {
|
|
104
|
+
expect(mount(_ref13)).toMatchSnapshot();
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
var _ref14 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
108
|
+
variant: "warning",
|
|
109
|
+
size: "s"
|
|
110
|
+
}, "hello");
|
|
111
|
+
|
|
112
|
+
it('renders the SvgIcon with prop variant=warning and size=s', function () {
|
|
113
|
+
expect(mount(_ref14)).toMatchSnapshot();
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
var _ref15 = /*#__PURE__*/React.createElement(SvgIcon, {
|
|
117
|
+
variant: "warning",
|
|
118
|
+
size: "xl"
|
|
119
|
+
}, "hello");
|
|
120
|
+
|
|
121
|
+
it('renders the SvgIcon with prop variant=error and size= xl', function () {
|
|
122
|
+
expect(mount(_ref15)).toMatchSnapshot();
|
|
123
|
+
});
|
|
@@ -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
|
+
`;
|