@royaloperahouse/chord 2.11.3-dev → 2.12.0
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/README.GIT +282 -0
- package/README.md +40 -255
- package/dist/chord.cjs.development.js +160 -207
- 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 +160 -207
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/atoms/Grid/index.d.ts +1 -2
- package/dist/components/atoms/index.d.ts +2 -2
- package/dist/components/molecules/PageHeading/index.d.ts +1 -1
- package/dist/components/molecules/PeopleListing/CreditListing/CreditListing.style.d.ts +0 -1
- package/dist/components/molecules/Table/Table.style.d.ts +1 -1
- package/dist/components/molecules/index.d.ts +1 -1
- package/dist/types/formTypes.d.ts +9 -12
- package/dist/types/types.d.ts +16 -0
- package/package.json +2 -2
- package/dist/components/atoms/AriaAlternativeDescription/AriaAlternative.d.ts +0 -5
- package/dist/components/atoms/AriaAlternativeDescription/AriaAlternative.style.d.ts +0 -3
- package/dist/components/atoms/AriaAlternativeDescription/index.d.ts +0 -2
- package/dist/components/atoms/Grid/GridItemLegacy.d.ts +0 -8
- package/dist/types/ariaAlternative.d.ts +0 -34
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CinemaBadge, StreamBadge } from './Badge';
|
|
2
2
|
import { PrimaryButton, SecondaryButton, TertiaryButton } from './Buttons';
|
|
3
3
|
import ControlledDropdown from './ControlledDropdown';
|
|
4
|
-
import { Grid, GridItem
|
|
4
|
+
import { Grid, GridItem } from './Grid';
|
|
5
5
|
import { Icon } from './Icons';
|
|
6
6
|
import ImageAspectRatioWrapper from './ImageAspectRatioWrapper';
|
|
7
7
|
import Progress from './Progress';
|
|
@@ -26,4 +26,4 @@ import { AltHeader, BodyText, Header, Overline, Subtitle } from './Typography';
|
|
|
26
26
|
import VideoControls from './VideoControls';
|
|
27
27
|
import { Stepper } from './Stepper';
|
|
28
28
|
import ToggleButton from './ToggleButton/ToggleButton';
|
|
29
|
-
export { AltHeader, BodyText, CinemaBadge, ControlledDropdown, Grid, GridItem,
|
|
29
|
+
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, TextFieldLegacy, TextLink, TextLogo, Tickbox, Tickbox2, Timer, TypeTags, VideoControls, ToggleButton, };
|
|
@@ -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,
|
|
7
|
+
export { PageHeadingCinema, PageHeadingCore, PageHeadingImpact, PageHeadingStream, PageHeadingCompact, PageHeadingPanel, };
|
|
@@ -5,4 +5,3 @@ export declare const CreditListingWrapper: import("styled-components").StyledCom
|
|
|
5
5
|
export declare const DescriptionWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
6
|
export declare const RoleWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
export declare const CreditWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
-
export declare const CreditBodyWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -16,4 +16,4 @@ export declare const PageNumber: import("styled-components").StyledComponent<"bu
|
|
|
16
16
|
}, never>;
|
|
17
17
|
export declare const Next: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
18
18
|
export declare const ScrollButtons: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
19
|
-
export declare const AriaDescription: import("styled-components").StyledComponent<"
|
|
19
|
+
export declare const AriaDescription: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -27,8 +27,8 @@ import ImageWithCaption from './ImageWithCaption';
|
|
|
27
27
|
import Quote from './Quote';
|
|
28
28
|
import MiniCard from './MiniCard';
|
|
29
29
|
import ReadMore from './ReadMore';
|
|
30
|
-
import PasswordStrength from './PasswordStrength';
|
|
31
30
|
import AuxiliaryNav from './AuxiliaryNav';
|
|
31
|
+
import PasswordStrength from './PasswordStrength';
|
|
32
32
|
import Table from './Table';
|
|
33
33
|
import VideoWithControls from './VideoWithControls';
|
|
34
34
|
import SignUpForm from './SignUpForm';
|
|
@@ -265,28 +265,25 @@ export interface IStepperProps {
|
|
|
265
265
|
step?: number;
|
|
266
266
|
/** An error message to be shown below the stepper.
|
|
267
267
|
*
|
|
268
|
+
* Default: `undefined`
|
|
268
269
|
*/
|
|
269
270
|
error?: string;
|
|
270
|
-
/**
|
|
271
|
-
* Set disapled state
|
|
272
|
-
*/
|
|
273
|
-
disabled?: boolean;
|
|
274
|
-
/**
|
|
275
|
-
* Minimum value allowed in the stepper
|
|
276
|
-
*/
|
|
277
|
-
min?: number;
|
|
278
271
|
/**
|
|
279
272
|
* A style prop that allows us to change what colours to
|
|
280
273
|
* use for light or dark mode (e.g. text color, border color, etc...)
|
|
281
274
|
* based on the background color.
|
|
282
275
|
*
|
|
283
276
|
* Defaults to `false`.
|
|
284
|
-
* Specify whether or not the containing element has a dark background.
|
|
285
|
-
* This property affects the border colours for focused and error states.
|
|
286
|
-
*
|
|
287
|
-
* Default: `false`
|
|
288
277
|
*/
|
|
289
278
|
darkMode?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Set disapled state
|
|
281
|
+
*/
|
|
282
|
+
disabled?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* Minimum value allowed in the stepper
|
|
285
|
+
*/
|
|
286
|
+
min?: number;
|
|
290
287
|
/**
|
|
291
288
|
* Maximum value allowed in the stepper
|
|
292
289
|
*/
|
package/dist/types/types.d.ts
CHANGED
|
@@ -512,12 +512,28 @@ export interface IAccordionProps {
|
|
|
512
512
|
* Optional icon to display next to the trigger, e.g. a payment method logo
|
|
513
513
|
*/
|
|
514
514
|
icon?: IconNameType;
|
|
515
|
+
/**
|
|
516
|
+
* Controls the open state externally. When provided, the Accordion becomes
|
|
517
|
+
* "controlled" and its internal open state is ignored - use together with
|
|
518
|
+
* `onToggle`. Used internally by `Accordions` for `onlyOneOpen`.
|
|
519
|
+
*/
|
|
520
|
+
isOpen?: boolean;
|
|
521
|
+
/**
|
|
522
|
+
* Called when the Accordion is toggled. Required when `isOpen` is provided,
|
|
523
|
+
* since the Accordion no longer manages its own open state.
|
|
524
|
+
*/
|
|
525
|
+
onToggle?: () => void;
|
|
515
526
|
}
|
|
516
527
|
export interface IAccordionsProps {
|
|
517
528
|
/**
|
|
518
529
|
* Array of Accordion component
|
|
519
530
|
*/
|
|
520
531
|
items: IAccordionProps[];
|
|
532
|
+
/**
|
|
533
|
+
* When true, opening an Accordion closes any other open Accordion in the
|
|
534
|
+
* list, so at most one item is open at a time.
|
|
535
|
+
*/
|
|
536
|
+
onlyOneOpen?: boolean;
|
|
521
537
|
}
|
|
522
538
|
export interface IAnnouncementBannerProps {
|
|
523
539
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royaloperahouse/chord",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"author": "Royal Opera House",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"storybook": "start-storybook -s ./external -p 6006",
|
|
24
24
|
"build-storybook-dev": "build-storybook",
|
|
25
25
|
"build-storybook": "rm -rf ./storybook-static; build-storybook -s ./src -o ./storybook-static; cp -r ./external/ ./storybook-static/",
|
|
26
|
-
"deploy-storybook-dev": "
|
|
26
|
+
"deploy-storybook-dev": "chromatic --build-script-name build-storybook-dev",
|
|
27
27
|
"deploy-storybook": "storybook-to-aws-s3 --bucket-path=chord.roh.org.uk --aws-profile=parent --existing-output-dir=storybook-static --s3-sync-options=--acl=public-read",
|
|
28
28
|
"test-storybook": "tsdx test --json --passWithNoTests --outputFile=./test/jest-test-results.json",
|
|
29
29
|
"publish-release": "make prepare-release-candidate; make publish-release",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { IAriaAlternativeProps, IAriaHideProps } from '../../../types/ariaAlternative';
|
|
3
|
-
/** A temporary screen-reader accessibility workaround for components with issues that can't be resolved quickly. Allows us to use aria-hidden on components with stuctural HTML markup issues until they can be rebuilt to be screen-reader compatible, or on components whose data does not translate well to screen-reader users. **/
|
|
4
|
-
export declare const AriaHide: FunctionComponent<IAriaHideProps>;
|
|
5
|
-
export declare const AriaAlternative: FunctionComponent<IAriaAlternativeProps>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IAriaHideProps } from '../../../types/ariaAlternative';
|
|
2
|
-
export declare const AriaAlternativeDescription: import("styled-components").StyledComponent<"a", any, {}, never>;
|
|
3
|
-
export declare const AriaHideOnDevice: import("styled-components").StyledComponent<"div", any, IAriaHideProps, never>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IGridItemProps } from '../../../types/types';
|
|
2
|
-
/**
|
|
3
|
-
* # IMPORTANT
|
|
4
|
-
* Please use the `<GridItem />` component instead of this component if possible.
|
|
5
|
-
* This component was introduced due to incompatibilities between versions of the Chord library.
|
|
6
|
-
*/
|
|
7
|
-
declare const GridItemLegacy: import("styled-components").StyledComponent<"div", any, IGridItemProps, never>;
|
|
8
|
-
export default GridItemLegacy;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface IAriaAlternativeProps {
|
|
2
|
-
/**
|
|
3
|
-
* A temporary screen-reader accessibility workaround for components with issues that can't be resolved quickly.
|
|
4
|
-
* Allows us to use aria-hidden on components with stuctural HTML markup issues until they can be rebuilt to be screen-reader compatible.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Description of the content being communicated by this component.
|
|
8
|
-
*/
|
|
9
|
-
description: string;
|
|
10
|
-
/**
|
|
11
|
-
* originalContent - parse in the data from the original component / response object.
|
|
12
|
-
*/
|
|
13
|
-
originalContent: Array<{
|
|
14
|
-
key: string;
|
|
15
|
-
value: string;
|
|
16
|
-
}>;
|
|
17
|
-
/**
|
|
18
|
-
* speechValues - input contextual speech values here to build a sentence, e.g. "you have" , "tickets for" , etc.
|
|
19
|
-
*/
|
|
20
|
-
speechValues: Array<{
|
|
21
|
-
key: string;
|
|
22
|
-
value: string;
|
|
23
|
-
}>;
|
|
24
|
-
/**
|
|
25
|
-
* Disable this component (for testing purposes).
|
|
26
|
-
*/
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface IAriaHideProps {
|
|
30
|
-
/**
|
|
31
|
-
* Inert - disables all focusable child elements, necessary if using aria-hidden
|
|
32
|
-
*/
|
|
33
|
-
inert: boolean;
|
|
34
|
-
}
|