@ilo-org/react 0.1.2 → 0.2.1

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/lib/cjs/{DailyMotion-4f88e10b.js → DailyMotion-2aa7f048.js} +4 -5
  3. package/lib/cjs/{Facebook-d993b91c.js → Facebook-87e24af8.js} +4 -5
  4. package/lib/cjs/{FilePlayer-8272a6ea.js → FilePlayer-e1216cc8.js} +4 -5
  5. package/lib/cjs/{Kaltura-fbd2c46f.js → Kaltura-a673a8e9.js} +4 -5
  6. package/lib/cjs/{Mixcloud-2b4ffb85.js → Mixcloud-f9575c31.js} +4 -5
  7. package/lib/cjs/{Preview-8238ea6e.js → Preview-468c3a7f.js} +2 -2
  8. package/lib/cjs/{SoundCloud-356fd92d.js → SoundCloud-7c59f293.js} +4 -5
  9. package/lib/cjs/{Streamable-407ca855.js → Streamable-83e516e5.js} +4 -5
  10. package/lib/cjs/{Twitch-ca00faaf.js → Twitch-fdfa1c77.js} +4 -5
  11. package/lib/cjs/VideoPlayer-9ce35136.js +2059 -0
  12. package/lib/cjs/{Vidyard-9d037503.js → Vidyard-096bba3c.js} +4 -5
  13. package/lib/cjs/{Vimeo-6898bfd9.js → Vimeo-2cb7476f.js} +4 -5
  14. package/lib/cjs/{Wistia-ed77bf25.js → Wistia-5e830ac8.js} +4 -5
  15. package/lib/cjs/{YouTube-909bd761.js → YouTube-25a1d9a0.js} +4 -5
  16. package/lib/cjs/components/Footer/Footer.js +23 -0
  17. package/lib/cjs/components/Footer/index.js +18 -0
  18. package/lib/cjs/components/LocalNav/LocalNav.js +102 -0
  19. package/lib/cjs/components/LocalNav/index.js +14 -0
  20. package/lib/cjs/components/Video/Video.js +2 -4
  21. package/lib/cjs/components/Video/VideoPlayer.js +10 -1445
  22. package/lib/cjs/components/Video/index.js +1 -3
  23. package/lib/cjs/components/index.js +6 -4
  24. package/lib/cjs/index.js +5 -3
  25. package/lib/esm/{DailyMotion-9a7aeab5.js → DailyMotion-66b6eff2.js} +1 -2
  26. package/lib/esm/{Facebook-eb35da52.js → Facebook-dbd1003d.js} +1 -2
  27. package/lib/esm/{FilePlayer-22314795.js → FilePlayer-617ed2ce.js} +1 -2
  28. package/lib/esm/{Kaltura-b97bb455.js → Kaltura-bbcec33d.js} +1 -2
  29. package/lib/esm/{Mixcloud-41d6dc0b.js → Mixcloud-a681ec69.js} +1 -2
  30. package/lib/esm/{Preview-6d2a6792.js → Preview-407cc648.js} +1 -1
  31. package/lib/esm/{SoundCloud-0fac2e7a.js → SoundCloud-16e78ee5.js} +1 -2
  32. package/lib/esm/{Streamable-46f19a16.js → Streamable-ecb225c1.js} +1 -2
  33. package/lib/esm/{Twitch-1be39438.js → Twitch-8d1b6769.js} +1 -2
  34. package/lib/esm/VideoPlayer-62e0ce79.js +2054 -0
  35. package/lib/esm/{Vidyard-6185c490.js → Vidyard-57e2834a.js} +1 -2
  36. package/lib/esm/{Vimeo-a807e7e1.js → Vimeo-faa058a2.js} +1 -2
  37. package/lib/esm/{Wistia-eef03ce2.js → Wistia-24fb5120.js} +1 -2
  38. package/lib/esm/{YouTube-e030042e.js → YouTube-01b3e51f.js} +1 -2
  39. package/lib/esm/components/Footer/Footer.js +21 -0
  40. package/lib/esm/components/Footer/index.js +12 -0
  41. package/lib/esm/components/LocalNav/LocalNav.js +100 -0
  42. package/lib/esm/components/LocalNav/index.js +8 -0
  43. package/lib/esm/components/Video/Video.js +1 -3
  44. package/lib/esm/components/Video/VideoPlayer.js +9 -1448
  45. package/lib/esm/components/Video/index.js +1 -3
  46. package/lib/esm/components/index.js +4 -4
  47. package/lib/esm/index.js +3 -3
  48. package/lib/types/react/src/components/ContextMenu/ContextMenu.props.d.ts +1 -2
  49. package/lib/types/react/src/components/Footer/Footer.d.ts +4 -0
  50. package/lib/types/react/src/components/Footer/Footer.props.d.ts +70 -0
  51. package/lib/types/react/src/components/Footer/index.d.ts +1 -0
  52. package/lib/types/react/src/components/LinkList/LinkList.props.d.ts +2 -3
  53. package/lib/types/react/src/components/LocalNav/LocalNav.d.ts +4 -0
  54. package/lib/types/react/src/components/LocalNav/LocalNav.props.d.ts +50 -0
  55. package/lib/types/react/src/components/LocalNav/index.d.ts +1 -0
  56. package/lib/types/react/src/components/index.d.ts +2 -0
  57. package/lib/types/react/src/types/index.d.ts +1 -0
  58. package/package.json +4 -4
  59. package/src/components/ContextMenu/ContextMenu.props.ts +1 -1
  60. package/src/components/Footer/Footer.args.ts +105 -0
  61. package/src/components/Footer/Footer.props.ts +84 -0
  62. package/src/components/Footer/Footer.tsx +107 -0
  63. package/src/components/Footer/index.ts +1 -0
  64. package/src/components/LinkList/LinkList.props.ts +2 -2
  65. package/src/components/LocalNav/LocalNav.args.ts +64 -0
  66. package/src/components/LocalNav/LocalNav.props.ts +60 -0
  67. package/src/components/LocalNav/LocalNav.tsx +175 -0
  68. package/src/components/LocalNav/index.ts +1 -0
  69. package/src/components/index.ts +2 -0
  70. package/src/types/index.ts +1 -0
  71. package/lib/cjs/_commonjsHelpers-9f9f50a8.js +0 -39
  72. package/lib/cjs/patterns-975adf3c.js +0 -579
  73. package/lib/esm/_commonjsHelpers-849bcf65.js +0 -35
  74. package/lib/esm/patterns-53247c1d.js +0 -575
@@ -1,6 +1,5 @@
1
- import { a as getDefaultExportFromCjs } from './_commonjsHelpers-849bcf65.js';
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 { a as getDefaultExportFromCjs } from './_commonjsHelpers-849bcf65.js';
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 { a as getDefaultExportFromCjs } from './_commonjsHelpers-849bcf65.js';
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 { a as getDefaultExportFromCjs } from './_commonjsHelpers-849bcf65.js';
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,21 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
+ import useGlobalSettings from '../../hooks/useGlobalSettings.js';
3
+ import classNames from 'classnames';
4
+ import LinkList from '../LinkList/LinkList.js';
5
+ import Button from '../Button/Button.js';
6
+ import 'tslib';
7
+ import 'react';
8
+ import '../../GlobalCtx-7fb23cfa.js';
9
+ import '../Link/Link.js';
10
+ import '../Icon/Icon.js';
11
+ import '@ilo-org/icons-react';
12
+
13
+ const Footer = ({ className, logo, tagline, subtagline, address, linkgroup, socials, subscribe, legal, secondarylinks, anchorlink, }) => {
14
+ const { prefix } = useGlobalSettings();
15
+ const baseClass = `${prefix}--footer`;
16
+ const footerClasses = classNames(className, baseClass);
17
+ return (jsxs("footer", Object.assign({ className: footerClasses }, { children: [jsxs("div", Object.assign({ className: `${baseClass}--main` }, { children: [jsxs("div", Object.assign({ className: "site--info" }, { children: [jsx("img", { className: `${baseClass}--logo`, src: logo, alt: "ILO Logo" }), jsx("h3", Object.assign({ className: `${baseClass}--headline` }, { children: tagline })), jsx("h4", Object.assign({ className: `${baseClass}--subhead` }, { children: subtagline }))] })), address && (jsx("div", Object.assign({ className: "address" }, { children: address.map((line, i) => (jsx("p", Object.assign({ className: "address--line" }, { children: line }), i))) }))), linkgroup && (jsx("nav", Object.assign({ className: "links" }, { children: jsx(LinkList, { linkgroup: linkgroup, theme: "dark" }) }))), (socials || subscribe) && (jsxs("div", Object.assign({ className: "connect" }, { children: [socials && (jsxs(Fragment, { children: [jsx("h5", Object.assign({ className: "social--headline" }, { children: socials === null || socials === void 0 ? void 0 : socials.headline })), jsx("ul", Object.assign({ className: "social--links" }, { children: socials.links &&
18
+ socials.links.map((link, index) => (jsx("li", Object.assign({ className: "social--links--item" }, { children: jsx("a", Object.assign({ className: `social--links--link ${link.type}`, href: link.url }, { children: link.type })) }), index))) }))] })), subscribe && (jsx(Button, { label: subscribe === null || subscribe === void 0 ? void 0 : subscribe.label, url: subscribe === null || subscribe === void 0 ? void 0 : subscribe.url, type: "primary", size: "large", target: "_blank" }))] })))] })), jsxs("div", Object.assign({ className: `${baseClass}--secondary` }, { children: [jsx("div", Object.assign({ className: "legal" }, { children: legal })), secondarylinks && (jsx("nav", Object.assign({ className: "secondarylinks" }, { children: jsx("ul", Object.assign({ className: "secondarylinks--list" }, { children: secondarylinks.map((link, i) => (jsx("li", Object.assign({ className: "secondarylinks--list--item" }, { children: jsx("a", Object.assign({ href: link.url, className: "secondarylinks--list--link" }, { children: link === null || link === void 0 ? void 0 : link.label }), i) })))) })) }))), jsx("a", Object.assign({ href: anchorlink === null || anchorlink === void 0 ? void 0 : anchorlink.url, className: "anchorlink" }, { children: anchorlink === null || anchorlink === void 0 ? void 0 : anchorlink.label }))] }))] })));
19
+ };
20
+
21
+ export { Footer as default };
@@ -0,0 +1,12 @@
1
+ export { default as Footer } from './Footer.js';
2
+ import 'react/jsx-runtime';
3
+ import '../../hooks/useGlobalSettings.js';
4
+ import 'tslib';
5
+ import 'react';
6
+ import '../../GlobalCtx-7fb23cfa.js';
7
+ import 'classnames';
8
+ import '../LinkList/LinkList.js';
9
+ import '../Button/Button.js';
10
+ import '../Link/Link.js';
11
+ import '../Icon/Icon.js';
12
+ import '@ilo-org/icons-react';
@@ -0,0 +1,100 @@
1
+ import { jsx, jsxs } 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 classNames from 'classnames';
6
+ import 'tslib';
7
+ import '../../GlobalCtx-7fb23cfa.js';
8
+
9
+ var brand = {
10
+ "ilo-blue": {
11
+ value: "rgba(30, 45, 190, 1)"
12
+ },
13
+ "ilo-red": {
14
+ value: "rgba(250, 60, 75, 1)"
15
+ },
16
+ "ilo-dark-blue": {
17
+ value: "rgba(35, 0, 80, 1)"
18
+ },
19
+ "ilo-yellow": {
20
+ value: "rgba(255, 205, 45, 1)"
21
+ },
22
+ "ilo-green": {
23
+ value: "rgba(140, 225, 100, 1)"
24
+ },
25
+ "ilo-purple": {
26
+ value: "rgba(150, 10, 85, 1)"
27
+ },
28
+ "ilo-purple-light": {
29
+ value: "rgba(116, 96, 145, 1)"
30
+ },
31
+ "ilo-turquoise": {
32
+ value: "rgba(5, 210, 210, 1)"
33
+ },
34
+ "ilo-dark-red": {
35
+ value: "rgba(200, 48, 60, 1)"
36
+ },
37
+ "ilo-lighter-blue": {
38
+ value: "rgba(235, 245, 253, 1)"
39
+ },
40
+ "ilo-light-blue": {
41
+ value: "rgba(235, 245, 253, 1)"
42
+ },
43
+ "ilo-grey-light-alternate": {
44
+ value: "rgba(246, 247, 248, 1)"
45
+ },
46
+ "ilo-grey-light": {
47
+ value: "rgba(237, 240, 242, 1)"
48
+ },
49
+ "ilo-grey-ui": {
50
+ value: "rgba(184, 196, 204, 1)"
51
+ },
52
+ "ilo-grey-accessible": {
53
+ value: "rgba(109, 109, 109, 1)"
54
+ },
55
+ "ilo-grey-charcoal": {
56
+ value: "rgba(45, 45, 45, 1)"
57
+ },
58
+ "ilo-black": {
59
+ value: "rgba(45, 45, 45, 1)"
60
+ },
61
+ "ilo-white": {
62
+ value: "rgba(255, 255, 255, 1)"
63
+ },
64
+ "ilo-ramp-blue": {
65
+ value: "rgba(190, 220, 250, 1)"
66
+ },
67
+ "ilo-ramp-red": {
68
+ value: "rgba(254, 216, 219, 1)"
69
+ },
70
+ "ilo-ramp-green": {
71
+ value: "rgba(232, 249, 224, 1)"
72
+ },
73
+ "ilo-ramp-yellow": {
74
+ value: "rgba(255, 245, 200, 1)"
75
+ }
76
+ };
77
+
78
+ const LocalNav = ({ background, logo, siteurl, primarynav, mainlink, menucloselabel, languagelabel, languagecontextmenu, }) => {
79
+ const { prefix } = useGlobalSettings();
80
+ const [toggleMenuOpen, setMenuToggleOpen] = useState(false);
81
+ const [toggleLanguageOpen, setLanguageToggleOpen] = useState(false);
82
+ const baseClass = `${prefix}--header`;
83
+ const localNavClasses = classNames(baseClass, `${baseClass}--local`, {
84
+ [`${prefix}--mobile--open`]: toggleMenuOpen,
85
+ [`${prefix}--select--open`]: toggleLanguageOpen,
86
+ });
87
+ const bg = background ? background : brand["ilo-dark-blue"].value;
88
+ const handleMenuToggle = () => {
89
+ setMenuToggleOpen(!toggleMenuOpen);
90
+ };
91
+ const handleLanguageToggle = () => {
92
+ setLanguageToggleOpen(!toggleLanguageOpen);
93
+ };
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("a", Object.assign({ href: siteurl, className: `${prefix}--nav--local--logo-link` }, { children: jsx("img", { src: logo, alt: "ILO Logo", className: `${prefix}--nav--local--logo` }) })) })), jsx("ul", Object.assign({ className: `${prefix}--nav--local--set` }, { children: (primarynav === null || primarynav === void 0 ? void 0 : primarynav.items) &&
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("a", Object.assign({ href: siteurl, className: `${baseClass}--logo-link` }, { children: jsx("img", { className: `${baseClass}--logo`, src: logo, alt: "ILO Logo" }) })), 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
+ 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
+ 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
+ };
99
+
100
+ export { LocalNav as default };
@@ -0,0 +1,8 @@
1
+ export { default as LocalNav } from './LocalNav.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';
@@ -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 './VideoPlayer.js';
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';