@dnanpm/styleguide 1.8.1 → 2.0.1
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/build/cjs/components/Accordion/Accordion.d.ts +50 -0
- package/build/cjs/components/Accordion/Accordion.js +52 -0
- package/build/cjs/components/Accordion/AccordionItem.d.ts +30 -0
- package/build/cjs/components/Accordion/AccordionItem.js +77 -0
- package/build/cjs/components/AmountSelector/AmountSelector.js +5 -6
- package/build/cjs/components/Buttons/ButtonBasicStyles.d.ts +37 -30
- package/build/cjs/components/Buttons/ButtonBasicStyles.js +10 -14
- package/build/cjs/components/Buttons/ButtonDefault.js +6 -2
- package/build/cjs/components/Buttons/ButtonIconPrimaryStyles.d.ts +37 -30
- package/build/cjs/components/Buttons/ButtonIconStyles.d.ts +37 -30
- package/build/cjs/components/Buttons/ButtonPrimary.js +6 -2
- package/build/cjs/components/Buttons/ButtonPrimaryStyles.d.ts +37 -30
- package/build/cjs/components/Buttons/ButtonSecondary.js +7 -3
- package/build/cjs/components/Buttons/ButtonSecondaryStyles.d.ts +37 -30
- package/build/cjs/components/Buttons/ButtonTertiary.js +7 -3
- package/build/cjs/components/Buttons/ButtonTertiaryStyles.d.ts +37 -30
- package/build/cjs/components/Buttons/CloseButton.d.ts +37 -30
- package/build/cjs/components/Card/Card.js +4 -2
- package/build/cjs/components/Card/CardRow.js +3 -3
- package/build/cjs/components/Checkbox/Checkbox.d.ts +38 -12
- package/build/cjs/components/Checkbox/Checkbox.js +37 -70
- package/build/cjs/components/DnaLogo/DnaLogo.d.ts +37 -40
- package/build/cjs/components/Footer/Components/FooterComponents.js +3 -2
- package/build/cjs/components/Helper/Helper.js +2 -1
- package/build/cjs/components/Icon/Icon.d.ts +39 -30
- package/build/cjs/components/Icon/Icons.d.ts +1 -4
- package/build/cjs/components/Icon/Icons.js +3 -7
- package/build/cjs/components/Input/Input.d.ts +102 -13
- package/build/cjs/components/Input/Input.js +57 -58
- package/build/cjs/components/Label/Label.js +2 -3
- package/build/cjs/components/LabelText/LabelText.d.ts +38 -30
- package/build/cjs/components/LabelText/LabelText.js +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/BusinessMenu.js +4 -10
- package/build/cjs/components/MainNavigation/ChildComponents/DesktopMenu.js +18 -12
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +37 -30
- package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.js +2 -2
- package/build/cjs/components/MainNavigation/ChildComponents/LinkModifier.js +2 -2
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +37 -30
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +1 -4
- package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.js +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.js +1 -1
- package/build/cjs/components/MainNavigation/MainNavigation.js +1 -17
- package/build/cjs/components/MainNavigation/globalNavStyles.d.ts +148 -120
- package/build/cjs/components/Notification/Notification.d.ts +36 -17
- package/build/cjs/components/Notification/Notification.js +25 -48
- package/build/cjs/components/NotificationBadge/NotificationBadge.d.ts +37 -30
- package/build/cjs/components/NotificationBadge/NotificationBadge.js +1 -1
- package/build/cjs/components/PixelLoader/PixelLoaderStyles.d.ts +74 -60
- package/build/cjs/components/ProgressIndicator/ProgressIndicator.js +3 -3
- package/build/cjs/components/RadioButton/RadioButton.d.ts +33 -17
- package/build/cjs/components/RadioButton/RadioButton.js +12 -57
- package/build/cjs/components/ReadMore/ReadMore.js +2 -7
- package/build/cjs/components/Ribbon/Ribbon.d.ts +57 -0
- package/build/cjs/components/Ribbon/Ribbon.js +80 -0
- package/build/cjs/components/Search/Search.js +2 -1
- package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +2 -2
- package/build/cjs/components/Selectbox/Selectbox.d.ts +102 -13
- package/build/cjs/components/Selectbox/Selectbox.js +40 -49
- package/build/cjs/components/Tabs/Tab.d.ts +37 -30
- package/build/cjs/components/Tabs/Tab.js +3 -2
- package/build/cjs/components/Tabs/Tabs.d.ts +40 -30
- package/build/cjs/components/Textarea/Textarea.js +4 -3
- package/build/cjs/components/Tooltip/Tooltip.d.ts +37 -30
- package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +74 -60
- package/build/cjs/components/index.d.ts +4 -1
- package/build/cjs/hooks/useElementDimensions.d.ts +5 -0
- package/build/cjs/hooks/useElementDimensions.js +37 -0
- package/build/cjs/index.js +6 -0
- package/build/cjs/themes/globalStyles.d.ts +174 -60
- package/build/cjs/themes/globalStyles.js +132 -142
- package/build/cjs/themes/styled.d.ts +259 -210
- package/build/cjs/themes/theme.d.ts +37 -30
- package/build/cjs/themes/themeComponents/buttons.d.ts +1 -6
- package/build/cjs/themes/themeComponents/buttons.js +1 -6
- package/build/cjs/themes/themeComponents/fontFamily.d.ts +3 -1
- package/build/cjs/themes/themeComponents/fontFamily.js +3 -1
- package/build/cjs/themes/themeComponents/fontSize.d.ts +18 -15
- package/build/cjs/themes/themeComponents/fontSize.js +20 -14
- package/build/cjs/themes/themeComponents/lineHeight.d.ts +19 -12
- package/build/cjs/themes/themeComponents/lineHeight.js +21 -11
- package/build/es/components/Accordion/Accordion.d.ts +50 -0
- package/build/es/components/Accordion/Accordion.js +44 -0
- package/build/es/components/Accordion/AccordionItem.d.ts +30 -0
- package/build/es/components/Accordion/AccordionItem.js +68 -0
- package/build/es/components/AmountSelector/AmountSelector.js +5 -6
- package/build/es/components/Buttons/ButtonBasicStyles.d.ts +37 -30
- package/build/es/components/Buttons/ButtonBasicStyles.js +10 -14
- package/build/es/components/Buttons/ButtonDefault.js +6 -2
- package/build/es/components/Buttons/ButtonIconPrimaryStyles.d.ts +37 -30
- package/build/es/components/Buttons/ButtonIconStyles.d.ts +37 -30
- package/build/es/components/Buttons/ButtonPrimary.js +6 -2
- package/build/es/components/Buttons/ButtonPrimaryStyles.d.ts +37 -30
- package/build/es/components/Buttons/ButtonSecondary.js +7 -3
- package/build/es/components/Buttons/ButtonSecondaryStyles.d.ts +37 -30
- package/build/es/components/Buttons/ButtonTertiary.js +7 -3
- package/build/es/components/Buttons/ButtonTertiaryStyles.d.ts +37 -30
- package/build/es/components/Buttons/CloseButton.d.ts +37 -30
- package/build/es/components/Card/Card.js +4 -2
- package/build/es/components/Card/CardRow.js +3 -3
- package/build/es/components/Checkbox/Checkbox.d.ts +38 -12
- package/build/es/components/Checkbox/Checkbox.js +39 -72
- package/build/es/components/DnaLogo/DnaLogo.d.ts +37 -40
- package/build/es/components/Footer/Components/FooterComponents.js +3 -2
- package/build/es/components/Helper/Helper.js +2 -1
- package/build/es/components/Icon/Icon.d.ts +39 -30
- package/build/es/components/Icon/Icons.d.ts +1 -4
- package/build/es/components/Icon/Icons.js +3 -7
- package/build/es/components/Input/Input.d.ts +102 -13
- package/build/es/components/Input/Input.js +57 -58
- package/build/es/components/Label/Label.js +2 -3
- package/build/es/components/LabelText/LabelText.d.ts +38 -30
- package/build/es/components/LabelText/LabelText.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/BusinessMenu.js +4 -10
- package/build/es/components/MainNavigation/ChildComponents/DesktopMenu.js +18 -12
- package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +37 -30
- package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.js +2 -2
- package/build/es/components/MainNavigation/ChildComponents/LinkModifier.js +2 -2
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +37 -30
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +2 -5
- package/build/es/components/MainNavigation/ChildComponents/MobileMenu.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/Ribbon.js +1 -1
- package/build/es/components/MainNavigation/MainNavigation.js +2 -17
- package/build/es/components/MainNavigation/globalNavStyles.d.ts +148 -120
- package/build/es/components/Notification/Notification.d.ts +36 -17
- package/build/es/components/Notification/Notification.js +25 -48
- package/build/es/components/NotificationBadge/NotificationBadge.d.ts +37 -30
- package/build/es/components/NotificationBadge/NotificationBadge.js +1 -1
- package/build/es/components/PixelLoader/PixelLoaderStyles.d.ts +74 -60
- package/build/es/components/ProgressIndicator/ProgressIndicator.js +3 -3
- package/build/es/components/RadioButton/RadioButton.d.ts +33 -17
- package/build/es/components/RadioButton/RadioButton.js +12 -57
- package/build/es/components/ReadMore/ReadMore.js +2 -7
- package/build/es/components/Ribbon/Ribbon.d.ts +57 -0
- package/build/es/components/Ribbon/Ribbon.js +71 -0
- package/build/es/components/Search/Search.js +2 -1
- package/build/es/components/SecondaryNavigation/SecondaryNavigation.js +2 -2
- package/build/es/components/Selectbox/Selectbox.d.ts +102 -13
- package/build/es/components/Selectbox/Selectbox.js +40 -49
- package/build/es/components/Tabs/Tab.d.ts +37 -30
- package/build/es/components/Tabs/Tab.js +3 -2
- package/build/es/components/Tabs/Tabs.d.ts +40 -30
- package/build/es/components/Textarea/Textarea.js +4 -3
- package/build/es/components/Tooltip/Tooltip.d.ts +37 -30
- package/build/es/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +74 -60
- package/build/es/components/index.d.ts +4 -1
- package/build/es/hooks/useElementDimensions.d.ts +5 -0
- package/build/es/hooks/useElementDimensions.js +33 -0
- package/build/es/index.js +3 -0
- package/build/es/themes/globalStyles.d.ts +174 -60
- package/build/es/themes/globalStyles.js +134 -145
- package/build/es/themes/styled.d.ts +259 -210
- package/build/es/themes/theme.d.ts +37 -30
- package/build/es/themes/themeComponents/buttons.d.ts +1 -6
- package/build/es/themes/themeComponents/buttons.js +1 -6
- package/build/es/themes/themeComponents/fontFamily.d.ts +3 -1
- package/build/es/themes/themeComponents/fontFamily.js +3 -1
- package/build/es/themes/themeComponents/fontSize.d.ts +18 -15
- package/build/es/themes/themeComponents/fontSize.js +20 -14
- package/build/es/themes/themeComponents/lineHeight.d.ts +19 -12
- package/build/es/themes/themeComponents/lineHeight.js +21 -11
- package/package.json +3 -4
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import styled from '../../themes/styled.js';
|
|
3
3
|
import { PixelLoader } from '../PixelLoader/PixelLoader.js';
|
|
4
|
+
import ButtonBasicStyle from './ButtonBasicStyles.js';
|
|
4
5
|
|
|
5
6
|
const noop = () => { }; // tslint:disable-line
|
|
7
|
+
const StyledPixelLoader = styled(PixelLoader) `
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
`;
|
|
6
10
|
/** @visibleName Buttons */
|
|
7
11
|
const Button = (props) => {
|
|
8
12
|
const { children, className, fullWidth, small, loading = false, darkBg, onClick, onMouseDown, disabled = false, 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue, type, } = props;
|
|
@@ -12,7 +16,7 @@ const Button = (props) => {
|
|
|
12
16
|
// https://github.com/styled-components/styled-components/pull/2093
|
|
13
17
|
loading: loading ? loading.toString() : undefined, darkBg: darkBg, disabled: disabled, onClick: !disabled || !loading ? onClick : noop, onMouseDown: (!disabled || !loading) && onMouseDown ? onMouseDown : noop, className: className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, type: type },
|
|
14
18
|
!loading && (React.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, children)),
|
|
15
|
-
loading && React.createElement(
|
|
19
|
+
loading && React.createElement(StyledPixelLoader, null)));
|
|
16
20
|
};
|
|
17
21
|
|
|
18
22
|
export default Button;
|
|
@@ -11,12 +11,7 @@ declare const ButtonIconPrimaryStyles: import("styled-components").StyledCompone
|
|
|
11
11
|
};
|
|
12
12
|
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
13
13
|
button: {
|
|
14
|
-
|
|
15
|
-
buttonPadding: string;
|
|
16
|
-
smallButtonPadding: string;
|
|
17
|
-
buttonLineHeight: string;
|
|
18
|
-
buttonWidth: string;
|
|
19
|
-
buttonSmallWidth: string;
|
|
14
|
+
border: string;
|
|
20
15
|
};
|
|
21
16
|
color: {
|
|
22
17
|
black: string;
|
|
@@ -47,22 +42,27 @@ declare const ButtonIconPrimaryStyles: import("styled-components").StyledCompone
|
|
|
47
42
|
gray5: string;
|
|
48
43
|
};
|
|
49
44
|
fontFamily: {
|
|
50
|
-
|
|
45
|
+
default: string;
|
|
46
|
+
heading: string;
|
|
47
|
+
numerals: string;
|
|
51
48
|
};
|
|
52
49
|
fontSize: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
default: string;
|
|
51
|
+
xl: string;
|
|
52
|
+
l: string;
|
|
53
|
+
s: string;
|
|
54
|
+
xs: string;
|
|
55
|
+
h1XL: string;
|
|
56
|
+
h1L: string;
|
|
57
|
+
h1M: string;
|
|
58
|
+
h1S: string;
|
|
59
|
+
h2M: string;
|
|
60
|
+
h2S: string;
|
|
61
|
+
h3: string;
|
|
62
|
+
h4: string;
|
|
63
|
+
h5: string;
|
|
64
|
+
h1: string;
|
|
65
|
+
h2: string;
|
|
66
66
|
};
|
|
67
67
|
fontWeight: {
|
|
68
68
|
book: number;
|
|
@@ -78,16 +78,23 @@ declare const ButtonIconPrimaryStyles: import("styled-components").StyledCompone
|
|
|
78
78
|
gutter: string;
|
|
79
79
|
};
|
|
80
80
|
lineHeight: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
default: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
s: string;
|
|
84
|
+
xs: string;
|
|
85
|
+
xxs: string;
|
|
86
|
+
auto: string;
|
|
87
|
+
h1XL: string;
|
|
88
|
+
h1L: string;
|
|
89
|
+
h1M: string;
|
|
90
|
+
h1S: string;
|
|
91
|
+
h2M: string;
|
|
92
|
+
h2S: string;
|
|
93
|
+
h3: string;
|
|
94
|
+
h4: string;
|
|
95
|
+
h5: string;
|
|
96
|
+
h1: string;
|
|
97
|
+
h2: string;
|
|
91
98
|
};
|
|
92
99
|
media: Record<string | number, (l: TemplateStringsArray, ...p: any[]) => string>;
|
|
93
100
|
}, import("./ButtonBasicStyles").ButtonProps & {
|
|
@@ -11,12 +11,7 @@ declare const ButtonIconStyles: import("styled-components").StyledComponent<"but
|
|
|
11
11
|
};
|
|
12
12
|
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
13
13
|
button: {
|
|
14
|
-
|
|
15
|
-
buttonPadding: string;
|
|
16
|
-
smallButtonPadding: string;
|
|
17
|
-
buttonLineHeight: string;
|
|
18
|
-
buttonWidth: string;
|
|
19
|
-
buttonSmallWidth: string;
|
|
14
|
+
border: string;
|
|
20
15
|
};
|
|
21
16
|
color: {
|
|
22
17
|
black: string;
|
|
@@ -47,22 +42,27 @@ declare const ButtonIconStyles: import("styled-components").StyledComponent<"but
|
|
|
47
42
|
gray5: string;
|
|
48
43
|
};
|
|
49
44
|
fontFamily: {
|
|
50
|
-
|
|
45
|
+
default: string;
|
|
46
|
+
heading: string;
|
|
47
|
+
numerals: string;
|
|
51
48
|
};
|
|
52
49
|
fontSize: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
default: string;
|
|
51
|
+
xl: string;
|
|
52
|
+
l: string;
|
|
53
|
+
s: string;
|
|
54
|
+
xs: string;
|
|
55
|
+
h1XL: string;
|
|
56
|
+
h1L: string;
|
|
57
|
+
h1M: string;
|
|
58
|
+
h1S: string;
|
|
59
|
+
h2M: string;
|
|
60
|
+
h2S: string;
|
|
61
|
+
h3: string;
|
|
62
|
+
h4: string;
|
|
63
|
+
h5: string;
|
|
64
|
+
h1: string;
|
|
65
|
+
h2: string;
|
|
66
66
|
};
|
|
67
67
|
fontWeight: {
|
|
68
68
|
book: number;
|
|
@@ -78,16 +78,23 @@ declare const ButtonIconStyles: import("styled-components").StyledComponent<"but
|
|
|
78
78
|
gutter: string;
|
|
79
79
|
};
|
|
80
80
|
lineHeight: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
default: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
s: string;
|
|
84
|
+
xs: string;
|
|
85
|
+
xxs: string;
|
|
86
|
+
auto: string;
|
|
87
|
+
h1XL: string;
|
|
88
|
+
h1L: string;
|
|
89
|
+
h1M: string;
|
|
90
|
+
h1S: string;
|
|
91
|
+
h2M: string;
|
|
92
|
+
h2S: string;
|
|
93
|
+
h3: string;
|
|
94
|
+
h4: string;
|
|
95
|
+
h5: string;
|
|
96
|
+
h1: string;
|
|
97
|
+
h2: string;
|
|
91
98
|
};
|
|
92
99
|
media: Record<string | number, (l: TemplateStringsArray, ...p: any[]) => string>;
|
|
93
100
|
}, import("./ButtonBasicStyles").ButtonProps & {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import styled from '../../themes/styled.js';
|
|
3
3
|
import { PixelLoader } from '../PixelLoader/PixelLoader.js';
|
|
4
|
+
import ButtonPrimaryStyles from './ButtonPrimaryStyles.js';
|
|
4
5
|
|
|
5
6
|
const noop = () => { }; // tslint:disable-line
|
|
7
|
+
const StyledPixelLoader = styled(PixelLoader) `
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
`;
|
|
6
10
|
/** @visibleName Button primary */
|
|
7
11
|
const ButtonPrimary = (props) => {
|
|
8
12
|
const { children, fullWidth, small, loading = false, darkBg, onClick, onMouseDown, disabled = false, className, 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue, type, } = props;
|
|
@@ -12,7 +16,7 @@ const ButtonPrimary = (props) => {
|
|
|
12
16
|
// https://github.com/styled-components/styled-components/pull/2093
|
|
13
17
|
loading: loading ? loading.toString() : undefined, darkBg: darkBg, disabled: disabled, onClick: !disabled || !loading ? onClick : noop, onMouseDown: (!disabled || !loading) && onMouseDown ? onMouseDown : noop, className: className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, type: type },
|
|
14
18
|
!loading && (React.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, children)),
|
|
15
|
-
loading && React.createElement(
|
|
19
|
+
loading && React.createElement(StyledPixelLoader, null)));
|
|
16
20
|
};
|
|
17
21
|
|
|
18
22
|
export default ButtonPrimary;
|
|
@@ -11,12 +11,7 @@ declare const ButtonPrimaryStyles: import("styled-components").StyledComponent<"
|
|
|
11
11
|
};
|
|
12
12
|
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
13
13
|
button: {
|
|
14
|
-
|
|
15
|
-
buttonPadding: string;
|
|
16
|
-
smallButtonPadding: string;
|
|
17
|
-
buttonLineHeight: string;
|
|
18
|
-
buttonWidth: string;
|
|
19
|
-
buttonSmallWidth: string;
|
|
14
|
+
border: string;
|
|
20
15
|
};
|
|
21
16
|
color: {
|
|
22
17
|
black: string;
|
|
@@ -47,22 +42,27 @@ declare const ButtonPrimaryStyles: import("styled-components").StyledComponent<"
|
|
|
47
42
|
gray5: string;
|
|
48
43
|
};
|
|
49
44
|
fontFamily: {
|
|
50
|
-
|
|
45
|
+
default: string;
|
|
46
|
+
heading: string;
|
|
47
|
+
numerals: string;
|
|
51
48
|
};
|
|
52
49
|
fontSize: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
default: string;
|
|
51
|
+
xl: string;
|
|
52
|
+
l: string;
|
|
53
|
+
s: string;
|
|
54
|
+
xs: string;
|
|
55
|
+
h1XL: string;
|
|
56
|
+
h1L: string;
|
|
57
|
+
h1M: string;
|
|
58
|
+
h1S: string;
|
|
59
|
+
h2M: string;
|
|
60
|
+
h2S: string;
|
|
61
|
+
h3: string;
|
|
62
|
+
h4: string;
|
|
63
|
+
h5: string;
|
|
64
|
+
h1: string;
|
|
65
|
+
h2: string;
|
|
66
66
|
};
|
|
67
67
|
fontWeight: {
|
|
68
68
|
book: number;
|
|
@@ -78,16 +78,23 @@ declare const ButtonPrimaryStyles: import("styled-components").StyledComponent<"
|
|
|
78
78
|
gutter: string;
|
|
79
79
|
};
|
|
80
80
|
lineHeight: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
default: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
s: string;
|
|
84
|
+
xs: string;
|
|
85
|
+
xxs: string;
|
|
86
|
+
auto: string;
|
|
87
|
+
h1XL: string;
|
|
88
|
+
h1L: string;
|
|
89
|
+
h1M: string;
|
|
90
|
+
h1S: string;
|
|
91
|
+
h2M: string;
|
|
92
|
+
h2S: string;
|
|
93
|
+
h3: string;
|
|
94
|
+
h4: string;
|
|
95
|
+
h5: string;
|
|
96
|
+
h1: string;
|
|
97
|
+
h2: string;
|
|
91
98
|
};
|
|
92
99
|
media: Record<string | number, (l: TemplateStringsArray, ...p: any[]) => string>;
|
|
93
100
|
}, import("./ButtonBasicStyles").ButtonProps, never>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { PixelLoader } from '../PixelLoader/PixelLoader.js';
|
|
2
|
+
import styled from '../../themes/styled.js';
|
|
4
3
|
import theme from '../../themes/theme.js';
|
|
4
|
+
import { PixelLoader } from '../PixelLoader/PixelLoader.js';
|
|
5
|
+
import ButtonSecondaryStyles from './ButtonSecondaryStyles.js';
|
|
5
6
|
|
|
6
7
|
const noop = () => { }; // tslint:disable-line
|
|
8
|
+
const StyledPixelLoader = styled(PixelLoader) `
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
`;
|
|
7
11
|
/** @visibleName Button secondary */
|
|
8
12
|
const ButtonSecondary = (props) => {
|
|
9
13
|
const { children, className, fullWidth, small, loading = false, darkBg, onClick, onMouseDown, disabled = false, 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue, type, } = props;
|
|
@@ -13,7 +17,7 @@ const ButtonSecondary = (props) => {
|
|
|
13
17
|
// https://github.com/styled-components/styled-components/pull/2093
|
|
14
18
|
loading: loading ? loading.toString() : undefined, darkBg: darkBg, disabled: disabled, onClick: !disabled || !loading ? onClick : noop, onMouseDown: (!disabled || !loading) && onMouseDown ? onMouseDown : noop, className: className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, type: type },
|
|
15
19
|
!loading && (React.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, children)),
|
|
16
|
-
loading && React.createElement(
|
|
20
|
+
loading && (React.createElement(StyledPixelLoader, { color: darkBg ? theme.color.white : theme.color.hotPink }))));
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
export default ButtonSecondary;
|
|
@@ -11,12 +11,7 @@ declare const ButtonSecondaryStyles: import("styled-components").StyledComponent
|
|
|
11
11
|
};
|
|
12
12
|
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
13
13
|
button: {
|
|
14
|
-
|
|
15
|
-
buttonPadding: string;
|
|
16
|
-
smallButtonPadding: string;
|
|
17
|
-
buttonLineHeight: string;
|
|
18
|
-
buttonWidth: string;
|
|
19
|
-
buttonSmallWidth: string;
|
|
14
|
+
border: string;
|
|
20
15
|
};
|
|
21
16
|
color: {
|
|
22
17
|
black: string;
|
|
@@ -47,22 +42,27 @@ declare const ButtonSecondaryStyles: import("styled-components").StyledComponent
|
|
|
47
42
|
gray5: string;
|
|
48
43
|
};
|
|
49
44
|
fontFamily: {
|
|
50
|
-
|
|
45
|
+
default: string;
|
|
46
|
+
heading: string;
|
|
47
|
+
numerals: string;
|
|
51
48
|
};
|
|
52
49
|
fontSize: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
default: string;
|
|
51
|
+
xl: string;
|
|
52
|
+
l: string;
|
|
53
|
+
s: string;
|
|
54
|
+
xs: string;
|
|
55
|
+
h1XL: string;
|
|
56
|
+
h1L: string;
|
|
57
|
+
h1M: string;
|
|
58
|
+
h1S: string;
|
|
59
|
+
h2M: string;
|
|
60
|
+
h2S: string;
|
|
61
|
+
h3: string;
|
|
62
|
+
h4: string;
|
|
63
|
+
h5: string;
|
|
64
|
+
h1: string;
|
|
65
|
+
h2: string;
|
|
66
66
|
};
|
|
67
67
|
fontWeight: {
|
|
68
68
|
book: number;
|
|
@@ -78,16 +78,23 @@ declare const ButtonSecondaryStyles: import("styled-components").StyledComponent
|
|
|
78
78
|
gutter: string;
|
|
79
79
|
};
|
|
80
80
|
lineHeight: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
default: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
s: string;
|
|
84
|
+
xs: string;
|
|
85
|
+
xxs: string;
|
|
86
|
+
auto: string;
|
|
87
|
+
h1XL: string;
|
|
88
|
+
h1L: string;
|
|
89
|
+
h1M: string;
|
|
90
|
+
h1S: string;
|
|
91
|
+
h2M: string;
|
|
92
|
+
h2S: string;
|
|
93
|
+
h3: string;
|
|
94
|
+
h4: string;
|
|
95
|
+
h5: string;
|
|
96
|
+
h1: string;
|
|
97
|
+
h2: string;
|
|
91
98
|
};
|
|
92
99
|
media: Record<string | number, (l: TemplateStringsArray, ...p: any[]) => string>;
|
|
93
100
|
}, import("./ButtonBasicStyles").ButtonProps, never>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { PixelLoader } from '../PixelLoader/PixelLoader.js';
|
|
2
|
+
import styled from '../../themes/styled.js';
|
|
4
3
|
import theme from '../../themes/theme.js';
|
|
4
|
+
import { PixelLoader } from '../PixelLoader/PixelLoader.js';
|
|
5
|
+
import ButtonTertiaryStyles from './ButtonTertiaryStyles.js';
|
|
5
6
|
|
|
6
7
|
const noop = () => { }; // tslint:disable-line
|
|
8
|
+
const StyledPixelLoader = styled(PixelLoader) `
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
`;
|
|
7
11
|
/** @visibleName Button tertiary */
|
|
8
12
|
const ButtonTertiary = (props) => {
|
|
9
13
|
const { children, className, fullWidth, small, loading = false, darkBg, onClick, onMouseDown, disabled = false, 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue, type, } = props;
|
|
@@ -13,7 +17,7 @@ const ButtonTertiary = (props) => {
|
|
|
13
17
|
// https://github.com/styled-components/styled-components/pull/2093
|
|
14
18
|
loading: loading ? loading.toString() : undefined, darkBg: darkBg, disabled: disabled, onClick: !disabled || !loading ? onClick : noop, onMouseDown: (!disabled || !loading) && onMouseDown ? onMouseDown : noop, className: className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, type: type },
|
|
15
19
|
!loading && (React.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, children)),
|
|
16
|
-
loading && React.createElement(
|
|
20
|
+
loading && (React.createElement(StyledPixelLoader, { color: darkBg ? theme.color.black : theme.color.white }))));
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
export default ButtonTertiary;
|
|
@@ -11,12 +11,7 @@ declare const ButtonTertiaryStyles: import("styled-components").StyledComponent<
|
|
|
11
11
|
};
|
|
12
12
|
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
13
13
|
button: {
|
|
14
|
-
|
|
15
|
-
buttonPadding: string;
|
|
16
|
-
smallButtonPadding: string;
|
|
17
|
-
buttonLineHeight: string;
|
|
18
|
-
buttonWidth: string;
|
|
19
|
-
buttonSmallWidth: string;
|
|
14
|
+
border: string;
|
|
20
15
|
};
|
|
21
16
|
color: {
|
|
22
17
|
black: string;
|
|
@@ -47,22 +42,27 @@ declare const ButtonTertiaryStyles: import("styled-components").StyledComponent<
|
|
|
47
42
|
gray5: string;
|
|
48
43
|
};
|
|
49
44
|
fontFamily: {
|
|
50
|
-
|
|
45
|
+
default: string;
|
|
46
|
+
heading: string;
|
|
47
|
+
numerals: string;
|
|
51
48
|
};
|
|
52
49
|
fontSize: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
default: string;
|
|
51
|
+
xl: string;
|
|
52
|
+
l: string;
|
|
53
|
+
s: string;
|
|
54
|
+
xs: string;
|
|
55
|
+
h1XL: string;
|
|
56
|
+
h1L: string;
|
|
57
|
+
h1M: string;
|
|
58
|
+
h1S: string;
|
|
59
|
+
h2M: string;
|
|
60
|
+
h2S: string;
|
|
61
|
+
h3: string;
|
|
62
|
+
h4: string;
|
|
63
|
+
h5: string;
|
|
64
|
+
h1: string;
|
|
65
|
+
h2: string;
|
|
66
66
|
};
|
|
67
67
|
fontWeight: {
|
|
68
68
|
book: number;
|
|
@@ -78,16 +78,23 @@ declare const ButtonTertiaryStyles: import("styled-components").StyledComponent<
|
|
|
78
78
|
gutter: string;
|
|
79
79
|
};
|
|
80
80
|
lineHeight: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
default: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
s: string;
|
|
84
|
+
xs: string;
|
|
85
|
+
xxs: string;
|
|
86
|
+
auto: string;
|
|
87
|
+
h1XL: string;
|
|
88
|
+
h1L: string;
|
|
89
|
+
h1M: string;
|
|
90
|
+
h1S: string;
|
|
91
|
+
h2M: string;
|
|
92
|
+
h2S: string;
|
|
93
|
+
h3: string;
|
|
94
|
+
h4: string;
|
|
95
|
+
h5: string;
|
|
96
|
+
h1: string;
|
|
97
|
+
h2: string;
|
|
91
98
|
};
|
|
92
99
|
media: Record<string | number, (l: TemplateStringsArray, ...p: any[]) => string>;
|
|
93
100
|
}, import("./ButtonBasicStyles").ButtonProps, never>;
|
|
@@ -11,12 +11,7 @@ declare const CloseButton: import("styled-components").StyledComponent<"a", {
|
|
|
11
11
|
};
|
|
12
12
|
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
13
13
|
button: {
|
|
14
|
-
|
|
15
|
-
buttonPadding: string;
|
|
16
|
-
smallButtonPadding: string;
|
|
17
|
-
buttonLineHeight: string;
|
|
18
|
-
buttonWidth: string;
|
|
19
|
-
buttonSmallWidth: string;
|
|
14
|
+
border: string;
|
|
20
15
|
};
|
|
21
16
|
color: {
|
|
22
17
|
black: string;
|
|
@@ -47,22 +42,27 @@ declare const CloseButton: import("styled-components").StyledComponent<"a", {
|
|
|
47
42
|
gray5: string;
|
|
48
43
|
};
|
|
49
44
|
fontFamily: {
|
|
50
|
-
|
|
45
|
+
default: string;
|
|
46
|
+
heading: string;
|
|
47
|
+
numerals: string;
|
|
51
48
|
};
|
|
52
49
|
fontSize: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
default: string;
|
|
51
|
+
xl: string;
|
|
52
|
+
l: string;
|
|
53
|
+
s: string;
|
|
54
|
+
xs: string;
|
|
55
|
+
h1XL: string;
|
|
56
|
+
h1L: string;
|
|
57
|
+
h1M: string;
|
|
58
|
+
h1S: string;
|
|
59
|
+
h2M: string;
|
|
60
|
+
h2S: string;
|
|
61
|
+
h3: string;
|
|
62
|
+
h4: string;
|
|
63
|
+
h5: string;
|
|
64
|
+
h1: string;
|
|
65
|
+
h2: string;
|
|
66
66
|
};
|
|
67
67
|
fontWeight: {
|
|
68
68
|
book: number;
|
|
@@ -78,16 +78,23 @@ declare const CloseButton: import("styled-components").StyledComponent<"a", {
|
|
|
78
78
|
gutter: string;
|
|
79
79
|
};
|
|
80
80
|
lineHeight: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
default: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
s: string;
|
|
84
|
+
xs: string;
|
|
85
|
+
xxs: string;
|
|
86
|
+
auto: string;
|
|
87
|
+
h1XL: string;
|
|
88
|
+
h1L: string;
|
|
89
|
+
h1M: string;
|
|
90
|
+
h1S: string;
|
|
91
|
+
h2M: string;
|
|
92
|
+
h2S: string;
|
|
93
|
+
h3: string;
|
|
94
|
+
h4: string;
|
|
95
|
+
h5: string;
|
|
96
|
+
h1: string;
|
|
97
|
+
h2: string;
|
|
91
98
|
};
|
|
92
99
|
media: Record<string | number, (l: TemplateStringsArray, ...p: any[]) => string>;
|
|
93
100
|
}, {}, never>;
|
|
@@ -28,7 +28,8 @@ const CardContainer = styled.div `
|
|
|
28
28
|
const CardTitle = styled.h3 `
|
|
29
29
|
margin: 0;
|
|
30
30
|
color: ${theme.color.gray55};
|
|
31
|
-
font-size: ${theme.fontSize.
|
|
31
|
+
font-size: ${theme.fontSize.s};
|
|
32
|
+
line-height: ${theme.lineHeight.s};
|
|
32
33
|
font-weight: ${theme.fontWeight.book};
|
|
33
34
|
background: ${theme.color.gray5};
|
|
34
35
|
padding: 0.75rem 0 0.25rem 0;
|
|
@@ -38,7 +39,8 @@ const CardTitle = styled.h3 `
|
|
|
38
39
|
${media.md `
|
|
39
40
|
background: ${theme.color.white};
|
|
40
41
|
padding: 1rem 1.875rem;
|
|
41
|
-
font-size: ${theme.fontSize.
|
|
42
|
+
font-size: ${theme.fontSize.l};
|
|
43
|
+
line-height: ${theme.lineHeight.default};
|
|
42
44
|
text-transform: none;
|
|
43
45
|
text-align: center;
|
|
44
46
|
font-weight: ${theme.fontWeight.bold};
|