@digigov/react-icons 2.0.0-834daea4 → 2.0.0-87b6232d
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.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.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.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.js.map +2 -2
- package/DownloadIcon/config/index.js +8 -2
- package/DownloadIcon/config.js.map +2 -2
- package/ExclamationIcon/config/index.js +8 -2
- package/ExclamationIcon/config.js.map +2 -2
- package/GlobeIcon/config/index.js +8 -2
- 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.js.map +2 -2
- package/LoginIcon/config/index.js +14 -2
- package/LoginIcon/config.js.map +2 -2
- package/MinusIcon/config/index.js +2 -2
- package/MinusIcon/config.js.map +2 -2
- package/MoreVertIcon/config/index.js +2 -2
- package/MoreVertIcon/config.js.map +2 -2
- package/PdfFileIcon/config/index.js +20 -2
- package/PdfFileIcon/config.js.map +2 -2
- package/PlusIcon/config/index.js +8 -2
- package/PlusIcon/config.js.map +2 -2
- package/PrintIcon/config/index.js +8 -2
- package/PrintIcon/config.js.map +2 -2
- package/ReplyIcon/config/index.js +8 -2
- package/ReplyIcon/config.js.map +2 -2
- package/RestoreIcon/config/index.js +8 -2
- package/RestoreIcon/config.js.map +2 -2
- package/SearchIcon/config/index.js +8 -2
- 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.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 +56 -10
- 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 +2 -2
- package/registry/index.js +87 -42
- package/src/AccessibilityIcon/config.tsx +6 -5
- package/src/AccessibilityIcon/index.test.tsx +12 -4
- package/src/ArrowIcon/config.tsx +17 -5
- package/src/BurgerIcon/config.tsx +24 -8
- package/src/BurgerIcon/index.test.tsx +6 -2
- package/src/CancelIcon/config.tsx +6 -3
- package/src/CancelIcon/index.test.tsx +6 -2
- package/src/CaretIcon/config.tsx +5 -5
- package/src/ChatIcon/config.tsx +6 -3
- package/src/ChatIcon/index.test.tsx +7 -3
- package/src/CheckIcon/config.tsx +6 -3
- package/src/CheckIcon/index.test.tsx +6 -2
- package/src/ChevronIcon/config.tsx +17 -5
- package/src/ChevronIcon/index.test.tsx +6 -2
- package/src/CloseIcon/config.tsx +6 -3
- package/src/DownloadIcon/config.tsx +9 -6
- package/src/DownloadIcon/index.test.tsx +9 -3
- package/src/ExclamationIcon/config.tsx +7 -4
- package/src/ExclamationIcon/index.test.tsx +12 -4
- package/src/GlobeIcon/config.tsx +6 -3
- package/src/GlobeIcon/index.test.tsx +3 -1
- package/src/Icon/index.test.tsx +3 -1
- package/src/Icon/index.tsx +1 -1
- package/src/{Base → IconBase}/index.tsx +9 -9
- package/src/LockIcon/config.tsx +6 -3
- package/src/LockIcon/index.test.tsx +6 -2
- package/src/LoginIcon/config.tsx +10 -4
- package/src/LoginIcon/index.test.tsx +6 -2
- package/src/MinusIcon/config.tsx +3 -3
- package/src/MinusIcon/index.test.tsx +6 -2
- package/src/MoreVertIcon/config.tsx +5 -5
- package/src/MoreVertIcon/index.test.tsx +12 -4
- package/src/PdfFileIcon/config.tsx +19 -10
- package/src/PdfFileIcon/index.test.tsx +6 -2
- package/src/PlusIcon/config.tsx +6 -3
- package/src/PlusIcon/index.test.tsx +6 -2
- package/src/PrintIcon/config.tsx +7 -4
- package/src/PrintIcon/index.test.tsx +6 -2
- package/src/ReplyIcon/config.tsx +6 -3
- package/src/ReplyIcon/index.test.tsx +6 -2
- package/src/RestoreIcon/config.tsx +8 -5
- package/src/RestoreIcon/index.test.tsx +6 -2
- package/src/SearchIcon/config.tsx +6 -3
- package/src/SvgIcon/index.tsx +15 -15
- package/src/UncheckIcon/config.tsx +6 -3
- package/src/UncheckIcon/index.test.tsx +6 -2
- package/src/icons.ts +11 -12
- package/src/lazy.js +28 -29
- package/src/registry.js +79 -35
- 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/CaretIcon/config.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
4
|
export interface CaretType {
|
|
5
5
|
/**
|
|
@@ -15,10 +15,10 @@ export interface CaretType {
|
|
|
15
15
|
export const caret: React.FC<CaretType> = ({ direction = 'left' }) => {
|
|
16
16
|
return (
|
|
17
17
|
<>
|
|
18
|
-
{direction === 'left' && <
|
|
19
|
-
{direction === 'right' && <
|
|
20
|
-
{direction === 'up' && <
|
|
21
|
-
{direction === 'down' && <
|
|
18
|
+
{direction === 'left' && <IconBase as="path" d="M18,22V2L6,12L18,22z" />}
|
|
19
|
+
{direction === 'right' && <IconBase as="path" d="M6,2v20l12-10L6,2z" />}
|
|
20
|
+
{direction === 'up' && <IconBase as="path" d="M2,18h20L12,6L2,18z" />}
|
|
21
|
+
{direction === 'down' && <IconBase as="path" d="M22,6H2l10,12L22,6z" />}
|
|
22
22
|
</>
|
|
23
23
|
);
|
|
24
24
|
};
|
package/src/ChatIcon/config.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
4
|
export interface ChatType {
|
|
5
5
|
/**
|
|
@@ -14,9 +14,12 @@ export const chat: React.FC<ChatType> = ({ dots = false }) => {
|
|
|
14
14
|
return (
|
|
15
15
|
<>
|
|
16
16
|
{dots ? (
|
|
17
|
-
<
|
|
17
|
+
<IconBase
|
|
18
|
+
as="path"
|
|
19
|
+
d="M2,3.5v13h4.35l2.5,3,2.5-3h10.65V3.5H2ZM7.65,11.3c-.718,0-1.3-.582-1.3-1.3s.582-1.3,1.3-1.3,1.3.582,1.3,1.3-.582,1.3-1.3,1.3ZM12,11.3c-.718,0-1.3-.582-1.3-1.3s.582-1.3,1.3-1.3,1.3.582,1.3,1.3-.582,1.3-1.3,1.3ZM16.35,11.3c-.718,0-1.3-.582-1.3-1.3s.582-1.3,1.3-1.3,1.3.582,1.3,1.3-.582,1.3-1.3,1.3Z"
|
|
20
|
+
/>
|
|
18
21
|
) : (
|
|
19
|
-
<
|
|
22
|
+
<IconBase as="path" d="M2,3.5v13h4.35l2.5,3,2.5-3h10.65V3.5H2Z" />
|
|
20
23
|
)}
|
|
21
24
|
</>
|
|
22
25
|
);
|
|
@@ -7,7 +7,7 @@ it('renders the ChatIcon with no props', () => {
|
|
|
7
7
|
expect(render(<ChatIcon />).baseElement).toMatchSnapshot();
|
|
8
8
|
});
|
|
9
9
|
it('renders the ChatIcon with dots', () => {
|
|
10
|
-
expect(render(<ChatIcon dots/>).baseElement).toMatchSnapshot();
|
|
10
|
+
expect(render(<ChatIcon dots />).baseElement).toMatchSnapshot();
|
|
11
11
|
});
|
|
12
12
|
it('renders the ChatIcon with prop size=md', () => {
|
|
13
13
|
expect(render(<ChatIcon size="md" />).baseElement).toMatchSnapshot();
|
|
@@ -22,8 +22,12 @@ it('renders the ChatIcon with prop color=warning', () => {
|
|
|
22
22
|
expect(render(<ChatIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
23
23
|
});
|
|
24
24
|
it('renders the ChatIcon with prop color=warning and size=sm', () => {
|
|
25
|
-
expect(
|
|
25
|
+
expect(
|
|
26
|
+
render(<ChatIcon color="warning" size="sm" />).baseElement
|
|
27
|
+
).toMatchSnapshot();
|
|
26
28
|
});
|
|
27
29
|
it('renders the ChatIcon with prop color=error and size= xl', () => {
|
|
28
|
-
expect(
|
|
30
|
+
expect(
|
|
31
|
+
render(<ChatIcon color="warning" size="xl" />).baseElement
|
|
32
|
+
).toMatchSnapshot();
|
|
29
33
|
});
|
package/src/CheckIcon/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 CheckType {
|
|
4
|
+
export interface CheckType {}
|
|
5
5
|
|
|
6
6
|
export function check(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
9
|
+
<IconBase
|
|
10
|
+
as="polygon"
|
|
11
|
+
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"
|
|
12
|
+
/>
|
|
10
13
|
</>
|
|
11
14
|
);
|
|
12
15
|
}
|
|
@@ -22,8 +22,12 @@ it('renders the CheckIcon with prop color=warning', () => {
|
|
|
22
22
|
expect(render(<CheckIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
23
23
|
});
|
|
24
24
|
it('renders the CheckIcon with prop color=warning and size=s', () => {
|
|
25
|
-
expect(
|
|
25
|
+
expect(
|
|
26
|
+
render(<CheckIcon color="warning" size="sm" />).baseElement
|
|
27
|
+
).toMatchSnapshot();
|
|
26
28
|
});
|
|
27
29
|
it('renders the CheckIcon with prop color=error and size= xl', () => {
|
|
28
|
-
expect(
|
|
30
|
+
expect(
|
|
31
|
+
render(<CheckIcon color="warning" size="xl" />).baseElement
|
|
32
|
+
).toMatchSnapshot();
|
|
29
33
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
4
|
export interface ChevronType {
|
|
5
5
|
/**
|
|
@@ -17,16 +17,28 @@ export const chevron: React.FC<ChevronType> = ({ direction = 'right' }) => {
|
|
|
17
17
|
return (
|
|
18
18
|
<>
|
|
19
19
|
{direction === 'left' && (
|
|
20
|
-
<
|
|
20
|
+
<IconBase
|
|
21
|
+
as="path"
|
|
22
|
+
d="M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z"
|
|
23
|
+
/>
|
|
21
24
|
)}
|
|
22
25
|
{direction === 'right' && (
|
|
23
|
-
<
|
|
26
|
+
<IconBase
|
|
27
|
+
as="path"
|
|
28
|
+
d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z"
|
|
29
|
+
/>
|
|
24
30
|
)}
|
|
25
31
|
{direction === 'up' && (
|
|
26
|
-
<
|
|
32
|
+
<IconBase
|
|
33
|
+
as="path"
|
|
34
|
+
d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
|
|
35
|
+
/>
|
|
27
36
|
)}
|
|
28
37
|
{direction === 'down' && (
|
|
29
|
-
<
|
|
38
|
+
<IconBase
|
|
39
|
+
as="path"
|
|
40
|
+
d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
|
|
41
|
+
/>
|
|
30
42
|
)}
|
|
31
43
|
</>
|
|
32
44
|
);
|
|
@@ -8,7 +8,9 @@ it('renders the ChevronIcon with no props, direction prop is right by default',
|
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
it('renders the ChevronIcon with direction left prop', () => {
|
|
11
|
-
expect(
|
|
11
|
+
expect(
|
|
12
|
+
render(<ChevronIcon direction="left" />).baseElement
|
|
13
|
+
).toMatchSnapshot();
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
it('renders the ChevronIcon with direction up prop', () => {
|
|
@@ -16,5 +18,7 @@ it('renders the ChevronIcon with direction up prop', () => {
|
|
|
16
18
|
});
|
|
17
19
|
|
|
18
20
|
it('renders the ChevronIcon with direction down prop', () => {
|
|
19
|
-
expect(
|
|
21
|
+
expect(
|
|
22
|
+
render(<ChevronIcon direction="down" />).baseElement
|
|
23
|
+
).toMatchSnapshot();
|
|
20
24
|
});
|
package/src/CloseIcon/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 CloseType {
|
|
4
|
+
export interface CloseType {}
|
|
5
5
|
|
|
6
6
|
export function close(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
9
|
+
<IconBase
|
|
10
|
+
as="polygon"
|
|
11
|
+
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 "
|
|
12
|
+
/>
|
|
10
13
|
</>
|
|
11
14
|
);
|
|
12
15
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
|
-
export interface DownloadType {
|
|
4
|
+
export interface DownloadType {}
|
|
5
5
|
|
|
6
6
|
export function download(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
<IconBase as="g">
|
|
9
|
+
<IconBase
|
|
10
|
+
as="polygon"
|
|
11
|
+
points="12 18 20 10 15.3 10 15.3 2 8.7 2 8.7 10 4 10 12 18"
|
|
12
|
+
/>
|
|
13
|
+
<IconBase as="rect" x="6" y="18.699" width="12" height="3.301" />
|
|
14
|
+
</IconBase>
|
|
12
15
|
);
|
|
13
16
|
}
|
|
14
17
|
|
|
@@ -16,11 +16,17 @@ it('renders the DownloadIcon with prop color=white', () => {
|
|
|
16
16
|
expect(render(<DownloadIcon color="white" />).baseElement).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
18
|
it('renders the DownloadIcon with prop color=warning', () => {
|
|
19
|
-
expect(
|
|
19
|
+
expect(
|
|
20
|
+
render(<DownloadIcon color="warning" />).baseElement
|
|
21
|
+
).toMatchSnapshot();
|
|
20
22
|
});
|
|
21
23
|
it('renders the DownloadIcon with prop color=warning and size=s', () => {
|
|
22
|
-
expect(
|
|
24
|
+
expect(
|
|
25
|
+
render(<DownloadIcon color="warning" size="sm" />).baseElement
|
|
26
|
+
).toMatchSnapshot();
|
|
23
27
|
});
|
|
24
28
|
it('renders the DownloadIcon with prop color=error and size= xl', () => {
|
|
25
|
-
expect(
|
|
29
|
+
expect(
|
|
30
|
+
render(<DownloadIcon color="warning" size="xl" />).baseElement
|
|
31
|
+
).toMatchSnapshot();
|
|
26
32
|
});
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
|
-
export interface ExclamationType {
|
|
4
|
+
export interface ExclamationType {}
|
|
5
5
|
|
|
6
6
|
export function exclamation(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
10
|
-
|
|
9
|
+
<IconBase
|
|
10
|
+
as="path"
|
|
11
|
+
d="M13.716,16.486h-3.446l-.488-14.486h4.422l-.488,14.486Z"
|
|
12
|
+
/>
|
|
13
|
+
<IconBase as="circle" cx="11.993" cy="19.9" r="2.1" />
|
|
11
14
|
</>
|
|
12
15
|
);
|
|
13
16
|
}
|
|
@@ -13,14 +13,22 @@ it('renders the ExclamationIcon with prop size=xl', () => {
|
|
|
13
13
|
expect(render(<ExclamationIcon size="xl" />).baseElement).toMatchSnapshot();
|
|
14
14
|
});
|
|
15
15
|
it('renders the ExclamationIcon with prop color=white', () => {
|
|
16
|
-
expect(
|
|
16
|
+
expect(
|
|
17
|
+
render(<ExclamationIcon color="white" />).baseElement
|
|
18
|
+
).toMatchSnapshot();
|
|
17
19
|
});
|
|
18
20
|
it('renders the ExclamationIcon with prop color=warning', () => {
|
|
19
|
-
expect(
|
|
21
|
+
expect(
|
|
22
|
+
render(<ExclamationIcon color="warning" />).baseElement
|
|
23
|
+
).toMatchSnapshot();
|
|
20
24
|
});
|
|
21
25
|
it('renders the ExclamationIcon with prop color=error and size=sm', () => {
|
|
22
|
-
expect(
|
|
26
|
+
expect(
|
|
27
|
+
render(<ExclamationIcon color="error" size="sm" />).baseElement
|
|
28
|
+
).toMatchSnapshot();
|
|
23
29
|
});
|
|
24
30
|
it('renders the ExclamationIcon with prop color=info and size= xl', () => {
|
|
25
|
-
expect(
|
|
31
|
+
expect(
|
|
32
|
+
render(<ExclamationIcon color="info" size="xl" />).baseElement
|
|
33
|
+
).toMatchSnapshot();
|
|
26
34
|
});
|
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
6
|
export function globe(): React.ReactElement {
|
|
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"', () => {
|
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,11 +147,11 @@ 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
|
|
154
|
+
export const IconBase: IconBaseComponent = React.forwardRef(function Base<
|
|
155
155
|
C extends React.ElementType = 'span',
|
|
156
156
|
>(
|
|
157
157
|
{
|
|
@@ -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;
|
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
6
|
export function lock(): React.ReactElement {
|
|
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
|
});
|
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
6
|
export function login(): React.ReactElement {
|
|
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
|
});
|
package/src/MinusIcon/config.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
|
-
export interface MinusType {
|
|
4
|
+
export interface MinusType {}
|
|
5
5
|
|
|
6
6
|
export function minus(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
9
|
+
<IconBase as="rect" x="2" y="10.35" width="20" height="3.3" />
|
|
10
10
|
</>
|
|
11
11
|
);
|
|
12
12
|
}
|
|
@@ -19,8 +19,12 @@ it('renders the MinusIcon with prop color=warning', () => {
|
|
|
19
19
|
expect(render(<MinusIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('renders the MinusIcon with prop color=warning and size=s', () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(
|
|
23
|
+
render(<MinusIcon color="warning" size="sm" />).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
23
25
|
});
|
|
24
26
|
it('renders the MinusIcon with prop color=error and size= xl', () => {
|
|
25
|
-
expect(
|
|
27
|
+
expect(
|
|
28
|
+
render(<MinusIcon color="warning" size="xl" />).baseElement
|
|
29
|
+
).toMatchSnapshot();
|
|
26
30
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
|
-
export interface MoreVertType {
|
|
4
|
+
export interface MoreVertType {}
|
|
5
5
|
|
|
6
6
|
export function moreVert(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
<
|
|
9
|
+
<IconBase as="circle" cx="12" cy="5" r="2" />
|
|
10
|
+
<IconBase as="circle" cx="12" cy="12" r="2" />
|
|
11
|
+
<IconBase as="circle" cx="12" cy="19" r="2" />
|
|
12
12
|
</>
|
|
13
13
|
);
|
|
14
14
|
}
|
|
@@ -16,17 +16,25 @@ it('renders the MoreVertIcon with prop color=dark', () => {
|
|
|
16
16
|
expect(render(<MoreVertIcon color="dark" />).baseElement).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
18
|
it('renders the MoreVertIcon with prop color=primary', () => {
|
|
19
|
-
expect(
|
|
19
|
+
expect(
|
|
20
|
+
render(<MoreVertIcon color="primary" />).baseElement
|
|
21
|
+
).toMatchSnapshot();
|
|
20
22
|
});
|
|
21
23
|
it('renders the MoreVertIcon with prop color=success', () => {
|
|
22
|
-
expect(
|
|
24
|
+
expect(
|
|
25
|
+
render(<MoreVertIcon color="success" />).baseElement
|
|
26
|
+
).toMatchSnapshot();
|
|
23
27
|
});
|
|
24
28
|
it('renders the MoreVertIcon with prop color=focus', () => {
|
|
25
29
|
expect(render(<MoreVertIcon color="focus" />).baseElement).toMatchSnapshot();
|
|
26
30
|
});
|
|
27
31
|
it('renders the MoreVertIcon with prop color=warning and size=s', () => {
|
|
28
|
-
expect(
|
|
32
|
+
expect(
|
|
33
|
+
render(<MoreVertIcon color="warning" size="sm" />).baseElement
|
|
34
|
+
).toMatchSnapshot();
|
|
29
35
|
});
|
|
30
36
|
it('renders the MoreVertIcon with prop color=error and size= xl', () => {
|
|
31
|
-
expect(
|
|
37
|
+
expect(
|
|
38
|
+
render(<MoreVertIcon color="warning" size="xl" />).baseElement
|
|
39
|
+
).toMatchSnapshot();
|
|
32
40
|
});
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconBase from '@digigov/react-icons/IconBase';
|
|
3
3
|
|
|
4
|
-
export interface PdfFileType {
|
|
4
|
+
export interface PdfFileType {}
|
|
5
5
|
|
|
6
6
|
export function pdfFile(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
<IconBase as="g">
|
|
9
|
+
<IconBase as="polygon" points="4 19 4 7 2 7 2 21 18 21 18 19 4 19" />
|
|
10
|
+
<IconBase as="g">
|
|
11
|
+
<IconBase
|
|
12
|
+
as="path"
|
|
13
|
+
d="M9.594,8.364h-.838v1.504h.823c.243,0,.429-.061.557-.183.128-.122.192-.294.192-.516,0-.243-.066-.438-.197-.584-.131-.146-.31-.22-.537-.222Z"
|
|
14
|
+
/>
|
|
15
|
+
<IconBase
|
|
16
|
+
as="path"
|
|
17
|
+
d="M13.952,8.364h-.422v3.276h.437c.36,0,.637-.128.831-.385.193-.257.29-.638.29-1.144v-.226c0-.504-.097-.883-.29-1.139-.193-.255-.475-.383-.845-.383Z"
|
|
18
|
+
/>
|
|
19
|
+
<IconBase
|
|
20
|
+
as="path"
|
|
21
|
+
d="M6,3v14h16V3H6ZM11.057,10.381c-.364.304-.863.456-1.498.456h-.802v1.769h-1.257v-5.213h2.08c.399,0,.751.073,1.058.22s.544.356.712.627c.168.271.252.578.252.922,0,.508-.182.915-.546,1.219ZM16.368,10.111c0,.477-.101.905-.303,1.284-.202.378-.486.674-.852.888-.366.214-.775.322-1.226.324h-1.715v-5.213h1.679c.461,0,.875.104,1.242.313.368.209.655.504.861.884.206.381.311.807.313,1.28v.24ZM20.5,8.364h-2.231v1.199h2.026v.967h-2.026v2.077h-1.257v-5.213h3.487v.97Z"
|
|
22
|
+
/>
|
|
23
|
+
</IconBase>
|
|
24
|
+
</IconBase>
|
|
16
25
|
);
|
|
17
26
|
}
|
|
18
27
|
|
|
@@ -19,8 +19,12 @@ it('renders the PdfFileIcon with prop color=warning', () => {
|
|
|
19
19
|
expect(render(<PdfFileIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('renders the PdfFileIcon with prop color=warning and size=s', () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(
|
|
23
|
+
render(<PdfFileIcon color="warning" size="sm" />).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
23
25
|
});
|
|
24
26
|
it('renders the PdfFileIcon with prop color=error and size= xl', () => {
|
|
25
|
-
expect(
|
|
27
|
+
expect(
|
|
28
|
+
render(<PdfFileIcon color="warning" size="xl" />).baseElement
|
|
29
|
+
).toMatchSnapshot();
|
|
26
30
|
});
|
package/src/PlusIcon/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 PlusType {
|
|
4
|
+
export interface PlusType {}
|
|
5
5
|
|
|
6
6
|
export function plus(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
9
|
+
<IconBase
|
|
10
|
+
as="polygon"
|
|
11
|
+
points="22 10.35 13.65 10.35 13.65 2 10.35 2 10.35 10.35 2 10.35 2 13.65 10.35 13.65 10.35 22 13.65 22 13.65 13.65 22 13.65 22 10.35"
|
|
12
|
+
/>
|
|
10
13
|
</>
|
|
11
14
|
);
|
|
12
15
|
}
|