@oaknational/oak-components 3.6.2 → 3.7.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.
- package/dist/npm/cjs/index.js +176 -163
- package/dist/npm/cjs/types.d.ts +29 -27
- package/dist/npm/es/components/{owa → messaging-and-feedback}/OakPromoTag/OakPromoTag.js +3 -3
- package/dist/npm/es/components/navigation/OakBreadcrumbs/OakBreadcrumbs.js +1 -0
- package/dist/npm/es/components/navigation/OakTabs/OakTabs.js +7 -3
- package/dist/npm/es/components/owa/OakHomepageTabButton/OakHomepageTabButton.js +1 -1
- package/dist/npm/es/components/owa/OakLinkCard/OakLinkCard.js +1 -1
- package/dist/npm/es/components/owa/OakOutlineAccordion/OakOutlineAccordion.js +1 -1
- package/dist/npm/es/components/owa/OakSubjectIcon/OakSubjectIcon.js +1 -1
- package/dist/npm/es/components/owa/pupil/OakUnitListItem/OakUnitListItem.js +1 -0
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyList/OakPupilJourneyList.js +1 -1
- package/dist/npm/es/components/owa/pupil/browse/OakPupilJourneyProgrammeOptions/OakPupilJourneyProgrammeOptions.js +1 -1
- package/dist/npm/es/components/presentational/OakVideo/OakVideo.js +19 -9
- package/dist/npm/es/index.js +2 -2
- package/dist/npm/es/types.d.ts +29 -27
- package/package.json +1 -1
- /package/dist/npm/es/components/{owa → images-and-icons}/OakHandDrawnHR/HandDrawnHRSvg.js +0 -0
- /package/dist/npm/es/components/{owa → images-and-icons}/OakHandDrawnHR/OakHandDrawnHR.js +0 -0
package/dist/npm/cjs/types.d.ts
CHANGED
|
@@ -1550,6 +1550,24 @@ type OakRoundIconProps = IconProps | ImageProps;
|
|
|
1550
1550
|
*/
|
|
1551
1551
|
declare const OakRoundIcon: ({ $background, $borderRadius, $width, $height, $pa, className, ...rest }: OakRoundIconProps) => React$1.JSX.Element;
|
|
1552
1552
|
|
|
1553
|
+
type InternalStyledSvgProps = {
|
|
1554
|
+
$fill?: ResponsiveValues<OakUiRoleToken>;
|
|
1555
|
+
$stroke?: ResponsiveValues<OakUiRoleToken>;
|
|
1556
|
+
$strokeWidth?: ResponsiveValues<OakBorderWidthToken>;
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1559
|
+
type OakHandDrawnHRProps = {
|
|
1560
|
+
hrColor?: InternalStyledSvgProps["$fill"];
|
|
1561
|
+
} & SpacingStyleProps & SizeStyleProps;
|
|
1562
|
+
/**
|
|
1563
|
+
* A Drawn HR svg inside a flex container
|
|
1564
|
+
*
|
|
1565
|
+
* use prop hrColor to change the color of the HR
|
|
1566
|
+
*
|
|
1567
|
+
* change the sizeProps of the flex container to change the size and dimentions of the HR
|
|
1568
|
+
*/
|
|
1569
|
+
declare const OakHandDrawnHR: (props: OakHandDrawnHRProps) => React$1.JSX.Element;
|
|
1570
|
+
|
|
1553
1571
|
type OakSmallSecondaryButtonWithDropdownProps = {
|
|
1554
1572
|
primaryActionText: string;
|
|
1555
1573
|
primaryActionIcon?: OakIconName;
|
|
@@ -3254,12 +3272,6 @@ type OakFocusIndicatorProps = OakBoxProps & {
|
|
|
3254
3272
|
*/
|
|
3255
3273
|
declare const OakFocusIndicator: any;
|
|
3256
3274
|
|
|
3257
|
-
type InternalStyledSvgProps = {
|
|
3258
|
-
$fill?: ResponsiveValues<OakUiRoleToken>;
|
|
3259
|
-
$stroke?: ResponsiveValues<OakUiRoleToken>;
|
|
3260
|
-
$strokeWidth?: ResponsiveValues<OakBorderWidthToken>;
|
|
3261
|
-
};
|
|
3262
|
-
|
|
3263
3275
|
type OakHandDrawnFocusUnderlineProps = {
|
|
3264
3276
|
FocusUnderlineColor?: InternalStyledSvgProps["$fill"];
|
|
3265
3277
|
} & SpacingStyleProps & SizeStyleProps;
|
|
@@ -3272,6 +3284,16 @@ type OakHandDrawnFocusUnderlineProps = {
|
|
|
3272
3284
|
*/
|
|
3273
3285
|
declare const OakHandDrawnFocusUnderline: (props: OakHandDrawnFocusUnderlineProps) => React$1.JSX.Element;
|
|
3274
3286
|
|
|
3287
|
+
type OakPromoTagProps = {
|
|
3288
|
+
width?: SizeStyleProps["$width"];
|
|
3289
|
+
display?: DisplayStyleProps["$display"];
|
|
3290
|
+
variant?: "default" | "inverted";
|
|
3291
|
+
};
|
|
3292
|
+
/**
|
|
3293
|
+
* Renders a tag with the text "New"
|
|
3294
|
+
*/
|
|
3295
|
+
declare const OakPromoTag: (props: OakPromoTagProps) => React$1.JSX.Element;
|
|
3296
|
+
|
|
3275
3297
|
type OakAnchorTargetProps = PaddingStyleProps;
|
|
3276
3298
|
/**
|
|
3277
3299
|
* * AnchorTarget is a component to enable in-page linking to a particular section
|
|
@@ -3405,6 +3427,7 @@ declare const OakSecondaryLink: OakLinkComponent;
|
|
|
3405
3427
|
|
|
3406
3428
|
type Tab<T> = {
|
|
3407
3429
|
label: T;
|
|
3430
|
+
showPromo?: boolean;
|
|
3408
3431
|
} & ({
|
|
3409
3432
|
type: "button";
|
|
3410
3433
|
} | {
|
|
@@ -4619,18 +4642,6 @@ type OakHandDrawnBoxWithIconProps = Omit<OakHandDrawnCardProps, "children"> & {
|
|
|
4619
4642
|
*/
|
|
4620
4643
|
declare const OakHandDrawnCardWithIcon: ({ iconName, iconColor, iconWidth, iconHeight, alt, $width, $height, $alignItems, $justifyContent, ...props }: OakHandDrawnBoxWithIconProps) => React$1.JSX.Element;
|
|
4621
4644
|
|
|
4622
|
-
type OakHandDrawnHRProps = {
|
|
4623
|
-
hrColor?: InternalStyledSvgProps["$fill"];
|
|
4624
|
-
} & SpacingStyleProps & SizeStyleProps;
|
|
4625
|
-
/**
|
|
4626
|
-
* A Drawn HR svg inside a flex container
|
|
4627
|
-
*
|
|
4628
|
-
* use prop hrColor to change the color of the HR
|
|
4629
|
-
*
|
|
4630
|
-
* change the sizeProps of the flex container to change the size and dimentions of the HR
|
|
4631
|
-
*/
|
|
4632
|
-
declare const OakHandDrawnHR: (props: OakHandDrawnHRProps) => React$1.JSX.Element;
|
|
4633
|
-
|
|
4634
4645
|
type OakInfoButtonProps = {
|
|
4635
4646
|
onClick: MouseEventHandler;
|
|
4636
4647
|
isOpen: boolean;
|
|
@@ -4765,15 +4776,6 @@ type OakOutlineAccordionProps = {
|
|
|
4765
4776
|
*/
|
|
4766
4777
|
declare const OakOutlineAccordion: ({ header, children, id, initialOpen, ...styleProps }: OakOutlineAccordionProps) => React$1.JSX.Element;
|
|
4767
4778
|
|
|
4768
|
-
type OakPromoTagProps = {
|
|
4769
|
-
width?: SizeStyleProps["$width"];
|
|
4770
|
-
display?: DisplayStyleProps["$display"];
|
|
4771
|
-
};
|
|
4772
|
-
/**
|
|
4773
|
-
* Renders a tag with the text "New"
|
|
4774
|
-
*/
|
|
4775
|
-
declare const OakPromoTag: (props: OakPromoTagProps) => React$1.JSX.Element;
|
|
4776
|
-
|
|
4777
4779
|
type TileItem = {
|
|
4778
4780
|
id: string;
|
|
4779
4781
|
label: string;
|
|
@@ -10,12 +10,12 @@ var StyledPromoTag = styled(OakFlex)(templateObject_1 || (templateObject_1 = __m
|
|
|
10
10
|
* Renders a tag with the text "New"
|
|
11
11
|
*/
|
|
12
12
|
var OakPromoTag = function (props) {
|
|
13
|
-
var _a = props.width, width = _a === void 0 ? ["spacing-40", "spacing-48", "spacing-56"] : _a, _b = props.display, display = _b === void 0 ? "flex" : _b;
|
|
13
|
+
var _a = props.width, width = _a === void 0 ? ["spacing-40", "spacing-48", "spacing-56"] : _a, _b = props.display, display = _b === void 0 ? "flex" : _b, _c = props.variant, variant = _c === void 0 ? "default" : _c;
|
|
14
14
|
return (React.createElement(StyledPromoTag, { "$alignItems": "center", "$justifyContent": "center", "$position": "relative", "$width": width, "$display": display },
|
|
15
|
-
React.createElement(InternalStyledSvg, { height: "100%", width: "100%", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 56 27", "$fill": "
|
|
15
|
+
React.createElement(InternalStyledSvg, { height: "100%", width: "100%", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 56 27", "$fill": variant === "default" ? "bg-inverted" : "bg-decorative5-main" },
|
|
16
16
|
React.createElement("path", { d: "M6.421 0c8.661.839 17.303.834 26.16.714a89.843 89.843 0 0 1 4.834-.013c6.333.32 12.39.317 18.506-.275 0 1.26.178 2.352 0 3.44-.276 1.38-.829 2.759-1.342 4.15-.138.354-.532.706-.808 1.06-.445.248-.63.5-.553.753 1.598 1.093-.256 2.185 0 3.277.276 1.529 1.322 3.058 1.204 4.572-.138 1.771-1.046 3.543-1.973 5.312-.288.4-1.065.792-2.309 1.169-2.288.755-4.103 1.67-11.206 1.965-9.936.417-20.953.385-30.678-.09-2.447-.12-4.38-.532-5.209-.853-1.035-.458-1.52-.929-1.44-1.4C.937 18.988-.109 14.194.01 9.4c0-2.645 1.973-5.29 3.413-7.933.237-.424 1.697-.839 3-1.468Z" })),
|
|
17
17
|
React.createElement(OakFlex, { "$position": "absolute", "$inset": "spacing-0", "$alignItems": "center", "$justifyContent": "center" },
|
|
18
|
-
React.createElement(OakSpan, { "$color": "text-promo"
|
|
18
|
+
React.createElement(OakSpan, { "$color": variant === "default" ? "text-promo" : "text-primary", "$font": ["body-3-bold", "body-3-bold", "heading-7"] }, "New"))));
|
|
19
19
|
};
|
|
20
20
|
var templateObject_1;
|
|
21
21
|
|
|
@@ -6,6 +6,7 @@ import { OakIcon } from '../../images-and-icons/OakIcon/OakIcon.js';
|
|
|
6
6
|
import '../../images-and-icons/OakImage/OakImage.js';
|
|
7
7
|
import '../../images-and-icons/OakSvg/OakSvg.js';
|
|
8
8
|
import { OakBox } from '../../layout-and-structure/OakBox/OakBox.js';
|
|
9
|
+
import '../../images-and-icons/OakHandDrawnHR/OakHandDrawnHR.js';
|
|
9
10
|
import '../../../styles/theme/color.js';
|
|
10
11
|
import '../../../styles/theme/typography.js';
|
|
11
12
|
import { parseSpacing } from '../../../styles/helpers/parseSpacing.js';
|
|
@@ -18,9 +18,10 @@ import '../../typography/OakHeading/OakHeading.js';
|
|
|
18
18
|
import { OakLI } from '../../typography/OakLI/OakLI.js';
|
|
19
19
|
import '../../typography/OakOL/OakOL.js';
|
|
20
20
|
import '../../typography/OakP/OakP.js';
|
|
21
|
-
import '../../typography/OakSpan/OakSpan.js';
|
|
21
|
+
import { OakSpan } from '../../typography/OakSpan/OakSpan.js';
|
|
22
22
|
import '../../typography/OakTypography/OakTypography.js';
|
|
23
23
|
import { OakUL } from '../../typography/OakUL/OakUL.js';
|
|
24
|
+
import { OakPromoTag } from '../../messaging-and-feedback/OakPromoTag/OakPromoTag.js';
|
|
24
25
|
|
|
25
26
|
var StyledFocusOutline = styled(OakFlex)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
26
27
|
var StyledTabButton = styled(InternalButton)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n border-radius: ", ";\n &:hover {\n color: ", ";\n background: ", ";\n }\n &:focus-visible:not(&:active) {\n box-shadow: ", ";\n ", " {\n box-shadow: ", ";\n }\n }\n"], ["\n width: 100%;\n height: 100%;\n border-radius: ", ";\n &:hover {\n color: ", ";\n background: ", ";\n }\n &:focus-visible:not(&:active) {\n box-shadow: ", ";\n ", " {\n box-shadow: ", ";\n }\n }\n"])), parseBorderRadius("border-radius-circle"), function (props) { return parseColor(props.$hoverColor); }, function (props) { return parseColor(props.$hoverBackground); }, parseDropShadow("drop-shadow-centered-grey"), StyledFocusOutline, parseDropShadow("drop-shadow-centered-lemon"));
|
|
@@ -31,7 +32,7 @@ function OakTabs(props) {
|
|
|
31
32
|
var hoverBackground = colorVariant === "black" ? "bg-btn-primary-hover" : "bg-neutral-stronger";
|
|
32
33
|
var hoverText = colorVariant === "black" ? "text-inverted" : "text-primary";
|
|
33
34
|
return (React.createElement(OakUL, { "$display": "flex", "$justifyContent": "space-around", "$height": sizeVariant === "compact" ? "spacing-40" : "spacing-56", "$background": backgroundColor, "$borderRadius": "border-radius-circle", "$gap": "spacing-8", "$pa": "spacing-8", "$alignItems": "center", "$font": sizeVariant === "compact" ? "body-3" : "heading-light-7", "$ba": "border-solid-s", "$borderColor": colorVariant === "white" ? "border-neutral-lighter" : backgroundColor }, tabs.map(function (tab) {
|
|
34
|
-
var label = tab.label, type = tab.type;
|
|
35
|
+
var label = tab.label, type = tab.type, showPromo = tab.showPromo;
|
|
35
36
|
var isSelected = activeTab === label;
|
|
36
37
|
return (React.createElement(OakLI, { "$listStyle": "none", "$width": "100%", "$height": "100%", "$display": "flex", key: label },
|
|
37
38
|
React.createElement(StyledTabButton, { element: type === "link" ? Link : undefined, href: type === "link" ? tab.href : undefined, "aria-current": type === "link" && isSelected ? "page" : undefined, "$background": isSelected ? "bg-decorative1-main" : backgroundColor, "$color": isSelected ? "text-primary" : textColor, "$hoverColor": isSelected ? "text-primary" : hoverText, "$hoverBackground": isSelected ? "bg-decorative1-main" : hoverBackground, "$ba": "border-solid-s", "$borderColor": isSelected ? "border-decorative1-stronger" : backgroundColor, onClick: function (event) {
|
|
@@ -39,7 +40,10 @@ function OakTabs(props) {
|
|
|
39
40
|
onTabClick(label, event);
|
|
40
41
|
}
|
|
41
42
|
} },
|
|
42
|
-
React.createElement(StyledFocusOutline, { "$width": "100%", "$height": "100%", "$borderRadius": "border-radius-circle", "$pa": "spacing-4", "$alignItems": "center", "$justifyContent": "center", "$whiteSpace": "nowrap" },
|
|
43
|
+
React.createElement(StyledFocusOutline, { "$width": "100%", "$height": "100%", "$borderRadius": "border-radius-circle", "$pa": "spacing-4", "$alignItems": "center", "$justifyContent": "center", "$whiteSpace": "nowrap" },
|
|
44
|
+
React.createElement(OakFlex, { "$alignItems": "center", "$gap": "spacing-8" },
|
|
45
|
+
React.createElement(OakSpan, null, label),
|
|
46
|
+
showPromo && (React.createElement(OakPromoTag, { variant: colorVariant === "black" ? "inverted" : "default" })))))));
|
|
43
47
|
})));
|
|
44
48
|
}
|
|
45
49
|
var templateObject_1, templateObject_2;
|
|
@@ -7,7 +7,7 @@ import { OakFlex } from '../../layout-and-structure/OakFlex/OakFlex.js';
|
|
|
7
7
|
import { OakIcon } from '../../images-and-icons/OakIcon/OakIcon.js';
|
|
8
8
|
import { OakSpan } from '../../typography/OakSpan/OakSpan.js';
|
|
9
9
|
import { parseColor } from '../../../styles/helpers/parseColor.js';
|
|
10
|
-
import { OakPromoTag } from '
|
|
10
|
+
import { OakPromoTag } from '../../messaging-and-feedback/OakPromoTag/OakPromoTag.js';
|
|
11
11
|
import { parseColorFilter } from '../../../styles/helpers/parseColorFilter.js';
|
|
12
12
|
import { parseDropShadow } from '../../../styles/helpers/parseDropShadow.js';
|
|
13
13
|
import { InternalStyledSvg } from '../../internal-components/InternalStyledSvg/InternalStyledSvg.js';
|
|
@@ -2,7 +2,7 @@ import { __makeTemplateObject } from 'tslib';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { OakHandDrawnCardWithIcon } from '../OakHandDrawnCardWithIcon/OakHandDrawnCardWithIcon.js';
|
|
5
|
-
import { OakPromoTag } from '
|
|
5
|
+
import { OakPromoTag } from '../../messaging-and-feedback/OakPromoTag/OakPromoTag.js';
|
|
6
6
|
import { OakFlex } from '../../layout-and-structure/OakFlex/OakFlex.js';
|
|
7
7
|
import { OakBox } from '../../layout-and-structure/OakBox/OakBox.js';
|
|
8
8
|
import { parseColor } from '../../../styles/helpers/parseColor.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __makeTemplateObject, __rest, __assign } from 'tslib';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { OakHandDrawnHR } from '
|
|
4
|
+
import { OakHandDrawnHR } from '../../images-and-icons/OakHandDrawnHR/OakHandDrawnHR.js';
|
|
5
5
|
import { InternalChevronAccordion } from '../../internal-components/InternalChevronAccordion/InternalChevronAccordion.js';
|
|
6
6
|
import { OakFlex } from '../../layout-and-structure/OakFlex/OakFlex.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { OakHandDrawnCardWithIcon } from '../OakHandDrawnCardWithIcon/OakHandDrawnCardWithIcon.js';
|
|
4
|
-
import { OakPromoTag } from '
|
|
4
|
+
import { OakPromoTag } from '../../messaging-and-feedback/OakPromoTag/OakPromoTag.js';
|
|
5
5
|
import { OakBox } from '../../layout-and-structure/OakBox/OakBox.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -13,6 +13,7 @@ import '../../../images-and-icons/OakAspectRatio/OakAspectRatio.js';
|
|
|
13
13
|
import { OakIcon } from '../../../images-and-icons/OakIcon/OakIcon.js';
|
|
14
14
|
import '../../../images-and-icons/OakImage/OakImage.js';
|
|
15
15
|
import '../../../images-and-icons/OakSvg/OakSvg.js';
|
|
16
|
+
import '../../../images-and-icons/OakHandDrawnHR/OakHandDrawnHR.js';
|
|
16
17
|
|
|
17
18
|
var FlexWithFocus = styled(OakFlex)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n animation-timing-function: ease-out;\n transition-duration: 300ms;\n outline: none;\n\n &:hover .hover-text {\n text-decoration: underline;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n"], ["\n animation-timing-function: ease-out;\n transition-duration: 300ms;\n outline: none;\n\n &:hover .hover-text {\n text-decoration: underline;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n"])), parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"));
|
|
18
19
|
var StyledUnitListItem = styled(OakFlex)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n text-align: initial;\n animation-timing-function: ease-out;\n transition-duration: 300ms;\n\n ", "\n\n ", "\n"], ["\n text-align: initial;\n animation-timing-function: ease-out;\n transition-duration: 300ms;\n\n ", "\n\n ", "\n"])), function (props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { OakFlex } from '../../../../layout-and-structure/OakFlex/OakFlex.js';
|
|
3
|
-
import { OakHandDrawnHR } from '
|
|
3
|
+
import { OakHandDrawnHR } from '../../../../images-and-icons/OakHandDrawnHR/OakHandDrawnHR.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { OakFlex } from '../../../../layout-and-structure/OakFlex/OakFlex.js';
|
|
3
|
-
import { OakHandDrawnHR } from '
|
|
3
|
+
import { OakHandDrawnHR } from '../../../../images-and-icons/OakHandDrawnHR/OakHandDrawnHR.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
@@ -35,6 +35,14 @@ function OakVideo(_a) {
|
|
|
35
35
|
var _f = __read(useState(false), 2), isTranscriptOpen = _f[0], setIsTranscriptOpen = _f[1];
|
|
36
36
|
var transcriptEnabled = showTranscript && transcript && transcript.length > 0;
|
|
37
37
|
var hasButtonsEnabled = transcriptEnabled || showCopyLink || showSignLanguage;
|
|
38
|
+
var transcriptButton = transcriptEnabled && (React.createElement(OakFlex, null,
|
|
39
|
+
React.createElement(OakSmallSecondaryButton, { isTrailingIcon: true, iconName: isTranscriptOpen ? "chevron-up" : "chevron-down", onClick: function () { return setIsTranscriptOpen(!isTranscriptOpen); }, "aria-controls": transcriptId, "aria-expanded": isTranscriptOpen },
|
|
40
|
+
isTranscriptOpen ? "Hide" : "Show",
|
|
41
|
+
" transcript")));
|
|
42
|
+
var showLinkButton = showCopyLink && (React.createElement(OakFlex, { "$flexGrow": [0, 1, 1], "$justifyContent": ["flex-start", "flex-start", "flex-start"] },
|
|
43
|
+
React.createElement(OakSmallSecondaryButton, { isTrailingIcon: true, onClick: onCopyLink, iconName: "copy" }, "Copy link")));
|
|
44
|
+
var showSignLanguageButton = showSignLanguage && (React.createElement(OakFlex, { "$width": ["auto", "auto", "auto"] },
|
|
45
|
+
React.createElement(OakSmallSecondaryButton, { isTrailingIcon: true, onClick: onShowSignLanguage, iconName: "sign-language" }, "Show sign language")));
|
|
38
46
|
return (React.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-24" },
|
|
39
47
|
React.createElement(OakFlex, { "$flexDirection": "column", "$gap": "spacing-24", "$ba": "border-solid-m", "$borderColor": "border-primary" },
|
|
40
48
|
React.createElement(OakBox, { "$aspectRatio": "16/9" }, videoSlot)),
|
|
@@ -47,15 +55,17 @@ function OakVideo(_a) {
|
|
|
47
55
|
},
|
|
48
56
|
} })),
|
|
49
57
|
!Array.isArray(body) && (React.createElement(OakP, { "$color": "text-primary", "$font": ["body-2", "body-1", "body-1"] }, body))),
|
|
50
|
-
hasButtonsEnabled && (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
hasButtonsEnabled && (
|
|
59
|
+
// Note: We have two flex containers here to allow for a different layouts while keeping tabindex correct
|
|
60
|
+
React.createElement(React.Fragment, null,
|
|
61
|
+
React.createElement(OakFlex, { "$flexDirection": "row", "$gap": ["spacing-16"], "$flexWrap": ["wrap"], "$display": ["flex", "none", "none"] },
|
|
62
|
+
showSignLanguageButton,
|
|
63
|
+
showLinkButton,
|
|
64
|
+
transcriptButton),
|
|
65
|
+
React.createElement(OakFlex, { "$flexDirection": "row", "$gap": ["spacing-16"], "$display": ["none", "flex", "flex"] },
|
|
66
|
+
transcriptButton,
|
|
67
|
+
showLinkButton,
|
|
68
|
+
showSignLanguageButton))),
|
|
59
69
|
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" },
|
|
60
70
|
React.createElement(OakFlex, { "$gap": "spacing-8", "$overflowY": "auto", "$flexDirection": "column" },
|
|
61
71
|
React.createElement(OakPortableText, { value: transcript, components: {
|
package/dist/npm/es/index.js
CHANGED
|
@@ -45,6 +45,7 @@ export { OakIcon } from './components/images-and-icons/OakIcon/OakIcon.js';
|
|
|
45
45
|
export { OakImage, oakPlaceholder, placeholderStyles } from './components/images-and-icons/OakImage/OakImage.js';
|
|
46
46
|
export { OakSvg } from './components/images-and-icons/OakSvg/OakSvg.js';
|
|
47
47
|
export { OakRoundIcon } from './components/images-and-icons/OakRoundIcon/OakRoundIcon.js';
|
|
48
|
+
export { OakHandDrawnHR } from './components/images-and-icons/OakHandDrawnHR/OakHandDrawnHR.js';
|
|
48
49
|
export { OakFlex, oakFlexCss } from './components/layout-and-structure/OakFlex/OakFlex.js';
|
|
49
50
|
export { OakBox, oakBoxCss } from './components/layout-and-structure/OakBox/OakBox.js';
|
|
50
51
|
export { OakGrid } from './components/layout-and-structure/OakGrid/OakGrid.js';
|
|
@@ -67,6 +68,7 @@ export { OakToast } from './components/messaging-and-feedback/OakToast/OakToast.
|
|
|
67
68
|
export { OakTooltip } from './components/messaging-and-feedback/OakTooltip/OakTooltip.js';
|
|
68
69
|
export { OakFocusIndicator } from './components/messaging-and-feedback/OakFocusIndicator/OakFocusIndicator.js';
|
|
69
70
|
export { OakHandDrawnFocusUnderline } from './components/messaging-and-feedback/OakHandDrawnFocusUnderline/OakHandDrawnFocusUnderline.js';
|
|
71
|
+
export { OakPromoTag } from './components/messaging-and-feedback/OakPromoTag/OakPromoTag.js';
|
|
70
72
|
export { OakAnchorTarget } from './components/navigation/OakAnchorTarget/OakAnchorTarget.js';
|
|
71
73
|
export { OakHoverLink } from './components/navigation/OakHoverLink/OakHoverLink.js';
|
|
72
74
|
export { OakLink } from './components/navigation/OakLink/OakLink.js';
|
|
@@ -129,13 +131,11 @@ export { OakFilterDrawer } from './components/owa/OakFilterDrawer/OakFilterDrawe
|
|
|
129
131
|
export { OakFormInputWithLabels } from './components/owa/OakFormInputWithLabels/OakFormInputWithLabels.js';
|
|
130
132
|
export { OakHandDrawnCard } from './components/owa/OakHandDrawnCard/OakHandDrawnCard.js';
|
|
131
133
|
export { OakHandDrawnCardWithIcon } from './components/owa/OakHandDrawnCardWithIcon/OakHandDrawnCardWithIcon.js';
|
|
132
|
-
export { OakHandDrawnHR } from './components/owa/OakHandDrawnHR/OakHandDrawnHR.js';
|
|
133
134
|
export { OakInfoButton } from './components/owa/OakInfoButton/OakInfoButton.js';
|
|
134
135
|
export { OakCardHeader, OakLessonInfoCard, OakStaticMessageCard } from './components/owa/OakLessonInfoCard/OakLessonInfoCard.js';
|
|
135
136
|
export { OakLinkCard } from './components/owa/OakLinkCard/OakLinkCard.js';
|
|
136
137
|
export { OakMediaClipListAccordion } from './components/owa/OakMediaClipListAccordion/OakMediaClipListAccordion.js';
|
|
137
138
|
export { OakOutlineAccordion } from './components/owa/OakOutlineAccordion/OakOutlineAccordion.js';
|
|
138
|
-
export { OakPromoTag } from './components/owa/OakPromoTag/OakPromoTag.js';
|
|
139
139
|
export { OakRadioTile, isTileItem } from './components/owa/OakRadioTile/OakRadioTile.js';
|
|
140
140
|
export { OakSaveCount } from './components/owa/OakSaveCount/OakSaveCount.js';
|
|
141
141
|
export { OakScaleImageButton } from './components/owa/OakScaleImageButton/OakScaleImageButton.js';
|
package/dist/npm/es/types.d.ts
CHANGED
|
@@ -1550,6 +1550,24 @@ type OakRoundIconProps = IconProps | ImageProps;
|
|
|
1550
1550
|
*/
|
|
1551
1551
|
declare const OakRoundIcon: ({ $background, $borderRadius, $width, $height, $pa, className, ...rest }: OakRoundIconProps) => React$1.JSX.Element;
|
|
1552
1552
|
|
|
1553
|
+
type InternalStyledSvgProps = {
|
|
1554
|
+
$fill?: ResponsiveValues<OakUiRoleToken>;
|
|
1555
|
+
$stroke?: ResponsiveValues<OakUiRoleToken>;
|
|
1556
|
+
$strokeWidth?: ResponsiveValues<OakBorderWidthToken>;
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1559
|
+
type OakHandDrawnHRProps = {
|
|
1560
|
+
hrColor?: InternalStyledSvgProps["$fill"];
|
|
1561
|
+
} & SpacingStyleProps & SizeStyleProps;
|
|
1562
|
+
/**
|
|
1563
|
+
* A Drawn HR svg inside a flex container
|
|
1564
|
+
*
|
|
1565
|
+
* use prop hrColor to change the color of the HR
|
|
1566
|
+
*
|
|
1567
|
+
* change the sizeProps of the flex container to change the size and dimentions of the HR
|
|
1568
|
+
*/
|
|
1569
|
+
declare const OakHandDrawnHR: (props: OakHandDrawnHRProps) => React$1.JSX.Element;
|
|
1570
|
+
|
|
1553
1571
|
type OakSmallSecondaryButtonWithDropdownProps = {
|
|
1554
1572
|
primaryActionText: string;
|
|
1555
1573
|
primaryActionIcon?: OakIconName;
|
|
@@ -3254,12 +3272,6 @@ type OakFocusIndicatorProps = OakBoxProps & {
|
|
|
3254
3272
|
*/
|
|
3255
3273
|
declare const OakFocusIndicator: any;
|
|
3256
3274
|
|
|
3257
|
-
type InternalStyledSvgProps = {
|
|
3258
|
-
$fill?: ResponsiveValues<OakUiRoleToken>;
|
|
3259
|
-
$stroke?: ResponsiveValues<OakUiRoleToken>;
|
|
3260
|
-
$strokeWidth?: ResponsiveValues<OakBorderWidthToken>;
|
|
3261
|
-
};
|
|
3262
|
-
|
|
3263
3275
|
type OakHandDrawnFocusUnderlineProps = {
|
|
3264
3276
|
FocusUnderlineColor?: InternalStyledSvgProps["$fill"];
|
|
3265
3277
|
} & SpacingStyleProps & SizeStyleProps;
|
|
@@ -3272,6 +3284,16 @@ type OakHandDrawnFocusUnderlineProps = {
|
|
|
3272
3284
|
*/
|
|
3273
3285
|
declare const OakHandDrawnFocusUnderline: (props: OakHandDrawnFocusUnderlineProps) => React$1.JSX.Element;
|
|
3274
3286
|
|
|
3287
|
+
type OakPromoTagProps = {
|
|
3288
|
+
width?: SizeStyleProps["$width"];
|
|
3289
|
+
display?: DisplayStyleProps["$display"];
|
|
3290
|
+
variant?: "default" | "inverted";
|
|
3291
|
+
};
|
|
3292
|
+
/**
|
|
3293
|
+
* Renders a tag with the text "New"
|
|
3294
|
+
*/
|
|
3295
|
+
declare const OakPromoTag: (props: OakPromoTagProps) => React$1.JSX.Element;
|
|
3296
|
+
|
|
3275
3297
|
type OakAnchorTargetProps = PaddingStyleProps;
|
|
3276
3298
|
/**
|
|
3277
3299
|
* * AnchorTarget is a component to enable in-page linking to a particular section
|
|
@@ -3405,6 +3427,7 @@ declare const OakSecondaryLink: OakLinkComponent;
|
|
|
3405
3427
|
|
|
3406
3428
|
type Tab<T> = {
|
|
3407
3429
|
label: T;
|
|
3430
|
+
showPromo?: boolean;
|
|
3408
3431
|
} & ({
|
|
3409
3432
|
type: "button";
|
|
3410
3433
|
} | {
|
|
@@ -4619,18 +4642,6 @@ type OakHandDrawnBoxWithIconProps = Omit<OakHandDrawnCardProps, "children"> & {
|
|
|
4619
4642
|
*/
|
|
4620
4643
|
declare const OakHandDrawnCardWithIcon: ({ iconName, iconColor, iconWidth, iconHeight, alt, $width, $height, $alignItems, $justifyContent, ...props }: OakHandDrawnBoxWithIconProps) => React$1.JSX.Element;
|
|
4621
4644
|
|
|
4622
|
-
type OakHandDrawnHRProps = {
|
|
4623
|
-
hrColor?: InternalStyledSvgProps["$fill"];
|
|
4624
|
-
} & SpacingStyleProps & SizeStyleProps;
|
|
4625
|
-
/**
|
|
4626
|
-
* A Drawn HR svg inside a flex container
|
|
4627
|
-
*
|
|
4628
|
-
* use prop hrColor to change the color of the HR
|
|
4629
|
-
*
|
|
4630
|
-
* change the sizeProps of the flex container to change the size and dimentions of the HR
|
|
4631
|
-
*/
|
|
4632
|
-
declare const OakHandDrawnHR: (props: OakHandDrawnHRProps) => React$1.JSX.Element;
|
|
4633
|
-
|
|
4634
4645
|
type OakInfoButtonProps = {
|
|
4635
4646
|
onClick: MouseEventHandler;
|
|
4636
4647
|
isOpen: boolean;
|
|
@@ -4765,15 +4776,6 @@ type OakOutlineAccordionProps = {
|
|
|
4765
4776
|
*/
|
|
4766
4777
|
declare const OakOutlineAccordion: ({ header, children, id, initialOpen, ...styleProps }: OakOutlineAccordionProps) => React$1.JSX.Element;
|
|
4767
4778
|
|
|
4768
|
-
type OakPromoTagProps = {
|
|
4769
|
-
width?: SizeStyleProps["$width"];
|
|
4770
|
-
display?: DisplayStyleProps["$display"];
|
|
4771
|
-
};
|
|
4772
|
-
/**
|
|
4773
|
-
* Renders a tag with the text "New"
|
|
4774
|
-
*/
|
|
4775
|
-
declare const OakPromoTag: (props: OakPromoTagProps) => React$1.JSX.Element;
|
|
4776
|
-
|
|
4777
4779
|
type TileItem = {
|
|
4778
4780
|
id: string;
|
|
4779
4781
|
label: string;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|