@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,23 +11,18 @@ var styledUtils = require('../../utils/styledUtils.js');
11
11
  var Icon = require('../Icon/Icon.js');
12
12
  var PixelLoader = require('../PixelLoader/PixelLoader.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
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
18
-
19
- const ButtonElement = styled__default["default"].button `
14
+ const ButtonElement = styled.button `
20
15
  display: inline-flex;
21
16
  align-items: center;
22
- font-family: ${theme["default"].fontFamily.default};
23
- font-weight: ${theme["default"].fontWeight.bold};
24
- font-size: ${({ small }) => (small ? theme["default"].fontSize.s : theme["default"].fontSize.default)};
25
- line-height: ${({ small }) => (small ? theme["default"].lineHeight.xs : theme["default"].lineHeight.default)};
17
+ font-family: ${theme.default.fontFamily.default};
18
+ font-weight: ${theme.default.fontWeight.bold};
19
+ font-size: ${({ small }) => (small ? theme.default.fontSize.s : theme.default.fontSize.default)};
20
+ line-height: ${({ small }) => (small ? theme.default.lineHeight.xs : theme.default.lineHeight.default)};
26
21
  cursor: pointer;
27
- color: ${({ darkBg }) => (darkBg ? theme["default"].color.text.white : theme["default"].color.text.black)};
22
+ color: ${({ darkBg }) => (darkBg ? theme.default.color.text.white : theme.default.color.text.black)};
28
23
  background-color: transparent;
29
24
  border: 2px solid transparent;
30
- padding: ${styledUtils.getDividedSize(theme["default"].base.baseWidth, 5)} 0;
25
+ padding: ${styledUtils.getDividedSize(theme.default.base.baseWidth, 5)} 0;
31
26
 
32
27
  & svg {
33
28
  pointer-events: none;
@@ -36,12 +31,12 @@ const ButtonElement = styled__default["default"].button `
36
31
  ${({ isReversed }) => isReversed && `flex-direction: row-reverse;`}
37
32
 
38
33
  &:focus {
39
- border-radius: ${theme["default"].radius.s};
34
+ border-radius: ${theme.default.radius.s};
40
35
  text-decoration: underline;
41
36
  border: 2px solid
42
- ${({ darkBg }) => (darkBg ? theme["default"].color.focus.dark : theme["default"].color.focus.light)};
37
+ ${({ darkBg }) => (darkBg ? theme.default.color.focus.dark : theme.default.color.focus.light)};
43
38
  box-shadow: 0px 0px 0px 2px
44
- ${({ darkBg }) => (darkBg ? theme["default"].color.focus.light : theme["default"].color.focus.dark)};
39
+ ${({ darkBg }) => (darkBg ? theme.default.color.focus.light : theme.default.color.focus.dark)};
45
40
  outline: none;
46
41
  }
47
42
 
@@ -51,13 +46,13 @@ const ButtonElement = styled__default["default"].button `
51
46
 
52
47
  &:active {
53
48
  color: ${({ darkBg }) => darkBg
54
- ? theme["default"].color.text.white + theme["default"].color.transparency.T90
55
- : theme["default"].color.text.black + theme["default"].color.transparency.T80};
49
+ ? theme.default.color.text.white + theme.default.color.transparency.T90
50
+ : theme.default.color.text.black + theme.default.color.transparency.T80};
56
51
  }
57
52
 
58
53
  &:disabled,
59
54
  &[disabled] {
60
- color: ${({ darkBg }) => darkBg ? theme["default"].color.text.white + theme["default"].color.transparency.T70 : theme["default"].color.text.gray};
55
+ color: ${({ darkBg }) => darkBg ? theme.default.color.text.white + theme.default.color.transparency.T70 : theme.default.color.text.gray};
61
56
  pointer-events: none;
62
57
  }
63
58
 
@@ -92,9 +87,9 @@ const ButtonElement = styled__default["default"].button `
92
87
  const ButtonIcon = (_a) => {
93
88
  var { icon = icons.EditUnderline, 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue } = _a, props = tslib.__rest(_a, ["icon", 'data-testid', 'data-no-close', 'data-track-value']);
94
89
  const position = props.isReversed ? 'right' : 'left';
95
- return (React__default["default"].createElement(ButtonElement, { id: props.id, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, small: props.small, darkBg: props.darkBg, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, disabled: props.disabled, hideChildrenMobile: props.hideChildrenMobile, isReversed: props.isReversed, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue }, props.loading ? (React__default["default"].createElement(PixelLoader["default"], { color: props.darkBg ? theme["default"].color.default.white : theme["default"].color.default.black })) : (React__default["default"].createElement(React__default["default"].Fragment, null,
96
- React__default["default"].createElement(Icon["default"], { icon: icon, color: props.darkBg ? theme["default"].color.default.white : theme["default"].color.default.pink, size: props.small ? '1.25rem' : '1.5rem', position: props.children ? position : undefined }),
97
- props.children && (React__default["default"].createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, props.children))))));
90
+ return (React.createElement(ButtonElement, { id: props.id, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, small: props.small, darkBg: props.darkBg, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, disabled: props.disabled, hideChildrenMobile: props.hideChildrenMobile, isReversed: props.isReversed, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue }, props.loading ? (React.createElement(PixelLoader.default, { color: props.darkBg ? theme.default.color.default.white : theme.default.color.default.black })) : (React.createElement(React.Fragment, null,
91
+ React.createElement(Icon.default, { icon: icon, color: props.darkBg ? theme.default.color.default.white : theme.default.color.default.pink, size: props.small ? '1.25rem' : '1.5rem', position: props.children ? position : undefined }),
92
+ props.children && (React.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, props.children))))));
98
93
  };
99
94
 
100
- exports["default"] = ButtonIcon;
95
+ exports.default = ButtonIcon;
@@ -6,51 +6,47 @@ var styled = require('styled-components');
6
6
  var theme = require('../../themes/theme.js');
7
7
  var Button = require('./Button.js');
8
8
 
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
12
-
13
9
  /** @visibleName Button Primary */
14
- const ButtonPrimary = styled__default["default"](Button["default"]) `
15
- color: ${theme["default"].color.text.white};
16
- background-color: ${theme["default"].color.default.pink};
17
- border: 2px solid ${theme["default"].color.default.pink};
10
+ const ButtonPrimary = styled(Button.default) `
11
+ color: ${theme.default.color.text.white};
12
+ background-color: ${theme.default.color.default.pink};
13
+ border: 2px solid ${theme.default.color.default.pink};
18
14
 
19
15
  &:focus {
20
- color: ${theme["default"].color.text.white};
21
- background-color: ${theme["default"].color.default.pink};
16
+ color: ${theme.default.color.text.white};
17
+ background-color: ${theme.default.color.default.pink};
22
18
  }
23
19
 
24
20
  &:hover {
25
- color: ${theme["default"].color.text.white};
21
+ color: ${theme.default.color.text.white};
26
22
  background-color: ${Button.shade.pink.darker};
27
23
  border: 2px solid ${Button.shade.pink.darker};
28
24
  }
29
25
 
30
26
  &:active {
31
- color: ${theme["default"].color.text.white};
27
+ color: ${theme.default.color.text.white};
32
28
  background-color: ${Button.shade.pink.lighter};
33
29
  border: 2px solid ${Button.shade.pink.lighter};
34
30
  }
35
31
 
36
32
  &:disabled,
37
33
  &[disabled] {
38
- background-color: ${theme["default"].color.default.pink + theme["default"].color.transparency.T30};
39
- border: 2px solid ${theme["default"].color.default.pink + theme["default"].color.transparency.T30};
34
+ background-color: ${theme.default.color.default.pink + theme.default.color.transparency.T30};
35
+ border: 2px solid ${theme.default.color.default.pink + theme.default.color.transparency.T30};
40
36
  background-clip: padding-box;
41
37
  }
42
38
 
43
39
  ${({ loading }) => loading &&
44
40
  `
45
41
  &:focus {
46
- border-color: ${theme["default"].color.default.pink};
42
+ border-color: ${theme.default.color.default.pink};
47
43
  outline: none;
48
44
  }
49
45
 
50
46
  > * > * {
51
- background-color: ${theme["default"].color.default.white};
47
+ background-color: ${theme.default.color.default.white};
52
48
  }
53
49
  `}
54
50
  `;
55
51
 
56
- exports["default"] = ButtonPrimary;
52
+ exports.default = ButtonPrimary;
@@ -9,17 +9,12 @@ var theme = require('../../themes/theme.js');
9
9
  var styledUtils = require('../../utils/styledUtils.js');
10
10
  var ButtonPrimary = require('./ButtonPrimary.js');
11
11
 
12
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
-
14
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
16
-
17
- const ButtonElement = styled__default["default"](ButtonPrimary["default"]) `
12
+ const ButtonElement = styled(ButtonPrimary.default) `
18
13
  display: flex;
19
14
  min-width: initial;
20
- width: ${styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 3.2)};
21
- height: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 3.2)};
22
- border-radius: ${theme["default"].radius.circle};
15
+ width: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 3.2)};
16
+ height: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 3.2)};
17
+ border-radius: ${theme.default.radius.circle};
23
18
  padding: initial;
24
19
  text-align: center;
25
20
  vertical-align: middle;
@@ -32,7 +27,7 @@ const ButtonElement = styled__default["default"](ButtonPrimary["default"]) `
32
27
  */
33
28
  const ButtonRound = (_a) => {
34
29
  var { 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue } = _a, props = tslib.__rest(_a, ['data-testid', 'data-no-close', 'data-track-value']);
35
- return (React__default["default"].createElement(ButtonElement, { id: props.id, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, darkBg: props.darkBg, disabled: props.disabled, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue }, props.children));
30
+ return (React.createElement(ButtonElement, { id: props.id, name: props.name, type: props.type, onClick: props.onClick, onMouseDown: props.onMouseDown, darkBg: props.darkBg, disabled: props.disabled, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue }, props.children));
36
31
  };
37
32
 
38
- exports["default"] = ButtonRound;
33
+ exports.default = ButtonRound;
@@ -6,51 +6,47 @@ var styled = require('styled-components');
6
6
  var theme = require('../../themes/theme.js');
7
7
  var Button = require('./Button.js');
8
8
 
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
12
-
13
9
  /** @visibleName Button Secondary */
14
- const ButtonSecondary = styled__default["default"](Button["default"]) `
15
- color: ${theme["default"].color.text.plum};
16
- background-color: ${theme["default"].color.background.sand.E02};
17
- border: 2px solid ${theme["default"].color.line.L02};
10
+ const ButtonSecondary = styled(Button.default) `
11
+ color: ${theme.default.color.text.plum};
12
+ background-color: ${theme.default.color.background.sand.E02};
13
+ border: 2px solid ${theme.default.color.line.L02};
18
14
 
19
15
  &:focus {
20
- color: ${theme["default"].color.text.plum};
21
- background-color: ${theme["default"].color.background.sand.E02};
16
+ color: ${theme.default.color.text.plum};
17
+ background-color: ${theme.default.color.background.sand.E02};
22
18
  }
23
19
 
24
20
  &:hover {
25
- color: ${theme["default"].color.text.plum};
21
+ color: ${theme.default.color.text.plum};
26
22
  background-color: ${Button.shade.sand.E02.darker};
27
23
  border: 2px solid ${Button.shade.sand.E02.darker};
28
24
  }
29
25
 
30
26
  &:active {
31
- color: ${theme["default"].color.text.plum};
27
+ color: ${theme.default.color.text.plum};
32
28
  background-color: ${Button.shade.sand.E02.lighter};
33
29
  border: 2px solid ${Button.shade.sand.E02.lighter};
34
30
  }
35
31
 
36
32
  &:disabled,
37
33
  &[disabled] {
38
- background-color: ${theme["default"].color.background.sand.E02 + theme["default"].color.transparency.T30};
39
- border: 2px solid ${theme["default"].color.line.L02 + theme["default"].color.transparency.T30};
34
+ background-color: ${theme.default.color.background.sand.E02 + theme.default.color.transparency.T30};
35
+ border: 2px solid ${theme.default.color.line.L02 + theme.default.color.transparency.T30};
40
36
  background-clip: padding-box;
41
37
  }
42
38
 
43
39
  ${({ loading }) => loading &&
44
40
  `
45
41
  &:focus {
46
- border-color: ${theme["default"].color.line.L02};
42
+ border-color: ${theme.default.color.line.L02};
47
43
  outline: none;
48
44
  }
49
45
 
50
46
  > * > * {
51
- background-color: ${theme["default"].color.default.plum};
47
+ background-color: ${theme.default.color.default.plum};
52
48
  }
53
49
  `}
54
50
  `;
55
51
 
56
- exports["default"] = ButtonSecondary;
52
+ exports.default = ButtonSecondary;
@@ -1,6 +1,6 @@
1
1
  import type { MouseEvent, ReactNode } from 'react';
2
2
  import React from 'react';
3
- export interface Props {
3
+ interface Props {
4
4
  /**
5
5
  * Unique ID for the component
6
6
  */
@@ -12,31 +12,27 @@ var styledUtils = require('../../utils/styledUtils.js');
12
12
  var ButtonArrow = require('../Button/ButtonArrow.js');
13
13
  var ButtonIcon = require('../Button/ButtonIcon.js');
14
14
 
15
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
-
17
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
-
19
- const CarouselWrapper = styled["default"].div ``;
20
- const Header = styled["default"].div `
15
+ const CarouselWrapper = styled.default.div ``;
16
+ const Header = styled.default.div `
21
17
  display: flex;
22
18
  justify-content: space-between;
23
19
  gap: 1.25rem;
24
20
  margin-bottom: 1.25rem;
25
21
  `;
26
- const Title = styled["default"].h2 `
22
+ const Title = styled.default.h2 `
27
23
  margin: 0;
28
24
  `;
29
- const Navigation = styled["default"].div `
25
+ const Navigation = styled.default.div `
30
26
  display: inline-flex;
31
27
  margin-left: auto;
32
28
  gap: 0.625rem;
33
29
  `;
34
- const Content = styled["default"].div `
30
+ const Content = styled.default.div `
35
31
  position: relative;
36
32
  overflow: hidden;
37
33
  touch-action: pan-y;
38
34
  `;
39
- const SlidesWrapper = styled["default"].div `
35
+ const SlidesWrapper = styled.default.div `
40
36
  position: relative;
41
37
  display: flex;
42
38
  width: 100%;
@@ -48,7 +44,7 @@ const SlidesWrapper = styled["default"].div `
48
44
  transition-delay: 0ms;
49
45
  user-select: none;
50
46
  `;
51
- const SlideItem = styled["default"].div `
47
+ const SlideItem = styled.default.div `
52
48
  display: block;
53
49
  position: relative;
54
50
  flex-shrink: 0;
@@ -56,16 +52,16 @@ const SlideItem = styled["default"].div `
56
52
  ${({ visibleItems, itemWidthCorrection }) => `(100% / ${visibleItems}) - ${itemWidthCorrection}px`}
57
53
  );
58
54
  `;
59
- const Footer = styled["default"].div `
55
+ const Footer = styled.default.div `
60
56
  ${styledUtils.media.md `
61
57
  display: grid;
62
58
  grid-template-columns: [whitespace] 1fr [pagination] auto [footerButton] 1fr;
63
59
  gap: 2rem;
64
- margin: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 2)} 0;
60
+ margin: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)} 0;
65
61
  align-items: center;
66
62
  `};
67
63
  `;
68
- const Pagination = styled["default"].div `
64
+ const Pagination = styled.default.div `
69
65
  display: none;
70
66
 
71
67
  ${styledUtils.media.md `
@@ -77,39 +73,39 @@ const Pagination = styled["default"].div `
77
73
  width: 100%;
78
74
  `};
79
75
  `;
80
- const PaginationItem = styled["default"].button `
76
+ const PaginationItem = styled.default.button `
81
77
  display: inline-block;
82
78
  cursor: pointer;
83
79
  width: 2rem;
84
80
  height: 1rem;
85
- border-radius: ${theme["default"].radius.pill};
86
- border: 2px solid ${theme["default"].color.line.L01};
87
- background-color: ${theme["default"].color.background.white.default};
81
+ border-radius: ${theme.default.radius.pill};
82
+ border: 2px solid ${theme.default.color.line.L01};
83
+ background-color: ${theme.default.color.background.white.default};
88
84
  transition: all 0.2s ease-in-out;
89
85
 
90
86
  ${({ isActive }) => isActive &&
91
87
  `
92
88
  width: 3rem;
93
- border-color: ${theme["default"].color.default.pink};
94
- background-color: ${theme["default"].color.background.pink.default};
89
+ border-color: ${theme.default.color.default.pink};
90
+ background-color: ${theme.default.color.background.pink.default};
95
91
  `}
96
92
 
97
93
  &:focus {
98
- border: 2px solid ${theme["default"].color.focus.light};
99
- box-shadow: 0px 0px 0px 2px ${theme["default"].color.focus.dark};
94
+ border: 2px solid ${theme.default.color.focus.light};
95
+ box-shadow: 0px 0px 0px 2px ${theme.default.color.focus.dark};
100
96
  outline: none;
101
97
  }
102
98
 
103
99
  &:hover {
104
- border-color: ${theme["default"].color.default.pink};
100
+ border-color: ${theme.default.color.default.pink};
105
101
  }
106
102
  `;
107
- const Scrollbar = styled["default"].div `
103
+ const Scrollbar = styled.default.div `
108
104
  width: 100%;
109
- height: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 0.6)};
105
+ height: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.6)};
110
106
  margin: 1rem 0;
111
- border-radius: ${theme["default"].radius.pill};
112
- background-color: ${theme["default"].color.background.sand.E02};
107
+ border-radius: ${theme.default.radius.pill};
108
+ background-color: ${theme.default.color.background.sand.E02};
113
109
  user-select: none;
114
110
  touch-action: pan-y;
115
111
 
@@ -117,20 +113,20 @@ const Scrollbar = styled["default"].div `
117
113
  display: none;
118
114
  `};
119
115
  `;
120
- const Knob = styled["default"].div `
116
+ const Knob = styled.default.div `
121
117
  position: relative;
122
118
  top: 0;
123
119
  left: 0;
124
120
  width: calc(100% / ${({ knobSize }) => knobSize});
125
121
  height: 100%;
126
- border-radius: ${theme["default"].radius.pill};
127
- background-color: ${theme["default"].color.background.pink.default};
122
+ border-radius: ${theme.default.radius.pill};
123
+ background-color: ${theme.default.color.background.pink.default};
128
124
  transform: translate3d(0px, 0, 0);
129
125
  transition-duration: 0ms;
130
126
  transition-delay: 0ms;
131
127
  user-select: none;
132
128
  `;
133
- const FooterButton = styled["default"].div `
129
+ const FooterButton = styled.default.div `
134
130
  grid-column: footerButton;
135
131
  text-align: right;
136
132
  `;
@@ -140,7 +136,7 @@ const Carousel = (_a) => {
140
136
  const slidesWrapperRef = React.useRef(null);
141
137
  const scrollbarRef = React.useRef(null);
142
138
  const knobRef = React.useRef(null);
143
- const { isMobile } = useWindowSize["default"](theme["default"].breakpoints.md);
139
+ const { isMobile } = useWindowSize.default(theme.default.breakpoints.md);
144
140
  const [currentIndex, setCurrentIndex] = React.useState(0);
145
141
  const visibleItems = props.visibleItems || (isMobile ? 1.2 : 1);
146
142
  const slidesWrapperGapSizePx = 20;
@@ -294,20 +290,20 @@ const Carousel = (_a) => {
294
290
  setElementTransform(knobRef, slidesTransform / data.scrollbarToSlidesRatio);
295
291
  }
296
292
  }, [currentIndex, data, itemWidthCorrection, props.children, slideScreensCount, visibleItems]);
297
- return (React__default["default"].createElement(CarouselWrapper, { id: props.id, className: props.className, "data-testid": dataTestId },
298
- React__default["default"].createElement(Header, { "data-testid": dataTestId && `${dataTestId}-header` },
299
- props.title && React__default["default"].createElement(Title, null, props.title),
300
- React__default["default"].createElement(Navigation, null,
301
- React__default["default"].createElement(ButtonArrow["default"], { direction: "left", "aria-label": "Previous", onClick: handleNavigationButtonPreviousClick, disabled: currentIndex <= 0 }),
302
- React__default["default"].createElement(ButtonArrow["default"], { direction: "right", "aria-label": "Next", onClick: handleNavigationButtonNextClick, disabled: currentIndex + visibleItems >= React.Children.count(props.children) }))),
303
- React__default["default"].createElement(Content, { "data-testid": dataTestId && `${dataTestId}-content` },
304
- React__default["default"].createElement(SlidesWrapper, { ref: slidesWrapperRef, onPointerDown: handleSlidesPointerDown, gap: slidesWrapperGapSizePx / 16 }, React.Children.map(props.children, child => (React__default["default"].createElement(SlideItem, { visibleItems: visibleItems, itemWidthCorrection: itemWidthCorrection }, child))))),
305
- React__default["default"].createElement(Footer, { "data-testid": dataTestId && `${dataTestId}-footer` },
306
- React__default["default"].createElement(Pagination, null, [...Array(slideScreensCount).keys()].map((value, index) => (React__default["default"].createElement(PaginationItem, { key: value, "aria-label": `Move to step ${index + 1}`, "aria-current": index === currentIndex, isActive: index === currentIndex, onClick: handlePaginationItemClick })))),
307
- React__default["default"].createElement(Scrollbar, { ref: scrollbarRef, onPointerDown: handleScrollbarPointerDown },
308
- React__default["default"].createElement(Knob, { ref: knobRef, knobSize: slideScreensCount })),
309
- props.footerButton && (React__default["default"].createElement(FooterButton, null,
310
- React__default["default"].createElement(ButtonIcon["default"], { icon: icons.ArrowRight, onClick: props.onFooterButtonClick }, props.footerButton))))));
293
+ return (React.createElement(CarouselWrapper, { id: props.id, className: props.className, "data-testid": dataTestId },
294
+ React.createElement(Header, { "data-testid": dataTestId && `${dataTestId}-header` },
295
+ props.title && React.createElement(Title, null, props.title),
296
+ React.createElement(Navigation, null,
297
+ React.createElement(ButtonArrow.default, { direction: "left", "aria-label": "Previous", onClick: handleNavigationButtonPreviousClick, disabled: currentIndex <= 0 }),
298
+ React.createElement(ButtonArrow.default, { direction: "right", "aria-label": "Next", onClick: handleNavigationButtonNextClick, disabled: currentIndex + visibleItems >= React.Children.count(props.children) }))),
299
+ React.createElement(Content, { "data-testid": dataTestId && `${dataTestId}-content` },
300
+ React.createElement(SlidesWrapper, { ref: slidesWrapperRef, onPointerDown: handleSlidesPointerDown, gap: slidesWrapperGapSizePx / 16 }, React.Children.map(props.children, child => (React.createElement(SlideItem, { visibleItems: visibleItems, itemWidthCorrection: itemWidthCorrection }, child))))),
301
+ React.createElement(Footer, { "data-testid": dataTestId && `${dataTestId}-footer` },
302
+ React.createElement(Pagination, null, [...Array(slideScreensCount).keys()].map((value, index) => (React.createElement(PaginationItem, { key: value, "aria-label": `Move to step ${index + 1}`, "aria-current": index === currentIndex, isActive: index === currentIndex, onClick: handlePaginationItemClick })))),
303
+ React.createElement(Scrollbar, { ref: scrollbarRef, onPointerDown: handleScrollbarPointerDown },
304
+ React.createElement(Knob, { ref: knobRef, knobSize: slideScreensCount })),
305
+ props.footerButton && (React.createElement(FooterButton, null,
306
+ React.createElement(ButtonIcon.default, { icon: icons.ArrowRight, onClick: props.onFooterButtonClick }, props.footerButton))))));
311
307
  };
312
308
 
313
- exports["default"] = Carousel;
309
+ exports.default = Carousel;
@@ -9,10 +9,6 @@ var styled = require('../../themes/styled.js');
9
9
  var theme = require('../../themes/theme.js');
10
10
  var styledUtils = require('../../utils/styledUtils.js');
11
11
 
12
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
-
14
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
-
16
12
  // TODO: Implement proper svg icon after https://jira.dna.fi/browse/STYLE-238 is done
17
13
  const SVGIconData = () => {
18
14
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="16px" height="16px">` +
@@ -20,33 +16,33 @@ const SVGIconData = () => {
20
16
  `</svg>`;
21
17
  return `data:image/svg+xml,${encodeURIComponent(svg)}`;
22
18
  };
23
- const Container = styled["default"].div `
19
+ const Container = styled.default.div `
24
20
  display: flex;
25
- font-size: ${theme["default"].fontSize.default};
26
- line-height: ${theme["default"].lineHeight.default};
27
- margin-bottom: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 0.5)};
21
+ font-size: ${theme.default.fontSize.default};
22
+ line-height: ${theme.default.lineHeight.default};
23
+ margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.5)};
28
24
  `;
29
- const Input = styled["default"](globalStyles.CheckboxAndRadioInputCore) `
25
+ const Input = styled.default(globalStyles.CheckboxAndRadioInputCore) `
30
26
  position: relative;
31
- top: ${styledUtils.getDividedSize(theme["default"].base.baseWidth, 5)};
27
+ top: ${styledUtils.getDividedSize(theme.default.base.baseWidth, 5)};
32
28
 
33
29
  &:checked {
34
30
  &::before {
35
- width: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1.6)};
36
- height: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1.6)};
31
+ width: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.6)};
32
+ height: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.6)};
37
33
  background-image: url('${SVGIconData}');
38
34
  }
39
35
  }
40
36
  `;
41
- const Mandatory = styled["default"].span `
42
- color: ${theme["default"].color.default.pink};
43
- margin-left: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 0.5)};
37
+ const Mandatory = styled.default.span `
38
+ color: ${theme.default.color.default.pink};
39
+ margin-left: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.5)};
44
40
  `;
45
- const ErrorMessage = styled["default"].div `
46
- font-size: ${theme["default"].fontSize.s};
47
- line-height: ${theme["default"].lineHeight.s};
48
- color: ${theme["default"].color.notification.error};
49
- margin-bottom: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 0.5)};
41
+ const ErrorMessage = styled.default.div `
42
+ font-size: ${theme.default.fontSize.s};
43
+ line-height: ${theme.default.lineHeight.s};
44
+ color: ${theme.default.color.notification.error};
45
+ margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.5)};
50
46
  `;
51
47
  const Checkbox = (_a) => {
52
48
  var { 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ['data-testid']);
@@ -55,13 +51,13 @@ const Checkbox = (_a) => {
55
51
  props.onChange(!props.value);
56
52
  }
57
53
  };
58
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
59
- React__default["default"].createElement(Container, null,
60
- React__default["default"].createElement(Input, { id: props.id, name: props.name, type: "checkbox", className: props.className, checked: Boolean(props.value), "aria-checked": Boolean(props.value), onChange: handleChange, disabled: props.disabled, "data-testid": dataTestId }),
61
- React__default["default"].createElement("label", { htmlFor: props.id, "data-testid": dataTestId && `${dataTestId}-label` },
54
+ return (React.createElement(React.Fragment, null,
55
+ React.createElement(Container, null,
56
+ React.createElement(Input, { id: props.id, name: props.name, type: "checkbox", className: props.className, checked: Boolean(props.value), "aria-checked": Boolean(props.value), onChange: handleChange, disabled: props.disabled, "data-testid": dataTestId }),
57
+ React.createElement("label", { htmlFor: props.id, "data-testid": dataTestId && `${dataTestId}-label` },
62
58
  props.label,
63
- props.required && React__default["default"].createElement(Mandatory, null, "*"))),
64
- props.error && props.errorMessage && (React__default["default"].createElement(ErrorMessage, { "data-testid": dataTestId && `${dataTestId}-error` }, props.errorMessage))));
59
+ props.required && React.createElement(Mandatory, null, "*"))),
60
+ props.error && props.errorMessage && (React.createElement(ErrorMessage, { "data-testid": dataTestId && `${dataTestId}-error` }, props.errorMessage))));
65
61
  };
66
62
 
67
- exports["default"] = Checkbox;
63
+ exports.default = Checkbox;
@@ -8,25 +8,20 @@ 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 getStyling = ({ $type, $variant, }) => {
17
- const stylingColor = $type === 'default' ? theme["default"].color.line.L01 : theme["default"].color.notification[$type];
12
+ const stylingColor = $type === 'default' ? theme.default.color.line.L01 : theme.default.color.notification[$type];
18
13
  const border = `border: 2px solid ${stylingColor};`;
19
- const background = `background-color: ${$variant === 'outlined' ? theme["default"].color.background.white.default : stylingColor};`;
20
- const color = `color: ${$variant === 'outlined' ? theme["default"].color.text.black : theme["default"].color.text.white};`;
14
+ const background = `background-color: ${$variant === 'outlined' ? theme.default.color.background.white.default : stylingColor};`;
15
+ const color = `color: ${$variant === 'outlined' ? theme.default.color.text.black : theme.default.color.text.white};`;
21
16
  return `${border}${background}${color}`;
22
17
  };
23
- const Element = styled__default["default"].div `
18
+ const Element = styled.div `
24
19
  display: inline-block;
25
- border-radius: ${theme["default"].radius.pill};
26
- padding: 1px ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1)};
27
- font-size: ${theme["default"].fontSize.s};
28
- line-height: ${theme["default"].lineHeight.s};
29
- font-weight: ${theme["default"].fontWeight.medium};
20
+ border-radius: ${theme.default.radius.pill};
21
+ padding: 1px ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1)};
22
+ font-size: ${theme.default.fontSize.s};
23
+ line-height: ${theme.default.lineHeight.s};
24
+ font-weight: ${theme.default.fontWeight.medium};
30
25
  text-align: center;
31
26
  ${({ onClick }) => onClick && `cursor: pointer`};
32
27
 
@@ -34,7 +29,7 @@ const Element = styled__default["default"].div `
34
29
  `;
35
30
  const Chip = (_a) => {
36
31
  var { type = 'default', variant = 'outlined', 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["type", "variant", 'data-testid']);
37
- return (React__default["default"].createElement(Element, { id: props.id, "$type": type, "$variant": variant, onClick: props.onClick, className: props.className, "data-testid": dataTestId }, props.children));
32
+ return (React.createElement(Element, { id: props.id, "$type": type, "$variant": variant, onClick: props.onClick, className: props.className, "data-testid": dataTestId }, props.children));
38
33
  };
39
34
 
40
- exports["default"] = Chip;
35
+ exports.default = Chip;