Package not found. Please check the package name and try again.

@royaloperahouse/chord 2.7.0 → 2.8.0-a-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.
Files changed (31) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +251 -40
  3. package/dist/chord.cjs.development.js +606 -129
  4. package/dist/chord.cjs.development.js.map +1 -1
  5. package/dist/chord.cjs.production.min.js +1 -1
  6. package/dist/chord.cjs.production.min.js.map +1 -1
  7. package/dist/chord.esm.js +606 -130
  8. package/dist/chord.esm.js.map +1 -1
  9. package/dist/components/atoms/AriaAlternativeDescription/AriaAlternative.d.ts +5 -0
  10. package/dist/components/atoms/AriaAlternativeDescription/AriaAlternative.style.d.ts +3 -0
  11. package/dist/components/atoms/AriaAlternativeDescription/index.d.ts +2 -0
  12. package/dist/components/atoms/Grid/GridItemLegacy.d.ts +8 -0
  13. package/dist/components/atoms/Grid/index.d.ts +2 -1
  14. package/dist/components/atoms/index.d.ts +2 -2
  15. package/dist/components/index.d.ts +2 -2
  16. package/dist/components/molecules/PageHeading/index.d.ts +1 -1
  17. package/dist/components/molecules/PeopleListing/CreditListing/CreditListing.style.d.ts +1 -0
  18. package/dist/components/molecules/SignUpForm/SignUpForm.d.ts +4 -0
  19. package/dist/components/molecules/SignUpForm/SignUpForm.style.d.ts +18 -0
  20. package/dist/components/molecules/SignUpForm/index.d.ts +2 -0
  21. package/dist/components/molecules/Table/Table.style.d.ts +1 -1
  22. package/dist/components/molecules/index.d.ts +3 -2
  23. package/dist/helpers/formatStrings.d.ts +1 -0
  24. package/dist/helpers/forms.d.ts +20 -0
  25. package/dist/helpers/theme.d.ts +2 -0
  26. package/dist/index.d.ts +2 -2
  27. package/dist/types/ariaAlternative.d.ts +34 -0
  28. package/dist/types/formTypes.d.ts +12 -9
  29. package/dist/types/signUpForm.d.ts +58 -0
  30. package/package.json +1 -1
  31. package/README.GIT +0 -278
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IAriaAlternativeProps, IAriaHideProps } from '../../../types/ariaAlternative';
3
+ /** A temporary screen-reader accessibility workaround for components with issues that can't be resolved quickly. Allows us to use aria-hidden on components with stuctural HTML markup issues until they can be rebuilt to be screen-reader compatible, or on components whose data does not translate well to screen-reader users. **/
4
+ export declare const AriaHide: FunctionComponent<IAriaHideProps>;
5
+ export declare const AriaAlternative: FunctionComponent<IAriaAlternativeProps>;
@@ -0,0 +1,3 @@
1
+ import { IAriaHideProps } from '../../../types/ariaAlternative';
2
+ export declare const AriaAlternativeDescription: import("styled-components").StyledComponent<"a", any, {}, never>;
3
+ export declare const AriaHideOnDevice: import("styled-components").StyledComponent<"div", any, IAriaHideProps, never>;
@@ -0,0 +1,2 @@
1
+ import { AriaAlternative, AriaHide } from './AriaAlternative';
2
+ export { AriaAlternative, AriaHide };
@@ -0,0 +1,8 @@
1
+ import { IGridItemProps } from '../../../types/types';
2
+ /**
3
+ * # IMPORTANT
4
+ * Please use the `<GridItem />` component instead of this component if possible.
5
+ * This component was introduced due to incompatibilities between versions of the Chord library.
6
+ */
7
+ declare const GridItemLegacy: import("styled-components").StyledComponent<"div", any, IGridItemProps, never>;
8
+ export default GridItemLegacy;
@@ -1,3 +1,4 @@
1
1
  import Grid from './Grid';
2
2
  import GridItem from './GridItem';
3
- export { Grid, GridItem };
3
+ import GridItemLegacy from './GridItemLegacy';
4
+ export { Grid, GridItem, GridItemLegacy };
@@ -1,7 +1,7 @@
1
1
  import { CinemaBadge, StreamBadge } from './Badge';
2
2
  import { PrimaryButton, SecondaryButton, TertiaryButton } from './Buttons';
3
3
  import ControlledDropdown from './ControlledDropdown';
4
- import { Grid, GridItem } from './Grid';
4
+ import { Grid, GridItem, GridItemLegacy } from './Grid';
5
5
  import { Icon } from './Icons';
6
6
  import ImageAspectRatioWrapper from './ImageAspectRatioWrapper';
7
7
  import Progress from './Progress';
@@ -26,4 +26,4 @@ import { AltHeader, BodyText, Header, Overline, Subtitle } from './Typography';
26
26
  import VideoControls from './VideoControls';
27
27
  import { Stepper } from './Stepper';
28
28
  import ToggleButton from './ToggleButton/ToggleButton';
29
- export { AltHeader, BodyText, CinemaBadge, ControlledDropdown, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, Overline, Progress, PrimaryButton, Radio, Radio2, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SponsorLogo, Sponsorship, Stepper, StreamBadge, Subtitle, Tab, TabLink, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, VideoControls, ToggleButton, };
29
+ export { AltHeader, BodyText, CinemaBadge, ControlledDropdown, Grid, GridItem, GridItemLegacy, Header, Icon, ImageAspectRatioWrapper, Overline, Progress, PrimaryButton, Radio, Radio2, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SponsorLogo, Sponsorship, Stepper, StreamBadge, Subtitle, Tab, TabLink, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, VideoControls, ToggleButton, };
@@ -1,6 +1,6 @@
1
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
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 } from './molecules';
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, 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, };
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, };
@@ -4,4 +4,4 @@ import PageHeadingImpact from './Impact';
4
4
  import PageHeadingPanel from './Panel';
5
5
  import PageHeadingStream from './Stream';
6
6
  import PageHeadingCompact from './Compact/Compact';
7
- export { PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PageHeadingCompact, PageHeadingPanel, };
7
+ export { PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, PageHeadingCompact, };
@@ -5,3 +5,4 @@ export declare const CreditListingWrapper: import("styled-components").StyledCom
5
5
  export declare const DescriptionWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
6
6
  export declare const RoleWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
7
7
  export declare const CreditWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const CreditBodyWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { ISignUpFormProps } from '../../../types/signUpForm';
3
+ declare const SignUpFormComponent: FunctionComponent<ISignUpFormProps>;
4
+ export default SignUpFormComponent;
@@ -0,0 +1,18 @@
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>;
14
+ export declare const MessageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
15
+ export declare const DropdownAreaWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
16
+ export declare const DropdownWrapper: import("styled-components").StyledComponent<"div", any, {
17
+ isOpen?: boolean | undefined;
18
+ }, never>;
@@ -0,0 +1,2 @@
1
+ import SignUpForm from './SignUpForm';
2
+ export default SignUpForm;
@@ -16,4 +16,4 @@ export declare const PageNumber: import("styled-components").StyledComponent<"bu
16
16
  }, never>;
17
17
  export declare const Next: import("styled-components").StyledComponent<"span", any, {}, never>;
18
18
  export declare const ScrollButtons: import("styled-components").StyledComponent<"div", any, {}, never>;
19
- export declare const AriaDescription: import("styled-components").StyledComponent<"span", any, {}, never>;
19
+ export declare const AriaDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -27,8 +27,9 @@ import ImageWithCaption from './ImageWithCaption';
27
27
  import Quote from './Quote';
28
28
  import MiniCard from './MiniCard';
29
29
  import ReadMore from './ReadMore';
30
- import AuxiliaryNav from './AuxiliaryNav';
31
30
  import PasswordStrength from './PasswordStrength';
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, };
@@ -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,20 @@
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
+ required: string;
11
+ };
12
+ lastName: {
13
+ required: string;
14
+ };
15
+ email: {
16
+ required: string;
17
+ invalid: string;
18
+ };
19
+ };
20
+ export declare const getFormErrorMessage: (field: string, value?: string | undefined) => string | undefined;
@@ -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,8 +1,8 @@
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 } 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
6
  import { ModalWindow } from './components/organisms';
7
7
  import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButton';
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, };
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,34 @@
1
+ export interface IAriaAlternativeProps {
2
+ /**
3
+ * A temporary screen-reader accessibility workaround for components with issues that can't be resolved quickly.
4
+ * Allows us to use aria-hidden on components with stuctural HTML markup issues until they can be rebuilt to be screen-reader compatible.
5
+ */
6
+ /**
7
+ * Description of the content being communicated by this component.
8
+ */
9
+ description: string;
10
+ /**
11
+ * originalContent - parse in the data from the original component / response object.
12
+ */
13
+ originalContent: Array<{
14
+ key: string;
15
+ value: string;
16
+ }>;
17
+ /**
18
+ * speechValues - input contextual speech values here to build a sentence, e.g. "you have" , "tickets for" , etc.
19
+ */
20
+ speechValues: Array<{
21
+ key: string;
22
+ value: string;
23
+ }>;
24
+ /**
25
+ * Disable this component (for testing purposes).
26
+ */
27
+ disabled?: boolean;
28
+ }
29
+ export interface IAriaHideProps {
30
+ /**
31
+ * Inert - disables all focusable child elements, necessary if using aria-hidden
32
+ */
33
+ inert: boolean;
34
+ }
@@ -265,17 +265,8 @@ export interface IStepperProps {
265
265
  step?: number;
266
266
  /** An error message to be shown below the stepper.
267
267
  *
268
- * Default: `undefined`
269
268
  */
270
269
  error?: string;
271
- /**
272
- * A style prop that allows us to change what colours to
273
- * use for light or dark mode (e.g. text color, border color, etc...)
274
- * based on the background color.
275
- *
276
- * Defaults to `false`.
277
- */
278
- darkMode?: boolean;
279
270
  /**
280
271
  * Set disapled state
281
272
  */
@@ -284,6 +275,18 @@ export interface IStepperProps {
284
275
  * Minimum value allowed in the stepper
285
276
  */
286
277
  min?: number;
278
+ /**
279
+ * A style prop that allows us to change what colours to
280
+ * use for light or dark mode (e.g. text color, border color, etc...)
281
+ * based on the background color.
282
+ *
283
+ * Defaults to `false`.
284
+ * Specify whether or not the containing element has a dark background.
285
+ * This property affects the border colours for focused and error states.
286
+ *
287
+ * Default: `false`
288
+ */
289
+ darkMode?: boolean;
287
290
  /**
288
291
  * Maximum value allowed in the stepper
289
292
  */
@@ -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",
3
+ "version": "2.8.0-a-development",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
package/README.GIT DELETED
@@ -1,278 +0,0 @@
1
- # Royal Opera House Chord - 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
- The NPM packages are published at [https://www.npmjs.com/package/@royaloperahouse/chord](https://www.npmjs.com/package/@royaloperahouse/chord)
10
-
11
- The Storybook for the latest version of the library is hosted at [chord.roh.org.uk](chord.roh.org.uk)
12
-
13
-
14
- ## Prerequisites
15
- ---
16
-
17
- * Use a node version of 16 at the highest to run the storybook locally
18
-
19
- * Make sure the required package dependencies are installed using `yarn install`
20
-
21
- * If this is the first time you are working on Chord, make sure to run `yarn build` to build all the modules.
22
-
23
- * **To deploy the storybook publicly** you will need credentials for the **parent** 'Royal Opera House' AWS account in your `~/.aws/credentials` file.
24
- * The deploy script expects these to be called `[parent]`.
25
-
26
- * You can find these values at:
27
-
28
- *AWS 'Your Applications' page -> 'Royal Opera House' -> 'Developer Access' -> 'Command line or programmatic access'*
29
-
30
- * **To deploy a preview** for demo / QA you will need the `CHROMATIC_PROJECT_TOKEN` -- find this in 1Password
31
-
32
-
33
- * **To publish the NPM package** you will need the ROH `NPM_TOKEN` -- find this in 1Password
34
-
35
-
36
- ## Versioning
37
- ---
38
-
39
- We use [Semantic Versioning](https://semver.org/) for Chord.
40
-
41
- Given a version number MAJOR.MINOR.PATCH, increment the:
42
-
43
- * MAJOR version when you make incompatible library changes
44
- * MINOR version when you add functionality in a backwards compatible manner
45
- * PATCH version when you make backwards compatible bug fixes
46
-
47
- When you create a new release always update the `CHANGELOG` and `package.json`
48
-
49
- Increment your version from the latest stable version on `main`
50
-
51
-
52
- ## Deploying the Storybook
53
- ---
54
-
55
- ### **1. To build and deploy locally**
56
-
57
- You can quickly build and serve the contents of `/storybook-static` from your local machine, for development and manual testing. To do this run:
58
-
59
- ```bash
60
- yarn storybook
61
- ```
62
-
63
- By default the storybook will be accessible at
64
- [http://localhost:6006/](http://localhost:6006/)
65
-
66
- The server will hot-reload on most changes.
67
-
68
- ### **2. To deploy a preview version remotely**
69
-
70
- You can deploy a release candidate, or work-in-progress to [Chromatic](https://www.chromatic.com/) for showcase or QA.
71
-
72
- **NOTE:** you will need the `CHROMATIC_PROJECT_TOKEN` as described in *Prerequisites* above.
73
-
74
- Either set the token as a shell variable or use a `.env` file in the chord root directory containing the token, as so:
75
-
76
- ```
77
- CHROMATIC_PROJECT_TOKEN=tokengoeshere
78
- ```
79
-
80
- Run:
81
-
82
- ```
83
- yarn deploy-storybook-dev
84
- ```
85
-
86
- to build and deploy the storybook from your repo to Chromatic.
87
-
88
- You will find the address of your deployed storybook in the console output, looking something like this:
89
-
90
- `→ View your Storybook at https://randomHexString-randomAlphabeticalString.chromatic.com`
91
-
92
- ### **3. To deploy a release version**
93
-
94
- You can deploy the contents of `./storybook-static` to S3 as a static site, which is permanently accessible at [chord.roh.org.uk](chord.roh.org.uk)
95
-
96
- **NOTE:** To do this you will need the correct `AWS` credentials set up, as described in *Prerequisites* above.
97
-
98
- First build the storybook using:
99
-
100
- ```
101
- yarn build-storybook
102
- ```
103
-
104
- then run:
105
-
106
- ```bash
107
- yarn deploy-storybook
108
- ```
109
-
110
- > **IMPORTANT:** This URL is intended to showcase the latest stable version of Chord, it should be kept up to date with the main branch and should **only** be used for release versions. If you want to deploy a development version follow the steps above under *To deploy a preview version remotely*.
111
-
112
-
113
- ## Releasing a New Package Version
114
- ---
115
-
116
- This is the procedure for releasing a new Chord NPM package.
117
-
118
- There are two types of package:
119
-
120
- A **snapshot** can be published to use a development version of the Chord library in our frontend staging environments, to perform integrated, manual testing.
121
-
122
- A **stable** package is published for use in production.
123
-
124
- **NOTE:** You will need the `NPM_TOKEN`, as described in 'Prerequisites' above.
125
-
126
- ### **1. To release a snapshot version**
127
-
128
- > **IMPORTANT:** Make sure you always publish your **snapshots** from `development` after merging in your feature branch.
129
-
130
- For snapshots, `RELEASE_VERSION` should be the same as the latest **stable** version of the Chord Library, as found in `main`, followed by an **unused** lowercase letter.
131
-
132
- For example, if the latest stable release was 1.42.0, and the last snapshot published to NPM was 1.42.0-w, you would use RELEASE_VERSION `1.42.0-x`
133
-
134
- To publish a snapshot use:
135
-
136
- ```bash
137
- NPM_ROH_TOKEN={NPM_TOKEN} RELEASE_VERSION={RELEASE_VERSION} yarn publish-snapshot
138
- ```
139
-
140
- The version published to NPM will be named, e.g. `1.42.0-x-development`, use this to install the snapshot package in the frontend repos.
141
-
142
- ### **2. To release a stable version**
143
-
144
- > **IMPORTANT:** Make sure you always publish your **stable** packages from `main` after merging in your feature branch.
145
-
146
- For stable releases, increment your version from the latest **stable** version found on `main`, following the rules described in *Versioning* above, and use this as `RELEASE_VERSION`. (Make sure it matches the version in your `package.json` and `CHANGELOG.md`!)
147
-
148
- To publish a stable package use:
149
-
150
- ```bash
151
- NPM_ROH_TOKEN={NPM_TOKEN} RELEASE_VERSION={RELEASE_VERSION} yarn publish-release
152
- ```
153
-
154
-
155
- ## Using the Package
156
- ---
157
-
158
- The package is deployed to NPM, and can be installed using yarn or npm:
159
-
160
- ```bash
161
- npm i --save @royaloperahouse/chord
162
- ```
163
- ```bash
164
- yarn add @royaloperahouse/chord
165
- ```
166
-
167
-
168
- ## Testing
169
- ---
170
-
171
- To **Lint** the package use:
172
-
173
- ```bash
174
- yarn lint
175
- # Use the --fix option to perform automatic fixes
176
- ```
177
-
178
- To run the **unit tests** (using Jest) use:
179
-
180
- ```bash
181
- yarn test
182
-
183
- # Use the -u option to update snapshots if needed
184
- # Run `yarn test:watch` to re-run tests on changes
185
- ```
186
-
187
- To **run and and store the unit tests** for display in storybook use:
188
-
189
- ```bash
190
- yarn test-storybook
191
- # Use the -u option to update snapshots if needed
192
- ```
193
-
194
-
195
- ## Development Process
196
- ---
197
-
198
- ### **1. Branching Model**
199
- * The Chord project source can be found at [https://bitbucket.org/rohorguk/harmonic-library](https://bitbucket.org/rohorguk/harmonic-library) in the `chord` directory
200
- * The Chord **development** branch is currently `development`
201
- * The Chord **main** branch is currently `main`
202
- * All work should be done on a correctly named **feature branch** of the format: `issueType/ticketNumber-short-description-of-feature`, e.g. `feature/RD-1234-update-chord-documentation`
203
- * Always create your feature branch FROM, and submit pull requests TO, the **main** branch
204
- * For **QA / UAT** of a Chord component in isolation: following review you should deploy a preview version to Chromatic straight from your **feature branch** _without_ merging to development
205
- * For releasing an **NPM snapshot**: merge your feature branch into the **development** branch and publish the NPM snapshot from there
206
-
207
- ### **2. Detailed Workflow**
208
-
209
- #### **Before review:**
210
-
211
- * Git pull the latest version of `main`
212
- * Checkout a new, correctly-named feature branch from `main`
213
- * Do your work on this feature branch
214
- * Run: `yarn lint`
215
- * Run: `yarn test`
216
- * Commit your changes
217
- * Create a pull request from your feature branch to `main`
218
- * Add the appropriate reviewers
219
-
220
- #### **Before QA / UAT:**
221
-
222
- After your PR is approved, you have two options:
223
-
224
- **i.** For QA of a component in isolation:
225
-
226
- * Follow the steps above in *Deploying the Storybook -> 2. Deploying a preview version remotely*
227
- * Share the generated Chromatic URL with the appropriate people for QA / UAT
228
-
229
- **ii.** For integrated testing of a component in the frontend staging environments:
230
-
231
- * Check out the `development` branch
232
- * Merge your work in to `development`
233
- * Follow the steps above under *Publishing a New Package Version -> 1. To release a snapshot version*
234
- * Git push the updated `development` branch to remote
235
- * Finally, in the frontend repo:
236
-
237
- 1. Update the `package.json` to reference the new snapshot version
238
- 2. Run: `yarn install`
239
- 3. Deploy the frontend to a staging environment
240
-
241
- #### **When ready for production:**
242
-
243
- * Return to your chord **feature branch**
244
- * Update the chord version in `package.json`, incrementing from the last **stable** release, found in `main`, and following the rules described in the *Versioning* section
245
- * Update `CHANGELOG.md`, adding the new version number and a short description of your changes
246
- * Run: `yarn lint`
247
- * Run: `yarn test`
248
- * Run: `yarn test-storybook -u`
249
- * Run: `yarn build-storybook`
250
- * Git commit, push, and update your PR for final approval
251
- * Merge your approved PR to `main`
252
- * Follow the steps in *Publishing a New Package Version -> 2. To release a stable version* to publish the NPM package
253
- * Finally, follow the steps in *Deploying The Storybook -> 3. To deploy a release version*, to update the public Chord Storybook page
254
-
255
- Once you have successfully published a new release version, you can open a ticket to update to this version in any of the frontend repos.
256
-
257
-
258
- ## Notes
259
- ---
260
- ### The `storybook-static` folder
261
-
262
- This folder contains all the HTML / JS required to deploy the Storybook as a static site. It's autogenerated whenever the Storybook is built and therefore will show up a lot of merge conflicts when you merge other branches into your feature branch. It is best to leave generating the storybook until the later part of your workflow, but in case you run into conflicts earlier, it's ok to just delete the folder and regenerate using:
263
-
264
- ```bash
265
- yarn build-storybook
266
- ```
267
-
268
- For the same reason changes to this folder will cause a lot of big diffs, when looking at a PR, but can mostly be skimmed over unless something looks unusual.
269
-
270
- ---
271
- ### Examples
272
-
273
- 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.
274
-
275
- ---
276
- ### Bundle analysis
277
-
278
- Calculate the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `yarn size` and visualize it with `yarn analyze`.