@ilo-org/react 0.3.0 → 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 +16 -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/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 +7 -1
- package/lib/cjs/index.js +7 -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/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 +5 -1
- package/lib/esm/index.js +5 -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/index.d.ts +1 -0
- package/lib/types/react/src/types/index.d.ts +6 -0
- package/package.json +17 -17
- 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/index.ts +1 -0
- package/src/types/index.ts +14 -0
|
@@ -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');
|
|
@@ -53,6 +53,8 @@ var components_TableOfContents_TableOfContents = require('./TableOfContents/Tabl
|
|
|
53
53
|
var components_Footer_Footer = require('./Footer/Footer.js');
|
|
54
54
|
var components_LocalNav_LocalNav = require('./LocalNav/LocalNav.js');
|
|
55
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');
|
|
56
58
|
require('../hooks/useGlobalSettings.js');
|
|
57
59
|
require('../AccordionCtx-fe08ff45.js');
|
|
58
60
|
require('@ilo-org/utils');
|
|
@@ -65,10 +67,12 @@ require('../css-9c93400b.js');
|
|
|
65
67
|
require('../utils/transitionEndListener.js');
|
|
66
68
|
require('../utils/triggerBrowserReflow.js');
|
|
67
69
|
require('./Hero/HeroCard.js');
|
|
68
|
-
require('../VideoPlayer-
|
|
70
|
+
require('../VideoPlayer-874a52b0.js');
|
|
69
71
|
require('../utils/hoursMinutesSeconds.js');
|
|
70
72
|
require('screenfull');
|
|
71
73
|
require('@ilo-org/icons-react');
|
|
74
|
+
require('./Logo/Logo.js');
|
|
75
|
+
require('./List/ListItem.js');
|
|
72
76
|
|
|
73
77
|
|
|
74
78
|
|
|
@@ -117,3 +121,5 @@ exports.TableOfContents = components_TableOfContents_TableOfContents;
|
|
|
117
121
|
exports.Footer = components_Footer_Footer;
|
|
118
122
|
exports.LocalNav = components_LocalNav_LocalNav;
|
|
119
123
|
exports.Navigation = components_Navigation_Navigation;
|
|
124
|
+
exports.Card = components_Card_Card;
|
|
125
|
+
exports.CardGroup = components_Card_CardGroup;
|
package/lib/cjs/index.js
CHANGED
|
@@ -53,6 +53,8 @@ var components_TableOfContents_TableOfContents = require('./components/TableOfCo
|
|
|
53
53
|
var components_Footer_Footer = require('./components/Footer/Footer.js');
|
|
54
54
|
var components_LocalNav_LocalNav = require('./components/LocalNav/LocalNav.js');
|
|
55
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');
|
|
56
58
|
require('./hooks/useGlobalSettings.js');
|
|
57
59
|
require('./AccordionCtx-fe08ff45.js');
|
|
58
60
|
require('@ilo-org/utils');
|
|
@@ -65,10 +67,12 @@ require('./css-9c93400b.js');
|
|
|
65
67
|
require('./utils/transitionEndListener.js');
|
|
66
68
|
require('./utils/triggerBrowserReflow.js');
|
|
67
69
|
require('./components/Hero/HeroCard.js');
|
|
68
|
-
require('./VideoPlayer-
|
|
70
|
+
require('./VideoPlayer-874a52b0.js');
|
|
69
71
|
require('./utils/hoursMinutesSeconds.js');
|
|
70
72
|
require('screenfull');
|
|
71
73
|
require('@ilo-org/icons-react');
|
|
74
|
+
require('./components/Logo/Logo.js');
|
|
75
|
+
require('./components/List/ListItem.js');
|
|
72
76
|
|
|
73
77
|
|
|
74
78
|
|
|
@@ -117,3 +121,5 @@ exports.TableOfContents = components_TableOfContents_TableOfContents;
|
|
|
117
121
|
exports.Footer = components_Footer_Footer;
|
|
118
122
|
exports.LocalNav = components_LocalNav_LocalNav;
|
|
119
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
|
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useRef, useState, useEffect } from 'react';
|
|
4
|
+
import useGlobalSettings from '../../hooks/useGlobalSettings.js';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import '../../GlobalCtx-7fb23cfa.js';
|
|
7
|
+
|
|
8
|
+
const isOverflown = ({ clientHeight, clientWidth, scrollHeight, scrollWidth, }) => scrollHeight > clientHeight || scrollWidth > clientWidth;
|
|
9
|
+
const getFullFontSize = (container, { maxSize = 600, startingHeight = 9, step = 0.5 }) => {
|
|
10
|
+
let i = startingHeight;
|
|
11
|
+
let overflow = false;
|
|
12
|
+
while (!overflow && i < maxSize) {
|
|
13
|
+
container.style.fontSize = `${i}px`;
|
|
14
|
+
container.style.lineHeight = `${i}px`;
|
|
15
|
+
overflow = isOverflown(container);
|
|
16
|
+
if (!overflow) {
|
|
17
|
+
i = i + step;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
// Reset styles to the way they were
|
|
21
|
+
container.style.fontSize = "";
|
|
22
|
+
container.style.lineHeight = "";
|
|
23
|
+
// Return the ideal font size
|
|
24
|
+
return i - step;
|
|
25
|
+
};
|
|
26
|
+
const BaseLogo = (_a) => {
|
|
27
|
+
var { baseClass, className, subbrand, alt, src, style: userStyles, size = "fluid", theme = "light" } = _a, props = __rest(_a, ["baseClass", "className", "subbrand", "alt", "src", "style", "size", "theme"]);
|
|
28
|
+
// The logo image element
|
|
29
|
+
const imageRef = useRef(null);
|
|
30
|
+
// The lockup container
|
|
31
|
+
const lockupRef = useRef(null);
|
|
32
|
+
// The lockup text
|
|
33
|
+
const lockupTextRef = useRef(null);
|
|
34
|
+
// Has the image loaded or not
|
|
35
|
+
const [imageLoaded, setImageLoaded] = useState(false);
|
|
36
|
+
// Dynamic height of the image
|
|
37
|
+
const [imageHeight, setImageHeight] = useState(0);
|
|
38
|
+
// Ratio of the font size to the height of the logo image
|
|
39
|
+
const [fontSizeRatio, setfontSizeRatio] = useState(0);
|
|
40
|
+
// Is the logo visible? Default to true if not a subbrand
|
|
41
|
+
const [isLogoVisible, setIsLogoVisible] = useState(!subbrand);
|
|
42
|
+
// Initial height of the image when it's loaded
|
|
43
|
+
const initialImageHeight = useRef(null);
|
|
44
|
+
// Resize observer gets the initial height of the image when
|
|
45
|
+
// it loads and updates the height when it changes in state
|
|
46
|
+
const observer = useRef(new ResizeObserver((entries) => {
|
|
47
|
+
const { height } = entries[0].contentRect;
|
|
48
|
+
if (!initialImageHeight.current) {
|
|
49
|
+
initialImageHeight.current = height;
|
|
50
|
+
}
|
|
51
|
+
setImageHeight(height);
|
|
52
|
+
}));
|
|
53
|
+
// Make the logo visible for subrand when everything is ready
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (subbrand && imageLoaded && fontSizeRatio) {
|
|
56
|
+
setIsLogoVisible(true);
|
|
57
|
+
}
|
|
58
|
+
}, [imageLoaded, fontSizeRatio, subbrand]);
|
|
59
|
+
// Set up the Resize observer to watch the image
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (imageLoaded && lockupRef.current && imageRef.current) {
|
|
62
|
+
const imageEl = imageRef.current;
|
|
63
|
+
observer.current.observe(imageEl);
|
|
64
|
+
return () => observer.current.unobserve(imageEl);
|
|
65
|
+
}
|
|
66
|
+
}, [imageLoaded]);
|
|
67
|
+
// Gets the font size necessary for the lockup text to fill the
|
|
68
|
+
// the lockup container as much as possible without overflowing.
|
|
69
|
+
// Then gets the ratio of full font size to image height which will
|
|
70
|
+
// be used to calculate the font size if the image gets resized
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
setFontSize();
|
|
73
|
+
}, [imageLoaded, initialImageHeight.current]);
|
|
74
|
+
// Adjust the font size if for some weird reason the subbrand changes
|
|
75
|
+
// This is mostly just to illustrate how the component works on Storybook
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
setFontSize();
|
|
78
|
+
}, [subbrand]);
|
|
79
|
+
function setFontSize() {
|
|
80
|
+
if (lockupRef.current &&
|
|
81
|
+
lockupTextRef.current &&
|
|
82
|
+
initialImageHeight.current) {
|
|
83
|
+
const fullFontSize = getFullFontSize(lockupRef.current, {
|
|
84
|
+
maxSize: initialImageHeight.current,
|
|
85
|
+
});
|
|
86
|
+
const ratio = fullFontSize / initialImageHeight.current;
|
|
87
|
+
setfontSizeRatio(ratio);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// Has the image loaded or not
|
|
91
|
+
function handleImageLoaded() {
|
|
92
|
+
setImageLoaded(true);
|
|
93
|
+
}
|
|
94
|
+
// Conditions for different CSS classes
|
|
95
|
+
const hasSubbrand = !!subbrand;
|
|
96
|
+
const hasFluidWidth = size === "fluid";
|
|
97
|
+
const hasFixedWidth = !hasFluidWidth && typeof size === "number";
|
|
98
|
+
// Classes for the outer figure container
|
|
99
|
+
const subBrandClass = `${baseClass}--sub-brand`;
|
|
100
|
+
const fluidWidthClass = `${baseClass}--size--fluid`;
|
|
101
|
+
const visibilityHidden = `${baseClass}--visibility--hidden`;
|
|
102
|
+
// Outer figure classes
|
|
103
|
+
const classNames$1 = classNames(baseClass, className, `${baseClass}--theme--${theme}`, {
|
|
104
|
+
[visibilityHidden]: !isLogoVisible,
|
|
105
|
+
[fluidWidthClass]: hasFluidWidth,
|
|
106
|
+
[subBrandClass]: hasSubbrand,
|
|
107
|
+
});
|
|
108
|
+
// Classes for the image element
|
|
109
|
+
const noSubBrandImageClass = `${baseClass}--image`;
|
|
110
|
+
const subBrandImageClass = `${subBrandClass}--image`;
|
|
111
|
+
// Set inline CSS including variables on the outer figure element
|
|
112
|
+
const getStyle = () => {
|
|
113
|
+
const conditionalStyles = {};
|
|
114
|
+
// Add CSS vars if this is a sub-brand
|
|
115
|
+
if (hasSubbrand) {
|
|
116
|
+
conditionalStyles["--logo-image-height"] = `${imageHeight}px`;
|
|
117
|
+
conditionalStyles["--logo-font-size"] = `${fontSizeRatio * imageHeight}px`;
|
|
118
|
+
}
|
|
119
|
+
// Add fixed width if it has fixed width
|
|
120
|
+
if (hasFixedWidth) {
|
|
121
|
+
conditionalStyles.width = `${size}px`;
|
|
122
|
+
}
|
|
123
|
+
// User styles may be overriden
|
|
124
|
+
return Object.assign({ userStyles }, conditionalStyles);
|
|
125
|
+
};
|
|
126
|
+
const getImageSrc = () => {
|
|
127
|
+
if (typeof src === "string") {
|
|
128
|
+
return src;
|
|
129
|
+
}
|
|
130
|
+
return src[theme];
|
|
131
|
+
};
|
|
132
|
+
return (jsxs("figure", Object.assign({ className: classNames$1, style: getStyle() }, { children: [jsx("img", Object.assign({ ref: imageRef, alt: alt, src: getImageSrc(), className: classNames({
|
|
133
|
+
[subBrandImageClass]: hasSubbrand,
|
|
134
|
+
[noSubBrandImageClass]: !hasSubbrand,
|
|
135
|
+
}), onLoad: handleImageLoaded }, props)), hasSubbrand && (jsxs("div", Object.assign({ ref: lockupRef, className: `${subBrandClass}--lock-up` }, { children: [jsx("span", { className: `${subBrandClass}--lock-up--separator` }), jsx("span", Object.assign({ ref: lockupTextRef }, { children: subbrand }))] })))] })));
|
|
136
|
+
};
|
|
137
|
+
const Logo = (_a) => {
|
|
138
|
+
var { className, url, target, style, size } = _a, props = __rest(_a, ["className", "url", "target", "style", "size"]);
|
|
139
|
+
const { prefix } = useGlobalSettings();
|
|
140
|
+
const baseClass = `${prefix}--logo`;
|
|
141
|
+
const linkClass = `${baseClass}--link`;
|
|
142
|
+
const fluidClass = `${baseClass}--size--fluid`;
|
|
143
|
+
if (url) {
|
|
144
|
+
return (jsx("a", Object.assign({ href: url, target: target, className: classNames(linkClass, className, {
|
|
145
|
+
[fluidClass]: size === "fluid",
|
|
146
|
+
}), style: style }, { children: jsx(BaseLogo, Object.assign({}, props, { baseClass: baseClass, size: size })) })));
|
|
147
|
+
}
|
|
148
|
+
return (jsx(BaseLogo, Object.assign({ baseClass: baseClass, className: className, style: style, size: size }, props)));
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export { Logo as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { V as VideoPlayer } from '../../VideoPlayer-
|
|
4
|
+
import { V as VideoPlayer } from '../../VideoPlayer-719076c4.js';
|
|
5
5
|
import 'tslib';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
@@ -5,7 +5,7 @@ import '../../hooks/useGlobalSettings.js';
|
|
|
5
5
|
import 'tslib';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
8
|
-
import '../../VideoPlayer-
|
|
8
|
+
import '../../VideoPlayer-719076c4.js';
|
|
9
9
|
import '../../index-8ebb2cc1.js';
|
|
10
10
|
import 'react-dom';
|
|
11
11
|
import '../../utils/hoursMinutesSeconds.js';
|