@royaloperahouse/chord 2.2.7 → 2.2.8
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 +4 -0
- package/dist/chord.cjs.development.js +669 -342
- 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 +667 -343
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/atoms/Radio/Radio.d.ts +3 -0
- package/dist/components/atoms/Radio2/Radio2.d.ts +23 -0
- package/dist/components/atoms/Radio2/Radio2.style.d.ts +7 -0
- package/dist/components/atoms/Radio2/index.d.ts +2 -0
- package/dist/components/atoms/Tickbox/Tickbox.d.ts +3 -0
- package/dist/components/atoms/Tickbox2/Tickbox2.d.ts +23 -0
- package/dist/components/atoms/Tickbox2/Tickbox2.style.d.ts +7 -0
- package/dist/components/atoms/Tickbox2/index.d.ts +2 -0
- package/dist/components/atoms/index.d.ts +3 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/components/molecules/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/components/molecules/RadioGroup2/RadioGroup2.d.ts +38 -0
- package/dist/components/molecules/RadioGroup2/RadioGroup2.style.d.ts +4 -0
- package/dist/components/molecules/RadioGroup2/index.d.ts +2 -0
- package/dist/components/molecules/index.d.ts +2 -1
- package/dist/index.d.ts +2 -2
- package/dist/types/formTypes.d.ts +112 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IRadio2Props } from '../../../types/formTypes';
|
|
3
|
+
/**
|
|
4
|
+
* A Radio component, that wraps around the native `<input type="radio"/>` element
|
|
5
|
+
* and adds some extra styling, states and information around it (i.e. an error label,
|
|
6
|
+
* error state).
|
|
7
|
+
*
|
|
8
|
+
* # Error state
|
|
9
|
+
* An error label will be shown below the radio if the `error` prop exists.
|
|
10
|
+
* Also radio 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
|
+
* # Black box mode
|
|
18
|
+
* If `blackBox` prop is true checked state will be styled as black box with white tick icon.
|
|
19
|
+
* This style was used before as a default. Not preferred in new components.
|
|
20
|
+
* This will be ignored if `darkMode` is true.
|
|
21
|
+
*/
|
|
22
|
+
declare const Radio2: React.ForwardRefExoticComponent<IRadio2Props & React.RefAttributes<HTMLInputElement>>;
|
|
23
|
+
export default Radio2;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IRadio2Props } from '../../../types/formTypes';
|
|
2
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const Radio: import("styled-components").StyledComponent<"div", any, Pick<IRadio2Props, "error" | "darkMode" | "disabled" | "blackBox">, never>;
|
|
4
|
+
export declare const TickboxLabel: import("styled-components").StyledComponent<"label", any, Pick<IRadio2Props, "darkMode" | "blackBox">, never>;
|
|
5
|
+
export declare const RadioIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const TextLabel: import("styled-components").StyledComponent<"div", any, Pick<IRadio2Props, "darkMode" | "disabled">, never>;
|
|
7
|
+
export declare const ErrorLabel: import("styled-components").StyledComponent<"div", any, Pick<IRadio2Props, "darkMode">, never>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ITickbox2Props } from '../../../types/formTypes';
|
|
3
|
+
/**
|
|
4
|
+
* A Tickbox component, that wraps around the native `<input type="checkbox"/>` element
|
|
5
|
+
* and adds some extra styling, states and information around it (i.e. an error label,
|
|
6
|
+
* error state).
|
|
7
|
+
*
|
|
8
|
+
* # Error state
|
|
9
|
+
* An error label will be shown below the tickbox if the `error` prop exists.
|
|
10
|
+
* Also tickbox 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
|
+
* # Black box mode
|
|
18
|
+
* If `blackBox` prop is true checked state will be styled as black box with white tick icon.
|
|
19
|
+
* This style was used before as a default. Not preferred in new components.
|
|
20
|
+
* This will be ignored if `darkMode` is true.
|
|
21
|
+
*/
|
|
22
|
+
declare const Tickbox2: React.ForwardRefExoticComponent<ITickbox2Props & React.RefAttributes<HTMLInputElement>>;
|
|
23
|
+
export default Tickbox2;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ITickbox2Props } from '../../../types/formTypes';
|
|
2
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const Tickbox: import("styled-components").StyledComponent<"div", any, Pick<ITickbox2Props, "error" | "darkMode" | "disabled" | "blackBox">, never>;
|
|
4
|
+
export declare const TickboxLabel: import("styled-components").StyledComponent<"label", any, Pick<ITickbox2Props, "darkMode" | "blackBox">, never>;
|
|
5
|
+
export declare const TickboxIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const TextLabel: import("styled-components").StyledComponent<"div", any, Pick<ITickbox2Props, "darkMode" | "disabled">, never>;
|
|
7
|
+
export declare const ErrorLabel: import("styled-components").StyledComponent<"div", any, Pick<ITickbox2Props, "darkMode">, never>;
|
|
@@ -6,6 +6,7 @@ import { Icon } from './Icons';
|
|
|
6
6
|
import ImageAspectRatioWrapper from './ImageAspectRatioWrapper';
|
|
7
7
|
import Progress from './Progress';
|
|
8
8
|
import Radio from './Radio';
|
|
9
|
+
import Radio2 from './Radio2';
|
|
9
10
|
import RotatorButtons from './RotatorButtons';
|
|
10
11
|
import SecondaryLogo from './SecondaryLogo';
|
|
11
12
|
import SectionSplitter from './SectionSplitter';
|
|
@@ -18,9 +19,10 @@ import TextField from './TextField';
|
|
|
18
19
|
import TextLink from './TextLink';
|
|
19
20
|
import TextLogo from './TextLogo';
|
|
20
21
|
import Tickbox from './Tickbox';
|
|
22
|
+
import Tickbox2 from './Tickbox2';
|
|
21
23
|
import Timer from './Timer';
|
|
22
24
|
import TypeTags from './TypeTags';
|
|
23
25
|
import { AltHeader, BodyText, Header, Overline, Subtitle } from './Typography';
|
|
24
26
|
import VideoControls from './VideoControls';
|
|
25
27
|
import { Stepper } from './Stepper';
|
|
26
|
-
export { AltHeader, BodyText, CinemaBadge, ControlledDropdown, Grid, GridItem, Header, Icon, ImageAspectRatioWrapper, Overline, Progress, PrimaryButton, Radio, RotatorButtons, SecondaryButton, SecondaryLogo, SectionSplitter, SponsorLogo, Sponsorship, Stepper, StreamBadge, Subtitle, Tab, TabLink, TertiaryButton, TextArea, TextField, TextLink, TextLogo, Tickbox, Timer, TypeTags, VideoControls, };
|
|
28
|
+
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, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, VideoControls, };
|
|
@@ -1,6 +1,6 @@
|
|
|
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';
|
|
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, ReadMore, StatusBanner, SearchBar, SectionTitle, Select, 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, 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, RadioGroup, ReadMore, RotatorButtons, SecondaryButton, SecondaryLogo, StatusBanner, 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, 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, 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, };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { IRadioGroupProps } from '../../../types/formTypes';
|
|
2
|
+
/**
|
|
3
|
+
* DEPRECATED. Use RadioGroup2 instead
|
|
4
|
+
*/
|
|
2
5
|
declare const RadioGroup: ({ radios, columnStartDesktop, columnStartDevice, columnSpanDesktop, columnSpanDevice, columnStartSmallDevice, columnSpanSmallDevice, onChange, }: IRadioGroupProps) => JSX.Element;
|
|
3
6
|
export default RadioGroup;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { IRadioGroup2Props } from '../../../types/formTypes';
|
|
3
|
+
/**
|
|
4
|
+
* A RadioGroup component, that renders set of Radio2 components inside.
|
|
5
|
+
* `name` prop should be specified and will be passed as a `name` to each
|
|
6
|
+
* radio to combine them in one group.
|
|
7
|
+
*
|
|
8
|
+
* # Radios
|
|
9
|
+
* `radios` prop is an array of radios that should be renderet. This is an
|
|
10
|
+
* array of objects `{content: ReactNode, value: string | number}`.
|
|
11
|
+
*
|
|
12
|
+
* # Default value
|
|
13
|
+
* `defaultValue` prop can be specified to make one of radios checked inittially.
|
|
14
|
+
* This should be equal to `value` of one of `radios`.
|
|
15
|
+
*
|
|
16
|
+
* # Error state
|
|
17
|
+
* An error label will be shown below the radios if the `error` prop exists.
|
|
18
|
+
* Also radios will be rendered with a red border. An empty string can be passed to
|
|
19
|
+
* render only error state without error message.
|
|
20
|
+
*
|
|
21
|
+
* # Horizontal mode
|
|
22
|
+
* If `horizontalMode` prop is true radios will be placed in a row instead of column.
|
|
23
|
+
*
|
|
24
|
+
* # Distance between radios
|
|
25
|
+
* `gap` prop allow to control distance between radios in pixels. This works in default and
|
|
26
|
+
* horizontal modes.
|
|
27
|
+
*
|
|
28
|
+
* # Light / Dark mode
|
|
29
|
+
* The component can also adapt its styles for light / dark mode. If you want this component
|
|
30
|
+
* to be rendered on a dark / coloured background, you can use the `darkMode` prop.
|
|
31
|
+
*
|
|
32
|
+
* # Black box mode
|
|
33
|
+
* If `blackBox` prop is true checked state will be styled as black box with white tick icon.
|
|
34
|
+
* This style was used before as a default. Not preferred in new components.
|
|
35
|
+
* This will be ignored if `darkMode` is true.
|
|
36
|
+
*/
|
|
37
|
+
declare const RadioGroup2: FunctionComponent<IRadioGroup2Props>;
|
|
38
|
+
export default RadioGroup2;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IRadioGroup2Props } from '../../../types/formTypes';
|
|
2
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const RadioGroup: import("styled-components").StyledComponent<"div", any, Pick<IRadioGroup2Props, "horizontalMode" | "gap">, never>;
|
|
4
|
+
export declare const ErrorLabel: import("styled-components").StyledComponent<"div", any, Pick<IRadioGroup2Props, "darkMode">, never>;
|
|
@@ -13,6 +13,7 @@ import { PeopleListing, CreditListing } from './PeopleListing';
|
|
|
13
13
|
import PromoWithTags from './PromoWithTags';
|
|
14
14
|
import PromoWithTitle from './PromoWithTitle';
|
|
15
15
|
import RadioGroup from './RadioGroup';
|
|
16
|
+
import RadioGroup2 from './RadioGroup2';
|
|
16
17
|
import StatusBanner from './StatusBanner';
|
|
17
18
|
import SearchBar from './SearchBar';
|
|
18
19
|
import SectionTitle from './SectionTitle';
|
|
@@ -26,4 +27,4 @@ import MiniCard from './MiniCard';
|
|
|
26
27
|
import ReadMore from './ReadMore';
|
|
27
28
|
import AuxiliaryNav from './AuxiliaryNav';
|
|
28
29
|
import PasswordStrength from './PasswordStrength';
|
|
29
|
-
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, ReadMore, Quote, StatusBanner, SectionTitle, SearchBar, Select, Tabs, TextOnly, UpsellCard, };
|
|
30
|
+
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, Tabs, TextOnly, UpsellCard, };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, RadioGroup, ReadMore, RotatorButtons, StatusBanner, 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, 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, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, TextOnly, ThemeProvider, TitleWithCTA, Tab, 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
|
-
export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, 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, RadioGroup, ReadMore, RotatorButtons, StatusBanner, 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, };
|
|
7
|
+
export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, 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, 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, };
|
|
@@ -70,6 +70,118 @@ export interface ITextFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
70
70
|
*/
|
|
71
71
|
width?: number;
|
|
72
72
|
}
|
|
73
|
+
export interface ITickbox2Props extends InputHTMLAttributes<HTMLInputElement> {
|
|
74
|
+
/**
|
|
75
|
+
* The content of tickbox
|
|
76
|
+
*/
|
|
77
|
+
children: React.ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* An error label to be shown below the tickbox.
|
|
80
|
+
* Tickbox will be rendered with a red border if this prop exist.
|
|
81
|
+
* Empty string can be passed to render only error state without
|
|
82
|
+
* error message.
|
|
83
|
+
*/
|
|
84
|
+
error?: string;
|
|
85
|
+
/**
|
|
86
|
+
* A style prop that allows us to change what colours to
|
|
87
|
+
* use for light or dark mode (e.g. text color, border color, etc...)
|
|
88
|
+
* based on the background color.
|
|
89
|
+
*
|
|
90
|
+
* Defaults to `false`.
|
|
91
|
+
*/
|
|
92
|
+
darkMode?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Use a black background and white checkmark for the tickbox.
|
|
95
|
+
* This style was used before as a default. Not preferred in new components.
|
|
96
|
+
*
|
|
97
|
+
* Defaults to `false`.
|
|
98
|
+
*/
|
|
99
|
+
blackBox?: boolean;
|
|
100
|
+
}
|
|
101
|
+
export interface IRadio2Props extends InputHTMLAttributes<HTMLInputElement> {
|
|
102
|
+
/**
|
|
103
|
+
* The content of radio
|
|
104
|
+
*/
|
|
105
|
+
children: React.ReactNode;
|
|
106
|
+
/**
|
|
107
|
+
* An error label to be shown below the radio.
|
|
108
|
+
* Radio will be rendered with a red border if this prop exist.
|
|
109
|
+
* Empty string can be passed to render only error state without
|
|
110
|
+
* error message.
|
|
111
|
+
*/
|
|
112
|
+
error?: string;
|
|
113
|
+
/**
|
|
114
|
+
* A style prop that allows us to change what colours to
|
|
115
|
+
* use for light or dark mode (e.g. text color, border color, etc...)
|
|
116
|
+
* based on the background color.
|
|
117
|
+
*
|
|
118
|
+
* Defaults to `false`.
|
|
119
|
+
*/
|
|
120
|
+
darkMode?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Use a black background and white checkmark for the radio.
|
|
123
|
+
* This style was used before as a default. Not preferred in new components.
|
|
124
|
+
*
|
|
125
|
+
* Defaults to `false`.
|
|
126
|
+
*/
|
|
127
|
+
blackBox?: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface IRadioGroup2Radio {
|
|
130
|
+
content: React.ReactNode;
|
|
131
|
+
value: string | number;
|
|
132
|
+
}
|
|
133
|
+
export interface IRadioGroup2Props {
|
|
134
|
+
/**
|
|
135
|
+
* Array of radios
|
|
136
|
+
*/
|
|
137
|
+
radios: IRadioGroup2Radio[];
|
|
138
|
+
/**
|
|
139
|
+
* Name property for radios.
|
|
140
|
+
*/
|
|
141
|
+
name: string;
|
|
142
|
+
/**
|
|
143
|
+
* Render radios horizontally.
|
|
144
|
+
*
|
|
145
|
+
* Defaults to `false`.
|
|
146
|
+
*/
|
|
147
|
+
horizontalMode?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Callback on change of radio.
|
|
150
|
+
*/
|
|
151
|
+
onChange?: (value: string) => void;
|
|
152
|
+
/**
|
|
153
|
+
* Value of default checked radio.
|
|
154
|
+
*/
|
|
155
|
+
defaultValue?: string | number;
|
|
156
|
+
/**
|
|
157
|
+
* Distance between radio elements in px.
|
|
158
|
+
*
|
|
159
|
+
* Defaults to `30`.
|
|
160
|
+
*/
|
|
161
|
+
gap?: number;
|
|
162
|
+
/**
|
|
163
|
+
* An error label to be shown below the radiogroup.
|
|
164
|
+
* Radios will be rendered with a red border if this prop exist.
|
|
165
|
+
* Empty string can be passed to render only error state without
|
|
166
|
+
* error message.
|
|
167
|
+
*/
|
|
168
|
+
error?: string;
|
|
169
|
+
/**
|
|
170
|
+
* A style prop that allows us to change what colours to
|
|
171
|
+
* use for light or dark mode (e.g. text color, border color, etc...)
|
|
172
|
+
* based on the background color.
|
|
173
|
+
*
|
|
174
|
+
* Defaults to `false`.
|
|
175
|
+
*/
|
|
176
|
+
darkMode?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Use a black background and white checkmark for the radio.
|
|
179
|
+
* This style was used before as a default. Not preferred in new components.
|
|
180
|
+
*
|
|
181
|
+
* Defaults to `false`.
|
|
182
|
+
*/
|
|
183
|
+
blackBox?: boolean;
|
|
184
|
+
}
|
|
73
185
|
export interface IOption<T> {
|
|
74
186
|
text: string;
|
|
75
187
|
readonly value: T;
|