@royaloperahouse/harmonic 0.11.0-j → 0.11.0-k

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,7 +6,8 @@ import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, Integrated
6
6
  import { MiniCard } from './components/molecules';
7
7
  import { ModalWindow } from './components/organisms';
8
8
  import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButton';
9
- import HarmonicThemeProvider from './styles/HarmonicThemeProvider';
9
+ import HarmonicThemeProvider, { useHarmonicTheme } from './styles/HarmonicThemeProvider';
10
10
  import { HarmonicSize } from './types/typography';
11
11
  import { HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText } from './components/Typography';
12
+ export { useHarmonicTheme };
12
13
  export { Accordion, Accordions, AnchorBar, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyContent, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, Carousel, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, HarmonicSize, HarmonicThemeProvider, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, HotFilters, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, IInformationCTAProps, IInformationTitleProps, ITimerProps, IntegratedTimerProps, MinimalCarousel, MiniCard, ModalWindow, Navigation, Overline, PageHeading, PageHeadingCompact, PageHeadingImpact, PageHeadingPanel, PageHeadingPromo, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, SignUpForm, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, Table, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, ThemeColor, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText, };
@@ -2,9 +2,12 @@ import React from 'react';
2
2
  import { ThemeType } from '../../types';
3
3
  import './theme/fonts.css';
4
4
  import './theme/typography.css';
5
+ export declare const DEFAULT_THEME = ThemeType.Core;
5
6
  interface HarmonicThemeProviderProps {
6
7
  theme: ThemeType;
7
8
  children: React.ReactNode;
8
9
  }
10
+ export declare const HarmonicThemeContext: React.Context<ThemeType>;
11
+ export declare const useHarmonicTheme: () => ThemeType;
9
12
  declare const HarmonicThemeProvider: React.FC<HarmonicThemeProviderProps>;
10
13
  export default HarmonicThemeProvider;
@@ -1,2 +1,3 @@
1
- import HarmonicThemeProvider from './HarmonicThemeProvider';
1
+ import HarmonicThemeProvider, { useHarmonicTheme } from './HarmonicThemeProvider';
2
2
  export default HarmonicThemeProvider;
3
+ export { useHarmonicTheme };
@@ -2,7 +2,7 @@ import { ListingPerson } from './types';
2
2
  export interface ICreditListing {
3
3
  roles: {
4
4
  name: string;
5
- people: ListingPerson[];
5
+ people: ListingPerson[] | ListingPerson[][];
6
6
  description: string;
7
7
  musicTitle: string[];
8
8
  replacement: string;
@@ -187,4 +187,6 @@ export interface IPageHeadingPromoProps {
187
187
  * Badge variant
188
188
  */
189
189
  badge?: PageHeadingPromoBadge;
190
+ /** Custom CSS classes */
191
+ className?: string;
190
192
  }
@@ -1,6 +1,5 @@
1
1
  import { DirectionType, IconNameType } from './iconTypes';
2
- import { LinkTarget } from './types';
3
- import type { ThemeChildProps } from './types';
2
+ import { LinkTarget, ThemeType } from './types';
4
3
  import type { HarmonicSize } from './typography';
5
4
  export declare const InformationCtaVariants: {
6
5
  readonly Primary: "Primary";
@@ -9,60 +8,41 @@ export declare const InformationCtaVariants: {
9
8
  readonly TextLink: "TextLink";
10
9
  };
11
10
  export declare type InformationCtaVariant = keyof typeof InformationCtaVariants;
12
- declare type ThemeProps = Pick<ThemeChildProps, 'theme'>;
13
- export interface IInformationCTAProps extends ThemeProps {
14
- /**
15
- * Text to display on the CTA
16
- */
11
+ export interface IInformationCTAProps {
12
+ /** Text to display on the CTA */
17
13
  text: string;
18
- /**
19
- * Link for the CTA
20
- */
14
+ /** Link for the CTA */
21
15
  link: string;
22
- /**
23
- * Style of the CTA
24
- */
16
+ /** Style of the CTA */
25
17
  variant?: InformationCtaVariant;
26
- /**
27
- * Name of the icon to be used in the button
28
- */
18
+ /** Name of the icon to be used in the button */
29
19
  iconName?: IconNameType;
30
- /**
31
- * Direction of the icon used in the button
32
- */
20
+ /** Direction of the icon used in the button */
33
21
  iconDirection?: DirectionType;
34
- /**
35
- * Attribute to specify where to open the link
36
- */
22
+ /** Attribute to specify where to open the link */
37
23
  target?: LinkTarget;
24
+ /** Custom CSS classes */
25
+ className?: string;
38
26
  }
39
- export declare type InformationCTAWrapperProps = Pick<IInformationCTAProps, 'variant' | 'theme'>;
27
+ export declare type InformationCTAWrapperProps = {
28
+ /** Style of the CTA */
29
+ variant: InformationCtaVariant;
30
+ /** Theme options */
31
+ theme?: ThemeType;
32
+ };
40
33
  export interface IInformationTitleProps {
41
- /**
42
- * Title text to display
43
- */
34
+ /** Title text to display */
44
35
  text: string;
45
- /**
46
- * The size of the title text
47
- */
36
+ /** The size of the title text */
48
37
  textSize: HarmonicSize;
49
38
  }
50
- export interface IInformationProps extends ThemeProps {
51
- /**
52
- * Main body text to display in the Information Component
53
- */
39
+ export interface IInformationProps {
40
+ /** Main body text to display in the Information Component */
54
41
  body: string;
55
- /**
56
- * Optional CTA to display underneath the body text
57
- */
42
+ /** Optional CTA to display underneath the body text */
58
43
  cta?: IInformationCTAProps;
59
- /**
60
- * Title options for the component
61
- */
44
+ /** Title options for the component */
62
45
  title?: IInformationTitleProps;
63
- /**
64
- * Additional CSS class names to apply to component.
65
- */
46
+ /** Custom CSS classes */
66
47
  className?: string;
67
48
  }
68
- export {};
@@ -275,26 +275,20 @@ export interface IAnchorBarAbsolutePositionParams {
275
275
  topOffset: number;
276
276
  }
277
277
  export interface IAnchorBarProps {
278
- /**
279
- * Tabs displayed in the anchor bar
280
- */
278
+ /** Tabs displayed in the anchor bar */
281
279
  tabs: AnchorBarTab[];
282
- /**
283
- * Function to be called when a tab is clicked
284
- */
280
+ /** Function to be called when a tab is clicked */
285
281
  onTabClick?: (e: MouseEvent, id: string) => void;
286
- /**
287
- * Set the id of the tab actived
288
- */
282
+ /** Set the id of the active tab */
289
283
  activeTab?: string;
290
- /**
291
- * Only for IOS devices that do not fully support sticky position, in case a keyboard is opened on the device
292
- */
284
+ /** Only for IOS devices that do not fully support sticky position, in case a keyboard is opened on the device */
293
285
  absolutePositionParams?: IAnchorBarAbsolutePositionParams;
294
- /**
295
- * Boolean to set bottom border
296
- */
286
+ /** Boolean to set bottom border */
297
287
  bottomBorder?: boolean;
288
+ /** Flag indicating whether the bar should have a shadow */
289
+ withShadow?: boolean;
290
+ /** Custom CSS classes */
291
+ className?: string;
298
292
  }
299
293
  export interface ITitleCTAProps {
300
294
  /**
@@ -331,43 +325,27 @@ export interface IAnchorTabsListProps {
331
325
  hasTwoArrows: boolean;
332
326
  }
333
327
  export interface IAnchorTabBarBorderProps {
334
- /**
335
- * Boolean to set bottom border
336
- */
337
- bottomBorder: boolean;
338
- }
339
- export interface IAnchorTabArrowsBoxProps {
340
- /**
341
- * Boolean to determine width of the arrows container
342
- */
343
- fullWidth: boolean;
328
+ /** Boolean to set bottom border */
329
+ bottomBorder?: boolean;
330
+ /** Flag indicating whether the anchor bar should have a shadow */
331
+ withShadow?: boolean;
344
332
  }
345
333
  export interface ITabLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
346
334
  children: ReactNode;
347
- /**
348
- * Function to be called when a button is clicked
349
- */
335
+ /** Function to be called when a button is clicked */
350
336
  onClick?: MouseEventHandler<HTMLAnchorElement>;
351
- /**
352
- * Name of the icon to be used in the button
353
- */
337
+ /** Name of the icon to be used in the button */
354
338
  iconName?: IconNameType;
355
- /**
356
- * Direction of the icon used in the button
357
- */
339
+ /** Direction of the icon used in the button */
358
340
  iconDirection?: DirectionType;
359
- /**
360
- * Color of text and icon
361
- */
341
+ /** Color of text and icon */
362
342
  color?: ThemeColor;
363
- /**
364
- * Color of text and icon on hover
365
- */
343
+ /** Color of text and icon on hover */
366
344
  hoverColor?: ThemeColor;
367
- /**
368
- * Set if tab is selected or not
369
- */
345
+ /** Set if tab is selected or not */
370
346
  selected?: boolean;
347
+ /** Custom CSS classes */
348
+ className?: string;
371
349
  }
372
350
  export interface IStickyBarProps {
373
351
  children: ReactNode;
@@ -53,14 +53,8 @@ export declare enum ThemeType {
53
53
  Cinema = "cinema",
54
54
  Schools = "schools"
55
55
  }
56
- export declare type ThemeChildProps = {
57
- className?: string;
58
- theme?: ThemeType;
59
- };
60
56
  export interface IThemeProviderProps {
61
- /**
62
- * The theme to use for the child elements
63
- */
57
+ /** The theme to use for the child elements */
64
58
  theme: ThemeType;
65
59
  children: ReactNode;
66
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/harmonic",
3
- "version": "0.11.0-j",
3
+ "version": "0.11.0-k",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",