@ilo-org/react 0.2.1 → 0.4.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/CHANGELOG.md +26 -0
- package/README.md +1 -1
- package/lib/cjs/{DailyMotion-2aa7f048.js → DailyMotion-5654fa6e.js} +1 -1
- package/lib/cjs/{Facebook-87e24af8.js → Facebook-1924e510.js} +1 -1
- package/lib/cjs/{FilePlayer-e1216cc8.js → FilePlayer-9c697e42.js} +1 -1
- package/lib/cjs/{Kaltura-a673a8e9.js → Kaltura-177bb003.js} +1 -1
- package/lib/cjs/{Mixcloud-f9575c31.js → Mixcloud-91a772a6.js} +1 -1
- package/lib/cjs/{Preview-468c3a7f.js → Preview-8e2afb6a.js} +1 -1
- package/lib/cjs/{SoundCloud-7c59f293.js → SoundCloud-089e0f30.js} +1 -1
- package/lib/cjs/{Streamable-83e516e5.js → Streamable-4ca5b9c7.js} +1 -1
- package/lib/cjs/{Twitch-fdfa1c77.js → Twitch-dbc5c387.js} +1 -1
- package/lib/cjs/{VideoPlayer-9ce35136.js → VideoPlayer-874a52b0.js} +21 -16
- package/lib/cjs/{Vidyard-096bba3c.js → Vidyard-371acdcb.js} +1 -1
- package/lib/cjs/{Vimeo-2cb7476f.js → Vimeo-4d2029a8.js} +1 -1
- package/lib/cjs/{Wistia-5e830ac8.js → Wistia-cd0799ad.js} +1 -1
- package/lib/cjs/{YouTube-25a1d9a0.js → YouTube-23b7ec9e.js} +1 -1
- package/lib/cjs/components/Card/Card.js +43 -0
- package/lib/cjs/components/Card/CardGroup.js +25 -0
- package/lib/cjs/components/Card/index.js +21 -0
- package/lib/cjs/components/LocalNav/LocalNav.js +5 -3
- package/lib/cjs/components/LocalNav/index.js +1 -0
- package/lib/cjs/components/Logo/Logo.js +153 -0
- package/lib/cjs/components/Logo/index.js +13 -0
- package/lib/cjs/components/Navigation/Navigation.js +48 -0
- package/lib/cjs/components/Navigation/index.js +20 -0
- package/lib/cjs/components/Video/Video.js +1 -1
- package/lib/cjs/components/Video/VideoPlayer.js +1 -1
- package/lib/cjs/components/Video/index.js +1 -1
- package/lib/cjs/components/index.js +9 -1
- package/lib/cjs/index.js +9 -1
- package/lib/esm/{DailyMotion-66b6eff2.js → DailyMotion-88f6c379.js} +1 -1
- package/lib/esm/{Facebook-dbd1003d.js → Facebook-3a284039.js} +1 -1
- package/lib/esm/{FilePlayer-617ed2ce.js → FilePlayer-dee1f94b.js} +1 -1
- package/lib/esm/{Kaltura-bbcec33d.js → Kaltura-c5d42c88.js} +1 -1
- package/lib/esm/{Mixcloud-a681ec69.js → Mixcloud-430ab42a.js} +1 -1
- package/lib/esm/{Preview-407cc648.js → Preview-7f57e055.js} +1 -1
- package/lib/esm/{SoundCloud-16e78ee5.js → SoundCloud-d1ab591e.js} +1 -1
- package/lib/esm/{Streamable-ecb225c1.js → Streamable-042d61d5.js} +1 -1
- package/lib/esm/{Twitch-8d1b6769.js → Twitch-2f45534f.js} +1 -1
- package/lib/esm/{VideoPlayer-62e0ce79.js → VideoPlayer-719076c4.js} +21 -16
- package/lib/esm/{Vidyard-57e2834a.js → Vidyard-4625527b.js} +1 -1
- package/lib/esm/{Vimeo-faa058a2.js → Vimeo-03b960e6.js} +1 -1
- package/lib/esm/{Wistia-24fb5120.js → Wistia-48f9c303.js} +1 -1
- package/lib/esm/{YouTube-01b3e51f.js → YouTube-5b29a3d9.js} +1 -1
- package/lib/esm/components/Card/Card.js +41 -0
- package/lib/esm/components/Card/CardGroup.js +23 -0
- package/lib/esm/components/Card/index.js +14 -0
- package/lib/esm/components/LocalNav/LocalNav.js +5 -3
- package/lib/esm/components/LocalNav/index.js +1 -0
- package/lib/esm/components/Logo/Logo.js +151 -0
- package/lib/esm/components/Logo/index.js +7 -0
- package/lib/esm/components/Navigation/Navigation.js +46 -0
- package/lib/esm/components/Navigation/index.js +14 -0
- package/lib/esm/components/Video/Video.js +1 -1
- package/lib/esm/components/Video/VideoPlayer.js +1 -1
- package/lib/esm/components/Video/index.js +1 -1
- package/lib/esm/components/index.js +6 -1
- package/lib/esm/index.js +6 -1
- package/lib/types/react/src/components/Card/Card.d.ts +4 -0
- package/lib/types/react/src/components/Card/Card.props.d.ts +110 -0
- package/lib/types/react/src/components/Card/CardGroup.d.ts +4 -0
- package/lib/types/react/src/components/Card/CardGroup.props.d.ts +16 -0
- package/lib/types/react/src/components/Card/index.d.ts +2 -0
- package/lib/types/react/src/components/LocalNav/LocalNav.props.d.ts +4 -7
- package/lib/types/react/src/components/Logo/Logo.d.ts +4 -0
- package/lib/types/react/src/components/Logo/Logo.props.d.ts +55 -0
- package/lib/types/react/src/components/Logo/index.d.ts +1 -0
- package/lib/types/react/src/components/Navigation/Navigation.d.ts +4 -0
- package/lib/types/react/src/components/Navigation/Navigation.props.d.ts +99 -0
- package/lib/types/react/src/components/Navigation/index.d.ts +1 -0
- package/lib/types/react/src/components/index.d.ts +2 -0
- package/lib/types/react/src/types/index.d.ts +6 -0
- package/package.json +18 -17
- package/public/favicon.ico +0 -0
- package/src/components/Accordion/Accordion.args.ts +1 -4
- package/src/components/Card/Card.args.ts +215 -0
- package/src/components/Card/Card.props.ts +142 -0
- package/src/components/Card/Card.tsx +183 -0
- package/src/components/Card/CardGroup.args.ts +945 -0
- package/src/components/Card/CardGroup.props.ts +19 -0
- package/src/components/Card/CardGroup.tsx +55 -0
- package/src/components/Card/index.ts +2 -0
- package/src/components/LocalNav/LocalNav.args.ts +6 -6
- package/src/components/LocalNav/LocalNav.props.ts +4 -8
- package/src/components/LocalNav/LocalNav.tsx +21 -15
- package/src/components/Logo/Logo.args.ts +45 -0
- package/src/components/Logo/Logo.props.ts +67 -0
- package/src/components/Logo/Logo.tsx +247 -0
- package/src/components/Logo/index.ts +1 -0
- package/src/components/Navigation/Navigation.args.ts +112 -0
- package/src/components/Navigation/Navigation.props.ts +120 -0
- package/src/components/Navigation/Navigation.tsx +246 -0
- package/src/components/Navigation/index.ts +1 -0
- package/src/components/index.ts +2 -0
- package/src/types/index.ts +14 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var require$$0 = require('react');
|
|
5
|
+
var hooks_useGlobalSettings = require('../../hooks/useGlobalSettings.js');
|
|
6
|
+
var components_ContextMenu_ContextMenu = require('../ContextMenu/ContextMenu.js');
|
|
7
|
+
var components_SearchField_SearchField = require('../SearchField/SearchField.js');
|
|
8
|
+
var classNames = require('classnames');
|
|
9
|
+
require('tslib');
|
|
10
|
+
require('../../GlobalCtx-97e4b433.js');
|
|
11
|
+
require('../Input/Input.js');
|
|
12
|
+
require('../Fieldset/Fieldset.js');
|
|
13
|
+
require('../Tooltip/Tooltip.js');
|
|
14
|
+
require('react-dom');
|
|
15
|
+
require('../FormElement/FormElement.js');
|
|
16
|
+
|
|
17
|
+
const Navigation = ({ logo, mobilelogo, siteurl, tagline, primarynav, subnav, menulabel, menucloselabel, searchlabel, searchfield, languagelabel, languagecontextmenu, }) => {
|
|
18
|
+
const { prefix } = hooks_useGlobalSettings();
|
|
19
|
+
const [toggleMenuOpen, setMenuToggleOpen] = require$$0.useState(false);
|
|
20
|
+
const [toggleSearchOpen, setSearchToggleOpen] = require$$0.useState(false);
|
|
21
|
+
const [toggleSubnavOpen, setSubnavToggleOpen] = require$$0.useState(false);
|
|
22
|
+
const [toggleLanguageOpen, setLanguageToggleOpen] = require$$0.useState(false);
|
|
23
|
+
const baseClass = `${prefix}--header`;
|
|
24
|
+
const NavigationClasses = classNames(baseClass, {
|
|
25
|
+
[`${prefix}--mobile--open`]: toggleMenuOpen,
|
|
26
|
+
[`${prefix}--select--open`]: toggleLanguageOpen,
|
|
27
|
+
[`${prefix}--search--open`]: toggleSearchOpen,
|
|
28
|
+
[`${prefix}--subnav--open`]: toggleSubnavOpen,
|
|
29
|
+
});
|
|
30
|
+
const handleMenuToggle = () => {
|
|
31
|
+
setMenuToggleOpen(!toggleMenuOpen);
|
|
32
|
+
};
|
|
33
|
+
const handleLanguageToggle = () => {
|
|
34
|
+
setLanguageToggleOpen(!toggleLanguageOpen);
|
|
35
|
+
};
|
|
36
|
+
const handleSearchToggle = () => {
|
|
37
|
+
setSearchToggleOpen(!toggleSearchOpen);
|
|
38
|
+
};
|
|
39
|
+
const handleSubnavToggle = () => {
|
|
40
|
+
setSubnavToggleOpen(!toggleSubnavOpen);
|
|
41
|
+
};
|
|
42
|
+
return (jsxRuntime.jsxs("header", Object.assign({ className: NavigationClasses }, { children: [jsxRuntime.jsx("div", Object.assign({ className: `${baseClass}--utility-bar` }, { children: jsxRuntime.jsx("div", Object.assign({ className: `${prefix}--language-switcher` }, { children: jsxRuntime.jsxs("div", Object.assign({ className: `${prefix}--language-switcher--wrap` }, { children: [jsxRuntime.jsx("button", Object.assign({ className: `${prefix}--language-switcher--button`, type: "button" }, { children: languagelabel })), jsxRuntime.jsx(components_ContextMenu_ContextMenu, { links: languagecontextmenu === null || languagecontextmenu === void 0 ? void 0 : languagecontextmenu.links })] })) })) })), jsxRuntime.jsx("div", Object.assign({ className: `${baseClass}--logo-bar` }, { children: jsxRuntime.jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsxRuntime.jsx("a", Object.assign({ href: siteurl, className: `${baseClass}--logo-link` }, { children: jsxRuntime.jsx("img", { className: `${baseClass}--logo`, src: logo, alt: "ILO Logo" }) })), jsxRuntime.jsxs("p", Object.assign({ className: `${baseClass}--logo-tagline` }, { children: [tagline === null || tagline === void 0 ? void 0 : tagline.tag, jsxRuntime.jsx("span", Object.assign({ className: `${baseClass}--logo-tagline--small` }, { children: tagline === null || tagline === void 0 ? void 0 : tagline.small }))] })), jsxRuntime.jsx("button", Object.assign({ className: `${baseClass}--menu`, onClick: handleMenuToggle }, { children: menulabel }))] })) })), jsxRuntime.jsxs("div", Object.assign({ className: `${baseClass}--navigation` }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: `${prefix}--mobile--nav` }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: `${prefix}--mobile--nav--logo` }, { children: [jsxRuntime.jsx("a", Object.assign({ href: siteurl, className: `${baseClass}--logo-link` }, { children: jsxRuntime.jsx("img", { className: `${baseClass}--logo`, src: mobilelogo, alt: "ILO Logo" }) })), jsxRuntime.jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: menucloselabel }))] })), jsxRuntime.jsx("div", Object.assign({ className: `${prefix}--mobile--nav--search` }, { children: jsxRuntime.jsx(components_SearchField_SearchField, { input: searchfield === null || searchfield === void 0 ? void 0 : searchfield.input, action: searchfield === null || searchfield === void 0 ? void 0 : searchfield.action }) })), jsxRuntime.jsx("div", Object.assign({ className: `${prefix}--mobile--nav--language--switcher` }, { children: jsxRuntime.jsx("button", Object.assign({ className: `${prefix}--mobile--nav--language--switcher--button`, onClick: handleLanguageToggle, type: "button" }, { children: languagelabel })) })), jsxRuntime.jsx("div", Object.assign({ className: `${prefix}--mobile--nav--language--select` }, { children: jsxRuntime.jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: `${prefix}--mobile--subnav--menu` }, { children: [jsxRuntime.jsx("button", Object.assign({ className: `${prefix}--mobile--subnav--back`, onClick: handleLanguageToggle, type: "button" }, { children: subnav === null || subnav === void 0 ? void 0 : subnav.mobilebacklabel })), jsxRuntime.jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: subnav === null || subnav === void 0 ? void 0 : subnav.mobilecloselabel })), jsxRuntime.jsx("h6", Object.assign({ className: `${prefix}--mobile--subnav--label` }, { children: languagelabel }))] })), jsxRuntime.jsx("ul", Object.assign({ className: `${prefix}--nav--set` }, { children: (languagecontextmenu === null || languagecontextmenu === void 0 ? void 0 : languagecontextmenu.links) &&
|
|
43
|
+
languagecontextmenu.links.map((item, index) => (jsxRuntime.jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsxRuntime.jsx("a", Object.assign({ href: item.url, className: `${prefix}--nav--link ${prefix}--nav--language` }, { children: item.label })) }), index))) }))] })) }))] })), jsxRuntime.jsxs("nav", Object.assign({ className: `${prefix}--nav`, "aria-labelledby": "primary-navigation" }, { children: [jsxRuntime.jsx("h2", Object.assign({ className: `${prefix}--nav--label`, id: "primary-navigation" }, { children: primarynav === null || primarynav === void 0 ? void 0 : primarynav.navlabel })), jsxRuntime.jsxs("ul", Object.assign({ className: `${prefix}--nav--set` }, { children: [(primarynav === null || primarynav === void 0 ? void 0 : primarynav.items) &&
|
|
44
|
+
primarynav.items.map((item, index) => (jsxRuntime.jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsxRuntime.jsx("a", Object.assign({ href: item.url, className: `${prefix}--nav--link` }, { children: item.label })) }), index))), subnav && (jsxRuntime.jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsxRuntime.jsx("button", Object.assign({ className: `${prefix}--nav--trigger`, onClick: handleSubnavToggle }, { children: subnav.buttonlabel })) })))] }))] })), jsxRuntime.jsx("div", Object.assign({ className: `${prefix}--search` }, { children: jsxRuntime.jsx("button", Object.assign({ className: `${prefix}--search--button`, type: "button", onClick: handleSearchToggle }, { children: searchlabel })) }))] })), subnav && (jsxRuntime.jsx("nav", Object.assign({ className: `${prefix}--subnav`, "aria-labelledby": "secondary-navigation" }, { children: jsxRuntime.jsxs("div", Object.assign({ className: `${prefix}--subnav--inner` }, { children: [jsxRuntime.jsx("div", Object.assign({ className: `${prefix}--mobile--subnav` }, { children: jsxRuntime.jsxs("div", Object.assign({ className: `${prefix}--mobile--subnav--menu` }, { children: [jsxRuntime.jsx("button", Object.assign({ className: `${prefix}--mobile--subnav--back`, onClick: handleSubnavToggle, type: "button" }, { children: subnav.mobilebacklabel })), jsxRuntime.jsx("button", Object.assign({ className: `${prefix}--header--menu--close`, onClick: handleMenuToggle }, { children: subnav.mobilecloselabel })), jsxRuntime.jsx("h6", Object.assign({ className: `${prefix}--mobile--subnav--label` }, { children: subnav.buttonlabel }))] })) })), jsxRuntime.jsx("h2", Object.assign({ className: `${prefix}--nav--label`, id: "secondary-navigation" }, { children: subnav.navlabel })), jsxRuntime.jsx("ul", Object.assign({ className: `${prefix}--subnav--set` }, { children: (subnav === null || subnav === void 0 ? void 0 : subnav.items) &&
|
|
45
|
+
subnav.items.map((item, index) => (jsxRuntime.jsx("li", Object.assign({ className: `${prefix}--subnav--items` }, { children: jsxRuntime.jsx("a", Object.assign({ href: item.url, className: `${prefix}--subnav--link` }, { children: item.label })) }), index))) }))] })) }))), jsxRuntime.jsx("div", Object.assign({ className: `${prefix}--search-box` }, { children: jsxRuntime.jsx("div", Object.assign({ className: `${prefix}--header--inner` }, { children: jsxRuntime.jsx(components_SearchField_SearchField, { input: searchfield === null || searchfield === void 0 ? void 0 : searchfield.input, action: searchfield === null || searchfield === void 0 ? void 0 : searchfield.action }) })) }))] }))] })));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
module.exports = Navigation;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var components_Navigation_Navigation = require('./Navigation.js');
|
|
4
|
+
require('react/jsx-runtime');
|
|
5
|
+
require('react');
|
|
6
|
+
require('../../hooks/useGlobalSettings.js');
|
|
7
|
+
require('tslib');
|
|
8
|
+
require('../../GlobalCtx-97e4b433.js');
|
|
9
|
+
require('../ContextMenu/ContextMenu.js');
|
|
10
|
+
require('classnames');
|
|
11
|
+
require('../SearchField/SearchField.js');
|
|
12
|
+
require('../Input/Input.js');
|
|
13
|
+
require('../Fieldset/Fieldset.js');
|
|
14
|
+
require('../Tooltip/Tooltip.js');
|
|
15
|
+
require('react-dom');
|
|
16
|
+
require('../FormElement/FormElement.js');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.Navigation = components_Navigation_Navigation;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var classNames = require('classnames');
|
|
5
5
|
var hooks_useGlobalSettings = require('../../hooks/useGlobalSettings.js');
|
|
6
|
-
var components_Video_VideoPlayer = require('../../VideoPlayer-
|
|
6
|
+
var components_Video_VideoPlayer = require('../../VideoPlayer-874a52b0.js');
|
|
7
7
|
require('tslib');
|
|
8
8
|
require('react');
|
|
9
9
|
require('../../GlobalCtx-97e4b433.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('react/jsx-runtime');
|
|
4
4
|
require('react');
|
|
5
|
-
var components_Video_VideoPlayer = require('../../VideoPlayer-
|
|
5
|
+
var components_Video_VideoPlayer = require('../../VideoPlayer-874a52b0.js');
|
|
6
6
|
require('react-dom');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('../../hooks/useGlobalSettings.js');
|
|
@@ -7,7 +7,7 @@ require('../../hooks/useGlobalSettings.js');
|
|
|
7
7
|
require('tslib');
|
|
8
8
|
require('react');
|
|
9
9
|
require('../../GlobalCtx-97e4b433.js');
|
|
10
|
-
require('../../VideoPlayer-
|
|
10
|
+
require('../../VideoPlayer-874a52b0.js');
|
|
11
11
|
require('../../index-1b6434f0.js');
|
|
12
12
|
require('react-dom');
|
|
13
13
|
require('../../utils/hoursMinutesSeconds.js');
|
|
@@ -52,6 +52,9 @@ var components_Profile_Profile = require('./Profile/Profile.js');
|
|
|
52
52
|
var components_TableOfContents_TableOfContents = require('./TableOfContents/TableOfContents.js');
|
|
53
53
|
var components_Footer_Footer = require('./Footer/Footer.js');
|
|
54
54
|
var components_LocalNav_LocalNav = require('./LocalNav/LocalNav.js');
|
|
55
|
+
var components_Navigation_Navigation = require('./Navigation/Navigation.js');
|
|
56
|
+
var components_Card_Card = require('./Card/Card.js');
|
|
57
|
+
var components_Card_CardGroup = require('./Card/CardGroup.js');
|
|
55
58
|
require('../hooks/useGlobalSettings.js');
|
|
56
59
|
require('../AccordionCtx-fe08ff45.js');
|
|
57
60
|
require('@ilo-org/utils');
|
|
@@ -64,10 +67,12 @@ require('../css-9c93400b.js');
|
|
|
64
67
|
require('../utils/transitionEndListener.js');
|
|
65
68
|
require('../utils/triggerBrowserReflow.js');
|
|
66
69
|
require('./Hero/HeroCard.js');
|
|
67
|
-
require('../VideoPlayer-
|
|
70
|
+
require('../VideoPlayer-874a52b0.js');
|
|
68
71
|
require('../utils/hoursMinutesSeconds.js');
|
|
69
72
|
require('screenfull');
|
|
70
73
|
require('@ilo-org/icons-react');
|
|
74
|
+
require('./Logo/Logo.js');
|
|
75
|
+
require('./List/ListItem.js');
|
|
71
76
|
|
|
72
77
|
|
|
73
78
|
|
|
@@ -115,3 +120,6 @@ exports.Profile = components_Profile_Profile;
|
|
|
115
120
|
exports.TableOfContents = components_TableOfContents_TableOfContents;
|
|
116
121
|
exports.Footer = components_Footer_Footer;
|
|
117
122
|
exports.LocalNav = components_LocalNav_LocalNav;
|
|
123
|
+
exports.Navigation = components_Navigation_Navigation;
|
|
124
|
+
exports.Card = components_Card_Card;
|
|
125
|
+
exports.CardGroup = components_Card_CardGroup;
|
package/lib/cjs/index.js
CHANGED
|
@@ -52,6 +52,9 @@ var components_Profile_Profile = require('./components/Profile/Profile.js');
|
|
|
52
52
|
var components_TableOfContents_TableOfContents = require('./components/TableOfContents/TableOfContents.js');
|
|
53
53
|
var components_Footer_Footer = require('./components/Footer/Footer.js');
|
|
54
54
|
var components_LocalNav_LocalNav = require('./components/LocalNav/LocalNav.js');
|
|
55
|
+
var components_Navigation_Navigation = require('./components/Navigation/Navigation.js');
|
|
56
|
+
var components_Card_Card = require('./components/Card/Card.js');
|
|
57
|
+
var components_Card_CardGroup = require('./components/Card/CardGroup.js');
|
|
55
58
|
require('./hooks/useGlobalSettings.js');
|
|
56
59
|
require('./AccordionCtx-fe08ff45.js');
|
|
57
60
|
require('@ilo-org/utils');
|
|
@@ -64,10 +67,12 @@ require('./css-9c93400b.js');
|
|
|
64
67
|
require('./utils/transitionEndListener.js');
|
|
65
68
|
require('./utils/triggerBrowserReflow.js');
|
|
66
69
|
require('./components/Hero/HeroCard.js');
|
|
67
|
-
require('./VideoPlayer-
|
|
70
|
+
require('./VideoPlayer-874a52b0.js');
|
|
68
71
|
require('./utils/hoursMinutesSeconds.js');
|
|
69
72
|
require('screenfull');
|
|
70
73
|
require('@ilo-org/icons-react');
|
|
74
|
+
require('./components/Logo/Logo.js');
|
|
75
|
+
require('./components/List/ListItem.js');
|
|
71
76
|
|
|
72
77
|
|
|
73
78
|
|
|
@@ -115,3 +120,6 @@ exports.Profile = components_Profile_Profile;
|
|
|
115
120
|
exports.TableOfContents = components_TableOfContents_TableOfContents;
|
|
116
121
|
exports.Footer = components_Footer_Footer;
|
|
117
122
|
exports.LocalNav = components_LocalNav_LocalNav;
|
|
123
|
+
exports.Navigation = components_Navigation_Navigation;
|
|
124
|
+
exports.Card = components_Card_Card;
|
|
125
|
+
exports.CardGroup = components_Card_CardGroup;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -639,7 +639,7 @@ patterns.canPlay = canPlay;
|
|
|
639
639
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
640
640
|
return import(
|
|
641
641
|
/* webpackChunkName: 'reactPlayerYouTube' */
|
|
642
|
-
'./YouTube-
|
|
642
|
+
'./YouTube-5b29a3d9.js').then(function (n) { return n.Y; });
|
|
643
643
|
})
|
|
644
644
|
}, {
|
|
645
645
|
key: 'soundcloud',
|
|
@@ -648,7 +648,7 @@ patterns.canPlay = canPlay;
|
|
|
648
648
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
649
649
|
return import(
|
|
650
650
|
/* webpackChunkName: 'reactPlayerSoundCloud' */
|
|
651
|
-
'./SoundCloud-
|
|
651
|
+
'./SoundCloud-d1ab591e.js').then(function (n) { return n.S; });
|
|
652
652
|
})
|
|
653
653
|
}, {
|
|
654
654
|
key: 'vimeo',
|
|
@@ -657,7 +657,7 @@ patterns.canPlay = canPlay;
|
|
|
657
657
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
658
658
|
return import(
|
|
659
659
|
/* webpackChunkName: 'reactPlayerVimeo' */
|
|
660
|
-
'./Vimeo-
|
|
660
|
+
'./Vimeo-03b960e6.js').then(function (n) { return n.V; });
|
|
661
661
|
})
|
|
662
662
|
}, {
|
|
663
663
|
key: 'facebook',
|
|
@@ -666,7 +666,7 @@ patterns.canPlay = canPlay;
|
|
|
666
666
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
667
667
|
return import(
|
|
668
668
|
/* webpackChunkName: 'reactPlayerFacebook' */
|
|
669
|
-
'./Facebook-
|
|
669
|
+
'./Facebook-3a284039.js').then(function (n) { return n.F; });
|
|
670
670
|
})
|
|
671
671
|
}, {
|
|
672
672
|
key: 'streamable',
|
|
@@ -675,7 +675,7 @@ patterns.canPlay = canPlay;
|
|
|
675
675
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
676
676
|
return import(
|
|
677
677
|
/* webpackChunkName: 'reactPlayerStreamable' */
|
|
678
|
-
'./Streamable-
|
|
678
|
+
'./Streamable-042d61d5.js').then(function (n) { return n.S; });
|
|
679
679
|
})
|
|
680
680
|
}, {
|
|
681
681
|
key: 'wistia',
|
|
@@ -684,7 +684,7 @@ patterns.canPlay = canPlay;
|
|
|
684
684
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
685
685
|
return import(
|
|
686
686
|
/* webpackChunkName: 'reactPlayerWistia' */
|
|
687
|
-
'./Wistia-
|
|
687
|
+
'./Wistia-48f9c303.js').then(function (n) { return n.W; });
|
|
688
688
|
})
|
|
689
689
|
}, {
|
|
690
690
|
key: 'twitch',
|
|
@@ -693,7 +693,7 @@ patterns.canPlay = canPlay;
|
|
|
693
693
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
694
694
|
return import(
|
|
695
695
|
/* webpackChunkName: 'reactPlayerTwitch' */
|
|
696
|
-
'./Twitch-
|
|
696
|
+
'./Twitch-2f45534f.js').then(function (n) { return n.T; });
|
|
697
697
|
})
|
|
698
698
|
}, {
|
|
699
699
|
key: 'dailymotion',
|
|
@@ -702,7 +702,7 @@ patterns.canPlay = canPlay;
|
|
|
702
702
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
703
703
|
return import(
|
|
704
704
|
/* webpackChunkName: 'reactPlayerDailyMotion' */
|
|
705
|
-
'./DailyMotion-
|
|
705
|
+
'./DailyMotion-88f6c379.js').then(function (n) { return n.D; });
|
|
706
706
|
})
|
|
707
707
|
}, {
|
|
708
708
|
key: 'mixcloud',
|
|
@@ -711,7 +711,7 @@ patterns.canPlay = canPlay;
|
|
|
711
711
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
712
712
|
return import(
|
|
713
713
|
/* webpackChunkName: 'reactPlayerMixcloud' */
|
|
714
|
-
'./Mixcloud-
|
|
714
|
+
'./Mixcloud-430ab42a.js').then(function (n) { return n.M; });
|
|
715
715
|
})
|
|
716
716
|
}, {
|
|
717
717
|
key: 'vidyard',
|
|
@@ -720,7 +720,7 @@ patterns.canPlay = canPlay;
|
|
|
720
720
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
721
721
|
return import(
|
|
722
722
|
/* webpackChunkName: 'reactPlayerVidyard' */
|
|
723
|
-
'./Vidyard-
|
|
723
|
+
'./Vidyard-4625527b.js').then(function (n) { return n.V; });
|
|
724
724
|
})
|
|
725
725
|
}, {
|
|
726
726
|
key: 'kaltura',
|
|
@@ -729,7 +729,7 @@ patterns.canPlay = canPlay;
|
|
|
729
729
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
730
730
|
return import(
|
|
731
731
|
/* webpackChunkName: 'reactPlayerKaltura' */
|
|
732
|
-
'./Kaltura-
|
|
732
|
+
'./Kaltura-c5d42c88.js').then(function (n) { return n.K; });
|
|
733
733
|
})
|
|
734
734
|
}, {
|
|
735
735
|
key: 'file',
|
|
@@ -741,7 +741,7 @@ patterns.canPlay = canPlay;
|
|
|
741
741
|
lazyPlayer: /*#__PURE__*/(0, _react.lazy)(function () {
|
|
742
742
|
return import(
|
|
743
743
|
/* webpackChunkName: 'reactPlayerFilePlayer' */
|
|
744
|
-
'./FilePlayer-
|
|
744
|
+
'./FilePlayer-dee1f94b.js').then(function (n) { return n.F; });
|
|
745
745
|
})
|
|
746
746
|
}];
|
|
747
747
|
exports["default"] = _default;
|
|
@@ -814,7 +814,7 @@ var hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;
|
|
|
814
814
|
// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js
|
|
815
815
|
|
|
816
816
|
function equal(a, b) {
|
|
817
|
-
// START: fast-deep-equal es6/index.js 3.1.
|
|
817
|
+
// START: fast-deep-equal es6/index.js 3.1.3
|
|
818
818
|
if (a === b) return true;
|
|
819
819
|
|
|
820
820
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
@@ -879,8 +879,13 @@ function equal(a, b) {
|
|
|
879
879
|
}
|
|
880
880
|
|
|
881
881
|
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
882
|
-
|
|
883
|
-
|
|
882
|
+
// START: Modifications:
|
|
883
|
+
// Apply guards for `Object.create(null)` handling. See:
|
|
884
|
+
// - https://github.com/FormidableLabs/react-fast-compare/issues/64
|
|
885
|
+
// - https://github.com/epoberezkin/fast-deep-equal/issues/49
|
|
886
|
+
if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();
|
|
887
|
+
if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();
|
|
888
|
+
// END: Modifications
|
|
884
889
|
|
|
885
890
|
keys = Object.keys(a);
|
|
886
891
|
length = keys.length;
|
|
@@ -1661,7 +1666,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
1661
1666
|
var Preview = /*#__PURE__*/(0, _react.lazy)(function () {
|
|
1662
1667
|
return import(
|
|
1663
1668
|
/* webpackChunkName: 'reactPlayerPreview' */
|
|
1664
|
-
'./Preview-
|
|
1669
|
+
'./Preview-7f57e055.js').then(function (n) { return n.P; });
|
|
1665
1670
|
});
|
|
1666
1671
|
var IS_BROWSER = typeof window !== 'undefined' && window.document;
|
|
1667
1672
|
var IS_GLOBAL = typeof commonjsGlobal !== 'undefined' && commonjsGlobal.window && commonjsGlobal.window.document;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-719076c4.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import useGlobalSettings from '../../hooks/useGlobalSettings.js';
|
|
4
|
+
import Link from '../Link/Link.js';
|
|
5
|
+
import List from '../List/List.js';
|
|
6
|
+
import ListItem from '../List/ListItem.js';
|
|
7
|
+
import LinkList from '../LinkList/LinkList.js';
|
|
8
|
+
import Profile from '../Profile/Profile.js';
|
|
9
|
+
import 'tslib';
|
|
10
|
+
import 'react';
|
|
11
|
+
import '../../GlobalCtx-7fb23cfa.js';
|
|
12
|
+
import '../../ListCtx-da435fdf.js';
|
|
13
|
+
|
|
14
|
+
const Card = ({ isvideo, eyebrow, title, color, theme, variant, size, cornercut, alignment, intro, date, eventdetails, profile, listitems, link, linklist, cta, image, source, dataset, }) => {
|
|
15
|
+
const { prefix } = useGlobalSettings();
|
|
16
|
+
const baseClass = `${prefix}--card`;
|
|
17
|
+
const cardClasses = classNames(baseClass, `${baseClass}--${variant}`, `${baseClass}--${color}`, {
|
|
18
|
+
[`${baseClass}--${cornercut}`]: cornercut,
|
|
19
|
+
[`${baseClass}--${alignment}`]: alignment,
|
|
20
|
+
[`${baseClass}--action`]: link,
|
|
21
|
+
[`${baseClass}--${size}`]: size,
|
|
22
|
+
[`${baseClass}--isvideo`]: isvideo,
|
|
23
|
+
[`${baseClass}--linklist`]: linklist,
|
|
24
|
+
[`${baseClass}--${theme}`]: theme,
|
|
25
|
+
});
|
|
26
|
+
return (jsxs("div", Object.assign({ className: cardClasses }, { children: [link &&
|
|
27
|
+
variant != "data" &&
|
|
28
|
+
variant != "factlist" &&
|
|
29
|
+
variant != "stat" && (jsx("a", Object.assign({ className: `${baseClass}--link`, href: link, title: title }, { children: jsx("span", Object.assign({ className: `${baseClass}--link--text` }, { children: title })) }))), jsxs("div", Object.assign({ className: `${baseClass}--wrap` }, { children: [image && (jsx("div", Object.assign({ className: `${baseClass}--image--wrapper` }, { children: jsx("picture", { children: jsx("img", { className: `${baseClass}--image`, src: image, alt: title }) }) }))), jsxs("div", Object.assign({ className: `${baseClass}--content` }, { children: [eyebrow && jsx("p", Object.assign({ className: `${baseClass}--eyebrow` }, { children: eyebrow })), title && jsx("h5", Object.assign({ className: `${baseClass}--title` }, { children: title })), (variant == "multilink" || (variant == "data" && image)) && (jsx("div", Object.assign({ className: `${baseClass}--image--wrapper` }, { children: jsx("picture", { children: jsx("img", { className: `${baseClass}--image`, src: image, alt: title }) }) }))), intro && jsx("p", Object.assign({ className: `${baseClass}--intro` }, { children: intro })), date &&
|
|
30
|
+
variant != "stat" &&
|
|
31
|
+
variant != "data" &&
|
|
32
|
+
variant != "graphicpromo" &&
|
|
33
|
+
variant != "factlist" && (jsx("time", Object.assign({ className: `${baseClass}--date`, dateTime: date.unix }, { children: date.human }))), eventdetails && (jsx("p", Object.assign({ className: `${baseClass}--event-date` }, { children: eventdetails }))), profile && profile.avatar && (jsx(Profile, { avatar: profile.avatar, description: profile.description, link: profile.link, name: profile.name, role: profile.role, className: `${prefix}--profile--contents--${theme}` })), listitems && (jsx(List, Object.assign({ alignment: "default", ordered: "unordered" }, { children: listitems.map((item, index) => (jsx(ListItem, Object.assign({ id: `list${index}` }, { children: jsx("p", { children: item }) })))) }))), cta && cta.label && (jsx("a", Object.assign({ className: `${baseClass}--cta ${prefix}--button ${prefix}--button--medium ${prefix}--button--primary`, href: cta.url }, { children: jsx("span", Object.assign({ className: "link__label" }, { children: cta.label })) }))), source && (jsx(Link, Object.assign({ theme: theme, url: source.url }, { children: source.label }))), linklist && (jsx(LinkList, { headline: linklist.headline, linkgroup: linklist.linkgroup })), dataset &&
|
|
34
|
+
dataset.content &&
|
|
35
|
+
dataset.content.items &&
|
|
36
|
+
dataset.content.items.map((item) => (jsxs(Fragment, { children: [jsx("p", Object.assign({ className: `${baseClass}--data--content-label` }, { children: item.label })), jsx("p", Object.assign({ className: `${baseClass}--data--content-copy` }, { children: item.copy }))] }))), dataset && dataset.files && (jsxs("div", Object.assign({ className: `${baseClass}--data--content-files` }, { children: [jsx("p", Object.assign({ className: `${baseClass}--data--content-label` }, { children: dataset.files.headline })), dataset.files.items &&
|
|
37
|
+
dataset.files.items.map((item) => (jsx("a", Object.assign({ className: `${baseClass}--data--file ${prefix}--button ${prefix}--button--primary ${prefix}--button--small`, href: item.url, download: true }, { children: jsx("span", Object.assign({ className: "button__label" }, { children: item.label })) }))))] }))), dataset && dataset.links && (jsxs("div", Object.assign({ className: `${baseClass}--data--content-links` }, { children: [jsx("p", Object.assign({ className: `${baseClass}--data--content-label` }, { children: dataset.links.headline })), dataset.links.items &&
|
|
38
|
+
dataset.links.items.map((item) => (jsxs(Fragment, { children: [jsx(Link, Object.assign({ url: item.url }, { children: item.label })), jsx("span", { children: "\u00A0\u00A0" })] })))] })))] }))] }))] })));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { Card as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import useGlobalSettings from '../../hooks/useGlobalSettings.js';
|
|
4
|
+
import Card from './Card.js';
|
|
5
|
+
import 'tslib';
|
|
6
|
+
import 'react';
|
|
7
|
+
import '../../GlobalCtx-7fb23cfa.js';
|
|
8
|
+
import '../Link/Link.js';
|
|
9
|
+
import '../List/List.js';
|
|
10
|
+
import '../../ListCtx-da435fdf.js';
|
|
11
|
+
import '../List/ListItem.js';
|
|
12
|
+
import '../LinkList/LinkList.js';
|
|
13
|
+
import '../Profile/Profile.js';
|
|
14
|
+
|
|
15
|
+
const CardGroup = ({ cards, cardcount, cta }) => {
|
|
16
|
+
const { prefix } = useGlobalSettings();
|
|
17
|
+
const baseClass = `${prefix}--cardgroup`;
|
|
18
|
+
const cardGroupClasses = classNames(baseClass, `${baseClass}--${cardcount}`);
|
|
19
|
+
return (jsx("div", Object.assign({ className: cardGroupClasses }, { children: jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [cards &&
|
|
20
|
+
cards.map((card) => (jsx(Card, { title: card.title, image: card.image, intro: card.intro, eyebrow: card.eyebrow, date: card.date, dataset: card.dataset, link: card.link, profile: card.profile, cta: card.cta, source: card.source, listitems: card.listitems, linklist: card.linklist, color: card.color, theme: card.theme, cornercut: card.cornercut, alignment: card.alignment, variant: card.variant, size: card.size }))), cta && (jsx("div", Object.assign({ className: `${baseClass}--button-wrap` }, { children: jsx("a", Object.assign({ className: `${prefix}--button ${prefix}--button--medium ${prefix}--button--secondary`, href: cta.url }, { children: jsx("span", Object.assign({ className: "button__label" }, { children: cta.label })) })) })))] })) })));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { CardGroup as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { default as Card } from './Card.js';
|
|
2
|
+
export { default as CardGroup } from './CardGroup.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'classnames';
|
|
5
|
+
import '../../hooks/useGlobalSettings.js';
|
|
6
|
+
import 'tslib';
|
|
7
|
+
import 'react';
|
|
8
|
+
import '../../GlobalCtx-7fb23cfa.js';
|
|
9
|
+
import '../Link/Link.js';
|
|
10
|
+
import '../List/List.js';
|
|
11
|
+
import '../../ListCtx-da435fdf.js';
|
|
12
|
+
import '../List/ListItem.js';
|
|
13
|
+
import '../LinkList/LinkList.js';
|
|
14
|
+
import '../Profile/Profile.js';
|
|
@@ -3,6 +3,7 @@ import { useState } from 'react';
|
|
|
3
3
|
import useGlobalSettings from '../../hooks/useGlobalSettings.js';
|
|
4
4
|
import ContextMenu from '../ContextMenu/ContextMenu.js';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
+
import Logo from '../Logo/Logo.js';
|
|
6
7
|
import 'tslib';
|
|
7
8
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
8
9
|
|
|
@@ -75,7 +76,8 @@ var brand = {
|
|
|
75
76
|
}
|
|
76
77
|
};
|
|
77
78
|
|
|
78
|
-
const
|
|
79
|
+
const DEFAULT_LOGO_SIZE = 280;
|
|
80
|
+
const LocalNav = ({ background, logo, primarynav, mainlink, menucloselabel, languagelabel, languagecontextmenu, }) => {
|
|
79
81
|
const { prefix } = useGlobalSettings();
|
|
80
82
|
const [toggleMenuOpen, setMenuToggleOpen] = useState(false);
|
|
81
83
|
const [toggleLanguageOpen, setLanguageToggleOpen] = useState(false);
|
|
@@ -91,8 +93,8 @@ const LocalNav = ({ background, logo, siteurl, primarynav, mainlink, menuclosela
|
|
|
91
93
|
const handleLanguageToggle = () => {
|
|
92
94
|
setLanguageToggleOpen(!toggleLanguageOpen);
|
|
93
95
|
};
|
|
94
|
-
return (jsx("header", Object.assign({ className: localNavClasses }, { children: jsxs("div", Object.assign({ className: `${baseClass}--utility-bar ${baseClass}--utility-bar--local`, style: { background: bg } }, { children: [jsxs("nav", Object.assign({ className: `${prefix}--nav--local` }, { children: [jsx("div", Object.assign({ className: `${prefix}--nav--local--logo-wrapper` }, { children: jsx(
|
|
95
|
-
primarynav.items.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--nav--local--item` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--nav--local--link` }, { children: jsx("span", { children: item.label }) })) }), index))) }))] })), jsx("div", Object.assign({ className: `${prefix}--language-switcher` }, { children: jsxs("div", Object.assign({ className: `${prefix}--language-switcher--wrap` }, { children: [mainlink && (jsx("span", Object.assign({ className: `${prefix}--language-switcher--link--wrap` }, { children: jsx("a", Object.assign({ href: mainlink.url, className: `${prefix}--language-switcher--link` }, { children: mainlink.label })) }))), jsx("button", Object.assign({ className: `${prefix}--language-switcher--button`, type: "button" }, { children: languagelabel })), jsx(ContextMenu, { links: languagecontextmenu === null || languagecontextmenu === void 0 ? void 0 : languagecontextmenu.links })] })) })), jsx("button", Object.assign({ className: `${baseClass}--menu`, onClick: handleMenuToggle }, { children: "Menu" })), jsx("div", Object.assign({ className: `${baseClass}--navigation` }, { children: jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--nav` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--nav--logo` }, { children: [jsx(
|
|
96
|
+
return (jsx("header", Object.assign({ className: localNavClasses }, { children: jsxs("div", Object.assign({ className: `${baseClass}--utility-bar ${baseClass}--utility-bar--local`, style: { background: bg } }, { children: [jsxs("nav", Object.assign({ className: `${prefix}--nav--local` }, { children: [jsx("div", Object.assign({ className: `${prefix}--nav--local--logo-wrapper` }, { children: jsx(Logo, { url: logo.url, src: logo.src, alt: logo.alt, className: `${prefix}--nav--local--logo`, subbrand: logo.subbrand, theme: logo.theme, size: logo.size || DEFAULT_LOGO_SIZE }) })), jsx("ul", Object.assign({ className: `${prefix}--nav--local--set` }, { children: (primarynav === null || primarynav === void 0 ? void 0 : primarynav.items) &&
|
|
97
|
+
primarynav.items.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--nav--local--item` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--nav--local--link` }, { children: jsx("span", { children: item.label }) })) }), index))) }))] })), jsx("div", Object.assign({ className: `${prefix}--language-switcher` }, { children: jsxs("div", Object.assign({ className: `${prefix}--language-switcher--wrap` }, { children: [mainlink && (jsx("span", Object.assign({ className: `${prefix}--language-switcher--link--wrap` }, { children: jsx("a", Object.assign({ href: mainlink.url, className: `${prefix}--language-switcher--link` }, { children: mainlink.label })) }))), jsx("button", Object.assign({ className: `${prefix}--language-switcher--button`, type: "button" }, { children: languagelabel })), jsx(ContextMenu, { links: languagecontextmenu === null || languagecontextmenu === void 0 ? void 0 : languagecontextmenu.links })] })) })), jsx("button", Object.assign({ className: `${baseClass}--menu`, onClick: handleMenuToggle }, { children: "Menu" })), jsx("div", Object.assign({ className: `${baseClass}--navigation` }, { children: jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--nav` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--nav--logo` }, { children: [jsx(Logo, { url: logo.url, src: logo.src, alt: logo.alt, className: `${prefix}--nav--local--logo`, subbrand: logo.subbrand, theme: logo.theme, size: logo.size || DEFAULT_LOGO_SIZE }), jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: menucloselabel }))] })), jsx("div", Object.assign({ className: `${prefix}--mobile--nav--language--switcher` }, { children: jsx("button", Object.assign({ className: `${prefix}--mobile--nav--language--switcher--button`, onClick: handleLanguageToggle, type: "button" }, { children: languagelabel })) })), jsx("div", Object.assign({ className: `${prefix}--mobile--nav--language--select` }, { children: jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsxs("div", Object.assign({ className: `${prefix}--mobile--subnav--menu` }, { children: [jsx("button", { className: `${prefix}--mobile--subnav--back`, onClick: handleLanguageToggle, type: "button" }), jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: "Close" })), jsx("h6", Object.assign({ className: `${prefix}--mobile--subnav--label` }, { children: languagelabel }))] })), jsx("ul", Object.assign({ className: `${prefix}--nav--set` }, { children: (languagecontextmenu === null || languagecontextmenu === void 0 ? void 0 : languagecontextmenu.links) &&
|
|
96
98
|
languagecontextmenu.links.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--nav--link ${prefix}--nav--language` }, { children: item.label })) }), index))) }))] })) }))] })), jsxs("nav", Object.assign({ className: `${prefix}--nav`, "aria-labelledby": "primary-navigation" }, { children: [jsx("h2", Object.assign({ className: `${prefix}--nav--label`, id: "primary-navigation" }, { children: primarynav === null || primarynav === void 0 ? void 0 : primarynav.navlabel })), jsx("ul", Object.assign({ className: `${prefix}--nav--set` }, { children: (primarynav === null || primarynav === void 0 ? void 0 : primarynav.items) &&
|
|
97
99
|
primarynav.items.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--nav--link` }, { children: item.label })) }), index))) }))] }))] })) }))] })) })));
|
|
98
100
|
};
|