@laerdal/life-react-components 1.0.1-dev.19.full → 1.0.1-dev.22.full

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 (198) hide show
  1. package/dist/esm/AuthPage/Information.js +4 -7
  2. package/dist/esm/AuthPage/Information.js.map +1 -1
  3. package/dist/esm/Banners/Banner.js +5 -5
  4. package/dist/esm/Banners/Banner.js.map +1 -1
  5. package/dist/esm/Banners/OverviewBanner.js +2 -2
  6. package/dist/esm/Banners/OverviewBanner.js.map +1 -1
  7. package/dist/esm/Breadcrumb/Breadcrumb.js +46 -20
  8. package/dist/esm/Breadcrumb/Breadcrumb.js.map +1 -1
  9. package/dist/esm/Button/Iconbutton.js +4 -1
  10. package/dist/esm/Button/Iconbutton.js.map +1 -1
  11. package/dist/esm/Dropdown/CommonStyling.js +28 -28
  12. package/dist/esm/Dropdown/CommonStyling.js.map +1 -1
  13. package/dist/esm/Footer/Components/FooterDropdownLinks.js +9 -9
  14. package/dist/esm/Footer/Components/FooterDropdownLinks.js.map +1 -1
  15. package/dist/esm/Footer/Components/FooterNavSection.js +4 -8
  16. package/dist/esm/Footer/Components/FooterNavSection.js.map +1 -1
  17. package/dist/esm/Footer/Components/FooterNewsletterAndSocialSection.js +4 -4
  18. package/dist/esm/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  19. package/dist/esm/Footer/Components/FooterTop.js +2 -2
  20. package/dist/esm/Footer/Components/FooterTop.js.map +1 -1
  21. package/dist/esm/GlobalNavigationBar/Logo.js +8 -11
  22. package/dist/esm/GlobalNavigationBar/Logo.js.map +1 -1
  23. package/dist/esm/GlobalNavigationBar/RightSideNav.js +4 -3
  24. package/dist/esm/GlobalNavigationBar/RightSideNav.js.map +1 -1
  25. package/dist/esm/GlobalNavigationBar/UserMenu/MenuLink.js +3 -6
  26. package/dist/esm/GlobalNavigationBar/UserMenu/MenuLink.js.map +1 -1
  27. package/dist/esm/GlobalNavigationBar/UserMenu/MobileUserMenu.js +10 -7
  28. package/dist/esm/GlobalNavigationBar/UserMenu/MobileUserMenu.js.map +1 -1
  29. package/dist/esm/GlobalNavigationBar/UserMenu/UserMenu.js +5 -13
  30. package/dist/esm/GlobalNavigationBar/UserMenu/UserMenu.js.map +1 -1
  31. package/dist/esm/GlobalNavigationBar/mobile/CommonStyles.js +4 -1
  32. package/dist/esm/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  33. package/dist/esm/GlobalNavigationBar/mobile/MobileMenu.js +6 -9
  34. package/dist/esm/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  35. package/dist/esm/InputFields/DatepickerField.js +13 -14
  36. package/dist/esm/InputFields/DatepickerField.js.map +1 -1
  37. package/dist/esm/InputFields/components/SearchBarInput.js +11 -11
  38. package/dist/esm/InputFields/components/SearchBarInput.js.map +1 -1
  39. package/dist/esm/InputFields/components/SearchField.js +13 -11
  40. package/dist/esm/InputFields/components/SearchField.js.map +1 -1
  41. package/dist/esm/List/ListRow.js +5 -2
  42. package/dist/esm/List/ListRow.js.map +1 -1
  43. package/dist/esm/List/ListRowDropdown.js +4 -5
  44. package/dist/esm/List/ListRowDropdown.js.map +1 -1
  45. package/dist/esm/LoadingPage/GlobalLoadingPage.js +4 -3
  46. package/dist/esm/LoadingPage/GlobalLoadingPage.js.map +1 -1
  47. package/dist/esm/MiniProductCard/MiniProductCard.js +4 -5
  48. package/dist/esm/MiniProductCard/MiniProductCard.js.map +1 -1
  49. package/dist/esm/Modals/ModalDialog.js +22 -10
  50. package/dist/esm/Modals/ModalDialog.js.map +1 -1
  51. package/dist/esm/Paginator/Paginator.js +5 -6
  52. package/dist/esm/Paginator/Paginator.js.map +1 -1
  53. package/dist/esm/SkipToContent/SkipToContent.js +4 -5
  54. package/dist/esm/SkipToContent/SkipToContent.js.map +1 -1
  55. package/dist/esm/Switcher/MobileSwitcherMenu.js +4 -4
  56. package/dist/esm/Switcher/MobileSwitcherMenu.js.map +1 -1
  57. package/dist/esm/Switcher/SwitcherMenuItem.js +8 -9
  58. package/dist/esm/Switcher/SwitcherMenuItem.js.map +1 -1
  59. package/dist/esm/Tabs/HorizontalTabs.js +7 -10
  60. package/dist/esm/Tabs/HorizontalTabs.js.map +1 -1
  61. package/dist/esm/Toasters/Toast.js +1 -2
  62. package/dist/esm/Toasters/Toast.js.map +1 -1
  63. package/dist/esm/styles/typography.js +52 -1
  64. package/dist/esm/styles/typography.js.map +1 -1
  65. package/dist/js/AuthPage/Information.js +4 -2
  66. package/dist/js/AuthPage/Information.js.map +1 -1
  67. package/dist/js/Banners/Banner.js +2 -2
  68. package/dist/js/Banners/Banner.js.map +1 -1
  69. package/dist/js/Banners/OverviewBanner.js +3 -1
  70. package/dist/js/Banners/OverviewBanner.js.map +1 -1
  71. package/dist/js/Breadcrumb/Breadcrumb.d.ts +2 -0
  72. package/dist/js/Breadcrumb/Breadcrumb.js +46 -14
  73. package/dist/js/Breadcrumb/Breadcrumb.js.map +1 -1
  74. package/dist/js/Button/Iconbutton.d.ts +1 -0
  75. package/dist/js/Button/Iconbutton.js +4 -1
  76. package/dist/js/Button/Iconbutton.js.map +1 -1
  77. package/dist/js/Dropdown/CommonStyling.js +4 -4
  78. package/dist/js/Dropdown/CommonStyling.js.map +1 -1
  79. package/dist/js/Footer/Components/FooterDropdownLinks.js +3 -3
  80. package/dist/js/Footer/Components/FooterDropdownLinks.js.map +1 -1
  81. package/dist/js/Footer/Components/FooterNavSection.js +4 -2
  82. package/dist/js/Footer/Components/FooterNavSection.js.map +1 -1
  83. package/dist/js/Footer/Components/FooterNewsletterAndSocialSection.js +2 -2
  84. package/dist/js/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  85. package/dist/js/Footer/Components/FooterTop.js +3 -1
  86. package/dist/js/Footer/Components/FooterTop.js.map +1 -1
  87. package/dist/js/GlobalNavigationBar/Logo.js +9 -7
  88. package/dist/js/GlobalNavigationBar/Logo.js.map +1 -1
  89. package/dist/js/GlobalNavigationBar/RightSideNav.js +3 -1
  90. package/dist/js/GlobalNavigationBar/RightSideNav.js.map +1 -1
  91. package/dist/js/GlobalNavigationBar/UserMenu/MenuLink.js +3 -1
  92. package/dist/js/GlobalNavigationBar/UserMenu/MenuLink.js.map +1 -1
  93. package/dist/js/GlobalNavigationBar/UserMenu/MobileUserMenu.js +4 -2
  94. package/dist/js/GlobalNavigationBar/UserMenu/MobileUserMenu.js.map +1 -1
  95. package/dist/js/GlobalNavigationBar/UserMenu/UserMenu.js +4 -2
  96. package/dist/js/GlobalNavigationBar/UserMenu/UserMenu.js.map +1 -1
  97. package/dist/js/GlobalNavigationBar/mobile/CommonStyles.js +1 -1
  98. package/dist/js/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  99. package/dist/js/GlobalNavigationBar/mobile/MobileMenu.d.ts +1 -1
  100. package/dist/js/GlobalNavigationBar/mobile/MobileMenu.js +4 -2
  101. package/dist/js/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  102. package/dist/js/InputFields/DatepickerField.js +4 -2
  103. package/dist/js/InputFields/DatepickerField.js.map +1 -1
  104. package/dist/js/InputFields/components/SearchBarInput.js +4 -2
  105. package/dist/js/InputFields/components/SearchBarInput.js.map +1 -1
  106. package/dist/js/InputFields/components/SearchField.js +3 -1
  107. package/dist/js/InputFields/components/SearchField.js.map +1 -1
  108. package/dist/js/List/ListRow.js +3 -1
  109. package/dist/js/List/ListRow.js.map +1 -1
  110. package/dist/js/List/ListRowDropdown.js +3 -1
  111. package/dist/js/List/ListRowDropdown.js.map +1 -1
  112. package/dist/js/LoadingPage/GlobalLoadingPage.js +3 -1
  113. package/dist/js/LoadingPage/GlobalLoadingPage.js.map +1 -1
  114. package/dist/js/MiniProductCard/MiniProductCard.js +4 -2
  115. package/dist/js/MiniProductCard/MiniProductCard.js.map +1 -1
  116. package/dist/js/Modals/ModalDialog.d.ts +1 -1
  117. package/dist/js/Modals/ModalDialog.js +24 -10
  118. package/dist/js/Modals/ModalDialog.js.map +1 -1
  119. package/dist/js/Paginator/Paginator.js +3 -1
  120. package/dist/js/Paginator/Paginator.js.map +1 -1
  121. package/dist/js/SkipToContent/SkipToContent.js +3 -1
  122. package/dist/js/SkipToContent/SkipToContent.js.map +1 -1
  123. package/dist/js/Switcher/MobileSwitcherMenu.js +3 -1
  124. package/dist/js/Switcher/MobileSwitcherMenu.js.map +1 -1
  125. package/dist/js/Switcher/SwitcherMenuItem.js +3 -1
  126. package/dist/js/Switcher/SwitcherMenuItem.js.map +1 -1
  127. package/dist/js/Tabs/HorizontalTabs.js +3 -1
  128. package/dist/js/Tabs/HorizontalTabs.js.map +1 -1
  129. package/dist/js/Toasters/Toast.js +3 -3
  130. package/dist/js/Toasters/Toast.js.map +1 -1
  131. package/dist/js/styles/typography.d.ts +19 -6
  132. package/dist/js/styles/typography.js +80 -5
  133. package/dist/js/styles/typography.js.map +1 -1
  134. package/dist/umd/AuthPage/Information.js +6 -10
  135. package/dist/umd/AuthPage/Information.js.map +1 -1
  136. package/dist/umd/Banners/Banner.js +2 -2
  137. package/dist/umd/Banners/Banner.js.map +1 -1
  138. package/dist/umd/Banners/OverviewBanner.js +5 -6
  139. package/dist/umd/Banners/OverviewBanner.js.map +1 -1
  140. package/dist/umd/Breadcrumb/Breadcrumb.js +48 -22
  141. package/dist/umd/Breadcrumb/Breadcrumb.js.map +1 -1
  142. package/dist/umd/Button/Iconbutton.js +4 -1
  143. package/dist/umd/Button/Iconbutton.js.map +1 -1
  144. package/dist/umd/Dropdown/CommonStyling.js +28 -28
  145. package/dist/umd/Dropdown/CommonStyling.js.map +1 -1
  146. package/dist/umd/Footer/Components/FooterDropdownLinks.js +8 -8
  147. package/dist/umd/Footer/Components/FooterDropdownLinks.js.map +1 -1
  148. package/dist/umd/Footer/Components/FooterNavSection.js +6 -11
  149. package/dist/umd/Footer/Components/FooterNavSection.js.map +1 -1
  150. package/dist/umd/Footer/Components/FooterNewsletterAndSocialSection.js +3 -3
  151. package/dist/umd/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  152. package/dist/umd/Footer/Components/FooterTop.js +5 -6
  153. package/dist/umd/Footer/Components/FooterTop.js.map +1 -1
  154. package/dist/umd/GlobalNavigationBar/Logo.js +10 -14
  155. package/dist/umd/GlobalNavigationBar/Logo.js.map +1 -1
  156. package/dist/umd/GlobalNavigationBar/RightSideNav.js +6 -6
  157. package/dist/umd/GlobalNavigationBar/RightSideNav.js.map +1 -1
  158. package/dist/umd/GlobalNavigationBar/UserMenu/MenuLink.js +5 -9
  159. package/dist/umd/GlobalNavigationBar/UserMenu/MenuLink.js.map +1 -1
  160. package/dist/umd/GlobalNavigationBar/UserMenu/MobileUserMenu.js +12 -10
  161. package/dist/umd/GlobalNavigationBar/UserMenu/MobileUserMenu.js.map +1 -1
  162. package/dist/umd/GlobalNavigationBar/UserMenu/UserMenu.js +7 -16
  163. package/dist/umd/GlobalNavigationBar/UserMenu/UserMenu.js.map +1 -1
  164. package/dist/umd/GlobalNavigationBar/mobile/CommonStyles.js +4 -1
  165. package/dist/umd/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  166. package/dist/umd/GlobalNavigationBar/mobile/MobileMenu.js +7 -11
  167. package/dist/umd/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  168. package/dist/umd/InputFields/DatepickerField.js +15 -16
  169. package/dist/umd/InputFields/DatepickerField.js.map +1 -1
  170. package/dist/umd/InputFields/components/SearchBarInput.js +13 -14
  171. package/dist/umd/InputFields/components/SearchBarInput.js.map +1 -1
  172. package/dist/umd/InputFields/components/SearchField.js +15 -14
  173. package/dist/umd/InputFields/components/SearchField.js.map +1 -1
  174. package/dist/umd/List/ListRow.js +7 -5
  175. package/dist/umd/List/ListRow.js.map +1 -1
  176. package/dist/umd/List/ListRowDropdown.js +6 -8
  177. package/dist/umd/List/ListRowDropdown.js.map +1 -1
  178. package/dist/umd/LoadingPage/GlobalLoadingPage.js +6 -6
  179. package/dist/umd/LoadingPage/GlobalLoadingPage.js.map +1 -1
  180. package/dist/umd/MiniProductCard/MiniProductCard.js +6 -8
  181. package/dist/umd/MiniProductCard/MiniProductCard.js.map +1 -1
  182. package/dist/umd/Modals/ModalDialog.js +22 -10
  183. package/dist/umd/Modals/ModalDialog.js.map +1 -1
  184. package/dist/umd/Paginator/Paginator.js +7 -9
  185. package/dist/umd/Paginator/Paginator.js.map +1 -1
  186. package/dist/umd/SkipToContent/SkipToContent.js +6 -8
  187. package/dist/umd/SkipToContent/SkipToContent.js.map +1 -1
  188. package/dist/umd/Switcher/MobileSwitcherMenu.js +6 -7
  189. package/dist/umd/Switcher/MobileSwitcherMenu.js.map +1 -1
  190. package/dist/umd/Switcher/SwitcherMenuItem.js +10 -12
  191. package/dist/umd/Switcher/SwitcherMenuItem.js.map +1 -1
  192. package/dist/umd/Tabs/HorizontalTabs.js +8 -12
  193. package/dist/umd/Tabs/HorizontalTabs.js.map +1 -1
  194. package/dist/umd/Toasters/Toast.js +1 -2
  195. package/dist/umd/Toasters/Toast.js.map +1 -1
  196. package/dist/umd/styles/typography.js +62 -2
  197. package/dist/umd/styles/typography.js.map +1 -1
  198. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
1
  import _pt from "prop-types";
2
2
  import * as React from 'react';
3
3
  import styled from 'styled-components';
4
- import { BREAKPOINTS, COLORS } from '../../styles/index';
4
+ import { BREAKPOINTS, COLORS, ComponentTextStyle } from '../../styles/index';
5
+ import { ComponentMStyling, ComponentSStyling } from '../../styles/typography';
5
6
  export const Search = styled.input.attrs(() => ({
6
7
  type: 'search'
7
8
  }))`
8
9
  appearance: none;
9
- font-size: 1rem;
10
10
  width: calc(100% - 96px);
11
+ ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}
11
12
 
12
13
  /* To prevent browser putting its own cross inside the search bar */
13
14
  ::-ms-clear {
@@ -28,8 +29,7 @@ export const Search = styled.input.attrs(() => ({
28
29
  }
29
30
 
30
31
  ::placeholder {
31
- font-style: italic;
32
- color: ${COLORS.neutral_400};
32
+ ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}
33
33
  }
34
34
 
35
35
  &:focus {
@@ -38,28 +38,28 @@ export const Search = styled.input.attrs(() => ({
38
38
  `;
39
39
  export const BigSearch = styled(Search)`
40
40
  height: 32px;
41
- font-size: 1.125rem;
42
41
  border-width: 0;
43
42
  margin-left: 50px;
44
- color: ${COLORS.black};
45
43
  outline: none;
44
+
45
+ ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}
46
+
46
47
  ::placeholder {
47
- color: ${COLORS.neutral_600};
48
- font-size: 16px;
48
+ ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}
49
49
  }
50
50
  ${BREAKPOINTS.MEDIUM} {
51
51
  ::placeholder {
52
- font-size: 18px;
52
+ ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}
53
53
  }
54
54
  }
55
55
  &.small {
56
56
  ::placeholder {
57
- font-size: 16px;
57
+ ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}
58
58
  }
59
59
  }
60
60
  &.medium {
61
61
  ::placeholder {
62
- font-size: 18px;
62
+ ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}
63
63
  }
64
64
  }
65
65
  &:disabled {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/InputFields/components/SearchBarInput.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","Search","input","attrs","type","neutral_400","BigSearch","black","neutral_600","MEDIUM","SearchBarInput","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","setTabbedHere","onBlur","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,WAAT,EAAsBC,MAAtB,QAAoC,oBAApC;AAEA,OAAO,MAAMC,MAAM,GAAGH,MAAM,CAACI,KAAP,CAAaC,KAAb,CA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S,EAAEO,IAAI,GAAGA,IAAH,GAAU,EAJ3B;AAKE,IAAA,QAAQ,EAAE,CAAC,CALb;AAME,IAAA,QAAQ,EAAEF,QANZ;AAOE,IAAA,QAAQ,EAAGM,CAAD,IAAYT,aAAa,CAACS,CAAC,CAACI,MAAF,CAASC,KAAV,CAPrC;AAQE,IAAA,KAAK,EAAEf,UART;AASE,IAAA,GAAG,EAAEF,GATP;AAUE,IAAA,MAAM,EAAGY,CAAD,IAAQF,MAAM,GAAGA,MAAM,CAACE,CAAD,CAAT,GAAeH,aAAa,CAAC,KAAD,CAVpD;AAWE,IAAA,SAAS,EAAEF,SAXb;AAYE,IAAA,UAAU,EAAGK,CAAD,IAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBR,WAAW,CAACQ,CAAD,CAAhC,GAAsC;AAZjE,IADF;AAgBD,CA3BsB,CAAvB;;AAZEX,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AACAC,EAAAA,I,aAAO,O,EAAU,Q;AACjBC,EAAAA,a;AACAC,EAAAA,M;;AAgCF,eAAeb,cAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { BREAKPOINTS, COLORS } from '../../styles/index';\n\nexport const Search = styled.input.attrs(() => ({ type: 'search' }))`\n appearance: none;\n font-size: 1rem;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n font-style: italic;\n color: ${COLORS.neutral_400};\n }\n\n &:focus {\n outline-width: 0;\n }\n`;\n\nexport const BigSearch = styled(Search)`\n height: 32px;\n font-size: 1.125rem;\n border-width: 0;\n margin-left: 50px;\n color: ${COLORS.black};\n outline: none;\n ::placeholder {\n color: ${COLORS.neutral_600};\n font-size: 16px;\n }\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n font-size: 18px;\n }\n }\n &.small {\n ::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n ::placeholder {\n font-size: 18px;\n }\n }\n &:disabled {\n background: transparent;\n border: none;\n }\n`;\n\ntype SearchBarInputProps = {\n id: string;\n searchTerm?: string;\n setSearchTerm: (term: string) => void;\n enterSearch: (e: any) => void;\n placeholder?: string;\n disabled?: boolean;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n size?: 'small' | 'medium';\n setTabbedHere: (tabbedHere: boolean) => void;\n onBlur?: (e: any) => void;\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const { id, searchTerm, setSearchTerm, enterSearch, placeholder, disabled, onKeyDown, size, setTabbedHere, onBlur } = props;\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n return (\n <BigSearch\n placeholder={disabled ? '' : placeholder}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={-1}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n ref={ref}\n onBlur={(e) => (onBlur ? onBlur(e) : setTabbedHere(false))}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.js"}
1
+ {"version":3,"sources":["../../../../src/InputFields/components/SearchBarInput.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","ComponentMStyling","ComponentSStyling","Search","input","attrs","type","Regular","black","Italic","neutral_500","BigSearch","neutral_600","MEDIUM","SearchBarInput","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","setTabbedHere","onBlur","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,kBAA7B,QAAsD,oBAAtD;AACA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,yBAAnD;AAEA,OAAO,MAAMC,MAAM,GAAGN,MAAM,CAACO,KAAP,CAAaC,KAAb,CAAmB,OAAO;AAAEC,EAAAA,IAAI,EAAE;AAAR,CAAP,CAAnB,CAA+C;AACrE;AACA;AACA,IAAIJ,iBAAiB,CAACF,kBAAkB,CAACO,OAApB,EAA6BR,MAAM,CAACS,KAApC,CAA2C;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMN,iBAAiB,CAACF,kBAAkB,CAACS,MAApB,EAA4BV,MAAM,CAACW,WAAnC,CAAgD;AACvE;AACA;AACA;AACA;AACA;AACA,CA9BO;AAgCP,OAAO,MAAMC,SAAS,GAAGd,MAAM,CAACM,MAAD,CAAS;AACxC;AACA;AACA;AACA;AACA;AACA,IAAIF,iBAAiB,CAACD,kBAAkB,CAACO,OAApB,EAA6BR,MAAM,CAACS,KAApC,CAA2C;AAChE;AACA;AACA,MAAMN,iBAAiB,CAACF,kBAAkB,CAACS,MAApB,EAA4BV,MAAM,CAACa,WAAnC,CAAgD;AACvE;AACA,IAAId,WAAW,CAACe,MAAO;AACvB;AACA,QAAQZ,iBAAiB,CAACD,kBAAkB,CAACS,MAApB,EAA4BV,MAAM,CAACa,WAAnC,CAAgD;AACzE;AACA;AACA;AACA;AACA,QAAQV,iBAAiB,CAACF,kBAAkB,CAACS,MAApB,EAA4BV,MAAM,CAACa,WAAnC,CAAgD;AACzE;AACA;AACA;AACA;AACA,QAAQX,iBAAiB,CAACD,kB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ACC,CAAD,CAAf,GAAqBR,WAAW,CAACQ,CAAD,CAAhC,GAAsC;AAZjE,IADF;AAgBD,CA3BsB,CAAvB;;AAZEX,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AACAC,EAAAA,I,aAAO,O,EAAU,Q;AACjBC,EAAAA,a;AACAC,EAAAA,M;;AAgCF,eAAeb,cAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles/typography';\n\nexport const Search = styled.input.attrs(() => ({ type: 'search' }))`\n appearance: none;\n width: calc(100% - 96px);\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n /* To prevent browser putting its own cross inside the search bar */\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n &:focus {\n outline-width: 0;\n }\n`;\n\nexport const BigSearch = styled(Search)`\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n &:disabled {\n background: transparent;\n border: none;\n }\n`;\n\ntype SearchBarInputProps = {\n id: string;\n searchTerm?: string;\n setSearchTerm: (term: string) => void;\n enterSearch: (e: any) => void;\n placeholder?: string;\n disabled?: boolean;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n size?: 'small' | 'medium';\n setTabbedHere: (tabbedHere: boolean) => void;\n onBlur?: (e: any) => void;\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const { id, searchTerm, setSearchTerm, enterSearch, placeholder, disabled, onKeyDown, size, setTabbedHere, onBlur } = props;\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n return (\n <BigSearch\n placeholder={disabled ? '' : placeholder}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={-1}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n ref={ref}\n onBlur={(e) => (onBlur ? onBlur(e) : setTabbedHere(false))}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.js"}
@@ -1,8 +1,9 @@
1
1
  import _pt from "prop-types";
2
2
  import * as React from 'react';
3
3
  import styled, { css } from 'styled-components';
4
- import { BREAKPOINTS, COLORS } from '../../styles/index';
4
+ import { BREAKPOINTS, COLORS, ComponentTextStyle } from '../../styles/index';
5
5
  import { activeValidationMessageState, tabbedHereStyle } from '../styling';
6
+ import { ComponentMStyling, ComponentSStyling } from '../../styles/typography';
6
7
  const DisabledState = css`
7
8
  border: 1px solid ${COLORS.neutral_100};
8
9
  pointer-events: none;
@@ -20,35 +21,36 @@ export const StyledSearchField = styled.div`
20
21
  position: relative;
21
22
  height: 48px;
22
23
  appearance: none;
23
- font-size: 1rem;
24
+
25
+ ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}
26
+
24
27
  padding: 0 !important;
25
28
  width: 100%;
26
29
  ::placeholder {
27
- font-style: italic;
28
- color: ${COLORS.neutral_400};
30
+ ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}
29
31
  }
30
32
  ${BREAKPOINTS.MEDIUM} {
31
- font-size: 18px;
32
- line-height: 18px;
33
+ ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}
34
+
33
35
  height: 56px;
34
36
  padding: 0 4px !important;
35
37
  &::placeholder {
36
- font-size: 18px;
38
+ ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}
37
39
  }
38
40
  }
39
41
  &.small {
40
- font-size: 16px;
42
+ ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}
41
43
  height: 48px;
42
44
  padding: 0 !important;
43
45
  &::placeholder {
44
- font-size: 16px;
46
+ ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}
45
47
  }
46
48
  }
47
49
  &.medium {
48
- font-size: 18px;
50
+ ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}
49
51
  height: 56px;
50
52
  &::placeholder {
51
- font-size: 18px;
53
+ ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}
52
54
  }
53
55
  }
54
56
  &:hover {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/InputFields/components/SearchField.tsx"],"names":["React","styled","css","BREAKPOINTS","COLORS","activeValidationMessageState","tabbedHereStyle","DisabledState","neutral_100","StyledSearchField","div","neutral_300","neutral_400","MEDIUM","primary_700","primary_800","neutral_600","props","disabled","activeValidationMessage","tabbedHere","SearchField","id","searchTerm","validationMessage","children","size","concat","undefined"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AACA,SAASC,WAAT,EAAsBC,MAAtB,QAAoC,oBAApC;AACA,SAASC,4BAAT,EAAuCC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,oBAAC,iBAAD;AACE,IAAA,EAAE,EAAG,GAAEJ,EAAG,OADZ;AAEE,IAAA,SAAS,EAAE,CAACC,UAAU,KAAK,EAAf,GAAoB,eAApB,GAAsC,EAAvC,EAA2CI,MAA3C,CAAkDD,IAAI,GAAGA,IAAH,GAAU,EAAhE,CAFb;AAGE,IAAA,QAAQ,EAAER,QAHZ;AAIE,IAAA,UAAU,EAAEE,UAJd;AAKE,IAAA,QAAQ,EAAE,CAAC,CALb;AAME,IAAA,uBAAuB,EAAEI,iBAAiB,KAAKI,SAAtB,IAAmCJ,iBAAiB,KAAK;AANpF,KAOGC,QAPH,CADF;AAWD,CAZD;;;AATEH,EAAAA,E;AACAC,EAAAA,U;AACAL,EAAAA,Q;AACAM,EAAAA,iB;AACAC,EAAAA,Q;AACAL,EAAAA,U;AACAM,EAAAA,I;;AAiBF,eAAeL,WAAf","sourcesContent":["import * as React from 'react';\nimport styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS } from '../../styles/index';\nimport { activeValidationMessageState, tabbedHereStyle } from '../styling';\n\nconst DisabledState = css`\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n box-shadow: none !important;\n`;\n\nexport const StyledSearchField = styled.div<{ disabled?: boolean; activeValidationMessage?: boolean; tabbedHere?: boolean }>`\n display: flex;\n flex-direction: row;\n border: solid 2px transparent;\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_300};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n font-size: 1rem;\n padding: 0 !important;\n width: 100%;\n ::placeholder {\n font-style: italic;\n color: ${COLORS.neutral_400};\n }\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 4px !important;\n &::placeholder {\n font-size: 18px;\n }\n }\n &.small {\n font-size: 16px;\n height: 48px;\n padding: 0 !important;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n &:hover {\n -webkit-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n -moz-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n border-color: transparent;\n }\n &:focus-within {\n -webkit-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n -moz-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n border-color: transparent;\n }\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n div {\n color: ${COLORS.neutral_600};\n }\n ${(props) => (props.disabled ? DisabledState : '')}\n ${(props) => (props.activeValidationMessage ? activeValidationMessageState : '')}\n ${(props) => (props.tabbedHere ? tabbedHereStyle : '')}\n`;\n\ntype SeachFieldProps = {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n tabbedHere: boolean;\n size: string;\n};\n\nconst SearchField: React.FunctionComponent<SeachFieldProps> = ({ id, searchTerm, disabled, validationMessage, children, tabbedHere, size }) => {\n return (\n <StyledSearchField\n id={`${id}_main`}\n className={(searchTerm !== '' ? 'searchactive ' : '').concat(size ? size : '')}\n disabled={disabled}\n tabbedHere={tabbedHere}\n tabIndex={-1}\n activeValidationMessage={validationMessage !== undefined && validationMessage !== ''}>\n {children}\n </StyledSearchField>\n );\n};\n\nexport default SearchField;\n"],"file":"SearchField.js"}
1
+ {"version":3,"sources":["../../../../src/InputFields/components/SearchField.tsx"],"names":["React","styled","css","BREAKPOINTS","COLORS","ComponentTextStyle","activeValidationMessageState","tabbedHereStyle","ComponentMStyling","ComponentSStyling","DisabledState","neutral_100","StyledSearchField","div","neutral_300","Regular","black","Italic","neutral_500","MEDIUM","primary_700","primary_800","neutral_600","props","disabled","activeValidationMessage","tabbedHere","SearchField","id","searchTerm","validationMessage","children","size","concat","undefined"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,IAAgBC,GAAhB,QAA0B,mBAA1B;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,kBAA7B,QAAsD,oBAAtD;AACA,SAAQC,4BAAR,EAAsCC,eAAtC,QAA4D,YAA5D;AACA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,yBAAnD;AAEA,MAAMC,aAAa,GAAGR,GAAI;AAC1B,sBAAsBE,MAAM,CAACO,WAAY;AACzC;AACA;AACA;AACA,CALA;AAOA,OAAO,MAAMC,iBAAiB,GAAGX,MAAM,CAACY,GAAqF;AAC7H;AACA;AACA;AACA,sCAAsCT,MAAM,CAACU,WAAY;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIL,iBAAiB,CAACJ,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAA2C;AAChE;AACA;AACA;AACA;AACA,MAAMP,iBAAiB,CAACJ,kBAAkB,CAACY,MAApB,EAA4Bb,MAAM,CAACc,WAAnC,CAAgD;AACvE;AACA,IAAIf,WAAW,CAACgB,MAAO;AACvB,MAAMX,iBAAiB,CAACH,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAA2C;AAClE;AACA;AACA;AACA;AACA,QAAQR,iBAAiB,CAACH,kBAAkB,CAACY,MAApB,EAA4Bb,MAAM,CAACc,WAAnC,CAAgD;AACzE;AACA;AACA;AACA,MAAMT,iBAAiB,CAACJ,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAA2C;AAClE;AACA;AACA;AACA,QAAQP,iBAAiB,CAACJ,kBAAkB,CAACY,MAApB,EAA4Bb,MAAM,CAACc,WAAnC,CAAgD;AACzE;AACA;AACA;AACA,MAAMV,iBAAiB,CAACH,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAA2C;AAClE;AACA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SAAtB,IAAmCJ,iBAAiB,KAAK;AANpF,KAOGC,QAPH,CADF;AAWD,CAZD;;;AATEH,EAAAA,E;AACAC,EAAAA,U;AACAL,EAAAA,Q;AACAM,EAAAA,iB;AACAC,EAAAA,Q;AACAL,EAAAA,U;AACAM,EAAAA,I;;AAiBF,eAAeL,WAAf","sourcesContent":["import * as React from 'react';\nimport styled, {css} from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {activeValidationMessageState, tabbedHereStyle} from '../styling';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles/typography';\n\nconst DisabledState = css`\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n box-shadow: none !important;\n`;\n\nexport const StyledSearchField = styled.div<{ disabled?: boolean; activeValidationMessage?: boolean; tabbedHere?: boolean }>`\n display: flex;\n flex-direction: row;\n border: solid 2px transparent;\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_300};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n &:hover {\n -webkit-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n -moz-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n border-color: transparent;\n }\n &:focus-within {\n -webkit-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n -moz-box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n border-color: transparent;\n }\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n div {\n color: ${COLORS.neutral_600};\n }\n ${(props) => (props.disabled ? DisabledState : '')}\n ${(props) => (props.activeValidationMessage ? activeValidationMessageState : '')}\n ${(props) => (props.tabbedHere ? tabbedHereStyle : '')}\n`;\n\ntype SeachFieldProps = {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n tabbedHere: boolean;\n size: string;\n};\n\nconst SearchField: React.FunctionComponent<SeachFieldProps> = ({ id, searchTerm, disabled, validationMessage, children, tabbedHere, size }) => {\n return (\n <StyledSearchField\n id={`${id}_main`}\n className={(searchTerm !== '' ? 'searchactive ' : '').concat(size ? size : '')}\n disabled={disabled}\n tabbedHere={tabbedHere}\n tabIndex={-1}\n activeValidationMessage={validationMessage !== undefined && validationMessage !== ''}>\n {children}\n </StyledSearchField>\n );\n};\n\nexport default SearchField;\n"],"file":"SearchField.js"}
@@ -3,8 +3,9 @@ import * as React from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { Button } from '../Button';
5
5
  import { MoreVertical } from '../icons/systemicons/SystemIcons';
6
- import { COLORS } from '../styles';
6
+ import { COLORS, ComponentTextStyle } from '../styles';
7
7
  import ListRowDropdown from './ListRowDropdown';
8
+ import { ComponentSStyling } from '../styles/typography';
8
9
  const EditRow = styled.div`
9
10
  display: flex;
10
11
  justify-content: space-between;
@@ -32,8 +33,10 @@ const EditRow = styled.div`
32
33
  const LeftSection = styled.div`
33
34
  display: flex;
34
35
  flex-direction: row;
35
- font-size: 16px;
36
36
  align-items: center;
37
+
38
+ ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}
39
+
37
40
  svg {
38
41
  margin-right: 12px;
39
42
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/List/ListRow.tsx"],"names":["React","styled","Button","MoreVertical","COLORS","ListRowDropdown","EditRow","div","props","disableDifferentBackgroundforEvenNumbers","neutral_20","neutral_100","LeftSection","MainInfo","ButtonWrapper","UserDropdownButton","white","StyledMoreVertical","primary_20","primary_100","ListRow","key","Icon","mainInfo","dropdownOptions","color","black","dropdownActive","setDropdownActive","useState","neutral_500"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,SAASC,YAAT,QAA6B,kCAA7B;AACA,SAAsBC,MAAtB,QAAoC,WAApC;AAGA,OAAOC,eAAP,MAA4B,mBAA5B;AAEA,MAAMC,OAAO,GAAGL,MAAM,CAACM,GAA4D;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwBC,KAAK,IAAKA,KAAK,CAACC,wCAAN,GAAiD,SAAjD,GAA6DL,MAAM,CAACM,UAAY;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwBN,MAAM,CAACO,WAAY;AAC3C;AACA,CAvBA;AAyBA,MAAMC,WAAW,GAAGX,MAAM,CAACM,GAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CARA;AAUA,MAAMM,QAAQ,GAAGZ,MAAM,CAACM,GAAI;AAC5B;AACA;AACA;AACA,CAJA;AAMA,MAAMO,aAAa,GAAGb,MAAM,CAACM,GAAI;AACjC;AACA,CAFA;AAIA,MAAMQ,kBAAkB,GAAGd,MAAM,CAACC,MAAD,CAAS;AAC1C;AACA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C,IADF,CALF,CADF,EAUGH,cAAc,iBAAI,oBAAC,eAAD;AAAiB,IAAA,aAAa,EAAE,MAAMC,iBAAiB,CAAC,KAAD,CAAvD;AAAgE,IAAA,OAAO,EAAEJ;AAAzE,IAVrB,CANF,CADF;AAqBD,CAzBD;;;AAPEH,EAAAA,G;AACAC,EAAAA,I;AACAC,EAAAA,Q;AACAC,EAAAA,e;AACAf,EAAAA,wC;;AA8BF,eAAeW,OAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '../Button';\nimport { MoreVertical } from '../icons/systemicons/SystemIcons';\nimport { BREAKPOINTS, COLORS } from '../styles';\nimport { ListRowDropdownOption } from '../types';\n\nimport ListRowDropdown from './ListRowDropdown';\n\nconst EditRow = styled.div<{ disableDifferentBackgroundforEvenNumbers?: boolean }>`\n display: flex;\n justify-content: space-between;\n padding: 8px 12px;\n align-items: center;\n\n &:nth-child(even) {\n background-color: ${props => (props.disableDifferentBackgroundforEvenNumbers ? 'inherit' : COLORS.neutral_20)};\n }\n\n .user-actions {\n display: flex;\n position: relative;\n align-items: center;\n }\n\n .somePaddingForAlignment {\n padding: 0 3px 0 0;\n }\n\n &.active {\n background-color: ${COLORS.neutral_100};\n }\n`;\n\nconst LeftSection = styled.div`\n display: flex;\n flex-direction: row;\n font-size: 16px;\n align-items: center;\n svg {\n margin-right: 12px;\n }\n`;\n\nconst MainInfo = styled.div`\n margin: auto 1em auto 0;\n display: flex;\n flex-direction: column;\n`;\n\nconst ButtonWrapper = styled.div`\n outline: none;\n`;\n\nconst UserDropdownButton = styled(Button)`\n display: flex;\n text-decoration: none;\n outline: none;\n div {\n outline: none;\n }\n &:focus > div {\n box-shadow: 0px 0px 8px #2e7fa1, 0px 4px 12px rgba(46, 127, 161, 0.25);\n border-radius: 4px;\n outline: none;\n background: ${COLORS.white};\n }\n`;\n\nconst StyledMoreVertical = styled(MoreVertical)`\n padding: 8px 8px;\n outline: none;\n &:hover {\n background: ${COLORS.primary_20};\n border-radius: 4px;\n }\n &:active {\n background: ${COLORS.primary_100};\n border-radius: 4px;\n }\n`;\n\ntype Props = {\n key?: string;\n Icon?: any;\n mainInfo: any;\n dropdownOptions: ListRowDropdownOption[];\n disableDifferentBackgroundforEvenNumbers?: boolean;\n};\n\nconst ListRow: React.FunctionComponent<Props> = ({ key, Icon, mainInfo, dropdownOptions, disableDifferentBackgroundforEvenNumbers }: Props) => {\n const color = COLORS.black;\n const [dropdownActive, setDropdownActive] = React.useState<Boolean>(false);\n\n return (\n <EditRow key={key} disableDifferentBackgroundforEvenNumbers={disableDifferentBackgroundforEvenNumbers}>\n <LeftSection color={color} data-hj-suppress>\n {Icon && <Icon size=\"22px\" color={color} className=\"somePaddingForAlignment\" />}\n <MainInfo data-hj-suppress>{mainInfo}</MainInfo>\n </LeftSection>\n\n <ButtonWrapper className=\"user-actions\">\n <UserDropdownButton\n variant=\"text\"\n onClick={() => {\n setDropdownActive(true);\n }}>\n <div tabIndex={-1}>\n <StyledMoreVertical size=\"22px\" color={COLORS.neutral_500} />\n </div>\n </UserDropdownButton>\n {dropdownActive && <ListRowDropdown closeDropdown={() => setDropdownActive(false)} options={dropdownOptions} />}\n </ButtonWrapper>\n </EditRow>\n );\n};\n\nexport default ListRow;\n"],"file":"ListRow.js"}
1
+ {"version":3,"sources":["../../../src/List/ListRow.tsx"],"names":["React","styled","Button","MoreVertical","COLORS","ComponentTextStyle","ListRowDropdown","ComponentSStyling","EditRow","div","props","disableDifferentBackgroundforEvenNumbers","neutral_20","neutral_100","LeftSection","Regular","MainInfo","ButtonWrapper","UserDropdownButton","white","StyledMoreVertical","primary_20","primary_100","ListRow","key","Icon","mainInfo","dropdownOptions","color","black","dropdownActive","setDropdownActive","useState","neutral_500"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,MAAR,QAAqB,WAArB;AACA,SAAQC,YAAR,QAA2B,kCAA3B;AACA,S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,KAArB;AACA,QAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsC/B,KAAK,CAACgC,QAAN,CAAwB,KAAxB,CAA5C;AAEA,sBACE,oBAAC,OAAD;AAAS,IAAA,GAAG,EAAER,GAAd;AAAmB,IAAA,wCAAwC,EAAEb;AAA7D,kBACE,oBAAC,WAAD;AAAa,IAAA,KAAK,EAAEiB,KAApB;AAA2B;AAA3B,KACGH,IAAI,iBAAI,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAC,MAAX;AAAkB,IAAA,KAAK,EAAEG,KAAzB;AAAgC,IAAA,SAAS,EAAC;AAA1C,IADX,eAEE,oBAAC,QAAD;AAAU;AAAV,KAA4BF,QAA5B,CAFF,CADF,eAME,oBAAC,aAAD;AAAe,IAAA,SAAS,EAAC;AAAzB,kBACE,oBAAC,kBAAD;AACE,IAAA,OAAO,EAAC,MADV;AAEE,IAAA,OAAO,EAAE,MAAM;AACbK,MAAAA,iBAAiB,CAAC,IAAD,CAAjB;AACD;AAJH,kBAKE;AAAK,IAAA,QAAQ,EAAE,CAAC;AAAhB,kBACE,oBAAC,kBAAD;AAAoB,IAAA,IAAI,EAAC,MAAzB;AAAgC,IAAA,KAAK,EAAE3B,MAAM,CAAC6B;AAA9C,IADF,CALF,CADF,EAUGH,cAAc,iBAAI,oBAAC,eAAD;AAAiB,IAAA,aAAa,EAAE,MAAMC,iBAAiB,CAAC,KAAD,CAAvD;AAAgE,IAAA,OAAO,EAAEJ;AAAzE,IAVrB,CANF,CADF;AAqBD,CAzBD;;;AAPEH,EAAAA,G;AACAC,EAAAA,I;AACAC,EAAAA,Q;AACAC,EAAAA,e;AACAhB,EAAAA,wC;;AA8BF,eAAeY,OAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {Button} from '../Button';\nimport {MoreVertical} from '../icons/systemicons/SystemIcons';\nimport {COLORS, ComponentTextStyle} from '../styles';\nimport {ListRowDropdownOption} from '../types';\n\nimport ListRowDropdown from './ListRowDropdown';\nimport {ComponentSStyling} from '../styles/typography';\n\nconst EditRow = styled.div<{ disableDifferentBackgroundforEvenNumbers?: boolean }>`\n display: flex;\n justify-content: space-between;\n padding: 8px 12px;\n align-items: center;\n\n &:nth-child(even) {\n background-color: ${props => (props.disableDifferentBackgroundforEvenNumbers ? 'inherit' : COLORS.neutral_20)};\n }\n\n .user-actions {\n display: flex;\n position: relative;\n align-items: center;\n }\n\n .somePaddingForAlignment {\n padding: 0 3px 0 0;\n }\n\n &.active {\n background-color: ${COLORS.neutral_100};\n }\n`;\n\nconst LeftSection = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n\n svg {\n margin-right: 12px;\n }\n`;\n\nconst MainInfo = styled.div`\n margin: auto 1em auto 0;\n display: flex;\n flex-direction: column;\n`;\n\nconst ButtonWrapper = styled.div`\n outline: none;\n`;\n\nconst UserDropdownButton = styled(Button)`\n display: flex;\n text-decoration: none;\n outline: none;\n div {\n outline: none;\n }\n &:focus > div {\n box-shadow: 0px 0px 8px #2e7fa1, 0px 4px 12px rgba(46, 127, 161, 0.25);\n border-radius: 4px;\n outline: none;\n background: ${COLORS.white};\n }\n`;\n\nconst StyledMoreVertical = styled(MoreVertical)`\n padding: 8px 8px;\n outline: none;\n &:hover {\n background: ${COLORS.primary_20};\n border-radius: 4px;\n }\n &:active {\n background: ${COLORS.primary_100};\n border-radius: 4px;\n }\n`;\n\ntype Props = {\n key?: string;\n Icon?: any;\n mainInfo: any;\n dropdownOptions: ListRowDropdownOption[];\n disableDifferentBackgroundforEvenNumbers?: boolean;\n};\n\nconst ListRow: React.FunctionComponent<Props> = ({ key, Icon, mainInfo, dropdownOptions, disableDifferentBackgroundforEvenNumbers }: Props) => {\n const color = COLORS.black;\n const [dropdownActive, setDropdownActive] = React.useState<Boolean>(false);\n\n return (\n <EditRow key={key} disableDifferentBackgroundforEvenNumbers={disableDifferentBackgroundforEvenNumbers}>\n <LeftSection color={color} data-hj-suppress>\n {Icon && <Icon size=\"22px\" color={color} className=\"somePaddingForAlignment\" />}\n <MainInfo data-hj-suppress>{mainInfo}</MainInfo>\n </LeftSection>\n\n <ButtonWrapper className=\"user-actions\">\n <UserDropdownButton\n variant=\"text\"\n onClick={() => {\n setDropdownActive(true);\n }}>\n <div tabIndex={-1}>\n <StyledMoreVertical size=\"22px\" color={COLORS.neutral_500} />\n </div>\n </UserDropdownButton>\n {dropdownActive && <ListRowDropdown closeDropdown={() => setDropdownActive(false)} options={dropdownOptions} />}\n </ButtonWrapper>\n </EditRow>\n );\n};\n\nexport default ListRow;\n"],"file":"ListRow.js"}
@@ -1,7 +1,8 @@
1
1
  import _pt from "prop-types";
2
2
  import * as React from 'react';
3
3
  import styled from 'styled-components';
4
- import { COLORS } from '../styles';
4
+ import { COLORS, ComponentTextStyle } from '../styles';
5
+ import { ComponentMStyling } from '../styles/typography';
5
6
  const Wrapper = styled.div`
6
7
  .isInside {
7
8
  top: 42px;
@@ -27,11 +28,9 @@ const Content = styled.button`
27
28
  padding: 12px 16px;
28
29
 
29
30
  text-align: left;
30
- font-style: normal;
31
- font-weight: normal;
32
- font-size: 16px;
33
31
  height: 48px;
34
- color: ${COLORS.neutral_600};
32
+
33
+ ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}
35
34
 
36
35
  background-color: ${COLORS.white};
37
36
  border-width: 0;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/List/ListRowDropdown.tsx"],"names":["React","styled","COLORS","Wrapper","div","DropdownMenuContainer","white","Content","button","neutral_600","primary_20","primary_100","ListRowDropdown","options","closeDropdown","classname","setClassname","useState","reference","useRef","clickIsOutside","e","current","contains","target","handleClick","keyCode","isInViewport","offset","top","getBoundingClientRect","bottom","inside","window","innerHeight","useEffect","document","addEventListener","removeEventListener","map","option","key","action","label"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SA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MAAM,GAAG,CAAV,KAAgB;AACnC,QAAI,CAACV,SAAS,CAACI,OAAf,EAAwB;AACxB,UAAMO,GAAG,GAAGX,SAAS,CAACI,OAAV,CAAkBQ,qBAAlB,GAA0CC,MAAtD;AACA,UAAMC,MAAM,GAAGH,GAAG,GAAGD,MAAN,IAAgB,CAAhB,IAAqBC,GAAG,GAAGD,MAAN,IAAgBK,MAAM,CAACC,WAA3D;;AACA,QAAI,CAACF,MAAL,EAAa;AACXhB,MAAAA,YAAY,CAAC,WAAD,CAAZ;AACD;AACF,GAPD;;AASAhB,EAAAA,KAAK,CAACmC,SAAN,CAAgB,MAAM;AACpBC,IAAAA,QAAQ,CAACC,gBAAT,CAA0B,WAA1B,EAAuCZ,WAAvC,EAAoD,KAApD;AACAW,IAAAA,QAAQ,CAACC,gBAAT,CAA0B,SAA1B,EAAqCZ,WAArC,EAAkD,KAAlD;AACAE,IAAAA,YAAY;AACZ,WAAO,MAAM;AACXS,MAAAA,QAAQ,CAACE,mBAAT,CAA6B,WAA7B,EAA0Cb,WAA1C,EAAuD,KAAvD;AACAW,MAAAA,QAAQ,CAACE,mBAAT,CAA6B,SAA7B,EAAwCb,WAAxC,EAAqD,KAArD;AACD,KAHD,CAJoB,CAQpB;AACD,GATD,EASG,EATH;AAWA,sBACE,oBAAC,OAAD,qBACE,oBAAC,qBAAD;AAAuB,IAAA,GAAG,EAAEP,SAA5B;AAAuC,IAAA,SAAS,EAAEH;AAAlD,KACGF,OAAO,CAAC0B,GAAR,CAAYC,MAAM,iBACjB,oBAAC,OAAD;AAAS,IAAA,GAAG,EAAEA,MAAM,CAACC,GAArB;AAA0B,IAAA,OAAO,EAAED,MAAM,CAACE;AAA1C,KACGF,MAAM,CAACG,KADV,CADD,CADH,CADF,CADF;AAWD,CA/CD;;;AAJE9B,EAAAA,O;AACAC,EAAAA,a;;AAoDF,eAAeF,eAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '../styles';\nimport { ListRowDropdownOption } from '../types';\n\nconst Wrapper = styled.div`\n .isInside {\n top: 42px;\n }\n .isOutside {\n bottom: 42px;\n }\n`;\n\nconst DropdownMenuContainer = styled.div`\n position: absolute;\n flex-direction: column;\n background: ${COLORS.white};\n font-size: 1em;\n z-index: 1;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n right: 0;\n width: max-content;\n min-width: 260px;\n`;\n\nconst Content = styled.button`\n min-width: 100%;\n padding: 12px 16px;\n\n text-align: left;\n font-style: normal;\n font-weight: normal;\n font-size: 16px;\n height: 48px;\n color: ${COLORS.neutral_600};\n\n background-color: ${COLORS.white};\n border-width: 0;\n\n &:hover,\n &:focus {\n cursor: pointer;\n }\n\n &:hover {\n background: ${COLORS.primary_20};\n border-radius: 4px;\n }\n &:active {\n background: ${COLORS.primary_100};\n border-radius: 4px;\n }\n`;\n\ntype DropdownMenuProps = {\n options: ListRowDropdownOption[];\n closeDropdown: any;\n};\n\nconst ListRowDropdown: React.FunctionComponent<DropdownMenuProps> = ({ options, closeDropdown }: DropdownMenuProps) => {\n const [classname, setClassname] = React.useState('isInside');\n const reference = React.useRef<HTMLDivElement>(null);\n\n const clickIsOutside = (e: any) => reference && reference?.current && !reference?.current.contains(e.target);\n\n const handleClick = (e: any) => {\n if (e.keyCode) {\n if (e.keyCode === 27) {\n closeDropdown();\n }\n } else if (clickIsOutside(e)) {\n closeDropdown();\n }\n };\n\n const isInViewport = (offset = 0) => {\n if (!reference.current) return;\n const top = reference.current.getBoundingClientRect().bottom;\n const inside = top + offset >= 0 && top - offset <= window.innerHeight;\n if (!inside) {\n setClassname('isOutside');\n }\n };\n\n React.useEffect(() => {\n document.addEventListener('mousedown', handleClick, false);\n document.addEventListener('keydown', handleClick, false);\n isInViewport();\n return () => {\n document.removeEventListener('mousedown', handleClick, false);\n document.removeEventListener('keydown', handleClick, false);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Wrapper>\n <DropdownMenuContainer ref={reference} className={classname}>\n {options.map(option => (\n <Content key={option.key} onClick={option.action}>\n {option.label}\n </Content>\n ))}\n </DropdownMenuContainer>\n </Wrapper>\n );\n};\n\nexport default ListRowDropdown;\n"],"file":"ListRowDropdown.js"}
1
+ {"version":3,"sources":["../../../src/List/ListRowDropdown.tsx"],"names":["React","styled","COLORS","ComponentTextStyle","ComponentMStyling","Wrapper","div","DropdownMenuContainer","white","Content","button","Regular","neutral_600","primary_20","primary_100","ListRowDropdown","options","closeDropdown","classname","setClassname","useState","reference","useRef","clickIsOutside","e","current","contains","target","handleClick","keyCode","isInViewport","offset","top","getBoundingClientRect","bottom","inside","window","innerHeight","useEffect","document","addEventListener","removeEventListener","map","option","key","action","label"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,MAAR,EAAgBC,kBAAhB,QAAyC,WAAzC;AAEA,SAAQC,iBAAR,QAAgC,sBAAhC;AAEA,MAAMC,OAAO,GAAGJ,MAAM,CAACK,GAAI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,CAPA;AASA,MAAMC,qBAAqB,GAAGN,MAAM,CAACK,GAAI;AACzC;AACA;AACA,gBAAgBJ,MAAM,CAACM,KAAM;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAXA;AAaA,MAAMC,OAAO,GAAGR,MAAM,CAACS,MAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,IAAIN,iBAAiB,CAACD,kBAAkB,CAACQ,OAApB,EAA6BT,MAAM,CAACU,WAApC,CAAiD;AACtE;AACA,sBAAsBV,MAAM,CAACM,KAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkBN,MAAM,CAACW,UAAW;AACpC;AACA;AACA;AACA,kBAAkBX,MAAM,CAACY,WAAY;AACrC;AACA;AACA,CAzBA;;AAgCA,MAAMC,eAA2D,GAAG,CAAC;AAAEC,EAAAA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AAAA,QAAQ,CAACE,mBAAT,CAA6B,WAA7B,EAA0Cb,WAA1C,EAAuD,KAAvD;AACAW,MAAAA,QAAQ,CAACE,mBAAT,CAA6B,SAA7B,EAAwCb,WAAxC,EAAqD,KAArD;AACD,KAHD,CAJoB,CAQpB;AACD,GATD,EASG,EATH;AAWA,sBACE,oBAAC,OAAD,qBACE,oBAAC,qBAAD;AAAuB,IAAA,GAAG,EAAEP,SAA5B;AAAuC,IAAA,SAAS,EAAEH;AAAlD,KACGF,OAAO,CAAC0B,GAAR,CAAYC,MAAM,iBACjB,oBAAC,OAAD;AAAS,IAAA,GAAG,EAAEA,MAAM,CAACC,GAArB;AAA0B,IAAA,OAAO,EAAED,MAAM,CAACE;AAA1C,KACGF,MAAM,CAACG,KADV,CADD,CADH,CADF,CADF;AAWD,CA/CD;;;AAJE9B,EAAAA,O;AACAC,EAAAA,a;;AAoDF,eAAeF,eAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {COLORS, ComponentTextStyle} from '../styles';\nimport {ListRowDropdownOption} from '../types';\nimport {ComponentMStyling} from '../styles/typography';\n\nconst Wrapper = styled.div`\n .isInside {\n top: 42px;\n }\n .isOutside {\n bottom: 42px;\n }\n`;\n\nconst DropdownMenuContainer = styled.div`\n position: absolute;\n flex-direction: column;\n background: ${COLORS.white};\n font-size: 1em;\n z-index: 1;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n right: 0;\n width: max-content;\n min-width: 260px;\n`;\n\nconst Content = styled.button`\n min-width: 100%;\n padding: 12px 16px;\n\n text-align: left;\n height: 48px;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n background-color: ${COLORS.white};\n border-width: 0;\n\n &:hover,\n &:focus {\n cursor: pointer;\n }\n\n &:hover {\n background: ${COLORS.primary_20};\n border-radius: 4px;\n }\n &:active {\n background: ${COLORS.primary_100};\n border-radius: 4px;\n }\n`;\n\ntype DropdownMenuProps = {\n options: ListRowDropdownOption[];\n closeDropdown: any;\n};\n\nconst ListRowDropdown: React.FunctionComponent<DropdownMenuProps> = ({ options, closeDropdown }: DropdownMenuProps) => {\n const [classname, setClassname] = React.useState('isInside');\n const reference = React.useRef<HTMLDivElement>(null);\n\n const clickIsOutside = (e: any) => reference && reference?.current && !reference?.current.contains(e.target);\n\n const handleClick = (e: any) => {\n if (e.keyCode) {\n if (e.keyCode === 27) {\n closeDropdown();\n }\n } else if (clickIsOutside(e)) {\n closeDropdown();\n }\n };\n\n const isInViewport = (offset = 0) => {\n if (!reference.current) return;\n const top = reference.current.getBoundingClientRect().bottom;\n const inside = top + offset >= 0 && top - offset <= window.innerHeight;\n if (!inside) {\n setClassname('isOutside');\n }\n };\n\n React.useEffect(() => {\n document.addEventListener('mousedown', handleClick, false);\n document.addEventListener('keydown', handleClick, false);\n isInViewport();\n return () => {\n document.removeEventListener('mousedown', handleClick, false);\n document.removeEventListener('keydown', handleClick, false);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Wrapper>\n <DropdownMenuContainer ref={reference} className={classname}>\n {options.map(option => (\n <Content key={option.key} onClick={option.action}>\n {option.label}\n </Content>\n ))}\n </DropdownMenuContainer>\n </Wrapper>\n );\n};\n\nexport default ListRowDropdown;\n"],"file":"ListRowDropdown.js"}
@@ -3,7 +3,8 @@ import * as React from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { LaerdalLoadingLogo } from '../assets';
5
5
  import LoadingIndicator from '../LoadingIndicator/LoadingIndicator';
6
- import { COLORS } from '../styles';
6
+ import { COLORS, ComponentTextStyle } from '../styles';
7
+ import { ComponentMStyling } from '../styles/typography';
7
8
  const LoadingMain = styled.main`
8
9
  display: flex;
9
10
  flex: 1;
@@ -28,10 +29,10 @@ const LogoAndMessage = styled.div`
28
29
  span {
29
30
  margin-bottom: 40px;
30
31
  font-weight: normal;
31
- font-size: 18px;
32
- color: ${COLORS.neutral_600};
33
32
  width: 320px;
34
33
  text-align: center;
34
+
35
+ ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}
35
36
  }
36
37
  `;
37
38
  const LoadingIndicatorContainer = styled.div`
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/LoadingPage/GlobalLoadingPage.tsx"],"names":["React","styled","LaerdalLoadingLogo","LoadingIndicator","COLORS","LoadingMain","main","primary_20","Header","div","white","neutral_200","LogoAndMessage","neutral_600","LoadingIndicatorContainer","LoadingPage","optionalMessage","includeHeader"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,kBAAT,QAAmC,WAAnC;AAEA,OAAOC,gBAAP,MAA6B,sCAA7B;AACA,SAASC,MAAT,QAAuB,WAAvB;AAEA,MAAMC,WAAW,GAAGJ,MAAM,CAACK,IAAK;AAChC;AACA;AACA;AACA,sBAAsBF,MAAM,CAACG,UAAW;AACxC;AACA,CANA;AAQA,MAAMC,MAAM,GAAGP,MAAM,CAACQ,GAAiB;AACvC;AACA,sBAAsBL,MAAM,CAACM,KAAM;AACnC,6BAA6BN,MAAM,CAACO,WAAY;AAChD,CAJA;AAMA,MAAMC,cAAc,GAAGX,MAAM,CAACQ,GAAI;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAaL,MAAM,CAACS,WAAY;AAChC;AACA;AACA;AACA,CAjBA;AAmBA,MAAMC,yBAAyB,GAAGb,MAAM,CAACQ,GAAI;AAC7C;AACA;AACA;AACA;AACA,CALA;;AAYA,MAAMM,WAAiD,GAAG,CAAC;AAAEC,EAAAA,eAAF;AAAmBC,EAAAA;AAAnB,CAAD,KAAqD;AAC7G,sBACE,oBAAC,WAAD;AAAa,mBAAY;AAAzB,KACGA,aAAa,iBAAI,oBAAC,MAAD,OADpB,eAEE,oBAAC,yBAAD,qBACE,oBAAC,gBAAD,OADF,CAFF,eAKE,oBAAC,cAAD;AAAgB,mBAAY;AAA5B,KACGD,eAAe,iBAAI,kCAAOA,eAAP,CADtB,eAEE,oBAAC,kBAAD,OAFF,CALF,CADF;AAYD,CAbD;;;AAJEA,EAAAA,e;AACAC,EAAAA,a;;AAkBF,eAAeF,WAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { LaerdalLoadingLogo } from '../assets';\n\nimport LoadingIndicator from '../LoadingIndicator/LoadingIndicator';\nimport { COLORS } from '../styles';\n\nconst LoadingMain = styled.main`\n display: flex;\n flex: 1;\n flex-direction: column;\n background-color: ${COLORS.primary_20};\n height: 100%;\n`;\n\nconst Header = styled.div<LoaderProps>`\n height: 64px;\n background-color: ${COLORS.white};\n border-bottom: 1px solid ${COLORS.neutral_200};\n`;\n\nconst LogoAndMessage = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n bottom: 36px;\n left: 50%;\n transform: translate(-50%);\n align-items: center;\n\n span {\n margin-bottom: 40px;\n font-weight: normal;\n font-size: 18px;\n color: ${COLORS.neutral_600};\n width: 320px;\n text-align: center;\n }\n`;\n\nconst LoadingIndicatorContainer = styled.div`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n`;\n\ninterface LoaderProps {\n optionalMessage?: string;\n includeHeader?: boolean;\n}\n\nconst LoadingPage: React.FunctionComponent<LoaderProps> = ({ optionalMessage, includeHeader }: LoaderProps) => {\n return (\n <LoadingMain data-testid=\"TestLoadingMain\">\n {includeHeader && <Header />}\n <LoadingIndicatorContainer>\n <LoadingIndicator />\n </LoadingIndicatorContainer>\n <LogoAndMessage data-testid=\"TestLoadingLogoAndMessage\">\n {optionalMessage && <span>{optionalMessage}</span>}\n <LaerdalLoadingLogo />\n </LogoAndMessage>\n </LoadingMain>\n );\n};\n\nexport default LoadingPage;\n"],"file":"GlobalLoadingPage.js"}
1
+ {"version":3,"sources":["../../../src/LoadingPage/GlobalLoadingPage.tsx"],"names":["React","styled","LaerdalLoadingLogo","LoadingIndicator","COLORS","ComponentTextStyle","ComponentMStyling","LoadingMain","main","primary_20","Header","div","white","neutral_200","LogoAndMessage","Regular","neutral_600","LoadingIndicatorContainer","LoadingPage","optionalMessage","includeHeader"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,kBAAR,QAAiC,WAAjC;AAEA,OAAOC,gBAAP,MAA6B,sCAA7B;AACA,SAAQC,MAAR,EAAgBC,kBAAhB,QAAyC,WAAzC;AACA,SAAQC,iBAAR,QAAgC,sBAAhC;AAEA,MAAMC,WAAW,GAAGN,MAAM,CAACO,IAAK;AAChC;AACA;AACA;AACA,sBAAsBJ,MAAM,CAACK,UAAW;AACxC;AACA,CANA;AAQA,MAAMC,MAAM,GAAGT,MAAM,CAACU,GAAiB;AACvC;AACA,sBAAsBP,MAAM,CAACQ,KAAM;AACnC,6BAA6BR,MAAM,CAACS,WAAY;AAChD,CAJA;AAMA,MAAMC,cAAc,GAAGb,MAAM,CAACU,GAAI;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAML,iBAAiB,CAACD,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,WAApC,CAAiD;AACxE;AACA,CAjBA;AAmBA,MAAMC,yBAAyB,GAAGhB,MAAM,CAACU,GAAI;AAC7C;AACA;AACA;AACA;AACA,CALA;;AAYA,MAAMO,WAAiD,GAAG,CAAC;AAAEC,EAAAA,eAAF;AAAmBC,EAAAA;AAAnB,CAAD,KAAqD;AAC7G,sBACE,oBAAC,WAAD;AAAa,mBAAY;AAAzB,KACGA,aAAa,iBAAI,oBAAC,MAAD,OADpB,eAEE,oBAAC,yBAAD,qBACE,oBAAC,gBAAD,OADF,CAFF,eAKE,oBAAC,cAAD;AAAgB,mBAAY;AAA5B,KACGD,eAAe,iBAAI,kCAAOA,eAAP,CADtB,eAEE,oBAAC,kBAAD,OAFF,CALF,CADF;AAYD,CAbD;;;AAJEA,EAAAA,e;AACAC,EAAAA,a;;AAkBF,eAAeF,WAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {LaerdalLoadingLogo} from '../assets';\n\nimport LoadingIndicator from '../LoadingIndicator/LoadingIndicator';\nimport {COLORS, ComponentTextStyle} from '../styles';\nimport {ComponentMStyling} from '../styles/typography';\n\nconst LoadingMain = styled.main`\n display: flex;\n flex: 1;\n flex-direction: column;\n background-color: ${COLORS.primary_20};\n height: 100%;\n`;\n\nconst Header = styled.div<LoaderProps>`\n height: 64px;\n background-color: ${COLORS.white};\n border-bottom: 1px solid ${COLORS.neutral_200};\n`;\n\nconst LogoAndMessage = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n bottom: 36px;\n left: 50%;\n transform: translate(-50%);\n align-items: center;\n\n span {\n margin-bottom: 40px;\n font-weight: normal;\n width: 320px;\n text-align: center;\n \n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n }\n`;\n\nconst LoadingIndicatorContainer = styled.div`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n`;\n\ninterface LoaderProps {\n optionalMessage?: string;\n includeHeader?: boolean;\n}\n\nconst LoadingPage: React.FunctionComponent<LoaderProps> = ({ optionalMessage, includeHeader }: LoaderProps) => {\n return (\n <LoadingMain data-testid=\"TestLoadingMain\">\n {includeHeader && <Header />}\n <LoadingIndicatorContainer>\n <LoadingIndicator />\n </LoadingIndicatorContainer>\n <LogoAndMessage data-testid=\"TestLoadingLogoAndMessage\">\n {optionalMessage && <span>{optionalMessage}</span>}\n <LaerdalLoadingLogo />\n </LogoAndMessage>\n </LoadingMain>\n );\n};\n\nexport default LoadingPage;\n"],"file":"GlobalLoadingPage.js"}
@@ -2,8 +2,9 @@ import _pt from "prop-types";
2
2
  import * as React from 'react';
3
3
  import { Link } from 'react-router-dom';
4
4
  import styled from 'styled-components';
5
- import { COLORS, BREAKPOINTS } from '../styles';
5
+ import { BREAKPOINTS, COLORS, ComponentTextStyle } from '../styles';
6
6
  import { ChevronRight } from '../icons/systemicons/SystemIcons';
7
+ import { ComponentMStyling, ComponentSStyling } from '../styles/typography';
7
8
  const ProductLink = styled(Link)`
8
9
  display: flex;
9
10
  flex: 1;
@@ -44,14 +45,12 @@ const ProductImage = styled.img`
44
45
  border-radius: 8px;
45
46
  `;
46
47
  const ProductName = styled.h2`
47
- font-size: 18px;
48
- line-height: 1.2;
48
+ ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}
49
49
  margin: 0;
50
50
  margin-top: 3px;
51
51
  `;
52
52
  const ProductType = styled.span`
53
- font-size: 16px;
54
- line-height: 1.2;
53
+ ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}
55
54
  margin: 0;
56
55
  `;
57
56
  const ProductInnerWrapper = styled.div`
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/MiniProductCard/MiniProductCard.tsx"],"names":["React","Link","styled","COLORS","BREAKPOINTS","ChevronRight","ProductLink","black","MEDIUM","ProductThing","div","primary_20","primary_600","primary_100","ProductImage","img","ProductName","h2","ProductType","span","ProductInnerWrapper","RightIconWrapper","MiniProductCard","url","product","image","name","type","primary"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAqB,kBAArB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,MAAT,EAAiBC,WAAjB,QAAoC,WAApC;AACA,SAASC,YAAT,QAA6B,kCAA7B;AAOA,MAAMC,WAAW,GAAGJ,MAAM,CAACD,IAAD,CAAO;AACjC;AACA;AACA;AACA,WAAWE,MAAM,CAACI,KAAM;AACxB;AACA;AACA,IAAIH,WAAW,CAACI,MAAO;AACvB;AACA;AACA,CAVA;AAYA,MAAMC,YAAY,GAAGP,MAAM,CAACQ,GAAI;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkBP,MAAM,CAACQ,UAAW;AACpC;AACA;AACA,cAAcR,MAAM,CAACS,WAAY;AACjC;AACA;AACA;AACA,kBAAkBT,MAAM,CAACU,WAAY;AACrC;AACA;AACA,cAAcV,MAAM,CAACS,WAAY;AACjC;AACA;AACA,CArBA;AAuBA,MAAME,YAAY,GAAGZ,MAAM,CAACa,GAAI;AAChC;AACA;AACA;AACA;AACA,CALA;AAOA,MAAMC,WAAW,GAAGd,MAAM,CAACe,EAAG;AAC9B;AACA;AACA;AACA;AACA,CALA;AAOA,MAAMC,WAAW,GAAGhB,MAAM,CAACiB,IAAK;AAChC;AACA;AACA;AACA,CAJA;AAMA,MAAMC,mBAAmB,GAAGlB,MAAM,CAACQ,GAAI;AACvC;AACA;AACA;AACA;AACA,CALA;AAOA,MAAMW,gBAAgB,GAAGnB,MAAM,CAACQ,GAAI;AACpC;AACA;AACA;AACA;AACA,CALA;;AAOA,MAAMY,eAAe,GAAG,CAAC;AAAEC,EAAAA,GAAF;AAAOC,EAAAA;AAAP,CAAD,KAAiC;AACvD,sBACE,oBAAC,WAAD;AAAa,IAAA,EAAE,EAAED,GAAG,IAAI;AAAxB,kBACE,oBAAC,YAAD,QACGC,OAAO,CAACC,KAAR,iBAAiB,oBAAC,YAAD;AAAc,IAAA,GAAG,EAAED,OAAO,CAACC;AAA3B,IADpB,eAEE,oBAAC,mBAAD,qBACE,oBAAC,WAAD,QAAcD,OAAO,CAACE,IAAtB,CADF,eAEE,oBAAC,WAAD,QAAcF,OAAO,CAACG,IAAtB,CAFF,CAFF,eAME,oBAAC,gBAAD,qBACE,oBAAC,YAAD;AAAc,IAAA,KAAK,EAAExB,MAAM,CAACyB,OAA5B;AAAqC,IAAA,SAAS,EAAE,uBAAhD;AAAyE,IAAA,IAAI,EAAE;AAA/E,IADF,CANF,CADF,CADF;AAcD,CAfD;;;AAvEEL,EAAAA,G;;AAwFF,eAAeD,eAAf","sourcesContent":["import * as React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { COLORS, BREAKPOINTS } from '../styles';\nimport { ChevronRight } from '../icons/systemicons/SystemIcons';\nimport { Product } from '../types';\n\ntype CardProps = {\n product: Product;\n url?: string;\n};\nconst ProductLink = styled(Link)`\n display: flex;\n flex: 1;\n margin: 10px 8px;\n color: ${COLORS.black};\n text-decoration: none;\n\n ${BREAKPOINTS.MEDIUM} {\n width: 305px;\n }\n`;\n\nconst ProductThing = styled.div`\n display: flex;\n flex: 1;\n flex-direction: row;\n border-radius: 8px;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n\n &:hover {\n background: ${COLORS.primary_20};\n\n .product-chevron-right-path {\n fill: ${COLORS.primary_600};\n }\n }\n &:active {\n background: ${COLORS.primary_100};\n\n .product-chevron-right-path {\n fill: ${COLORS.primary_600};\n }\n }\n`;\n\nconst ProductImage = styled.img`\n width: 95px;\n height: 75px;\n object-fit: fill;\n border-radius: 8px;\n`;\n\nconst ProductName = styled.h2`\n font-size: 18px;\n line-height: 1.2;\n margin: 0;\n margin-top: 3px;\n`;\n\nconst ProductType = styled.span`\n font-size: 16px;\n line-height: 1.2;\n margin: 0;\n`;\n\nconst ProductInnerWrapper = styled.div`\n display: flex;\n flex-direction: column;\n padding: 12px 18px;\n flex: 1;\n`;\n\nconst RightIconWrapper = styled.div`\n display: flex;\n justify-self: flex-start;\n align-items: center;\n padding-right: 12px;\n`;\n\nconst MiniProductCard = ({ url, product }: CardProps) => {\n return (\n <ProductLink to={url ?? ''}>\n <ProductThing>\n {product.image && <ProductImage src={product.image} />}\n <ProductInnerWrapper>\n <ProductName>{product.name}</ProductName>\n <ProductType>{product.type}</ProductType>\n </ProductInnerWrapper>\n <RightIconWrapper>\n <ChevronRight color={COLORS.primary} className={'product-chevron-right'} size={'24px'} />\n </RightIconWrapper>\n </ProductThing>\n </ProductLink>\n );\n};\n\nexport default MiniProductCard;\n"],"file":"MiniProductCard.js"}
1
+ {"version":3,"sources":["../../../src/MiniProductCard/MiniProductCard.tsx"],"names":["React","Link","styled","BREAKPOINTS","COLORS","ComponentTextStyle","ChevronRight","ComponentMStyling","ComponentSStyling","ProductLink","black","MEDIUM","ProductThing","div","primary_20","primary_600","primary_100","ProductImage","img","ProductName","h2","Regular","ProductType","span","ProductInnerWrapper","RightIconWrapper","MiniProductCard","url","product","image","name","type","primary"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAAQC,IAAR,QAAmB,kBAAnB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,kBAA7B,QAAsD,WAAtD;AACA,SAAQC,YAAR,QAA2B,kCAA3B;AAEA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,sBAAnD;AAMA,MAAMC,WAAW,GAAGP,MAAM,CAACD,IAAD,CAAO;AACjC;AACA;AACA;AACA,WAAWG,MAAM,CAACM,KAAM;AACxB;AACA;AACA,IAAIP,WAAW,CAACQ,MAAO;AACvB;AACA;AACA,CAVA;AAYA,MAAMC,YAAY,GAAGV,MAAM,CAACW,GAAI;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkBT,MAAM,CAACU,UAAW;AACpC;AACA;AACA,cAAcV,MAAM,CAACW,WAAY;AACjC;AACA;AACA;AACA,kBAAkBX,MAAM,CAACY,WAAY;AACrC;AACA;AACA,cAAcZ,MAAM,CAACW,WAAY;AACjC;AACA;AACA,CArBA;AAuBA,MAAME,YAAY,GAAGf,MAAM,CAACgB,GAAI;AAChC;AACA;AACA;AACA;AACA,CALA;AAOA,MAAMC,WAAW,GAAGjB,MAAM,CAACkB,EAAG;AAC9B,IAAIb,iBAAiB,CAACF,kBAAkB,CAACgB,OAApB,EAA6BjB,MAAM,CAACM,KAApC,CAA2C;AAChE;AACA;AACA,CAJA;AAMA,MAAMY,WAAW,GAAGpB,MAAM,CAACqB,IAAK;AAChC,IAAIf,iBAAiB,CAACH,kBAAkB,CAACgB,OAApB,EAA6BjB,MAAM,CAACM,KAApC,CAA2C;AAChE;AACA,CAHA;AAKA,MAAMc,mBAAmB,GAAGtB,MAAM,CAACW,GAAI;AACvC;AACA;AACA;AACA;AACA,CALA;AAOA,MAAMY,gBAAgB,GAAGvB,MAAM,CAACW,GAAI;AACpC;AACA;AACA;AACA;AACA,CALA;;AAOA,MAAMa,eAAe,GAAG,CAAC;AAAEC,EAAAA,GAAF;AAAOC,EAAAA;AAAP,CAAD,KAAiC;AACvD,sBACE,oBAAC,WAAD;AAAa,IAAA,EAAE,EAAED,GAAG,IAAI;AAAxB,kBACE,oBAAC,YAAD,QACGC,OAAO,CAACC,KAAR,iBAAiB,oBAAC,YAAD;AAAc,IAAA,GAAG,EAAED,OAAO,CAACC;AAA3B,IADpB,eAEE,oBAAC,mBAAD,qBACE,oBAAC,WAAD,QAAcD,OAAO,CAACE,IAAtB,CADF,eAEE,oBAAC,WAAD,QAAcF,OAAO,CAACG,IAAtB,CAFF,CAFF,eAME,oBAAC,gBAAD,qBACE,oBAAC,YAAD;AAAc,IAAA,KAAK,EAAE3B,MAAM,CAAC4B,OAA5B;AAAqC,IAAA,SAAS,EAAE,uBAAhD;AAAyE,IAAA,IAAI,EAAE;AAA/E,IADF,CANF,CADF,CADF;AAcD,CAfD;;;AArEEL,EAAAA,G;;AAsFF,eAAeD,eAAf","sourcesContent":["import * as React from 'react';\nimport {Link} from 'react-router-dom';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../styles';\nimport {ChevronRight} from '../icons/systemicons/SystemIcons';\nimport {Product} from '../types';\nimport {ComponentMStyling, ComponentSStyling} from '../styles/typography';\n\ntype CardProps = {\n product: Product;\n url?: string;\n};\nconst ProductLink = styled(Link)`\n display: flex;\n flex: 1;\n margin: 10px 8px;\n color: ${COLORS.black};\n text-decoration: none;\n\n ${BREAKPOINTS.MEDIUM} {\n width: 305px;\n }\n`;\n\nconst ProductThing = styled.div`\n display: flex;\n flex: 1;\n flex-direction: row;\n border-radius: 8px;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);\n\n &:hover {\n background: ${COLORS.primary_20};\n\n .product-chevron-right-path {\n fill: ${COLORS.primary_600};\n }\n }\n &:active {\n background: ${COLORS.primary_100};\n\n .product-chevron-right-path {\n fill: ${COLORS.primary_600};\n }\n }\n`;\n\nconst ProductImage = styled.img`\n width: 95px;\n height: 75px;\n object-fit: fill;\n border-radius: 8px;\n`;\n\nconst ProductName = styled.h2`\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n margin: 0;\n margin-top: 3px;\n`;\n\nconst ProductType = styled.span`\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n margin: 0;\n`;\n\nconst ProductInnerWrapper = styled.div`\n display: flex;\n flex-direction: column;\n padding: 12px 18px;\n flex: 1;\n`;\n\nconst RightIconWrapper = styled.div`\n display: flex;\n justify-self: flex-start;\n align-items: center;\n padding-right: 12px;\n`;\n\nconst MiniProductCard = ({ url, product }: CardProps) => {\n return (\n <ProductLink to={url ?? ''}>\n <ProductThing>\n {product.image && <ProductImage src={product.image} />}\n <ProductInnerWrapper>\n <ProductName>{product.name}</ProductName>\n <ProductType>{product.type}</ProductType>\n </ProductInnerWrapper>\n <RightIconWrapper>\n <ChevronRight color={COLORS.primary} className={'product-chevron-right'} size={'24px'} />\n </RightIconWrapper>\n </ProductThing>\n </ProductLink>\n );\n};\n\nexport default MiniProductCard;\n"],"file":"MiniProductCard.js"}
@@ -68,7 +68,7 @@ export const ModalDialog = ({
68
68
  }
69
69
  };
70
70
 
71
- const getPaddingAndMarginBottom = () => {
71
+ const getMarginBottom = () => {
72
72
  switch (size) {
73
73
  case 'small':
74
74
  return '16px';
@@ -84,6 +84,22 @@ export const ModalDialog = ({
84
84
  }
85
85
  };
86
86
 
87
+ const getPadding = () => {
88
+ switch (size) {
89
+ case 'small':
90
+ return '16px 16px 8px';
91
+
92
+ case 'medium':
93
+ return '24px 24px 16px';
94
+
95
+ case 'large':
96
+ return '32px';
97
+
98
+ default:
99
+ return '24px 24px 16px';
100
+ }
101
+ };
102
+
87
103
  const ModalTitle = (title, size) => {
88
104
  switch (size) {
89
105
  case 'small':
@@ -115,7 +131,7 @@ export const ModalDialog = ({
115
131
  }, /*#__PURE__*/React.createElement(IconButton, {
116
132
  variant: "secondary",
117
133
  shape: "circular",
118
- action: onClick,
134
+ action: () => onClick(),
119
135
  borderRadius: 48
120
136
  }, /*#__PURE__*/React.createElement(Close, {
121
137
  size: "24px",
@@ -146,19 +162,17 @@ export const ModalDialog = ({
146
162
  minWidth: getMinWidth(),
147
163
  maxWidth: getMaxWidth(),
148
164
  modalHeight: "auto",
149
- padding: getPaddingAndMarginBottom()
165
+ padding: getPadding()
150
166
  }, /*#__PURE__*/React.createElement(Column, null, /*#__PURE__*/React.createElement("form", {
151
167
  onSubmit: submitAction
152
168
  }, topImage && /*#__PURE__*/React.createElement(StyledModalHeader, {
153
169
  size: size,
154
170
  height: getImageHeight(),
155
- marginBottom: getPaddingAndMarginBottom()
171
+ marginBottom: getMarginBottom()
156
172
  }, /*#__PURE__*/React.createElement("img", {
157
173
  src: topImage,
158
174
  alt: "Modal top"
159
- }), ModalBackButton(), /*#__PURE__*/React.createElement(ModalCloseButton, {
160
- onClick: closeAction
161
- })), /*#__PURE__*/React.createElement(ModalTitleSection, null, !topImage && ModalBackButton(), title && ModalTitle(title, size), tooltip && /*#__PURE__*/React.createElement("div", {
175
+ }), ModalBackButton(), ModalCloseButton(closeAction)), /*#__PURE__*/React.createElement(ModalTitleSection, null, !topImage && ModalBackButton(), title && ModalTitle(title, size), tooltip && /*#__PURE__*/React.createElement("div", {
162
176
  id: "tooltip"
163
177
  }, /*#__PURE__*/React.createElement("div", {
164
178
  onMouseOver: () => setTooltipOpen(true),
@@ -166,9 +180,7 @@ export const ModalDialog = ({
166
180
  }, /*#__PURE__*/React.createElement(Help, {
167
181
  size: "24px",
168
182
  color: COLORS.neutral_600
169
- })), tooltipOpen && /*#__PURE__*/React.createElement("span", null, tooltip)), !topImage && /*#__PURE__*/React.createElement(ModalCloseButton, {
170
- onClick: closeAction
171
- })), /*#__PURE__*/React.createElement(ModalBody, {
183
+ })), tooltipOpen && /*#__PURE__*/React.createElement("span", null, tooltip)), !topImage && ModalCloseButton(closeAction)), /*#__PURE__*/React.createElement(ModalBody, {
172
184
  size: size
173
185
  }, body), /*#__PURE__*/React.createElement(ModalFooter, {
174
186
  size: size
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Modals/ModalDialog.tsx"],"names":["React","Button","IconButton","ArrowLineLeft","Close","Help","COLORS","ComponentL","ComponentM","ComponentTextStyle","ComponentXL","ModalContainer","BackButtonWrapper","CloseButtonWrapper","Column","ModalBody","ModalFooter","ModalFooterButtons","ModalTitleSection","StyledModalHeader","ModalDialog","size","isModalOpen","closeModalAndClearInput","title","topImage","body","buttons","backButton","closeAction","submitAction","tooltip","tooltipOpen","setTooltipOpen","useState","getMinWidth","getMaxWidth","getImageHeight","getPaddingAndMarginBottom","ModalTitle","Bold","ModalCloseButton","onClick","black","ModalBackButton","neutral_600","map","b","action","variant","text"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,MAAT,EAAiBC,UAAjB,QAAmC,WAAnC;AAEA,SAASC,aAAT,EAAwBC,KAAxB,EAA+BC,IAA/B,QAA2C,kCAA3C;AACA,SAASC,MAAT,EAAiBC,UAAjB,EAA6BC,UAA7B,EAAyCC,kBAAzC,EAA6DC,WAA7D,QAAgF,WAAhF;AACA,OAAOC,cAAP,MAA2B,kBAA3B;AACA,SAASC,iBAAT,EAA4BC,kBAA5B,EAAgDC,MAAhD,EAAwDC,SAAxD,EAAmEC,WAAnE,EAAgFC,kBAAhF,EAAgHC,iBAAhH,EAAmIC,iBAAnI,QAA4J,eAA5J;AAqBA,OAAO,MAAMC,WAAmD,GAAG,CAAC;AAClEC,EAAAA,IADkE;AAElEC,EAAAA,WAFkE;AAGlEC,EAAAA,uBAHkE;AAIlEC,EAAAA,KAJkE;AAKlEC,EAAAA,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;AAAa,IAAA,IAAI,EAAEL;AAAnB,kBACE,oBAAC,kBAAD;AAAoB,IAAA,IAAI,EAAEA;AAA1B,KACGM,OAAO,EAAEmB,GAAT,CAAcC,CAAD,iBACZ,oBAAC,MAAD;AAAQ,IAAA,IAAI,EAAE1B,IAAI,KAAK,OAAT,GAAmB,KAAnB,GAA2BA,IAAI,KAAK,QAAT,GAAoB,QAApB,GAA+BA,IAAxE;AAA8E,IAAA,OAAO,EAAE0B,CAAC,CAACC,MAAzF;AAAiG,IAAA,OAAO,EAAED,CAAC,CAACE;AAA5G,KACGF,CAAC,CAACG,IADL,CADD,CADH,CADF,CAxBF,CADF,CAPF,CADF;AA8CD,CAnJM;;AAbL7B,EAAAA,I,aAAO,O,EAAU,Q,EAAW,O;AAC5BC,EAAAA,W;AACAC,EAAAA,uB;AACAC,EAAAA,K;AACAC,EAAAA,Q;AACAC,EAAAA,I;AACAC,EAAAA,O;AAXAqB,IAAAA,M;AACAE,IAAAA,I;;AAWAnB,EAAAA,O;AACAH,EAAAA,U;AACAC,EAAAA,W;AACAC,EAAAA,Y;;AAwJF,eAAeV,WAAf","sourcesContent":["import * as React from 'react';\nimport { Button, IconButton } from '../Button';\nimport { ButtonProps } from '../Button/Button';\nimport { ArrowLineLeft, Close, Help } from '../icons/systemicons/SystemIcons';\nimport { COLORS, ComponentL, ComponentM, ComponentTextStyle, ComponentXL } from '../styles';\nimport ModalContainer from './ModalContainer';\nimport { BackButtonWrapper, CloseButtonWrapper, Column, ModalBody, ModalFooter, ModalFooterButtons, ModalTitle, ModalTitleSection, StyledModalHeader } from './ModalStyles';\n\ninterface ButtonAction extends Pick<ButtonProps, 'variant'> {\n action: () => void;\n text: string;\n}\n\ninterface NewModalProps {\n size?: 'small' | 'medium' | 'large';\n isModalOpen: boolean;\n closeModalAndClearInput: any;\n title?: string;\n topImage?: any;\n body?: any;\n buttons?: ButtonAction[];\n tooltip?: string;\n backButton?: () => void;\n closeAction: () => void;\n submitAction: () => void;\n}\n\nexport const ModalDialog: React.FunctionComponent<NewModalProps> = ({\n size,\n isModalOpen,\n closeModalAndClearInput,\n title,\n topImage,\n body,\n buttons,\n backButton,\n closeAction,\n submitAction,\n tooltip,\n}) => {\n const [tooltipOpen, setTooltipOpen] = React.useState<boolean>(false);\n\n const getMinWidth = () => {\n switch (size) {\n case 'small':\n return '320px';\n case 'medium':\n return '400px';\n case 'large':\n return '480px';\n default:\n return '400px';\n }\n };\n\n const getMaxWidth = () => {\n switch (size) {\n case 'small':\n return '512px';\n case 'medium':\n return '400px';\n case 'large':\n return '588px';\n default:\n return '664px';\n }\n };\n\n const getImageHeight = () => {\n switch (size) {\n case 'small':\n return 160;\n case 'medium':\n return 200;\n case 'large':\n return 240;\n default:\n return 200;\n }\n };\n const getPaddingAndMarginBottom = () => {\n switch (size) {\n case 'small':\n return '16px';\n case 'medium':\n return '24px';\n case 'large':\n return '32px';\n default:\n return '24px';\n }\n };\n\n const ModalTitle = (title: string, size?: 'small' | 'medium' | 'large') => {\n switch (size) {\n case 'small':\n return <ComponentM textStyle={ComponentTextStyle.Bold}>{title}</ComponentM>;\n case 'medium':\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\n case 'large':\n return <ComponentXL textStyle={ComponentTextStyle.Bold}>{title}</ComponentXL>;\n default:\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\n }\n };\n\n const ModalCloseButton = (onClick: any) => {\n return (\n <CloseButtonWrapper hasImage={!!topImage} size={size}>\n <IconButton variant=\"secondary\" shape=\"circular\" action={onClick} borderRadius={48}>\n <Close size=\"24px\" color={COLORS.black} />\n </IconButton>\n </CloseButtonWrapper>\n );\n };\n\n const ModalBackButton = () => {\n if (backButton) {\n return (\n <BackButtonWrapper hasImage={!!topImage} size={size}>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => backButton()} borderRadius={48}>\n <ArrowLineLeft size=\"24px\" color={COLORS.black} />\n </IconButton>\n </BackButtonWrapper>\n );\n }\n };\n\n return (\n <ModalContainer\n showModal={isModalOpen}\n closeModal={closeModalAndClearInput}\n minWidth={getMinWidth()}\n maxWidth={getMaxWidth()}\n modalHeight=\"auto\"\n padding={getPaddingAndMarginBottom()}>\n <Column>\n <form onSubmit={submitAction}>\n {topImage && (\n <StyledModalHeader size={size} height={getImageHeight()} marginBottom={getPaddingAndMarginBottom()}>\n <img src={topImage} alt=\"Modal top\" />\n {ModalBackButton()}\n <ModalCloseButton onClick={closeAction} />\n </StyledModalHeader>\n )}\n <ModalTitleSection>\n {!topImage && ModalBackButton()}\n {title && ModalTitle(title, size)}\n {tooltip && (\n <div id=\"tooltip\">\n <div onMouseOver={() => setTooltipOpen(true)} onMouseOut={() => setTooltipOpen(false)}>\n <Help size=\"24px\" color={COLORS.neutral_600} />\n </div>\n {tooltipOpen && <span>{tooltip}</span>}\n </div>\n )}\n {!topImage && <ModalCloseButton onClick={closeAction} />}\n </ModalTitleSection>\n\n <ModalBody size={size}>{body}</ModalBody>\n\n <ModalFooter size={size}>\n <ModalFooterButtons size={size}>\n {buttons?.map((b) => (\n <Button size={size === 'large' ? 'big' : size === 'medium' ? 'normal' : size} onClick={b.action} variant={b.variant}>\n {b.text}\n </Button>\n ))}\n </ModalFooterButtons>\n </ModalFooter>\n </form>\n </Column>\n </ModalContainer>\n );\n};\n\nexport default ModalDialog;\n"],"file":"ModalDialog.js"}
1
+ {"version":3,"sources":["../../../src/Modals/ModalDialog.tsx"],"names":["React","Button","IconButton","ArrowLineLeft","Close","Help","COLORS","ComponentL","ComponentM","ComponentTextStyle","ComponentXL","ModalContainer","BackButtonWrapper","CloseButtonWrapper","Column","ModalBody","ModalFooter","ModalFooterButtons","ModalTitleSection","StyledModalHeader","ModalDialog","size","isModalOpen","closeModalAndClearInput","title","topImage","body","buttons","backButton","closeAction","submitAction","tooltip","tooltipOpen","setTooltipOpen","useState","getMinWidth","getMaxWidth","getImageHeight","getMarginBottom","getPadding","ModalTitle","Bold","ModalCloseButton","onClick","black","Mod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O,EAAU,Q,EAAW,O;AAC5BC,EAAAA,W;AACAC,EAAAA,uB;AACAC,EAAAA,K;AACAC,EAAAA,Q;AACAC,EAAAA,I;AACAC,EAAAA,O;AAXAsB,IAAAA,M;AACAE,IAAAA,I;;AAWApB,EAAAA,O;AACAH,EAAAA,U;AACAC,EAAAA,W;AACAC,EAAAA,Y;;AAgKF,eAAeV,WAAf","sourcesContent":["import * as React from 'react';\nimport { Button, IconButton } from '../Button';\nimport { ButtonProps } from '../Button/Button';\nimport { ArrowLineLeft, Close, Help } from '../icons/systemicons/SystemIcons';\nimport { COLORS, ComponentL, ComponentM, ComponentTextStyle, ComponentXL } from '../styles';\nimport ModalContainer from './ModalContainer';\nimport { BackButtonWrapper, CloseButtonWrapper, Column, ModalBody, ModalFooter, ModalFooterButtons, ModalTitle, ModalTitleSection, StyledModalHeader } from './ModalStyles';\n\ninterface ButtonAction extends Pick<ButtonProps, 'variant'> {\n action: () => void;\n text: string;\n}\n\ninterface NewModalProps {\n size?: 'small' | 'medium' | 'large';\n isModalOpen: boolean;\n closeModalAndClearInput: any;\n title?: string;\n topImage?: any;\n body?: any;\n buttons?: ButtonAction[];\n tooltip?: string;\n backButton?: () => void;\n closeAction: () => void;\n submitAction: (event?: React.FormEvent<HTMLFormElement> | undefined) => void;\n}\n\nexport const ModalDialog: React.FunctionComponent<NewModalProps> = ({\n size,\n isModalOpen,\n closeModalAndClearInput,\n title,\n topImage,\n body,\n buttons,\n backButton,\n closeAction,\n submitAction,\n tooltip,\n}) => {\n const [tooltipOpen, setTooltipOpen] = React.useState<boolean>(false);\n\n const getMinWidth = () => {\n switch (size) {\n case 'small':\n return '320px';\n case 'medium':\n return '400px';\n case 'large':\n return '480px';\n default:\n return '400px';\n }\n };\n\n const getMaxWidth = () => {\n switch (size) {\n case 'small':\n return '512px';\n case 'medium':\n return '400px';\n case 'large':\n return '588px';\n default:\n return '664px';\n }\n };\n\n const getImageHeight = () => {\n switch (size) {\n case 'small':\n return 160;\n case 'medium':\n return 200;\n case 'large':\n return 240;\n default:\n return 200;\n }\n };\n\n const getMarginBottom = () => {\n switch (size) {\n case 'small':\n return '16px';\n case 'medium':\n return '24px';\n case 'large':\n return '32px';\n default:\n return '24px';\n }\n };\n\n const getPadding = () => {\n switch (size) {\n case 'small':\n return '16px 16px 8px';\n case 'medium':\n return '24px 24px 16px';\n case 'large':\n return '32px';\n default:\n return '24px 24px 16px';\n }\n };\n\n const ModalTitle = (title: string, size?: 'small' | 'medium' | 'large') => {\n switch (size) {\n case 'small':\n return <ComponentM textStyle={ComponentTextStyle.Bold}>{title}</ComponentM>;\n case 'medium':\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\n case 'large':\n return <ComponentXL textStyle={ComponentTextStyle.Bold}>{title}</ComponentXL>;\n default:\n return <ComponentL textStyle={ComponentTextStyle.Bold}>{title}</ComponentL>;\n }\n };\n\n const ModalCloseButton = (onClick: any) => {\n return (\n <CloseButtonWrapper hasImage={!!topImage} size={size}>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => onClick()} borderRadius={48}>\n <Close size=\"24px\" color={COLORS.black} />\n </IconButton>\n </CloseButtonWrapper>\n );\n };\n\n const ModalBackButton = () => {\n if (backButton) {\n return (\n <BackButtonWrapper hasImage={!!topImage} size={size}>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => backButton()} borderRadius={48}>\n <ArrowLineLeft size=\"24px\" color={COLORS.black} />\n </IconButton>\n </BackButtonWrapper>\n );\n }\n };\n\n return (\n <ModalContainer showModal={isModalOpen} closeModal={closeModalAndClearInput} minWidth={getMinWidth()} maxWidth={getMaxWidth()} modalHeight=\"auto\" padding={getPadding()}>\n <Column>\n <form onSubmit={submitAction}>\n {topImage && (\n <StyledModalHeader size={size} height={getImageHeight()} marginBottom={getMarginBottom()}>\n <img src={topImage} alt=\"Modal top\" />\n {ModalBackButton()}\n {ModalCloseButton(closeAction)}\n </StyledModalHeader>\n )}\n <ModalTitleSection>\n {!topImage && ModalBackButton()}\n {title && ModalTitle(title, size)}\n {tooltip && (\n <div id=\"tooltip\">\n <div onMouseOver={() => setTooltipOpen(true)} onMouseOut={() => setTooltipOpen(false)}>\n <Help size=\"24px\" color={COLORS.neutral_600} />\n </div>\n {tooltipOpen && <span>{tooltip}</span>}\n </div>\n )}\n {!topImage && ModalCloseButton(closeAction)}\n </ModalTitleSection>\n\n <ModalBody size={size}>{body}</ModalBody>\n\n <ModalFooter size={size}>\n <ModalFooterButtons size={size}>\n {buttons?.map((b) => (\n <Button size={size === 'large' ? 'big' : size === 'medium' ? 'normal' : size} onClick={b.action} variant={b.variant}>\n {b.text}\n </Button>\n ))}\n </ModalFooterButtons>\n </ModalFooter>\n </form>\n </Column>\n </ModalContainer>\n );\n};\n\nexport default ModalDialog;\n"],"file":"ModalDialog.js"}
@@ -2,8 +2,9 @@ import _pt from "prop-types";
2
2
  import * as React from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { NavLink } from 'react-router-dom';
5
- import { BREAKPOINTS, COLORS } from '../styles';
5
+ import { BREAKPOINTS, COLORS, ComponentTextStyle } from '../styles';
6
6
  import { ChevronLeft, ChevronRight, MoreHorizontal } from '../icons/systemicons/SystemIcons';
7
+ import { ComponentMStyling } from '../styles/typography';
7
8
  const Container = styled.nav`
8
9
  margin: 20px 0;
9
10
  display: flex;
@@ -25,9 +26,6 @@ const Item = styled.li`
25
26
  display: flex;
26
27
  align-items: center;
27
28
  justify-content: center;
28
- font-size: 19px;
29
- line-height: 23px;
30
- font-weight: 400;
31
29
 
32
30
  & > * {
33
31
  display: flex;
@@ -36,9 +34,10 @@ const Item = styled.li`
36
34
  width: 100%;
37
35
  height: 100%;
38
36
  text-decoration: none;
39
- font-family: 'Lato', sans-serif;
40
- color: ${COLORS.neutral_600};
41
37
  border-bottom: 3px solid transparent;
38
+
39
+ ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}
40
+
42
41
  &:focus,
43
42
  &:focus-within {
44
43
  box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2e7fa1;