@dnanpm/styleguide 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/build/cjs/components/Accordion/Accordion.d.ts +3 -33
- package/build/cjs/components/Accordion/Accordion.js +14 -10
- package/build/cjs/components/Accordion/AccordionItem.d.ts +32 -2
- package/build/cjs/components/Accordion/AccordionItem.js +25 -19
- package/build/cjs/components/AmountSelector/AmountSelector.js +14 -4
- package/build/cjs/components/Buttons/ButtonBasicStyles.d.ts +2 -1
- package/build/cjs/components/Buttons/ButtonBasicStyles.js +4 -4
- package/build/cjs/components/Buttons/ButtonDefault.d.ts +1 -1
- package/build/cjs/components/Buttons/ButtonDefault.js +3 -2
- package/build/cjs/components/Buttons/ButtonIcon.d.ts +1 -1
- package/build/cjs/components/Buttons/ButtonIcon.js +9 -2
- package/build/cjs/components/Buttons/ButtonIconPrimary.d.ts +1 -1
- package/build/cjs/components/Buttons/ButtonIconPrimary.js +9 -2
- package/build/cjs/components/Buttons/ButtonIconStyles.js +2 -6
- package/build/cjs/components/Buttons/ButtonPrimary.d.ts +1 -1
- package/build/cjs/components/Buttons/ButtonPrimary.js +3 -2
- package/build/cjs/components/Buttons/ButtonRoundStyles.js +6 -5
- package/build/cjs/components/Buttons/ButtonSecondary.d.ts +1 -1
- package/build/cjs/components/Buttons/ButtonSecondary.js +1 -1
- package/build/cjs/components/Buttons/ButtonTertiary.d.ts +1 -1
- package/build/cjs/components/Buttons/ButtonTertiary.js +1 -1
- package/build/cjs/components/Card/Card.d.ts +1 -1
- package/build/cjs/components/Card/Card.js +3 -5
- package/build/cjs/components/Card/CardRow.d.ts +2 -2
- package/build/cjs/components/Card/CardRow.js +3 -3
- package/build/cjs/components/Checkbox/Checkbox.js +12 -8
- package/build/cjs/components/DnaLogo/DnaLogo.d.ts +14 -113
- package/build/cjs/components/DnaLogo/DnaLogo.js +24 -21
- package/build/cjs/components/EmptyState/EmptyState.d.ts +5 -1
- package/build/cjs/components/EmptyState/EmptyState.js +13 -4
- package/build/cjs/components/Footer/Components/FooterComponents.d.ts +1 -1
- package/build/cjs/components/Footer/Components/FooterComponents.js +23 -34
- package/build/cjs/components/Footer/Footer.d.ts +1 -1
- package/build/cjs/components/Footer/Footer.js +4 -6
- package/build/cjs/components/Footer/context/FooterContext.d.ts +1 -1
- package/build/cjs/components/Helper/Helper.d.ts +16 -7
- package/build/cjs/components/Helper/Helper.js +1 -1
- package/build/cjs/components/Icon/Icon.d.ts +46 -124
- package/build/cjs/components/Icon/Icon.js +37 -17
- package/build/cjs/components/Icon/Icons.d.ts +219 -314
- package/build/cjs/components/Icon/Icons.js +1155 -869
- package/build/cjs/components/Icons/Small/hlArrowBackSmall.d.ts +12 -0
- package/build/cjs/components/Icons/Small/hlArrowBackSmall.js +28 -0
- package/build/cjs/components/Icons/Small/hlArrowForwardSmall.d.ts +12 -0
- package/build/cjs/components/Icons/Small/hlArrowForwardSmall.js +28 -0
- package/build/cjs/components/Icons/Small/hlArrowUnderSmall.d.ts +8 -0
- package/build/cjs/components/Icons/Small/hlArrowUnderSmall.js +23 -0
- package/build/cjs/components/Icons/Small/hlCalendarSmall.d.ts +4 -0
- package/build/cjs/components/Icons/Small/hlCalendarSmall.js +18 -0
- package/build/cjs/components/Icons/Small/hlChevronDownSmall.d.ts +4 -0
- package/build/cjs/components/Icons/Small/hlChevronDownSmall.js +18 -0
- package/build/cjs/components/Icons/Small/hlChevronLeftSmall.d.ts +4 -0
- package/build/cjs/components/Icons/Small/hlChevronLeftSmall.js +18 -0
- package/build/cjs/components/Icons/Small/hlChevronRightSmall.d.ts +4 -0
- package/build/cjs/components/Icons/Small/hlChevronRightSmall.js +18 -0
- package/build/cjs/components/Icons/Small/hlChevronUpSmall.d.ts +4 -0
- package/build/cjs/components/Icons/Small/hlChevronUpSmall.js +18 -0
- package/build/cjs/components/Icons/Small/hlClockSmall.d.ts +4 -0
- package/build/cjs/components/Icons/Small/hlClockSmall.js +19 -0
- package/build/cjs/components/Icons/Small/hlDownloadSmall.d.ts +4 -0
- package/build/cjs/components/Icons/Small/hlDownloadSmall.js +20 -0
- package/build/cjs/components/Icons/Small/hlExternalSmall.d.ts +4 -0
- package/build/cjs/components/Icons/Small/hlExternalSmall.js +18 -0
- package/build/cjs/components/Icons/Small/hlUploadSmall.d.ts +4 -0
- package/build/cjs/components/Icons/Small/hlUploadSmall.js +20 -0
- package/build/cjs/components/Icons/Social/facebook.d.ts +4 -0
- package/build/cjs/components/Icons/Social/facebook.js +18 -0
- package/build/cjs/components/Icons/Social/instagram.d.ts +4 -0
- package/build/cjs/components/Icons/Social/instagram.js +18 -0
- package/build/cjs/components/Icons/Social/linkedin.d.ts +4 -0
- package/build/cjs/components/Icons/Social/linkedin.js +18 -0
- package/build/cjs/components/Icons/Social/tiktok.d.ts +4 -0
- package/build/cjs/components/Icons/Social/tiktok.js +18 -0
- package/build/cjs/components/Icons/Social/twitter.d.ts +4 -0
- package/build/cjs/components/Icons/Social/twitter.js +18 -0
- package/build/cjs/components/Icons/Social/youtube.d.ts +4 -0
- package/build/cjs/components/Icons/Social/youtube.js +18 -0
- package/build/cjs/components/Icons/hl404.d.ts +4 -0
- package/build/cjs/components/Icons/hl404.js +18 -0
- package/build/cjs/components/Icons/hl4gSim.d.ts +4 -0
- package/build/cjs/components/Icons/hl4gSim.js +18 -0
- package/build/cjs/components/Icons/hl5gSim.d.ts +4 -0
- package/build/cjs/components/Icons/hl5gSim.js +18 -0
- package/build/cjs/components/Icons/hlBattery.d.ts +4 -0
- package/build/cjs/components/Icons/hlBattery.js +20 -0
- package/build/cjs/components/Icons/hlBell.d.ts +4 -0
- package/build/cjs/components/Icons/hlBell.js +18 -0
- package/build/cjs/components/Icons/hlCalendar.d.ts +4 -0
- package/build/cjs/components/Icons/hlCalendar.js +29 -0
- package/build/cjs/components/Icons/hlCall.d.ts +4 -0
- package/build/cjs/components/Icons/hlCall.js +18 -0
- package/build/cjs/components/Icons/hlCameraBack.d.ts +4 -0
- package/build/cjs/components/Icons/hlCameraBack.js +20 -0
- package/build/cjs/components/Icons/hlCameraFront.d.ts +4 -0
- package/build/cjs/components/Icons/hlCameraFront.js +19 -0
- package/build/cjs/components/Icons/hlCart.d.ts +4 -0
- package/build/cjs/components/Icons/hlCart.js +20 -0
- package/build/cjs/components/Icons/hlCartEmpty.d.ts +4 -0
- package/build/cjs/components/Icons/hlCartEmpty.js +20 -0
- package/build/cjs/components/Icons/hlChat.d.ts +4 -0
- package/build/cjs/components/Icons/hlChat.js +21 -0
- package/build/cjs/components/Icons/hlCheck.d.ts +4 -0
- package/build/cjs/components/Icons/hlCheck.js +18 -0
- package/build/cjs/components/Icons/hlChevronDown.d.ts +4 -0
- package/build/cjs/components/Icons/hlChevronDown.js +18 -0
- package/build/cjs/components/Icons/hlChevronLeft.d.ts +4 -0
- package/build/cjs/components/Icons/hlChevronLeft.js +18 -0
- package/build/cjs/components/Icons/hlChevronRight.d.ts +4 -0
- package/build/cjs/components/Icons/hlChevronRight.js +18 -0
- package/build/cjs/components/Icons/hlChevronUp.d.ts +4 -0
- package/build/cjs/components/Icons/hlChevronUp.js +18 -0
- package/build/cjs/components/Icons/hlCompensation.d.ts +4 -0
- package/build/cjs/components/Icons/hlCompensation.js +18 -0
- package/build/cjs/components/Icons/hlCookie.d.ts +4 -0
- package/build/cjs/components/Icons/hlCookie.js +18 -0
- package/build/cjs/components/Icons/hlCopy.d.ts +4 -0
- package/build/cjs/components/Icons/hlCopy.js +19 -0
- package/build/cjs/components/Icons/hlCoupon.d.ts +4 -0
- package/build/cjs/components/Icons/hlCoupon.js +20 -0
- package/build/cjs/components/Icons/hlDelivery.d.ts +4 -0
- package/build/cjs/components/Icons/hlDelivery.js +18 -0
- package/build/cjs/components/Icons/hlDigiturva.d.ts +4 -0
- package/build/cjs/components/Icons/hlDigiturva.js +18 -0
- package/build/cjs/components/Icons/hlDisplaySize.d.ts +4 -0
- package/build/cjs/components/Icons/hlDisplaySize.js +20 -0
- package/build/cjs/components/Icons/hlDocument.d.ts +4 -0
- package/build/cjs/components/Icons/hlDocument.js +19 -0
- package/build/cjs/components/Icons/hlDownload.d.ts +4 -0
- package/build/cjs/components/Icons/hlDownload.js +20 -0
- package/build/cjs/components/Icons/hlEnvelope.d.ts +4 -0
- package/build/cjs/components/Icons/hlEnvelope.js +18 -0
- package/build/cjs/components/Icons/hlError.d.ts +4 -0
- package/build/cjs/components/Icons/hlError.js +20 -0
- package/build/cjs/components/Icons/hlEuro.d.ts +4 -0
- package/build/cjs/components/Icons/hlEuro.js +18 -0
- package/build/cjs/components/Icons/hlExclamationMark.d.ts +4 -0
- package/build/cjs/components/Icons/hlExclamationMark.js +18 -0
- package/build/cjs/components/Icons/hlExpand.d.ts +4 -0
- package/build/cjs/components/Icons/hlExpand.js +18 -0
- package/build/cjs/components/Icons/hlExternal.d.ts +4 -0
- package/build/cjs/components/Icons/hlExternal.js +18 -0
- package/build/cjs/components/Icons/hlEyeClosed.d.ts +4 -0
- package/build/cjs/components/Icons/hlEyeClosed.js +18 -0
- package/build/cjs/components/Icons/hlEyeOpen.d.ts +4 -0
- package/build/cjs/components/Icons/hlEyeOpen.js +19 -0
- package/build/cjs/components/Icons/hlFaceId.d.ts +4 -0
- package/build/cjs/components/Icons/hlFaceId.js +18 -0
- package/build/cjs/components/Icons/hlFastDelivery.d.ts +4 -0
- package/build/cjs/components/Icons/hlFastDelivery.js +18 -0
- package/build/cjs/components/Icons/hlFingerprint.d.ts +4 -0
- package/build/cjs/components/Icons/hlFingerprint.js +22 -0
- package/build/cjs/components/Icons/hlGlobe.d.ts +4 -0
- package/build/cjs/components/Icons/hlGlobe.js +18 -0
- package/build/cjs/components/Icons/hlHeadphones.d.ts +4 -0
- package/build/cjs/components/Icons/hlHeadphones.js +18 -0
- package/build/cjs/components/Icons/hlHeadset.d.ts +4 -0
- package/build/cjs/components/Icons/hlHeadset.js +20 -0
- package/build/cjs/components/Icons/hlHeart.d.ts +4 -0
- package/build/cjs/components/Icons/hlHeart.js +18 -0
- package/build/cjs/components/Icons/hlHome.d.ts +4 -0
- package/build/cjs/components/Icons/hlHome.js +18 -0
- package/build/cjs/components/Icons/hlImage.d.ts +4 -0
- package/build/cjs/components/Icons/hlImage.js +18 -0
- package/build/cjs/components/Icons/hlInfo.d.ts +4 -0
- package/build/cjs/components/Icons/hlInfo.js +20 -0
- package/build/cjs/components/Icons/hlInstallment.d.ts +4 -0
- package/build/cjs/components/Icons/hlInstallment.js +19 -0
- package/build/cjs/components/Icons/hlIotSim.d.ts +4 -0
- package/build/cjs/components/Icons/hlIotSim.js +19 -0
- package/build/cjs/components/Icons/hlLock.d.ts +4 -0
- package/build/cjs/components/Icons/hlLock.js +20 -0
- package/build/cjs/components/Icons/hlMagnifyingGlass.d.ts +4 -0
- package/build/cjs/components/Icons/hlMagnifyingGlass.js +19 -0
- package/build/cjs/components/Icons/hlMarker.d.ts +4 -0
- package/build/cjs/components/Icons/hlMarker.js +19 -0
- package/build/cjs/components/Icons/hlMemory.d.ts +4 -0
- package/build/cjs/components/Icons/hlMemory.js +19 -0
- package/build/cjs/components/Icons/hlMenu.d.ts +4 -0
- package/build/cjs/components/Icons/hlMenu.js +18 -0
- package/build/cjs/components/Icons/hlMinimize.d.ts +4 -0
- package/build/cjs/components/Icons/hlMinimize.js +18 -0
- package/build/cjs/components/Icons/hlMinus.d.ts +4 -0
- package/build/cjs/components/Icons/hlMinus.js +18 -0
- package/build/cjs/components/Icons/hlMobileData.d.ts +4 -0
- package/build/cjs/components/Icons/hlMobileData.js +18 -0
- package/build/cjs/components/Icons/hlMobilePayment.d.ts +4 -0
- package/build/cjs/components/Icons/hlMobilePayment.js +20 -0
- package/build/cjs/components/Icons/hlModem.d.ts +4 -0
- package/build/cjs/components/Icons/hlModem.js +22 -0
- package/build/cjs/components/Icons/hlMore.d.ts +4 -0
- package/build/cjs/components/Icons/hlMore.js +20 -0
- package/build/cjs/components/Icons/hlOs.d.ts +4 -0
- package/build/cjs/components/Icons/hlOs.js +19 -0
- package/build/cjs/components/Icons/hlPackage.d.ts +4 -0
- package/build/cjs/components/Icons/hlPackage.js +18 -0
- package/build/cjs/components/Icons/hlPaperclip.d.ts +4 -0
- package/build/cjs/components/Icons/hlPaperclip.js +18 -0
- package/build/cjs/components/Icons/hlPaytime.d.ts +4 -0
- package/build/cjs/components/Icons/hlPaytime.js +18 -0
- package/build/cjs/components/Icons/hlPen.d.ts +4 -0
- package/build/cjs/components/Icons/hlPen.js +18 -0
- package/build/cjs/components/Icons/hlPerson.d.ts +4 -0
- package/build/cjs/components/Icons/hlPerson.js +18 -0
- package/build/cjs/components/Icons/hlPhone.d.ts +4 -0
- package/build/cjs/components/Icons/hlPhone.js +19 -0
- package/build/cjs/components/Icons/hlPlus.d.ts +4 -0
- package/build/cjs/components/Icons/hlPlus.js +19 -0
- package/build/cjs/components/Icons/hlPrepaid.d.ts +4 -0
- package/build/cjs/components/Icons/hlPrepaid.js +18 -0
- package/build/cjs/components/Icons/hlProcessor.d.ts +4 -0
- package/build/cjs/components/Icons/hlProcessor.js +19 -0
- package/build/cjs/components/Icons/hlServices.d.ts +4 -0
- package/build/cjs/components/Icons/hlServices.js +18 -0
- package/build/cjs/components/Icons/hlSettings.d.ts +4 -0
- package/build/cjs/components/Icons/hlSettings.js +18 -0
- package/build/cjs/components/Icons/hlShield.d.ts +4 -0
- package/build/cjs/components/Icons/hlShield.js +19 -0
- package/build/cjs/components/Icons/hlSim.d.ts +4 -0
- package/build/cjs/components/Icons/hlSim.js +19 -0
- package/build/cjs/components/Icons/hlSimSimple.d.ts +4 -0
- package/build/cjs/components/Icons/hlSimSimple.js +20 -0
- package/build/cjs/components/Icons/hlSmile.d.ts +4 -0
- package/build/cjs/components/Icons/hlSmile.js +21 -0
- package/build/cjs/components/Icons/hlSpeechBubble.d.ts +4 -0
- package/build/cjs/components/Icons/hlSpeechBubble.js +19 -0
- package/build/cjs/components/Icons/hlSquaretrade.d.ts +4 -0
- package/build/cjs/components/Icons/hlSquaretrade.js +18 -0
- package/build/cjs/components/Icons/hlStar.d.ts +4 -0
- package/build/cjs/components/Icons/hlStar.js +18 -0
- package/build/cjs/components/Icons/hlStarFilled.d.ts +4 -0
- package/build/cjs/components/Icons/hlStarFilled.js +18 -0
- package/build/cjs/components/Icons/hlTrash.d.ts +4 -0
- package/build/cjs/components/Icons/hlTrash.js +19 -0
- package/build/cjs/components/Icons/hlTv.d.ts +4 -0
- package/build/cjs/components/Icons/hlTv.js +18 -0
- package/build/cjs/components/Icons/hlUnlock.d.ts +4 -0
- package/build/cjs/components/Icons/hlUnlock.js +20 -0
- package/build/cjs/components/Icons/hlUpload.d.ts +4 -0
- package/build/cjs/components/Icons/hlUpload.js +20 -0
- package/build/cjs/components/Icons/hlWarning.d.ts +4 -0
- package/build/cjs/components/Icons/hlWarning.js +20 -0
- package/build/cjs/components/Icons/hlWifi.d.ts +4 -0
- package/build/cjs/components/Icons/hlWifi.js +20 -0
- package/build/cjs/components/Icons/hlX.d.ts +4 -0
- package/build/cjs/components/Icons/hlX.js +18 -0
- package/build/cjs/components/Icons/index.d.ts +102 -0
- package/build/cjs/components/Icons/index.js +216 -0
- package/build/cjs/components/Image/Image.d.ts +4 -0
- package/build/cjs/components/Image/Image.js +1 -1
- package/build/cjs/components/Input/Input.d.ts +7 -7
- package/build/cjs/components/Input/Input.js +13 -10
- package/build/cjs/components/Label/Label.d.ts +5 -1
- package/build/cjs/components/Label/Label.js +4 -2
- package/build/cjs/components/LabelText/LabelText.d.ts +1 -1
- package/build/cjs/components/LabelText/LabelText.js +0 -1
- package/build/cjs/components/MainNavigation/ChildComponents/BusinessMenu.js +2 -4
- package/build/cjs/components/MainNavigation/ChildComponents/DesktopMenu.js +23 -10
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +16 -14
- package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.js +3 -3
- package/build/cjs/components/MainNavigation/ChildComponents/LinkModifier.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/LinkModifier.js +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/LoginTooltip.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/LoginTooltip.js +3 -1
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +1 -4
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +16 -16
- package/build/cjs/components/MainNavigation/ChildComponents/MinicartTooltip.js +4 -2
- package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.js +8 -6
- package/build/cjs/components/MainNavigation/ChildComponents/PageSearch.js +5 -3
- package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.js +10 -15
- package/build/cjs/components/MainNavigation/MainNavigation.d.ts +2 -2
- package/build/cjs/components/MainNavigation/MainNavigation.js +11 -36
- package/build/cjs/components/MainNavigation/globalNavStyles.js +1 -1
- package/build/cjs/components/Modal/Modal.js +19 -5
- package/build/cjs/components/Notification/Notification.d.ts +1 -1
- package/build/cjs/components/Notification/Notification.js +14 -4
- package/build/cjs/components/PixelLoader/PixelLoader.d.ts +17 -2
- package/build/cjs/components/PixelLoader/PixelLoader.js +33 -7
- package/build/cjs/components/ProgressIndicator/ProgressIndicator.js +28 -23
- package/build/cjs/components/RadioButton/RadioButton.d.ts +2 -2
- package/build/cjs/components/RadioButton/RadioButton.js +7 -4
- package/build/cjs/components/ReadMore/ReadMore.js +7 -6
- package/build/cjs/components/Ribbon/Ribbon.d.ts +1 -1
- package/build/cjs/components/Ribbon/Ribbon.js +11 -9
- package/build/cjs/components/Search/Search.d.ts +23 -4
- package/build/cjs/components/Search/Search.js +26 -6
- package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +26 -26
- package/build/cjs/components/Selectbox/Selectbox.d.ts +17 -15
- package/build/cjs/components/Selectbox/Selectbox.js +50 -67
- package/build/cjs/components/Switch/Switch.d.ts +35 -15
- package/build/cjs/components/Switch/Switch.js +34 -29
- package/build/cjs/components/Tabs/Tab.d.ts +3 -3
- package/build/cjs/components/Tabs/Tabs.d.ts +18 -17
- package/build/cjs/components/Tabs/Tabs.js +8 -17
- package/build/cjs/components/Textarea/Textarea.js +6 -4
- package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +2 -2
- package/build/cjs/components/TooltipMenu/TooltipMenu.d.ts +13 -4
- package/build/cjs/components/TooltipMenu/TooltipMenu.js +11 -5
- package/build/cjs/components/index.d.ts +2 -0
- package/build/cjs/hooks/useCloseOutsideOrElementClicked.d.ts +2 -1
- package/build/cjs/hooks/useCloseOutsideOrElementClicked.js +1 -0
- package/build/cjs/hooks/useDocHeight.js +1 -1
- package/build/cjs/hooks/useOutsideClick.d.ts +4 -3
- package/build/cjs/hooks/useOutsideClick.js +3 -2
- package/build/cjs/hooks/useScrollPosition.d.ts +2 -2
- package/build/cjs/hooks/useScrollPosition.js +4 -6
- package/build/cjs/index.js +430 -2
- package/build/cjs/themes/globalStyles.d.ts +1 -1
- package/build/cjs/themes/globalStyles.js +4 -4
- package/build/cjs/themes/styled.js +1 -1
- package/build/cjs/themes/themeComponents/fontSize.js +1 -5
- package/build/cjs/themes/themeComponents/lineHeight.js +1 -5
- package/build/cjs/utils/createStyled.d.ts +1 -1
- package/build/es/components/Accordion/Accordion.d.ts +3 -33
- package/build/es/components/Accordion/Accordion.js +14 -10
- package/build/es/components/Accordion/AccordionItem.d.ts +32 -2
- package/build/es/components/Accordion/AccordionItem.js +25 -19
- package/build/es/components/AmountSelector/AmountSelector.js +14 -4
- package/build/es/components/Buttons/ButtonBasicStyles.d.ts +2 -1
- package/build/es/components/Buttons/ButtonBasicStyles.js +4 -4
- package/build/es/components/Buttons/ButtonDefault.d.ts +1 -1
- package/build/es/components/Buttons/ButtonDefault.js +3 -2
- package/build/es/components/Buttons/ButtonIcon.d.ts +1 -1
- package/build/es/components/Buttons/ButtonIcon.js +9 -2
- package/build/es/components/Buttons/ButtonIconPrimary.d.ts +1 -1
- package/build/es/components/Buttons/ButtonIconPrimary.js +9 -2
- package/build/es/components/Buttons/ButtonIconStyles.js +2 -6
- package/build/es/components/Buttons/ButtonPrimary.d.ts +1 -1
- package/build/es/components/Buttons/ButtonPrimary.js +3 -2
- package/build/es/components/Buttons/ButtonRoundStyles.js +6 -5
- package/build/es/components/Buttons/ButtonSecondary.d.ts +1 -1
- package/build/es/components/Buttons/ButtonSecondary.js +1 -1
- package/build/es/components/Buttons/ButtonTertiary.d.ts +1 -1
- package/build/es/components/Buttons/ButtonTertiary.js +1 -1
- package/build/es/components/Card/Card.d.ts +1 -1
- package/build/es/components/Card/Card.js +3 -5
- package/build/es/components/Card/CardRow.d.ts +2 -2
- package/build/es/components/Card/CardRow.js +3 -3
- package/build/es/components/Checkbox/Checkbox.js +13 -9
- package/build/es/components/DnaLogo/DnaLogo.d.ts +14 -113
- package/build/es/components/DnaLogo/DnaLogo.js +24 -21
- package/build/es/components/EmptyState/EmptyState.d.ts +5 -1
- package/build/es/components/EmptyState/EmptyState.js +13 -4
- package/build/es/components/Footer/Components/FooterComponents.d.ts +1 -1
- package/build/es/components/Footer/Components/FooterComponents.js +23 -34
- package/build/es/components/Footer/Footer.d.ts +1 -1
- package/build/es/components/Footer/Footer.js +4 -6
- package/build/es/components/Footer/context/FooterContext.d.ts +1 -1
- package/build/es/components/Helper/Helper.d.ts +16 -7
- package/build/es/components/Helper/Helper.js +1 -1
- package/build/es/components/Icon/Icon.d.ts +46 -124
- package/build/es/components/Icon/Icon.js +36 -16
- package/build/es/components/Icon/Icons.d.ts +219 -314
- package/build/es/components/Icon/Icons.js +1156 -775
- package/build/es/components/Icons/Small/hlArrowBackSmall.d.ts +12 -0
- package/build/es/components/Icons/Small/hlArrowBackSmall.js +19 -0
- package/build/es/components/Icons/Small/hlArrowForwardSmall.d.ts +12 -0
- package/build/es/components/Icons/Small/hlArrowForwardSmall.js +19 -0
- package/build/es/components/Icons/Small/hlArrowUnderSmall.d.ts +8 -0
- package/build/es/components/Icons/Small/hlArrowUnderSmall.js +15 -0
- package/build/es/components/Icons/Small/hlCalendarSmall.d.ts +4 -0
- package/build/es/components/Icons/Small/hlCalendarSmall.js +10 -0
- package/build/es/components/Icons/Small/hlChevronDownSmall.d.ts +4 -0
- package/build/es/components/Icons/Small/hlChevronDownSmall.js +10 -0
- package/build/es/components/Icons/Small/hlChevronLeftSmall.d.ts +4 -0
- package/build/es/components/Icons/Small/hlChevronLeftSmall.js +10 -0
- package/build/es/components/Icons/Small/hlChevronRightSmall.d.ts +4 -0
- package/build/es/components/Icons/Small/hlChevronRightSmall.js +10 -0
- package/build/es/components/Icons/Small/hlChevronUpSmall.d.ts +4 -0
- package/build/es/components/Icons/Small/hlChevronUpSmall.js +10 -0
- package/build/es/components/Icons/Small/hlClockSmall.d.ts +4 -0
- package/build/es/components/Icons/Small/hlClockSmall.js +11 -0
- package/build/es/components/Icons/Small/hlDownloadSmall.d.ts +4 -0
- package/build/es/components/Icons/Small/hlDownloadSmall.js +12 -0
- package/build/es/components/Icons/Small/hlExternalSmall.d.ts +4 -0
- package/build/es/components/Icons/Small/hlExternalSmall.js +10 -0
- package/build/es/components/Icons/Small/hlUploadSmall.d.ts +4 -0
- package/build/es/components/Icons/Small/hlUploadSmall.js +12 -0
- package/build/es/components/Icons/Social/facebook.d.ts +4 -0
- package/build/es/components/Icons/Social/facebook.js +10 -0
- package/build/es/components/Icons/Social/instagram.d.ts +4 -0
- package/build/es/components/Icons/Social/instagram.js +10 -0
- package/build/es/components/Icons/Social/linkedin.d.ts +4 -0
- package/build/es/components/Icons/Social/linkedin.js +10 -0
- package/build/es/components/Icons/Social/tiktok.d.ts +4 -0
- package/build/es/components/Icons/Social/tiktok.js +10 -0
- package/build/es/components/Icons/Social/twitter.d.ts +4 -0
- package/build/es/components/Icons/Social/twitter.js +10 -0
- package/build/es/components/Icons/Social/youtube.d.ts +4 -0
- package/build/es/components/Icons/Social/youtube.js +10 -0
- package/build/es/components/Icons/hl404.d.ts +4 -0
- package/build/es/components/Icons/hl404.js +10 -0
- package/build/es/components/Icons/hl4gSim.d.ts +4 -0
- package/build/es/components/Icons/hl4gSim.js +10 -0
- package/build/es/components/Icons/hl5gSim.d.ts +4 -0
- package/build/es/components/Icons/hl5gSim.js +10 -0
- package/build/es/components/Icons/hlBattery.d.ts +4 -0
- package/build/es/components/Icons/hlBattery.js +12 -0
- package/build/es/components/Icons/hlBell.d.ts +4 -0
- package/build/es/components/Icons/hlBell.js +10 -0
- package/build/es/components/Icons/hlCalendar.d.ts +4 -0
- package/build/es/components/Icons/hlCalendar.js +21 -0
- package/build/es/components/Icons/hlCall.d.ts +4 -0
- package/build/es/components/Icons/hlCall.js +10 -0
- package/build/es/components/Icons/hlCameraBack.d.ts +4 -0
- package/build/es/components/Icons/hlCameraBack.js +12 -0
- package/build/es/components/Icons/hlCameraFront.d.ts +4 -0
- package/build/es/components/Icons/hlCameraFront.js +11 -0
- package/build/es/components/Icons/hlCart.d.ts +4 -0
- package/build/es/components/Icons/hlCart.js +12 -0
- package/build/es/components/Icons/hlCartEmpty.d.ts +4 -0
- package/build/es/components/Icons/hlCartEmpty.js +12 -0
- package/build/es/components/Icons/hlChat.d.ts +4 -0
- package/build/es/components/Icons/hlChat.js +13 -0
- package/build/es/components/Icons/hlCheck.d.ts +4 -0
- package/build/es/components/Icons/hlCheck.js +10 -0
- package/build/es/components/Icons/hlChevronDown.d.ts +4 -0
- package/build/es/components/Icons/hlChevronDown.js +10 -0
- package/build/es/components/Icons/hlChevronLeft.d.ts +4 -0
- package/build/es/components/Icons/hlChevronLeft.js +10 -0
- package/build/es/components/Icons/hlChevronRight.d.ts +4 -0
- package/build/es/components/Icons/hlChevronRight.js +10 -0
- package/build/es/components/Icons/hlChevronUp.d.ts +4 -0
- package/build/es/components/Icons/hlChevronUp.js +10 -0
- package/build/es/components/Icons/hlCompensation.d.ts +4 -0
- package/build/es/components/Icons/hlCompensation.js +10 -0
- package/build/es/components/Icons/hlCookie.d.ts +4 -0
- package/build/es/components/Icons/hlCookie.js +10 -0
- package/build/es/components/Icons/hlCopy.d.ts +4 -0
- package/build/es/components/Icons/hlCopy.js +11 -0
- package/build/es/components/Icons/hlCoupon.d.ts +4 -0
- package/build/es/components/Icons/hlCoupon.js +12 -0
- package/build/es/components/Icons/hlDelivery.d.ts +4 -0
- package/build/es/components/Icons/hlDelivery.js +10 -0
- package/build/es/components/Icons/hlDigiturva.d.ts +4 -0
- package/build/es/components/Icons/hlDigiturva.js +10 -0
- package/build/es/components/Icons/hlDisplaySize.d.ts +4 -0
- package/build/es/components/Icons/hlDisplaySize.js +12 -0
- package/build/es/components/Icons/hlDocument.d.ts +4 -0
- package/build/es/components/Icons/hlDocument.js +11 -0
- package/build/es/components/Icons/hlDownload.d.ts +4 -0
- package/build/es/components/Icons/hlDownload.js +12 -0
- package/build/es/components/Icons/hlEnvelope.d.ts +4 -0
- package/build/es/components/Icons/hlEnvelope.js +10 -0
- package/build/es/components/Icons/hlError.d.ts +4 -0
- package/build/es/components/Icons/hlError.js +12 -0
- package/build/es/components/Icons/hlEuro.d.ts +4 -0
- package/build/es/components/Icons/hlEuro.js +10 -0
- package/build/es/components/Icons/hlExclamationMark.d.ts +4 -0
- package/build/es/components/Icons/hlExclamationMark.js +10 -0
- package/build/es/components/Icons/hlExpand.d.ts +4 -0
- package/build/es/components/Icons/hlExpand.js +10 -0
- package/build/es/components/Icons/hlExternal.d.ts +4 -0
- package/build/es/components/Icons/hlExternal.js +10 -0
- package/build/es/components/Icons/hlEyeClosed.d.ts +4 -0
- package/build/es/components/Icons/hlEyeClosed.js +10 -0
- package/build/es/components/Icons/hlEyeOpen.d.ts +4 -0
- package/build/es/components/Icons/hlEyeOpen.js +11 -0
- package/build/es/components/Icons/hlFaceId.d.ts +4 -0
- package/build/es/components/Icons/hlFaceId.js +10 -0
- package/build/es/components/Icons/hlFastDelivery.d.ts +4 -0
- package/build/es/components/Icons/hlFastDelivery.js +10 -0
- package/build/es/components/Icons/hlFingerprint.d.ts +4 -0
- package/build/es/components/Icons/hlFingerprint.js +14 -0
- package/build/es/components/Icons/hlGlobe.d.ts +4 -0
- package/build/es/components/Icons/hlGlobe.js +10 -0
- package/build/es/components/Icons/hlHeadphones.d.ts +4 -0
- package/build/es/components/Icons/hlHeadphones.js +10 -0
- package/build/es/components/Icons/hlHeadset.d.ts +4 -0
- package/build/es/components/Icons/hlHeadset.js +12 -0
- package/build/es/components/Icons/hlHeart.d.ts +4 -0
- package/build/es/components/Icons/hlHeart.js +10 -0
- package/build/es/components/Icons/hlHome.d.ts +4 -0
- package/build/es/components/Icons/hlHome.js +10 -0
- package/build/es/components/Icons/hlImage.d.ts +4 -0
- package/build/es/components/Icons/hlImage.js +10 -0
- package/build/es/components/Icons/hlInfo.d.ts +4 -0
- package/build/es/components/Icons/hlInfo.js +12 -0
- package/build/es/components/Icons/hlInstallment.d.ts +4 -0
- package/build/es/components/Icons/hlInstallment.js +11 -0
- package/build/es/components/Icons/hlIotSim.d.ts +4 -0
- package/build/es/components/Icons/hlIotSim.js +11 -0
- package/build/es/components/Icons/hlLock.d.ts +4 -0
- package/build/es/components/Icons/hlLock.js +12 -0
- package/build/es/components/Icons/hlMagnifyingGlass.d.ts +4 -0
- package/build/es/components/Icons/hlMagnifyingGlass.js +11 -0
- package/build/es/components/Icons/hlMarker.d.ts +4 -0
- package/build/es/components/Icons/hlMarker.js +11 -0
- package/build/es/components/Icons/hlMemory.d.ts +4 -0
- package/build/es/components/Icons/hlMemory.js +11 -0
- package/build/es/components/Icons/hlMenu.d.ts +4 -0
- package/build/es/components/Icons/hlMenu.js +10 -0
- package/build/es/components/Icons/hlMinimize.d.ts +4 -0
- package/build/es/components/Icons/hlMinimize.js +10 -0
- package/build/es/components/Icons/hlMinus.d.ts +4 -0
- package/build/es/components/Icons/hlMinus.js +10 -0
- package/build/es/components/Icons/hlMobileData.d.ts +4 -0
- package/build/es/components/Icons/hlMobileData.js +10 -0
- package/build/es/components/Icons/hlMobilePayment.d.ts +4 -0
- package/build/es/components/Icons/hlMobilePayment.js +12 -0
- package/build/es/components/Icons/hlModem.d.ts +4 -0
- package/build/es/components/Icons/hlModem.js +14 -0
- package/build/es/components/Icons/hlMore.d.ts +4 -0
- package/build/es/components/Icons/hlMore.js +12 -0
- package/build/es/components/Icons/hlOs.d.ts +4 -0
- package/build/es/components/Icons/hlOs.js +11 -0
- package/build/es/components/Icons/hlPackage.d.ts +4 -0
- package/build/es/components/Icons/hlPackage.js +10 -0
- package/build/es/components/Icons/hlPaperclip.d.ts +4 -0
- package/build/es/components/Icons/hlPaperclip.js +10 -0
- package/build/es/components/Icons/hlPaytime.d.ts +4 -0
- package/build/es/components/Icons/hlPaytime.js +10 -0
- package/build/es/components/Icons/hlPen.d.ts +4 -0
- package/build/es/components/Icons/hlPen.js +10 -0
- package/build/es/components/Icons/hlPerson.d.ts +4 -0
- package/build/es/components/Icons/hlPerson.js +10 -0
- package/build/es/components/Icons/hlPhone.d.ts +4 -0
- package/build/es/components/Icons/hlPhone.js +11 -0
- package/build/es/components/Icons/hlPlus.d.ts +4 -0
- package/build/es/components/Icons/hlPlus.js +11 -0
- package/build/es/components/Icons/hlPrepaid.d.ts +4 -0
- package/build/es/components/Icons/hlPrepaid.js +10 -0
- package/build/es/components/Icons/hlProcessor.d.ts +4 -0
- package/build/es/components/Icons/hlProcessor.js +11 -0
- package/build/es/components/Icons/hlServices.d.ts +4 -0
- package/build/es/components/Icons/hlServices.js +10 -0
- package/build/es/components/Icons/hlSettings.d.ts +4 -0
- package/build/es/components/Icons/hlSettings.js +10 -0
- package/build/es/components/Icons/hlShield.d.ts +4 -0
- package/build/es/components/Icons/hlShield.js +11 -0
- package/build/es/components/Icons/hlSim.d.ts +4 -0
- package/build/es/components/Icons/hlSim.js +11 -0
- package/build/es/components/Icons/hlSimSimple.d.ts +4 -0
- package/build/es/components/Icons/hlSimSimple.js +12 -0
- package/build/es/components/Icons/hlSmile.d.ts +4 -0
- package/build/es/components/Icons/hlSmile.js +13 -0
- package/build/es/components/Icons/hlSpeechBubble.d.ts +4 -0
- package/build/es/components/Icons/hlSpeechBubble.js +11 -0
- package/build/es/components/Icons/hlSquaretrade.d.ts +4 -0
- package/build/es/components/Icons/hlSquaretrade.js +10 -0
- package/build/es/components/Icons/hlStar.d.ts +4 -0
- package/build/es/components/Icons/hlStar.js +10 -0
- package/build/es/components/Icons/hlStarFilled.d.ts +4 -0
- package/build/es/components/Icons/hlStarFilled.js +10 -0
- package/build/es/components/Icons/hlTrash.d.ts +4 -0
- package/build/es/components/Icons/hlTrash.js +11 -0
- package/build/es/components/Icons/hlTv.d.ts +4 -0
- package/build/es/components/Icons/hlTv.js +10 -0
- package/build/es/components/Icons/hlUnlock.d.ts +4 -0
- package/build/es/components/Icons/hlUnlock.js +12 -0
- package/build/es/components/Icons/hlUpload.d.ts +4 -0
- package/build/es/components/Icons/hlUpload.js +12 -0
- package/build/es/components/Icons/hlWarning.d.ts +4 -0
- package/build/es/components/Icons/hlWarning.js +12 -0
- package/build/es/components/Icons/hlWifi.d.ts +4 -0
- package/build/es/components/Icons/hlWifi.js +12 -0
- package/build/es/components/Icons/hlX.d.ts +4 -0
- package/build/es/components/Icons/hlX.js +10 -0
- package/build/es/components/Icons/index.d.ts +102 -0
- package/build/es/components/Icons/index.js +102 -0
- package/build/es/components/Image/Image.d.ts +4 -0
- package/build/es/components/Image/Image.js +1 -1
- package/build/es/components/Input/Input.d.ts +7 -7
- package/build/es/components/Input/Input.js +13 -10
- package/build/es/components/Label/Label.d.ts +5 -1
- package/build/es/components/Label/Label.js +4 -2
- package/build/es/components/LabelText/LabelText.d.ts +1 -1
- package/build/es/components/LabelText/LabelText.js +0 -1
- package/build/es/components/MainNavigation/ChildComponents/BusinessMenu.js +2 -4
- package/build/es/components/MainNavigation/ChildComponents/DesktopMenu.js +24 -11
- package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +16 -14
- package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.d.ts +1 -1
- package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.js +3 -3
- package/build/es/components/MainNavigation/ChildComponents/LinkModifier.d.ts +1 -1
- package/build/es/components/MainNavigation/ChildComponents/LinkModifier.js +1 -1
- package/build/es/components/MainNavigation/ChildComponents/LoginTooltip.d.ts +1 -1
- package/build/es/components/MainNavigation/ChildComponents/LoginTooltip.js +3 -1
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +1 -4
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +16 -16
- package/build/es/components/MainNavigation/ChildComponents/MinicartTooltip.js +4 -2
- package/build/es/components/MainNavigation/ChildComponents/MobileMenu.js +9 -7
- package/build/es/components/MainNavigation/ChildComponents/PageSearch.js +5 -3
- package/build/es/components/MainNavigation/ChildComponents/Ribbon.d.ts +1 -1
- package/build/es/components/MainNavigation/ChildComponents/Ribbon.js +10 -15
- package/build/es/components/MainNavigation/MainNavigation.d.ts +2 -2
- package/build/es/components/MainNavigation/MainNavigation.js +11 -36
- package/build/es/components/MainNavigation/globalNavStyles.js +1 -1
- package/build/es/components/Modal/Modal.js +19 -5
- package/build/es/components/Notification/Notification.d.ts +1 -1
- package/build/es/components/Notification/Notification.js +14 -4
- package/build/es/components/PixelLoader/PixelLoader.d.ts +17 -2
- package/build/es/components/PixelLoader/PixelLoader.js +28 -2
- package/build/es/components/ProgressIndicator/ProgressIndicator.js +27 -22
- package/build/es/components/RadioButton/RadioButton.d.ts +2 -2
- package/build/es/components/RadioButton/RadioButton.js +8 -5
- package/build/es/components/ReadMore/ReadMore.js +7 -6
- package/build/es/components/Ribbon/Ribbon.d.ts +1 -1
- package/build/es/components/Ribbon/Ribbon.js +11 -9
- package/build/es/components/Search/Search.d.ts +23 -4
- package/build/es/components/Search/Search.js +26 -6
- package/build/es/components/SecondaryNavigation/SecondaryNavigation.js +26 -26
- package/build/es/components/Selectbox/Selectbox.d.ts +17 -15
- package/build/es/components/Selectbox/Selectbox.js +50 -67
- package/build/es/components/Switch/Switch.d.ts +35 -15
- package/build/es/components/Switch/Switch.js +34 -29
- package/build/es/components/Tabs/Tab.d.ts +3 -3
- package/build/es/components/Tabs/Tabs.d.ts +18 -17
- package/build/es/components/Tabs/Tabs.js +9 -18
- package/build/es/components/Textarea/Textarea.js +6 -4
- package/build/es/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +2 -2
- package/build/es/components/TooltipMenu/TooltipMenu.d.ts +13 -4
- package/build/es/components/TooltipMenu/TooltipMenu.js +11 -5
- package/build/es/components/index.d.ts +2 -0
- package/build/es/hooks/useCloseOutsideOrElementClicked.d.ts +2 -1
- package/build/es/hooks/useCloseOutsideOrElementClicked.js +1 -0
- package/build/es/hooks/useDocHeight.js +1 -1
- package/build/es/hooks/useOutsideClick.d.ts +4 -3
- package/build/es/hooks/useOutsideClick.js +3 -2
- package/build/es/hooks/useScrollPosition.d.ts +2 -2
- package/build/es/hooks/useScrollPosition.js +4 -6
- package/build/es/index.js +105 -2
- package/build/es/themes/globalStyles.d.ts +1 -1
- package/build/es/themes/globalStyles.js +4 -4
- package/build/es/themes/styled.js +1 -1
- package/build/es/themes/themeComponents/fontSize.js +1 -5
- package/build/es/themes/themeComponents/lineHeight.js +1 -5
- package/build/es/utils/createStyled.d.ts +1 -1
- package/package.json +20 -14
- package/build/cjs/components/PixelLoader/PixelLoaderStyles.d.ts +0 -203
- package/build/cjs/components/PixelLoader/PixelLoaderStyles.js +0 -35
- package/build/es/components/PixelLoader/PixelLoaderStyles.d.ts +0 -203
- package/build/es/components/PixelLoader/PixelLoaderStyles.js +0 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import styled from '../../themes/styled.js';
|
|
3
3
|
import Tab from './Tab.js';
|
|
4
4
|
|
|
@@ -13,17 +13,13 @@ const TabContent = styled.div `
|
|
|
13
13
|
`;
|
|
14
14
|
/** @visibleName Tabs */
|
|
15
15
|
const Tabs = ({ children, className, tabStyle = 'gray', onChange, defaultTab }) => {
|
|
16
|
+
const [activeTab, setActiveTab] = React.useState(defaultTab);
|
|
16
17
|
const tabs = React.Children.map(children, child => {
|
|
17
18
|
if (React.isValidElement(child) && child.type === Tab) {
|
|
18
19
|
return child;
|
|
19
20
|
}
|
|
21
|
+
return null;
|
|
20
22
|
});
|
|
21
|
-
const activeTabState = defaultTab || tabs[0].props.label;
|
|
22
|
-
const [activeTab, setActiveTab] = React.useState(activeTabState);
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
// Update active tab if tab labels have been updated
|
|
25
|
-
setActiveTab(activeTabState);
|
|
26
|
-
}, [activeTabState]);
|
|
27
23
|
const onClickTabItem = (tab) => {
|
|
28
24
|
setActiveTab(tab);
|
|
29
25
|
if (tab !== activeTab && onChange) {
|
|
@@ -31,18 +27,13 @@ const Tabs = ({ children, className, tabStyle = 'gray', onChange, defaultTab })
|
|
|
31
27
|
}
|
|
32
28
|
};
|
|
33
29
|
if (!tabs) {
|
|
34
|
-
return
|
|
30
|
+
return null;
|
|
35
31
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const renderTabContent = () => {
|
|
42
|
-
return tabs.map(child => {
|
|
43
|
-
return child.props.label !== activeTab ? undefined : child.props.children;
|
|
44
|
-
});
|
|
45
|
-
};
|
|
32
|
+
if (!activeTab) {
|
|
33
|
+
setActiveTab(tabs[0].props.label);
|
|
34
|
+
}
|
|
35
|
+
const renderTab = () => tabs.map(child => (React.createElement(Tab, { activeTab: activeTab, key: child.props.label, label: child.props.label, tabStyle: tabStyle, onClick: onClickTabItem })));
|
|
36
|
+
const renderTabContent = () => tabs.map(child => (child.props.label !== activeTab ? undefined : child.props.children));
|
|
46
37
|
return (React.createElement("div", { className: className ? `tabs ${className}` : 'tabs' },
|
|
47
38
|
React.createElement(Tablist, { role: "tablist", tabStyle: tabStyle }, renderTab()),
|
|
48
39
|
React.createElement(TabContent, { role: "tabpanel" }, renderTabContent())));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import styled from '../../themes/styled.js';
|
|
3
4
|
import { getMultipliedSize } from '../../utils/styledUtils.js';
|
|
4
|
-
import
|
|
5
|
+
import LabelText from '../LabelText/LabelText.js';
|
|
5
6
|
|
|
6
7
|
const Tag = styled.textarea `
|
|
7
8
|
display: block;
|
|
@@ -44,7 +45,8 @@ const CommentMessage = styled.div `
|
|
|
44
45
|
color: ${props => props.theme.color.gray40};
|
|
45
46
|
margin-top: ${props => getMultipliedSize(props.theme.base.baseHeight, 0.5)};
|
|
46
47
|
`;
|
|
47
|
-
const Textarea = (
|
|
48
|
+
const Textarea = (_a) => {
|
|
49
|
+
var { id, label, name, required, disabled, onBlur, onFocus, onChange, onKeyPress, onKeyDown, value, placeholder, commentMessage, height = 3, 'data-testid': dataTestId } = _a, props = __rest(_a, ["id", "label", "name", "required", "disabled", "onBlur", "onFocus", "onChange", "onKeyPress", "onKeyDown", "value", "placeholder", "commentMessage", "height", 'data-testid']);
|
|
48
50
|
const inputId = id || name;
|
|
49
51
|
const inputRef = React.useRef(null);
|
|
50
52
|
const handleOnBlur = React.useCallback((e) => {
|
|
@@ -63,13 +65,13 @@ const Textarea = ({ id, label, name, required, disabled, onBlur, onFocus, onChan
|
|
|
63
65
|
inputRef.current.focus();
|
|
64
66
|
}
|
|
65
67
|
}, []);
|
|
66
|
-
const renderField = () => (React.createElement(Tag, Object.assign({ name: name, id: inputId, value: value, rows: height, placeholder: placeholder, onChange: handleChange, onBlur: handleOnBlur, onFocus: onFocus, onClick: onClick, onKeyDown: onKeyDown, onKeyPress: onKeyPress, required: required, disabled: disabled, "aria-disabled": disabled, "aria-label": inputId, ref: inputRef, "data-testid": dataTestId }, props)));
|
|
67
68
|
return (React.createElement(FieldContainer, { disabled: disabled },
|
|
68
69
|
label && (React.createElement(LabelText, { htmlFor: id, "data-testid": dataTestId && `${dataTestId}-label` },
|
|
69
70
|
label,
|
|
70
71
|
" ",
|
|
71
72
|
required && React.createElement(Mandatory, null, "*"))),
|
|
72
|
-
React.createElement(FieldWrapper, null,
|
|
73
|
+
React.createElement(FieldWrapper, null,
|
|
74
|
+
React.createElement(Tag, { id: inputId, name: name, ref: inputRef, value: value, rows: height, placeholder: placeholder, tabIndex: props.tabIndex, onChange: handleChange, onBlur: handleOnBlur, onFocus: onFocus, onClick: onClick, onKeyDown: onKeyDown, onKeyPress: onKeyPress, required: required, disabled: disabled, "aria-disabled": disabled, "aria-label": inputId, "data-testid": dataTestId })),
|
|
73
75
|
commentMessage && (React.createElement(CommentMessage, { "data-testid": dataTestId && `${dataTestId}-comment` }, commentMessage))));
|
|
74
76
|
};
|
|
75
77
|
|
|
@@ -8,7 +8,7 @@ const Tail = styled.div `
|
|
|
8
8
|
right: ${p => p.arrowPosition};
|
|
9
9
|
margin-top: -17.5px;
|
|
10
10
|
top: ${p => p.tooltipTop};
|
|
11
|
-
z-index: ${p => p.zIndex + 1};
|
|
11
|
+
z-index: ${p => Number(p.zIndex) + 1};
|
|
12
12
|
border: 10px solid transparent;
|
|
13
13
|
border-right-color: white;
|
|
14
14
|
transform: rotate(90deg);
|
|
@@ -21,7 +21,7 @@ const TailShadow = styled.div `
|
|
|
21
21
|
margin-top: -5px;
|
|
22
22
|
margin-right: 8.5px;
|
|
23
23
|
top: ${p => p.tooltipTop};
|
|
24
|
-
z-index: ${p => p.zIndex + 1};
|
|
24
|
+
z-index: ${p => Number(p.zIndex) + 1};
|
|
25
25
|
right: ${p => p.arrowPosition};
|
|
26
26
|
background-color: transparent;
|
|
27
27
|
box-shadow: 0 0 5px 0 ${p => p.theme.color.black};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Props as IconProps } from '../Icon/Icon';
|
|
2
3
|
export interface TooltipMenuProps {
|
|
3
4
|
/** Text selector */
|
|
4
5
|
selector: string;
|
|
@@ -10,7 +11,7 @@ export interface TooltipMenuProps {
|
|
|
10
11
|
color?: string;
|
|
11
12
|
/** Text selector active color. Default: #121212 */
|
|
12
13
|
activeColor?: string;
|
|
13
|
-
/** Size of chevron icon. Default:
|
|
14
|
+
/** Size of chevron icon. Default: 1.5rem */
|
|
14
15
|
iconSize?: string;
|
|
15
16
|
/** Overlap other elements */
|
|
16
17
|
zIndex?: string;
|
|
@@ -18,9 +19,17 @@ export interface TooltipMenuProps {
|
|
|
18
19
|
tooltipTop?: string;
|
|
19
20
|
/** Tooltip position from right. Default: 1.25rem */
|
|
20
21
|
tooltipRight?: string;
|
|
21
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Tooltip icon for selector. Default: ''
|
|
24
|
+
*
|
|
25
|
+
* @deprecated Use property `tooltipIcon`
|
|
26
|
+
*/
|
|
22
27
|
tooltipIconName?: string;
|
|
23
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Tooltip icon for selector
|
|
30
|
+
*/
|
|
31
|
+
tooltipIcon?: IconProps['icon'];
|
|
32
|
+
/** Tooltip icon size for selector. Default: '1.5rem' */
|
|
24
33
|
tooltipIconSize?: string;
|
|
25
34
|
/** Show hide animated chevron. Default: '' */
|
|
26
35
|
tooltipChevron?: boolean;
|
|
@@ -28,5 +37,5 @@ export interface TooltipMenuProps {
|
|
|
28
37
|
arrowPosition?: string;
|
|
29
38
|
}
|
|
30
39
|
/** @visibleName Tooltip Menu */
|
|
31
|
-
declare const TooltipMenu: ({ selector, className, color, children, iconSize, zIndex, tooltipTop, tooltipRight, activeColor, tooltipIconName, tooltipIconSize, tooltipChevron, arrowPosition, }: TooltipMenuProps) => JSX.Element;
|
|
40
|
+
declare const TooltipMenu: ({ selector, className, color, children, iconSize, zIndex, tooltipTop, tooltipRight, activeColor, tooltipIconName, tooltipIcon, tooltipIconSize, tooltipChevron, arrowPosition, }: TooltipMenuProps) => JSX.Element;
|
|
32
41
|
export default TooltipMenu;
|
|
@@ -3,13 +3,18 @@ import useOutsideClick from '../../hooks/useOutsideClick.js';
|
|
|
3
3
|
import styled from '../../themes/styled.js';
|
|
4
4
|
import colors from '../../themes/themeComponents/colors.js';
|
|
5
5
|
import Icon from '../Icon/Icon.js';
|
|
6
|
+
import 'tslib';
|
|
7
|
+
import hlChevronDown from '../Icons/hlChevronDown.js';
|
|
6
8
|
import { TailShadow, Tail } from './ChildComponents/TooltipMenuExportedStyles.js';
|
|
7
9
|
|
|
8
10
|
const Selector = styled.div `
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: flex-end;
|
|
9
14
|
color: ${p => p.color || p.theme.color.white};
|
|
10
|
-
text-align: right;
|
|
11
15
|
cursor: pointer;
|
|
12
|
-
|
|
16
|
+
|
|
17
|
+
span + span.dnasg-icon > svg {
|
|
13
18
|
transform: ${p => (p.showDropdown ? 'rotate(180deg)' : 'rotate(0deg)')};
|
|
14
19
|
transition: transform 0.15s linear;
|
|
15
20
|
}
|
|
@@ -34,7 +39,7 @@ const ChildrenWrapper = styled.span `
|
|
|
34
39
|
}
|
|
35
40
|
`;
|
|
36
41
|
/** @visibleName Tooltip Menu */
|
|
37
|
-
const TooltipMenu = ({ selector, className, color = colors.text, children, iconSize = '
|
|
42
|
+
const TooltipMenu = ({ selector, className, color = colors.text, children, iconSize = '1.5rem', zIndex = '1', tooltipTop = '2rem', tooltipRight = '-1.25rem', activeColor = color, tooltipIconName, tooltipIcon, tooltipIconSize = '1.5rem', tooltipChevron = true, arrowPosition = '-0.25rem', }) => {
|
|
38
43
|
const [showDropdown, setShowDropdown] = useState(false);
|
|
39
44
|
const ref = useRef(null);
|
|
40
45
|
const toggleState = () => {
|
|
@@ -47,9 +52,10 @@ const TooltipMenu = ({ selector, className, color = colors.text, children, iconS
|
|
|
47
52
|
});
|
|
48
53
|
return (React.createElement(Container, { className: className, ref: ref },
|
|
49
54
|
React.createElement(Selector, { color: showDropdown ? activeColor : color, onClick: toggleState, showDropdown: showDropdown },
|
|
50
|
-
|
|
55
|
+
tooltipIcon && React.createElement(Icon, { icon: tooltipIcon, size: tooltipIconSize, position: "left" }),
|
|
56
|
+
tooltipIconName && (React.createElement(Icon, { name: tooltipIconName, size: tooltipIconSize, position: "left" })),
|
|
51
57
|
React.createElement("span", null, selector),
|
|
52
|
-
tooltipChevron && React.createElement(Icon, {
|
|
58
|
+
tooltipChevron && React.createElement(Icon, { icon: hlChevronDown, size: iconSize, position: "right" })),
|
|
53
59
|
showDropdown && (React.createElement(React.Fragment, null,
|
|
54
60
|
React.createElement(TailShadow, { zIndex: zIndex, tooltipTop: tooltipTop, arrowPosition: arrowPosition }),
|
|
55
61
|
React.createElement(Tail, { zIndex: zIndex, tooltipTop: tooltipTop, arrowPosition: arrowPosition }))),
|
|
@@ -9,6 +9,8 @@ export { default as EmptyState } from './EmptyState/EmptyState';
|
|
|
9
9
|
export { default as Footer } from './Footer/Footer';
|
|
10
10
|
export { default as Helper } from './Helper/Helper';
|
|
11
11
|
export { default as Icon } from './Icon/Icon';
|
|
12
|
+
export * from './Icon/Icons';
|
|
13
|
+
export * from './Icons';
|
|
12
14
|
export { default as Image } from './Image/Image';
|
|
13
15
|
export { default as Input } from './Input/Input';
|
|
14
16
|
export { default as Label } from './Label/Label';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Hook to handle the click outside the referenced element
|
|
4
|
+
*
|
|
4
5
|
* @param ref - reference to the targeted element
|
|
5
6
|
* @param closeWhenTagClicked - provided array of tag names in lowercase which will also close dropdown. Works if tag or first parent is clicked.
|
|
6
7
|
* @param callback - callback
|
|
@@ -2,6 +2,7 @@ import { useEffect } from 'react';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Hook to handle the click outside the referenced element
|
|
5
|
+
*
|
|
5
6
|
* @param ref - reference to the targeted element
|
|
6
7
|
* @param closeWhenTagClicked - provided array of tag names in lowercase which will also close dropdown. Works if tag or first parent is clicked.
|
|
7
8
|
* @param callback - callback
|
|
@@ -4,7 +4,7 @@ import { useDebounceFunc } from './useDebounceFunc.js';
|
|
|
4
4
|
const DEBOUNCE_DELAY = 100;
|
|
5
5
|
const useDocHeight = () => {
|
|
6
6
|
const setDocHeight = useCallback(() => {
|
|
7
|
-
document.documentElement.style.setProperty('--vh100', window.innerHeight
|
|
7
|
+
document.documentElement.style.setProperty('--vh100', `${window.innerHeight}px`);
|
|
8
8
|
}, []);
|
|
9
9
|
const debounceSetDocHeight = useDebounceFunc(setDocHeight, DEBOUNCE_DELAY);
|
|
10
10
|
useEffect(() => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Hook to handle the click outside the referenced element
|
|
4
|
-
*
|
|
5
|
-
* @param
|
|
4
|
+
*
|
|
5
|
+
* @param {RefObject<Element>} ref - reference to the targeted element
|
|
6
|
+
* @param {Function} callback - callback
|
|
6
7
|
*/
|
|
7
8
|
declare const useOutsideClick: (ref: RefObject<Element>, callback: () => void) => void;
|
|
8
9
|
export default useOutsideClick;
|
|
@@ -2,8 +2,9 @@ import { useEffect } from 'react';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Hook to handle the click outside the referenced element
|
|
5
|
-
*
|
|
6
|
-
* @param
|
|
5
|
+
*
|
|
6
|
+
* @param {RefObject<Element>} ref - reference to the targeted element
|
|
7
|
+
* @param {Function} callback - callback
|
|
7
8
|
*/
|
|
8
9
|
const useOutsideClick = (ref, callback) => {
|
|
9
10
|
const handleClick = (e) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { DependencyList, MutableRefObject } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Hook to follow scroll position without rerendering the view.
|
|
4
4
|
* Modified to ES6 and work with SSR (fixed window undefined error) and Rocket architecture from https://www.npmjs.com/package/@n8tb1t/use-scroll-position
|
|
@@ -12,7 +12,7 @@ interface ScrollPositionProps {
|
|
|
12
12
|
currPos: ScrollPosition;
|
|
13
13
|
}
|
|
14
14
|
declare const useScrollPosition: {
|
|
15
|
-
(effect: ({ prevPos, currPos }: ScrollPositionProps) => void, deps:
|
|
15
|
+
(effect: ({ prevPos, currPos }: ScrollPositionProps) => void, deps: DependencyList, element: MutableRefObject<Element> | undefined, useWindow: boolean, wait: number): void;
|
|
16
16
|
defaultProps: {
|
|
17
17
|
deps: never[];
|
|
18
18
|
element: boolean;
|
|
@@ -3,8 +3,8 @@ import React from 'react';
|
|
|
3
3
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
4
4
|
const isBrowser = typeof window !== 'undefined';
|
|
5
5
|
const getScrollPosition = (ref) => {
|
|
6
|
-
const element = ref
|
|
7
|
-
const useWindow = ref
|
|
6
|
+
const { element } = ref;
|
|
7
|
+
const { useWindow } = ref;
|
|
8
8
|
if (!isBrowser) {
|
|
9
9
|
return {
|
|
10
10
|
x: 0,
|
|
@@ -42,7 +42,7 @@ const useScrollPosition = (effect, deps, element, useWindow, wait) => {
|
|
|
42
42
|
};
|
|
43
43
|
React.useEffect(() => {
|
|
44
44
|
if (!isBrowser) {
|
|
45
|
-
return;
|
|
45
|
+
return undefined;
|
|
46
46
|
}
|
|
47
47
|
const handleScroll = () => {
|
|
48
48
|
if (wait) {
|
|
@@ -55,9 +55,7 @@ const useScrollPosition = (effect, deps, element, useWindow, wait) => {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
window.addEventListener('scroll', handleScroll);
|
|
58
|
-
return () =>
|
|
59
|
-
return window.removeEventListener('scroll', handleScroll);
|
|
60
|
-
};
|
|
58
|
+
return () => window.removeEventListener('scroll', handleScroll);
|
|
61
59
|
}, deps);
|
|
62
60
|
};
|
|
63
61
|
useScrollPosition.defaultProps = {
|
package/build/es/index.js
CHANGED
|
@@ -17,15 +17,118 @@ export { default as EmptyState } from './components/EmptyState/EmptyState.js';
|
|
|
17
17
|
export { default as Footer } from './components/Footer/Footer.js';
|
|
18
18
|
export { default as Helper } from './components/Helper/Helper.js';
|
|
19
19
|
export { default as Icon } from './components/Icon/Icon.js';
|
|
20
|
+
export { action, airplane, anime, antenna, apartmentBuilding1, apartmentBuilding2, apartmentBuilding3, arrows, backward, balloon, basket, book, briefcase, broadbandHome, broadbandHousing, broadbandMobile, browser, bus, cableTv, calculator, calendar1, calendar2, camera, channelPackageL, channelPackageM, channelPackageMix, channelPackageMix4, channelPackageMix8, channelPackageMixPlus, channelPackageNorra, channelPackageRossija, channelPackageS, channelPackageTurk, check, chevronDown, chevronLeft, chevronRight, chevronUp, clapperboard, clipboard, cloud1, cloud2, cogwheel, comedy, cultFilms, culture, curvedArrowLeft, curvedArrowRight, cycle, desktopComputer, devices, diamond, digibox, digiboxRec, dnaTurvapaketti, dnaTv, document1, document2, document3, documentaries, documents1, documents2, door, download, drama, dvbC, dvbT2, dwr, envelope1, envelope2, epg, error, ethernet, eu, euro, exclamationMark, eyeClosed, eyeOpen, favorites, finland, finnish, folder1, folder2, folder3, forward, fourG, gameConsole, gift, gift2, globe, google, graduation, graph, hardDrive, hd, hdmiCable, headset1, headset2, hobbies, hotdog, house, hub, idCard, info, iot1, iot2, iot3, ip, key, kids, laptop, leaf, magnifyingGlass, man1, man2, man3, man4, man5, marker, maximize, megaphone, minimize, minus, modem, molecule, money1, money2, mouse, mp3, music, newspaper, next, paperclip, pause, pdf, pen, person, person2, persons1, persons2, persons3, pg18, phone1, phone2, phonePrepaid, phonePrepaid4g, phoneWifiPrepaid, play, plus, power, previous, projector, radioMast, rec, rec2, remoteControl, romantic, router, rss, scale, shield, simCard1, simCard2, simCard4g, simCard4gWifi, simCardInfinity, simCardInfinity4g, simCardWifi, soda, speaker, speechBubble1, speechBubble2, speechBubble3, sports, star, stop, swedish, tablet, target, terrestialTv, thriller, thumbDown, thumbUp, tickets, top10, top50, trademark, trafficCone, trafficLights, train, tv1, tv2, tvCard, tvWithRecording, tvWithRemote1, tvWithRemote2, tvWithRemote3, tvWithRemote4, upgrade, upload, usb, usbCable, usbModem, van, videocamera, wall, warning, whatsapp, wifi1, wifi2, wifiAccessPoint, woman1, woman2, woman3, world, wrench1, wrench2, x } from './components/Icon/Icons.js';
|
|
21
|
+
export { default as hl404 } from './components/Icons/hl404.js';
|
|
22
|
+
export { default as hl4gSim } from './components/Icons/hl4gSim.js';
|
|
23
|
+
export { default as hl5gSim } from './components/Icons/hl5gSim.js';
|
|
24
|
+
export { default as hlBattery } from './components/Icons/hlBattery.js';
|
|
25
|
+
export { default as hlBell } from './components/Icons/hlBell.js';
|
|
26
|
+
export { default as hlCalendar } from './components/Icons/hlCalendar.js';
|
|
27
|
+
export { default as hlCall } from './components/Icons/hlCall.js';
|
|
28
|
+
export { default as hlCameraBack } from './components/Icons/hlCameraBack.js';
|
|
29
|
+
export { default as hlCameraFront } from './components/Icons/hlCameraFront.js';
|
|
30
|
+
export { default as hlCart } from './components/Icons/hlCart.js';
|
|
31
|
+
export { default as hlCartEmpty } from './components/Icons/hlCartEmpty.js';
|
|
32
|
+
export { default as hlChat } from './components/Icons/hlChat.js';
|
|
33
|
+
export { default as hlCheck } from './components/Icons/hlCheck.js';
|
|
34
|
+
export { default as hlChevronDown } from './components/Icons/hlChevronDown.js';
|
|
35
|
+
export { default as hlChevronLeft } from './components/Icons/hlChevronLeft.js';
|
|
36
|
+
export { default as hlChevronRight } from './components/Icons/hlChevronRight.js';
|
|
37
|
+
export { default as hlChevronUp } from './components/Icons/hlChevronUp.js';
|
|
38
|
+
export { default as hlCompensation } from './components/Icons/hlCompensation.js';
|
|
39
|
+
export { default as hlCookie } from './components/Icons/hlCookie.js';
|
|
40
|
+
export { default as hlCopy } from './components/Icons/hlCopy.js';
|
|
41
|
+
export { default as hlCoupon } from './components/Icons/hlCoupon.js';
|
|
42
|
+
export { default as hlDelivery } from './components/Icons/hlDelivery.js';
|
|
43
|
+
export { default as hlDigiturva } from './components/Icons/hlDigiturva.js';
|
|
44
|
+
export { default as hlDisplaySize } from './components/Icons/hlDisplaySize.js';
|
|
45
|
+
export { default as hlDocument } from './components/Icons/hlDocument.js';
|
|
46
|
+
export { default as hlDownload } from './components/Icons/hlDownload.js';
|
|
47
|
+
export { default as hlEnvelope } from './components/Icons/hlEnvelope.js';
|
|
48
|
+
export { default as hlError } from './components/Icons/hlError.js';
|
|
49
|
+
export { default as hlEuro } from './components/Icons/hlEuro.js';
|
|
50
|
+
export { default as hlExclamationMark } from './components/Icons/hlExclamationMark.js';
|
|
51
|
+
export { default as hlExpand } from './components/Icons/hlExpand.js';
|
|
52
|
+
export { default as hlExternal } from './components/Icons/hlExternal.js';
|
|
53
|
+
export { default as hlEyeClosed } from './components/Icons/hlEyeClosed.js';
|
|
54
|
+
export { default as hlEyeOpen } from './components/Icons/hlEyeOpen.js';
|
|
55
|
+
export { default as hlFaceId } from './components/Icons/hlFaceId.js';
|
|
56
|
+
export { default as hlFastDelivery } from './components/Icons/hlFastDelivery.js';
|
|
57
|
+
export { default as hlFingerprint } from './components/Icons/hlFingerprint.js';
|
|
58
|
+
export { default as hlGlobe } from './components/Icons/hlGlobe.js';
|
|
59
|
+
export { default as hlHeadphones } from './components/Icons/hlHeadphones.js';
|
|
60
|
+
export { default as hlHeadset } from './components/Icons/hlHeadset.js';
|
|
61
|
+
export { default as hlHeart } from './components/Icons/hlHeart.js';
|
|
62
|
+
export { default as hlHome } from './components/Icons/hlHome.js';
|
|
63
|
+
export { default as hlImage } from './components/Icons/hlImage.js';
|
|
64
|
+
export { default as hlInfo } from './components/Icons/hlInfo.js';
|
|
65
|
+
export { default as hlInstallment } from './components/Icons/hlInstallment.js';
|
|
66
|
+
export { default as hlIotSim } from './components/Icons/hlIotSim.js';
|
|
67
|
+
export { default as hlLock } from './components/Icons/hlLock.js';
|
|
68
|
+
export { default as hlMagnifyingGlass } from './components/Icons/hlMagnifyingGlass.js';
|
|
69
|
+
export { default as hlMarker } from './components/Icons/hlMarker.js';
|
|
70
|
+
export { default as hlMemory } from './components/Icons/hlMemory.js';
|
|
71
|
+
export { default as hlMenu } from './components/Icons/hlMenu.js';
|
|
72
|
+
export { default as hlMinimize } from './components/Icons/hlMinimize.js';
|
|
73
|
+
export { default as hlMinus } from './components/Icons/hlMinus.js';
|
|
74
|
+
export { default as hlMobileData } from './components/Icons/hlMobileData.js';
|
|
75
|
+
export { default as hlMobilePayment } from './components/Icons/hlMobilePayment.js';
|
|
76
|
+
export { default as hlModem } from './components/Icons/hlModem.js';
|
|
77
|
+
export { default as hlMore } from './components/Icons/hlMore.js';
|
|
78
|
+
export { default as hlOs } from './components/Icons/hlOs.js';
|
|
79
|
+
export { default as hlPackage } from './components/Icons/hlPackage.js';
|
|
80
|
+
export { default as hlPaperclip } from './components/Icons/hlPaperclip.js';
|
|
81
|
+
export { default as hlPaytime } from './components/Icons/hlPaytime.js';
|
|
82
|
+
export { default as hlPen } from './components/Icons/hlPen.js';
|
|
83
|
+
export { default as hlPerson } from './components/Icons/hlPerson.js';
|
|
84
|
+
export { default as hlPhone } from './components/Icons/hlPhone.js';
|
|
85
|
+
export { default as hlPlus } from './components/Icons/hlPlus.js';
|
|
86
|
+
export { default as hlPrepaid } from './components/Icons/hlPrepaid.js';
|
|
87
|
+
export { default as hlProcessor } from './components/Icons/hlProcessor.js';
|
|
88
|
+
export { default as hlServices } from './components/Icons/hlServices.js';
|
|
89
|
+
export { default as hlSettings } from './components/Icons/hlSettings.js';
|
|
90
|
+
export { default as hlShield } from './components/Icons/hlShield.js';
|
|
91
|
+
export { default as hlSim } from './components/Icons/hlSim.js';
|
|
92
|
+
export { default as hlSimSimple } from './components/Icons/hlSimSimple.js';
|
|
93
|
+
export { default as hlSmile } from './components/Icons/hlSmile.js';
|
|
94
|
+
export { default as hlSpeechBubble } from './components/Icons/hlSpeechBubble.js';
|
|
95
|
+
export { default as hlSquaretrade } from './components/Icons/hlSquaretrade.js';
|
|
96
|
+
export { default as hlStar } from './components/Icons/hlStar.js';
|
|
97
|
+
export { default as hlStarFilled } from './components/Icons/hlStarFilled.js';
|
|
98
|
+
export { default as hlTrash } from './components/Icons/hlTrash.js';
|
|
99
|
+
export { default as hlTv } from './components/Icons/hlTv.js';
|
|
100
|
+
export { default as hlUnlock } from './components/Icons/hlUnlock.js';
|
|
101
|
+
export { default as hlUpload } from './components/Icons/hlUpload.js';
|
|
102
|
+
export { default as hlWarning } from './components/Icons/hlWarning.js';
|
|
103
|
+
export { default as hlWifi } from './components/Icons/hlWifi.js';
|
|
104
|
+
export { default as hlX } from './components/Icons/hlX.js';
|
|
105
|
+
export { hlArrowBack, default as hlArrowBackSmall, hlArrowSmallLeft } from './components/Icons/Small/hlArrowBackSmall.js';
|
|
106
|
+
export { hlArrowForward, default as hlArrowForwardSmall, hlArrowSmallRight } from './components/Icons/Small/hlArrowForwardSmall.js';
|
|
107
|
+
export { hlArrowSmallUnder, default as hlArrowUnderSmall } from './components/Icons/Small/hlArrowUnderSmall.js';
|
|
108
|
+
export { default as hlCalendarSmall } from './components/Icons/Small/hlCalendarSmall.js';
|
|
109
|
+
export { default as hlChevronDownSmall } from './components/Icons/Small/hlChevronDownSmall.js';
|
|
110
|
+
export { default as hlChevronLeftSmall } from './components/Icons/Small/hlChevronLeftSmall.js';
|
|
111
|
+
export { default as hlChevronRightSmall } from './components/Icons/Small/hlChevronRightSmall.js';
|
|
112
|
+
export { default as hlChevronUpSmall } from './components/Icons/Small/hlChevronUpSmall.js';
|
|
113
|
+
export { default as hlClockSmall } from './components/Icons/Small/hlClockSmall.js';
|
|
114
|
+
export { default as hlDownloadSmall } from './components/Icons/Small/hlDownloadSmall.js';
|
|
115
|
+
export { default as hlExternalSmall } from './components/Icons/Small/hlExternalSmall.js';
|
|
116
|
+
export { default as hlUploadSmall } from './components/Icons/Small/hlUploadSmall.js';
|
|
117
|
+
export { default as facebook } from './components/Icons/Social/facebook.js';
|
|
118
|
+
export { default as instagram } from './components/Icons/Social/instagram.js';
|
|
119
|
+
export { default as linkedin } from './components/Icons/Social/linkedin.js';
|
|
120
|
+
export { default as tiktok } from './components/Icons/Social/tiktok.js';
|
|
121
|
+
export { default as twitter } from './components/Icons/Social/twitter.js';
|
|
122
|
+
export { default as youtube } from './components/Icons/Social/youtube.js';
|
|
20
123
|
export { default as Image } from './components/Image/Image.js';
|
|
21
124
|
export { default as Input } from './components/Input/Input.js';
|
|
22
125
|
export { default as Label } from './components/Label/Label.js';
|
|
23
|
-
export { LabelText } from './components/LabelText/LabelText.js';
|
|
126
|
+
export { default as LabelText } from './components/LabelText/LabelText.js';
|
|
24
127
|
export { default as MainNavigation } from './components/MainNavigation/MainNavigation.js';
|
|
25
128
|
export { default as Modal } from './components/Modal/Modal.js';
|
|
26
129
|
export { default as Notification } from './components/Notification/Notification.js';
|
|
27
130
|
export { NotificationBadge } from './components/NotificationBadge/NotificationBadge.js';
|
|
28
|
-
export { PixelLoader } from './components/PixelLoader/PixelLoader.js';
|
|
131
|
+
export { default as PixelLoader } from './components/PixelLoader/PixelLoader.js';
|
|
29
132
|
export { default as ProgressIndicator } from './components/ProgressIndicator/ProgressIndicator.js';
|
|
30
133
|
export { default as RadioButton } from './components/RadioButton/RadioButton.js';
|
|
31
134
|
export { default as ReadMore } from './components/ReadMore/ReadMore.js';
|
|
@@ -99,7 +99,7 @@ export declare const globalStyles: import("styled-components").FlattenInterpolat
|
|
|
99
99
|
};
|
|
100
100
|
media: Record<string | number, (l: TemplateStringsArray, ...p: any[]) => string>;
|
|
101
101
|
}>>;
|
|
102
|
-
export declare const
|
|
102
|
+
export declare const CheckboxAndRadioInputCore: import("styled-components").StyledComponent<"input", {
|
|
103
103
|
base: {
|
|
104
104
|
baseHeight: {
|
|
105
105
|
value: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import styled, { css, createGlobalStyle } from './styled.js';
|
|
2
1
|
import { media, getMultipliedSize, getDividedSize } from '../utils/styledUtils.js';
|
|
2
|
+
import styled, { css, createGlobalStyle } from './styled.js';
|
|
3
3
|
|
|
4
4
|
const globalStyles = css `
|
|
5
5
|
*,
|
|
@@ -175,7 +175,7 @@ const globalStyles = css `
|
|
|
175
175
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
|
|
176
176
|
}
|
|
177
177
|
`;
|
|
178
|
-
const
|
|
178
|
+
const CheckboxAndRadioInputCore = styled.input `
|
|
179
179
|
display: inline-grid;
|
|
180
180
|
appearance: none;
|
|
181
181
|
place-content: center;
|
|
@@ -185,6 +185,7 @@ const CheckboxInput_RadioInput = styled.input `
|
|
|
185
185
|
font-family: ${props => props.theme.fontFamily.default};
|
|
186
186
|
font-size: ${props => props.theme.fontSize.default};
|
|
187
187
|
line-height: ${props => props.theme.lineHeight.default};
|
|
188
|
+
min-width: ${props => getMultipliedSize(props.theme.base.baseWidth, 2)};
|
|
188
189
|
width: ${props => getMultipliedSize(props.theme.base.baseWidth, 2)};
|
|
189
190
|
height: ${props => getMultipliedSize(props.theme.base.baseWidth, 2)};
|
|
190
191
|
color: ${props => props.theme.color.gray25};
|
|
@@ -193,7 +194,6 @@ const CheckboxInput_RadioInput = styled.input `
|
|
|
193
194
|
|
|
194
195
|
& + label {
|
|
195
196
|
cursor: pointer;
|
|
196
|
-
display: flex;
|
|
197
197
|
padding-left: ${props => getMultipliedSize(props.theme.base.baseWidth, 1)};
|
|
198
198
|
}
|
|
199
199
|
|
|
@@ -232,4 +232,4 @@ createGlobalStyle `
|
|
|
232
232
|
${globalStyles}
|
|
233
233
|
`;
|
|
234
234
|
|
|
235
|
-
export {
|
|
235
|
+
export { CheckboxAndRadioInputCore, globalStyles };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import createStyled from '../utils/createStyled.js';
|
|
2
2
|
|
|
3
|
-
const { styled, css, createGlobalStyle, keyframes, ThemeProvider, ServerStyleSheet
|
|
3
|
+
const { styled, css, createGlobalStyle, keyframes, ThemeProvider, ServerStyleSheet } = createStyled();
|
|
4
4
|
|
|
5
5
|
export default styled;
|
|
6
6
|
export { ServerStyleSheet, ThemeProvider, createGlobalStyle, css, keyframes };
|
|
@@ -14,10 +14,6 @@ const fontSize = {
|
|
|
14
14
|
h4: '1.25rem',
|
|
15
15
|
h5: '1rem',
|
|
16
16
|
};
|
|
17
|
-
var fontSize$1 = {
|
|
18
|
-
h1: fontSize.h1L,
|
|
19
|
-
h2: fontSize.h2M,
|
|
20
|
-
...fontSize,
|
|
21
|
-
};
|
|
17
|
+
var fontSize$1 = Object.assign({ h1: fontSize.h1L, h2: fontSize.h2M }, fontSize);
|
|
22
18
|
|
|
23
19
|
export default fontSize$1;
|
|
@@ -15,10 +15,6 @@ const lineHeight = {
|
|
|
15
15
|
h4: '1.5rem',
|
|
16
16
|
h5: '1rem',
|
|
17
17
|
};
|
|
18
|
-
var lineHeight$1 = {
|
|
19
|
-
h1: lineHeight.h1L,
|
|
20
|
-
h2: lineHeight.h2M,
|
|
21
|
-
...lineHeight,
|
|
22
|
-
};
|
|
18
|
+
var lineHeight$1 = Object.assign({ h1: lineHeight.h1L, h2: lineHeight.h2M }, lineHeight);
|
|
23
19
|
|
|
24
20
|
export default lineHeight$1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as styledComponents from 'styled-components';
|
|
2
|
-
import { ThemeInterface } from '../themes/theme';
|
|
2
|
+
import type { ThemeInterface } from '../themes/theme';
|
|
3
3
|
declare function createStyled<T extends ThemeInterface>(): {
|
|
4
4
|
styled: styledComponents.ThemedStyledInterface<T>;
|
|
5
5
|
css: styledComponents.ThemedCssFunction<T>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dnanpm/styleguide",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"main": "build/cjs/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
7
7
|
"jsnext:main": "build/es/index.js",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"url": "https://github.com/DNA-Online-Services/b2cwebshop-styleguide.git"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"
|
|
23
|
+
"eslint": "cross-env eslint --fix './**/*.{ts,tsx}'",
|
|
24
|
+
"eslint:check": "cross-env eslint './**/*.{ts,tsx}'",
|
|
24
25
|
"eject": "react-scripts eject",
|
|
25
26
|
"styleguide": "styleguidist server",
|
|
26
27
|
"styleguide:build": "styleguidist build",
|
|
@@ -31,13 +32,10 @@
|
|
|
31
32
|
"unlock": "echo 'check if its ours ,remove it and ours.'",
|
|
32
33
|
"condtar": "npm run lock && ( [ -s dnanpm-styleguide-snapshot.tgz ] || npm run tar) && npm run unlock",
|
|
33
34
|
"tar": "npm run clean && npm ci && npm run build && npm pack && mv dnanpm-styleguide*.tgz dnanpm-styleguide-snapshot.tgz",
|
|
34
|
-
"prepublishOnly": "npm run clean && npm ci && npm run
|
|
35
|
+
"prepublishOnly": "npm run clean && npm ci && npm run eslint:check && npm run build",
|
|
35
36
|
"format": "cross-env prettier --ignore-path .prettierignore --write --loglevel silent '**/*.{ts,tsx,js,json}'",
|
|
36
37
|
"format:check": "cross-env prettier --ignore-path .prettierignore --check '**/*.{ts,tsx,js,json}'",
|
|
37
|
-
"preCommit": "npm run
|
|
38
|
-
},
|
|
39
|
-
"eslintConfig": {
|
|
40
|
-
"extends": "react-app"
|
|
38
|
+
"preCommit": "npm run eslint:check && npm run format:check"
|
|
41
39
|
},
|
|
42
40
|
"browserslist": [
|
|
43
41
|
">0.2%",
|
|
@@ -51,12 +49,24 @@
|
|
|
51
49
|
"@types/react": "^17.0.0",
|
|
52
50
|
"@types/react-dom": "^17.0.0",
|
|
53
51
|
"@types/react-modal": "^3.10.6",
|
|
54
|
-
"@types/react-select": "^
|
|
52
|
+
"@types/react-select": "^5.0.1",
|
|
55
53
|
"@types/react-sizes": "^2.0.0",
|
|
56
54
|
"@types/react-tooltip": "^3.11.0",
|
|
57
55
|
"@types/styled-components": "^5.1.7",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
|
57
|
+
"@typescript-eslint/parser": "^5.31.0",
|
|
58
58
|
"cross-env": "^7.0.3",
|
|
59
|
-
"
|
|
59
|
+
"eslint": "^8.20.0",
|
|
60
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
61
|
+
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
62
|
+
"eslint-config-prettier": "^8.5.0",
|
|
63
|
+
"eslint-plugin-import": "2.26.0",
|
|
64
|
+
"eslint-plugin-jsdoc": "^39.3.3",
|
|
65
|
+
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
66
|
+
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
67
|
+
"eslint-plugin-react": "^7.30.1",
|
|
68
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
69
|
+
"prettier": "^2.7.1",
|
|
60
70
|
"react": "^17.0.1",
|
|
61
71
|
"react-docgen-typescript": "^1.20.5",
|
|
62
72
|
"react-dom": "^17.0.1",
|
|
@@ -71,10 +81,6 @@
|
|
|
71
81
|
"rollup-plugin-visualizer": "^4.2.0",
|
|
72
82
|
"styled-components": "^5.2.1",
|
|
73
83
|
"tslib": "^2.1.0",
|
|
74
|
-
"tslint": "^6.1.3",
|
|
75
|
-
"tslint-config-prettier": "^1.18.0",
|
|
76
|
-
"tslint-react": "^4.2.0",
|
|
77
|
-
"tslint-react-hooks": "^2.2.2",
|
|
78
84
|
"typescript": "^4.1.3"
|
|
79
85
|
},
|
|
80
86
|
"dependencies": {
|
|
@@ -82,7 +88,7 @@
|
|
|
82
88
|
"ramda": "^0.27.1",
|
|
83
89
|
"react-modal": "^3.12.1",
|
|
84
90
|
"react-progressive-image": "^0.6.0",
|
|
85
|
-
"react-select": "^5.
|
|
91
|
+
"react-select": "^5.4.0",
|
|
86
92
|
"react-sizes": "^2.0.0",
|
|
87
93
|
"react-spring": "^8.0.27",
|
|
88
94
|
"react-tooltip": "4.1.0"
|