@digigov/react-core 0.5.2 → 0.6.0

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 (123) hide show
  1. package/ArrowIcon/__snapshots__/index.test.tsx.snap +67 -0
  2. package/ArrowIcon/index.d.ts +15 -0
  3. package/ArrowIcon/index.js +73 -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 +146 -30
  9. package/BurgerIcon/index.d.ts +9 -3
  10. package/BurgerIcon/index.js +50 -11
  11. package/BurgerIcon/index.test.js +32 -6
  12. package/Button/index.d.ts +1 -1
  13. package/ButtonLink/index.d.ts +1 -1
  14. package/CHANGELOG.md +31 -1
  15. package/CallToAction/index.d.ts +1 -1
  16. package/CallToAction/index.js +3 -8
  17. package/CaretIcon/__snapshots__/index.test.tsx.snap +67 -0
  18. package/CaretIcon/index.d.ts +15 -0
  19. package/CaretIcon/index.js +73 -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 +256 -0
  23. package/CheckIcon/index.d.ts +19 -0
  24. package/CheckIcon/index.js +68 -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 +16 -0
  29. package/CloseIcon/index.d.ts +10 -0
  30. package/CloseIcon/index.js +42 -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/FileUpload/index.d.ts +1 -1
  37. package/FooterContainer/index.d.ts +8 -1
  38. package/FooterContainer/index.js +4 -2
  39. package/FooterImage/index.d.ts +1 -1
  40. package/FooterLink/index.d.ts +1 -1
  41. package/GovGRLogo/index.d.ts +1 -1
  42. package/Grid/index.d.ts +1 -1
  43. package/HeaderLogo/index.d.ts +1 -1
  44. package/HeaderSecondaryLogo/index.d.ts +1 -1
  45. package/HeaderTitle/index.d.ts +1 -1
  46. package/HellenicRepublicLogo/index.d.ts +1 -1
  47. package/Link/index.d.ts +1 -1
  48. package/MoreVertIcon/__snapshots__/index.test.tsx.snap +436 -0
  49. package/MoreVertIcon/index.d.ts +19 -0
  50. package/MoreVertIcon/index.js +82 -0
  51. package/MoreVertIcon/index.test.d.ts +1 -0
  52. package/MoreVertIcon/index.test.js +129 -0
  53. package/NavHorizontalListItem/index.d.ts +1 -1
  54. package/NavVerticalItem/index.d.ts +1 -1
  55. package/NormalText/index.d.ts +1 -1
  56. package/NotificationBannerLink/index.d.ts +1 -1
  57. package/Paragraph/index.d.ts +1 -1
  58. package/RadioItem/index.d.ts +1 -1
  59. package/Select/index.d.ts +1 -1
  60. package/Table/index.d.ts +1 -1
  61. package/TabsListItem/index.d.ts +1 -1
  62. package/TextArea/index.d.ts +1 -1
  63. package/TextInput/index.d.ts +1 -1
  64. package/UncheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  65. package/UncheckIcon/index.d.ts +19 -0
  66. package/UncheckIcon/index.js +68 -0
  67. package/UncheckIcon/index.test.d.ts +1 -0
  68. package/UncheckIcon/index.test.js +129 -0
  69. package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +67 -0
  70. package/es/ArrowIcon/index.js +50 -0
  71. package/es/ArrowIcon/index.test.js +33 -0
  72. package/es/BackLink/index.js +4 -3
  73. package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +146 -30
  74. package/es/BurgerIcon/index.js +42 -11
  75. package/es/BurgerIcon/index.test.js +32 -6
  76. package/es/CallToAction/index.js +2 -8
  77. package/es/CaretIcon/__snapshots__/index.test.tsx.snap +67 -0
  78. package/es/CaretIcon/index.js +50 -0
  79. package/es/CaretIcon/index.test.js +33 -0
  80. package/es/CheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  81. package/es/CheckIcon/index.js +45 -0
  82. package/es/CheckIcon/index.test.js +123 -0
  83. package/es/CloseIcon/__snapshots__/index.test.tsx.snap +16 -0
  84. package/es/CloseIcon/index.js +27 -0
  85. package/es/CloseIcon/index.test.js +9 -0
  86. package/es/DateInputItem/index.js +5 -5
  87. package/es/FooterContainer/index.js +4 -2
  88. package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +436 -0
  89. package/es/MoreVertIcon/index.js +59 -0
  90. package/es/MoreVertIcon/index.test.js +123 -0
  91. package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  92. package/es/UncheckIcon/index.js +45 -0
  93. package/es/UncheckIcon/index.test.js +123 -0
  94. package/es/index.js +6 -0
  95. package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +67 -0
  96. package/esm/ArrowIcon/index.js +50 -0
  97. package/esm/ArrowIcon/index.test.js +33 -0
  98. package/esm/BackLink/index.js +4 -3
  99. package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +146 -30
  100. package/esm/BurgerIcon/index.js +42 -11
  101. package/esm/BurgerIcon/index.test.js +32 -6
  102. package/esm/CallToAction/index.js +2 -8
  103. package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +67 -0
  104. package/esm/CaretIcon/index.js +50 -0
  105. package/esm/CaretIcon/index.test.js +33 -0
  106. package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  107. package/esm/CheckIcon/index.js +45 -0
  108. package/esm/CheckIcon/index.test.js +123 -0
  109. package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +16 -0
  110. package/esm/CloseIcon/index.js +27 -0
  111. package/esm/CloseIcon/index.test.js +9 -0
  112. package/esm/DateInputItem/index.js +5 -5
  113. package/esm/FooterContainer/index.js +4 -2
  114. package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +436 -0
  115. package/esm/MoreVertIcon/index.js +59 -0
  116. package/esm/MoreVertIcon/index.test.js +123 -0
  117. package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +256 -0
  118. package/esm/UncheckIcon/index.js +45 -0
  119. package/esm/UncheckIcon/index.test.js +123 -0
  120. package/esm/index.js +7 -1
  121. package/index.d.ts +6 -0
  122. package/index.js +48 -0
  123. package/package.json +3 -3
@@ -0,0 +1,256 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders the CheckIcon with no props 1`] = `
4
+ <ForwardRef(CheckIcon)>
5
+ <svg
6
+ aria-hidden="true"
7
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
8
+ focusable="false"
9
+ viewBox="0 0 24 24"
10
+ >
11
+ <polygon
12
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
13
+ />
14
+ </svg>
15
+ </ForwardRef(CheckIcon)>
16
+ `;
17
+
18
+ exports[`renders the CheckIcon with prop size=l 1`] = `
19
+ <ForwardRef(CheckIcon)
20
+ size="l"
21
+ >
22
+ <svg
23
+ aria-hidden="true"
24
+ className="govgr-svg-icon--dark govgr-svg-icon--l govgr-svg-icon--check govgr-svg-icon"
25
+ focusable="false"
26
+ viewBox="0 0 24 24"
27
+ >
28
+ <polygon
29
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
30
+ />
31
+ </svg>
32
+ </ForwardRef(CheckIcon)>
33
+ `;
34
+
35
+ exports[`renders the CheckIcon with prop size=m 1`] = `
36
+ <ForwardRef(CheckIcon)
37
+ size="m"
38
+ >
39
+ <svg
40
+ aria-hidden="true"
41
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
42
+ focusable="false"
43
+ viewBox="0 0 24 24"
44
+ >
45
+ <polygon
46
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
47
+ />
48
+ </svg>
49
+ </ForwardRef(CheckIcon)>
50
+ `;
51
+
52
+ exports[`renders the CheckIcon with prop size=s 1`] = `
53
+ <ForwardRef(CheckIcon)
54
+ size="s"
55
+ >
56
+ <svg
57
+ aria-hidden="true"
58
+ className="govgr-svg-icon--dark govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
59
+ focusable="false"
60
+ viewBox="0 0 24 24"
61
+ >
62
+ <polygon
63
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
64
+ />
65
+ </svg>
66
+ </ForwardRef(CheckIcon)>
67
+ `;
68
+
69
+ exports[`renders the CheckIcon with prop size=xl 1`] = `
70
+ <ForwardRef(CheckIcon)
71
+ size="xl"
72
+ >
73
+ <svg
74
+ aria-hidden="true"
75
+ className="govgr-svg-icon--dark govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
76
+ focusable="false"
77
+ viewBox="0 0 24 24"
78
+ >
79
+ <polygon
80
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
81
+ />
82
+ </svg>
83
+ </ForwardRef(CheckIcon)>
84
+ `;
85
+
86
+ exports[`renders the CheckIcon with prop variant=dark 1`] = `
87
+ <ForwardRef(CheckIcon)
88
+ variant="dark"
89
+ >
90
+ <svg
91
+ aria-hidden="true"
92
+ className="govgr-svg-icon--dark govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
93
+ focusable="false"
94
+ viewBox="0 0 24 24"
95
+ >
96
+ <polygon
97
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
98
+ />
99
+ </svg>
100
+ </ForwardRef(CheckIcon)>
101
+ `;
102
+
103
+ exports[`renders the CheckIcon with prop variant=error 1`] = `
104
+ <ForwardRef(CheckIcon)
105
+ variant="error"
106
+ >
107
+ <svg
108
+ aria-hidden="true"
109
+ className="govgr-svg-icon--error govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
110
+ focusable="false"
111
+ viewBox="0 0 24 24"
112
+ >
113
+ <polygon
114
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
115
+ />
116
+ </svg>
117
+ </ForwardRef(CheckIcon)>
118
+ `;
119
+
120
+ exports[`renders the CheckIcon with prop variant=error and size= xl 1`] = `
121
+ <ForwardRef(CheckIcon)
122
+ size="xl"
123
+ variant="warning"
124
+ >
125
+ <svg
126
+ aria-hidden="true"
127
+ className="govgr-svg-icon--warning govgr-svg-icon--xl govgr-svg-icon--check govgr-svg-icon"
128
+ focusable="false"
129
+ viewBox="0 0 24 24"
130
+ >
131
+ <polygon
132
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
133
+ />
134
+ </svg>
135
+ </ForwardRef(CheckIcon)>
136
+ `;
137
+
138
+ exports[`renders the CheckIcon with prop variant=focus 1`] = `
139
+ <ForwardRef(CheckIcon)
140
+ variant="focus"
141
+ >
142
+ <svg
143
+ aria-hidden="true"
144
+ className="govgr-svg-icon--focus govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
145
+ focusable="false"
146
+ viewBox="0 0 24 24"
147
+ >
148
+ <polygon
149
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
150
+ />
151
+ </svg>
152
+ </ForwardRef(CheckIcon)>
153
+ `;
154
+
155
+ exports[`renders the CheckIcon with prop variant=gray 1`] = `
156
+ <ForwardRef(CheckIcon)
157
+ variant="gray"
158
+ >
159
+ <svg
160
+ aria-hidden="true"
161
+ className="govgr-svg-icon--gray govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
162
+ focusable="false"
163
+ viewBox="0 0 24 24"
164
+ >
165
+ <polygon
166
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
167
+ />
168
+ </svg>
169
+ </ForwardRef(CheckIcon)>
170
+ `;
171
+
172
+ exports[`renders the CheckIcon with prop variant=light 1`] = `
173
+ <ForwardRef(CheckIcon)
174
+ variant="light"
175
+ >
176
+ <svg
177
+ aria-hidden="true"
178
+ className="govgr-svg-icon--light 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.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
184
+ />
185
+ </svg>
186
+ </ForwardRef(CheckIcon)>
187
+ `;
188
+
189
+ exports[`renders the CheckIcon with prop variant=primary 1`] = `
190
+ <ForwardRef(CheckIcon)
191
+ variant="primary"
192
+ >
193
+ <svg
194
+ aria-hidden="true"
195
+ className="govgr-svg-icon--primary govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
196
+ focusable="false"
197
+ viewBox="0 0 24 24"
198
+ >
199
+ <polygon
200
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
201
+ />
202
+ </svg>
203
+ </ForwardRef(CheckIcon)>
204
+ `;
205
+
206
+ exports[`renders the CheckIcon with prop variant=success 1`] = `
207
+ <ForwardRef(CheckIcon)
208
+ variant="success"
209
+ >
210
+ <svg
211
+ aria-hidden="true"
212
+ className="govgr-svg-icon--success govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
213
+ focusable="false"
214
+ viewBox="0 0 24 24"
215
+ >
216
+ <polygon
217
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
218
+ />
219
+ </svg>
220
+ </ForwardRef(CheckIcon)>
221
+ `;
222
+
223
+ exports[`renders the CheckIcon with prop variant=warning 1`] = `
224
+ <ForwardRef(CheckIcon)
225
+ variant="warning"
226
+ >
227
+ <svg
228
+ aria-hidden="true"
229
+ className="govgr-svg-icon--warning govgr-svg-icon--m govgr-svg-icon--check govgr-svg-icon"
230
+ focusable="false"
231
+ viewBox="0 0 24 24"
232
+ >
233
+ <polygon
234
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
235
+ />
236
+ </svg>
237
+ </ForwardRef(CheckIcon)>
238
+ `;
239
+
240
+ exports[`renders the CheckIcon with prop variant=warning and size=s 1`] = `
241
+ <ForwardRef(CheckIcon)
242
+ size="s"
243
+ variant="warning"
244
+ >
245
+ <svg
246
+ aria-hidden="true"
247
+ className="govgr-svg-icon--warning govgr-svg-icon--s govgr-svg-icon--check govgr-svg-icon"
248
+ focusable="false"
249
+ viewBox="0 0 24 24"
250
+ >
251
+ <polygon
252
+ points="9.63 18.697 2.339 11.478 4.661 9.133 9.631 14.055 19.34 4.451 21.66 6.796 9.63 18.697"
253
+ />
254
+ </svg>
255
+ </ForwardRef(CheckIcon)>
256
+ `;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ declare type SVGElementAttributes = JSX.IntrinsicElements['svg'];
3
+ export interface CheckIconProps extends SVGElementAttributes {
4
+ /**
5
+ * size prop declares the size of the svg icon.
6
+ * size is optional. The default value is 'm'.
7
+ */
8
+ size?: 's' | 'm' | 'l' | 'xl';
9
+ /**
10
+ * variant property styles svg icon with Gov.gr palette's basic colors.
11
+ * variant property is optional. The default value is 'dark'
12
+ */
13
+ variant?: 'dark' | 'light' | 'gray' | 'primary' | 'success' | 'warning' | 'error' | 'focus' | 'link';
14
+ }
15
+ /**
16
+ * Use CheckIcon component when you need a check icon.
17
+ */
18
+ export declare const CheckIcon: React.ForwardRefExoticComponent<Pick<CheckIconProps, "string" | "className" | "children" | "key" | "id" | "lang" | "style" | "tabIndex" | "role" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "clipPath" | "filter" | "mask" | "path" | "direction" | "height" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "variant" | "size"> & React.RefAttributes<SVGSVGElement>>;
19
+ export default CheckIcon;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports["default"] = exports.CheckIcon = void 0;
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
+
16
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
+
18
+ var _react = _interopRequireWildcard(require("react"));
19
+
20
+ var _clsx = _interopRequireDefault(require("clsx"));
21
+
22
+ var _excluded = ["size", "variant", "className"];
23
+
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
+ var _ref2 = /*#__PURE__*/_react["default"].createElement("polygon", {
29
+ 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"
30
+ });
31
+
32
+ /**
33
+ * Use CheckIcon component when you need a check icon.
34
+ */
35
+ var CheckIcon = /*#__PURE__*/_react["default"].forwardRef(function CheckIcon(_ref, ref) {
36
+ var _ref$size = _ref.size,
37
+ size = _ref$size === void 0 ? 'm' : _ref$size,
38
+ _ref$variant = _ref.variant,
39
+ variant = _ref$variant === void 0 ? 'dark' : _ref$variant,
40
+ className = _ref.className,
41
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
42
+
43
+ var _useState = (0, _react.useState)(size),
44
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
45
+ checkSize = _useState2[0],
46
+ setSize = _useState2[1];
47
+
48
+ var _useState3 = (0, _react.useState)(variant),
49
+ _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
50
+ checkVariant = _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"])(checkVariant === 'success' && 'govgr-svg-icon--success', checkVariant === 'primary' && 'govgr-svg-icon--primary', checkVariant === 'warning' && 'govgr-svg-icon--warning', checkVariant === 'light' && 'govgr-svg-icon--light', checkVariant === 'error' && 'govgr-svg-icon--error', checkVariant === 'focus' && 'govgr-svg-icon--focus', checkVariant === 'dark' && 'govgr-svg-icon--dark', checkVariant === 'gray' && 'govgr-svg-icon--gray', checkVariant === 'link' && 'govgr-svg-icon--link', checkSize === 'xl' && 'govgr-svg-icon--xl', checkSize === 's' && 'govgr-svg-icon--s', checkSize === 'm' && 'govgr-svg-icon--m', checkSize === 'l' && 'govgr-svg-icon--l', className && className, true && ['govgr-svg-icon--check', 'govgr-svg-icon']),
60
+ focusable: "false",
61
+ viewBox: "0 0 24 24",
62
+ "aria-hidden": "true"
63
+ }, props), _ref2);
64
+ });
65
+
66
+ exports.CheckIcon = CheckIcon;
67
+ var _default = CheckIcon;
68
+ 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" | "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" | "size" | "src"> & React.RefAttributes<HTMLInputElement>>;
19
19
  export default CheckboxItem;
@@ -0,0 +1,16 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders the CloseIcon with no props 1`] = `
4
+ <ForwardRef(CloseIcon)>
5
+ <svg
6
+ aria-hidden="true"
7
+ className="govgr-close-icon"
8
+ focusable="false"
9
+ viewBox="0 0 24 24"
10
+ >
11
+ <polygon
12
+ 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 "
13
+ />
14
+ </svg>
15
+ </ForwardRef(CloseIcon)>
16
+ `;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare type SVGElementAttributes = JSX.IntrinsicElements['svg'];
3
+ export interface CloseIconProps extends SVGElementAttributes {
4
+ }
5
+ /**
6
+ * CloseIcon component is used to add close icon.
7
+ * CloseIcon component can be used for dismissing contents
8
+ */
9
+ export declare const CloseIcon: React.ForwardRefExoticComponent<Pick<CloseIconProps, "string" | "className" | "children" | "key" | "id" | "lang" | "style" | "tabIndex" | "role" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "clipPath" | "filter" | "mask" | "path" | "direction" | "height" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & React.RefAttributes<SVGSVGElement>>;
10
+ export default CloseIcon;
@@ -0,0 +1,42 @@
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 _clsx = _interopRequireDefault(require("clsx"));
17
+
18
+ var _excluded = ["className"];
19
+
20
+ var _ref2 = /*#__PURE__*/_react["default"].createElement("polygon", {
21
+ 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 "
22
+ });
23
+
24
+ /**
25
+ * CloseIcon component is used to add close icon.
26
+ * CloseIcon component can be used for dismissing contents
27
+ */
28
+ var CloseIcon = /*#__PURE__*/_react["default"].forwardRef(function CloseIcon(_ref, ref) {
29
+ var className = _ref.className,
30
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
31
+ return /*#__PURE__*/_react["default"].createElement("svg", (0, _extends2["default"])({
32
+ ref: ref,
33
+ className: (0, _clsx["default"])(className && className, true && 'govgr-close-icon'),
34
+ focusable: "false",
35
+ viewBox: "0 0 24 24",
36
+ "aria-hidden": "true"
37
+ }, props), _ref2);
38
+ });
39
+
40
+ exports.CloseIcon = CloseIcon;
41
+ var _default = CloseIcon;
42
+ 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
+ });