@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
|
@@ -19,7 +19,7 @@ const CardElement = styled.div `
|
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
21
21
|
const CardContent = styled.div `
|
|
22
|
-
font-size: ${theme.fontSize.
|
|
22
|
+
font-size: ${theme.fontSize.default};
|
|
23
23
|
font-weight: ${theme.fontWeight.medium};
|
|
24
24
|
margin: 0;
|
|
25
25
|
flex-grow: 1;
|
|
@@ -27,11 +27,11 @@ const CardContent = styled.div `
|
|
|
27
27
|
h5 {
|
|
28
28
|
word-break: break-word;
|
|
29
29
|
margin: 0;
|
|
30
|
-
line-height:
|
|
30
|
+
line-height: ${theme.lineHeight.s};
|
|
31
31
|
padding-right: 1.5rem;
|
|
32
32
|
}
|
|
33
33
|
h5 {
|
|
34
|
-
font-size: ${theme.fontSize.
|
|
34
|
+
font-size: ${theme.fontSize.s};
|
|
35
35
|
font-weight: ${theme.fontWeight.book};
|
|
36
36
|
}
|
|
37
37
|
`;
|
|
@@ -1,28 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface Props {
|
|
3
|
+
/**
|
|
4
|
+
* Unique ID for the input element
|
|
5
|
+
*/
|
|
4
6
|
id: string;
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Default value of input element
|
|
9
|
+
*
|
|
10
|
+
* @default undefined
|
|
11
|
+
*/
|
|
8
12
|
value?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Text of the label shown next to checkbox
|
|
15
|
+
*/
|
|
12
16
|
label: string;
|
|
13
|
-
/** Is input disabled */
|
|
14
17
|
/**
|
|
18
|
+
* On checkbox change callback
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (value: boolean) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Allows to disable the checkbox
|
|
23
|
+
*
|
|
15
24
|
* @default false
|
|
16
25
|
*/
|
|
17
26
|
disabled?: boolean;
|
|
18
27
|
/**
|
|
28
|
+
* Allows to set checkbox as mandatory
|
|
29
|
+
*
|
|
19
30
|
* @default false
|
|
20
31
|
*/
|
|
21
|
-
error?: boolean;
|
|
22
32
|
required?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Allows to set checkbox to error state
|
|
35
|
+
*
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
error?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Text of the error message when checkbox is in error state
|
|
41
|
+
*/
|
|
23
42
|
errorMessage?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Allows to pass a custom className
|
|
45
|
+
*/
|
|
46
|
+
className?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Allows to pass testid string for testing purposes
|
|
49
|
+
*/
|
|
24
50
|
'data-testid'?: string;
|
|
25
51
|
}
|
|
26
|
-
declare const Checkbox:
|
|
52
|
+
declare const Checkbox: ({ "data-testid": dataTestId, ...props }: Props) => JSX.Element;
|
|
27
53
|
/** @component */
|
|
28
54
|
export default Checkbox;
|
|
@@ -1,89 +1,56 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { CheckboxInput_RadioInput } from '../../themes/globalStyles.js';
|
|
3
|
+
import styled from '../../themes/styled.js';
|
|
4
|
+
import { getMultipliedSize, getDividedSize } from '../../utils/styledUtils.js';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
`;
|
|
19
|
-
const Input = styled('input') `
|
|
20
|
-
position: absolute;
|
|
21
|
-
left: -9999rem;
|
|
22
|
-
:checked + label::after {
|
|
23
|
-
content: '✓';
|
|
24
|
-
display: block;
|
|
25
|
-
position: absolute;
|
|
26
|
-
left: 2px;
|
|
27
|
-
top: 0;
|
|
28
|
-
font-weight: ${props => props.theme.fontWeight.bold};
|
|
29
|
-
color: ${props => props.theme.color.white};
|
|
30
|
-
animation: ${toggleCheckboxAnimation} 0.2s ease forwards;
|
|
31
|
-
}
|
|
32
|
-
:checked + label::before {
|
|
33
|
-
border-color: ${props => props && props.disabled ? props.theme.color.pink2 : props.theme.color.hotPink};
|
|
34
|
-
background-color: ${props => props && props.disabled ? props.theme.color.pink2 : props.theme.color.hotPink};
|
|
35
|
-
}
|
|
36
|
-
:disabled {
|
|
37
|
-
pointer-events: none;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:disabled + label {
|
|
41
|
-
cursor: not-allowed;
|
|
42
|
-
color: ${props => props.theme.color.gray15};
|
|
43
|
-
}
|
|
6
|
+
// TODO: Implement proper svg icon after https://jira.dna.fi/browse/STYLE-238 is done
|
|
7
|
+
const SVGIconData = () => {
|
|
8
|
+
const svg = `
|
|
9
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="1em" height="1em">
|
|
10
|
+
<path d="M9.57 19.44L3.19 13a.6.6 0 0 1 .81-.84l5.53 5.58 11-10.93a.6.6 0 0 1 .84.85z" />
|
|
11
|
+
</svg>
|
|
12
|
+
`;
|
|
13
|
+
return `data:image/svg+xml,${svg}`;
|
|
14
|
+
};
|
|
15
|
+
const Container = styled.div `
|
|
16
|
+
font-size: ${props => props.theme.fontSize.default};
|
|
17
|
+
line-height: ${props => props.theme.lineHeight.default};
|
|
18
|
+
margin-bottom: ${props => getMultipliedSize(props.theme.base.baseHeight, 0.5)};
|
|
44
19
|
`;
|
|
45
|
-
const
|
|
20
|
+
const Input = styled(CheckboxInput_RadioInput) `
|
|
46
21
|
position: relative;
|
|
47
|
-
|
|
48
|
-
display: inline-block;
|
|
49
|
-
margin-bottom: ${props => getMultipliedSize(props.theme.base.baseHeight, 0.5)};
|
|
50
|
-
padding-left: ${props => getMultipliedSize(props.theme.base.baseWidth, 3)};
|
|
51
|
-
line-height: ${props => getMultipliedSize(props.theme.base.baseHeight, 2)};
|
|
52
|
-
color: ${props => props.theme.color.text};
|
|
22
|
+
top: ${props => getDividedSize(props.theme.base.baseWidth, 5)};
|
|
53
23
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
left: 0;
|
|
61
|
-
width: ${props => getMultipliedSize(props.theme.base.baseWidth, 2)};
|
|
62
|
-
height: ${props => getMultipliedSize(props.theme.base.baseHeight, 2)};
|
|
63
|
-
border: solid 2px ${props => props.theme.color.gray25};
|
|
24
|
+
&:checked {
|
|
25
|
+
&::before {
|
|
26
|
+
width: 1em;
|
|
27
|
+
height: 1em;
|
|
28
|
+
background-image: url('${SVGIconData}');
|
|
29
|
+
}
|
|
64
30
|
}
|
|
65
31
|
`;
|
|
32
|
+
const Mandatory = styled.span `
|
|
33
|
+
color: ${props => props.theme.color.hotPink};
|
|
34
|
+
margin-left: ${props => getMultipliedSize(props.theme.base.baseHeight, 0.5)};
|
|
35
|
+
`;
|
|
66
36
|
const ErrorMessage = styled.div `
|
|
67
|
-
|
|
68
|
-
|
|
37
|
+
font-size: ${props => props.theme.fontSize.s};
|
|
38
|
+
line-height: ${props => props.theme.lineHeight.s};
|
|
69
39
|
color: ${props => props.theme.color.error};
|
|
70
40
|
margin-top: ${props => getMultipliedSize(props.theme.base.baseHeight, 1)};
|
|
71
41
|
`;
|
|
72
|
-
const
|
|
73
|
-
color: ${props => props.theme.color.hotPink};
|
|
74
|
-
`;
|
|
75
|
-
const Checkbox = ({ id, value, onChange, label, disabled, error, errorMessage, className, required, 'data-testid': dataTestId, }) => {
|
|
42
|
+
const Checkbox = ({ 'data-testid': dataTestId, ...props }) => {
|
|
76
43
|
const handleChange = () => {
|
|
77
|
-
if (onChange && !disabled) {
|
|
78
|
-
onChange(!value);
|
|
44
|
+
if (props.onChange && !props.disabled) {
|
|
45
|
+
props.onChange(!props.value);
|
|
79
46
|
}
|
|
80
47
|
};
|
|
81
|
-
return (React.createElement(
|
|
82
|
-
React.createElement(Input, { id: id, className: className, type: "checkbox", checked: Boolean(value), onChange: handleChange, disabled: disabled, "data-testid": dataTestId }),
|
|
83
|
-
React.createElement(
|
|
84
|
-
label,
|
|
85
|
-
required && React.createElement(Mandatory, null, "
|
|
86
|
-
error && errorMessage && (React.createElement(ErrorMessage, { "data-testid": dataTestId && `${dataTestId}-error` }, errorMessage))));
|
|
48
|
+
return (React.createElement(Container, null,
|
|
49
|
+
React.createElement(Input, { id: props.id, className: props.className, type: "checkbox", checked: Boolean(props.value), onChange: handleChange, disabled: props.disabled, "data-testid": dataTestId }),
|
|
50
|
+
React.createElement("label", { htmlFor: props.id, "data-testid": dataTestId && `${dataTestId}-label` },
|
|
51
|
+
props.label,
|
|
52
|
+
props.required && React.createElement(Mandatory, null, "*")),
|
|
53
|
+
props.error && props.errorMessage && (React.createElement(ErrorMessage, { "data-testid": dataTestId && `${dataTestId}-error` }, props.errorMessage))));
|
|
87
54
|
};
|
|
88
55
|
|
|
89
56
|
export default Checkbox;
|
|
@@ -58,12 +58,7 @@ declare const _default: import("styled-components").StyledComponent<({ type, siz
|
|
|
58
58
|
};
|
|
59
59
|
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
60
60
|
button: {
|
|
61
|
-
|
|
62
|
-
buttonPadding: string;
|
|
63
|
-
smallButtonPadding: string;
|
|
64
|
-
buttonLineHeight: string;
|
|
65
|
-
buttonWidth: string;
|
|
66
|
-
buttonSmallWidth: string;
|
|
61
|
+
border: string;
|
|
67
62
|
};
|
|
68
63
|
color: {
|
|
69
64
|
black: string;
|
|
@@ -94,22 +89,27 @@ declare const _default: import("styled-components").StyledComponent<({ type, siz
|
|
|
94
89
|
gray5: string;
|
|
95
90
|
};
|
|
96
91
|
fontFamily: {
|
|
97
|
-
|
|
92
|
+
default: string;
|
|
93
|
+
heading: string;
|
|
94
|
+
numerals: string;
|
|
98
95
|
};
|
|
99
96
|
fontSize: {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
97
|
+
default: string;
|
|
98
|
+
xl: string;
|
|
99
|
+
l: string;
|
|
100
|
+
s: string;
|
|
101
|
+
xs: string;
|
|
102
|
+
h1XL: string;
|
|
103
|
+
h1L: string;
|
|
104
|
+
h1M: string;
|
|
105
|
+
h1S: string;
|
|
106
|
+
h2M: string;
|
|
107
|
+
h2S: string;
|
|
108
|
+
h3: string;
|
|
109
|
+
h4: string;
|
|
110
|
+
h5: string;
|
|
111
|
+
h1: string;
|
|
112
|
+
h2: string;
|
|
113
113
|
};
|
|
114
114
|
fontWeight: {
|
|
115
115
|
book: number;
|
|
@@ -125,26 +125,23 @@ declare const _default: import("styled-components").StyledComponent<({ type, siz
|
|
|
125
125
|
gutter: string;
|
|
126
126
|
};
|
|
127
127
|
lineHeight: {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
* @param {Type} logotype-black For specific uses only (see Brand Styleguide)
|
|
146
|
-
*/
|
|
147
|
-
h5LineHeight: string;
|
|
128
|
+
default: string;
|
|
129
|
+
xl: string;
|
|
130
|
+
s: string;
|
|
131
|
+
xs: string;
|
|
132
|
+
xxs: string;
|
|
133
|
+
auto: string;
|
|
134
|
+
h1XL: string;
|
|
135
|
+
h1L: string;
|
|
136
|
+
h1M: string;
|
|
137
|
+
h1S: string;
|
|
138
|
+
h2M: string;
|
|
139
|
+
h2S: string;
|
|
140
|
+
h3: string;
|
|
141
|
+
h4: string;
|
|
142
|
+
h5: string;
|
|
143
|
+
h1: string;
|
|
144
|
+
h2: string;
|
|
148
145
|
};
|
|
149
146
|
media: Record<string | number, (l: TemplateStringsArray, ...p: any[]) => string>;
|
|
150
147
|
}, Props, never>;
|
|
@@ -69,7 +69,8 @@ const CategoryHeader = styled.h4 `
|
|
|
69
69
|
border-top: 1px solid #cfcfcf;
|
|
70
70
|
transition: border-bottom 0s linear ${props => (props.active ? '0s' : '0.3s')};
|
|
71
71
|
border-bottom: 1px solid ${props => (props.active ? '#cfcfcf' : '#e7e7e7')};
|
|
72
|
-
font-size: ${props => props.theme.fontSize.
|
|
72
|
+
font-size: ${props => props.theme.fontSize.default};
|
|
73
|
+
line-height: ${props => props.theme.lineHeight.default};
|
|
73
74
|
color: ${props => props.theme.color.slateGray};
|
|
74
75
|
align-content: center;
|
|
75
76
|
&:hover,
|
|
@@ -131,7 +132,7 @@ const SmallText = styled.p `
|
|
|
131
132
|
margin-top: ${props => getMultipliedSize(props.theme.base.baseWidth, 0.2)};
|
|
132
133
|
line-height: ${props => getMultipliedSize(props.theme.base.baseHeight, 2)};
|
|
133
134
|
color: ${props => props.theme.color.slateGray};
|
|
134
|
-
font-size: ${props => props.theme.fontSize.
|
|
135
|
+
font-size: ${props => props.theme.fontSize.xs};
|
|
135
136
|
`;
|
|
136
137
|
const LanguageLinksContainer = styled.div `
|
|
137
138
|
text-align: center;
|
|
@@ -23,7 +23,8 @@ const HelperIcon = styled.span `
|
|
|
23
23
|
height: 1rem;
|
|
24
24
|
min-width: 1rem;
|
|
25
25
|
padding: 0 4px;
|
|
26
|
-
font-size: ${p => p.theme.fontSize.
|
|
26
|
+
font-size: ${p => p.theme.fontSize.s};
|
|
27
|
+
line-height: ${p => p.theme.lineHeight.xs};
|
|
27
28
|
`;
|
|
28
29
|
const Helper = props => (createElement(Container, Object.assign({}, props),
|
|
29
30
|
createElement(HelperIcon, null, "?")));
|
|
@@ -44,12 +44,7 @@ declare const _default: import("styled-components").StyledComponent<React.Functi
|
|
|
44
44
|
};
|
|
45
45
|
breakpoints: import("../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
46
46
|
button: {
|
|
47
|
-
|
|
48
|
-
buttonPadding: string;
|
|
49
|
-
smallButtonPadding: string;
|
|
50
|
-
buttonLineHeight: string;
|
|
51
|
-
buttonWidth: string;
|
|
52
|
-
buttonSmallWidth: string;
|
|
47
|
+
border: string;
|
|
53
48
|
};
|
|
54
49
|
color: {
|
|
55
50
|
black: string;
|
|
@@ -88,22 +83,29 @@ declare const _default: import("styled-components").StyledComponent<React.Functi
|
|
|
88
83
|
gray5: string;
|
|
89
84
|
};
|
|
90
85
|
fontFamily: {
|
|
91
|
-
|
|
86
|
+
default: string;
|
|
87
|
+
heading: string;
|
|
88
|
+
numerals: string;
|
|
92
89
|
};
|
|
93
90
|
fontSize: {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
91
|
+
default: string;
|
|
92
|
+
xl: string;
|
|
93
|
+
l: string;
|
|
94
|
+
s: string;
|
|
95
|
+
xs: string;
|
|
96
|
+
h1XL: string;
|
|
97
|
+
h1L: string;
|
|
98
|
+
h1M: string;
|
|
99
|
+
h1S: string;
|
|
100
|
+
h2M: string;
|
|
101
|
+
h2S: string; /**
|
|
102
|
+
* Icon color, specified as a hex, or a color name (hotPink, waterBlue)
|
|
103
|
+
*/
|
|
104
|
+
h3: string;
|
|
105
|
+
h4: string;
|
|
106
|
+
h5: string;
|
|
107
|
+
h1: string;
|
|
108
|
+
h2: string;
|
|
107
109
|
};
|
|
108
110
|
fontWeight: {
|
|
109
111
|
book: number;
|
|
@@ -121,16 +123,23 @@ declare const _default: import("styled-components").StyledComponent<React.Functi
|
|
|
121
123
|
* Indicates that this component is on right side of other contents and adds an appropriate left margin.
|
|
122
124
|
*/
|
|
123
125
|
lineHeight: {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
default: string;
|
|
127
|
+
xl: string;
|
|
128
|
+
s: string;
|
|
129
|
+
xs: string;
|
|
130
|
+
xxs: string;
|
|
131
|
+
auto: string;
|
|
132
|
+
h1XL: string;
|
|
133
|
+
h1L: string;
|
|
134
|
+
h1M: string;
|
|
135
|
+
h1S: string;
|
|
136
|
+
h2M: string;
|
|
137
|
+
h2S: string;
|
|
138
|
+
h3: string;
|
|
139
|
+
h4: string;
|
|
140
|
+
h5: string;
|
|
141
|
+
h1: string;
|
|
142
|
+
h2: string;
|
|
134
143
|
};
|
|
135
144
|
media: Record<React.ReactText, (l: TemplateStringsArray, ...p: any[]) => string>;
|
|
136
145
|
}, IconProps, never>;
|
|
@@ -55,10 +55,6 @@ export declare const devices: ({ size, color, ...props }: IconProps) => JSX.Elem
|
|
|
55
55
|
export declare const diamond: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
56
56
|
export declare const digibox: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
57
57
|
export declare const digiboxRec: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
58
|
-
/**
|
|
59
|
-
* @deprecated
|
|
60
|
-
*/
|
|
61
|
-
export declare const dna: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
62
58
|
export declare const dnaTurvapaketti: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
63
59
|
export declare const dnaTv: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
64
60
|
export declare const document1: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
@@ -191,6 +187,7 @@ export declare const thriller: ({ size, color, ...props }: IconProps) => JSX.Ele
|
|
|
191
187
|
export declare const thumbDown: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
192
188
|
export declare const thumbUp: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
193
189
|
export declare const tickets: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
190
|
+
export declare const tiktok: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
194
191
|
export declare const top10: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
195
192
|
export declare const top50: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
196
193
|
export declare const trademark: ({ size, color, ...props }: IconProps) => JSX.Element;
|
|
@@ -126,12 +126,6 @@ const digibox = ({ size, color, ...props }) => (React.createElement("svg", Objec
|
|
|
126
126
|
React.createElement("path", { d: "M.714 39.5h114.901V0H.715v39.5zM7.257 6.6h101.914V33H7.257V6.6zm88.53 8.8c-2.379 0-4.362 2-4.362 4.4 0 2.5 1.884 4.5 4.363 4.5 2.478 0 4.46-1.9 4.46-4.4v-.1c-.098-2.4-2.081-4.4-4.46-4.4z", fillRule: "evenodd" })));
|
|
127
127
|
const digiboxRec = ({ size, color, ...props }) => (React.createElement("svg", Object.assign({ viewBox: "0 0 116 40", fill: color, width: size, height: size }, props),
|
|
128
128
|
React.createElement("path", { d: "M.286 39.5h114.9V0H.287v39.5zm6.444-33h102.112v26.4H6.73V6.5zm88.629 8.7c-2.38 0-4.362 2-4.362 4.4 0 2.4 1.884 4.4 4.263 4.4h.198c2.38 0 4.362-2 4.362-4.4-.099-2.4-2.082-4.3-4.461-4.4zm-69.297 1.4c0-2.4-1.884-4.3-4.263-4.3h-5.651v13.9h3.073V21h1.09l2.479 5.2h3.47l-2.875-5.6c1.685-.6 2.776-2.2 2.677-4zm-5.056 1.8H19.22V15h1.785c1.288 0 1.982.6 1.982 1.7 0 1-.793 1.7-1.784 1.7h-.198zm9.814 2.1h5.155v-2.6H30.82v-2.6h5.552v-3h-8.724v13.9h8.823v-3h-5.75c.1 0 .1-2.7.1-2.7zm14.078 2.9c-2.28 0-4.164-1.8-4.263-4.1-.1-2.3 1.784-4.2 4.065-4.3 1.685-.2 3.172.9 3.568 2.5l2.875-.8c-.495-2-2.28-4.7-6.443-4.7-3.966 0-7.138 3.3-7.04 7.3.1 4 3.272 7.2 7.238 7.1 3.073.2 5.75-1.8 6.543-4.8l-2.974-.8a3.447 3.447 0 0 1-3.57 2.6z", fillRule: "evenodd" })));
|
|
129
|
-
/**
|
|
130
|
-
* @deprecated
|
|
131
|
-
*/
|
|
132
|
-
const dna = ({ size, color, ...props }) => (React.createElement("svg", Object.assign({ viewBox: "-185 277 240 240", fill: color, width: size, height: size }, props),
|
|
133
|
-
React.createElement("path", { d: "M-185.2 277v240H55V277h-240.2zm81.6 136.6c0 14.3-11.4 25.7-25.4 25.7h-25.4v-85h25.4c14 0 25.4 11.4 25.4 25.7v33.6zm63.6 25.7h-15.2v-59.6c0-5.8-4.4-10.2-10.2-10.2h-10.5v69.8h-14.9v-85h25.4c14 0 25.4 11.4 25.4 25.4v59.6zm64.6 0H9.4V409h-20.7v30.4h-15.2v-60.1c0-14 11.4-25.4 25.4-25.4h.3c14 0 25.4 11.4 25.4 25.4v60z" }),
|
|
134
|
-
React.createElement("path", { d: "M-.8 369h-.3c-5.8 0-10.2 4.7-10.2 10.2v15.5H9.4v-15.5c0-5.6-4.7-10.2-10.2-10.2zm-128 .6h-10.8v54.6h10.8c5.6 0 10.2-4.7 10.2-10.2v-34.2c.1-5.9-4.6-10.2-10.2-10.2z" })));
|
|
135
129
|
const dnaTurvapaketti = ({ size, color, ...props }) => (React.createElement("svg", Object.assign({ viewBox: "0 0 78 102", fill: color, width: size, height: size }, props),
|
|
136
130
|
React.createElement("path", { d: "M65.9 11.4V0H0v90.2h11.5v11.4h66V11.4H65.9zM11.5 84.5H5.6V5.8h54.5v5.6H11.5v73.1zM45.2 78l-.7.2-.7-.2C26 71 26.5 60.5 26.5 59.4V38.6H29c2.4.1 4.8-.3 7.1-1.1 2.8-1 5.2-2.8 6.8-5.2l.5-.6h2l.5.6c1.8 2.4 4.2 4.2 7 5.2 2.3.8 4.7 1.1 7.1 1.1h2.5v20.8c0 1.1.5 11.6-17.3 18.6z", fillRule: "evenodd" })));
|
|
137
131
|
const dnaTv = ({ size, color, ...props }) => (React.createElement("svg", Object.assign({ viewBox: "0 0 105 72", fill: color, width: size, height: size }, props),
|
|
@@ -424,6 +418,8 @@ const thumbUp = ({ size, color, ...props }) => (React.createElement("svg", Objec
|
|
|
424
418
|
React.createElement("path", { d: "M30.642 36.214v48.335H0V36.214h30.642zM5.572 78.978H25.07V41.785H5.57v37.193zm82.5-49.435c7.692 0 13.928 6.236 13.928 13.928 0 1.42-.217 2.833-.645 4.189L90.123 83.279a11.143 11.143 0 0 1-10.626 7.792H63.744l-30.316-9.406V37.877l17.715-16.439a8.357 8.357 0 0 0 2.673-6.126v-4.17C53.816 4.99 58.804 0 64.958 0h.342c6.154 0 11.143 4.989 11.143 11.143v18.4h11.629zM38.999 77.56l25.59 7.94h14.908a5.571 5.571 0 0 0 5.313-3.896l11.232-35.62a8.357 8.357 0 0 0-7.97-10.87h-17.2V11.143A5.571 5.571 0 0 0 65.3 5.57h-.342a5.571 5.571 0 0 0-5.571 5.572v4.17c0 3.874-1.614 7.573-4.454 10.209L38.999 40.307V77.56zm-23.678-5.133a4.178 4.178 0 1 1 0-8.357 4.178 4.178 0 0 1 0 8.357z" })));
|
|
425
419
|
const tickets = ({ size, color, ...props }) => (React.createElement("svg", Object.assign({ viewBox: "0 0 99 100", fill: color, width: size, height: size }, props),
|
|
426
420
|
React.createElement("path", { d: "M76.329 5.9L49.005 7.3 46.233 0 0 18.2l29.898 77.4 10.197-4.1 43.56 7.9 14.652-81.7-21.483-4-.495-7.8zm-68.013 16l18.81-7.4 3.564 65L8.316 21.9zm28.71 56.7L33.66 14.7l11.187-.6 3.762-.2-1.188 7-10.395 57.7zM90.882 23L82.17 71.5l-2.277-.4-1.881-.4-1.188 6.5 3.465.6.693.1-.594 3.4-1.287 7.6-.594 3-12.375-2.3L51.678 87l-9.306-1.7.099-1 .198-.8 2.178-12.1 3.069.6 1.089-6.5-2.97-.6 5.841-32.4 2.178-12.2.693-3.8 15.939 2.9 6.534 1.2L90.882 23zM50.688 72.5l5.94 1.1 1.188-6.5-5.94-1.1-1.188 6.5zm9.9-4.8L59.4 74l4.95 1 1.089.1.099-.6.693-4.6.198-1.2-.693-.2-5.148-.8zm7.623 7.9l5.544 1.1h.396l.594-3.1.594-3.2-1.881-.4h-.198l-3.96-.7-1.089 6.3z", fillRule: "evenodd" })));
|
|
421
|
+
const tiktok = ({ size, color, ...props }) => (React.createElement("svg", Object.assign({ viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: color, width: size, height: size }, props),
|
|
422
|
+
React.createElement("path", { d: "M22.4442 5.93598C16.3531 5.35403 16.4695 0 16.4695 0H12.5419V16.9081C12.4429 18.7164 10.9478 20.1319 9.13677 20.1319C7.25334 20.1319 5.72652 18.6051 5.72652 16.7216C5.72652 14.8382 7.25334 13.3114 9.13677 13.3114C9.53425 13.3114 9.92868 13.3809 10.3022 13.5167L10.3408 9.05258C9.92504 8.98209 9.50412 8.94665 9.08246 8.94665C4.92559 8.94665 1.55579 12.3165 1.55579 16.4733C1.55579 20.6302 4.92559 24 9.08246 24C13.0974 24 16.4055 20.8487 16.6003 16.8385V8.03104C16.6003 8.03104 18.7585 9.89331 22.4442 9.97091V5.93598Z" })));
|
|
427
423
|
const top10 = ({ size, color, ...props }) => (React.createElement("svg", Object.assign({ viewBox: "0 0 72 73", fill: color, width: size, height: size }, props),
|
|
428
424
|
React.createElement("path", { d: "M.6 72.1h71.112V0H.6v72.1zM7.11 6.6h58.093v59H7.11v-59zm21.402 13.7H15.69v3.2h4.735v12.1h3.353V23.5h4.734v-3.2zM36.205 36c4.34 0 7.89-3.6 7.89-8s-3.55-8-7.89-8-7.89 3.6-7.89 8c-.099 4.3 3.255 7.9 7.496 8h.394zm0-12.7c2.565-.1 4.735 1.8 4.833 4.4.099 2.6-1.775 4.8-4.34 4.9-2.564.1-4.734-1.8-4.832-4.4V28c-.198-2.4 1.578-4.5 3.945-4.7h.394zm15.09-3h-5.818v15.4h3.452v-5.5h2.367c3.057 0 5.227-2 5.227-4.9 0-2.9-2.17-5-5.227-5zm-.394 6.8H48.93v-3.8h1.97c1.085-.1 1.973.6 2.072 1.7.098 1.1-.592 2-1.677 2.1H50.9zM24.863 42.2v2.3h3.353v9.2h3.452V39.6H28.71c-.296 1.4-1.677 2.6-3.847 2.6zm13.71-3c-1.874-.1-3.748.9-4.735 2.5a8.61 8.61 0 0 0-1.183 4.9c-.099 1.8.296 3.5 1.183 5a5.86 5.86 0 0 0 4.735 2.4c1.874.1 3.649-.8 4.734-2.4.986-1.5 1.38-3.3 1.282-5 .099-1.7-.394-3.5-1.282-4.9a5.233 5.233 0 0 0-4.734-2.5zm2.17 10.6c-.395.8-1.283 1.3-2.17 1.3-.888 0-1.677-.5-1.973-1.3-.395-1-.493-2.1-.493-3.1s.098-2 .493-3c.296-.8 1.085-1.4 1.973-1.3.887 0 1.775.5 2.17 1.3.394 1 .493 2 .493 3s-.198 2.1-.494 3.1z", fillRule: "evenodd" })));
|
|
429
425
|
const top50 = ({ size, color, ...props }) => (React.createElement("svg", Object.assign({ viewBox: "0 0 72 73", fill: color, width: size, height: size }, props),
|
|
@@ -779,4 +775,4 @@ const hlWifi = ({ size, color, ...props }) => (React.createElement("svg", Object
|
|
|
779
775
|
const hlX = ({ size, color, ...props }) => (React.createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: color, width: size, height: size }, props),
|
|
780
776
|
React.createElement("path", { d: "M12.85 12l7.38-7.38a.6.6 0 0 0-.85-.85L12 11.15 4.62 3.78a.6.6 0 0 0-.85.85L11.15 12l-7.37 7.38a.6.6 0 1 0 .85.85L12 12.85l7.38 7.38a.6.6 0 0 0 .85-.85z" })));
|
|
781
777
|
|
|
782
|
-
export { action, airplane, anime, antenna, apartmentBuilding1, apartmentBuilding2, apartmentBuilding3, arrows, backward, balloon, basket, book, briefcase, broadbandHome, broadbandHousing, broadbandMobile, browser, bus, cableTv, calculator, calendar1, calendar2, camera, channelPackageL, channelPackageM, channelPackageMix, channelPackageMix4, channelPackageMix8, channelPackageMixPlus, channelPackageNorra, channelPackageRossija, channelPackageS, channelPackageTurk, check, chevronDown, chevronLeft, chevronRight, chevronUp, clapperboard, clipboard, cloud1, cloud2, cogwheel, comedy, cultFilms, culture, curvedArrowLeft, curvedArrowRight, cycle, desktopComputer, devices, diamond, digibox, digiboxRec,
|
|
778
|
+
export { action, airplane, anime, antenna, apartmentBuilding1, apartmentBuilding2, apartmentBuilding3, arrows, backward, balloon, basket, book, briefcase, broadbandHome, broadbandHousing, broadbandMobile, browser, bus, cableTv, calculator, calendar1, calendar2, camera, channelPackageL, channelPackageM, channelPackageMix, channelPackageMix4, channelPackageMix8, channelPackageMixPlus, channelPackageNorra, channelPackageRossija, channelPackageS, channelPackageTurk, check, chevronDown, chevronLeft, chevronRight, chevronUp, clapperboard, clipboard, cloud1, cloud2, cogwheel, comedy, cultFilms, culture, curvedArrowLeft, curvedArrowRight, cycle, desktopComputer, devices, diamond, digibox, digiboxRec, dnaTurvapaketti, dnaTv, document1, document2, document3, documentaries, documents1, documents2, door, download, drama, dvbC, dvbT2, dwr, envelope1, envelope2, epg, error, ethernet, eu, euro, exclamationMark, eyeClosed, eyeOpen, facebook, favorites, finland, finnish, folder1, folder2, folder3, forward, fourG, gameConsole, gift, gift2, globe, google, graduation, graph, hardDrive, hd, hdmiCable, headset1, headset2, hl404, hl4gSim, hl5gSim, hlArrowBack, hlArrowForward, hlArrowSmallLeft, hlArrowSmallRight, hlArrowSmallUnder, hlBattery, hlBell, hlCalendar, hlCalendarSmall, hlCall, hlCameraBack, hlCameraFront, hlCart, hlCartEmpty, hlChat, hlCheck, hlChevronDown, hlChevronLeft, hlChevronRight, hlChevronUp, hlClockSmall, hlCompensation, hlCookie, hlCopy, hlCoupon, hlDisplaySize, hlDocument, hlDownload, hlDownloadSmall, hlEnvelope, hlError, hlEuro, hlExpand, hlExternal, hlEyeClosed, hlEyeOpen, hlFaceId, hlFingerprint, hlGlobe, hlHeadphones, hlHeadset, hlHeart, hlHome, hlImage, hlInfo, hlInstallment, hlIotSim, hlLock, hlMagnifyingGlass, hlMarker, hlMemory, hlMenu, hlMinimize, hlMinus, hlMobileData, hlMobilePayment, hlModem, hlMore, hlOs, hlPackage, hlPaperclip, hlPaytime, hlPen, hlPerson, hlPhone, hlPlus, hlPrepaid, hlProcessor, hlServices, hlSettings, hlShield, hlSim, hlSimSimple, hlSmile, hlSpeechBubble, hlSquaretrade, hlStar, hlStarFilled, hlTrash, hlTv, hlUnlock, hlUpload, hlUploadSmall, hlWarning, hlWifi, hlX, hobbies, hotdog, house, hub, idCard, info, instagram, iot1, iot2, iot3, ip, key, kids, laptop, leaf, linkedin, magnifyingGlass, man1, man2, man3, man4, man5, marker, maximize, megaphone, minimize, minus, modem, molecule, money1, money2, mouse, mp3, music, newspaper, next, paperclip, pause, pdf, pen, person, person2, persons1, persons2, persons3, pg18, phone1, phone2, phonePrepaid, phonePrepaid4g, phoneWifiPrepaid, play, plus, power, previous, projector, radioMast, rec, rec2, remoteControl, romantic, router, rss, scale, shield, simCard1, simCard2, simCard4g, simCard4gWifi, simCardInfinity, simCardInfinity4g, simCardWifi, soda, speaker, speechBubble1, speechBubble2, speechBubble3, sports, star, stop, swedish, tablet, target, terrestialTv, thriller, thumbDown, thumbUp, tickets, tiktok, top10, top50, trademark, trafficCone, trafficLights, train, tv1, tv2, tvCard, tvWithRecording, tvWithRemote1, tvWithRemote2, tvWithRemote3, tvWithRemote4, twitter, upgrade, upload, usb, usbCable, usbModem, van, videocamera, wall, warning, whatsapp, wifi1, wifi2, wifiAccessPoint, woman1, woman2, woman3, world, wrench1, wrench2, x, youtube };
|
|
@@ -1,34 +1,123 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare type ComponentStatus = 'none' | 'success' | 'error' | 'comment';
|
|
3
|
+
declare type InputType = 'date' | 'email' | 'hidden' | 'month' | 'number' | 'password' | 'range' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
|
|
4
|
+
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Unique ID for the input element
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Name of the input element
|
|
11
|
+
*/
|
|
4
12
|
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* Type of input element
|
|
15
|
+
*
|
|
16
|
+
* @default 'text'
|
|
17
|
+
* @param {InputType} date Used for entering a date (year, month and day)
|
|
18
|
+
* @param {InputType} email Used for entering an email address and supported with browser validation
|
|
19
|
+
* @param {InputType} hidden Input element is not displayed but its value is submitted with form regardless
|
|
20
|
+
* @param {InputType} month Used for entering a month and year, with no time zone
|
|
21
|
+
* @param {InputType} number Used for entering a number, it displays arrows and might have browser validation
|
|
22
|
+
* @param {InputType} password Used for entering value which is obscured for view
|
|
23
|
+
* @param {InputType} range Used for entering a not number by displaying a range widget
|
|
24
|
+
* @param {InputType} search Used for entering search strings
|
|
25
|
+
* @param {InputType} tel Used for entering a telephone number
|
|
26
|
+
* @param {InputType} text Single-line text field
|
|
27
|
+
* @param {InputType} time Used for entering a time value with no time zone
|
|
28
|
+
* @param {InputType} url Used for entering a URL and supported with browser validation
|
|
29
|
+
* @param {InputType} week Used for entering a week (week-year number and a week number with no time zone)
|
|
30
|
+
*/
|
|
31
|
+
type?: InputType;
|
|
32
|
+
/**
|
|
33
|
+
* Default value of input element
|
|
34
|
+
*/
|
|
5
35
|
value?: string | number;
|
|
36
|
+
/**
|
|
37
|
+
* Text of the input element label
|
|
38
|
+
*/
|
|
39
|
+
label?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Text of placeholder for the input value
|
|
42
|
+
*/
|
|
43
|
+
placeholder?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Integer attribute indicating the sequence of keyboard navigation
|
|
46
|
+
*/
|
|
47
|
+
tabIndex?: number;
|
|
48
|
+
/**
|
|
49
|
+
* On input change callback
|
|
50
|
+
*/
|
|
51
|
+
onChange?: (...args: any[]) => any;
|
|
52
|
+
/**
|
|
53
|
+
* On input blur callback
|
|
54
|
+
*/
|
|
6
55
|
onBlur?: (...args: any[]) => any;
|
|
56
|
+
/**
|
|
57
|
+
* On input focus callback
|
|
58
|
+
*/
|
|
7
59
|
onFocus?: (...args: any[]) => any;
|
|
8
|
-
|
|
60
|
+
/**
|
|
61
|
+
* On input key press callback
|
|
62
|
+
*/
|
|
9
63
|
onKeyPress?: (...args: any[]) => any;
|
|
64
|
+
/**
|
|
65
|
+
* On input key down callback
|
|
66
|
+
*/
|
|
10
67
|
onKeyDown?: (...args: any[]) => any;
|
|
11
68
|
/**
|
|
12
|
-
*
|
|
69
|
+
* Allows user to change type of input between "password" and "text"
|
|
70
|
+
* When set to true, value of type property is ignored
|
|
71
|
+
*
|
|
72
|
+
* @default false
|
|
13
73
|
*/
|
|
14
|
-
|
|
74
|
+
showPasswordToggle?: boolean;
|
|
15
75
|
/**
|
|
16
|
-
*
|
|
76
|
+
* Allows to define space separated string to describe type of autocomplete functionality the input should provide
|
|
77
|
+
* Use "off" to disable built-in browser autocomplete functionality
|
|
78
|
+
*
|
|
79
|
+
* For possible values refer to e.g.: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
80
|
+
*/
|
|
81
|
+
autocomplete?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Allows to disable the component functionality
|
|
84
|
+
*
|
|
85
|
+
* @default false
|
|
17
86
|
*/
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
id?: string;
|
|
20
|
-
required?: boolean;
|
|
21
87
|
disabled?: boolean;
|
|
22
|
-
showPasswordToggle?: boolean;
|
|
23
|
-
tabIndex?: number;
|
|
24
88
|
/**
|
|
89
|
+
* Allows to set input as mandatory
|
|
90
|
+
*
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
required?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Depending on the passed status, the styling and additional elements are shown
|
|
96
|
+
*
|
|
25
97
|
* @default 'none'
|
|
98
|
+
* @param {ComponentStatus} none No specific styling
|
|
99
|
+
* @param {ComponentStatus} success Displays #e80c0c color code as bottom line color of input
|
|
100
|
+
* @param {ComponentStatus} error Displays #ff7800 color code as bottom line color of input and error message underneath the input
|
|
101
|
+
* @param {ComponentStatus} comment Displays comment message underneath the input
|
|
102
|
+
*/
|
|
103
|
+
status?: ComponentStatus;
|
|
104
|
+
/**
|
|
105
|
+
* Text of the error message when input is in error state
|
|
26
106
|
*/
|
|
27
|
-
status?: string;
|
|
28
107
|
errorMessage?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Text of the comment message when input is in comment state
|
|
110
|
+
*/
|
|
29
111
|
commentMessage?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Allows to pass a custom className
|
|
114
|
+
*/
|
|
115
|
+
className?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Allows to pass testid string for testing purposes
|
|
118
|
+
*/
|
|
30
119
|
'data-testid'?: string;
|
|
31
120
|
}
|
|
32
|
-
declare const Input: React.FunctionComponent<
|
|
121
|
+
declare const Input: React.FunctionComponent<Props>;
|
|
33
122
|
/** @component */
|
|
34
123
|
export default Input;
|