@royaloperahouse/harmonic 0.19.2 → 1.0.0-b
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 +18 -0
- package/README.md +267 -43
- package/dist/harmonic.cjs.development.js +40 -39
- 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 +40 -39
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/types/types.d.ts +10 -1
- package/package.json +5 -19
- package/README.GIT +0 -293
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [Proposed: 1.0.1]
|
|
2
|
+
- Accessibility fixes to CastFilter component
|
|
3
|
+
|
|
4
|
+
## [0.19.3]
|
|
5
|
+
- Carousel title realignment following font change
|
|
6
|
+
|
|
7
|
+
## [1.0.0]
|
|
8
|
+
Addressed some tech debt:
|
|
9
|
+
- all components are now exported for consumption from top-level public API export.
|
|
10
|
+
- Removed Radio, RadioGroup and Select components.
|
|
11
|
+
- cleaned up import/export structure of components
|
|
12
|
+
- moved types definitions from root to the directories of components they're typing.
|
|
13
|
+
- moved types definitions from components files to their own types files.
|
|
14
|
+
- cleaned up scripts in package.json
|
|
15
|
+
- Sotrybook cleanup: removed some obsolete / redundant syntax, corrected typos and wrong code.
|
|
16
|
+
- removed `example/` directory.
|
|
17
|
+
- removed dead `husky` dependency.
|
|
18
|
+
|
|
1
19
|
## [0.19.2]
|
|
2
20
|
- Migrated from moment.js 2.29.4 to date-fn 4.1.0
|
|
3
21
|
|
package/README.md
CHANGED
|
@@ -1,69 +1,293 @@
|
|
|
1
|
-
# Royal Opera House -
|
|
1
|
+
# Royal Opera House Harmonic - Front End Design System
|
|
2
2
|
|
|
3
|
-
Welcome to The Royal Opera House
|
|
3
|
+
Welcome to The Royal Opera House Front End Design System, `@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.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
The NPM packages are published at [Royal Opera House - Harmonic](https://www.npmjs.com/package/@royaloperahouse/harmonic)
|
|
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:
|
|
9
150
|
|
|
10
151
|
```bash
|
|
11
|
-
|
|
152
|
+
NPM_ROH_TOKEN={NPM_TOKEN} RELEASE_VERSION={RELEASE_VERSION} yarn publish-snapshot
|
|
12
153
|
```
|
|
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
|
+
|
|
13
164
|
```bash
|
|
14
|
-
|
|
165
|
+
NPM_ROH_TOKEN={NPM_TOKEN} RELEASE_VERSION={RELEASE_VERSION} yarn publish-release
|
|
15
166
|
```
|
|
16
167
|
|
|
17
|
-
## Usage
|
|
18
168
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
169
|
+
## Using the Package
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
The package is deployed to NPM, and can be installed using yarn or npm:
|
|
23
173
|
|
|
174
|
+
```bash
|
|
175
|
+
npm i --save @royaloperahouse/harmonic
|
|
24
176
|
```
|
|
25
|
-
|
|
177
|
+
```bash
|
|
178
|
+
yarn add @royaloperahouse/harmonic
|
|
179
|
+
```
|
|
180
|
+
|
|
26
181
|
|
|
27
|
-
|
|
182
|
+
## Testing
|
|
183
|
+
---
|
|
28
184
|
|
|
29
|
-
|
|
30
|
-
Footer, GlobalStyles, ThemeProvider, ThemeType,
|
|
31
|
-
} from '@royaloperahouse/harmonic';
|
|
185
|
+
To **Lint** the package use:
|
|
32
186
|
|
|
187
|
+
```bash
|
|
188
|
+
yarn lint
|
|
189
|
+
# Use the --fix option to perform automatic fixes
|
|
190
|
+
```
|
|
33
191
|
|
|
34
|
-
|
|
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
|
-
);
|
|
192
|
+
To run the **unit tests** (using Jest) use:
|
|
53
193
|
|
|
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
|
|
54
199
|
```
|
|
55
200
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
201
|
+
To **run and and store the unit tests** for display in storybook use:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
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
|
+
```
|
|
59
282
|
|
|
60
|
-
|
|
61
|
-
Colors, Footer, Iconography, Navigation, Tab, Tabs, TabLink
|
|
283
|
+
For the same reason changes to this folder will cause a lot of big diffs, when looking at a PR, but can mostly be skimmed over unless something looks unusual.
|
|
62
284
|
|
|
63
|
-
|
|
64
|
-
|
|
285
|
+
---
|
|
286
|
+
### Examples
|
|
65
287
|
|
|
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.
|
|
66
289
|
|
|
67
|
-
|
|
290
|
+
---
|
|
291
|
+
### Bundle analysis
|
|
68
292
|
|
|
69
|
-
|
|
293
|
+
Calculate the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `yarn size` and visualize it with `yarn analyze`.
|
|
@@ -7068,7 +7068,6 @@ var Swipe = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
7068
7068
|
});
|
|
7069
7069
|
Swipe.displayName = 'Swipe';
|
|
7070
7070
|
|
|
7071
|
-
var _excluded$i = ["name", "image", "onClick"];
|
|
7072
7071
|
var CastFilters = function CastFilters(_ref) {
|
|
7073
7072
|
var cast = _ref.cast,
|
|
7074
7073
|
headingText = _ref.headingText,
|
|
@@ -7192,7 +7191,8 @@ var CastFilters = function CastFilters(_ref) {
|
|
|
7192
7191
|
if (onClick) onClick();
|
|
7193
7192
|
}, [onSelect]);
|
|
7194
7193
|
var handlePersonKeydown = React__default.useCallback(function (e, index, onClick) {
|
|
7195
|
-
if (e.key === 'Enter') {
|
|
7194
|
+
if (e.key === 'Enter' || e.key === ' ' || e.key === 'Spacebar') {
|
|
7195
|
+
e.preventDefault();
|
|
7196
7196
|
handleClick(index, onClick);
|
|
7197
7197
|
}
|
|
7198
7198
|
}, [handleClick]);
|
|
@@ -7207,23 +7207,24 @@ var CastFilters = function CastFilters(_ref) {
|
|
|
7207
7207
|
var name = person.name,
|
|
7208
7208
|
image = person.image,
|
|
7209
7209
|
_onClick = person.onClick,
|
|
7210
|
-
|
|
7210
|
+
ariaLabel = person['aria-label'];
|
|
7211
7211
|
var isSelected = selectedIndices.includes(index);
|
|
7212
7212
|
var personImage = image || placeholderImage || defaultPlaceholderImage;
|
|
7213
7213
|
return /*#__PURE__*/React__default.createElement(PersonWrapper, {
|
|
7214
7214
|
key: index,
|
|
7215
7215
|
"aria-selected": isSelected,
|
|
7216
|
+
"aria-label": ariaLabel != null ? ariaLabel : name,
|
|
7216
7217
|
role: "option",
|
|
7217
7218
|
tabIndex: 0,
|
|
7218
|
-
onKeyDown: function onKeyDown(e) {
|
|
7219
|
-
return handlePersonKeydown(e, index, _onClick);
|
|
7220
|
-
}
|
|
7221
|
-
}, /*#__PURE__*/React__default.createElement(PersonToggle, Object.assign({
|
|
7222
|
-
isSelected: isSelected,
|
|
7223
7219
|
onClick: function onClick() {
|
|
7224
7220
|
return handleClick(index, _onClick);
|
|
7221
|
+
},
|
|
7222
|
+
onKeyDown: function onKeyDown(e) {
|
|
7223
|
+
return handlePersonKeydown(e, index, _onClick);
|
|
7225
7224
|
}
|
|
7226
|
-
},
|
|
7225
|
+
}, /*#__PURE__*/React__default.createElement(PersonToggle, {
|
|
7226
|
+
isSelected: isSelected
|
|
7227
|
+
}, /*#__PURE__*/React__default.createElement(PersonImage, {
|
|
7227
7228
|
src: personImage,
|
|
7228
7229
|
alt: image ? name : "Placeholder image for " + name,
|
|
7229
7230
|
draggable: false,
|
|
@@ -7496,7 +7497,7 @@ var HotFiltersWrapper = /*#__PURE__*/styled__default.div(_templateObject$O || (_
|
|
|
7496
7497
|
var HotFilterOptionsWrapper = /*#__PURE__*/styled__default.div(_templateObject2$C || (_templateObject2$C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n width: fit-content;\n min-width: 400px;\n justify-content: space-between;\n gap: 16px;\n font-family: var(--font-family-sans);\n\n @media ", " {\n gap: 10px;\n }\n"])), devices.mobile);
|
|
7497
7498
|
var StyledHotFiltersButton = /*#__PURE__*/styled__default(PrimaryButton)(_templateObject3$q || (_templateObject3$q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid var(--color-base-black);\n min-width: fit-content;\n\n :hover {\n color: var(--color-base-white);\n }\n"])));
|
|
7498
7499
|
|
|
7499
|
-
var _excluded$
|
|
7500
|
+
var _excluded$i = ["text", "onClick"];
|
|
7500
7501
|
var HotFilters = function HotFilters(_ref) {
|
|
7501
7502
|
var items = _ref.items,
|
|
7502
7503
|
className = _ref.className,
|
|
@@ -7512,7 +7513,7 @@ var HotFilters = function HotFilters(_ref) {
|
|
|
7512
7513
|
}, /*#__PURE__*/React__default.createElement(HotFilterOptionsWrapper, null, items.map(function (item, index) {
|
|
7513
7514
|
var text = item.text,
|
|
7514
7515
|
_onClick = item.onClick,
|
|
7515
|
-
rest = _objectWithoutPropertiesLoose(item, _excluded$
|
|
7516
|
+
rest = _objectWithoutPropertiesLoose(item, _excluded$i);
|
|
7516
7517
|
var isSelected = index === selectedIndex;
|
|
7517
7518
|
return /*#__PURE__*/React__default.createElement(StyledHotFiltersButton, Object.assign({
|
|
7518
7519
|
key: index,
|
|
@@ -7954,7 +7955,7 @@ var VideoControlsImpact = function VideoControlsImpact(_ref) {
|
|
|
7954
7955
|
})))));
|
|
7955
7956
|
};
|
|
7956
7957
|
|
|
7957
|
-
var _excluded$
|
|
7958
|
+
var _excluded$j = ["text"];
|
|
7958
7959
|
var CHAR_LIMIT = 100;
|
|
7959
7960
|
var useResponsiveVideo = function useResponsiveVideo(video, poster) {
|
|
7960
7961
|
var mobileVideo = video.mobile || video.desktop;
|
|
@@ -8076,7 +8077,7 @@ var PageHeadingImpact = function PageHeadingImpact(_ref4) {
|
|
|
8076
8077
|
var truncatedText = text && text.length > CHAR_LIMIT ? text.slice(0, CHAR_LIMIT).trimEnd() + "\u2026" : text;
|
|
8077
8078
|
var _ref5 = link || {},
|
|
8078
8079
|
linkText = _ref5.text,
|
|
8079
|
-
restLink = _objectWithoutPropertiesLoose(_ref5, _excluded$
|
|
8080
|
+
restLink = _objectWithoutPropertiesLoose(_ref5, _excluded$j);
|
|
8080
8081
|
var video = {
|
|
8081
8082
|
elementId: 'impact-header-video',
|
|
8082
8083
|
desktop: videoUrlDesktop,
|
|
@@ -8553,7 +8554,7 @@ var CompactHeaderBranding = function CompactHeaderBranding(_ref) {
|
|
|
8553
8554
|
return /*#__PURE__*/React__default.createElement(CompactHeaderLogoWrapper, null, renderBranding(brandingStyle, invert, brandingText, brandingLink));
|
|
8554
8555
|
};
|
|
8555
8556
|
|
|
8556
|
-
var _excluded$
|
|
8557
|
+
var _excluded$k = ["text"];
|
|
8557
8558
|
var useResponsiveVideo$1 = function useResponsiveVideo(video, poster) {
|
|
8558
8559
|
var mobileVideo = video.mobile || video.desktop;
|
|
8559
8560
|
var desktopVideo = video.desktop || video.mobile;
|
|
@@ -8658,7 +8659,7 @@ var PageHeadingCompact = function PageHeadingCompact(_ref4) {
|
|
|
8658
8659
|
showCopy = _ref4$showCopy === void 0 ? true : _ref4$showCopy;
|
|
8659
8660
|
var _ref5 = link || {},
|
|
8660
8661
|
linkText = _ref5.text,
|
|
8661
|
-
restLink = _objectWithoutPropertiesLoose(_ref5, _excluded$
|
|
8662
|
+
restLink = _objectWithoutPropertiesLoose(_ref5, _excluded$k);
|
|
8662
8663
|
// const titleSize = title && title.length > 20 ? 4 : 3;
|
|
8663
8664
|
var video = {
|
|
8664
8665
|
elementId: 'compact-header-video',
|
|
@@ -9263,7 +9264,7 @@ var HarmonicHeaderWithWrapper = /*#__PURE__*/styled__default(HarmonicHeader)(_te
|
|
|
9263
9264
|
var BodyCopyHarmonicWithWrapper$1 = /*#__PURE__*/styled__default(BodyCopyHarmonic)(_templateObject16 || (_templateObject16 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0;\n margin: 0;\n margin-bottom: 32px;\n whiete-space: break-spaces;\n overflow-wrap: break-word;\n\n a {\n text-decoration: underline;\n cursor: pointer;\n\n &[href^='tel:'] {\n text-decoration: none;\n }\n\n &:link {\n color: var(--color-primary-black);\n }\n\n &:visited {\n color: var(--color-base-dark-grey);\n }\n\n &:hover {\n color: var(--color-primary-red);\n }\n }\n @media ", " {\n margin-bottom: 24px;\n }\n"])), devices.mobile);
|
|
9264
9265
|
var HarmonicSubtitleWithWrapper = /*#__PURE__*/styled__default(HarmonicSubtitle)(_templateObject17 || (_templateObject17 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-wrap: break-word;\n margin-bottom: 16px;\n"])));
|
|
9265
9266
|
|
|
9266
|
-
var _excluded$
|
|
9267
|
+
var _excluded$l = ["text"],
|
|
9267
9268
|
_excluded2$2 = ["text"],
|
|
9268
9269
|
_excluded3$1 = ["text"];
|
|
9269
9270
|
var _buttonTypeToButton$1;
|
|
@@ -9331,7 +9332,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
|
|
|
9331
9332
|
var _ref2 = firstButton || {},
|
|
9332
9333
|
_ref2$text = _ref2.text,
|
|
9333
9334
|
firstButtonText = _ref2$text === void 0 ? '' : _ref2$text,
|
|
9334
|
-
restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
9335
|
+
restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$l);
|
|
9335
9336
|
var primaryButtonTextTruncate = truncate(firstButtonText, LENGTH_TEXT$1);
|
|
9336
9337
|
var secondButton = links == null ? void 0 : links[1];
|
|
9337
9338
|
var _ref3 = secondButton || {},
|
|
@@ -9615,7 +9616,7 @@ var PromoChild = function PromoChild(_ref) {
|
|
|
9615
9616
|
}));
|
|
9616
9617
|
};
|
|
9617
9618
|
|
|
9618
|
-
var _excluded$
|
|
9619
|
+
var _excluded$m = ["text"],
|
|
9619
9620
|
_excluded2$3 = ["text"];
|
|
9620
9621
|
var LENGTH_TEXT$3 = 28;
|
|
9621
9622
|
var PromoWithTitle = function PromoWithTitle(_ref) {
|
|
@@ -9642,7 +9643,7 @@ var PromoWithTitle = function PromoWithTitle(_ref) {
|
|
|
9642
9643
|
var _ref2 = primaryButton || {},
|
|
9643
9644
|
_ref2$text = _ref2.text,
|
|
9644
9645
|
primaryButtonText = _ref2$text === void 0 ? '' : _ref2$text,
|
|
9645
|
-
restPrimaryButton = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
9646
|
+
restPrimaryButton = _objectWithoutPropertiesLoose(_ref2, _excluded$m);
|
|
9646
9647
|
var primaryButtonTextTruncate = truncate(primaryButtonText, LENGTH_TEXT$3);
|
|
9647
9648
|
var tertiaryButton = links == null ? void 0 : links[1];
|
|
9648
9649
|
var _ref3 = tertiaryButton || {},
|
|
@@ -10341,7 +10342,7 @@ var ErrorLabel$5 = /*#__PURE__*/styled__default.div(_templateObject4$z || (_temp
|
|
|
10341
10342
|
return "var(--color-state-error)";
|
|
10342
10343
|
});
|
|
10343
10344
|
|
|
10344
|
-
var _excluded$
|
|
10345
|
+
var _excluded$n = ["label", "error", "width", "darkMode", "isSearchable", "components", "className"];
|
|
10345
10346
|
var DropdownIndicator = function DropdownIndicator(props) {
|
|
10346
10347
|
return /*#__PURE__*/React__default.createElement(Select$1.components.DropdownIndicator, Object.assign({}, props), /*#__PURE__*/React__default.createElement(Icon, {
|
|
10347
10348
|
iconName: "DropdownArrow"
|
|
@@ -10396,7 +10397,7 @@ var SelectComponent = function SelectComponent(_ref2) {
|
|
|
10396
10397
|
isSearchable = _ref2$isSearchable === void 0 ? false : _ref2$isSearchable,
|
|
10397
10398
|
components = _ref2.components,
|
|
10398
10399
|
className = _ref2.className,
|
|
10399
|
-
selectProps = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
10400
|
+
selectProps = _objectWithoutPropertiesLoose(_ref2, _excluded$n);
|
|
10400
10401
|
return /*#__PURE__*/React__default.createElement(WrapperComponent, {
|
|
10401
10402
|
label: label,
|
|
10402
10403
|
error: error,
|
|
@@ -10415,7 +10416,7 @@ var SelectComponent = function SelectComponent(_ref2) {
|
|
|
10415
10416
|
})));
|
|
10416
10417
|
};
|
|
10417
10418
|
|
|
10418
|
-
var _excluded$
|
|
10419
|
+
var _excluded$o = ["label", "error", "width", "darkMode", "components"];
|
|
10419
10420
|
/**
|
|
10420
10421
|
* The Select2Async component is similar to Select 2, but uses react-select async
|
|
10421
10422
|
* component for select instead of regular react-select component. This can be used
|
|
@@ -10437,7 +10438,7 @@ var SelectComponent$1 = function SelectComponent(_ref) {
|
|
|
10437
10438
|
_ref$darkMode = _ref.darkMode,
|
|
10438
10439
|
darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
|
|
10439
10440
|
components = _ref.components,
|
|
10440
|
-
selectProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10441
|
+
selectProps = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
10441
10442
|
return /*#__PURE__*/React__default.createElement(WrapperComponent, {
|
|
10442
10443
|
label: label,
|
|
10443
10444
|
error: error,
|
|
@@ -10574,7 +10575,7 @@ var Wrapper$7 = /*#__PURE__*/styled__default.figure(_templateObject$1d || (_temp
|
|
|
10574
10575
|
var CaptionWrapper = /*#__PURE__*/styled__default.figcaption(_templateObject2$W || (_templateObject2$W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: table-caption;\n caption-side: bottom;\n margin-top: var(--carousel-image-caption-margin);\n"])));
|
|
10575
10576
|
var CaptionContext = /*#__PURE__*/styled__default(Caption)(_templateObject3$J || (_templateObject3$J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n text-overflow: ellipsis;\n line-clamp: 2;\n max-height: 46px;\n white-space: normal;\n word-break: break-word;\n font-feature-settings: var(--font-feature-settings-body);\n text-transform: var(--text-transform-body);\n"])));
|
|
10576
10577
|
|
|
10577
|
-
var _excluded$
|
|
10578
|
+
var _excluded$p = ["caption", "altText", "src", "srcSet", "sizes", "loading", "aspectRatio", "className"];
|
|
10578
10579
|
var ImageWithCaption = function ImageWithCaption(_ref) {
|
|
10579
10580
|
var caption = _ref.caption,
|
|
10580
10581
|
altText = _ref.altText,
|
|
@@ -10584,7 +10585,7 @@ var ImageWithCaption = function ImageWithCaption(_ref) {
|
|
|
10584
10585
|
loading = _ref.loading,
|
|
10585
10586
|
aspectRatio = _ref.aspectRatio,
|
|
10586
10587
|
className = _ref.className,
|
|
10587
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10588
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
10588
10589
|
return /*#__PURE__*/React__default.createElement(Wrapper$7, Object.assign({
|
|
10589
10590
|
aspectRatio: aspectRatio,
|
|
10590
10591
|
className: className
|
|
@@ -12178,7 +12179,7 @@ var ArrowWrapper = /*#__PURE__*/styled__default.div(_templateObject0$9 || (_temp
|
|
|
12178
12179
|
return disabled ? 'var(--color-state-disabled)' : 'var(--button-anchor-tab-color)';
|
|
12179
12180
|
});
|
|
12180
12181
|
|
|
12181
|
-
var _excluded$
|
|
12182
|
+
var _excluded$q = ["id", "text"];
|
|
12182
12183
|
var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
12183
12184
|
var tabs = _ref.tabs,
|
|
12184
12185
|
onTabClick = _ref.onTabClick,
|
|
@@ -12389,7 +12390,7 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
|
12389
12390
|
}, tabs.map(function (_ref4) {
|
|
12390
12391
|
var id = _ref4.id,
|
|
12391
12392
|
text = _ref4.text,
|
|
12392
|
-
rest = _objectWithoutPropertiesLoose(_ref4, _excluded$
|
|
12393
|
+
rest = _objectWithoutPropertiesLoose(_ref4, _excluded$q);
|
|
12393
12394
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
12394
12395
|
key: id
|
|
12395
12396
|
}, /*#__PURE__*/React__default.createElement(TabLink, Object.assign({
|
|
@@ -12451,7 +12452,7 @@ var PrimaryButtonReverse = /*#__PURE__*/styled__default(PrimaryButton)(_template
|
|
|
12451
12452
|
var MessageWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject9$b || (_templateObject9$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-right: var(--grid-outer-margin);\n height: var(--button-height);\n\n h6 {\n margin: 0;\n padding: 0;\n }\n\n @media ", " {\n & {\n margin-right: var(--grid-margin);\n }\n }\n\n @media ", " {\n & {\n display: none;\n }\n }\n"])), devices.tablet, devices.mobile);
|
|
12452
12453
|
var MessageWrapperMobile = /*#__PURE__*/styled__default.div(_templateObject0$a || (_templateObject0$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n h6 {\n margin: 0;\n padding: 0;\n }\n display: none;\n\n @media ", " {\n & {\n display: flex;\n align-items: center;\n margin-left: var(--grid-margin);\n padding: 12px 0;\n }\n }\n"])), devices.mobile);
|
|
12453
12454
|
|
|
12454
|
-
var _excluded$
|
|
12455
|
+
var _excluded$r = ["text"],
|
|
12455
12456
|
_excluded2$4 = ["text"];
|
|
12456
12457
|
var TitleWithCTA = function TitleWithCTA(_ref) {
|
|
12457
12458
|
var title = _ref.title,
|
|
@@ -12461,7 +12462,7 @@ var TitleWithCTA = function TitleWithCTA(_ref) {
|
|
|
12461
12462
|
message = _ref.message;
|
|
12462
12463
|
var _ref2 = (links == null ? void 0 : links[0]) || {},
|
|
12463
12464
|
primaryButtonText = _ref2.text,
|
|
12464
|
-
primaryButtonProps = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
12465
|
+
primaryButtonProps = _objectWithoutPropertiesLoose(_ref2, _excluded$r);
|
|
12465
12466
|
var _ref3 = (links == null ? void 0 : links[1]) || {},
|
|
12466
12467
|
secondaryButtonText = _ref3.text,
|
|
12467
12468
|
secondaryButtonProps = _objectWithoutPropertiesLoose(_ref3, _excluded2$4);
|
|
@@ -12592,7 +12593,7 @@ var CloseButton = /*#__PURE__*/styled__default.button(_templateObject2$19 || (_t
|
|
|
12592
12593
|
var ContentWrapper$3 = /*#__PURE__*/styled__default.div(_templateObject3$V || (_templateObject3$V = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
12593
12594
|
var Overlay = /*#__PURE__*/styled__default(Grid)(_templateObject4$N || (_templateObject4$N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n align-content: center;\n background-color: rgba(0, 0, 0, 0.4);\n"])));
|
|
12594
12595
|
|
|
12595
|
-
var _excluded$
|
|
12596
|
+
var _excluded$s = ["isOpen", "setIsOpen", "children", "appElementId"];
|
|
12596
12597
|
var MAX_Z_INDEX = 9999999999;
|
|
12597
12598
|
if (Modal.defaultStyles.content) {
|
|
12598
12599
|
Modal.defaultStyles.content.position = 'static';
|
|
@@ -12666,7 +12667,7 @@ var ModalWindow = function ModalWindow(_ref) {
|
|
|
12666
12667
|
setIsOpen = _ref.setIsOpen,
|
|
12667
12668
|
children = _ref.children,
|
|
12668
12669
|
appElementId = _ref.appElementId,
|
|
12669
|
-
modalProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12670
|
+
modalProps = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
12670
12671
|
var isMobile = useMobile();
|
|
12671
12672
|
var customStyles = {
|
|
12672
12673
|
overlay: {
|
|
@@ -13084,7 +13085,7 @@ var VideoWithControlsWrapper = /*#__PURE__*/styled__default.div(_templateObject1
|
|
|
13084
13085
|
}, devices.mobile);
|
|
13085
13086
|
var ProgressContainer$1 = /*#__PURE__*/styled__default.div(_templateObject16$1 || (_templateObject16$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 32px;\n\n p {\n margin-bottom: 16px;\n }\n\n @media ", " {\n margin-top: 20px;\n\n p {\n margin-bottom: 12px;\n }\n }\n"])), devices.mobileAndTablet);
|
|
13086
13087
|
|
|
13087
|
-
var _excluded$
|
|
13088
|
+
var _excluded$t = ["text"],
|
|
13088
13089
|
_excluded2$5 = ["text"];
|
|
13089
13090
|
var _buttonTypeToButton$2;
|
|
13090
13091
|
var buttonTypeToButton$2 = (_buttonTypeToButton$2 = {}, _buttonTypeToButton$2[exports.ButtonType.Primary] = PrimaryButton, _buttonTypeToButton$2[exports.ButtonType.Secondary] = SecondaryButton, _buttonTypeToButton$2[exports.ButtonType.Tertiary] = TertiaryButton, _buttonTypeToButton$2);
|
|
@@ -13095,7 +13096,7 @@ var Buttons = function Buttons(_ref) {
|
|
|
13095
13096
|
var _ref2 = firstButton || {},
|
|
13096
13097
|
_ref2$text = _ref2.text,
|
|
13097
13098
|
firstButtonText = _ref2$text === void 0 ? '' : _ref2$text,
|
|
13098
|
-
restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
13099
|
+
restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$t);
|
|
13099
13100
|
var secondButton = links == null ? void 0 : links[1];
|
|
13100
13101
|
var _ref3 = secondButton || {},
|
|
13101
13102
|
_ref3$text = _ref3.text,
|
|
@@ -13332,11 +13333,11 @@ var HighlightsCarousel = function HighlightsCarousel(_ref) {
|
|
|
13332
13333
|
})));
|
|
13333
13334
|
};
|
|
13334
13335
|
|
|
13335
|
-
var _excluded$
|
|
13336
|
+
var _excluded$u = ["logo", "slides"];
|
|
13336
13337
|
var HighlightsCinema = function HighlightsCinema(_ref) {
|
|
13337
13338
|
var logo = _ref.logo,
|
|
13338
13339
|
slides = _ref.slides,
|
|
13339
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13340
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
13340
13341
|
var slidesWithLinks = slides.map(function (slide) {
|
|
13341
13342
|
var links = processSlideLinks(slide.links);
|
|
13342
13343
|
return _extends({}, slide, {
|
|
@@ -13353,10 +13354,10 @@ var HighlightsCinema = function HighlightsCinema(_ref) {
|
|
|
13353
13354
|
})));
|
|
13354
13355
|
};
|
|
13355
13356
|
|
|
13356
|
-
var _excluded$
|
|
13357
|
+
var _excluded$v = ["slides"];
|
|
13357
13358
|
var HighlightsCore = function HighlightsCore(_ref) {
|
|
13358
13359
|
var slides = _ref.slides,
|
|
13359
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13360
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
13360
13361
|
var slidesWithLinks = slides.map(function (slide) {
|
|
13361
13362
|
var links = processSlideLinks(slide.links);
|
|
13362
13363
|
return _extends({}, slide, {
|
|
@@ -13370,11 +13371,11 @@ var HighlightsCore = function HighlightsCore(_ref) {
|
|
|
13370
13371
|
})));
|
|
13371
13372
|
};
|
|
13372
13373
|
|
|
13373
|
-
var _excluded$
|
|
13374
|
+
var _excluded$w = ["logo", "slides"];
|
|
13374
13375
|
var HighlightsStream = function HighlightsStream(_ref) {
|
|
13375
13376
|
var logo = _ref.logo,
|
|
13376
13377
|
slides = _ref.slides,
|
|
13377
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13378
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
13378
13379
|
var slidesWithLinks = slides.map(function (slide) {
|
|
13379
13380
|
var links = processSlideLinks(slide.links);
|
|
13380
13381
|
return _extends({}, slide, {
|