@royaloperahouse/chord 1.2.0 → 1.3.0-b-development-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 +6 -0
- package/README.md +99 -44
- package/dist/chord.cjs.development.js +114 -71
- 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 +115 -72
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/atoms/Typography/Typography.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 -0
- package/dist/types/typography.d.ts +5 -1
- package/package.json +11 -10
- package/README.GIT +0 -122
|
@@ -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,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
|
/**
|
|
@@ -228,4 +232,16 @@ export interface IPromoWithTagsProps {
|
|
|
228
232
|
* Text in the bottom
|
|
229
233
|
*/
|
|
230
234
|
bottomText?: string;
|
|
235
|
+
/**
|
|
236
|
+
* Display with reduced height & font size for use as card
|
|
237
|
+
*/
|
|
238
|
+
asCard?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Make CTA appear disabled
|
|
241
|
+
*/
|
|
242
|
+
disableCTA?: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Copy to show on disabled CTA
|
|
245
|
+
*/
|
|
246
|
+
disabledCTACopy?: string;
|
|
231
247
|
}
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royaloperahouse/chord",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-b-development-chord-development",
|
|
4
4
|
"author": "Royal Opera House",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -72,15 +72,16 @@
|
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@babel/core": "^7.16.0",
|
|
74
74
|
"@babel/plugin-transform-modules-commonjs": "^7.16.0",
|
|
75
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.8",
|
|
75
76
|
"@size-limit/preset-small-lib": "^6.0.4",
|
|
76
|
-
"@storybook/addon-a11y": "^6.
|
|
77
|
-
"@storybook/addon-essentials": "^6.
|
|
77
|
+
"@storybook/addon-a11y": "^6.5.12",
|
|
78
|
+
"@storybook/addon-essentials": "^6.5.12",
|
|
78
79
|
"@storybook/addon-info": "^5.3.21",
|
|
79
|
-
"@storybook/addon-jest": "^6.
|
|
80
|
-
"@storybook/addon-links": "^6.
|
|
81
|
-
"@storybook/addons": "^6.
|
|
82
|
-
"@storybook/react": "^6.
|
|
83
|
-
"@storybook/storybook-deployer": "^2.8.
|
|
80
|
+
"@storybook/addon-jest": "^6.5.12",
|
|
81
|
+
"@storybook/addon-links": "^6.5.12",
|
|
82
|
+
"@storybook/addons": "^6.5.12",
|
|
83
|
+
"@storybook/react": "^6.5.12",
|
|
84
|
+
"@storybook/storybook-deployer": "^2.8.12",
|
|
84
85
|
"@testing-library/jest-dom": "^5.15.0",
|
|
85
86
|
"@testing-library/react": "^12.1.2",
|
|
86
87
|
"@testing-library/user-event": "^13.5.0",
|
|
@@ -97,8 +98,8 @@
|
|
|
97
98
|
"react-dom": "^17.0.2",
|
|
98
99
|
"react-is": "^17.0.2",
|
|
99
100
|
"size-limit": "^6.0.4",
|
|
100
|
-
"storybook-addon-designs": "^6.
|
|
101
|
-
"storybook-addon-pseudo-states": "^1.
|
|
101
|
+
"storybook-addon-designs": "^6.3.1",
|
|
102
|
+
"storybook-addon-pseudo-states": "^1.15.1",
|
|
102
103
|
"ts-jest": "^27.0.7",
|
|
103
104
|
"tsdx": "^0.14.1",
|
|
104
105
|
"tslib": "^2.3.1",
|
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`.
|