@royaloperahouse/chord 0.5.8 → 0.6.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.
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { ITickboxProps } from '../../../types/tickbox';
3
+ declare const Tickbox: FunctionComponent<ITickboxProps>;
4
+ export default Tickbox;
@@ -0,0 +1,4 @@
1
+ import { TickboxLabelProps, TickboxInputProps, TickboxCheckmarkProps } from '../../../types/tickbox';
2
+ export declare const TickboxLabel: import("styled-components").StyledComponent<"label", any, TickboxLabelProps, never>;
3
+ export declare const TickboxCheckmark: import("styled-components").StyledComponent<"span", any, TickboxCheckmarkProps, never>;
4
+ export declare const TickboxInput: import("styled-components").StyledComponent<"input", any, TickboxInputProps, never>;
@@ -0,0 +1,2 @@
1
+ import Tickbox from './Tickbox';
2
+ export default Tickbox;
@@ -9,7 +9,8 @@ import SectionSplitter from './SectionSplitter';
9
9
  import ImageAspectRatioWrapper from './ImageAspectRatioWrapper';
10
10
  import Tab from './Tab';
11
11
  import TabLink from './TabLink';
12
+ import Tickbox from './Tickbox';
12
13
  import TypeTags from './TypeTags';
13
14
  import RotatorButtons from './RotatorButtons';
14
15
  import { AltHeader, BodyText, Header, Overline, Subtitle } from './Typography';
15
- export { AltHeader, BodyText, CinemaBadge, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, Overline, PrimaryButton, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SponsorLogo, Sponsorship, StreamBadge, Subtitle, Tab, TabLink, TertiaryButton, TypeTags, };
16
+ export { AltHeader, BodyText, CinemaBadge, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, Overline, PrimaryButton, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SponsorLogo, Sponsorship, StreamBadge, Subtitle, Tab, TabLink, TertiaryButton, Tickbox, TypeTags, };
@@ -1,6 +1,6 @@
1
- import { AltHeader, BodyText, CinemaBadge, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, Overline, PrimaryButton, RotatorButtons, SecondaryButton, SecondaryLogo, TertiaryButton, SectionSplitter, Sponsorship, StreamBadge, Subtitle, TabLink, TypeTags } from './atoms';
2
- import { AnchorTapBar, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Carousel, Footer, Navigation } from './organisms';
1
+ import { AltHeader, BodyText, CinemaBadge, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, Overline, PrimaryButton, RotatorButtons, SecondaryButton, SecondaryLogo, TertiaryButton, SectionSplitter, Sponsorship, StreamBadge, Subtitle, Tab, TabLink, Tickbox, TypeTags } from './atoms';
2
+ import { AnchorTapBar, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Carousel, Footer, Navigation, TitleWithCTA } from './organisms';
3
3
  import { Accordion, Accordions, Card, Cards, Editorial, ImageWithCaption, PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PeopleListing, PromoWithTitle, SectionTitle, Tabs, TextOnly } from './molecules';
4
4
  import ThemeProvider from '../styles/ThemeProvider';
5
5
  import GlobalStyles from '../styles/GlobalStyles';
6
- export { Accordion, Accordions, AltHeader, AnchorTapBar, BodyText, Card, Cards, Carousel, CinemaBadge, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, ImageAspectRatioWrapper, ImageWithCaption, Navigation, Overline, PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PeopleListing, PrimaryButton, PromoWithTitle, RotatorButtons, SecondaryButton, SecondaryLogo, SectionTitle, Sponsorship, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, SectionSplitter, TabLink, Tabs, TypeTags, };
6
+ export { Accordion, Accordions, AltHeader, AnchorTapBar, BodyText, Card, Cards, Carousel, CinemaBadge, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, ImageAspectRatioWrapper, ImageWithCaption, Navigation, Overline, PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PeopleListing, PrimaryButton, PromoWithTitle, RotatorButtons, SecondaryButton, SecondaryLogo, SectionTitle, Sponsorship, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, SectionSplitter, Tab, TabLink, Tabs, Tickbox, TypeTags, };
@@ -1,2 +1,3 @@
1
- export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ import { IImageWithCaptionWrapperProps } from '../../../types/image';
2
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", any, IImageWithCaptionWrapperProps, never>;
2
3
  export declare const CaptionWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,13 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { IAnchorTabsListProps } from '../../../types/navigation';
3
2
  export declare const AnchorTapbarWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const TitleCTAGrid: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const AnchorTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const ButtonsDesktopGridItem: import("styled-components").StyledComponent<"div", any, import("../../../types/types").IGridItemProps, never>;
7
3
  export declare const TabsGrid: import("styled-components").StyledComponent<"div", any, {}, never>;
8
4
  export declare const TabsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
9
5
  export declare const TabsList: import("styled-components").StyledComponent<"ul", any, IAnchorTabsListProps, never>;
10
6
  export declare const ArrowsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
11
7
  export declare const ArrowWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
12
- export declare const ButtonsMobileWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
13
- export declare const PrimaryButtonReverse: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../../../types/buttonTypes").IPrimaryButtonProps>, any, {}, never>;
@@ -6,4 +6,5 @@ export declare const NavigationGridMobile: import("styled-components").StyledCom
6
6
  export declare const LogoContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
7
7
  export declare const MenuContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
8
8
  export declare const NavContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
9
+ export declare const NavContainerGridItem: import("styled-components").StyledComponent<"div", any, import("../../../types/types").IGridItemProps, never>;
9
10
  export declare const NavTopContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { ITitleCTAProps } from '../../../types/navigation';
3
+ declare const TitleWithCTA: FunctionComponent<ITitleCTAProps>;
4
+ export default TitleWithCTA;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { ITitleCTAProps } from '../../../types/navigation';
3
+ export declare const TitleCTAGridWrapper: import("styled-components").StyledComponent<"div", any, ITitleCTAProps, never>;
4
+ export declare const CTAGridWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const AnchorTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const ButtonsDesktopGridItem: import("styled-components").StyledComponent<"div", any, import("../../../types/types").IGridItemProps, never>;
7
+ export declare const ButtonsMobileWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const PrimaryButtonReverse: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../../../types/buttonTypes").IPrimaryButtonProps>, any, {}, never>;
@@ -0,0 +1,2 @@
1
+ import TitleWithCTA from './TitleWithCTA';
2
+ export default TitleWithCTA;
@@ -3,4 +3,5 @@ import Footer from './Footer';
3
3
  import AnchorTapBar from './AnchorTapBar';
4
4
  import Carousel from './Carousel';
5
5
  import { HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream } from './HighlightsCarousel';
6
- export { AnchorTapBar, Carousel, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Navigation, Footer, };
6
+ import TitleWithCTA from './TitleWithCTA';
7
+ export { AnchorTapBar, Carousel, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Navigation, Footer, TitleWithCTA, };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Accordion, Accordions, AltHeader, AnchorTapBar, BodyText, Card, Cards, Carousel, CinemaBadge, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, ImageAspectRatioWrapper, ImageWithCaption, Navigation, Overline, PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PeopleListing, PrimaryButton, PromoWithTitle, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Sponsorship, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TabLink, Tabs, TypeTags } from './components';
1
+ import { Accordion, Accordions, AltHeader, AnchorTapBar, BodyText, Card, Cards, Carousel, CinemaBadge, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, ImageAspectRatioWrapper, ImageWithCaption, Navigation, Overline, PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PeopleListing, PrimaryButton, PromoWithTitle, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Sponsorship, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, TabLink, Tabs, Tickbox, TypeTags } from './components';
2
2
  import { devices } from './styles/viewports';
3
- import { AspectRatio, CarouselType, Colors, IconNameType, ThemeType } from './types';
4
- export { Accordion, Accordions, AltHeader, AnchorTapBar, AspectRatio, BodyText, Card, Cards, Carousel, CarouselType, CinemaBadge, Colors, devices, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Navigation, Overline, PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PeopleListing, PrimaryButton, PromoWithTitle, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Sponsorship, StreamBadge, Subtitle, TabLink, Tabs, TertiaryButton, TextOnly, ThemeProvider, ThemeType, TypeTags, };
3
+ import { AspectRatio, CarouselType, Colors, IconNameType, TickboxMode, ThemeType } from './types';
4
+ export { Accordion, Accordions, AltHeader, AnchorTapBar, AspectRatio, BodyText, Card, Cards, Carousel, CarouselType, CinemaBadge, Colors, devices, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Navigation, Overline, PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PeopleListing, PrimaryButton, PromoWithTitle, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Sponsorship, StreamBadge, Subtitle, Tab, TabLink, Tabs, TertiaryButton, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, TickboxMode, TypeTags, };
@@ -1,10 +1,23 @@
1
1
  import { ReactElement } from 'react';
2
+ import { StyledProps } from 'styled-components';
2
3
  export declare enum AspectRatio {
3
4
  '1:1' = "1 / 1",
4
5
  '3:4' = "3 / 4",
5
6
  '4:3' = "4 / 3",
6
7
  '16:9' = "16 / 9"
7
8
  }
9
+ export declare enum AspectRatioLegacy {
10
+ '1 / 1' = "100",
11
+ '3 / 4' = "133",
12
+ '4 / 3' = "75",
13
+ '16 / 9' = "56.25"
14
+ }
15
+ export declare enum AspectRatioWidth {
16
+ '1 / 1' = "1",
17
+ '3 / 4' = "0.75",
18
+ '4 / 3' = "1.33",
19
+ '16 / 9' = "1.78"
20
+ }
8
21
  export interface IImageAspectRatioWrapperProps {
9
22
  /**
10
23
  * Aspect ratio of the contained image
@@ -25,3 +38,13 @@ export interface IImageWithCaptionProps {
25
38
  */
26
39
  children: ReactElement<HTMLImageElement>;
27
40
  }
41
+ export interface IImageWithCaptionWrapperProps extends StyledProps<any> {
42
+ /**
43
+ * Aspect ratio of the contained image
44
+ */
45
+ aspectRatio?: AspectRatio;
46
+ /**
47
+ * Height of the wrapper
48
+ */
49
+ height: number;
50
+ }
@@ -4,4 +4,5 @@ import { INavigationProps, INavTopProps } from './navigation';
4
4
  import { CarouselType } from './carousel';
5
5
  import { IconNameType } from './iconTypes';
6
6
  import { AspectRatio } from './image';
7
- export { AspectRatio, CarouselType, Colors, FooterData, IconNameType, INavigationProps, INavTopProps, ThemeType };
7
+ import { TickboxMode } from './tickbox';
8
+ export { AspectRatio, CarouselType, Colors, FooterData, IconNameType, INavigationProps, INavTopProps, TickboxMode, ThemeType, };
@@ -167,7 +167,7 @@ export interface ISearchBarProps {
167
167
  */
168
168
  onClose: () => void;
169
169
  }
170
- export declare type AnchorBarLink = AnchorHTMLAttributes<HTMLAnchorElement> & {
170
+ export declare type TitleCTALink = AnchorHTMLAttributes<HTMLAnchorElement> & {
171
171
  /**
172
172
  * Text inside the link
173
173
  */
@@ -189,7 +189,7 @@ export declare type AnchorBarLink = AnchorHTMLAttributes<HTMLAnchorElement> & {
189
189
  */
190
190
  color?: Colors;
191
191
  };
192
- export declare type AnchorBarLinks = [AnchorBarLink, AnchorBarLink?];
192
+ export declare type TitleCTALinks = [TitleCTALink, TitleCTALink?];
193
193
  export declare type AnchorBarTab = AnchorHTMLAttributes<HTMLAnchorElement> & {
194
194
  /**
195
195
  * Visible text in a tab
@@ -205,18 +205,10 @@ export declare type AnchorBarTab = AnchorHTMLAttributes<HTMLAnchorElement> & {
205
205
  color?: Colors;
206
206
  };
207
207
  export interface IAnchorBarProps {
208
- /**
209
- * Text placed in the anchor bar component
210
- */
211
- title?: string;
212
208
  /**
213
209
  * Tabs displayed in the anchor bar
214
210
  */
215
211
  tabs: AnchorBarTab[];
216
- /**
217
- * Array of buttons props. First one should have PrimaryButton attributes, second one Tertiary button attributes
218
- */
219
- links?: AnchorBarLinks;
220
212
  /**
221
213
  * Function to be called when a tab is clicked
222
214
  */
@@ -226,6 +218,20 @@ export interface IAnchorBarProps {
226
218
  */
227
219
  activeTab?: string;
228
220
  }
221
+ export interface ITitleCTAProps {
222
+ /**
223
+ * Array of buttons props. First one should have PrimaryButton attributes, second one Tertiary button attributes
224
+ */
225
+ links?: TitleCTALinks;
226
+ /**
227
+ * Text placed in the anchor bar component
228
+ */
229
+ title?: string;
230
+ /**
231
+ * Boolean to determine if is sticky
232
+ */
233
+ sticky?: boolean;
234
+ }
229
235
  export interface IAnchorTabsListProps {
230
236
  /**
231
237
  * Boolean to determine that the list tab is overflowed
@@ -0,0 +1,40 @@
1
+ export declare enum TickboxMode {
2
+ Dark = "dark",
3
+ Light = "light"
4
+ }
5
+ export interface ITickboxProps {
6
+ /**
7
+ * The text of tickbox
8
+ */
9
+ children: string;
10
+ /**
11
+ * Tickbox is checked or not initially
12
+ */
13
+ checked?: boolean;
14
+ /**
15
+ * Mode to determine colors of text and checkmark
16
+ */
17
+ mode?: TickboxMode;
18
+ /**
19
+ * Callback called when tickbox change
20
+ */
21
+ onChange?: (checked: boolean) => void;
22
+ }
23
+ export interface TickboxLabelProps {
24
+ /**
25
+ * Dark mode or not
26
+ */
27
+ dark: boolean;
28
+ }
29
+ export interface TickboxInputProps {
30
+ /**
31
+ * Dark mode or not
32
+ */
33
+ dark: boolean;
34
+ }
35
+ export interface TickboxCheckmarkProps {
36
+ /**
37
+ * Dark mode or not
38
+ */
39
+ dark: boolean;
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/chord",
3
- "version": "0.5.8",
3
+ "version": "0.6.0",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",