@royaloperahouse/harmonic 0.1.9-a → 0.2.0
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/README.GIT +278 -0
- package/README.md +43 -252
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/utils.d.ts +7 -0
- package/dist/components/atoms/Buttons/Primary/utils.d.ts +2 -0
- package/dist/components/atoms/Buttons/Secondary/utils.d.ts +2 -1
- package/dist/components/atoms/Buttons/Tertiary/utils.d.ts +1 -1
- package/dist/components/atoms/SponsorLogo/SponsorLogo.d.ts +1 -1
- package/dist/components/atoms/SponsorLogo/SponsorLogo.style.d.ts +1 -2
- package/dist/components/index.d.ts +4 -4
- package/dist/components/molecules/AnnouncementBanner/AnnouncementBanner.style.d.ts +1 -1
- package/dist/components/molecules/Card/Card.style.d.ts +1 -1
- package/dist/components/molecules/Information/Information.style.d.ts +3 -12
- package/dist/components/molecules/Information/utils.d.ts +11 -0
- package/dist/components/molecules/PageHeading/Promo/Promo.d.ts +5 -0
- package/dist/components/molecules/PageHeading/Promo/Promo.style.d.ts +28 -0
- package/dist/components/molecules/PageHeading/Promo/components/Badge.d.ts +10 -0
- package/dist/components/molecules/PageHeading/Promo/components/Button.d.ts +10 -0
- package/dist/components/molecules/PageHeading/Promo/components/Image.d.ts +4 -0
- package/dist/components/molecules/PageHeading/Promo/index.d.ts +2 -0
- package/dist/components/molecules/PageHeading/index.d.ts +2 -1
- package/dist/components/molecules/Swipe/Swipe.d.ts +13 -0
- package/dist/components/molecules/Swipe/Swipe.style.d.ts +8 -0
- package/dist/components/molecules/Swipe/helper.d.ts +2 -0
- package/dist/components/molecules/Swipe/index.d.ts +2 -0
- package/dist/components/molecules/index.d.ts +2 -2
- package/dist/components/organisms/Carousels/Carousel/Carousel.d.ts +4 -0
- package/dist/components/organisms/Carousels/Carousel/Carousel.style.d.ts +11 -0
- package/dist/components/organisms/Carousels/Carousel/helper.d.ts +26 -0
- package/dist/components/organisms/Carousels/Carousel/index.d.ts +2 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCarousel.d.ts +4 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCarousel.style.d.ts +21 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCinema.d.ts +4 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCore.d.ts +4 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsStream.d.ts +4 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/components/Buttons.d.ts +5 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/components/InfoSection.d.ts +10 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/components/SwipeCarousel.d.ts +12 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/helper.d.ts +291 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/index.d.ts +5 -0
- package/dist/components/organisms/Carousels/MinimalCarousel/MinimalCarousel.d.ts +4 -0
- package/dist/components/organisms/Carousels/MinimalCarousel/MinimalCarousel.style.d.ts +4 -0
- package/dist/components/organisms/Carousels/MinimalCarousel/index.d.ts +2 -0
- package/dist/components/organisms/Footer/Footer.style.d.ts +0 -1
- package/dist/components/organisms/index.d.ts +4 -1
- package/dist/harmonic.cjs.development.css +71 -31
- package/dist/harmonic.cjs.development.js +2145 -751
- 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 +2150 -766
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/types/buttonTypes.d.ts +6 -2
- package/dist/types/card.d.ts +2 -2
- package/dist/types/carousel.d.ts +68 -9
- package/dist/types/editorial.d.ts +15 -3
- package/dist/types/image.d.ts +9 -3
- package/dist/types/impactHeader.d.ts +52 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/information.d.ts +18 -41
- package/dist/types/progress.d.ts +4 -0
- package/dist/types/types.d.ts +5 -9
- package/dist/types/typography.d.ts +11 -5
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, CinemaBadge, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, Table, TabLink, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, SignUpForm } from './components';
|
|
1
|
+
import { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, Carousel, CinemaBadge, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Navigation, MinimalCarousel, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingPromo, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, Table, TabLink, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, SignUpForm } from './components';
|
|
2
2
|
import { devices, breakpoints } from './styles/viewports';
|
|
3
3
|
import zIndexes from './styles/zIndexes';
|
|
4
|
-
import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, IntegratedTimerProps, ITimerProps, TickboxMode, ThemeType, EditorialLink, IInformationTitleProps, IInformationCTAProps
|
|
4
|
+
import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, IntegratedTimerProps, ITimerProps, TickboxMode, ThemeColor, ThemeType, EditorialLink, IInformationTitleProps, IInformationCTAProps } from './types';
|
|
5
5
|
import { MiniCard } from './components/molecules';
|
|
6
6
|
import { ModalWindow } from './components/organisms';
|
|
7
7
|
import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButton';
|
|
8
8
|
import HarmonicThemeProvider from './styles/HarmonicThemeProvider';
|
|
9
|
-
|
|
9
|
+
import { HarmonicSizes } from './types/typography';
|
|
10
|
+
import type { HarmonicSize } from './types/typography';
|
|
11
|
+
export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, Carousel, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, HarmonicSize, HarmonicSizes, HarmonicThemeProvider, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, IInformationCTAProps, IInformationTitleProps, ITimerProps, IntegratedTimerProps, MinimalCarousel, MiniCard, ModalWindow, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingPromo, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, Table, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, TextOnly, ThemeColor, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, SignUpForm, };
|
|
@@ -29,13 +29,17 @@ declare type StyleProps = {
|
|
|
29
29
|
backgroundColor?: ThemeColor;
|
|
30
30
|
/** Border color from theme */
|
|
31
31
|
borderColor?: ThemeColor;
|
|
32
|
+
/** Hovered color from theme */
|
|
33
|
+
hoveredColor?: ThemeColor;
|
|
34
|
+
/** Pressed element color from theme */
|
|
35
|
+
pressedColor?: ThemeColor;
|
|
32
36
|
/** Disabled state */
|
|
33
37
|
disabled?: boolean;
|
|
34
38
|
};
|
|
35
39
|
export declare type ButtonProps = BaseProps & IconProps & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
36
40
|
export declare type AuxiliaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'backgroundColor'>;
|
|
37
|
-
export declare type PrimaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'backgroundColor' | 'disabled'>;
|
|
38
|
-
export declare type SecondaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'borderColor' | 'disabled'>;
|
|
41
|
+
export declare type PrimaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'backgroundColor' | 'hoveredColor' | 'pressedColor' | 'disabled'>;
|
|
42
|
+
export declare type SecondaryButtonProps = ButtonProps & Pick<StyleProps, 'textColor' | 'borderColor' | 'hoveredColor' | 'pressedColor' | 'disabled'>;
|
|
39
43
|
export declare type TertiaryButtonProps = BaseProps & AnchorHTMLAttributes<HTMLAnchorElement> & Pick<StyleProps, 'textColor' | 'disabled'>;
|
|
40
44
|
export declare type RotatorButtonsProps = {
|
|
41
45
|
/** Enable/disable prev button */
|
package/dist/types/card.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyledProps } from 'styled-components';
|
|
2
|
-
import { Colors, EditorialLink, IconNameType } from '.';
|
|
2
|
+
import { Colors, EditorialLink, IconNameType, ThemeColor } from '.';
|
|
3
3
|
import { PromoLinks } from './editorial';
|
|
4
4
|
import { DirectionType } from './iconTypes';
|
|
5
5
|
export interface CardLabelProps {
|
|
@@ -80,7 +80,7 @@ export interface ICardProps {
|
|
|
80
80
|
/**
|
|
81
81
|
* Defines the color for a line that appears on hover
|
|
82
82
|
*/
|
|
83
|
-
hoverLineColor?:
|
|
83
|
+
hoverLineColor?: ThemeColor;
|
|
84
84
|
/**
|
|
85
85
|
* A callback to be called when the
|
|
86
86
|
*/
|
package/dist/types/carousel.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ImgHTMLAttributes, ReactElement } from 'react';
|
|
2
2
|
import { ICardProps } from './card';
|
|
3
|
-
import { EditorialLink } from './editorial';
|
|
4
3
|
import { IImageWithCaptionProps } from './image';
|
|
5
4
|
import { IntegratedTimerProps } from './timer';
|
|
6
5
|
import { ILogosProps } from './types';
|
|
6
|
+
import { EditorialLink } from './editorial';
|
|
7
|
+
import { TypographyLevel } from './typography';
|
|
7
8
|
export declare enum CarouselType {
|
|
8
9
|
Image = "image",
|
|
9
10
|
SmallCard = "SmallCard",
|
|
@@ -14,6 +15,10 @@ export interface ICarouselProps {
|
|
|
14
15
|
* Carousel title
|
|
15
16
|
*/
|
|
16
17
|
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Carousel description
|
|
20
|
+
*/
|
|
21
|
+
description?: string;
|
|
17
22
|
/**
|
|
18
23
|
* Carousel type.
|
|
19
24
|
*/
|
|
@@ -34,12 +39,20 @@ export interface ICarouselProps {
|
|
|
34
39
|
* Defines if there should be offset added at the beginning of the container. True by default;
|
|
35
40
|
*/
|
|
36
41
|
useOffset?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface ICarouselWrapperProps {
|
|
39
42
|
/**
|
|
40
|
-
*
|
|
43
|
+
* Semantic level of the title
|
|
44
|
+
*/
|
|
45
|
+
titleSemanticLevel?: TypographyLevel;
|
|
46
|
+
/**
|
|
47
|
+
* Sets infinite mode ON/OFF
|
|
41
48
|
*/
|
|
42
|
-
|
|
49
|
+
infinite?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* CSS class name
|
|
52
|
+
*/
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ICarouselWrapperProps {
|
|
43
56
|
/**
|
|
44
57
|
* Carousel type.
|
|
45
58
|
*/
|
|
@@ -60,10 +73,38 @@ export interface ICarouselWrapperProps {
|
|
|
60
73
|
* Sets overflow to swiper when specified
|
|
61
74
|
*/
|
|
62
75
|
overflow?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Carousel activation indicator
|
|
78
|
+
*/
|
|
79
|
+
isActive?: boolean;
|
|
63
80
|
}
|
|
64
81
|
export declare type HighlightsCarouselSlideImage = ImgHTMLAttributes<HTMLImageElement> & {
|
|
65
82
|
key: string;
|
|
66
83
|
};
|
|
84
|
+
interface SlideVideo {
|
|
85
|
+
desktop: string;
|
|
86
|
+
mobile: string;
|
|
87
|
+
}
|
|
88
|
+
interface SlidePoster {
|
|
89
|
+
desktop: string;
|
|
90
|
+
mobile: string;
|
|
91
|
+
altText: string;
|
|
92
|
+
}
|
|
93
|
+
export interface HighlightsCarouselSlideVideo {
|
|
94
|
+
video: SlideVideo;
|
|
95
|
+
poster: SlidePoster;
|
|
96
|
+
key: string;
|
|
97
|
+
autoPlay: boolean;
|
|
98
|
+
muted: boolean;
|
|
99
|
+
soundControl: boolean;
|
|
100
|
+
fullScreenOption: boolean;
|
|
101
|
+
loop: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface HighlightsCarouselVideoSlideProps {
|
|
104
|
+
index: number;
|
|
105
|
+
isCurrentSlide: boolean;
|
|
106
|
+
settings: HighlightsCarouselSlideVideo;
|
|
107
|
+
}
|
|
67
108
|
export declare type HighlightsCarouselSlide = {
|
|
68
109
|
/**
|
|
69
110
|
* heder in info section
|
|
@@ -90,13 +131,17 @@ export declare type HighlightsCarouselSlide = {
|
|
|
90
131
|
*/
|
|
91
132
|
links: EditorialLink[];
|
|
92
133
|
/**
|
|
93
|
-
* Slide
|
|
134
|
+
* Slide media
|
|
94
135
|
*/
|
|
95
|
-
|
|
136
|
+
mediaContent: HighlightsCarouselSlideImage | HighlightsCarouselSlideVideo;
|
|
96
137
|
/**
|
|
97
138
|
* Params for Timer component
|
|
98
139
|
*/
|
|
99
140
|
timerParams?: IntegratedTimerProps;
|
|
141
|
+
/**
|
|
142
|
+
* Renders an auxiliary button when passed
|
|
143
|
+
*/
|
|
144
|
+
auxiliaryCTA?: EditorialLink;
|
|
100
145
|
};
|
|
101
146
|
export interface IHighlightsCarouselProps {
|
|
102
147
|
/**
|
|
@@ -111,9 +156,16 @@ export interface IHighlightsCarouselProps {
|
|
|
111
156
|
* slides to be displayed in the carousel
|
|
112
157
|
*/
|
|
113
158
|
slides: HighlightsCarouselSlide[];
|
|
159
|
+
/**
|
|
160
|
+
* Semantic level of the title
|
|
161
|
+
*/
|
|
162
|
+
titleSemanticLevel?: TypographyLevel;
|
|
163
|
+
/**
|
|
164
|
+
* Additional CSS class names to apply to the navigation component.
|
|
165
|
+
*/
|
|
166
|
+
className?: string;
|
|
114
167
|
}
|
|
115
|
-
export
|
|
116
|
-
}
|
|
168
|
+
export declare type IHighlightsCoreCarouselProps = Omit<IHighlightsCarouselProps, 'logo'>;
|
|
117
169
|
export interface IHighlightsCinemaCarouselProps extends Omit<IHighlightsCarouselProps, 'logo'> {
|
|
118
170
|
/**
|
|
119
171
|
* Renders logo or not
|
|
@@ -126,3 +178,10 @@ export interface IHighlightsStreamCarouselProps extends Omit<IHighlightsCarousel
|
|
|
126
178
|
*/
|
|
127
179
|
logo: boolean;
|
|
128
180
|
}
|
|
181
|
+
export interface IMinimalCarouselProps {
|
|
182
|
+
/**
|
|
183
|
+
* Carousel children (only Card and ImageAspectRatioWrapper children are allowed).
|
|
184
|
+
*/
|
|
185
|
+
children: ReactElement[];
|
|
186
|
+
}
|
|
187
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { AnchorHTMLAttributes, ImgHTMLAttributes, MouseEventHandler, ReactElemen
|
|
|
2
2
|
import { StyledProps } from 'styled-components';
|
|
3
3
|
import { ButtonType } from './buttonTypes';
|
|
4
4
|
import { DirectionType, IconNameType } from './iconTypes';
|
|
5
|
-
import { Colors, IVideoWithControlsSettings } from './types';
|
|
5
|
+
import { Colors, IVideoWithControlsSettings, ThemeColor } from './types';
|
|
6
6
|
import { TypographyLevel } from './typography';
|
|
7
7
|
export interface IEditorialProps {
|
|
8
8
|
/**
|
|
@@ -68,11 +68,23 @@ export declare type EditorialLink = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
68
68
|
/**
|
|
69
69
|
* Color of text and icon
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
textColor?: ThemeColor;
|
|
72
72
|
/**
|
|
73
73
|
* background color
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
backgroundColor?: ThemeColor;
|
|
76
|
+
/**
|
|
77
|
+
* Border color
|
|
78
|
+
*/
|
|
79
|
+
borderColor?: ThemeColor;
|
|
80
|
+
/**
|
|
81
|
+
* Hovered color
|
|
82
|
+
*/
|
|
83
|
+
hoveredColor?: ThemeColor;
|
|
84
|
+
/**
|
|
85
|
+
* Pressed color
|
|
86
|
+
*/
|
|
87
|
+
pressedColor?: ThemeColor;
|
|
76
88
|
/**
|
|
77
89
|
* type of the button to be rendered; When not passed the Primary and Tetriary are displayed by default;
|
|
78
90
|
*/
|
package/dist/types/image.d.ts
CHANGED
|
@@ -5,21 +5,27 @@ export declare enum AspectRatio {
|
|
|
5
5
|
'3:4' = "3 / 4",
|
|
6
6
|
'4:3' = "4 / 3",
|
|
7
7
|
'8:3' = "8 / 3",
|
|
8
|
-
'16:9' = "16 / 9"
|
|
8
|
+
'16:9' = "16 / 9",
|
|
9
|
+
'90:17' = "90 / 17",
|
|
10
|
+
'75:32' = "75 / 32"
|
|
9
11
|
}
|
|
10
12
|
export declare enum AspectRatioLegacy {
|
|
11
13
|
'1 / 1' = "100",
|
|
12
14
|
'3 / 4' = "133",
|
|
13
15
|
'4 / 3' = "75",
|
|
14
16
|
'8 / 3' = "37.5",
|
|
15
|
-
'16 / 9' = "56.25"
|
|
17
|
+
'16 / 9' = "56.25",
|
|
18
|
+
'90 / 17' = "18.88",
|
|
19
|
+
'75 / 32' = "15"
|
|
16
20
|
}
|
|
17
21
|
export declare enum AspectRatioWidth {
|
|
18
22
|
'1 / 1' = "1",
|
|
19
23
|
'3 / 4' = "0.75",
|
|
20
24
|
'4 / 3' = "1.33",
|
|
21
25
|
'8 / 3' = "2.67",
|
|
22
|
-
'16 / 9' = "1.78"
|
|
26
|
+
'16 / 9' = "1.78",
|
|
27
|
+
'90 / 17' = "5.29",
|
|
28
|
+
'75 / 32' = "2.34"
|
|
23
29
|
}
|
|
24
30
|
export interface IImageAspectRatioWrapperProps {
|
|
25
31
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { EditorialLink } from '../types';
|
|
3
|
-
import { TypographyLevel } from './typography';
|
|
3
|
+
import { HeaderHierarchy, TypographyLevel } from './typography';
|
|
4
4
|
export interface CustomSponsorImageData {
|
|
5
5
|
/**
|
|
6
6
|
* Source URL for Sponsorship logo
|
|
@@ -133,3 +133,54 @@ export interface IPageHeadingCompactProps {
|
|
|
133
133
|
*/
|
|
134
134
|
semanticLevel?: TypographyLevel;
|
|
135
135
|
}
|
|
136
|
+
export declare type PageHeadingPromoImageProps = {
|
|
137
|
+
/**
|
|
138
|
+
* Image url for desktops
|
|
139
|
+
*/
|
|
140
|
+
desktop: string;
|
|
141
|
+
/**
|
|
142
|
+
* Image url for devices
|
|
143
|
+
*/
|
|
144
|
+
mobile: string;
|
|
145
|
+
/**
|
|
146
|
+
* Alt text for the main image
|
|
147
|
+
*/
|
|
148
|
+
alt: string;
|
|
149
|
+
};
|
|
150
|
+
export declare enum PageHeadingPromoBadge {
|
|
151
|
+
Stream = "Stream",
|
|
152
|
+
Cinema = "Cinema"
|
|
153
|
+
}
|
|
154
|
+
export declare type PageHeadingPromoAdditionalLink = EditorialLink & {
|
|
155
|
+
isTextLink?: boolean;
|
|
156
|
+
};
|
|
157
|
+
export interface IPageHeadingPromoProps {
|
|
158
|
+
/**
|
|
159
|
+
* Title text
|
|
160
|
+
*/
|
|
161
|
+
title?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Semantic level of the header
|
|
164
|
+
*/
|
|
165
|
+
titleSemanticLevel?: HeaderHierarchy;
|
|
166
|
+
/**
|
|
167
|
+
* Boolean to show/hide sponsorship logo (default true)
|
|
168
|
+
*/
|
|
169
|
+
sponsor?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Link placed in the impact component
|
|
172
|
+
*/
|
|
173
|
+
mainLink?: EditorialLink;
|
|
174
|
+
/**
|
|
175
|
+
* Link placed in the impact component
|
|
176
|
+
*/
|
|
177
|
+
additionalLink?: PageHeadingPromoAdditionalLink;
|
|
178
|
+
/**
|
|
179
|
+
* Heading image
|
|
180
|
+
*/
|
|
181
|
+
image: PageHeadingPromoImageProps;
|
|
182
|
+
/**
|
|
183
|
+
* Badge variant
|
|
184
|
+
*/
|
|
185
|
+
badge?: PageHeadingPromoBadge;
|
|
186
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FooterData } from './footer';
|
|
2
|
-
import { Colors, ThemeType } from './types';
|
|
2
|
+
import { Colors, ThemeType, ThemeColor } from './types';
|
|
3
3
|
import { INavigationProps, INavTopProps } from './navigation';
|
|
4
4
|
import { CarouselType } from './carousel';
|
|
5
5
|
import { IconNameType } from './iconTypes';
|
|
@@ -11,6 +11,6 @@ import { IPageHeadingCompactProps } from './impactHeader';
|
|
|
11
11
|
import { IntegratedTimerProps, ITimerProps } from './timer';
|
|
12
12
|
import { ICreditListing } from './creditListing';
|
|
13
13
|
import { ModalWindowProps } from './modalWindow';
|
|
14
|
-
import { IInformationTitleProps, IInformationCTAProps
|
|
15
|
-
export { AspectRatio, ButtonType, CarouselType, Colors, EditorialLink, IconNameType, ICreditListing, IPageHeadingCompactProps, INavigationProps, INavTopProps, IntegratedTimerProps, ITimerProps, ModalWindowProps, TickboxMode, ThemeType, IInformationTitleProps, IInformationCTAProps,
|
|
14
|
+
import { IInformationTitleProps, IInformationCTAProps } from './information';
|
|
15
|
+
export { AspectRatio, ButtonType, CarouselType, Colors, EditorialLink, IconNameType, ICreditListing, IPageHeadingCompactProps, INavigationProps, INavTopProps, IntegratedTimerProps, ITimerProps, ModalWindowProps, TickboxMode, ThemeColor, ThemeType, IInformationTitleProps, IInformationCTAProps, };
|
|
16
16
|
export type { FooterData };
|
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
import { DirectionType, IconNameType } from './iconTypes';
|
|
2
2
|
import { LinkTarget } from './types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare enum IInformationTitleVariant {
|
|
15
|
-
Header = "Header",
|
|
16
|
-
AltHeader = "AltHeader"
|
|
17
|
-
}
|
|
18
|
-
export declare enum IInformationBackgroundColour {
|
|
19
|
-
Cinema = "cinema",
|
|
20
|
-
Core = "core",
|
|
21
|
-
Stream = "stream",
|
|
22
|
-
White = "white"
|
|
23
|
-
}
|
|
24
|
-
export declare type TitleTextSize = 3 | 4 | 5 | 6;
|
|
25
|
-
export interface IInformationCTAProps {
|
|
3
|
+
import type { ThemeChildProps } from './types';
|
|
4
|
+
import type { HarmonicSize } from './typography';
|
|
5
|
+
export declare const InformationCtaVariants: {
|
|
6
|
+
readonly Primary: "Primary";
|
|
7
|
+
readonly Secondary: "Secondary";
|
|
8
|
+
readonly Tertiary: "Tertiary";
|
|
9
|
+
readonly TextLink: "TextLink";
|
|
10
|
+
};
|
|
11
|
+
export declare type InformationCtaVariant = keyof typeof InformationCtaVariants;
|
|
12
|
+
declare type ThemeProps = Pick<ThemeChildProps, 'theme'>;
|
|
13
|
+
export interface IInformationCTAProps extends ThemeProps {
|
|
26
14
|
/**
|
|
27
15
|
* Text to display on the CTA
|
|
28
16
|
*/
|
|
@@ -32,14 +20,9 @@ export interface IInformationCTAProps {
|
|
|
32
20
|
*/
|
|
33
21
|
link: string;
|
|
34
22
|
/**
|
|
35
|
-
* Style of the CTA
|
|
36
|
-
* or "Tertiary" (text only)
|
|
37
|
-
*/
|
|
38
|
-
variant?: IInformationCtaVariant;
|
|
39
|
-
/**
|
|
40
|
-
* Flag to decide whether to adjust the CTA colours for display on coloured backgrounds
|
|
23
|
+
* Style of the CTA
|
|
41
24
|
*/
|
|
42
|
-
|
|
25
|
+
variant?: InformationCtaVariant;
|
|
43
26
|
/**
|
|
44
27
|
* Name of the icon to be used in the button
|
|
45
28
|
*/
|
|
@@ -53,21 +36,18 @@ export interface IInformationCTAProps {
|
|
|
53
36
|
*/
|
|
54
37
|
target?: LinkTarget;
|
|
55
38
|
}
|
|
39
|
+
export declare type InformationCTAWrapperProps = Pick<IInformationCTAProps, 'variant' | 'theme'>;
|
|
56
40
|
export interface IInformationTitleProps {
|
|
57
41
|
/**
|
|
58
42
|
* Title text to display
|
|
59
43
|
*/
|
|
60
44
|
text: string;
|
|
61
|
-
/**
|
|
62
|
-
* Title typography type. Choices are Heading or AltHeader
|
|
63
|
-
*/
|
|
64
|
-
variant: IInformationTitleVariant;
|
|
65
45
|
/**
|
|
66
46
|
* The size of the title text
|
|
67
47
|
*/
|
|
68
|
-
textSize:
|
|
48
|
+
textSize: HarmonicSize;
|
|
69
49
|
}
|
|
70
|
-
export interface IInformationProps {
|
|
50
|
+
export interface IInformationProps extends ThemeProps {
|
|
71
51
|
/**
|
|
72
52
|
* Main body text to display in the Information Component
|
|
73
53
|
*/
|
|
@@ -79,13 +59,10 @@ export interface IInformationProps {
|
|
|
79
59
|
/**
|
|
80
60
|
* Title options for the component
|
|
81
61
|
*/
|
|
82
|
-
title
|
|
83
|
-
/**
|
|
84
|
-
* Background Colour. Choices: None, Core, Cinema, Stream
|
|
85
|
-
*/
|
|
86
|
-
background?: IInformationBackgroundColour;
|
|
62
|
+
title?: IInformationTitleProps;
|
|
87
63
|
/**
|
|
88
64
|
* Additional CSS class names to apply to component.
|
|
89
65
|
*/
|
|
90
66
|
className?: string;
|
|
91
67
|
}
|
|
68
|
+
export {};
|
package/dist/types/progress.d.ts
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ export declare enum ThemeType {
|
|
|
52
52
|
Cinema = "cinema",
|
|
53
53
|
Schools = "schools"
|
|
54
54
|
}
|
|
55
|
+
export declare type ThemeChildProps = {
|
|
56
|
+
className?: string;
|
|
57
|
+
theme?: ThemeType;
|
|
58
|
+
};
|
|
55
59
|
export interface IThemeProviderProps {
|
|
56
60
|
/**
|
|
57
61
|
* The theme to use for the child elements
|
|
@@ -372,10 +376,6 @@ export interface IGridItemProps extends StyledProps<any> {
|
|
|
372
376
|
columnSpanSmallDevice?: number;
|
|
373
377
|
}
|
|
374
378
|
export interface ISponsorLogoProps {
|
|
375
|
-
/**
|
|
376
|
-
* The sponsor logo image source
|
|
377
|
-
*/
|
|
378
|
-
children?: ReactNode;
|
|
379
379
|
/**
|
|
380
380
|
* Color for the logo
|
|
381
381
|
*/
|
|
@@ -388,10 +388,6 @@ export interface ISponsorLogoProps {
|
|
|
388
388
|
* Alternative text for the logo (used for accessibility)
|
|
389
389
|
*/
|
|
390
390
|
alt?: string;
|
|
391
|
-
/**
|
|
392
|
-
* S3 Image source
|
|
393
|
-
*/
|
|
394
|
-
imageSource?: string;
|
|
395
391
|
}
|
|
396
392
|
export interface ISponsorshipProps {
|
|
397
393
|
/**
|
|
@@ -432,7 +428,7 @@ export interface ITextLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>
|
|
|
432
428
|
/**
|
|
433
429
|
* Color of text and icon
|
|
434
430
|
*/
|
|
435
|
-
|
|
431
|
+
textColor?: ThemeColor;
|
|
436
432
|
}
|
|
437
433
|
export interface ISectionSplitterProps {
|
|
438
434
|
/**
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyledProps } from 'styled-components';
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export declare const HarmonicSizes: {
|
|
4
|
+
readonly Small: "small";
|
|
5
|
+
readonly Medium: "medium";
|
|
6
|
+
readonly Large: "large";
|
|
7
|
+
};
|
|
8
|
+
export declare type HarmonicSize = (typeof HarmonicSizes)[keyof typeof HarmonicSizes];
|
|
9
|
+
export declare type HarmonicColors = 'primary' | 'black' | 'white' | 'red' | 'grey' | 'inherit';
|
|
10
|
+
export interface IGenericTypographyProps<T extends HTMLElement = HTMLParagraphElement> extends React.HTMLAttributes<T> {
|
|
11
|
+
children?: ReactNode;
|
|
7
12
|
size?: HarmonicSize;
|
|
8
13
|
serif?: boolean;
|
|
9
14
|
color?: HarmonicColors;
|
|
@@ -11,8 +16,9 @@ export interface IGenericTypographyProps {
|
|
|
11
16
|
bold?: boolean;
|
|
12
17
|
className?: string;
|
|
13
18
|
}
|
|
19
|
+
export declare type HeaderHierarchy = 'h1' | 'h2' | 'h3';
|
|
14
20
|
export interface IHarmonicHeaderProps extends IGenericTypographyProps {
|
|
15
|
-
hierarchy:
|
|
21
|
+
hierarchy: HeaderHierarchy;
|
|
16
22
|
}
|
|
17
23
|
export declare type TypographyLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
18
24
|
export declare type AltHeaderLevel = 3 | 4 | 5 | 6;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royaloperahouse/harmonic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"author": "Royal Opera House",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"@types/react-modal": "^3.16.3",
|
|
89
89
|
"@types/react-select": "^5.0.1",
|
|
90
90
|
"@types/react-test-renderer": "^17.0.1",
|
|
91
|
+
"@types/resize-observer-browser": "^0.1.11",
|
|
91
92
|
"@types/styled-components": "5.1.26",
|
|
92
93
|
"@types/testing-library__jest-dom": "^5.9.1",
|
|
93
94
|
"@typescript-eslint/eslint-plugin": "^5.0.0",
|