@dnanpm/styleguide 2.1.0 → 2.2.1
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 +21 -18
- package/build/cjs/components/AmountSelector/AmountSelector.js +3 -1
- package/build/cjs/components/Buttons/ButtonBasicStyles.d.ts +2 -1
- 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/ButtonIconPrimary.d.ts +1 -1
- 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 +4 -2
- 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 +1 -1
- package/build/cjs/components/EmptyState/EmptyState.js +2 -1
- package/build/cjs/components/Footer/Components/FooterComponents.d.ts +1 -1
- package/build/cjs/components/Footer/Components/FooterComponents.js +16 -30
- 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 +1 -1
- package/build/cjs/components/Icon/Icon.js +5 -4
- package/build/cjs/components/Icon/Icons.d.ts +1 -1
- package/build/cjs/components/Icon/Icons.js +1155 -500
- package/build/cjs/components/Icons/Small/hlArrowBackSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlArrowBackSmall.js +6 -2
- package/build/cjs/components/Icons/Small/hlArrowForwardSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlArrowForwardSmall.js +6 -2
- package/build/cjs/components/Icons/Small/hlArrowUnderSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlArrowUnderSmall.js +6 -2
- package/build/cjs/components/Icons/Small/hlCalendarSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlCalendarSmall.js +6 -2
- package/build/cjs/components/Icons/Small/hlChevronDownSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlChevronDownSmall.js +6 -2
- package/build/cjs/components/Icons/Small/hlChevronLeftSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlChevronLeftSmall.js +6 -2
- package/build/cjs/components/Icons/Small/hlChevronRightSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlChevronRightSmall.js +6 -2
- package/build/cjs/components/Icons/Small/hlChevronUpSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlChevronUpSmall.js +6 -2
- package/build/cjs/components/Icons/Small/hlClockSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlClockSmall.js +7 -3
- package/build/cjs/components/Icons/Small/hlDownloadSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlDownloadSmall.js +8 -4
- package/build/cjs/components/Icons/Small/hlExternalSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlExternalSmall.js +6 -2
- package/build/cjs/components/Icons/Small/hlUploadSmall.d.ts +1 -1
- package/build/cjs/components/Icons/Small/hlUploadSmall.js +8 -4
- package/build/cjs/components/Icons/Social/facebook.d.ts +1 -1
- package/build/cjs/components/Icons/Social/facebook.js +6 -2
- package/build/cjs/components/Icons/Social/instagram.d.ts +1 -1
- package/build/cjs/components/Icons/Social/instagram.js +6 -2
- package/build/cjs/components/Icons/Social/linkedin.d.ts +1 -1
- package/build/cjs/components/Icons/Social/linkedin.js +6 -2
- package/build/cjs/components/Icons/Social/tiktok.d.ts +1 -1
- package/build/cjs/components/Icons/Social/tiktok.js +6 -2
- package/build/cjs/components/Icons/Social/twitter.d.ts +1 -1
- package/build/cjs/components/Icons/Social/twitter.js +6 -2
- package/build/cjs/components/Icons/Social/youtube.d.ts +1 -1
- package/build/cjs/components/Icons/Social/youtube.js +6 -2
- package/build/cjs/components/Icons/hl404.d.ts +1 -1
- package/build/cjs/components/Icons/hl404.js +6 -2
- package/build/cjs/components/Icons/hl4gSim.d.ts +1 -1
- package/build/cjs/components/Icons/hl4gSim.js +6 -2
- package/build/cjs/components/Icons/hl5gSim.d.ts +1 -1
- package/build/cjs/components/Icons/hl5gSim.js +6 -2
- package/build/cjs/components/Icons/hlBattery.d.ts +1 -1
- package/build/cjs/components/Icons/hlBattery.js +8 -4
- package/build/cjs/components/Icons/hlBell.d.ts +1 -1
- package/build/cjs/components/Icons/hlBell.js +6 -2
- package/build/cjs/components/Icons/hlCalendar.d.ts +1 -1
- package/build/cjs/components/Icons/hlCalendar.js +17 -13
- package/build/cjs/components/Icons/hlCall.d.ts +1 -1
- package/build/cjs/components/Icons/hlCall.js +6 -2
- package/build/cjs/components/Icons/hlCameraBack.d.ts +1 -1
- package/build/cjs/components/Icons/hlCameraBack.js +8 -4
- package/build/cjs/components/Icons/hlCameraFront.d.ts +1 -1
- package/build/cjs/components/Icons/hlCameraFront.js +7 -3
- package/build/cjs/components/Icons/hlCart.d.ts +1 -1
- package/build/cjs/components/Icons/hlCart.js +8 -4
- package/build/cjs/components/Icons/hlCartEmpty.d.ts +1 -1
- package/build/cjs/components/Icons/hlCartEmpty.js +8 -4
- package/build/cjs/components/Icons/hlChat.d.ts +1 -1
- package/build/cjs/components/Icons/hlChat.js +9 -5
- package/build/cjs/components/Icons/hlCheck.d.ts +1 -1
- package/build/cjs/components/Icons/hlCheck.js +6 -2
- package/build/cjs/components/Icons/hlChevronDown.d.ts +1 -1
- package/build/cjs/components/Icons/hlChevronDown.js +6 -2
- package/build/cjs/components/Icons/hlChevronLeft.d.ts +1 -1
- package/build/cjs/components/Icons/hlChevronLeft.js +6 -2
- package/build/cjs/components/Icons/hlChevronRight.d.ts +1 -1
- package/build/cjs/components/Icons/hlChevronRight.js +6 -2
- package/build/cjs/components/Icons/hlChevronUp.d.ts +1 -1
- package/build/cjs/components/Icons/hlChevronUp.js +6 -2
- package/build/cjs/components/Icons/hlCompensation.d.ts +1 -1
- package/build/cjs/components/Icons/hlCompensation.js +6 -2
- package/build/cjs/components/Icons/hlCookie.d.ts +1 -1
- package/build/cjs/components/Icons/hlCookie.js +6 -2
- package/build/cjs/components/Icons/hlCopy.d.ts +1 -1
- package/build/cjs/components/Icons/hlCopy.js +7 -3
- package/build/cjs/components/Icons/hlCoupon.d.ts +1 -1
- package/build/cjs/components/Icons/hlCoupon.js +8 -4
- package/build/cjs/components/Icons/hlDelivery.d.ts +1 -1
- package/build/cjs/components/Icons/hlDelivery.js +6 -2
- package/build/cjs/components/Icons/hlDigiturva.d.ts +1 -1
- package/build/cjs/components/Icons/hlDigiturva.js +6 -2
- package/build/cjs/components/Icons/hlDisplaySize.d.ts +1 -1
- package/build/cjs/components/Icons/hlDisplaySize.js +8 -4
- package/build/cjs/components/Icons/hlDocument.d.ts +1 -1
- package/build/cjs/components/Icons/hlDocument.js +7 -3
- package/build/cjs/components/Icons/hlDownload.d.ts +1 -1
- package/build/cjs/components/Icons/hlDownload.js +8 -4
- package/build/cjs/components/Icons/hlEnvelope.d.ts +1 -1
- package/build/cjs/components/Icons/hlEnvelope.js +6 -2
- package/build/cjs/components/Icons/hlError.d.ts +1 -1
- package/build/cjs/components/Icons/hlError.js +8 -4
- package/build/cjs/components/Icons/hlEuro.d.ts +1 -1
- package/build/cjs/components/Icons/hlEuro.js +6 -2
- package/build/cjs/components/Icons/hlExclamationMark.d.ts +1 -1
- package/build/cjs/components/Icons/hlExclamationMark.js +6 -2
- package/build/cjs/components/Icons/hlExpand.d.ts +1 -1
- package/build/cjs/components/Icons/hlExpand.js +6 -2
- package/build/cjs/components/Icons/hlExternal.d.ts +1 -1
- package/build/cjs/components/Icons/hlExternal.js +6 -2
- package/build/cjs/components/Icons/hlEyeClosed.d.ts +1 -1
- package/build/cjs/components/Icons/hlEyeClosed.js +6 -2
- package/build/cjs/components/Icons/hlEyeOpen.d.ts +1 -1
- package/build/cjs/components/Icons/hlEyeOpen.js +7 -3
- package/build/cjs/components/Icons/hlFaceId.d.ts +1 -1
- package/build/cjs/components/Icons/hlFaceId.js +6 -2
- package/build/cjs/components/Icons/hlFastDelivery.d.ts +1 -1
- package/build/cjs/components/Icons/hlFastDelivery.js +6 -2
- package/build/cjs/components/Icons/hlFingerprint.d.ts +1 -1
- package/build/cjs/components/Icons/hlFingerprint.js +10 -6
- package/build/cjs/components/Icons/hlGlobe.d.ts +1 -1
- package/build/cjs/components/Icons/hlGlobe.js +6 -2
- package/build/cjs/components/Icons/hlHeadphones.d.ts +1 -1
- package/build/cjs/components/Icons/hlHeadphones.js +6 -2
- package/build/cjs/components/Icons/hlHeadset.d.ts +1 -1
- package/build/cjs/components/Icons/hlHeadset.js +8 -4
- package/build/cjs/components/Icons/hlHeart.d.ts +1 -1
- package/build/cjs/components/Icons/hlHeart.js +6 -2
- package/build/cjs/components/Icons/hlHome.d.ts +1 -1
- package/build/cjs/components/Icons/hlHome.js +6 -2
- package/build/cjs/components/Icons/hlImage.d.ts +1 -1
- package/build/cjs/components/Icons/hlImage.js +6 -2
- package/build/cjs/components/Icons/hlInfo.d.ts +1 -1
- package/build/cjs/components/Icons/hlInfo.js +8 -4
- package/build/cjs/components/Icons/hlInstallment.d.ts +1 -1
- package/build/cjs/components/Icons/hlInstallment.js +7 -3
- package/build/cjs/components/Icons/hlIotSim.d.ts +1 -1
- package/build/cjs/components/Icons/hlIotSim.js +7 -3
- package/build/cjs/components/Icons/hlLock.d.ts +1 -1
- package/build/cjs/components/Icons/hlLock.js +8 -4
- package/build/cjs/components/Icons/hlMagnifyingGlass.d.ts +1 -1
- package/build/cjs/components/Icons/hlMagnifyingGlass.js +7 -3
- package/build/cjs/components/Icons/hlMarker.d.ts +1 -1
- package/build/cjs/components/Icons/hlMarker.js +7 -3
- package/build/cjs/components/Icons/hlMemory.d.ts +1 -1
- package/build/cjs/components/Icons/hlMemory.js +7 -3
- package/build/cjs/components/Icons/hlMenu.d.ts +1 -1
- package/build/cjs/components/Icons/hlMenu.js +6 -2
- package/build/cjs/components/Icons/hlMinimize.d.ts +1 -1
- package/build/cjs/components/Icons/hlMinimize.js +6 -2
- package/build/cjs/components/Icons/hlMinus.d.ts +1 -1
- package/build/cjs/components/Icons/hlMinus.js +6 -2
- package/build/cjs/components/Icons/hlMobileData.d.ts +1 -1
- package/build/cjs/components/Icons/hlMobileData.js +6 -2
- package/build/cjs/components/Icons/hlMobilePayment.d.ts +1 -1
- package/build/cjs/components/Icons/hlMobilePayment.js +8 -4
- package/build/cjs/components/Icons/hlModem.d.ts +1 -1
- package/build/cjs/components/Icons/hlModem.js +10 -6
- package/build/cjs/components/Icons/hlMore.d.ts +1 -1
- package/build/cjs/components/Icons/hlMore.js +8 -4
- package/build/cjs/components/Icons/hlOs.d.ts +1 -1
- package/build/cjs/components/Icons/hlOs.js +7 -3
- package/build/cjs/components/Icons/hlPackage.d.ts +1 -1
- package/build/cjs/components/Icons/hlPackage.js +6 -2
- package/build/cjs/components/Icons/hlPaperclip.d.ts +1 -1
- package/build/cjs/components/Icons/hlPaperclip.js +6 -2
- package/build/cjs/components/Icons/hlPaytime.d.ts +1 -1
- package/build/cjs/components/Icons/hlPaytime.js +6 -2
- package/build/cjs/components/Icons/hlPen.d.ts +1 -1
- package/build/cjs/components/Icons/hlPen.js +6 -2
- package/build/cjs/components/Icons/hlPerson.d.ts +1 -1
- package/build/cjs/components/Icons/hlPerson.js +6 -2
- package/build/cjs/components/Icons/hlPhone.d.ts +1 -1
- package/build/cjs/components/Icons/hlPhone.js +7 -3
- package/build/cjs/components/Icons/hlPlus.d.ts +1 -1
- package/build/cjs/components/Icons/hlPlus.js +7 -3
- package/build/cjs/components/Icons/hlPrepaid.d.ts +1 -1
- package/build/cjs/components/Icons/hlPrepaid.js +6 -2
- package/build/cjs/components/Icons/hlProcessor.d.ts +1 -1
- package/build/cjs/components/Icons/hlProcessor.js +7 -3
- package/build/cjs/components/Icons/hlServices.d.ts +1 -1
- package/build/cjs/components/Icons/hlServices.js +6 -2
- package/build/cjs/components/Icons/hlSettings.d.ts +1 -1
- package/build/cjs/components/Icons/hlSettings.js +6 -2
- package/build/cjs/components/Icons/hlShield.d.ts +1 -1
- package/build/cjs/components/Icons/hlShield.js +7 -3
- package/build/cjs/components/Icons/hlSim.d.ts +1 -1
- package/build/cjs/components/Icons/hlSim.js +7 -3
- package/build/cjs/components/Icons/hlSimSimple.d.ts +1 -1
- package/build/cjs/components/Icons/hlSimSimple.js +8 -4
- package/build/cjs/components/Icons/hlSmile.d.ts +1 -1
- package/build/cjs/components/Icons/hlSmile.js +9 -5
- package/build/cjs/components/Icons/hlSpeechBubble.d.ts +1 -1
- package/build/cjs/components/Icons/hlSpeechBubble.js +7 -3
- package/build/cjs/components/Icons/hlSquaretrade.d.ts +1 -1
- package/build/cjs/components/Icons/hlSquaretrade.js +6 -2
- package/build/cjs/components/Icons/hlStar.d.ts +1 -1
- package/build/cjs/components/Icons/hlStar.js +6 -2
- package/build/cjs/components/Icons/hlStarFilled.d.ts +1 -1
- package/build/cjs/components/Icons/hlStarFilled.js +6 -2
- package/build/cjs/components/Icons/hlTrash.d.ts +1 -1
- package/build/cjs/components/Icons/hlTrash.js +7 -3
- package/build/cjs/components/Icons/hlTv.d.ts +1 -1
- package/build/cjs/components/Icons/hlTv.js +6 -2
- package/build/cjs/components/Icons/hlUnlock.d.ts +1 -1
- package/build/cjs/components/Icons/hlUnlock.js +8 -4
- package/build/cjs/components/Icons/hlUpload.d.ts +1 -1
- package/build/cjs/components/Icons/hlUpload.js +8 -4
- package/build/cjs/components/Icons/hlWarning.d.ts +1 -1
- package/build/cjs/components/Icons/hlWarning.js +8 -4
- package/build/cjs/components/Icons/hlWifi.d.ts +1 -1
- package/build/cjs/components/Icons/hlWifi.js +8 -4
- package/build/cjs/components/Icons/hlX.d.ts +1 -1
- package/build/cjs/components/Icons/hlX.js +6 -2
- 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 +10 -9
- 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 +3 -2
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +6 -7
- package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.js +1 -1
- 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 +1 -0
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +1 -4
- package/build/cjs/components/MainNavigation/ChildComponents/MinicartTooltip.js +2 -1
- package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.js +2 -1
- package/build/cjs/components/MainNavigation/ChildComponents/PageSearch.js +1 -0
- package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.js +8 -12
- package/build/cjs/components/MainNavigation/MainNavigation.d.ts +2 -2
- package/build/cjs/components/MainNavigation/MainNavigation.js +8 -36
- package/build/cjs/components/Modal/Modal.js +17 -4
- package/build/cjs/components/Notification/Notification.d.ts +1 -1
- package/build/cjs/components/Notification/Notification.js +3 -1
- 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 +19 -18
- package/build/cjs/components/RadioButton/RadioButton.d.ts +2 -2
- package/build/cjs/components/RadioButton/RadioButton.js +4 -2
- package/build/cjs/components/ReadMore/ReadMore.js +1 -0
- package/build/cjs/components/Ribbon/Ribbon.d.ts +1 -1
- package/build/cjs/components/Ribbon/Ribbon.js +9 -8
- package/build/cjs/components/Search/Search.d.ts +3 -3
- package/build/cjs/components/Search/Search.js +4 -2
- package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +2 -1
- package/build/cjs/components/Selectbox/Selectbox.d.ts +17 -17
- package/build/cjs/components/Selectbox/Selectbox.js +43 -73
- 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 +1 -1
- package/build/cjs/components/TooltipMenu/TooltipMenu.js +1 -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 +2 -2
- package/build/cjs/themes/globalStyles.d.ts +1 -1
- package/build/cjs/themes/globalStyles.js +3 -3
- 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 +21 -18
- package/build/es/components/AmountSelector/AmountSelector.js +3 -1
- package/build/es/components/Buttons/ButtonBasicStyles.d.ts +2 -1
- 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/ButtonIconPrimary.d.ts +1 -1
- 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 +5 -3
- 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 +1 -1
- package/build/es/components/EmptyState/EmptyState.js +2 -1
- package/build/es/components/Footer/Components/FooterComponents.d.ts +1 -1
- package/build/es/components/Footer/Components/FooterComponents.js +16 -30
- 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 +1 -1
- package/build/es/components/Icon/Icon.js +5 -3
- package/build/es/components/Icon/Icons.d.ts +1 -1
- package/build/es/components/Icon/Icons.js +1155 -500
- package/build/es/components/Icons/Small/hlArrowBackSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlArrowBackSmall.js +6 -2
- package/build/es/components/Icons/Small/hlArrowForwardSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlArrowForwardSmall.js +6 -2
- package/build/es/components/Icons/Small/hlArrowUnderSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlArrowUnderSmall.js +6 -2
- package/build/es/components/Icons/Small/hlCalendarSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlCalendarSmall.js +6 -2
- package/build/es/components/Icons/Small/hlChevronDownSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlChevronDownSmall.js +6 -2
- package/build/es/components/Icons/Small/hlChevronLeftSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlChevronLeftSmall.js +6 -2
- package/build/es/components/Icons/Small/hlChevronRightSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlChevronRightSmall.js +6 -2
- package/build/es/components/Icons/Small/hlChevronUpSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlChevronUpSmall.js +6 -2
- package/build/es/components/Icons/Small/hlClockSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlClockSmall.js +7 -3
- package/build/es/components/Icons/Small/hlDownloadSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlDownloadSmall.js +8 -4
- package/build/es/components/Icons/Small/hlExternalSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlExternalSmall.js +6 -2
- package/build/es/components/Icons/Small/hlUploadSmall.d.ts +1 -1
- package/build/es/components/Icons/Small/hlUploadSmall.js +8 -4
- package/build/es/components/Icons/Social/facebook.d.ts +1 -1
- package/build/es/components/Icons/Social/facebook.js +6 -2
- package/build/es/components/Icons/Social/instagram.d.ts +1 -1
- package/build/es/components/Icons/Social/instagram.js +6 -2
- package/build/es/components/Icons/Social/linkedin.d.ts +1 -1
- package/build/es/components/Icons/Social/linkedin.js +6 -2
- package/build/es/components/Icons/Social/tiktok.d.ts +1 -1
- package/build/es/components/Icons/Social/tiktok.js +6 -2
- package/build/es/components/Icons/Social/twitter.d.ts +1 -1
- package/build/es/components/Icons/Social/twitter.js +6 -2
- package/build/es/components/Icons/Social/youtube.d.ts +1 -1
- package/build/es/components/Icons/Social/youtube.js +6 -2
- package/build/es/components/Icons/hl404.d.ts +1 -1
- package/build/es/components/Icons/hl404.js +6 -2
- package/build/es/components/Icons/hl4gSim.d.ts +1 -1
- package/build/es/components/Icons/hl4gSim.js +6 -2
- package/build/es/components/Icons/hl5gSim.d.ts +1 -1
- package/build/es/components/Icons/hl5gSim.js +6 -2
- package/build/es/components/Icons/hlBattery.d.ts +1 -1
- package/build/es/components/Icons/hlBattery.js +8 -4
- package/build/es/components/Icons/hlBell.d.ts +1 -1
- package/build/es/components/Icons/hlBell.js +6 -2
- package/build/es/components/Icons/hlCalendar.d.ts +1 -1
- package/build/es/components/Icons/hlCalendar.js +17 -13
- package/build/es/components/Icons/hlCall.d.ts +1 -1
- package/build/es/components/Icons/hlCall.js +6 -2
- package/build/es/components/Icons/hlCameraBack.d.ts +1 -1
- package/build/es/components/Icons/hlCameraBack.js +8 -4
- package/build/es/components/Icons/hlCameraFront.d.ts +1 -1
- package/build/es/components/Icons/hlCameraFront.js +7 -3
- package/build/es/components/Icons/hlCart.d.ts +1 -1
- package/build/es/components/Icons/hlCart.js +8 -4
- package/build/es/components/Icons/hlCartEmpty.d.ts +1 -1
- package/build/es/components/Icons/hlCartEmpty.js +8 -4
- package/build/es/components/Icons/hlChat.d.ts +1 -1
- package/build/es/components/Icons/hlChat.js +9 -5
- package/build/es/components/Icons/hlCheck.d.ts +1 -1
- package/build/es/components/Icons/hlCheck.js +6 -2
- package/build/es/components/Icons/hlChevronDown.d.ts +1 -1
- package/build/es/components/Icons/hlChevronDown.js +6 -2
- package/build/es/components/Icons/hlChevronLeft.d.ts +1 -1
- package/build/es/components/Icons/hlChevronLeft.js +6 -2
- package/build/es/components/Icons/hlChevronRight.d.ts +1 -1
- package/build/es/components/Icons/hlChevronRight.js +6 -2
- package/build/es/components/Icons/hlChevronUp.d.ts +1 -1
- package/build/es/components/Icons/hlChevronUp.js +6 -2
- package/build/es/components/Icons/hlCompensation.d.ts +1 -1
- package/build/es/components/Icons/hlCompensation.js +6 -2
- package/build/es/components/Icons/hlCookie.d.ts +1 -1
- package/build/es/components/Icons/hlCookie.js +6 -2
- package/build/es/components/Icons/hlCopy.d.ts +1 -1
- package/build/es/components/Icons/hlCopy.js +7 -3
- package/build/es/components/Icons/hlCoupon.d.ts +1 -1
- package/build/es/components/Icons/hlCoupon.js +8 -4
- package/build/es/components/Icons/hlDelivery.d.ts +1 -1
- package/build/es/components/Icons/hlDelivery.js +6 -2
- package/build/es/components/Icons/hlDigiturva.d.ts +1 -1
- package/build/es/components/Icons/hlDigiturva.js +6 -2
- package/build/es/components/Icons/hlDisplaySize.d.ts +1 -1
- package/build/es/components/Icons/hlDisplaySize.js +8 -4
- package/build/es/components/Icons/hlDocument.d.ts +1 -1
- package/build/es/components/Icons/hlDocument.js +7 -3
- package/build/es/components/Icons/hlDownload.d.ts +1 -1
- package/build/es/components/Icons/hlDownload.js +8 -4
- package/build/es/components/Icons/hlEnvelope.d.ts +1 -1
- package/build/es/components/Icons/hlEnvelope.js +6 -2
- package/build/es/components/Icons/hlError.d.ts +1 -1
- package/build/es/components/Icons/hlError.js +8 -4
- package/build/es/components/Icons/hlEuro.d.ts +1 -1
- package/build/es/components/Icons/hlEuro.js +6 -2
- package/build/es/components/Icons/hlExclamationMark.d.ts +1 -1
- package/build/es/components/Icons/hlExclamationMark.js +6 -2
- package/build/es/components/Icons/hlExpand.d.ts +1 -1
- package/build/es/components/Icons/hlExpand.js +6 -2
- package/build/es/components/Icons/hlExternal.d.ts +1 -1
- package/build/es/components/Icons/hlExternal.js +6 -2
- package/build/es/components/Icons/hlEyeClosed.d.ts +1 -1
- package/build/es/components/Icons/hlEyeClosed.js +6 -2
- package/build/es/components/Icons/hlEyeOpen.d.ts +1 -1
- package/build/es/components/Icons/hlEyeOpen.js +7 -3
- package/build/es/components/Icons/hlFaceId.d.ts +1 -1
- package/build/es/components/Icons/hlFaceId.js +6 -2
- package/build/es/components/Icons/hlFastDelivery.d.ts +1 -1
- package/build/es/components/Icons/hlFastDelivery.js +6 -2
- package/build/es/components/Icons/hlFingerprint.d.ts +1 -1
- package/build/es/components/Icons/hlFingerprint.js +10 -6
- package/build/es/components/Icons/hlGlobe.d.ts +1 -1
- package/build/es/components/Icons/hlGlobe.js +6 -2
- package/build/es/components/Icons/hlHeadphones.d.ts +1 -1
- package/build/es/components/Icons/hlHeadphones.js +6 -2
- package/build/es/components/Icons/hlHeadset.d.ts +1 -1
- package/build/es/components/Icons/hlHeadset.js +8 -4
- package/build/es/components/Icons/hlHeart.d.ts +1 -1
- package/build/es/components/Icons/hlHeart.js +6 -2
- package/build/es/components/Icons/hlHome.d.ts +1 -1
- package/build/es/components/Icons/hlHome.js +6 -2
- package/build/es/components/Icons/hlImage.d.ts +1 -1
- package/build/es/components/Icons/hlImage.js +6 -2
- package/build/es/components/Icons/hlInfo.d.ts +1 -1
- package/build/es/components/Icons/hlInfo.js +8 -4
- package/build/es/components/Icons/hlInstallment.d.ts +1 -1
- package/build/es/components/Icons/hlInstallment.js +7 -3
- package/build/es/components/Icons/hlIotSim.d.ts +1 -1
- package/build/es/components/Icons/hlIotSim.js +7 -3
- package/build/es/components/Icons/hlLock.d.ts +1 -1
- package/build/es/components/Icons/hlLock.js +8 -4
- package/build/es/components/Icons/hlMagnifyingGlass.d.ts +1 -1
- package/build/es/components/Icons/hlMagnifyingGlass.js +7 -3
- package/build/es/components/Icons/hlMarker.d.ts +1 -1
- package/build/es/components/Icons/hlMarker.js +7 -3
- package/build/es/components/Icons/hlMemory.d.ts +1 -1
- package/build/es/components/Icons/hlMemory.js +7 -3
- package/build/es/components/Icons/hlMenu.d.ts +1 -1
- package/build/es/components/Icons/hlMenu.js +6 -2
- package/build/es/components/Icons/hlMinimize.d.ts +1 -1
- package/build/es/components/Icons/hlMinimize.js +6 -2
- package/build/es/components/Icons/hlMinus.d.ts +1 -1
- package/build/es/components/Icons/hlMinus.js +6 -2
- package/build/es/components/Icons/hlMobileData.d.ts +1 -1
- package/build/es/components/Icons/hlMobileData.js +6 -2
- package/build/es/components/Icons/hlMobilePayment.d.ts +1 -1
- package/build/es/components/Icons/hlMobilePayment.js +8 -4
- package/build/es/components/Icons/hlModem.d.ts +1 -1
- package/build/es/components/Icons/hlModem.js +10 -6
- package/build/es/components/Icons/hlMore.d.ts +1 -1
- package/build/es/components/Icons/hlMore.js +8 -4
- package/build/es/components/Icons/hlOs.d.ts +1 -1
- package/build/es/components/Icons/hlOs.js +7 -3
- package/build/es/components/Icons/hlPackage.d.ts +1 -1
- package/build/es/components/Icons/hlPackage.js +6 -2
- package/build/es/components/Icons/hlPaperclip.d.ts +1 -1
- package/build/es/components/Icons/hlPaperclip.js +6 -2
- package/build/es/components/Icons/hlPaytime.d.ts +1 -1
- package/build/es/components/Icons/hlPaytime.js +6 -2
- package/build/es/components/Icons/hlPen.d.ts +1 -1
- package/build/es/components/Icons/hlPen.js +6 -2
- package/build/es/components/Icons/hlPerson.d.ts +1 -1
- package/build/es/components/Icons/hlPerson.js +6 -2
- package/build/es/components/Icons/hlPhone.d.ts +1 -1
- package/build/es/components/Icons/hlPhone.js +7 -3
- package/build/es/components/Icons/hlPlus.d.ts +1 -1
- package/build/es/components/Icons/hlPlus.js +7 -3
- package/build/es/components/Icons/hlPrepaid.d.ts +1 -1
- package/build/es/components/Icons/hlPrepaid.js +6 -2
- package/build/es/components/Icons/hlProcessor.d.ts +1 -1
- package/build/es/components/Icons/hlProcessor.js +7 -3
- package/build/es/components/Icons/hlServices.d.ts +1 -1
- package/build/es/components/Icons/hlServices.js +6 -2
- package/build/es/components/Icons/hlSettings.d.ts +1 -1
- package/build/es/components/Icons/hlSettings.js +6 -2
- package/build/es/components/Icons/hlShield.d.ts +1 -1
- package/build/es/components/Icons/hlShield.js +7 -3
- package/build/es/components/Icons/hlSim.d.ts +1 -1
- package/build/es/components/Icons/hlSim.js +7 -3
- package/build/es/components/Icons/hlSimSimple.d.ts +1 -1
- package/build/es/components/Icons/hlSimSimple.js +8 -4
- package/build/es/components/Icons/hlSmile.d.ts +1 -1
- package/build/es/components/Icons/hlSmile.js +9 -5
- package/build/es/components/Icons/hlSpeechBubble.d.ts +1 -1
- package/build/es/components/Icons/hlSpeechBubble.js +7 -3
- package/build/es/components/Icons/hlSquaretrade.d.ts +1 -1
- package/build/es/components/Icons/hlSquaretrade.js +6 -2
- package/build/es/components/Icons/hlStar.d.ts +1 -1
- package/build/es/components/Icons/hlStar.js +6 -2
- package/build/es/components/Icons/hlStarFilled.d.ts +1 -1
- package/build/es/components/Icons/hlStarFilled.js +6 -2
- package/build/es/components/Icons/hlTrash.d.ts +1 -1
- package/build/es/components/Icons/hlTrash.js +7 -3
- package/build/es/components/Icons/hlTv.d.ts +1 -1
- package/build/es/components/Icons/hlTv.js +6 -2
- package/build/es/components/Icons/hlUnlock.d.ts +1 -1
- package/build/es/components/Icons/hlUnlock.js +8 -4
- package/build/es/components/Icons/hlUpload.d.ts +1 -1
- package/build/es/components/Icons/hlUpload.js +8 -4
- package/build/es/components/Icons/hlWarning.d.ts +1 -1
- package/build/es/components/Icons/hlWarning.js +8 -4
- package/build/es/components/Icons/hlWifi.d.ts +1 -1
- package/build/es/components/Icons/hlWifi.js +8 -4
- package/build/es/components/Icons/hlX.d.ts +1 -1
- package/build/es/components/Icons/hlX.js +6 -2
- 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 +10 -9
- 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 +3 -2
- package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +6 -7
- package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.d.ts +1 -1
- package/build/es/components/MainNavigation/ChildComponents/LanguageSelector.js +1 -1
- 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 +1 -0
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +1 -4
- package/build/es/components/MainNavigation/ChildComponents/MinicartTooltip.js +2 -1
- package/build/es/components/MainNavigation/ChildComponents/MobileMenu.js +2 -1
- package/build/es/components/MainNavigation/ChildComponents/PageSearch.js +1 -0
- package/build/es/components/MainNavigation/ChildComponents/Ribbon.d.ts +1 -1
- package/build/es/components/MainNavigation/ChildComponents/Ribbon.js +8 -12
- package/build/es/components/MainNavigation/MainNavigation.d.ts +2 -2
- package/build/es/components/MainNavigation/MainNavigation.js +8 -36
- package/build/es/components/Modal/Modal.js +17 -4
- package/build/es/components/Notification/Notification.d.ts +1 -1
- package/build/es/components/Notification/Notification.js +3 -1
- 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 +19 -18
- package/build/es/components/RadioButton/RadioButton.d.ts +2 -2
- package/build/es/components/RadioButton/RadioButton.js +5 -3
- package/build/es/components/ReadMore/ReadMore.js +1 -0
- package/build/es/components/Ribbon/Ribbon.d.ts +1 -1
- package/build/es/components/Ribbon/Ribbon.js +9 -8
- package/build/es/components/Search/Search.d.ts +3 -3
- package/build/es/components/Search/Search.js +4 -2
- package/build/es/components/SecondaryNavigation/SecondaryNavigation.js +2 -1
- package/build/es/components/Selectbox/Selectbox.d.ts +17 -17
- package/build/es/components/Selectbox/Selectbox.js +42 -72
- 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 +1 -1
- package/build/es/components/TooltipMenu/TooltipMenu.js +1 -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 +2 -2
- package/build/es/themes/globalStyles.d.ts +1 -1
- package/build/es/themes/globalStyles.js +3 -3
- 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
|
@@ -12,7 +12,7 @@ const Tail = styled['default'].div `
|
|
|
12
12
|
right: ${p => p.arrowPosition};
|
|
13
13
|
margin-top: -17.5px;
|
|
14
14
|
top: ${p => p.tooltipTop};
|
|
15
|
-
z-index: ${p => p.zIndex + 1};
|
|
15
|
+
z-index: ${p => Number(p.zIndex) + 1};
|
|
16
16
|
border: 10px solid transparent;
|
|
17
17
|
border-right-color: white;
|
|
18
18
|
transform: rotate(90deg);
|
|
@@ -25,7 +25,7 @@ const TailShadow = styled['default'].div `
|
|
|
25
25
|
margin-top: -5px;
|
|
26
26
|
margin-right: 8.5px;
|
|
27
27
|
top: ${p => p.tooltipTop};
|
|
28
|
-
z-index: ${p => p.zIndex + 1};
|
|
28
|
+
z-index: ${p => Number(p.zIndex) + 1};
|
|
29
29
|
right: ${p => p.arrowPosition};
|
|
30
30
|
background-color: transparent;
|
|
31
31
|
box-shadow: 0 0 5px 0 ${p => p.theme.color.black};
|
|
@@ -7,6 +7,7 @@ var useOutsideClick = require('../../hooks/useOutsideClick.js');
|
|
|
7
7
|
var styled = require('../../themes/styled.js');
|
|
8
8
|
var colors = require('../../themes/themeComponents/colors.js');
|
|
9
9
|
var Icon = require('../Icon/Icon.js');
|
|
10
|
+
require('tslib');
|
|
10
11
|
var hlChevronDown = require('../Icons/hlChevronDown.js');
|
|
11
12
|
var TooltipMenuExportedStyles = require('./ChildComponents/TooltipMenuExportedStyles.js');
|
|
12
13
|
|
|
@@ -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
|
|
@@ -6,6 +6,7 @@ var React = require('react');
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Hook to handle the click outside the referenced element
|
|
9
|
+
*
|
|
9
10
|
* @param ref - reference to the targeted element
|
|
10
11
|
* @param closeWhenTagClicked - provided array of tag names in lowercase which will also close dropdown. Works if tag or first parent is clicked.
|
|
11
12
|
* @param callback - callback
|
|
@@ -8,7 +8,7 @@ var useDebounceFunc = require('./useDebounceFunc.js');
|
|
|
8
8
|
const DEBOUNCE_DELAY = 100;
|
|
9
9
|
const useDocHeight = () => {
|
|
10
10
|
const setDocHeight = React.useCallback(() => {
|
|
11
|
-
document.documentElement.style.setProperty('--vh100', window.innerHeight
|
|
11
|
+
document.documentElement.style.setProperty('--vh100', `${window.innerHeight}px`);
|
|
12
12
|
}, []);
|
|
13
13
|
const debounceSetDocHeight = useDebounceFunc.useDebounceFunc(setDocHeight, DEBOUNCE_DELAY);
|
|
14
14
|
React.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;
|
|
@@ -6,8 +6,9 @@ var React = require('react');
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Hook to handle the click outside the referenced element
|
|
9
|
-
*
|
|
10
|
-
* @param
|
|
9
|
+
*
|
|
10
|
+
* @param {RefObject<Element>} ref - reference to the targeted element
|
|
11
|
+
* @param {Function} callback - callback
|
|
11
12
|
*/
|
|
12
13
|
const useOutsideClick = (ref, callback) => {
|
|
13
14
|
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;
|
|
@@ -11,8 +11,8 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
11
11
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
12
12
|
const isBrowser = typeof window !== 'undefined';
|
|
13
13
|
const getScrollPosition = (ref) => {
|
|
14
|
-
const element = ref
|
|
15
|
-
const useWindow = ref
|
|
14
|
+
const { element } = ref;
|
|
15
|
+
const { useWindow } = ref;
|
|
16
16
|
if (!isBrowser) {
|
|
17
17
|
return {
|
|
18
18
|
x: 0,
|
|
@@ -50,7 +50,7 @@ const useScrollPosition = (effect, deps, element, useWindow, wait) => {
|
|
|
50
50
|
};
|
|
51
51
|
React__default['default'].useEffect(() => {
|
|
52
52
|
if (!isBrowser) {
|
|
53
|
-
return;
|
|
53
|
+
return undefined;
|
|
54
54
|
}
|
|
55
55
|
const handleScroll = () => {
|
|
56
56
|
if (wait) {
|
|
@@ -63,9 +63,7 @@ const useScrollPosition = (effect, deps, element, useWindow, wait) => {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
window.addEventListener('scroll', handleScroll);
|
|
66
|
-
return () =>
|
|
67
|
-
return window.removeEventListener('scroll', handleScroll);
|
|
68
|
-
};
|
|
66
|
+
return () => window.removeEventListener('scroll', handleScroll);
|
|
69
67
|
}, deps);
|
|
70
68
|
};
|
|
71
69
|
useScrollPosition.defaultProps = {
|
package/build/cjs/index.js
CHANGED
|
@@ -501,12 +501,12 @@ exports.youtube = youtube['default'];
|
|
|
501
501
|
exports.Image = Image['default'];
|
|
502
502
|
exports.Input = Input['default'];
|
|
503
503
|
exports.Label = Label['default'];
|
|
504
|
-
exports.LabelText = LabelText
|
|
504
|
+
exports.LabelText = LabelText['default'];
|
|
505
505
|
exports.MainNavigation = MainNavigation['default'];
|
|
506
506
|
exports.Modal = Modal['default'];
|
|
507
507
|
exports.Notification = Notification['default'];
|
|
508
508
|
exports.NotificationBadge = NotificationBadge.NotificationBadge;
|
|
509
|
-
exports.PixelLoader = PixelLoader
|
|
509
|
+
exports.PixelLoader = PixelLoader['default'];
|
|
510
510
|
exports.ProgressIndicator = ProgressIndicator['default'];
|
|
511
511
|
exports.RadioButton = RadioButton['default'];
|
|
512
512
|
exports.ReadMore = ReadMore['default'];
|
|
@@ -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;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var styled = require('./styled.js');
|
|
6
5
|
var styledUtils = require('../utils/styledUtils.js');
|
|
6
|
+
var styled = require('./styled.js');
|
|
7
7
|
|
|
8
8
|
const globalStyles = styled.css `
|
|
9
9
|
*,
|
|
@@ -179,7 +179,7 @@ const globalStyles = styled.css `
|
|
|
179
179
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
|
|
180
180
|
}
|
|
181
181
|
`;
|
|
182
|
-
const
|
|
182
|
+
const CheckboxAndRadioInputCore = styled['default'].input `
|
|
183
183
|
display: inline-grid;
|
|
184
184
|
appearance: none;
|
|
185
185
|
place-content: center;
|
|
@@ -236,5 +236,5 @@ styled.createGlobalStyle `
|
|
|
236
236
|
${globalStyles}
|
|
237
237
|
`;
|
|
238
238
|
|
|
239
|
-
exports.
|
|
239
|
+
exports.CheckboxAndRadioInputCore = CheckboxAndRadioInputCore;
|
|
240
240
|
exports.globalStyles = globalStyles;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var createStyled = require('../utils/createStyled.js');
|
|
6
6
|
|
|
7
|
-
const { styled, css, createGlobalStyle, keyframes, ThemeProvider, ServerStyleSheet
|
|
7
|
+
const { styled, css, createGlobalStyle, keyframes, ThemeProvider, ServerStyleSheet } = createStyled['default']();
|
|
8
8
|
|
|
9
9
|
exports.ServerStyleSheet = ServerStyleSheet;
|
|
10
10
|
exports.ThemeProvider = ThemeProvider;
|
|
@@ -18,10 +18,6 @@ const fontSize = {
|
|
|
18
18
|
h4: '1.25rem',
|
|
19
19
|
h5: '1rem',
|
|
20
20
|
};
|
|
21
|
-
var fontSize$1 = {
|
|
22
|
-
h1: fontSize.h1L,
|
|
23
|
-
h2: fontSize.h2M,
|
|
24
|
-
...fontSize,
|
|
25
|
-
};
|
|
21
|
+
var fontSize$1 = Object.assign({ h1: fontSize.h1L, h2: fontSize.h2M }, fontSize);
|
|
26
22
|
|
|
27
23
|
exports.default = fontSize$1;
|
|
@@ -19,10 +19,6 @@ const lineHeight = {
|
|
|
19
19
|
h4: '1.5rem',
|
|
20
20
|
h5: '1rem',
|
|
21
21
|
};
|
|
22
|
-
var lineHeight$1 = {
|
|
23
|
-
h1: lineHeight.h1L,
|
|
24
|
-
h2: lineHeight.h2M,
|
|
25
|
-
...lineHeight,
|
|
26
|
-
};
|
|
22
|
+
var lineHeight$1 = Object.assign({ h1: lineHeight.h1L, h2: lineHeight.h2M }, lineHeight);
|
|
27
23
|
|
|
28
24
|
exports.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>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import type { Props as AccordionItemProps } from './AccordionItem';
|
|
3
|
+
interface Props extends Omit<AccordionItemProps, 'title' | 'id' | 'children' | 'onClick' | 'onKeyDown'> {
|
|
3
4
|
/**
|
|
4
5
|
* Content of Accordion
|
|
5
6
|
*
|
|
@@ -12,39 +13,8 @@ export interface Props {
|
|
|
12
13
|
* @default false
|
|
13
14
|
*/
|
|
14
15
|
autoCollapsible?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Allows to remove item title highlight when it is in expanded state
|
|
17
|
-
* Removes also highlight of CSS :hover and :active states
|
|
18
|
-
*
|
|
19
|
-
* @default true
|
|
20
|
-
*/
|
|
21
|
-
highlightSelected?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Allows to expand or collapse the component
|
|
24
|
-
*
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
isExpanded?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Display close button in the item content
|
|
30
|
-
*
|
|
31
|
-
* @default false
|
|
32
|
-
*/
|
|
33
|
-
hasCloseButton?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Label to show for the open icon for accessibility
|
|
36
|
-
*/
|
|
37
|
-
openLabel?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Label to show for the close button in the content
|
|
40
|
-
*/
|
|
41
|
-
closeLabel?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Allows to pass a custom className
|
|
44
|
-
*/
|
|
45
|
-
className?: string;
|
|
46
16
|
}
|
|
47
17
|
/** @visibleName Accordion */
|
|
48
|
-
declare const Accordion: ({ autoCollapsible, highlightSelected, hasCloseButton, ...props }: Props) => JSX.Element;
|
|
18
|
+
declare const Accordion: ({ autoCollapsible, highlightSelected, hasCloseButton, ...props }: Props) => JSX.Element | null;
|
|
49
19
|
/** @component */
|
|
50
20
|
export default Accordion;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
3
|
import AccordionItem from './AccordionItem.js';
|
|
3
4
|
|
|
4
5
|
/** @visibleName Accordion */
|
|
5
|
-
const Accordion = (
|
|
6
|
+
const Accordion = (_a) => {
|
|
7
|
+
var { autoCollapsible = false, highlightSelected = true, hasCloseButton = false } = _a, props = __rest(_a, ["autoCollapsible", "highlightSelected", "hasCloseButton"]);
|
|
6
8
|
const initialItemList = {};
|
|
7
9
|
const getAccordionItemId = (index, title) => `${title.replace(/\s+/g, '')}-${index}`;
|
|
8
10
|
if (props.isExpanded) {
|
|
@@ -14,29 +16,31 @@ const Accordion = ({ autoCollapsible = false, highlightSelected = true, hasClose
|
|
|
14
16
|
}
|
|
15
17
|
const [itemList, setItemList] = useState(initialItemList);
|
|
16
18
|
const toggleExpanded = (currentItemId) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
19
|
+
if (currentItemId) {
|
|
20
|
+
const currentItemState = itemList[currentItemId];
|
|
21
|
+
setItemList(Object.assign(Object.assign({}, (autoCollapsible ? {} : itemList)), { [currentItemId]: !currentItemState }));
|
|
22
|
+
}
|
|
22
23
|
};
|
|
23
24
|
const handleClick = (e) => {
|
|
24
|
-
|
|
25
|
+
var _a, _b;
|
|
26
|
+
toggleExpanded((_b = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.id);
|
|
25
27
|
};
|
|
26
28
|
const handleKeyDown = (e) => {
|
|
29
|
+
var _a, _b;
|
|
27
30
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
28
31
|
e.preventDefault();
|
|
29
|
-
toggleExpanded(e.currentTarget.parentElement.id);
|
|
32
|
+
toggleExpanded((_b = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.id);
|
|
30
33
|
}
|
|
31
34
|
};
|
|
32
35
|
const accordionItems = React.Children.map(props.children, (child, index) => {
|
|
33
36
|
if (React.isValidElement(child) && child.type === AccordionItem) {
|
|
34
37
|
const id = getAccordionItemId(index, child.props.title);
|
|
35
|
-
return (React.createElement(AccordionItem,
|
|
38
|
+
return (React.createElement(AccordionItem, { id: id, key: id, title: child.props.title, isExpanded: itemList[id], highlightSelected: highlightSelected, hasCloseButton: hasCloseButton, openLabel: props.openLabel, closeLabel: props.closeLabel, onClick: handleClick, onKeyDown: handleKeyDown, className: child.props.className }, child.props.children));
|
|
36
39
|
}
|
|
40
|
+
return null;
|
|
37
41
|
});
|
|
38
42
|
if (!accordionItems) {
|
|
39
|
-
return
|
|
43
|
+
return null;
|
|
40
44
|
}
|
|
41
45
|
return React.createElement("div", { className: props.className }, accordionItems);
|
|
42
46
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
interface Props extends Omit<AccordionProps, 'children' | 'autoCollapsible'> {
|
|
2
|
+
export interface Props {
|
|
4
3
|
/**
|
|
5
4
|
* Accordion item title
|
|
6
5
|
*/
|
|
@@ -13,6 +12,33 @@ interface Props extends Omit<AccordionProps, 'children' | 'autoCollapsible'> {
|
|
|
13
12
|
* Content of Accordion Item
|
|
14
13
|
*/
|
|
15
14
|
children?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Allows to expand or collapse the component
|
|
17
|
+
*
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
isExpanded?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Allows to remove item title highlight when it is in expanded state
|
|
23
|
+
* Removes also highlight of CSS :hover and :active states
|
|
24
|
+
*
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
highlightSelected?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Display close button in the item content
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
hasCloseButton?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Label to show for the open icon for accessibility
|
|
36
|
+
*/
|
|
37
|
+
openLabel?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Label to show for the close button in the content
|
|
40
|
+
*/
|
|
41
|
+
closeLabel?: string;
|
|
16
42
|
/**
|
|
17
43
|
* On component title and close button mouse click callback
|
|
18
44
|
* Use `e.currentTarget.parentElement` to get AccordionItem element
|
|
@@ -23,6 +49,10 @@ interface Props extends Omit<AccordionProps, 'children' | 'autoCollapsible'> {
|
|
|
23
49
|
* Use `e.currentTarget.parentElement` to get AccordionItem element
|
|
24
50
|
*/
|
|
25
51
|
onKeyDown?: (e: React.KeyboardEvent<HTMLElement>) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Allows to pass a custom className
|
|
54
|
+
*/
|
|
55
|
+
className?: string;
|
|
26
56
|
}
|
|
27
57
|
/** @visibleName Accordion Item */
|
|
28
58
|
declare const AccordionItem: ({ hasCloseButton, highlightSelected, ...props }: Props) => JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import styled__default, { css } from 'styled-components';
|
|
3
4
|
import useResizeObserver from '../../hooks/useElementDimensions.js';
|
|
5
|
+
import theme from '../../themes/theme.js';
|
|
4
6
|
import { getDividedSize, getMultipliedSize } from '../../utils/styledUtils.js';
|
|
5
7
|
import Icon from '../Icon/Icon.js';
|
|
6
8
|
import hlChevronDown from '../Icons/hlChevronDown.js';
|
|
@@ -8,59 +10,60 @@ import hlChevronUp from '../Icons/hlChevronUp.js';
|
|
|
8
10
|
import hlX from '../Icons/hlX.js';
|
|
9
11
|
|
|
10
12
|
const AccordionItemContainer = styled__default.div `
|
|
11
|
-
margin:
|
|
13
|
+
margin: 0 ${getDividedSize(theme.base.baseHeight, 2.5)};
|
|
12
14
|
border-bottom: 1px solid
|
|
13
|
-
${p => (p.isExpanded && p.highlightSelected ?
|
|
15
|
+
${p => (p.isExpanded && p.highlightSelected ? theme.color.hotPink : theme.color.gray15)};
|
|
14
16
|
`;
|
|
15
17
|
const AccordionItemTitle = styled__default.div `
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
+
font-size: ${theme.fontSize.default};
|
|
19
|
+
font-weight: ${theme.fontWeight.bold};
|
|
18
20
|
display: flex;
|
|
19
21
|
justify-content: space-between;
|
|
20
22
|
flex-direction: row;
|
|
21
23
|
cursor: pointer;
|
|
22
|
-
padding: ${
|
|
23
|
-
${
|
|
24
|
-
color: ${p => p.isExpanded && p.highlightSelected ?
|
|
24
|
+
padding: ${getMultipliedSize(theme.base.baseHeight, 1.6)}
|
|
25
|
+
${getMultipliedSize(theme.base.baseHeight, 2)};
|
|
26
|
+
color: ${p => (p.isExpanded && p.highlightSelected ? theme.color.hotPink : theme.color.text)};
|
|
25
27
|
transition: color 0.2s;
|
|
26
28
|
${p => p.highlightSelected &&
|
|
27
29
|
css `
|
|
28
30
|
&:hover,
|
|
29
31
|
&:active {
|
|
30
|
-
color: ${
|
|
32
|
+
color: ${theme.color.hotPink};
|
|
31
33
|
text-decoration: none;
|
|
32
34
|
}
|
|
33
35
|
`}
|
|
34
36
|
`;
|
|
35
37
|
const AccordionItemContentWrapper = styled__default.div `
|
|
36
38
|
overflow: hidden;
|
|
37
|
-
color: ${
|
|
39
|
+
color: ${theme.color.slateGray};
|
|
38
40
|
transition: all 0.2s ease;
|
|
39
41
|
height: ${p => (p.isExpanded ? p.maxHeight / 16 + 1.25 : 0)}rem;
|
|
40
|
-
padding: 0 ${
|
|
42
|
+
padding: 0 ${getMultipliedSize(theme.base.baseHeight, 2)};
|
|
41
43
|
visibility: ${p => (p.isExpanded ? 'visible' : 'hidden')};
|
|
42
44
|
`;
|
|
43
45
|
const AccordionItemContent = styled__default.div `
|
|
44
|
-
padding-bottom: ${
|
|
46
|
+
padding-bottom: ${getMultipliedSize(theme.base.baseHeight, 1.6)};
|
|
45
47
|
`;
|
|
46
48
|
const AccordionItemCloseButton = styled__default.div `
|
|
47
49
|
display: flex;
|
|
48
50
|
justify-content: flex-end;
|
|
49
|
-
line-height: ${
|
|
50
|
-
margin-bottom: ${
|
|
51
|
-
padding: 0 ${
|
|
52
|
-
gap: ${
|
|
53
|
-
color: ${
|
|
51
|
+
line-height: ${theme.lineHeight.default};
|
|
52
|
+
margin-bottom: ${getMultipliedSize(theme.base.baseHeight, 1.6)};
|
|
53
|
+
padding: 0 ${getMultipliedSize(theme.base.baseHeight, 2)};
|
|
54
|
+
gap: ${getMultipliedSize(theme.base.baseHeight, 1)};
|
|
55
|
+
color: ${theme.color.text};
|
|
54
56
|
cursor: pointer;
|
|
55
57
|
`;
|
|
56
58
|
/** @visibleName Accordion Item */
|
|
57
|
-
const AccordionItem = (
|
|
59
|
+
const AccordionItem = (_a) => {
|
|
60
|
+
var { hasCloseButton = false, highlightSelected = true } = _a, props = __rest(_a, ["hasCloseButton", "highlightSelected"]);
|
|
58
61
|
// Get height when element dimensions change
|
|
59
62
|
const { height: contentHeight, ref: contentRef } = useResizeObserver();
|
|
60
63
|
return (React.createElement(AccordionItemContainer, { id: props.id, "aria-expanded": Boolean(props.isExpanded), className: props.className, isExpanded: Boolean(props.isExpanded), highlightSelected: highlightSelected },
|
|
61
64
|
React.createElement(AccordionItemTitle, { tabIndex: 0, onClick: props.onClick, onKeyDown: props.onKeyDown, isExpanded: Boolean(props.isExpanded), highlightSelected: highlightSelected, role: "button" },
|
|
62
65
|
props.title,
|
|
63
|
-
|
|
66
|
+
props.isExpanded ? (React.createElement(Icon, { icon: hlChevronUp, position: "right", "aria-label": props.closeLabel })) : (React.createElement(Icon, { icon: hlChevronDown, position: "right", "aria-label": props.openLabel }))),
|
|
64
67
|
React.createElement(AccordionItemContentWrapper, { maxHeight: contentHeight, isExpanded: props.isExpanded },
|
|
65
68
|
React.createElement(AccordionItemContent, { ref: contentRef }, props.children)),
|
|
66
69
|
hasCloseButton && props.isExpanded && (React.createElement(AccordionItemCloseButton, { tabIndex: 0, onClick: props.onClick, onKeyDown: props.onKeyDown, "aria-label": props.closeLabel, role: "button" },
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import styled from '../../themes/styled.js';
|
|
3
4
|
import theme from '../../themes/theme.js';
|
|
@@ -41,7 +42,8 @@ const StyledButtonSecondary = styled(ButtonSecondary) `
|
|
|
41
42
|
padding: ${getMultipliedSize(theme.base.baseWidth, 0.6)};
|
|
42
43
|
`;
|
|
43
44
|
/** @visibleName Amount Selector */
|
|
44
|
-
const AmountSelector = (
|
|
45
|
+
const AmountSelector = (_a) => {
|
|
46
|
+
var { onChange, value = 1, step = 1, min = 1, max, disabled = false, readonly = true, 'data-testid': dataTestId } = _a, props = __rest(_a, ["onChange", "value", "step", "min", "max", "disabled", "readonly", 'data-testid']);
|
|
45
47
|
const isMinReached = (val) => val < min;
|
|
46
48
|
const isMaxReached = (val) => Boolean(max && val > max);
|
|
47
49
|
const isInRange = (val) => !isMinReached(val) && !isMaxReached(val);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type theme from '../../themes/theme';
|
|
1
2
|
export interface ButtonProps {
|
|
2
3
|
fullWidth?: boolean;
|
|
3
4
|
small?: boolean;
|
|
4
5
|
loading?: boolean | string;
|
|
5
6
|
darkBg?: boolean;
|
|
6
|
-
theme?:
|
|
7
|
+
theme?: typeof theme;
|
|
7
8
|
}
|
|
8
9
|
declare const ButtonBasicStyle: import("styled-components").StyledComponent<"button", {
|
|
9
10
|
base: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from '../../themes/styled.js';
|
|
3
|
-
import
|
|
3
|
+
import PixelLoader from '../PixelLoader/PixelLoader.js';
|
|
4
4
|
import ButtonBasicStyle from './ButtonBasicStyles.js';
|
|
5
|
+
import theme from '../../themes/theme.js';
|
|
5
6
|
|
|
6
7
|
const noop = () => { }; // tslint:disable-line
|
|
7
8
|
const StyledPixelLoader = styled(PixelLoader) `
|
|
@@ -16,7 +17,7 @@ const Button = (props) => {
|
|
|
16
17
|
// https://github.com/styled-components/styled-components/pull/2093
|
|
17
18
|
loading: loading ? loading.toString() : undefined, darkBg: darkBg, disabled: disabled, onClick: !disabled || !loading ? onClick : noop, onMouseDown: (!disabled || !loading) && onMouseDown ? onMouseDown : noop, className: className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, type: type },
|
|
18
19
|
!loading && (React.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, children)),
|
|
19
|
-
loading && React.createElement(StyledPixelLoader,
|
|
20
|
+
loading && (React.createElement(StyledPixelLoader, { color: darkBg ? theme.color.white : theme.color.black }))));
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
export default Button;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import ButtonIconProps from './ButtonIconProps';
|
|
2
|
+
import type ButtonIconProps from './ButtonIconProps';
|
|
3
3
|
/** @visibleName Icon Button Primary */
|
|
4
4
|
declare const ButtonIconPrimary: (props: ButtonIconProps) => JSX.Element;
|
|
5
5
|
/** @component */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from '../../themes/styled.js';
|
|
3
|
-
import
|
|
3
|
+
import PixelLoader from '../PixelLoader/PixelLoader.js';
|
|
4
4
|
import ButtonPrimaryStyles from './ButtonPrimaryStyles.js';
|
|
5
|
+
import theme from '../../themes/theme.js';
|
|
5
6
|
|
|
6
7
|
const noop = () => { }; // tslint:disable-line
|
|
7
8
|
const StyledPixelLoader = styled(PixelLoader) `
|
|
@@ -16,7 +17,7 @@ const ButtonPrimary = (props) => {
|
|
|
16
17
|
// https://github.com/styled-components/styled-components/pull/2093
|
|
17
18
|
loading: loading ? loading.toString() : undefined, darkBg: darkBg, disabled: disabled, onClick: !disabled || !loading ? onClick : noop, onMouseDown: (!disabled || !loading) && onMouseDown ? onMouseDown : noop, className: className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue, type: type },
|
|
18
19
|
!loading && (React.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, children)),
|
|
19
|
-
loading && React.createElement(StyledPixelLoader,
|
|
20
|
+
loading && React.createElement(StyledPixelLoader, { color: theme.color.white })));
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
export default ButtonPrimary;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import styled__default from 'styled-components';
|
|
2
|
+
import theme from '../../themes/theme.js';
|
|
2
3
|
|
|
3
4
|
const ButtonRoundStyles = styled__default.button `
|
|
4
5
|
display: inline-flex;
|
|
5
6
|
align-items: center;
|
|
6
7
|
justify-content: center;
|
|
7
|
-
background-color: ${
|
|
8
|
-
color: ${
|
|
8
|
+
background-color: ${theme.color.hotPink};
|
|
9
|
+
color: ${theme.color.white};
|
|
9
10
|
outline: none;
|
|
10
11
|
cursor: pointer;
|
|
11
12
|
text-align: center;
|
|
@@ -13,15 +14,15 @@ const ButtonRoundStyles = styled__default.button `
|
|
|
13
14
|
border-radius: 50%;
|
|
14
15
|
width: 2rem;
|
|
15
16
|
height: 2rem;
|
|
16
|
-
border-color: ${
|
|
17
|
+
border-color: ${theme.color.hotPink};
|
|
17
18
|
border-style: solid;
|
|
18
19
|
&:focus {
|
|
19
20
|
outline: none;
|
|
20
|
-
color: ${
|
|
21
|
+
color: ${theme.color.white};
|
|
21
22
|
}
|
|
22
23
|
&:hover,
|
|
23
24
|
&:active {
|
|
24
|
-
color: ${
|
|
25
|
+
color: ${theme.color.white};
|
|
25
26
|
}
|
|
26
27
|
`;
|
|
27
28
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from '../../themes/styled.js';
|
|
3
3
|
import theme from '../../themes/theme.js';
|
|
4
|
-
import
|
|
4
|
+
import PixelLoader from '../PixelLoader/PixelLoader.js';
|
|
5
5
|
import ButtonSecondaryStyles from './ButtonSecondaryStyles.js';
|
|
6
6
|
|
|
7
7
|
const noop = () => { }; // tslint:disable-line
|