@royaloperahouse/chord 2.2.9-b-chord-development → 2.2.9-d-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.
- package/dist/chord.cjs.development.js +189 -136
- 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 +188 -137
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/molecules/Card/Card.style.d.ts +3 -1
- package/dist/components/molecules/Select/Select.d.ts +1 -0
- package/dist/components/molecules/Select2/Select2.d.ts +18 -0
- package/dist/components/molecules/Select2/Select2.style.d.ts +5 -0
- package/dist/components/molecules/Select2/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 +27 -0
- package/package.json +5 -3
|
@@ -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, 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, 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, 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, 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, };
|
|
@@ -18,7 +18,9 @@ export declare const LabelContainer: import("styled-components").StyledComponent
|
|
|
18
18
|
isVisible: boolean;
|
|
19
19
|
isGridCard: boolean;
|
|
20
20
|
}, never>;
|
|
21
|
-
export declare const ExtraActionsContainer: import("styled-components").StyledComponent<"div", any, {
|
|
21
|
+
export declare const ExtraActionsContainer: import("styled-components").StyledComponent<"div", any, {
|
|
22
|
+
fullWidth?: boolean | undefined;
|
|
23
|
+
}, never>;
|
|
22
24
|
export declare const LabelElements: import("styled-components").StyledComponent<"div", any, {
|
|
23
25
|
bgColor?: Colors | undefined;
|
|
24
26
|
}, never>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { ISelect2Props } from '../../../types/formTypes';
|
|
3
|
+
/**
|
|
4
|
+
* A Select2 component wraps react-select with Chord styling and additional elements like
|
|
5
|
+
* text and error labels. This should be used just as usual react-select component.
|
|
6
|
+
* Note: using some advanced opportunities of react-select may require additional styling.
|
|
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<ISelect2Props>;
|
|
18
|
+
export default SelectComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ISelect2Props } from '../../../types/formTypes';
|
|
2
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
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<"p", any, Pick<ISelect2Props, "darkMode">, never>;
|
|
5
|
+
export declare const ErrorLabel: import("styled-components").StyledComponent<"p", any, Pick<ISelect2Props, "darkMode">, never>;
|
|
@@ -18,6 +18,7 @@ import StatusBanner from './StatusBanner';
|
|
|
18
18
|
import SearchBar from './SearchBar';
|
|
19
19
|
import SectionTitle from './SectionTitle';
|
|
20
20
|
import Select from './Select';
|
|
21
|
+
import Select2 from './Select2';
|
|
21
22
|
import Tabs from './Tabs';
|
|
22
23
|
import TextOnly from './TextOnly';
|
|
23
24
|
import UpsellCard from './UpsellCard';
|
|
@@ -27,4 +28,4 @@ import MiniCard from './MiniCard';
|
|
|
27
28
|
import ReadMore from './ReadMore';
|
|
28
29
|
import PasswordStrength from './PasswordStrength';
|
|
29
30
|
import AuxiliaryNav from './AuxiliaryNav';
|
|
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, };
|
|
31
|
+
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, Tabs, TextOnly, UpsellCard, };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, Stepper, StickyBar, 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, Sponsorship, Stepper, StickyBar, 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';
|
|
@@ -6,4 +6,4 @@ import { MiniCard } from './components/molecules';
|
|
|
6
6
|
import { BrandingStyle } from './types/impactHeader';
|
|
7
7
|
import { ModalWindow } from './components/organisms';
|
|
8
8
|
import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButton';
|
|
9
|
-
export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyText, BrandingStyle, 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, Stepper, StickyBar, StreamBadge, Subtitle, Tab, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextLink, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, zIndexes, };
|
|
9
|
+
export { Accordion, Accordions, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, BodyText, BrandingStyle, 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, Stepper, StickyBar, StreamBadge, Subtitle, Tab, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextLink, TextOnly, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellSection, Quote, zIndexes, };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { IGridItemProps } from './types';
|
|
3
|
+
import { Props as SelectProps } from 'react-select';
|
|
3
4
|
export interface ITextAreaProps extends Partial<IGridItemProps>, InputHTMLAttributes<HTMLTextAreaElement> {
|
|
4
5
|
/**
|
|
5
6
|
* A text label to be shown above the text area input box.
|
|
@@ -218,6 +219,32 @@ export interface ISelectProps<T = unknown> {
|
|
|
218
219
|
*/
|
|
219
220
|
resetWhenOptionsUpdate?: boolean;
|
|
220
221
|
}
|
|
222
|
+
export interface ISelect2Props extends SelectProps {
|
|
223
|
+
/**
|
|
224
|
+
* A text label to be shown above the text input field.
|
|
225
|
+
*/
|
|
226
|
+
label?: string;
|
|
227
|
+
/**
|
|
228
|
+
* An error label to be shown below the text input field.
|
|
229
|
+
* Input will be rendered with a red border if this prop exist.
|
|
230
|
+
* Empty string can be passed to render only error state without
|
|
231
|
+
* error message.
|
|
232
|
+
*/
|
|
233
|
+
error?: string;
|
|
234
|
+
/**
|
|
235
|
+
* Width in pixels.
|
|
236
|
+
* This will limit the maximum width of input element.
|
|
237
|
+
* By default it will take all available space.
|
|
238
|
+
*/
|
|
239
|
+
width?: number;
|
|
240
|
+
/**
|
|
241
|
+
* Specify whether or not the containing element has a dark background.
|
|
242
|
+
* This property affects the border colours for focused and error states.
|
|
243
|
+
*
|
|
244
|
+
* Default: `false`
|
|
245
|
+
*/
|
|
246
|
+
darkMode?: boolean;
|
|
247
|
+
}
|
|
221
248
|
export interface IStepperProps {
|
|
222
249
|
/** The initial value to display in the center of the element */
|
|
223
250
|
initialValue?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royaloperahouse/chord",
|
|
3
|
-
"version": "2.2.9-
|
|
3
|
+
"version": "2.2.9-d-chord-development",
|
|
4
4
|
"author": "Royal Opera House",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
"<rootDir>/src/jest.setup.ts"
|
|
66
66
|
],
|
|
67
67
|
"moduleNameMapper": {
|
|
68
|
-
"^react$": "<rootDir>/node_modules/react",
|
|
69
68
|
"\\.(png|jpg|jpeg)$": "<rootDir>/external/images/mock-image.js"
|
|
70
69
|
},
|
|
71
70
|
"modulePathIgnorePatterns": [
|
|
@@ -101,6 +100,8 @@
|
|
|
101
100
|
"react": "^17.0.2",
|
|
102
101
|
"react-dom": "^17.0.2",
|
|
103
102
|
"react-is": "^17.0.2",
|
|
103
|
+
"react-router-dom": "^6.22.3",
|
|
104
|
+
"react-test-renderer": "^17.0.2",
|
|
104
105
|
"size-limit": "^6.0.4",
|
|
105
106
|
"storybook-addon-designs": "^6.2.0",
|
|
106
107
|
"storybook-addon-pseudo-states": "^1.0.0",
|
|
@@ -113,6 +114,7 @@
|
|
|
113
114
|
"dependencies": {
|
|
114
115
|
"moment": "^2.29.4",
|
|
115
116
|
"react-modal": "^3.16.1",
|
|
116
|
-
"react-scrolllock": "^5.0.1"
|
|
117
|
+
"react-scrolllock": "^5.0.1",
|
|
118
|
+
"react-select": "^5.8.0"
|
|
117
119
|
}
|
|
118
120
|
}
|