@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
package/README.md CHANGED
@@ -1,21 +1,40 @@
1
- # DNA Styleguide
2
-
3
- Styles and styled components for DNA.
1
+ DNA Styleguide repository provides the set of components and theme object used in various DNA projects.
4
2
 
5
3
  ## Installation
6
4
 
7
- 1. Run install command in repository where styleguide should be added
8
- - Example
9
- ```shell
10
- npm install @dnanpm/styleguide
11
- ```
5
+ Run install command in repository where DNA Styleguide should be added
6
+
7
+ ```shell
8
+ npm install @dnanpm/styleguide
9
+ ```
10
+
11
+ ## Documentation
12
+
13
+ > [!NOTE]
14
+ > Requires access to DNA Cloud URL!
15
+
16
+ ### Interactive documentation and API
17
+
18
+ See latest version of [DNA Styleguide](https://styleguide.devkube.kauppa5test.acs.dnacloud.fi/latest/) for theme documentation, API and interactive documentation of components.
19
+
20
+ ### Changelog
21
+
22
+ See [Changelog](https://styleguide.devkube.kauppa5test.acs.dnacloud.fi/latest/#/Changelog) for current major version changes, or [Changelog Archive](https://styleguide.devkube.kauppa5test.acs.dnacloud.fi/latest/#/Changelog%20archive) for old major versions' changes.
23
+
24
+ ### Migration guide
25
+
26
+ See [Migration guide](https://styleguide.devkube.kauppa5test.acs.dnacloud.fi/latest/#/Migration%20Guide) for more information about how to migrate between major versions of DNA Styleguide.
27
+
28
+ ### Contribution guide
29
+
30
+ See [Contribution guide](https://styleguide.devkube.kauppa5test.acs.dnacloud.fi/latest/#/Contribution%20guide) for more information about how to contribute to DNA Styleguide.
12
31
 
13
32
  ## Usage example
14
33
 
15
34
  ### Theme
16
35
 
17
36
  ```js
18
- import { createStyled, theme as defaultTheme } from '@dnanpm/styleguide';
37
+ import { theme as defaultTheme } from '@dnanpm/styleguide';
19
38
 
20
39
  const color = {
21
40
  ...defaultTheme.color,
@@ -34,7 +53,6 @@ const theme = {
34
53
  };
35
54
 
36
55
  export type ThemeInterface = typeof theme;
37
- export const { styled, css } = createStyled<ThemeInterface>();
38
56
  export default theme;
39
57
  ```
40
58
 
@@ -54,7 +72,7 @@ class MyApp {
54
72
  }
55
73
  ```
56
74
 
57
- ### Button
75
+ ### Component
58
76
 
59
77
  ```js
60
78
  import { ButtonPrimary } from '@dnanpm/styleguide';
@@ -73,14 +91,3 @@ const MyComponent = ({
73
91
 
74
92
  export default MyComponent;
75
93
  ```
76
-
77
- ## IE11 Support NextJS
78
-
79
- In `next.config.js` you need to use [next-transpile-modules](https://www.npmjs.com/package/next-transpile-modules) package to allow nextjs to be able to transpile styleguide and related es6 modules based on babel config.
80
-
81
- ```js
82
- // next.config.js
83
- const withTM = require('next-transpile-modules')(['@dnanpm/styleguide', "react-spring"]);
84
-
85
- module.exports = withTM();
86
- ```
@@ -9,16 +9,11 @@ var theme = require('../../themes/theme.js');
9
9
  var styledUtils = require('../../utils/styledUtils.js');
10
10
  var AccordionItem = require('../AccordionItem/AccordionItem.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 AccordionContainer = styled__default["default"].div `
12
+ const AccordionContainer = styled.div `
18
13
  ${p => p.type === 'box' &&
19
14
  styled.css `
20
15
  & > * {
21
- margin: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1)} 0;
16
+ margin: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1)} 0;
22
17
  }
23
18
 
24
19
  & > *:first-of-type {
@@ -37,7 +32,7 @@ const Accordion = (_a) => {
37
32
  const getAccordionItemId = (index, title) => `${title.replace(/\s+/g, '')}-${index}`;
38
33
  if (props.isExpanded) {
39
34
  React.Children.map(props.children, (child, index) => {
40
- if (React.isValidElement(child) && child.type === AccordionItem["default"]) {
35
+ if (React.isValidElement(child) && child.type === AccordionItem.default) {
41
36
  initialItemList[getAccordionItemId(index, child.props.title)] = Boolean(props.isExpanded);
42
37
  }
43
38
  });
@@ -61,16 +56,16 @@ const Accordion = (_a) => {
61
56
  }
62
57
  };
63
58
  const accordionItems = React.Children.map(props.children, (child, index) => {
64
- if (React.isValidElement(child) && child.type === AccordionItem["default"]) {
59
+ if (React.isValidElement(child) && child.type === AccordionItem.default) {
65
60
  const id = getAccordionItemId(index, child.props.title);
66
- return (React__default["default"].createElement(AccordionItem["default"], { id: id, key: id, type: type, title: child.props.title, isExpanded: itemList[id], highlightSelected: highlightSelected, hasCloseButton: hasCloseButton, openLabel: props.openLabel, closeLabel: props.closeLabel, onClick: handleClick, onKeyDown: handleKeyDown, className: child.props.className }, child.props.children));
61
+ return (React.createElement(AccordionItem.default, { id: id, key: id, type: type, title: child.props.title, isExpanded: itemList[id], highlightSelected: highlightSelected, hasCloseButton: hasCloseButton, openLabel: props.openLabel, closeLabel: props.closeLabel, onClick: handleClick, onKeyDown: handleKeyDown, className: child.props.className }, child.props.children));
67
62
  }
68
63
  return null;
69
64
  });
70
65
  if (!accordionItems) {
71
66
  return null;
72
67
  }
73
- return (React__default["default"].createElement(AccordionContainer, { type: type, className: props.className }, accordionItems));
68
+ return (React.createElement(AccordionContainer, { type: type, className: props.className }, accordionItems));
74
69
  };
75
70
 
76
- exports["default"] = Accordion;
71
+ exports.default = Accordion;
@@ -12,55 +12,50 @@ var styledUtils = require('../../utils/styledUtils.js');
12
12
  var Box = require('../Box/Box.js');
13
13
  var Icon = require('../Icon/Icon.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
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
19
-
20
- const AccordionItemContainer = styled__default["default"].div `
15
+ const AccordionItemContainer = styled.div `
21
16
  ${p => p.type === 'panel' &&
22
17
  styled.css `
23
- border-bottom: 1px solid ${theme["default"].color.line.L02};
18
+ border-bottom: 1px solid ${theme.default.color.line.L02};
24
19
  `}
25
20
  `;
26
- const AccordionItemTitle = styled__default["default"].div `
27
- font-size: ${theme["default"].fontSize.default};
28
- line-height: ${theme["default"].lineHeight.default};
29
- font-weight: ${theme["default"].fontWeight.bold};
21
+ const AccordionItemTitle = styled.div `
22
+ font-size: ${theme.default.fontSize.default};
23
+ line-height: ${theme.default.lineHeight.default};
24
+ font-weight: ${theme.default.fontWeight.bold};
30
25
  display: flex;
31
26
  justify-content: space-between;
32
27
  flex-direction: row;
33
28
  cursor: pointer;
34
- padding: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1.6)}
35
- ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 2)};
36
- color: ${p => p.isExpanded && p.highlightSelected ? theme["default"].color.default.pink : theme["default"].color.default.black};
29
+ padding: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.6)}
30
+ ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)};
31
+ color: ${p => p.isExpanded && p.highlightSelected ? theme.default.color.default.pink : theme.default.color.default.black};
37
32
  transition: color 0.2s;
38
33
  ${p => p.highlightSelected &&
39
34
  styled.css `
40
35
  &:hover,
41
36
  &:active {
42
- color: ${theme["default"].color.default.pink};
37
+ color: ${theme.default.color.default.pink};
43
38
  text-decoration: none;
44
39
  }
45
40
  `}
46
41
  `;
47
- const AccordionItemContentWrapper = styled__default["default"].div `
42
+ const AccordionItemContentWrapper = styled.div `
48
43
  overflow: hidden;
49
44
  transition: all 0.2s ease;
50
45
  height: ${p => (p.isExpanded ? p.maxHeight / 16 + 1.25 : 0)}rem;
51
- padding: 0 ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 2)};
46
+ padding: 0 ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)};
52
47
  visibility: ${p => (p.isExpanded ? 'visible' : 'hidden')};
53
48
  `;
54
- const AccordionItemContent = styled__default["default"].div `
55
- padding-bottom: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1.6)};
49
+ const AccordionItemContent = styled.div `
50
+ padding-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.6)};
56
51
  `;
57
- const AccordionItemCloseButton = styled__default["default"].div `
52
+ const AccordionItemCloseButton = styled.div `
58
53
  display: flex;
59
54
  justify-content: flex-end;
60
- line-height: ${theme["default"].lineHeight.default};
61
- margin-bottom: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1.6)};
62
- padding: 0 ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 2)};
63
- gap: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1)};
55
+ line-height: ${theme.default.lineHeight.default};
56
+ margin-bottom: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1.6)};
57
+ padding: 0 ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)};
58
+ gap: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1)};
64
59
  cursor: pointer;
65
60
  `;
66
61
  /** @visibleName Accordion Item */
@@ -68,17 +63,17 @@ const AccordionItem = (_a) => {
68
63
  var { type = 'box', hasCloseButton = false, highlightSelected = type === 'panel' } = _a, props = tslib.__rest(_a, ["type", "hasCloseButton", "highlightSelected"]);
69
64
  const contentRef = React.useRef(null);
70
65
  // Get height when element dimensions change
71
- const { height: contentHeight } = useResizeObserver["default"](contentRef);
72
- const itemContent = (React__default["default"].createElement(AccordionItemContainer, { id: props.id, type: type, "aria-expanded": Boolean(props.isExpanded), className: props.className },
73
- React__default["default"].createElement(AccordionItemTitle, { tabIndex: 0, onClick: props.onClick, onKeyDown: props.onKeyDown, isExpanded: Boolean(props.isExpanded), highlightSelected: highlightSelected, role: "button" },
66
+ const { height: contentHeight } = useResizeObserver.default(contentRef);
67
+ const itemContent = (React.createElement(AccordionItemContainer, { id: props.id, type: type, "aria-expanded": Boolean(props.isExpanded), className: props.className },
68
+ React.createElement(AccordionItemTitle, { tabIndex: 0, onClick: props.onClick, onKeyDown: props.onKeyDown, isExpanded: Boolean(props.isExpanded), highlightSelected: highlightSelected, role: "button" },
74
69
  props.title,
75
- props.isExpanded ? (React__default["default"].createElement(Icon["default"], { icon: icons.ChevronUp, color: theme["default"].color.default.black, position: "right", "aria-label": props.closeLabel })) : (React__default["default"].createElement(Icon["default"], { icon: icons.ChevronDown, color: theme["default"].color.default.black, position: "right", "aria-label": props.openLabel }))),
76
- React__default["default"].createElement(AccordionItemContentWrapper, { maxHeight: contentHeight, isExpanded: props.isExpanded },
77
- React__default["default"].createElement(AccordionItemContent, { ref: contentRef }, props.children)),
78
- hasCloseButton && props.isExpanded && (React__default["default"].createElement(AccordionItemCloseButton, { tabIndex: 0, onClick: props.onClick, onKeyDown: props.onKeyDown, "aria-label": props.closeLabel, role: "button" },
79
- React__default["default"].createElement("span", null, props.closeLabel),
80
- React__default["default"].createElement(Icon["default"], { icon: icons.Close })))));
81
- return type === 'box' ? (React__default["default"].createElement(Box["default"], { elevation: props.isExpanded ? 'low' : 'none', padding: "0" }, itemContent)) : (itemContent);
70
+ props.isExpanded ? (React.createElement(Icon.default, { icon: icons.ChevronUp, color: theme.default.color.default.black, position: "right", "aria-label": props.closeLabel })) : (React.createElement(Icon.default, { icon: icons.ChevronDown, color: theme.default.color.default.black, position: "right", "aria-label": props.openLabel }))),
71
+ React.createElement(AccordionItemContentWrapper, { maxHeight: contentHeight, isExpanded: props.isExpanded },
72
+ React.createElement(AccordionItemContent, { ref: contentRef }, props.children)),
73
+ hasCloseButton && props.isExpanded && (React.createElement(AccordionItemCloseButton, { tabIndex: 0, onClick: props.onClick, onKeyDown: props.onKeyDown, "aria-label": props.closeLabel, role: "button" },
74
+ React.createElement("span", null, props.closeLabel),
75
+ React.createElement(Icon.default, { icon: icons.Close })))));
76
+ return type === 'box' ? (React.createElement(Box.default, { elevation: props.isExpanded ? 'low' : 'none', padding: "0" }, itemContent)) : (itemContent);
82
77
  };
83
78
 
84
- exports["default"] = AccordionItem;
79
+ exports.default = AccordionItem;
@@ -11,23 +11,19 @@ var styledUtils = require('../../utils/styledUtils.js');
11
11
  var ButtonArrow = require('../Button/ButtonArrow.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 Container = styled["default"].div `
14
+ const Container = styled.default.div `
19
15
  display: flex;
20
- width: ${styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 12)};
16
+ width: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 12)};
21
17
  `;
22
- const Button = styled["default"](ButtonArrow["default"]) `
18
+ const Button = styled.default(ButtonArrow.default) `
23
19
  display: inline-flex;
24
- width: ${styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 4)};
25
- height: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 4)};
20
+ width: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 4)};
21
+ height: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 4)};
26
22
  border-radius: 0;
27
23
 
28
24
  &:first-of-type {
29
- border-top-left-radius: ${theme["default"].radius.s};
30
- border-bottom-left-radius: ${theme["default"].radius.s};
25
+ border-top-left-radius: ${theme.default.radius.s};
26
+ border-bottom-left-radius: ${theme.default.radius.s};
31
27
 
32
28
  &:focus {
33
29
  z-index: 2;
@@ -35,32 +31,32 @@ const Button = styled["default"](ButtonArrow["default"]) `
35
31
  }
36
32
 
37
33
  &:last-of-type {
38
- border-top-right-radius: ${theme["default"].radius.s};
39
- border-bottom-right-radius: ${theme["default"].radius.s};
34
+ border-top-right-radius: ${theme.default.radius.s};
35
+ border-bottom-right-radius: ${theme.default.radius.s};
40
36
  }
41
37
  `;
42
- const Input = styled["default"].input `
43
- width: ${styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 4)};
44
- height: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 4)};
45
- font-family: ${theme["default"].fontFamily.default};
46
- font-size: ${theme["default"].fontSize.default};
38
+ const Input = styled.default.input `
39
+ width: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 4)};
40
+ height: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 4)};
41
+ font-family: ${theme.default.fontFamily.default};
42
+ font-size: ${theme.default.fontSize.default};
47
43
  text-align: center;
48
44
  border: 0 none;
49
45
  border-radius: 0;
50
- border-top: 1px solid ${theme["default"].color.line.L01};
51
- border-bottom: 1px solid ${theme["default"].color.line.L01};
46
+ border-top: 1px solid ${theme.default.color.line.L01};
47
+ border-bottom: 1px solid ${theme.default.color.line.L01};
52
48
 
53
49
  &:focus {
54
- border: 2px solid ${theme["default"].color.focus.light};
55
- box-shadow: 0px 0px 0px 2px ${theme["default"].color.focus.dark};
50
+ border: 2px solid ${theme.default.color.focus.light};
51
+ box-shadow: 0px 0px 0px 2px ${theme.default.color.focus.dark};
56
52
  outline: none;
57
53
  z-index: 2;
58
54
  }
59
55
 
60
56
  &:disabled,
61
57
  &[disabled] {
62
- background-color: ${theme["default"].color.background.sand.E02 + theme["default"].color.transparency.T30};
63
- border: 1px solid ${theme["default"].color.line.L02 + theme["default"].color.transparency.T30};
58
+ background-color: ${theme.default.color.background.sand.E02 + theme.default.color.transparency.T30};
59
+ border: 1px solid ${theme.default.color.line.L02 + theme.default.color.transparency.T30};
64
60
  }
65
61
 
66
62
  &:read-only {
@@ -107,11 +103,11 @@ const AmountSelector = (_a) => {
107
103
  onChange(min);
108
104
  }
109
105
  };
110
- return (React__default["default"].createElement(Container, { "data-testid": dataTestId, className: props.className },
111
- React__default["default"].createElement(Button, { icon: React__default["default"].createElement(Icon["default"], { icon: props.removable && isMinReached(value - step) ? icons.Trash : icons.Minus, size: styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 2) }), variant: "secondary", onClick: decrease, disabled: disabled, type: "button", "data-testid": dataTestId &&
106
+ return (React.createElement(Container, { "data-testid": dataTestId, className: props.className },
107
+ React.createElement(Button, { icon: React.createElement(Icon.default, { icon: props.removable && isMinReached(value - step) ? icons.Trash : icons.Minus, size: styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2) }), variant: "secondary", onClick: decrease, disabled: disabled, type: "button", "data-testid": dataTestId &&
112
108
  `${dataTestId}${props.removable && isMinReached(value - step) ? '-remove' : '-decrease'}` }),
113
- React__default["default"].createElement(Input, { id: props.id, name: props.name, type: "number", onChange: handleChange, value: value, readOnly: readonly || disabled, disabled: disabled }),
114
- React__default["default"].createElement(Button, { icon: React__default["default"].createElement(Icon["default"], { icon: icons.Plus, size: styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 2) }), variant: "secondary", onClick: increase, disabled: disabled, type: "button", "data-testid": dataTestId ? `${dataTestId}-increase` : undefined })));
109
+ React.createElement(Input, { id: props.id, name: props.name, type: "number", onChange: handleChange, value: value, readOnly: readonly || disabled, disabled: disabled }),
110
+ React.createElement(Button, { icon: React.createElement(Icon.default, { icon: icons.Plus, size: styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2) }), variant: "secondary", onClick: increase, disabled: disabled, type: "button", "data-testid": dataTestId ? `${dataTestId}-increase` : undefined })));
115
111
  };
116
112
 
117
- exports["default"] = AmountSelector;
113
+ exports.default = AmountSelector;
@@ -9,24 +9,19 @@ var theme = require('../../themes/theme.js');
9
9
  var common = require('../../utils/common.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
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
16
-
17
- const BoxWrapper = styled__default["default"].div `
18
- border: 1px solid ${theme["default"].color.line.L04};
12
+ const BoxWrapper = styled.div `
13
+ border: 1px solid ${theme.default.color.line.L04};
19
14
  ${({ width }) => width && `width: ${width}`};
20
15
  ${({ height }) => height && `height: ${height}`};
21
16
  ${({ margin }) => margin && `margin: ${margin}`};
22
- padding: ${({ padding }) => padding || styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 2)};
23
- background-color: ${theme["default"].color.default.white};
24
- border-radius: ${theme["default"].radius.default};
25
- ${({ $elevation, shadow }) => $elevation !== 'none' && common["default"]({ elevation: $elevation, shadow })}
17
+ padding: ${({ padding }) => padding || styledUtils.getMultipliedSize(theme.default.base.baseHeight, 2)};
18
+ background-color: ${theme.default.color.default.white};
19
+ border-radius: ${theme.default.radius.default};
20
+ ${({ $elevation, shadow }) => $elevation !== 'none' && common.default({ elevation: $elevation, shadow })}
26
21
  `;
27
22
  const Box = (_a) => {
28
23
  var { elevation = 'none', 'data-testid': dataTestId } = _a, props = tslib.__rest(_a, ["elevation", 'data-testid']);
29
- return (React__default["default"].createElement(BoxWrapper, { id: props.id, "$elevation": elevation, shadow: props.shadow, width: props.width, height: props.height, margin: props.margin, padding: props.padding, className: props.className, "data-testid": dataTestId }, props.children));
24
+ return (React.createElement(BoxWrapper, { id: props.id, "$elevation": elevation, shadow: props.shadow, width: props.width, height: props.height, margin: props.margin, padding: props.padding, className: props.className, "data-testid": dataTestId }, props.children));
30
25
  };
31
26
 
32
- exports["default"] = Box;
27
+ exports.default = Box;
@@ -9,11 +9,6 @@ var theme = require('../../themes/theme.js');
9
9
  var styledUtils = require('../../utils/styledUtils.js');
10
10
  var PixelLoader = require('../PixelLoader/PixelLoader.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
12
  // Only Button component specific shades to be used on user interaction styles
18
13
  const shade = {
19
14
  pink: {
@@ -31,66 +26,66 @@ const shade = {
31
26
  },
32
27
  },
33
28
  };
34
- const Element = styled__default["default"].button `
29
+ const Element = styled.button `
35
30
  display: inline-block;
36
- font-family: ${theme["default"].fontFamily.default};
37
- font-weight: ${theme["default"].fontWeight.bold};
38
- font-size: ${({ small }) => (small ? theme["default"].fontSize.s : theme["default"].fontSize.default)};
39
- line-height: ${({ small }) => (small ? theme["default"].lineHeight.xs : theme["default"].lineHeight.default)};
40
- min-width: ${({ small }) => styledUtils.getMultipliedSize(theme["default"].base.baseWidth, small ? 10 : 12.8)};
31
+ font-family: ${theme.default.fontFamily.default};
32
+ font-weight: ${theme.default.fontWeight.bold};
33
+ font-size: ${({ small }) => (small ? theme.default.fontSize.s : theme.default.fontSize.default)};
34
+ line-height: ${({ small }) => (small ? theme.default.lineHeight.xs : theme.default.lineHeight.default)};
35
+ min-width: ${({ small }) => styledUtils.getMultipliedSize(theme.default.base.baseWidth, small ? 10 : 12.8)};
41
36
  width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};
42
37
  cursor: pointer;
43
- color: ${({ darkBg }) => (darkBg ? theme["default"].color.text.white : theme["default"].color.text.plum)};
38
+ color: ${({ darkBg }) => (darkBg ? theme.default.color.text.white : theme.default.color.text.plum)};
44
39
  background-color: transparent;
45
- border-radius: ${theme["default"].radius.pill};
40
+ border-radius: ${theme.default.radius.pill};
46
41
  border: 2px solid
47
- ${({ darkBg }) => (darkBg ? theme["default"].color.default.white : theme["default"].color.default.plum)};
48
- padding: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 0.6)}
49
- ${styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 2)};
42
+ ${({ darkBg }) => (darkBg ? theme.default.color.default.white : theme.default.color.default.plum)};
43
+ padding: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 0.6)}
44
+ ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 2)};
50
45
 
51
46
  > span {
52
47
  display: inline-flex;
53
48
  }
54
49
 
55
50
  &:focus {
56
- color: ${({ darkBg }) => (darkBg ? theme["default"].color.text.plum : theme["default"].color.text.white)};
57
- background-color: ${({ darkBg }) => darkBg ? theme["default"].color.default.white : shade.plum.darker};
51
+ color: ${({ darkBg }) => (darkBg ? theme.default.color.text.plum : theme.default.color.text.white)};
52
+ background-color: ${({ darkBg }) => darkBg ? theme.default.color.default.white : shade.plum.darker};
58
53
  border: 2px solid
59
- ${({ darkBg }) => (darkBg ? theme["default"].color.focus.dark : theme["default"].color.focus.light)};
54
+ ${({ darkBg }) => (darkBg ? theme.default.color.focus.dark : theme.default.color.focus.light)};
60
55
  box-shadow: 0px 0px 0px 2px
61
- ${({ darkBg }) => (darkBg ? theme["default"].color.focus.light : theme["default"].color.focus.dark)};
56
+ ${({ darkBg }) => (darkBg ? theme.default.color.focus.light : theme.default.color.focus.dark)};
62
57
  outline: none;
63
58
  }
64
59
 
65
60
  &:hover {
66
- color: ${({ darkBg }) => (darkBg ? theme["default"].color.text.plum : theme["default"].color.text.white)};
67
- background-color: ${({ darkBg }) => darkBg ? theme["default"].color.default.white : shade.plum.darker};
61
+ color: ${({ darkBg }) => (darkBg ? theme.default.color.text.plum : theme.default.color.text.white)};
62
+ background-color: ${({ darkBg }) => darkBg ? theme.default.color.default.white : shade.plum.darker};
68
63
 
69
64
  &:focus {
70
65
  border: 2px solid
71
- ${({ darkBg }) => (darkBg ? theme["default"].color.focus.dark : theme["default"].color.focus.light)};
66
+ ${({ darkBg }) => (darkBg ? theme.default.color.focus.dark : theme.default.color.focus.light)};
72
67
  box-shadow: 0px 0px 0px 2px
73
- ${({ darkBg }) => (darkBg ? theme["default"].color.focus.light : theme["default"].color.focus.dark)};
68
+ ${({ darkBg }) => (darkBg ? theme.default.color.focus.light : theme.default.color.focus.dark)};
74
69
  }
75
70
  }
76
71
 
77
72
  &:active {
78
- color: ${({ darkBg }) => (darkBg ? theme["default"].color.text.plum : theme["default"].color.text.white)};
79
- background-color: ${({ darkBg }) => darkBg ? theme["default"].color.default.white + theme["default"].color.transparency.T90 : shade.plum.lighter};
73
+ color: ${({ darkBg }) => (darkBg ? theme.default.color.text.plum : theme.default.color.text.white)};
74
+ background-color: ${({ darkBg }) => darkBg ? theme.default.color.default.white + theme.default.color.transparency.T90 : shade.plum.lighter};
80
75
  border: 2px solid
81
76
  ${({ darkBg }) => darkBg
82
- ? theme["default"].color.default.white + theme["default"].color.transparency.T90
77
+ ? theme.default.color.default.white + theme.default.color.transparency.T90
83
78
  : shade.plum.lighter};
84
79
  outline: none;
85
80
  }
86
81
 
87
82
  &:disabled,
88
83
  &[disabled] {
89
- color: ${({ darkBg }) => darkBg ? theme["default"].color.text.white + theme["default"].color.transparency.T70 : theme["default"].color.text.gray};
84
+ color: ${({ darkBg }) => darkBg ? theme.default.color.text.white + theme.default.color.transparency.T70 : theme.default.color.text.gray};
90
85
  border: 2px solid
91
86
  ${({ darkBg }) => darkBg
92
- ? theme["default"].color.default.white + theme["default"].color.transparency.T30
93
- : theme["default"].color.default.plum + theme["default"].color.transparency.T30};
87
+ ? theme.default.color.default.white + theme.default.color.transparency.T30
88
+ : theme.default.color.default.plum + theme.default.color.transparency.T30};
94
89
  pointer-events: none;
95
90
  }
96
91
 
@@ -123,11 +118,11 @@ const Element = styled__default["default"].button `
123
118
  /** @visibleName Button */
124
119
  const Button = (_a) => {
125
120
  var { type = 'submit', 'data-testid': dataTestId, 'data-no-close': dataNoClose, 'data-track-value': dataTrackValue } = _a, props = tslib.__rest(_a, ["type", 'data-testid', 'data-no-close', 'data-track-value']);
126
- return (React__default["default"].createElement(Element, Object.assign({ id: props.id, as: props.href ? 'a' : undefined, type: props.href ? undefined : type, href: props.href, onClick: props.onClick, onMouseDown: props.onMouseDown, small: props.small, darkBg: props.darkBg, fullWidth: props.fullWidth, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue }, (!props.href && {
121
+ return (React.createElement(Element, Object.assign({ id: props.id, as: props.href ? 'a' : undefined, type: props.href ? undefined : type, href: props.href, onClick: props.onClick, onMouseDown: props.onMouseDown, small: props.small, darkBg: props.darkBg, fullWidth: props.fullWidth, "$loading": props.loading, tabIndex: props.loading ? -1 : 0, "data-loading": props.loading, className: props.className, "data-testid": dataTestId, "data-no-close": dataNoClose, "data-track-value": dataTrackValue }, (!props.href && {
127
122
  name: props.name,
128
123
  disabled: props.disabled,
129
- })), props.loading ? (React__default["default"].createElement(PixelLoader["default"], { color: props.darkBg ? theme["default"].color.default.white : theme["default"].color.default.plum })) : (React__default["default"].createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, props.children))));
124
+ })), props.loading ? (React.createElement(PixelLoader.default, { color: props.darkBg ? theme.default.color.default.white : theme.default.color.default.plum })) : (React.createElement("span", { "data-testid": dataTestId && `${dataTestId}-text`, "data-no-close": dataNoClose }, props.children))));
130
125
  };
131
126
 
132
- exports["default"] = Button;
127
+ exports.default = Button;
133
128
  exports.shade = shade;
@@ -12,11 +12,6 @@ var Icon = require('../Icon/Icon.js');
12
12
  var ButtonPrimary = require('./ButtonPrimary.js');
13
13
  var ButtonSecondary = require('./ButtonSecondary.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
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
19
-
20
15
  const iconsMap = {
21
16
  up: icons.ChevronUp,
22
17
  right: icons.ChevronRight,
@@ -26,8 +21,8 @@ const iconsMap = {
26
21
  const overrideStyles = `
27
22
  display: flex;
28
23
  min-width: initial;
29
- width: ${styledUtils.getMultipliedSize(theme["default"].base.baseWidth, 3.2)};
30
- height: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 3.2)};
24
+ width: ${styledUtils.getMultipliedSize(theme.default.base.baseWidth, 3.2)};
25
+ height: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 3.2)};
31
26
  padding: initial;
32
27
  text-align: center;
33
28
  vertical-align: middle;
@@ -35,37 +30,37 @@ const overrideStyles = `
35
30
  align-items: center;
36
31
  `;
37
32
  const buttonsMap = {
38
- primary: styled__default["default"](ButtonPrimary["default"]) `
33
+ primary: styled(ButtonPrimary.default) `
39
34
  ${overrideStyles};
40
- border-radius: ${theme["default"].radius.circle};
35
+ border-radius: ${theme.default.radius.circle};
41
36
 
42
37
  &:disabled,
43
38
  &[disabled] {
44
- color: ${theme["default"].color.text.black};
39
+ color: ${theme.default.color.text.black};
45
40
  }
46
41
  `,
47
- secondary: styled__default["default"](ButtonSecondary["default"]) `
42
+ secondary: styled(ButtonSecondary.default) `
48
43
  ${overrideStyles};
49
- color: ${theme["default"].color.text.black};
50
- border: 1px solid ${theme["default"].color.line.L01};
51
- border-radius: ${theme["default"].radius.s};
44
+ color: ${theme.default.color.text.black};
45
+ border: 1px solid ${theme.default.color.line.L01};
46
+ border-radius: ${theme.default.radius.s};
52
47
 
53
48
  &:focus {
54
- color: ${theme["default"].color.text.black};
49
+ color: ${theme.default.color.text.black};
55
50
  }
56
51
 
57
52
  &:hover {
58
- color: ${theme["default"].color.text.black};
53
+ color: ${theme.default.color.text.black};
59
54
  }
60
55
 
61
56
  &:active {
62
- color: ${theme["default"].color.text.black};
63
- border: 1px solid ${theme["default"].color.line.L01};
57
+ color: ${theme.default.color.text.black};
58
+ border: 1px solid ${theme.default.color.line.L01};
64
59
  }
65
60
 
66
61
  &:disabled,
67
62
  &[disabled] {
68
- border: 1px solid ${theme["default"].color.line.L02 + theme["default"].color.transparency.T30};
63
+ border: 1px solid ${theme.default.color.line.L02 + theme.default.color.transparency.T30};
69
64
  }
70
65
  `,
71
66
  };
@@ -73,7 +68,7 @@ const buttonsMap = {
73
68
  const ButtonArrow = (_a) => {
74
69
  var { variant = 'primary', 'data-testid': dataTestId, 'data-track-value': dataTrackValue } = _a, props = tslib.__rest(_a, ["variant", 'data-testid', 'data-track-value']);
75
70
  const Element = buttonsMap[variant];
76
- return (React__default["default"].createElement(Element, { id: props.id, href: props.href, 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-track-value": dataTrackValue }, props.direction ? (React__default["default"].createElement(Icon["default"], { icon: iconsMap[props.direction], size: "1rem" })) : (React.isValidElement(props.icon) && props.icon.type === Icon["default"] && props.icon)));
71
+ return (React.createElement(Element, { id: props.id, href: props.href, 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-track-value": dataTrackValue }, props.direction ? (React.createElement(Icon.default, { icon: iconsMap[props.direction], size: "1rem" })) : (React.isValidElement(props.icon) && props.icon.type === Icon.default && props.icon)));
77
72
  };
78
73
 
79
- exports["default"] = ButtonArrow;
74
+ exports.default = ButtonArrow;
@@ -8,15 +8,11 @@ var styled = require('../../themes/styled.js');
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
-
15
- const ButtonElement = styled["default"].button `
11
+ const ButtonElement = styled.default.button `
16
12
  position: absolute;
17
13
  top: 0;
18
14
  right: 0;
19
- margin: ${styledUtils.getMultipliedSize(theme["default"].base.baseHeight, 1)};
15
+ margin: ${styledUtils.getMultipliedSize(theme.default.base.baseHeight, 1)};
20
16
  display: inline-flex;
21
17
  cursor: pointer;
22
18
  background: none;
@@ -26,7 +22,7 @@ const ButtonElement = styled["default"].button `
26
22
  /** @visibleName Button Close */
27
23
  const ButtonClose = (_a) => {
28
24
  var { 'data-testid': dataTestId, 'aria-label': ariaLabel } = _a, props = tslib.__rest(_a, ['data-testid', 'aria-label']);
29
- return (React__default["default"].createElement(ButtonElement, { id: props.id, name: props.name, onClick: props.onClick, onMouseDown: props.onMouseDown, className: props.className, "data-testid": dataTestId, "aria-label": ariaLabel }, props.children));
25
+ return (React.createElement(ButtonElement, { id: props.id, name: props.name, onClick: props.onClick, onMouseDown: props.onMouseDown, className: props.className, "data-testid": dataTestId, "aria-label": ariaLabel }, props.children));
30
26
  };
31
27
 
32
- exports["default"] = ButtonClose;
28
+ exports.default = ButtonClose;