@oaknational/oak-components 3.29.2 → 3.30.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/dist/npm/cjs/index.js +401 -140
- package/dist/npm/cjs/types.d.ts +314 -3
- package/dist/npm/es/components/buttons/OakCloseButton/OakCloseButton.js +7 -2
- package/dist/npm/es/components/internal-components/InternalModalBase/InternalModalBase.js +139 -0
- package/dist/npm/es/components/internal-components/InternalModalFooter/InternalModalFooter.js +17 -0
- package/dist/npm/es/components/messaging-and-feedback/OakDialog/OakDialog.js +22 -0
- package/dist/npm/es/components/messaging-and-feedback/OakDialogFooter/OakDialogFooter.js +22 -0
- package/dist/npm/es/components/messaging-and-feedback/OakInformativeModal/OakInformativeModal.js +11 -0
- package/dist/npm/es/components/messaging-and-feedback/OakInformativeModal/OakInformativeModalBody.js +4 -0
- package/dist/npm/es/components/messaging-and-feedback/OakInformativeModal/OakInformativeModalFooter.js +4 -0
- package/dist/npm/es/components/messaging-and-feedback/OakModal/OakModal.js +36 -0
- package/dist/npm/es/components/messaging-and-feedback/OakModalCenter/OakModalCenter.js +6 -0
- package/dist/npm/es/components/messaging-and-feedback/OakModalCenter/OakModalCenterBody.js +4 -0
- package/dist/npm/es/components/messaging-and-feedback/OakModalFooter/OakModalFooter.js +22 -0
- package/dist/npm/es/components/navigation/OakLink/OakLink.js +1 -0
- package/dist/npm/es/components/navigation/OakTabs/OakTabs.js +1 -0
- package/dist/npm/es/index.js +4 -0
- package/dist/npm/es/types.d.ts +314 -3
- package/package.json +1 -1
package/dist/npm/cjs/index.js
CHANGED
|
@@ -563,20 +563,20 @@ var responsiveStyle = function (attr, getValues, parse) {
|
|
|
563
563
|
}
|
|
564
564
|
var parsed = parse(value);
|
|
565
565
|
var cssValue = typeof parsed === "function" ? parsed(props) : parsed;
|
|
566
|
-
return styled.css(templateObject_1$
|
|
566
|
+
return styled.css(templateObject_1$29 || (templateObject_1$29 = tslib.__makeTemplateObject(["\n ", ": ", ";\n "], ["\n ", ": ", ";\n "])), attr, cssValue);
|
|
567
567
|
};
|
|
568
568
|
var values = getValues(props);
|
|
569
569
|
if (typeof values === "undefined") {
|
|
570
570
|
return undefined;
|
|
571
571
|
}
|
|
572
572
|
if (!Array.isArray(values)) {
|
|
573
|
-
return styled.css(templateObject_2$
|
|
573
|
+
return styled.css(templateObject_2$Y || (templateObject_2$Y = tslib.__makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), attrCss(values));
|
|
574
574
|
}
|
|
575
575
|
if (values.length === 0) {
|
|
576
576
|
return [];
|
|
577
577
|
}
|
|
578
578
|
return tslib.__spreadArray([
|
|
579
|
-
styled.css(templateObject_3$
|
|
579
|
+
styled.css(templateObject_3$G || (templateObject_3$G = tslib.__makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), attrCss(values[0]))
|
|
580
580
|
], tslib.__read(breakpoints
|
|
581
581
|
.slice(0, values.length)
|
|
582
582
|
.map(function (breakpoint, i) {
|
|
@@ -584,15 +584,15 @@ var responsiveStyle = function (attr, getValues, parse) {
|
|
|
584
584
|
if (value === undefined) {
|
|
585
585
|
return undefined;
|
|
586
586
|
}
|
|
587
|
-
return styled.css(templateObject_5$
|
|
587
|
+
return styled.css(templateObject_5$i || (templateObject_5$i = tslib.__makeTemplateObject(["\n @media (min-width: ", "px) {\n ", "\n }\n "], ["\n @media (min-width: ", "px) {\n ", "\n }\n "])), breakpoint, styled.css(templateObject_4$q || (templateObject_4$q = tslib.__makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), attrCss(value)));
|
|
588
588
|
})
|
|
589
589
|
.filter(truthy)), false);
|
|
590
590
|
};
|
|
591
591
|
};
|
|
592
|
-
var templateObject_1$
|
|
592
|
+
var templateObject_1$29, templateObject_2$Y, templateObject_3$G, templateObject_4$q, templateObject_5$i;
|
|
593
593
|
|
|
594
|
-
var colorFilterStyle = styled.css(templateObject_1$
|
|
595
|
-
var templateObject_1$
|
|
594
|
+
var colorFilterStyle = styled.css(templateObject_1$28 || (templateObject_1$28 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("filter", function (props) { return props.$colorFilter; }, function (value) { return parseColorFilter(value); }));
|
|
595
|
+
var templateObject_1$28;
|
|
596
596
|
|
|
597
597
|
function parseColor(value) {
|
|
598
598
|
if (value === undefined || value === null) {
|
|
@@ -610,8 +610,8 @@ function parseColor(value) {
|
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
612
|
|
|
613
|
-
var colorStyle = styled.css(templateObject_1$
|
|
614
|
-
var templateObject_1$
|
|
613
|
+
var colorStyle = styled.css(templateObject_1$27 || (templateObject_1$27 = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("color", function (props) { return props.$color; }, parseColor), responsiveStyle("background", function (props) { return props.$background; }, parseColor));
|
|
614
|
+
var templateObject_1$27;
|
|
615
615
|
|
|
616
616
|
var BASE_FONT_SIZE_PX = 16;
|
|
617
617
|
var REM_DP = 3;
|
|
@@ -692,21 +692,21 @@ function parseSpacing(value) {
|
|
|
692
692
|
return value;
|
|
693
693
|
}
|
|
694
694
|
|
|
695
|
-
var positionStyle = styled.css(templateObject_1$
|
|
695
|
+
var positionStyle = styled.css(templateObject_1$26 || (templateObject_1$26 = tslib.__makeTemplateObject(["\n ", "\n ", " \n ", " \n ", " \n ", " \n ", " \n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", " \n ", " \n ", " \n ", " \n ", " \n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), responsiveStyle("position", function (props) { return props.$position; }), responsiveStyle("top", function (props) { return props.$top; }, parseSpacing), responsiveStyle("right", function (props) { return props.$right; }, parseSpacing), responsiveStyle("bottom", function (props) { return props.$bottom; }, parseSpacing), responsiveStyle("left", function (props) { return props.$left; }, parseSpacing), responsiveStyle("inset", function (props) { return props.$inset; }, parseSpacing), responsiveStyle("overflow", function (props) { return props.$overflow; }), responsiveStyle("overflow-x", function (props) { return props.$overflowX; }), responsiveStyle("overflow-y", function (props) { return props.$overflowY; }), responsiveStyle("object-fit", function (props) { return props.$objectFit; }), responsiveStyle("object-position", function (props) { return props.$objectPosition; }), responsiveStyle("pointer-events", function (props) { return props.$pointerEvents; }), responsiveStyle("visibility", function (props) { return props.$visibility; }), responsiveStyle("vertical-align", function (props) { return props.$verticalAlign; }));
|
|
696
|
+
var templateObject_1$26;
|
|
697
|
+
|
|
698
|
+
var sizeStyle = styled.css(templateObject_1$25 || (templateObject_1$25 = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), responsiveStyle("width", function (props) { return props.$width; }, parseSpacing), responsiveStyle("min-width", function (props) { return props.$minWidth; }, parseSpacing), responsiveStyle("max-width", function (props) { return props.$maxWidth; }, parseSpacing), responsiveStyle("height", function (props) { return props.$height; }, parseSpacing), responsiveStyle("min-height", function (props) { return props.$minHeight; }, parseSpacing), responsiveStyle("max-height", function (props) { return props.$maxHeight; }, parseSpacing), responsiveStyle("aspect-ratio", function (props) { return props.$aspectRatio; }), responsiveStyle("box-sizing", function (props) { return props.$boxSizing; }));
|
|
696
699
|
var templateObject_1$25;
|
|
697
700
|
|
|
698
|
-
var
|
|
699
|
-
var
|
|
700
|
-
|
|
701
|
-
var
|
|
702
|
-
var
|
|
703
|
-
var
|
|
704
|
-
var
|
|
705
|
-
var
|
|
706
|
-
var
|
|
707
|
-
var paddingBottom = styled.css(templateObject_7$7 || (templateObject_7$7 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("padding-bottom", function (props) { return props.$pb; }, parseSpacing));
|
|
708
|
-
var marginAll = styled.css(templateObject_8$2 || (templateObject_8$2 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("margin", function (props) { return props.$ma; }, parseSpacing));
|
|
709
|
-
var marginHorizontal = styled.css(templateObject_9$1 || (templateObject_9$1 = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("margin-left", function (props) { return props.$mh; }, parseSpacing), responsiveStyle("margin-right", function (props) { return props.$mh; }, parseSpacing));
|
|
701
|
+
var paddingAll = styled.css(templateObject_1$24 || (templateObject_1$24 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("padding", function (props) { return props.$pa; }, parseSpacing));
|
|
702
|
+
var paddingHorizontal = styled.css(templateObject_2$X || (templateObject_2$X = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("padding-left", function (props) { return props.$ph; }, parseSpacing), responsiveStyle("padding-right", function (props) { return props.$ph; }, parseSpacing));
|
|
703
|
+
var paddingVertical = styled.css(templateObject_3$F || (templateObject_3$F = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("padding-top", function (props) { return props.$pv; }, parseSpacing), responsiveStyle("padding-bottom", function (props) { return props.$pv; }, parseSpacing));
|
|
704
|
+
var paddingLeft = styled.css(templateObject_4$p || (templateObject_4$p = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("padding-left", function (props) { return props.$pl; }, parseSpacing));
|
|
705
|
+
var paddingRight = styled.css(templateObject_5$h || (templateObject_5$h = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("padding-right", function (props) { return props.$pr; }, parseSpacing));
|
|
706
|
+
var paddingTop = styled.css(templateObject_6$e || (templateObject_6$e = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("padding-top", function (props) { return props.$pt; }, parseSpacing));
|
|
707
|
+
var paddingBottom = styled.css(templateObject_7$8 || (templateObject_7$8 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("padding-bottom", function (props) { return props.$pb; }, parseSpacing));
|
|
708
|
+
var marginAll = styled.css(templateObject_8$3 || (templateObject_8$3 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("margin", function (props) { return props.$ma; }, parseSpacing));
|
|
709
|
+
var marginHorizontal = styled.css(templateObject_9$2 || (templateObject_9$2 = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("margin-left", function (props) { return props.$mh; }, parseSpacing), responsiveStyle("margin-right", function (props) { return props.$mh; }, parseSpacing));
|
|
710
710
|
var marginVertical = styled.css(templateObject_10$1 || (templateObject_10$1 = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("margin-top", function (props) { return props.$mv; }, parseSpacing), responsiveStyle("margin-bottom", function (props) { return props.$mv; }, parseSpacing));
|
|
711
711
|
var marginLeft = styled.css(templateObject_11$1 || (templateObject_11$1 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("margin-left", function (props) { return props.$ml; }, parseSpacing));
|
|
712
712
|
var marginRight = styled.css(templateObject_12$1 || (templateObject_12$1 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("margin-right", function (props) { return props.$mr; }, parseSpacing));
|
|
@@ -715,7 +715,7 @@ var marginBottom = styled.css(templateObject_14$1 || (templateObject_14$1 = tsli
|
|
|
715
715
|
var marginStyle = styled.css(templateObject_15$1 || (templateObject_15$1 = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), marginAll, marginHorizontal, marginVertical, marginLeft, marginRight, marginTop, marginBottom);
|
|
716
716
|
var paddingStyle = styled.css(templateObject_16$1 || (templateObject_16$1 = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), paddingAll, paddingHorizontal, paddingVertical, paddingLeft, paddingRight, paddingTop, paddingBottom);
|
|
717
717
|
var spacingStyle = styled.css(templateObject_17$1 || (templateObject_17$1 = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), paddingStyle, marginStyle);
|
|
718
|
-
var templateObject_1$
|
|
718
|
+
var templateObject_1$24, templateObject_2$X, templateObject_3$F, templateObject_4$p, templateObject_5$h, templateObject_6$e, templateObject_7$8, templateObject_8$3, templateObject_9$2, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1, templateObject_16$1, templateObject_17$1;
|
|
719
719
|
|
|
720
720
|
var oakBorderWidthTokens = {
|
|
721
721
|
"border-solid-none": 0,
|
|
@@ -756,15 +756,15 @@ var parseBorderRadius = function (value) {
|
|
|
756
756
|
}
|
|
757
757
|
};
|
|
758
758
|
|
|
759
|
-
var borderAll = styled.css(templateObject_1$
|
|
760
|
-
var borderTop = styled.css(templateObject_2$
|
|
761
|
-
var borderRight = styled.css(templateObject_3$
|
|
762
|
-
var borderBottom = styled.css(templateObject_4$
|
|
763
|
-
var borderLeft = styled.css(templateObject_5$
|
|
764
|
-
var borderHorizontal = styled.css(templateObject_6$
|
|
765
|
-
var borderVertical = styled.css(templateObject_7$
|
|
766
|
-
var borderColor = styled.css(templateObject_8$
|
|
767
|
-
var borderRadius = styled.css(templateObject_9 || (templateObject_9 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-radius", function (props) { return props.$borderRadius; }, parseBorderRadius));
|
|
759
|
+
var borderAll = styled.css(templateObject_1$23 || (templateObject_1$23 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border", function (props) { return props.$ba; }, parseBorder));
|
|
760
|
+
var borderTop = styled.css(templateObject_2$W || (templateObject_2$W = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-top", function (props) { return props.$bt; }, parseBorder));
|
|
761
|
+
var borderRight = styled.css(templateObject_3$E || (templateObject_3$E = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-right", function (props) { return props.$br; }, parseBorder));
|
|
762
|
+
var borderBottom = styled.css(templateObject_4$o || (templateObject_4$o = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-bottom", function (props) { return props.$bb; }, parseBorder));
|
|
763
|
+
var borderLeft = styled.css(templateObject_5$g || (templateObject_5$g = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-left", function (props) { return props.$bl; }, parseBorder));
|
|
764
|
+
var borderHorizontal = styled.css(templateObject_6$d || (templateObject_6$d = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("border-left", function (props) { return props.$bh; }, parseBorder), responsiveStyle("border-right", function (props) { return props.$bh; }, parseBorder));
|
|
765
|
+
var borderVertical = styled.css(templateObject_7$7 || (templateObject_7$7 = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("border-top", function (props) { return props.$bv; }, parseBorder), responsiveStyle("border-bottom", function (props) { return props.$bv; }, parseBorder));
|
|
766
|
+
var borderColor = styled.css(templateObject_8$2 || (templateObject_8$2 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-color", function (props) { return props.$borderColor; }, function (value) { return parseColor(value); }));
|
|
767
|
+
var borderRadius = styled.css(templateObject_9$1 || (templateObject_9$1 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-radius", function (props) { return props.$borderRadius; }, parseBorderRadius));
|
|
768
768
|
var borderRadiusTopLeft = styled.css(templateObject_10 || (templateObject_10 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-top-left-radius", function (props) { return props.$btlr; }, parseBorderRadius));
|
|
769
769
|
var borderRadiusTopRight = styled.css(templateObject_11 || (templateObject_11 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-top-right-radius", function (props) { return props.$btrr; }, parseBorderRadius));
|
|
770
770
|
var borderRadiusBottomLeft = styled.css(templateObject_12 || (templateObject_12 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("border-bottom-left-radius", function (props) { return props.$bblr; }, parseBorderRadius));
|
|
@@ -773,10 +773,10 @@ var borderRadiusTop = styled.css(templateObject_14 || (templateObject_14 = tslib
|
|
|
773
773
|
var borderRadiusBottom = styled.css(templateObject_15 || (templateObject_15 = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("border-bottom-left-radius", function (props) { return props.$bbr; }, parseBorderRadius), responsiveStyle("border-bottom-right-radius", function (props) { return props.$bbr; }, parseBorderRadius));
|
|
774
774
|
var borderStrokeStyle = styled.css(templateObject_16 || (templateObject_16 = tslib.__makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), responsiveStyle("border-style", function (props) { return props.$borderStyle; }));
|
|
775
775
|
var borderStyle = styled.css(templateObject_17 || (templateObject_17 = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), borderAll, borderTop, borderRight, borderBottom, borderLeft, borderHorizontal, borderVertical, borderColor, borderRadius, borderRadiusTopLeft, borderRadiusTopRight, borderRadiusBottomLeft, borderRadiusBottomRight, borderRadiusTop, borderRadiusBottom, borderStrokeStyle);
|
|
776
|
-
var templateObject_1$
|
|
776
|
+
var templateObject_1$23, templateObject_2$W, templateObject_3$E, templateObject_4$o, templateObject_5$g, templateObject_6$d, templateObject_7$7, templateObject_8$2, templateObject_9$1, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17;
|
|
777
777
|
|
|
778
|
-
var displayStyle = styled.css(templateObject_1$
|
|
779
|
-
var templateObject_1$
|
|
778
|
+
var displayStyle = styled.css(templateObject_1$22 || (templateObject_1$22 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("display", function (props) { return props.$display; }));
|
|
779
|
+
var templateObject_1$22;
|
|
780
780
|
|
|
781
781
|
var oakDropShadowTokens = {
|
|
782
782
|
"drop-shadow-standard": "0 0.5rem 0.5rem rgba(92, 92, 92, 20%)",
|
|
@@ -802,8 +802,8 @@ var parseDropShadow = function (variant) {
|
|
|
802
802
|
}
|
|
803
803
|
};
|
|
804
804
|
|
|
805
|
-
var dropShadowStyle = styled.css(templateObject_1$
|
|
806
|
-
var templateObject_1$
|
|
805
|
+
var dropShadowStyle = styled.css(templateObject_1$21 || (templateObject_1$21 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("box-shadow", function (props) { return props.$dropShadow; }, parseDropShadow));
|
|
806
|
+
var templateObject_1$21;
|
|
807
807
|
|
|
808
808
|
var oakOpacityTokens = {
|
|
809
809
|
transparent: 0,
|
|
@@ -821,11 +821,11 @@ var parseOpacity = function (variant) {
|
|
|
821
821
|
}
|
|
822
822
|
};
|
|
823
823
|
|
|
824
|
-
var opacityStyle = styled.css(templateObject_1$
|
|
825
|
-
var templateObject_1$
|
|
824
|
+
var opacityStyle = styled.css(templateObject_1$20 || (templateObject_1$20 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("opacity", function (props) { return props.$opacity; }, parseOpacity));
|
|
825
|
+
var templateObject_1$20;
|
|
826
826
|
|
|
827
|
-
var transformStyle = styled.css(templateObject_1$
|
|
828
|
-
var templateObject_1$
|
|
827
|
+
var transformStyle = styled.css(templateObject_1$1$ || (templateObject_1$1$ = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), responsiveStyle("transform", function (props) { return props.$transform; }), responsiveStyle("transform-origin", function (props) { return props.$transformOrigin; }));
|
|
828
|
+
var templateObject_1$1$;
|
|
829
829
|
|
|
830
830
|
var oakTransitionTokens = {
|
|
831
831
|
"standard-ease": "all 0.3s ease",
|
|
@@ -841,8 +841,8 @@ var parseTransitions = function (variant) {
|
|
|
841
841
|
}
|
|
842
842
|
};
|
|
843
843
|
|
|
844
|
-
var transitionStyle = styled.css(templateObject_1$
|
|
845
|
-
var templateObject_1$
|
|
844
|
+
var transitionStyle = styled.css(templateObject_1$1_ || (templateObject_1$1_ = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("transition", function (props) { return props.$transition; }, parseTransitions));
|
|
845
|
+
var templateObject_1$1_;
|
|
846
846
|
|
|
847
847
|
var oakFontSizeTokens = {
|
|
848
848
|
"font-size-1": 12,
|
|
@@ -946,8 +946,8 @@ var parseLetterSpacing = function (font) {
|
|
|
946
946
|
return (_a = oakFontTokens[font]) === null || _a === void 0 ? void 0 : _a[3];
|
|
947
947
|
};
|
|
948
948
|
|
|
949
|
-
var typographyStyle = styled.css(templateObject_1$
|
|
950
|
-
var templateObject_1$
|
|
949
|
+
var typographyStyle = styled.css(templateObject_1$1Z || (templateObject_1$1Z = tslib.__makeTemplateObject(["\n font-family:\n --var(google-font), Lexend, sans-serif; // FIXME: this should be a css variable ?\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n font-family:\n --var(google-font), Lexend, sans-serif; // FIXME: this should be a css variable ?\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), responsiveStyle("font-weight", function (props) { return props.$font; }, parseFontWeight), responsiveStyle("font-size", function (props) { return props.$font; }, parseFontSize), responsiveStyle("line-height", function (props) { return props.$font; }, parseLineHeight), responsiveStyle("letter-spacing", function (props) { return props.$font; }, parseLetterSpacing), responsiveStyle("text-align", function (props) { return props.$textAlign; }), responsiveStyle("text-decoration", function (props) { return props.$textDecoration; }), responsiveStyle("white-space", function (props) { return props.$whiteSpace; }), responsiveStyle("word-wrap", function (props) { return props.$wordWrap; }), responsiveStyle("text-overflow", function (props) { return props.$textOverflow; }), responsiveStyle("overflow", function (props) { return props.$overflow; }), responsiveStyle("text-wrap", function (props) { return props.$textWrap; }));
|
|
950
|
+
var templateObject_1$1Z;
|
|
951
951
|
|
|
952
952
|
// For help with defining z-index values, refer to this article:
|
|
953
953
|
// https://www.smashingmagazine.com/2021/02/css-z-index-large-projects/#a-new-solution
|
|
@@ -975,17 +975,17 @@ var parseZIndex = function (value) {
|
|
|
975
975
|
return oakZIndexTokens[value];
|
|
976
976
|
};
|
|
977
977
|
|
|
978
|
-
var zIndexStyle = styled.css(templateObject_1$
|
|
979
|
-
var templateObject_1$
|
|
978
|
+
var zIndexStyle = styled.css(templateObject_1$1Y || (templateObject_1$1Y = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("z-index", function (props) { return props.$zIndex; }, parseZIndex));
|
|
979
|
+
var templateObject_1$1Y;
|
|
980
980
|
|
|
981
|
-
var scrollMarginTop = styled.css(templateObject_1$
|
|
982
|
-
var scrollMarginLeft = styled.css(templateObject_2$
|
|
983
|
-
var scrollSnapStyle = styled.css(templateObject_3$
|
|
984
|
-
var templateObject_1$
|
|
981
|
+
var scrollMarginTop = styled.css(templateObject_1$1X || (templateObject_1$1X = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("scroll-margin-top", function (props) { return props.$scrollMarginTop; }, parseSpacing));
|
|
982
|
+
var scrollMarginLeft = styled.css(templateObject_2$V || (templateObject_2$V = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("scroll-margin-left", function (props) { return props.$scrollMarginLeft; }, parseSpacing));
|
|
983
|
+
var scrollSnapStyle = styled.css(templateObject_3$D || (templateObject_3$D = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), scrollMarginTop, scrollMarginLeft);
|
|
984
|
+
var templateObject_1$1X, templateObject_2$V, templateObject_3$D;
|
|
985
985
|
|
|
986
|
-
var oakBoxCss = styled.css(templateObject_2$
|
|
986
|
+
var oakBoxCss = styled.css(templateObject_2$U || (templateObject_2$U = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), positionStyle, sizeStyle, spacingStyle, colorStyle, borderStyle, displayStyle, dropShadowStyle, opacityStyle, transformStyle, transitionStyle, typographyStyle, zIndexStyle, scrollSnapStyle, function (props) {
|
|
987
987
|
/* onClick might be passed in the useClickableCard pattern */
|
|
988
|
-
return props.onClick && styled.css(templateObject_1$
|
|
988
|
+
return props.onClick && styled.css(templateObject_1$1W || (templateObject_1$1W = tslib.__makeTemplateObject(["\n &:hover {\n cursor: pointer;\n }\n "], ["\n &:hover {\n cursor: pointer;\n }\n "])));
|
|
989
989
|
});
|
|
990
990
|
/**
|
|
991
991
|
* OakBox exposes all the styles that are available styles on a div tag. These include:
|
|
@@ -1004,19 +1004,19 @@ var oakBoxCss = styled.css(templateObject_2$T || (templateObject_2$T = tslib.__m
|
|
|
1004
1004
|
* - scroll-margin-top/left
|
|
1005
1005
|
*
|
|
1006
1006
|
*/
|
|
1007
|
-
var OakBox = styled__default.default.div(templateObject_3$
|
|
1008
|
-
var templateObject_1$
|
|
1007
|
+
var OakBox = styled__default.default.div(templateObject_3$C || (templateObject_3$C = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), oakBoxCss);
|
|
1008
|
+
var templateObject_1$1W, templateObject_2$U, templateObject_3$C;
|
|
1009
1009
|
|
|
1010
1010
|
var oakPlaceholder = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZmlsbD0iIzIyMiIgZD0iTTI4Ljc3OSAxOS4xNzZhMjcuMTkxIDI3LjE5MSAwIDAgMC0zLjggMS42IDE2LjcgMTYuNyAwIDAgMC03LjEgOC40YzAgLjEtLjEuMi0uMS4zLS43IDIuNC0uNiAyIDEuMyAyLjMgMS45LjMgMSAuNSAxIDEuMy0uMSA4LjggNC4xIDE1LjEgMTEuNCAxOS42YTEuNSAxLjUgMCAwIDAgMS43LjJjNS43LTIuNiA5LjMtNyAxMC4zLTEzLjJhMSAxIDAgMCAxIDEtMWwzLS4yYy44IDAgMS4zLjIgMS4yIDEuMmExNy45IDE3LjkgMCAwIDEtMy4yIDkuMiAyMy43IDIzLjcgMCAwIDEtMTAuOSA5LjEgNS40MDEgNS40MDEgMCAwIDEtNC41LS4yIDI2LjI5OCAyNi4yOTggMCAwIDEtOC41LTYuNiAyNS45IDI1LjkgMCAwIDEtNi40LTE0LjRjMC0uNi0uMi0uNy0uOC0uOC0yLjUtLjQtMi41LS4xLTIuMy0yLjlhMTkuMyAxOS4zIDAgMCAxIDEwLjgtMTYuNiAzOC45OTkgMzguOTk5IDAgMCAxIDUuNy0yLjEgMi4xIDIuMSAwIDAgMCAuOS0xLjMgMTQuMSAxNC4xIDAgMCAxIDMuNS02LjNsLjMtLjNjMS45LTIgMi42LTIgNC4zLjJsLjQuNWMxLjEgMS4xIDEgMS41LS4xIDIuNmExMS45IDExLjkgMCAwIDAtMy4yIDQuNCAxNi45IDE2LjkgMCAwIDEgNy41IDIuM2M1LjcgMy41IDkuMiA4LjMgOS45IDE1IC4wMTYuOTAxLS4wMTcgMS44MDItLjEgMi43IDAgLjgtLjYgMS0xLjIgMS4yYTE2LjEgMTYuMSAwIDAgMS0xMS0uNyAxNy45MDEgMTcuOTAxIDAgMCAxLTEwLjktMTMuNiA5Ljc5NiA5Ljc5NiAwIDAgMS0uMS0xLjlabTE4LjEgMTIuMmMuNC01LjUtNi45LTEyLjYtMTMtMTIuMS41IDYuNSA3LjYgMTIuOCAxMyAxMi4xWiIgb3BhY2l0eT0iLjEiLz48L3N2Zz4=";
|
|
1011
|
-
var clickStyles = styled.css(templateObject_2$
|
|
1011
|
+
var clickStyles = styled.css(templateObject_2$T || (templateObject_2$T = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
1012
1012
|
/* onClick might be passed in the useClickableCard pattern */
|
|
1013
|
-
return props.onClick && styled.css(templateObject_1$
|
|
1013
|
+
return props.onClick && styled.css(templateObject_1$1V || (templateObject_1$1V = tslib.__makeTemplateObject(["\n &:hover {\n cursor: pointer;\n }\n "], ["\n &:hover {\n cursor: pointer;\n }\n "])));
|
|
1014
1014
|
});
|
|
1015
|
-
var placeholderStyles = styled.css(templateObject_4$
|
|
1016
|
-
return props.$showOakPlaceholder && styled.css(templateObject_3$
|
|
1015
|
+
var placeholderStyles = styled.css(templateObject_4$n || (templateObject_4$n = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
1016
|
+
return props.$showOakPlaceholder && styled.css(templateObject_3$B || (templateObject_3$B = tslib.__makeTemplateObject(["\n background-image: url(", ");\n background-color: ", ";\n background-size: ", ";\n background-position: center;\n background-repeat: no-repeat;\n "], ["\n background-image: url(", ");\n background-color: ", ";\n background-size: ", ";\n background-position: center;\n background-repeat: no-repeat;\n "])), oakPlaceholder, parseColor("bg-decorative2-very-subdued"), parseSpacing("spacing-64"));
|
|
1017
1017
|
});
|
|
1018
|
-
var StyledFillImage = styled__default.default(Image__default.default)(templateObject_6$
|
|
1019
|
-
var StyledResponsiveImage = styled__default.default(Image__default.default)(templateObject_7$
|
|
1018
|
+
var StyledFillImage = styled__default.default(Image__default.default)(templateObject_6$c || (templateObject_6$c = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n"])), colorFilterStyle, clickStyles, placeholderStyles, function (props) { return styled.css(templateObject_5$f || (templateObject_5$f = tslib.__makeTemplateObject(["\n object-fit: ", ";\n "], ["\n object-fit: ", ";\n "])), props.$objectFit ? props.$objectFit : "contain"); });
|
|
1019
|
+
var StyledResponsiveImage = styled__default.default(Image__default.default)(templateObject_7$6 || (templateObject_7$6 = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n width: 100%;\n height: auto;\n"], ["\n ", "\n ", "\n ", "\n width: 100%;\n height: auto;\n"])), colorFilterStyle, clickStyles, placeholderStyles);
|
|
1020
1020
|
/**
|
|
1021
1021
|
* A wrapper for NextJs's Image component.
|
|
1022
1022
|
*
|
|
@@ -1045,7 +1045,7 @@ var OakImage = function (_a) {
|
|
|
1045
1045
|
return (React__default.default.createElement(OakBox, tslib.__assign({ as: "span", "$display": "block", "$maxWidth": "spacing-0", "$position": $position }, rest),
|
|
1046
1046
|
React__default.default.createElement(StyledResponsiveImage, tslib.__assign({ ref: setImg, as: as !== null && as !== void 0 ? as : Image__default.default, src: src, alt: alt, width: width, height: height, sizes: sizes, unoptimized: unoptimized, "$colorFilter": $colorFilter, placeholder: finalPlaceholder, "$showOakPlaceholder": placeholder === "oak" && showPlaceholder, onLoad: handleComplete(onLoad), onError: handleComplete(onError) }, imageProps))));
|
|
1047
1047
|
};
|
|
1048
|
-
var templateObject_1$
|
|
1048
|
+
var templateObject_1$1V, templateObject_2$T, templateObject_3$B, templateObject_4$n, templateObject_5$f, templateObject_6$c, templateObject_7$6;
|
|
1049
1049
|
|
|
1050
1050
|
/**
|
|
1051
1051
|
* A wrapper around OakImage which uses the image-map.json file to map icon names to image paths.
|
|
@@ -1109,7 +1109,7 @@ var svgMap = {
|
|
|
1109
1109
|
"icon-background": IconBackground,
|
|
1110
1110
|
scribble: Scribble,
|
|
1111
1111
|
};
|
|
1112
|
-
var StyledSvg$2 = styled__default.default.svg(templateObject_1$
|
|
1112
|
+
var StyledSvg$2 = styled__default.default.svg(templateObject_1$1U || (templateObject_1$1U = tslib.__makeTemplateObject(["\n ", ";\n transition: all 0.3s ease;\n"], ["\n ", ";\n transition: all 0.3s ease;\n"])), oakBoxCss);
|
|
1113
1113
|
/**
|
|
1114
1114
|
* This is component used for rendering SVGs that don't belong to be rendered with OakIcon component
|
|
1115
1115
|
* ie. UI elements that are not icons/illustratons but are part of the design system (underline, etc)
|
|
@@ -1121,7 +1121,7 @@ var OakSvg = function (props) {
|
|
|
1121
1121
|
};
|
|
1122
1122
|
return (React__default.default.createElement(StyledSvg$2, tslib.__assign({ "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: "100%", height: "100%" }, props), getSvgByName(props.name)));
|
|
1123
1123
|
};
|
|
1124
|
-
var templateObject_1$
|
|
1124
|
+
var templateObject_1$1U;
|
|
1125
1125
|
|
|
1126
1126
|
/**
|
|
1127
1127
|
* A wrapper around `OakIcon` which applies a rounded background.
|
|
@@ -1338,12 +1338,12 @@ function parseBorderWidth(value) {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
1340
|
|
|
1341
|
-
var colorFillStyle = styled.css(templateObject_1$
|
|
1341
|
+
var colorFillStyle = styled.css(templateObject_1$1T || (templateObject_1$1T = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("fill", function (props) { return props.$fill; }, parseColor));
|
|
1342
1342
|
/**
|
|
1343
1343
|
* A styled SVG element with props to apply design tokens to the fill and stroke.
|
|
1344
1344
|
*/
|
|
1345
|
-
var InternalStyledSvg = styled__default.default.svg(templateObject_2$
|
|
1346
|
-
var templateObject_1$
|
|
1345
|
+
var InternalStyledSvg = styled__default.default.svg(templateObject_2$S || (templateObject_2$S = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n"])), colorFillStyle, responsiveStyle("stroke", function (props) { return props.$stroke; }, parseColor), responsiveStyle("stroke-width", function (props) { return props.$strokeWidth; }, parseBorderWidth));
|
|
1346
|
+
var templateObject_1$1T, templateObject_2$S;
|
|
1347
1347
|
|
|
1348
1348
|
var HandDrawnHRSvg = function (props) {
|
|
1349
1349
|
return (React__default.default.createElement(InternalStyledSvg, tslib.__assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 866 8", preserveAspectRatio: "none", height: "100%", width: "100%" }, props),
|
|
@@ -1351,8 +1351,8 @@ var HandDrawnHRSvg = function (props) {
|
|
|
1351
1351
|
React__default.default.createElement("path", { d: "M865.845 2.15897C865.975 1.74492 865.563 1.33087 864.955 1.33087C788.833 1.21257 638.585 4.00739 558.84 1.30129C560.814 1.22736 562.55 1.36044 563.287 1.18299C546.019 0.946396 526.408 1.10906 509.119 1.44917C530.292 -0.0295749 543.785 1.41959 562.289 0.931608C559.556 0.872458 545.347 0.842884 554.436 0.798521C547.538 0.369686 533.003 0.754159 530.27 0.621072C522.113 0.177449 549.794 0.724584 549.23 0.399261C544.219 0.0295749 524.586 0.295749 522.937 0C522.959 0.369686 522.352 0.295749 522.612 0.399261C423.669 0.724584 317.892 0.340111 218.666 0.828096C218.861 0.828096 219.013 0.828096 219.078 0.857671C218.753 0.902033 217.451 0.857671 218.579 0.828096C154.909 1.71534 98.6582 -0.502773 49.7396 2.18854C59.3281 0.0887246 12.145 1.39002 8.34861 1.52311C2.75172 1.44917 6.69991 1.96673 8.13168 1.67098C8.43539 2.91312 0.799314 1.73013 2.20938 3.12015C-18.7247 12.7024 115.622 4.7024 130.504 6.96488C127.011 6.21072 147.056 7.34935 148.705 6.93531C147.859 6.89094 146.362 6.78743 144.692 6.75786C140.396 6.72828 151.525 6.07763 149.486 6.93531C150.354 7.18669 153.282 6.44732 152.935 6.93531C154.714 7.06839 166.385 5.75231 158.814 6.92052C165.647 6.52126 168.077 7.68946 162.046 6.26987C222.332 7.55638 283.247 5.8854 342.34 6.29945C458.66 5.97412 569.839 6.10721 682.124 6.69871C679.932 6.22551 684.532 6.07763 683.36 6.69871C715.076 6.71349 731.801 6.81701 762.432 6.99446C757.486 6.72828 758.68 6.13678 763.821 6.55083C784.278 7.51202 841.353 7.73383 863.784 6.96488C863.35 6.68392 864.804 6.77264 864.782 6.92052C864.955 5.84104 865.259 5.84104 864.717 5.95934C864.76 5.95934 863.697 6.32902 864.001 5.73752C864.153 5.44177 864.999 5.60444 864.088 5.30869C864.652 5.30869 866.192 4.90943 864.608 5.02773C861.723 4.17006 866.778 4.99815 865.91 4.42144C865.519 4.12569 865.606 2.95749 865.845 2.15897ZM526.43 0.606285C528.448 0.650647 526.539 0.754159 525.476 0.606285C524.825 0.547135 525.042 0.547135 526.43 0.606285ZM17.0694 1.61183C17.0694 1.61183 17.3731 1.58226 17.308 1.62662C17.2646 1.6414 17.0694 1.6414 17.0694 1.61183ZM18.0889 1.15342C18.1974 1.15342 18.2408 1.15342 18.3059 1.16821H17.8286C17.8286 1.16821 17.9805 1.15342 18.0889 1.15342ZM18.371 1.41959C18.371 1.41959 18.3059 1.40481 18.371 1.39002V1.41959ZM36.8971 2.04067C30.6928 1.68577 40.9321 1.62662 42.6242 2.08503C42.4072 2.08503 37.4611 2.04067 36.8971 2.04067ZM63.6451 1.34566C67.5933 1.34566 62.4302 1.41959 61.736 1.36044C62.018 1.34566 62.8641 1.34566 63.6451 1.34566ZM84.8395 3.88909C84.5141 3.88909 84.6226 3.87431 84.8395 3.87431V3.88909ZM92.1068 1.58226C80.2405 2.24769 61.6926 1.878 59.0461 1.61183C67.2028 1.43438 85.2734 1.52311 95.3608 1.47874C94.3629 1.47874 93.2565 1.52311 92.1068 1.58226ZM97.183 2.41035C96.6841 2.38078 97.5084 2.30684 97.4867 2.41035C97.4867 2.41035 97.3566 2.41035 97.183 2.41035ZM95.9899 1.47874C96.8142 1.44917 97.5518 1.46396 98.1809 1.47874C97.5084 1.49353 96.7709 1.49353 95.9899 1.47874ZM100.589 1.53789C100.589 1.53789 99.7862 1.50832 98.5714 1.47874C100.415 1.50832 101.348 1.46396 102.368 1.52311C102.238 1.53789 101.587 1.53789 100.589 1.53789ZM101.869 1.18299C101.869 1.18299 102.997 1.15342 103.105 1.18299C102.867 1.21257 101.999 1.21257 101.869 1.18299ZM107.704 1.84843C107.704 1.84843 107.509 1.84843 107.422 1.83364C107.769 1.83364 107.856 1.83364 107.704 1.84843ZM139.29 1.21257C138.704 1.18299 139.767 1.13863 139.724 1.18299C139.659 1.19778 139.463 1.21257 139.29 1.21257ZM141.633 5.6488C140.982 5.6488 141.199 5.60444 141.633 5.61922V5.6488ZM177.882 6.50647C162.654 6.71349 183.132 5.97412 183.588 5.73752C183.588 5.78189 181.006 6.50647 177.882 6.50647ZM185.779 0.946396H184.564C183.631 0.916821 186.56 0.931608 185.779 0.946396ZM209.945 1.00555C210.488 0.975971 210.813 0.975971 211.355 1.00555C212.18 1.02033 209.099 1.02033 209.945 1.00555ZM202.244 6.41775C199.077 6.46211 192.873 6.50647 188.989 6.66913C187.818 5.67837 202.873 6.38817 202.244 6.41775ZM213.264 6.41775C212.874 6.46211 208.492 6.46211 208.231 6.43253C207.667 6.50647 214.175 5.45656 213.264 6.41775ZM218.905 6.19593C218.601 6.19593 215.434 6.38817 215.087 6.38817C215.412 6.28466 220.336 6.01849 218.905 6.19593ZM226.801 0.857671C226.953 0.842884 227.343 0.842884 227.495 0.857671C227.3 0.872458 226.996 0.872458 226.801 0.857671ZM256.152 0.768946C258.018 0.768946 255.914 0.783734 255.588 0.783734C255.718 0.768946 255.914 0.768946 256.152 0.768946ZM252.855 4.00739C252.291 3.97782 254.742 3.26802 254.634 3.62292C254.46 3.66728 253.115 4.05176 252.855 4.00739ZM257.757 4.99815C257.302 4.92422 255.415 4.33272 254.677 4.43623C255.501 4.24399 258.625 4.87985 257.757 4.99815ZM254.785 3.46026C255.133 3.43068 257.541 3.38632 257.259 3.43068C257.888 3.46026 254.937 3.48983 254.785 3.46026ZM259.363 3.59335C258.669 3.59335 257.757 3.10536 257.757 3.07579C257.974 3.07579 261.836 2.88355 259.363 3.59335ZM258.886 2.01109C256.456 2.04067 254.72 1.65619 254.417 1.62662C253.332 1.44917 266.543 1.70055 258.886 2.01109ZM264.157 4.64325L263.181 4.02218C262.226 3.44547 265.35 4.40665 264.157 4.64325ZM289.712 3.50462C290.71 3.50462 291.686 4.24399 290.948 4.25878C288.432 3.90388 285.655 2.91312 289.712 3.50462ZM271.424 2.20333C273.203 2.45471 281.577 1.00555 275.394 2.54344C275.763 2.42514 267.389 2.15897 271.424 2.20333ZM275.893 3.12015C276.717 2.79482 278.345 3.6525 278.019 4.09612C277.542 4.09612 275.893 3.20887 275.893 3.12015ZM284.223 2.97227C281.447 2.45471 286.935 2.21811 287.022 2.07024C287.022 2.1146 285.351 3.01664 284.223 2.97227ZM290.862 5.36784C288.822 5.36784 287.477 5.33826 287.477 5.33826C286.653 3.91867 298.172 6.0037 290.862 5.36784ZM296.719 5.07209C293.053 4.39187 298.671 4.5841 298.91 4.61368C298.91 4.64325 297.717 5.07209 296.719 5.07209ZM317.219 3.43068C320.126 4.62847 316.178 3.7708 315.744 3.4159C315.917 3.38632 316.612 3.40111 317.219 3.43068ZM304.702 4.39187C302.967 5.13124 304.116 4.03697 304.42 3.93346C305.526 3.69686 306.459 4.12569 304.702 4.39187ZM307.587 3.35675C307.457 3.16451 302.858 2.43993 305.808 2.67653C306.741 2.5878 307.001 2.7061 305.895 2.67653C306.958 2.7061 307.978 3.32717 307.587 3.35675ZM310.928 2.54344C309.561 2.54344 311.253 1.78928 312.533 1.98152C312.403 1.9963 311.362 2.54344 310.928 2.54344ZM319.649 5.56007C320.343 5.58965 309.323 5.66359 314.572 5.54529C317.284 6.31423 322.751 2.98706 319.649 5.56007ZM329.411 5.24954C326.808 5.27911 331.884 4.64325 331.992 4.61368C332.339 4.67283 330.235 5.2939 329.411 5.24954ZM335.355 2.24769C334.704 2.01109 338.023 2.5878 338.413 2.29205C338.023 2.41035 335.897 3.00185 335.355 2.24769ZM346.201 4.12569C343.338 4.12569 344.097 3.97782 346.57 3.82994C349.499 4.52495 348.696 4.42144 346.201 4.12569ZM359.977 3.01664C359.977 3.01664 355.421 3.07579 355.248 3.061C355.226 3.19409 362.211 1.49353 359.977 3.01664ZM413.364 0.902033C414.102 0.857671 414.492 0.872459 414.536 0.902033C415.555 1.70055 411.889 0.842884 413.364 0.902033ZM371.886 1.52311C370.238 2.51386 367.656 1.52311 365.704 1.52311C365.704 1.47874 371.322 1.46396 371.886 1.52311ZM364.966 3.03142C363.816 3.87431 362.905 3.81516 364.25 2.60259C365.205 1.90758 366.919 2.01109 364.966 3.03142ZM370.954 6.01849C369.999 6.01849 366.81 6.01848 366.485 5.91497C367.266 5.8854 375.574 4.92422 370.954 6.01849ZM378.546 6.01849C375.943 5.90019 376.117 5.2939 377.722 5.4122C379.956 5.23475 382.581 5.50093 378.546 6.01849ZM387.267 3.57856C386.312 3.56377 386.963 2.76525 388.178 2.76525C390.413 2.98706 389.87 3.51941 387.267 3.57856ZM393.623 1.80407C389.545 1.58226 393.341 1.12384 394.795 1.34566C397.506 1.00555 397.745 1.37523 393.623 1.80407ZM401.303 5.84104C396.942 5.87061 401.216 5.38263 402.734 5.24954C403.429 5.2939 402.301 5.84104 401.303 5.84104ZM405.207 4.03697C405.164 4.14048 404.904 4.52495 403.472 4.02218C400.934 2.76525 406.162 3.82995 405.207 4.03697ZM408.722 4.11091C407.116 4.11091 404.253 3.68207 407.42 3.68207C407.746 2.60259 410.761 3.93346 408.722 4.11091ZM410.848 1.62662C409.958 1.46396 406.704 1.16821 409.546 0.680222C410.11 0.680222 413.581 1.81885 410.848 1.62662ZM412.93 5.4122C413.147 5.38263 414.232 4.33272 415.902 4.85028L412.93 5.4122ZM429.027 0.857671C430.393 0.857671 434.71 0.813309 435.708 0.887246C436.424 1.25693 425.643 2.52865 429.027 0.857671ZM437.878 0.857671C438.181 0.813309 439.309 0.828096 439.591 0.916821C431.587 2.83919 437.14 0.946396 437.878 0.857671ZM451.653 5.35305C451.176 5.35305 448.898 4.83549 448.898 4.80592C448.898 4.79113 450.807 4.5841 451.111 4.5841C453.562 4.65804 452.412 5.44177 451.653 5.35305ZM480.245 3.4159C478.661 3.6525 474.822 3.6525 474.822 3.4159C474.149 3.38632 481.568 3.14972 480.245 3.4159ZM485.69 5.32348C473.325 5.45656 491.829 4.64325 490.983 5.0573C490.983 5.23475 491.46 5.23475 485.69 5.32348ZM495.018 2.51386C494.454 2.51386 493.977 2.43993 493.977 2.36599C494.194 1.98152 497.252 2.45471 495.018 2.51386ZM502.524 2.26248C502.307 2.45471 501.656 2.49908 500.159 2.60259C492.285 2.85397 502.871 1.65619 502.524 2.26248ZM506.429 2.39556C510.377 2.3512 507.275 2.89834 505.105 2.41035C505.214 2.39556 505.648 2.39556 506.429 2.39556ZM506.559 3.13494C507.926 3.13494 509.01 3.22366 509.01 3.31238C508.338 3.4159 501.136 3.12015 506.559 3.13494ZM522.243 5.75231C518.36 6.38817 511.418 5.91497 507.253 5.4122C510.16 5.66359 522.547 5.33826 522.243 5.75231ZM590.057 3.48983C589.319 3.59335 587.128 3.59335 586.391 3.48983C587.367 3.2976 588.972 3.31238 590.057 3.48983ZM582.551 2.20333C586.109 1.98152 588.083 1.98152 588.083 2.20333C588.777 2.41035 577.019 2.61738 582.551 2.20333ZM564.545 1.71534C566.302 1.71534 566.064 2.83919 564.155 2.07024C563.699 1.86322 563.374 1.67098 564.545 1.71534ZM558.84 1.71534C560.619 1.7597 562.007 1.83364 563.049 2.07024C561.899 2.29205 549.273 1.70055 558.84 1.71534ZM553.438 3.72643C543.893 3.4159 556.107 3.20887 556.801 3.72643C556.801 3.87431 555.564 3.87431 553.438 3.72643ZM562.897 3.23845C561.205 3.26802 556.15 2.92791 560.749 2.89834C562.398 2.86876 567.474 3.19409 562.897 3.23845ZM567.17 2.54344C565.261 2.54344 563.96 2.54344 563.504 2.4695C565.977 2.17375 576.846 2.57301 567.17 2.54344ZM573.939 5.51571C571.704 5.51571 569.708 5.42699 569.708 5.35305C570.62 4.89464 582.79 5.45656 573.939 5.51571ZM588.885 5.67837C588.712 5.87061 575.37 6.15157 583.354 5.57486C586.911 5.23475 590.859 5.33826 588.885 5.67837ZM595.979 4.09612C594.678 4.18484 594.743 5.14603 593.137 3.99261C593.051 3.99261 587.28 4.37708 587.193 4.37708C588.517 3.50462 594.981 3.80037 595.979 4.09612ZM602.444 2.49908C606.913 2.54344 602.097 2.61738 600.795 2.52865C600.795 2.52865 601.489 2.49908 602.444 2.49908ZM601.576 4.53974C601.12 4.53974 600.556 4.4658 600.405 4.37708C599.428 3.66728 603.767 4.76155 601.576 4.53974ZM605.112 4.42144C603.724 4.42144 602.769 4.25878 602.422 4.09612C602.986 3.44547 611.468 4.28836 605.112 4.42144ZM622.315 5.24954C616.544 5.14603 619.365 3.68207 624.311 4.74677C626.09 4.99815 625.612 5.24954 622.315 5.24954ZM654.269 2.97227C655.788 2.8244 656.482 2.8244 657.068 2.97227C657.849 3.1793 651.926 3.13494 654.269 2.97227ZM651.124 2.39556C656.243 2.43993 650.712 2.5878 649.714 2.52865C648.651 2.39556 649.28 2.39556 651.124 2.39556ZM633.943 5.51571C634.767 5.11645 637.066 5.13124 637.826 5.51571C636.763 5.7671 635.006 5.7671 633.943 5.51571ZM646.047 3.97782C638.368 3.59335 651.774 3.72643 653.553 3.97782C660.907 4.89464 647.241 4.25878 646.047 3.97782ZM653.271 5.97412C652.859 5.72274 661.211 5.73752 660.777 5.97412C660.322 6.34381 654.031 6.16636 653.271 5.97412ZM667.611 3.09057C661.276 3.2976 665.398 1.89279 669.563 2.92791C670.691 3.09057 670.236 3.09057 667.611 3.09057ZM676.18 6.3586C675.789 6.38817 669.715 6.53605 669.476 6.38817C670.214 5.91497 676.245 6.37338 676.657 6.3586C676.375 6.38817 676.223 6.3586 676.18 6.3586ZM683.121 4.21442C682.774 4.21442 682.514 4.03697 682.514 3.85952C682.579 2.83919 684.814 4.3475 683.121 4.21442ZM696.875 5.5305C694.445 5.75231 693.122 5.75231 693.122 5.5305C692.558 5.32348 700.476 5.11645 696.875 5.5305ZM699.283 4.61368C691.17 4.48059 701.713 3.99261 702.754 4.49538C702.754 4.49538 701.257 4.61368 699.283 4.61368ZM701.474 3.80037C693.231 3.84473 704.598 3.1793 705.205 3.66728C705.205 3.80037 703.643 3.80037 701.474 3.80037ZM706.03 5.81146C705.27 5.11645 709.436 5.70795 709.327 5.81146C709.978 6.16636 706.811 6.16636 706.03 5.81146ZM716.746 6.56562C716.985 6.90573 706.919 6.50647 711.844 6.26987C714.815 6.122 717.679 6.26987 716.746 6.56562ZM718.091 4.22921C714.75 4.19963 714.707 3.72643 718.091 3.82994C721.28 3.72643 721.237 4.19963 718.091 4.22921ZM770.459 3.20887C772.455 3.20887 773.995 3.44547 773.995 3.68207C772.889 4.56932 763.083 3.25324 770.459 3.20887ZM730.934 4.08133C730.5 4.08133 730.76 3.96303 731.715 3.84473C736.856 3.28281 732.322 4.36229 730.934 4.08133ZM735.663 6.49168C732.799 6.49168 732.799 5.95934 735.663 5.95934C738.44 5.95934 738.44 6.49168 735.663 6.49168ZM737.854 4.49538C736.986 4.49538 736.27 4.42144 736.27 4.34751C735.771 4.09612 741.108 4.45102 737.854 4.49538ZM738.591 3.97782C737.767 3.97782 736.682 3.94824 736.27 3.84473C736.791 3.68207 744.687 3.91867 738.591 3.97782ZM756.922 5.5305C723.276 5.90019 765.556 4.73198 769.83 5.33826C769.83 5.33826 763.843 5.5305 756.922 5.5305ZM767.726 6.83179C758.745 6.56562 775.687 6.68392 775.34 6.83179C776.056 6.96488 772.997 6.96488 767.726 6.83179ZM785.124 4.96858C784.451 5.73752 778.572 6.75786 782.022 5.78189C782.868 5.54529 788.009 3.60813 785.124 4.96858ZM787.705 6.4769C789.289 6.04806 793.454 6.07763 795.016 6.4769C793.02 6.75786 789.701 6.75786 787.705 6.4769ZM808.206 5.87061C802.066 5.47135 813.868 4.61368 811.633 5.58965C811.633 6.13678 811.112 6.13678 808.206 5.87061ZM839.986 5.57486C838.229 5.57486 836.559 5.57486 836.277 5.4122C836.993 4.53974 847.601 5.58965 839.986 5.57486ZM858.404 5.94455C847.839 5.7671 869.988 0.635859 859.163 5.7671C858.361 6.21072 859.163 6.4769 858.404 5.94455ZM862.461 5.8854C862.461 5.97412 859.424 6.40296 859.185 6.37338C860.009 6.22551 863.61 4.15527 862.461 5.8854ZM864.088 5.07209C864.088 5.07209 864.174 5.04251 864.218 5.04251C864.348 5.14603 863.914 5.19039 864.088 5.07209Z", fill: "inherit" }))));
|
|
1352
1352
|
};
|
|
1353
1353
|
|
|
1354
|
-
var flexStyle = styled.css(templateObject_1$
|
|
1355
|
-
var templateObject_1$
|
|
1354
|
+
var flexStyle = styled.css(templateObject_1$1S || (templateObject_1$1S = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), responsiveStyle("display", function (props) { var _a; return (_a = props.$display) !== null && _a !== void 0 ? _a : "flex"; }), responsiveStyle("flex-direction", function (props) { return props.$flexDirection; }), responsiveStyle("flex-wrap", function (props) { return props.$flexWrap; }), responsiveStyle("align-items", function (props) { return props.$alignItems; }), responsiveStyle("align-content", function (props) { return props.$alignContent; }), responsiveStyle("justify-content", function (props) { return props.$justifyContent; }), responsiveStyle("align-self", function (props) { return props.$alignSelf; }), responsiveStyle("order", function (props) { return props.$order; }), responsiveStyle("flex-grow", function (props) { return props.$flexGrow; }), responsiveStyle("flex-shrink", function (props) { return props.$flexShrink; }), responsiveStyle("flex-basis", function (props) { return props.$flexBasis; }, parseSpacing), responsiveStyle("gap", function (props) { return props.$gap; }, parseSpacing), responsiveStyle("column-gap", function (props) { return props.$columnGap; }, parseSpacing), responsiveStyle("row-gap", function (props) { return props.$rowGap; }, parseSpacing));
|
|
1355
|
+
var templateObject_1$1S;
|
|
1356
1356
|
|
|
1357
1357
|
var oakFlexCss = flexStyle;
|
|
1358
1358
|
/**
|
|
@@ -1363,10 +1363,10 @@ var oakFlexCss = flexStyle;
|
|
|
1363
1363
|
* Before adding props to this component, think about whether it makes sense
|
|
1364
1364
|
* to add it to Box instead, as this component extends that.
|
|
1365
1365
|
*/
|
|
1366
|
-
var OakFlex = styled__default.default(OakBox)(templateObject_1$
|
|
1367
|
-
var templateObject_1$
|
|
1366
|
+
var OakFlex = styled__default.default(OakBox)(templateObject_1$1R || (templateObject_1$1R = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), flexStyle);
|
|
1367
|
+
var templateObject_1$1R;
|
|
1368
1368
|
|
|
1369
|
-
var StyledOakFlex$5 = styled__default.default(OakFlex)(templateObject_1$
|
|
1369
|
+
var StyledOakFlex$5 = styled__default.default(OakFlex)(templateObject_1$1Q || (templateObject_1$1Q = tslib.__makeTemplateObject([""], [""])));
|
|
1370
1370
|
/**
|
|
1371
1371
|
* A Drawn HR svg inside a flex container
|
|
1372
1372
|
*
|
|
@@ -1379,7 +1379,7 @@ var OakHandDrawnHR = function (props) {
|
|
|
1379
1379
|
return (React__default.default.createElement(StyledOakFlex$5, tslib.__assign({ focusable: false }, flexProps),
|
|
1380
1380
|
React__default.default.createElement(HandDrawnHRSvg, { "$fill": hrColor })));
|
|
1381
1381
|
};
|
|
1382
|
-
var templateObject_1$
|
|
1382
|
+
var templateObject_1$1Q;
|
|
1383
1383
|
|
|
1384
1384
|
var DropdownContext = React.createContext(null);
|
|
1385
1385
|
var OakButtonWithDropdownProvider = function (_a) {
|
|
@@ -1393,10 +1393,10 @@ var OakButtonWithDropdownProvider = function (_a) {
|
|
|
1393
1393
|
* ## Usage
|
|
1394
1394
|
* Use this component when you want to apply styles to a piece of inline text.
|
|
1395
1395
|
*/
|
|
1396
|
-
var OakSpan = styled__default.default.span(templateObject_1$
|
|
1397
|
-
var templateObject_1$
|
|
1396
|
+
var OakSpan = styled__default.default.span(templateObject_1$1P || (templateObject_1$1P = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), colorStyle, opacityStyle, marginStyle, paddingStyle, borderStyle, typographyStyle, positionStyle);
|
|
1397
|
+
var templateObject_1$1P;
|
|
1398
1398
|
|
|
1399
|
-
var internalButtonCss = styled.css(templateObject_1$
|
|
1399
|
+
var internalButtonCss = styled.css(templateObject_1$1O || (templateObject_1$1O = tslib.__makeTemplateObject(["\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n"], ["\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n"])), typographyStyle, colorStyle, spacingStyle, displayStyle, borderStyle, dropShadowStyle);
|
|
1400
1400
|
var UnstyledInternalButton = function (props) {
|
|
1401
1401
|
var onClick = props.onClick, onHovered = props.onHovered, _a = props.element, Component = _a === void 0 ? "button" : _a, rest = tslib.__rest(props, ["onClick", "onHovered", "element"]);
|
|
1402
1402
|
var hoverStart = React.useRef(null);
|
|
@@ -1434,10 +1434,10 @@ var UnstyledInternalButton = function (props) {
|
|
|
1434
1434
|
*
|
|
1435
1435
|
* NB. We must export a styled component for it to be inheritable
|
|
1436
1436
|
*/
|
|
1437
|
-
var InternalButton = styled__default.default(UnstyledInternalButton)(templateObject_2$
|
|
1438
|
-
var templateObject_1$
|
|
1437
|
+
var InternalButton = styled__default.default(UnstyledInternalButton)(templateObject_2$R || (templateObject_2$R = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), internalButtonCss);
|
|
1438
|
+
var templateObject_1$1O, templateObject_2$R;
|
|
1439
1439
|
|
|
1440
|
-
var screenReaderStyle = styled.css(templateObject_1$
|
|
1440
|
+
var screenReaderStyle = styled.css(templateObject_1$1N || (templateObject_1$1N = tslib.__makeTemplateObject(["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n"], ["\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n"])));
|
|
1441
1441
|
/**
|
|
1442
1442
|
* This component will visually hide its contents but will still be available
|
|
1443
1443
|
* to screen readers, assitive technology, and scrapers.
|
|
@@ -1445,28 +1445,28 @@ var screenReaderStyle = styled.css(templateObject_1$1M || (templateObject_1$1M =
|
|
|
1445
1445
|
* Use this component in places where content shouldn't be visible, but should
|
|
1446
1446
|
* be accessible to assistive technology.
|
|
1447
1447
|
*/
|
|
1448
|
-
var OakScreenReader = styled__default.default.span(templateObject_2$
|
|
1449
|
-
var templateObject_1$
|
|
1448
|
+
var OakScreenReader = styled__default.default.span(templateObject_2$Q || (templateObject_2$Q = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), screenReaderStyle);
|
|
1449
|
+
var templateObject_1$1N, templateObject_2$Q;
|
|
1450
1450
|
|
|
1451
|
-
var SpinnerKeyframe = styled.keyframes(templateObject_1$
|
|
1452
|
-
var DelayedShow = styled.keyframes(templateObject_2$
|
|
1453
|
-
var StyledLoadingSpinner = styled__default.default.span(templateObject_5$
|
|
1451
|
+
var SpinnerKeyframe = styled.keyframes(templateObject_1$1M || (templateObject_1$1M = tslib.__makeTemplateObject(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"], ["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])));
|
|
1452
|
+
var DelayedShow = styled.keyframes(templateObject_2$P || (templateObject_2$P = tslib.__makeTemplateObject(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"], ["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"])));
|
|
1453
|
+
var StyledLoadingSpinner = styled__default.default.span(templateObject_5$e || (templateObject_5$e = tslib.__makeTemplateObject(["\n ", "\n ", "\n --inner-width: calc(var(--width) / 10 * 8);\n --thickness: calc(var(--width) / 12);\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--width);\n ", "\n"], ["\n ", "\n ", "\n --inner-width: calc(var(--width) / 10 * 8);\n --thickness: calc(var(--width) / 12);\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--width);\n ", "\n"])), function (props) {
|
|
1454
1454
|
return props.$width
|
|
1455
1455
|
? responsiveStyle("--width", function (props) { return props.$width; }, parseSpacing)
|
|
1456
|
-
: styled.css(templateObject_3$
|
|
1456
|
+
: styled.css(templateObject_3$A || (templateObject_3$A = tslib.__makeTemplateObject(["\n --width: 1.25rem;\n "], ["\n --width: 1.25rem;\n "])));
|
|
1457
1457
|
}, function (_a) {
|
|
1458
1458
|
var $delay = _a.$delay;
|
|
1459
1459
|
if ($delay) {
|
|
1460
|
-
return styled.css(templateObject_4$
|
|
1460
|
+
return styled.css(templateObject_4$m || (templateObject_4$m = tslib.__makeTemplateObject(["\n opacity: 0;\n animation: ", " 0s;\n animation-delay: ", "s;\n animation-fill-mode: forwards;\n "], ["\n opacity: 0;\n animation: ", " 0s;\n animation-delay: ", "s;\n animation-fill-mode: forwards;\n "])), DelayedShow, $delay / 1000);
|
|
1461
1461
|
}
|
|
1462
1462
|
}, colorStyle);
|
|
1463
|
-
var StyledSpinnerRing = styled__default.default.div(templateObject_8 || (templateObject_8 = tslib.__makeTemplateObject(["\n width: var(--inner-width);\n height: var(--inner-width);\n border-radius: 50%;\n border: var(--thickness) solid;\n ", "\n animation: ", " 1.2s linear infinite;\n"], ["\n width: var(--inner-width);\n height: var(--inner-width);\n border-radius: 50%;\n border: var(--thickness) solid;\n ", "\n animation: ", " 1.2s linear infinite;\n"])), function (props) {
|
|
1463
|
+
var StyledSpinnerRing = styled__default.default.div(templateObject_8$1 || (templateObject_8$1 = tslib.__makeTemplateObject(["\n width: var(--inner-width);\n height: var(--inner-width);\n border-radius: 50%;\n border: var(--thickness) solid;\n ", "\n animation: ", " 1.2s linear infinite;\n"], ["\n width: var(--inner-width);\n height: var(--inner-width);\n border-radius: 50%;\n border: var(--thickness) solid;\n ", "\n animation: ", " 1.2s linear infinite;\n"])), function (props) {
|
|
1464
1464
|
if (props.$loaderColor) {
|
|
1465
1465
|
var colorVal = parseColor(props.$loaderColor);
|
|
1466
1466
|
var resolvedColor = typeof colorVal === "function" ? colorVal(props) : colorVal;
|
|
1467
|
-
return styled.css(templateObject_6$
|
|
1467
|
+
return styled.css(templateObject_6$b || (templateObject_6$b = tslib.__makeTemplateObject(["\n border-color: ", " ", " ", "\n transparent;\n "], ["\n border-color: ", " ", " ", "\n transparent;\n "])), resolvedColor, resolvedColor, resolvedColor);
|
|
1468
1468
|
}
|
|
1469
|
-
return styled.css(templateObject_7$
|
|
1469
|
+
return styled.css(templateObject_7$5 || (templateObject_7$5 = tslib.__makeTemplateObject(["\n border-color: currentcolor currentcolor currentcolor transparent;\n "], ["\n border-color: currentcolor currentcolor currentcolor transparent;\n "])));
|
|
1470
1470
|
}, SpinnerKeyframe);
|
|
1471
1471
|
/**
|
|
1472
1472
|
*
|
|
@@ -1479,11 +1479,11 @@ var OakLoadingSpinner = function (_a) {
|
|
|
1479
1479
|
React__default.default.createElement(OakScreenReader, null, "Loading"),
|
|
1480
1480
|
React__default.default.createElement(StyledSpinnerRing, { "$loaderColor": loaderColor })));
|
|
1481
1481
|
};
|
|
1482
|
-
var templateObject_1$
|
|
1482
|
+
var templateObject_1$1M, templateObject_2$P, templateObject_3$A, templateObject_4$m, templateObject_5$e, templateObject_6$b, templateObject_7$5, templateObject_8$1;
|
|
1483
1483
|
|
|
1484
|
-
var StyledInternalButton$5 = styled__default.default(InternalButton)(templateObject_2$
|
|
1485
|
-
var StyledOakSvg$1 = styled__default.default(OakSvg)(templateObject_3$
|
|
1486
|
-
var StyledButtonWrapper$3 = styled__default.default(OakBox)(templateObject_4$
|
|
1484
|
+
var StyledInternalButton$5 = styled__default.default(InternalButton)(templateObject_2$O || (templateObject_2$O = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n"])), positionStyle, sizeStyle, function (props) { return styled.css(templateObject_1$1L || (templateObject_1$1L = tslib.__makeTemplateObject(["\n &:hover {\n text-decoration: ", ";\n color: ", ";\n background: ", ";\n border-color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n &:active {\n background: ", ";\n border-color: ", ";\n color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n &:disabled {\n background: ", ";\n border-color: ", ";\n color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n "], ["\n &:hover {\n text-decoration: ", ";\n color: ", ";\n background: ", ";\n border-color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n &:active {\n background: ", ";\n border-color: ", ";\n color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n &:disabled {\n background: ", ";\n border-color: ", ";\n color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n "])), props.$hoverUnderline ? "underline" : "none", parseColor(props.$hoverTextColor), parseColor(props.$hoverBackground), parseColor(props.$hoverBorderColor), parseColor(props.$defaultBackground), parseColor(props.$defaultBorderColor), parseColor(props.$defaultTextColor), parseColor(props.$disabledBackground), parseColor(props.$disabledBorderColor), parseColor(props.$disabledTextColor)); });
|
|
1485
|
+
var StyledOakSvg$1 = styled__default.default(OakSvg)(templateObject_3$z || (templateObject_3$z = tslib.__makeTemplateObject(["\n bottom: -3px;\n left: 0px;\n position: absolute;\n height: 5px;\n color: ", ";\n"], ["\n bottom: -3px;\n left: 0px;\n position: absolute;\n height: 5px;\n color: ", ";\n"])), parseColor("border-decorative1"));
|
|
1486
|
+
var StyledButtonWrapper$3 = styled__default.default(OakBox)(templateObject_4$l || (templateObject_4$l = tslib.__makeTemplateObject(["\n .grey-shadow:has(+ * + .internal-button:focus-visible) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:focus-visible) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:hover),\n .yellow-shadow:has(+ .internal-button:hover:not(:focus-visible, :active)) {\n box-shadow: ", ";\n }\n .grey-shadow:has(+ * + .internal-button:hover) {\n box-shadow: none;\n }\n .grey-shadow:has(+ * + .internal-button:active) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:active) {\n box-shadow: ", ";\n }\n"], ["\n .grey-shadow:has(+ * + .internal-button:focus-visible) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:focus-visible) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:hover),\n .yellow-shadow:has(+ .internal-button:hover:not(:focus-visible, :active)) {\n box-shadow: ", ";\n }\n .grey-shadow:has(+ * + .internal-button:hover) {\n box-shadow: none;\n }\n .grey-shadow:has(+ * + .internal-button:active) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:active) {\n box-shadow: ", ";\n }\n"])), parseDropShadow("drop-shadow-centered-grey"), parseDropShadow("drop-shadow-centered-lemon"), function (props) { return parseDropShadow(props.$hoverShadow); }, parseDropShadow("drop-shadow-grey"), parseDropShadow("drop-shadow-lemon"));
|
|
1487
1487
|
/**
|
|
1488
1488
|
*
|
|
1489
1489
|
* A styled rectangular button, not intended to be used directly.
|
|
@@ -1519,7 +1519,7 @@ var TextWithUnderline$1 = function (_a) {
|
|
|
1519
1519
|
React__default.default.createElement(OakSpan, { "$font": font }, children),
|
|
1520
1520
|
React__default.default.createElement(StyledOakSvg$1, { name: "underline", "data-state": "selected", "data-testid": "selected-underline" })));
|
|
1521
1521
|
};
|
|
1522
|
-
var templateObject_1$
|
|
1522
|
+
var templateObject_1$1L, templateObject_2$O, templateObject_3$z, templateObject_4$l;
|
|
1523
1523
|
|
|
1524
1524
|
/**
|
|
1525
1525
|
*
|
|
@@ -1656,10 +1656,10 @@ var useDropdownContext = function () {
|
|
|
1656
1656
|
return dropdownValue;
|
|
1657
1657
|
};
|
|
1658
1658
|
|
|
1659
|
-
var StyledInternalButton$4 = styled__default.default(InternalButton)(templateObject_2$
|
|
1659
|
+
var StyledInternalButton$4 = styled__default.default(InternalButton)(templateObject_2$N || (templateObject_2$N = tslib.__makeTemplateObject(["\n display: inline-block;\n ", "\n ", "\n"], ["\n display: inline-block;\n ", "\n ", "\n"])), positionStyle, function (props) { return styled.css(templateObject_1$1K || (templateObject_1$1K = tslib.__makeTemplateObject(["\n &:hover {\n text-decoration: underline;\n color: ", ";\n\n &:not(:active) [data-icon-for=\"button\"] img {\n filter: ", ";\n }\n }\n &:active {\n color: ", ";\n }\n &:disabled {\n color: ", ";\n }\n "], ["\n &:hover {\n text-decoration: underline;\n color: ", ";\n\n &:not(:active) [data-icon-for=\"button\"] img {\n filter: ", ";\n }\n }\n &:active {\n color: ", ";\n }\n &:disabled {\n color: ", ";\n }\n "])), parseColor(props.$hoverTextColor), props.$hoverIconColor
|
|
1660
1660
|
? parseColorFilter(props.$hoverIconColor)
|
|
1661
1661
|
: undefined, parseColor(props.$defaultTextColor), parseColor(props.$disabledTextColor)); });
|
|
1662
|
-
var StyledButtonWrapper$2 = styled__default.default(OakFlex)(templateObject_5$
|
|
1662
|
+
var StyledButtonWrapper$2 = styled__default.default(OakFlex)(templateObject_5$d || (templateObject_5$d = tslib.__makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), function (props) { return styled.css(templateObject_3$y || (templateObject_3$y = tslib.__makeTemplateObject(["\n > :first-of-type:focus-visible .shadow {\n box-shadow:\n ", ",\n ", ";\n }\n > :first-of-type:hover .shadow {\n box-shadow: ", ";\n }\n > :first-of-type:active .shadow {\n box-shadow:\n ", ",\n ", ";\n }\n "], ["\n > :first-of-type:focus-visible .shadow {\n box-shadow:\n ", ",\n ", ";\n }\n > :first-of-type:hover .shadow {\n box-shadow: ", ";\n }\n > :first-of-type:active .shadow {\n box-shadow:\n ", ",\n ", ";\n }\n "])), parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"), parseDropShadow(props.$hoverDropShadow /*"drop-shadow-lemon"*/), parseDropShadow("drop-shadow-lemon"), parseDropShadow("drop-shadow-grey")); }, function (props) { return styled.css(templateObject_4$k || (templateObject_4$k = tslib.__makeTemplateObject(["\n > :first-of-type:disabled .icon-container {\n background: ", ";\n }\n > :first-of-type:hover .icon-container {\n background: ", ";\n }\n > :first-of-type:active .icon-container {\n background: ", ";\n }\n "], ["\n > :first-of-type:disabled .icon-container {\n background: ", ";\n }\n > :first-of-type:hover .icon-container {\n background: ", ";\n }\n > :first-of-type:active .icon-container {\n background: ", ";\n }\n "])), parseColor(props.$disabledIconBackground), parseColor(props.$hoverIconBackground), parseColor(props.$defaultIconBackground)); });
|
|
1663
1663
|
/**
|
|
1664
1664
|
*
|
|
1665
1665
|
* A styled button with round icons, not intended to be used directly.
|
|
@@ -1694,8 +1694,12 @@ var InternalShadowRoundButton = function (props) {
|
|
|
1694
1694
|
React__default.default.createElement(OakSpan, { "$font": "heading-7" }, children),
|
|
1695
1695
|
isTrailingIcon && iconLogic))));
|
|
1696
1696
|
};
|
|
1697
|
-
var templateObject_1$
|
|
1697
|
+
var templateObject_1$1K, templateObject_2$N, templateObject_3$y, templateObject_4$k, templateObject_5$d;
|
|
1698
1698
|
|
|
1699
|
+
var variantColours = {
|
|
1700
|
+
default: { icon: "icon-primary", hoverBackground: "bg-neutral" },
|
|
1701
|
+
inverted: { icon: "icon-inverted", hoverBackground: "bg-btn-primary-hover" },
|
|
1702
|
+
};
|
|
1699
1703
|
/**
|
|
1700
1704
|
*
|
|
1701
1705
|
* An icon button that can be used for closing items such as in navigation menus and modals.
|
|
@@ -1705,8 +1709,9 @@ var templateObject_1$1J, templateObject_2$M, templateObject_3$x, templateObject_
|
|
|
1705
1709
|
*
|
|
1706
1710
|
*/
|
|
1707
1711
|
function OakCloseButton(_a) {
|
|
1708
|
-
var onClose = _a.onClose, rest = tslib.__rest(_a, ["onClose"]);
|
|
1709
|
-
|
|
1712
|
+
var onClose = _a.onClose, _b = _a.size, size = _b === void 0 ? "spacing-24" : _b, _c = _a.variant, variant = _c === void 0 ? "default" : _c, rest = tslib.__rest(_a, ["onClose", "size", "variant"]);
|
|
1713
|
+
var colours = variantColours[variant];
|
|
1714
|
+
return (React__default.default.createElement(InternalShadowRoundButton, tslib.__assign({ onClick: onClose, "aria-label": "Close", defaultIconBackground: "transparent", defaultIconColor: colours.icon, defaultTextColor: "transparent", hoverTextColor: "transparent", disabledTextColor: "transparent", hoverIconBackground: colours.hoverBackground, hoverIconColor: colours.icon, disabledIconBackground: "transparent", iconBackgroundSize: size, iconSize: size, iconName: "cross", hoverDropShadow: null }, rest)));
|
|
1710
1715
|
}
|
|
1711
1716
|
|
|
1712
1717
|
/**
|
|
@@ -1857,10 +1862,10 @@ var OakSmallSecondaryToggleButton = function (_a) {
|
|
|
1857
1862
|
return (React__default.default.createElement(InternalShadowRectButton, tslib.__assign({ element: element !== null && element !== void 0 ? element : "button", defaultBorderColor: defaultBorderColor, defaultBackground: defaultBackground, defaultTextColor: defaultTextColor, hoverBackground: hoverBackground, hoverBorderColor: hoverBorderColor, hoverTextColor: hoverTextColor, disabledBackground: disabledBackground, disabledBorderColor: "text-disabled", disabledTextColor: disabledTextColor, font: "body-3-bold", pv: "spacing-4", ph: "spacing-8", loadingSpinnerSize: "spacing-20", iconGap: "spacing-4", "aria-pressed": toggleOn }, rest)));
|
|
1858
1863
|
};
|
|
1859
1864
|
|
|
1860
|
-
var StyledInternalButton$3 = styled__default.default(InternalButton)(templateObject_2$
|
|
1865
|
+
var StyledInternalButton$3 = styled__default.default(InternalButton)(templateObject_2$M || (templateObject_2$M = tslib.__makeTemplateObject(["\n display: inline-block;\n ", "\n ", "\n ", "\n"], ["\n display: inline-block;\n ", "\n ", "\n ", "\n"])), positionStyle, sizeStyle, function (props) { return styled.css(templateObject_1$1J || (templateObject_1$1J = tslib.__makeTemplateObject(["\n &:hover {\n text-decoration: underline;\n color: ", ";\n\n &:not(:active) [data-icon-for=\"button\"] img {\n filter: ", ";\n }\n }\n &:active {\n color: ", ";\n }\n &:disabled {\n color: ", ";\n }\n "], ["\n &:hover {\n text-decoration: underline;\n color: ", ";\n\n &:not(:active) [data-icon-for=\"button\"] img {\n filter: ", ";\n }\n }\n &:active {\n color: ", ";\n }\n &:disabled {\n color: ", ";\n }\n "])), parseColor(props.$hoverTextColor), props.$hoverIconColor
|
|
1861
1866
|
? parseColorFilter(props.$hoverIconColor)
|
|
1862
1867
|
: undefined, parseColor(props.$defaultTextColor), parseColor(props.$disabledTextColor)); });
|
|
1863
|
-
var StyledButtonWrapper$1 = styled__default.default(OakFlex)(templateObject_3$
|
|
1868
|
+
var StyledButtonWrapper$1 = styled__default.default(OakFlex)(templateObject_3$x || (templateObject_3$x = tslib.__makeTemplateObject(["\n > :first-of-type:hover .highlight {\n display: block;\n }\n > :first-of-type:active .highlight {\n display: block;\n }\n > :first-of-type:active .shadow {\n display: block;\n }\n > :first-of-type:focus-visible {\n box-shadow:\n ", ",\n ", ";\n background: white;\n }\n"], ["\n > :first-of-type:hover .highlight {\n display: block;\n }\n > :first-of-type:active .highlight {\n display: block;\n }\n > :first-of-type:active .shadow {\n display: block;\n }\n > :first-of-type:focus-visible {\n box-shadow:\n ", ",\n ", ";\n background: white;\n }\n"])), parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"));
|
|
1864
1869
|
/**
|
|
1865
1870
|
*
|
|
1866
1871
|
* A styled button with round icons, not intended to be used directly.
|
|
@@ -1895,7 +1900,7 @@ var InternalShadowIconButton = function (props) {
|
|
|
1895
1900
|
React__default.default.createElement(OakSpan, { "$font": "heading-light-7" }, children),
|
|
1896
1901
|
isTrailingIcon && iconLogic))));
|
|
1897
1902
|
};
|
|
1898
|
-
var templateObject_1$
|
|
1903
|
+
var templateObject_1$1J, templateObject_2$M, templateObject_3$x;
|
|
1899
1904
|
|
|
1900
1905
|
/**
|
|
1901
1906
|
*
|
|
@@ -1933,9 +1938,9 @@ var OakTertiaryInvertedButton = function (_a) {
|
|
|
1933
1938
|
return (React__default.default.createElement(InternalShadowRoundButton, tslib.__assign({ element: element !== null && element !== void 0 ? element : "button" }, props, { isTrailingIcon: isTrailingIcon, iconName: iconName, defaultIconColor: "text-primary", disabledIconColor: "icon-disabled", disabledIconBackground: "bg-btn-secondary-disabled", defaultIconBackground: "bg-btn-secondary", defaultIconBorderColor: "bg-btn-primary", disabledIconBorderColor: "border-neutral", hoverIconBackground: "bg-btn-secondary", defaultTextColor: "text-primary", hoverTextColor: "text-subdued", disabledTextColor: "text-disabled", iconBackgroundSize: "spacing-32", iconSize: "spacing-24" }), children));
|
|
1934
1939
|
};
|
|
1935
1940
|
|
|
1936
|
-
var StyledInternalButton$2 = styled__default.default(InternalButton)(templateObject_2$
|
|
1937
|
-
var StyledOakSvg = styled__default.default(OakSvg)(templateObject_3$
|
|
1938
|
-
var StyledButtonWrapper = styled__default.default(OakBox)(templateObject_4$
|
|
1941
|
+
var StyledInternalButton$2 = styled__default.default(InternalButton)(templateObject_2$L || (templateObject_2$L = tslib.__makeTemplateObject(["\n ", "\n ", "\n display: inline-block;\n ", "\n"], ["\n ", "\n ", "\n display: inline-block;\n ", "\n"])), positionStyle, sizeStyle, function (props) { return styled.css(templateObject_1$1I || (templateObject_1$1I = tslib.__makeTemplateObject(["\n &:hover {\n color: ", ";\n background: ", ";\n border-color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n &:active {\n background: ", ";\n border-color: ", ";\n color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n &:disabled {\n background: ", ";\n border-color: ", ";\n color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n "], ["\n &:hover {\n color: ", ";\n background: ", ";\n border-color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n &:active {\n background: ", ";\n border-color: ", ";\n color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n &:disabled {\n background: ", ";\n border-color: ", ";\n color: ", ";\n [data-state=\"selected\"] {\n display: none;\n }\n }\n "])), parseColor(props.$hoverTextColor), parseColor(props.$hoverBackground), parseColor(props.$hoverBorderColor), parseColor(props.$defaultBackground), parseColor(props.$defaultBorderColor), parseColor(props.$defaultTextColor), parseColor(props.$disabledBackground), parseColor(props.$disabledBorderColor), parseColor(props.$disabledTextColor)); });
|
|
1942
|
+
var StyledOakSvg = styled__default.default(OakSvg)(templateObject_3$w || (templateObject_3$w = tslib.__makeTemplateObject(["\n bottom: -3px;\n left: 0px;\n position: absolute;\n height: 5px;\n color: ", ";\n"], ["\n bottom: -3px;\n left: 0px;\n position: absolute;\n height: 5px;\n color: ", ";\n"])), parseColor("border-decorative1"));
|
|
1943
|
+
var StyledButtonWrapper = styled__default.default(OakBox)(templateObject_4$j || (templateObject_4$j = tslib.__makeTemplateObject(["\n .grey-shadow:has(+ * + .internal-button:focus-visible) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:focus-visible) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:hover),\n .grey-shadow:has(+ * + .internal-button:hover) {\n box-shadow: none;\n }\n .grey-shadow:has(+ * + .internal-button:active) {\n box-shadow: ", ";\n }\n"], ["\n .grey-shadow:has(+ * + .internal-button:focus-visible) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:focus-visible) {\n box-shadow: ", ";\n }\n .yellow-shadow:has(+ .internal-button:hover),\n .grey-shadow:has(+ * + .internal-button:hover) {\n box-shadow: none;\n }\n .grey-shadow:has(+ * + .internal-button:active) {\n box-shadow: ", ";\n }\n"])), parseDropShadow("drop-shadow-centered-grey"), parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-grey"));
|
|
1939
1944
|
/**
|
|
1940
1945
|
* A left-aligned button styled similarly to OakSmallPrimaryInvertedButton
|
|
1941
1946
|
* with configurable icon alignment.
|
|
@@ -1972,7 +1977,7 @@ var TextWithUnderline = function (_a) {
|
|
|
1972
1977
|
React__default.default.createElement(OakSpan, { "$font": "body-3-bold" }, children),
|
|
1973
1978
|
React__default.default.createElement(StyledOakSvg, { name: "underline", "data-state": "selected", "data-testid": "selected-underline" })));
|
|
1974
1979
|
};
|
|
1975
|
-
var templateObject_1$
|
|
1980
|
+
var templateObject_1$1I, templateObject_2$L, templateObject_3$w, templateObject_4$j;
|
|
1976
1981
|
|
|
1977
1982
|
var TrieNode = /** @class */ (function () {
|
|
1978
1983
|
function TrieNode() {
|
|
@@ -2196,20 +2201,20 @@ var focusVisibleChildren$1 = "\n a".concat(isJSDOM$1() ? "" : ":focus-visible",
|
|
|
2196
2201
|
/**
|
|
2197
2202
|
* Wrap focusable components `<a/>`/`<button/>` and this will add focus styles then the inner element is focused
|
|
2198
2203
|
*/
|
|
2199
|
-
var focusStyles = styled.css(templateObject_4$
|
|
2200
|
-
var focusStyles = styled.css(templateObject_1$
|
|
2204
|
+
var focusStyles = styled.css(templateObject_4$i || (templateObject_4$i = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
2205
|
+
var focusStyles = styled.css(templateObject_1$1H || (templateObject_1$1H = tslib.__makeTemplateObject([""], [""])));
|
|
2201
2206
|
if (!props.disabled) {
|
|
2202
|
-
focusStyles = styled.css(templateObject_2$
|
|
2207
|
+
focusStyles = styled.css(templateObject_2$K || (templateObject_2$K = tslib.__makeTemplateObject(["\n &:hover {\n ", ";\n box-shadow: ", ";\n }\n\n &:active {\n box-shadow: ", ";\n }\n "], ["\n &:hover {\n ", ";\n box-shadow: ", ";\n }\n\n &:active {\n box-shadow: ", ";\n }\n "])), responsiveStyle("background-color", function (props) { return props.$hoverBackground; }, function (value) { return parseColor(value); }), parseDropShadow("drop-shadow-lemon"), ["drop-shadow-lemon", "drop-shadow-grey"]
|
|
2203
2208
|
.map(function (i) { return parseDropShadow(i); })
|
|
2204
2209
|
.join(", "));
|
|
2205
2210
|
}
|
|
2206
|
-
return styled.css(templateObject_3$
|
|
2211
|
+
return styled.css(templateObject_3$v || (templateObject_3$v = tslib.__makeTemplateObject(["\n &:focus {\n ", "\n box-shadow: ", ";\n\n & ", " {\n outline: none;\n }\n }\n ", "\n "], ["\n &:focus {\n ", "\n box-shadow: ", ";\n\n & ", " {\n outline: none;\n }\n }\n ", "\n "])), responsiveStyle("border-radius", function (props) { return props.$borderRadius; }, parseBorderRadius), ["drop-shadow-centered-lemon", "drop-shadow-centered-grey"]
|
|
2207
2212
|
.map(function (i) { return parseDropShadow(i); })
|
|
2208
2213
|
.join(", "), focusVisibleChildren$1, focusStyles);
|
|
2209
2214
|
});
|
|
2210
|
-
var templateObject_1$
|
|
2215
|
+
var templateObject_1$1H, templateObject_2$K, templateObject_3$v, templateObject_4$i;
|
|
2211
2216
|
|
|
2212
|
-
var Button = styled__default.default.button(templateObject_1$
|
|
2217
|
+
var Button = styled__default.default.button(templateObject_1$1G || (templateObject_1$1G = tslib.__makeTemplateObject(["\n outline: none;\n border: none;\n display: flex;\n ", "\n cursor: ", ";\n background: ", ";\n padding: ", ";\n border-radius: ", ";\n border-style: solid;\n border-color: ", ";\n border-width: ", ";\n"], ["\n outline: none;\n border: none;\n display: flex;\n ", "\n cursor: ", ";\n background: ", ";\n padding: ", ";\n border-radius: ", ";\n border-style: solid;\n border-color: ", ";\n border-width: ", ";\n"])), focusStyles, function (props) { return (props.disabled ? "not-allowed" : "pointer"); }, function (props) { return parseColor(lookupButtonBackground(props)); }, function (props) { return parseSpacing(lookupButtonPadding(props)); }, parseBorderRadius("border-radius-circle"), function (props) { return parseColor(lookupButtonBorderColor(props)); }, function (props) { return parseBorderWidth(lookupButtonBorderWidth(props)); });
|
|
2213
2218
|
function defaultProps(props) {
|
|
2214
2219
|
return tslib.__assign({
|
|
2215
2220
|
// loading assumes the button is disabled
|
|
@@ -2226,7 +2231,7 @@ var OakIconButton = function (rawProps) {
|
|
|
2226
2231
|
isLoading && (React__default.default.createElement(OakLoadingSpinner, { "$width": lookupIconSize(props), loaderColor: lookupIconLoadingColor(props) })),
|
|
2227
2232
|
!isLoading && (React__default.default.createElement(OakIcon, { "$width": lookupIconSize(props), "$height": lookupIconSize(props), "$colorFilter": lookupIconColor(props), iconName: iconName }))));
|
|
2228
2233
|
};
|
|
2229
|
-
var templateObject_1$
|
|
2234
|
+
var templateObject_1$1G;
|
|
2230
2235
|
|
|
2231
2236
|
var oakHeadingTagsConst = [
|
|
2232
2237
|
"div",
|
|
@@ -2249,11 +2254,11 @@ var HeadingTagComponent = function (props) {
|
|
|
2249
2254
|
* Use the controls to view different font styles.
|
|
2250
2255
|
*
|
|
2251
2256
|
*/
|
|
2252
|
-
var OakHeading = styled__default.default(HeadingTagComponent)(templateObject_1$
|
|
2253
|
-
var templateObject_1$
|
|
2257
|
+
var OakHeading = styled__default.default(HeadingTagComponent)(templateObject_1$1F || (templateObject_1$1F = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n"])), typographyStyle, marginStyle, colorStyle, opacityStyle);
|
|
2258
|
+
var templateObject_1$1F;
|
|
2254
2259
|
|
|
2255
|
-
var listStyle = styled.css(templateObject_1$
|
|
2256
|
-
var templateObject_1$
|
|
2260
|
+
var listStyle = styled.css(templateObject_1$1E || (templateObject_1$1E = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), responsiveStyle("list-style", function (props) { return props.$listStyle; }));
|
|
2261
|
+
var templateObject_1$1E;
|
|
2257
2262
|
|
|
2258
2263
|
/**
|
|
2259
2264
|
* Styled `li` (list item) component.
|
|
@@ -2266,8 +2271,8 @@ var templateObject_1$1D;
|
|
|
2266
2271
|
var oakLIDefaults = {
|
|
2267
2272
|
$display: "revert",
|
|
2268
2273
|
};
|
|
2269
|
-
var OakLI = styled__default.default.li.attrs(function (props) { return (tslib.__assign(tslib.__assign({}, oakLIDefaults), props)); })(templateObject_1$
|
|
2270
|
-
var templateObject_1$
|
|
2274
|
+
var OakLI = styled__default.default.li.attrs(function (props) { return (tslib.__assign(tslib.__assign({}, oakLIDefaults), props)); })(templateObject_1$1D || (templateObject_1$1D = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n // FIXME - Flex props will only work when display is set to flex, can we conditionally apply this + props above ?\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n // FIXME - Flex props will only work when display is set to flex, can we conditionally apply this + props above ?\n ", "\n"])), oakBoxCss, typographyStyle, listStyle, displayStyle, flexStyle);
|
|
2275
|
+
var templateObject_1$1D;
|
|
2271
2276
|
|
|
2272
2277
|
/**
|
|
2273
2278
|
* Styled `ol` (ordered list) component.
|
|
@@ -2277,12 +2282,12 @@ var templateObject_1$1C;
|
|
|
2277
2282
|
* Use where we have an ordered list to ensure numbers are styled
|
|
2278
2283
|
*
|
|
2279
2284
|
* */
|
|
2280
|
-
var OakOL = styled__default.default.ol(templateObject_1$
|
|
2285
|
+
var OakOL = styled__default.default.ol(templateObject_1$1C || (templateObject_1$1C = tslib.__makeTemplateObject(["\n counter-reset: item;\n padding: 0;\n\n li {\n display: block;\n counter-increment: item;\n margin: 0;\n padding: 0 0 0 16px;\n text-indent: -16px;\n list-style-type: none;\n line-height: 32px;\n\n // Portable text generates linebreaks within list items\n\n br {\n content: \"\";\n display: block;\n margin-top: 8px;\n }\n }\n\n & li::before {\n padding-right: 4px;\n content: counter(item) \".\";\n }\n a {\n color: ", ";\n }\n ", "\n ", "\n ", "\n"], ["\n counter-reset: item;\n padding: 0;\n\n li {\n display: block;\n counter-increment: item;\n margin: 0;\n padding: 0 0 0 16px;\n text-indent: -16px;\n list-style-type: none;\n line-height: 32px;\n\n // Portable text generates linebreaks within list items\n\n br {\n content: \"\";\n display: block;\n margin-top: 8px;\n }\n }\n\n & li::before {\n padding-right: 4px;\n content: counter(item) \".\";\n }\n a {\n color: ", ";\n }\n ", "\n ", "\n ", "\n"])), function (props) {
|
|
2281
2286
|
return props.theme &&
|
|
2282
2287
|
props.theme.uiColors &&
|
|
2283
2288
|
props.theme.uiColors["text-link-active"];
|
|
2284
2289
|
}, marginStyle, colorStyle, typographyStyle);
|
|
2285
|
-
var templateObject_1$
|
|
2290
|
+
var templateObject_1$1C;
|
|
2286
2291
|
|
|
2287
2292
|
/**
|
|
2288
2293
|
* Styled `p` (paragraph) component.
|
|
@@ -2291,8 +2296,8 @@ var templateObject_1$1B;
|
|
|
2291
2296
|
* However, if you want different styles for a particular paragraph,
|
|
2292
2297
|
* you can use this component to apply additional styles.
|
|
2293
2298
|
*/
|
|
2294
|
-
var OakP = styled__default.default.p(templateObject_1$
|
|
2295
|
-
var templateObject_1$
|
|
2299
|
+
var OakP = styled__default.default.p(templateObject_1$1B || (templateObject_1$1B = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n"])), typographyStyle, colorStyle, marginStyle);
|
|
2300
|
+
var templateObject_1$1B;
|
|
2296
2301
|
|
|
2297
2302
|
/**
|
|
2298
2303
|
* The Typography component sets a typography style context from which children
|
|
@@ -2301,8 +2306,8 @@ var templateObject_1$1A;
|
|
|
2301
2306
|
* This should be the primary component to set a typography context.
|
|
2302
2307
|
* Use this component whenever you want to style blocks of 'body' text.
|
|
2303
2308
|
*/
|
|
2304
|
-
var OakTypography = styled__default.default(OakBox)(templateObject_1$
|
|
2305
|
-
var templateObject_1$
|
|
2309
|
+
var OakTypography = styled__default.default(OakBox)(templateObject_1$1A || (templateObject_1$1A = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), typographyStyle);
|
|
2310
|
+
var templateObject_1$1A;
|
|
2306
2311
|
|
|
2307
2312
|
/**
|
|
2308
2313
|
* Styled `ul` (unordered list) component.
|
|
@@ -2312,10 +2317,10 @@ var templateObject_1$1z;
|
|
|
2312
2317
|
* Resets browser spacing and other styles, accepts BoxProps' style props.
|
|
2313
2318
|
*
|
|
2314
2319
|
* */
|
|
2315
|
-
var OakUL = styled__default.default.ul(templateObject_2$
|
|
2316
|
-
return props.$reset && styled.css(templateObject_1$
|
|
2320
|
+
var OakUL = styled__default.default.ul(templateObject_2$J || (templateObject_2$J = tslib.__makeTemplateObject(["\n ", "\n margin: 0;\n display: block;\n ", "\n ", "\n"], ["\n ", "\n margin: 0;\n display: block;\n ", "\n ", "\n"])), function (props) {
|
|
2321
|
+
return props.$reset && styled.css(templateObject_1$1z || (templateObject_1$1z = tslib.__makeTemplateObject(["\n list-style: none;\n padding: 0;\n "], ["\n list-style: none;\n padding: 0;\n "])));
|
|
2317
2322
|
}, oakBoxCss, function (props) { return props.$display && oakFlexCss; });
|
|
2318
|
-
var templateObject_1$
|
|
2323
|
+
var templateObject_1$1z, templateObject_2$J;
|
|
2319
2324
|
|
|
2320
2325
|
var variantConfig = {
|
|
2321
2326
|
primary: {
|
|
@@ -2334,9 +2339,9 @@ var variantConfig = {
|
|
|
2334
2339
|
},
|
|
2335
2340
|
};
|
|
2336
2341
|
|
|
2337
|
-
var StyledOakIcon$3 = styled__default.default(OakIcon)(templateObject_1$
|
|
2338
|
-
var StyledOakLoadingSpinner = styled__default.default(OakLoadingSpinner)(templateObject_2$
|
|
2339
|
-
var StyledLink$1 = styled__default.default.a(templateObject_3$
|
|
2342
|
+
var StyledOakIcon$3 = styled__default.default(OakIcon)(templateObject_1$1y || (templateObject_1$1y = tslib.__makeTemplateObject(["\n width: 1.25em;\n min-width: 1.25em;\n height: 1.25em;\n min-height: 1.25em;\n"], ["\n width: 1.25em;\n min-width: 1.25em;\n height: 1.25em;\n min-height: 1.25em;\n"])));
|
|
2343
|
+
var StyledOakLoadingSpinner = styled__default.default(OakLoadingSpinner)(templateObject_2$I || (templateObject_2$I = tslib.__makeTemplateObject(["\n --width: 1.25em;\n"], ["\n --width: 1.25em;\n"])));
|
|
2344
|
+
var StyledLink$1 = styled__default.default.a(templateObject_3$u || (templateObject_3$u = tslib.__makeTemplateObject(["\n display: inline;\n text-align: left;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"], ["\n display: inline;\n text-align: left;\n align-items: center;\n gap: ", ";\n outline: none;\n border-radius: ", ";\n padding: ", ";\n margin: -", ";\n appearance: none;\n ", "\n background: none;\n border: none;\n text-decoration: ", ";\n cursor: pointer;\n color: ", ";\n overflow-wrap: break-word;\n\n ", " {\n filter: ", ";\n display: inline-block;\n vertical-align: text-top;\n }\n\n &:focus-visible {\n box-shadow:\n ", ",\n ", ";\n }\n\n &:visited {\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ", ";\n ", " {\n filter: ", ";\n }\n text-decoration: underline;\n text-decoration-thickness: 18%;\n }\n }\n\n &:active {\n color: ", ";\n outline: 1px solid ", ";\n ", " {\n filter: ", ";\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ", ";\n\n ", " {\n filter: ", ";\n }\n }\n"])), parseSpacing("spacing-4"), parseBorderRadius("border-radius-m"), parseSpacing("spacing-4"), parseSpacing("spacing-4"), function (props) { return (props.$font ? typographyStyle : "font: inherit;"); }, function (props) { return props.$textDecoration; }, function (props) { return parseColor(props.$color); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$color); }, parseDropShadow("drop-shadow-centered-lemon"), parseDropShadow("drop-shadow-centered-grey"), function (props) { return parseColor(props.$visitedColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$visitedColor); }, function (props) { return parseColor(props.$hoverColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$hoverColor); }, function (props) { return parseColor(props.$activeColor); }, function (props) { return parseColor(props.$activeColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$activeColor); }, function (props) { return parseColor(props.$disabledColor); }, StyledOakIcon$3, function (props) { return parseColorFilter(props.$disabledColor); });
|
|
2340
2345
|
/**
|
|
2341
2346
|
* A link with an optional icon and loading state.
|
|
2342
2347
|
*
|
|
@@ -2371,7 +2376,7 @@ var InternalLink = React.forwardRef(function (props, ref) {
|
|
|
2371
2376
|
React__default.default.createElement(OakSpan, null, children),
|
|
2372
2377
|
isTrailingIcon && icon));
|
|
2373
2378
|
});
|
|
2374
|
-
var templateObject_1$
|
|
2379
|
+
var templateObject_1$1y, templateObject_2$I, templateObject_3$u;
|
|
2375
2380
|
|
|
2376
2381
|
/**
|
|
2377
2382
|
* Represents textual user input from a keyboard, voice input, or any other text entry device.
|
|
@@ -2415,7 +2420,7 @@ var useMounted = function () {
|
|
|
2415
2420
|
return isMounted;
|
|
2416
2421
|
};
|
|
2417
2422
|
|
|
2418
|
-
var SlideInFlex = styled__default.default(OakFlex)(templateObject_1$
|
|
2423
|
+
var SlideInFlex = styled__default.default(OakFlex)(templateObject_1$1x || (templateObject_1$1x = tslib.__makeTemplateObject(["\n max-width: ", ";\n transform: ", ";\n ", "\n"], ["\n max-width: ", ";\n transform: ", ";\n ", "\n"])), function (_a) {
|
|
2419
2424
|
var $isLeftHandSide = _a.$isLeftHandSide;
|
|
2420
2425
|
return $isLeftHandSide ? "calc(100vw - ".concat(parseSpacing("spacing-20"), ")") : "100vw";
|
|
2421
2426
|
}, function (_a) {
|
|
@@ -2436,9 +2441,9 @@ var InternalSlideInFlex = React.forwardRef(function (props, ref) {
|
|
|
2436
2441
|
var finalZIndex = props.finalZIndex, state = props.state, isLeftHandSide = props.isLeftHandSide, children = props.children, _a = props.largeScreenMaxWidth, largeScreenMaxWidth = _a === void 0 ? 600 : _a, rest = tslib.__rest(props, ["finalZIndex", "state", "isLeftHandSide", "children", "largeScreenMaxWidth"]);
|
|
2437
2442
|
return (React__default.default.createElement(SlideInFlex, tslib.__assign({ ref: ref, "$background": "bg-primary", "$right": !isLeftHandSide ? "spacing-0" : null, "$left": isLeftHandSide ? "spacing-0" : null, "$position": "fixed", "$bottom": "spacing-0", "$width": ["spacing-640"], "$top": "spacing-0", "$transition": "standard-ease", "$zIndex": finalZIndex, "$flexDirection": "column", "$state": state, "$color": "text-primary", role: "dialog", "$isLeftHandSide": isLeftHandSide, "$largeScreenMaxWidth": largeScreenMaxWidth }, rest), children));
|
|
2438
2443
|
});
|
|
2439
|
-
var templateObject_1$
|
|
2444
|
+
var templateObject_1$1x;
|
|
2440
2445
|
|
|
2441
|
-
var FadeOutBox = styled__default.default(OakBox)(templateObject_1$
|
|
2446
|
+
var FadeOutBox = styled__default.default(OakBox)(templateObject_1$1w || (templateObject_1$1w = tslib.__makeTemplateObject(["\n opacity: ", ";\n background-color: black;\n position: fixed;\n inset: 0;\n transition: ease;\n"], ["\n opacity: ", ";\n background-color: black;\n position: fixed;\n inset: 0;\n transition: ease;\n"])), function (_a) {
|
|
2442
2447
|
var $state = _a.$state;
|
|
2443
2448
|
switch ($state) {
|
|
2444
2449
|
case "entered":
|
|
@@ -2457,11 +2462,22 @@ var InternalModalTransition = function (_a) {
|
|
|
2457
2462
|
React__default.default.createElement(FadeOutBox, { "$zIndex": finalZIndex, "$state": state, onClick: closeOnBackgroundClick ? onClose : undefined }),
|
|
2458
2463
|
React__default.default.createElement(InternalSlideInFlex, tslib.__assign({ isLeftHandSide: isLeftHandSide, ref: transitionRef, "$zIndex": finalZIndex, state: state, "aria-modal": true, largeScreenMaxWidth: largeScreenMaxWidth }, rest), children))); }));
|
|
2459
2464
|
};
|
|
2460
|
-
var templateObject_1$
|
|
2465
|
+
var templateObject_1$1w;
|
|
2461
2466
|
|
|
2467
|
+
/**
|
|
2468
|
+
* ⚠️ To be deprecated
|
|
2469
|
+
* Use `<OakModal />` instead (it has no border colour context)
|
|
2470
|
+
* @deprecated Use `<OakModal />` instead (it has no border colour context)
|
|
2471
|
+
*/
|
|
2462
2472
|
var OakInformativeModalBorderColor = React.createContext("border-neutral-lighter");
|
|
2463
2473
|
/**
|
|
2464
2474
|
* Modal dialog with trapped focus and a close button. See the [design specification](https://www.figma.com/design/YcWQMMhHPVVmc47cHHEEAl/Oak-Design-Kit?node-id=15135-2063)
|
|
2475
|
+
*
|
|
2476
|
+
* ⚠️ To be deprecated
|
|
2477
|
+
* Use `<OakModal position="right" />` (or `position="left"`) instead
|
|
2478
|
+
* `zIndex` and `domContainer` carry over unchanged.
|
|
2479
|
+
* Figma: <https://www.figma.com/design/YcWQMMhHPVVmc47cHHEEAl/Oak-Design-Kit?node-id=25437-6465>
|
|
2480
|
+
* @deprecated Use `<OakModal position="right" />` (or `position="left"`) instead
|
|
2465
2481
|
*/
|
|
2466
2482
|
var OakInformativeModal = function (_a) {
|
|
2467
2483
|
var children = _a.children, footerSlot = _a.footerSlot, domContainer = _a.domContainer, isOpen = _a.isOpen, onClose = _a.onClose, zIndex = _a.zIndex, isLeftHandSide = _a.isLeftHandSide, closeOnBackgroundClick = _a.closeOnBackgroundClick, largeScreenMaxWidth = _a.largeScreenMaxWidth, rest = tslib.__rest(_a, ["children", "footerSlot", "domContainer", "isOpen", "onClose", "zIndex", "isLeftHandSide", "closeOnBackgroundClick", "largeScreenMaxWidth"]);
|
|
@@ -2494,6 +2510,10 @@ var OakInformativeModal = function (_a) {
|
|
|
2494
2510
|
* Intended to be used in the `children` slot of `OakInformativeModal`
|
|
2495
2511
|
* it applies some padding and margin to ensure that the contents
|
|
2496
2512
|
* line up with the modal's header and footer
|
|
2513
|
+
*
|
|
2514
|
+
* ⚠️ To be deprecated
|
|
2515
|
+
* Use `<OakModal />` instead (its content area already has padding)
|
|
2516
|
+
* @deprecated Use `<OakModal />` instead (its content area already has padding)
|
|
2497
2517
|
*/
|
|
2498
2518
|
var OakInformativeModalBody = function (props) {
|
|
2499
2519
|
return (React__default.default.createElement(OakBox, { "$position": "relative", "$minHeight": "100%" },
|
|
@@ -2504,6 +2524,10 @@ var OakInformativeModalBody = function (props) {
|
|
|
2504
2524
|
* Intended to be used in the `footer` slot of `OakInformativeModal`
|
|
2505
2525
|
* it is ideal as a container for one or more buttons.
|
|
2506
2526
|
* It switches from a horizontal to vertical layout on smaller screens
|
|
2527
|
+
*
|
|
2528
|
+
* ⚠️ To be deprecated
|
|
2529
|
+
* Use `<OakModalFooter />` in the `footerSlot` of `<OakModal />` instead
|
|
2530
|
+
* @deprecated Use `<OakModalFooter />` in the `footerSlot` of `<OakModal />` instead
|
|
2507
2531
|
*/
|
|
2508
2532
|
var OakInformativeModalFooter = function (props) {
|
|
2509
2533
|
var $borderColor = React.useContext(OakInformativeModalBorderColor);
|
|
@@ -2624,9 +2648,9 @@ var OakInlineBanner = function (_a) {
|
|
|
2624
2648
|
cta && React__default.default.createElement(OakFlex, { "$flexShrink": 0 }, cta)))));
|
|
2625
2649
|
};
|
|
2626
2650
|
|
|
2627
|
-
var FocusOnBox = styled__default.default(reactFocusOn.FocusOn)(templateObject_1$
|
|
2628
|
-
var BlurredOakBox = styled__default.default(OakBox)(templateObject_2$
|
|
2629
|
-
var FadeInFlex = styled__default.default(OakFlex)(templateObject_3$
|
|
2651
|
+
var FocusOnBox = styled__default.default(reactFocusOn.FocusOn)(templateObject_1$1v || (templateObject_1$1v = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), oakBoxCss);
|
|
2652
|
+
var BlurredOakBox = styled__default.default(OakBox)(templateObject_2$H || (templateObject_2$H = tslib.__makeTemplateObject(["\n backdrop-filter: blur(3px);\n"], ["\n backdrop-filter: blur(3px);\n"])));
|
|
2653
|
+
var FadeInFlex = styled__default.default(OakFlex)(templateObject_3$t || (templateObject_3$t = tslib.__makeTemplateObject(["\n opacity: ", ";\n transition: opacity 0s;\n"], ["\n opacity: ", ";\n transition: opacity 0s;\n"])), function (_a) {
|
|
2630
2654
|
var $state = _a.$state;
|
|
2631
2655
|
switch ($state) {
|
|
2632
2656
|
case "entered":
|
|
@@ -2653,6 +2677,12 @@ var FadeInFlex = styled__default.default(OakFlex)(templateObject_3$s || (templat
|
|
|
2653
2677
|
* - **modalInnerFlexProps?** \- Override HTMLAttributes & OakFlex props for the inner modal container
|
|
2654
2678
|
* - **backdropFlexProps?** \- Override HTMLAttributes & OakFlex props for the backdrop container
|
|
2655
2679
|
* - **footerSlot?** \- Fixed area at the bottom of the modal, this will remain fixed in view if the content is scrollable
|
|
2680
|
+
*
|
|
2681
|
+
* ⚠️ To be deprecated
|
|
2682
|
+
* Use `<OakDialog />` (not dismissible) or `<OakModal />` (dismissible) instead
|
|
2683
|
+
* `OakDialog` is for blocking choices, e.g. content guidance.
|
|
2684
|
+
* Figma: <https://www.figma.com/design/YcWQMMhHPVVmc47cHHEEAl/Oak-Design-Kit?node-id=25437-6387>
|
|
2685
|
+
* @deprecated Use `<OakDialog />` (not dismissible) or `<OakModal />` (dismissible) instead
|
|
2656
2686
|
*/
|
|
2657
2687
|
var OakModalCenter = function (_a) {
|
|
2658
2688
|
var children = _a.children, domContainer = _a.domContainer, isOpen = _a.isOpen, _b = _a.onClose, onClose = _b === void 0 ? function () { } : _b, _c = _a.disableBackdropClick, disableBackdropClick = _c === void 0 ? false : _c, _d = _a.disableEscapeKey, disableEscapeKey = _d === void 0 ? false : _d, _e = _a.hideCloseButton, hideCloseButton = _e === void 0 ? false : _e, modalFlexProps = _a.modalFlexProps, modalOuterFlexProps = _a.modalOuterFlexProps, modalInnerFlexProps = _a.modalInnerFlexProps, backdropFlexProps = _a.backdropFlexProps, footerSlot = _a.footerSlot, returnFocus = _a.returnFocus;
|
|
@@ -2716,7 +2746,7 @@ var OakModalCenter = function (_a) {
|
|
|
2716
2746
|
return modal;
|
|
2717
2747
|
}
|
|
2718
2748
|
};
|
|
2719
|
-
var templateObject_1$
|
|
2749
|
+
var templateObject_1$1v, templateObject_2$H, templateObject_3$t;
|
|
2720
2750
|
|
|
2721
2751
|
/*
|
|
2722
2752
|
*
|
|
@@ -2738,6 +2768,10 @@ var templateObject_1$1u, templateObject_2$G, templateObject_3$s;
|
|
|
2738
2768
|
* - **children** \- The content of the modal body
|
|
2739
2769
|
* - **headingOverride** \- Override HTMLAttributes & OakHEading props for the heading
|
|
2740
2770
|
* - **iconOverride** \- Override HTMLAttributes & OakIcon props for the icon
|
|
2771
|
+
*
|
|
2772
|
+
* ⚠️ To be deprecated
|
|
2773
|
+
* Use `<OakDialog />` with `OakHeading` and `OakP` in its content instead
|
|
2774
|
+
* @deprecated Use `<OakDialog />` with `OakHeading` and `OakP` in its content instead
|
|
2741
2775
|
*/
|
|
2742
2776
|
var OakModalCenterBody = function (_a) {
|
|
2743
2777
|
var children = _a.children, _b = _a.iconName, iconName = _b === void 0 ? "info" : _b, title = _a.title, headingOverride = _a.headingOverride, iconOverride = _a.iconOverride, hideIcon = _a.hideIcon;
|
|
@@ -2747,6 +2781,229 @@ var OakModalCenterBody = function (_a) {
|
|
|
2747
2781
|
children));
|
|
2748
2782
|
};
|
|
2749
2783
|
|
|
2784
|
+
/**
|
|
2785
|
+
* How long the fade in and out takes. Matches the `standard-ease` transition token.
|
|
2786
|
+
*/
|
|
2787
|
+
var FADE_DURATION = 300;
|
|
2788
|
+
/**
|
|
2789
|
+
* Space kept around a `centre` panel when the screen is smaller than the panel
|
|
2790
|
+
*/
|
|
2791
|
+
var CENTRE_GAP = "spacing-20";
|
|
2792
|
+
/**
|
|
2793
|
+
* Offset for pinning the panel to the screen edges
|
|
2794
|
+
*/
|
|
2795
|
+
var EDGE = parseSpacing("spacing-0");
|
|
2796
|
+
var isDrawer = function (placement) {
|
|
2797
|
+
return placement !== "fullscreen" && placement !== "centre";
|
|
2798
|
+
};
|
|
2799
|
+
var placementCss = function (_a) {
|
|
2800
|
+
var $placement = _a.$placement, $panelWidth = _a.$panelWidth, $panelHeight = _a.$panelHeight;
|
|
2801
|
+
var gap = parseSpacing(CENTRE_GAP);
|
|
2802
|
+
var screenMinusGaps = "calc(100% - ".concat(gap, " - ").concat(gap, ")");
|
|
2803
|
+
switch ($placement) {
|
|
2804
|
+
case "fullscreen":
|
|
2805
|
+
// `inset` rather than `100vh` so mobile browser chrome doesn't crop the panel
|
|
2806
|
+
return styled.css(templateObject_1$1u || (templateObject_1$1u = tslib.__makeTemplateObject(["\n inset: ", ";\n "], ["\n inset: ", ";\n "])), EDGE);
|
|
2807
|
+
case "centre":
|
|
2808
|
+
return styled.css(templateObject_2$G || (templateObject_2$G = tslib.__makeTemplateObject(["\n inset: ", ";\n margin: auto;\n width: ", ";\n height: fit-content;\n max-width: ", ";\n max-height: ", ";\n "], ["\n inset: ", ";\n margin: auto;\n width: ", ";\n height: fit-content;\n max-width: ", ";\n max-height: ", ";\n "])), EDGE, parseSpacing($panelWidth), screenMinusGaps, "min(".concat(parseSpacing($panelHeight), ", ").concat(screenMinusGaps, ")"));
|
|
2809
|
+
case "left":
|
|
2810
|
+
case "right":
|
|
2811
|
+
return styled.css(templateObject_3$s || (templateObject_3$s = tslib.__makeTemplateObject(["\n top: ", ";\n bottom: ", ";\n ", ": ", ";\n width: ", ";\n max-width: 100%;\n "], ["\n top: ", ";\n bottom: ", ";\n ", ": ", ";\n width: ", ";\n max-width: 100%;\n "])), EDGE, EDGE, $placement, EDGE, parseSpacing($panelWidth));
|
|
2812
|
+
case "top":
|
|
2813
|
+
case "bottom":
|
|
2814
|
+
return styled.css(templateObject_4$h || (templateObject_4$h = tslib.__makeTemplateObject(["\n left: ", ";\n right: ", ";\n ", ": ", ";\n height: ", ";\n max-height: 100%;\n "], ["\n left: ", ";\n right: ", ";\n ", ": ", ";\n height: ", ";\n max-height: 100%;\n "])), EDGE, EDGE, $placement, EDGE, parseSpacing($panelHeight));
|
|
2815
|
+
}
|
|
2816
|
+
};
|
|
2817
|
+
// Drawers are too cramped on small screens so they fill the screen instead
|
|
2818
|
+
var smallScreenCss = function (_a) {
|
|
2819
|
+
var $placement = _a.$placement;
|
|
2820
|
+
return isDrawer($placement) && styled.css(templateObject_5$c || (templateObject_5$c = tslib.__makeTemplateObject(["\n @media ", " {\n inset: ", ";\n width: auto;\n height: auto;\n max-width: none;\n max-height: none;\n }\n "], ["\n @media ", " {\n inset: ", ";\n width: auto;\n height: auto;\n max-width: none;\n max-height: none;\n }\n "])), getMediaQuery("mobile"), EDGE);
|
|
2821
|
+
};
|
|
2822
|
+
var Panel = styled__default.default(OakFlex)(templateObject_6$a || (templateObject_6$a = tslib.__makeTemplateObject(["\n position: fixed;\n overflow: clip;\n ", "\n ", "\n"], ["\n position: fixed;\n overflow: clip;\n ", "\n ", "\n"])), placementCss, smallScreenCss);
|
|
2823
|
+
// Fades the backdrop and panel in and out together
|
|
2824
|
+
var Fade = styled__default.default(OakBox)(templateObject_7$4 || (templateObject_7$4 = tslib.__makeTemplateObject(["\n opacity: ", ";\n"], ["\n opacity: ", ";\n"])), function (_a) {
|
|
2825
|
+
var $state = _a.$state;
|
|
2826
|
+
return $state === "entering" || $state === "entered" ? 1 : 0;
|
|
2827
|
+
});
|
|
2828
|
+
var Backdrop = styled__default.default(OakBox)(templateObject_9 || (templateObject_9 = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
2829
|
+
var $hideOnSmallScreen = _a.$hideOnSmallScreen;
|
|
2830
|
+
return $hideOnSmallScreen && styled.css(templateObject_8 || (templateObject_8 = tslib.__makeTemplateObject(["\n @media ", " {\n display: none;\n }\n "], ["\n @media ", " {\n display: none;\n }\n "])), getMediaQuery("mobile"));
|
|
2831
|
+
});
|
|
2832
|
+
/**
|
|
2833
|
+
* Shared behaviour for `OakModal` and `OakDialog`.
|
|
2834
|
+
*
|
|
2835
|
+
* - Portals into `document.body` (or `domContainer`) once mounted on the client
|
|
2836
|
+
* - Traps focus, locks body scroll and returns focus to the trigger on close
|
|
2837
|
+
* - Fades in and out with the `standard-ease` transition
|
|
2838
|
+
* - Shows a backdrop behind every placement except `fullscreen`
|
|
2839
|
+
* - Caps the panel at the screen size, and shows drawers fullscreen on small screens
|
|
2840
|
+
* - Makes the content focusable when it scrolls so keyboard users can scroll it
|
|
2841
|
+
*/
|
|
2842
|
+
var InternalModalBase = function (_a) {
|
|
2843
|
+
var isOpen = _a.isOpen, placement = _a.placement, onDismiss = _a.onDismiss, _b = _a.width, width = _b === void 0 ? "spacing-640" : _b, _c = _a.height, height = _c === void 0 ? "spacing-640" : _c, _d = _a.role, role = _d === void 0 ? "dialog" : _d, borderRadius = _a.borderRadius, header = _a.header, children = _a.children, footerSlot = _a.footerSlot, _e = _a.autoFocusContent, autoFocusContent = _e === void 0 ? false : _e, ariaLabel = _a["aria-label"], ariaLabelledBy = _a["aria-labelledby"], ariaDescribedBy = _a["aria-describedby"], domContainer = _a.domContainer, zIndex = _a.zIndex, returnFocus = _a.returnFocus;
|
|
2844
|
+
// `createPortal` is not supported in SSR so we only render once mounted on the client
|
|
2845
|
+
var isMounted = useMounted();
|
|
2846
|
+
var fadeRef = React.useRef(null);
|
|
2847
|
+
var contentRef = React.useRef(null);
|
|
2848
|
+
var contentInnerRef = React.useRef(null);
|
|
2849
|
+
var _f = tslib.__read(React.useState(false), 2), isScrollable = _f[0], setIsScrollable = _f[1];
|
|
2850
|
+
// Shows a line at the top of the content once it is scrolled,
|
|
2851
|
+
var _g = tslib.__read(React.useState(false), 2), isScrolled = _g[0], setIsScrolled = _g[1];
|
|
2852
|
+
React.useEffect(function () {
|
|
2853
|
+
var _a, _b;
|
|
2854
|
+
// Let keyboard users scroll the content when it overflows
|
|
2855
|
+
var checkIsScrollable = function () {
|
|
2856
|
+
var content = contentRef.current;
|
|
2857
|
+
setIsScrollable(!!content && content.scrollHeight > content.clientHeight);
|
|
2858
|
+
};
|
|
2859
|
+
checkIsScrollable();
|
|
2860
|
+
// Reset the line when the modal reopens, as its content starts at the top
|
|
2861
|
+
setIsScrolled(((_b = (_a = contentRef.current) === null || _a === void 0 ? void 0 : _a.scrollTop) !== null && _b !== void 0 ? _b : 0) > 0);
|
|
2862
|
+
// Re-check whenever the scroll area or its content changes size, e.g. the
|
|
2863
|
+
// window resizes, images load, an accordion opens or a child adds content
|
|
2864
|
+
var content = contentRef.current;
|
|
2865
|
+
var contentInner = contentInnerRef.current;
|
|
2866
|
+
if (!content || !contentInner || typeof ResizeObserver === "undefined") {
|
|
2867
|
+
return;
|
|
2868
|
+
}
|
|
2869
|
+
var resizeObserver = new ResizeObserver(checkIsScrollable);
|
|
2870
|
+
resizeObserver.observe(content);
|
|
2871
|
+
resizeObserver.observe(contentInner);
|
|
2872
|
+
return function () { return resizeObserver.disconnect(); };
|
|
2873
|
+
}, [isOpen, isMounted]);
|
|
2874
|
+
if (!isMounted) {
|
|
2875
|
+
return null;
|
|
2876
|
+
}
|
|
2877
|
+
var finalZIndex = zIndex !== null && zIndex !== void 0 ? zIndex : "modal-dialog";
|
|
2878
|
+
// Rounded corners would clip a scrollbar at the panel's edge, so the centred
|
|
2879
|
+
// panel's scrolling area is moved 8px in from the edges, as in Figma. Its
|
|
2880
|
+
// padding is 8px smaller to match, so the content stays 56px / 64px from the edges.
|
|
2881
|
+
var isCentre = placement === "centre";
|
|
2882
|
+
var contentTabIndex;
|
|
2883
|
+
if (isScrollable) {
|
|
2884
|
+
contentTabIndex = 0; // users can Tab to it to scroll
|
|
2885
|
+
}
|
|
2886
|
+
else if (autoFocusContent) {
|
|
2887
|
+
contentTabIndex = -1; // the Dialog can focus it on open, but Tab skips it
|
|
2888
|
+
}
|
|
2889
|
+
return reactDom.createPortal(React__default.default.createElement(reactTransitionGroup.Transition, { in: isOpen, nodeRef: fadeRef, timeout: FADE_DURATION, appear: true, mountOnEnter: true, unmountOnExit: true }, function (state) { return (React__default.default.createElement(Fade, { ref: fadeRef, "$state": state, "$position": "relative", "$zIndex": finalZIndex, "$transition": "standard-ease", "data-testid": "modal-root" },
|
|
2890
|
+
placement !== "fullscreen" && (React__default.default.createElement(Backdrop, { "$hideOnSmallScreen": isDrawer(placement), "$position": "fixed", "$inset": "spacing-0", "$background": "bg-inverted-semi-transparent", "data-testid": "modal-backdrop" })),
|
|
2891
|
+
React__default.default.createElement(reactFocusOn.FocusOn
|
|
2892
|
+
// Only while open, so a closing modal can't be dismissed twice
|
|
2893
|
+
, {
|
|
2894
|
+
// Only while open, so a closing modal can't be dismissed twice
|
|
2895
|
+
onEscapeKey: isOpen ? onDismiss : undefined, onClickOutside: isOpen ? onDismiss : undefined, returnFocus: returnFocus !== null && returnFocus !== void 0 ? returnFocus : true, autoFocus: true, preventScrollOnFocus: true },
|
|
2896
|
+
React__default.default.createElement(Panel, { "$placement": placement, "$panelWidth": width, "$panelHeight": height, "$flexDirection": "column", "$background": "bg-primary", "$color": "text-primary", "$dropShadow": "drop-shadow-centred-standard", "$borderRadius": borderRadius, role: role, "aria-modal": true, "aria-label": ariaLabelledBy ? undefined : ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy },
|
|
2897
|
+
header && React__default.default.createElement(OakFlex, { "$flexShrink": 0 }, header),
|
|
2898
|
+
React__default.default.createElement(OakFlex, { ref: contentRef, "$flexDirection": "column", "$flexGrow": 1, "$minHeight": "spacing-0", "$overflow": "auto", "$ma": isCentre ? "spacing-8" : undefined, "$bt": "border-solid-s", "$borderColor": isScrolled ? "border-neutral-lighter" : "transparent", onScroll: function (e) {
|
|
2899
|
+
return setIsScrolled(e.currentTarget.scrollTop > 0);
|
|
2900
|
+
},
|
|
2901
|
+
// Stops the content shifting sideways when a scrollbar appears
|
|
2902
|
+
style: { scrollbarGutter: "stable" }, tabIndex: contentTabIndex, "data-autofocus": autoFocusContent || undefined, "data-testid": "modal-content" },
|
|
2903
|
+
React__default.default.createElement(OakFlex, { ref: contentInnerRef, "$flexDirection": "column", "$pv": isCentre ? "spacing-48" : "spacing-56", "$ph": isCentre
|
|
2904
|
+
? ["spacing-16", "spacing-56", "spacing-56"]
|
|
2905
|
+
: ["spacing-24", "spacing-64", "spacing-64"], "data-testid": "modal-content-inner" }, children)),
|
|
2906
|
+
footerSlot && (React__default.default.createElement(OakFlex, { "$flexShrink": 0, "$flexDirection": "column" }, footerSlot)))))); }), domContainer !== null && domContainer !== void 0 ? domContainer : document.body);
|
|
2907
|
+
};
|
|
2908
|
+
var templateObject_1$1u, templateObject_2$G, templateObject_3$s, templateObject_4$h, templateObject_5$c, templateObject_6$a, templateObject_7$4, templateObject_8, templateObject_9;
|
|
2909
|
+
|
|
2910
|
+
/**
|
|
2911
|
+
* A centred dialog that requires an explicit choice, e.g. acknowledging a
|
|
2912
|
+
* content guidance warning.
|
|
2913
|
+
*
|
|
2914
|
+
* - **Can't be dismissed**: no close button, Escape or backdrop click. Close it
|
|
2915
|
+
* by setting `isOpen` to `false`.
|
|
2916
|
+
* - **Focus**: goes to the content on open. To focus a button instead, use
|
|
2917
|
+
* `focusContentOnOpen={false}` and `data-autofocus` on the least destructive
|
|
2918
|
+
* (or most used) button.
|
|
2919
|
+
* - **Name**: `aria-label` or `aria-labelledby` is required.
|
|
2920
|
+
*
|
|
2921
|
+
* Design system: <https://www.figma.com/design/YcWQMMhHPVVmc47cHHEEAl/Oak-Design-Kit?node-id=25437-6387>
|
|
2922
|
+
*/
|
|
2923
|
+
var OakDialog = function (_a) {
|
|
2924
|
+
var isOpen = _a.isOpen, children = _a.children, footerSlot = _a.footerSlot, _b = _a.focusContentOnOpen, focusContentOnOpen = _b === void 0 ? true : _b, _c = _a.width, width = _c === void 0 ? "spacing-960" : _c, _d = _a.maxHeight, maxHeight = _d === void 0 ? "spacing-640" : _d, ariaLabel = _a["aria-label"], ariaLabelledBy = _a["aria-labelledby"], ariaDescribedBy = _a["aria-describedby"], domContainer = _a.domContainer, zIndex = _a.zIndex, returnFocus = _a.returnFocus;
|
|
2925
|
+
return (React__default.default.createElement(InternalModalBase, { isOpen: isOpen, placement: "centre", role: "alertdialog", width: width, height: maxHeight, borderRadius: "border-radius-xl", footerSlot: footerSlot, autoFocusContent: focusContentOnOpen, "aria-describedby": ariaDescribedBy, domContainer: domContainer, zIndex: zIndex, returnFocus: returnFocus, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy }, children));
|
|
2926
|
+
};
|
|
2927
|
+
|
|
2928
|
+
/**
|
|
2929
|
+
* The Figma footer layouts shared by `OakModalFooter` and `OakDialogFooter`.
|
|
2930
|
+
*
|
|
2931
|
+
* Renders a `div`, not a `<footer>`: inside a dialog a `<footer>` would
|
|
2932
|
+
* become an extra `contentinfo` landmark.
|
|
2933
|
+
*
|
|
2934
|
+
* Design system: <https://www.figma.com/design/YcWQMMhHPVVmc47cHHEEAl/Oak-Design-Kit?node-id=25437-6560>
|
|
2935
|
+
*/
|
|
2936
|
+
var InternalModalFooter = function (_a) {
|
|
2937
|
+
var layout = _a.layout, children = _a.children;
|
|
2938
|
+
return (React__default.default.createElement(OakFlex, { "$flexDirection": layout === "vertical" ? "column" : "row", "$justifyContent": layout === "right" ? "flex-end" : "flex-start", "$gap": "spacing-24", "$pa": "spacing-16", "$bt": "border-solid-s", "$borderColor": "border-neutral-lighter" }, children));
|
|
2939
|
+
};
|
|
2940
|
+
|
|
2941
|
+
/**
|
|
2942
|
+
* A footer for the `footerSlot` of `OakDialog`, in one of the four Figma
|
|
2943
|
+
* footer layouts. You can pass your own content to `footerSlot` instead.
|
|
2944
|
+
*
|
|
2945
|
+
* - `horizontal`: buttons side by side
|
|
2946
|
+
* - `vertical`: buttons stacked
|
|
2947
|
+
* - `left` / `right`: buttons aligned to that side
|
|
2948
|
+
*
|
|
2949
|
+
* For `horizontal` and `vertical`, give each button `width="100%"` so they
|
|
2950
|
+
* fill the footer (sharing it equally when horizontal), as in Figma.
|
|
2951
|
+
*
|
|
2952
|
+
* Design system: <https://www.figma.com/design/YcWQMMhHPVVmc47cHHEEAl/Oak-Design-Kit?node-id=25437-6560>
|
|
2953
|
+
*/
|
|
2954
|
+
var OakDialogFooter = function (_a) {
|
|
2955
|
+
var layout = _a.layout, children = _a.children;
|
|
2956
|
+
return (React__default.default.createElement(InternalModalFooter, { layout: layout }, children));
|
|
2957
|
+
};
|
|
2958
|
+
|
|
2959
|
+
/**
|
|
2960
|
+
* A modal for actions or notifications that give critical information related
|
|
2961
|
+
* to a task. Don't use it for marketing or advertising.
|
|
2962
|
+
*
|
|
2963
|
+
* It can be closed with the close button, the Escape key, or by clicking the
|
|
2964
|
+
* backdrop. By default, the close button gets focus when the modal opens.
|
|
2965
|
+
*
|
|
2966
|
+
* To focus a different element instead, set `focusCloseButtonOnOpen={false}` and
|
|
2967
|
+
* add `data-autofocus` to the element you want focused (e.g. an action link).
|
|
2968
|
+
*
|
|
2969
|
+
* An accessible name is required: pass either `aria-label` or `aria-labelledby`.
|
|
2970
|
+
*
|
|
2971
|
+
* Use `OakDialog` instead when the user must make an explicit choice before
|
|
2972
|
+
* returning to the page.
|
|
2973
|
+
*
|
|
2974
|
+
* Design system: <https://www.figma.com/design/YcWQMMhHPVVmc47cHHEEAl/Oak-Design-Kit?node-id=25437-6465>
|
|
2975
|
+
*/
|
|
2976
|
+
var OakModal = function (_a) {
|
|
2977
|
+
var isOpen = _a.isOpen, onClose = _a.onClose, position = _a.position, _b = _a.size, size = _b === void 0 ? "spacing-640" : _b, children = _a.children, headerSlot = _a.headerSlot, _c = _a.headerVariant, headerVariant = _c === void 0 ? "default" : _c, footerSlot = _a.footerSlot, _d = _a.focusCloseButtonOnOpen, focusCloseButtonOnOpen = _d === void 0 ? true : _d, ariaLabel = _a["aria-label"], ariaLabelledBy = _a["aria-labelledby"], ariaDescribedBy = _a["aria-describedby"], domContainer = _a.domContainer, zIndex = _a.zIndex, returnFocus = _a.returnFocus;
|
|
2978
|
+
var isVerticalDrawer = position === "top" || position === "bottom";
|
|
2979
|
+
var isHeaderInverted = headerVariant === "inverted";
|
|
2980
|
+
// DOM order matches visual order (headerSlot, then the close button) so Tab
|
|
2981
|
+
// order follows what the user sees. When focusCloseButtonOnOpen is true,
|
|
2982
|
+
// `data-autofocus` gives the close button initial focus regardless of what is in headerSlot.
|
|
2983
|
+
var header = (React__default.default.createElement(OakFlex, { "$width": "100%", "$minHeight": "spacing-64", "$pt": "spacing-16", "$ph": "spacing-24", "$gap": "spacing-16", "$alignItems": "flex-start", "$background": isHeaderInverted ? "bg-inverted" : undefined, "$color": isHeaderInverted ? "text-inverted" : undefined, "data-testid": "modal-header" },
|
|
2984
|
+
React__default.default.createElement(OakFlex, { "$flexGrow": 1, "$minHeight": "spacing-32", "$alignItems": "center" }, headerSlot),
|
|
2985
|
+
React__default.default.createElement(OakCloseButton, { onClose: function () { return onClose("close_button"); }, size: "spacing-32", variant: headerVariant, "data-autofocus": focusCloseButtonOnOpen || undefined })));
|
|
2986
|
+
return (React__default.default.createElement(InternalModalBase, { isOpen: isOpen, placement: position, onDismiss: function () { return onClose(); }, width: isVerticalDrawer ? undefined : size, height: isVerticalDrawer ? size : undefined, header: header, footerSlot: footerSlot, "aria-describedby": ariaDescribedBy, domContainer: domContainer, zIndex: zIndex, returnFocus: returnFocus, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy }, children));
|
|
2987
|
+
};
|
|
2988
|
+
|
|
2989
|
+
/**
|
|
2990
|
+
* A footer for the `footerSlot` of `OakModal`, in one of the four Figma
|
|
2991
|
+
* footer layouts. You can pass your own content to `footerSlot` instead.
|
|
2992
|
+
*
|
|
2993
|
+
* - `horizontal`: buttons side by side
|
|
2994
|
+
* - `vertical`: buttons stacked
|
|
2995
|
+
* - `left` / `right`: buttons aligned to that side
|
|
2996
|
+
*
|
|
2997
|
+
* For `horizontal` and `vertical`, give each button `width="100%"` so they
|
|
2998
|
+
* fill the footer (sharing it equally when horizontal), as in Figma.
|
|
2999
|
+
*
|
|
3000
|
+
* Design system: <https://www.figma.com/design/YcWQMMhHPVVmc47cHHEEAl/Oak-Design-Kit?node-id=25437-6560>
|
|
3001
|
+
*/
|
|
3002
|
+
var OakModalFooter = function (_a) {
|
|
3003
|
+
var layout = _a.layout, children = _a.children;
|
|
3004
|
+
return (React__default.default.createElement(InternalModalFooter, { layout: layout }, children));
|
|
3005
|
+
};
|
|
3006
|
+
|
|
2750
3007
|
var OakTagFunctional = function (props) {
|
|
2751
3008
|
var label = props.label, useSpan = props.useSpan, isTrailingIcon = props.isTrailingIcon, iconName = props.iconName, oakFlexProps = tslib.__rest(props, ["label", "useSpan", "isTrailingIcon", "iconName"]);
|
|
2752
3009
|
var icon = iconName && (React__default.default.createElement(OakIcon, { "$height": "spacing-20", "$width": "spacing-20", iconName: iconName }));
|
|
@@ -8000,6 +8257,8 @@ exports.OakCookieConsentContext = OakCookieConsentContext;
|
|
|
8000
8257
|
exports.OakCookieConsentProvider = OakCookieConsentProvider;
|
|
8001
8258
|
exports.OakCookieSettingsModal = OakCookieSettingsModal;
|
|
8002
8259
|
exports.OakCopyLinkButton = OakCopyLinkButton;
|
|
8260
|
+
exports.OakDialog = OakDialog;
|
|
8261
|
+
exports.OakDialogFooter = OakDialogFooter;
|
|
8003
8262
|
exports.OakDownloadsJourneyChildSubjectTierSelector = OakDownloadsJourneyChildSubjectTierSelector;
|
|
8004
8263
|
exports.OakDragAndDropInstructions = OakDragAndDropInstructions;
|
|
8005
8264
|
exports.OakDraggable = OakDraggable;
|
|
@@ -8060,8 +8319,10 @@ exports.OakMediaClip = OakMediaClip;
|
|
|
8060
8319
|
exports.OakMediaClipList = OakMediaClipList;
|
|
8061
8320
|
exports.OakMediaClipListAccordion = OakMediaClipListAccordion;
|
|
8062
8321
|
exports.OakMediaClipStackListItem = OakMediaClipStackListItem;
|
|
8322
|
+
exports.OakModal = OakModal;
|
|
8063
8323
|
exports.OakModalCenter = OakModalCenter;
|
|
8064
8324
|
exports.OakModalCenterBody = OakModalCenterBody;
|
|
8325
|
+
exports.OakModalFooter = OakModalFooter;
|
|
8065
8326
|
exports.OakMultilineText = OakMultilineText;
|
|
8066
8327
|
exports.OakOL = OakOL;
|
|
8067
8328
|
exports.OakOptGroup = OakOptGroup;
|