@royaloperahouse/chord 2.2.11 → 2.2.13
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/CHANGELOG.md +7 -0
- package/dist/chord.cjs.development.js +291 -39
- package/dist/chord.cjs.development.js.map +1 -1
- package/dist/chord.cjs.production.min.js +1 -1
- package/dist/chord.cjs.production.min.js.map +1 -1
- package/dist/chord.esm.js +290 -40
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/molecules/Select2/Select2.d.ts +7 -1
- package/dist/components/molecules/Select2/Select2.style.d.ts +2 -2
- package/dist/components/molecules/Select2Async/Select2Async.d.ts +18 -0
- package/dist/components/molecules/Select2Async/index.d.ts +2 -0
- package/dist/components/molecules/Table/Table.d.ts +4 -0
- package/dist/components/molecules/Table/Table.style.d.ts +16 -0
- package/dist/components/molecules/Table/index.d.ts +2 -0
- package/dist/components/molecules/index.d.ts +3 -1
- package/dist/index.d.ts +2 -2
- package/dist/types/formTypes.d.ts +6 -2
- package/dist/types/tableTypes.d.ts +42 -0
- package/package.json +2 -2
|
@@ -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, TextLink, Tickbox, Tickbox2, Timer, TypeTags, VideoControls } from './atoms';
|
|
2
2
|
import { AnchorTabBar, Footer, LiveChat, Navigation, StickyBar, TitleWithCTA, UpsellSection } 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, Tabs, TextOnly, UpsellCard, Quote } 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 } 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, Sponsorship, Stepper, StickyBar, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, SectionSplitter, Tab, TabLink, Tabs, TextArea, TextField, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, LiveChat, VideoControls, };
|
|
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, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote, LiveChat, VideoControls, };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { DropdownIndicatorProps } from 'react-select';
|
|
2
3
|
import { ISelect2Props } from '../../../types/formTypes';
|
|
4
|
+
export declare const DropdownIndicator: (props: DropdownIndicatorProps) => JSX.Element;
|
|
5
|
+
interface IWrapperProps extends Pick<ISelect2Props, 'label' | 'error' | 'width' | 'darkMode'> {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const WrapperComponent: FunctionComponent<IWrapperProps>;
|
|
3
9
|
/**
|
|
4
10
|
* A Select2 component wraps react-select with Chord styling and additional elements like
|
|
5
11
|
* text and error labels. This should be used just as usual react-select component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ISelect2Props } from '../../../types/formTypes';
|
|
2
2
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const SelectWrapper: import("styled-components").StyledComponent<"div", any, Pick<ISelect2Props, "width" | "darkMode" | "error">, never>;
|
|
4
|
-
export declare const TextLabel: import("styled-components").StyledComponent<"
|
|
5
|
-
export declare const ErrorLabel: import("styled-components").StyledComponent<"
|
|
4
|
+
export declare const TextLabel: import("styled-components").StyledComponent<"div", any, Pick<ISelect2Props, "darkMode">, never>;
|
|
5
|
+
export declare const ErrorLabel: import("styled-components").StyledComponent<"div", any, Pick<ISelect2Props, "darkMode">, never>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { ISelect2AsyncProps } from '../../../types/formTypes';
|
|
3
|
+
/**
|
|
4
|
+
* The Select2Async component is similar to Select 2, but uses react-select async
|
|
5
|
+
* component for select instead of regular react-select component. This can be used
|
|
6
|
+
* for selects with dynamically loaded options, live search components etc.
|
|
7
|
+
*
|
|
8
|
+
* # Error state
|
|
9
|
+
* An error label will be shown below the select if the `error` prop exists.
|
|
10
|
+
* Also select will be rendered with a red border. An empty string can be passed to
|
|
11
|
+
* render only error state without error message.
|
|
12
|
+
*
|
|
13
|
+
* # Light / Dark mode
|
|
14
|
+
* The component can also adapt its styles for light / dark mode. If you want this component
|
|
15
|
+
* to be rendered on a dark / coloured background, you can use the `darkMode` prop.
|
|
16
|
+
*/
|
|
17
|
+
declare const SelectComponent: FunctionComponent<ISelect2AsyncProps>;
|
|
18
|
+
export default SelectComponent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Colors } from '../../../types/types';
|
|
2
|
+
export declare const TableHeader: import("styled-components").StyledComponent<"th", any, {}, never>;
|
|
3
|
+
export declare const TableCell: import("styled-components").StyledComponent<"td", any, {
|
|
4
|
+
columns: number;
|
|
5
|
+
}, never>;
|
|
6
|
+
export declare const LineContainer: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
+
lineColor: Colors;
|
|
8
|
+
}, never>;
|
|
9
|
+
export declare const Pagination: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
+
export declare const PageNumber: import("styled-components").StyledComponent<"button", any, {
|
|
11
|
+
active?: string | undefined;
|
|
12
|
+
}, never>;
|
|
13
|
+
export declare const Next: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
14
|
+
export declare const ScrollButtons: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
|
+
export declare const TableContainer: import("styled-components").StyledComponent<"table", any, {}, never>;
|
|
16
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -19,6 +19,7 @@ import SearchBar from './SearchBar';
|
|
|
19
19
|
import SectionTitle from './SectionTitle';
|
|
20
20
|
import Select from './Select';
|
|
21
21
|
import Select2 from './Select2';
|
|
22
|
+
import Select2Async from './Select2Async';
|
|
22
23
|
import Tabs from './Tabs';
|
|
23
24
|
import TextOnly from './TextOnly';
|
|
24
25
|
import UpsellCard from './UpsellCard';
|
|
@@ -28,4 +29,5 @@ import MiniCard from './MiniCard';
|
|
|
28
29
|
import ReadMore from './ReadMore';
|
|
29
30
|
import AuxiliaryNav from './AuxiliaryNav';
|
|
30
31
|
import PasswordStrength from './PasswordStrength';
|
|
31
|
-
|
|
32
|
+
import Table from './Table';
|
|
33
|
+
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, };
|
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, LiveChat, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, TabLink, Tabs, TextArea, TextField, TextLink, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellSection, Quote } 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, LiveChat, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, Table, TabLink, Tabs, TextArea, TextField, TextLink, Tickbox, Tickbox2, 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, EditorialLink } 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, ITimerProps, IntegratedTimerProps, LiveChat, MiniCard, ModalWindow, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextLink, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, 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, ITimerProps, IntegratedTimerProps, LiveChat, MiniCard, ModalWindow, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, Select2, Select2Async, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, Table, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextLink, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, zIndexes, };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { IGridItemProps } from './types';
|
|
3
|
-
import
|
|
3
|
+
import Select from 'react-select';
|
|
4
|
+
import SelectAsync from 'react-select/async';
|
|
4
5
|
export interface ITextAreaProps extends Partial<IGridItemProps>, InputHTMLAttributes<HTMLTextAreaElement> {
|
|
5
6
|
/**
|
|
6
7
|
* A text label to be shown above the text area input box.
|
|
@@ -219,7 +220,7 @@ export interface ISelectProps<T = unknown> {
|
|
|
219
220
|
*/
|
|
220
221
|
resetWhenOptionsUpdate?: boolean;
|
|
221
222
|
}
|
|
222
|
-
|
|
223
|
+
interface ISelect2MainProps {
|
|
223
224
|
/**
|
|
224
225
|
* A text label to be shown above the text input field.
|
|
225
226
|
*/
|
|
@@ -245,6 +246,8 @@ export interface ISelect2Props extends SelectProps {
|
|
|
245
246
|
*/
|
|
246
247
|
darkMode?: boolean;
|
|
247
248
|
}
|
|
249
|
+
export declare type ISelect2Props = ISelect2MainProps & React.ComponentProps<typeof Select>;
|
|
250
|
+
export declare type ISelect2AsyncProps = ISelect2MainProps & React.ComponentProps<typeof SelectAsync>;
|
|
248
251
|
export interface IStepperProps {
|
|
249
252
|
/** The initial value to display in the center of the element */
|
|
250
253
|
initialValue?: number;
|
|
@@ -319,3 +322,4 @@ export interface IRadioGroupProps extends Partial<IGridItemProps> {
|
|
|
319
322
|
*/
|
|
320
323
|
onChange?: (checkedRadio: IRadioProps | undefined) => void;
|
|
321
324
|
}
|
|
325
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Colors } from './types';
|
|
3
|
+
export interface ContentProps {
|
|
4
|
+
content: string | ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface CellProps {
|
|
7
|
+
cell: ReactNode;
|
|
8
|
+
cellIndex: number;
|
|
9
|
+
columns: number;
|
|
10
|
+
}
|
|
11
|
+
export interface RowProps {
|
|
12
|
+
row: any[];
|
|
13
|
+
rowIndex: number;
|
|
14
|
+
columns: number;
|
|
15
|
+
lineColor: Colors;
|
|
16
|
+
}
|
|
17
|
+
export interface ITableProps {
|
|
18
|
+
/**
|
|
19
|
+
* Number of columns in table
|
|
20
|
+
*/
|
|
21
|
+
columns: number;
|
|
22
|
+
/**
|
|
23
|
+
* Headings array
|
|
24
|
+
*/
|
|
25
|
+
headings?: string[];
|
|
26
|
+
/**
|
|
27
|
+
* Table content
|
|
28
|
+
*/
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Line divider color
|
|
32
|
+
*/
|
|
33
|
+
lineColors?: Colors;
|
|
34
|
+
/**
|
|
35
|
+
* Rows in table per page for pagination
|
|
36
|
+
*/
|
|
37
|
+
rowsPerPage: number;
|
|
38
|
+
/**
|
|
39
|
+
* Pagination
|
|
40
|
+
*/
|
|
41
|
+
pagination?: boolean;
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royaloperahouse/chord",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.13",
|
|
4
4
|
"author": "Royal Opera House",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -118,4 +118,4 @@
|
|
|
118
118
|
"react-scrolllock": "^5.0.1",
|
|
119
119
|
"react-select": "^5.8.0"
|
|
120
120
|
}
|
|
121
|
-
}
|
|
121
|
+
}
|