@oaknational/oak-components 3.12.0 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/npm/cjs/index.js
CHANGED
|
@@ -3877,9 +3877,6 @@ var bannerVariants = {
|
|
|
3877
3877
|
heading: {
|
|
3878
3878
|
$font: ["heading-7"],
|
|
3879
3879
|
},
|
|
3880
|
-
ctaWrapper: {
|
|
3881
|
-
$mt: "spacing-12",
|
|
3882
|
-
},
|
|
3883
3880
|
flexDirection: "row",
|
|
3884
3881
|
bannerPadding: "spacing-16",
|
|
3885
3882
|
textContentGap: "spacing-4",
|
|
@@ -3895,9 +3892,6 @@ var bannerVariants = {
|
|
|
3895
3892
|
heading: {
|
|
3896
3893
|
$font: ["heading-6"],
|
|
3897
3894
|
},
|
|
3898
|
-
ctaWrapper: {
|
|
3899
|
-
$mt: "spacing-8",
|
|
3900
|
-
},
|
|
3901
3895
|
closeButtonWrapper: {
|
|
3902
3896
|
$position: "absolute",
|
|
3903
3897
|
$top: "spacing-0",
|
|
@@ -3940,10 +3934,11 @@ var OakInlineBanner = function (_a) {
|
|
|
3940
3934
|
iconLogic,
|
|
3941
3935
|
canDismiss && (React__default.default.createElement(OakFlex, tslib.__assign({ "$order": 2 }, bannerVariants[variant].closeButtonWrapper),
|
|
3942
3936
|
React__default.default.createElement(InternalShadowRoundButton, tslib.__assign({ "aria-label": "Dismiss banner", defaultIconBackground: "transparent", defaultIconColor: "icon-primary", defaultTextColor: "transparent", hoverTextColor: "transparent", disabledTextColor: "transparent", hoverIconBackground: "icon-primary", hoverIconColor: "icon-inverted", disabledIconBackground: "transparent", iconBackgroundSize: "spacing-24", iconSize: "spacing-24", iconName: "cross", "data-testid": "inline-banner-close-button", onClick: onDismiss }, closeButtonOverrideProps)))),
|
|
3943
|
-
React__default.default.createElement(OakFlex, { "$order": 1, "$
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3937
|
+
React__default.default.createElement(OakFlex, { "$order": 1, "$flexDirection": title ? "column" : ["column", "row"], "$gap": title ? "spacing-24" : ["spacing-12", "spacing-24"], "$width": "100%", "$alignItems": "start" },
|
|
3938
|
+
React__default.default.createElement(OakFlex, { "$width": "100%", "$flexDirection": title ? "column" : "row", "$justifyContent": title ? "center" : "space-between", "$alignItems": title ? "start" : "center", "$gap": bannerVariants[variant].textContentGap },
|
|
3939
|
+
title && (React__default.default.createElement(OakHeading, tslib.__assign({ "data-testid": "inline-banner-title", tag: titleTag }, bannerVariants[variant].heading), title)),
|
|
3940
|
+
React__default.default.createElement(OakBox, { "$font": "body-2", "data-testid": "inline-banner-message" }, message)),
|
|
3941
|
+
cta && React__default.default.createElement(OakFlex, { "$flexShrink": 0 }, cta)))));
|
|
3947
3942
|
};
|
|
3948
3943
|
|
|
3949
3944
|
var FocusOnBox = styled__default.default(reactFocusOn.FocusOn)(templateObject_1$$ || (templateObject_1$$ = tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), oakBoxCss);
|
package/dist/npm/cjs/types.d.ts
CHANGED
|
@@ -3070,7 +3070,6 @@ type OakInlineBannerVariantProps = {
|
|
|
3070
3070
|
loadingSpinnerDimensions: Partial<OakLoadingSpinnerProps>;
|
|
3071
3071
|
heading: Partial<OakHeadingProps>;
|
|
3072
3072
|
closeButtonWrapper?: Partial<OakBoxProps>;
|
|
3073
|
-
ctaWrapper?: Partial<OakBoxProps>;
|
|
3074
3073
|
flexDirection: FlexStyleProps["$flexDirection"];
|
|
3075
3074
|
bannerPadding: PaddingStyleProps["$pa"];
|
|
3076
3075
|
textContentGap?: FlexStyleProps["$gap"];
|
|
@@ -57,9 +57,6 @@ var bannerVariants = {
|
|
|
57
57
|
heading: {
|
|
58
58
|
$font: ["heading-7"],
|
|
59
59
|
},
|
|
60
|
-
ctaWrapper: {
|
|
61
|
-
$mt: "spacing-12",
|
|
62
|
-
},
|
|
63
60
|
flexDirection: "row",
|
|
64
61
|
bannerPadding: "spacing-16",
|
|
65
62
|
textContentGap: "spacing-4",
|
|
@@ -75,9 +72,6 @@ var bannerVariants = {
|
|
|
75
72
|
heading: {
|
|
76
73
|
$font: ["heading-6"],
|
|
77
74
|
},
|
|
78
|
-
ctaWrapper: {
|
|
79
|
-
$mt: "spacing-8",
|
|
80
|
-
},
|
|
81
75
|
closeButtonWrapper: {
|
|
82
76
|
$position: "absolute",
|
|
83
77
|
$top: "spacing-0",
|
|
@@ -120,10 +114,11 @@ var OakInlineBanner = function (_a) {
|
|
|
120
114
|
iconLogic,
|
|
121
115
|
canDismiss && (React.createElement(OakFlex, __assign({ "$order": 2 }, bannerVariants[variant].closeButtonWrapper),
|
|
122
116
|
React.createElement(InternalShadowRoundButton, __assign({ "aria-label": "Dismiss banner", defaultIconBackground: "transparent", defaultIconColor: "icon-primary", defaultTextColor: "transparent", hoverTextColor: "transparent", disabledTextColor: "transparent", hoverIconBackground: "icon-primary", hoverIconColor: "icon-inverted", disabledIconBackground: "transparent", iconBackgroundSize: "spacing-24", iconSize: "spacing-24", iconName: "cross", "data-testid": "inline-banner-close-button", onClick: onDismiss }, closeButtonOverrideProps)))),
|
|
123
|
-
React.createElement(OakFlex, { "$order": 1, "$
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
117
|
+
React.createElement(OakFlex, { "$order": 1, "$flexDirection": title ? "column" : ["column", "row"], "$gap": title ? "spacing-24" : ["spacing-12", "spacing-24"], "$width": "100%", "$alignItems": "start" },
|
|
118
|
+
React.createElement(OakFlex, { "$width": "100%", "$flexDirection": title ? "column" : "row", "$justifyContent": title ? "center" : "space-between", "$alignItems": title ? "start" : "center", "$gap": bannerVariants[variant].textContentGap },
|
|
119
|
+
title && (React.createElement(OakHeading, __assign({ "data-testid": "inline-banner-title", tag: titleTag }, bannerVariants[variant].heading), title)),
|
|
120
|
+
React.createElement(OakBox, { "$font": "body-2", "data-testid": "inline-banner-message" }, message)),
|
|
121
|
+
cta && React.createElement(OakFlex, { "$flexShrink": 0 }, cta)))));
|
|
127
122
|
};
|
|
128
123
|
|
|
129
124
|
export { OakInlineBanner, bannerTypes, bannerVariants };
|
package/dist/npm/es/types.d.ts
CHANGED
|
@@ -3070,7 +3070,6 @@ type OakInlineBannerVariantProps = {
|
|
|
3070
3070
|
loadingSpinnerDimensions: Partial<OakLoadingSpinnerProps>;
|
|
3071
3071
|
heading: Partial<OakHeadingProps>;
|
|
3072
3072
|
closeButtonWrapper?: Partial<OakBoxProps>;
|
|
3073
|
-
ctaWrapper?: Partial<OakBoxProps>;
|
|
3074
3073
|
flexDirection: FlexStyleProps["$flexDirection"];
|
|
3075
3074
|
bannerPadding: PaddingStyleProps["$pa"];
|
|
3076
3075
|
textContentGap?: FlexStyleProps["$gap"];
|