@royaloperahouse/harmonic 0.1.6 → 0.1.7-b

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 (77) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +252 -43
  3. package/dist/components/Typography/Typography.d.ts +8 -9
  4. package/dist/components/atoms/Account/Account.d.ts +1 -1
  5. package/dist/components/atoms/Buttons/Auxiliary/AuxiliaryButton.d.ts +2 -2
  6. package/dist/components/atoms/Buttons/Auxiliary/AuxiliaryButton.style.d.ts +2 -2
  7. package/dist/components/atoms/Buttons/Auxiliary/utils.d.ts +3 -0
  8. package/dist/components/atoms/Buttons/Button.d.ts +2 -2
  9. package/dist/components/atoms/Buttons/Button.style.d.ts +3 -3
  10. package/dist/components/atoms/Buttons/Primary/PrimaryButton.d.ts +2 -2
  11. package/dist/components/atoms/Buttons/Primary/PrimaryButton.style.d.ts +3 -0
  12. package/dist/components/atoms/Buttons/Primary/utils.d.ts +11 -0
  13. package/dist/components/atoms/Buttons/Secondary/SecondaryButton.d.ts +2 -2
  14. package/dist/components/atoms/Buttons/Secondary/SecondaryButton.style.d.ts +3 -0
  15. package/dist/components/atoms/Buttons/Secondary/utils.d.ts +13 -0
  16. package/dist/components/atoms/Buttons/Tertiary/TertiaryButton.d.ts +3 -3
  17. package/dist/components/atoms/Buttons/Tertiary/TertiaryButton.style.d.ts +3 -4
  18. package/dist/components/atoms/Buttons/Tertiary/utils.d.ts +8 -0
  19. package/dist/components/atoms/Buttons/utils.d.ts +5 -0
  20. package/dist/components/atoms/Dropdown/Dropdown.d.ts +1 -1
  21. package/dist/components/atoms/Dropdown/Dropdown.style.d.ts +2 -2
  22. package/dist/components/atoms/Icons/Icons.d.ts +1 -1
  23. package/dist/components/atoms/Icons/SvgIcons/RBO/NavLogoMobile.svg.d.ts +4 -0
  24. package/dist/components/atoms/Icons/SvgIcons/RBO/NavLogoNoCrest.svg.d.ts +4 -0
  25. package/dist/components/atoms/Icons/SvgIcons/RBO/NavLogoWithCrest.svg.d.ts +4 -0
  26. package/dist/components/atoms/Icons/SvgIcons/index.d.ts +3 -0
  27. package/dist/components/atoms/RotatorButtons/RotatorButtons.d.ts +2 -2
  28. package/dist/components/atoms/Search/Search.d.ts +1 -1
  29. package/dist/components/atoms/Tab/Tab.d.ts +1 -1
  30. package/dist/components/index.d.ts +4 -3
  31. package/dist/components/molecules/Basket/Basket.d.ts +1 -1
  32. package/dist/components/molecules/Basket/Basket.style.d.ts +2 -0
  33. package/dist/components/molecules/NavTop/NavTop.d.ts +1 -1
  34. package/dist/components/molecules/PageHeading/Compact/Compact.style.d.ts +1 -1
  35. package/dist/components/molecules/PeopleListing/CreditListing/CreditListing.d.ts +4 -4
  36. package/dist/components/molecules/SearchBar/SearchBar.d.ts +1 -1
  37. package/dist/components/molecules/SearchBar/SearchBar.style.d.ts +1 -1
  38. package/dist/components/molecules/Select/Select.style.d.ts +1 -1
  39. package/dist/components/molecules/SignUpForm/SignUpForm.d.ts +4 -0
  40. package/dist/components/molecules/SignUpForm/SignUpForm.style.d.ts +20 -0
  41. package/dist/components/molecules/SignUpForm/index.d.ts +2 -0
  42. package/dist/components/molecules/Tabs/Tabs.d.ts +1 -1
  43. package/dist/components/molecules/index.d.ts +2 -1
  44. package/dist/components/organisms/Footer/Footer.style.d.ts +2 -1
  45. package/dist/components/organisms/Navigation/Navigation.d.ts +1 -1
  46. package/dist/components/organisms/Navigation/Navigation.style.d.ts +7 -1
  47. package/dist/components/organisms/TitleWithCTA/TitleWithCTA.style.d.ts +1 -1
  48. package/dist/harmonic.cjs.development.css +701 -68
  49. package/dist/harmonic.cjs.development.js +2640 -2034
  50. package/dist/harmonic.cjs.development.js.map +1 -1
  51. package/dist/harmonic.cjs.production.min.js +1 -1
  52. package/dist/harmonic.cjs.production.min.js.map +1 -1
  53. package/dist/harmonic.esm.js +2659 -2042
  54. package/dist/harmonic.esm.js.map +1 -1
  55. package/dist/helpers/formatStrings.d.ts +1 -0
  56. package/dist/helpers/forms.d.ts +20 -0
  57. package/dist/helpers/theme.d.ts +2 -0
  58. package/dist/index.d.ts +2 -2
  59. package/dist/styles/HarmonicThemeProvider/HarmonicThemeProvider.d.ts +9 -0
  60. package/dist/styles/HarmonicThemeProvider/index.d.ts +2 -0
  61. package/dist/types/buttonTypes.d.ts +35 -63
  62. package/dist/types/creditListing.d.ts +3 -0
  63. package/dist/types/editorial.d.ts +4 -0
  64. package/dist/types/footer.d.ts +1 -0
  65. package/dist/types/index.d.ts +2 -2
  66. package/dist/types/information.d.ts +4 -4
  67. package/dist/types/navigation.d.ts +18 -14
  68. package/dist/types/promoWithTags.d.ts +4 -0
  69. package/dist/types/signUpForm.d.ts +80 -0
  70. package/dist/types/types.d.ts +56 -20
  71. package/dist/types/typography.d.ts +2 -1
  72. package/package.json +16 -17
  73. package/README.GIT +0 -278
  74. package/dist/components/atoms/Buttons/ButtonIconWrapper.style.d.ts +0 -2
  75. package/dist/components/atoms/Buttons/Primary/PrimaryButtonWrapper.style.d.ts +0 -4
  76. package/dist/components/atoms/Buttons/Secondary/SecondaryButtonWrapper.style.d.ts +0 -3
  77. package/dist/styles/StorybookSupport/Colours/StorybookColourBox.d.ts +0 -5
@@ -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 { ThemeType } from '../types';
2
+ export declare const themeToColor: (theme: ThemeType) => "primary-red" | "primary-black" | "secondary-blue";
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 } 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, 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, };
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, SignUpForm, };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ThemeType } from '../../types';
3
+ import './theme/fonts.css';
4
+ interface HarmonicThemeProviderProps {
5
+ theme: ThemeType;
6
+ children: React.ReactNode;
7
+ }
8
+ declare const HarmonicThemeProvider: React.FC<HarmonicThemeProviderProps>;
9
+ export default HarmonicThemeProvider;
@@ -0,0 +1,2 @@
1
+ import HarmonicThemeProvider from './HarmonicThemeProvider';
2
+ export default HarmonicThemeProvider;
@@ -1,80 +1,52 @@
1
1
  import { ReactNode, AnchorHTMLAttributes, MouseEventHandler } from 'react';
2
2
  import { IconNameType, DirectionType } from './iconTypes';
3
- import { Colors } from './types';
3
+ import { ThemeColor } from './types';
4
4
  export declare enum ButtonType {
5
5
  Primary = "Primary",
6
6
  Secondary = "Secondary",
7
7
  Tertiary = "Tertiary"
8
8
  }
9
- export interface IButtonProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
9
+ declare type BaseProps = {
10
+ /** Button content */
10
11
  children: ReactNode;
11
- /**
12
- * Function to be called when a button is clicked
13
- */
12
+ /** Click handler */
14
13
  onClick?: MouseEventHandler<HTMLAnchorElement>;
15
- /**
16
- * Name of the icon to be used in the button
17
- */
14
+ /** Custom CSS classes */
15
+ className?: string;
16
+ };
17
+ declare type IconProps = {
18
+ /** Icon identifier */
18
19
  iconName?: IconNameType;
19
- /**
20
- * Direction of the icon used in the button
21
- */
20
+ /** Icon position */
22
21
  iconDirection?: DirectionType;
23
- /**
24
- * ClassName for the icon to be used in the button
25
- */
22
+ /** Icon custom classes */
26
23
  iconClassName?: string;
27
- /**
28
- * Color of text and icon
29
- */
30
- color?: Colors;
31
- }
32
- export interface IPrimaryButtonProps extends IButtonProps {
33
- /**
34
- * Button background color
35
- */
36
- bgColor?: Colors;
37
- /**
38
- * Disabled state
39
- */
24
+ };
25
+ declare type StyleProps = {
26
+ /** Text color from theme */
27
+ textColor?: ThemeColor;
28
+ /** Background color from theme */
29
+ backgroundColor?: ThemeColor;
30
+ /** Border color from theme */
31
+ borderColor?: ThemeColor;
32
+ /** Disabled state */
40
33
  disabled?: boolean;
41
- }
42
- export interface IAuxiliaryButtonProps extends IButtonProps {
43
- /**
44
- * Button background color
45
- */
46
- bgColor?: Colors;
47
- /**
48
- * Function to be called when a button is clicked
49
- */
50
- onClick?: MouseEventHandler<HTMLAnchorElement>;
51
- }
52
- export interface ITertiaryButtonProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
53
- /**
54
- * Color of text and icon
55
- */
56
- color?: Colors;
57
- /**
58
- * Function to be called when a button is clicked
59
- */
60
- onClick?: MouseEventHandler<HTMLAnchorElement>;
61
- children: ReactNode;
62
- }
63
- export interface IRotatorButtonsProps {
64
- /**
65
- * Set available Prev button
66
- */
34
+ };
35
+ export declare type ButtonProps = BaseProps & IconProps & AnchorHTMLAttributes<HTMLAnchorElement>;
36
+ 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'>;
39
+ export declare type TertiaryButtonProps = BaseProps & AnchorHTMLAttributes<HTMLAnchorElement> & Pick<StyleProps, 'textColor' | 'disabled'>;
40
+ export declare type RotatorButtonsProps = {
41
+ /** Enable/disable prev button */
67
42
  availablePrev?: boolean;
68
- /**
69
- * Set available Next button
70
- */
43
+ /** Enable/disable next button */
71
44
  availableNext?: boolean;
72
- /**
73
- * Function to be called when a button is clicked
74
- */
45
+ /** Previous button click handler */
75
46
  onClickPrev?: () => void;
76
- /**
77
- * Function to be called when a button is clicked
78
- */
47
+ /** Next button click handler */
79
48
  onClickNext?: () => void;
80
- }
49
+ /** Custom CSS classes */
50
+ className?: string;
51
+ };
52
+ export {};
@@ -10,4 +10,7 @@ export interface ICreditListing {
10
10
  dataROH: string;
11
11
  }[];
12
12
  columnCount?: number;
13
+ expandLargeEntries?: boolean;
14
+ largeColumnSpan?: number;
15
+ characterThreshold?: number;
13
16
  }
@@ -116,6 +116,10 @@ export interface IPromoWithTitleProps {
116
116
  * Semantic level of the title. Default is 2.
117
117
  */
118
118
  titleSemanticLevel?: TypographyLevel;
119
+ /**
120
+ * Additional CSS class names to apply to component.
121
+ */
122
+ className?: string;
119
123
  }
120
124
  export interface IThemePageHeadingProps {
121
125
  /**
@@ -29,6 +29,7 @@ export declare type FooterData = {
29
29
  };
30
30
  export interface IFooterProps {
31
31
  data: FooterData;
32
+ className?: string;
32
33
  }
33
34
  export interface IPolicyLinksProps {
34
35
  items: PolicyLink[];
@@ -5,12 +5,12 @@ import { CarouselType } from './carousel';
5
5
  import { IconNameType } from './iconTypes';
6
6
  import { AspectRatio } from './image';
7
7
  import { TickboxMode } from './tickbox';
8
- import { ButtonType, IAuxiliaryButtonProps } from './buttonTypes';
8
+ import { ButtonType } from './buttonTypes';
9
9
  import { EditorialLink } from './editorial';
10
10
  import { IPageHeadingCompactProps } from './impactHeader';
11
11
  import { IntegratedTimerProps, ITimerProps } from './timer';
12
12
  import { ICreditListing } from './creditListing';
13
13
  import { ModalWindowProps } from './modalWindow';
14
14
  import { IInformationTitleProps, IInformationCTAProps, IInformationBackgroundColour } from './information';
15
- export { AspectRatio, ButtonType, CarouselType, Colors, EditorialLink, IconNameType, IAuxiliaryButtonProps, ICreditListing, IPageHeadingCompactProps, INavigationProps, INavTopProps, IntegratedTimerProps, ITimerProps, ModalWindowProps, TickboxMode, ThemeType, IInformationTitleProps, IInformationCTAProps, IInformationBackgroundColour, };
15
+ export { AspectRatio, ButtonType, CarouselType, Colors, EditorialLink, IconNameType, ICreditListing, IPageHeadingCompactProps, INavigationProps, INavTopProps, IntegratedTimerProps, ITimerProps, ModalWindowProps, TickboxMode, ThemeType, IInformationTitleProps, IInformationCTAProps, IInformationBackgroundColour, };
16
16
  export type { FooterData };
@@ -36,10 +36,6 @@ export interface IInformationCTAProps {
36
36
  * or "Tertiary" (text only)
37
37
  */
38
38
  variant?: IInformationCtaVariant;
39
- /**
40
- * Theme to use for the CTA. Choices are "Core" (red), "Stream" (blue), or "Cinema" (black)
41
- */
42
- theme?: IInformationCtaTheme;
43
39
  /**
44
40
  * Flag to decide whether to adjust the CTA colours for display on coloured backgrounds
45
41
  */
@@ -88,4 +84,8 @@ export interface IInformationProps {
88
84
  * Background Colour. Choices: None, Core, Cinema, Stream
89
85
  */
90
86
  background?: IInformationBackgroundColour;
87
+ /**
88
+ * Additional CSS class names to apply to component.
89
+ */
90
+ className?: string;
91
91
  }
@@ -23,9 +23,9 @@ export interface IAccountProps {
23
23
  */
24
24
  titleLink?: string;
25
25
  /**
26
- * The primary color
26
+ * Additional CSS class names to apply to the navigation component.
27
27
  */
28
- colorPrimary?: string;
28
+ className?: string;
29
29
  }
30
30
  export interface IBasketProps {
31
31
  /**
@@ -57,14 +57,14 @@ export interface IBasketProps {
57
57
  * Function to be called when is clicked
58
58
  */
59
59
  onClick?: (e: string) => void;
60
- /**
61
- * The primary color
62
- */
63
- colorPrimary?: string;
64
60
  /**
65
61
  * For changing the color of the basket icon & text (when not in hover state)
66
62
  */
67
63
  isActive?: boolean;
64
+ /**
65
+ * Additional CSS class names to apply to the navigation component.
66
+ */
67
+ className?: string;
68
68
  }
69
69
  export interface ISearchProps {
70
70
  /**
@@ -76,9 +76,9 @@ export interface ISearchProps {
76
76
  */
77
77
  onClick?: () => void;
78
78
  /**
79
- * The primary color
79
+ * Additional CSS class names to apply to the navigation component.
80
80
  */
81
- colorPrimary?: string;
81
+ className?: string;
82
82
  }
83
83
  export interface INavigationWrapperProps {
84
84
  /**
@@ -142,9 +142,9 @@ export interface INavTopProps {
142
142
  */
143
143
  onLink?: (e: string) => void;
144
144
  /**
145
- * The primary color
145
+ * Additional CSS class names to apply to the navigation component.
146
146
  */
147
- colorPrimary?: string;
147
+ className?: string;
148
148
  }
149
149
  export interface IMenuOptionProps {
150
150
  /**
@@ -188,13 +188,13 @@ export interface INavigationProps {
188
188
  */
189
189
  menuData: IMenuProps;
190
190
  /**
191
- * The url for the Desktop version of the logo
191
+ * Boolean for crest or no crest version of RBO logo
192
192
  */
193
- desktopLogoUrl: string;
193
+ crest?: boolean;
194
194
  /**
195
- * The url for the Mobile and Tablet version of the logo
195
+ * Additional CSS class names to apply to the navigation component.
196
196
  */
197
- devicesLogoUrl?: string;
197
+ className?: string;
198
198
  }
199
199
  export interface ISearchBarProps {
200
200
  /**
@@ -205,6 +205,10 @@ export interface ISearchBarProps {
205
205
  * Function to be called when is closed
206
206
  */
207
207
  onClose?: (e?: React.MouseEvent) => void;
208
+ /**
209
+ * Additional CSS class names to apply to the navigation component.
210
+ */
211
+ className?: string;
208
212
  }
209
213
  export declare type TitleCTALink = AnchorHTMLAttributes<HTMLAnchorElement> & {
210
214
  /**
@@ -72,6 +72,10 @@ export interface IPromoWithTagsProps {
72
72
  * Params for Timer component
73
73
  */
74
74
  timerParams?: IntegratedTimerProps;
75
+ /**
76
+ * Additional CSS class names to apply to component.
77
+ */
78
+ className?: string;
75
79
  }
76
80
  export interface IPromoWithTagsStyledProps {
77
81
  /**
@@ -0,0 +1,80 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { ThemeType } from './types';
3
+ export interface ISignUpFormContextProps {
4
+ /**
5
+ * Form title to display
6
+ */
7
+ title: string;
8
+ /**
9
+ * Form text to display
10
+ */
11
+ message: string;
12
+ }
13
+ export interface ISignUpFormCTAProps {
14
+ /**
15
+ * Text to display on the CTA
16
+ */
17
+ text: string;
18
+ /**
19
+ * Link for the CTA
20
+ */
21
+ link: string;
22
+ }
23
+ export declare type SignUpRequestBody = {
24
+ firstName?: string;
25
+ lastName?: string;
26
+ email?: string;
27
+ };
28
+ export interface ISignUpFormProps {
29
+ /**
30
+ * Form title and text of initial state
31
+ */
32
+ initialState: ISignUpFormContextProps;
33
+ /**
34
+ * Form title and text of submitted state
35
+ */
36
+ submittedState: ISignUpFormContextProps;
37
+ /**
38
+ * CTA to display Privacy Notice
39
+ */
40
+ ctaPrivacy: ISignUpFormCTAProps;
41
+ /**
42
+ * Theme to use for buttons. Choices are "Core" (red), "Stream" (blue), or "Cinema" (black)
43
+ */
44
+ theme: Exclude<ThemeType, ThemeType.Schools>;
45
+ /**
46
+ * Error message shown to users in case of a server error
47
+ */
48
+ errorMessage: string;
49
+ /**
50
+ * Is user logged in flag. Default false
51
+ */
52
+ isLoggedIn?: boolean;
53
+ /**
54
+ * Function to handle the sign up form data
55
+ */
56
+ submitHandler: (data: SignUpRequestBody) => Promise<{
57
+ success: boolean;
58
+ }>;
59
+ }
60
+ export declare type SignUpFormComponentTitleProps = {
61
+ title: string;
62
+ isMobile?: boolean;
63
+ };
64
+ export declare type SignUpFormComponentMessageProps = {
65
+ message: string;
66
+ withDropdown?: boolean;
67
+ };
68
+ declare type FormValues = {
69
+ firstName: string;
70
+ lastName: string;
71
+ email: string;
72
+ };
73
+ export declare type SignUpFormComponentFormProps = Pick<ISignUpFormProps, 'ctaPrivacy' | 'theme' | 'errorMessage' | 'isLoggedIn' | 'submitHandler'> & {
74
+ isMobile: boolean;
75
+ isSuccess: boolean;
76
+ setIsSuccess: Dispatch<SetStateAction<boolean>>;
77
+ formValues: FormValues;
78
+ setFormValues: Dispatch<SetStateAction<FormValues>>;
79
+ };
80
+ export {};
@@ -17,6 +17,35 @@ export declare enum Colors {
17
17
  Stream = "stream",
18
18
  Cinema = "cinema"
19
19
  }
20
+ export declare const ThemeColor: {
21
+ readonly primary: "primary";
22
+ readonly 'primary-red': "primary-red";
23
+ readonly 'primary-black': "primary-black";
24
+ readonly 'base-white': "base-white";
25
+ readonly 'base-black': "base-black";
26
+ readonly 'base-dark-grey': "base-dark-grey";
27
+ readonly 'base-mid-grey': "base-mid-grey";
28
+ readonly 'base-light-grey': "base-light-grey";
29
+ readonly 'base-transparent': "base-transparent";
30
+ readonly 'state-error': "state-error";
31
+ readonly 'state-medium': "state-medium";
32
+ readonly 'state-good': "state-good";
33
+ readonly 'state-focused': "state-focused";
34
+ readonly 'state-disabled': "state-disabled";
35
+ readonly 'rbo-red-hovered': "rbo-red-hovered";
36
+ readonly 'rbo-red-pressed': "rbo-red-pressed";
37
+ readonly 'rbo-black-hovered': "rbo-black-hovered";
38
+ readonly 'rbo-black-pressed': "rbo-black-pressed";
39
+ readonly 'black-hovered': "black-hovered";
40
+ readonly 'black-pressed': "black-pressed";
41
+ readonly 'white-hovered': "white-hovered";
42
+ readonly 'white-pressed': "white-pressed";
43
+ readonly 'secondary-yellow': "secondary-yellow";
44
+ readonly 'secondary-pink': "secondary-pink";
45
+ readonly 'secondary-orange': "secondary-orange";
46
+ readonly 'secondary-blue': "secondary-blue";
47
+ };
48
+ export declare type ThemeColor = keyof typeof ThemeColor;
20
49
  export declare enum ThemeType {
21
50
  Core = "core",
22
51
  Stream = "stream",
@@ -113,9 +142,17 @@ export interface ITabProps {
113
142
  */
114
143
  onReset?: () => void;
115
144
  /**
116
- * The primary color
145
+ * Additional CSS class names to apply to the navigation component.
146
+ */
147
+ className?: string;
148
+ /**
149
+ * Defines the ARIA role of the element for accessibility purposes.
150
+ */
151
+ role?: string;
152
+ /**
153
+ * Provides an accessible label for screen readers to describe the element's purpose.
117
154
  */
118
- colorPrimary?: string;
155
+ ariaLabel?: string;
119
156
  }
120
157
  export interface IDropdownProps {
121
158
  /**
@@ -155,9 +192,17 @@ export interface IDropdownProps {
155
192
  */
156
193
  onChange?: (e: string) => void;
157
194
  /**
158
- * The primary color
195
+ * Additional CSS class names to apply to the navigation component.
196
+ */
197
+ className?: string;
198
+ /**
199
+ * Defines the ARIA role of the element for accessibility purposes.
200
+ */
201
+ role?: string;
202
+ /**
203
+ * Provides an accessible label for screen readers to describe the element's purpose.
159
204
  */
160
- colorPrimary?: string;
205
+ ariaLabel?: string;
161
206
  }
162
207
  export interface ITabsProps {
163
208
  /**
@@ -177,16 +222,11 @@ export interface ITabsProps {
177
222
  */
178
223
  onChange?: (e: string) => void;
179
224
  /**
180
- * The primary color
225
+ * Additional CSS class names to apply to the navigation component.
181
226
  */
182
- colorPrimary?: string;
183
- }
184
- export interface IDropdowItemProps extends StyledProps<AnchorHTMLAttributes<HTMLAnchorElement>> {
185
- /**
186
- * The primary color
187
- */
188
- colorPrimary?: string;
227
+ className?: string;
189
228
  }
229
+ export declare type IDropdowItemProps = StyledProps<AnchorHTMLAttributes<HTMLAnchorElement>>;
190
230
  export interface IControlledDropdownProps {
191
231
  /**
192
232
  * Text displayed as heading in the dropdown
@@ -196,10 +236,6 @@ export interface IControlledDropdownProps {
196
236
  * options to display
197
237
  */
198
238
  options?: IOptionItem[];
199
- /**
200
- * Color for active status (default primary)
201
- */
202
- activeColor?: string;
203
239
  /**
204
240
  * Set if the dropdown is active or not
205
241
  */
@@ -232,12 +268,12 @@ export interface IControlledDropdownProps {
232
268
  * Callback called when main link or last option lose focus
233
269
  */
234
270
  onBlur?: () => void;
235
- }
236
- export interface IControlledDropdownHeaderProps extends StyledProps<any> {
237
271
  /**
238
- * Color for active status (default primary)
272
+ * Additional CSS class names to apply to the navigation component.
239
273
  */
240
- activeColor: string;
274
+ className?: string;
275
+ }
276
+ export interface IControlledDropdownHeaderProps extends StyledProps<any> {
241
277
  /**
242
278
  * Set if the dropdown is active or not
243
279
  */
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { StyledProps } from 'styled-components';
3
3
  export declare type HarmonicSize = 'small' | 'medium' | 'large';
4
- export declare type HarmonicColors = 'black' | 'red' | 'grey';
4
+ export declare type HarmonicColors = 'primary' | 'black' | 'white' | 'red' | 'grey';
5
5
  export interface IGenericTypographyProps {
6
6
  children: ReactNode;
7
7
  size?: HarmonicSize;
@@ -9,6 +9,7 @@ export interface IGenericTypographyProps {
9
9
  color?: HarmonicColors;
10
10
  em?: boolean;
11
11
  bold?: boolean;
12
+ className?: string;
12
13
  }
13
14
  export interface IHarmonicHeaderProps extends IGenericTypographyProps {
14
15
  hierarchy: 'h1' | 'h2' | 'h3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/harmonic",
3
- "version": "0.1.6",
3
+ "version": "0.1.7-b",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -65,20 +65,19 @@
65
65
  "@size-limit/file": "^11.1.6",
66
66
  "@size-limit/webpack": "^11.1.6",
67
67
  "@size-limit/webpack-why": "^11.1.6",
68
- "@storybook/addon-a11y": "8.4.0",
69
- "@storybook/addon-docs": "8.4.0",
70
- "@storybook/addon-essentials": "8.4.0",
71
- "@storybook/addon-jest": "8.4.0",
72
- "@storybook/addon-links": "8.4.0",
73
- "@storybook/addon-mdx-gfm": "8.4.0",
74
- "@storybook/addon-toolbars": "8.4.0",
68
+ "@storybook/addon-a11y": "^8.6.10",
69
+ "@storybook/addon-designs": "^8.2.1",
70
+ "@storybook/addon-docs": "^8.6.10",
71
+ "@storybook/addon-essentials": "^8.6.10",
72
+ "@storybook/addon-jest": "^8.6.10",
73
+ "@storybook/addon-links": "^8.6.10",
75
74
  "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
76
- "@storybook/addons": "7.6.20",
77
- "@storybook/blocks": "8.4.0",
78
- "@storybook/react": "8.4.0",
79
- "@storybook/react-webpack5": "8.4.0",
80
- "@storybook/storybook-deployer": "2.8.11",
81
- "@storybook/theming": "8.4.0",
75
+ "@storybook/blocks": "^8.6.10",
76
+ "@storybook/manager-api": "^8.6.10",
77
+ "@storybook/react": "^8.6.10",
78
+ "@storybook/react-webpack5": "^8.6.10",
79
+ "@storybook/storybook-deployer": "^2.8.16",
80
+ "@storybook/theming": "^8.6.10",
82
81
  "@testing-library/jest-dom": "^6.0.0",
83
82
  "@testing-library/react": "^12.1.2",
84
83
  "@testing-library/user-event": "^13.5.0",
@@ -106,7 +105,7 @@
106
105
  "eslint-plugin-prettier": "^5.2.1",
107
106
  "eslint-plugin-react": "^7.28.0",
108
107
  "eslint-plugin-react-hooks": "^4.3.0",
109
- "eslint-plugin-storybook": "^0.9.0",
108
+ "eslint-plugin-storybook": "^0.12.0",
110
109
  "husky": "^7.0.4",
111
110
  "identity-obj-proxy": "^3.0.0",
112
111
  "jest": "^29.0.0",
@@ -120,7 +119,7 @@
120
119
  "react-test-renderer": "^17.0.2",
121
120
  "rollup-plugin-postcss": "^4.0.2",
122
121
  "size-limit": "^11.1.6",
123
- "storybook": "8.4.0",
122
+ "storybook": "^8.6.10",
124
123
  "styled-components": "5.3.9",
125
124
  "ts-jest": "^29.0.0",
126
125
  "tsdx": "^0.14.1",
@@ -143,4 +142,4 @@
143
142
  "npx prettier src --write --uncommitted"
144
143
  ]
145
144
  }
146
- }
145
+ }