@royaloperahouse/chord 2.2.0-bugfix-revert-column → 2.2.0-c-chord-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
1
  import { AltHeader, BodyText, CinemaBadge, ControlledDropdown, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, Overline, PrimaryButton, Progress, Radio, RotatorButtons, SecondaryButton, SecondaryLogo, TertiaryButton, SectionSplitter, Sponsorship, Stepper, StreamBadge, Subtitle, Tab, TabLink, TextLogo, TextArea, TextField, TextLink, Tickbox, Timer, TypeTags, VideoControls } from './atoms';
2
2
  import { AnchorTabBar, Footer, LiveChat, Navigation, StickyBar, TitleWithCTA, UpsellSection } from './organisms';
3
- import { Accordion, Accordions, AnnouncementBanner, Card, Cards, ContactCard, ContentSummary, CreditListing, Editorial, ImageWithCaption, Information, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PeopleListing, PromoWithTags, PromoWithTitle, RadioGroup, SearchBar, SectionTitle, Select, Tabs, TextOnly, UpsellCard, Quote } from './molecules';
3
+ import { Accordion, Accordions, AnnouncementBanner, Card, Cards, ContactCard, ContentSummary, CreditListing, Editorial, ImageWithCaption, Information, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PeopleListing, PromoWithTags, PromoWithTitle, RadioGroup, ReadMore, SearchBar, SectionTitle, Select, Tabs, TextOnly, UpsellCard, Quote } from './molecules';
4
4
  import ThemeProvider from '../styles/ThemeProvider';
5
5
  import GlobalStyles from '../styles/GlobalStyles';
6
- export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, 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, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, RadioGroup, RotatorButtons, SecondaryButton, SecondaryLogo, SearchBar, SectionTitle, Select, Sponsorship, Stepper, StickyBar, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, SectionSplitter, Tab, TabLink, Tabs, TextArea, TextField, TextLink, TextLogo, Tickbox, Timer, TypeTags, UpsellCard, UpsellSection, Quote, LiveChat, VideoControls, };
6
+ export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, 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, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, RadioGroup, ReadMore, RotatorButtons, SecondaryButton, SecondaryLogo, SearchBar, SectionTitle, Select, Sponsorship, Stepper, StickyBar, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, SectionSplitter, Tab, TabLink, Tabs, TextArea, TextField, TextLink, TextLogo, Tickbox, Timer, TypeTags, UpsellCard, UpsellSection, Quote, LiveChat, VideoControls, };
@@ -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, };
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IReadMoreProps } from '../../../types/types';
3
+ declare const ReadMore: FunctionComponent<IReadMoreProps>;
4
+ export default ReadMore;
@@ -0,0 +1,4 @@
1
+ export declare const ReadMoreContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const LinkContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const FullTextContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const ContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,2 @@
1
+ import ReadMore from './ReadMore';
2
+ export default ReadMore;
@@ -22,4 +22,5 @@ import UpsellCard from './UpsellCard';
22
22
  import ImageWithCaption from './ImageWithCaption';
23
23
  import Quote from './Quote';
24
24
  import MiniCard from './MiniCard';
25
- export { Accordion, Accordions, AnnouncementBanner, Card, Cards, ContactCard, ContentSummary, CreditListing, Editorial, ImageWithCaption, Information, MiniCard, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PeopleListing, PromoWithTags, PromoWithTitle, RadioGroup, Quote, SectionTitle, SearchBar, Select, Tabs, TextOnly, UpsellCard, };
25
+ import ReadMore from './ReadMore';
26
+ export { Accordion, Accordions, AnnouncementBanner, Card, Cards, ContactCard, ContentSummary, CreditListing, Editorial, ImageWithCaption, Information, MiniCard, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PeopleListing, PromoWithTags, PromoWithTitle, RadioGroup, ReadMore, Quote, SectionTitle, SearchBar, Select, Tabs, TextOnly, UpsellCard, };
@@ -1,3 +1,5 @@
1
+ import React from 'react';
1
2
  export declare const stripAllHtmlTags: (htmlString: string) => string;
2
3
  export declare const truncateHtmlString: (str: string, resultLength: number, addDots?: boolean) => string;
3
4
  export declare const truncate: (str: string, n: number) => string;
5
+ export declare const truncateReactNodeString: (node: React.ReactNode, resultLength: number, addDots?: boolean) => string;
@@ -0,0 +1,3 @@
1
+ export declare const keyDown: (e: {
2
+ key: string;
3
+ }, toggleFunction: () => void) => void;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, BodyText, Card, Cards, CinemaBadge, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, LiveChat, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, RadioGroup, RotatorButtons, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, TabLink, Tabs, TextArea, TextField, TextLink, Tickbox, Timer, TypeTags, UpsellCard, UpsellSection, Quote } from './components';
1
+ import { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, BodyText, Card, Cards, CinemaBadge, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, LiveChat, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, RadioGroup, ReadMore, RotatorButtons, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Sponsorship, Stepper, StickyBar, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, TabLink, Tabs, TextArea, TextField, TextLink, Tickbox, Timer, TypeTags, UpsellCard, UpsellSection, Quote } 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 } from './types';
5
5
  import { MiniCard } from './components/molecules';
6
- export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AspectRatio, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, ITimerProps, IntegratedTimerProps, LiveChat, MiniCard, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, RadioGroup, RotatorButtons, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextLink, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, zIndexes, };
6
+ import { BrandingStyle } from './types/impactHeader';
7
+ export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AspectRatio, BodyText, BrandingStyle, breakpoints, ButtonType, Card, Cards, CarouselType, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, devices, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, ITimerProps, IntegratedTimerProps, LiveChat, MiniCard, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, RadioGroup, ReadMore, RotatorButtons, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Sponsorship, Stepper, StickyBar, StreamBadge, Subtitle, Tab, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextLink, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, zIndexes, };
@@ -111,17 +111,8 @@ export interface IStepperProps {
111
111
  step?: number;
112
112
  /** An error message to be shown below the stepper.
113
113
  *
114
- * Default: `undefined`
115
114
  */
116
115
  error?: string;
117
- /**
118
- * A style prop that allows us to change what colours to
119
- * use for light or dark mode (e.g. text color, border color, etc...)
120
- * based on the background color.
121
- *
122
- * Defaults to `false`.
123
- */
124
- darkMode?: boolean;
125
116
  /**
126
117
  * Set disapled state
127
118
  */
@@ -130,6 +121,18 @@ export interface IStepperProps {
130
121
  * Minimum value allowed in the stepper
131
122
  */
132
123
  min?: number;
124
+ /**
125
+ * A style prop that allows us to change what colours to
126
+ * use for light or dark mode (e.g. text color, border color, etc...)
127
+ * based on the background color.
128
+ *
129
+ * Defaults to `false`.
130
+ * Specify whether or not the containing element has a dark background.
131
+ * This property affects the border colours for focused and error states.
132
+ *
133
+ * Default: `false`
134
+ */
135
+ darkMode?: boolean;
133
136
  /**
134
137
  * Maximum value allowed in the stepper
135
138
  */
@@ -1,6 +1,7 @@
1
1
  import { ReactNode, AnchorHTMLAttributes, MouseEventHandler } from 'react';
2
2
  import { StyledProps } from 'styled-components';
3
3
  import { IconNameType, DirectionType } from './iconTypes';
4
+ import { TypographyLevel, TypographyType } from './typography';
4
5
  export declare enum Colors {
5
6
  White = "white",
6
7
  Black = "black",
@@ -459,6 +460,18 @@ export interface IAccordionProps {
459
460
  * Set init open
460
461
  */
461
462
  initOpen?: boolean;
463
+ /**
464
+ * Set content type - header or subtitle
465
+ */
466
+ contentType?: TypographyType;
467
+ /**
468
+ * Set display level - aesthetic
469
+ */
470
+ displayLevel?: TypographyLevel;
471
+ /**
472
+ * Set semantic level - not to be used for aesthetic
473
+ */
474
+ semanticLevel?: TypographyLevel;
462
475
  }
463
476
  export interface IAccordionsProps {
464
477
  /**
@@ -484,4 +497,38 @@ export interface IAnnouncementBannerProps {
484
497
  */
485
498
  icon: 'Info' | 'Clock' | 'Location' | 'Reminder' | 'Star';
486
499
  }
500
+ export interface IReadMoreProps {
501
+ /**
502
+ * Read More Component title
503
+ */
504
+ title?: string;
505
+ /**
506
+ * Intro text to be truncated
507
+ */
508
+ introText?: ReactNode;
509
+ /**
510
+ * Component to be wrapped in ReadMore comp
511
+ */
512
+ fullText?: ReactNode;
513
+ /**
514
+ * Set init open
515
+ */
516
+ initOpen: boolean;
517
+ /**
518
+ * Custom text for link when closed
519
+ */
520
+ showMoreText?: string;
521
+ /**
522
+ * Custom text for link when opened
523
+ */
524
+ hideText?: string;
525
+ /**
526
+ * Character limit
527
+ */
528
+ characterLimit?: number;
529
+ /**
530
+ * Optional truncation
531
+ */
532
+ truncate?: boolean;
533
+ }
487
534
  export declare type Image = Pick<HTMLImageElement, 'alt' | 'src'>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/chord",
3
- "version": "2.2.0-bugfix-revert-column",
3
+ "version": "2.2.0-c-chord-development",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",