@oaknational/oak-components 3.3.0 → 3.3.2
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/dist/npm/cjs/index.js
CHANGED
|
@@ -5236,7 +5236,7 @@ var OakQuizFeedback = function (_a) {
|
|
|
5236
5236
|
/**
|
|
5237
5237
|
* `content-box` ensures that the border is not subtracted from the height of the element
|
|
5238
5238
|
*/
|
|
5239
|
-
var StyledOakFlex$1 = styled__default.default(OakFlex)(templateObject_1$D || (templateObject_1$D = tslib.__makeTemplateObject(["\n box-sizing: content-box;\n"], ["\n box-sizing: content-box;\n"])));
|
|
5239
|
+
var StyledOakFlex$1 = styled__default.default(OakFlex)(templateObject_1$D || (templateObject_1$D = tslib.__makeTemplateObject(["\n box-sizing: content-box;\n @media (min-aspect-ratio: 1/1) {\n flex-direction: row;\n }\n"], ["\n box-sizing: content-box;\n @media (min-aspect-ratio: 1/1) {\n flex-direction: row;\n }\n"])));
|
|
5240
5240
|
/**
|
|
5241
5241
|
* Renders feedback for an answer and onward navigation buttons to continue the lesson
|
|
5242
5242
|
*/
|
|
@@ -7557,8 +7557,8 @@ function OakVideo(_a) {
|
|
|
7557
7557
|
var hasButtonsEnabled = transcriptEnabled || showCopyLink || showSignLanguage;
|
|
7558
7558
|
return (React__default.default.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-24" },
|
|
7559
7559
|
React__default.default.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-24", "$ba": "border-solid-m", "$borderColor": "border-primary" },
|
|
7560
|
-
React__default.default.createElement(OakBox, { "$aspectRatio": "
|
|
7561
|
-
React__default.default.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-8", "$display": !
|
|
7560
|
+
React__default.default.createElement(OakBox, { "$aspectRatio": "16/9" }, videoSlot)),
|
|
7561
|
+
React__default.default.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-8", "$display": !heading && !body ? "none" : undefined },
|
|
7562
7562
|
heading && (React__default.default.createElement(OakHeading, { tag: headingTag, "$color": "text-primary", "$font": ["heading-5", "heading-4", "heading-4"] }, heading)),
|
|
7563
7563
|
body && (React__default.default.createElement(OakP, { "$color": "text-primary", "$font": ["body-2", "body-1", "body-1"] }, body))),
|
|
7564
7564
|
hasButtonsEnabled && (React__default.default.createElement(OakFlex, { "$flexDirection": "row", "$gap": ["spacing-16"], "$flexWrap": ["wrap", "nowrap", "nowrap"] },
|
|
@@ -7570,7 +7570,7 @@ function OakVideo(_a) {
|
|
|
7570
7570
|
React__default.default.createElement(OakSmallSecondaryButton, { isTrailingIcon: true, onClick: onCopyLink, iconName: "copy" }, "Copy link"))),
|
|
7571
7571
|
showSignLanguage && (React__default.default.createElement(OakFlex, { "$order": ["1", "3", "3"], "$width": ["100%", "auto", "auto"] },
|
|
7572
7572
|
React__default.default.createElement(OakSmallSecondaryButton, { isTrailingIcon: true, onClick: onShowSignLanguage, iconName: "sign-language" }, "Show sign language"))))),
|
|
7573
|
-
transcriptEnabled && (React__default.default.createElement(OakFlex, { "data-testid": "oak-video-transcript-container", id: transcriptId, "$display": !isTranscriptOpen ? "none" : undefined, "$height": "spacing-360", "$background": "bg-neutral-stronger", "$pa": "spacing-16", "$borderRadius": "border-radius-s", "$gap": "spacing-32" },
|
|
7573
|
+
transcriptEnabled && (React__default.default.createElement(OakFlex, { "data-testid": "oak-video-transcript-container", id: transcriptId, "$display": !isTranscriptOpen ? "none" : undefined, "$height": "spacing-360", "$background": "bg-neutral-stronger", "$pa": "spacing-16", "$borderRadius": "border-radius-s", "$gap": "spacing-32", "$flexDirection": "column" },
|
|
7574
7574
|
React__default.default.createElement(OakFlex, { "$gap": "spacing-8", "$overflowY": "auto", "$flexDirection": "column" }, transcript.map(function (transcriptLine, transcriptIndex) {
|
|
7575
7575
|
return (React__default.default.createElement(OakP, { key: transcriptIndex, "$font": "body-1" }, transcriptLine));
|
|
7576
7576
|
}))))));
|
|
@@ -8,7 +8,7 @@ import { OakFlex } from '../../../../layout-and-structure/OakFlex/OakFlex.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* `content-box` ensures that the border is not subtracted from the height of the element
|
|
10
10
|
*/
|
|
11
|
-
var StyledOakFlex = styled(OakFlex)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-sizing: content-box;\n"], ["\n box-sizing: content-box;\n"])));
|
|
11
|
+
var StyledOakFlex = styled(OakFlex)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-sizing: content-box;\n @media (min-aspect-ratio: 1/1) {\n flex-direction: row;\n }\n"], ["\n box-sizing: content-box;\n @media (min-aspect-ratio: 1/1) {\n flex-direction: row;\n }\n"])));
|
|
12
12
|
/**
|
|
13
13
|
* Renders feedback for an answer and onward navigation buttons to continue the lesson
|
|
14
14
|
*/
|
|
@@ -35,8 +35,8 @@ function OakVideo(_a) {
|
|
|
35
35
|
var hasButtonsEnabled = transcriptEnabled || showCopyLink || showSignLanguage;
|
|
36
36
|
return (React.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-24" },
|
|
37
37
|
React.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-24", "$ba": "border-solid-m", "$borderColor": "border-primary" },
|
|
38
|
-
React.createElement(OakBox, { "$aspectRatio": "
|
|
39
|
-
React.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-8", "$display": !
|
|
38
|
+
React.createElement(OakBox, { "$aspectRatio": "16/9" }, videoSlot)),
|
|
39
|
+
React.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-8", "$display": !heading && !body ? "none" : undefined },
|
|
40
40
|
heading && (React.createElement(OakHeading, { tag: headingTag, "$color": "text-primary", "$font": ["heading-5", "heading-4", "heading-4"] }, heading)),
|
|
41
41
|
body && (React.createElement(OakP, { "$color": "text-primary", "$font": ["body-2", "body-1", "body-1"] }, body))),
|
|
42
42
|
hasButtonsEnabled && (React.createElement(OakFlex, { "$flexDirection": "row", "$gap": ["spacing-16"], "$flexWrap": ["wrap", "nowrap", "nowrap"] },
|
|
@@ -48,7 +48,7 @@ function OakVideo(_a) {
|
|
|
48
48
|
React.createElement(OakSmallSecondaryButton, { isTrailingIcon: true, onClick: onCopyLink, iconName: "copy" }, "Copy link"))),
|
|
49
49
|
showSignLanguage && (React.createElement(OakFlex, { "$order": ["1", "3", "3"], "$width": ["100%", "auto", "auto"] },
|
|
50
50
|
React.createElement(OakSmallSecondaryButton, { isTrailingIcon: true, onClick: onShowSignLanguage, iconName: "sign-language" }, "Show sign language"))))),
|
|
51
|
-
transcriptEnabled && (React.createElement(OakFlex, { "data-testid": "oak-video-transcript-container", id: transcriptId, "$display": !isTranscriptOpen ? "none" : undefined, "$height": "spacing-360", "$background": "bg-neutral-stronger", "$pa": "spacing-16", "$borderRadius": "border-radius-s", "$gap": "spacing-32" },
|
|
51
|
+
transcriptEnabled && (React.createElement(OakFlex, { "data-testid": "oak-video-transcript-container", id: transcriptId, "$display": !isTranscriptOpen ? "none" : undefined, "$height": "spacing-360", "$background": "bg-neutral-stronger", "$pa": "spacing-16", "$borderRadius": "border-radius-s", "$gap": "spacing-32", "$flexDirection": "column" },
|
|
52
52
|
React.createElement(OakFlex, { "$gap": "spacing-8", "$overflowY": "auto", "$flexDirection": "column" }, transcript.map(function (transcriptLine, transcriptIndex) {
|
|
53
53
|
return (React.createElement(OakP, { key: transcriptIndex, "$font": "body-1" }, transcriptLine));
|
|
54
54
|
}))))));
|