@dnanpm/styleguide 3.7.2 → 3.8.2

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