@digigov/react-core 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BackLink/__snapshots__/index.test.tsx.snap +2 -0
- package/BackLink/index.js +5 -2
- package/Button/__snapshots__/index.test.tsx.snap +26 -0
- package/Button/index.test.js +16 -0
- package/ButtonLink/__snapshots__/index.test.tsx.snap +138 -0
- package/ButtonLink/index.test.js +16 -0
- package/CHANGELOG.md +13 -1
- package/FooterImage/__snapshots__/index.test.tsx.snap +1 -0
- package/FooterImage/index.d.ts +4 -0
- package/FooterImage/index.js +6 -2
- package/GovGRLogo/__snapshots__/index.test.tsx.snap +10 -4
- package/GovGRLogo/index.js +2 -1
- package/HeaderLogo/__snapshots__/index.test.tsx.snap +0 -2
- package/HeaderLogo/index.d.ts +5 -1
- package/HeaderLogo/index.js +4 -2
- package/HeaderSecondaryLogo/__snapshots__/index.test.tsx.snap +6 -2
- package/HeaderSecondaryLogo/index.d.ts +5 -1
- package/HeaderSecondaryLogo/index.js +4 -2
- package/HeaderSecondaryLogo/index.test.js +6 -4
- package/HellenicRepublicLogo/__snapshots__/index.test.tsx.snap +2 -1
- package/HellenicRepublicLogo/index.js +3 -1
- package/Main/index.js +4 -1
- package/SkipLink/__snapshots__/index.test.tsx.snap +13 -0
- package/SkipLink/index.d.ts +10 -0
- package/SkipLink/index.js +39 -0
- package/SkipLink/index.test.d.ts +1 -0
- package/SkipLink/index.test.js +15 -0
- package/es/BackLink/__snapshots__/index.test.tsx.snap +2 -0
- package/es/BackLink/index.js +5 -2
- package/es/Button/__snapshots__/index.test.tsx.snap +26 -0
- package/es/Button/index.test.js +16 -0
- package/es/ButtonLink/__snapshots__/index.test.tsx.snap +138 -0
- package/es/ButtonLink/index.test.js +16 -0
- package/es/FooterImage/__snapshots__/index.test.tsx.snap +1 -0
- package/es/FooterImage/index.js +6 -2
- package/es/GovGRLogo/__snapshots__/index.test.tsx.snap +10 -4
- package/es/GovGRLogo/index.js +2 -1
- package/es/HeaderLogo/__snapshots__/index.test.tsx.snap +0 -2
- package/es/HeaderLogo/index.js +4 -2
- package/es/HeaderSecondaryLogo/__snapshots__/index.test.tsx.snap +6 -2
- package/es/HeaderSecondaryLogo/index.js +4 -2
- package/es/HeaderSecondaryLogo/index.test.js +6 -4
- package/es/HellenicRepublicLogo/__snapshots__/index.test.tsx.snap +2 -1
- package/es/HellenicRepublicLogo/index.js +3 -1
- package/es/Main/index.js +4 -1
- package/es/SkipLink/__snapshots__/index.test.tsx.snap +13 -0
- package/es/SkipLink/index.js +24 -0
- package/es/SkipLink/index.test.js +9 -0
- package/es/index.js +1 -0
- package/es/registry.js +299 -0
- package/esm/BackLink/__snapshots__/index.test.tsx.snap +2 -0
- package/esm/BackLink/index.js +5 -2
- package/esm/Button/__snapshots__/index.test.tsx.snap +26 -0
- package/esm/Button/index.test.js +16 -0
- package/esm/ButtonLink/__snapshots__/index.test.tsx.snap +138 -0
- package/esm/ButtonLink/index.test.js +16 -0
- package/esm/FooterImage/__snapshots__/index.test.tsx.snap +1 -0
- package/esm/FooterImage/index.js +6 -2
- package/esm/GovGRLogo/__snapshots__/index.test.tsx.snap +10 -4
- package/esm/GovGRLogo/index.js +2 -1
- package/esm/HeaderLogo/__snapshots__/index.test.tsx.snap +0 -2
- package/esm/HeaderLogo/index.js +4 -2
- package/esm/HeaderSecondaryLogo/__snapshots__/index.test.tsx.snap +6 -2
- package/esm/HeaderSecondaryLogo/index.js +4 -2
- package/esm/HeaderSecondaryLogo/index.test.js +6 -4
- package/esm/HellenicRepublicLogo/__snapshots__/index.test.tsx.snap +2 -1
- package/esm/HellenicRepublicLogo/index.js +3 -1
- package/esm/Main/index.js +4 -1
- package/esm/SkipLink/__snapshots__/index.test.tsx.snap +13 -0
- package/esm/SkipLink/index.js +24 -0
- package/esm/SkipLink/index.test.js +9 -0
- package/esm/index.js +2 -1
- package/esm/registry.js +299 -0
- package/index.d.ts +1 -0
- package/index.js +8 -0
- package/package.json +2 -2
- package/registry.d.ts +145 -0
- package/registry.js +454 -0
|
@@ -8,6 +8,7 @@ exports[`renders the BackLink with href="#" 1`] = `
|
|
|
8
8
|
className="govgr-back-link"
|
|
9
9
|
href="#"
|
|
10
10
|
onClick={[Function]}
|
|
11
|
+
tabIndex={0}
|
|
11
12
|
>
|
|
12
13
|
<ForwardRef(CaretIcon)>
|
|
13
14
|
<ForwardRef(SvgIcon)
|
|
@@ -35,6 +36,7 @@ exports[`renders the BackLink with no props 1`] = `
|
|
|
35
36
|
<a
|
|
36
37
|
className="govgr-back-link"
|
|
37
38
|
onClick={[Function]}
|
|
39
|
+
tabIndex={0}
|
|
38
40
|
>
|
|
39
41
|
<ForwardRef(CaretIcon)>
|
|
40
42
|
<ForwardRef(SvgIcon)
|
package/BackLink/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
17
17
|
|
|
18
18
|
var _CaretIcon = _interopRequireDefault(require("@digigov/react-core/CaretIcon"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["href", "className", "children"];
|
|
20
|
+
var _excluded = ["href", "tabIndex", "className", "children"];
|
|
21
21
|
|
|
22
22
|
var _ref2 = /*#__PURE__*/_react["default"].createElement(_CaretIcon["default"], null);
|
|
23
23
|
|
|
@@ -26,6 +26,8 @@ var _ref2 = /*#__PURE__*/_react["default"].createElement(_CaretIcon["default"],
|
|
|
26
26
|
*/
|
|
27
27
|
var BackLink = /*#__PURE__*/_react["default"].forwardRef(function BackLink(_ref, ref) {
|
|
28
28
|
var href = _ref.href,
|
|
29
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
30
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
|
29
31
|
className = _ref.className,
|
|
30
32
|
children = _ref.children,
|
|
31
33
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
@@ -35,7 +37,8 @@ var BackLink = /*#__PURE__*/_react["default"].forwardRef(function BackLink(_ref,
|
|
|
35
37
|
!href && window.history.back();
|
|
36
38
|
},
|
|
37
39
|
ref: ref,
|
|
38
|
-
className: (0, _clsx["default"])(className, true && 'govgr-back-link')
|
|
40
|
+
className: (0, _clsx["default"])(className, true && 'govgr-back-link'),
|
|
41
|
+
tabIndex: tabIndex
|
|
39
42
|
}, props), _ref2, children);
|
|
40
43
|
});
|
|
41
44
|
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the Button with ariaLabel prop 1`] = `
|
|
4
|
+
<ForwardRef(Button)
|
|
5
|
+
aria-label="button for opening menu"
|
|
6
|
+
>
|
|
7
|
+
<button
|
|
8
|
+
aria-label="button for opening menu"
|
|
9
|
+
className="govgr-btn-primary govgr-btn"
|
|
10
|
+
>
|
|
11
|
+
Menu
|
|
12
|
+
</button>
|
|
13
|
+
</ForwardRef(Button)>
|
|
14
|
+
`;
|
|
15
|
+
|
|
3
16
|
exports[`renders the Button with color=primary 1`] = `
|
|
4
17
|
<ForwardRef(Button)
|
|
5
18
|
color="primary"
|
|
@@ -113,3 +126,16 @@ exports[`renders the Button with no props 1`] = `
|
|
|
113
126
|
</button>
|
|
114
127
|
</ForwardRef(Button)>
|
|
115
128
|
`;
|
|
129
|
+
|
|
130
|
+
exports[`renders the Button with tabIndex prop 1`] = `
|
|
131
|
+
<ForwardRef(Button)
|
|
132
|
+
tabIndex={0}
|
|
133
|
+
>
|
|
134
|
+
<button
|
|
135
|
+
className="govgr-btn-primary govgr-btn"
|
|
136
|
+
tabIndex={0}
|
|
137
|
+
>
|
|
138
|
+
Menu
|
|
139
|
+
</button>
|
|
140
|
+
</ForwardRef(Button)>
|
|
141
|
+
`;
|
package/Button/index.test.js
CHANGED
|
@@ -79,4 +79,20 @@ var _ref9 = /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
|
79
79
|
|
|
80
80
|
it('renders the Button with color=warning with disabled=true', function () {
|
|
81
81
|
expect((0, _enzyme.mount)(_ref9)).toMatchSnapshot();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
var _ref10 = /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
85
|
+
"aria-label": "button for opening menu"
|
|
86
|
+
}, "Menu");
|
|
87
|
+
|
|
88
|
+
it('renders the Button with ariaLabel prop', function () {
|
|
89
|
+
expect((0, _enzyme.mount)(_ref10)).toMatchSnapshot();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
var _ref11 = /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
93
|
+
tabIndex: 0
|
|
94
|
+
}, "Menu");
|
|
95
|
+
|
|
96
|
+
it('renders the Button with tabIndex prop', function () {
|
|
97
|
+
expect((0, _enzyme.mount)(_ref11)).toMatchSnapshot();
|
|
82
98
|
});
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the Button with tabIndex prop 1`] = `
|
|
4
|
+
<ForwardRef(ButtonLink)
|
|
5
|
+
tabIndex={0}
|
|
6
|
+
>
|
|
7
|
+
<a
|
|
8
|
+
className="govgr-btn-primary govgr-btn"
|
|
9
|
+
tabIndex={0}
|
|
10
|
+
>
|
|
11
|
+
Menu
|
|
12
|
+
</a>
|
|
13
|
+
</ForwardRef(ButtonLink)>
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
exports[`renders the ButtonLink with ariaLabel prop 1`] = `
|
|
17
|
+
<ForwardRef(ButtonLink)
|
|
18
|
+
aria-label="button for opening menu"
|
|
19
|
+
>
|
|
20
|
+
<a
|
|
21
|
+
aria-label="button for opening menu"
|
|
22
|
+
className="govgr-btn-primary govgr-btn"
|
|
23
|
+
>
|
|
24
|
+
Menu
|
|
25
|
+
</a>
|
|
26
|
+
</ForwardRef(ButtonLink)>
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
exports[`renders the ButtonLink with color=primary 1`] = `
|
|
30
|
+
<ForwardRef(ButtonLink)
|
|
31
|
+
color="primary"
|
|
32
|
+
>
|
|
33
|
+
<a
|
|
34
|
+
className="govgr-btn-primary govgr-btn"
|
|
35
|
+
>
|
|
36
|
+
hello
|
|
37
|
+
</a>
|
|
38
|
+
</ForwardRef(ButtonLink)>
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
exports[`renders the ButtonLink with color=primary with href=# 1`] = `
|
|
42
|
+
<ForwardRef(ButtonLink)
|
|
43
|
+
color="primary"
|
|
44
|
+
href="#"
|
|
45
|
+
>
|
|
46
|
+
<a
|
|
47
|
+
className="govgr-btn-primary govgr-btn"
|
|
48
|
+
href="#"
|
|
49
|
+
>
|
|
50
|
+
hello
|
|
51
|
+
</a>
|
|
52
|
+
</ForwardRef(ButtonLink)>
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
exports[`renders the ButtonLink with color=secondary 1`] = `
|
|
56
|
+
<ForwardRef(ButtonLink)
|
|
57
|
+
color="secondary"
|
|
58
|
+
>
|
|
59
|
+
<a
|
|
60
|
+
className="govgr-btn-secondary govgr-btn"
|
|
61
|
+
>
|
|
62
|
+
hello
|
|
63
|
+
</a>
|
|
64
|
+
</ForwardRef(ButtonLink)>
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
exports[`renders the ButtonLink with color=secondary with href=# 1`] = `
|
|
68
|
+
<ForwardRef(ButtonLink)
|
|
69
|
+
color="secondary"
|
|
70
|
+
href="#"
|
|
71
|
+
>
|
|
72
|
+
<a
|
|
73
|
+
className="govgr-btn-secondary govgr-btn"
|
|
74
|
+
href="#"
|
|
75
|
+
>
|
|
76
|
+
hello
|
|
77
|
+
</a>
|
|
78
|
+
</ForwardRef(ButtonLink)>
|
|
79
|
+
`;
|
|
80
|
+
|
|
81
|
+
exports[`renders the ButtonLink with color=warning 1`] = `
|
|
82
|
+
<ForwardRef(ButtonLink)
|
|
83
|
+
color="warning"
|
|
84
|
+
>
|
|
85
|
+
<a
|
|
86
|
+
className="govgr-btn-warning govgr-btn"
|
|
87
|
+
>
|
|
88
|
+
hello
|
|
89
|
+
</a>
|
|
90
|
+
</ForwardRef(ButtonLink)>
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
exports[`renders the ButtonLink with color=warning with href=# 1`] = `
|
|
94
|
+
<ForwardRef(ButtonLink)
|
|
95
|
+
color="warning"
|
|
96
|
+
href="#"
|
|
97
|
+
>
|
|
98
|
+
<a
|
|
99
|
+
className="govgr-btn-warning govgr-btn"
|
|
100
|
+
href="#"
|
|
101
|
+
>
|
|
102
|
+
hello
|
|
103
|
+
</a>
|
|
104
|
+
</ForwardRef(ButtonLink)>
|
|
105
|
+
`;
|
|
106
|
+
|
|
107
|
+
exports[`renders the ButtonLink with disabled=false 1`] = `
|
|
108
|
+
<ForwardRef(ButtonLink)>
|
|
109
|
+
<a
|
|
110
|
+
className="govgr-btn-primary govgr-btn"
|
|
111
|
+
>
|
|
112
|
+
hello
|
|
113
|
+
</a>
|
|
114
|
+
</ForwardRef(ButtonLink)>
|
|
115
|
+
`;
|
|
116
|
+
|
|
117
|
+
exports[`renders the ButtonLink with href=# 1`] = `
|
|
118
|
+
<ForwardRef(ButtonLink)
|
|
119
|
+
href="#"
|
|
120
|
+
>
|
|
121
|
+
<a
|
|
122
|
+
className="govgr-btn-primary govgr-btn"
|
|
123
|
+
href="#"
|
|
124
|
+
>
|
|
125
|
+
hello
|
|
126
|
+
</a>
|
|
127
|
+
</ForwardRef(ButtonLink)>
|
|
128
|
+
`;
|
|
129
|
+
|
|
130
|
+
exports[`renders the ButtonLink with no props 1`] = `
|
|
131
|
+
<ForwardRef(ButtonLink)>
|
|
132
|
+
<a
|
|
133
|
+
className="govgr-btn-primary govgr-btn"
|
|
134
|
+
>
|
|
135
|
+
hello
|
|
136
|
+
</a>
|
|
137
|
+
</ForwardRef(ButtonLink)>
|
|
138
|
+
`;
|
package/ButtonLink/index.test.js
CHANGED
|
@@ -77,4 +77,20 @@ var _ref9 = /*#__PURE__*/_react["default"].createElement(_ButtonLink["default"],
|
|
|
77
77
|
|
|
78
78
|
it('renders the ButtonLink with color=warning with href=#', function () {
|
|
79
79
|
expect((0, _enzyme.mount)(_ref9)).toMatchSnapshot();
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
var _ref10 = /*#__PURE__*/_react["default"].createElement(_ButtonLink["default"], {
|
|
83
|
+
"aria-label": "button for opening menu"
|
|
84
|
+
}, "Menu");
|
|
85
|
+
|
|
86
|
+
it('renders the ButtonLink with ariaLabel prop', function () {
|
|
87
|
+
expect((0, _enzyme.mount)(_ref10)).toMatchSnapshot();
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
var _ref11 = /*#__PURE__*/_react["default"].createElement(_ButtonLink["default"], {
|
|
91
|
+
tabIndex: 0
|
|
92
|
+
}, "Menu");
|
|
93
|
+
|
|
94
|
+
it('renders the Button with tabIndex prop', function () {
|
|
95
|
+
expect((0, _enzyme.mount)(_ref11)).toMatchSnapshot();
|
|
80
96
|
});
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Change Log - @digigov/react-core
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 08 Jun 2022 12:26:07 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.15.0
|
|
6
|
+
Wed, 08 Jun 2022 12:26:07 GMT
|
|
7
|
+
|
|
8
|
+
### Minor changes
|
|
9
|
+
|
|
10
|
+
- add missing a11y props to commponents
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- create SkipLink component for link navigation
|
|
15
|
+
- Add tabIndex at Backlink with default value 0 in order to enable accessible keyboard navigation out of the box
|
|
4
16
|
|
|
5
17
|
## 0.14.1
|
|
6
18
|
Tue, 17 May 2022 11:04:22 GMT
|
package/FooterImage/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type ImgElementAttributes = JSX.IntrinsicElements['img'];
|
|
3
3
|
export interface FooterImageProps extends ImgElementAttributes {
|
|
4
|
+
/**
|
|
5
|
+
* altText is optional.
|
|
6
|
+
*/
|
|
7
|
+
alt?: string;
|
|
4
8
|
}
|
|
5
9
|
/**
|
|
6
10
|
* FooterImage is a component for logos and images in the footer.
|
package/FooterImage/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["className", "children"];
|
|
18
|
+
var _excluded = ["className", "children", "alt"];
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* FooterImage is a component for logos and images in the footer.
|
|
@@ -25,11 +25,15 @@ var _excluded = ["className", "children"];
|
|
|
25
25
|
var FooterImage = /*#__PURE__*/_react["default"].forwardRef(function FooterImage(_ref, ref) {
|
|
26
26
|
var className = _ref.className,
|
|
27
27
|
children = _ref.children,
|
|
28
|
+
_ref$alt = _ref.alt,
|
|
29
|
+
alt = _ref$alt === void 0 ? 'footer logo' : _ref$alt,
|
|
28
30
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
29
31
|
return /*#__PURE__*/_react["default"].createElement("img", (0, _extends2["default"])({
|
|
30
32
|
ref: ref,
|
|
31
33
|
className: (0, _clsx["default"])(className, true && 'govgr-footer__logo')
|
|
32
|
-
}, props
|
|
34
|
+
}, props, {
|
|
35
|
+
alt: alt
|
|
36
|
+
}), children);
|
|
33
37
|
});
|
|
34
38
|
|
|
35
39
|
exports.FooterImage = FooterImage;
|
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`renders the GovGRLogo with no props 1`] = `
|
|
4
4
|
<ForwardRef(GovGRLogo)>
|
|
5
|
-
<
|
|
6
|
-
className="govgr-header-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
<a
|
|
6
|
+
className="govgr-header-link"
|
|
7
|
+
href="https://www.gov.gr/"
|
|
8
|
+
>
|
|
9
|
+
<img
|
|
10
|
+
alt="gov.gr logo"
|
|
11
|
+
className="govgr-header-logo"
|
|
12
|
+
src="https://www.gov.gr/gov_gr_logo.svg"
|
|
13
|
+
/>
|
|
14
|
+
</a>
|
|
9
15
|
</ForwardRef(GovGRLogo)>
|
|
10
16
|
`;
|
package/GovGRLogo/index.js
CHANGED
|
@@ -31,7 +31,8 @@ var GovGRLogo = /*#__PURE__*/_react["default"].forwardRef(function GovGRLogo(_re
|
|
|
31
31
|
className: (0, _clsx["default"])(className, true && 'govgr-header-link')
|
|
32
32
|
}, props), /*#__PURE__*/_react["default"].createElement("img", {
|
|
33
33
|
src: "https://www.gov.gr/gov_gr_logo.svg",
|
|
34
|
-
className: (0, _clsx["default"])(className, true && 'govgr-header-logo')
|
|
34
|
+
className: (0, _clsx["default"])(className, true && 'govgr-header-logo'),
|
|
35
|
+
alt: "gov.gr logo"
|
|
35
36
|
}));
|
|
36
37
|
});
|
|
37
38
|
|
|
@@ -4,11 +4,9 @@ exports[`renders the HeaderLogo with no props 1`] = `
|
|
|
4
4
|
<ForwardRef(HeaderLogo)>
|
|
5
5
|
<a
|
|
6
6
|
className="govgr-header-link"
|
|
7
|
-
href="https://www.gov.gr/"
|
|
8
7
|
>
|
|
9
8
|
<img
|
|
10
9
|
className="govgr-header-logo"
|
|
11
|
-
src="https://www.gov.gr/gov_gr_logo.svg"
|
|
12
10
|
/>
|
|
13
11
|
</a>
|
|
14
12
|
</ForwardRef(HeaderLogo)>
|
package/HeaderLogo/index.d.ts
CHANGED
|
@@ -9,9 +9,13 @@ export interface HeaderLogoProps extends AElementAttributes {
|
|
|
9
9
|
* href is optional.
|
|
10
10
|
*/
|
|
11
11
|
href?: string;
|
|
12
|
+
/**
|
|
13
|
+
* href is optional.
|
|
14
|
+
*/
|
|
15
|
+
altText?: string;
|
|
12
16
|
}
|
|
13
17
|
/**
|
|
14
18
|
* Use this component inside the Header to provide a logo.
|
|
15
19
|
*/
|
|
16
|
-
export declare const HeaderLogo: React.ForwardRefExoticComponent<Pick<HeaderLogoProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "media" | "target" | "type" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy" | "src"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
20
|
+
export declare const HeaderLogo: React.ForwardRefExoticComponent<Pick<HeaderLogoProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "media" | "target" | "type" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy" | "src" | "altText"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
17
21
|
export default HeaderLogo;
|
package/HeaderLogo/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["href", "src", "className"];
|
|
18
|
+
var _excluded = ["href", "src", "altText", "className"];
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Use this component inside the Header to provide a logo.
|
|
@@ -23,6 +23,7 @@ var _excluded = ["href", "src", "className"];
|
|
|
23
23
|
var HeaderLogo = /*#__PURE__*/_react["default"].forwardRef(function HeaderLogo(_ref, ref) {
|
|
24
24
|
var href = _ref.href,
|
|
25
25
|
src = _ref.src,
|
|
26
|
+
altText = _ref.altText,
|
|
26
27
|
className = _ref.className,
|
|
27
28
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
28
29
|
return /*#__PURE__*/_react["default"].createElement("a", (0, _extends2["default"])({
|
|
@@ -31,7 +32,8 @@ var HeaderLogo = /*#__PURE__*/_react["default"].forwardRef(function HeaderLogo(_
|
|
|
31
32
|
className: (0, _clsx["default"])(className, true && 'govgr-header-link')
|
|
32
33
|
}, props), /*#__PURE__*/_react["default"].createElement("img", {
|
|
33
34
|
src: src,
|
|
34
|
-
className: (0, _clsx["default"])(className, true && 'govgr-header-logo')
|
|
35
|
+
className: (0, _clsx["default"])(className, true && 'govgr-header-logo'),
|
|
36
|
+
alt: altText
|
|
35
37
|
}));
|
|
36
38
|
});
|
|
37
39
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`renders the HeaderSecondaryLogo with src 1`] = `
|
|
3
|
+
exports[`renders the HeaderSecondaryLogo with src and alt 1`] = `
|
|
4
4
|
<ForwardRef(HeaderSecondaryLogo)
|
|
5
|
+
altText="minedu logo"
|
|
5
6
|
src="https://dilosi.services.gov.gr/minedu-logo.svg"
|
|
6
7
|
>
|
|
7
8
|
<a
|
|
8
9
|
className="govgr-header-link"
|
|
9
10
|
>
|
|
10
11
|
<img
|
|
12
|
+
alt="minedu logo"
|
|
11
13
|
className="govgr-header-secondary-logo"
|
|
12
14
|
src="https://dilosi.services.gov.gr/minedu-logo.svg"
|
|
13
15
|
/>
|
|
@@ -15,8 +17,9 @@ exports[`renders the HeaderSecondaryLogo with src 1`] = `
|
|
|
15
17
|
</ForwardRef(HeaderSecondaryLogo)>
|
|
16
18
|
`;
|
|
17
19
|
|
|
18
|
-
exports[`renders the HeaderSecondaryLogo with src and
|
|
20
|
+
exports[`renders the HeaderSecondaryLogo with src, href and alt 1`] = `
|
|
19
21
|
<ForwardRef(HeaderSecondaryLogo)
|
|
22
|
+
altText="minedu logo"
|
|
20
23
|
href="https://www.minedu.gov.gr/"
|
|
21
24
|
src="https://dilosi.services.gov.gr/minedu-logo.svg"
|
|
22
25
|
>
|
|
@@ -25,6 +28,7 @@ exports[`renders the HeaderSecondaryLogo with src and href 1`] = `
|
|
|
25
28
|
href="https://www.minedu.gov.gr/"
|
|
26
29
|
>
|
|
27
30
|
<img
|
|
31
|
+
alt="minedu logo"
|
|
28
32
|
className="govgr-header-secondary-logo"
|
|
29
33
|
src="https://dilosi.services.gov.gr/minedu-logo.svg"
|
|
30
34
|
/>
|
|
@@ -9,9 +9,13 @@ export interface HeaderSecondaryLogoProps extends AElementAttributes {
|
|
|
9
9
|
* href provides the url that the logo leads to if clicked.
|
|
10
10
|
*/
|
|
11
11
|
href?: string;
|
|
12
|
+
/**
|
|
13
|
+
* href provides the alternative text for the img tag.
|
|
14
|
+
*/
|
|
15
|
+
altText?: string;
|
|
12
16
|
}
|
|
13
17
|
/**
|
|
14
18
|
* HeaderSecondaryLogo is used inside Header for providing additional logos.
|
|
15
19
|
*/
|
|
16
|
-
export declare const HeaderSecondaryLogo: React.ForwardRefExoticComponent<Pick<HeaderSecondaryLogoProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "media" | "target" | "type" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy" | "src"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
20
|
+
export declare const HeaderSecondaryLogo: React.ForwardRefExoticComponent<Pick<HeaderSecondaryLogoProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "media" | "target" | "type" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy" | "src" | "altText"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
17
21
|
export default HeaderSecondaryLogo;
|
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["href", "src", "className"];
|
|
18
|
+
var _excluded = ["href", "src", "altText", "className"];
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* HeaderSecondaryLogo is used inside Header for providing additional logos.
|
|
@@ -23,6 +23,7 @@ var _excluded = ["href", "src", "className"];
|
|
|
23
23
|
var HeaderSecondaryLogo = /*#__PURE__*/_react["default"].forwardRef(function HeaderSecondaryLogo(_ref, ref) {
|
|
24
24
|
var href = _ref.href,
|
|
25
25
|
src = _ref.src,
|
|
26
|
+
altText = _ref.altText,
|
|
26
27
|
className = _ref.className,
|
|
27
28
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
28
29
|
return /*#__PURE__*/_react["default"].createElement("a", (0, _extends2["default"])({
|
|
@@ -31,7 +32,8 @@ var HeaderSecondaryLogo = /*#__PURE__*/_react["default"].forwardRef(function Hea
|
|
|
31
32
|
className: (0, _clsx["default"])(className, true && 'govgr-header-link')
|
|
32
33
|
}, props), /*#__PURE__*/_react["default"].createElement("img", {
|
|
33
34
|
src: src,
|
|
34
|
-
className: (0, _clsx["default"])(className, true && 'govgr-header-secondary-logo')
|
|
35
|
+
className: (0, _clsx["default"])(className, true && 'govgr-header-secondary-logo'),
|
|
36
|
+
alt: altText
|
|
35
37
|
}));
|
|
36
38
|
});
|
|
37
39
|
|
|
@@ -9,18 +9,20 @@ var _enzyme = require("enzyme");
|
|
|
9
9
|
var _HeaderSecondaryLogo = _interopRequireDefault(require("@digigov/react-core/HeaderSecondaryLogo"));
|
|
10
10
|
|
|
11
11
|
var _ref = /*#__PURE__*/_react["default"].createElement(_HeaderSecondaryLogo["default"], {
|
|
12
|
-
src: "https://dilosi.services.gov.gr/minedu-logo.svg"
|
|
12
|
+
src: "https://dilosi.services.gov.gr/minedu-logo.svg",
|
|
13
|
+
altText: "minedu logo"
|
|
13
14
|
});
|
|
14
15
|
|
|
15
|
-
it('renders the HeaderSecondaryLogo with src', function () {
|
|
16
|
+
it('renders the HeaderSecondaryLogo with src and alt', function () {
|
|
16
17
|
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
17
18
|
});
|
|
18
19
|
|
|
19
20
|
var _ref2 = /*#__PURE__*/_react["default"].createElement(_HeaderSecondaryLogo["default"], {
|
|
20
21
|
src: "https://dilosi.services.gov.gr/minedu-logo.svg",
|
|
21
|
-
href: "https://www.minedu.gov.gr/"
|
|
22
|
+
href: "https://www.minedu.gov.gr/",
|
|
23
|
+
altText: "minedu logo"
|
|
22
24
|
});
|
|
23
25
|
|
|
24
|
-
it('renders the HeaderSecondaryLogo with src and
|
|
26
|
+
it('renders the HeaderSecondaryLogo with src, href and alt', function () {
|
|
25
27
|
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
26
28
|
});
|