@dnanpm/styleguide 3.7.2 → 3.8.2
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/README.md +29 -22
- package/build/cjs/components/Accordion/Accordion.js +7 -12
- package/build/cjs/components/AccordionItem/AccordionItem.js +30 -35
- package/build/cjs/components/AmountSelector/AmountSelector.js +25 -29
- package/build/cjs/components/Box/Box.js +8 -13
- package/build/cjs/components/Button/Button.js +28 -33
- package/build/cjs/components/Button/ButtonArrow.js +16 -21
- package/build/cjs/components/Button/ButtonClose.js +4 -8
- package/build/cjs/components/Button/ButtonIcon.js +17 -22
- package/build/cjs/components/Button/ButtonPrimary.js +13 -17
- package/build/cjs/components/Button/ButtonRound.js +6 -11
- package/build/cjs/components/Button/ButtonSecondary.js +13 -17
- package/build/cjs/components/Carousel/Carousel.d.ts +1 -1
- package/build/cjs/components/Carousel/Carousel.js +43 -47
- package/build/cjs/components/Checkbox/Checkbox.js +23 -27
- package/build/cjs/components/Chip/Chip.js +11 -16
- package/build/cjs/components/DateTimePicker/DateTimePicker.js +76 -82
- package/build/cjs/components/Divider/Divider.js +5 -10
- package/build/cjs/components/DnaLogo/DnaLogo.js +14 -18
- package/build/cjs/components/Drawer/Drawer.js +47 -52
- package/build/cjs/components/EmptyState/EmptyState.js +8 -12
- package/build/cjs/components/Expander/Expander.js +13 -17
- package/build/cjs/components/Floater/Floater.js +3 -8
- package/build/cjs/components/Footer/Components/FooterComponents.js +58 -64
- package/build/cjs/components/Footer/Footer.js +63 -67
- package/build/cjs/components/Footer/context/FooterContext.js +2 -2
- package/build/cjs/components/Icon/Icon.js +9 -13
- package/build/cjs/components/Icons/Small/hlArrowBackSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlArrowForwardSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlArrowUnderSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlCalendarSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlChevronDownSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlChevronLeftSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlChevronRightSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlChevronUpSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlClockSmall.js +4 -8
- package/build/cjs/components/Icons/Small/hlDownloadSmall.js +5 -9
- package/build/cjs/components/Icons/Small/hlExternalSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlUploadSmall.js +5 -9
- package/build/cjs/components/Icons/Social/facebook.js +3 -7
- package/build/cjs/components/Icons/Social/instagram.js +3 -7
- package/build/cjs/components/Icons/Social/linkedin.js +3 -7
- package/build/cjs/components/Icons/Social/tiktok.js +3 -7
- package/build/cjs/components/Icons/Social/twitter.js +3 -7
- package/build/cjs/components/Icons/Social/youtube.js +3 -7
- package/build/cjs/components/Icons/hl404.js +3 -7
- package/build/cjs/components/Icons/hl4gSim.js +3 -7
- package/build/cjs/components/Icons/hl5gSim.js +3 -7
- package/build/cjs/components/Icons/hlBattery.js +5 -9
- package/build/cjs/components/Icons/hlBell.js +3 -7
- package/build/cjs/components/Icons/hlCableTVCard.js +3 -7
- package/build/cjs/components/Icons/hlCalendar.js +14 -18
- package/build/cjs/components/Icons/hlCall.js +3 -7
- package/build/cjs/components/Icons/hlCameraBack.js +5 -9
- package/build/cjs/components/Icons/hlCameraFront.js +4 -8
- package/build/cjs/components/Icons/hlCart.js +5 -9
- package/build/cjs/components/Icons/hlCartEmpty.js +5 -9
- package/build/cjs/components/Icons/hlChat.js +6 -10
- package/build/cjs/components/Icons/hlCheck.js +3 -7
- package/build/cjs/components/Icons/hlChevronDown.js +3 -7
- package/build/cjs/components/Icons/hlChevronLeft.js +3 -7
- package/build/cjs/components/Icons/hlChevronRight.js +3 -7
- package/build/cjs/components/Icons/hlChevronUp.js +3 -7
- package/build/cjs/components/Icons/hlCompensation.js +3 -7
- package/build/cjs/components/Icons/hlCookie.js +3 -7
- package/build/cjs/components/Icons/hlCopy.js +4 -8
- package/build/cjs/components/Icons/hlCoupon.js +5 -9
- package/build/cjs/components/Icons/hlDelivery.js +3 -7
- package/build/cjs/components/Icons/hlDigiturva.js +3 -7
- package/build/cjs/components/Icons/hlDisplaySize.js +5 -9
- package/build/cjs/components/Icons/hlDocument.js +4 -8
- package/build/cjs/components/Icons/hlDownload.js +5 -9
- package/build/cjs/components/Icons/hlEnvelope.js +3 -7
- package/build/cjs/components/Icons/hlError.js +5 -9
- package/build/cjs/components/Icons/hlEuro.js +3 -7
- package/build/cjs/components/Icons/hlExclamationMark.js +3 -7
- package/build/cjs/components/Icons/hlExpand.js +3 -7
- package/build/cjs/components/Icons/hlExternal.js +3 -7
- package/build/cjs/components/Icons/hlEyeClosed.js +3 -7
- package/build/cjs/components/Icons/hlEyeOpen.js +4 -8
- package/build/cjs/components/Icons/hlFaceId.js +3 -7
- package/build/cjs/components/Icons/hlFastDelivery.js +3 -7
- package/build/cjs/components/Icons/hlFingerprint.js +7 -11
- package/build/cjs/components/Icons/hlGlobe.js +3 -7
- package/build/cjs/components/Icons/hlHeadphones.js +3 -7
- package/build/cjs/components/Icons/hlHeadset.js +5 -9
- package/build/cjs/components/Icons/hlHeart.js +3 -7
- package/build/cjs/components/Icons/hlHome.js +3 -7
- package/build/cjs/components/Icons/hlHub.js +4 -8
- package/build/cjs/components/Icons/hlImage.js +3 -7
- package/build/cjs/components/Icons/hlInfo.js +5 -9
- package/build/cjs/components/Icons/hlInstallment.js +4 -8
- package/build/cjs/components/Icons/hlIotSim.js +4 -8
- package/build/cjs/components/Icons/hlLaptop.js +3 -7
- package/build/cjs/components/Icons/hlLink.js +4 -8
- package/build/cjs/components/Icons/hlLiveVideo.js +3 -7
- package/build/cjs/components/Icons/hlLock.js +5 -9
- package/build/cjs/components/Icons/hlMagnifyingGlass.js +4 -8
- package/build/cjs/components/Icons/hlMarker.js +4 -8
- package/build/cjs/components/Icons/hlMemory.js +4 -8
- package/build/cjs/components/Icons/hlMenu.js +3 -7
- package/build/cjs/components/Icons/hlMinimize.js +3 -7
- package/build/cjs/components/Icons/hlMinus.js +3 -7
- package/build/cjs/components/Icons/hlMobileData.js +3 -7
- package/build/cjs/components/Icons/hlMobilePayment.js +5 -9
- package/build/cjs/components/Icons/hlModem.js +7 -11
- package/build/cjs/components/Icons/hlMore.js +5 -9
- package/build/cjs/components/Icons/hlOs.js +4 -8
- package/build/cjs/components/Icons/hlPackage.js +3 -7
- package/build/cjs/components/Icons/hlPaperclip.js +3 -7
- package/build/cjs/components/Icons/hlPaytime.js +3 -7
- package/build/cjs/components/Icons/hlPen.js +3 -7
- package/build/cjs/components/Icons/hlPerson.js +3 -7
- package/build/cjs/components/Icons/hlPhone.js +4 -8
- package/build/cjs/components/Icons/hlPlaylist.js +3 -7
- package/build/cjs/components/Icons/hlPlus.js +4 -8
- package/build/cjs/components/Icons/hlPrepaid.js +3 -7
- package/build/cjs/components/Icons/hlProcessor.js +4 -8
- package/build/cjs/components/Icons/hlServices.js +3 -7
- package/build/cjs/components/Icons/hlSettings.js +3 -7
- package/build/cjs/components/Icons/hlShield.js +4 -8
- package/build/cjs/components/Icons/hlSim.js +4 -8
- package/build/cjs/components/Icons/hlSimSimple.js +5 -9
- package/build/cjs/components/Icons/hlSmile.js +6 -10
- package/build/cjs/components/Icons/hlSpeechBubble.js +4 -8
- package/build/cjs/components/Icons/hlSquaretrade.js +3 -7
- package/build/cjs/components/Icons/hlStar.js +3 -7
- package/build/cjs/components/Icons/hlStarFilled.js +3 -7
- package/build/cjs/components/Icons/hlTrash.js +4 -8
- package/build/cjs/components/Icons/hlTv.js +3 -7
- package/build/cjs/components/Icons/hlUnlock.js +4 -8
- package/build/cjs/components/Icons/hlUpload.js +5 -9
- package/build/cjs/components/Icons/hlWarning.js +5 -9
- package/build/cjs/components/Icons/hlWifi.js +5 -9
- package/build/cjs/components/Icons/hlWrench.js +3 -7
- package/build/cjs/components/Icons/hlX.js +3 -7
- package/build/cjs/components/Icons/index.js +109 -111
- package/build/cjs/components/InfoDialog/InfoDialog.js +18 -22
- package/build/cjs/components/Input/Input.js +44 -48
- package/build/cjs/components/Label/Label.js +14 -18
- package/build/cjs/components/LabelText/LabelText.js +11 -15
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/BusinessMenu.js +23 -27
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/DesktopMenu.js +59 -63
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +11 -15
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/LinkModifier.js +6 -10
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/LoginTooltip.js +5 -9
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +4 -4
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +28 -30
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -2
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +11 -11
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.d.ts +3 -2
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +9 -11
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MobileMenu.js +50 -54
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/PageSearch.js +5 -9
- package/build/cjs/components/MainHeaderNavigation/MainHeaderNavigation.d.ts +11 -2
- package/build/cjs/components/MainHeaderNavigation/MainHeaderNavigation.js +41 -43
- package/build/cjs/components/MainHeaderNavigation/context/MobileMenuContext.js +1 -1
- package/build/cjs/components/MainHeaderNavigation/context/NavContext.js +1 -1
- package/build/cjs/components/MainHeaderNavigation/globalNavStyles.d.ts +5 -5
- package/build/cjs/components/MainHeaderNavigation/globalNavStyles.js +48 -50
- package/build/cjs/components/MainNavigation/ChildComponents/BusinessMenu.js +14 -18
- package/build/cjs/components/MainNavigation/ChildComponents/DesktopMenu.js +49 -53
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +44 -48
- package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.js +11 -15
- package/build/cjs/components/MainNavigation/ChildComponents/LinkModifier.js +7 -11
- package/build/cjs/components/MainNavigation/ChildComponents/LoginTooltip.js +5 -9
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +21 -25
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +7 -7
- package/build/cjs/components/MainNavigation/ChildComponents/MinicartTooltip.js +6 -10
- package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.js +52 -56
- package/build/cjs/components/MainNavigation/ChildComponents/PageSearch.js +5 -9
- package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.js +20 -24
- package/build/cjs/components/MainNavigation/MainNavigation.js +20 -24
- package/build/cjs/components/MainNavigation/context/MobileMenuContext.js +1 -1
- package/build/cjs/components/MainNavigation/context/NavContext.js +1 -1
- package/build/cjs/components/MainNavigation/globalNavStyles.d.ts +5 -5
- package/build/cjs/components/MainNavigation/globalNavStyles.js +12 -14
- package/build/cjs/components/Modal/Modal.js +20 -25
- package/build/cjs/components/Notification/Notification.js +17 -22
- package/build/cjs/components/NotificationBadge/NotificationBadge.js +8 -12
- package/build/cjs/components/Overlay/Overlay.d.ts +49 -0
- package/build/cjs/components/Overlay/Overlay.js +80 -0
- package/build/cjs/components/Pill/Pill.js +19 -24
- package/build/cjs/components/PixelLoader/PixelLoader.js +9 -13
- package/build/cjs/components/PriorityNavigation/PriorityNavigation.d.ts +10 -0
- package/build/cjs/components/PriorityNavigation/PriorityNavigation.js +84 -53
- package/build/cjs/components/PriorityNavigationItem/PriorityNavigationItem.js +20 -15
- package/build/cjs/components/ProgressIndicator/ProgressIndicator.js +30 -34
- package/build/cjs/components/RadioButton/RadioButton.js +11 -15
- package/build/cjs/components/ReadMore/ReadMore.js +14 -17
- package/build/cjs/components/Search/Search.js +16 -20
- package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +53 -57
- package/build/cjs/components/Selectbox/Selectbox.js +44 -49
- package/build/cjs/components/Switch/Switch.js +18 -19
- package/build/cjs/components/Tab/Tab.js +29 -33
- package/build/cjs/components/Tabs/Tabs.js +15 -19
- package/build/cjs/components/Textarea/Textarea.js +29 -33
- package/build/cjs/components/Toaster/Toaster.js +19 -24
- package/build/cjs/components/Tooltip/Tooltip.js +21 -25
- package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +2 -4
- package/build/cjs/components/TooltipMenu/TooltipMenu.js +20 -24
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/hooks/useCloseOutsideOrElementClicked.js +1 -1
- package/build/cjs/hooks/useDebounce.js +1 -1
- package/build/cjs/hooks/useDocHeight.js +2 -2
- package/build/cjs/hooks/useOutsideClick.js +1 -1
- package/build/cjs/hooks/useResizeObserver.d.ts +1 -1
- package/build/cjs/hooks/useResizeObserver.js +1 -1
- package/build/cjs/hooks/useScrollPosition.d.ts +3 -1
- package/build/cjs/hooks/useScrollPosition.js +1 -1
- package/build/cjs/hooks/useWindowSize.js +1 -1
- package/build/cjs/index.js +164 -164
- package/build/cjs/themes/globalStyles.js +78 -80
- package/build/cjs/themes/gridTheme.js +1 -1
- package/build/cjs/themes/styled.js +2 -2
- package/build/cjs/themes/theme.js +11 -11
- package/build/cjs/themes/themeComponents/base.js +2 -2
- package/build/cjs/themes/themeComponents/breakpoints.js +1 -1
- package/build/cjs/themes/themeComponents/color.js +1 -1
- package/build/cjs/themes/themeComponents/fontFamily.js +1 -1
- package/build/cjs/themes/themeComponents/fontSize.js +14 -14
- package/build/cjs/themes/themeComponents/fontWeight.js +1 -1
- package/build/cjs/themes/themeComponents/forms.js +2 -2
- package/build/cjs/themes/themeComponents/lineHeight.js +14 -14
- package/build/cjs/themes/themeComponents/navigation.js +1 -1
- package/build/cjs/themes/themeComponents/radius.js +1 -1
- package/build/cjs/utils/common.d.ts +1 -1
- package/build/cjs/utils/common.js +4 -4
- package/build/cjs/utils/createStyled.d.ts +2 -163
- package/build/cjs/utils/createStyled.js +4 -5
- package/build/cjs/utils/styledUtils.js +2 -4
- package/build/es/components/Carousel/Carousel.d.ts +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +4 -4
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +5 -3
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -2
- package/build/es/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.d.ts +3 -2
- package/build/es/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +4 -2
- package/build/es/components/MainHeaderNavigation/MainHeaderNavigation.d.ts +11 -2
- package/build/es/components/MainHeaderNavigation/MainHeaderNavigation.js +8 -6
- package/build/es/components/MainHeaderNavigation/globalNavStyles.d.ts +5 -5
- package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +1 -1
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +1 -1
- package/build/es/components/MainNavigation/globalNavStyles.d.ts +5 -5
- package/build/es/components/Overlay/Overlay.d.ts +49 -0
- package/build/es/components/Overlay/Overlay.js +76 -0
- package/build/es/components/PriorityNavigation/PriorityNavigation.d.ts +10 -0
- package/build/es/components/PriorityNavigation/PriorityNavigation.js +60 -25
- package/build/es/components/PriorityNavigationItem/PriorityNavigationItem.js +10 -1
- package/build/es/components/ReadMore/ReadMore.js +1 -0
- package/build/es/components/index.d.ts +1 -0
- package/build/es/hooks/useResizeObserver.d.ts +1 -1
- package/build/es/hooks/useScrollPosition.d.ts +3 -1
- package/build/es/index.js +1 -0
- package/build/es/themes/themeComponents/base.js +1 -1
- package/build/es/themes/themeComponents/fontSize.js +13 -13
- package/build/es/themes/themeComponents/forms.js +1 -1
- package/build/es/themes/themeComponents/lineHeight.js +13 -13
- package/build/es/utils/common.d.ts +1 -1
- package/build/es/utils/createStyled.d.ts +2 -163
- package/package.json +49 -53
|
@@ -11,35 +11,31 @@ var theme = require('../../themes/theme.js');
|
|
|
11
11
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
12
12
|
var Icon = require('../Icon/Icon.js');
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
-
|
|
18
|
-
const SecondaryNavigationWrapper = styled["default"].nav `
|
|
19
|
-
font-size: ${theme["default"].fontSize.default};
|
|
14
|
+
const SecondaryNavigationWrapper = styled.default.nav `
|
|
15
|
+
font-size: ${theme.default.fontSize.default};
|
|
20
16
|
padding: 0;
|
|
21
|
-
background-color: ${({ whiteBg }) => whiteBg ? theme
|
|
17
|
+
background-color: ${({ whiteBg }) => whiteBg ? theme.default.color.background.white.default : 'transparent'};
|
|
22
18
|
|
|
23
19
|
${({ mobileOnly }) => styledUtils.media.sm `
|
|
24
20
|
display: ${mobileOnly ? 'none' : 'inherit'};
|
|
25
21
|
`};
|
|
26
22
|
|
|
27
23
|
@media (min-width: ${({ collapseSize }) => collapseSize + 1}px) {
|
|
28
|
-
border-bottom: 1px solid ${theme
|
|
24
|
+
border-bottom: 1px solid ${theme.default.color.line.L03};
|
|
29
25
|
}
|
|
30
26
|
`;
|
|
31
|
-
const MobileSelector = styled
|
|
27
|
+
const MobileSelector = styled.default.button `
|
|
32
28
|
display: flex;
|
|
33
29
|
align-items: center;
|
|
34
30
|
justify-content: space-between;
|
|
35
|
-
line-height: ${theme
|
|
36
|
-
color: ${theme
|
|
37
|
-
padding: 1rem ${styledUtils.getMultipliedSize(theme
|
|
31
|
+
line-height: ${theme.default.lineHeight.default};
|
|
32
|
+
color: ${theme.default.color.text.pink};
|
|
33
|
+
padding: 1rem ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2)};
|
|
38
34
|
background: transparent;
|
|
39
35
|
border: 0;
|
|
40
|
-
border-bottom: 1px solid ${theme
|
|
36
|
+
border-bottom: 1px solid ${theme.default.color.default.pink};
|
|
41
37
|
width: 100%;
|
|
42
|
-
font-size: ${theme
|
|
38
|
+
font-size: ${theme.default.fontSize.default};
|
|
43
39
|
|
|
44
40
|
&:hover {
|
|
45
41
|
cursor: pointer;
|
|
@@ -49,10 +45,10 @@ const MobileSelector = styled["default"].button `
|
|
|
49
45
|
display: none;
|
|
50
46
|
}
|
|
51
47
|
`;
|
|
52
|
-
const MobileSelectorTitleWrapper = styled
|
|
48
|
+
const MobileSelectorTitleWrapper = styled.default.div `
|
|
53
49
|
display: flex;
|
|
54
50
|
`;
|
|
55
|
-
const MobileSelectorArrow = styled
|
|
51
|
+
const MobileSelectorArrow = styled.default.span `
|
|
56
52
|
display: flex;
|
|
57
53
|
|
|
58
54
|
.dnasg-icon svg {
|
|
@@ -60,7 +56,7 @@ const MobileSelectorArrow = styled["default"].span `
|
|
|
60
56
|
transform: rotate(${({ isOpen }) => (isOpen ? '180deg' : '0deg')});
|
|
61
57
|
}
|
|
62
58
|
`;
|
|
63
|
-
const MobileSelectorCheck = styled
|
|
59
|
+
const MobileSelectorCheck = styled.default.span `
|
|
64
60
|
margin-left: auto;
|
|
65
61
|
|
|
66
62
|
.dnasg-icon {
|
|
@@ -69,7 +65,7 @@ const MobileSelectorCheck = styled["default"].span `
|
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
67
|
`;
|
|
72
|
-
const SecondaryNavigationList = styled
|
|
68
|
+
const SecondaryNavigationList = styled.default.ul `
|
|
73
69
|
padding: 0;
|
|
74
70
|
list-style-type: none;
|
|
75
71
|
margin: 0;
|
|
@@ -77,12 +73,12 @@ const SecondaryNavigationList = styled["default"].ul `
|
|
|
77
73
|
display: flex;
|
|
78
74
|
flex-direction: column;
|
|
79
75
|
transition: max-height 0.2s ease-in-out, border-bottom 0.2s linear;
|
|
80
|
-
background-color: ${({ isOpen }) => isOpen ? theme
|
|
76
|
+
background-color: ${({ isOpen }) => isOpen ? theme.default.color.background.white.default : 'transparent'};
|
|
81
77
|
max-height: ${({ isOpen }) => (isOpen ? '500vh' : '0')};
|
|
82
|
-
border-bottom: ${({ isOpen }) => (isOpen ? `1px solid ${theme
|
|
78
|
+
border-bottom: ${({ isOpen }) => (isOpen ? `1px solid ${theme.default.color.line.L03}` : 'none')};
|
|
83
79
|
|
|
84
80
|
@media (min-width: ${({ collapseSize }) => collapseSize + 1}px) {
|
|
85
|
-
padding: 0 ${styledUtils.getMultipliedSize(theme
|
|
81
|
+
padding: 0 ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2)};
|
|
86
82
|
max-height: none;
|
|
87
83
|
position: static;
|
|
88
84
|
flex-direction: row;
|
|
@@ -92,56 +88,56 @@ const SecondaryNavigationList = styled["default"].ul `
|
|
|
92
88
|
max-width: ${({ 'max-width': maxWidth }) => (maxWidth ? `${maxWidth}px` : 'none')};
|
|
93
89
|
}
|
|
94
90
|
`;
|
|
95
|
-
const SecondaryNavigationListElement = styled
|
|
96
|
-
margin: 0 ${styledUtils.getMultipliedSize(theme
|
|
91
|
+
const SecondaryNavigationListElement = styled.default.li `
|
|
92
|
+
margin: 0 ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2)};
|
|
97
93
|
|
|
98
94
|
a {
|
|
99
95
|
padding: 1rem 0;
|
|
100
96
|
justify-content: start;
|
|
101
|
-
color: ${({ isActive }) => (isActive ? theme
|
|
102
|
-
font-weight: ${({ isActive }) => isActive ? theme
|
|
97
|
+
color: ${({ isActive }) => (isActive ? theme.default.color.text.pink : theme.default.color.text.black)};
|
|
98
|
+
font-weight: ${({ isActive }) => isActive ? theme.default.fontWeight.bold : theme.default.fontWeight.book};
|
|
103
99
|
display: flex;
|
|
104
100
|
align-items: center;
|
|
105
101
|
|
|
106
102
|
&:hover {
|
|
107
|
-
color: ${theme
|
|
103
|
+
color: ${theme.default.color.text.pink};
|
|
108
104
|
text-decoration: none;
|
|
109
105
|
cursor: ${({ isActive }) => (isActive ? 'auto' : 'pointer')};
|
|
110
106
|
}
|
|
111
107
|
|
|
112
108
|
@media (min-width: ${({ collapseSize }) => collapseSize + 1}px) {
|
|
113
|
-
padding: ${styledUtils.getMultipliedSize(theme
|
|
114
|
-
font-weight: ${theme
|
|
109
|
+
padding: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.5)} 0;
|
|
110
|
+
font-weight: ${theme.default.fontWeight.book};
|
|
115
111
|
}
|
|
116
112
|
}
|
|
117
113
|
|
|
118
114
|
@media (min-width: ${({ collapseSize }) => collapseSize + 1}px) {
|
|
119
|
-
margin: 0 ${styledUtils.getMultipliedSize(theme
|
|
115
|
+
margin: 0 ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1.5)};
|
|
120
116
|
white-space: nowrap;
|
|
121
117
|
transition: border-bottom 0.2s linear;
|
|
122
|
-
border-bottom: ${({ isActive }) => isActive ? `1px solid ${theme
|
|
118
|
+
border-bottom: ${({ isActive }) => isActive ? `1px solid ${theme.default.color.default.pink}` : 'none'};
|
|
123
119
|
|
|
124
120
|
&:first-of-type {
|
|
125
121
|
margin-left: 0;
|
|
126
122
|
}
|
|
127
123
|
}
|
|
128
124
|
`;
|
|
129
|
-
const IconWrapper = styled
|
|
125
|
+
const IconWrapper = styled.default.span `
|
|
130
126
|
position: relative;
|
|
131
127
|
display: flex;
|
|
132
|
-
margin-right: ${styledUtils.getMultipliedSize(theme
|
|
128
|
+
margin-right: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
133
129
|
|
|
134
130
|
&:after {
|
|
135
131
|
display: ${({ showNotification }) => (showNotification ? 'inline' : 'none')};
|
|
136
132
|
content: '';
|
|
137
133
|
position: absolute;
|
|
138
|
-
border-radius: ${theme
|
|
139
|
-
width: ${styledUtils.getMultipliedSize(theme
|
|
140
|
-
height: ${styledUtils.getMultipliedSize(theme
|
|
141
|
-
right: -${styledUtils.getMultipliedSize(theme
|
|
142
|
-
top: -${styledUtils.getMultipliedSize(theme
|
|
143
|
-
border: 1px solid ${theme
|
|
144
|
-
background-color: ${theme
|
|
134
|
+
border-radius: ${theme.default.radius.circle};
|
|
135
|
+
width: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
136
|
+
height: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1)};
|
|
137
|
+
right: -${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 0.2)};
|
|
138
|
+
top: -${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.2)};
|
|
139
|
+
border: 1px solid ${theme.default.color.default.white};
|
|
140
|
+
background-color: ${theme.default.color.default.pink};
|
|
145
141
|
}
|
|
146
142
|
|
|
147
143
|
@media (min-width: ${({ collapseSize }) => collapseSize + 1}px) {
|
|
@@ -165,7 +161,7 @@ const SecondaryNavigation = (_a) => {
|
|
|
165
161
|
}
|
|
166
162
|
};
|
|
167
163
|
const ref = React.useRef(null);
|
|
168
|
-
useOutsideClick
|
|
164
|
+
useOutsideClick.default(ref, () => {
|
|
169
165
|
if (isSecondaryNavOpen) {
|
|
170
166
|
setIsSecondaryNavOpen(false);
|
|
171
167
|
}
|
|
@@ -173,15 +169,15 @@ const SecondaryNavigation = (_a) => {
|
|
|
173
169
|
const selectedElement = (_b = props.data.pages) === null || _b === void 0 ? void 0 : _b.find(listElement => currentUrl === listElement.urls[lang]);
|
|
174
170
|
const shouldHighlightSelectedElement = (_c = (selectedElement && highlightIds.some(el => el === selectedElement.id))) !== null && _c !== void 0 ? _c : false;
|
|
175
171
|
const checkIsMenuItemLinkAbsolute = (menuItemLink) => menuItemLink.includes('http');
|
|
176
|
-
return (
|
|
177
|
-
selectedElement && (
|
|
178
|
-
|
|
179
|
-
(selectedElement === null || selectedElement === void 0 ? void 0 : selectedElement.icon) && (
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
172
|
+
return (React.createElement(SecondaryNavigationWrapper, { ref: ref, collapseSize: collapseSize, "data-testid": dataTestId, className: className, mobileOnly: props.mobileOnly, whiteBg: props.whiteBg },
|
|
173
|
+
selectedElement && (React.createElement(MobileSelector, { onClick: toggleNav, collapseSize: collapseSize, "data-testid": "secondary-navigation-dropdown-selector" },
|
|
174
|
+
React.createElement(MobileSelectorTitleWrapper, null,
|
|
175
|
+
(selectedElement === null || selectedElement === void 0 ? void 0 : selectedElement.icon) && (React.createElement(IconWrapper, { showNotification: shouldHighlightSelectedElement, collapseSize: collapseSize },
|
|
176
|
+
React.createElement(Icon.default, { name: selectedElement.icon }))),
|
|
177
|
+
React.createElement("span", null, selectedElement.titles[lang])),
|
|
178
|
+
React.createElement(MobileSelectorArrow, { isOpen: isSecondaryNavOpen },
|
|
179
|
+
React.createElement(Icon.default, { icon: icons.ChevronDown })))),
|
|
180
|
+
React.createElement(SecondaryNavigationList, { id: props.data.name ||
|
|
185
181
|
`secondary-navigation-category-${(_d = props.data.categoryId) !== null && _d !== void 0 ? _d : ''}`, isOpen: isSecondaryNavOpen, collapseSize: collapseSize, "max-width": maxWidth, "data-testid": "secondary-nav-menu-ul" }, (_e = props.data.pages) === null || _e === void 0 ? void 0 : _e.map((listElement, index) => {
|
|
186
182
|
const linkUrl = listElement.urls[lang];
|
|
187
183
|
const linkTitle = listElement.titles[lang];
|
|
@@ -191,14 +187,14 @@ const SecondaryNavigation = (_a) => {
|
|
|
191
187
|
: currentUrl.indexOf(linkUrl) > -1;
|
|
192
188
|
const showNotification = highlightIds.some(el => el === listElement.id);
|
|
193
189
|
const isMenuItemLinkAbsolute = checkIsMenuItemLinkAbsolute(linkUrl);
|
|
194
|
-
return (
|
|
195
|
-
|
|
196
|
-
iconName && (
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
isActive && (
|
|
200
|
-
|
|
190
|
+
return (React.createElement(SecondaryNavigationListElement, { key: listElement.id, isActive: isActive, onClick: closeNav, collapseSize: collapseSize }, NextJSSecondaryNavLink && !isMenuItemLinkAbsolute ? (React.createElement(NextJSSecondaryNavLink, { linkUrl: linkUrl, linkTitle: linkTitle, iconName: iconName, showNotification: showNotification, collapseSize: collapseSize, "data-testid": `secondary-nav-item-link-${index + 1}` }, isActive && (React.createElement(MobileSelectorCheck, { collapseSize: collapseSize },
|
|
191
|
+
React.createElement(Icon.default, { icon: icons.Check }))))) : (React.createElement("a", { href: linkUrl, "data-testid": `secondary-nav-item-link-${index + 1}` },
|
|
192
|
+
iconName && (React.createElement(IconWrapper, { showNotification: showNotification, collapseSize: collapseSize },
|
|
193
|
+
React.createElement(Icon.default, { name: iconName }))),
|
|
194
|
+
React.createElement("span", null, linkTitle),
|
|
195
|
+
isActive && (React.createElement(MobileSelectorCheck, { collapseSize: collapseSize },
|
|
196
|
+
React.createElement(Icon.default, { icon: icons.Check })))))));
|
|
201
197
|
}))));
|
|
202
198
|
};
|
|
203
199
|
|
|
204
|
-
exports
|
|
200
|
+
exports.default = SecondaryNavigation;
|
|
@@ -13,80 +13,75 @@ var Icon = require('../Icon/Icon.js');
|
|
|
13
13
|
var LabelText = require('../LabelText/LabelText.js');
|
|
14
14
|
var PixelLoader = require('../PixelLoader/PixelLoader.js');
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var Select__default = /*#__PURE__*/_interopDefaultLegacy(Select);
|
|
20
|
-
|
|
21
|
-
const FieldContainer = styled["default"].div `
|
|
22
|
-
color: ${theme["default"].color.text.black};
|
|
23
|
-
margin-bottom: ${styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 1)};
|
|
16
|
+
const FieldContainer = styled.default.div `
|
|
17
|
+
color: ${theme.default.color.text.black};
|
|
18
|
+
margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
24
19
|
`;
|
|
25
|
-
const ErrorMessage = styled
|
|
26
|
-
font-size: ${theme
|
|
27
|
-
font-weight: ${theme
|
|
28
|
-
line-height: ${theme
|
|
29
|
-
color: ${theme
|
|
30
|
-
margin-top: ${styledUtils.getMultipliedSize(theme
|
|
20
|
+
const ErrorMessage = styled.default.div `
|
|
21
|
+
font-size: ${theme.default.fontSize.s};
|
|
22
|
+
font-weight: ${theme.default.fontWeight.medium};
|
|
23
|
+
line-height: ${theme.default.lineHeight.s};
|
|
24
|
+
color: ${theme.default.color.notification.error};
|
|
25
|
+
margin-top: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.5)};
|
|
31
26
|
`;
|
|
32
|
-
const customTheme = Object.assign(Object.assign({}, Select.defaultTheme), { borderRadius: 0, colors: Object.assign(Object.assign({}, Select.defaultTheme.colors), { primary50: theme
|
|
27
|
+
const customTheme = Object.assign(Object.assign({}, Select.defaultTheme), { borderRadius: 0, colors: Object.assign(Object.assign({}, Select.defaultTheme.colors), { primary50: theme.default.color.background.sand.E02, primary25: theme.default.color.background.sand.E01, primary: theme.default.color.background.sand.E02 }) });
|
|
33
28
|
const getStyles = () => ({
|
|
34
|
-
control: (_styles, state) => (Object.assign(Object.assign({ position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: `0 ${styledUtils.getMultipliedSize(theme
|
|
35
|
-
? theme
|
|
36
|
-
: theme
|
|
37
|
-
borderBottom: `4px solid ${theme
|
|
29
|
+
control: (_styles, state) => (Object.assign(Object.assign({ position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: `0 ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)}`, width: '100%', minHeight: styledUtils.getMultipliedSize(theme.default.base.baseHeight, 4), backgroundColor: state.isDisabled
|
|
30
|
+
? theme.default.color.background.sand.E01
|
|
31
|
+
: theme.default.color.background.white.default, borderRadius: theme.default.radius.s, border: `1px solid ${theme.default.color.line.L01}`, overflow: 'auto' }, (state.selectProps.errorState && {
|
|
32
|
+
borderBottom: `4px solid ${theme.default.color.notification.error}`,
|
|
38
33
|
})), (!state.menuIsOpen && {
|
|
39
34
|
':focus-within': {
|
|
40
|
-
border: `2px solid ${theme
|
|
41
|
-
boxShadow: `0px 0px 0px 2px ${theme
|
|
35
|
+
border: `2px solid ${theme.default.color.focus.light}`,
|
|
36
|
+
boxShadow: `0px 0px 0px 2px ${theme.default.color.focus.dark}`,
|
|
42
37
|
outline: 'none',
|
|
43
38
|
},
|
|
44
39
|
}))),
|
|
45
40
|
valueContainer: styles => (Object.assign(Object.assign({}, styles), { padding: 0 })),
|
|
46
|
-
multiValue: styles => (Object.assign(Object.assign({}, styles), { padding: `0 ${styledUtils.getMultipliedSize(theme
|
|
47
|
-
multiValueLabel: styles => (Object.assign(Object.assign({}, styles), { fontSize: theme
|
|
48
|
-
multiValueRemove: styles => (Object.assign(Object.assign({}, styles), { marginLeft: styledUtils.getMultipliedSize(theme
|
|
41
|
+
multiValue: styles => (Object.assign(Object.assign({}, styles), { padding: `0 ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)}`, backgroundColor: theme.default.color.background.sand.E02, borderRadius: theme.default.radius.pill, margin: '2px 6px 2px 0' })),
|
|
42
|
+
multiValueLabel: styles => (Object.assign(Object.assign({}, styles), { fontSize: theme.default.fontSize.s, fontWeight: theme.default.fontWeight.medium, lineHeight: theme.default.lineHeight.default, alignItems: 'center', color: theme.default.color.text.black, padding: 0, paddingLeft: 0 })),
|
|
43
|
+
multiValueRemove: styles => (Object.assign(Object.assign({}, styles), { marginLeft: styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1), padding: 0, ':hover': {
|
|
49
44
|
cursor: 'pointer',
|
|
50
|
-
color: theme
|
|
51
|
-
backgroundColor: theme
|
|
45
|
+
color: theme.default.color.text.black,
|
|
46
|
+
backgroundColor: theme.default.color.background.sand.E02,
|
|
52
47
|
} })),
|
|
53
|
-
placeholder: styles => (Object.assign(Object.assign({}, styles), { color: theme
|
|
48
|
+
placeholder: styles => (Object.assign(Object.assign({}, styles), { color: theme.default.color.text.black + theme.default.color.transparency.T40 })),
|
|
54
49
|
indicatorSeparator: styles => (Object.assign(Object.assign({}, styles), { width: 0, backgroundColor: 'transparent', border: 'none' })),
|
|
55
|
-
clearIndicator: styles => (Object.assign(Object.assign({}, styles), { cursor: 'pointer', color: theme
|
|
56
|
-
color: theme
|
|
50
|
+
clearIndicator: styles => (Object.assign(Object.assign({}, styles), { cursor: 'pointer', color: theme.default.color.text.black, padding: 0, marginLeft: styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1), ':hover': {
|
|
51
|
+
color: theme.default.color.text.black,
|
|
57
52
|
} })),
|
|
58
|
-
dropdownIndicator: (styles, { selectProps: { isSearchable } }) => (Object.assign(Object.assign({}, styles), { color: isSearchable ? theme
|
|
59
|
-
color: theme
|
|
53
|
+
dropdownIndicator: (styles, { selectProps: { isSearchable } }) => (Object.assign(Object.assign({}, styles), { color: isSearchable ? theme.default.color.text.pink : theme.default.color.text.black, padding: 0, marginLeft: styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1), pointerEvents: 'none', ':hover': {
|
|
54
|
+
color: theme.default.color.text.black,
|
|
60
55
|
} })),
|
|
61
|
-
menu: (styles, state) => (Object.assign(Object.assign(Object.assign(Object.assign({}, styles), { boxShadow: 'none', margin: '-3px 0 -3px 0', borderRadius: theme
|
|
56
|
+
menu: (styles, state) => (Object.assign(Object.assign(Object.assign(Object.assign({}, styles), { boxShadow: 'none', margin: '-3px 0 -3px 0', borderRadius: theme.default.radius.s, border: `1px solid ${theme.default.color.line.L01}` }), (state.placement === 'top' && {
|
|
62
57
|
borderBottom: 0,
|
|
63
58
|
borderBottomLeftRadius: 0,
|
|
64
59
|
borderBottomRightRadius: 0,
|
|
65
60
|
})), (state.placement === 'bottom' && Object.assign({ borderTop: 0, borderTopLeftRadius: 0, borderTopRightRadius: 0 }, (state.selectProps.errorState && {
|
|
66
61
|
margin: '-2px 0 -3px 0',
|
|
67
62
|
}))))),
|
|
68
|
-
option: (styles, { isDisabled, isSelected }) => (Object.assign(Object.assign(Object.assign({}, styles), { display: 'flex', justifyContent: 'space-between', color: theme
|
|
63
|
+
option: (styles, { isDisabled, isSelected }) => (Object.assign(Object.assign(Object.assign({}, styles), { display: 'flex', justifyContent: 'space-between', color: theme.default.color.text.black, fontWeight: isSelected ? theme.default.fontWeight.medium : theme.default.fontWeight.book, fontSize: theme.default.fontSize.default, textOverflow: 'ellipsis', whiteSpace: 'pre-wrap', overflow: 'hidden' }), (isDisabled && {
|
|
69
64
|
cursor: 'not-allowed',
|
|
70
|
-
color: theme
|
|
71
|
-
backgroundColor: theme
|
|
65
|
+
color: theme.default.color.text.black + theme.default.color.transparency.T30,
|
|
66
|
+
backgroundColor: theme.default.color.background.sand.E01 + theme.default.color.transparency.T30,
|
|
72
67
|
}))),
|
|
73
68
|
});
|
|
74
69
|
const MultiValueRemove = (_a) => {
|
|
75
70
|
var multiValueRemoveProps = tslib.__rest(_a, []);
|
|
76
|
-
return Select.components.MultiValueRemove && (
|
|
77
|
-
|
|
71
|
+
return Select.components.MultiValueRemove && (React.createElement(Select.components.MultiValueRemove, { data: multiValueRemoveProps.data, innerProps: multiValueRemoveProps.innerProps, selectProps: multiValueRemoveProps.selectProps },
|
|
72
|
+
React.createElement(Icon.default, { icon: icons.Close, size: "1rem" })));
|
|
78
73
|
};
|
|
79
74
|
const IndicatorsContainer = (_a) => {
|
|
80
75
|
var { selectProps } = _a, indicatorsContainerProps = tslib.__rest(_a, ["selectProps"]);
|
|
81
|
-
return Select.components.IndicatorsContainer && (
|
|
82
|
-
selectProps.errorState && (
|
|
83
|
-
selectProps.isDisabled &&
|
|
76
|
+
return Select.components.IndicatorsContainer && (React.createElement(Select.components.IndicatorsContainer, { clearValue: indicatorsContainerProps.clearValue, cx: indicatorsContainerProps.cx, getClassNames: indicatorsContainerProps.getClassNames, getStyles: indicatorsContainerProps.getStyles, getValue: indicatorsContainerProps.getValue, hasValue: indicatorsContainerProps.hasValue, isDisabled: selectProps.isDisabled, isMulti: indicatorsContainerProps.isMulti, isRtl: indicatorsContainerProps.isRtl, options: indicatorsContainerProps.options, selectOption: indicatorsContainerProps.selectOption, selectProps: selectProps, setValue: indicatorsContainerProps.setValue, theme: indicatorsContainerProps.theme },
|
|
77
|
+
selectProps.errorState && (React.createElement(Icon.default, { icon: icons.Error, color: theme.default.color.notification.error, position: "right" })),
|
|
78
|
+
selectProps.isDisabled && React.createElement(Icon.default, { icon: icons.Lock, position: "right" }),
|
|
84
79
|
indicatorsContainerProps.children));
|
|
85
80
|
};
|
|
86
81
|
const ClearIndicator = (_a) => {
|
|
87
82
|
var clearIndicatorProps = tslib.__rest(_a, []);
|
|
88
|
-
return Select.components.ClearIndicator && (
|
|
89
|
-
|
|
83
|
+
return Select.components.ClearIndicator && (React.createElement(Select.components.ClearIndicator, { clearValue: clearIndicatorProps.clearValue, cx: clearIndicatorProps.cx, getClassNames: clearIndicatorProps.getClassNames, getStyles: clearIndicatorProps.getStyles, getValue: clearIndicatorProps.getValue, hasValue: clearIndicatorProps.hasValue, innerProps: clearIndicatorProps.innerProps, isFocused: clearIndicatorProps.isFocused, isMulti: clearIndicatorProps.isMulti, isRtl: clearIndicatorProps.isRtl, options: clearIndicatorProps.options, selectOption: clearIndicatorProps.selectOption, selectProps: clearIndicatorProps.selectProps, setValue: clearIndicatorProps.setValue, theme: clearIndicatorProps.theme },
|
|
84
|
+
React.createElement(Icon.default, { icon: icons.Close })));
|
|
90
85
|
};
|
|
91
86
|
const DropdownIndicator = (_a) => {
|
|
92
87
|
var { selectProps } = _a, dropdownIndicatorProps = tslib.__rest(_a, ["selectProps"]);
|
|
@@ -96,21 +91,21 @@ const DropdownIndicator = (_a) => {
|
|
|
96
91
|
}
|
|
97
92
|
return selectProps.menuIsOpen ? icons.ChevronUp : icons.ChevronDown;
|
|
98
93
|
};
|
|
99
|
-
return (Select.components.DropdownIndicator && (
|
|
100
|
-
|
|
94
|
+
return (Select.components.DropdownIndicator && (React.createElement(Select.components.DropdownIndicator, { clearValue: dropdownIndicatorProps.clearValue, cx: dropdownIndicatorProps.cx, getClassNames: dropdownIndicatorProps.getClassNames, getStyles: dropdownIndicatorProps.getStyles, getValue: dropdownIndicatorProps.getValue, hasValue: dropdownIndicatorProps.hasValue, innerProps: dropdownIndicatorProps.innerProps, isDisabled: dropdownIndicatorProps.isDisabled, isFocused: dropdownIndicatorProps.isFocused, isMulti: dropdownIndicatorProps.isMulti, isRtl: dropdownIndicatorProps.isRtl, options: dropdownIndicatorProps.options, selectOption: dropdownIndicatorProps.selectOption, selectProps: selectProps, setValue: dropdownIndicatorProps.setValue, theme: dropdownIndicatorProps.theme },
|
|
95
|
+
React.createElement(Icon.default, { icon: getIcon() }))));
|
|
101
96
|
};
|
|
102
97
|
const SelectBox = (_a) => {
|
|
103
98
|
var { noOptionsText = '', 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["noOptionsText", 'data-testid']);
|
|
104
99
|
const getNoOptionsText = () => noOptionsText;
|
|
105
|
-
return !props.isLoading ? (
|
|
106
|
-
props.label && (
|
|
107
|
-
|
|
100
|
+
return !props.isLoading ? (React.createElement(FieldContainer, { className: props.className, "data-testid": dataTestId },
|
|
101
|
+
props.label && (React.createElement(LabelText.default, { htmlFor: props.inputId, status: (props.error && 'error') || undefined, isMandatory: props.isRequired }, props.label)),
|
|
102
|
+
React.createElement(Select, { inputId: props.inputId, styles: getStyles(), theme: customTheme, components: {
|
|
108
103
|
MultiValueRemove,
|
|
109
104
|
IndicatorsContainer,
|
|
110
105
|
ClearIndicator,
|
|
111
106
|
DropdownIndicator,
|
|
112
107
|
}, options: props.options, classNamePrefix: "react_select", onChange: props.onChange, onInputChange: props.onInputChange, value: props.value, placeholder: props.placeholder, noOptionsMessage: getNoOptionsText, menuPortalTarget: props.menuPortalTarget, menuPlacement: props.menuPlacement, isSearchable: Boolean(props.isSearchable), isClearable: Boolean(props.isClearable), isMulti: props.isMulti, isDisabled: Boolean(props.isDisabled), hideSelectedOptions: false, closeMenuOnSelect: !props.isMulti, errorState: props.error }),
|
|
113
|
-
props.error && props.errorMessage &&
|
|
108
|
+
props.error && props.errorMessage && React.createElement(ErrorMessage, null, props.errorMessage))) : (React.createElement(PixelLoader.default, null));
|
|
114
109
|
};
|
|
115
110
|
|
|
116
|
-
exports
|
|
111
|
+
exports.default = SelectBox;
|
|
@@ -9,8 +9,7 @@ var theme = require('../../themes/theme.js');
|
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
var LabelText = require('../LabelText/LabelText.js');
|
|
11
11
|
|
|
12
|
-
function
|
|
13
|
-
if (e && e.__esModule) return e;
|
|
12
|
+
function _interopNamespaceDefault(e) {
|
|
14
13
|
var n = Object.create(null);
|
|
15
14
|
if (e) {
|
|
16
15
|
Object.keys(e).forEach(function (k) {
|
|
@@ -23,25 +22,25 @@ function _interopNamespace(e) {
|
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
24
|
}
|
|
26
|
-
n
|
|
25
|
+
n.default = e;
|
|
27
26
|
return Object.freeze(n);
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
var React__namespace = /*#__PURE__*/
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
31
30
|
|
|
32
31
|
const height = 1.625; // 26px
|
|
33
32
|
const borderRadius = 1.875; // 30px
|
|
34
33
|
const borderSize = 0.125; // 2px
|
|
35
34
|
const railWidth = 3; // 48px
|
|
36
35
|
const railHeight = height + borderSize * 2; // 30px
|
|
37
|
-
const Container = styled
|
|
36
|
+
const Container = styled.default.div `
|
|
38
37
|
display: inline-flex;
|
|
39
38
|
min-height: ${railHeight}rem;
|
|
40
39
|
position: relative;
|
|
41
40
|
cursor: pointer;
|
|
42
41
|
user-select: none;
|
|
43
42
|
`;
|
|
44
|
-
const Button = styled
|
|
43
|
+
const Button = styled.default.div `
|
|
45
44
|
height: ${height}rem;
|
|
46
45
|
transition: transform 0.3s;
|
|
47
46
|
position: absolute;
|
|
@@ -50,13 +49,13 @@ const Button = styled["default"].div `
|
|
|
50
49
|
border-radius: 50%;
|
|
51
50
|
${({ isChecked }) => `
|
|
52
51
|
transform: translate3d(${isChecked ? railWidth - height : 0}rem, 0, 0);
|
|
53
|
-
background-color: ${isChecked ? theme
|
|
54
|
-
border: ${borderSize}rem solid ${theme
|
|
52
|
+
background-color: ${isChecked ? theme.default.color.default.pink : theme.default.color.line.L01};
|
|
53
|
+
border: ${borderSize}rem solid ${theme.default.color.default.white};
|
|
55
54
|
z-index: 2;
|
|
56
55
|
left: ${isChecked ? -borderSize * 2 : 0}rem;
|
|
57
56
|
`};
|
|
58
57
|
`;
|
|
59
|
-
const Checkbox = styled
|
|
58
|
+
const Checkbox = styled.default.input `
|
|
60
59
|
opacity: 0;
|
|
61
60
|
position: absolute;
|
|
62
61
|
top: 0;
|
|
@@ -67,25 +66,25 @@ const Checkbox = styled["default"].input `
|
|
|
67
66
|
}
|
|
68
67
|
:disabled + label {
|
|
69
68
|
cursor: not-allowed;
|
|
70
|
-
color: ${theme
|
|
69
|
+
color: ${theme.default.color.line.L01}${theme.default.color.transparency.T40};
|
|
71
70
|
}
|
|
72
71
|
:disabled + label > div {
|
|
73
72
|
cursor: not-allowed;
|
|
74
|
-
border-color: ${({ checked }) => checked && checked ? theme
|
|
73
|
+
border-color: ${({ checked }) => checked && checked ? theme.default.color.default.pink : theme.default.color.line.L01}${theme.default.color.transparency.T40}};
|
|
75
74
|
}
|
|
76
75
|
:disabled + label div div {
|
|
77
76
|
pointer-events: none;
|
|
78
|
-
background-color: ${({ checked }) => checked && checked ? theme
|
|
77
|
+
background-color: ${({ checked }) => checked && checked ? theme.default.color.default.pink : theme.default.color.line.L01}${theme.default.color.transparency.T40};
|
|
79
78
|
}
|
|
80
79
|
`;
|
|
81
|
-
const LabelWrapper = styled
|
|
80
|
+
const LabelWrapper = styled.default(LabelText.default) `
|
|
82
81
|
position: relative;
|
|
83
82
|
cursor: pointer;
|
|
84
|
-
padding-top: ${styledUtils.getMultipliedSize(theme
|
|
85
|
-
padding-left: ${styledUtils.getMultipliedSize(theme
|
|
83
|
+
padding-top: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.4)};
|
|
84
|
+
padding-left: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 6)};
|
|
86
85
|
user-select: none;
|
|
87
86
|
`;
|
|
88
|
-
const Rail = styled
|
|
87
|
+
const Rail = styled.default.div `
|
|
89
88
|
width: ${railWidth}rem;
|
|
90
89
|
position: absolute;
|
|
91
90
|
top: 0;
|
|
@@ -94,8 +93,8 @@ const Rail = styled["default"].div `
|
|
|
94
93
|
overflow: hidden;
|
|
95
94
|
${({ isChecked }) => `
|
|
96
95
|
height: ${railHeight}rem;
|
|
97
|
-
border: ${borderSize}rem solid ${isChecked ? theme
|
|
98
|
-
background-color: ${theme
|
|
96
|
+
border: ${borderSize}rem solid ${isChecked ? theme.default.color.default.pink : theme.default.color.line.L01};
|
|
97
|
+
background-color: ${theme.default.color.background.white.default};
|
|
99
98
|
z-index: 0;
|
|
100
99
|
`};
|
|
101
100
|
`;
|
|
@@ -114,4 +113,4 @@ const Switch = (_a) => {
|
|
|
114
113
|
props.label && props.label)));
|
|
115
114
|
};
|
|
116
115
|
|
|
117
|
-
exports
|
|
116
|
+
exports.default = Switch;
|
|
@@ -10,54 +10,50 @@ var styledUtils = require('../../utils/styledUtils.js');
|
|
|
10
10
|
var Box = require('../Box/Box.js');
|
|
11
11
|
var Divider = require('../Divider/Divider.js');
|
|
12
12
|
|
|
13
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
-
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
-
|
|
17
13
|
// TODO: Change to button HTML element as a part of https://jira.dna.fi/browse/STYLE-622
|
|
18
|
-
const TabLabel = styled
|
|
14
|
+
const TabLabel = styled.default.li `
|
|
19
15
|
display: inline-block;
|
|
20
16
|
list-style: none;
|
|
21
|
-
font-size: ${theme
|
|
22
|
-
line-height: ${theme
|
|
23
|
-
font-weight: ${({ isActive }) => (isActive ? theme
|
|
24
|
-
background-color: ${({ isActive }) => isActive ? theme
|
|
25
|
-
border-radius: ${theme
|
|
26
|
-
border: 1px solid ${theme
|
|
17
|
+
font-size: ${theme.default.fontSize.default};
|
|
18
|
+
line-height: ${theme.default.lineHeight.default};
|
|
19
|
+
font-weight: ${({ isActive }) => (isActive ? theme.default.fontWeight.bold : theme.default.fontWeight.book)};
|
|
20
|
+
background-color: ${({ isActive }) => isActive ? theme.default.color.background.white.default : theme.default.color.background.sand.E01};
|
|
21
|
+
border-radius: ${theme.default.radius.default} ${theme.default.radius.default} 0 0;
|
|
22
|
+
border: 1px solid ${theme.default.color.line.L03};
|
|
27
23
|
border-bottom: 0 none;
|
|
28
24
|
padding: 0.625rem 1.25rem;
|
|
29
25
|
cursor: pointer;
|
|
30
26
|
`;
|
|
31
|
-
const TabStyle = styled
|
|
27
|
+
const TabStyle = styled.default.li `
|
|
32
28
|
display: inline-block;
|
|
33
29
|
list-style: none;
|
|
34
30
|
cursor: pointer;
|
|
35
|
-
padding: ${styledUtils.getMultipliedSize(theme
|
|
36
|
-
${styledUtils.getMultipliedSize(theme
|
|
37
|
-
color: ${theme
|
|
38
|
-
font-size: ${theme
|
|
39
|
-
line-height: ${theme
|
|
40
|
-
font-weight: ${theme
|
|
31
|
+
padding: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.8)}
|
|
32
|
+
${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.6)};
|
|
33
|
+
color: ${theme.default.color.text.black};
|
|
34
|
+
font-size: ${theme.default.fontSize.default};
|
|
35
|
+
line-height: ${theme.default.lineHeight.default};
|
|
36
|
+
font-weight: ${theme.default.fontWeight.book};
|
|
41
37
|
|
|
42
38
|
${({ isActive }) => isActive &&
|
|
43
39
|
`
|
|
44
|
-
color: ${theme
|
|
45
|
-
background-color: ${theme
|
|
40
|
+
color: ${theme.default.color.text.pink};
|
|
41
|
+
background-color: ${theme.default.color.background.sand.E01};
|
|
46
42
|
`}
|
|
47
43
|
|
|
48
44
|
${({ $type }) => $type === 'underlined' &&
|
|
49
45
|
`
|
|
50
|
-
padding: ${styledUtils.getMultipliedSize(theme
|
|
46
|
+
padding: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.6)} 0;
|
|
51
47
|
`}
|
|
52
48
|
|
|
53
49
|
${({ isActive, $type }) => isActive &&
|
|
54
50
|
$type === 'underlined' &&
|
|
55
51
|
`
|
|
56
|
-
border-bottom: 2px solid ${theme
|
|
52
|
+
border-bottom: 2px solid ${theme.default.color.default.pink};
|
|
57
53
|
background-color: transparent;
|
|
58
54
|
`}
|
|
59
55
|
`;
|
|
60
|
-
const ContentContainer = styled
|
|
56
|
+
const ContentContainer = styled.default.div `
|
|
61
57
|
${({ $type }) => {
|
|
62
58
|
if ($type === 'box' || $type === 'default') {
|
|
63
59
|
return `
|
|
@@ -66,12 +62,12 @@ const ContentContainer = styled["default"].div `
|
|
|
66
62
|
}
|
|
67
63
|
if ($type === 'panel') {
|
|
68
64
|
return `
|
|
69
|
-
border-top: 1px solid ${theme
|
|
65
|
+
border-top: 1px solid ${theme.default.color.line.L03};
|
|
70
66
|
`;
|
|
71
67
|
}
|
|
72
68
|
if ($type === 'underlined' || $type === 'gray') {
|
|
73
69
|
return `
|
|
74
|
-
margin-top: ${theme
|
|
70
|
+
margin-top: ${theme.default.grid.gutter};
|
|
75
71
|
`;
|
|
76
72
|
}
|
|
77
73
|
return '';
|
|
@@ -85,16 +81,16 @@ const Tab = (_a) => {
|
|
|
85
81
|
props.onClick(props.label, e);
|
|
86
82
|
}
|
|
87
83
|
};
|
|
88
|
-
return type === 'box' || type === 'default' || type === 'panel' ? (
|
|
89
|
-
|
|
84
|
+
return type === 'box' || type === 'default' || type === 'panel' ? (React.createElement(React.Fragment, null,
|
|
85
|
+
React.createElement(TabLabel, { role: "tab", id: props.id, "$type": type, "aria-selected": props.activeTab ? props.activeTab === props.label : props.isActive, isActive: props.activeTab ? props.activeTab === props.label : props.isActive, onClick: onClickHandler }, props.label),
|
|
90
86
|
props.isStateless &&
|
|
91
|
-
(props.children && (props.activeTab === props.label || props.isActive) ? (
|
|
92
|
-
? Box
|
|
93
|
-
: undefined }, props.children)) : (
|
|
94
|
-
|
|
87
|
+
(props.children && (props.activeTab === props.label || props.isActive) ? (React.createElement(ContentContainer, { role: "tabpanel", "$type": props.tabStyle || type, as: (type === 'box' || type === 'default') && !props.tabStyle
|
|
88
|
+
? Box.default
|
|
89
|
+
: undefined }, props.children)) : (React.createElement(Divider.default, { margin: "0" }))))) : (React.createElement(React.Fragment, null,
|
|
90
|
+
React.createElement(TabStyle, { role: "tab", id: props.id, "$type": props.tabStyle || type, "aria-selected": props.activeTab ? props.activeTab === props.label : props.isActive, isActive: props.activeTab ? props.activeTab === props.label : props.isActive, onClick: onClickHandler }, props.label),
|
|
95
91
|
props.isStateless &&
|
|
96
92
|
props.children &&
|
|
97
|
-
(props.activeTab === props.label || props.isActive) && (
|
|
93
|
+
(props.activeTab === props.label || props.isActive) && (React.createElement(ContentContainer, { role: "tabpanel", "$type": props.tabStyle || type }, props.children))));
|
|
98
94
|
};
|
|
99
95
|
|
|
100
|
-
exports
|
|
96
|
+
exports.default = Tab;
|