@ilo-org/react 0.2.0 → 0.3.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 +17 -0
- package/lib/cjs/{DailyMotion-4f88e10b.js → DailyMotion-2aa7f048.js} +4 -5
- package/lib/cjs/{Facebook-d993b91c.js → Facebook-87e24af8.js} +4 -5
- package/lib/cjs/{FilePlayer-8272a6ea.js → FilePlayer-e1216cc8.js} +4 -5
- package/lib/cjs/{Kaltura-fbd2c46f.js → Kaltura-a673a8e9.js} +4 -5
- package/lib/cjs/{Mixcloud-2b4ffb85.js → Mixcloud-f9575c31.js} +4 -5
- package/lib/cjs/{Preview-8238ea6e.js → Preview-468c3a7f.js} +2 -2
- package/lib/cjs/{SoundCloud-356fd92d.js → SoundCloud-7c59f293.js} +4 -5
- package/lib/cjs/{Streamable-407ca855.js → Streamable-83e516e5.js} +4 -5
- package/lib/cjs/{Twitch-ca00faaf.js → Twitch-fdfa1c77.js} +4 -5
- package/lib/cjs/VideoPlayer-9ce35136.js +2059 -0
- package/lib/cjs/{Vidyard-9d037503.js → Vidyard-096bba3c.js} +4 -5
- package/lib/cjs/{Vimeo-6898bfd9.js → Vimeo-2cb7476f.js} +4 -5
- package/lib/cjs/{Wistia-ed77bf25.js → Wistia-5e830ac8.js} +4 -5
- package/lib/cjs/{YouTube-909bd761.js → YouTube-25a1d9a0.js} +4 -5
- 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 +2 -4
- package/lib/cjs/components/Video/VideoPlayer.js +10 -1445
- package/lib/cjs/components/Video/index.js +1 -3
- package/lib/cjs/components/index.js +4 -4
- package/lib/cjs/index.js +3 -3
- package/lib/esm/{DailyMotion-9a7aeab5.js → DailyMotion-66b6eff2.js} +1 -2
- package/lib/esm/{Facebook-eb35da52.js → Facebook-dbd1003d.js} +1 -2
- package/lib/esm/{FilePlayer-22314795.js → FilePlayer-617ed2ce.js} +1 -2
- package/lib/esm/{Kaltura-b97bb455.js → Kaltura-bbcec33d.js} +1 -2
- package/lib/esm/{Mixcloud-41d6dc0b.js → Mixcloud-a681ec69.js} +1 -2
- package/lib/esm/{Preview-6d2a6792.js → Preview-407cc648.js} +1 -1
- package/lib/esm/{SoundCloud-0fac2e7a.js → SoundCloud-16e78ee5.js} +1 -2
- package/lib/esm/{Streamable-46f19a16.js → Streamable-ecb225c1.js} +1 -2
- package/lib/esm/{Twitch-1be39438.js → Twitch-8d1b6769.js} +1 -2
- package/lib/esm/VideoPlayer-62e0ce79.js +2054 -0
- package/lib/esm/{Vidyard-6185c490.js → Vidyard-57e2834a.js} +1 -2
- package/lib/esm/{Vimeo-a807e7e1.js → Vimeo-faa058a2.js} +1 -2
- package/lib/esm/{Wistia-eef03ce2.js → Wistia-24fb5120.js} +1 -2
- package/lib/esm/{YouTube-e030042e.js → YouTube-01b3e51f.js} +1 -2
- 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 -3
- package/lib/esm/components/Video/VideoPlayer.js +9 -1448
- package/lib/esm/components/Video/index.js +1 -3
- package/lib/esm/components/index.js +3 -4
- package/lib/esm/index.js +2 -3
- 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 +1 -0
- package/package.json +3 -2
- package/public/favicon.ico +0 -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 +1 -0
- package/lib/cjs/_commonjsHelpers-9f9f50a8.js +0 -39
- package/lib/cjs/patterns-975adf3c.js +0 -579
- package/lib/esm/_commonjsHelpers-849bcf65.js +0 -35
- package/lib/esm/patterns-53247c1d.js +0 -575
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-62e0ce79.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
|
-
import { p as patterns, u as utils } from './patterns-53247c1d.js';
|
|
4
3
|
|
|
5
4
|
function _mergeNamespaces(n, m) {
|
|
6
5
|
m.forEach(function (e) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-62e0ce79.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
|
-
import { p as patterns, u as utils } from './patterns-53247c1d.js';
|
|
4
3
|
|
|
5
4
|
function _mergeNamespaces(n, m) {
|
|
6
5
|
m.forEach(function (e) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-62e0ce79.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
|
-
import { p as patterns, u as utils } from './patterns-53247c1d.js';
|
|
4
3
|
|
|
5
4
|
function _mergeNamespaces(n, m) {
|
|
6
5
|
m.forEach(function (e) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-62e0ce79.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
|
-
import { p as patterns, u as utils } from './patterns-53247c1d.js';
|
|
4
3
|
|
|
5
4
|
function _mergeNamespaces(n, m) {
|
|
6
5
|
m.forEach(function (e) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import useGlobalSettings from '../../hooks/useGlobalSettings.js';
|
|
4
|
+
import ContextMenu from '../ContextMenu/ContextMenu.js';
|
|
5
|
+
import SearchField from '../SearchField/SearchField.js';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import 'tslib';
|
|
8
|
+
import '../../GlobalCtx-7fb23cfa.js';
|
|
9
|
+
import '../Input/Input.js';
|
|
10
|
+
import '../Fieldset/Fieldset.js';
|
|
11
|
+
import '../Tooltip/Tooltip.js';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
import '../FormElement/FormElement.js';
|
|
14
|
+
|
|
15
|
+
const Navigation = ({ logo, mobilelogo, siteurl, tagline, primarynav, subnav, menulabel, menucloselabel, searchlabel, searchfield, languagelabel, languagecontextmenu, }) => {
|
|
16
|
+
const { prefix } = useGlobalSettings();
|
|
17
|
+
const [toggleMenuOpen, setMenuToggleOpen] = useState(false);
|
|
18
|
+
const [toggleSearchOpen, setSearchToggleOpen] = useState(false);
|
|
19
|
+
const [toggleSubnavOpen, setSubnavToggleOpen] = useState(false);
|
|
20
|
+
const [toggleLanguageOpen, setLanguageToggleOpen] = useState(false);
|
|
21
|
+
const baseClass = `${prefix}--header`;
|
|
22
|
+
const NavigationClasses = classNames(baseClass, {
|
|
23
|
+
[`${prefix}--mobile--open`]: toggleMenuOpen,
|
|
24
|
+
[`${prefix}--select--open`]: toggleLanguageOpen,
|
|
25
|
+
[`${prefix}--search--open`]: toggleSearchOpen,
|
|
26
|
+
[`${prefix}--subnav--open`]: toggleSubnavOpen,
|
|
27
|
+
});
|
|
28
|
+
const handleMenuToggle = () => {
|
|
29
|
+
setMenuToggleOpen(!toggleMenuOpen);
|
|
30
|
+
};
|
|
31
|
+
const handleLanguageToggle = () => {
|
|
32
|
+
setLanguageToggleOpen(!toggleLanguageOpen);
|
|
33
|
+
};
|
|
34
|
+
const handleSearchToggle = () => {
|
|
35
|
+
setSearchToggleOpen(!toggleSearchOpen);
|
|
36
|
+
};
|
|
37
|
+
const handleSubnavToggle = () => {
|
|
38
|
+
setSubnavToggleOpen(!toggleSubnavOpen);
|
|
39
|
+
};
|
|
40
|
+
return (jsxs("header", Object.assign({ className: NavigationClasses }, { children: [jsx("div", Object.assign({ className: `${baseClass}--utility-bar` }, { children: jsx("div", Object.assign({ className: `${prefix}--language-switcher` }, { children: jsxs("div", Object.assign({ className: `${prefix}--language-switcher--wrap` }, { children: [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("div", Object.assign({ className: `${baseClass}--logo-bar` }, { children: jsxs("div", Object.assign({ className: `${baseClass}--inner` }, { children: [jsx("a", Object.assign({ href: siteurl, className: `${baseClass}--logo-link` }, { children: jsx("img", { className: `${baseClass}--logo`, src: logo, alt: "ILO Logo" }) })), jsxs("p", Object.assign({ className: `${baseClass}--logo-tagline` }, { children: [tagline === null || tagline === void 0 ? void 0 : tagline.tag, jsx("span", Object.assign({ className: `${baseClass}--logo-tagline--small` }, { children: tagline === null || tagline === void 0 ? void 0 : tagline.small }))] })), jsx("button", Object.assign({ className: `${baseClass}--menu`, onClick: handleMenuToggle }, { children: menulabel }))] })) })), jsxs("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("a", Object.assign({ href: siteurl, className: `${baseClass}--logo-link` }, { children: jsx("img", { className: `${baseClass}--logo`, src: mobilelogo, alt: "ILO Logo" }) })), jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: menucloselabel }))] })), jsx("div", Object.assign({ className: `${prefix}--mobile--nav--search` }, { children: jsx(SearchField, { input: searchfield === null || searchfield === void 0 ? void 0 : searchfield.input, action: searchfield === null || searchfield === void 0 ? void 0 : searchfield.action }) })), 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", Object.assign({ className: `${prefix}--mobile--subnav--back`, onClick: handleLanguageToggle, type: "button" }, { children: subnav === null || subnav === void 0 ? void 0 : subnav.mobilebacklabel })), jsx("button", Object.assign({ className: `${baseClass}--menu--close`, onClick: handleMenuToggle }, { children: subnav === null || subnav === void 0 ? void 0 : subnav.mobilecloselabel })), 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) &&
|
|
41
|
+
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 })), jsxs("ul", Object.assign({ className: `${prefix}--nav--set` }, { children: [(primarynav === null || primarynav === void 0 ? void 0 : primarynav.items) &&
|
|
42
|
+
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))), subnav && (jsx("li", Object.assign({ className: `${prefix}--nav--items` }, { children: jsx("button", Object.assign({ className: `${prefix}--nav--trigger`, onClick: handleSubnavToggle }, { children: subnav.buttonlabel })) })))] }))] })), jsx("div", Object.assign({ className: `${prefix}--search` }, { children: jsx("button", Object.assign({ className: `${prefix}--search--button`, type: "button", onClick: handleSearchToggle }, { children: searchlabel })) }))] })), subnav && (jsx("nav", Object.assign({ className: `${prefix}--subnav`, "aria-labelledby": "secondary-navigation" }, { children: jsxs("div", Object.assign({ className: `${prefix}--subnav--inner` }, { children: [jsx("div", Object.assign({ className: `${prefix}--mobile--subnav` }, { children: jsxs("div", Object.assign({ className: `${prefix}--mobile--subnav--menu` }, { children: [jsx("button", Object.assign({ className: `${prefix}--mobile--subnav--back`, onClick: handleSubnavToggle, type: "button" }, { children: subnav.mobilebacklabel })), jsx("button", Object.assign({ className: `${prefix}--header--menu--close`, onClick: handleMenuToggle }, { children: subnav.mobilecloselabel })), jsx("h6", Object.assign({ className: `${prefix}--mobile--subnav--label` }, { children: subnav.buttonlabel }))] })) })), jsx("h2", Object.assign({ className: `${prefix}--nav--label`, id: "secondary-navigation" }, { children: subnav.navlabel })), jsx("ul", Object.assign({ className: `${prefix}--subnav--set` }, { children: (subnav === null || subnav === void 0 ? void 0 : subnav.items) &&
|
|
43
|
+
subnav.items.map((item, index) => (jsx("li", Object.assign({ className: `${prefix}--subnav--items` }, { children: jsx("a", Object.assign({ href: item.url, className: `${prefix}--subnav--link` }, { children: item.label })) }), index))) }))] })) }))), jsx("div", Object.assign({ className: `${prefix}--search-box` }, { children: jsx("div", Object.assign({ className: `${prefix}--header--inner` }, { children: jsx(SearchField, { input: searchfield === null || searchfield === void 0 ? void 0 : searchfield.input, action: searchfield === null || searchfield === void 0 ? void 0 : searchfield.action }) })) }))] }))] })));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { Navigation as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { default as Navigation } from './Navigation.js';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../../hooks/useGlobalSettings.js';
|
|
5
|
+
import 'tslib';
|
|
6
|
+
import '../../GlobalCtx-7fb23cfa.js';
|
|
7
|
+
import '../ContextMenu/ContextMenu.js';
|
|
8
|
+
import 'classnames';
|
|
9
|
+
import '../SearchField/SearchField.js';
|
|
10
|
+
import '../Input/Input.js';
|
|
11
|
+
import '../Fieldset/Fieldset.js';
|
|
12
|
+
import '../Tooltip/Tooltip.js';
|
|
13
|
+
import 'react-dom';
|
|
14
|
+
import '../FormElement/FormElement.js';
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import useGlobalSettings from '../../hooks/useGlobalSettings.js';
|
|
4
|
-
import VideoPlayer from '
|
|
4
|
+
import { V as VideoPlayer } from '../../VideoPlayer-62e0ce79.js';
|
|
5
5
|
import 'tslib';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
8
|
-
import '../../_commonjsHelpers-849bcf65.js';
|
|
9
|
-
import '../../patterns-53247c1d.js';
|
|
10
8
|
import '../../index-8ebb2cc1.js';
|
|
11
9
|
import 'react-dom';
|
|
12
10
|
import '../../utils/hoursMinutesSeconds.js';
|