@digigov/react-icons 2.0.0-daaf7bdf → 2.0.0-e20fed09
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/AccessibilityIcon/config/index.js +3 -3
- package/AccessibilityIcon/config.d.ts +1 -1
- package/AccessibilityIcon/config.js.map +2 -2
- package/ArrowIcon/config/index.js +26 -2
- package/ArrowIcon/config.js.map +2 -2
- package/BurgerIcon/config/index.js +29 -5
- package/BurgerIcon/config.d.ts +2 -2
- package/BurgerIcon/config.js.map +2 -2
- package/CancelIcon/config/index.js +8 -2
- package/CancelIcon/config.d.ts +1 -1
- package/CancelIcon/config.js.map +2 -2
- package/CaretIcon/config/index.js +2 -2
- package/CaretIcon/config.js.map +2 -2
- package/ChatIcon/config/index.js +8 -2
- package/ChatIcon/config.js.map +2 -2
- package/CheckIcon/config/index.js +8 -2
- package/CheckIcon/config.d.ts +1 -1
- package/CheckIcon/config.js.map +2 -2
- package/ChevronIcon/config/index.js +26 -2
- package/ChevronIcon/config.js.map +2 -2
- package/CloseIcon/config/index.js +8 -2
- package/CloseIcon/config.d.ts +1 -1
- package/CloseIcon/config.js.map +2 -2
- package/DownloadIcon/config/index.js +8 -2
- package/DownloadIcon/config.d.ts +1 -1
- package/DownloadIcon/config.js.map +2 -2
- package/ExclamationIcon/config/index.js +8 -2
- package/ExclamationIcon/config.d.ts +1 -1
- package/ExclamationIcon/config.js.map +2 -2
- package/GlobeIcon/config/index.js +8 -2
- package/GlobeIcon/config.d.ts +1 -1
- package/GlobeIcon/config.js.map +2 -2
- package/Icon/index.d.ts +1 -1
- package/Icon/index.js +1 -1
- package/Icon/index.js.map +2 -2
- package/{Base → IconBase}/index.d.ts +6 -6
- package/{Base → IconBase}/index.js +4 -4
- package/IconBase/index.js.map +7 -0
- package/{Base → IconBase}/package.json +1 -1
- package/LockIcon/config/index.js +8 -2
- package/LockIcon/config.d.ts +1 -1
- package/LockIcon/config.js.map +2 -2
- package/LoginIcon/config/index.js +14 -2
- package/LoginIcon/config.d.ts +1 -1
- package/LoginIcon/config.js.map +2 -2
- package/MinusIcon/config/index.js +2 -2
- package/MinusIcon/config.d.ts +1 -1
- package/MinusIcon/config.js.map +2 -2
- package/MoreVertIcon/config/index.js +2 -2
- package/MoreVertIcon/config.d.ts +1 -1
- package/MoreVertIcon/config.js.map +2 -2
- package/PdfFileIcon/config/index.js +20 -2
- package/PdfFileIcon/config.d.ts +1 -1
- package/PdfFileIcon/config.js.map +2 -2
- package/PlusIcon/config/index.js +8 -2
- package/PlusIcon/config.d.ts +1 -1
- package/PlusIcon/config.js.map +2 -2
- package/PrintIcon/config/index.js +8 -2
- package/PrintIcon/config.d.ts +1 -1
- package/PrintIcon/config.js.map +2 -2
- package/ReplyIcon/config/index.js +8 -2
- package/ReplyIcon/config.d.ts +1 -1
- package/ReplyIcon/config.js.map +2 -2
- package/RestoreIcon/config/index.js +8 -2
- package/RestoreIcon/config.d.ts +1 -1
- package/RestoreIcon/config.js.map +2 -2
- package/SearchIcon/config/index.js +8 -2
- package/SearchIcon/config.d.ts +1 -1
- package/SearchIcon/config.js.map +2 -2
- package/SvgIcon/index.d.ts +2 -2
- package/SvgIcon/index.js +2 -2
- package/SvgIcon/index.js.map +2 -2
- package/UncheckIcon/config/index.js +8 -2
- package/UncheckIcon/config.d.ts +1 -1
- package/UncheckIcon/config.js.map +2 -2
- package/cjs/AccessibilityIcon/config/index.js +3 -3
- package/cjs/AccessibilityIcon/config.js.map +3 -3
- package/cjs/ArrowIcon/config/index.js +26 -2
- package/cjs/ArrowIcon/config.js.map +3 -3
- package/cjs/BurgerIcon/config/index.js +29 -5
- package/cjs/BurgerIcon/config.js.map +3 -3
- package/cjs/CancelIcon/config/index.js +8 -2
- package/cjs/CancelIcon/config.js.map +3 -3
- package/cjs/CaretIcon/config/index.js +2 -2
- package/cjs/CaretIcon/config.js.map +3 -3
- package/cjs/ChatIcon/config/index.js +8 -2
- package/cjs/ChatIcon/config.js.map +3 -3
- package/cjs/CheckIcon/config/index.js +8 -2
- package/cjs/CheckIcon/config.js.map +3 -3
- package/cjs/ChevronIcon/config/index.js +26 -2
- package/cjs/ChevronIcon/config.js.map +3 -3
- package/cjs/CloseIcon/config/index.js +8 -2
- package/cjs/CloseIcon/config.js.map +3 -3
- package/cjs/DownloadIcon/config/index.js +8 -2
- package/cjs/DownloadIcon/config.js.map +3 -3
- package/cjs/ExclamationIcon/config/index.js +8 -2
- package/cjs/ExclamationIcon/config.js.map +3 -3
- package/cjs/GlobeIcon/config/index.js +8 -2
- package/cjs/GlobeIcon/config.js.map +3 -3
- package/cjs/Icon/index.js +1 -1
- package/cjs/Icon/index.js.map +2 -2
- package/cjs/{Base → IconBase}/index.js +8 -8
- package/cjs/IconBase/index.js.map +7 -0
- package/cjs/LockIcon/config/index.js +8 -2
- package/cjs/LockIcon/config.js.map +3 -3
- package/cjs/LoginIcon/config/index.js +14 -2
- package/cjs/LoginIcon/config.js.map +3 -3
- package/cjs/MinusIcon/config/index.js +2 -2
- package/cjs/MinusIcon/config.js.map +3 -3
- package/cjs/MoreVertIcon/config/index.js +2 -2
- package/cjs/MoreVertIcon/config.js.map +3 -3
- package/cjs/PdfFileIcon/config/index.js +20 -2
- package/cjs/PdfFileIcon/config.js.map +3 -3
- package/cjs/PlusIcon/config/index.js +8 -2
- package/cjs/PlusIcon/config.js.map +3 -3
- package/cjs/PrintIcon/config/index.js +8 -2
- package/cjs/PrintIcon/config.js.map +3 -3
- package/cjs/ReplyIcon/config/index.js +8 -2
- package/cjs/ReplyIcon/config.js.map +3 -3
- package/cjs/RestoreIcon/config/index.js +8 -2
- package/cjs/RestoreIcon/config.js.map +3 -3
- package/cjs/SearchIcon/config/index.js +8 -2
- package/cjs/SearchIcon/config.js.map +3 -3
- package/cjs/SvgIcon/index.js +2 -2
- package/cjs/SvgIcon/index.js.map +3 -3
- package/cjs/UncheckIcon/config/index.js +8 -2
- package/cjs/UncheckIcon/config.js.map +3 -3
- package/cjs/icons.js.map +1 -1
- package/cjs/lazy/index.js +7 -7
- package/cjs/lazy.js.map +3 -3
- package/cjs/registry/index.js +52 -6
- package/cjs/registry.js.map +3 -3
- package/icons.d.ts +11 -11
- package/icons.js.map +1 -1
- package/index.js +1 -1
- package/lazy/index.js +28 -32
- package/package.json +4 -4
- package/registry/index.js +85 -40
- package/src/AccessibilityIcon/__snapshots__/index.test.tsx.snap +126 -27
- package/src/AccessibilityIcon/config.tsx +7 -6
- package/src/AccessibilityIcon/index.test.tsx +12 -4
- package/src/ArrowIcon/__snapshots__/index.test.tsx.snap +13 -1
- package/src/ArrowIcon/config.tsx +17 -5
- package/src/BurgerIcon/__snapshots__/index.test.tsx.snap +53 -5
- package/src/BurgerIcon/config.tsx +24 -8
- package/src/BurgerIcon/index.test.tsx +6 -2
- package/src/CancelIcon/__snapshots__/index.test.tsx.snap +28 -7
- package/src/CancelIcon/config.tsx +7 -4
- package/src/CancelIcon/index.test.tsx +6 -2
- package/src/CaretIcon/__snapshots__/index.test.tsx.snap +13 -1
- package/src/CaretIcon/config.tsx +5 -5
- package/src/ChatIcon/__snapshots__/index.test.tsx.snap +31 -7
- package/src/ChatIcon/config.tsx +6 -3
- package/src/ChatIcon/index.test.tsx +7 -3
- package/src/CheckIcon/__snapshots__/index.test.tsx.snap +32 -8
- package/src/CheckIcon/config.tsx +7 -4
- package/src/CheckIcon/index.test.tsx +6 -2
- package/src/ChevronIcon/__snapshots__/index.test.tsx.snap +13 -1
- package/src/ChevronIcon/config.tsx +17 -5
- package/src/ChevronIcon/index.test.tsx +6 -2
- package/src/CloseIcon/__snapshots__/index.test.tsx.snap +4 -1
- package/src/CloseIcon/config.tsx +7 -4
- package/src/DownloadIcon/__snapshots__/index.test.tsx.snap +70 -14
- package/src/DownloadIcon/config.tsx +10 -7
- package/src/DownloadIcon/index.test.tsx +9 -3
- package/src/ExclamationIcon/__snapshots__/index.test.tsx.snap +42 -7
- package/src/ExclamationIcon/config.tsx +8 -5
- package/src/ExclamationIcon/index.test.tsx +12 -4
- package/src/GlobeIcon/__snapshots__/index.test.tsx.snap +16 -4
- package/src/GlobeIcon/config.tsx +7 -4
- package/src/GlobeIcon/index.test.tsx +3 -1
- package/src/Icon/__snapshots__/index.test.tsx.snap +40 -1
- package/src/Icon/index.test.tsx +3 -1
- package/src/Icon/index.tsx +1 -1
- package/src/{Base → IconBase}/index.tsx +10 -10
- package/src/LockIcon/__snapshots__/index.test.tsx.snap +28 -7
- package/src/LockIcon/config.tsx +7 -4
- package/src/LockIcon/index.test.tsx +6 -2
- package/src/LoginIcon/__snapshots__/index.test.tsx.snap +42 -7
- package/src/LoginIcon/config.tsx +11 -5
- package/src/LoginIcon/index.test.tsx +6 -2
- package/src/MinusIcon/__snapshots__/index.test.tsx.snap +28 -7
- package/src/MinusIcon/config.tsx +4 -4
- package/src/MinusIcon/index.test.tsx +6 -2
- package/src/MoreVertIcon/__snapshots__/index.test.tsx.snap +72 -9
- package/src/MoreVertIcon/config.tsx +6 -6
- package/src/MoreVertIcon/index.test.tsx +12 -4
- package/src/PdfFileIcon/__snapshots__/index.test.tsx.snap +126 -21
- package/src/PdfFileIcon/config.tsx +20 -11
- package/src/PdfFileIcon/index.test.tsx +6 -2
- package/src/PlusIcon/__snapshots__/index.test.tsx.snap +28 -7
- package/src/PlusIcon/config.tsx +7 -4
- package/src/PlusIcon/index.test.tsx +6 -2
- package/src/PrintIcon/__snapshots__/index.test.tsx.snap +42 -7
- package/src/PrintIcon/config.tsx +8 -5
- package/src/PrintIcon/index.test.tsx +6 -2
- package/src/ReplyIcon/__snapshots__/index.test.tsx.snap +28 -7
- package/src/ReplyIcon/config.tsx +7 -4
- package/src/ReplyIcon/index.test.tsx +6 -2
- package/src/RestoreIcon/__snapshots__/index.test.tsx.snap +56 -7
- package/src/RestoreIcon/config.tsx +9 -6
- package/src/RestoreIcon/index.test.tsx +6 -2
- package/src/SearchIcon/__snapshots__/index.test.tsx.snap +4 -1
- package/src/SearchIcon/config.tsx +7 -4
- package/src/SvgIcon/__snapshots__/index.test.tsx.snap +34 -17
- package/src/SvgIcon/index.tsx +15 -15
- package/src/UncheckIcon/__snapshots__/index.test.tsx.snap +36 -9
- package/src/UncheckIcon/config.tsx +7 -4
- package/src/UncheckIcon/index.test.tsx +6 -2
- package/src/icons.ts +11 -12
- package/src/lazy.js +28 -29
- package/src/registry.js +77 -33
- package/Base/index.js.map +0 -7
- package/cjs/Base/index.js.map +0 -7
- package/lazy.d.ts +0 -29
- package/lazy.js.map +0 -7
- package/registry.d.ts +0 -31
- package/registry.js.map +0 -7
package/src/GlobeIcon/config.tsx
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
|
-
export interface GlobeType {
|
|
4
|
+
export interface GlobeType {}
|
|
5
5
|
|
|
6
|
-
export function globe(): React.ReactElement {
|
|
6
|
+
export function globe(): React.ReactElement<any> {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
9
|
+
<IconBase
|
|
10
|
+
as="path"
|
|
11
|
+
d="M12,1C5.925,1,1,5.925,1,12s4.925,11,11,11,11-4.925,11-11S18.075,1,12,1ZM19.203,7.7h-2.6c-.236-1.22-.572-2.32-.98-3.267,1.49.716,2.735,1.857,3.58,3.267ZM20.4,12c0,.582-.06,1.151-.173,1.7h-3.292c.039-.556.066-1.12.066-1.7s-.026-1.145-.066-1.7h3.292c.113.549.173,1.118.173,1.7ZM12,20.378c-.484-.265-1.393-1.667-1.943-4.078h3.885c-.55,2.411-1.459,3.814-1.943,4.078ZM9.667,13.7c-.042-.537-.068-1.103-.068-1.7s.025-1.163.068-1.7h4.665c.042.537.068,1.103.068,1.7s-.025,1.163-.068,1.7h-4.665ZM3.6,12c0-.582.06-1.151.173-1.7h3.292c-.039.556-.066,1.12-.066,1.7s.026,1.145.066,1.7h-3.292c-.113-.549-.173-1.118-.173-1.7ZM12,3.622c.484.265,1.393,1.667,1.943,4.079h-3.885c.55-2.411,1.459-3.814,1.943-4.079ZM8.377,4.433c-.409.947-.745,2.047-.98,3.267h-2.6c.845-1.411,2.09-2.551,3.58-3.267ZM4.797,16.3h2.6c.236,1.22.572,2.32.98,3.267-1.49-.716-2.735-1.857-3.58-3.267ZM15.623,19.567c.409-.947.745-2.047.98-3.267h2.6c-.845,1.411-2.09,2.551-3.58,3.267Z"
|
|
12
|
+
/>
|
|
10
13
|
</>
|
|
11
14
|
);
|
|
12
15
|
}
|
|
@@ -8,7 +8,9 @@ it('renders the GlobeIcon with no props', () => {
|
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
it('renders the GlobeIcon with prop color=base-content', () => {
|
|
11
|
-
expect(
|
|
11
|
+
expect(
|
|
12
|
+
render(<GlobeIcon color="base-content" />).baseElement
|
|
13
|
+
).toMatchSnapshot();
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
it('renders the GlobeIcon prop color= "white"', () => {
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`renders the Icon prop icon= "caret" 1`] = `
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<svg
|
|
7
7
|
aria-hidden="true"
|
|
8
|
+
as="svg"
|
|
8
9
|
class="ds-svg-icon--caret ds-svg-icon"
|
|
9
10
|
focusable="false"
|
|
10
11
|
viewBox="0 0 24 24"
|
|
11
12
|
>
|
|
12
13
|
<path
|
|
14
|
+
as="path"
|
|
15
|
+
class=""
|
|
13
16
|
d="M18,22V2L6,12L18,22z"
|
|
14
17
|
/>
|
|
15
18
|
</svg>
|
|
@@ -22,11 +25,14 @@ exports[`renders the Icon prop icon= "caret" and direction=left 1`] = `
|
|
|
22
25
|
<div>
|
|
23
26
|
<svg
|
|
24
27
|
aria-hidden="true"
|
|
28
|
+
as="svg"
|
|
25
29
|
class="ds-svg-icon--caret ds-svg-icon"
|
|
26
30
|
focusable="false"
|
|
27
31
|
viewBox="0 0 24 24"
|
|
28
32
|
>
|
|
29
33
|
<path
|
|
34
|
+
as="path"
|
|
35
|
+
class=""
|
|
30
36
|
d="M18,22V2L6,12L18,22z"
|
|
31
37
|
/>
|
|
32
38
|
</svg>
|
|
@@ -39,11 +45,14 @@ exports[`renders the Icon prop icon= "check" 1`] = `
|
|
|
39
45
|
<div>
|
|
40
46
|
<svg
|
|
41
47
|
aria-hidden="true"
|
|
48
|
+
as="svg"
|
|
42
49
|
class="ds-svg-icon--check ds-svg-icon"
|
|
43
50
|
focusable="false"
|
|
44
51
|
viewBox="0 0 24 24"
|
|
45
52
|
>
|
|
46
53
|
<polygon
|
|
54
|
+
as="polygon"
|
|
55
|
+
class=""
|
|
47
56
|
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"
|
|
48
57
|
/>
|
|
49
58
|
</svg>
|
|
@@ -56,11 +65,14 @@ exports[`renders the Icon prop icon= "close" 1`] = `
|
|
|
56
65
|
<div>
|
|
57
66
|
<svg
|
|
58
67
|
aria-hidden="true"
|
|
68
|
+
as="svg"
|
|
59
69
|
class="ds-svg-icon--close ds-svg-icon"
|
|
60
70
|
focusable="false"
|
|
61
71
|
viewBox="0 0 24 24"
|
|
62
72
|
>
|
|
63
73
|
<polygon
|
|
74
|
+
as="polygon"
|
|
75
|
+
class=""
|
|
64
76
|
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 "
|
|
65
77
|
/>
|
|
66
78
|
</svg>
|
|
@@ -73,11 +85,14 @@ exports[`renders the Icon prop icon= "uncheck" 1`] = `
|
|
|
73
85
|
<div>
|
|
74
86
|
<svg
|
|
75
87
|
aria-hidden="true"
|
|
88
|
+
as="svg"
|
|
76
89
|
class="ds-svg-icon--uncheck ds-svg-icon"
|
|
77
90
|
focusable="false"
|
|
78
91
|
viewBox="0 0 24 24"
|
|
79
92
|
>
|
|
80
93
|
<polygon
|
|
94
|
+
as="polygon"
|
|
95
|
+
class=""
|
|
81
96
|
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
97
|
/>
|
|
83
98
|
</svg>
|
|
@@ -90,21 +105,28 @@ exports[`renders the Icon props icon= "moreVert" 1`] = `
|
|
|
90
105
|
<div>
|
|
91
106
|
<svg
|
|
92
107
|
aria-hidden="true"
|
|
108
|
+
as="svg"
|
|
93
109
|
class="ds-svg-icon--moreVert ds-svg-icon"
|
|
94
110
|
focusable="false"
|
|
95
111
|
viewBox="0 0 24 24"
|
|
96
112
|
>
|
|
97
113
|
<circle
|
|
114
|
+
as="circle"
|
|
115
|
+
class=""
|
|
98
116
|
cx="12"
|
|
99
117
|
cy="5"
|
|
100
118
|
r="2"
|
|
101
119
|
/>
|
|
102
120
|
<circle
|
|
121
|
+
as="circle"
|
|
122
|
+
class=""
|
|
103
123
|
cx="12"
|
|
104
124
|
cy="12"
|
|
105
125
|
r="2"
|
|
106
126
|
/>
|
|
107
127
|
<circle
|
|
128
|
+
as="circle"
|
|
129
|
+
class=""
|
|
108
130
|
cx="12"
|
|
109
131
|
cy="19"
|
|
110
132
|
r="2"
|
|
@@ -119,11 +141,14 @@ exports[`renders the Icon with no props 1`] = `
|
|
|
119
141
|
<div>
|
|
120
142
|
<svg
|
|
121
143
|
aria-hidden="true"
|
|
144
|
+
as="svg"
|
|
122
145
|
class="ds-svg-icon--chevron ds-svg-icon"
|
|
123
146
|
focusable="false"
|
|
124
147
|
viewBox="0 0 24 24"
|
|
125
148
|
>
|
|
126
149
|
<path
|
|
150
|
+
as="path"
|
|
151
|
+
class=""
|
|
127
152
|
d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
|
|
128
153
|
/>
|
|
129
154
|
</svg>
|
|
@@ -136,11 +161,14 @@ exports[`renders the Icon with prop icon=arrow and direction=up 1`] = `
|
|
|
136
161
|
<div>
|
|
137
162
|
<svg
|
|
138
163
|
aria-hidden="true"
|
|
164
|
+
as="svg"
|
|
139
165
|
class="ds-svg-icon--chevron ds-svg-icon"
|
|
140
166
|
focusable="false"
|
|
141
167
|
viewBox="0 0 24 24"
|
|
142
168
|
>
|
|
143
169
|
<path
|
|
170
|
+
as="path"
|
|
171
|
+
class=""
|
|
144
172
|
d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
|
|
145
173
|
/>
|
|
146
174
|
</svg>
|
|
@@ -153,24 +181,32 @@ exports[`renders the Icon with prop prop icon=burger 1`] = `
|
|
|
153
181
|
<div>
|
|
154
182
|
<svg
|
|
155
183
|
aria-hidden="true"
|
|
184
|
+
as="svg"
|
|
156
185
|
class="ds-svg-icon--burger ds-svg-icon"
|
|
157
186
|
focusable="false"
|
|
158
187
|
viewBox="0 0 24 24"
|
|
159
188
|
>
|
|
160
189
|
<g
|
|
190
|
+
as="g"
|
|
161
191
|
class=""
|
|
162
192
|
>
|
|
163
193
|
<rect
|
|
194
|
+
as="rect"
|
|
195
|
+
class=""
|
|
164
196
|
height="3.3"
|
|
165
197
|
id="ds-svg-icon--burger__line-1"
|
|
166
198
|
width="20"
|
|
167
199
|
/>
|
|
168
200
|
<rect
|
|
201
|
+
as="rect"
|
|
202
|
+
class=""
|
|
169
203
|
height="3.3"
|
|
170
204
|
id="ds-svg-icon--burger__line-2"
|
|
171
205
|
width="20"
|
|
172
206
|
/>
|
|
173
207
|
<rect
|
|
208
|
+
as="rect"
|
|
209
|
+
class=""
|
|
174
210
|
height="3.3"
|
|
175
211
|
id="ds-svg-icon--burger__line-3"
|
|
176
212
|
width="20"
|
|
@@ -186,11 +222,14 @@ exports[`renders the Icon with prop prop icon=globe 1`] = `
|
|
|
186
222
|
<div>
|
|
187
223
|
<svg
|
|
188
224
|
aria-hidden="true"
|
|
225
|
+
as="svg"
|
|
189
226
|
class="ds-svg-icon--globe ds-svg-icon"
|
|
190
227
|
focusable="false"
|
|
191
228
|
viewBox="0 0 24 24"
|
|
192
229
|
>
|
|
193
230
|
<path
|
|
231
|
+
as="path"
|
|
232
|
+
class=""
|
|
194
233
|
d="M12,1C5.925,1,1,5.925,1,12s4.925,11,11,11,11-4.925,11-11S18.075,1,12,1ZM19.203,7.7h-2.6c-.236-1.22-.572-2.32-.98-3.267,1.49.716,2.735,1.857,3.58,3.267ZM20.4,12c0,.582-.06,1.151-.173,1.7h-3.292c.039-.556.066-1.12.066-1.7s-.026-1.145-.066-1.7h3.292c.113.549.173,1.118.173,1.7ZM12,20.378c-.484-.265-1.393-1.667-1.943-4.078h3.885c-.55,2.411-1.459,3.814-1.943,4.078ZM9.667,13.7c-.042-.537-.068-1.103-.068-1.7s.025-1.163.068-1.7h4.665c.042.537.068,1.103.068,1.7s-.025,1.163-.068,1.7h-4.665ZM3.6,12c0-.582.06-1.151.173-1.7h3.292c-.039.556-.066,1.12-.066,1.7s.026,1.145.066,1.7h-3.292c-.113-.549-.173-1.118-.173-1.7ZM12,3.622c.484.265,1.393,1.667,1.943,4.079h-3.885c.55-2.411,1.459-3.814,1.943-4.079ZM8.377,4.433c-.409.947-.745,2.047-.98,3.267h-2.6c.845-1.411,2.09-2.551,3.58-3.267ZM4.797,16.3h2.6c.236,1.22.572,2.32.98,3.267-1.49-.716-2.735-1.857-3.58-3.267ZM15.623,19.567c.409-.947.745-2.047.98-3.267h2.6c-.845,1.411-2.09,2.551-3.58,3.267Z"
|
|
195
234
|
/>
|
|
196
235
|
</svg>
|
package/src/Icon/index.test.tsx
CHANGED
|
@@ -17,7 +17,9 @@ it('renders the Icon prop icon= "caret"', () => {
|
|
|
17
17
|
expect(render(<Icon icon="caret" />).baseElement).toMatchSnapshot();
|
|
18
18
|
});
|
|
19
19
|
it('renders the Icon prop icon= "caret" and direction=left', () => {
|
|
20
|
-
expect(
|
|
20
|
+
expect(
|
|
21
|
+
render(<Icon icon="caret" direction="left" />).baseElement
|
|
22
|
+
).toMatchSnapshot();
|
|
21
23
|
});
|
|
22
24
|
it('renders the Icon prop icon= "check"', () => {
|
|
23
25
|
expect(render(<Icon icon="check" />).baseElement).toMatchSnapshot();
|
package/src/Icon/index.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import SvgIcon, { SvgIconProps } from '@digigov/react-icons/SvgIcon';
|
|
4
3
|
import * as icons from '@digigov/react-icons/icons';
|
|
5
4
|
import type { IconTypes } from '@digigov/react-icons/icons';
|
|
5
|
+
import SvgIcon, { SvgIconProps } from '@digigov/react-icons/SvgIcon';
|
|
6
6
|
|
|
7
7
|
export type IconProps<N extends keyof IconTypes> = SvgIconProps &
|
|
8
8
|
IconTypes[N] & {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
interface AsProp<C extends React.ElementType> {
|
|
5
5
|
as?: C;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
8
|
type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ type PolymorphicComponentProp<
|
|
|
14
14
|
> = React.PropsWithChildren<Props & AsProp<C>> &
|
|
15
15
|
Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
16
16
|
|
|
17
|
-
// This is a new type
|
|
17
|
+
// This is a new type utility with ref!
|
|
18
18
|
type PolymorphicComponentPropWithRef<
|
|
19
19
|
C extends React.ElementType,
|
|
20
20
|
Props = Record<string, unknown>,
|
|
@@ -27,7 +27,7 @@ type PolymorphicRef<C extends React.ElementType> =
|
|
|
27
27
|
/**
|
|
28
28
|
* This is the updated component props using PolymorphicComponentPropWithRef
|
|
29
29
|
*/
|
|
30
|
-
export type
|
|
30
|
+
export type IconBaseProps<C extends React.ElementType> =
|
|
31
31
|
PolymorphicComponentPropWithRef<
|
|
32
32
|
C,
|
|
33
33
|
{
|
|
@@ -147,12 +147,12 @@ type spacingValues =
|
|
|
147
147
|
/**
|
|
148
148
|
* This is the type used in the type annotation for the component
|
|
149
149
|
*/
|
|
150
|
-
type
|
|
151
|
-
props:
|
|
150
|
+
type IconBaseComponent = <C extends React.ElementType = 'span'>(
|
|
151
|
+
props: IconBaseProps<C>
|
|
152
152
|
) => React.ReactNode | null;
|
|
153
153
|
|
|
154
|
-
export const
|
|
155
|
-
C extends React.ElementType
|
|
154
|
+
export const IconBase: IconBaseComponent = React.forwardRef(function Base<
|
|
155
|
+
C extends React.ElementType,
|
|
156
156
|
>(
|
|
157
157
|
{
|
|
158
158
|
as,
|
|
@@ -196,7 +196,7 @@ export const Base: BaseComponent = React.forwardRef(function Base<
|
|
|
196
196
|
children,
|
|
197
197
|
className,
|
|
198
198
|
...props
|
|
199
|
-
}:
|
|
199
|
+
}: IconBaseProps<C>,
|
|
200
200
|
ref?: PolymorphicRef<C>
|
|
201
201
|
) {
|
|
202
202
|
const Component = as || 'span';
|
|
@@ -255,4 +255,4 @@ export const Base: BaseComponent = React.forwardRef(function Base<
|
|
|
255
255
|
);
|
|
256
256
|
});
|
|
257
257
|
|
|
258
|
-
export default
|
|
258
|
+
export default IconBase;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`renders the LockIcon with no props 1`] = `
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<svg
|
|
7
7
|
aria-hidden="true"
|
|
8
|
+
as="svg"
|
|
8
9
|
class="ds-svg-icon--lock ds-svg-icon"
|
|
9
10
|
focusable="false"
|
|
10
11
|
viewBox="0 0 24 24"
|
|
11
12
|
>
|
|
12
13
|
<path
|
|
14
|
+
as="path"
|
|
15
|
+
class=""
|
|
13
16
|
d="M17.872,9v-1.128c0-3.238-2.635-5.872-5.872-5.872s-5.872,2.634-5.872,5.872v1.128h-2.128v13h16v-13h-2.128ZM9.429,7.872c0-1.418,1.153-2.572,2.571-2.572s2.571,1.154,2.571,2.572v1.128h-5.143v-1.128ZM13.65,16c0,.911-.739,1.65-1.65,1.65s-1.65-.739-1.65-1.65v-2c0-.911.739-1.65,1.65-1.65s1.65.739,1.65,1.65v2Z"
|
|
14
17
|
/>
|
|
15
18
|
</svg>
|
|
@@ -22,11 +25,14 @@ exports[`renders the LockIcon with prop color=error and size= xl 1`] = `
|
|
|
22
25
|
<div>
|
|
23
26
|
<svg
|
|
24
27
|
aria-hidden="true"
|
|
25
|
-
|
|
28
|
+
as="svg"
|
|
29
|
+
class="ds-svg-icon--lock ds-svg-icon ds-svg-icon--warning ds-svg-icon--xl"
|
|
26
30
|
focusable="false"
|
|
27
31
|
viewBox="0 0 24 24"
|
|
28
32
|
>
|
|
29
33
|
<path
|
|
34
|
+
as="path"
|
|
35
|
+
class=""
|
|
30
36
|
d="M17.872,9v-1.128c0-3.238-2.635-5.872-5.872-5.872s-5.872,2.634-5.872,5.872v1.128h-2.128v13h16v-13h-2.128ZM9.429,7.872c0-1.418,1.153-2.572,2.571-2.572s2.571,1.154,2.571,2.572v1.128h-5.143v-1.128ZM13.65,16c0,.911-.739,1.65-1.65,1.65s-1.65-.739-1.65-1.65v-2c0-.911.739-1.65,1.65-1.65s1.65.739,1.65,1.65v2Z"
|
|
31
37
|
/>
|
|
32
38
|
</svg>
|
|
@@ -39,11 +45,14 @@ exports[`renders the LockIcon with prop color=warning 1`] = `
|
|
|
39
45
|
<div>
|
|
40
46
|
<svg
|
|
41
47
|
aria-hidden="true"
|
|
42
|
-
|
|
48
|
+
as="svg"
|
|
49
|
+
class="ds-svg-icon--lock ds-svg-icon ds-svg-icon--warning"
|
|
43
50
|
focusable="false"
|
|
44
51
|
viewBox="0 0 24 24"
|
|
45
52
|
>
|
|
46
53
|
<path
|
|
54
|
+
as="path"
|
|
55
|
+
class=""
|
|
47
56
|
d="M17.872,9v-1.128c0-3.238-2.635-5.872-5.872-5.872s-5.872,2.634-5.872,5.872v1.128h-2.128v13h16v-13h-2.128ZM9.429,7.872c0-1.418,1.153-2.572,2.571-2.572s2.571,1.154,2.571,2.572v1.128h-5.143v-1.128ZM13.65,16c0,.911-.739,1.65-1.65,1.65s-1.65-.739-1.65-1.65v-2c0-.911.739-1.65,1.65-1.65s1.65.739,1.65,1.65v2Z"
|
|
48
57
|
/>
|
|
49
58
|
</svg>
|
|
@@ -56,11 +65,14 @@ exports[`renders the LockIcon with prop color=warning and size=sm 1`] = `
|
|
|
56
65
|
<div>
|
|
57
66
|
<svg
|
|
58
67
|
aria-hidden="true"
|
|
59
|
-
|
|
68
|
+
as="svg"
|
|
69
|
+
class="ds-svg-icon--lock ds-svg-icon ds-svg-icon--warning ds-svg-icon--sm"
|
|
60
70
|
focusable="false"
|
|
61
71
|
viewBox="0 0 24 24"
|
|
62
72
|
>
|
|
63
73
|
<path
|
|
74
|
+
as="path"
|
|
75
|
+
class=""
|
|
64
76
|
d="M17.872,9v-1.128c0-3.238-2.635-5.872-5.872-5.872s-5.872,2.634-5.872,5.872v1.128h-2.128v13h16v-13h-2.128ZM9.429,7.872c0-1.418,1.153-2.572,2.571-2.572s2.571,1.154,2.571,2.572v1.128h-5.143v-1.128ZM13.65,16c0,.911-.739,1.65-1.65,1.65s-1.65-.739-1.65-1.65v-2c0-.911.739-1.65,1.65-1.65s1.65.739,1.65,1.65v2Z"
|
|
65
77
|
/>
|
|
66
78
|
</svg>
|
|
@@ -73,11 +85,14 @@ exports[`renders the LockIcon with prop color=white 1`] = `
|
|
|
73
85
|
<div>
|
|
74
86
|
<svg
|
|
75
87
|
aria-hidden="true"
|
|
76
|
-
|
|
88
|
+
as="svg"
|
|
89
|
+
class="ds-svg-icon--lock ds-svg-icon ds-svg-icon--white"
|
|
77
90
|
focusable="false"
|
|
78
91
|
viewBox="0 0 24 24"
|
|
79
92
|
>
|
|
80
93
|
<path
|
|
94
|
+
as="path"
|
|
95
|
+
class=""
|
|
81
96
|
d="M17.872,9v-1.128c0-3.238-2.635-5.872-5.872-5.872s-5.872,2.634-5.872,5.872v1.128h-2.128v13h16v-13h-2.128ZM9.429,7.872c0-1.418,1.153-2.572,2.571-2.572s2.571,1.154,2.571,2.572v1.128h-5.143v-1.128ZM13.65,16c0,.911-.739,1.65-1.65,1.65s-1.65-.739-1.65-1.65v-2c0-.911.739-1.65,1.65-1.65s1.65.739,1.65,1.65v2Z"
|
|
82
97
|
/>
|
|
83
98
|
</svg>
|
|
@@ -90,11 +105,14 @@ exports[`renders the LockIcon with prop size=md 1`] = `
|
|
|
90
105
|
<div>
|
|
91
106
|
<svg
|
|
92
107
|
aria-hidden="true"
|
|
93
|
-
|
|
108
|
+
as="svg"
|
|
109
|
+
class="ds-svg-icon--lock ds-svg-icon ds-svg-icon--md"
|
|
94
110
|
focusable="false"
|
|
95
111
|
viewBox="0 0 24 24"
|
|
96
112
|
>
|
|
97
113
|
<path
|
|
114
|
+
as="path"
|
|
115
|
+
class=""
|
|
98
116
|
d="M17.872,9v-1.128c0-3.238-2.635-5.872-5.872-5.872s-5.872,2.634-5.872,5.872v1.128h-2.128v13h16v-13h-2.128ZM9.429,7.872c0-1.418,1.153-2.572,2.571-2.572s2.571,1.154,2.571,2.572v1.128h-5.143v-1.128ZM13.65,16c0,.911-.739,1.65-1.65,1.65s-1.65-.739-1.65-1.65v-2c0-.911.739-1.65,1.65-1.65s1.65.739,1.65,1.65v2Z"
|
|
99
117
|
/>
|
|
100
118
|
</svg>
|
|
@@ -107,11 +125,14 @@ exports[`renders the LockIcon with prop size=xl 1`] = `
|
|
|
107
125
|
<div>
|
|
108
126
|
<svg
|
|
109
127
|
aria-hidden="true"
|
|
110
|
-
|
|
128
|
+
as="svg"
|
|
129
|
+
class="ds-svg-icon--lock ds-svg-icon ds-svg-icon--xl"
|
|
111
130
|
focusable="false"
|
|
112
131
|
viewBox="0 0 24 24"
|
|
113
132
|
>
|
|
114
133
|
<path
|
|
134
|
+
as="path"
|
|
135
|
+
class=""
|
|
115
136
|
d="M17.872,9v-1.128c0-3.238-2.635-5.872-5.872-5.872s-5.872,2.634-5.872,5.872v1.128h-2.128v13h16v-13h-2.128ZM9.429,7.872c0-1.418,1.153-2.572,2.571-2.572s2.571,1.154,2.571,2.572v1.128h-5.143v-1.128ZM13.65,16c0,.911-.739,1.65-1.65,1.65s-1.65-.739-1.65-1.65v-2c0-.911.739-1.65,1.65-1.65s1.65.739,1.65,1.65v2Z"
|
|
116
137
|
/>
|
|
117
138
|
</svg>
|
package/src/LockIcon/config.tsx
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
|
-
export interface LockType {
|
|
4
|
+
export interface LockType {}
|
|
5
5
|
|
|
6
|
-
export function lock(): React.ReactElement {
|
|
6
|
+
export function lock(): React.ReactElement<any> {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
9
|
+
<IconBase
|
|
10
|
+
as="path"
|
|
11
|
+
d="M17.872,9v-1.128c0-3.238-2.635-5.872-5.872-5.872s-5.872,2.634-5.872,5.872v1.128h-2.128v13h16v-13h-2.128ZM9.429,7.872c0-1.418,1.153-2.572,2.571-2.572s2.571,1.154,2.571,2.572v1.128h-5.143v-1.128ZM13.65,16c0,.911-.739,1.65-1.65,1.65s-1.65-.739-1.65-1.65v-2c0-.911.739-1.65,1.65-1.65s1.65.739,1.65,1.65v2Z"
|
|
12
|
+
/>
|
|
10
13
|
</>
|
|
11
14
|
);
|
|
12
15
|
}
|
|
@@ -19,8 +19,12 @@ it('renders the LockIcon with prop color=warning', () => {
|
|
|
19
19
|
expect(render(<LockIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('renders the LockIcon with prop color=warning and size=sm', () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(
|
|
23
|
+
render(<LockIcon color="warning" size="sm" />).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
23
25
|
});
|
|
24
26
|
it('renders the LockIcon with prop color=error and size= xl', () => {
|
|
25
|
-
expect(
|
|
27
|
+
expect(
|
|
28
|
+
render(<LockIcon color="warning" size="xl" />).baseElement
|
|
29
|
+
).toMatchSnapshot();
|
|
26
30
|
});
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`renders the LoginIcon with no props 1`] = `
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<svg
|
|
7
7
|
aria-hidden="true"
|
|
8
|
+
as="svg"
|
|
8
9
|
class="ds-svg-icon--login ds-svg-icon"
|
|
9
10
|
focusable="false"
|
|
10
11
|
viewBox="0 0 24 24"
|
|
11
12
|
>
|
|
12
13
|
<polygon
|
|
14
|
+
as="polygon"
|
|
15
|
+
class=""
|
|
13
16
|
points="10.419 6.081 8.581 7.919 11.361 10.7 2 10.7 2 13.3 11.361 13.3 8.581 16.081 10.419 17.919 16.339 12 10.419 6.081"
|
|
14
17
|
/>
|
|
15
18
|
<polygon
|
|
19
|
+
as="polygon"
|
|
20
|
+
class=""
|
|
16
21
|
points="19.4 2 15 2 15 4.6 19.4 4.6 19.4 19.4 15 19.4 15 22 19.4 22 22 22 22 19.4 22 4.6 22 2 19.4 2"
|
|
17
22
|
/>
|
|
18
23
|
</svg>
|
|
@@ -25,14 +30,19 @@ exports[`renders the LoginIcon with prop color=error and size= xl 1`] = `
|
|
|
25
30
|
<div>
|
|
26
31
|
<svg
|
|
27
32
|
aria-hidden="true"
|
|
28
|
-
|
|
33
|
+
as="svg"
|
|
34
|
+
class="ds-svg-icon--login ds-svg-icon ds-svg-icon--warning ds-svg-icon--xl"
|
|
29
35
|
focusable="false"
|
|
30
36
|
viewBox="0 0 24 24"
|
|
31
37
|
>
|
|
32
38
|
<polygon
|
|
39
|
+
as="polygon"
|
|
40
|
+
class=""
|
|
33
41
|
points="10.419 6.081 8.581 7.919 11.361 10.7 2 10.7 2 13.3 11.361 13.3 8.581 16.081 10.419 17.919 16.339 12 10.419 6.081"
|
|
34
42
|
/>
|
|
35
43
|
<polygon
|
|
44
|
+
as="polygon"
|
|
45
|
+
class=""
|
|
36
46
|
points="19.4 2 15 2 15 4.6 19.4 4.6 19.4 19.4 15 19.4 15 22 19.4 22 22 22 22 19.4 22 4.6 22 2 19.4 2"
|
|
37
47
|
/>
|
|
38
48
|
</svg>
|
|
@@ -45,14 +55,19 @@ exports[`renders the LoginIcon with prop color=warning 1`] = `
|
|
|
45
55
|
<div>
|
|
46
56
|
<svg
|
|
47
57
|
aria-hidden="true"
|
|
48
|
-
|
|
58
|
+
as="svg"
|
|
59
|
+
class="ds-svg-icon--login ds-svg-icon ds-svg-icon--warning"
|
|
49
60
|
focusable="false"
|
|
50
61
|
viewBox="0 0 24 24"
|
|
51
62
|
>
|
|
52
63
|
<polygon
|
|
64
|
+
as="polygon"
|
|
65
|
+
class=""
|
|
53
66
|
points="10.419 6.081 8.581 7.919 11.361 10.7 2 10.7 2 13.3 11.361 13.3 8.581 16.081 10.419 17.919 16.339 12 10.419 6.081"
|
|
54
67
|
/>
|
|
55
68
|
<polygon
|
|
69
|
+
as="polygon"
|
|
70
|
+
class=""
|
|
56
71
|
points="19.4 2 15 2 15 4.6 19.4 4.6 19.4 19.4 15 19.4 15 22 19.4 22 22 22 22 19.4 22 4.6 22 2 19.4 2"
|
|
57
72
|
/>
|
|
58
73
|
</svg>
|
|
@@ -65,14 +80,19 @@ exports[`renders the LoginIcon with prop color=warning and size=s 1`] = `
|
|
|
65
80
|
<div>
|
|
66
81
|
<svg
|
|
67
82
|
aria-hidden="true"
|
|
68
|
-
|
|
83
|
+
as="svg"
|
|
84
|
+
class="ds-svg-icon--login ds-svg-icon ds-svg-icon--warning ds-svg-icon--sm"
|
|
69
85
|
focusable="false"
|
|
70
86
|
viewBox="0 0 24 24"
|
|
71
87
|
>
|
|
72
88
|
<polygon
|
|
89
|
+
as="polygon"
|
|
90
|
+
class=""
|
|
73
91
|
points="10.419 6.081 8.581 7.919 11.361 10.7 2 10.7 2 13.3 11.361 13.3 8.581 16.081 10.419 17.919 16.339 12 10.419 6.081"
|
|
74
92
|
/>
|
|
75
93
|
<polygon
|
|
94
|
+
as="polygon"
|
|
95
|
+
class=""
|
|
76
96
|
points="19.4 2 15 2 15 4.6 19.4 4.6 19.4 19.4 15 19.4 15 22 19.4 22 22 22 22 19.4 22 4.6 22 2 19.4 2"
|
|
77
97
|
/>
|
|
78
98
|
</svg>
|
|
@@ -85,14 +105,19 @@ exports[`renders the LoginIcon with prop color=white 1`] = `
|
|
|
85
105
|
<div>
|
|
86
106
|
<svg
|
|
87
107
|
aria-hidden="true"
|
|
88
|
-
|
|
108
|
+
as="svg"
|
|
109
|
+
class="ds-svg-icon--login ds-svg-icon ds-svg-icon--white"
|
|
89
110
|
focusable="false"
|
|
90
111
|
viewBox="0 0 24 24"
|
|
91
112
|
>
|
|
92
113
|
<polygon
|
|
114
|
+
as="polygon"
|
|
115
|
+
class=""
|
|
93
116
|
points="10.419 6.081 8.581 7.919 11.361 10.7 2 10.7 2 13.3 11.361 13.3 8.581 16.081 10.419 17.919 16.339 12 10.419 6.081"
|
|
94
117
|
/>
|
|
95
118
|
<polygon
|
|
119
|
+
as="polygon"
|
|
120
|
+
class=""
|
|
96
121
|
points="19.4 2 15 2 15 4.6 19.4 4.6 19.4 19.4 15 19.4 15 22 19.4 22 22 22 22 19.4 22 4.6 22 2 19.4 2"
|
|
97
122
|
/>
|
|
98
123
|
</svg>
|
|
@@ -105,14 +130,19 @@ exports[`renders the LoginIcon with prop size=md 1`] = `
|
|
|
105
130
|
<div>
|
|
106
131
|
<svg
|
|
107
132
|
aria-hidden="true"
|
|
108
|
-
|
|
133
|
+
as="svg"
|
|
134
|
+
class="ds-svg-icon--login ds-svg-icon ds-svg-icon--md"
|
|
109
135
|
focusable="false"
|
|
110
136
|
viewBox="0 0 24 24"
|
|
111
137
|
>
|
|
112
138
|
<polygon
|
|
139
|
+
as="polygon"
|
|
140
|
+
class=""
|
|
113
141
|
points="10.419 6.081 8.581 7.919 11.361 10.7 2 10.7 2 13.3 11.361 13.3 8.581 16.081 10.419 17.919 16.339 12 10.419 6.081"
|
|
114
142
|
/>
|
|
115
143
|
<polygon
|
|
144
|
+
as="polygon"
|
|
145
|
+
class=""
|
|
116
146
|
points="19.4 2 15 2 15 4.6 19.4 4.6 19.4 19.4 15 19.4 15 22 19.4 22 22 22 22 19.4 22 4.6 22 2 19.4 2"
|
|
117
147
|
/>
|
|
118
148
|
</svg>
|
|
@@ -125,14 +155,19 @@ exports[`renders the LoginIcon with prop size=xl 1`] = `
|
|
|
125
155
|
<div>
|
|
126
156
|
<svg
|
|
127
157
|
aria-hidden="true"
|
|
128
|
-
|
|
158
|
+
as="svg"
|
|
159
|
+
class="ds-svg-icon--login ds-svg-icon ds-svg-icon--xl"
|
|
129
160
|
focusable="false"
|
|
130
161
|
viewBox="0 0 24 24"
|
|
131
162
|
>
|
|
132
163
|
<polygon
|
|
164
|
+
as="polygon"
|
|
165
|
+
class=""
|
|
133
166
|
points="10.419 6.081 8.581 7.919 11.361 10.7 2 10.7 2 13.3 11.361 13.3 8.581 16.081 10.419 17.919 16.339 12 10.419 6.081"
|
|
134
167
|
/>
|
|
135
168
|
<polygon
|
|
169
|
+
as="polygon"
|
|
170
|
+
class=""
|
|
136
171
|
points="19.4 2 15 2 15 4.6 19.4 4.6 19.4 19.4 15 19.4 15 22 19.4 22 22 22 22 19.4 22 4.6 22 2 19.4 2"
|
|
137
172
|
/>
|
|
138
173
|
</svg>
|
package/src/LoginIcon/config.tsx
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
|
-
export interface LoginType {
|
|
4
|
+
export interface LoginType {}
|
|
5
5
|
|
|
6
|
-
export function login(): React.ReactElement {
|
|
6
|
+
export function login(): React.ReactElement<any> {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
10
|
-
|
|
9
|
+
<IconBase
|
|
10
|
+
as="polygon"
|
|
11
|
+
points="10.419 6.081 8.581 7.919 11.361 10.7 2 10.7 2 13.3 11.361 13.3 8.581 16.081 10.419 17.919 16.339 12 10.419 6.081"
|
|
12
|
+
/>
|
|
13
|
+
<IconBase
|
|
14
|
+
as="polygon"
|
|
15
|
+
points="19.4 2 15 2 15 4.6 19.4 4.6 19.4 19.4 15 19.4 15 22 19.4 22 22 22 22 19.4 22 4.6 22 2 19.4 2"
|
|
16
|
+
/>
|
|
11
17
|
</>
|
|
12
18
|
);
|
|
13
19
|
}
|
|
@@ -19,8 +19,12 @@ it('renders the LoginIcon with prop color=warning', () => {
|
|
|
19
19
|
expect(render(<LoginIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('renders the LoginIcon with prop color=warning and size=s', () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(
|
|
23
|
+
render(<LoginIcon color="warning" size="sm" />).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
23
25
|
});
|
|
24
26
|
it('renders the LoginIcon with prop color=error and size= xl', () => {
|
|
25
|
-
expect(
|
|
27
|
+
expect(
|
|
28
|
+
render(<LoginIcon color="warning" size="xl" />).baseElement
|
|
29
|
+
).toMatchSnapshot();
|
|
26
30
|
});
|