@royaloperahouse/harmonic 0.1.1-d → 0.1.2
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 +185 -6
- package/README.GIT +285 -0
- package/README.md +41 -258
- package/dist/components/atoms/ImageAspectRatioWrapper/ImageAspectRatioWrapper.d.ts +3 -2
- package/dist/components/atoms/ImageAspectRatioWrapper/ImageAspectRatioWrapper.style.d.ts +3 -0
- package/dist/components/atoms/SocialLinks/SocialLinks.d.ts +4 -0
- package/dist/components/atoms/SocialLinks/SocialLinks.style.d.ts +2 -0
- package/dist/components/atoms/SocialLinks/index.d.ts +2 -0
- package/dist/components/atoms/SponsorLogo/SponsorLogo.d.ts +1 -1
- package/dist/components/atoms/index.d.ts +2 -1
- package/dist/components/molecules/ImageWithCaption/ImageWithCaption.style.d.ts +2 -2
- package/dist/components/molecules/PolicyLinks/PolicyLinks.d.ts +3 -3
- package/dist/components/molecules/PolicyLinks/PolicyLinks.style.d.ts +1 -3
- package/dist/components/molecules/index.d.ts +2 -1
- package/dist/components/organisms/Footer/Footer.d.ts +2 -2
- package/dist/components/organisms/Footer/Footer.style.d.ts +5 -5
- package/dist/harmonic.cjs.development.css +1 -5
- package/dist/harmonic.cjs.development.js +898 -838
- 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 +899 -839
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/helpers/devices.d.ts +6 -0
- package/dist/styles/themes.d.ts +32 -0
- package/dist/types/footer.d.ts +6 -0
- package/dist/types/image.d.ts +14 -4
- package/dist/types/types.d.ts +4 -0
- package/dist/types/typography.d.ts +1 -6
- package/package.json +2 -2
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export declare const useIOS: () => boolean;
|
|
2
2
|
export declare const isMobile: () => boolean;
|
|
3
3
|
export declare const useMobile: () => boolean;
|
|
4
|
+
export declare const useViewport: () => {
|
|
5
|
+
width: number;
|
|
6
|
+
isMobile: boolean;
|
|
7
|
+
isTablet: boolean;
|
|
8
|
+
isDesktop: boolean;
|
|
9
|
+
};
|
package/dist/styles/themes.d.ts
CHANGED
|
@@ -461,6 +461,10 @@ export declare const core: {
|
|
|
461
461
|
verticalSpacingLarge: string;
|
|
462
462
|
verticalSpacingSmall: string;
|
|
463
463
|
};
|
|
464
|
+
tablet: {
|
|
465
|
+
paddingTop: string;
|
|
466
|
+
paddingBottom: string;
|
|
467
|
+
};
|
|
464
468
|
mobile: {
|
|
465
469
|
height: string;
|
|
466
470
|
paddingTop: string;
|
|
@@ -928,6 +932,10 @@ export declare const stream: {
|
|
|
928
932
|
verticalSpacingLarge: string;
|
|
929
933
|
verticalSpacingSmall: string;
|
|
930
934
|
};
|
|
935
|
+
tablet: {
|
|
936
|
+
paddingTop: string;
|
|
937
|
+
paddingBottom: string;
|
|
938
|
+
};
|
|
931
939
|
mobile: {
|
|
932
940
|
height: string;
|
|
933
941
|
paddingTop: string;
|
|
@@ -1395,6 +1403,10 @@ export declare const cinema: {
|
|
|
1395
1403
|
verticalSpacingLarge: string;
|
|
1396
1404
|
verticalSpacingSmall: string;
|
|
1397
1405
|
};
|
|
1406
|
+
tablet: {
|
|
1407
|
+
paddingTop: string;
|
|
1408
|
+
paddingBottom: string;
|
|
1409
|
+
};
|
|
1398
1410
|
mobile: {
|
|
1399
1411
|
height: string;
|
|
1400
1412
|
paddingTop: string;
|
|
@@ -1862,6 +1874,10 @@ export declare const schools: {
|
|
|
1862
1874
|
verticalSpacingLarge: string;
|
|
1863
1875
|
verticalSpacingSmall: string;
|
|
1864
1876
|
};
|
|
1877
|
+
tablet: {
|
|
1878
|
+
paddingTop: string;
|
|
1879
|
+
paddingBottom: string;
|
|
1880
|
+
};
|
|
1865
1881
|
mobile: {
|
|
1866
1882
|
height: string;
|
|
1867
1883
|
paddingTop: string;
|
|
@@ -2330,6 +2346,10 @@ export declare const themes: {
|
|
|
2330
2346
|
verticalSpacingLarge: string;
|
|
2331
2347
|
verticalSpacingSmall: string;
|
|
2332
2348
|
};
|
|
2349
|
+
tablet: {
|
|
2350
|
+
paddingTop: string;
|
|
2351
|
+
paddingBottom: string;
|
|
2352
|
+
};
|
|
2333
2353
|
mobile: {
|
|
2334
2354
|
height: string;
|
|
2335
2355
|
paddingTop: string;
|
|
@@ -2797,6 +2817,10 @@ export declare const themes: {
|
|
|
2797
2817
|
verticalSpacingLarge: string;
|
|
2798
2818
|
verticalSpacingSmall: string;
|
|
2799
2819
|
};
|
|
2820
|
+
tablet: {
|
|
2821
|
+
paddingTop: string;
|
|
2822
|
+
paddingBottom: string;
|
|
2823
|
+
};
|
|
2800
2824
|
mobile: {
|
|
2801
2825
|
height: string;
|
|
2802
2826
|
paddingTop: string;
|
|
@@ -3264,6 +3288,10 @@ export declare const themes: {
|
|
|
3264
3288
|
verticalSpacingLarge: string;
|
|
3265
3289
|
verticalSpacingSmall: string;
|
|
3266
3290
|
};
|
|
3291
|
+
tablet: {
|
|
3292
|
+
paddingTop: string;
|
|
3293
|
+
paddingBottom: string;
|
|
3294
|
+
};
|
|
3267
3295
|
mobile: {
|
|
3268
3296
|
height: string;
|
|
3269
3297
|
paddingTop: string;
|
|
@@ -3740,6 +3768,10 @@ export declare const themes: {
|
|
|
3740
3768
|
verticalSpacingLarge: string;
|
|
3741
3769
|
verticalSpacingSmall: string;
|
|
3742
3770
|
};
|
|
3771
|
+
tablet: {
|
|
3772
|
+
paddingTop: string;
|
|
3773
|
+
paddingBottom: string;
|
|
3774
|
+
};
|
|
3743
3775
|
mobile: {
|
|
3744
3776
|
height: string;
|
|
3745
3777
|
paddingTop: string;
|
package/dist/types/footer.d.ts
CHANGED
package/dist/types/image.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { StyledProps } from 'styled-components';
|
|
3
3
|
export declare enum AspectRatio {
|
|
4
4
|
'1:1' = "1 / 1",
|
|
5
5
|
'3:4' = "3 / 4",
|
|
6
6
|
'4:3' = "4 / 3",
|
|
7
|
-
'3
|
|
7
|
+
'8:3' = "8 / 3",
|
|
8
8
|
'16:9' = "16 / 9"
|
|
9
9
|
}
|
|
10
10
|
export declare enum AspectRatioLegacy {
|
|
11
11
|
'1 / 1' = "100",
|
|
12
12
|
'3 / 4' = "133",
|
|
13
13
|
'4 / 3' = "75",
|
|
14
|
-
'
|
|
14
|
+
'8 / 3' = "37.5",
|
|
15
15
|
'16 / 9' = "56.25"
|
|
16
16
|
}
|
|
17
17
|
export declare enum AspectRatioWidth {
|
|
18
18
|
'1 / 1' = "1",
|
|
19
19
|
'3 / 4' = "0.75",
|
|
20
20
|
'4 / 3' = "1.33",
|
|
21
|
-
'
|
|
21
|
+
'8 / 3' = "2.67",
|
|
22
22
|
'16 / 9' = "1.78"
|
|
23
23
|
}
|
|
24
24
|
export interface IImageAspectRatioWrapperProps {
|
|
@@ -26,6 +26,10 @@ export interface IImageAspectRatioWrapperProps {
|
|
|
26
26
|
* Aspect ratio of the contained image
|
|
27
27
|
*/
|
|
28
28
|
aspectRatio?: AspectRatio;
|
|
29
|
+
/**
|
|
30
|
+
* Alternative text describing the image content for accessibility purposes.
|
|
31
|
+
*/
|
|
32
|
+
alt?: string;
|
|
29
33
|
}
|
|
30
34
|
export interface IImageWithCaptionProps {
|
|
31
35
|
/**
|
|
@@ -54,3 +58,9 @@ export interface IImageWithCaptionWrapperProps extends StyledProps<{
|
|
|
54
58
|
*/
|
|
55
59
|
height: number;
|
|
56
60
|
}
|
|
61
|
+
export interface ImageAspectRatioWrapperProps extends IImageAspectRatioWrapperProps {
|
|
62
|
+
/**
|
|
63
|
+
* Image elements
|
|
64
|
+
*/
|
|
65
|
+
children: ReactNode;
|
|
66
|
+
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -344,6 +344,10 @@ export interface ISponsorLogoProps {
|
|
|
344
344
|
* Color for the background of the logo
|
|
345
345
|
*/
|
|
346
346
|
colorBackground?: string;
|
|
347
|
+
/**
|
|
348
|
+
* Alternative text for the logo (used for accessibility)
|
|
349
|
+
*/
|
|
350
|
+
alt?: string;
|
|
347
351
|
}
|
|
348
352
|
export interface ISponsorshipProps {
|
|
349
353
|
/**
|
|
@@ -13,11 +13,6 @@ export interface IGenericTypographyProps {
|
|
|
13
13
|
export interface IHarmonicHeaderProps extends IGenericTypographyProps {
|
|
14
14
|
hierarchy: 'h1' | 'h2' | 'h3';
|
|
15
15
|
}
|
|
16
|
-
export interface IAltHeaderHarmonicProps extends IGenericTypographyProps {
|
|
17
|
-
text1: string;
|
|
18
|
-
text2?: string;
|
|
19
|
-
text3?: string;
|
|
20
|
-
}
|
|
21
16
|
export declare type TypographyLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
22
17
|
export declare type AltHeaderLevel = 3 | 4 | 5 | 6;
|
|
23
18
|
export declare type BodyLevel = 1 | 2 | 3;
|
|
@@ -40,7 +35,7 @@ export interface ITypographyWrapperProps extends StyledProps<IStyledTypographyPr
|
|
|
40
35
|
}
|
|
41
36
|
interface IGenericTypography {
|
|
42
37
|
/**
|
|
43
|
-
*
|
|
38
|
+
* Text or HTML content to wrap in a styled tag.
|
|
44
39
|
*/
|
|
45
40
|
children: ReactNode;
|
|
46
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royaloperahouse/harmonic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"author": "Royal Opera House",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -143,4 +143,4 @@
|
|
|
143
143
|
"npx prettier src --write --uncommitted"
|
|
144
144
|
]
|
|
145
145
|
}
|
|
146
|
-
}
|
|
146
|
+
}
|