@dnanpm/styleguide 3.10.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/Accordion/Accordion.js +3 -4
- package/build/cjs/components/AccordionItem/AccordionItem.js +17 -16
- package/build/cjs/components/AmountSelector/AmountSelector.d.ts +17 -1
- package/build/cjs/components/AmountSelector/AmountSelector.js +53 -10
- package/build/cjs/components/Box/Box.js +6 -7
- package/build/cjs/components/Button/Button.js +26 -23
- package/build/cjs/components/ButtonArrow/ButtonArrow.js +3 -4
- package/build/cjs/components/ButtonCard/ButtonCard.js +9 -10
- package/build/cjs/components/ButtonClose/ButtonClose.js +2 -2
- package/build/cjs/components/ButtonIcon/ButtonIcon.js +9 -10
- package/build/cjs/components/ButtonPrimary/ButtonPrimary.js +2 -6
- package/build/cjs/components/ButtonRound/ButtonRound.js +2 -3
- package/build/cjs/components/ButtonSecondary/ButtonSecondary.js +2 -6
- package/build/cjs/components/Carousel/Carousel.d.ts +6 -169
- package/build/cjs/components/Carousel/Carousel.js +23 -23
- package/build/cjs/components/Checkbox/Checkbox.js +5 -5
- package/build/cjs/components/Chip/Chip.js +2 -3
- package/build/cjs/components/DateTimePicker/DateTimePicker.js +17 -6
- package/build/cjs/components/Divider/Divider.js +5 -6
- package/build/cjs/components/DnaLogo/DnaLogo.js +4 -4
- package/build/cjs/components/Drawer/Drawer.js +26 -26
- package/build/cjs/components/EmptyState/EmptyState.js +2 -2
- package/build/cjs/components/EnergyLabel/EnergyLabel.js +11 -11
- package/build/cjs/components/Expander/Expander.js +5 -5
- package/build/cjs/components/Floater/Floater.js +5 -6
- package/build/cjs/components/Footer/Components/FooterComponents.d.ts +3 -168
- package/build/cjs/components/Footer/Components/FooterComponents.js +33 -32
- package/build/cjs/components/Footer/Footer.js +5 -5
- package/build/cjs/components/Icon/Icon.js +6 -6
- package/build/cjs/components/InfoDialog/InfoDialog.js +4 -4
- package/build/cjs/components/Input/Input.js +24 -16
- package/build/cjs/components/Label/Label.js +2 -2
- package/build/cjs/components/LabelText/LabelText.js +5 -5
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/BusinessMenu.js +8 -8
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/DesktopMenu.js +11 -11
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +2 -2
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +2 -167
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +5 -5
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -167
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +2 -2
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +2 -2
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MobileMenu.js +4 -4
- package/build/cjs/components/MainHeaderNavigation/MainHeaderNavigation.js +6 -6
- package/build/cjs/components/MainHeaderNavigation/globalNavStyles.d.ts +16 -1501
- package/build/cjs/components/MainHeaderNavigation/globalNavStyles.js +10 -10
- package/build/cjs/components/MainNavigation/ChildComponents/BusinessMenu.js +4 -4
- package/build/cjs/components/MainNavigation/ChildComponents/DesktopMenu.js +11 -11
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +2 -167
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +9 -9
- package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.js +2 -2
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +5 -5
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -167
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +2 -2
- package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.js +5 -5
- package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.js +4 -4
- package/build/cjs/components/MainNavigation/MainNavigation.js +6 -6
- package/build/cjs/components/MainNavigation/globalNavStyles.d.ts +8 -668
- package/build/cjs/components/MainNavigation/globalNavStyles.js +5 -5
- package/build/cjs/components/Modal/Modal.js +16 -16
- package/build/cjs/components/Notification/Notification.js +7 -8
- package/build/cjs/components/NotificationBadge/NotificationBadge.js +7 -7
- package/build/cjs/components/Overlay/Overlay.js +2 -2
- package/build/cjs/components/Pill/Pill.js +11 -12
- package/build/cjs/components/PixelLoader/PixelLoader.js +9 -9
- package/build/cjs/components/PriorityNavigation/PriorityNavigation.js +13 -13
- package/build/cjs/components/PriorityNavigationItem/PriorityNavigationItem.js +7 -7
- package/build/cjs/components/ProgressIndicator/ProgressIndicator.js +6 -6
- package/build/cjs/components/RadioButton/RadioButton.js +4 -4
- package/build/cjs/components/ReadMore/ReadMore.js +10 -10
- package/build/cjs/components/Search/Search.js +4 -4
- package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +9 -9
- package/build/cjs/components/Selectbox/Selectbox.js +3 -3
- package/build/cjs/components/Switch/Switch.js +19 -19
- package/build/cjs/components/Tab/Tab.js +10 -10
- package/build/cjs/components/Tabs/Tabs.js +10 -10
- package/build/cjs/components/Textarea/Textarea.d.ts +5 -1
- package/build/cjs/components/Textarea/Textarea.js +12 -9
- package/build/cjs/components/Toaster/Toaster.js +6 -7
- package/build/cjs/components/Tooltip/Tooltip.js +6 -6
- package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +4 -334
- package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +5 -4
- package/build/cjs/components/TooltipMenu/TooltipMenu.js +5 -5
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +5 -2
- package/build/cjs/themes/globalStyles.d.ts +2 -332
- package/build/cjs/themes/globalStyles.js +3 -3
- package/build/cjs/themes/styled.d.ts +1 -1158
- package/build/cjs/utils/createStyled.d.ts +140 -7
- package/build/cjs/utils/createStyled.js +3 -3
- package/build/cjs/utils/styledUtils.js +3 -3
- package/build/es/components/Accordion/Accordion.js +2 -2
- package/build/es/components/AccordionItem/AccordionItem.js +15 -13
- package/build/es/components/AmountSelector/AmountSelector.d.ts +17 -1
- package/build/es/components/AmountSelector/AmountSelector.js +50 -7
- package/build/es/components/Box/Box.js +6 -6
- package/build/es/components/Button/Button.js +26 -22
- package/build/es/components/ButtonArrow/ButtonArrow.js +3 -3
- package/build/es/components/ButtonCard/ButtonCard.js +9 -9
- package/build/es/components/ButtonClose/ButtonClose.js +1 -1
- package/build/es/components/ButtonIcon/ButtonIcon.js +8 -8
- package/build/es/components/ButtonPrimary/ButtonPrimary.js +2 -2
- package/build/es/components/ButtonRound/ButtonRound.js +2 -2
- package/build/es/components/ButtonSecondary/ButtonSecondary.js +2 -2
- package/build/es/components/Carousel/Carousel.d.ts +6 -169
- package/build/es/components/Carousel/Carousel.js +9 -9
- package/build/es/components/Checkbox/Checkbox.js +1 -1
- package/build/es/components/Chip/Chip.js +2 -2
- package/build/es/components/DateTimePicker/DateTimePicker.js +17 -5
- package/build/es/components/Divider/Divider.js +5 -5
- package/build/es/components/DnaLogo/DnaLogo.js +3 -3
- package/build/es/components/Drawer/Drawer.js +12 -12
- package/build/es/components/EmptyState/EmptyState.js +1 -1
- package/build/es/components/EnergyLabel/EnergyLabel.js +5 -5
- package/build/es/components/Expander/Expander.js +1 -1
- package/build/es/components/Floater/Floater.js +5 -5
- package/build/es/components/Footer/Components/FooterComponents.d.ts +3 -168
- package/build/es/components/Footer/Components/FooterComponents.js +16 -15
- package/build/es/components/Footer/Footer.js +3 -3
- package/build/es/components/Icon/Icon.js +5 -5
- package/build/es/components/InfoDialog/InfoDialog.js +3 -3
- package/build/es/components/Input/Input.js +17 -9
- package/build/es/components/Label/Label.js +1 -1
- package/build/es/components/LabelText/LabelText.js +3 -3
- package/build/es/components/MainHeaderNavigation/ChildComponents/BusinessMenu.js +6 -6
- package/build/es/components/MainHeaderNavigation/ChildComponents/DesktopMenu.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +2 -167
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -167
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +2 -2
- package/build/es/components/MainHeaderNavigation/ChildComponents/MobileMenu.js +1 -1
- package/build/es/components/MainHeaderNavigation/MainHeaderNavigation.js +1 -1
- package/build/es/components/MainHeaderNavigation/globalNavStyles.d.ts +16 -1501
- package/build/es/components/MainHeaderNavigation/globalNavStyles.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/BusinessMenu.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/DesktopMenu.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +2 -167
- package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -167
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +1 -1
- 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 +1 -1
- package/build/es/components/MainNavigation/globalNavStyles.d.ts +8 -668
- package/build/es/components/MainNavigation/globalNavStyles.js +1 -1
- package/build/es/components/Modal/Modal.js +6 -6
- package/build/es/components/Notification/Notification.js +6 -6
- package/build/es/components/NotificationBadge/NotificationBadge.js +5 -5
- package/build/es/components/Overlay/Overlay.js +1 -1
- package/build/es/components/Pill/Pill.js +11 -11
- package/build/es/components/PixelLoader/PixelLoader.js +6 -6
- package/build/es/components/PriorityNavigation/PriorityNavigation.js +4 -4
- package/build/es/components/PriorityNavigationItem/PriorityNavigationItem.js +6 -6
- package/build/es/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/build/es/components/RadioButton/RadioButton.js +1 -1
- package/build/es/components/ReadMore/ReadMore.js +6 -6
- package/build/es/components/Search/Search.js +1 -1
- package/build/es/components/SecondaryNavigation/SecondaryNavigation.js +1 -1
- package/build/es/components/Selectbox/Selectbox.js +1 -1
- package/build/es/components/Switch/Switch.js +14 -14
- package/build/es/components/Tab/Tab.js +7 -7
- package/build/es/components/Tabs/Tabs.js +8 -8
- package/build/es/components/Textarea/Textarea.d.ts +5 -1
- package/build/es/components/Textarea/Textarea.js +8 -5
- package/build/es/components/Toaster/Toaster.js +6 -6
- package/build/es/components/Tooltip/Tooltip.js +4 -4
- package/build/es/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.d.ts +4 -334
- package/build/es/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +3 -2
- package/build/es/components/TooltipMenu/TooltipMenu.js +1 -1
- package/build/es/index.d.ts +1 -1
- package/build/es/index.js +1 -1
- package/build/es/themes/globalStyles.d.ts +2 -332
- package/build/es/themes/globalStyles.js +1 -1
- package/build/es/themes/styled.d.ts +1 -1158
- package/build/es/utils/createStyled.d.ts +140 -7
- package/build/es/utils/createStyled.js +3 -3
- package/build/es/utils/styledUtils.js +1 -1
- package/package.json +4 -5
- package/build/cjs/themes/styled.js +0 -14
- package/build/es/themes/styled.js +0 -5
|
@@ -2,7 +2,7 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import React__default, { useState } from 'react';
|
|
3
3
|
import { Open } from '@dnanpm/icons';
|
|
4
4
|
import Modal from '../Modal/Modal.js';
|
|
5
|
-
import styled from '
|
|
5
|
+
import { styled } from 'styled-components';
|
|
6
6
|
import { media, getMultipliedSize } from '../../utils/styledUtils.js';
|
|
7
7
|
import Button from '../Button/Button.js';
|
|
8
8
|
import theme from '../../themes/theme.js';
|
|
@@ -54,7 +54,7 @@ const ErrorContainer = styled.div `
|
|
|
54
54
|
gap: ${getMultipliedSize(theme.base.baseHeight, 3)};
|
|
55
55
|
`;
|
|
56
56
|
const Image = styled.img `
|
|
57
|
-
width: ${p => p
|
|
57
|
+
width: ${p => p.$imgWidth};
|
|
58
58
|
`;
|
|
59
59
|
/** @visibleName Energy Label */
|
|
60
60
|
const EnergyLabel = (_a) => {
|
|
@@ -78,12 +78,12 @@ const EnergyLabel = (_a) => {
|
|
|
78
78
|
}
|
|
79
79
|
return (React__default.createElement(React__default.Fragment, null,
|
|
80
80
|
React__default.createElement(ButtonElement, { onClick: handleOpen, "aria-label": props.ariaLabel, "data-testid": dataTestId, id: props.id, className: props.className },
|
|
81
|
-
React__default.createElement(Image, { src: props.badgeSrc, alt: "", "aria-hidden": true, imgWidth: "55px", onError: () => setImgError(true) })),
|
|
81
|
+
React__default.createElement(Image, { src: props.badgeSrc, alt: "", "aria-hidden": true, "$imgWidth": "55px", onError: () => setImgError(true) })),
|
|
82
82
|
React__default.createElement(StyledModal, { appElement: modalAppElement, isOpen: isOpen, onRequestClose: handleClose, title: props.modalTitle, closeLabel: props.closeButtonLabel, footer: renderFooter() }, hasError || !props.modalImageSrc ? (React__default.createElement(ErrorContainer, null,
|
|
83
83
|
React__default.createElement("h3", null, props.errorTitle),
|
|
84
|
-
React__default.createElement(Image, { src: ERROR_IMAGE, alt: "", imgWidth: "160px" }),
|
|
84
|
+
React__default.createElement(Image, { src: ERROR_IMAGE, alt: "", "$imgWidth": "160px" }),
|
|
85
85
|
React__default.createElement("p", null, props.errorLabel))) : (React__default.createElement(React__default.Fragment, null,
|
|
86
|
-
React__default.createElement(Image, { src: props.modalImageSrc, alt: "", imgWidth: "100%", onError: () => setHasError(true) }),
|
|
86
|
+
React__default.createElement(Image, { src: props.modalImageSrc, alt: "", "$imgWidth": "100%", onError: () => setHasError(true) }),
|
|
87
87
|
React__default.createElement(ModalLabel, null, props.modalLabel))))));
|
|
88
88
|
};
|
|
89
89
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { ChevronUp, ChevronDown, Close } from '@dnanpm/icons';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import styled from '
|
|
4
|
+
import { styled } from 'styled-components';
|
|
5
5
|
import theme from '../../themes/theme.js';
|
|
6
6
|
import ButtonIcon from '../ButtonIcon/ButtonIcon.js';
|
|
7
7
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
|
|
5
|
-
const getInset = ({ position, offset }) => {
|
|
5
|
+
const getInset = ({ position, offset, }) => {
|
|
6
6
|
const insetConfig = {
|
|
7
7
|
top: [offset, 'auto', 'auto'],
|
|
8
8
|
bottom: ['auto', 'auto', offset],
|
|
9
9
|
};
|
|
10
10
|
return `inset: ${insetConfig[position].join(' ')};`;
|
|
11
11
|
};
|
|
12
|
-
const Element =
|
|
12
|
+
const Element = styled.div `
|
|
13
13
|
position: sticky;
|
|
14
14
|
${({ zIndex }) => zIndex && `z-index: ${zIndex}`};
|
|
15
|
-
${({ position, offset }) => getInset({ position, offset })}
|
|
15
|
+
${({ $position, offset }) => getInset({ position: $position, offset })}
|
|
16
16
|
`;
|
|
17
17
|
const Floater = (_a) => {
|
|
18
18
|
var { position = 'top', offset = '0', 'data-testid': dataTestId } = _a, props = __rest(_a, ["position", "offset", 'data-testid']);
|
|
19
|
-
return (React__default.createElement(Element, { id: props.id, position: position, offset: offset, zIndex: props.zIndex, className: props.className, "data-testid": dataTestId }, props.children));
|
|
19
|
+
return (React__default.createElement(Element, { id: props.id, "$position": position, offset: offset, zIndex: props.zIndex, className: props.className, "data-testid": dataTestId }, props.children));
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export { Floater as default };
|
|
@@ -1,173 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ApplicationLinksProps, BottomSectionProps, CategoriesComponentProps, FooterNavigationProps, GeneralInformationComponentProps } from '../types/footerProps';
|
|
3
|
-
export declare const LangLink: import("styled-components").
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: number;
|
|
7
|
-
unit: string;
|
|
8
|
-
};
|
|
9
|
-
baseWidth: {
|
|
10
|
-
value: number;
|
|
11
|
-
unit: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
breakpoints: import("../../../themes/themeComponents/breakpoints").ViewBreakpoints;
|
|
15
|
-
color: {
|
|
16
|
-
default: {
|
|
17
|
-
pink: string;
|
|
18
|
-
plum: string;
|
|
19
|
-
white: string;
|
|
20
|
-
black: string;
|
|
21
|
-
};
|
|
22
|
-
accent: {
|
|
23
|
-
lemon: string;
|
|
24
|
-
sky: string;
|
|
25
|
-
orange: string;
|
|
26
|
-
};
|
|
27
|
-
active: {
|
|
28
|
-
pink: string;
|
|
29
|
-
};
|
|
30
|
-
hover: {
|
|
31
|
-
pink: string;
|
|
32
|
-
};
|
|
33
|
-
text: {
|
|
34
|
-
gray: string;
|
|
35
|
-
pink: string;
|
|
36
|
-
plum: string;
|
|
37
|
-
white: string;
|
|
38
|
-
black: string;
|
|
39
|
-
};
|
|
40
|
-
line: {
|
|
41
|
-
L01: string;
|
|
42
|
-
L02: string;
|
|
43
|
-
L03: string;
|
|
44
|
-
L04: string;
|
|
45
|
-
};
|
|
46
|
-
notification: {
|
|
47
|
-
info: string;
|
|
48
|
-
success: string;
|
|
49
|
-
warning: string;
|
|
50
|
-
error: string;
|
|
51
|
-
};
|
|
52
|
-
background: {
|
|
53
|
-
sand: {
|
|
54
|
-
default: string;
|
|
55
|
-
E01: string;
|
|
56
|
-
E02: string;
|
|
57
|
-
};
|
|
58
|
-
pink: {
|
|
59
|
-
default: string;
|
|
60
|
-
E01: string;
|
|
61
|
-
E02: string;
|
|
62
|
-
};
|
|
63
|
-
plum: {
|
|
64
|
-
default: string;
|
|
65
|
-
E01: string;
|
|
66
|
-
E02: string;
|
|
67
|
-
};
|
|
68
|
-
lemon: {
|
|
69
|
-
default: string;
|
|
70
|
-
E01: string;
|
|
71
|
-
E02: string;
|
|
72
|
-
};
|
|
73
|
-
sky: {
|
|
74
|
-
default: string;
|
|
75
|
-
E01: string;
|
|
76
|
-
E02: string;
|
|
77
|
-
};
|
|
78
|
-
orange: {
|
|
79
|
-
default: string;
|
|
80
|
-
E01: string;
|
|
81
|
-
E02: string;
|
|
82
|
-
};
|
|
83
|
-
white: {
|
|
84
|
-
default: string;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
focus: {
|
|
88
|
-
dark: string;
|
|
89
|
-
light: string;
|
|
90
|
-
};
|
|
91
|
-
transparency: {
|
|
92
|
-
T0: string;
|
|
93
|
-
T10: string;
|
|
94
|
-
T20: string;
|
|
95
|
-
T30: string;
|
|
96
|
-
T40: string;
|
|
97
|
-
T50: string;
|
|
98
|
-
T60: string;
|
|
99
|
-
T70: string;
|
|
100
|
-
T80: string;
|
|
101
|
-
T90: string;
|
|
102
|
-
T100: string;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
fontFamily: {
|
|
106
|
-
default: string;
|
|
107
|
-
heading: string;
|
|
108
|
-
numerals: string;
|
|
109
|
-
};
|
|
110
|
-
fontSize: {
|
|
111
|
-
default: string;
|
|
112
|
-
xl: string;
|
|
113
|
-
l: string;
|
|
114
|
-
s: string;
|
|
115
|
-
xs: string;
|
|
116
|
-
h1XL: string;
|
|
117
|
-
h1L: string;
|
|
118
|
-
h1M: string;
|
|
119
|
-
h1S: string;
|
|
120
|
-
h2M: string;
|
|
121
|
-
h2S: string;
|
|
122
|
-
h3: string;
|
|
123
|
-
h4: string;
|
|
124
|
-
h5: string;
|
|
125
|
-
h1: string;
|
|
126
|
-
h2: string;
|
|
127
|
-
};
|
|
128
|
-
fontWeight: {
|
|
129
|
-
book: number;
|
|
130
|
-
medium: number;
|
|
131
|
-
bold: number;
|
|
132
|
-
black: number;
|
|
133
|
-
};
|
|
134
|
-
form: {
|
|
135
|
-
smallSelectWidth: string;
|
|
136
|
-
smallSelectHeight: string;
|
|
137
|
-
};
|
|
138
|
-
grid: {
|
|
139
|
-
gutter: string;
|
|
140
|
-
};
|
|
141
|
-
lineHeight: {
|
|
142
|
-
default: string;
|
|
143
|
-
xl: string;
|
|
144
|
-
s: string;
|
|
145
|
-
xs: string;
|
|
146
|
-
xxs: string;
|
|
147
|
-
auto: string;
|
|
148
|
-
h1XL: string;
|
|
149
|
-
h1L: string;
|
|
150
|
-
h1M: string;
|
|
151
|
-
h1S: string;
|
|
152
|
-
h2M: string;
|
|
153
|
-
h2S: string;
|
|
154
|
-
h3: string;
|
|
155
|
-
h4: string;
|
|
156
|
-
h5: string;
|
|
157
|
-
h1: string;
|
|
158
|
-
h2: string;
|
|
159
|
-
};
|
|
160
|
-
media: Record<string | number, (l: TemplateStringsArray, ...p: (string | number)[]) => string>;
|
|
161
|
-
radius: {
|
|
162
|
-
default: string;
|
|
163
|
-
s: string;
|
|
164
|
-
xs: string;
|
|
165
|
-
circle: string;
|
|
166
|
-
pill: string;
|
|
167
|
-
};
|
|
168
|
-
}, {
|
|
169
|
-
isActive?: boolean;
|
|
170
|
-
}, never>;
|
|
3
|
+
export declare const LangLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {
|
|
4
|
+
$isActive?: boolean;
|
|
5
|
+
}>> & string;
|
|
171
6
|
export declare const TopSection: ({ topSection }: FooterNavigationProps) => React.JSX.Element;
|
|
172
7
|
export declare const Categories: ({ categories }: CategoriesComponentProps) => React.JSX.Element;
|
|
173
8
|
export declare const GeneralInformation: ({ generalInformation }: GeneralInformationComponentProps) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { User, Headset, Shop, ArrowRight, ChevronDown, Facebook, Instagram, Linkedin, Tiktok, Threads, X, Youtube } from '@dnanpm/icons';
|
|
2
2
|
import React__default, { useContext, Fragment } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { css, styled } from 'styled-components';
|
|
4
4
|
import theme from '../../../themes/theme.js';
|
|
5
5
|
import { getMultipliedSize } from '../../../utils/styledUtils.js';
|
|
6
6
|
import ButtonIcon from '../../ButtonIcon/ButtonIcon.js';
|
|
@@ -36,15 +36,16 @@ const BaseContainer = styled.div `
|
|
|
36
36
|
margin-left: auto;
|
|
37
37
|
margin-right: auto;
|
|
38
38
|
|
|
39
|
-
@media (min-width: ${({ collapseSize }) => collapseSize + 1}px) {
|
|
39
|
+
@media (min-width: ${({ $collapseSize }) => $collapseSize + 1}px) {
|
|
40
40
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
41
41
|
padding: ${getMultipliedSize(theme.base.baseHeight, 4)};
|
|
42
42
|
}
|
|
43
43
|
`;
|
|
44
44
|
const CategoryLinks = styled.ul `
|
|
45
|
-
display: ${({ active }) => (active ? 'flex' : 'none')};
|
|
46
|
-
transition: all 0.3s ease-in-out,
|
|
47
|
-
|
|
45
|
+
display: ${({ $active }) => ($active ? 'flex' : 'none')};
|
|
46
|
+
transition: all 0.3s ease-in-out,
|
|
47
|
+
padding 0s linear ${({ $active }) => ($active ? '0s' : '0.3s')};
|
|
48
|
+
max-height: ${({ $active }) => ($active ? '500' : '0')}px;
|
|
48
49
|
flex-direction: column;
|
|
49
50
|
gap: ${getMultipliedSize(theme.base.baseHeight, 1)};
|
|
50
51
|
`;
|
|
@@ -79,11 +80,11 @@ const CategoryWrapper = styled.div `
|
|
|
79
80
|
|
|
80
81
|
svg {
|
|
81
82
|
transition: transform 0.2s ease-in;
|
|
82
|
-
transform: ${({ active }) => (active && 'rotate(180deg)') || 'rotate(0deg)'};
|
|
83
|
+
transform: ${({ $active }) => ($active && 'rotate(180deg)') || 'rotate(0deg)'};
|
|
83
84
|
}
|
|
84
85
|
`;
|
|
85
86
|
const CategoryContainer = styled(BaseContainer) `
|
|
86
|
-
@media (max-width: ${({ collapseSize }) => collapseSize}px) {
|
|
87
|
+
@media (max-width: ${({ $collapseSize }) => $collapseSize}px) {
|
|
87
88
|
gap: 0;
|
|
88
89
|
padding: 0;
|
|
89
90
|
padding-top: ${getMultipliedSize(theme.base.baseHeight, 1)};
|
|
@@ -101,12 +102,12 @@ const LangLinksContainer = styled.div `
|
|
|
101
102
|
justify-content: center;
|
|
102
103
|
`;
|
|
103
104
|
const LangLink = styled.a `
|
|
104
|
-
background: ${({ isActive }) => isActive ? theme.color.background.white.default : 'transparent'};
|
|
105
|
-
color: ${({ isActive }) => (isActive ? theme.color.text.plum : theme.color.text.white)};
|
|
105
|
+
background: ${({ $isActive }) => $isActive ? theme.color.background.white.default : 'transparent'};
|
|
106
|
+
color: ${({ $isActive }) => ($isActive ? theme.color.text.plum : theme.color.text.white)};
|
|
106
107
|
&:hover,
|
|
107
108
|
&:active,
|
|
108
109
|
&:focus {
|
|
109
|
-
color: ${({ isActive }) => isActive
|
|
110
|
+
color: ${({ $isActive }) => $isActive
|
|
110
111
|
? theme.color.text.plum
|
|
111
112
|
: theme.color.text.white + theme.color.transparency.T80};
|
|
112
113
|
}
|
|
@@ -174,7 +175,7 @@ const BottomContainer = styled(BaseContainer) `
|
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
@media (min-width: ${({ collapseSize }) => collapseSize + 1}px) {
|
|
178
|
+
@media (min-width: ${({ $collapseSize }) => $collapseSize + 1}px) {
|
|
178
179
|
flex-direction: row;
|
|
179
180
|
align-items: flex-start;
|
|
180
181
|
justify-content: space-between;
|
|
@@ -248,7 +249,7 @@ const mapCorporateSelector = (languagesObject) => Object.keys(languagesObject.ur
|
|
|
248
249
|
}));
|
|
249
250
|
const TopSection = ({ topSection }) => {
|
|
250
251
|
const { collapseSize, language } = useContext(FooterContext);
|
|
251
|
-
return (React__default.createElement(TopContainer, { collapseSize: collapseSize }, topSection === null || topSection === void 0 ? void 0 : topSection.map((section, index) => (React__default.createElement("div", { key: `service-section-${index}`, "data-testid": `service-section-${index}` },
|
|
252
|
+
return (React__default.createElement(TopContainer, { "$collapseSize": collapseSize }, topSection === null || topSection === void 0 ? void 0 : topSection.map((section, index) => (React__default.createElement("div", { key: `service-section-${index}`, "data-testid": `service-section-${index}` },
|
|
252
253
|
section.svgIconName[language] === 'user' && React__default.createElement(User, { size: "3rem" }),
|
|
253
254
|
section.svgIconName[language] === 'headset' && React__default.createElement(Headset, { size: "3rem" }),
|
|
254
255
|
section.svgIconName[language] === 'shop' && React__default.createElement(Shop, { size: "3rem" }),
|
|
@@ -264,11 +265,11 @@ const Categories = ({ categories }) => {
|
|
|
264
265
|
setIsCollapsed(Object.assign(Object.assign({}, isCollapsed), { [currentIndex]: !isCollapsed[currentIndex] }));
|
|
265
266
|
}
|
|
266
267
|
};
|
|
267
|
-
return (React__default.createElement(CategoryContainer, { collapseSize: collapseSize, "data-testid": "category-container" }, categories === null || categories === void 0 ? void 0 : categories.map((category, index) => (React__default.createElement(CategoryWrapper, { active: isCollapsed[index], "data-testid": `category-${index}`, key: `category-${index}` },
|
|
268
|
+
return (React__default.createElement(CategoryContainer, { "$collapseSize": collapseSize, "data-testid": "category-container" }, categories === null || categories === void 0 ? void 0 : categories.map((category, index) => (React__default.createElement(CategoryWrapper, { "$active": isCollapsed[index], "data-testid": `category-${index}`, key: `category-${index}` },
|
|
268
269
|
React__default.createElement(CategoryHeader, { onClick: () => toggleCollapse(index), "aria-expanded": isMobileFooter ? isCollapsed[index] : true },
|
|
269
270
|
React__default.createElement(CategoryName, null, category.description[language]),
|
|
270
271
|
isMobileFooter && React__default.createElement(ChevronDown, null)),
|
|
271
|
-
React__default.createElement(CategoryLinks, { active: isMobileFooter ? isCollapsed[index] : true }, category.category.map((categoryLink, linkIndex) => (React__default.createElement(LinksListEl, { key: `category-${index}-link-${linkIndex}`, "data-testid": `category-${index}-link-${linkIndex}` },
|
|
272
|
+
React__default.createElement(CategoryLinks, { "$active": isMobileFooter ? isCollapsed[index] : true }, category.category.map((categoryLink, linkIndex) => (React__default.createElement(LinksListEl, { key: `category-${index}-link-${linkIndex}`, "data-testid": `category-${index}-link-${linkIndex}` },
|
|
272
273
|
React__default.createElement("a", { href: categoryLink.urls[language] }, categoryLink.titles[language]))))))))));
|
|
273
274
|
};
|
|
274
275
|
const GeneralInformation = ({ generalInformation }) => {
|
|
@@ -344,7 +345,7 @@ const BottomSection = ({ items }) => {
|
|
|
344
345
|
else {
|
|
345
346
|
languages = customLinks || [];
|
|
346
347
|
}
|
|
347
|
-
return (React__default.createElement(BottomContainer, { collapseSize: collapseSize, "data-testid": "bottom-section" },
|
|
348
|
+
return (React__default.createElement(BottomContainer, { "$collapseSize": collapseSize, "data-testid": "bottom-section" },
|
|
348
349
|
languages.length > 0 && (React__default.createElement(LanguageLinks, { currentLanguage: language, languages: languages })),
|
|
349
350
|
React__default.createElement(BottomCenter, null,
|
|
350
351
|
socialMedia && React__default.createElement(SocialMediaLinks, { socialMedia: socialMedia }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useState, useEffect, useMemo } from 'react';
|
|
2
2
|
import useWindowSize from '../../hooks/useWindowSize.js';
|
|
3
|
-
import styled from '
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import breakpoints from '../../themes/themeComponents/breakpoints.js';
|
|
6
6
|
import { LangLink, TopSection, Categories, BottomSection } from './Components/FooterComponents.js';
|
|
@@ -10,7 +10,7 @@ const TopContainer = styled.div `
|
|
|
10
10
|
background-color: ${theme.color.background.plum.E01};
|
|
11
11
|
`;
|
|
12
12
|
const FooterContainer = styled.footer `
|
|
13
|
-
z-index: ${({ zIndex }) => zIndex};
|
|
13
|
+
z-index: ${({ $zIndex }) => $zIndex};
|
|
14
14
|
color: ${theme.color.text.white};
|
|
15
15
|
background: ${theme.color.default.plum};
|
|
16
16
|
margin: 0;
|
|
@@ -82,7 +82,7 @@ const Footer = ({ items = { businessId: 'NONE', footerNavigation: {} }, language
|
|
|
82
82
|
setIsCollapsed,
|
|
83
83
|
isMobileFooter: isMobile,
|
|
84
84
|
}), [collapseSize, isCollapsed, isMobile, language]);
|
|
85
|
-
return (React__default.createElement(FooterContainer, { zIndex: zIndex },
|
|
85
|
+
return (React__default.createElement(FooterContainer, { "$zIndex": zIndex },
|
|
86
86
|
React__default.createElement(FooterContext.Provider, { value: footerContextData },
|
|
87
87
|
Boolean(topSection.length) && (React__default.createElement(TopContainer, null,
|
|
88
88
|
React__default.createElement(TopSection, { topSection: topSection }))),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import styled from '
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
6
6
|
import * as index from '../Icons/index.js';
|
|
@@ -11,12 +11,12 @@ const IconContainer = styled.span `
|
|
|
11
11
|
width: ${({ size }) => size};
|
|
12
12
|
height: ${({ size }) => size};
|
|
13
13
|
|
|
14
|
-
${({ position }) => (position === 'right' || position === 'middle') &&
|
|
14
|
+
${({ $position }) => ($position === 'right' || $position === 'middle') &&
|
|
15
15
|
`
|
|
16
16
|
margin-left: ${getMultipliedSize(theme.base.baseWidth, 1)};
|
|
17
17
|
`}
|
|
18
18
|
|
|
19
|
-
${({ position }) => (position === 'left' || position === 'middle') &&
|
|
19
|
+
${({ $position }) => ($position === 'left' || $position === 'middle') &&
|
|
20
20
|
`
|
|
21
21
|
margin-right: ${getMultipliedSize(theme.base.baseWidth, 1)};
|
|
22
22
|
`}
|
|
@@ -31,9 +31,9 @@ const Icon = (_a) => {
|
|
|
31
31
|
// TODO: Remove once https://jira.dna.fi/browse/STYLE-334 is done
|
|
32
32
|
const RenderIcon = name && IconsList[name];
|
|
33
33
|
return (React__default.createElement(React__default.Fragment, null,
|
|
34
|
-
RenderIcon && (React__default.createElement(IconContainer, { position: props.position, size: size, className: "dnasg-icon", "data-testid": dataTestId },
|
|
34
|
+
RenderIcon && (React__default.createElement(IconContainer, { "$position": props.position, size: size, className: "dnasg-icon", "data-testid": dataTestId },
|
|
35
35
|
React__default.createElement(RenderIcon, Object.assign({}, props, { size: size, color: color })))),
|
|
36
|
-
IconParam && (React__default.createElement(IconContainer, { onClick: props.onClick, position: props.position, size: size, className: `dnasg-icon ${props.className || ''}`.trim(), "data-testid": dataTestId, "aria-label": ariaLabel, "aria-hidden": ariaHidden, role: !ariaHidden ? 'img' : undefined },
|
|
36
|
+
IconParam && (React__default.createElement(IconContainer, { onClick: props.onClick, "$position": props.position, size: size, className: `dnasg-icon ${props.className || ''}`.trim(), "data-testid": dataTestId, "aria-label": ariaLabel, "aria-hidden": ariaHidden, role: !ariaHidden ? 'img' : undefined },
|
|
37
37
|
React__default.createElement(IconParam, { size: size, color: color })))));
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import styled from '
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
6
6
|
|
|
@@ -40,7 +40,7 @@ const InfoDialogContainer = styled.div `
|
|
|
40
40
|
border-top: 0;
|
|
41
41
|
width: auto;
|
|
42
42
|
border-bottom-color: ${theme.color.default.white};
|
|
43
|
-
${({ position }) => positionMap[position]};
|
|
43
|
+
${({ $position }) => positionMap[$position]};
|
|
44
44
|
border-width: 0px ${getMultipliedSize(theme.base.baseWidth, 1.2)}
|
|
45
45
|
${getMultipliedSize(theme.base.baseWidth, 1.2)};
|
|
46
46
|
}
|
|
@@ -54,7 +54,7 @@ const InfoDialogContainer = styled.div `
|
|
|
54
54
|
/** @visibleName Info Dialog */
|
|
55
55
|
const InfoDialog = (_a) => {
|
|
56
56
|
var { position = 'middle', type = 'default', 'data-testid': dataTestId } = _a, props = __rest(_a, ["position", "type", 'data-testid']);
|
|
57
|
-
return (React__default.createElement(InfoDialogContainer, { id: props.id, "data-testid": dataTestId, className: props.className, position: position, type: type, role: "region", "aria-label": props.ariaLabel }, props.children));
|
|
57
|
+
return (React__default.createElement(InfoDialogContainer, { id: props.id, "data-testid": dataTestId, className: props.className, "$position": position, type: type, role: "region", "aria-label": props.ariaLabel }, props.children));
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
export { InfoDialog as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { EyeOpen, EyeClosed, Lock, Close, Check, Error } from '@dnanpm/icons';
|
|
3
3
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
4
|
-
import styled from '
|
|
4
|
+
import { styled } from 'styled-components';
|
|
5
5
|
import theme from '../../themes/theme.js';
|
|
6
6
|
import { getMultipliedSize, getDividedSize } from '../../utils/styledUtils.js';
|
|
7
7
|
import ButtonIcon from '../ButtonIcon/ButtonIcon.js';
|
|
@@ -26,7 +26,7 @@ const FieldWrapper = styled.div `
|
|
|
26
26
|
background-color: ${theme.color.background.white.default};
|
|
27
27
|
align-items: center;
|
|
28
28
|
|
|
29
|
-
${({ status }) => status === 'error' &&
|
|
29
|
+
${({ $status }) => $status === 'error' &&
|
|
30
30
|
`
|
|
31
31
|
border-bottom: 4px solid ${theme.color.notification.error};
|
|
32
32
|
`}
|
|
@@ -42,10 +42,10 @@ const FieldWrapper = styled.div `
|
|
|
42
42
|
display: none;
|
|
43
43
|
`}
|
|
44
44
|
|
|
45
|
-
${({ $disabled }) => $disabled &&
|
|
45
|
+
${({ $disabled, $readonly }) => ($disabled || $readonly) &&
|
|
46
46
|
`
|
|
47
47
|
background-color: ${theme.color.background.sand.E01};
|
|
48
|
-
`}
|
|
48
|
+
`}
|
|
49
49
|
|
|
50
50
|
&:focus-within {
|
|
51
51
|
border: 2px solid ${theme.color.focus.light};
|
|
@@ -82,6 +82,12 @@ const StyledInput = styled.input `
|
|
|
82
82
|
padding: 0;
|
|
83
83
|
background: transparent;
|
|
84
84
|
|
|
85
|
+
${({ readOnly }) => readOnly &&
|
|
86
|
+
`
|
|
87
|
+
color: ${theme.color.default.black};
|
|
88
|
+
cursor: default;
|
|
89
|
+
`}
|
|
90
|
+
|
|
85
91
|
&[type='range'] {
|
|
86
92
|
appearance: auto;
|
|
87
93
|
}
|
|
@@ -157,18 +163,20 @@ const Input = (_a) => {
|
|
|
157
163
|
};
|
|
158
164
|
return (React__default.createElement(FieldContainer, { className: props.className },
|
|
159
165
|
props.label && (React__default.createElement(LabelText, { htmlFor: props.id, "data-testid": dataTestId && `${dataTestId}-label`, status: props.status === 'error' ? props.status : undefined, isMandatory: props.required }, props.label)),
|
|
160
|
-
React__default.createElement(FieldWrapper, { status: props.status, "$type": type, "$disabled": props.disabled },
|
|
161
|
-
React__default.createElement(StyledInput, { id: props.id, name: props.name, type: type, value: props.value, placeholder: props.placeholder, onChange: handleChange, onBlur: handleOnBlur, onFocus: props.onFocus, onClick: onClick, onKeyDown: props.onKeyDown, onKeyPress: props.onKeyPress, required: props.required, disabled: props.disabled, autoComplete: props.autocomplete, "aria-disabled": props.disabled, "aria-label": !props.label ? (_b = props.ariaLabel) !== null && _b !== void 0 ? _b : props.id : undefined, ref: inputRef, tabIndex: props.tabIndex, "aria-describedby": getDescribedBy(), "data-testid": dataTestId, readOnly: props.readonly }),
|
|
166
|
+
React__default.createElement(FieldWrapper, { "$status": props.status, "$type": type, "$disabled": props.disabled, "$readonly": props.readonly },
|
|
167
|
+
React__default.createElement(StyledInput, { id: props.id, name: props.name, type: type, value: props.value, placeholder: props.placeholder, onChange: handleChange, onBlur: handleOnBlur, onFocus: props.onFocus, onClick: onClick, onKeyDown: props.onKeyDown, onKeyPress: props.onKeyPress, required: props.required, disabled: props.disabled, autoComplete: props.autocomplete, "aria-disabled": props.disabled, "aria-readonly": props.readonly || undefined, "aria-label": !props.label ? (_b = props.ariaLabel) !== null && _b !== void 0 ? _b : props.id : undefined, ref: inputRef, tabIndex: props.tabIndex, "aria-describedby": getDescribedBy(), "data-testid": dataTestId, readOnly: props.readonly }),
|
|
162
168
|
((props.status && props.status !== 'comment') ||
|
|
163
169
|
props.showPasswordToggle ||
|
|
164
170
|
props.disabled ||
|
|
171
|
+
props.readonly ||
|
|
165
172
|
props.onClearableButtonClick) && (React__default.createElement(IconWrapper, null,
|
|
166
173
|
props.showPasswordToggle && (React__default.createElement(StyledButtonIcon, { icon: showPassword ? EyeOpen : EyeClosed, onClick: togglePasswordVisibility, ariaLabel: props.passwordToggleLabel })),
|
|
167
|
-
(props.status === 'success' || props.status === 'error') && (React__default.createElement(Icon, { icon: iconsMap[props.status], color: theme.color.notification[props.status] })),
|
|
168
|
-
props.disabled && React__default.createElement(Icon, { icon: Lock }),
|
|
174
|
+
(props.status === 'success' || props.status === 'error') && (React__default.createElement(Icon, { "aria-hidden": true, icon: iconsMap[props.status], color: theme.color.notification[props.status] })),
|
|
175
|
+
(props.disabled || props.readonly) && (React__default.createElement(Icon, { "aria-hidden": true, icon: Lock, className: props.className && `${props.className}-lock-icon` })),
|
|
169
176
|
props.onClearableButtonClick &&
|
|
170
177
|
Boolean(props.value) &&
|
|
171
|
-
!props.disabled &&
|
|
178
|
+
!props.disabled &&
|
|
179
|
+
!props.readonly && (React__default.createElement(ButtonIcon, { icon: Close, onClick: props.onClearableButtonClick, ariaLabel: props.clearButtonLabel }))))),
|
|
172
180
|
props.status === 'error' && props.errorMessage && (React__default.createElement(ErrorMessage, { id: `${props.id}-error`, "data-testid": dataTestId && `${dataTestId}-error` }, props.errorMessage)),
|
|
173
181
|
props.status === 'comment' && props.commentMessage && (React__default.createElement(Message, { id: `${props.id}-comment`, "data-testid": dataTestId && `${dataTestId}-comment` }, props.commentMessage))));
|
|
174
182
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import styled from '
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import { getDividedSize, getMultipliedSize } from '../../utils/styledUtils.js';
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import styled from '
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../themes/theme.js';
|
|
5
5
|
import { getDividedSize } from '../../utils/styledUtils.js';
|
|
6
6
|
|
|
7
7
|
const Label = styled.label `
|
|
8
8
|
display: block;
|
|
9
|
-
color: ${({ status }) => status === 'error' ? theme.color.notification.error : theme.color.text.gray};
|
|
9
|
+
color: ${({ $status }) => $status === 'error' ? theme.color.notification.error : theme.color.text.gray};
|
|
10
10
|
font-weight: ${theme.fontWeight.medium};
|
|
11
11
|
font-size: ${theme.fontSize.default};
|
|
12
12
|
line-height: ${theme.lineHeight.default};
|
|
@@ -19,7 +19,7 @@ const Mandatory = styled.span `
|
|
|
19
19
|
/** @visibleName Label Text */
|
|
20
20
|
const LabelText = (_a) => {
|
|
21
21
|
var { 'data-testid': dataTestId } = _a, props = __rest(_a, ['data-testid']);
|
|
22
|
-
return (React__default.createElement(Label, { id: props.id, htmlFor: props.htmlFor, className: props.className, "data-testid": dataTestId, status: props.status },
|
|
22
|
+
return (React__default.createElement(Label, { id: props.id, htmlFor: props.htmlFor, className: props.className, "data-testid": dataTestId, "$status": props.status },
|
|
23
23
|
props.children,
|
|
24
24
|
props.isMandatory && React__default.createElement(Mandatory, null, "*")));
|
|
25
25
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import styled from '
|
|
2
|
+
import { styled } from 'styled-components';
|
|
3
3
|
import theme from '../../../themes/theme.js';
|
|
4
4
|
import { getMultipliedSize, media } from '../../../utils/styledUtils.js';
|
|
5
5
|
|
|
6
6
|
const BusinessMenuLink = styled.a `
|
|
7
|
-
background-color: ${p => p
|
|
8
|
-
color: ${p => (p
|
|
7
|
+
background-color: ${p => p.$isActive ? theme.color.background.white.default : theme.color.background.plum.E02};
|
|
8
|
+
color: ${p => (p.$isActive ? theme.color.text.black : theme.color.text.white)};
|
|
9
9
|
font-family: ${theme.fontFamily.default};
|
|
10
10
|
font-weight: ${theme.fontWeight.medium};
|
|
11
11
|
font-size: ${theme.fontSize.xs};
|
|
@@ -24,8 +24,8 @@ const BusinessMenuLink = styled.a `
|
|
|
24
24
|
&:hover,
|
|
25
25
|
&:focus {
|
|
26
26
|
text-decoration: none;
|
|
27
|
-
color: ${p => (p
|
|
28
|
-
background-color: ${p => p
|
|
27
|
+
color: ${p => (p.$isActive ? theme.color.text.black : theme.color.text.white)};
|
|
28
|
+
background-color: ${p => p.$isActive
|
|
29
29
|
? theme.color.background.white.default
|
|
30
30
|
: theme.color.background.plum.default};
|
|
31
31
|
outline: none;
|
|
@@ -48,7 +48,7 @@ const BusinessMenu = ({ ariaLabel, currentBusinessId, items, lang }) => {
|
|
|
48
48
|
if (!(items === null || items === void 0 ? void 0 : items.length)) {
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
-
return (React__default.createElement(BusinessMenuList, { "aria-label": ariaLabel, "data-testid": "business-menu" }, items.map(item => (React__default.createElement(BusinessMenuLink, { className: `menu-link ${item.businessId === currentBusinessId ? 'active-site' : ''}`, href: item.urls[lang], isActive: item.businessId === currentBusinessId, key: item.businessId }, item.titles[lang])))));
|
|
51
|
+
return (React__default.createElement(BusinessMenuList, { "aria-label": ariaLabel, "data-testid": "business-menu" }, items.map(item => (React__default.createElement(BusinessMenuLink, { className: `menu-link ${item.businessId === currentBusinessId ? 'active-site' : ''}`, href: item.urls[lang], "$isActive": item.businessId === currentBusinessId, key: item.businessId }, item.titles[lang])))));
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
export { BusinessMenu as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChevronRight } from '@dnanpm/icons';
|
|
2
2
|
import React__default, { useContext, useRef } from 'react';
|
|
3
3
|
import useOutsideClick from '../../../hooks/useOutsideClick.js';
|
|
4
|
-
import
|
|
4
|
+
import { keyframes, css, styled } from 'styled-components';
|
|
5
5
|
import theme from '../../../themes/theme.js';
|
|
6
6
|
import { navMaxHeight, headerMaxHeight } from '../../../themes/themeComponents/navigation.js';
|
|
7
7
|
import { getMultipliedSize, media } from '../../../utils/styledUtils.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Globe } from '@dnanpm/icons';
|
|
2
2
|
import React__default, { useContext, useCallback } from 'react';
|
|
3
|
-
import styled from '
|
|
3
|
+
import { styled } from 'styled-components';
|
|
4
4
|
import theme from '../../../themes/theme.js';
|
|
5
5
|
import { navIconSize } from '../../../themes/themeComponents/navigation.js';
|
|
6
6
|
import { getMultipliedSize } from '../../../utils/styledUtils.js';
|