@royaloperahouse/chord 1.2.0 → 1.3.0-a-chord-development
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 +3 -0
- package/README.md +99 -44
- package/dist/chord.cjs.development.js +116 -60
- package/dist/chord.cjs.development.js.map +1 -1
- package/dist/chord.cjs.production.min.js +1 -1
- package/dist/chord.cjs.production.min.js.map +1 -1
- package/dist/chord.esm.js +117 -61
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/atoms/Sponsorship/Sponsorship.style.d.ts +1 -0
- package/dist/components/atoms/Typography/Typography.d.ts +1 -1
- package/dist/components/molecules/PageHeading/Impact/Impact.d.ts +1 -1
- package/dist/components/molecules/PromoWithTags/PromoWithTags.style.d.ts +5 -3
- package/dist/helpers/defaultValues.d.ts +7 -0
- package/dist/types/editorial.d.ts +16 -30
- package/dist/types/impactHeader.d.ts +50 -0
- package/dist/types/types.d.ts +4 -0
- package/dist/types/typography.d.ts +5 -1
- package/package.json +1 -1
- package/README.GIT +0 -122
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SponsorshipStyledIframe: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -2,6 +2,6 @@ import { IAltHeaderProps, IBodyTextProps, IHeaderProps, IOverlineProps, IStyledT
|
|
|
2
2
|
export declare const StyledTag: ({ tag, typography, children, level }: IStyledTag) => JSX.Element;
|
|
3
3
|
export declare const AltHeader: ({ level, children }: IAltHeaderProps) => JSX.Element;
|
|
4
4
|
export declare const BodyText: ({ level, children, tag }: IBodyTextProps) => JSX.Element;
|
|
5
|
-
export declare const Header: ({ level, children }: IHeaderProps) => JSX.Element;
|
|
5
|
+
export declare const Header: ({ semanticLevel, level, children }: IHeaderProps) => JSX.Element;
|
|
6
6
|
export declare const Overline: ({ level, children, tag }: IOverlineProps) => JSX.Element;
|
|
7
7
|
export declare const Subtitle: ({ level, children, tag }: ISubtitleProps) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { IPageHeadingImpactProps } from '../../../../types/
|
|
2
|
+
import { IPageHeadingImpactProps } from '../../../../types/impactHeader';
|
|
3
3
|
declare const PageHeadingImpact: FunctionComponent<IPageHeadingImpactProps>;
|
|
4
4
|
export default PageHeadingImpact;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { IEditorialGridProps, IPromoWithTagsStyledProps } from '../../../types/editorial';
|
|
2
2
|
export declare const PromoWithTagsGrid: import("styled-components").StyledComponent<"div", any, IEditorialGridProps, never>;
|
|
3
|
-
export declare const PromoWithTagsExtraContentWrapper: import("styled-components").StyledComponent<"div", any, IEditorialGridProps, never>;
|
|
4
|
-
export declare const PromoWithTagsContentWrapper: import("styled-components").StyledComponent<"div", any, IEditorialGridProps, never>;
|
|
5
|
-
export declare const PromoWithTagsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
3
|
export declare const PromoWithTagsSubtitle: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
4
|
export declare const PromoWithTagsText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
5
|
export declare const ButtonsContainer: import("styled-components").StyledComponent<"div", any, IEditorialGridProps, never>;
|
|
@@ -14,3 +11,8 @@ export declare const ExtraContentWrapper: import("styled-components").StyledComp
|
|
|
14
11
|
export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
12
|
export declare const PrimaryButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
13
|
export declare const MobileTitleWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
+
export declare const PromoWithTagsTypeTags: import("styled-components").StyledComponent<({ list }: import("../../../types/types").ITypeTagsProps) => JSX.Element, any, {}, never>;
|
|
15
|
+
export declare const PromoWithTagsHeader: import("styled-components").StyledComponent<({ semanticLevel, level, children }: import("../../../types/typography").IHeaderProps) => JSX.Element, any, {}, never>;
|
|
16
|
+
export declare const PromoWithTagsExtraContentWrapper: import("styled-components").StyledComponent<"div", any, IEditorialGridProps, never>;
|
|
17
|
+
export declare const PromoWithTagsContentWrapper: import("styled-components").StyledComponent<"div", any, IEditorialGridProps, never>;
|
|
18
|
+
export declare const PromoWithTagsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -42,6 +42,10 @@ export interface IEditorialGridProps {
|
|
|
42
42
|
* Indicates if component should be hidden
|
|
43
43
|
*/
|
|
44
44
|
hideSection?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Modifies styles to fixed height card
|
|
47
|
+
*/
|
|
48
|
+
asCard?: boolean;
|
|
45
49
|
}
|
|
46
50
|
export interface IPromoWithTagsStyledProps {
|
|
47
51
|
/**
|
|
@@ -134,36 +138,6 @@ export interface IPageHeadingProps extends IThemePageHeadingProps {
|
|
|
134
138
|
*/
|
|
135
139
|
children?: ReactNode;
|
|
136
140
|
}
|
|
137
|
-
export interface IPageHeadingImpactProps {
|
|
138
|
-
/**
|
|
139
|
-
* Text placed in the impact component
|
|
140
|
-
*/
|
|
141
|
-
text?: string;
|
|
142
|
-
/**
|
|
143
|
-
* Link placed in the impact component
|
|
144
|
-
*/
|
|
145
|
-
link?: EditorialLink;
|
|
146
|
-
/**
|
|
147
|
-
* Boolean to show/hide sponsorship logo (default true)
|
|
148
|
-
*/
|
|
149
|
-
sponsor?: boolean;
|
|
150
|
-
/**
|
|
151
|
-
* Background url for desktops
|
|
152
|
-
*/
|
|
153
|
-
bgUrlDesktop: string;
|
|
154
|
-
/**
|
|
155
|
-
* Background url for devices
|
|
156
|
-
*/
|
|
157
|
-
bgUrlDevice?: string;
|
|
158
|
-
/**
|
|
159
|
-
* Logo to be placed in page heading component
|
|
160
|
-
*/
|
|
161
|
-
children?: ReactNode;
|
|
162
|
-
/**
|
|
163
|
-
* Internal anchor ref
|
|
164
|
-
*/
|
|
165
|
-
scrollHref?: string;
|
|
166
|
-
}
|
|
167
141
|
export interface IImpactWrappersStyledProps extends StyledProps<any> {
|
|
168
142
|
/**
|
|
169
143
|
* Background url for desktops
|
|
@@ -228,4 +202,16 @@ export interface IPromoWithTagsProps {
|
|
|
228
202
|
* Text in the bottom
|
|
229
203
|
*/
|
|
230
204
|
bottomText?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Display with reduced height & font size for use as card
|
|
207
|
+
*/
|
|
208
|
+
asCard?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Make CTA appear disabled
|
|
211
|
+
*/
|
|
212
|
+
disableCTA?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Copy to show on disabled CTA
|
|
215
|
+
*/
|
|
216
|
+
disabledCTACopy?: string;
|
|
231
217
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EditorialLink } from '../types';
|
|
3
|
+
export interface IPageHeadingImpactProps {
|
|
4
|
+
/**
|
|
5
|
+
* Text placed in the impact component
|
|
6
|
+
*/
|
|
7
|
+
text?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Link placed in the impact component
|
|
10
|
+
*/
|
|
11
|
+
link?: EditorialLink;
|
|
12
|
+
/**
|
|
13
|
+
* Boolean to show/hide sponsorship logo (default true)
|
|
14
|
+
*/
|
|
15
|
+
sponsor?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Data for custom sponsor
|
|
18
|
+
*/
|
|
19
|
+
customSponsorData?: CustomSponsorData;
|
|
20
|
+
/**
|
|
21
|
+
* Background url for desktops
|
|
22
|
+
*/
|
|
23
|
+
bgUrlDesktop: string;
|
|
24
|
+
/**
|
|
25
|
+
* Background url for devices
|
|
26
|
+
*/
|
|
27
|
+
bgUrlDevice?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Logo to be placed in page heading component
|
|
30
|
+
*/
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Internal anchor ref
|
|
34
|
+
*/
|
|
35
|
+
scrollHref?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface CustomSponsorData {
|
|
38
|
+
/**
|
|
39
|
+
* Source URL for Sponsorship logo
|
|
40
|
+
*/
|
|
41
|
+
src: string;
|
|
42
|
+
/**
|
|
43
|
+
* Used for Analytics.
|
|
44
|
+
*/
|
|
45
|
+
dataRoh: string;
|
|
46
|
+
/**
|
|
47
|
+
* Used for Accessibility.
|
|
48
|
+
*/
|
|
49
|
+
title: string;
|
|
50
|
+
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -326,6 +326,10 @@ export interface ISponsorshipProps {
|
|
|
326
326
|
* Used for Accessibility.
|
|
327
327
|
*/
|
|
328
328
|
title?: string;
|
|
329
|
+
/**
|
|
330
|
+
* Used to determine that there is custom data for Sponsorship
|
|
331
|
+
*/
|
|
332
|
+
isCustomImage?: boolean;
|
|
329
333
|
}
|
|
330
334
|
export interface ITextLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
331
335
|
children: ReactNode;
|
|
@@ -30,9 +30,13 @@ export interface IStyledTag extends ITypographyWrapperProps, IGenericTypography
|
|
|
30
30
|
}
|
|
31
31
|
export interface IHeaderProps extends IGenericTypography {
|
|
32
32
|
/**
|
|
33
|
-
* Header level, 1, 2, 3, 4, 5 or 6.
|
|
33
|
+
* Display Header level, 1, 2, 3, 4, 5 or 6.
|
|
34
34
|
*/
|
|
35
35
|
level: TypographyLevel;
|
|
36
|
+
/**
|
|
37
|
+
* Semantic Header level, 1, 2, 3, 4, 5 or 6. - Not to be used for aeshetics.
|
|
38
|
+
*/
|
|
39
|
+
semanticLevel?: TypographyLevel;
|
|
36
40
|
}
|
|
37
41
|
export interface IAltHeaderProps extends IGenericTypography {
|
|
38
42
|
/**
|
package/package.json
CHANGED
package/README.GIT
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# Royal Opera House - Front End Design System
|
|
2
|
-
|
|
3
|
-
Welcome to the Royal Opera House Front End Design System, `@royaloperahouse/chord`.
|
|
4
|
-
|
|
5
|
-
This package is a library of UI components intended to be used in the ROH website.
|
|
6
|
-
|
|
7
|
-
It uses React, TypeScript, TSDX and Storybook.
|
|
8
|
-
|
|
9
|
-
## Commands
|
|
10
|
-
|
|
11
|
-
The required package dependencies need to be insalled using `yarn`. Once ready you can issue the following:
|
|
12
|
-
|
|
13
|
-
To run Lint on the package use:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
yarn lint # you can also use the --fix option to perform automatic fixes
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
To run the unit tests (using Jest) use:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
yarn test # you can also use the -u option to update snapshots if needed
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
To run the unit tests (using Jest) and store them for display in storybook use:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
yarn test-storybook # you can also use the -u option to update snapshots if needed
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
To run storybook use:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
yarn storybook
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
To build a static version of storybook use:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
yarn build-storybook
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
This will create a static copy in `./storybook-static`, and there is an index.html page inside the core directory. This allows the site to be previewed directly in the git repository via serving pages (it needs to be configured for that branch).
|
|
44
|
-
|
|
45
|
-
To deploy the storybook publically:
|
|
46
|
-
|
|
47
|
-
### Prerequisites
|
|
48
|
-
|
|
49
|
-
Make sure you have credentials for the *parent* 'Royal Opera House' AWS account in your `~/.aws/credentials` file. The deploy script expects these to be called `[parent]`.
|
|
50
|
-
|
|
51
|
-
You can get these values at:
|
|
52
|
-
|
|
53
|
-
AWS 'Your Applications' page -> 'Royal Opera House' -> 'Developer Access' ->
|
|
54
|
-
'Command line or programmatic access'
|
|
55
|
-
|
|
56
|
-
### Deployment
|
|
57
|
-
|
|
58
|
-
To deploy, first *build* the storybook as above
|
|
59
|
-
|
|
60
|
-
then use:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
yarn deploy-storybook
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
This will deploy the contents of `./storybook-static` to S3 as a static site accessible at [chord.roh.org.uk](chord.roh.org.uk)
|
|
67
|
-
|
|
68
|
-
To build the package use:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
yarn build
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
To release a new version.
|
|
75
|
-
|
|
76
|
-
Release will be published in npm (NPM_TOKEN will be required)
|
|
77
|
-
Storybook will be pushed to bitbucket. *** Push will be done Ensure you don't have things pendint to push
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
NPM_ROH_TOKEN={NPM_TOKEN} RELEASE_VERSION={RELEASE_VERSION} yarn publish-release
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
MORE INFO TO FOLLOW - PARTICULARLY FOR THE CI SETUP AND HOW PACKAGES ARE PUSHED.
|
|
85
|
-
|
|
86
|
-
# Recommended Use of Package
|
|
87
|
-
|
|
88
|
-
The package is deployed to NPM, and can be installed using yarn or npm:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
npm i --save @royaloperahouse/chord
|
|
92
|
-
```
|
|
93
|
-
```bash
|
|
94
|
-
yarn add @royaloperahouse/chord
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
# Processes to follow prior to commits
|
|
98
|
-
|
|
99
|
-
Before a commit is made you need to do the following:
|
|
100
|
-
|
|
101
|
-
- Make sure that you are in your own work branch (properly named, including the JIRA ticket number and a short description)
|
|
102
|
-
- `yarn lint` - ensure that you are not introducing errors
|
|
103
|
-
- `yarn test` - ensure that tests are running as expected
|
|
104
|
-
- `yarn test-storybook` - Save the test results to for the static site
|
|
105
|
-
- `yarn build-storybook` - Update the static site
|
|
106
|
-
- Commit your changes in your branch locally
|
|
107
|
-
|
|
108
|
-
Next, if you are ready to merge into the main development branch then:
|
|
109
|
-
|
|
110
|
-
- _*ensure that you pull the latest changes from that branch into your new branch, resolving any merge conflicts that may arise*_
|
|
111
|
-
- Commit any merge changes locally
|
|
112
|
-
- Push your branch changes to the origin repo
|
|
113
|
-
- Raise a Pull Request to merge back into the main development branch, AND ensure that the required reviewers are assigned.
|
|
114
|
-
- The reviewers may raise issues, and once resolved, they will be responsible for performing the merge.
|
|
115
|
-
|
|
116
|
-
### Example
|
|
117
|
-
|
|
118
|
-
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.
|
|
119
|
-
|
|
120
|
-
### Bundle analysis
|
|
121
|
-
|
|
122
|
-
Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `yarn size` and visulize it with `yarn analyze`.
|