@royaloperahouse/chord 2.2.3 → 2.2.5
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 +8 -0
- package/dist/chord.cjs.development.js +409 -139
- 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 +408 -141
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/atoms/TextField/TextField.d.ts +21 -20
- package/dist/components/atoms/TextField/TextField.style.d.ts +8 -4
- package/dist/components/index.d.ts +2 -2
- package/dist/components/molecules/AuxiliaryNav/AuxiliaryNav.d.ts +21 -0
- package/dist/components/molecules/AuxiliaryNav/AuxiliaryNav.styles.d.ts +10 -0
- package/dist/components/molecules/AuxiliaryNav/index.d.ts +2 -0
- package/dist/components/molecules/PasswordStrength/PasswordStrength.d.ts +33 -0
- package/dist/components/molecules/PasswordStrength/PasswordStrength.styles.d.ts +13 -0
- package/dist/components/molecules/PasswordStrength/index.d.ts +2 -0
- package/dist/components/molecules/StatusBanner/StatusBanner.d.ts +4 -0
- package/dist/components/molecules/StatusBanner/StatusBanner.style.d.ts +3 -0
- package/dist/components/molecules/StatusBanner/index.d.ts +2 -0
- package/dist/components/molecules/index.d.ts +4 -1
- package/dist/index.d.ts +2 -2
- package/dist/types/auxiliaryNav.d.ts +21 -0
- package/dist/types/formTypes.d.ts +16 -4
- package/dist/types/passwordStrength.d.ts +51 -0
- package/dist/types/types.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1,41 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ITextFieldProps } from '../../../types/formTypes';
|
|
2
3
|
/**
|
|
3
4
|
* A text field component, that wraps around the native `<input />` element
|
|
4
|
-
* and adds some extra information around it (i.e. a text
|
|
5
|
+
* and adds some extra states and information around it (i.e. a text and an error labels,
|
|
6
|
+
* error state, show/hide button for password field).
|
|
5
7
|
*
|
|
6
|
-
* #
|
|
8
|
+
* # Label
|
|
7
9
|
* You can use this component just like you would use a regular `<input />` element,
|
|
8
10
|
* just with the extra `label` prop, to set the label of the content. For example:
|
|
9
11
|
* ```tsx
|
|
10
12
|
* <TextField label="This is a label" />
|
|
11
13
|
* ```
|
|
12
14
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* ```
|
|
15
|
+
* # Error state
|
|
16
|
+
* An error label will be shown below the text input field if the `error` prop exists.
|
|
17
|
+
* Also input will be rendered with a red border. An empty string can be passed to
|
|
18
|
+
* render only error state without error message.
|
|
18
19
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
20
|
+
* # Password mode
|
|
21
|
+
* If type `password` provided this will be rendered with the `Show/Hide` button over the input field.
|
|
22
|
+
* Clicking on that changes type to `text` and back to `password`.
|
|
21
23
|
*
|
|
22
24
|
* # Light / Dark mode
|
|
23
25
|
* The component can also adapt its styles for light / dark mode. If you want this component
|
|
24
26
|
* to be rendered on a dark / coloured background, you can use the `darkMode` prop.
|
|
25
27
|
* ```tsx
|
|
26
28
|
* <div>
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* <
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* <
|
|
35
|
-
*
|
|
36
|
-
* </BlueBackgroundContainer>
|
|
29
|
+
* <WhiteBackgroundContainer>
|
|
30
|
+
* <TextField label="..." />
|
|
31
|
+
* </WhiteBackgroundContainer>
|
|
32
|
+
* <BlackBackgroundContainer>
|
|
33
|
+
* <TextField darkMode label="..." />
|
|
34
|
+
* </BlackBackgroundContainer>
|
|
35
|
+
* <BlueBackgroundContainer>
|
|
36
|
+
* <TextField darkMode label="..." />
|
|
37
|
+
* </BlueBackgroundContainer>
|
|
37
38
|
* </div>
|
|
38
39
|
* ```
|
|
39
40
|
*/
|
|
40
|
-
declare const TextField:
|
|
41
|
+
declare const TextField: React.ForwardRefExoticComponent<ITextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
41
42
|
export default TextField;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { ITextFieldProps } from '../../../types/formTypes';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
2
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, Pick<ITextFieldProps, "width">, never>;
|
|
4
|
+
export declare const Input: import("styled-components").StyledComponent<"input", any, Pick<ITextFieldProps, "error" | "darkMode"> & {
|
|
5
|
+
isPasswordField: boolean;
|
|
6
|
+
}, never>;
|
|
7
|
+
export declare const ShowHideButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
8
|
+
export declare const TextLabel: import("styled-components").StyledComponent<"div", any, Pick<ITextFieldProps, "darkMode">, never>;
|
|
9
|
+
export declare const ErrorLabel: import("styled-components").StyledComponent<"div", any, Pick<ITextFieldProps, "darkMode">, never>;
|
|
@@ -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, ReadMore, 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, 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, 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, };
|
|
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, };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { IAuxiliaryNavProps } from '../../../types/auxiliaryNav';
|
|
3
|
+
/**
|
|
4
|
+
* Vertical menu component uses for navigation
|
|
5
|
+
* inside website chapter. It looks like a vertical
|
|
6
|
+
* list with clickable items on desktop and dropdown
|
|
7
|
+
* list on mobile.
|
|
8
|
+
*
|
|
9
|
+
* ## Menu items
|
|
10
|
+
* Menu items should be passed as `items` prop. This
|
|
11
|
+
* should be an array of objects. Each object should
|
|
12
|
+
* have `text` (text displayed as a menu item) and
|
|
13
|
+
* `onClick` (click handler function)
|
|
14
|
+
*
|
|
15
|
+
* ## Active menu item
|
|
16
|
+
* Active menu item should be passed as component `activeItem`
|
|
17
|
+
* prop. This indicates on which menu item should be highlighted
|
|
18
|
+
* as active one. Should be equal to `text` prop from one of the `items`
|
|
19
|
+
*/
|
|
20
|
+
declare const AuxiliaryNav: FunctionComponent<IAuxiliaryNavProps>;
|
|
21
|
+
export default AuxiliaryNav;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const MenuContainer: import("styled-components").StyledComponent<"menu", any, {}, never>;
|
|
2
|
+
export declare const MenuList: import("styled-components").StyledComponent<"ul", any, {
|
|
3
|
+
mobileOpen: boolean;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const MenuItem: import("styled-components").StyledComponent<"button", any, {
|
|
6
|
+
active: boolean;
|
|
7
|
+
}, never>;
|
|
8
|
+
export declare const MobileButton: import("styled-components").StyledComponent<"button", any, {
|
|
9
|
+
mobileOpen: boolean;
|
|
10
|
+
}, never>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { IPasswordStrengthProps } from '../../../types/passwordStrength';
|
|
3
|
+
/**
|
|
4
|
+
* Password strength indicator component.
|
|
5
|
+
* This renders some number of lines (6 by default)
|
|
6
|
+
* which should become active when the user improves
|
|
7
|
+
* the strength of the entered password.
|
|
8
|
+
*
|
|
9
|
+
* ## Sections
|
|
10
|
+
* To set number of sections it should be passed
|
|
11
|
+
* as `sections` prop.
|
|
12
|
+
*
|
|
13
|
+
* ## Active section
|
|
14
|
+
* To set number of active sections it should be passed
|
|
15
|
+
* as `activeSections` prop.
|
|
16
|
+
*
|
|
17
|
+
* ## Colors
|
|
18
|
+
* Color of every element can be controlled by properties:
|
|
19
|
+
* `sectionsColor`, `activeSectionsColor`,
|
|
20
|
+
* `textColor`, `strengthLabelColor`.
|
|
21
|
+
*
|
|
22
|
+
* ## Text
|
|
23
|
+
* `text` prop is used to render some message.
|
|
24
|
+
* For example error (together with proper red color)
|
|
25
|
+
* or some password requirement. It can be empty.
|
|
26
|
+
*
|
|
27
|
+
* ## Strength label
|
|
28
|
+
* `strengthLabel` prop is used to render strength characteristic
|
|
29
|
+
* of entered password. For example: `weak`, `normal`, `strong`, etc.
|
|
30
|
+
* It can be empty.
|
|
31
|
+
*/
|
|
32
|
+
declare const PasswordStrength: FunctionComponent<IPasswordStrengthProps>;
|
|
33
|
+
export default PasswordStrength;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Colors } from '../../../types/types';
|
|
2
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const Sections: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const Section: import("styled-components").StyledComponent<"div", any, {
|
|
5
|
+
color: Colors;
|
|
6
|
+
}, never>;
|
|
7
|
+
export declare const BottomLine: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const Text: import("styled-components").StyledComponent<"div", any, {
|
|
9
|
+
color: Colors;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const LabelText: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
+
color: Colors;
|
|
13
|
+
}, never>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const StatusBannerWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const SvgContainer: import("styled-components").StyledComponent<"div", any, {}, 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 StatusBanner from './StatusBanner';
|
|
16
17
|
import SearchBar from './SearchBar';
|
|
17
18
|
import SectionTitle from './SectionTitle';
|
|
18
19
|
import Select from './Select';
|
|
@@ -23,4 +24,6 @@ import ImageWithCaption from './ImageWithCaption';
|
|
|
23
24
|
import Quote from './Quote';
|
|
24
25
|
import MiniCard from './MiniCard';
|
|
25
26
|
import ReadMore from './ReadMore';
|
|
26
|
-
|
|
27
|
+
import AuxiliaryNav from './AuxiliaryNav';
|
|
28
|
+
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, };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +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, ReadMore, 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, 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';
|
|
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, 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, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio, RadioGroup, ReadMore, 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, };
|
|
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, };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface IAuxiliaryNavProps {
|
|
2
|
+
/**
|
|
3
|
+
* Menu items
|
|
4
|
+
*/
|
|
5
|
+
items: IItem[];
|
|
6
|
+
/**
|
|
7
|
+
* Item will be marked as active.
|
|
8
|
+
* Should be equal to text prop from one of the items
|
|
9
|
+
*/
|
|
10
|
+
activeItem: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IItem {
|
|
13
|
+
/**
|
|
14
|
+
* Item text
|
|
15
|
+
*/
|
|
16
|
+
text: string;
|
|
17
|
+
/**
|
|
18
|
+
* Item on click action
|
|
19
|
+
*/
|
|
20
|
+
onClick: () => void;
|
|
21
|
+
}
|
|
@@ -33,15 +33,28 @@ export interface ITextAreaProps extends Partial<IGridItemProps>, InputHTMLAttrib
|
|
|
33
33
|
*/
|
|
34
34
|
darkMode?: boolean;
|
|
35
35
|
}
|
|
36
|
+
export declare type ITextFieldType = 'text' | 'email' | 'password' | 'number' | 'search' | 'tel' | 'url';
|
|
36
37
|
export interface ITextFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
37
38
|
/**
|
|
38
39
|
* A text label to be shown above the text input field.
|
|
39
40
|
*/
|
|
40
|
-
label
|
|
41
|
+
label?: string;
|
|
41
42
|
/**
|
|
42
43
|
* An error label to be shown below the text input field.
|
|
44
|
+
* Input will be rendered with a red border if this prop exist.
|
|
45
|
+
* Empty string can be passed to render only error state without
|
|
46
|
+
* error message.
|
|
43
47
|
*/
|
|
44
48
|
error?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Type of text field.
|
|
51
|
+
* It can be one of: `text`, `email`, `password`,
|
|
52
|
+
* `number`, `search`, `tel`, `url`.
|
|
53
|
+
* `password` type adds `Show/Hide` button over the input element.
|
|
54
|
+
* Any other types don't change the view of the element, just change
|
|
55
|
+
* accessibility stuff
|
|
56
|
+
*/
|
|
57
|
+
type?: ITextFieldType;
|
|
45
58
|
/**
|
|
46
59
|
* A style prop that allows us to change what colours to
|
|
47
60
|
* use for light or dark mode (e.g. text color, border color, etc...)
|
|
@@ -52,9 +65,8 @@ export interface ITextFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
52
65
|
darkMode?: boolean;
|
|
53
66
|
/**
|
|
54
67
|
* Width in pixels.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
68
|
+
* This will limit the maximum width of input element.
|
|
69
|
+
* By default it will take all available space.
|
|
58
70
|
*/
|
|
59
71
|
width?: number;
|
|
60
72
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Colors } from './types';
|
|
2
|
+
export interface IPasswordStrengthProps {
|
|
3
|
+
/**
|
|
4
|
+
* Number of sections to show
|
|
5
|
+
*
|
|
6
|
+
* Default: 6
|
|
7
|
+
*/
|
|
8
|
+
sections?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Number of active sections
|
|
11
|
+
*
|
|
12
|
+
* Default: 0
|
|
13
|
+
*/
|
|
14
|
+
activeSections?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Color of non-active sections
|
|
17
|
+
*
|
|
18
|
+
* Default: Colors.MidGrey
|
|
19
|
+
*/
|
|
20
|
+
sectionsColor?: Colors;
|
|
21
|
+
/**
|
|
22
|
+
* Color of active sections
|
|
23
|
+
*
|
|
24
|
+
* Default: Colors.Black
|
|
25
|
+
*/
|
|
26
|
+
activeSectionsColor?: Colors;
|
|
27
|
+
/**
|
|
28
|
+
* Text
|
|
29
|
+
*
|
|
30
|
+
* Default: ""
|
|
31
|
+
*/
|
|
32
|
+
text?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Text color
|
|
35
|
+
*
|
|
36
|
+
* Default: Colors.Black
|
|
37
|
+
*/
|
|
38
|
+
textColor?: Colors;
|
|
39
|
+
/**
|
|
40
|
+
* Strength label text
|
|
41
|
+
*
|
|
42
|
+
* Default: ""
|
|
43
|
+
*/
|
|
44
|
+
strengthLabel?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Strength label text
|
|
47
|
+
*
|
|
48
|
+
* Default: Colors.Black
|
|
49
|
+
*/
|
|
50
|
+
strengthLabelColor?: Colors;
|
|
51
|
+
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -531,4 +531,14 @@ export interface IReadMoreProps {
|
|
|
531
531
|
*/
|
|
532
532
|
truncate?: boolean;
|
|
533
533
|
}
|
|
534
|
+
export interface IStatusBannerProps {
|
|
535
|
+
/**
|
|
536
|
+
* Status banner text
|
|
537
|
+
*/
|
|
538
|
+
statusText: string;
|
|
539
|
+
/**
|
|
540
|
+
* Set init visibility
|
|
541
|
+
*/
|
|
542
|
+
visibility: boolean;
|
|
543
|
+
}
|
|
534
544
|
export declare type Image = Pick<HTMLImageElement, 'alt' | 'src'>;
|