@royaloperahouse/chord 2.7.0-a-development → 2.7.0-c-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.
@@ -1,6 +1,6 @@
1
- import { AltHeader, BodyText, CinemaBadge, ControlledDropdown, Grid, GridItem, GridItemLegacy, Header, Icon, ImageAspectRatioWrapper, Overline, PrimaryButton, Progress, Radio, Radio2, RotatorButtons, SecondaryButton, SecondaryLogo, TertiaryButton, SectionSplitter, Sponsorship, Stepper, StreamBadge, Subtitle, Tab, TabLink, TextLogo, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, VideoControls, ToggleButton } from './atoms';
2
- import { AnchorTabBar, Footer, LiveChat, Navigation, StickyBar, TitleWithCTA, UpsellSection, FilterToggles } from './organisms';
3
- import { Accordion, Accordions, AnnouncementBanner, AuxiliaryNav, Card, Cards, ContactCard, ContentSummary, CreditListing, Editorial, ImageWithCaption, Information, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, PasswordStrength, Pagination, PeopleListing, PromoWithTags, PromoWithTitle, RadioGroup, RadioGroup2, ReadMore, StatusBanner, SearchBar, SectionTitle, Select, Select2, Select2Async, Table, Tabs, TextOnly, UpsellCard, Quote, VideoWithControls } from './molecules';
1
+ import { AltHeader, BodyText, CinemaBadge, ControlledDropdown, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, Overline, PrimaryButton, Progress, Radio, Radio2, RotatorButtons, SecondaryButton, SecondaryLogo, TertiaryButton, SectionSplitter, Sponsorship, Stepper, StreamBadge, Subtitle, Tab, TabLink, TextLogo, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, VideoControls, ToggleButton } from './atoms';
2
+ import { AnchorTabBar, Footer, Navigation, StickyBar, TitleWithCTA, UpsellSection, FilterToggles } from './organisms';
3
+ import { Accordion, Accordions, AnnouncementBanner, AuxiliaryNav, Card, Cards, ContactCard, ContentSummary, CreditListing, Editorial, ImageWithCaption, Information, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, PasswordStrength, Pagination, PeopleListing, PromoWithTags, PromoWithTitle, RadioGroup, RadioGroup2, ReadMore, StatusBanner, SearchBar, SectionTitle, Select, Select2, Select2Async, Table, Tabs, TextOnly, UpsellCard, Quote, VideoWithControls, SignUpForm } from './molecules';
4
4
  import ThemeProvider from '../styles/ThemeProvider';
5
5
  import GlobalStyles from '../styles/GlobalStyles';
6
- export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, ContactCard, ContentSummary, CinemaBadge, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, GridItemLegacy, 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, SecondaryButton, SecondaryLogo, StatusBanner, SearchBar, SectionTitle, Select, Select2, Select2Async, Sponsorship, Stepper, StickyBar, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, SectionSplitter, Tab, TabLink, Table, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, LiveChat, VideoControls, VideoWithControls, FilterToggles, ToggleButton, };
6
+ export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, ContactCard, ContentSummary, CinemaBadge, 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, SecondaryButton, SecondaryLogo, StatusBanner, SearchBar, SectionTitle, Select, Select2, Select2Async, Sponsorship, Stepper, StickyBar, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, SectionSplitter, Tab, TabLink, Table, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, FilterToggles, ToggleButton, SignUpForm, };
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { ISignUpFormProps } from '../../../types/signUpForm';
3
+ declare const SignUpForm: FunctionComponent<ISignUpFormProps>;
4
+ export default SignUpForm;
@@ -0,0 +1,13 @@
1
+ import { Colors } from '../../../types';
2
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {
3
+ theme: Colors;
4
+ }, never>;
5
+ export declare const SignUpFormWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const SignUpTitleWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const Error: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const Form: import("styled-components").StyledComponent<"form", any, {}, never>;
9
+ export declare const FormFooterWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
10
+ export declare const ServerError: import("styled-components").StyledComponent<"div", any, {}, never>;
11
+ export declare const CTALinkWrapper: import("styled-components").StyledComponent<"a", any, {}, never>;
12
+ export declare const ButtonWrapper: import("styled-components").StyledComponent<"button", any, {}, never>;
13
+ export declare const FieldsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,2 @@
1
+ import SignUpForm from './SignUpForm';
2
+ export default SignUpForm;
@@ -31,4 +31,5 @@ import PasswordStrength from './PasswordStrength';
31
31
  import AuxiliaryNav from './AuxiliaryNav';
32
32
  import Table from './Table';
33
33
  import VideoWithControls from './VideoWithControls';
34
- export { Accordion, Accordions, AnnouncementBanner, AuxiliaryNav, Card, Cards, ContactCard, ContentSummary, CreditListing, Editorial, ImageWithCaption, Information, MiniCard, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, PasswordStrength, Pagination, PeopleListing, PromoWithTags, PromoWithTitle, RadioGroup, RadioGroup2, ReadMore, Quote, StatusBanner, SectionTitle, SearchBar, Select, Select2, Select2Async, Tabs, Table, TextOnly, UpsellCard, VideoWithControls, };
34
+ import SignUpForm from './SignUpForm';
35
+ export { Accordion, Accordions, AnnouncementBanner, AuxiliaryNav, Card, Cards, ContactCard, ContentSummary, CreditListing, Editorial, ImageWithCaption, Information, MiniCard, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, PasswordStrength, Pagination, PeopleListing, PromoWithTags, PromoWithTitle, RadioGroup, RadioGroup2, ReadMore, Quote, StatusBanner, SectionTitle, SearchBar, Select, Select2, Select2Async, Tabs, Table, TextOnly, UpsellCard, VideoWithControls, SignUpForm, };
@@ -3,8 +3,7 @@ import Footer from './Footer';
3
3
  import AnchorTabBar from './AnchorTabBar';
4
4
  import TitleWithCTA from './TitleWithCTA';
5
5
  import UpsellSection from './UpsellSection';
6
- import { LiveChat } from './LiveChat';
7
6
  import StickyBar from './StickyBar';
8
7
  import ModalWindow from './ModalWindow';
9
8
  import FilterToggles from './FilterToggles';
10
- export { AnchorTabBar, Footer, LiveChat, ModalWindow, Navigation, StickyBar, TitleWithCTA, UpsellSection, FilterToggles, };
9
+ export { AnchorTabBar, Footer, ModalWindow, Navigation, StickyBar, TitleWithCTA, UpsellSection, FilterToggles };
@@ -1,2 +1,3 @@
1
1
  export declare const setMaxCharLength: (value: string, maxLength: number) => string;
2
2
  export declare const formatPrice: (value: string | undefined) => string;
3
+ export declare const capitalizeFirstLetter: (string: string) => string;
@@ -0,0 +1,15 @@
1
+ export declare const regex: {
2
+ signInEmail: RegExp;
3
+ latinOnly: RegExp;
4
+ firstName: RegExp;
5
+ };
6
+ export declare const formValidationMessages: {
7
+ requiredFieldMessage: string;
8
+ firstName: {
9
+ invalid: string;
10
+ };
11
+ email: {
12
+ required: string;
13
+ invalid: string;
14
+ };
15
+ };
@@ -0,0 +1,2 @@
1
+ import { Colors, ThemeType } from '../types';
2
+ export declare const themeToColor: (theme: ThemeType) => Colors.Core | Colors.Stream | Colors.Cinema;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, BodyText, Card, Cards, CinemaBadge, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, GridItemLegacy, Header, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, LiveChat, 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, Stepper, StickyBar, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, Table, TabLink, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, FilterToggles, ToggleButton } from './components';
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, FilterToggles, ToggleButton, SignUpForm } from './components';
2
2
  import { devices, breakpoints } from './styles/viewports';
3
3
  import zIndexes from './styles/zIndexes';
4
4
  import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, IntegratedTimerProps, ITimerProps, TickboxMode, ThemeType, EditorialLink, IInformationTitleProps, IInformationCTAProps, IInformationBackgroundColour } from './types';
5
5
  import { MiniCard } from './components/molecules';
6
- import { BrandingStyle } from './types/impactHeader';
7
6
  import { ModalWindow } from './components/organisms';
8
7
  import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButton';
9
- export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyText, BrandingStyle, breakpoints, ButtonType, Card, Cards, CarouselType, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, GridItemLegacy, Header, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, IInformationBackgroundColour, IInformationCTAProps, IInformationTitleProps, ITimerProps, IntegratedTimerProps, LiveChat, MiniCard, ModalWindow, 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, Stepper, StickyBar, StreamBadge, Subtitle, Tab, Table, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, FilterToggles, ToggleButton, };
8
+ export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, Header, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, IInformationBackgroundColour, IInformationCTAProps, IInformationTitleProps, ITimerProps, IntegratedTimerProps, MiniCard, ModalWindow, 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, Tab, Table, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, FilterToggles, ToggleButton, SignUpForm, };
@@ -0,0 +1,58 @@
1
+ import { ThemeType } from './types';
2
+ export interface ISignUpFormContextProps {
3
+ /**
4
+ * Form title to display
5
+ */
6
+ title: string;
7
+ /**
8
+ * Form text to display
9
+ */
10
+ message: string;
11
+ }
12
+ export interface ISignUpFormCTAProps {
13
+ /**
14
+ * Text to display on the CTA
15
+ */
16
+ text: string;
17
+ /**
18
+ * Link for the CTA
19
+ */
20
+ link: string;
21
+ }
22
+ export declare type SignUpRequestBody = {
23
+ firstName?: string;
24
+ lastName?: string;
25
+ email?: string;
26
+ };
27
+ export interface ISignUpFormProps {
28
+ /**
29
+ * Form title and text of initial state
30
+ */
31
+ initialState: ISignUpFormContextProps;
32
+ /**
33
+ * Form title and text of submitted state
34
+ */
35
+ submittedState: ISignUpFormContextProps;
36
+ /**
37
+ * CTA to display Privacy Notice
38
+ */
39
+ ctaPrivacy: ISignUpFormCTAProps;
40
+ /**
41
+ * Theme to use for buttons. Choices are "Core" (red), "Stream" (blue), or "Cinema" (black)
42
+ */
43
+ theme: Exclude<ThemeType, ThemeType.Schools>;
44
+ /**
45
+ * Error message shown to users in case of a server error
46
+ */
47
+ errorMessage: string;
48
+ /**
49
+ * Is user logged in flag. Default false
50
+ */
51
+ isLoggedIn?: boolean;
52
+ /**
53
+ * Function to handle the sign up form data
54
+ */
55
+ submitHandler: (data: SignUpRequestBody) => Promise<{
56
+ success: boolean;
57
+ }>;
58
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/chord",
3
- "version": "2.7.0-a-development",
3
+ "version": "2.7.0-c-development",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const LiveChat: () => React.ReactElement;
3
- export default LiveChat;
@@ -1,2 +0,0 @@
1
- import LiveChat from './LiveChat';
2
- export { LiveChat };