@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,316 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders the CheckIcon with no props 1`] = `
4
+ <ForwardRef(CheckIcon)>
5
+ <ForwardRef(SvgIcon)>
6
+ <svg
7
+ aria-hidden="true"
8
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
9
+ focusable="false"
10
+ viewBox="0 0 24 24"
11
+ >
12
+ <polygon
13
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
14
+ />
15
+ </svg>
16
+ </ForwardRef(SvgIcon)>
17
+ </ForwardRef(CheckIcon)>
18
+ `;
19
+
20
+ exports[`renders the CheckIcon with prop size=l 1`] = `
21
+ <ForwardRef(CheckIcon)
22
+ size="l"
23
+ >
24
+ <ForwardRef(SvgIcon)
25
+ size="l"
26
+ >
27
+ <svg
28
+ aria-hidden="true"
29
+ className="govgr-svg-icon--dark govgr-svg-icon--l govgr-svg-icon--check govgr-svg-icon"
30
+ focusable="false"
31
+ viewBox="0 0 24 24"
32
+ >
33
+ <polygon
34
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
35
+ />
36
+ </svg>
37
+ </ForwardRef(SvgIcon)>
38
+ </ForwardRef(CheckIcon)>
39
+ `;
40
+
41
+ exports[`renders the CheckIcon with prop size=m 1`] = `
42
+ <ForwardRef(CheckIcon)
43
+ size="m"
44
+ >
45
+ <ForwardRef(SvgIcon)
46
+ size="m"
47
+ >
48
+ <svg
49
+ aria-hidden="true"
50
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
51
+ focusable="false"
52
+ viewBox="0 0 24 24"
53
+ >
54
+ <polygon
55
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
56
+ />
57
+ </svg>
58
+ </ForwardRef(SvgIcon)>
59
+ </ForwardRef(CheckIcon)>
60
+ `;
61
+
62
+ exports[`renders the CheckIcon with prop size=s 1`] = `
63
+ <ForwardRef(CheckIcon)
64
+ size="s"
65
+ >
66
+ <ForwardRef(SvgIcon)
67
+ size="s"
68
+ >
69
+ <svg
70
+ aria-hidden="true"
71
+ className="govgr-svg-icon--dark govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
72
+ focusable="false"
73
+ viewBox="0 0 24 24"
74
+ >
75
+ <polygon
76
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
77
+ />
78
+ </svg>
79
+ </ForwardRef(SvgIcon)>
80
+ </ForwardRef(CheckIcon)>
81
+ `;
82
+
83
+ exports[`renders the CheckIcon with prop size=xl 1`] = `
84
+ <ForwardRef(CheckIcon)
85
+ size="xl"
86
+ >
87
+ <ForwardRef(SvgIcon)
88
+ size="xl"
89
+ >
90
+ <svg
91
+ aria-hidden="true"
92
+ className="govgr-svg-icon--dark govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
93
+ focusable="false"
94
+ viewBox="0 0 24 24"
95
+ >
96
+ <polygon
97
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
98
+ />
99
+ </svg>
100
+ </ForwardRef(SvgIcon)>
101
+ </ForwardRef(CheckIcon)>
102
+ `;
103
+
104
+ exports[`renders the CheckIcon with prop variant=dark 1`] = `
105
+ <ForwardRef(CheckIcon)
106
+ variant="dark"
107
+ >
108
+ <ForwardRef(SvgIcon)
109
+ variant="dark"
110
+ >
111
+ <svg
112
+ aria-hidden="true"
113
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
114
+ focusable="false"
115
+ viewBox="0 0 24 24"
116
+ >
117
+ <polygon
118
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
119
+ />
120
+ </svg>
121
+ </ForwardRef(SvgIcon)>
122
+ </ForwardRef(CheckIcon)>
123
+ `;
124
+
125
+ exports[`renders the CheckIcon with prop variant=error 1`] = `
126
+ <ForwardRef(CheckIcon)
127
+ variant="error"
128
+ >
129
+ <ForwardRef(SvgIcon)
130
+ variant="error"
131
+ >
132
+ <svg
133
+ aria-hidden="true"
134
+ className="govgr-svg-icon--error govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
135
+ focusable="false"
136
+ viewBox="0 0 24 24"
137
+ >
138
+ <polygon
139
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
140
+ />
141
+ </svg>
142
+ </ForwardRef(SvgIcon)>
143
+ </ForwardRef(CheckIcon)>
144
+ `;
145
+
146
+ exports[`renders the CheckIcon with prop variant=error and size= xl 1`] = `
147
+ <ForwardRef(CheckIcon)
148
+ size="xl"
149
+ variant="warning"
150
+ >
151
+ <ForwardRef(SvgIcon)
152
+ size="xl"
153
+ variant="warning"
154
+ >
155
+ <svg
156
+ aria-hidden="true"
157
+ className="govgr-svg-icon--warning govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
158
+ focusable="false"
159
+ viewBox="0 0 24 24"
160
+ >
161
+ <polygon
162
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
163
+ />
164
+ </svg>
165
+ </ForwardRef(SvgIcon)>
166
+ </ForwardRef(CheckIcon)>
167
+ `;
168
+
169
+ exports[`renders the CheckIcon with prop variant=focus 1`] = `
170
+ <ForwardRef(CheckIcon)
171
+ variant="focus"
172
+ >
173
+ <ForwardRef(SvgIcon)
174
+ variant="focus"
175
+ >
176
+ <svg
177
+ aria-hidden="true"
178
+ className="govgr-svg-icon--focus govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
179
+ focusable="false"
180
+ viewBox="0 0 24 24"
181
+ >
182
+ <polygon
183
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
184
+ />
185
+ </svg>
186
+ </ForwardRef(SvgIcon)>
187
+ </ForwardRef(CheckIcon)>
188
+ `;
189
+
190
+ exports[`renders the CheckIcon with prop variant=gray 1`] = `
191
+ <ForwardRef(CheckIcon)
192
+ variant="gray"
193
+ >
194
+ <ForwardRef(SvgIcon)
195
+ variant="gray"
196
+ >
197
+ <svg
198
+ aria-hidden="true"
199
+ className="govgr-svg-icon--gray govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
200
+ focusable="false"
201
+ viewBox="0 0 24 24"
202
+ >
203
+ <polygon
204
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
205
+ />
206
+ </svg>
207
+ </ForwardRef(SvgIcon)>
208
+ </ForwardRef(CheckIcon)>
209
+ `;
210
+
211
+ exports[`renders the CheckIcon with prop variant=light 1`] = `
212
+ <ForwardRef(CheckIcon)
213
+ variant="light"
214
+ >
215
+ <ForwardRef(SvgIcon)
216
+ variant="light"
217
+ >
218
+ <svg
219
+ aria-hidden="true"
220
+ className="govgr-svg-icon--light govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
221
+ focusable="false"
222
+ viewBox="0 0 24 24"
223
+ >
224
+ <polygon
225
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
226
+ />
227
+ </svg>
228
+ </ForwardRef(SvgIcon)>
229
+ </ForwardRef(CheckIcon)>
230
+ `;
231
+
232
+ exports[`renders the CheckIcon with prop variant=primary 1`] = `
233
+ <ForwardRef(CheckIcon)
234
+ variant="primary"
235
+ >
236
+ <ForwardRef(SvgIcon)
237
+ variant="primary"
238
+ >
239
+ <svg
240
+ aria-hidden="true"
241
+ className="govgr-svg-icon--primary govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
242
+ focusable="false"
243
+ viewBox="0 0 24 24"
244
+ >
245
+ <polygon
246
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
247
+ />
248
+ </svg>
249
+ </ForwardRef(SvgIcon)>
250
+ </ForwardRef(CheckIcon)>
251
+ `;
252
+
253
+ exports[`renders the CheckIcon with prop variant=success 1`] = `
254
+ <ForwardRef(CheckIcon)
255
+ variant="success"
256
+ >
257
+ <ForwardRef(SvgIcon)
258
+ variant="success"
259
+ >
260
+ <svg
261
+ aria-hidden="true"
262
+ className="govgr-svg-icon--success govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
263
+ focusable="false"
264
+ viewBox="0 0 24 24"
265
+ >
266
+ <polygon
267
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
268
+ />
269
+ </svg>
270
+ </ForwardRef(SvgIcon)>
271
+ </ForwardRef(CheckIcon)>
272
+ `;
273
+
274
+ exports[`renders the CheckIcon with prop variant=warning 1`] = `
275
+ <ForwardRef(CheckIcon)
276
+ variant="warning"
277
+ >
278
+ <ForwardRef(SvgIcon)
279
+ variant="warning"
280
+ >
281
+ <svg
282
+ aria-hidden="true"
283
+ className="govgr-svg-icon--warning govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
284
+ focusable="false"
285
+ viewBox="0 0 24 24"
286
+ >
287
+ <polygon
288
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
289
+ />
290
+ </svg>
291
+ </ForwardRef(SvgIcon)>
292
+ </ForwardRef(CheckIcon)>
293
+ `;
294
+
295
+ exports[`renders the CheckIcon with prop variant=warning and size=s 1`] = `
296
+ <ForwardRef(CheckIcon)
297
+ size="s"
298
+ variant="warning"
299
+ >
300
+ <ForwardRef(SvgIcon)
301
+ size="s"
302
+ variant="warning"
303
+ >
304
+ <svg
305
+ aria-hidden="true"
306
+ className="govgr-svg-icon--warning govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
307
+ focusable="false"
308
+ viewBox="0 0 24 24"
309
+ >
310
+ <polygon
311
+ points="9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
312
+ />
313
+ </svg>
314
+ </ForwardRef(SvgIcon)>
315
+ </ForwardRef(CheckIcon)>
316
+ `;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@digigov/react-core/SvgIcon';
3
+ export interface CheckIconProps 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 CheckIcon component when you need a check icon.
13
+ */
14
+ export declare const CheckIcon: React.FC<CheckIconProps>;
15
+ export default CheckIcon;
@@ -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.CheckIcon = 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: "9.49 14.94 4.16 9.67 1.84 12.01 9.5 19.6 22.16 7.05 19.84 4.7 9.5 14.94"
24
+ });
25
+
26
+ /**
27
+ * Use CheckIcon component when you need a check icon.
28
+ */
29
+ var CheckIcon = /*#__PURE__*/_react["default"].forwardRef(function CheckIcon(_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.CheckIcon = CheckIcon;
43
+ var _default = CheckIcon;
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 _CheckIcon = _interopRequireDefault(require("@digigov/react-core/CheckIcon"));
10
+
11
+ var _ref = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], null);
12
+
13
+ it('renders the CheckIcon with no props', function () {
14
+ expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
15
+ });
16
+
17
+ var _ref2 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
18
+ size: "s"
19
+ });
20
+
21
+ it('renders the CheckIcon with prop size=s', function () {
22
+ expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
23
+ });
24
+
25
+ var _ref3 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
26
+ size: "m"
27
+ });
28
+
29
+ it('renders the CheckIcon with prop size=m', function () {
30
+ expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
31
+ });
32
+
33
+ var _ref4 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
34
+ size: "l"
35
+ });
36
+
37
+ it('renders the CheckIcon with prop size=l', function () {
38
+ expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
39
+ });
40
+
41
+ var _ref5 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
42
+ size: "xl"
43
+ });
44
+
45
+ it('renders the CheckIcon with prop size=xl', function () {
46
+ expect((0, _enzyme.mount)(_ref5)).toMatchSnapshot();
47
+ });
48
+
49
+ var _ref6 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
50
+ variant: "dark"
51
+ });
52
+
53
+ it('renders the CheckIcon with prop variant=dark', function () {
54
+ expect((0, _enzyme.mount)(_ref6)).toMatchSnapshot();
55
+ });
56
+
57
+ var _ref7 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
58
+ variant: "light"
59
+ });
60
+
61
+ it('renders the CheckIcon with prop variant=light', function () {
62
+ expect((0, _enzyme.mount)(_ref7)).toMatchSnapshot();
63
+ });
64
+
65
+ var _ref8 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
66
+ variant: "gray"
67
+ });
68
+
69
+ it('renders the CheckIcon with prop variant=gray', function () {
70
+ expect((0, _enzyme.mount)(_ref8)).toMatchSnapshot();
71
+ });
72
+
73
+ var _ref9 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
74
+ variant: "primary"
75
+ });
76
+
77
+ it('renders the CheckIcon with prop variant=primary', function () {
78
+ expect((0, _enzyme.mount)(_ref9)).toMatchSnapshot();
79
+ });
80
+
81
+ var _ref10 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
82
+ variant: "success"
83
+ });
84
+
85
+ it('renders the CheckIcon with prop variant=success', function () {
86
+ expect((0, _enzyme.mount)(_ref10)).toMatchSnapshot();
87
+ });
88
+
89
+ var _ref11 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
90
+ variant: "warning"
91
+ });
92
+
93
+ it('renders the CheckIcon with prop variant=warning', function () {
94
+ expect((0, _enzyme.mount)(_ref11)).toMatchSnapshot();
95
+ });
96
+
97
+ var _ref12 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
98
+ variant: "error"
99
+ });
100
+
101
+ it('renders the CheckIcon with prop variant=error', function () {
102
+ expect((0, _enzyme.mount)(_ref12)).toMatchSnapshot();
103
+ });
104
+
105
+ var _ref13 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
106
+ variant: "focus"
107
+ });
108
+
109
+ it('renders the CheckIcon with prop variant=focus', function () {
110
+ expect((0, _enzyme.mount)(_ref13)).toMatchSnapshot();
111
+ });
112
+
113
+ var _ref14 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
114
+ variant: "warning",
115
+ size: "s"
116
+ });
117
+
118
+ it('renders the CheckIcon with prop variant=warning and size=s', function () {
119
+ expect((0, _enzyme.mount)(_ref14)).toMatchSnapshot();
120
+ });
121
+
122
+ var _ref15 = /*#__PURE__*/_react["default"].createElement(_CheckIcon["default"], {
123
+ variant: "warning",
124
+ size: "xl"
125
+ });
126
+
127
+ it('renders the CheckIcon with prop variant=error and size= xl', function () {
128
+ expect((0, _enzyme.mount)(_ref15)).toMatchSnapshot();
129
+ });
@@ -15,5 +15,5 @@ export interface CheckboxItemProps extends InputElementAttributes {
15
15
  * CheckboxItem component allows the user to select one or more checkboxes
16
16
  * CheckboxItem must be used inside Checkbox component
17
17
  */
18
- export declare const CheckboxItem: React.ForwardRefExoticComponent<Pick<CheckboxItemProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "form" | "pattern" | "list" | "step" | "type" | "value" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "src" | "width"> & React.RefAttributes<HTMLInputElement>>;
18
+ export declare const CheckboxItem: React.ForwardRefExoticComponent<Pick<CheckboxItemProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "form" | "pattern" | "list" | "step" | "size" | "height" | "max" | "min" | "name" | "type" | "width" | "crossOrigin" | "value" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "src"> & React.RefAttributes<HTMLInputElement>>;
19
19
  export default CheckboxItem;
@@ -0,0 +1,20 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders the CloseIcon with no props 1`] = `
4
+ <ForwardRef(CloseIcon)>
5
+ <ForwardRef(SvgIcon)
6
+ className="govgr-close-icon"
7
+ >
8
+ <svg
9
+ aria-hidden="true"
10
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-close-icon govgr-svg-icon"
11
+ focusable="false"
12
+ viewBox="0 0 24 24"
13
+ >
14
+ <polygon
15
+ points="14.4,11.8 22,4.2 19.7,1.8 12,9.4 4.4,1.8 2,4.2 9.7,11.9 2.1,19.5 4.4,21.9 12.1,14.3 19.7,21.9 22.1,19.5 "
16
+ />
17
+ </svg>
18
+ </ForwardRef(SvgIcon)>
19
+ </ForwardRef(CloseIcon)>
20
+ `;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@digigov/react-core/SvgIcon';
3
+ export interface CloseIconProps 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
+ * CloseIcon component is used to add close icon.
13
+ * CloseIcon component can be used for dismissing contents
14
+ */
15
+ export declare const CloseIcon: React.FC<CloseIconProps>;
16
+ export default CloseIcon;
@@ -0,0 +1,45 @@
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.CloseIcon = 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: "14.4,11.8 22,4.2 19.7,1.8 12,9.4 4.4,1.8 2,4.2 9.7,11.9 2.1,19.5 4.4,21.9 12.1,14.3 19.7,21.9 22.1,19.5 "
24
+ });
25
+
26
+ /**
27
+ * CloseIcon component is used to add close icon.
28
+ * CloseIcon component can be used for dismissing contents
29
+ */
30
+ var CloseIcon = /*#__PURE__*/_react["default"].forwardRef(function CloseIcon(_ref, ref) {
31
+ var size = _ref.size,
32
+ variant = _ref.variant,
33
+ className = _ref.className,
34
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
35
+ return /*#__PURE__*/_react["default"].createElement(_SvgIcon["default"], (0, _extends2["default"])({
36
+ size: size,
37
+ variant: variant,
38
+ className: (0, _clsx["default"])(className && className, true && 'govgr-close-icon'),
39
+ ref: ref
40
+ }, props), _ref2);
41
+ });
42
+
43
+ exports.CloseIcon = CloseIcon;
44
+ var _default = CloseIcon;
45
+ exports["default"] = _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
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 _CloseIcon = _interopRequireDefault(require("@digigov/react-core/CloseIcon"));
10
+
11
+ var _ref = /*#__PURE__*/_react["default"].createElement(_CloseIcon["default"], null);
12
+
13
+ it('renders the CloseIcon with no props', function () {
14
+ expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
15
+ });