@royaloperahouse/harmonic 0.18.6 → 0.18.7
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/CHANGELOG.md +4 -0
- package/README.GIT +43 -267
- package/dist/components/organisms/Carousels/Carousel/Carousel.d.ts +3 -1
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCarousel.d.ts +3 -1
- package/dist/harmonic.cjs.development.js +22 -10
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +22 -10
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/types/signUpForm.d.ts +1 -0
- package/dist/types/upsell.d.ts +2 -0
- package/package.json +1 -1
- package/README.md +0 -69
package/CHANGELOG.md
CHANGED
package/README.GIT
CHANGED
|
@@ -1,293 +1,69 @@
|
|
|
1
|
-
# Royal Opera House
|
|
1
|
+
# Royal Opera House - Harmonic
|
|
2
2
|
|
|
3
|
-
Welcome to The Royal Opera House
|
|
3
|
+
Welcome to The Royal Opera House Harmonic library components `@royaloperahouse/harmonic`.
|
|
4
4
|
|
|
5
5
|
This package is a library of UI components intended to be used in the ROH website.
|
|
6
6
|
|
|
7
|
-
It uses React, TypeScript, TSDX and Storybook.
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
The Storybook for the latest version of the library is hosted at [Storybook - Harmonic] TODO: S3 deployment
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Prerequisites
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
* Make sure the required package dependencies are installed using `yarn install`
|
|
18
|
-
* If this is the first time you are working on Harmonic, make sure to run `yarn build` to build all the modules.
|
|
19
|
-
|
|
20
|
-
* **To deploy the storybook publicly** you will need credentials for the **parent** 'Royal Opera House' AWS account in your `~/.aws/credentials` file.
|
|
21
|
-
* The deploy script expects these to be called `[parent]`.
|
|
22
|
-
|
|
23
|
-
* You can find these values at:
|
|
24
|
-
|
|
25
|
-
*AWS access portal/ Accounts tab -> 'Royal Opera House' -> 'Access keys' -> 'Option 2: Add a profile to your AWS credentials file'*
|
|
26
|
-
|
|
27
|
-
* **To deploy a preview** for demo / QA you will need:
|
|
28
|
-
|
|
29
|
-
* A Chromatic account with a **Developer** role in the `roh-ml` project in Chromatic
|
|
30
|
-
* [Mari Lovell](mari.lovell@roh.org.uk) is the current owner of this project, you can contact her to invite you
|
|
31
|
-
* The `CHROMATIC_PROJECT_TOKEN` -- find this in 1Password or ask the project owner.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* **To enable publishing to the NPM package**:
|
|
35
|
-
* Create account / log in to NPM
|
|
36
|
-
* Ask a colleague with admin rights to be added as a contributer
|
|
37
|
-
* Generate your own ROH `NPM_TOKEN` (store this token in 1Password)
|
|
38
|
-
* Set up Two-Factor Authentication for NPM, as you will be prompted by the publishing script
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## Versioning
|
|
42
|
-
---
|
|
43
|
-
> NOTE: The following applies while the Harmonic project is in Alpha (before a version 1.0.0 release)
|
|
44
|
-
|
|
45
|
-
We are **not** yet using semantic versioning.
|
|
46
|
-
|
|
47
|
-
When proposing changes to the Harmonic library, increment the patch version (the last number) by one, **only** in the changelog (alternatively, leave the version in the changelog as TBC) along with a note about your changes.
|
|
48
|
-
|
|
49
|
-
Only increment the version in the package.json for releasing snapshots.
|
|
50
|
-
|
|
51
|
-
Once your changes are merged to the main branch and released in a new version, the release manager will be responsible for incrementing that release version.
|
|
52
|
-
|
|
53
|
-
> NOTE: The following **may** apply once the Harmonic project is out of Alpha, but is subject to change before then.
|
|
54
|
-
|
|
55
|
-
We use [Semantic Versioning](https://semver.org/) for Harmonic.
|
|
56
|
-
|
|
57
|
-
Given a version number MAJOR.MINOR.PATCH, increment the:
|
|
58
|
-
|
|
59
|
-
* MAJOR version when you make incompatible library changes
|
|
60
|
-
* MINOR version when you add functionality in a backwards compatible manner
|
|
61
|
-
* PATCH version when you make backwards compatible bug fixes
|
|
62
|
-
|
|
63
|
-
When you create a new release always update the `CHANGELOG` and `package.json`
|
|
64
|
-
|
|
65
|
-
Increment your version from the latest stable version on [Royal Opera House - Harmonic](https://www.npmjs.com/package/@royaloperahouse/harmonic?activeTab=versions)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Deploying the Storybook
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
### **1. To build and deploy locally**
|
|
72
|
-
|
|
73
|
-
You can quickly build and serve the contents of `/storybook-static` from your local machine, for development and manual testing. To do this run:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
yarn storybook
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
By default the storybook will be accessible at
|
|
80
|
-
[http://localhost:6006/]()
|
|
81
|
-
|
|
82
|
-
The server will hot-reload on most changes.
|
|
83
|
-
|
|
84
|
-
### **2. To deploy a preview version remotely**
|
|
85
|
-
|
|
86
|
-
You can deploy a release candidate, or work-in-progress to [Chromatic](https://www.chromatic.com/) for showcase or QA.
|
|
87
|
-
|
|
88
|
-
**NOTE:** you will need the `CHROMATIC_PROJECT_TOKEN` and to be invited as a contributor to the Harmonic project in Chromatic, as described in *Prerequisites* above.
|
|
89
|
-
|
|
90
|
-
Either set the token as a shell variable or use a `.env` file in the `harmonic` root directory containing the token, as so:
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
CHROMATIC_PROJECT_TOKEN=tokengoeshere
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Run:
|
|
97
|
-
```
|
|
98
|
-
CHROMATIC_PROJECT_TOKEN=tokengoeshere yarn deploy-storybook-dev
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
to build and deploy the storybook from your repo to Chromatic.
|
|
102
|
-
|
|
103
|
-
You will find the address of your deployed storybook in the console output, looking something like this:
|
|
104
|
-
|
|
105
|
-
`→ View your Storybook at https://randomHexString-randomAlphabeticalString.chromatic.com`
|
|
106
|
-
|
|
107
|
-
### **3. To deploy a release version**
|
|
108
|
-
|
|
109
|
-
You can deploy the contents of `./storybook-static` to S3 as a static site, which is permanently accessible at [WIP] TODO: S3 deployment
|
|
110
|
-
|
|
111
|
-
**NOTE:** To do this you will need the correct `AWS` credentials set up, as described in *Prerequisites* above.
|
|
112
|
-
|
|
113
|
-
First build the storybook using:
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
yarn build-storybook
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
then run:
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
yarn deploy-storybook
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
> **IMPORTANT:** This URL is intended to showcase the latest stable version of Harmonic, it should be kept up to date with the `main` Harmonic branch and should **only** be used for release versions. If you want to deploy a development version follow the steps above under *To deploy a preview version remotely*.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
## Releasing a New Package Version
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
This is the procedure for releasing a new Harmonic NPM package.
|
|
132
|
-
|
|
133
|
-
There are two types of package:
|
|
134
|
-
|
|
135
|
-
A **snapshot** can be published to use a development version of the Harmonic library in our frontend staging environments, to perform integrated, manual testing.
|
|
136
|
-
|
|
137
|
-
A **stable** package is published for use in production.
|
|
138
|
-
|
|
139
|
-
**NOTE:** You will need the `NPM_TOKEN`, as described in 'Prerequisites' above.
|
|
140
|
-
|
|
141
|
-
### **1. To release a snapshot version**
|
|
142
|
-
|
|
143
|
-
> **IMPORTANT:** Make sure you always publish your **snapshots** from `development` after merging in your feature branch.
|
|
144
|
-
|
|
145
|
-
For snapshots, `RELEASE_VERSION` should be the same as the latest **stable** version of the Harmonic Library, as found in [npm Harmonic - Versions](https://www.npmjs.com/package/@royaloperahouse/harmonic?activeTab=versions), followed by an **unused** lowercase letter.
|
|
146
|
-
|
|
147
|
-
For example, if the latest stable release was 1.42.0, and the last snapshot published to NPM was 1.42.0-w, you would use RELEASE_VERSION `1.42.0-x`
|
|
148
|
-
|
|
149
|
-
To publish a snapshot use:
|
|
8
|
+
## Install
|
|
150
9
|
|
|
151
10
|
```bash
|
|
152
|
-
|
|
11
|
+
npm i --save @royaloperahouse/harmonic
|
|
153
12
|
```
|
|
154
|
-
Use the version name to install the package in a frontend repo.
|
|
155
|
-
|
|
156
|
-
### **2. To release a stable version**
|
|
157
|
-
|
|
158
|
-
> **IMPORTANT:** Make sure you always publish your **stable** packages from `main` after merging in your feature branch.
|
|
159
|
-
|
|
160
|
-
For stable releases, increment your version from the latest **stable** version found on [npm Harmonic - Versions](https://www.npmjs.com/package/@royaloperahouse/harmonic?activeTab=versions), following the rules described in *Versioning* above, and use this as `RELEASE_VERSION`. (Make sure it matches the version in your `package.json` and `CHANGELOG.md`!)
|
|
161
|
-
|
|
162
|
-
To publish a stable package use:
|
|
163
|
-
|
|
164
13
|
```bash
|
|
165
|
-
|
|
14
|
+
yarn add @royaloperahouse/harmonic
|
|
166
15
|
```
|
|
167
16
|
|
|
17
|
+
## Usage
|
|
168
18
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
19
|
+
```javascript
|
|
20
|
+
import {
|
|
21
|
+
Footer, GlobalStyles, ThemeProvider, ThemeType,
|
|
22
|
+
} from '@royaloperahouse/harmonic';
|
|
173
23
|
|
|
174
|
-
```bash
|
|
175
|
-
npm i --save @royaloperahouse/harmonic
|
|
176
24
|
```
|
|
177
|
-
|
|
178
|
-
yarn add @royaloperahouse/harmonic
|
|
179
|
-
```
|
|
180
|
-
|
|
25
|
+
## Sample
|
|
181
26
|
|
|
182
|
-
|
|
183
|
-
---
|
|
27
|
+
```javascript
|
|
184
28
|
|
|
185
|
-
|
|
29
|
+
import {
|
|
30
|
+
Footer, GlobalStyles, ThemeProvider, ThemeType,
|
|
31
|
+
} from '@royaloperahouse/harmonic';
|
|
186
32
|
|
|
187
|
-
```bash
|
|
188
|
-
yarn lint
|
|
189
|
-
# Use the --fix option to perform automatic fixes
|
|
190
|
-
```
|
|
191
33
|
|
|
192
|
-
|
|
34
|
+
const App = ({ children }: InnerProps): React.ReactElement => (
|
|
35
|
+
<ErrorBoundary>
|
|
36
|
+
<ThemeProvider theme={ThemeType.Core}>
|
|
37
|
+
<GlobalStyles />
|
|
38
|
+
<Wrapper>
|
|
39
|
+
<Header />
|
|
40
|
+
<GlobalStyle />
|
|
41
|
+
<HealthBanner />
|
|
42
|
+
<ErrorBoundary>
|
|
43
|
+
<Content>
|
|
44
|
+
{children}
|
|
45
|
+
</Content>
|
|
46
|
+
</ErrorBoundary>
|
|
47
|
+
<LiveChat />
|
|
48
|
+
</Wrapper>
|
|
49
|
+
<Footer data={footerData} />
|
|
50
|
+
</ThemeProvider>
|
|
51
|
+
</ErrorBoundary>
|
|
52
|
+
);
|
|
193
53
|
|
|
194
|
-
```bash
|
|
195
|
-
yarn test
|
|
196
|
-
|
|
197
|
-
# Use the -u option to update snapshots if needed
|
|
198
|
-
# Run `yarn test:watch` to re-run tests on changes
|
|
199
54
|
```
|
|
200
55
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
yarn test-storybook
|
|
205
|
-
# Use the -u option to update snapshots if needed
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
## Development Process
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
### **1. Branching Model**
|
|
213
|
-
* The Harmonic project lives in the `harmonic-library/harmonic` *repository*
|
|
214
|
-
* When working on Harmonic, treat the `harmonic` directory as your root
|
|
215
|
-
* The Harmonic **development** branch is for QA
|
|
216
|
-
* The Harmonic **main** branch is currently for stable releases
|
|
217
|
-
* All work should be done on a correctly named **feature branch** of the format: `issueType/ticketNumber-short-description-of-feature`, e.g. `feature/RD-12345-add-example-component`
|
|
218
|
-
* Always create your feature branch FROM, and submit pull requests TO, the **main** branch
|
|
219
|
-
* For **QA / UAT** of a Harmonic component in isolation: following review you should deploy a preview version to Chromatic straight from your **feature branch** _without_ merging to development
|
|
220
|
-
* For releasing an **NPM snapshot**: merge your feature branch into the **development** branch and publish the NPM snapshot from there
|
|
221
|
-
|
|
222
|
-
### **2. Detailed Workflow**
|
|
223
|
-
|
|
224
|
-
#### **Before review:**
|
|
225
|
-
|
|
226
|
-
* Git pull the latest version of Harmonic from `main`
|
|
227
|
-
* Checkout a new, correctly-named feature branch from `main`
|
|
228
|
-
* Do your work on this feature branch
|
|
229
|
-
* Run: `yarn lint --fix`
|
|
230
|
-
* Run: `yarn test -u`
|
|
231
|
-
* Commit your changes
|
|
232
|
-
* Create a pull request from your feature branch to `main`
|
|
233
|
-
* Add the appropriate reviewers
|
|
234
|
-
|
|
235
|
-
#### **Before QA / UAT:**
|
|
236
|
-
|
|
237
|
-
After your PR is approved, you have two options:
|
|
238
|
-
|
|
239
|
-
**i.** For QA of a component in isolation:
|
|
240
|
-
|
|
241
|
-
* Follow the steps above in *Deploying the Storybook -> 2. Deploying a preview version remotely*
|
|
242
|
-
* Share the generated Chromatic URL with the appropriate people for QA / UAT
|
|
243
|
-
|
|
244
|
-
**ii.** For integrated testing of a component in the frontend staging environments:
|
|
245
|
-
|
|
246
|
-
* Check out the `development` branch
|
|
247
|
-
* Merge your work in to `development`
|
|
248
|
-
* Follow the steps above under *Publishing a New Package Version -> 1. To release a snapshot version*
|
|
249
|
-
* Git push the updated `development` branch to remote
|
|
250
|
-
* Finally, in the frontend repo:
|
|
251
|
-
|
|
252
|
-
1. Update the `package.json` to reference the new snapshot version
|
|
253
|
-
2. Run: `yarn install`
|
|
254
|
-
3. Deploy the frontend to a staging environment
|
|
255
|
-
|
|
256
|
-
#### **When ready for production:**
|
|
257
|
-
|
|
258
|
-
* Return to your Harmonic **feature branch**
|
|
259
|
-
* Update the HArmonic version in `package.json`, incrementing from the last **stable** release, found in [npm Harmonic - Versions](https://www.npmjs.com/package/@royaloperahouse/harmonic?activeTab=versions), and following the rules described in the *Versioning* section
|
|
260
|
-
* Update `CHANGELOG.md`, adding the new version number and a short description of your changes
|
|
261
|
-
* Run: `yarn lint --fix`
|
|
262
|
-
* Run: `yarn test -u`
|
|
263
|
-
* Run: `yarn test-storybook -u`
|
|
264
|
-
* Run: `yarn build-storybook`
|
|
265
|
-
* Git commit, push, and update your PR for final approval
|
|
266
|
-
* Merge your approved PR to `main`
|
|
267
|
-
* Follow the steps in *Publishing a New Package Version -> 2. To release a stable version* to publish the NPM package
|
|
268
|
-
* Finally, follow the steps in *Deploying The Storybook -> 3. To deploy a release version*, to update the public Harmonic Storybook page
|
|
269
|
-
|
|
270
|
-
Once you have successfully published a new release version, you can open a ticket to update to this version in any of the frontend repos.
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
## Notes
|
|
274
|
-
---
|
|
275
|
-
### The `storybook-static` folder
|
|
276
|
-
|
|
277
|
-
This folder contains all the HTML / JS required to deploy the Storybook as a static site. It's autogenerated whenever the Storybook is built and therefore will show up a lot of merge conflicts when you merge other branches into your feature branch. It is best to leave generating the storybook until the later part of your workflow, but in case you run into conflicts earlier, it's ok to just delete the folder and regenerate using:
|
|
278
|
-
|
|
279
|
-
```bash
|
|
280
|
-
yarn build-storybook
|
|
281
|
-
```
|
|
56
|
+
## Components
|
|
57
|
+
(Complete)
|
|
58
|
+
ControlledDropdown, ImageProportion, Typography (Display, Header, Subtitle,BodyCopy, Overline, ButtonText, Caption, NavigationText, TextLink)
|
|
282
59
|
|
|
283
|
-
|
|
60
|
+
(WIP)
|
|
61
|
+
Colors, Footer, Iconography, Navigation, Tab, Tabs, TabLink
|
|
284
62
|
|
|
285
|
-
|
|
286
|
-
|
|
63
|
+
(TODO / Legacy)
|
|
64
|
+
Accordion, Accordions, AltHeader, AnchorTabBar, AnnouncementBanner, Card, Cards, Carousel, CinemaBadge, ContactCard, devices, Editorial, GlobalStyles, Grid, GridItem, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, ImageWithCaption, PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PeopleListing, PrimaryButton, PromoWithTags, PromoWithTitle, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Sponsorship, StickyBar, StreamBadge, TertiaryButton, TextOnly, Tickbox, TitleWithCTA, ThemeProvider, TypeTags, Quote
|
|
287
65
|
|
|
288
|
-
There is an example implementation in the example folder. Alternatively there are also integration examples in storybook. Make sure to keep these updated so as to showcase the current components available.
|
|
289
66
|
|
|
290
|
-
|
|
291
|
-
### Bundle analysis
|
|
67
|
+
## Documentation
|
|
292
68
|
|
|
293
|
-
|
|
69
|
+
[See Storybook as a reference] TODO: S3 deployment
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { ICarouselProps } from '../../../../types/carousel';
|
|
3
|
-
declare const Carousel: FunctionComponent<ICarouselProps
|
|
3
|
+
declare const Carousel: FunctionComponent<ICarouselProps & Partial<{
|
|
4
|
+
titleFontFamily: 'Victor' | 'Grey' | undefined;
|
|
5
|
+
}>>;
|
|
4
6
|
export default Carousel;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { IHighlightsCarouselProps } from '../../../../types/carousel';
|
|
3
|
-
declare const HighlightsCarousel: FunctionComponent<IHighlightsCarouselProps
|
|
3
|
+
declare const HighlightsCarousel: FunctionComponent<IHighlightsCarouselProps & Partial<{
|
|
4
|
+
titleFontFamily: 'Victor' | 'Grey' | undefined;
|
|
5
|
+
}>>;
|
|
4
6
|
export default HighlightsCarousel;
|
|
@@ -217,7 +217,8 @@ var HarmonicHeader = function HarmonicHeader(_ref2) {
|
|
|
217
217
|
em = _ref2.em,
|
|
218
218
|
_ref2$color = _ref2.color,
|
|
219
219
|
color = _ref2$color === void 0 ? 'inherit' : _ref2$color,
|
|
220
|
-
serif = _ref2.serif,
|
|
220
|
+
_ref2$serif = _ref2.serif,
|
|
221
|
+
serif = _ref2$serif === void 0 ? false : _ref2$serif,
|
|
221
222
|
hierarchy = _ref2.hierarchy,
|
|
222
223
|
tag = _ref2.tag,
|
|
223
224
|
className = _ref2.className,
|
|
@@ -11014,7 +11015,9 @@ var themeToColor = function themeToColor(theme) {
|
|
|
11014
11015
|
var SignUpTitle = function SignUpTitle(_ref) {
|
|
11015
11016
|
var title = _ref.title,
|
|
11016
11017
|
_ref$isMobile = _ref.isMobile,
|
|
11017
|
-
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile
|
|
11018
|
+
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile,
|
|
11019
|
+
_ref$titleFontFamily = _ref.titleFontFamily,
|
|
11020
|
+
titleFontFamily = _ref$titleFontFamily === void 0 ? false : _ref$titleFontFamily;
|
|
11018
11021
|
return /*#__PURE__*/React__default.createElement(GridItem, {
|
|
11019
11022
|
columnStartDesktop: 3,
|
|
11020
11023
|
columnSpanDesktop: 10,
|
|
@@ -11023,7 +11026,7 @@ var SignUpTitle = function SignUpTitle(_ref) {
|
|
|
11023
11026
|
}, /*#__PURE__*/React__default.createElement(SignUpTitleWrapper, null, /*#__PURE__*/React__default.createElement(HarmonicHeader, {
|
|
11024
11027
|
color: "black",
|
|
11025
11028
|
hierarchy: "h3",
|
|
11026
|
-
serif:
|
|
11029
|
+
serif: titleFontFamily === 'Victor',
|
|
11027
11030
|
size: isMobile ? 'small' : 'medium'
|
|
11028
11031
|
}, title)));
|
|
11029
11032
|
};
|
|
@@ -12273,13 +12276,15 @@ var UpsellSection = function UpsellSection(_ref) {
|
|
|
12273
12276
|
upsellCards = _ref.upsellCards,
|
|
12274
12277
|
_ref$theme = _ref.theme,
|
|
12275
12278
|
theme = _ref$theme === void 0 ? exports.ThemeType.Core : _ref$theme,
|
|
12276
|
-
className = _ref.className
|
|
12279
|
+
className = _ref.className,
|
|
12280
|
+
titleFontFamily = _ref.titleFontFamily;
|
|
12277
12281
|
var themedUpsellCards = upsellCards ? [].concat(upsellCards).map(function (card) {
|
|
12278
12282
|
return _extends({}, card, {
|
|
12279
12283
|
theme: card.theme || theme,
|
|
12280
12284
|
secondaryTheme: card.secondaryTheme || card.theme || theme
|
|
12281
12285
|
});
|
|
12282
12286
|
}) : [];
|
|
12287
|
+
var isVictorTitleFont = titleFontFamily === 'Victor';
|
|
12283
12288
|
return /*#__PURE__*/React__default.createElement(HarmonicThemeProvider, {
|
|
12284
12289
|
theme: theme
|
|
12285
12290
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
@@ -12292,7 +12297,7 @@ var UpsellSection = function UpsellSection(_ref) {
|
|
|
12292
12297
|
columnStartSmallDevice: 1,
|
|
12293
12298
|
columnSpanSmallDevice: 14
|
|
12294
12299
|
}, /*#__PURE__*/React__default.createElement(UpsellBorderBox, null, /*#__PURE__*/React__default.createElement(TitleContent, {
|
|
12295
|
-
serif:
|
|
12300
|
+
serif: isVictorTitleFont
|
|
12296
12301
|
}, title), /*#__PURE__*/React__default.createElement(TextContainer$2, null, /*#__PURE__*/React__default.createElement(TextContent, {
|
|
12297
12302
|
text: richText != null ? richText : '',
|
|
12298
12303
|
columnStartDesktop: 1,
|
|
@@ -12599,7 +12604,8 @@ var Carousel = function Carousel(_ref) {
|
|
|
12599
12604
|
_ref$infinite = _ref.infinite,
|
|
12600
12605
|
infinite = _ref$infinite === void 0 ? true : _ref$infinite,
|
|
12601
12606
|
_ref$useOffset = _ref.useOffset,
|
|
12602
|
-
useOffset = _ref$useOffset === void 0 ? true : _ref$useOffset
|
|
12607
|
+
useOffset = _ref$useOffset === void 0 ? true : _ref$useOffset,
|
|
12608
|
+
titleFontFamily = _ref.titleFontFamily;
|
|
12603
12609
|
var _useState = React.useState(false),
|
|
12604
12610
|
isFullscreen = _useState[0],
|
|
12605
12611
|
setIsFullscreen = _useState[1];
|
|
@@ -12749,6 +12755,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
12749
12755
|
var carouselTitleId = "carousel-title-" + title;
|
|
12750
12756
|
var titleSemanticLevelValue = titleSemanticLevel ? "h" + titleSemanticLevel : 'h2';
|
|
12751
12757
|
var Wrapper = type === exports.CarouselType.Image ? ImageCarouselWrapper : CardsCarouselWrapper;
|
|
12758
|
+
var isVictorTitleFont = titleFontFamily === 'Victor';
|
|
12752
12759
|
return /*#__PURE__*/React__default.createElement(Wrapper, {
|
|
12753
12760
|
className: className,
|
|
12754
12761
|
type: type,
|
|
@@ -12772,7 +12779,7 @@ var Carousel = function Carousel(_ref) {
|
|
|
12772
12779
|
isDescriptionPresent: !!description
|
|
12773
12780
|
}, /*#__PURE__*/React__default.createElement(TitleText$1, {
|
|
12774
12781
|
size: "medium",
|
|
12775
|
-
serif:
|
|
12782
|
+
serif: isVictorTitleFont,
|
|
12776
12783
|
hierarchy: titleSemanticLevelValue
|
|
12777
12784
|
}, title)), /*#__PURE__*/React__default.createElement(BodyCopyHarmonic, {
|
|
12778
12785
|
size: "large"
|
|
@@ -12993,7 +13000,10 @@ var SwipeCarousel = function SwipeCarousel(_ref2) {
|
|
|
12993
13000
|
isCurrentSlide: index === currentSlide
|
|
12994
13001
|
})) : (/*#__PURE__*/React__default.createElement("img", Object.assign({
|
|
12995
13002
|
alt: mediaContent.alt
|
|
12996
|
-
}, mediaContent
|
|
13003
|
+
}, mediaContent, {
|
|
13004
|
+
fetchPriority: index === currentSlide ? 'high' : 'auto',
|
|
13005
|
+
loading: index === currentSlide ? 'eager' : 'lazy'
|
|
13006
|
+
})))));
|
|
12997
13007
|
}));
|
|
12998
13008
|
};
|
|
12999
13009
|
|
|
@@ -13002,7 +13012,8 @@ var HighlightsCarousel = function HighlightsCarousel(_ref) {
|
|
|
13002
13012
|
carouselTitle = _ref.carouselTitle,
|
|
13003
13013
|
slides = _ref.slides,
|
|
13004
13014
|
titleSemanticLevel = _ref.titleSemanticLevel,
|
|
13005
|
-
className = _ref.className
|
|
13015
|
+
className = _ref.className,
|
|
13016
|
+
titleFontFamily = _ref.titleFontFamily;
|
|
13006
13017
|
var slidesMedia = React.useMemo(function () {
|
|
13007
13018
|
return slides.map(function (_ref2) {
|
|
13008
13019
|
var mediaContent = _ref2.mediaContent;
|
|
@@ -13033,6 +13044,7 @@ var HighlightsCarousel = function HighlightsCarousel(_ref) {
|
|
|
13033
13044
|
var handleClickInside = function handleClickInside(e) {
|
|
13034
13045
|
e.stopPropagation();
|
|
13035
13046
|
};
|
|
13047
|
+
var isVictorTitleFont = titleFontFamily === 'Victor';
|
|
13036
13048
|
return /*#__PURE__*/React__default.createElement(HighlightsGrid$1, {
|
|
13037
13049
|
role: "region",
|
|
13038
13050
|
"aria-labelledby": carouselTitleId,
|
|
@@ -13045,7 +13057,7 @@ var HighlightsCarousel = function HighlightsCarousel(_ref) {
|
|
|
13045
13057
|
}, /*#__PURE__*/React__default.createElement(HarmonicHeader, {
|
|
13046
13058
|
className: TYPOGRAPHY_CLASS_NAME,
|
|
13047
13059
|
size: "medium",
|
|
13048
|
-
serif:
|
|
13060
|
+
serif: isVictorTitleFont,
|
|
13049
13061
|
hierarchy: titleSemanticLevelValue
|
|
13050
13062
|
}, carouselTitle))), hasMultipleSlides && (/*#__PURE__*/React__default.createElement(RotatorButtonsWrapperMobile$1, null, /*#__PURE__*/React__default.createElement(RotatorButtons, {
|
|
13051
13063
|
onClickNext: onNext,
|