@designcrowd/library.brand-page 6.1.10 → 6.1.11-ast-header-opacity
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/lib/src/{CreatedOnBrandCrowd-de-de-nsMF2NQ9.js → CreatedOnBrandCrowd-de-de-CktLQkFP.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BQI_UCR7.js → CreatedOnBrandCrowd-en-us-D6HNUOiU.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DgNOoSPn.js → CreatedOnBrandCrowd-es-es-B9WlJ-K0.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-JFRaxjvx.js → CreatedOnBrandCrowd-fr-ca-BqaKSx5Z.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-JFRaxjvx.js → CreatedOnBrandCrowd-fr-fr-BqaKSx5Z.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-DP6_-90i.js → CreatedOnBrandCrowd-pt-br-CZIdZJXJ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-DP6_-90i.js → CreatedOnBrandCrowd-pt-pt-CZIdZJXJ.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-07F2wjkk.js → CreatedOnDcom-de-de-BFWQ0l0n.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-DaV9sa6e.js → CreatedOnDcom-en-us-DkWqmrra.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-73uOymvv.js → CreatedOnDcom-es-es-YbgOM-xc.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-Ci9Ome30.js → CreatedOnDcom-fr-ca-D3VNHHhZ.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DLHuMHfE.js → CreatedOnDcom-fr-fr-DOg4SZ-0.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-Fbt7tY-E.js → CreatedOnDcom-pt-br-BfQrkhp2.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-V2jTB6of.js → CreatedOnDcom-pt-pt-BUTTvb8-.js} +1 -1
- package/lib/src/brand-page/constants/index.d.ts +1 -0
- package/lib/src/brand-page/constants/index.js +1 -0
- package/lib/src/brand-page/constants/sections/header-display.constants.d.ts +2 -1
- package/lib/src/brand-page/constants/sections/header-display.constants.js +24 -24
- package/lib/src/brand-page/constants/sections/navigation-type.constants.d.ts +9 -0
- package/lib/src/brand-page/constants/sections/navigation-type.constants.js +33 -0
- package/lib/src/brand-page/models/index.d.ts +3 -1
- package/lib/src/brand-page/models/index.js +9 -6
- package/lib/src/brand-page/utils/container-text-color.util.d.ts +7 -4
- package/lib/src/brand-page/utils/container-text-color.util.js +11 -6
- package/lib/src/brand-page/utils/migration/migration-21.js +62 -0
- package/lib/src/brand-page/utils/view-model.util.js +23 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -0
- package/lib/src/brand-page-maker/models/navigation-style-configs.d.ts +1 -0
- package/lib/src/brand-page-maker/models/navigation-style-configs.js +31 -7
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +18 -0
- package/lib/src/{bundled-translations-C98dISr1.js → bundled-translations-B2q5GWTQ.js} +21 -21
- package/lib/src/{bundled-translations.de-DE-D8ul_G4P.js → bundled-translations.de-DE-FhH2H_rd.js} +18 -18
- package/lib/src/{bundled-translations.es-ES-BVmPyfw9.js → bundled-translations.es-ES-_ZExxMi7.js} +21 -21
- package/lib/src/{bundled-translations.fr-CA-DmzKPhfa.js → bundled-translations.fr-CA-Tg-ODIiC.js} +1 -1
- package/lib/src/{bundled-translations.fr-FR-CQRiASGY.js → bundled-translations.fr-FR-C0sU51Mz.js} +1 -1
- package/lib/src/{bundled-translations.pt-BR-guDO9Yfg.js → bundled-translations.pt-BR-MYFIhA4u.js} +9 -9
- package/lib/src/bundled-translations.pt-PT-DeUBSzCB.js +179 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +6 -0
- package/lib/src/bundles/bundled-translations.es-ES.json +6 -0
- package/lib/src/bundles/bundled-translations.fr-CA.json +6 -0
- package/lib/src/bundles/bundled-translations.fr-FR.json +6 -0
- package/lib/src/bundles/bundled-translations.json +6 -0
- package/lib/src/bundles/bundled-translations.pt-BR.json +6 -0
- package/lib/src/bundles/bundled-translations.pt-PT.json +6 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +185 -63
- package/lib/src/css/library.brand-page-brandPage.min.css +190 -63
- package/lib/src/css/library.brand-page-designCom.min.css +185 -63
- package/lib/src/css/library.brand-page-preview.min.css +185 -63
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-D2a1EmRb.js → lib-sLpxZkPj.js} +33184 -32589
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +1 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -0
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +1 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +3 -0
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +9 -1
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +38 -1
- package/lib/src/shared/page-settings/store/page-settings-store.d.ts +6 -0
- package/lib/src/shared/page-settings/store/page-settings-store.js +22 -1
- package/lib/src/utils/minify-brand-page-metadata.d.ts +1 -0
- package/lib/src/utils/minify-brand-page-metadata.js +1 -0
- package/package.json +2 -2
- package/src/brand-page/constants/index.ts +1 -0
- package/src/brand-page/constants/sections/header-display.constants.ts +26 -25
- package/src/brand-page/constants/sections/navigation-type.constants.test.ts +53 -0
- package/src/brand-page/constants/sections/navigation-type.constants.ts +48 -0
- package/src/brand-page/models/footer-icon-color.test.ts +38 -102
- package/src/brand-page/models/index.ts +9 -9
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +12 -6
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +4 -6
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +8 -12
- package/src/brand-page/utils/container-text-color.util.test.ts +16 -0
- package/src/brand-page/utils/container-text-color.util.ts +15 -6
- package/src/brand-page/utils/migration/migration-21.test.ts +169 -0
- package/src/brand-page/utils/migration/migration-21.ts +75 -0
- package/src/brand-page/utils/view-model.util.test.ts +99 -1
- package/src/brand-page/utils/view-model.util.ts +31 -2
- package/src/brand-page-maker/models/i18n/models.de-DE.json +3 -0
- package/src/brand-page-maker/models/i18n/models.es-ES.json +3 -0
- package/src/brand-page-maker/models/i18n/models.fr-CA.json +3 -0
- package/src/brand-page-maker/models/i18n/models.fr-FR.json +3 -0
- package/src/brand-page-maker/models/i18n/models.json +3 -0
- package/src/brand-page-maker/models/i18n/models.pt-BR.json +3 -0
- package/src/brand-page-maker/models/i18n/models.pt-PT.json +3 -0
- package/src/brand-page-maker/models/navigation-style-configs.ts +32 -6
- package/src/bundles/bundled-translations.de-DE.json +6 -0
- package/src/bundles/bundled-translations.es-ES.json +6 -0
- package/src/bundles/bundled-translations.fr-CA.json +6 -0
- package/src/bundles/bundled-translations.fr-FR.json +6 -0
- package/src/bundles/bundled-translations.json +6 -0
- package/src/bundles/bundled-translations.pt-BR.json +6 -0
- package/src/bundles/bundled-translations.pt-PT.json +6 -0
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +0 -6
- package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.test.ts +92 -0
- package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.vue +22 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.de-DE.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.es-ES.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.fr-CA.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.fr-FR.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.pt-BR.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.pt-PT.json +1 -0
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderNavigationStyle.vue +95 -0
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderNavigationType.vue +26 -14
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +62 -1
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.de-DE.json +10 -7
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.es-ES.json +10 -7
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.fr-CA.json +10 -7
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.fr-FR.json +10 -7
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.json +3 -0
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.pt-BR.json +10 -7
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.pt-PT.json +10 -7
- package/src/shared/page-settings/store/page-settings-store.test.ts +97 -0
- package/src/shared/page-settings/store/page-settings-store.ts +36 -1
- package/src/utils/minify-brand-page-metadata.test.ts +52 -1
- package/src/utils/minify-brand-page-metadata.ts +3 -0
- package/lib/src/bundled-translations.pt-PT-GFpLNo-u.js +0 -179
|
@@ -5,4 +5,5 @@ export * from './misc.constants';
|
|
|
5
5
|
export * from './logo.constants';
|
|
6
6
|
export * from './sections/header-display.constants';
|
|
7
7
|
export * from './sections/navigation-display.constants';
|
|
8
|
+
export * from './sections/navigation-type.constants';
|
|
8
9
|
export * from './sections/footer-display.constants';
|
|
@@ -5,4 +5,5 @@ export * from './misc.constants';
|
|
|
5
5
|
export * from './logo.constants';
|
|
6
6
|
export * from './sections/header-display.constants';
|
|
7
7
|
export * from './sections/navigation-display.constants';
|
|
8
|
+
export * from './sections/navigation-type.constants';
|
|
8
9
|
export * from './sections/footer-display.constants';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ButtonGroupOption } from '@brand-page-maker/models/button-group.model';
|
|
2
|
+
import type { NavigationType } from './navigation-type.constants';
|
|
2
3
|
export declare const HEADER_DISPLAY: {
|
|
3
4
|
/** @deprecated */
|
|
4
5
|
readonly ALIGN_CENTERED: "centered";
|
|
@@ -37,7 +38,7 @@ export type PageSectionDisplayStyle = (typeof HEADER_DISPLAY)[keyof typeof HEADE
|
|
|
37
38
|
export type HeaderDisplayStyle = PageSectionDisplayStyle;
|
|
38
39
|
interface HeaderDisplayStyleConfig {
|
|
39
40
|
viewMode: 'desktop' | 'mobile';
|
|
40
|
-
navType:
|
|
41
|
+
navType: NavigationType;
|
|
41
42
|
supportLogo: boolean;
|
|
42
43
|
supportedNavTypes: string[];
|
|
43
44
|
option: ButtonGroupOption;
|
|
@@ -44,7 +44,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
44
44
|
option: {
|
|
45
45
|
value: HEADER_DISPLAY.DESKTOP_TAB_1,
|
|
46
46
|
iconName: 'header-desktop-nav-style-tab-display-style-1',
|
|
47
|
-
iconViewBox: '0 0
|
|
47
|
+
iconViewBox: '0 0 160 56',
|
|
48
48
|
dataAttribute: HEADER_DISPLAY.DESKTOP_TAB_1,
|
|
49
49
|
isSelected: false,
|
|
50
50
|
},
|
|
@@ -57,7 +57,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
57
57
|
option: {
|
|
58
58
|
value: HEADER_DISPLAY.DESKTOP_TAB_2,
|
|
59
59
|
iconName: 'header-desktop-nav-style-tab-display-style-2',
|
|
60
|
-
iconViewBox: '0 0
|
|
60
|
+
iconViewBox: '0 0 160 56',
|
|
61
61
|
dataAttribute: HEADER_DISPLAY.DESKTOP_TAB_2,
|
|
62
62
|
isSelected: false,
|
|
63
63
|
},
|
|
@@ -70,7 +70,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
70
70
|
option: {
|
|
71
71
|
value: HEADER_DISPLAY.DESKTOP_TAB_3,
|
|
72
72
|
iconName: 'header-desktop-nav-style-tab-display-style-3',
|
|
73
|
-
iconViewBox: '0 0
|
|
73
|
+
iconViewBox: '0 0 160 56',
|
|
74
74
|
dataAttribute: HEADER_DISPLAY.DESKTOP_TAB_3,
|
|
75
75
|
isSelected: false,
|
|
76
76
|
},
|
|
@@ -83,7 +83,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
83
83
|
option: {
|
|
84
84
|
value: HEADER_DISPLAY.DESKTOP_TAB_4,
|
|
85
85
|
iconName: 'header-desktop-nav-style-tab-display-style-4',
|
|
86
|
-
iconViewBox: '0 0
|
|
86
|
+
iconViewBox: '0 0 160 56',
|
|
87
87
|
dataAttribute: HEADER_DISPLAY.DESKTOP_TAB_4,
|
|
88
88
|
isSelected: false,
|
|
89
89
|
},
|
|
@@ -96,7 +96,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
96
96
|
option: {
|
|
97
97
|
value: HEADER_DISPLAY.DESKTOP_TAB_5,
|
|
98
98
|
iconName: 'header-desktop-nav-style-tab-display-style-5',
|
|
99
|
-
iconViewBox: '0 0
|
|
99
|
+
iconViewBox: '0 0 160 56',
|
|
100
100
|
dataAttribute: HEADER_DISPLAY.DESKTOP_TAB_5,
|
|
101
101
|
isSelected: false,
|
|
102
102
|
},
|
|
@@ -109,7 +109,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
109
109
|
option: {
|
|
110
110
|
value: HEADER_DISPLAY.DESKTOP_TAB_6,
|
|
111
111
|
iconName: 'header-desktop-nav-style-tab-display-style-6',
|
|
112
|
-
iconViewBox: '0 0
|
|
112
|
+
iconViewBox: '0 0 160 56',
|
|
113
113
|
dataAttribute: HEADER_DISPLAY.DESKTOP_TAB_6,
|
|
114
114
|
isSelected: false,
|
|
115
115
|
},
|
|
@@ -123,7 +123,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
123
123
|
option: {
|
|
124
124
|
value: HEADER_DISPLAY.DESKTOP_TAB_NO_LOGO_1,
|
|
125
125
|
iconName: 'header-nav-style-tab-display-style-no-logo-1',
|
|
126
|
-
iconViewBox: '0 0
|
|
126
|
+
iconViewBox: '0 0 160 56',
|
|
127
127
|
dataAttribute: HEADER_DISPLAY.DESKTOP_TAB_NO_LOGO_1,
|
|
128
128
|
isSelected: false,
|
|
129
129
|
},
|
|
@@ -136,7 +136,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
136
136
|
option: {
|
|
137
137
|
value: HEADER_DISPLAY.DESKTOP_TAB_NO_LOGO_2,
|
|
138
138
|
iconName: 'header-nav-style-tab-display-style-no-logo-2',
|
|
139
|
-
iconViewBox: '0 0
|
|
139
|
+
iconViewBox: '0 0 160 56',
|
|
140
140
|
dataAttribute: HEADER_DISPLAY.DESKTOP_TAB_NO_LOGO_2,
|
|
141
141
|
isSelected: false,
|
|
142
142
|
},
|
|
@@ -149,7 +149,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
149
149
|
option: {
|
|
150
150
|
value: HEADER_DISPLAY.DESKTOP_TAB_NO_LOGO_3,
|
|
151
151
|
iconName: 'header-nav-style-tab-display-style-no-logo-3',
|
|
152
|
-
iconViewBox: '0 0
|
|
152
|
+
iconViewBox: '0 0 160 56',
|
|
153
153
|
dataAttribute: HEADER_DISPLAY.DESKTOP_TAB_NO_LOGO_3,
|
|
154
154
|
isSelected: false,
|
|
155
155
|
},
|
|
@@ -168,7 +168,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
168
168
|
option: {
|
|
169
169
|
value: HEADER_DISPLAY.DESKTOP_HAMBURGER_1,
|
|
170
170
|
iconName: 'header-desktop-nav-style-hamburger-display-style-1',
|
|
171
|
-
iconViewBox: '0 0
|
|
171
|
+
iconViewBox: '0 0 160 56',
|
|
172
172
|
dataAttribute: HEADER_DISPLAY.DESKTOP_HAMBURGER_1,
|
|
173
173
|
isSelected: false,
|
|
174
174
|
},
|
|
@@ -186,7 +186,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
186
186
|
option: {
|
|
187
187
|
value: HEADER_DISPLAY.DESKTOP_HAMBURGER_2,
|
|
188
188
|
iconName: 'header-desktop-nav-style-hamburger-display-style-2',
|
|
189
|
-
iconViewBox: '0 0
|
|
189
|
+
iconViewBox: '0 0 160 56',
|
|
190
190
|
dataAttribute: HEADER_DISPLAY.DESKTOP_HAMBURGER_2,
|
|
191
191
|
isSelected: false,
|
|
192
192
|
},
|
|
@@ -205,7 +205,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
205
205
|
option: {
|
|
206
206
|
value: HEADER_DISPLAY.DESKTOP_HAMBURGER_NO_LOGO_1,
|
|
207
207
|
iconName: 'header-nav-style-hamburger-display-style-no-logo-1',
|
|
208
|
-
iconViewBox: '0 0
|
|
208
|
+
iconViewBox: '0 0 160 56',
|
|
209
209
|
dataAttribute: HEADER_DISPLAY.DESKTOP_HAMBURGER_NO_LOGO_1,
|
|
210
210
|
isSelected: false,
|
|
211
211
|
},
|
|
@@ -223,7 +223,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
223
223
|
option: {
|
|
224
224
|
value: HEADER_DISPLAY.DESKTOP_HAMBURGER_NO_LOGO_2,
|
|
225
225
|
iconName: 'header-nav-style-hamburger-display-style-no-logo-2',
|
|
226
|
-
iconViewBox: '0 0
|
|
226
|
+
iconViewBox: '0 0 160 56',
|
|
227
227
|
dataAttribute: HEADER_DISPLAY.DESKTOP_HAMBURGER_NO_LOGO_2,
|
|
228
228
|
isSelected: false,
|
|
229
229
|
},
|
|
@@ -241,7 +241,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
241
241
|
option: {
|
|
242
242
|
value: HEADER_DISPLAY.DESKTOP_HAMBURGER_NO_LOGO_3,
|
|
243
243
|
iconName: 'header-nav-style-hamburger-display-style-no-logo-3',
|
|
244
|
-
iconViewBox: '0 0
|
|
244
|
+
iconViewBox: '0 0 160 56',
|
|
245
245
|
dataAttribute: HEADER_DISPLAY.DESKTOP_HAMBURGER_NO_LOGO_3,
|
|
246
246
|
isSelected: false,
|
|
247
247
|
},
|
|
@@ -255,7 +255,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
255
255
|
option: {
|
|
256
256
|
value: HEADER_DISPLAY.MOBILE_TAB_1,
|
|
257
257
|
iconName: 'header-mobile-nav-style-tab-display-style-1',
|
|
258
|
-
iconViewBox: '0 0
|
|
258
|
+
iconViewBox: '0 0 160 56',
|
|
259
259
|
dataAttribute: HEADER_DISPLAY.MOBILE_TAB_1,
|
|
260
260
|
isSelected: false,
|
|
261
261
|
},
|
|
@@ -268,7 +268,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
268
268
|
option: {
|
|
269
269
|
value: HEADER_DISPLAY.MOBILE_TAB_2,
|
|
270
270
|
iconName: 'header-mobile-nav-style-tab-display-style-2',
|
|
271
|
-
iconViewBox: '0 0
|
|
271
|
+
iconViewBox: '0 0 160 56',
|
|
272
272
|
dataAttribute: HEADER_DISPLAY.MOBILE_TAB_2,
|
|
273
273
|
isSelected: false,
|
|
274
274
|
},
|
|
@@ -282,7 +282,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
282
282
|
option: {
|
|
283
283
|
value: HEADER_DISPLAY.MOBILE_TAB_NO_LOGO_1,
|
|
284
284
|
iconName: 'header-nav-style-tab-display-style-no-logo-2',
|
|
285
|
-
iconViewBox: '0 0
|
|
285
|
+
iconViewBox: '0 0 160 56',
|
|
286
286
|
dataAttribute: HEADER_DISPLAY.MOBILE_TAB_NO_LOGO_1,
|
|
287
287
|
isSelected: false,
|
|
288
288
|
},
|
|
@@ -301,7 +301,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
301
301
|
option: {
|
|
302
302
|
value: HEADER_DISPLAY.MOBILE_HAMBURGER_1,
|
|
303
303
|
iconName: 'header-mobile-nav-style-hamburger-display-style-1',
|
|
304
|
-
iconViewBox: '0 0
|
|
304
|
+
iconViewBox: '0 0 160 56',
|
|
305
305
|
dataAttribute: HEADER_DISPLAY.MOBILE_HAMBURGER_1,
|
|
306
306
|
isSelected: false,
|
|
307
307
|
},
|
|
@@ -319,7 +319,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
319
319
|
option: {
|
|
320
320
|
value: HEADER_DISPLAY.MOBILE_HAMBURGER_2,
|
|
321
321
|
iconName: 'header-mobile-nav-style-hamburger-display-style-2',
|
|
322
|
-
iconViewBox: '0 0
|
|
322
|
+
iconViewBox: '0 0 160 56',
|
|
323
323
|
dataAttribute: HEADER_DISPLAY.MOBILE_HAMBURGER_2,
|
|
324
324
|
isSelected: false,
|
|
325
325
|
},
|
|
@@ -337,7 +337,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
337
337
|
option: {
|
|
338
338
|
value: HEADER_DISPLAY.MOBILE_HAMBURGER_3,
|
|
339
339
|
iconName: 'header-mobile-nav-style-hamburger-display-style-3',
|
|
340
|
-
iconViewBox: '0 0
|
|
340
|
+
iconViewBox: '0 0 160 56',
|
|
341
341
|
dataAttribute: HEADER_DISPLAY.MOBILE_HAMBURGER_3,
|
|
342
342
|
isSelected: false,
|
|
343
343
|
},
|
|
@@ -355,7 +355,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
355
355
|
option: {
|
|
356
356
|
value: HEADER_DISPLAY.MOBILE_HAMBURGER_4,
|
|
357
357
|
iconName: 'header-mobile-nav-style-hamburger-display-style-4',
|
|
358
|
-
iconViewBox: '0 0
|
|
358
|
+
iconViewBox: '0 0 160 56',
|
|
359
359
|
dataAttribute: HEADER_DISPLAY.MOBILE_HAMBURGER_4,
|
|
360
360
|
isSelected: false,
|
|
361
361
|
},
|
|
@@ -374,7 +374,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
374
374
|
option: {
|
|
375
375
|
value: HEADER_DISPLAY.MOBILE_HAMBURGER_NO_LOGO_1,
|
|
376
376
|
iconName: 'header-nav-style-hamburger-display-style-no-logo-1',
|
|
377
|
-
iconViewBox: '0 0
|
|
377
|
+
iconViewBox: '0 0 160 56',
|
|
378
378
|
dataAttribute: HEADER_DISPLAY.MOBILE_HAMBURGER_NO_LOGO_1,
|
|
379
379
|
isSelected: false,
|
|
380
380
|
},
|
|
@@ -392,7 +392,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
392
392
|
option: {
|
|
393
393
|
value: HEADER_DISPLAY.MOBILE_HAMBURGER_NO_LOGO_2,
|
|
394
394
|
iconName: 'header-nav-style-hamburger-display-style-no-logo-2',
|
|
395
|
-
iconViewBox: '0 0
|
|
395
|
+
iconViewBox: '0 0 160 56',
|
|
396
396
|
dataAttribute: HEADER_DISPLAY.MOBILE_HAMBURGER_NO_LOGO_2,
|
|
397
397
|
isSelected: false,
|
|
398
398
|
},
|
|
@@ -410,7 +410,7 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
|
|
|
410
410
|
option: {
|
|
411
411
|
value: HEADER_DISPLAY.MOBILE_HAMBURGER_NO_LOGO_3,
|
|
412
412
|
iconName: 'header-nav-style-hamburger-display-style-no-logo-3',
|
|
413
|
-
iconViewBox: '0 0
|
|
413
|
+
iconViewBox: '0 0 160 56',
|
|
414
414
|
dataAttribute: HEADER_DISPLAY.MOBILE_HAMBURGER_NO_LOGO_3,
|
|
415
415
|
isSelected: false,
|
|
416
416
|
},
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NavigationDisplayType } from './navigation-display.constants';
|
|
2
|
+
export declare const NAVIGATION_TYPE: {
|
|
3
|
+
readonly bar: "tabs";
|
|
4
|
+
readonly hamburger: "hamburger";
|
|
5
|
+
};
|
|
6
|
+
export type NavigationType = (typeof NAVIGATION_TYPE)[keyof typeof NAVIGATION_TYPE];
|
|
7
|
+
export declare const NAVIGATION_TYPE_BY_DISPLAY_TYPE: Record<NavigationDisplayType, NavigationType>;
|
|
8
|
+
export declare const NAVIGATION_TYPE_DEFAULT_DISPLAY_TYPE: Record<NavigationType, NavigationDisplayType>;
|
|
9
|
+
export declare const getNavigationType: (displayType: string) => NavigationType;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NAVIGATION_DISPLAY } from './navigation-display.constants';
|
|
2
|
+
export const NAVIGATION_TYPE = {
|
|
3
|
+
// 'tabs' matches the legacy persisted HEADER_DISPLAY_STYLE_CONFIGS.navType
|
|
4
|
+
// value — the key/value mismatch is load-bearing for backward compat.
|
|
5
|
+
bar: 'tabs',
|
|
6
|
+
hamburger: 'hamburger',
|
|
7
|
+
};
|
|
8
|
+
// Exhaustive: TS forces every NAVIGATION_DISPLAY value (current + deprecated legacy) to be classified
|
|
9
|
+
// into a group here, so a future style can't be added without deciding which group it belongs to.
|
|
10
|
+
export const NAVIGATION_TYPE_BY_DISPLAY_TYPE = {
|
|
11
|
+
[NAVIGATION_DISPLAY.TAB_1]: NAVIGATION_TYPE.bar,
|
|
12
|
+
[NAVIGATION_DISPLAY.TAB_2]: NAVIGATION_TYPE.bar,
|
|
13
|
+
[NAVIGATION_DISPLAY.HAMBURGER_1]: NAVIGATION_TYPE.hamburger,
|
|
14
|
+
[NAVIGATION_DISPLAY.HAMBURGER_2]: NAVIGATION_TYPE.hamburger,
|
|
15
|
+
[NAVIGATION_DISPLAY.HAMBURGER_3]: NAVIGATION_TYPE.hamburger,
|
|
16
|
+
[NAVIGATION_DISPLAY.HAMBURGER_4]: NAVIGATION_TYPE.hamburger,
|
|
17
|
+
[NAVIGATION_DISPLAY.tabs]: NAVIGATION_TYPE.bar,
|
|
18
|
+
[NAVIGATION_DISPLAY.buttons]: NAVIGATION_TYPE.bar,
|
|
19
|
+
[NAVIGATION_DISPLAY.hamburger]: NAVIGATION_TYPE.hamburger,
|
|
20
|
+
[NAVIGATION_DISPLAY.hamburgerLight]: NAVIGATION_TYPE.hamburger,
|
|
21
|
+
[NAVIGATION_DISPLAY.hamburgerLightHalf]: NAVIGATION_TYPE.hamburger,
|
|
22
|
+
[NAVIGATION_DISPLAY.hamburgerRounded]: NAVIGATION_TYPE.hamburger,
|
|
23
|
+
};
|
|
24
|
+
export const NAVIGATION_TYPE_DEFAULT_DISPLAY_TYPE = {
|
|
25
|
+
[NAVIGATION_TYPE.bar]: NAVIGATION_DISPLAY.TAB_1,
|
|
26
|
+
[NAVIGATION_TYPE.hamburger]: NAVIGATION_DISPLAY.HAMBURGER_1,
|
|
27
|
+
};
|
|
28
|
+
// Falls back to a substring sniff for any value not in the map (e.g. a hand-edited
|
|
29
|
+
// or not-yet-migrated draft) so this can never fail to classify a stored displayType.
|
|
30
|
+
export const getNavigationType = (displayType) => NAVIGATION_TYPE_BY_DISPLAY_TYPE[displayType] ??
|
|
31
|
+
(displayType.includes('hamburger')
|
|
32
|
+
? NAVIGATION_TYPE.hamburger
|
|
33
|
+
: NAVIGATION_TYPE.bar);
|
|
@@ -520,6 +520,8 @@ export declare abstract class AbstractPageHeaderStyles {
|
|
|
520
520
|
logoTemplateImage: LogoTemplateImageModel | undefined;
|
|
521
521
|
logoImageBase64Url?: string;
|
|
522
522
|
backgroundStyle: BrandPageCssStyle;
|
|
523
|
+
/** 0-100. Alpha applied to backgroundStyle.backgroundColor at render time only. */
|
|
524
|
+
backgroundOpacity: number;
|
|
523
525
|
style: BrandPageCssStyle;
|
|
524
526
|
viewport: ViewportsType;
|
|
525
527
|
protected constructor(options?: AbstractPageHeaderStylesType);
|
|
@@ -556,7 +558,7 @@ export declare abstract class AbstractPageFooterStyles {
|
|
|
556
558
|
viewport: ViewportsType;
|
|
557
559
|
logoImageHeight: string | undefined;
|
|
558
560
|
logoImageWidth: string | undefined;
|
|
559
|
-
protected constructor(options?: AbstractPageFooterStylesType,
|
|
561
|
+
protected constructor(options?: AbstractPageFooterStylesType, _theme?: Theme);
|
|
560
562
|
}
|
|
561
563
|
export type MediaTypes = 'getty-video' | 'user-upload-video' | 'image';
|
|
562
564
|
export declare abstract class AbstractMedia {
|
|
@@ -225,6 +225,8 @@ export class AbstractPageHeaderStyles {
|
|
|
225
225
|
logoTemplateImage;
|
|
226
226
|
logoImageBase64Url;
|
|
227
227
|
backgroundStyle;
|
|
228
|
+
/** 0-100. Alpha applied to backgroundStyle.backgroundColor at render time only. */
|
|
229
|
+
backgroundOpacity;
|
|
228
230
|
style;
|
|
229
231
|
viewport;
|
|
230
232
|
constructor(options = {}) {
|
|
@@ -254,6 +256,7 @@ export class AbstractPageHeaderStyles {
|
|
|
254
256
|
this.logoVariation = options.logoVariation || 0;
|
|
255
257
|
this.style = options.style || {};
|
|
256
258
|
this.backgroundStyle = options.backgroundStyle || {};
|
|
259
|
+
this.backgroundOpacity = options.backgroundOpacity ?? 100;
|
|
257
260
|
}
|
|
258
261
|
}
|
|
259
262
|
export class PageHeaderDesktop extends AbstractPageHeaderStyles {
|
|
@@ -313,7 +316,7 @@ export class AbstractPageFooterStyles {
|
|
|
313
316
|
viewport;
|
|
314
317
|
logoImageHeight;
|
|
315
318
|
logoImageWidth;
|
|
316
|
-
constructor(options = {},
|
|
319
|
+
constructor(options = {}, _theme) {
|
|
317
320
|
if (typeof options.viewport === 'undefined') {
|
|
318
321
|
throw new Error('"viewport" is required');
|
|
319
322
|
}
|
|
@@ -378,11 +381,11 @@ export class AbstractPageFooterStyles {
|
|
|
378
381
|
imageLink: '',
|
|
379
382
|
},
|
|
380
383
|
];
|
|
381
|
-
//
|
|
382
|
-
//
|
|
383
|
-
//
|
|
384
|
-
//
|
|
385
|
-
this.iconStyle =
|
|
384
|
+
// No colour seed: the social icons carry no fill of their own, so an unstyled footer
|
|
385
|
+
// leaves them unset and the fallback is decided downstream — migration-21 bakes an
|
|
386
|
+
// explicit black, a not-yet-migrated model renders the SVG default. Seeding a site
|
|
387
|
+
// text colour here need not read against the footer band.
|
|
388
|
+
this.iconStyle = options.iconStyle ? { ...options.iconStyle } : {};
|
|
386
389
|
this.textFontFamily = options.textFontFamily;
|
|
387
390
|
}
|
|
388
391
|
}
|
|
@@ -57,10 +57,13 @@ export declare const containerTextColorDefaults: (content: Content, styles: Page
|
|
|
57
57
|
* than silently recolouring published sites to the linked global — the exact trap ADR 0014
|
|
58
58
|
* names, here applied to the migration bake (ADR 0015).
|
|
59
59
|
*
|
|
60
|
-
* Two frame families
|
|
61
|
-
* - **text / profile** — framed when the content has its own
|
|
62
|
-
* the
|
|
63
|
-
*
|
|
60
|
+
* Two frame families:
|
|
61
|
+
* - **text / profile** — framed when the content has its own painted background. The gate
|
|
62
|
+
* deliberately mirrors the PRE-V2 renderer (`!isHexTransparent`), NOT the current
|
|
63
|
+
* view-model gate (`!isTransparentColour`): the legacy renderer framed the literal
|
|
64
|
+
* `'transparent'` (the maker's default background) too — only an alpha-`00` hex was
|
|
65
|
+
* unframed — so its empty-mark RTE inherited the button colour. This bake must reproduce
|
|
66
|
+
* that, or every default text/profile section silently recolours to the root paint.
|
|
64
67
|
* - **the container-bound blocks** (mailing-list, request-payment, support-me, non-brandSite
|
|
65
68
|
* contact-form) — always framed; `containerSurfaceForContent` is the existing oracle for
|
|
66
69
|
* "does this block paint a frame" (and encodes the brandSite contact-form carve-out), and
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BRAND_PAGE_TYPES } from '../models';
|
|
2
|
-
import { backgroundColorFromStyle, isTransparentColour } from './color.util';
|
|
2
|
+
import { backgroundColorFromStyle, isTransparentColour, isHexTransparent, } from './color.util';
|
|
3
3
|
import { resolveColorReference, bestContrastBrandRole, toColorVarReference, roleValueOrDefault, } from './color-palette.util';
|
|
4
4
|
/**
|
|
5
5
|
* The text-style fields that sit on the block's filled surface. `buttonTextStyle` is
|
|
@@ -167,10 +167,13 @@ const OWN_BACKGROUND_FRAME_TYPES = new Set([
|
|
|
167
167
|
* than silently recolouring published sites to the linked global — the exact trap ADR 0014
|
|
168
168
|
* names, here applied to the migration bake (ADR 0015).
|
|
169
169
|
*
|
|
170
|
-
* Two frame families
|
|
171
|
-
* - **text / profile** — framed when the content has its own
|
|
172
|
-
* the
|
|
173
|
-
*
|
|
170
|
+
* Two frame families:
|
|
171
|
+
* - **text / profile** — framed when the content has its own painted background. The gate
|
|
172
|
+
* deliberately mirrors the PRE-V2 renderer (`!isHexTransparent`), NOT the current
|
|
173
|
+
* view-model gate (`!isTransparentColour`): the legacy renderer framed the literal
|
|
174
|
+
* `'transparent'` (the maker's default background) too — only an alpha-`00` hex was
|
|
175
|
+
* unframed — so its empty-mark RTE inherited the button colour. This bake must reproduce
|
|
176
|
+
* that, or every default text/profile section silently recolours to the root paint.
|
|
174
177
|
* - **the container-bound blocks** (mailing-list, request-payment, support-me, non-brandSite
|
|
175
178
|
* contact-form) — always framed; `containerSurfaceForContent` is the existing oracle for
|
|
176
179
|
* "does this block paint a frame" (and encodes the brandSite contact-form carve-out), and
|
|
@@ -189,7 +192,9 @@ export const rteFrameFallbackColour = (content, styles, brandPageType) => {
|
|
|
189
192
|
if (OWN_BACKGROUND_FRAME_TYPES.has(content.type)) {
|
|
190
193
|
const background = content.backgroundColor;
|
|
191
194
|
const reference = background?.background || background?.backgroundColor;
|
|
192
|
-
|
|
195
|
+
// `isHexTransparent`, not `isTransparentColour`: the pre-V2 renderer framed the literal
|
|
196
|
+
// `'transparent'` (only an alpha-00 hex was unframed), so the bake must too — see docblock.
|
|
197
|
+
return reference && !isHexTransparent(reference)
|
|
193
198
|
? buttonTextColour
|
|
194
199
|
: undefined;
|
|
195
200
|
}
|
|
@@ -356,6 +356,63 @@ export const moveRootTextColourIntoGlobalStyles = (brandPageModel) => {
|
|
|
356
356
|
// Copy and delete stay together so the source is never dropped unconverted.
|
|
357
357
|
delete textStyles['style'];
|
|
358
358
|
};
|
|
359
|
+
/* -------------------------------------------------------------------------- *
|
|
360
|
+
* Step FINAL−: bake the social-icon fills the palette walk leaves unset
|
|
361
|
+
* -------------------------------------------------------------------------- */
|
|
362
|
+
/**
|
|
363
|
+
* The footer social icons carry no `fill` in their SVGs, so an unset footer icon painted
|
|
364
|
+
* the SVG default (black). Baked as a LITERAL, not a palette ref — a fixed fallback for
|
|
365
|
+
* that previously-implicit default, so it does not mint a palette custom or follow palette
|
|
366
|
+
* edits. Painted after pass B, so referencify never sees it.
|
|
367
|
+
*/
|
|
368
|
+
const FOOTER_ICON_FALLBACK_COLOUR = '#000000';
|
|
369
|
+
/**
|
|
370
|
+
* Bake the two social-icon fills that neither the palette walk nor a resolver sets, so
|
|
371
|
+
* each persists an explicit colour instead of a render-time seed that changed under V2:
|
|
372
|
+
*
|
|
373
|
+
* - **social-links content** (`iconFillStyles.fill`) → the site's ROOT text colour, the
|
|
374
|
+
* colour the icon followed before the palette split (`styles.textStyles.style.color`).
|
|
375
|
+
* Read here — already referencified by pass B — BEFORE
|
|
376
|
+
* `moveRootTextColourIntoGlobalStyles` retires it, which is why this runs at Step FINAL−.
|
|
377
|
+
* - **footer** (`pageFooter{Desktop,Mobile}.iconStyle.fill`) → a literal black
|
|
378
|
+
* (`FOOTER_ICON_FALLBACK_COLOUR`).
|
|
379
|
+
*
|
|
380
|
+
* Blank-only: an explicit persisted colour is never touched (`Object`-spread with the fill
|
|
381
|
+
* appended only when absent). A re-run finds every fill set, so it is a no-op.
|
|
382
|
+
*/
|
|
383
|
+
const bakeIconColours = (brandPageModel) => {
|
|
384
|
+
const rootTextColour = legacyRootTextColour(brandPageModel);
|
|
385
|
+
if (!isBlankColorValue(rootTextColour)) {
|
|
386
|
+
for (const page of brandPageModel.pages ?? []) {
|
|
387
|
+
for (const content of page.contents ?? []) {
|
|
388
|
+
if (content.type !== 'social-links') {
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
const fields = content;
|
|
392
|
+
const iconFillStyles = (fields.iconFillStyles ?? {});
|
|
393
|
+
if (isBlankColorValue(iconFillStyles.fill)) {
|
|
394
|
+
fields.iconFillStyles = { ...iconFillStyles, fill: rootTextColour };
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
for (const footer of [
|
|
400
|
+
brandPageModel.pageFooterDesktop,
|
|
401
|
+
brandPageModel.pageFooterMobile,
|
|
402
|
+
]) {
|
|
403
|
+
if (!footer) {
|
|
404
|
+
continue;
|
|
405
|
+
}
|
|
406
|
+
const footerRecord = footer;
|
|
407
|
+
const iconStyle = (footerRecord.iconStyle ?? {});
|
|
408
|
+
if (isBlankColorValue(iconStyle.fill)) {
|
|
409
|
+
footerRecord.iconStyle = {
|
|
410
|
+
...iconStyle,
|
|
411
|
+
fill: FOOTER_ICON_FALLBACK_COLOUR,
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
};
|
|
359
416
|
/* -------------------------------------------------------------------------- *
|
|
360
417
|
* Step 0.1: retire styles.logoStyles.backgroundStyle onto the logo content
|
|
361
418
|
* -------------------------------------------------------------------------- */
|
|
@@ -707,6 +764,11 @@ export const migration21 = async (migrationResult, _options) => {
|
|
|
707
764
|
const referencify = makeReferencifyTransform(builder, paletteRoleByCanonical);
|
|
708
765
|
parts.forEach((part) => walkModelColors(part, referencify, true));
|
|
709
766
|
brandPageModel.styles.colors = builder.toColorItems();
|
|
767
|
+
// ---- Step FINAL−: bake icon fills before the root colour is retired ----
|
|
768
|
+
// Social-links icons take the now-referencified root text colour they followed before
|
|
769
|
+
// the palette split; footer icons take a literal black fallback. Reads the root ref, so
|
|
770
|
+
// it MUST precede its retirement below.
|
|
771
|
+
bakeIconColours(brandPageModel);
|
|
710
772
|
// ---- Step FINAL: retire the root text colour (order matters — see docblock) ----
|
|
711
773
|
moveRootTextColourIntoGlobalStyles(brandPageModel);
|
|
712
774
|
// ---- Step FINAL+1: bake the resolved colour into inherit-only RTE runs ----
|
|
@@ -2,7 +2,7 @@ import { reactive } from 'vue';
|
|
|
2
2
|
import { assertUnreachable } from '../../helpers/ts.helper';
|
|
3
3
|
import { ButtonStyles, VIEWPORTS } from '../models';
|
|
4
4
|
import { NavigationMobile, NavigationDesktop, BRAND_PAGE_TYPES, BUTTON_LINK_TYPE, NavigationMenuStyles, } from '../models';
|
|
5
|
-
import { isTransparentColour, mutedTextForBackground,
|
|
5
|
+
import { backgroundColorFromStyle, isTransparentColour, mutedTextForBackground, withColorOpacity, } from './color.util';
|
|
6
6
|
import { resolveColorReference } from './color-palette.util';
|
|
7
7
|
import { containerTextColorDefaults, containerSurfaceForContent, } from './container-text-color.util';
|
|
8
8
|
import { CONTENT_TEXT_STYLE_PROPERTY_KEYS, FALLBACK_DEFAULT_LINK_COLOR, FONT_SIZE_BODY, LINE_HEIGHT_BODY, DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH, ALIGN_LEFT_ALIGNED, ALIGN_RIGHT_ALIGNED, MAX_IMAGES_SECTION_ALIGNMENT_ITEMS_LENGTH, FONT_FAMILY_CONFIGS, isGoogleType, LINE_HEIGHT_HEADINGS, FONT_SIZE_HEADINGS, DEFAULT_TEXT_ALIGN, IMAGE_RESOLUTION_PRESETS, BIG_IMAGE, ALIGN_LEFT_BIG_IMAGE, ALIGN_CARD_CENTER, ALIGN_CARD_CENTER_IMAGE, ALIGN_CARD_LEFT_IMAGE, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, } from '../constants';
|
|
@@ -737,7 +737,28 @@ export const mapToPageHeaderViewModel = (pageHeader, pageStyles, pages, useOldLo
|
|
|
737
737
|
hamburgerMenuStyle,
|
|
738
738
|
}),
|
|
739
739
|
style: pageHeader.style,
|
|
740
|
-
backgroundStyle: pageHeader
|
|
740
|
+
backgroundStyle: getHeaderBackgroundStyleWithOpacity(pageHeader),
|
|
741
|
+
backgroundOpacity: pageHeader.backgroundOpacity,
|
|
742
|
+
};
|
|
743
|
+
};
|
|
744
|
+
// Composites backgroundOpacity into backgroundColor's alpha channel so the
|
|
745
|
+
// header container's own paint is translucent without affecting children
|
|
746
|
+
// (unlike CSS `opacity`, which would fade the logo/nav/text too).
|
|
747
|
+
const getHeaderBackgroundStyleWithOpacity = (pageHeader) => {
|
|
748
|
+
const { backgroundStyle } = pageHeader;
|
|
749
|
+
const backgroundColor = backgroundStyle.backgroundColor;
|
|
750
|
+
const backgroundOpacity = pageHeader.backgroundOpacity ?? 100;
|
|
751
|
+
if (backgroundOpacity >= 100 ||
|
|
752
|
+
!backgroundColor ||
|
|
753
|
+
isTransparentColour(backgroundColor)) {
|
|
754
|
+
return backgroundStyle;
|
|
755
|
+
}
|
|
756
|
+
// withColorOpacity (not setRgbAlpha) — it fades a `var(--palette-n)` reference
|
|
757
|
+
// via color-mix instead of handing it back unfaded, which matters now that a
|
|
758
|
+
// colour-matched header background can be a palette reference.
|
|
759
|
+
return {
|
|
760
|
+
...backgroundStyle,
|
|
761
|
+
backgroundColor: withColorOpacity(backgroundColor, backgroundOpacity / 100),
|
|
741
762
|
};
|
|
742
763
|
};
|
|
743
764
|
export const mapToPageFooterViewModel = (pageFooter, pageStyles, useOldLogoRenderSize = false) => {
|