@dnanpm/styleguide 3.8.1 → 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 +15 -8
- 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.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 +2 -3
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +25 -29
- 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.js +6 -10
- 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.js +35 -39
- 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 +13 -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/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +2 -3
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -2
- 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 +59 -24
- package/build/es/components/PriorityNavigationItem/PriorityNavigationItem.js +10 -1
- 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 +43 -43
- package/CHANGELOG.md +0 -561
|
@@ -17,61 +17,75 @@ var ButtonIcon = require('../Button/ButtonIcon.js');
|
|
|
17
17
|
var Icon = require('../Icon/Icon.js');
|
|
18
18
|
var PriorityNavigationItem = require('../PriorityNavigationItem/PriorityNavigationItem.js');
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
-
|
|
24
|
-
const Container = styled["default"].nav `
|
|
20
|
+
const Container = styled.default.div `
|
|
25
21
|
width: 100%;
|
|
26
22
|
|
|
27
23
|
${styledUtils.media.md `
|
|
28
|
-
border-bottom: 1px solid ${theme
|
|
24
|
+
border-bottom: 1px solid ${theme.default.color.line.L03};
|
|
29
25
|
`}
|
|
30
26
|
`;
|
|
31
|
-
const
|
|
27
|
+
const Category = styled.default.h4 `
|
|
28
|
+
margin: 0;
|
|
29
|
+
color: ${theme.default.color.text.black};
|
|
30
|
+
|
|
31
|
+
${styledUtils.media.md `
|
|
32
|
+
padding: 1.25rem 0.25rem 0;
|
|
33
|
+
background: linear-gradient(
|
|
34
|
+
${theme.default.color.default.black}05 0%,
|
|
35
|
+
${theme.default.color.default.black}00 50%,
|
|
36
|
+
${theme.default.color.default.black}00 100%),
|
|
37
|
+
${theme.default.color.background.white.default};
|
|
38
|
+
`}
|
|
39
|
+
`;
|
|
40
|
+
const ListsContainer = styled.default.div `
|
|
32
41
|
display: flex;
|
|
33
42
|
flex-direction: column;
|
|
34
43
|
position: relative;
|
|
35
|
-
background-color: ${theme
|
|
44
|
+
background-color: ${theme.default.color.background.white.default};
|
|
36
45
|
|
|
37
46
|
${styledUtils.media.md `
|
|
38
47
|
justify-content: space-between;
|
|
39
48
|
flex-direction: row;
|
|
40
49
|
height: 100%;
|
|
41
50
|
align-items: center;
|
|
42
|
-
padding: 0 ${styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 1)};
|
|
43
51
|
margin: 0 auto;
|
|
44
52
|
`}
|
|
45
53
|
`;
|
|
46
|
-
const MobileDropdown = styled
|
|
54
|
+
const MobileDropdown = styled.default.button `
|
|
47
55
|
display: flex;
|
|
48
56
|
align-items: center;
|
|
49
57
|
justify-content: space-between;
|
|
50
58
|
cursor: pointer;
|
|
51
59
|
background: none;
|
|
52
60
|
border: none;
|
|
53
|
-
padding:
|
|
54
|
-
color: ${theme
|
|
55
|
-
font-size: ${theme
|
|
56
|
-
line-height: ${theme
|
|
57
|
-
font-weight: ${theme
|
|
58
|
-
border-bottom: 3px solid ${theme
|
|
61
|
+
padding: ${({ isCategoryLabel }) => (isCategoryLabel ? '0.5rem' : '0.75rem')} 1.25rem;
|
|
62
|
+
color: ${theme.default.color.text.pink};
|
|
63
|
+
font-size: ${theme.default.fontSize.default};
|
|
64
|
+
line-height: ${theme.default.lineHeight.default};
|
|
65
|
+
font-weight: ${theme.default.fontWeight.bold};
|
|
66
|
+
border-bottom: 3px solid ${theme.default.color.default.pink};
|
|
59
67
|
`;
|
|
60
|
-
const
|
|
68
|
+
const MobileDropdownContent = styled.default.div `
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
align-items: baseline;
|
|
72
|
+
text-align: left;
|
|
73
|
+
`;
|
|
74
|
+
const CoreULStyles = styled.default.ul `
|
|
61
75
|
list-style: none;
|
|
62
76
|
margin: 0;
|
|
63
77
|
padding: 0;
|
|
64
78
|
overflow: hidden;
|
|
65
79
|
`;
|
|
66
|
-
const NavigationList = styled
|
|
80
|
+
const NavigationList = styled.default(CoreULStyles) `
|
|
67
81
|
display: flex;
|
|
68
82
|
flex-direction: column;
|
|
69
83
|
justify-content: flex-start;
|
|
84
|
+
z-index: 1;
|
|
70
85
|
width: 100%;
|
|
71
|
-
background-color: ${theme
|
|
86
|
+
background-color: ${theme.default.color.background.white.default};
|
|
72
87
|
position: absolute;
|
|
73
|
-
top: ${styledUtils.getMultipliedSize(theme
|
|
74
|
-
z-index: 1;
|
|
88
|
+
top: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 5.6)};
|
|
75
89
|
visibility: ${({ isMobileNavigationOpen }) => (isMobileNavigationOpen ? 'visible' : 'hidden')};
|
|
76
90
|
clip-path: inset(
|
|
77
91
|
0% 0% ${({ isMobileNavigationOpen }) => (isMobileNavigationOpen ? '0%' : '100%')} 0%
|
|
@@ -85,19 +99,24 @@ const NavigationList = styled["default"](CoreULStyles) `
|
|
|
85
99
|
clip-path: none;
|
|
86
100
|
width: auto;
|
|
87
101
|
height: 100%;
|
|
102
|
+
padding: 0 2px;
|
|
103
|
+
|
|
104
|
+
& > li:first-child {
|
|
105
|
+
margin-left: 0;
|
|
106
|
+
}
|
|
88
107
|
`}
|
|
89
108
|
`;
|
|
90
|
-
const DropdownList = styled
|
|
109
|
+
const DropdownList = styled.default(CoreULStyles) `
|
|
91
110
|
position: absolute;
|
|
92
|
-
top: ${styledUtils.getMultipliedSize(theme
|
|
111
|
+
top: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 6)};
|
|
93
112
|
right: 0;
|
|
94
113
|
z-index: 1;
|
|
95
114
|
padding-bottom: 0.5rem;
|
|
96
|
-
background-color: ${theme
|
|
97
|
-
border: 1px solid ${theme
|
|
98
|
-
border-radius: 0 0 ${theme
|
|
99
|
-
visibility: ${({
|
|
100
|
-
clip-path: inset(0% 0% ${({
|
|
115
|
+
background-color: ${theme.default.color.background.white.default};
|
|
116
|
+
border: 1px solid ${theme.default.color.line.L04};
|
|
117
|
+
border-radius: 0 0 ${theme.default.radius.default} ${theme.default.radius.default};
|
|
118
|
+
visibility: ${({ isDropdownListOpen }) => (isDropdownListOpen ? 'visible' : 'hidden')};
|
|
119
|
+
clip-path: inset(0% 0% ${({ isDropdownListOpen }) => (isDropdownListOpen ? '0%' : '100%')} 0%);
|
|
101
120
|
transition: all 0.2s ease-in-out;
|
|
102
121
|
|
|
103
122
|
${styledUtils.media.md `
|
|
@@ -106,7 +125,7 @@ const DropdownList = styled["default"](CoreULStyles) `
|
|
|
106
125
|
}
|
|
107
126
|
`}
|
|
108
127
|
|
|
109
|
-
${common
|
|
128
|
+
${common.default({ elevation: 'low' })}
|
|
110
129
|
`;
|
|
111
130
|
const reducer = (state, action) => {
|
|
112
131
|
var _a, _b;
|
|
@@ -170,12 +189,17 @@ const PriorityNavigation = (_a) => {
|
|
|
170
189
|
const listsContainerRef = React.useRef(null);
|
|
171
190
|
const navigationListRef = React.useRef(null);
|
|
172
191
|
const dropdownButtonRef = React.useRef(null);
|
|
173
|
-
const { isMobile } = useWindowSize
|
|
174
|
-
const { width: wrapperContainerWidth } = useResizeObserver
|
|
192
|
+
const { isMobile } = useWindowSize.default(theme.default.breakpoints.md);
|
|
193
|
+
const { width: wrapperContainerWidth } = useResizeObserver.default(listsContainerRef);
|
|
175
194
|
const [isMobileNavigationOpen, setIsMobileNavigationOpen] = React.useState(false);
|
|
176
195
|
const toggleMobileNavigation = () => setIsMobileNavigationOpen(!isMobileNavigationOpen);
|
|
177
|
-
const [
|
|
178
|
-
const toggleDropdown = () =>
|
|
196
|
+
const [isDropdownListOpen, setIsDropdownListOpen] = React.useState(false);
|
|
197
|
+
const toggleDropdown = () => {
|
|
198
|
+
if (props.onDropdownListToggle) {
|
|
199
|
+
props.onDropdownListToggle(!isDropdownListOpen);
|
|
200
|
+
}
|
|
201
|
+
setIsDropdownListOpen(!isDropdownListOpen);
|
|
202
|
+
};
|
|
179
203
|
const navigationItems = React.useRef(new Map()).current;
|
|
180
204
|
const initialState = {
|
|
181
205
|
navigationItems: React.Children.toArray(props.children),
|
|
@@ -183,7 +207,7 @@ const PriorityNavigation = (_a) => {
|
|
|
183
207
|
lastItemWidth: [],
|
|
184
208
|
};
|
|
185
209
|
const [state, dispatch] = React.useReducer(reducer, initialState);
|
|
186
|
-
const checkHorizontalOverflow = useDebounce
|
|
210
|
+
const checkHorizontalOverflow = useDebounce.default(() => {
|
|
187
211
|
var _a, _b;
|
|
188
212
|
if (navigationListRef.current && listsContainerRef.current) {
|
|
189
213
|
const navigationListWidth = navigationListRef.current.scrollWidth;
|
|
@@ -211,14 +235,17 @@ const PriorityNavigation = (_a) => {
|
|
|
211
235
|
}, 100);
|
|
212
236
|
const selectedItem = isMobile &&
|
|
213
237
|
getReactNodeText([...state.navigationItems, ...state.dropdownItems].find(child => React.isValidElement(child) &&
|
|
214
|
-
child.type === PriorityNavigationItem
|
|
238
|
+
child.type === PriorityNavigationItem.default &&
|
|
215
239
|
child.props.isActive));
|
|
216
|
-
useOutsideClick
|
|
240
|
+
useOutsideClick.default(listsContainerRef, () => {
|
|
217
241
|
if (isMobileNavigationOpen) {
|
|
218
242
|
setIsMobileNavigationOpen(false);
|
|
219
243
|
}
|
|
220
|
-
if (
|
|
221
|
-
|
|
244
|
+
if (isDropdownListOpen) {
|
|
245
|
+
if (props.onDropdownListToggle) {
|
|
246
|
+
props.onDropdownListToggle(false);
|
|
247
|
+
}
|
|
248
|
+
setIsDropdownListOpen(false);
|
|
222
249
|
}
|
|
223
250
|
});
|
|
224
251
|
React.useEffect(() => {
|
|
@@ -241,20 +268,24 @@ const PriorityNavigation = (_a) => {
|
|
|
241
268
|
});
|
|
242
269
|
setIsMobileNavigationOpen(false);
|
|
243
270
|
}, [props.children]);
|
|
244
|
-
return (
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
271
|
+
return (React.createElement(Container, { id: props.id, className: props.className, "data-testid": dataTestId },
|
|
272
|
+
!isMobile && props.categoryLabel && React.createElement(Category, null, props.categoryLabel),
|
|
273
|
+
React.createElement("nav", { "aria-label": props.navigationLabel },
|
|
274
|
+
React.createElement(ListsContainer, { ref: listsContainerRef },
|
|
275
|
+
isMobile && selectedItem && (React.createElement(MobileDropdown, { onClick: toggleMobileNavigation, "aria-label": props.categoryLabel && selectedItem, isCategoryLabel: Boolean(props.categoryLabel) },
|
|
276
|
+
React.createElement(MobileDropdownContent, null,
|
|
277
|
+
props.categoryLabel && React.createElement(Category, null, props.categoryLabel),
|
|
278
|
+
selectedItem),
|
|
279
|
+
React.createElement(Icon.default, { icon: isMobileNavigationOpen ? icons.OvalChevronUp : icons.OvalChevronDown, size: "2.5rem" }))),
|
|
280
|
+
React.createElement(NavigationList, { ref: navigationListRef, isMobileNavigationOpen: isMobileNavigationOpen }, React.Children.map([...state.navigationItems, ...(isMobile ? state.dropdownItems : [])], (navigationItem, index) => React.isValidElement(navigationItem) &&
|
|
281
|
+
navigationItem.type === PriorityNavigationItem.default && (React.createElement(PriorityNavigationItem.default, { id: navigationItem.props.id, key: navigationItem.key, onClick: navigationItem.props.onClick || props.onClick, onKeyDown: navigationItem.props.onKeyDown || props.onKeyDown, isActive: navigationItem.props.isActive, className: navigationItem.props.className, "data-testid": navigationItem.props['data-testid'], innerRef: instance => instance && navigationItems.set(index, instance) },
|
|
282
|
+
navigationItem.props.children,
|
|
283
|
+
navigationItem.props.isActive && isMobile && (React.createElement(Icon.default, { icon: icons.Check, color: theme.default.color.default.pink })))))),
|
|
284
|
+
!isMobile && Boolean(state.dropdownItems.length) && (React.createElement(React.Fragment, null,
|
|
285
|
+
React.createElement("div", { ref: dropdownButtonRef },
|
|
286
|
+
React.createElement(ButtonIcon.default, { onClick: toggleDropdown, icon: isDropdownListOpen ? icons.ChevronUp : icons.ChevronDown, isReversed: true }, dropdownButtonLabel)),
|
|
287
|
+
React.createElement(DropdownList, { isDropdownListOpen: isDropdownListOpen }, state.dropdownItems.map(dropdownItem => React.isValidElement(dropdownItem) &&
|
|
288
|
+
dropdownItem.type === PriorityNavigationItem.default && (React.createElement(PriorityNavigationItem.default, { id: dropdownItem.props.id, key: dropdownItem.key, onClick: dropdownItem.props.onClick || props.onClick, onKeyDown: dropdownItem.props.onKeyDown || props.onKeyDown, isActive: dropdownItem.props.isActive, className: dropdownItem.props.className, "data-testid": dropdownItem.props['data-testid'] }, dropdownItem.props.children))))))))));
|
|
258
289
|
};
|
|
259
290
|
|
|
260
|
-
exports
|
|
291
|
+
exports.default = PriorityNavigation;
|
|
@@ -8,11 +8,7 @@ var styled = require('../../themes/styled.js');
|
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
|
-
|
|
15
|
-
const Element = styled["default"].li `
|
|
11
|
+
const Element = styled.default.li `
|
|
16
12
|
display: flex;
|
|
17
13
|
align-items: center;
|
|
18
14
|
justify-content: space-between;
|
|
@@ -27,10 +23,10 @@ const Element = styled["default"].li `
|
|
|
27
23
|
`};
|
|
28
24
|
|
|
29
25
|
&:focus-within {
|
|
30
|
-
& >
|
|
31
|
-
border-radius: ${theme
|
|
32
|
-
border: 2px solid ${theme
|
|
33
|
-
box-shadow: 0px 0px 0px 2px ${theme
|
|
26
|
+
& > *:not(a, span.dnasg-icon) {
|
|
27
|
+
border-radius: ${theme.default.radius.s};
|
|
28
|
+
border: 2px solid ${theme.default.color.focus.light};
|
|
29
|
+
box-shadow: 0px 0px 0px 2px ${theme.default.color.focus.dark};
|
|
34
30
|
outline: none;
|
|
35
31
|
}
|
|
36
32
|
}
|
|
@@ -40,17 +36,26 @@ const Element = styled["default"].li `
|
|
|
40
36
|
padding: 1rem 0;
|
|
41
37
|
margin: auto 1rem;
|
|
42
38
|
border-top: 3px solid transparent;
|
|
43
|
-
border-bottom: 3px solid ${isActive ? theme
|
|
39
|
+
border-bottom: 3px solid ${isActive ? theme.default.color.text.pink : 'transparent'};
|
|
44
40
|
`}
|
|
45
41
|
|
|
42
|
+
& > a {
|
|
43
|
+
&:focus-visible {
|
|
44
|
+
border-radius: ${theme.default.radius.s};
|
|
45
|
+
border: 2px solid ${theme.default.color.focus.light};
|
|
46
|
+
box-shadow: 0px 0px 0px 2px ${theme.default.color.focus.dark};
|
|
47
|
+
outline: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
46
51
|
& > * {
|
|
47
52
|
display: block;
|
|
48
|
-
color: ${({ isActive }) => (isActive ? theme
|
|
49
|
-
${({ isActive }) => isActive && `font-weight: ${theme
|
|
53
|
+
color: ${({ isActive }) => (isActive ? theme.default.color.text.pink : theme.default.color.text.black)};
|
|
54
|
+
${({ isActive }) => isActive && `font-weight: ${theme.default.fontWeight.bold}`};
|
|
50
55
|
border: 2px solid transparent;
|
|
51
56
|
|
|
52
57
|
&:hover {
|
|
53
|
-
color: ${theme
|
|
58
|
+
color: ${theme.default.color.hover.pink};
|
|
54
59
|
text-decoration: none;
|
|
55
60
|
}
|
|
56
61
|
}
|
|
@@ -60,7 +65,7 @@ const Element = styled["default"].li `
|
|
|
60
65
|
*/
|
|
61
66
|
const PriorityNavigationItem = (_a) => {
|
|
62
67
|
var { 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ['data-testid']);
|
|
63
|
-
return (
|
|
68
|
+
return (React.createElement(Element, { id: props.id, ref: props.innerRef, onClick: props.onClick, onKeyDown: props.onKeyDown, isActive: props.isActive, className: props.className, "data-testid": dataTestId }, props.children));
|
|
64
69
|
};
|
|
65
70
|
|
|
66
|
-
exports
|
|
71
|
+
exports.default = PriorityNavigationItem;
|
|
@@ -10,37 +10,33 @@ var theme = require('../../themes/theme.js');
|
|
|
10
10
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
11
11
|
var Icon = require('../Icon/Icon.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
|
const getBackgroundColor = ({ isActive, isError, }) => {
|
|
18
|
-
const defaultColor = theme
|
|
14
|
+
const defaultColor = theme.default.color.background.white.default;
|
|
19
15
|
const currentColor = isError
|
|
20
|
-
? theme
|
|
21
|
-
: theme
|
|
16
|
+
? theme.default.color.notification.error
|
|
17
|
+
: theme.default.color.background.pink.default;
|
|
22
18
|
return `background-color: ${isError || isActive ? currentColor : defaultColor};`;
|
|
23
19
|
};
|
|
24
20
|
const getBorderColor = ({ isActive, isCompleted, isError }) => {
|
|
25
|
-
const defaultColor = theme
|
|
21
|
+
const defaultColor = theme.default.color.line.L02;
|
|
26
22
|
const currentColor = isError
|
|
27
|
-
? theme
|
|
28
|
-
: theme
|
|
23
|
+
? theme.default.color.notification.error
|
|
24
|
+
: theme.default.color.background.pink.default;
|
|
29
25
|
return isActive || isCompleted ? currentColor : defaultColor;
|
|
30
26
|
};
|
|
31
|
-
const ProgressIndicatorWrapper = styled
|
|
27
|
+
const ProgressIndicatorWrapper = styled.default.ul `
|
|
32
28
|
display: flex;
|
|
33
29
|
justify-content: space-between;
|
|
34
30
|
margin: 0;
|
|
35
31
|
padding: 0;
|
|
36
32
|
`;
|
|
37
|
-
const ProgressIndicatorItem = styled
|
|
33
|
+
const ProgressIndicatorItem = styled.default.li `
|
|
38
34
|
position: relative;
|
|
39
35
|
display: inline-flex;
|
|
40
36
|
flex-direction: column;
|
|
41
37
|
align-items: center;
|
|
42
38
|
flex: 1.5 1 0%;
|
|
43
|
-
gap: ${({ small }) => styledUtils.getMultipliedSize(theme
|
|
39
|
+
gap: ${({ small }) => styledUtils.getMultipliedSize(theme.default.base.baseWidth, small ? 0.5 : 1)};
|
|
44
40
|
|
|
45
41
|
&:first-of-type {
|
|
46
42
|
align-items: flex-start;
|
|
@@ -68,37 +64,37 @@ const ProgressIndicatorItem = styled["default"].li `
|
|
|
68
64
|
}
|
|
69
65
|
`}
|
|
70
66
|
`;
|
|
71
|
-
const ProgressIndicatorItemConnector = styled
|
|
67
|
+
const ProgressIndicatorItemConnector = styled.default.div `
|
|
72
68
|
position: absolute;
|
|
73
|
-
top: ${({ small }) => styledUtils.getMultipliedSize(theme
|
|
69
|
+
top: ${({ small }) => styledUtils.getMultipliedSize(theme.default.base.baseHeight, small ? 1.5 : 2)};
|
|
74
70
|
left: -50%;
|
|
75
71
|
right: 50%;
|
|
76
72
|
width: 100%;
|
|
77
73
|
height: ${({ small }) => (small ? '2px' : '4px')};
|
|
78
|
-
background-color: ${({ isActive, isCompleted }) => isActive || isCompleted ? theme
|
|
74
|
+
background-color: ${({ isActive, isCompleted }) => isActive || isCompleted ? theme.default.color.default.pink : theme.default.color.line.L02};
|
|
79
75
|
`;
|
|
80
|
-
const ProgressIndicatorItemNumber = styled
|
|
76
|
+
const ProgressIndicatorItemNumber = styled.default.div `
|
|
81
77
|
display: flex;
|
|
82
78
|
justify-content: center;
|
|
83
79
|
align-items: center;
|
|
84
|
-
font-size: ${({ small }) => (small ? theme
|
|
85
|
-
font-weight: ${theme
|
|
86
|
-
width: ${({ small }) => styledUtils.getMultipliedSize(theme
|
|
87
|
-
height: ${({ small }) => styledUtils.getMultipliedSize(theme
|
|
80
|
+
font-size: ${({ small }) => (small ? theme.default.fontSize.s : theme.default.fontSize.l)};
|
|
81
|
+
font-weight: ${theme.default.fontWeight.bold};
|
|
82
|
+
width: ${({ small }) => styledUtils.getMultipliedSize(theme.default.base.baseWidth, small ? 3 : 4)};
|
|
83
|
+
height: ${({ small }) => styledUtils.getMultipliedSize(theme.default.base.baseHeight, small ? 3 : 4)};
|
|
88
84
|
cursor: ${({ isClickable }) => (isClickable ? 'pointer' : 'default')};
|
|
89
|
-
color: ${({ isActive }) => (isActive ? theme
|
|
90
|
-
border-radius: ${theme
|
|
85
|
+
color: ${({ isActive }) => (isActive ? theme.default.color.text.white : theme.default.color.text.gray)};
|
|
86
|
+
border-radius: ${theme.default.radius.circle};
|
|
91
87
|
border: ${({ small, isActive, isCompleted, isError }) => `${small ? '3px' : '4px'} solid ${getBorderColor({ isActive, isCompleted, isError })}`};
|
|
92
88
|
z-index: 1;
|
|
93
89
|
|
|
94
90
|
${({ isActive, isError }) => getBackgroundColor({ isActive, isError })}
|
|
95
91
|
`;
|
|
96
|
-
const ProgressIndicatorItemLabel = styled
|
|
92
|
+
const ProgressIndicatorItemLabel = styled.default.div `
|
|
97
93
|
display: none;
|
|
98
|
-
font-size: ${({ small }) => (small ? theme
|
|
99
|
-
line-height: ${({ small }) => (small ? theme
|
|
100
|
-
font-weight: ${theme
|
|
101
|
-
color: ${({ isActive }) => (isActive ? theme
|
|
94
|
+
font-size: ${({ small }) => (small ? theme.default.fontSize.xs : theme.default.fontSize.s)};
|
|
95
|
+
line-height: ${({ small }) => (small ? theme.default.lineHeight.xs : theme.default.lineHeight.s)};
|
|
96
|
+
font-weight: ${theme.default.fontWeight.bold};
|
|
97
|
+
color: ${({ isActive }) => (isActive ? theme.default.color.text.black : theme.default.color.text.gray)};
|
|
102
98
|
|
|
103
99
|
${styledUtils.media.sm `
|
|
104
100
|
display: initial;
|
|
@@ -121,12 +117,12 @@ const ProgressIndicator = (_a) => {
|
|
|
121
117
|
props.onStepClick(index, e);
|
|
122
118
|
}
|
|
123
119
|
};
|
|
124
|
-
return (
|
|
125
|
-
index > 0 && (
|
|
126
|
-
|
|
127
|
-
label && (
|
|
120
|
+
return (React.createElement(ProgressIndicatorItem, { key: id, small: props.small, "aria-current": isActive ? 'step' : 'false' },
|
|
121
|
+
index > 0 && (React.createElement(ProgressIndicatorItemConnector, { small: props.small, isActive: isActive, isCompleted: isCompleted })),
|
|
122
|
+
React.createElement(ProgressIndicatorItemNumber, { small: props.small, onClick: handleClick, isActive: isActive, isCompleted: isCompleted, isError: isError, isClickable: isCompleted && Boolean(props.onStepClick) }, isCompleted || isError ? (React.createElement(Icon.default, { icon: isError ? icons.Warning : icons.Check, color: isError ? theme.default.color.text.white : theme.default.color.text.pink, size: "1rem" })) : (stepNumber)),
|
|
123
|
+
label && (React.createElement(ProgressIndicatorItemLabel, { small: props.small, onClick: handleClick, isActive: isActive }, label))));
|
|
128
124
|
});
|
|
129
|
-
return (
|
|
125
|
+
return (React.createElement(ProgressIndicatorWrapper, { className: props.className, "data-testid": dataTestId }, progressIndicatorItems));
|
|
130
126
|
};
|
|
131
127
|
|
|
132
|
-
exports
|
|
128
|
+
exports.default = ProgressIndicator;
|
|
@@ -9,29 +9,25 @@ var styled = require('../../themes/styled.js');
|
|
|
9
9
|
var theme = require('../../themes/theme.js');
|
|
10
10
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
-
|
|
16
|
-
const Container = styled["default"].div `
|
|
12
|
+
const Container = styled.default.div `
|
|
17
13
|
display: flex;
|
|
18
|
-
margin-bottom: ${styledUtils.getMultipliedSize(theme
|
|
14
|
+
margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.5)};
|
|
19
15
|
`;
|
|
20
|
-
const Input = styled
|
|
21
|
-
border-radius: ${theme
|
|
16
|
+
const Input = styled.default(globalStyles.CheckboxAndRadioInputCore) `
|
|
17
|
+
border-radius: ${theme.default.radius.circle};
|
|
22
18
|
|
|
23
19
|
&::before {
|
|
24
|
-
border-radius: ${theme
|
|
25
|
-
width: ${styledUtils.getMultipliedSize(theme
|
|
26
|
-
height: ${styledUtils.getMultipliedSize(theme
|
|
20
|
+
border-radius: ${theme.default.radius.circle};
|
|
21
|
+
width: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
22
|
+
height: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
27
23
|
}
|
|
28
24
|
`;
|
|
29
25
|
/** @visibleName Radio Button */
|
|
30
26
|
const RadioButton = (_a) => {
|
|
31
27
|
var { 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ['data-testid']);
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
props.label && (
|
|
28
|
+
return (React.createElement(Container, { className: props.className, "data-testid": dataTestId },
|
|
29
|
+
React.createElement(Input, { id: props.id, name: props.name, type: "radio", checked: props.checked, "aria-checked": props.checked, value: props.value, disabled: props.disabled, onChange: props.onChange, "data-testid": dataTestId && `${dataTestId}-input` }),
|
|
30
|
+
props.label && (React.createElement("label", { htmlFor: props.id, "data-testid": dataTestId && `${dataTestId}-label` }, props.label))));
|
|
35
31
|
};
|
|
36
32
|
|
|
37
|
-
exports
|
|
33
|
+
exports.default = RadioButton;
|
|
@@ -9,36 +9,32 @@ var styled = require('../../themes/styled.js');
|
|
|
9
9
|
var theme = require('../../themes/theme.js');
|
|
10
10
|
var ButtonIcon = require('../Button/ButtonIcon.js');
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
-
|
|
16
|
-
const Container = styled["default"].div `
|
|
12
|
+
const Container = styled.default.div `
|
|
17
13
|
display: flex;
|
|
18
14
|
flex-direction: column;
|
|
19
15
|
`;
|
|
20
|
-
const Content = styled
|
|
16
|
+
const Content = styled.default.div `
|
|
21
17
|
${({ isExpanded, collapsedSize }) => !isExpanded &&
|
|
22
18
|
`
|
|
23
19
|
overflow: hidden;
|
|
24
20
|
max-height: ${collapsedSize};
|
|
25
|
-
mask-image: linear-gradient(${theme
|
|
21
|
+
mask-image: linear-gradient(${theme.default.color.background.white.default}, transparent);
|
|
26
22
|
`}
|
|
27
23
|
`;
|
|
28
|
-
const ButtonWrapper = styled
|
|
24
|
+
const ButtonWrapper = styled.default.div `
|
|
29
25
|
margin: 0.625rem 0.313rem;
|
|
30
26
|
align-self: ${({ buttonPosition }) => (buttonPosition === 'right' ? 'flex-end' : 'flex-start')};
|
|
31
27
|
`;
|
|
32
|
-
const StyledButtonIcon = styled
|
|
33
|
-
color: ${theme
|
|
28
|
+
const StyledButtonIcon = styled.default(ButtonIcon.default) `
|
|
29
|
+
color: ${theme.default.color.text.pink};
|
|
34
30
|
|
|
35
31
|
&:hover {
|
|
36
|
-
color: ${theme
|
|
32
|
+
color: ${theme.default.color.hover.pink};
|
|
37
33
|
text-decoration: none;
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
&:active {
|
|
41
|
-
color: ${theme
|
|
37
|
+
color: ${theme.default.color.text.pink};
|
|
42
38
|
}
|
|
43
39
|
`;
|
|
44
40
|
/** @visibleName Read More */
|
|
@@ -62,10 +58,10 @@ const ReadMore = (_a) => {
|
|
|
62
58
|
setExpanded(false);
|
|
63
59
|
}
|
|
64
60
|
}, [props.seoInitExpanded]);
|
|
65
|
-
return (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
return (React.createElement(Container, { id: props.id, className: props.className, "data-testid": dataTestId },
|
|
62
|
+
React.createElement(Content, { isExpanded: temporaryStateManagement, collapsedSize: collapsedSize, "data-testid": dataTestId && `${dataTestId}-content` }, props.children),
|
|
63
|
+
React.createElement(ButtonWrapper, { buttonPosition: props.buttonPosition },
|
|
64
|
+
React.createElement(StyledButtonIcon, { icon: temporaryStateManagement ? icons.ChevronUp : icons.ChevronDown, onClick: handleOnClick }, temporaryButtonLabel || props.buttonLabel))));
|
|
69
65
|
};
|
|
70
66
|
|
|
71
|
-
exports
|
|
67
|
+
exports.default = ReadMore;
|
|
@@ -10,28 +10,24 @@ var theme = require('../../themes/theme.js');
|
|
|
10
10
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
11
11
|
var ButtonIcon = require('../Button/ButtonIcon.js');
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
-
|
|
17
|
-
const Container = styled["default"].div `
|
|
13
|
+
const Container = styled.default.div `
|
|
18
14
|
display: flex;
|
|
19
15
|
align-items: center;
|
|
20
|
-
border-bottom: 2px solid ${theme
|
|
16
|
+
border-bottom: 2px solid ${theme.default.color.default.pink};
|
|
21
17
|
`;
|
|
22
|
-
const Input = styled
|
|
18
|
+
const Input = styled.default.input `
|
|
23
19
|
display: inline-block;
|
|
24
20
|
appearance: none;
|
|
25
21
|
border: 0;
|
|
26
22
|
vertical-align: middle;
|
|
27
|
-
font-family: ${theme
|
|
28
|
-
font-size: ${theme
|
|
29
|
-
line-height: ${theme
|
|
30
|
-
color: ${theme
|
|
23
|
+
font-family: ${theme.default.fontFamily.default};
|
|
24
|
+
font-size: ${theme.default.fontSize.default};
|
|
25
|
+
line-height: ${theme.default.lineHeight.default};
|
|
26
|
+
color: ${theme.default.color.text.black};
|
|
31
27
|
background-color: transparent;
|
|
32
|
-
padding: 0 ${styledUtils.getMultipliedSize(theme
|
|
28
|
+
padding: 0 ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
33
29
|
width: 100%;
|
|
34
|
-
height: ${styledUtils.getMultipliedSize(theme
|
|
30
|
+
height: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 4)};
|
|
35
31
|
|
|
36
32
|
&:focus {
|
|
37
33
|
outline: 0;
|
|
@@ -42,7 +38,7 @@ const Input = styled["default"].input `
|
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
&::placeholder {
|
|
45
|
-
color: ${theme
|
|
41
|
+
color: ${theme.default.color.text.black}${theme.default.color.transparency.T40};
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
&::-ms-clear {
|
|
@@ -56,8 +52,8 @@ const Input = styled["default"].input `
|
|
|
56
52
|
display: none;
|
|
57
53
|
}
|
|
58
54
|
`;
|
|
59
|
-
const Button = styled
|
|
60
|
-
margin: 0 ${styledUtils.getMultipliedSize(theme
|
|
55
|
+
const Button = styled.default(ButtonIcon.default) `
|
|
56
|
+
margin: 0 ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
61
57
|
`;
|
|
62
58
|
const Search = (_a) => {
|
|
63
59
|
var _b;
|
|
@@ -71,9 +67,9 @@ const Search = (_a) => {
|
|
|
71
67
|
props.onButtonClick(e);
|
|
72
68
|
}
|
|
73
69
|
};
|
|
74
|
-
return (
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
return (React.createElement(Container, { className: props.className, "data-testid": dataTestId },
|
|
71
|
+
React.createElement(Input, { id: props.id, name: props.name, type: "search", ref: inputRef, value: props.value, onChange: props.onChange, onBlur: props.onBlur, onFocus: props.onFocus, onKeyDown: props.onKeyDown, onKeyPress: props.onKeyPress, placeholder: props.placeholder, autoFocus: props.autoFocus }),
|
|
72
|
+
React.createElement(Button, { icon: ((_b = props.value) === null || _b === void 0 ? void 0 : _b.length) ? icons.Close : icons.Search, name: `${props.name}-button`, onClick: handleButtonClick })));
|
|
77
73
|
};
|
|
78
74
|
|
|
79
|
-
exports
|
|
75
|
+
exports.default = Search;
|