@digigov/react-icons 1.0.0-rc
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/__snapshots__/index.test.tsx.snap +723 -0
- package/AccessibilityIcon/config.d.ts +8 -0
- package/AccessibilityIcon/config.js +31 -0
- package/AccessibilityIcon/index.d.ts +4 -0
- package/AccessibilityIcon/index.js +24 -0
- package/AccessibilityIcon/index.test.d.ts +1 -0
- package/AccessibilityIcon/index.test.js +137 -0
- package/ArrowIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/ArrowIcon/config.d.ts +6 -0
- package/ArrowIcon/config.js +39 -0
- package/ArrowIcon/index.d.ts +4 -0
- package/ArrowIcon/index.js +24 -0
- package/ArrowIcon/index.test.d.ts +1 -0
- package/ArrowIcon/index.test.js +39 -0
- package/BurgerIcon/__snapshots__/index.test.tsx.snap +320 -0
- package/BurgerIcon/config.d.ts +6 -0
- package/BurgerIcon/config.js +45 -0
- package/BurgerIcon/index.d.ts +4 -0
- package/BurgerIcon/index.js +24 -0
- package/BurgerIcon/index.test.d.ts +1 -0
- package/BurgerIcon/index.test.js +56 -0
- package/CaretIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/CaretIcon/config.d.ts +6 -0
- package/CaretIcon/config.js +39 -0
- package/CaretIcon/index.d.ts +4 -0
- package/CaretIcon/index.js +24 -0
- package/CaretIcon/index.test.d.ts +1 -0
- package/CaretIcon/index.test.js +39 -0
- package/CheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/CheckIcon/config.d.ts +8 -0
- package/CheckIcon/config.js +23 -0
- package/CheckIcon/index.d.ts +4 -0
- package/CheckIcon/index.js +24 -0
- package/CheckIcon/index.test.d.ts +1 -0
- package/CheckIcon/index.test.js +129 -0
- package/CloseIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/CloseIcon/config.d.ts +8 -0
- package/CloseIcon/config.js +23 -0
- package/CloseIcon/index.d.ts +4 -0
- package/CloseIcon/index.js +24 -0
- package/CloseIcon/index.test.d.ts +1 -0
- package/CloseIcon/index.test.js +15 -0
- package/GlobeIcon/__snapshots__/index.test.tsx.snap +149 -0
- package/GlobeIcon/config.d.ts +8 -0
- package/GlobeIcon/config.js +23 -0
- package/GlobeIcon/index.d.ts +4 -0
- package/GlobeIcon/index.js +24 -0
- package/GlobeIcon/index.test.d.ts +1 -0
- package/GlobeIcon/index.test.js +39 -0
- package/LICENSE +0 -0
- package/MoreVertIcon/__snapshots__/index.test.tsx.snap +738 -0
- package/MoreVertIcon/config.d.ts +8 -0
- package/MoreVertIcon/config.js +37 -0
- package/MoreVertIcon/index.d.ts +4 -0
- package/MoreVertIcon/index.js +24 -0
- package/MoreVertIcon/index.test.d.ts +1 -0
- package/MoreVertIcon/index.test.js +129 -0
- package/README.md +0 -0
- package/SearchIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/SearchIcon/config.d.ts +8 -0
- package/SearchIcon/config.js +23 -0
- package/SearchIcon/index.d.ts +4 -0
- package/SearchIcon/index.js +24 -0
- package/SearchIcon/index.test.d.ts +1 -0
- package/SearchIcon/index.test.js +15 -0
- package/UncheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/UncheckIcon/config.d.ts +8 -0
- package/UncheckIcon/config.js +23 -0
- package/UncheckIcon/index.d.ts +4 -0
- package/UncheckIcon/index.js +24 -0
- package/UncheckIcon/index.test.d.ts +1 -0
- package/UncheckIcon/index.test.js +129 -0
- package/es/AccessibilityIcon/__snapshots__/index.test.tsx.snap +723 -0
- package/es/AccessibilityIcon/config.js +19 -0
- package/es/AccessibilityIcon/index.js +9 -0
- package/es/AccessibilityIcon/index.test.js +131 -0
- package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/es/ArrowIcon/config.js +27 -0
- package/es/ArrowIcon/index.js +9 -0
- package/es/ArrowIcon/index.test.js +33 -0
- package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +320 -0
- package/es/BurgerIcon/config.js +32 -0
- package/es/BurgerIcon/index.js +9 -0
- package/es/BurgerIcon/index.test.js +50 -0
- package/es/CaretIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/es/CaretIcon/config.js +27 -0
- package/es/CaretIcon/index.js +9 -0
- package/es/CaretIcon/index.test.js +33 -0
- package/es/CheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/es/CheckIcon/config.js +11 -0
- package/es/CheckIcon/index.js +9 -0
- package/es/CheckIcon/index.test.js +123 -0
- package/es/CloseIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/es/CloseIcon/config.js +11 -0
- package/es/CloseIcon/index.js +9 -0
- package/es/CloseIcon/index.test.js +9 -0
- package/es/GlobeIcon/__snapshots__/index.test.tsx.snap +149 -0
- package/es/GlobeIcon/config.js +11 -0
- package/es/GlobeIcon/index.js +9 -0
- package/es/GlobeIcon/index.test.js +33 -0
- package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +738 -0
- package/es/MoreVertIcon/config.js +25 -0
- package/es/MoreVertIcon/index.js +9 -0
- package/es/MoreVertIcon/index.test.js +123 -0
- package/es/SearchIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/es/SearchIcon/config.js +11 -0
- package/es/SearchIcon/index.js +9 -0
- package/es/SearchIcon/index.test.js +9 -0
- package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/es/UncheckIcon/config.js +11 -0
- package/es/UncheckIcon/index.js +9 -0
- package/es/UncheckIcon/index.test.js +123 -0
- package/es/icons.js +11 -0
- package/es/index.js +10 -0
- package/es/registry.js +42 -0
- package/esm/AccessibilityIcon/__snapshots__/index.test.tsx.snap +723 -0
- package/esm/AccessibilityIcon/config.js +19 -0
- package/esm/AccessibilityIcon/index.js +9 -0
- package/esm/AccessibilityIcon/index.test.js +131 -0
- package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/esm/ArrowIcon/config.js +27 -0
- package/esm/ArrowIcon/index.js +9 -0
- package/esm/ArrowIcon/index.test.js +33 -0
- package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +320 -0
- package/esm/BurgerIcon/config.js +32 -0
- package/esm/BurgerIcon/index.js +9 -0
- package/esm/BurgerIcon/index.test.js +50 -0
- package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/esm/CaretIcon/config.js +27 -0
- package/esm/CaretIcon/index.js +9 -0
- package/esm/CaretIcon/index.test.js +33 -0
- package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/esm/CheckIcon/config.js +11 -0
- package/esm/CheckIcon/index.js +9 -0
- package/esm/CheckIcon/index.test.js +123 -0
- package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/esm/CloseIcon/config.js +11 -0
- package/esm/CloseIcon/index.js +9 -0
- package/esm/CloseIcon/index.test.js +9 -0
- package/esm/GlobeIcon/__snapshots__/index.test.tsx.snap +149 -0
- package/esm/GlobeIcon/config.js +11 -0
- package/esm/GlobeIcon/index.js +9 -0
- package/esm/GlobeIcon/index.test.js +33 -0
- package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +738 -0
- package/esm/MoreVertIcon/config.js +25 -0
- package/esm/MoreVertIcon/index.js +9 -0
- package/esm/MoreVertIcon/index.test.js +123 -0
- package/esm/SearchIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/esm/SearchIcon/config.js +11 -0
- package/esm/SearchIcon/index.js +9 -0
- package/esm/SearchIcon/index.test.js +9 -0
- package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/esm/UncheckIcon/config.js +11 -0
- package/esm/UncheckIcon/index.js +9 -0
- package/esm/UncheckIcon/index.test.js +123 -0
- package/esm/icons.js +11 -0
- package/esm/index.js +10 -0
- package/esm/registry.js +42 -0
- package/icons.d.ts +32 -0
- package/icons.js +135 -0
- package/index.d.ts +10 -0
- package/index.js +135 -0
- package/package.json +25 -0
- package/registry.d.ts +15 -0
- package/registry.js +67 -0
- package/src/AccessibilityIcon/__snapshots__/index.test.tsx.snap +723 -0
- package/src/AccessibilityIcon/config.tsx +22 -0
- package/src/AccessibilityIcon/index.test.tsx +57 -0
- package/src/AccessibilityIcon/index.tsx +10 -0
- package/src/ArrowIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/src/ArrowIcon/config.tsx +29 -0
- package/src/ArrowIcon/index.test.tsx +20 -0
- package/src/ArrowIcon/index.tsx +8 -0
- package/src/BurgerIcon/__snapshots__/index.test.tsx.snap +320 -0
- package/src/BurgerIcon/config.tsx +25 -0
- package/src/BurgerIcon/index.test.tsx +26 -0
- package/src/BurgerIcon/index.tsx +8 -0
- package/src/CaretIcon/__snapshots__/index.test.tsx.snap +148 -0
- package/src/CaretIcon/config.tsx +21 -0
- package/src/CaretIcon/index.test.tsx +20 -0
- package/src/CaretIcon/index.tsx +8 -0
- package/src/CheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/src/CheckIcon/config.tsx +15 -0
- package/src/CheckIcon/index.test.tsx +50 -0
- package/src/CheckIcon/index.tsx +8 -0
- package/src/CloseIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/src/CloseIcon/config.tsx +15 -0
- package/src/CloseIcon/index.test.tsx +8 -0
- package/src/CloseIcon/index.tsx +8 -0
- package/src/GlobeIcon/__snapshots__/index.test.tsx.snap +149 -0
- package/src/GlobeIcon/config.tsx +26 -0
- package/src/GlobeIcon/index.test.tsx +19 -0
- package/src/GlobeIcon/index.tsx +8 -0
- package/src/MoreVertIcon/__snapshots__/index.test.tsx.snap +738 -0
- package/src/MoreVertIcon/config.tsx +17 -0
- package/src/MoreVertIcon/index.test.tsx +50 -0
- package/src/MoreVertIcon/index.tsx +8 -0
- package/src/SearchIcon/__snapshots__/index.test.tsx.snap +34 -0
- package/src/SearchIcon/config.tsx +15 -0
- package/src/SearchIcon/index.test.tsx +8 -0
- package/src/SearchIcon/index.tsx +8 -0
- package/src/UncheckIcon/__snapshots__/index.test.tsx.snap +558 -0
- package/src/UncheckIcon/config.tsx +15 -0
- package/src/UncheckIcon/index.test.tsx +50 -0
- package/src/UncheckIcon/index.tsx +8 -0
- package/src/icons.ts +34 -0
- package/src/index.ts +10 -0
- package/src/registry.js +47 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AccessibilityType {}
|
|
4
|
+
|
|
5
|
+
export function accessibility(): React.ReactElement {
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<title>Μενού Προσβασιμότητας</title>
|
|
9
|
+
<circle cx="12" cy="3" r="3" />
|
|
10
|
+
<path
|
|
11
|
+
d="M19.76,6.13c-4.94,2.01-10.57,2.01-15.51,0c-0.71-0.3-1.55-0.04-1.98,0.66c-1.41,2.6,3.27,3.76,4.94,4.37
|
|
12
|
+
c0.4,0.11,0.81,0.2,1.22,0.28c0.56,0.11,0.92,0.67,0.79,1.25c-0.79,3.66-1.96,9.1-1.96,9.1c-0.46,2.27,2.72,3.15,3.39,0.92L12,17.93
|
|
13
|
+
l1.36,4.78c0.67,2.22,3.85,1.36,3.39-0.92c0,0-1.16-5.4-1.95-9.06c-0.12-0.57,0.22-1.16,0.77-1.27c2.01-0.41,3.94-1.17,5.68-2.31
|
|
14
|
+
C22.89,8.04,21.58,5.38,19.76,6.13z"
|
|
15
|
+
/>
|
|
16
|
+
</>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
accessibility.props = [];
|
|
21
|
+
|
|
22
|
+
export default accessibility;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
|
|
4
|
+
import AccessibilityIcon from '@digigov/react-icons/AccessibilityIcon';
|
|
5
|
+
|
|
6
|
+
it('renders the AccessibilityIcon with no props', () => {
|
|
7
|
+
expect(mount(<AccessibilityIcon />)).toMatchSnapshot();
|
|
8
|
+
});
|
|
9
|
+
it('renders the AccessibilityIcon with prop size=s', () => {
|
|
10
|
+
expect(mount(<AccessibilityIcon size="sm" />)).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
it('renders the AccessibilityIcon with prop size=m', () => {
|
|
13
|
+
expect(mount(<AccessibilityIcon size="md" />)).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
it('renders the AccessibilityIcon with prop size=l', () => {
|
|
16
|
+
expect(mount(<AccessibilityIcon size="lg" />)).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
it('renders the AccessibilityIcon with prop size=xl', () => {
|
|
19
|
+
expect(mount(<AccessibilityIcon size="xl" />)).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
it('renders the AccessibilityIcon with prop size=xl', () => {
|
|
22
|
+
expect(mount(<AccessibilityIcon size="xxl" />)).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
it('renders the AccessibilityIcon with prop variant=dark', () => {
|
|
25
|
+
expect(mount(<AccessibilityIcon variant="dark" />)).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
it('renders the AccessibilityIcon with prop variant=light', () => {
|
|
28
|
+
expect(mount(<AccessibilityIcon variant="light" />)).toMatchSnapshot();
|
|
29
|
+
});
|
|
30
|
+
it('renders the AccessibilityIcon with prop variant=gray', () => {
|
|
31
|
+
expect(mount(<AccessibilityIcon variant="gray" />)).toMatchSnapshot();
|
|
32
|
+
});
|
|
33
|
+
it('renders the AccessibilityIcon with prop variant=primary', () => {
|
|
34
|
+
expect(mount(<AccessibilityIcon variant="primary" />)).toMatchSnapshot();
|
|
35
|
+
});
|
|
36
|
+
it('renders the AccessibilityIcon with prop variant=success', () => {
|
|
37
|
+
expect(mount(<AccessibilityIcon variant="success" />)).toMatchSnapshot();
|
|
38
|
+
});
|
|
39
|
+
it('renders the AccessibilityIcon with prop variant=warning', () => {
|
|
40
|
+
expect(mount(<AccessibilityIcon variant="warning" />)).toMatchSnapshot();
|
|
41
|
+
});
|
|
42
|
+
it('renders the AccessibilityIcon with prop variant=error', () => {
|
|
43
|
+
expect(mount(<AccessibilityIcon variant="error" />)).toMatchSnapshot();
|
|
44
|
+
});
|
|
45
|
+
it('renders the AccessibilityIcon with prop variant=focus', () => {
|
|
46
|
+
expect(mount(<AccessibilityIcon variant="focus" />)).toMatchSnapshot();
|
|
47
|
+
});
|
|
48
|
+
it('renders the AccessibilityIcon with prop variant=warning and size=s', () => {
|
|
49
|
+
expect(
|
|
50
|
+
mount(<AccessibilityIcon variant="warning" size="sm" />)
|
|
51
|
+
).toMatchSnapshot();
|
|
52
|
+
});
|
|
53
|
+
it('renders the AccessibilityIcon with prop variant=error and size= xl', () => {
|
|
54
|
+
expect(
|
|
55
|
+
mount(<AccessibilityIcon variant="warning" size="xl" />)
|
|
56
|
+
).toMatchSnapshot();
|
|
57
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Icon, { IconProps } from '@digigov/react-core/Icon';
|
|
3
|
+
|
|
4
|
+
export const AccessibilityIcon: React.FC<IconProps<'accessibility'>> = (
|
|
5
|
+
props
|
|
6
|
+
) => {
|
|
7
|
+
return <Icon {...props} icon="accessibility"></Icon>;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default AccessibilityIcon;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the ArrowIcon with direction down prop 1`] = `
|
|
4
|
+
<ArrowIcon
|
|
5
|
+
direction="down"
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Icon)
|
|
8
|
+
direction="down"
|
|
9
|
+
icon="arrow"
|
|
10
|
+
>
|
|
11
|
+
<ForwardRef(SvgIcon)
|
|
12
|
+
className="govgr-svg-icon--arrow"
|
|
13
|
+
>
|
|
14
|
+
<ForwardRef(Base)
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
as="svg"
|
|
17
|
+
className="govgr-svg-icon--arrow govgr-svg-icon"
|
|
18
|
+
focusable="false"
|
|
19
|
+
viewBox="0 0 24 24"
|
|
20
|
+
>
|
|
21
|
+
<svg
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
className="govgr-svg-icon--arrow govgr-svg-icon"
|
|
24
|
+
focusable="false"
|
|
25
|
+
viewBox="0 0 24 24"
|
|
26
|
+
>
|
|
27
|
+
<arrow
|
|
28
|
+
direction="down"
|
|
29
|
+
>
|
|
30
|
+
<path
|
|
31
|
+
d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
|
|
32
|
+
/>
|
|
33
|
+
</arrow>
|
|
34
|
+
</svg>
|
|
35
|
+
</ForwardRef(Base)>
|
|
36
|
+
</ForwardRef(SvgIcon)>
|
|
37
|
+
</ForwardRef(Icon)>
|
|
38
|
+
</ArrowIcon>
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
exports[`renders the ArrowIcon with direction left prop 1`] = `
|
|
42
|
+
<ArrowIcon
|
|
43
|
+
direction="left"
|
|
44
|
+
>
|
|
45
|
+
<ForwardRef(Icon)
|
|
46
|
+
direction="left"
|
|
47
|
+
icon="arrow"
|
|
48
|
+
>
|
|
49
|
+
<ForwardRef(SvgIcon)
|
|
50
|
+
className="govgr-svg-icon--arrow"
|
|
51
|
+
>
|
|
52
|
+
<ForwardRef(Base)
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
as="svg"
|
|
55
|
+
className="govgr-svg-icon--arrow govgr-svg-icon"
|
|
56
|
+
focusable="false"
|
|
57
|
+
viewBox="0 0 24 24"
|
|
58
|
+
>
|
|
59
|
+
<svg
|
|
60
|
+
aria-hidden="true"
|
|
61
|
+
className="govgr-svg-icon--arrow govgr-svg-icon"
|
|
62
|
+
focusable="false"
|
|
63
|
+
viewBox="0 0 24 24"
|
|
64
|
+
>
|
|
65
|
+
<arrow
|
|
66
|
+
direction="left"
|
|
67
|
+
>
|
|
68
|
+
<path
|
|
69
|
+
d="M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z"
|
|
70
|
+
/>
|
|
71
|
+
</arrow>
|
|
72
|
+
</svg>
|
|
73
|
+
</ForwardRef(Base)>
|
|
74
|
+
</ForwardRef(SvgIcon)>
|
|
75
|
+
</ForwardRef(Icon)>
|
|
76
|
+
</ArrowIcon>
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
exports[`renders the ArrowIcon with direction up prop 1`] = `
|
|
80
|
+
<ArrowIcon
|
|
81
|
+
direction="up"
|
|
82
|
+
>
|
|
83
|
+
<ForwardRef(Icon)
|
|
84
|
+
direction="up"
|
|
85
|
+
icon="arrow"
|
|
86
|
+
>
|
|
87
|
+
<ForwardRef(SvgIcon)
|
|
88
|
+
className="govgr-svg-icon--arrow"
|
|
89
|
+
>
|
|
90
|
+
<ForwardRef(Base)
|
|
91
|
+
aria-hidden="true"
|
|
92
|
+
as="svg"
|
|
93
|
+
className="govgr-svg-icon--arrow govgr-svg-icon"
|
|
94
|
+
focusable="false"
|
|
95
|
+
viewBox="0 0 24 24"
|
|
96
|
+
>
|
|
97
|
+
<svg
|
|
98
|
+
aria-hidden="true"
|
|
99
|
+
className="govgr-svg-icon--arrow govgr-svg-icon"
|
|
100
|
+
focusable="false"
|
|
101
|
+
viewBox="0 0 24 24"
|
|
102
|
+
>
|
|
103
|
+
<arrow
|
|
104
|
+
direction="up"
|
|
105
|
+
>
|
|
106
|
+
<path
|
|
107
|
+
d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z"
|
|
108
|
+
/>
|
|
109
|
+
</arrow>
|
|
110
|
+
</svg>
|
|
111
|
+
</ForwardRef(Base)>
|
|
112
|
+
</ForwardRef(SvgIcon)>
|
|
113
|
+
</ForwardRef(Icon)>
|
|
114
|
+
</ArrowIcon>
|
|
115
|
+
`;
|
|
116
|
+
|
|
117
|
+
exports[`renders the ArrowIcon with no props, direction prop is right by default 1`] = `
|
|
118
|
+
<ArrowIcon>
|
|
119
|
+
<ForwardRef(Icon)
|
|
120
|
+
icon="arrow"
|
|
121
|
+
>
|
|
122
|
+
<ForwardRef(SvgIcon)
|
|
123
|
+
className="govgr-svg-icon--arrow"
|
|
124
|
+
>
|
|
125
|
+
<ForwardRef(Base)
|
|
126
|
+
aria-hidden="true"
|
|
127
|
+
as="svg"
|
|
128
|
+
className="govgr-svg-icon--arrow govgr-svg-icon"
|
|
129
|
+
focusable="false"
|
|
130
|
+
viewBox="0 0 24 24"
|
|
131
|
+
>
|
|
132
|
+
<svg
|
|
133
|
+
aria-hidden="true"
|
|
134
|
+
className="govgr-svg-icon--arrow govgr-svg-icon"
|
|
135
|
+
focusable="false"
|
|
136
|
+
viewBox="0 0 24 24"
|
|
137
|
+
>
|
|
138
|
+
<arrow>
|
|
139
|
+
<path
|
|
140
|
+
d="M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z"
|
|
141
|
+
/>
|
|
142
|
+
</arrow>
|
|
143
|
+
</svg>
|
|
144
|
+
</ForwardRef(Base)>
|
|
145
|
+
</ForwardRef(SvgIcon)>
|
|
146
|
+
</ForwardRef(Icon)>
|
|
147
|
+
</ArrowIcon>
|
|
148
|
+
`;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ArrowType {
|
|
4
|
+
direction?: 'left' | 'right' | 'up' | 'down';
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const arrow: React.FC<ArrowType> = ({ direction = 'right' }) => {
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
{direction === 'left' && (
|
|
11
|
+
<path d="M14.8,22l2.4-2.3L9.6,12l7.6-7.6L14.8,2l-10,10L14.8,22z" />
|
|
12
|
+
)}
|
|
13
|
+
{direction === 'right' && (
|
|
14
|
+
<path d="M8.5,2L6.1,4.3l7.6,7.7l-7.6,7.6L8.5,22l10-10L8.5,2z" />
|
|
15
|
+
)}
|
|
16
|
+
{direction === 'up' && (
|
|
17
|
+
<path d="M2,15.8l2.3,2.4l7.7-7.6l7.6,7.6l2.4-2.4l-10-10L2,15.8z" />
|
|
18
|
+
)}
|
|
19
|
+
{direction === 'down' && (
|
|
20
|
+
<path d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z" />
|
|
21
|
+
)}
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
arrow.props = ['direction'];
|
|
28
|
+
|
|
29
|
+
export default arrow;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
|
|
4
|
+
import ArrowIcon from '@digigov/react-icons/ArrowIcon';
|
|
5
|
+
|
|
6
|
+
it('renders the ArrowIcon with no props, direction prop is right by default', () => {
|
|
7
|
+
expect(mount(<ArrowIcon />)).toMatchSnapshot();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders the ArrowIcon with direction left prop', () => {
|
|
11
|
+
expect(mount(<ArrowIcon direction="left" />)).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('renders the ArrowIcon with direction up prop', () => {
|
|
15
|
+
expect(mount(<ArrowIcon direction="up" />)).toMatchSnapshot();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('renders the ArrowIcon with direction down prop', () => {
|
|
19
|
+
expect(mount(<ArrowIcon direction="down" />)).toMatchSnapshot();
|
|
20
|
+
});
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the BurgerIcon prop variant= "error" 1`] = `
|
|
4
|
+
<BurgerIcon
|
|
5
|
+
variant="error"
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Icon)
|
|
8
|
+
icon="burger"
|
|
9
|
+
variant="error"
|
|
10
|
+
>
|
|
11
|
+
<ForwardRef(SvgIcon)
|
|
12
|
+
className="govgr-svg-icon--burger"
|
|
13
|
+
variant="error"
|
|
14
|
+
>
|
|
15
|
+
<ForwardRef(Base)
|
|
16
|
+
aria-hidden="true"
|
|
17
|
+
as="svg"
|
|
18
|
+
className="govgr-svg-icon--burger govgr-svg-icon--error govgr-svg-icon"
|
|
19
|
+
focusable="false"
|
|
20
|
+
viewBox="0 0 24 24"
|
|
21
|
+
>
|
|
22
|
+
<svg
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
className="govgr-svg-icon--burger govgr-svg-icon--error govgr-svg-icon"
|
|
25
|
+
focusable="false"
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
>
|
|
28
|
+
<burger>
|
|
29
|
+
<g
|
|
30
|
+
className=""
|
|
31
|
+
>
|
|
32
|
+
<rect
|
|
33
|
+
height="3.3"
|
|
34
|
+
id="govgr-svg-icon--burger__line-1"
|
|
35
|
+
width="20"
|
|
36
|
+
/>
|
|
37
|
+
<rect
|
|
38
|
+
height="3.3"
|
|
39
|
+
id="govgr-svg-icon--burger__line-2"
|
|
40
|
+
width="20"
|
|
41
|
+
/>
|
|
42
|
+
<rect
|
|
43
|
+
height="3.3"
|
|
44
|
+
id="govgr-svg-icon--burger__line-3"
|
|
45
|
+
width="20"
|
|
46
|
+
/>
|
|
47
|
+
</g>
|
|
48
|
+
</burger>
|
|
49
|
+
</svg>
|
|
50
|
+
</ForwardRef(Base)>
|
|
51
|
+
</ForwardRef(SvgIcon)>
|
|
52
|
+
</ForwardRef(Icon)>
|
|
53
|
+
</BurgerIcon>
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
exports[`renders the BurgerIcon prop variant= "light" 1`] = `
|
|
57
|
+
<BurgerIcon
|
|
58
|
+
variant="light"
|
|
59
|
+
>
|
|
60
|
+
<ForwardRef(Icon)
|
|
61
|
+
icon="burger"
|
|
62
|
+
variant="light"
|
|
63
|
+
>
|
|
64
|
+
<ForwardRef(SvgIcon)
|
|
65
|
+
className="govgr-svg-icon--burger"
|
|
66
|
+
variant="light"
|
|
67
|
+
>
|
|
68
|
+
<ForwardRef(Base)
|
|
69
|
+
aria-hidden="true"
|
|
70
|
+
as="svg"
|
|
71
|
+
className="govgr-svg-icon--burger govgr-svg-icon--light govgr-svg-icon"
|
|
72
|
+
focusable="false"
|
|
73
|
+
viewBox="0 0 24 24"
|
|
74
|
+
>
|
|
75
|
+
<svg
|
|
76
|
+
aria-hidden="true"
|
|
77
|
+
className="govgr-svg-icon--burger govgr-svg-icon--light govgr-svg-icon"
|
|
78
|
+
focusable="false"
|
|
79
|
+
viewBox="0 0 24 24"
|
|
80
|
+
>
|
|
81
|
+
<burger>
|
|
82
|
+
<g
|
|
83
|
+
className=""
|
|
84
|
+
>
|
|
85
|
+
<rect
|
|
86
|
+
height="3.3"
|
|
87
|
+
id="govgr-svg-icon--burger__line-1"
|
|
88
|
+
width="20"
|
|
89
|
+
/>
|
|
90
|
+
<rect
|
|
91
|
+
height="3.3"
|
|
92
|
+
id="govgr-svg-icon--burger__line-2"
|
|
93
|
+
width="20"
|
|
94
|
+
/>
|
|
95
|
+
<rect
|
|
96
|
+
height="3.3"
|
|
97
|
+
id="govgr-svg-icon--burger__line-3"
|
|
98
|
+
width="20"
|
|
99
|
+
/>
|
|
100
|
+
</g>
|
|
101
|
+
</burger>
|
|
102
|
+
</svg>
|
|
103
|
+
</ForwardRef(Base)>
|
|
104
|
+
</ForwardRef(SvgIcon)>
|
|
105
|
+
</ForwardRef(Icon)>
|
|
106
|
+
</BurgerIcon>
|
|
107
|
+
`;
|
|
108
|
+
|
|
109
|
+
exports[`renders the BurgerIcon props active variant= "light" 1`] = `
|
|
110
|
+
<BurgerIcon
|
|
111
|
+
active={true}
|
|
112
|
+
variant="light"
|
|
113
|
+
>
|
|
114
|
+
<ForwardRef(Icon)
|
|
115
|
+
active={true}
|
|
116
|
+
icon="burger"
|
|
117
|
+
variant="light"
|
|
118
|
+
>
|
|
119
|
+
<ForwardRef(SvgIcon)
|
|
120
|
+
className="govgr-svg-icon--burger"
|
|
121
|
+
variant="light"
|
|
122
|
+
>
|
|
123
|
+
<ForwardRef(Base)
|
|
124
|
+
aria-hidden="true"
|
|
125
|
+
as="svg"
|
|
126
|
+
className="govgr-svg-icon--burger govgr-svg-icon--light govgr-svg-icon"
|
|
127
|
+
focusable="false"
|
|
128
|
+
viewBox="0 0 24 24"
|
|
129
|
+
>
|
|
130
|
+
<svg
|
|
131
|
+
aria-hidden="true"
|
|
132
|
+
className="govgr-svg-icon--burger govgr-svg-icon--light govgr-svg-icon"
|
|
133
|
+
focusable="false"
|
|
134
|
+
viewBox="0 0 24 24"
|
|
135
|
+
>
|
|
136
|
+
<burger
|
|
137
|
+
active={true}
|
|
138
|
+
>
|
|
139
|
+
<g
|
|
140
|
+
className="govgr-svg-icon--burger--active"
|
|
141
|
+
>
|
|
142
|
+
<rect
|
|
143
|
+
height="3.3"
|
|
144
|
+
id="govgr-svg-icon--burger__line-1"
|
|
145
|
+
width="20"
|
|
146
|
+
/>
|
|
147
|
+
<rect
|
|
148
|
+
height="3.3"
|
|
149
|
+
id="govgr-svg-icon--burger__line-2"
|
|
150
|
+
width="20"
|
|
151
|
+
/>
|
|
152
|
+
<rect
|
|
153
|
+
height="3.3"
|
|
154
|
+
id="govgr-svg-icon--burger__line-3"
|
|
155
|
+
width="20"
|
|
156
|
+
/>
|
|
157
|
+
</g>
|
|
158
|
+
</burger>
|
|
159
|
+
</svg>
|
|
160
|
+
</ForwardRef(Base)>
|
|
161
|
+
</ForwardRef(SvgIcon)>
|
|
162
|
+
</ForwardRef(Icon)>
|
|
163
|
+
</BurgerIcon>
|
|
164
|
+
`;
|
|
165
|
+
|
|
166
|
+
exports[`renders the BurgerIcon with no props 1`] = `
|
|
167
|
+
<BurgerIcon>
|
|
168
|
+
<ForwardRef(Icon)
|
|
169
|
+
icon="burger"
|
|
170
|
+
>
|
|
171
|
+
<ForwardRef(SvgIcon)
|
|
172
|
+
className="govgr-svg-icon--burger"
|
|
173
|
+
>
|
|
174
|
+
<ForwardRef(Base)
|
|
175
|
+
aria-hidden="true"
|
|
176
|
+
as="svg"
|
|
177
|
+
className="govgr-svg-icon--burger govgr-svg-icon"
|
|
178
|
+
focusable="false"
|
|
179
|
+
viewBox="0 0 24 24"
|
|
180
|
+
>
|
|
181
|
+
<svg
|
|
182
|
+
aria-hidden="true"
|
|
183
|
+
className="govgr-svg-icon--burger govgr-svg-icon"
|
|
184
|
+
focusable="false"
|
|
185
|
+
viewBox="0 0 24 24"
|
|
186
|
+
>
|
|
187
|
+
<burger>
|
|
188
|
+
<g
|
|
189
|
+
className=""
|
|
190
|
+
>
|
|
191
|
+
<rect
|
|
192
|
+
height="3.3"
|
|
193
|
+
id="govgr-svg-icon--burger__line-1"
|
|
194
|
+
width="20"
|
|
195
|
+
/>
|
|
196
|
+
<rect
|
|
197
|
+
height="3.3"
|
|
198
|
+
id="govgr-svg-icon--burger__line-2"
|
|
199
|
+
width="20"
|
|
200
|
+
/>
|
|
201
|
+
<rect
|
|
202
|
+
height="3.3"
|
|
203
|
+
id="govgr-svg-icon--burger__line-3"
|
|
204
|
+
width="20"
|
|
205
|
+
/>
|
|
206
|
+
</g>
|
|
207
|
+
</burger>
|
|
208
|
+
</svg>
|
|
209
|
+
</ForwardRef(Base)>
|
|
210
|
+
</ForwardRef(SvgIcon)>
|
|
211
|
+
</ForwardRef(Icon)>
|
|
212
|
+
</BurgerIcon>
|
|
213
|
+
`;
|
|
214
|
+
|
|
215
|
+
exports[`renders the BurgerIcon with prop active=true 1`] = `
|
|
216
|
+
<BurgerIcon
|
|
217
|
+
active={true}
|
|
218
|
+
>
|
|
219
|
+
<ForwardRef(Icon)
|
|
220
|
+
active={true}
|
|
221
|
+
icon="burger"
|
|
222
|
+
>
|
|
223
|
+
<ForwardRef(SvgIcon)
|
|
224
|
+
className="govgr-svg-icon--burger"
|
|
225
|
+
>
|
|
226
|
+
<ForwardRef(Base)
|
|
227
|
+
aria-hidden="true"
|
|
228
|
+
as="svg"
|
|
229
|
+
className="govgr-svg-icon--burger govgr-svg-icon"
|
|
230
|
+
focusable="false"
|
|
231
|
+
viewBox="0 0 24 24"
|
|
232
|
+
>
|
|
233
|
+
<svg
|
|
234
|
+
aria-hidden="true"
|
|
235
|
+
className="govgr-svg-icon--burger govgr-svg-icon"
|
|
236
|
+
focusable="false"
|
|
237
|
+
viewBox="0 0 24 24"
|
|
238
|
+
>
|
|
239
|
+
<burger
|
|
240
|
+
active={true}
|
|
241
|
+
>
|
|
242
|
+
<g
|
|
243
|
+
className="govgr-svg-icon--burger--active"
|
|
244
|
+
>
|
|
245
|
+
<rect
|
|
246
|
+
height="3.3"
|
|
247
|
+
id="govgr-svg-icon--burger__line-1"
|
|
248
|
+
width="20"
|
|
249
|
+
/>
|
|
250
|
+
<rect
|
|
251
|
+
height="3.3"
|
|
252
|
+
id="govgr-svg-icon--burger__line-2"
|
|
253
|
+
width="20"
|
|
254
|
+
/>
|
|
255
|
+
<rect
|
|
256
|
+
height="3.3"
|
|
257
|
+
id="govgr-svg-icon--burger__line-3"
|
|
258
|
+
width="20"
|
|
259
|
+
/>
|
|
260
|
+
</g>
|
|
261
|
+
</burger>
|
|
262
|
+
</svg>
|
|
263
|
+
</ForwardRef(Base)>
|
|
264
|
+
</ForwardRef(SvgIcon)>
|
|
265
|
+
</ForwardRef(Icon)>
|
|
266
|
+
</BurgerIcon>
|
|
267
|
+
`;
|
|
268
|
+
|
|
269
|
+
exports[`renders the BurgerIcon with prop variant=dark 1`] = `
|
|
270
|
+
<BurgerIcon
|
|
271
|
+
variant="dark"
|
|
272
|
+
>
|
|
273
|
+
<ForwardRef(Icon)
|
|
274
|
+
icon="burger"
|
|
275
|
+
variant="dark"
|
|
276
|
+
>
|
|
277
|
+
<ForwardRef(SvgIcon)
|
|
278
|
+
className="govgr-svg-icon--burger"
|
|
279
|
+
variant="dark"
|
|
280
|
+
>
|
|
281
|
+
<ForwardRef(Base)
|
|
282
|
+
aria-hidden="true"
|
|
283
|
+
as="svg"
|
|
284
|
+
className="govgr-svg-icon--burger govgr-svg-icon--dark govgr-svg-icon"
|
|
285
|
+
focusable="false"
|
|
286
|
+
viewBox="0 0 24 24"
|
|
287
|
+
>
|
|
288
|
+
<svg
|
|
289
|
+
aria-hidden="true"
|
|
290
|
+
className="govgr-svg-icon--burger govgr-svg-icon--dark govgr-svg-icon"
|
|
291
|
+
focusable="false"
|
|
292
|
+
viewBox="0 0 24 24"
|
|
293
|
+
>
|
|
294
|
+
<burger>
|
|
295
|
+
<g
|
|
296
|
+
className=""
|
|
297
|
+
>
|
|
298
|
+
<rect
|
|
299
|
+
height="3.3"
|
|
300
|
+
id="govgr-svg-icon--burger__line-1"
|
|
301
|
+
width="20"
|
|
302
|
+
/>
|
|
303
|
+
<rect
|
|
304
|
+
height="3.3"
|
|
305
|
+
id="govgr-svg-icon--burger__line-2"
|
|
306
|
+
width="20"
|
|
307
|
+
/>
|
|
308
|
+
<rect
|
|
309
|
+
height="3.3"
|
|
310
|
+
id="govgr-svg-icon--burger__line-3"
|
|
311
|
+
width="20"
|
|
312
|
+
/>
|
|
313
|
+
</g>
|
|
314
|
+
</burger>
|
|
315
|
+
</svg>
|
|
316
|
+
</ForwardRef(Base)>
|
|
317
|
+
</ForwardRef(SvgIcon)>
|
|
318
|
+
</ForwardRef(Icon)>
|
|
319
|
+
</BurgerIcon>
|
|
320
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
|
|
4
|
+
export type BurgerType = {
|
|
5
|
+
active?: boolean;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const burger: React.FC<BurgerType> = ({ active = false }) => {
|
|
9
|
+
return (
|
|
10
|
+
<g
|
|
11
|
+
className={clsx({
|
|
12
|
+
[`govgr-svg-icon--burger--active`]: active,
|
|
13
|
+
})}
|
|
14
|
+
>
|
|
15
|
+
<rect id="govgr-svg-icon--burger__line-1" width="20" height="3.3" />
|
|
16
|
+
<rect id="govgr-svg-icon--burger__line-2" width="20" height="3.3" />
|
|
17
|
+
<rect id="govgr-svg-icon--burger__line-3" width="20" height="3.3" />
|
|
18
|
+
</g>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
burger.props = ['active'];
|
|
24
|
+
|
|
25
|
+
export default burger;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
|
|
4
|
+
import BurgerIcon from '@digigov/react-icons/BurgerIcon';
|
|
5
|
+
|
|
6
|
+
it('renders the BurgerIcon with no props', () => {
|
|
7
|
+
expect(mount(<BurgerIcon />)).toMatchSnapshot();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders the BurgerIcon with prop active=true', () => {
|
|
11
|
+
expect(mount(<BurgerIcon active={true} />)).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('renders the BurgerIcon with prop variant=dark', () => {
|
|
15
|
+
expect(mount(<BurgerIcon variant="dark" />)).toMatchSnapshot();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('renders the BurgerIcon prop variant= "light"', () => {
|
|
19
|
+
expect(mount(<BurgerIcon variant="light" />)).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
it('renders the BurgerIcon prop variant= "error"', () => {
|
|
22
|
+
expect(mount(<BurgerIcon variant="error" />)).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
it('renders the BurgerIcon props active variant= "light"', () => {
|
|
25
|
+
expect(mount(<BurgerIcon active variant="light" />)).toMatchSnapshot();
|
|
26
|
+
});
|