@digigov/react-icons 2.0.0-rc.24 → 2.0.0-rc.26
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 +130 -26
- package/cjs/lazy.js.map +2 -2
- package/cjs/registry/index.js +35 -13
- package/cjs/registry.js.map +2 -2
- package/icons.d.ts +11 -11
- package/icons.js.map +1 -1
- package/index.js +1 -1
- package/lazy/index.js +130 -26
- package/lazy.d.ts +1 -1
- package/lazy.js.map +2 -2
- package/package.json +2 -2
- package/registry/index.js +35 -13
- package/registry.d.ts +1 -1
- package/registry.js.map +2 -2
- 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 +132 -29
- package/src/registry.js +38 -20
- package/Base/index.js.map +0 -7
- package/cjs/Base/index.js.map +0 -7
|
@@ -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
|
}
|
|
@@ -19,8 +19,12 @@ it('renders the PlusIcon with prop color=warning', () => {
|
|
|
19
19
|
expect(render(<PlusIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('renders the PlusIcon with prop color=warning and size=s', () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(
|
|
23
|
+
render(<PlusIcon color="warning" size="sm" />).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
23
25
|
});
|
|
24
26
|
it('renders the PlusIcon with prop color=error and size= xl', () => {
|
|
25
|
-
expect(
|
|
27
|
+
expect(
|
|
28
|
+
render(<PlusIcon color="warning" size="xl" />).baseElement
|
|
29
|
+
).toMatchSnapshot();
|
|
26
30
|
});
|
package/src/PrintIcon/config.tsx
CHANGED
|
@@ -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 PrintType {
|
|
4
|
+
export interface PrintType {}
|
|
5
5
|
|
|
6
6
|
export function print(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
9
|
+
<IconBase as="rect" x="7" y="2" width="10" height="4" />
|
|
10
|
+
<IconBase
|
|
11
|
+
as="path"
|
|
12
|
+
d="M18.7,7.935H5.3c-1.823,0-3.3,1.477-3.3,3.3v6.7h2.4v4.065h15.2v-4.065h2.4v-6.7c0-1.823-1.477-3.3-3.3-3.3ZM17,19.4H7v-5h10v5ZM18.7,12.535c-.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"
|
|
13
|
+
/>
|
|
11
14
|
</>
|
|
12
15
|
);
|
|
13
16
|
}
|
|
@@ -19,8 +19,12 @@ it('renders the PrintIcon with prop color=warning', () => {
|
|
|
19
19
|
expect(render(<PrintIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('renders the PrintIcon with prop color=error and size=sm', () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(
|
|
23
|
+
render(<PrintIcon color="error" size="sm" />).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
23
25
|
});
|
|
24
26
|
it('renders the PrintIcon with prop color=info and size= xl', () => {
|
|
25
|
-
expect(
|
|
27
|
+
expect(
|
|
28
|
+
render(<PrintIcon color="info" size="xl" />).baseElement
|
|
29
|
+
).toMatchSnapshot();
|
|
26
30
|
});
|
package/src/ReplyIcon/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 ReplyType {
|
|
4
|
+
export interface ReplyType {}
|
|
5
5
|
|
|
6
6
|
export function reply(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
9
|
+
<IconBase
|
|
10
|
+
as="path"
|
|
11
|
+
d="M16.35,9.517h-8.034l4.184-4.184-2.334-2.333L2,11.167l8.166,8.167,2.334-2.334-4.184-4.183h8.033c1.296,0,2.35,1.054,2.35,2.35v5.834h3.301v-5.834c0-3.115-2.535-5.65-5.65-5.65Z"
|
|
12
|
+
/>
|
|
10
13
|
</>
|
|
11
14
|
);
|
|
12
15
|
}
|
|
@@ -19,8 +19,12 @@ it('renders the ReplyIcon with prop color=warning', () => {
|
|
|
19
19
|
expect(render(<ReplyIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('renders the ReplyIcon with prop color=warning and size=sm', () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(
|
|
23
|
+
render(<ReplyIcon color="warning" size="sm" />).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
23
25
|
});
|
|
24
26
|
it('renders the ReplyIcon with prop color=error and size= xl', () => {
|
|
25
|
-
expect(
|
|
27
|
+
expect(
|
|
28
|
+
render(<ReplyIcon color="warning" size="xl" />).baseElement
|
|
29
|
+
).toMatchSnapshot();
|
|
26
30
|
});
|
|
@@ -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 RestoreType {
|
|
4
|
+
export interface RestoreType {}
|
|
5
5
|
|
|
6
6
|
export function restore(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
<IconBase
|
|
10
|
+
as="path"
|
|
11
|
+
d="M12,21.3c-2.37,0-4.691-.929-6.407-2.559l1.669-2.003c1.247,1.247,2.974,1.962,4.738,1.962,3.694,0,6.7-3.006,6.7-6.7s-3.006-6.7-6.7-6.7-6.7,3.006-6.7,6.7h-2.6C2.7,6.872,6.872,2.7,12,2.7s9.3,4.172,9.3,9.3-4.172,9.3-9.3,9.3Z"
|
|
12
|
+
/>
|
|
13
|
+
<IconBase as="path" d="M7.5,12H.5l3.5,4.2,3.5-4.2Z" />
|
|
14
|
+
<IconBase as="circle" cx="12" cy="12" r="1.65" />
|
|
12
15
|
</>
|
|
13
16
|
);
|
|
14
17
|
}
|
|
@@ -19,8 +19,12 @@ it('renders the RestoreIcon with prop color=warning', () => {
|
|
|
19
19
|
expect(render(<RestoreIcon color="warning" />).baseElement).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
it('renders the RestoreIcon with prop color=warning and size=sm', () => {
|
|
22
|
-
expect(
|
|
22
|
+
expect(
|
|
23
|
+
render(<RestoreIcon color="warning" size="sm" />).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
23
25
|
});
|
|
24
26
|
it('renders the RestoreIcon with prop color=error and size= xl', () => {
|
|
25
|
-
expect(
|
|
27
|
+
expect(
|
|
28
|
+
render(<RestoreIcon color="warning" size="xl" />).baseElement
|
|
29
|
+
).toMatchSnapshot();
|
|
26
30
|
});
|
|
@@ -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 SearchType {
|
|
4
|
+
export interface SearchType {}
|
|
5
5
|
|
|
6
6
|
export function search(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
9
|
+
<IconBase
|
|
10
|
+
as="path"
|
|
11
|
+
d="M22,19.9l-5.4-5.4c0.9-1.3,1.4-2.8,1.4-4.5c0-4.4-3.6-8-8-8s-8,3.6-8,8s3.6,8,8,8c1.7,0,3.2-0.5,4.5-1.4l5.4,5.4L22,19.9z M10,15c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S12.8,15,10,15z"
|
|
12
|
+
/>
|
|
10
13
|
</>
|
|
11
14
|
);
|
|
12
15
|
}
|
package/src/SvgIcon/index.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
3
|
+
import IconBase, { IconBaseProps } from '@digigov/react-icons/IconBase';
|
|
4
4
|
|
|
5
|
-
export interface SvgIconProps extends
|
|
5
|
+
export interface SvgIconProps extends IconBaseProps<'svg'> {
|
|
6
6
|
/**
|
|
7
7
|
* size is optional.
|
|
8
8
|
* size prop declares the size of the svg icon.
|
|
@@ -31,17 +31,17 @@ export interface SvgIconProps extends BaseProps<'svg'> {
|
|
|
31
31
|
* @value 'link'
|
|
32
32
|
*/
|
|
33
33
|
color?:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
| 'base-content'
|
|
35
|
+
| 'dark'
|
|
36
|
+
| 'white'
|
|
37
|
+
| 'gray'
|
|
38
|
+
| 'primary'
|
|
39
|
+
| 'success'
|
|
40
|
+
| 'warning'
|
|
41
|
+
| 'error'
|
|
42
|
+
| 'focus'
|
|
43
|
+
| 'info'
|
|
44
|
+
| 'link';
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* Use SvgIcon as global svg component.
|
|
@@ -50,7 +50,7 @@ export interface SvgIconProps extends BaseProps<'svg'> {
|
|
|
50
50
|
export const SvgIcon = React.forwardRef<SVGSVGElement, SvgIconProps>(
|
|
51
51
|
function SvgIcon({ size, color, children, className, ...props }, ref) {
|
|
52
52
|
return (
|
|
53
|
-
<
|
|
53
|
+
<IconBase
|
|
54
54
|
as="svg"
|
|
55
55
|
ref={ref}
|
|
56
56
|
className={clsx(className, {
|
|
@@ -64,7 +64,7 @@ export const SvgIcon = React.forwardRef<SVGSVGElement, SvgIconProps>(
|
|
|
64
64
|
{...props}
|
|
65
65
|
>
|
|
66
66
|
{children}
|
|
67
|
-
</
|
|
67
|
+
</IconBase>
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
);
|
|
@@ -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 UncheckType {
|
|
4
|
+
export interface UncheckType {}
|
|
5
5
|
|
|
6
6
|
export function uncheck(): React.ReactElement {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<
|
|
9
|
+
<IconBase
|
|
10
|
+
as="polygon"
|
|
11
|
+
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"
|
|
12
|
+
/>
|
|
10
13
|
</>
|
|
11
14
|
);
|
|
12
15
|
}
|
|
@@ -25,8 +25,12 @@ it('renders the UncheckIcon with prop color=primary', () => {
|
|
|
25
25
|
expect(render(<UncheckIcon color="primary" />).baseElement).toMatchSnapshot();
|
|
26
26
|
});
|
|
27
27
|
it('renders the UncheckIcon with prop color=warning and size=s', () => {
|
|
28
|
-
expect(
|
|
28
|
+
expect(
|
|
29
|
+
render(<UncheckIcon color="warning" size="sm" />).baseElement
|
|
30
|
+
).toMatchSnapshot();
|
|
29
31
|
});
|
|
30
32
|
it('renders the UncheckIcon with prop color=error and size= xl', () => {
|
|
31
|
-
expect(
|
|
33
|
+
expect(
|
|
34
|
+
render(<UncheckIcon color="warning" size="xl" />).baseElement
|
|
35
|
+
).toMatchSnapshot();
|
|
32
36
|
});
|
package/src/icons.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import type { AccessibilityType } from '@digigov/react-icons/AccessibilityIcon/config';
|
|
2
2
|
import type { ArrowType } from '@digigov/react-icons/ArrowIcon/config';
|
|
3
3
|
import type { BurgerType } from '@digigov/react-icons/BurgerIcon/config';
|
|
4
|
+
import type { CancelType } from '@digigov/react-icons/CancelIcon/config';
|
|
4
5
|
import type { CaretType } from '@digigov/react-icons/CaretIcon/config';
|
|
6
|
+
import type { ChatType } from '@digigov/react-icons/ChatIcon/config';
|
|
5
7
|
import type { CheckType } from '@digigov/react-icons/CheckIcon/config';
|
|
6
8
|
import type { ChevronType } from '@digigov/react-icons/ChevronIcon/config';
|
|
7
9
|
import type { CloseType } from '@digigov/react-icons/CloseIcon/config';
|
|
10
|
+
import type { DownloadType } from '@digigov/react-icons/DownloadIcon/config';
|
|
11
|
+
import type { ExclamationType } from '@digigov/react-icons/ExclamationIcon/config';
|
|
8
12
|
import type { GlobeType } from '@digigov/react-icons/GlobeIcon/config';
|
|
9
|
-
import type { MoreVertType } from '@digigov/react-icons/MoreVertIcon/config';
|
|
10
|
-
import type { SearchType } from '@digigov/react-icons/SearchIcon/config';
|
|
11
|
-
import type { UncheckType } from '@digigov/react-icons/UncheckIcon/config';
|
|
12
13
|
import type { LockType } from '@digigov/react-icons/LockIcon/config';
|
|
13
|
-
import type {
|
|
14
|
+
import type { LoginType } from '@digigov/react-icons/LoginIcon/config';
|
|
15
|
+
import type { MinusType } from '@digigov/react-icons/MinusIcon/config';
|
|
16
|
+
import type { MoreVertType } from '@digigov/react-icons/MoreVertIcon/config';
|
|
14
17
|
import type { PdfFileType } from '@digigov/react-icons/PdfFileIcon/config';
|
|
15
|
-
import type { CancelType } from '@digigov/react-icons/CancelIcon/config';
|
|
16
18
|
import type { PlusType } from '@digigov/react-icons/PlusIcon/config';
|
|
17
|
-
import type { MinusType } from '@digigov/react-icons/MinusIcon/config';
|
|
18
|
-
import type { LoginType } from '@digigov/react-icons/LoginIcon/config';
|
|
19
|
-
import type { RestoreType } from '@digigov/react-icons/RestoreIcon/config';
|
|
20
|
-
import type { ReplyType } from '@digigov/react-icons/ReplyIcon/config';
|
|
21
|
-
import type { ChatType } from '@digigov/react-icons/ChatIcon/config';
|
|
22
|
-
import type { ExclamationType } from '@digigov/react-icons/ExclamationIcon/config';
|
|
23
19
|
import type { PrintType } from '@digigov/react-icons/PrintIcon/config';
|
|
20
|
+
import type { ReplyType } from '@digigov/react-icons/ReplyIcon/config';
|
|
21
|
+
import type { RestoreType } from '@digigov/react-icons/RestoreIcon/config';
|
|
22
|
+
import type { SearchType } from '@digigov/react-icons/SearchIcon/config';
|
|
23
|
+
import type { UncheckType } from '@digigov/react-icons/UncheckIcon/config';
|
|
24
24
|
|
|
25
25
|
export * from '@digigov/react-icons/AccessibilityIcon/config';
|
|
26
26
|
export * from '@digigov/react-icons/ArrowIcon/config';
|
|
@@ -46,7 +46,6 @@ export * from '@digigov/react-icons/ChatIcon/config';
|
|
|
46
46
|
export * from '@digigov/react-icons/ExclamationIcon/config';
|
|
47
47
|
export * from '@digigov/react-icons/PrintIcon/config';
|
|
48
48
|
|
|
49
|
-
|
|
50
49
|
export interface IconTypes {
|
|
51
50
|
accessibility: AccessibilityType;
|
|
52
51
|
arrow: ArrowType;
|