@dnanpm/styleguide 3.8.1 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -8
- package/build/cjs/components/Accordion/Accordion.js +7 -12
- package/build/cjs/components/AccordionItem/AccordionItem.js +30 -35
- package/build/cjs/components/AmountSelector/AmountSelector.js +26 -30
- package/build/cjs/components/Box/Box.js +8 -13
- package/build/cjs/components/Button/Button.js +28 -33
- package/build/{es/components/Button → cjs/components/ButtonArrow}/ButtonArrow.d.ts +1 -1
- package/build/cjs/components/ButtonArrow/ButtonArrow.js +74 -0
- package/build/cjs/components/ButtonCard/ButtonCard.d.ts +70 -0
- package/build/cjs/components/ButtonCard/ButtonCard.js +135 -0
- package/build/{es/components/Button → cjs/components/ButtonClose}/ButtonClose.d.ts +1 -1
- package/build/cjs/components/{Button → ButtonClose}/ButtonClose.js +4 -8
- package/build/cjs/components/{Button → ButtonIcon}/ButtonIcon.d.ts +1 -1
- package/build/cjs/components/ButtonIcon/ButtonIcon.js +95 -0
- package/build/cjs/components/{Button → ButtonPrimary}/ButtonPrimary.d.ts +1 -1
- package/build/cjs/components/ButtonPrimary/ButtonPrimary.js +52 -0
- package/build/{es/components/Button → cjs/components/ButtonRound}/ButtonRound.d.ts +1 -1
- package/build/cjs/components/ButtonRound/ButtonRound.js +33 -0
- package/build/cjs/components/{Button → ButtonSecondary}/ButtonSecondary.d.ts +1 -1
- package/build/cjs/components/ButtonSecondary/ButtonSecondary.js +52 -0
- package/build/cjs/components/Carousel/Carousel.js +45 -49
- package/build/cjs/components/Checkbox/Checkbox.js +23 -27
- package/build/cjs/components/Chip/Chip.js +11 -16
- package/build/cjs/components/DateTimePicker/DateTimePicker.js +77 -83
- package/build/cjs/components/Divider/Divider.js +5 -10
- package/build/cjs/components/DnaLogo/DnaLogo.js +14 -18
- package/build/cjs/components/Drawer/Drawer.js +50 -55
- package/build/cjs/components/EmptyState/EmptyState.js +8 -12
- package/build/cjs/components/Expander/Expander.js +14 -18
- package/build/cjs/components/Floater/Floater.js +3 -8
- package/build/cjs/components/Footer/Components/FooterComponents.js +59 -65
- package/build/cjs/components/Footer/Footer.js +63 -67
- package/build/cjs/components/Footer/context/FooterContext.js +2 -2
- package/build/cjs/components/Icon/Icon.js +9 -13
- package/build/cjs/components/Icons/Small/hlArrowBackSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlArrowForwardSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlArrowUnderSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlCalendarSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlChevronDownSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlChevronLeftSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlChevronRightSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlChevronUpSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlClockSmall.js +4 -8
- package/build/cjs/components/Icons/Small/hlDownloadSmall.js +5 -9
- package/build/cjs/components/Icons/Small/hlExternalSmall.js +3 -7
- package/build/cjs/components/Icons/Small/hlUploadSmall.js +5 -9
- package/build/cjs/components/Icons/Social/facebook.js +3 -7
- package/build/cjs/components/Icons/Social/instagram.js +3 -7
- package/build/cjs/components/Icons/Social/linkedin.js +3 -7
- package/build/cjs/components/Icons/Social/tiktok.js +3 -7
- package/build/cjs/components/Icons/Social/twitter.js +3 -7
- package/build/cjs/components/Icons/Social/youtube.js +3 -7
- package/build/cjs/components/Icons/hl404.js +3 -7
- package/build/cjs/components/Icons/hl4gSim.js +3 -7
- package/build/cjs/components/Icons/hl5gSim.js +3 -7
- package/build/cjs/components/Icons/hlBattery.js +5 -9
- package/build/cjs/components/Icons/hlBell.js +3 -7
- package/build/cjs/components/Icons/hlCableTVCard.js +3 -7
- package/build/cjs/components/Icons/hlCalendar.js +14 -18
- package/build/cjs/components/Icons/hlCall.js +3 -7
- package/build/cjs/components/Icons/hlCameraBack.js +5 -9
- package/build/cjs/components/Icons/hlCameraFront.js +4 -8
- package/build/cjs/components/Icons/hlCart.js +5 -9
- package/build/cjs/components/Icons/hlCartEmpty.js +5 -9
- package/build/cjs/components/Icons/hlChat.js +6 -10
- package/build/cjs/components/Icons/hlCheck.js +3 -7
- package/build/cjs/components/Icons/hlChevronDown.js +3 -7
- package/build/cjs/components/Icons/hlChevronLeft.js +3 -7
- package/build/cjs/components/Icons/hlChevronRight.js +3 -7
- package/build/cjs/components/Icons/hlChevronUp.js +3 -7
- package/build/cjs/components/Icons/hlCompensation.js +3 -7
- package/build/cjs/components/Icons/hlCookie.js +3 -7
- package/build/cjs/components/Icons/hlCopy.js +4 -8
- package/build/cjs/components/Icons/hlCoupon.js +5 -9
- package/build/cjs/components/Icons/hlDelivery.js +3 -7
- package/build/cjs/components/Icons/hlDigiturva.js +3 -7
- package/build/cjs/components/Icons/hlDisplaySize.js +5 -9
- package/build/cjs/components/Icons/hlDocument.js +4 -8
- package/build/cjs/components/Icons/hlDownload.js +5 -9
- package/build/cjs/components/Icons/hlEnvelope.js +3 -7
- package/build/cjs/components/Icons/hlError.js +5 -9
- package/build/cjs/components/Icons/hlEuro.js +3 -7
- package/build/cjs/components/Icons/hlExclamationMark.js +3 -7
- package/build/cjs/components/Icons/hlExpand.js +3 -7
- package/build/cjs/components/Icons/hlExternal.js +3 -7
- package/build/cjs/components/Icons/hlEyeClosed.js +3 -7
- package/build/cjs/components/Icons/hlEyeOpen.js +4 -8
- package/build/cjs/components/Icons/hlFaceId.js +3 -7
- package/build/cjs/components/Icons/hlFastDelivery.js +3 -7
- package/build/cjs/components/Icons/hlFingerprint.js +7 -11
- package/build/cjs/components/Icons/hlGlobe.js +3 -7
- package/build/cjs/components/Icons/hlHeadphones.js +3 -7
- package/build/cjs/components/Icons/hlHeadset.js +5 -9
- package/build/cjs/components/Icons/hlHeart.js +3 -7
- package/build/cjs/components/Icons/hlHome.js +3 -7
- package/build/cjs/components/Icons/hlHub.js +4 -8
- package/build/cjs/components/Icons/hlImage.js +3 -7
- package/build/cjs/components/Icons/hlInfo.js +5 -9
- package/build/cjs/components/Icons/hlInstallment.js +4 -8
- package/build/cjs/components/Icons/hlIotSim.js +4 -8
- package/build/cjs/components/Icons/hlLaptop.js +3 -7
- package/build/cjs/components/Icons/hlLink.js +4 -8
- package/build/cjs/components/Icons/hlLiveVideo.js +3 -7
- package/build/cjs/components/Icons/hlLock.js +5 -9
- package/build/cjs/components/Icons/hlMagnifyingGlass.js +4 -8
- package/build/cjs/components/Icons/hlMarker.js +4 -8
- package/build/cjs/components/Icons/hlMemory.js +4 -8
- package/build/cjs/components/Icons/hlMenu.js +3 -7
- package/build/cjs/components/Icons/hlMinimize.js +3 -7
- package/build/cjs/components/Icons/hlMinus.js +3 -7
- package/build/cjs/components/Icons/hlMobileData.js +3 -7
- package/build/cjs/components/Icons/hlMobilePayment.js +5 -9
- package/build/cjs/components/Icons/hlModem.js +7 -11
- package/build/cjs/components/Icons/hlMore.js +5 -9
- package/build/cjs/components/Icons/hlOs.js +4 -8
- package/build/cjs/components/Icons/hlPackage.js +3 -7
- package/build/cjs/components/Icons/hlPaperclip.js +3 -7
- package/build/cjs/components/Icons/hlPaytime.js +3 -7
- package/build/cjs/components/Icons/hlPen.js +3 -7
- package/build/cjs/components/Icons/hlPerson.js +3 -7
- package/build/cjs/components/Icons/hlPhone.js +4 -8
- package/build/cjs/components/Icons/hlPlaylist.js +3 -7
- package/build/cjs/components/Icons/hlPlus.js +4 -8
- package/build/cjs/components/Icons/hlPrepaid.js +3 -7
- package/build/cjs/components/Icons/hlProcessor.js +4 -8
- package/build/cjs/components/Icons/hlServices.js +3 -7
- package/build/cjs/components/Icons/hlSettings.js +3 -7
- package/build/cjs/components/Icons/hlShield.js +4 -8
- package/build/cjs/components/Icons/hlSim.js +4 -8
- package/build/cjs/components/Icons/hlSimSimple.js +5 -9
- package/build/cjs/components/Icons/hlSmile.js +6 -10
- package/build/cjs/components/Icons/hlSpeechBubble.js +4 -8
- package/build/cjs/components/Icons/hlSquaretrade.js +3 -7
- package/build/cjs/components/Icons/hlStar.js +3 -7
- package/build/cjs/components/Icons/hlStarFilled.js +3 -7
- package/build/cjs/components/Icons/hlTrash.js +4 -8
- package/build/cjs/components/Icons/hlTv.js +3 -7
- package/build/cjs/components/Icons/hlUnlock.js +4 -8
- package/build/cjs/components/Icons/hlUpload.js +5 -9
- package/build/cjs/components/Icons/hlWarning.js +5 -9
- package/build/cjs/components/Icons/hlWifi.js +5 -9
- package/build/cjs/components/Icons/hlWrench.js +3 -7
- package/build/cjs/components/Icons/hlX.js +3 -7
- package/build/cjs/components/Icons/index.js +109 -111
- package/build/cjs/components/InfoDialog/InfoDialog.js +18 -22
- package/build/cjs/components/Input/Input.js +45 -49
- package/build/cjs/components/Label/Label.js +14 -18
- package/build/cjs/components/LabelText/LabelText.js +11 -15
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/BusinessMenu.js +23 -27
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/DesktopMenu.js +59 -63
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/LanguageSelector.js +11 -15
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/LinkModifier.js +6 -10
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/LoginTooltip.js +5 -9
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +2 -3
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +26 -30
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -2
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +11 -11
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MinicartTooltip.js +6 -10
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/MobileMenu.js +50 -54
- package/build/cjs/components/MainHeaderNavigation/ChildComponents/PageSearch.js +5 -9
- package/build/cjs/components/MainHeaderNavigation/MainHeaderNavigation.js +35 -39
- package/build/cjs/components/MainHeaderNavigation/context/MobileMenuContext.js +1 -1
- package/build/cjs/components/MainHeaderNavigation/context/NavContext.js +1 -1
- package/build/cjs/components/MainHeaderNavigation/globalNavStyles.d.ts +5 -5
- package/build/cjs/components/MainHeaderNavigation/globalNavStyles.js +48 -50
- package/build/cjs/components/MainNavigation/ChildComponents/BusinessMenu.js +14 -18
- package/build/cjs/components/MainNavigation/ChildComponents/DesktopMenu.js +49 -53
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/HeaderNavigationElements.js +44 -48
- package/build/cjs/components/MainNavigation/ChildComponents/LanguageSelector.js +11 -15
- package/build/cjs/components/MainNavigation/ChildComponents/LinkModifier.js +7 -11
- package/build/cjs/components/MainNavigation/ChildComponents/LoginTooltip.js +5 -9
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenu.js +21 -25
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +1 -1
- package/build/cjs/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.js +7 -7
- package/build/cjs/components/MainNavigation/ChildComponents/MinicartTooltip.js +6 -10
- package/build/cjs/components/MainNavigation/ChildComponents/MobileMenu.js +52 -56
- package/build/cjs/components/MainNavigation/ChildComponents/PageSearch.js +5 -9
- package/build/cjs/components/MainNavigation/ChildComponents/Ribbon.js +20 -24
- package/build/cjs/components/MainNavigation/MainNavigation.d.ts +4 -1
- package/build/cjs/components/MainNavigation/MainNavigation.js +24 -25
- package/build/cjs/components/MainNavigation/context/MobileMenuContext.js +1 -1
- package/build/cjs/components/MainNavigation/context/NavContext.js +1 -1
- package/build/cjs/components/MainNavigation/globalNavStyles.d.ts +5 -5
- package/build/cjs/components/MainNavigation/globalNavStyles.js +12 -14
- package/build/cjs/components/Modal/Modal.js +21 -26
- package/build/cjs/components/Notification/Notification.js +18 -23
- package/build/cjs/components/NotificationBadge/NotificationBadge.js +8 -12
- package/build/cjs/components/Overlay/Overlay.d.ts +49 -0
- package/build/cjs/components/Overlay/Overlay.js +80 -0
- package/build/cjs/components/Pill/Pill.js +19 -24
- package/build/cjs/components/PixelLoader/PixelLoader.js +9 -13
- package/build/cjs/components/PriorityNavigation/PriorityNavigation.d.ts +10 -0
- package/build/cjs/components/PriorityNavigation/PriorityNavigation.js +89 -54
- package/build/cjs/components/PriorityNavigationItem/PriorityNavigationItem.js +20 -15
- package/build/cjs/components/ProgressIndicator/ProgressIndicator.js +30 -34
- package/build/cjs/components/RadioButton/RadioButton.js +11 -15
- package/build/cjs/components/ReadMore/ReadMore.js +14 -18
- package/build/cjs/components/Search/Search.js +17 -21
- package/build/cjs/components/SecondaryNavigation/SecondaryNavigation.js +53 -57
- package/build/cjs/components/Selectbox/Selectbox.js +44 -49
- package/build/cjs/components/Switch/Switch.js +18 -19
- package/build/cjs/components/Tab/Tab.js +29 -33
- package/build/cjs/components/Tabs/Tabs.js +15 -19
- package/build/cjs/components/Textarea/Textarea.js +29 -33
- package/build/cjs/components/Toaster/Toaster.js +20 -25
- package/build/cjs/components/Tooltip/Tooltip.js +21 -25
- package/build/cjs/components/TooltipMenu/ChildComponents/TooltipMenuExportedStyles.js +2 -4
- package/build/cjs/components/TooltipMenu/TooltipMenu.js +20 -24
- package/build/cjs/components/index.d.ts +8 -6
- package/build/cjs/hooks/useCloseOutsideOrElementClicked.js +1 -1
- package/build/cjs/hooks/useDebounce.js +1 -1
- package/build/cjs/hooks/useDocHeight.js +2 -2
- package/build/cjs/hooks/useOutsideClick.js +1 -1
- package/build/cjs/hooks/useResizeObserver.d.ts +1 -1
- package/build/cjs/hooks/useResizeObserver.js +1 -1
- package/build/cjs/hooks/useScrollPosition.d.ts +3 -1
- package/build/cjs/hooks/useScrollPosition.js +1 -1
- package/build/cjs/hooks/useWindowSize.js +1 -1
- package/build/cjs/index.js +172 -170
- package/build/cjs/themes/globalStyles.js +78 -80
- package/build/cjs/themes/gridTheme.js +1 -1
- package/build/cjs/themes/styled.js +2 -2
- package/build/cjs/themes/theme.js +11 -11
- package/build/cjs/themes/themeComponents/base.js +2 -2
- package/build/cjs/themes/themeComponents/breakpoints.js +1 -1
- package/build/cjs/themes/themeComponents/color.js +1 -1
- package/build/cjs/themes/themeComponents/fontFamily.js +1 -1
- package/build/cjs/themes/themeComponents/fontSize.js +14 -14
- package/build/cjs/themes/themeComponents/fontWeight.js +1 -1
- package/build/cjs/themes/themeComponents/forms.js +2 -2
- package/build/cjs/themes/themeComponents/lineHeight.js +14 -14
- package/build/cjs/themes/themeComponents/navigation.js +1 -1
- package/build/cjs/themes/themeComponents/radius.js +1 -1
- package/build/cjs/utils/common.d.ts +1 -1
- package/build/cjs/utils/common.js +4 -4
- package/build/cjs/utils/createStyled.d.ts +2 -163
- package/build/cjs/utils/createStyled.js +4 -5
- package/build/cjs/utils/styledUtils.js +2 -4
- package/build/es/components/AmountSelector/AmountSelector.js +1 -1
- package/build/{cjs/components/Button → es/components/ButtonArrow}/ButtonArrow.d.ts +1 -1
- package/build/es/components/{Button → ButtonArrow}/ButtonArrow.js +2 -2
- package/build/es/components/ButtonCard/ButtonCard.d.ts +70 -0
- package/build/es/components/ButtonCard/ButtonCard.js +131 -0
- package/build/{cjs/components/Button → es/components/ButtonClose}/ButtonClose.d.ts +1 -1
- package/build/es/components/{Button → ButtonIcon}/ButtonIcon.d.ts +1 -1
- package/build/es/components/{Button → ButtonPrimary}/ButtonPrimary.d.ts +1 -1
- package/build/es/components/{Button → ButtonPrimary}/ButtonPrimary.js +1 -1
- package/build/{cjs/components/Button → es/components/ButtonRound}/ButtonRound.d.ts +1 -1
- package/build/es/components/{Button → ButtonRound}/ButtonRound.js +1 -1
- package/build/es/components/{Button → ButtonSecondary}/ButtonSecondary.d.ts +1 -1
- package/build/es/components/{Button → ButtonSecondary}/ButtonSecondary.js +1 -1
- package/build/es/components/Carousel/Carousel.js +2 -2
- package/build/es/components/DateTimePicker/DateTimePicker.js +1 -1
- package/build/es/components/Drawer/Drawer.js +3 -3
- package/build/es/components/Expander/Expander.js +1 -1
- package/build/es/components/Footer/Components/FooterComponents.js +1 -1
- package/build/es/components/Input/Input.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.d.ts +2 -3
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenu.js +1 -1
- package/build/es/components/MainHeaderNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +2 -2
- package/build/es/components/MainHeaderNavigation/globalNavStyles.d.ts +5 -5
- package/build/es/components/MainNavigation/ChildComponents/HeaderNavigationElements.d.ts +1 -1
- package/build/es/components/MainNavigation/ChildComponents/MainNavTooltipMenuExportedStyles.d.ts +1 -1
- package/build/es/components/MainNavigation/MainNavigation.d.ts +4 -1
- package/build/es/components/MainNavigation/MainNavigation.js +4 -1
- package/build/es/components/MainNavigation/globalNavStyles.d.ts +5 -5
- package/build/es/components/Modal/Modal.js +1 -1
- package/build/es/components/Notification/Notification.js +1 -1
- package/build/es/components/Overlay/Overlay.d.ts +49 -0
- package/build/es/components/Overlay/Overlay.js +76 -0
- package/build/es/components/PriorityNavigation/PriorityNavigation.d.ts +10 -0
- package/build/es/components/PriorityNavigation/PriorityNavigation.js +64 -25
- package/build/es/components/PriorityNavigationItem/PriorityNavigationItem.js +10 -1
- package/build/es/components/ReadMore/ReadMore.js +1 -1
- package/build/es/components/Search/Search.js +1 -1
- package/build/es/components/Toaster/Toaster.js +1 -1
- package/build/es/components/index.d.ts +8 -6
- package/build/es/hooks/useResizeObserver.d.ts +1 -1
- package/build/es/hooks/useScrollPosition.d.ts +3 -1
- package/build/es/index.js +8 -6
- package/build/es/themes/themeComponents/base.js +1 -1
- package/build/es/themes/themeComponents/fontSize.js +13 -13
- package/build/es/themes/themeComponents/forms.js +1 -1
- package/build/es/themes/themeComponents/lineHeight.js +13 -13
- package/build/es/utils/common.d.ts +1 -1
- package/build/es/utils/createStyled.d.ts +2 -163
- package/package.json +45 -45
- package/CHANGELOG.md +0 -561
- package/build/cjs/components/Button/ButtonArrow.js +0 -79
- package/build/cjs/components/Button/ButtonIcon.js +0 -100
- package/build/cjs/components/Button/ButtonPrimary.js +0 -56
- package/build/cjs/components/Button/ButtonRound.js +0 -38
- package/build/cjs/components/Button/ButtonSecondary.js +0 -56
- /package/build/es/components/{Button → ButtonClose}/ButtonClose.js +0 -0
- /package/build/es/components/{Button → ButtonIcon}/ButtonIcon.js +0 -0
|
@@ -10,20 +10,15 @@ var styled = require('../../themes/styled.js');
|
|
|
10
10
|
var theme = require('../../themes/theme.js');
|
|
11
11
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
12
12
|
var Box = require('../Box/Box.js');
|
|
13
|
-
var ButtonClose = require('../
|
|
13
|
+
var ButtonClose = require('../ButtonClose/ButtonClose.js');
|
|
14
14
|
var Icon = require('../Icon/Icon.js');
|
|
15
15
|
|
|
16
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
-
|
|
18
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
|
-
var ReactModal__default = /*#__PURE__*/_interopDefaultLegacy(ReactModal);
|
|
20
|
-
|
|
21
16
|
const GlobalStyle = styled.createGlobalStyle `
|
|
22
17
|
body.ReactModal__Body--open {
|
|
23
18
|
overflow: hidden;
|
|
24
19
|
}
|
|
25
20
|
`;
|
|
26
|
-
const StyledReactModal = styled
|
|
21
|
+
const StyledReactModal = styled.default(ReactModal) `
|
|
27
22
|
position: relative;
|
|
28
23
|
width: 100vw;
|
|
29
24
|
height: 100dvh;
|
|
@@ -36,7 +31,7 @@ const StyledReactModal = styled["default"](ReactModal__default["default"]) `
|
|
|
36
31
|
height: auto;
|
|
37
32
|
`};
|
|
38
33
|
`;
|
|
39
|
-
const StyledOverlay = styled
|
|
34
|
+
const StyledOverlay = styled.default.div `
|
|
40
35
|
display: flex;
|
|
41
36
|
justify-content: center;
|
|
42
37
|
align-items: center;
|
|
@@ -46,47 +41,47 @@ const StyledOverlay = styled["default"].div `
|
|
|
46
41
|
left: 0;
|
|
47
42
|
right: 0;
|
|
48
43
|
z-index: 9999;
|
|
49
|
-
background-color: ${theme
|
|
44
|
+
background-color: ${theme.default.color.background.plum.default}${theme.default.color.transparency.T40};
|
|
50
45
|
animation: fadeIn 0.2s ease-in-out;
|
|
51
46
|
|
|
52
47
|
@keyframes fadeIn {
|
|
53
48
|
0% {
|
|
54
|
-
background-color: ${theme
|
|
49
|
+
background-color: ${theme.default.color.background.plum.default}${theme.default.color.transparency.T0};
|
|
55
50
|
}
|
|
56
51
|
|
|
57
52
|
100% {
|
|
58
|
-
background-color: ${theme
|
|
53
|
+
background-color: ${theme.default.color.background.plum.default}${theme.default.color.transparency.T40};
|
|
59
54
|
}
|
|
60
55
|
}
|
|
61
56
|
`;
|
|
62
|
-
const StyledBox = styled
|
|
57
|
+
const StyledBox = styled.default(Box.default) `
|
|
63
58
|
height: 100%;
|
|
64
59
|
overflow-y: auto;
|
|
65
60
|
`;
|
|
66
|
-
const StyledContent = styled
|
|
61
|
+
const StyledContent = styled.default.div `
|
|
67
62
|
&:focus {
|
|
68
63
|
outline: none;
|
|
69
64
|
}
|
|
70
65
|
`;
|
|
71
|
-
const Title = styled
|
|
72
|
-
margin: 0 auto ${styledUtils.getMultipliedSize(theme
|
|
66
|
+
const Title = styled.default.h2 `
|
|
67
|
+
margin: 0 auto ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2)};
|
|
73
68
|
`;
|
|
74
|
-
const ModalOverlay = ({ ref, onClick, onMouseDown, className }, contentElement) => (
|
|
69
|
+
const ModalOverlay = ({ ref, onClick, onMouseDown, className }, contentElement) => (React.createElement(StyledOverlay, { ref: ref, onClick: onClick, onMouseDown: onMouseDown, className: className }, contentElement));
|
|
75
70
|
const ModalContent = (_a, children) => {
|
|
76
71
|
var { ref, tabIndex, role, onKeyDown, onMouseDown, onMouseUp, onClick, className } = _a, contentProps = tslib.__rest(_a, ["ref", "tabIndex", "role", "onKeyDown", "onMouseDown", "onMouseUp", "onClick", "className"]);
|
|
77
|
-
return (
|
|
72
|
+
return (React.createElement(StyledContent, { ref: ref, tabIndex: tabIndex, role: role, onKeyDown: onKeyDown, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onClick: onClick, "aria-label": contentProps['aria-label'], "aria-modal": contentProps['aria-modal'], className: className }, children));
|
|
78
73
|
};
|
|
79
74
|
const Modal = (_a) => {
|
|
80
75
|
var { appElement = '#__next', maxWidth = '37.5rem', closeButton = true, isClosable = true, 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["appElement", "maxWidth", "closeButton", "isClosable", 'data-testid']);
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
closeButton && isClosable && (
|
|
86
|
-
|
|
87
|
-
props.title &&
|
|
76
|
+
ReactModal.setAppElement(appElement);
|
|
77
|
+
return (React.createElement(React.Fragment, null,
|
|
78
|
+
React.createElement(StyledReactModal, { id: props.id, isOpen: props.isOpen, overlayElement: ModalOverlay, contentElement: ModalContent, onRequestClose: props.onRequestClose, portalClassName: props.className, contentLabel: props.contentLabel, shouldCloseOnEsc: isClosable, shouldCloseOnOverlayClick: isClosable, maxWidth: maxWidth },
|
|
79
|
+
React.createElement(StyledBox, { elevation: "extraHigh", "data-testid": dataTestId },
|
|
80
|
+
closeButton && isClosable && (React.createElement(ButtonClose.default, { onClick: props.onRequestClose, "aria-label": props.closeLabel, "data-testid": dataTestId && `${dataTestId}-close-button` },
|
|
81
|
+
React.createElement(Icon.default, { icon: icons.Close }))),
|
|
82
|
+
props.title && React.createElement(Title, null, props.title),
|
|
88
83
|
props.children)),
|
|
89
|
-
|
|
84
|
+
React.createElement(GlobalStyle, null)));
|
|
90
85
|
};
|
|
91
86
|
|
|
92
|
-
exports
|
|
87
|
+
exports.default = Modal;
|
|
@@ -7,53 +7,48 @@ var icons = require('@dnanpm/icons');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var styled = require('styled-components');
|
|
9
9
|
var theme = require('../../themes/theme.js');
|
|
10
|
-
var ButtonClose = require('../
|
|
10
|
+
var ButtonClose = require('../ButtonClose/ButtonClose.js');
|
|
11
11
|
var Icon = require('../Icon/Icon.js');
|
|
12
12
|
|
|
13
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
-
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
17
|
-
|
|
18
13
|
const iconsMap = {
|
|
19
14
|
info: icons.Info,
|
|
20
15
|
success: icons.Check,
|
|
21
16
|
warning: icons.Warning,
|
|
22
17
|
error: icons.Error,
|
|
23
18
|
};
|
|
24
|
-
const NotificationWrapper =
|
|
19
|
+
const NotificationWrapper = styled.div `
|
|
25
20
|
display: flex;
|
|
26
21
|
gap: 1rem;
|
|
27
|
-
line-height: ${theme
|
|
28
|
-
color: ${theme
|
|
29
|
-
background-color: ${theme
|
|
30
|
-
border-radius: ${theme
|
|
31
|
-
border: 2px solid ${({ $type }) => theme
|
|
22
|
+
line-height: ${theme.default.lineHeight.default};
|
|
23
|
+
color: ${theme.default.color.text.black};
|
|
24
|
+
background-color: ${theme.default.color.background.white.default};
|
|
25
|
+
border-radius: ${theme.default.radius.s};
|
|
26
|
+
border: 2px solid ${({ $type }) => theme.default.color.notification[$type]};
|
|
32
27
|
`;
|
|
33
|
-
const IconWrapper =
|
|
28
|
+
const IconWrapper = styled.div `
|
|
34
29
|
display: flex;
|
|
35
30
|
align-items: center;
|
|
36
31
|
padding: 0.5rem;
|
|
37
|
-
background-color: ${({ $type }) => theme
|
|
32
|
+
background-color: ${({ $type }) => theme.default.color.notification[$type]};
|
|
38
33
|
`;
|
|
39
|
-
const ContentWrapper =
|
|
34
|
+
const ContentWrapper = styled.span `
|
|
40
35
|
margin: auto 0;
|
|
41
36
|
padding: 0.5rem 0;
|
|
42
37
|
width: 100%;
|
|
43
38
|
`;
|
|
44
|
-
const ButtonCloseStyled =
|
|
39
|
+
const ButtonCloseStyled = styled(ButtonClose.default) `
|
|
45
40
|
position: static;
|
|
46
41
|
margin: auto 0.5rem;
|
|
47
42
|
`;
|
|
48
43
|
/** @visibleName Notification */
|
|
49
44
|
const Notification = (_a) => {
|
|
50
45
|
var { type = 'info', 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["type", 'data-testid']);
|
|
51
|
-
return !props.dismissed ? (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
props.closeButton && (
|
|
56
|
-
|
|
46
|
+
return !props.dismissed ? (React.createElement(NotificationWrapper, { "$type": type, className: props.className, "data-testid": dataTestId },
|
|
47
|
+
React.createElement(IconWrapper, { "$type": type },
|
|
48
|
+
React.createElement(Icon.default, { icon: iconsMap[type], size: "2rem", color: theme.default.color.default.white })),
|
|
49
|
+
React.createElement(ContentWrapper, null, props.children),
|
|
50
|
+
props.closeButton && (React.createElement(ButtonCloseStyled, { onClick: props.onClickCloseButton },
|
|
51
|
+
React.createElement(Icon.default, { icon: icons.Close, color: "currentColor" }))))) : null;
|
|
57
52
|
};
|
|
58
53
|
|
|
59
|
-
exports
|
|
54
|
+
exports.default = Notification;
|
|
@@ -7,29 +7,25 @@ var React = require('react');
|
|
|
7
7
|
var styled = require('../../themes/styled.js');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
-
|
|
14
|
-
const NotificationBadgeElement = styled["default"].div `
|
|
10
|
+
const NotificationBadgeElement = styled.default.div `
|
|
15
11
|
display: flex;
|
|
16
12
|
justify-content: center;
|
|
17
13
|
align-items: center;
|
|
18
|
-
font-size: ${theme
|
|
19
|
-
font-weight: ${theme
|
|
14
|
+
font-size: ${theme.default.fontSize.xs};
|
|
15
|
+
font-weight: ${theme.default.fontWeight.bold};
|
|
20
16
|
position: ${({ position }) => position || 'absolute'};
|
|
21
17
|
top: ${({ top }) => top || '0'};
|
|
22
18
|
right: ${({ right }) => right || '0'};
|
|
23
19
|
width: 1rem;
|
|
24
20
|
height: 1rem;
|
|
25
|
-
color: ${theme
|
|
26
|
-
background-color: ${theme
|
|
27
|
-
border-radius: ${theme
|
|
21
|
+
color: ${theme.default.color.text.white};
|
|
22
|
+
background-color: ${theme.default.color.notification.error};
|
|
23
|
+
border-radius: ${theme.default.radius.circle};
|
|
28
24
|
`;
|
|
29
25
|
/** @visibleName Notification Badge */
|
|
30
26
|
const NotificationBadge = (_a) => {
|
|
31
27
|
var { 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ['data-testid']);
|
|
32
|
-
return (
|
|
28
|
+
return (React.createElement(NotificationBadgeElement, { id: props.id, position: props.position, top: props.top, right: props.right, className: props.className, "data-testid": dataTestId }, props.children));
|
|
33
29
|
};
|
|
34
30
|
|
|
35
|
-
exports
|
|
31
|
+
exports.default = NotificationBadge;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface Props {
|
|
4
|
+
/**
|
|
5
|
+
* Unique ID for the component
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Content of Overlay
|
|
10
|
+
*/
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* On overlay element mouse click
|
|
14
|
+
*/
|
|
15
|
+
onClick?: (e: MouseEvent<HTMLElement>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Allows to set DOM node to which Overlay component will be appended. The node must already exist.
|
|
18
|
+
* Use `false` to render in place without use of `createPortal`
|
|
19
|
+
*
|
|
20
|
+
* For more information about `createPortal`, see https://react.dev/reference/react-dom/createPortal
|
|
21
|
+
*
|
|
22
|
+
* @default 'body'
|
|
23
|
+
*/
|
|
24
|
+
portalContainer?: string | false;
|
|
25
|
+
/**
|
|
26
|
+
* Allows to hide application from assistive screenreaders and other assistive technologies while the Overlay is shown
|
|
27
|
+
*
|
|
28
|
+
* @default '#__next'
|
|
29
|
+
*/
|
|
30
|
+
appElement?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Allows to set `overflow: hidden` CSS attribute to body element
|
|
33
|
+
*
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
preventBodyScroll?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Allows to pass testid string for testing purposes
|
|
39
|
+
*/
|
|
40
|
+
'data-testid'?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Allows to pass a custom className
|
|
43
|
+
*/
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
/** @visibleName Overlay */
|
|
47
|
+
declare const Overlay: ({ portalContainer: portalContainerSelector, appElement: appElementSelector, preventBodyScroll, "data-testid": dataTestId, ...props }: Props) => React.JSX.Element;
|
|
48
|
+
/** @component */
|
|
49
|
+
export default Overlay;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var reactDom = require('react-dom');
|
|
8
|
+
var styled = require('../../themes/styled.js');
|
|
9
|
+
var theme = require('../../themes/theme.js');
|
|
10
|
+
|
|
11
|
+
const Element = styled.default.div `
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 0;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
background-color: ${theme.default.color.background.plum.default}${theme.default.color.transparency.T40};
|
|
18
|
+
animation: fadeIn 0.2s ease-in-out;
|
|
19
|
+
|
|
20
|
+
@keyframes fadeIn {
|
|
21
|
+
0% {
|
|
22
|
+
background-color: ${theme.default.color.background.plum.default}${theme.default.color.transparency.T0};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
100% {
|
|
26
|
+
background-color: ${theme.default.color.background.plum.default}${theme.default.color.transparency.T40};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
/** @visibleName Overlay */
|
|
31
|
+
const Overlay = (_a) => {
|
|
32
|
+
var { portalContainer: portalContainerSelector = 'body', appElement: appElementSelector = '#__next', preventBodyScroll = true, 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["portalContainer", "appElement", "preventBodyScroll", 'data-testid']);
|
|
33
|
+
const contentRef = React.useRef(null);
|
|
34
|
+
const portalContainer = portalContainerSelector
|
|
35
|
+
? document.querySelector(portalContainerSelector)
|
|
36
|
+
: null;
|
|
37
|
+
const appElement = document.querySelector(appElementSelector);
|
|
38
|
+
const overlayElement = (React.createElement(Element, { id: props.id, onClick: props.onClick, className: props.className, "data-testid": dataTestId },
|
|
39
|
+
React.createElement("div", { ref: contentRef, tabIndex: -1 }, props.children)));
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
if (preventBodyScroll) {
|
|
42
|
+
document.body.style.setProperty('overflow', 'hidden');
|
|
43
|
+
return () => {
|
|
44
|
+
document.body.style.removeProperty('overflow');
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
});
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
var _a;
|
|
51
|
+
if (appElement) {
|
|
52
|
+
const focusTrapStart = document.createElement('div');
|
|
53
|
+
focusTrapStart.setAttribute('tabindex', '0');
|
|
54
|
+
focusTrapStart.addEventListener('focus', () => {
|
|
55
|
+
var _a;
|
|
56
|
+
(_a = contentRef === null || contentRef === void 0 ? void 0 : contentRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
57
|
+
});
|
|
58
|
+
const focusTrapEnd = focusTrapStart.cloneNode();
|
|
59
|
+
focusTrapEnd.addEventListener('focus', () => {
|
|
60
|
+
var _a;
|
|
61
|
+
(_a = contentRef === null || contentRef === void 0 ? void 0 : contentRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
62
|
+
});
|
|
63
|
+
(_a = contentRef === null || contentRef === void 0 ? void 0 : contentRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
64
|
+
document.body.prepend(focusTrapStart);
|
|
65
|
+
document.body.append(focusTrapEnd);
|
|
66
|
+
appElement.setAttribute('aria-hidden', 'true');
|
|
67
|
+
return () => {
|
|
68
|
+
document.body.removeChild(focusTrapStart);
|
|
69
|
+
document.body.removeChild(focusTrapEnd);
|
|
70
|
+
appElement.removeAttribute('aria-hidden');
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return undefined;
|
|
74
|
+
});
|
|
75
|
+
return portalContainerSelector === false
|
|
76
|
+
? overlayElement
|
|
77
|
+
: reactDom.createPortal(overlayElement, portalContainer !== null && portalContainer !== void 0 ? portalContainer : document.body);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
exports.default = Overlay;
|
|
@@ -8,55 +8,50 @@ var styled = require('styled-components');
|
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
var styledUtils = require('../../utils/styledUtils.js');
|
|
10
10
|
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
15
|
-
|
|
16
11
|
const getCursor = ({ isDisabled, as }) => as !== 'div' && `cursor: ${isDisabled ? 'not-allowed' : 'pointer'};`;
|
|
17
12
|
const getBackgroundColor = ({ isChecked, isDisabled }) => {
|
|
18
|
-
const alphaValue = isDisabled ? theme
|
|
13
|
+
const alphaValue = isDisabled ? theme.default.color.transparency.T30 : theme.default.color.transparency.T100;
|
|
19
14
|
const colorValue = isChecked
|
|
20
|
-
? theme
|
|
21
|
-
: theme
|
|
15
|
+
? theme.default.color.background.plum.default
|
|
16
|
+
: theme.default.color.background.orange.E02;
|
|
22
17
|
// Only Pill component specific colors to be used on user interaction styles
|
|
23
18
|
const hoverValue = isChecked ? '#441632' : '#FFB557';
|
|
24
19
|
const backgroundColor = `background-color: ${colorValue}${alphaValue};`;
|
|
25
20
|
const hoverBackgroundColor = !isDisabled ? `&:hover { background-color: ${hoverValue}}` : '';
|
|
26
21
|
return backgroundColor + hoverBackgroundColor;
|
|
27
22
|
};
|
|
28
|
-
const Label =
|
|
23
|
+
const Label = styled.label `
|
|
29
24
|
display: inline-block;
|
|
30
|
-
border-radius: ${theme
|
|
31
|
-
font-size: ${theme
|
|
32
|
-
line-height: ${theme
|
|
33
|
-
font-weight: ${theme
|
|
34
|
-
color: ${({ isChecked }) => isChecked ? theme
|
|
25
|
+
border-radius: ${theme.default.radius.pill};
|
|
26
|
+
font-size: ${theme.default.fontSize.s};
|
|
27
|
+
line-height: ${theme.default.lineHeight.default};
|
|
28
|
+
font-weight: ${theme.default.fontWeight.medium};
|
|
29
|
+
color: ${({ isChecked }) => isChecked ? theme.default.color.default.white : theme.default.color.default.black};
|
|
35
30
|
border: 2px solid transparent;
|
|
36
|
-
padding: 2px ${styledUtils.getMultipliedSize(theme
|
|
31
|
+
padding: 2px ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2.5)};
|
|
37
32
|
text-align: center;
|
|
38
33
|
|
|
39
34
|
${({ isDisabled, as }) => getCursor({ isDisabled, as })}
|
|
40
35
|
${({ isChecked, isDisabled }) => getBackgroundColor({ isChecked, isDisabled })}
|
|
41
36
|
|
|
42
37
|
&:focus-within, *:focus > & {
|
|
43
|
-
box-shadow: 0px 0px 0px 2px ${theme
|
|
44
|
-
border: 2px solid ${theme
|
|
38
|
+
box-shadow: 0px 0px 0px 2px ${theme.default.color.focus.dark};
|
|
39
|
+
border: 2px solid ${theme.default.color.focus.light};
|
|
45
40
|
}
|
|
46
41
|
|
|
47
42
|
${({ position }) => (position === 'right' || position === 'middle') &&
|
|
48
43
|
`
|
|
49
|
-
margin-left: ${styledUtils.getMultipliedSize(theme
|
|
44
|
+
margin-left: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
50
45
|
`}
|
|
51
46
|
|
|
52
47
|
${({ position }) => (position === 'left' || position === 'middle') &&
|
|
53
48
|
`
|
|
54
|
-
margin-right: ${styledUtils.getMultipliedSize(theme
|
|
49
|
+
margin-right: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 1)};
|
|
55
50
|
`}
|
|
56
51
|
|
|
57
52
|
${({ position }) => position === 'auto' &&
|
|
58
53
|
`
|
|
59
|
-
margin: ${styledUtils.getMultipliedSize(theme
|
|
54
|
+
margin: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 0.5)};
|
|
60
55
|
|
|
61
56
|
&:first-of-type {
|
|
62
57
|
margin-left: 0;
|
|
@@ -67,7 +62,7 @@ const Label = styled__default["default"].label `
|
|
|
67
62
|
}
|
|
68
63
|
`}
|
|
69
64
|
`;
|
|
70
|
-
const Input =
|
|
65
|
+
const Input = styled.input `
|
|
71
66
|
appearance: none;
|
|
72
67
|
display: block;
|
|
73
68
|
border: 0 none;
|
|
@@ -81,9 +76,9 @@ const Input = styled__default["default"].input `
|
|
|
81
76
|
`;
|
|
82
77
|
const Pill = (_a) => {
|
|
83
78
|
var { type = 'none', 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["type", 'data-testid']);
|
|
84
|
-
return (
|
|
79
|
+
return (React.createElement(Label, { as: type === 'none' ? 'div' : undefined, position: props.position, isChecked: props.isChecked || props.isDefaultChecked, isDisabled: props.isDisabled, className: props.className, "data-testid": dataTestId },
|
|
85
80
|
props.children,
|
|
86
|
-
type !== 'none' && (
|
|
81
|
+
type !== 'none' && (React.createElement(Input, { id: props.id, name: props.name, type: type, role: type, defaultChecked: props.isDefaultChecked, checked: props.isChecked, "aria-checked": props.isChecked || props.isDefaultChecked, value: props.value, onChange: props.onChange, disabled: props.isDisabled, readOnly: !props.onChange }))));
|
|
87
82
|
};
|
|
88
83
|
|
|
89
|
-
exports
|
|
84
|
+
exports.default = Pill;
|
|
@@ -7,10 +7,6 @@ var React = require('react');
|
|
|
7
7
|
var styled = require('../../themes/styled.js');
|
|
8
8
|
var theme = require('../../themes/theme.js');
|
|
9
9
|
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
-
|
|
14
10
|
const loading = styled.keyframes `
|
|
15
11
|
0% {
|
|
16
12
|
transform: scale(1);
|
|
@@ -22,14 +18,14 @@ const loading = styled.keyframes `
|
|
|
22
18
|
transform: scale(1);
|
|
23
19
|
}
|
|
24
20
|
`;
|
|
25
|
-
const PixelLoaderWrapper = styled
|
|
21
|
+
const PixelLoaderWrapper = styled.default.div `
|
|
26
22
|
display: flex;
|
|
27
23
|
justify-content: center;
|
|
28
24
|
align-items: center;
|
|
29
25
|
padding: 0.125rem;
|
|
30
26
|
`;
|
|
31
|
-
const Pixel = styled
|
|
32
|
-
background-color: ${({ color }) => color || theme
|
|
27
|
+
const Pixel = styled.default.div `
|
|
28
|
+
background-color: ${({ color }) => color || theme.default.color.default.pink};
|
|
33
29
|
display: inline-block;
|
|
34
30
|
width: 0.625rem;
|
|
35
31
|
height: 0.625rem;
|
|
@@ -40,11 +36,11 @@ const Pixel = styled["default"].div `
|
|
|
40
36
|
/** @visibleName Pixel Loader */
|
|
41
37
|
const PixelLoader = (_a) => {
|
|
42
38
|
var { className, 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["className", 'data-testid']);
|
|
43
|
-
return (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
return (React.createElement(PixelLoaderWrapper, { className: className, "data-testid": dataTestId },
|
|
40
|
+
React.createElement(Pixel, { color: props.color, delay: "-0.27" }),
|
|
41
|
+
React.createElement(Pixel, { color: props.color, delay: "-0.18" }),
|
|
42
|
+
React.createElement(Pixel, { color: props.color, delay: "-0.09" }),
|
|
43
|
+
React.createElement(Pixel, { color: props.color, delay: "0" })));
|
|
48
44
|
};
|
|
49
45
|
|
|
50
|
-
exports
|
|
46
|
+
exports.default = PixelLoader;
|
|
@@ -17,6 +17,16 @@ interface Props {
|
|
|
17
17
|
* Allows to pass common keyboard key down callback to all children
|
|
18
18
|
*/
|
|
19
19
|
onKeyDown?: (e: KeyboardEvent<HTMLElement>) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Allows to define callback function for DropdownList toggle
|
|
22
|
+
*
|
|
23
|
+
* @param isDropdownListOpen Current state of DropdownList element
|
|
24
|
+
*/
|
|
25
|
+
onDropdownListToggle?: (isDropdownListOpen: boolean) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Allows to define category
|
|
28
|
+
*/
|
|
29
|
+
categoryLabel?: string;
|
|
20
30
|
/**
|
|
21
31
|
* Allows to define aria-label attribute for nav HTML element
|
|
22
32
|
*/
|