@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 @@
|
|
|
2
2
|
|
|
3
3
|
var icons = require('@dnanpm/icons');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var
|
|
5
|
+
var styledComponents = require('styled-components');
|
|
6
6
|
var theme = require('../../../themes/theme.js');
|
|
7
7
|
var styledUtils = require('../../../utils/styledUtils.js');
|
|
8
8
|
var ButtonIcon = require('../../ButtonIcon/ButtonIcon.js');
|
|
@@ -14,7 +14,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
15
|
|
|
16
16
|
/* eslint-disable react/no-array-index-key */
|
|
17
|
-
const linkHoverStyles =
|
|
17
|
+
const linkHoverStyles = styledComponents.css `
|
|
18
18
|
&:hover,
|
|
19
19
|
&:focus,
|
|
20
20
|
&:active {
|
|
@@ -22,7 +22,7 @@ const linkHoverStyles = styled.css `
|
|
|
22
22
|
text-decoration-thickness: from-font;
|
|
23
23
|
}
|
|
24
24
|
`;
|
|
25
|
-
const LinksListEl = styled.
|
|
25
|
+
const LinksListEl = styledComponents.styled.li `
|
|
26
26
|
a {
|
|
27
27
|
${linkHoverStyles}
|
|
28
28
|
}
|
|
@@ -33,7 +33,7 @@ const LinksListEl = styled.default.li `
|
|
|
33
33
|
${linkHoverStyles}
|
|
34
34
|
}
|
|
35
35
|
`;
|
|
36
|
-
const BaseContainer = styled.
|
|
36
|
+
const BaseContainer = styledComponents.styled.div `
|
|
37
37
|
display: grid;
|
|
38
38
|
padding: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)};
|
|
39
39
|
gap: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 3)};
|
|
@@ -42,19 +42,20 @@ const BaseContainer = styled.default.div `
|
|
|
42
42
|
margin-left: auto;
|
|
43
43
|
margin-right: auto;
|
|
44
44
|
|
|
45
|
-
@media (min-width: ${({ collapseSize }) => collapseSize + 1}px) {
|
|
45
|
+
@media (min-width: ${({ $collapseSize }) => $collapseSize + 1}px) {
|
|
46
46
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
47
47
|
padding: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 4)};
|
|
48
48
|
}
|
|
49
49
|
`;
|
|
50
|
-
const CategoryLinks = styled.
|
|
51
|
-
display: ${({ active }) => (active ? 'flex' : 'none')};
|
|
52
|
-
transition: all 0.3s ease-in-out,
|
|
53
|
-
|
|
50
|
+
const CategoryLinks = styledComponents.styled.ul `
|
|
51
|
+
display: ${({ $active }) => ($active ? 'flex' : 'none')};
|
|
52
|
+
transition: all 0.3s ease-in-out,
|
|
53
|
+
padding 0s linear ${({ $active }) => ($active ? '0s' : '0.3s')};
|
|
54
|
+
max-height: ${({ $active }) => ($active ? '500' : '0')}px;
|
|
54
55
|
flex-direction: column;
|
|
55
56
|
gap: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1)};
|
|
56
57
|
`;
|
|
57
|
-
const CategoryHeader = styled.
|
|
58
|
+
const CategoryHeader = styledComponents.styled.button `
|
|
58
59
|
display: flex;
|
|
59
60
|
text-align: left;
|
|
60
61
|
gap: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)};
|
|
@@ -72,12 +73,12 @@ const CategoryHeader = styled.default.button `
|
|
|
72
73
|
${theme.default.radius.s};
|
|
73
74
|
}
|
|
74
75
|
`;
|
|
75
|
-
const CategoryName = styled.
|
|
76
|
+
const CategoryName = styledComponents.styled.h2 `
|
|
76
77
|
font-size: ${theme.default.fontSize.h4};
|
|
77
78
|
line-height: ${theme.default.lineHeight.h4};
|
|
78
79
|
margin: 0;
|
|
79
80
|
`;
|
|
80
|
-
const CategoryWrapper = styled.
|
|
81
|
+
const CategoryWrapper = styledComponents.styled.div `
|
|
81
82
|
${CategoryLinks} {
|
|
82
83
|
margin-top: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)};
|
|
83
84
|
margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1)};
|
|
@@ -85,11 +86,11 @@ const CategoryWrapper = styled.default.div `
|
|
|
85
86
|
|
|
86
87
|
svg {
|
|
87
88
|
transition: transform 0.2s ease-in;
|
|
88
|
-
transform: ${({ active }) => (active && 'rotate(180deg)') || 'rotate(0deg)'};
|
|
89
|
+
transform: ${({ $active }) => ($active && 'rotate(180deg)') || 'rotate(0deg)'};
|
|
89
90
|
}
|
|
90
91
|
`;
|
|
91
|
-
const CategoryContainer = styled
|
|
92
|
-
@media (max-width: ${({ collapseSize }) => collapseSize}px) {
|
|
92
|
+
const CategoryContainer = styledComponents.styled(BaseContainer) `
|
|
93
|
+
@media (max-width: ${({ $collapseSize }) => $collapseSize}px) {
|
|
93
94
|
gap: 0;
|
|
94
95
|
padding: 0;
|
|
95
96
|
padding-top: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1)};
|
|
@@ -101,24 +102,24 @@ const CategoryContainer = styled.default(BaseContainer) `
|
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
`;
|
|
104
|
-
const LangLinksContainer = styled.
|
|
105
|
+
const LangLinksContainer = styledComponents.styled.div `
|
|
105
106
|
display: flex;
|
|
106
107
|
gap: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 0.4)};
|
|
107
108
|
justify-content: center;
|
|
108
109
|
`;
|
|
109
|
-
const LangLink = styled.
|
|
110
|
-
background: ${({ isActive }) => isActive ? theme.default.color.background.white.default : 'transparent'};
|
|
111
|
-
color: ${({ isActive }) => (isActive ? theme.default.color.text.plum : theme.default.color.text.white)};
|
|
110
|
+
const LangLink = styledComponents.styled.a `
|
|
111
|
+
background: ${({ $isActive }) => $isActive ? theme.default.color.background.white.default : 'transparent'};
|
|
112
|
+
color: ${({ $isActive }) => ($isActive ? theme.default.color.text.plum : theme.default.color.text.white)};
|
|
112
113
|
&:hover,
|
|
113
114
|
&:active,
|
|
114
115
|
&:focus {
|
|
115
|
-
color: ${({ isActive }) => isActive
|
|
116
|
+
color: ${({ $isActive }) => $isActive
|
|
116
117
|
? theme.default.color.text.plum
|
|
117
118
|
: theme.default.color.text.white + theme.default.color.transparency.T80};
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
`;
|
|
121
|
-
const TopContainer = styled
|
|
122
|
+
const TopContainer = styledComponents.styled(BaseContainer) `
|
|
122
123
|
h2 {
|
|
123
124
|
margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.5)};
|
|
124
125
|
}
|
|
@@ -138,14 +139,14 @@ const TopContainer = styled.default(BaseContainer) `
|
|
|
138
139
|
margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)};
|
|
139
140
|
}
|
|
140
141
|
`;
|
|
141
|
-
const AppSection = styled.
|
|
142
|
+
const AppSection = styledComponents.styled.div `
|
|
142
143
|
text-align: center;
|
|
143
144
|
|
|
144
145
|
img {
|
|
145
146
|
max-width: 100%;
|
|
146
147
|
}
|
|
147
148
|
`;
|
|
148
|
-
const AppList = styled.
|
|
149
|
+
const AppList = styledComponents.styled.div `
|
|
149
150
|
display: flex;
|
|
150
151
|
gap: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
151
152
|
justify-content: center;
|
|
@@ -154,7 +155,7 @@ const AppList = styled.default.div `
|
|
|
154
155
|
width: 142px;
|
|
155
156
|
}
|
|
156
157
|
`;
|
|
157
|
-
const BottomContainer = styled
|
|
158
|
+
const BottomContainer = styledComponents.styled(BaseContainer) `
|
|
158
159
|
display: flex;
|
|
159
160
|
flex-direction: column;
|
|
160
161
|
gap: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 3)};
|
|
@@ -180,7 +181,7 @@ const BottomContainer = styled.default(BaseContainer) `
|
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
183
|
|
|
183
|
-
@media (min-width: ${({ collapseSize }) => collapseSize + 1}px) {
|
|
184
|
+
@media (min-width: ${({ $collapseSize }) => $collapseSize + 1}px) {
|
|
184
185
|
flex-direction: row;
|
|
185
186
|
align-items: flex-start;
|
|
186
187
|
justify-content: space-between;
|
|
@@ -211,7 +212,7 @@ const BottomContainer = styled.default(BaseContainer) `
|
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
214
|
`;
|
|
214
|
-
const BottomCenter = styled.
|
|
215
|
+
const BottomCenter = styledComponents.styled.div `
|
|
215
216
|
display: flex;
|
|
216
217
|
flex-direction: column;
|
|
217
218
|
gap: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 3)};
|
|
@@ -220,7 +221,7 @@ const BottomCenter = styled.default.div `
|
|
|
220
221
|
margin: 0 auto;
|
|
221
222
|
font-size: ${theme.default.fontSize.s};
|
|
222
223
|
`;
|
|
223
|
-
const SocialMediaLinksContainer = styled.
|
|
224
|
+
const SocialMediaLinksContainer = styledComponents.styled.div `
|
|
224
225
|
white-space: nowrap;
|
|
225
226
|
text-align: center;
|
|
226
227
|
a {
|
|
@@ -228,7 +229,7 @@ const SocialMediaLinksContainer = styled.default.div `
|
|
|
228
229
|
margin: 0 ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
229
230
|
}
|
|
230
231
|
`;
|
|
231
|
-
const GeneralInformationContainer = styled.
|
|
232
|
+
const GeneralInformationContainer = styledComponents.styled.div `
|
|
232
233
|
text-align: center;
|
|
233
234
|
display: flex;
|
|
234
235
|
gap: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.5)};
|
|
@@ -254,7 +255,7 @@ const mapCorporateSelector = (languagesObject) => Object.keys(languagesObject.ur
|
|
|
254
255
|
}));
|
|
255
256
|
const TopSection = ({ topSection }) => {
|
|
256
257
|
const { collapseSize, language } = React.useContext(FooterContext.default);
|
|
257
|
-
return (React__default.default.createElement(TopContainer, { collapseSize: collapseSize }, topSection === null || topSection === void 0 ? void 0 : topSection.map((section, index) => (React__default.default.createElement("div", { key: `service-section-${index}`, "data-testid": `service-section-${index}` },
|
|
258
|
+
return (React__default.default.createElement(TopContainer, { "$collapseSize": collapseSize }, topSection === null || topSection === void 0 ? void 0 : topSection.map((section, index) => (React__default.default.createElement("div", { key: `service-section-${index}`, "data-testid": `service-section-${index}` },
|
|
258
259
|
section.svgIconName[language] === 'user' && React__default.default.createElement(icons.User, { size: "3rem" }),
|
|
259
260
|
section.svgIconName[language] === 'headset' && React__default.default.createElement(icons.Headset, { size: "3rem" }),
|
|
260
261
|
section.svgIconName[language] === 'shop' && React__default.default.createElement(icons.Shop, { size: "3rem" }),
|
|
@@ -270,11 +271,11 @@ const Categories = ({ categories }) => {
|
|
|
270
271
|
setIsCollapsed(Object.assign(Object.assign({}, isCollapsed), { [currentIndex]: !isCollapsed[currentIndex] }));
|
|
271
272
|
}
|
|
272
273
|
};
|
|
273
|
-
return (React__default.default.createElement(CategoryContainer, { collapseSize: collapseSize, "data-testid": "category-container" }, categories === null || categories === void 0 ? void 0 : categories.map((category, index) => (React__default.default.createElement(CategoryWrapper, { active: isCollapsed[index], "data-testid": `category-${index}`, key: `category-${index}` },
|
|
274
|
+
return (React__default.default.createElement(CategoryContainer, { "$collapseSize": collapseSize, "data-testid": "category-container" }, categories === null || categories === void 0 ? void 0 : categories.map((category, index) => (React__default.default.createElement(CategoryWrapper, { "$active": isCollapsed[index], "data-testid": `category-${index}`, key: `category-${index}` },
|
|
274
275
|
React__default.default.createElement(CategoryHeader, { onClick: () => toggleCollapse(index), "aria-expanded": isMobileFooter ? isCollapsed[index] : true },
|
|
275
276
|
React__default.default.createElement(CategoryName, null, category.description[language]),
|
|
276
277
|
isMobileFooter && React__default.default.createElement(icons.ChevronDown, null)),
|
|
277
|
-
React__default.default.createElement(CategoryLinks, { active: isMobileFooter ? isCollapsed[index] : true }, category.category.map((categoryLink, linkIndex) => (React__default.default.createElement(LinksListEl, { key: `category-${index}-link-${linkIndex}`, "data-testid": `category-${index}-link-${linkIndex}` },
|
|
278
|
+
React__default.default.createElement(CategoryLinks, { "$active": isMobileFooter ? isCollapsed[index] : true }, category.category.map((categoryLink, linkIndex) => (React__default.default.createElement(LinksListEl, { key: `category-${index}-link-${linkIndex}`, "data-testid": `category-${index}-link-${linkIndex}` },
|
|
278
279
|
React__default.default.createElement("a", { href: categoryLink.urls[language] }, categoryLink.titles[language]))))))))));
|
|
279
280
|
};
|
|
280
281
|
const GeneralInformation = ({ generalInformation }) => {
|
|
@@ -350,7 +351,7 @@ const BottomSection = ({ items }) => {
|
|
|
350
351
|
else {
|
|
351
352
|
languages = customLinks || [];
|
|
352
353
|
}
|
|
353
|
-
return (React__default.default.createElement(BottomContainer, { collapseSize: collapseSize, "data-testid": "bottom-section" },
|
|
354
|
+
return (React__default.default.createElement(BottomContainer, { "$collapseSize": collapseSize, "data-testid": "bottom-section" },
|
|
354
355
|
languages.length > 0 && (React__default.default.createElement(LanguageLinks, { currentLanguage: language, languages: languages })),
|
|
355
356
|
React__default.default.createElement(BottomCenter, null,
|
|
356
357
|
socialMedia && React__default.default.createElement(SocialMediaLinks, { socialMedia: socialMedia }),
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var useWindowSize = require('../../hooks/useWindowSize.js');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var breakpoints = require('../../themes/themeComponents/breakpoints.js');
|
|
10
10
|
var FooterComponents = require('./Components/FooterComponents.js');
|
|
@@ -14,11 +14,11 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
|
|
17
|
-
const TopContainer = styled.
|
|
17
|
+
const TopContainer = styledComponents.styled.div `
|
|
18
18
|
background-color: ${theme.default.color.background.plum.E01};
|
|
19
19
|
`;
|
|
20
|
-
const FooterContainer = styled.
|
|
21
|
-
z-index: ${({ zIndex }) => zIndex};
|
|
20
|
+
const FooterContainer = styledComponents.styled.footer `
|
|
21
|
+
z-index: ${({ $zIndex }) => $zIndex};
|
|
22
22
|
color: ${theme.default.color.text.white};
|
|
23
23
|
background: ${theme.default.color.default.plum};
|
|
24
24
|
margin: 0;
|
|
@@ -90,7 +90,7 @@ const Footer = ({ items = { businessId: 'NONE', footerNavigation: {} }, language
|
|
|
90
90
|
setIsCollapsed,
|
|
91
91
|
isMobileFooter: isMobile,
|
|
92
92
|
}), [collapseSize, isCollapsed, isMobile, language]);
|
|
93
|
-
return (React__default.default.createElement(FooterContainer, { zIndex: zIndex },
|
|
93
|
+
return (React__default.default.createElement(FooterContainer, { "$zIndex": zIndex },
|
|
94
94
|
React__default.default.createElement(FooterContext.default.Provider, { value: footerContextData },
|
|
95
95
|
Boolean(topSection.length) && (React__default.default.createElement(TopContainer, null,
|
|
96
96
|
React__default.default.createElement(FooterComponents.TopSection, { topSection: topSection }))),
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
var index = require('../Icons/index.js');
|
|
@@ -14,17 +14,17 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
15
|
|
|
16
16
|
const IconsList = index;
|
|
17
|
-
const IconContainer = styled.
|
|
17
|
+
const IconContainer = styledComponents.styled.span `
|
|
18
18
|
display: inline-flex;
|
|
19
19
|
width: ${({ size }) => size};
|
|
20
20
|
height: ${({ size }) => size};
|
|
21
21
|
|
|
22
|
-
${({ position }) => (position === 'right' || position === 'middle') &&
|
|
22
|
+
${({ $position }) => ($position === 'right' || $position === 'middle') &&
|
|
23
23
|
`
|
|
24
24
|
margin-left: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
25
25
|
`}
|
|
26
26
|
|
|
27
|
-
${({ position }) => (position === 'left' || position === 'middle') &&
|
|
27
|
+
${({ $position }) => ($position === 'left' || $position === 'middle') &&
|
|
28
28
|
`
|
|
29
29
|
margin-right: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
30
30
|
`}
|
|
@@ -39,9 +39,9 @@ const Icon = (_a) => {
|
|
|
39
39
|
// TODO: Remove once https://jira.dna.fi/browse/STYLE-334 is done
|
|
40
40
|
const RenderIcon = name && IconsList[name];
|
|
41
41
|
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
42
|
-
RenderIcon && (React__default.default.createElement(IconContainer, { position: props.position, size: size, className: "dnasg-icon", "data-testid": dataTestId },
|
|
42
|
+
RenderIcon && (React__default.default.createElement(IconContainer, { "$position": props.position, size: size, className: "dnasg-icon", "data-testid": dataTestId },
|
|
43
43
|
React__default.default.createElement(RenderIcon, Object.assign({}, props, { size: size, color: color })))),
|
|
44
|
-
IconParam && (React__default.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 },
|
|
44
|
+
IconParam && (React__default.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 },
|
|
45
45
|
React__default.default.createElement(IconParam, { size: size, color: color })))));
|
|
46
46
|
};
|
|
47
47
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ const colorMap = {
|
|
|
21
21
|
default: theme.default.color.default.pink,
|
|
22
22
|
sale: theme.default.color.accent.orange,
|
|
23
23
|
};
|
|
24
|
-
const InfoDialogContainer = styled.
|
|
24
|
+
const InfoDialogContainer = styledComponents.styled.div `
|
|
25
25
|
position: relative;
|
|
26
26
|
font-size: ${theme.default.fontSize.s};
|
|
27
27
|
line-height: ${theme.default.lineHeight.s};
|
|
@@ -48,7 +48,7 @@ const InfoDialogContainer = styled.default.div `
|
|
|
48
48
|
border-top: 0;
|
|
49
49
|
width: auto;
|
|
50
50
|
border-bottom-color: ${theme.default.color.default.white};
|
|
51
|
-
${({ position }) => positionMap[position]};
|
|
51
|
+
${({ $position }) => positionMap[$position]};
|
|
52
52
|
border-width: 0px ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1.2)}
|
|
53
53
|
${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1.2)};
|
|
54
54
|
}
|
|
@@ -62,7 +62,7 @@ const InfoDialogContainer = styled.default.div `
|
|
|
62
62
|
/** @visibleName Info Dialog */
|
|
63
63
|
const InfoDialog = (_a) => {
|
|
64
64
|
var { position = 'middle', type = 'default', 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["position", "type", 'data-testid']);
|
|
65
|
-
return (React__default.default.createElement(InfoDialogContainer, { id: props.id, "data-testid": dataTestId, className: props.className, position: position, type: type, role: "region", "aria-label": props.ariaLabel }, props.children));
|
|
65
|
+
return (React__default.default.createElement(InfoDialogContainer, { id: props.id, "data-testid": dataTestId, className: props.className, "$position": position, type: type, role: "region", "aria-label": props.ariaLabel }, props.children));
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
exports.default = InfoDialog;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var icons = require('@dnanpm/icons');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var
|
|
8
|
+
var styledComponents = require('styled-components');
|
|
9
9
|
var theme = require('../../themes/theme.js');
|
|
10
10
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
11
11
|
var ButtonIcon = require('../ButtonIcon/ButtonIcon.js');
|
|
@@ -20,11 +20,11 @@ const iconsMap = {
|
|
|
20
20
|
success: icons.Check,
|
|
21
21
|
error: icons.Error,
|
|
22
22
|
};
|
|
23
|
-
const FieldContainer = styled.
|
|
23
|
+
const FieldContainer = styledComponents.styled.div `
|
|
24
24
|
color: ${theme.default.color.text.black};
|
|
25
25
|
margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
26
26
|
`;
|
|
27
|
-
const FieldWrapper = styled.
|
|
27
|
+
const FieldWrapper = styledComponents.styled.div `
|
|
28
28
|
position: relative;
|
|
29
29
|
display: flex;
|
|
30
30
|
border-radius: ${theme.default.radius.s};
|
|
@@ -34,7 +34,7 @@ const FieldWrapper = styled.default.div `
|
|
|
34
34
|
background-color: ${theme.default.color.background.white.default};
|
|
35
35
|
align-items: center;
|
|
36
36
|
|
|
37
|
-
${({ status }) => status === 'error' &&
|
|
37
|
+
${({ $status }) => $status === 'error' &&
|
|
38
38
|
`
|
|
39
39
|
border-bottom: 4px solid ${theme.default.color.notification.error};
|
|
40
40
|
`}
|
|
@@ -50,10 +50,10 @@ const FieldWrapper = styled.default.div `
|
|
|
50
50
|
display: none;
|
|
51
51
|
`}
|
|
52
52
|
|
|
53
|
-
${({ $disabled }) => $disabled &&
|
|
53
|
+
${({ $disabled, $readonly }) => ($disabled || $readonly) &&
|
|
54
54
|
`
|
|
55
55
|
background-color: ${theme.default.color.background.sand.E01};
|
|
56
|
-
`}
|
|
56
|
+
`}
|
|
57
57
|
|
|
58
58
|
&:focus-within {
|
|
59
59
|
border: 2px solid ${theme.default.color.focus.light};
|
|
@@ -61,7 +61,7 @@ const FieldWrapper = styled.default.div `
|
|
|
61
61
|
border-radius: ${theme.default.radius.s};
|
|
62
62
|
}
|
|
63
63
|
`;
|
|
64
|
-
const IconWrapper = styled.
|
|
64
|
+
const IconWrapper = styledComponents.styled.div `
|
|
65
65
|
margin-left: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
66
66
|
display: flex;
|
|
67
67
|
flex-wrap: nowrap;
|
|
@@ -76,7 +76,7 @@ const IconWrapper = styled.default.div `
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
`;
|
|
79
|
-
const StyledInput = styled.
|
|
79
|
+
const StyledInput = styledComponents.styled.input `
|
|
80
80
|
position: relative;
|
|
81
81
|
display: inline-block;
|
|
82
82
|
appearance: none;
|
|
@@ -90,6 +90,12 @@ const StyledInput = styled.default.input `
|
|
|
90
90
|
padding: 0;
|
|
91
91
|
background: transparent;
|
|
92
92
|
|
|
93
|
+
${({ readOnly }) => readOnly &&
|
|
94
|
+
`
|
|
95
|
+
color: ${theme.default.color.default.black};
|
|
96
|
+
cursor: default;
|
|
97
|
+
`}
|
|
98
|
+
|
|
93
99
|
&[type='range'] {
|
|
94
100
|
appearance: auto;
|
|
95
101
|
}
|
|
@@ -107,19 +113,19 @@ const StyledInput = styled.default.input `
|
|
|
107
113
|
color: ${theme.default.color.text.black}${theme.default.color.transparency.T40};
|
|
108
114
|
}
|
|
109
115
|
`;
|
|
110
|
-
const StyledButtonIcon = styled
|
|
116
|
+
const StyledButtonIcon = styledComponents.styled(ButtonIcon.default) `
|
|
111
117
|
.dnasg-icon svg {
|
|
112
118
|
fill: ${theme.default.color.text.black};
|
|
113
119
|
}
|
|
114
120
|
`;
|
|
115
|
-
const Message = styled.
|
|
121
|
+
const Message = styledComponents.styled.div `
|
|
116
122
|
font-size: ${theme.default.fontSize.s};
|
|
117
123
|
font-weight: ${theme.default.fontWeight.book};
|
|
118
124
|
line-height: ${theme.default.lineHeight.s};
|
|
119
125
|
color: ${theme.default.color.text.gray};
|
|
120
126
|
margin-top: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.5)};
|
|
121
127
|
`;
|
|
122
|
-
const ErrorMessage = styled
|
|
128
|
+
const ErrorMessage = styledComponents.styled(Message) `
|
|
123
129
|
font-weight: ${theme.default.fontWeight.medium};
|
|
124
130
|
color: ${theme.default.color.notification.error};
|
|
125
131
|
`;
|
|
@@ -165,18 +171,20 @@ const Input = (_a) => {
|
|
|
165
171
|
};
|
|
166
172
|
return (React__default.default.createElement(FieldContainer, { className: props.className },
|
|
167
173
|
props.label && (React__default.default.createElement(LabelText.default, { htmlFor: props.id, "data-testid": dataTestId && `${dataTestId}-label`, status: props.status === 'error' ? props.status : undefined, isMandatory: props.required }, props.label)),
|
|
168
|
-
React__default.default.createElement(FieldWrapper, { status: props.status, "$type": type, "$disabled": props.disabled },
|
|
169
|
-
React__default.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 }),
|
|
174
|
+
React__default.default.createElement(FieldWrapper, { "$status": props.status, "$type": type, "$disabled": props.disabled, "$readonly": props.readonly },
|
|
175
|
+
React__default.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 }),
|
|
170
176
|
((props.status && props.status !== 'comment') ||
|
|
171
177
|
props.showPasswordToggle ||
|
|
172
178
|
props.disabled ||
|
|
179
|
+
props.readonly ||
|
|
173
180
|
props.onClearableButtonClick) && (React__default.default.createElement(IconWrapper, null,
|
|
174
181
|
props.showPasswordToggle && (React__default.default.createElement(StyledButtonIcon, { icon: showPassword ? icons.EyeOpen : icons.EyeClosed, onClick: togglePasswordVisibility, ariaLabel: props.passwordToggleLabel })),
|
|
175
|
-
(props.status === 'success' || props.status === 'error') && (React__default.default.createElement(Icon.default, { icon: iconsMap[props.status], color: theme.default.color.notification[props.status] })),
|
|
176
|
-
props.disabled && React__default.default.createElement(Icon.default, { icon: icons.Lock }),
|
|
182
|
+
(props.status === 'success' || props.status === 'error') && (React__default.default.createElement(Icon.default, { "aria-hidden": true, icon: iconsMap[props.status], color: theme.default.color.notification[props.status] })),
|
|
183
|
+
(props.disabled || props.readonly) && (React__default.default.createElement(Icon.default, { "aria-hidden": true, icon: icons.Lock, className: props.className && `${props.className}-lock-icon` })),
|
|
177
184
|
props.onClearableButtonClick &&
|
|
178
185
|
Boolean(props.value) &&
|
|
179
|
-
!props.disabled &&
|
|
186
|
+
!props.disabled &&
|
|
187
|
+
!props.readonly && (React__default.default.createElement(ButtonIcon.default, { icon: icons.Close, onClick: props.onClearableButtonClick, ariaLabel: props.clearButtonLabel }))))),
|
|
180
188
|
props.status === 'error' && props.errorMessage && (React__default.default.createElement(ErrorMessage, { id: `${props.id}-error`, "data-testid": dataTestId && `${dataTestId}-error` }, props.errorMessage)),
|
|
181
189
|
props.status === 'comment' && props.commentMessage && (React__default.default.createElement(Message, { id: `${props.id}-comment`, "data-testid": dataTestId && `${dataTestId}-comment` }, props.commentMessage))));
|
|
182
190
|
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ const colorsMap = {
|
|
|
18
18
|
presale: theme.default.color.background.orange.default,
|
|
19
19
|
other: theme.default.color.background.sky.default,
|
|
20
20
|
};
|
|
21
|
-
const StyledLabel = styled.
|
|
21
|
+
const StyledLabel = styledComponents.styled.span `
|
|
22
22
|
display: inline-block;
|
|
23
23
|
color: ${theme.default.color.text.black};
|
|
24
24
|
background-color: ${({ type }) => colorsMap[type]};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var styledComponents = require('styled-components');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
|
|
@@ -12,22 +12,22 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
|
|
15
|
-
const Label = styled.
|
|
15
|
+
const Label = styledComponents.styled.label `
|
|
16
16
|
display: block;
|
|
17
|
-
color: ${({ status }) => status === 'error' ? theme.default.color.notification.error : theme.default.color.text.gray};
|
|
17
|
+
color: ${({ $status }) => $status === 'error' ? theme.default.color.notification.error : theme.default.color.text.gray};
|
|
18
18
|
font-weight: ${theme.default.fontWeight.medium};
|
|
19
19
|
font-size: ${theme.default.fontSize.default};
|
|
20
20
|
line-height: ${theme.default.lineHeight.default};
|
|
21
21
|
margin-bottom: ${styledUtils.getDividedSize(theme.default.base.baseWidth, 2)};
|
|
22
22
|
${({ htmlFor }) => htmlFor && `cursor: pointer`};
|
|
23
23
|
`;
|
|
24
|
-
const Mandatory = styled.
|
|
24
|
+
const Mandatory = styledComponents.styled.span `
|
|
25
25
|
color: ${theme.default.color.text.pink};
|
|
26
26
|
`;
|
|
27
27
|
/** @visibleName Label Text */
|
|
28
28
|
const LabelText = (_a) => {
|
|
29
29
|
var { 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ['data-testid']);
|
|
30
|
-
return (React__default.default.createElement(Label, { id: props.id, htmlFor: props.htmlFor, className: props.className, "data-testid": dataTestId, status: props.status },
|
|
30
|
+
return (React__default.default.createElement(Label, { id: props.id, htmlFor: props.htmlFor, className: props.className, "data-testid": dataTestId, "$status": props.status },
|
|
31
31
|
props.children,
|
|
32
32
|
props.isMandatory && React__default.default.createElement(Mandatory, null, "*")));
|
|
33
33
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var styledComponents = require('styled-components');
|
|
7
7
|
var theme = require('../../../themes/theme.js');
|
|
8
8
|
var styledUtils = require('../../../utils/styledUtils.js');
|
|
9
9
|
|
|
@@ -11,9 +11,9 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
13
|
|
|
14
|
-
const BusinessMenuLink = styled.
|
|
15
|
-
background-color: ${p => p
|
|
16
|
-
color: ${p => (p
|
|
14
|
+
const BusinessMenuLink = styledComponents.styled.a `
|
|
15
|
+
background-color: ${p => p.$isActive ? theme.default.color.background.white.default : theme.default.color.background.plum.E02};
|
|
16
|
+
color: ${p => (p.$isActive ? theme.default.color.text.black : theme.default.color.text.white)};
|
|
17
17
|
font-family: ${theme.default.fontFamily.default};
|
|
18
18
|
font-weight: ${theme.default.fontWeight.medium};
|
|
19
19
|
font-size: ${theme.default.fontSize.xs};
|
|
@@ -32,8 +32,8 @@ const BusinessMenuLink = styled.default.a `
|
|
|
32
32
|
&:hover,
|
|
33
33
|
&:focus {
|
|
34
34
|
text-decoration: none;
|
|
35
|
-
color: ${p => (p
|
|
36
|
-
background-color: ${p => p
|
|
35
|
+
color: ${p => (p.$isActive ? theme.default.color.text.black : theme.default.color.text.white)};
|
|
36
|
+
background-color: ${p => p.$isActive
|
|
37
37
|
? theme.default.color.background.white.default
|
|
38
38
|
: theme.default.color.background.plum.default};
|
|
39
39
|
outline: none;
|
|
@@ -44,7 +44,7 @@ const BusinessMenuLink = styled.default.a `
|
|
|
44
44
|
0px 0px 0px 4px ${theme.default.color.focus.dark};
|
|
45
45
|
}
|
|
46
46
|
`;
|
|
47
|
-
const BusinessMenuList = styled.
|
|
47
|
+
const BusinessMenuList = styledComponents.styled.nav `
|
|
48
48
|
display: flex;
|
|
49
49
|
gap: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
50
50
|
padding: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.5)} ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
@@ -56,7 +56,7 @@ const BusinessMenu = ({ ariaLabel, currentBusinessId, items, lang }) => {
|
|
|
56
56
|
if (!(items === null || items === void 0 ? void 0 : items.length)) {
|
|
57
57
|
return null;
|
|
58
58
|
}
|
|
59
|
-
return (React__default.default.createElement(BusinessMenuList, { "aria-label": ariaLabel, "data-testid": "business-menu" }, items.map(item => (React__default.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])))));
|
|
59
|
+
return (React__default.default.createElement(BusinessMenuList, { "aria-label": ariaLabel, "data-testid": "business-menu" }, items.map(item => (React__default.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])))));
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
exports.default = BusinessMenu;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var icons = require('@dnanpm/icons');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var useOutsideClick = require('../../../hooks/useOutsideClick.js');
|
|
8
|
-
var
|
|
8
|
+
var styledComponents = require('styled-components');
|
|
9
9
|
var theme = require('../../../themes/theme.js');
|
|
10
10
|
var navigation = require('../../../themes/themeComponents/navigation.js');
|
|
11
11
|
var styledUtils = require('../../../utils/styledUtils.js');
|
|
@@ -17,7 +17,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
|
|
18
18
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
19
|
|
|
20
|
-
const fadeIn =
|
|
20
|
+
const fadeIn = styledComponents.keyframes `
|
|
21
21
|
0% {
|
|
22
22
|
opacity: 0;
|
|
23
23
|
transform: translateY(-5px);
|
|
@@ -27,17 +27,17 @@ const fadeIn = styled.keyframes `
|
|
|
27
27
|
transform: translateY(0px);
|
|
28
28
|
}
|
|
29
29
|
`;
|
|
30
|
-
const fadeInAnimation =
|
|
30
|
+
const fadeInAnimation = styledComponents.css `
|
|
31
31
|
animation: ${fadeIn} 0.3s ease-in-out;
|
|
32
32
|
`;
|
|
33
|
-
const noAnimation =
|
|
33
|
+
const noAnimation = styledComponents.css `
|
|
34
34
|
animation: none;
|
|
35
35
|
`;
|
|
36
|
-
const MegaMenuContent = styled.
|
|
36
|
+
const MegaMenuContent = styledComponents.styled.ul `
|
|
37
37
|
display: grid;
|
|
38
38
|
grid-template-columns: 25% 25% 25% 25%;
|
|
39
39
|
`;
|
|
40
|
-
const CategoryTitle = styled.
|
|
40
|
+
const CategoryTitle = styledComponents.styled.h2 `
|
|
41
41
|
display: flex;
|
|
42
42
|
font-size: ${theme.default.fontSize.default};
|
|
43
43
|
line-height: ${theme.default.lineHeight.default};
|
|
@@ -48,7 +48,7 @@ const CategoryTitle = styled.default.h2 `
|
|
|
48
48
|
font-size: ${theme.default.fontSize.xl};
|
|
49
49
|
`}
|
|
50
50
|
`;
|
|
51
|
-
const CategoryBlock = styled.
|
|
51
|
+
const CategoryBlock = styledComponents.styled.li `
|
|
52
52
|
display: block;
|
|
53
53
|
padding: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)} 0;
|
|
54
54
|
border-right: 1px solid ${theme.default.color.line.L03};
|
|
@@ -68,16 +68,16 @@ const CategoryBlock = styled.default.li `
|
|
|
68
68
|
`}
|
|
69
69
|
}
|
|
70
70
|
`;
|
|
71
|
-
const CategoryCollectionBlock = styled
|
|
71
|
+
const CategoryCollectionBlock = styledComponents.styled(CategoryBlock) `
|
|
72
72
|
background-color: ${theme.default.color.background.sand.E01};
|
|
73
73
|
`;
|
|
74
|
-
const SubMenuItem = styled.
|
|
74
|
+
const SubMenuItem = styledComponents.styled.li `
|
|
75
75
|
> a {
|
|
76
76
|
color: ${p => (p.isHighlighted ? theme.default.color.text.pink : theme.default.color.text.black)};
|
|
77
77
|
font-weight: ${p => (p.isHighlighted ? theme.default.fontWeight.bold : theme.default.fontWeight.book)};
|
|
78
78
|
}
|
|
79
79
|
`;
|
|
80
|
-
const DesktopMenuItem = styled
|
|
80
|
+
const DesktopMenuItem = styledComponents.styled(globalNavStyles.MenuItem) `
|
|
81
81
|
> a,
|
|
82
82
|
> button {
|
|
83
83
|
width: auto;
|
|
@@ -103,7 +103,7 @@ const DesktopMenuItem = styled.default(globalNavStyles.MenuItem) `
|
|
|
103
103
|
}
|
|
104
104
|
`;
|
|
105
105
|
// MEGAMENU 1st level
|
|
106
|
-
const SubMenuList = styled.
|
|
106
|
+
const SubMenuList = styledComponents.styled.div `
|
|
107
107
|
position: absolute;
|
|
108
108
|
top: ${navigation.navMaxHeight};
|
|
109
109
|
left: 0;
|