@laerdal/life-react-components 1.7.0 → 1.8.0

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 (387) hide show
  1. package/dist/Accordion/ContentAccordion.cjs +1 -1
  2. package/dist/Accordion/ContentAccordion.cjs.map +1 -1
  3. package/dist/Accordion/ContentAccordion.js +2 -2
  4. package/dist/Accordion/ContentAccordion.js.map +1 -1
  5. package/dist/Accordion/styles.cjs +1 -1
  6. package/dist/Accordion/styles.cjs.map +1 -1
  7. package/dist/Accordion/styles.js +2 -2
  8. package/dist/Accordion/styles.js.map +1 -1
  9. package/dist/Banners/Banner.cjs +3 -3
  10. package/dist/Banners/Banner.cjs.map +1 -1
  11. package/dist/Banners/Banner.js +3 -3
  12. package/dist/Banners/Banner.js.map +1 -1
  13. package/dist/Banners/styles.cjs +1 -1
  14. package/dist/Banners/styles.cjs.map +1 -1
  15. package/dist/Banners/styles.js +1 -1
  16. package/dist/Banners/styles.js.map +1 -1
  17. package/dist/Button/BackButton.cjs +5 -2
  18. package/dist/Button/BackButton.cjs.map +1 -1
  19. package/dist/Button/BackButton.js +5 -3
  20. package/dist/Button/BackButton.js.map +1 -1
  21. package/dist/Button/Button.cjs +11 -25
  22. package/dist/Button/Button.cjs.map +1 -1
  23. package/dist/Button/Button.d.ts +2 -1
  24. package/dist/Button/Button.js +12 -26
  25. package/dist/Button/Button.js.map +1 -1
  26. package/dist/Button/DualFunctionButton.cjs +29 -7
  27. package/dist/Button/DualFunctionButton.cjs.map +1 -1
  28. package/dist/Button/DualFunctionButton.js +27 -6
  29. package/dist/Button/DualFunctionButton.js.map +1 -1
  30. package/dist/Button/Iconbutton.cjs +23 -32
  31. package/dist/Button/Iconbutton.cjs.map +1 -1
  32. package/dist/Button/Iconbutton.d.ts +3 -0
  33. package/dist/Button/Iconbutton.js +20 -32
  34. package/dist/Button/Iconbutton.js.map +1 -1
  35. package/dist/Card/Card.cjs +28 -44
  36. package/dist/Card/Card.cjs.map +1 -1
  37. package/dist/Card/Card.d.ts +3 -11
  38. package/dist/Card/Card.js +26 -44
  39. package/dist/Card/Card.js.map +1 -1
  40. package/dist/Card/CardBottomSection.cjs +33 -24
  41. package/dist/Card/CardBottomSection.cjs.map +1 -1
  42. package/dist/Card/CardBottomSection.d.ts +11 -2
  43. package/dist/Card/CardBottomSection.js +17 -24
  44. package/dist/Card/CardBottomSection.js.map +1 -1
  45. package/dist/Card/CardMiddleSection.cjs +38 -17
  46. package/dist/Card/CardMiddleSection.cjs.map +1 -1
  47. package/dist/Card/CardMiddleSection.d.ts +16 -3
  48. package/dist/Card/CardMiddleSection.js +30 -17
  49. package/dist/Card/CardMiddleSection.js.map +1 -1
  50. package/dist/Card/CardTopSection.cjs +27 -20
  51. package/dist/Card/CardTopSection.cjs.map +1 -1
  52. package/dist/Card/CardTopSection.d.ts +12 -4
  53. package/dist/Card/CardTopSection.js +17 -20
  54. package/dist/Card/CardTopSection.js.map +1 -1
  55. package/dist/Card/index.cjs +45 -9
  56. package/dist/Card/index.cjs.map +1 -1
  57. package/dist/Card/index.d.ts +3 -1
  58. package/dist/Card/index.js +3 -1
  59. package/dist/Card/index.js.map +1 -1
  60. package/dist/Chips/ActionChip.cjs +4 -4
  61. package/dist/Chips/ActionChip.cjs.map +1 -1
  62. package/dist/Chips/ActionChip.js +4 -4
  63. package/dist/Chips/ActionChip.js.map +1 -1
  64. package/dist/Chips/ChipStyles.cjs +5 -17
  65. package/dist/Chips/ChipStyles.cjs.map +1 -1
  66. package/dist/Chips/ChipStyles.d.ts +0 -3
  67. package/dist/Chips/ChipStyles.js +5 -8
  68. package/dist/Chips/ChipStyles.js.map +1 -1
  69. package/dist/Chips/ChipTypes.d.ts +7 -19
  70. package/dist/Chips/ChoiceChips.cjs +2 -2
  71. package/dist/Chips/ChoiceChips.cjs.map +1 -1
  72. package/dist/Chips/ChoiceChips.js +2 -2
  73. package/dist/Chips/ChoiceChips.js.map +1 -1
  74. package/dist/Chips/FilterChip.cjs +3 -3
  75. package/dist/Chips/FilterChip.cjs.map +1 -1
  76. package/dist/Chips/FilterChip.js +3 -3
  77. package/dist/Chips/FilterChip.js.map +1 -1
  78. package/dist/Chips/InputChip.cjs +21 -12
  79. package/dist/Chips/InputChip.cjs.map +1 -1
  80. package/dist/Chips/InputChip.js +20 -12
  81. package/dist/Chips/InputChip.js.map +1 -1
  82. package/dist/Chips/index.cjs +1 -1
  83. package/dist/Chips/index.cjs.map +1 -1
  84. package/dist/Chips/index.d.ts +1 -1
  85. package/dist/Chips/index.js +1 -1
  86. package/dist/Chips/index.js.map +1 -1
  87. package/dist/ChipsInput/ChipDropdownInput.cjs +401 -0
  88. package/dist/ChipsInput/ChipDropdownInput.cjs.map +1 -0
  89. package/dist/ChipsInput/ChipDropdownInput.d.ts +22 -0
  90. package/dist/ChipsInput/ChipDropdownInput.js +383 -0
  91. package/dist/ChipsInput/ChipDropdownInput.js.map +1 -0
  92. package/dist/ChipsInput/ChipInput.cjs +141 -0
  93. package/dist/ChipsInput/ChipInput.cjs.map +1 -0
  94. package/dist/{Chips → ChipsInput}/ChipInput.d.ts +1 -4
  95. package/dist/ChipsInput/ChipInput.js +122 -0
  96. package/dist/ChipsInput/ChipInput.js.map +1 -0
  97. package/dist/ChipsInput/ChipInputField.cjs +238 -0
  98. package/dist/ChipsInput/ChipInputField.cjs.map +1 -0
  99. package/dist/ChipsInput/ChipInputField.d.ts +25 -0
  100. package/dist/ChipsInput/ChipInputField.js +198 -0
  101. package/dist/ChipsInput/ChipInputField.js.map +1 -0
  102. package/dist/ChipsInput/ChipInputTypes.cjs +6 -0
  103. package/dist/ChipsInput/ChipInputTypes.cjs.map +1 -0
  104. package/dist/ChipsInput/ChipInputTypes.d.ts +22 -0
  105. package/dist/ChipsInput/ChipInputTypes.js +2 -0
  106. package/dist/ChipsInput/ChipInputTypes.js.map +1 -0
  107. package/dist/ChipsInput/index.cjs +19 -0
  108. package/dist/ChipsInput/index.cjs.map +1 -0
  109. package/dist/ChipsInput/index.d.ts +1 -0
  110. package/dist/ChipsInput/index.js +2 -0
  111. package/dist/ChipsInput/index.js.map +1 -0
  112. package/dist/Dropdown/BasicDropdown.cjs +31 -11
  113. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  114. package/dist/Dropdown/BasicDropdown.js +33 -12
  115. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  116. package/dist/Dropdown/CommonStyling.cjs +12 -10
  117. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  118. package/dist/Dropdown/CommonStyling.js +12 -11
  119. package/dist/Dropdown/CommonStyling.js.map +1 -1
  120. package/dist/Dropdown/DropdownButton.cjs +22 -15
  121. package/dist/Dropdown/DropdownButton.cjs.map +1 -1
  122. package/dist/Dropdown/DropdownButton.js +21 -15
  123. package/dist/Dropdown/DropdownButton.js.map +1 -1
  124. package/dist/Dropdown/DropdownContent.cjs +167 -132
  125. package/dist/Dropdown/DropdownContent.cjs.map +1 -1
  126. package/dist/Dropdown/DropdownContent.d.ts +2 -2
  127. package/dist/Dropdown/DropdownContent.js +164 -133
  128. package/dist/Dropdown/DropdownContent.js.map +1 -1
  129. package/dist/Dropdown/DropdownFilter.cjs +66 -24
  130. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  131. package/dist/Dropdown/DropdownFilter.js +65 -25
  132. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  133. package/dist/Dropdown/index.cjs +0 -8
  134. package/dist/Dropdown/index.cjs.map +1 -1
  135. package/dist/Dropdown/index.d.ts +1 -2
  136. package/dist/Dropdown/index.js +1 -2
  137. package/dist/Dropdown/index.js.map +1 -1
  138. package/dist/Footer/Components/FooterDropdownLinks.cjs +6 -3
  139. package/dist/Footer/Components/FooterDropdownLinks.cjs.map +1 -1
  140. package/dist/Footer/Components/FooterDropdownLinks.js +6 -4
  141. package/dist/Footer/Components/FooterDropdownLinks.js.map +1 -1
  142. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs +5 -3
  143. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
  144. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +5 -4
  145. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  146. package/dist/Footer/Components/FooterTop.cjs +2 -1
  147. package/dist/Footer/Components/FooterTop.cjs.map +1 -1
  148. package/dist/Footer/Components/FooterTop.js +3 -2
  149. package/dist/Footer/Components/FooterTop.js.map +1 -1
  150. package/dist/GlobalNavigationBar/Avatar.cjs +5 -7
  151. package/dist/GlobalNavigationBar/Avatar.cjs.map +1 -1
  152. package/dist/GlobalNavigationBar/Avatar.js +5 -8
  153. package/dist/GlobalNavigationBar/Avatar.js.map +1 -1
  154. package/dist/GlobalNavigationBar/Logo.cjs +9 -6
  155. package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
  156. package/dist/GlobalNavigationBar/Logo.d.ts +2 -1
  157. package/dist/GlobalNavigationBar/Logo.js +9 -7
  158. package/dist/GlobalNavigationBar/Logo.js.map +1 -1
  159. package/dist/GlobalNavigationBar/MainMenu.cjs +10 -13
  160. package/dist/GlobalNavigationBar/MainMenu.cjs.map +1 -1
  161. package/dist/GlobalNavigationBar/MainMenu.js +9 -13
  162. package/dist/GlobalNavigationBar/MainMenu.js.map +1 -1
  163. package/dist/GlobalNavigationBar/RightSideNav.cjs +3 -5
  164. package/dist/GlobalNavigationBar/RightSideNav.cjs.map +1 -1
  165. package/dist/GlobalNavigationBar/RightSideNav.js +2 -5
  166. package/dist/GlobalNavigationBar/RightSideNav.js.map +1 -1
  167. package/dist/GlobalNavigationBar/UserMenu/MenuLink.cjs +4 -0
  168. package/dist/GlobalNavigationBar/UserMenu/MenuLink.cjs.map +1 -1
  169. package/dist/GlobalNavigationBar/UserMenu/MenuLink.js +3 -0
  170. package/dist/GlobalNavigationBar/UserMenu/MenuLink.js.map +1 -1
  171. package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs +1 -1
  172. package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs.map +1 -1
  173. package/dist/GlobalNavigationBar/mobile/CommonStyles.js +2 -2
  174. package/dist/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  175. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs +1 -1
  176. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
  177. package/dist/GlobalNavigationBar/mobile/MobileMenu.js +2 -2
  178. package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  179. package/dist/HyperLink/styling.cjs +1 -1
  180. package/dist/HyperLink/styling.cjs.map +1 -1
  181. package/dist/HyperLink/styling.js +1 -1
  182. package/dist/HyperLink/styling.js.map +1 -1
  183. package/dist/Image/ImageWithFallbacks.cjs +3 -1
  184. package/dist/Image/ImageWithFallbacks.cjs.map +1 -1
  185. package/dist/Image/ImageWithFallbacks.js +3 -1
  186. package/dist/Image/ImageWithFallbacks.js.map +1 -1
  187. package/dist/InputFields/Checkbox.cjs +11 -8
  188. package/dist/InputFields/Checkbox.cjs.map +1 -1
  189. package/dist/InputFields/Checkbox.d.ts +1 -0
  190. package/dist/InputFields/Checkbox.js +12 -9
  191. package/dist/InputFields/Checkbox.js.map +1 -1
  192. package/dist/InputFields/DatepickerField.cjs +4 -4
  193. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  194. package/dist/InputFields/DatepickerField.js +5 -5
  195. package/dist/InputFields/DatepickerField.js.map +1 -1
  196. package/dist/InputFields/QuickSearch.cjs +119 -96
  197. package/dist/InputFields/QuickSearch.cjs.map +1 -1
  198. package/dist/InputFields/QuickSearch.js +119 -96
  199. package/dist/InputFields/QuickSearch.js.map +1 -1
  200. package/dist/InputFields/RadioButton.cjs +10 -7
  201. package/dist/InputFields/RadioButton.cjs.map +1 -1
  202. package/dist/InputFields/RadioButton.d.ts +1 -0
  203. package/dist/InputFields/RadioButton.js +11 -8
  204. package/dist/InputFields/RadioButton.js.map +1 -1
  205. package/dist/InputFields/SearchBar.cjs +3 -3
  206. package/dist/InputFields/SearchBar.cjs.map +1 -1
  207. package/dist/InputFields/SearchBar.js +3 -3
  208. package/dist/InputFields/SearchBar.js.map +1 -1
  209. package/dist/InputFields/Textarea.cjs +1 -1
  210. package/dist/InputFields/Textarea.cjs.map +1 -1
  211. package/dist/InputFields/Textarea.js +1 -1
  212. package/dist/InputFields/Textarea.js.map +1 -1
  213. package/dist/InputFields/components/SearchBarInput.cjs +6 -8
  214. package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
  215. package/dist/InputFields/components/SearchBarInput.d.ts +0 -3
  216. package/dist/InputFields/components/SearchBarInput.js +4 -5
  217. package/dist/InputFields/components/SearchBarInput.js.map +1 -1
  218. package/dist/InputFields/components/SearchField.cjs +29 -19
  219. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  220. package/dist/InputFields/components/SearchField.d.ts +8 -8
  221. package/dist/InputFields/components/SearchField.js +25 -18
  222. package/dist/InputFields/components/SearchField.js.map +1 -1
  223. package/dist/InputFields/styling.cjs +6 -8
  224. package/dist/InputFields/styling.cjs.map +1 -1
  225. package/dist/InputFields/styling.js +7 -8
  226. package/dist/InputFields/styling.js.map +1 -1
  227. package/dist/List/ListRow.cjs +5 -5
  228. package/dist/List/ListRow.cjs.map +1 -1
  229. package/dist/List/ListRow.js +8 -5
  230. package/dist/List/ListRow.js.map +1 -1
  231. package/dist/LoadingIndicator/LoadingIndicator.cjs +6 -1
  232. package/dist/LoadingIndicator/LoadingIndicator.cjs.map +1 -1
  233. package/dist/LoadingIndicator/LoadingIndicator.d.ts +2 -1
  234. package/dist/LoadingIndicator/LoadingIndicator.js +6 -1
  235. package/dist/LoadingIndicator/LoadingIndicator.js.map +1 -1
  236. package/dist/MenuItem/MenuItem.cjs +6 -2
  237. package/dist/MenuItem/MenuItem.cjs.map +1 -1
  238. package/dist/MenuItem/MenuItem.d.ts +1 -0
  239. package/dist/MenuItem/MenuItem.js +7 -3
  240. package/dist/MenuItem/MenuItem.js.map +1 -1
  241. package/dist/Modals/ModalContainer.cjs +78 -38
  242. package/dist/Modals/ModalContainer.cjs.map +1 -1
  243. package/dist/Modals/ModalContainer.d.ts +15 -8
  244. package/dist/Modals/ModalContainer.js +78 -36
  245. package/dist/Modals/ModalContainer.js.map +1 -1
  246. package/dist/Modals/ModalContent.cjs +0 -1
  247. package/dist/Modals/ModalContent.cjs.map +1 -1
  248. package/dist/Modals/ModalContent.d.ts +0 -1
  249. package/dist/Modals/ModalContent.js +0 -1
  250. package/dist/Modals/ModalContent.js.map +1 -1
  251. package/dist/Modals/ModalDialog.cjs +18 -26
  252. package/dist/Modals/ModalDialog.cjs.map +1 -1
  253. package/dist/Modals/ModalDialog.d.ts +1 -1
  254. package/dist/Modals/ModalDialog.js +19 -26
  255. package/dist/Modals/ModalDialog.js.map +1 -1
  256. package/dist/Modals/ModalStyles.cjs +33 -25
  257. package/dist/Modals/ModalStyles.cjs.map +1 -1
  258. package/dist/Modals/ModalStyles.d.ts +7 -1
  259. package/dist/Modals/ModalStyles.js +26 -24
  260. package/dist/Modals/ModalStyles.js.map +1 -1
  261. package/dist/NavItem/NavItem.cjs +1 -1
  262. package/dist/NavItem/NavItem.cjs.map +1 -1
  263. package/dist/NavItem/NavItem.js +2 -2
  264. package/dist/NavItem/NavItem.js.map +1 -1
  265. package/dist/Paginator/Paginator.cjs +1 -1
  266. package/dist/Paginator/Paginator.cjs.map +1 -1
  267. package/dist/Paginator/Paginator.js +2 -2
  268. package/dist/Paginator/Paginator.js.map +1 -1
  269. package/dist/QuizButton/QuizButton.cjs +4 -8
  270. package/dist/QuizButton/QuizButton.cjs.map +1 -1
  271. package/dist/QuizButton/QuizButton.js +5 -9
  272. package/dist/QuizButton/QuizButton.js.map +1 -1
  273. package/dist/SegmentControl/SegmentControl.cjs +1 -1
  274. package/dist/SegmentControl/SegmentControl.cjs.map +1 -1
  275. package/dist/SegmentControl/SegmentControl.js +2 -2
  276. package/dist/SegmentControl/SegmentControl.js.map +1 -1
  277. package/dist/Switcher/SwitcherMenuItem.cjs +1 -1
  278. package/dist/Switcher/SwitcherMenuItem.cjs.map +1 -1
  279. package/dist/Switcher/SwitcherMenuItem.js +2 -2
  280. package/dist/Switcher/SwitcherMenuItem.js.map +1 -1
  281. package/dist/Table/TableStyles.cjs +4 -4
  282. package/dist/Table/TableStyles.cjs.map +1 -1
  283. package/dist/Table/TableStyles.js +5 -5
  284. package/dist/Table/TableStyles.js.map +1 -1
  285. package/dist/Tabs/HorizontalTabs.cjs +5 -1
  286. package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
  287. package/dist/Tabs/HorizontalTabs.js +6 -3
  288. package/dist/Tabs/HorizontalTabs.js.map +1 -1
  289. package/dist/Tabs/TabLink.cjs +48 -45
  290. package/dist/Tabs/TabLink.cjs.map +1 -1
  291. package/dist/Tabs/TabLink.js +47 -46
  292. package/dist/Tabs/TabLink.js.map +1 -1
  293. package/dist/Tabs/VerticalTabs.cjs.map +1 -1
  294. package/dist/Tabs/VerticalTabs.js.map +1 -1
  295. package/dist/Toasters/Toast.cjs +2 -0
  296. package/dist/Toasters/Toast.cjs.map +1 -1
  297. package/dist/Toasters/Toast.js +2 -0
  298. package/dist/Toasters/Toast.js.map +1 -1
  299. package/dist/Toggles/ToggleButton.cjs +81 -0
  300. package/dist/Toggles/ToggleButton.cjs.map +1 -0
  301. package/dist/Toggles/ToggleButton.d.ts +14 -0
  302. package/dist/Toggles/ToggleButton.js +59 -0
  303. package/dist/Toggles/ToggleButton.js.map +1 -0
  304. package/dist/Toggles/ToggleSwitch.cjs +12 -6
  305. package/dist/Toggles/ToggleSwitch.cjs.map +1 -1
  306. package/dist/Toggles/ToggleSwitch.js +11 -6
  307. package/dist/Toggles/ToggleSwitch.js.map +1 -1
  308. package/dist/Toggles/TogglerStyles.cjs +2 -2
  309. package/dist/Toggles/TogglerStyles.cjs.map +1 -1
  310. package/dist/Toggles/TogglerStyles.js +3 -3
  311. package/dist/Toggles/TogglerStyles.js.map +1 -1
  312. package/dist/Toggles/index.cjs +8 -0
  313. package/dist/Toggles/index.cjs.map +1 -1
  314. package/dist/Toggles/index.d.ts +2 -1
  315. package/dist/Toggles/index.js +2 -1
  316. package/dist/Toggles/index.js.map +1 -1
  317. package/dist/Tooltips/TooltipStyles.cjs +2 -2
  318. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  319. package/dist/Tooltips/TooltipStyles.js +3 -3
  320. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  321. package/dist/Tooltips/TooltipTypes.cjs.map +1 -1
  322. package/dist/Tooltips/TooltipTypes.d.ts +1 -0
  323. package/dist/Tooltips/TooltipTypes.js.map +1 -1
  324. package/dist/Tooltips/TooltipWrapper.cjs +2 -0
  325. package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
  326. package/dist/Tooltips/TooltipWrapper.d.ts +1 -1
  327. package/dist/Tooltips/TooltipWrapper.js +2 -0
  328. package/dist/Tooltips/TooltipWrapper.js.map +1 -1
  329. package/dist/common/{HoverWithin.cjs → ActionWithin.cjs} +9 -5
  330. package/dist/common/ActionWithin.cjs.map +1 -0
  331. package/dist/common/{HoverWithin.d.ts → ActionWithin.d.ts} +0 -0
  332. package/dist/common/{HoverWithin.js → ActionWithin.js} +9 -5
  333. package/dist/common/ActionWithin.js.map +1 -0
  334. package/dist/common/ClickOutside.cjs +39 -0
  335. package/dist/common/ClickOutside.cjs.map +1 -0
  336. package/dist/common/ClickOutside.d.ts +1 -0
  337. package/dist/common/ClickOutside.js +25 -0
  338. package/dist/common/ClickOutside.js.map +1 -0
  339. package/dist/common/FocusOutside.cjs +39 -0
  340. package/dist/common/FocusOutside.cjs.map +1 -0
  341. package/dist/common/FocusOutside.d.ts +1 -0
  342. package/dist/common/FocusOutside.js +25 -0
  343. package/dist/common/FocusOutside.js.map +1 -0
  344. package/dist/common/FocusVisible.cjs +67 -19
  345. package/dist/common/FocusVisible.cjs.map +1 -1
  346. package/dist/common/FocusVisible.js +66 -19
  347. package/dist/common/FocusVisible.js.map +1 -1
  348. package/dist/common/InputStyling.cjs +1 -1
  349. package/dist/common/InputStyling.cjs.map +1 -1
  350. package/dist/common/InputStyling.js +2 -2
  351. package/dist/common/InputStyling.js.map +1 -1
  352. package/dist/common/index.cjs +18 -2
  353. package/dist/common/index.cjs.map +1 -1
  354. package/dist/common/index.d.ts +3 -1
  355. package/dist/common/index.js +3 -1
  356. package/dist/common/index.js.map +1 -1
  357. package/dist/icons/index.cjs +1 -1
  358. package/dist/icons/index.cjs.map +1 -1
  359. package/dist/icons/index.js +1 -1
  360. package/dist/icons/index.js.map +1 -1
  361. package/dist/index.cjs +14 -0
  362. package/dist/index.cjs.map +1 -1
  363. package/dist/index.d.ts +1 -0
  364. package/dist/index.js +1 -0
  365. package/dist/index.js.map +1 -1
  366. package/dist/styles/focus-styles.cjs +22 -0
  367. package/dist/styles/focus-styles.cjs.map +1 -0
  368. package/dist/styles/focus-styles.d.ts +2 -0
  369. package/dist/styles/focus-styles.js +9 -0
  370. package/dist/styles/focus-styles.js.map +1 -0
  371. package/dist/styles/index.cjs +60 -0
  372. package/dist/styles/index.cjs.map +1 -1
  373. package/dist/styles/index.d.ts +1 -0
  374. package/dist/styles/index.js +1 -0
  375. package/dist/styles/index.js.map +1 -1
  376. package/package.json +1 -1
  377. package/dist/Chips/ChipInput.cjs +0 -199
  378. package/dist/Chips/ChipInput.cjs.map +0 -1
  379. package/dist/Chips/ChipInput.js +0 -182
  380. package/dist/Chips/ChipInput.js.map +0 -1
  381. package/dist/Dropdown/ChipDropdownInput.cjs +0 -431
  382. package/dist/Dropdown/ChipDropdownInput.cjs.map +0 -1
  383. package/dist/Dropdown/ChipDropdownInput.d.ts +0 -24
  384. package/dist/Dropdown/ChipDropdownInput.js +0 -418
  385. package/dist/Dropdown/ChipDropdownInput.js.map +0 -1
  386. package/dist/common/HoverWithin.cjs.map +0 -1
  387. package/dist/common/HoverWithin.js.map +0 -1
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.default = exports.Search = exports.BigSearch = void 0;
10
+ exports.default = exports.Search = void 0;
11
11
 
12
12
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
13
 
@@ -21,11 +21,11 @@ var _index = require("../../styles/index");
21
21
 
22
22
  var _styles = require("../../styles");
23
23
 
24
- var _FocusVisible = require("../../common/FocusVisible");
24
+ var _common = require("../../common");
25
25
 
26
26
  var _jsxRuntime = require("react/jsx-runtime");
27
27
 
28
- var _templateObject, _templateObject2;
28
+ var _templateObject;
29
29
 
30
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
31
 
@@ -35,11 +35,9 @@ var Search = _styledComponents.default.input.attrs(function () {
35
35
  return {
36
36
  type: 'search'
37
37
  };
38
- })(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n width: calc(100% - 96px);\n\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\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\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 ", "\n }\n\n &:focus {\n outline-width: 0;\n }\n"])), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500));
38
+ })(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\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 ", "\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ", "\n ::placeholder {\n ", "\n }\n\n ", " {\n ::placeholder {\n ", "\n }\n }\n\n &.small {\n ::placeholder {\n ", "\n }\n }\n\n &.medium {\n ::placeholder {\n ", "\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), _index.BREAKPOINTS.MEDIUM, (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600));
39
39
 
40
40
  exports.Search = Search;
41
- var BigSearch = (0, _styledComponents.default)(Search)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ", "\n ::placeholder {\n ", "\n }\n\n ", " {\n ::placeholder {\n ", "\n }\n }\n\n &.small {\n ::placeholder {\n ", "\n }\n }\n\n &.medium {\n ::placeholder {\n ", "\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), _index.BREAKPOINTS.MEDIUM, (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600));
42
- exports.BigSearch = BigSearch;
43
41
  var SearchBarInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
44
42
  var id = props.id,
45
43
  searchTerm = props.searchTerm,
@@ -50,7 +48,7 @@ var SearchBarInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
50
48
  onKeyDown = props.onKeyDown,
51
49
  size = props.size,
52
50
  _onBlur = props.onBlur;
53
- var elementRef = (0, _FocusVisible.useFocusVisibleRef)(props.focusParentRefs || [], ref);
51
+ var elementRef = (0, _common.useFocusVisibleRef)(props.focusParentRefs || [], ref);
54
52
 
55
53
  var isPressingEnter = function isPressingEnter(e) {
56
54
  if (e.key === 'Enter') {
@@ -62,7 +60,7 @@ var SearchBarInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
62
60
  return false;
63
61
  };
64
62
 
65
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(BigSearch, {
63
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Search, {
66
64
  placeholder: disabled ? '' : placeholder,
67
65
  ref: elementRef,
68
66
  id: id,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/InputFields/components/SearchBarInput.tsx"],"names":["Search","styled","input","attrs","type","ComponentTextStyle","Regular","COLORS","black","Italic","neutral_500","BigSearch","neutral_600","BREAKPOINTS","MEDIUM","SearchBarInput","React","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","onBlur","elementRef","focusParentRefs","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEO,IAAMA,MAAM,GAAGC,0BAAOC,KAAP,CAAaC,KAAb,CAAmB;AAAA,SA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,CAAC,CAACC,GAAF,KAAU,OAAd,EAAuB;AACrBD,MAAAA,CAAC,CAACE,cAAF;AACAF,MAAAA,CAAC,CAACG,eAAF;AACA,aAAO,IAAP;AACD;;AACD,WAAO,KAAP;AACD,GAPD;;AASA,sBACE,qBAAC,SAAD;AACE,IAAA,WAAW,EAAEV,QAAQ,GAAG,EAAH,GAAQD,WAD/B;AAEE,IAAA,GAAG,EAAEK,UAFP;AAGE,IAAA,EAAE,EAAET,EAHN;AAIE,mBAAaA,EAJf;AAKE,IAAA,SAAS,EAAEO,IAAI,GAAGA,IAAH,GAAU,EAL3B;AAME,IAAA,QAAQ,EAAE,CANZ;AAOE,IAAA,QAAQ,EAAEF,QAPZ;AAQE,IAAA,QAAQ,EAAE,kBAACO,CAAD;AAAA,aAAYV,aAAa,CAACU,CAAC,CAACI,MAAF,CAASC,KAAV,CAAzB;AAAA,KARZ;AASE,IAAA,KAAK,EAAEhB,UATT;AAUE,IAAA,MAAM,EAAE,gBAACW,CAAD;AAAA,aAAOJ,OAAM,IAAIA,OAAM,CAACI,CAAD,CAAvB;AAAA,KAVV;AAWE,IAAA,SAAS,EAAEN,SAXb;AAYE,IAAA,UAAU,EAAE,oBAACM,CAAD;AAAA,aAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBT,WAAW,CAACS,CAAD,CAAhC,GAAsC,IAAnD;AAAA;AAZd,IADF;AAgBD,CAxCsB,CAAvB;;AAZEZ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AAEAE,EAAAA,M;AACAE,EAAAA,e;;eA6Caf,c","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {Size} from '../../types';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {useFocusVisibleRef} from '../../common/FocusVisible';\n\nexport const Search = styled.input.attrs(() => ({type: 'search'}))`\n appearance: none;\n width: calc(100% - 96px);\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\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\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\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 ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\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?: Size.Small | Size.Medium;\n onBlur?: (e: any) => void;\n focusParentRefs?: React.RefObject<any>[];\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const {\n id,\n searchTerm,\n setSearchTerm,\n enterSearch,\n placeholder,\n disabled,\n onKeyDown,\n size,\n onBlur\n } = props;\n\n const elementRef = useFocusVisibleRef(props.focusParentRefs || [], ref);\n\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 ref={elementRef}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={0}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n onBlur={(e) => onBlur && onBlur(e)}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.cjs"}
1
+ {"version":3,"sources":["../../../src/InputFields/components/SearchBarInput.tsx"],"names":["Search","styled","input","attrs","type","ComponentTextStyle","Italic","COLORS","neutral_500","Regular","black","neutral_600","BREAKPOINTS","MEDIUM","SearchBarInput","React","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","onBlur","elementRef","focusParentRefs","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEO,IAAMA,MAAM,GAAGC,0BAAOC,KAAP,CAAaC,KAAb,CAAmB;AAAA,SAAO;AAACC,IAAAA,IAAI,EAAE;AAAP,GAAP;AAAA,CAAnB,CAAH,66BA0Bb,+BAAkBC,0BAAmBC,MAArC,EAA6CC,cAAOC,WAApD,CA1Ba,EAkCf,+BAAkBH,0BAAmBI,OAArC,EAA8CF,cAAOG,KAArD,CAlCe,EAoCb,+BAAkBL,0BAAmBC,MAArC,EAA6CC,cAAOI,WAApD,CApCa,EAuCfC,mBAAYC,MAvCG,EAyCX,+BAAkBR,0BAAmBC,MAArC,EAA6CC,cAAOI,WAApD,CAzCW,EA+CX,+BAAkBN,0BAAmBC,MAArC,EAA6CC,cAAOI,WAApD,CA/CW,EAqDX,+BAAkBN,0BAAmBC,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V,CAAzB;AAAA,KARZ;AASE,IAAA,KAAK,EAAEhB,UATT;AAUE,IAAA,MAAM,EAAE,gBAACW,CAAD;AAAA,aAAOJ,OAAM,IAAIA,OAAM,CAACI,CAAD,CAAvB;AAAA,KAVV;AAWE,IAAA,SAAS,EAAEN,SAXb;AAYE,IAAA,UAAU,EAAE,oBAACM,CAAD;AAAA,aAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBT,WAAW,CAACS,CAAD,CAAhC,GAAsC,IAAnD;AAAA;AAZd,IADF;AAgBD,CAxCsB,CAAvB;;AAZEZ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AAEAE,EAAAA,M;AACAE,EAAAA,e;;eA6Caf,c","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {Size} from '../../types';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {useFocusVisibleRef} from '../../common';\n\nexport const Search = styled.input.attrs(() => ({type: 'search'}))`\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\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 height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\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?: Size.Small | Size.Medium;\n onBlur?: (e: any) => void;\n focusParentRefs?: React.RefObject<any>[];\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const {\n id,\n searchTerm,\n setSearchTerm,\n enterSearch,\n placeholder,\n disabled,\n onKeyDown,\n size,\n onBlur\n } = props;\n\n const elementRef = useFocusVisibleRef(props.focusParentRefs || [], ref);\n\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 <Search\n placeholder={disabled ? '' : placeholder}\n ref={elementRef}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={0}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n onBlur={(e) => onBlur && onBlur(e)}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.cjs"}
@@ -3,9 +3,6 @@ import { Size } from '../../types';
3
3
  export declare const Search: import("styled-components").StyledComponent<"input", any, {
4
4
  type: "search";
5
5
  }, "type">;
6
- export declare const BigSearch: import("styled-components").StyledComponent<"input", any, {
7
- type: "search";
8
- }, "type">;
9
6
  declare type SearchBarInputProps = {
10
7
  id: string;
11
8
  searchTerm?: string;
@@ -1,20 +1,19 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
2
  import _pt from "prop-types";
3
3
 
4
- var _templateObject, _templateObject2;
4
+ var _templateObject;
5
5
 
6
6
  import * as React from 'react';
7
7
  import styled from 'styled-components';
8
8
  import { BREAKPOINTS, COLORS, ComponentTextStyle } from '../../styles/index';
9
9
  import { ComponentMStyling, ComponentSStyling } from '../../styles';
10
- import { useFocusVisibleRef } from '../../common/FocusVisible';
10
+ import { useFocusVisibleRef } from '../../common';
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  export var Search = styled.input.attrs(function () {
13
13
  return {
14
14
  type: 'search'
15
15
  };
16
- })(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n appearance: none;\n width: calc(100% - 96px);\n\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\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\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 ", "\n }\n\n &:focus {\n outline-width: 0;\n }\n"])), ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500));
17
- export var BigSearch = styled(Search)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ", "\n ::placeholder {\n ", "\n }\n\n ", " {\n ::placeholder {\n ", "\n }\n }\n\n &.small {\n ::placeholder {\n ", "\n }\n }\n\n &.medium {\n ::placeholder {\n ", "\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600));
16
+ })(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\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 ", "\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ", "\n ::placeholder {\n ", "\n }\n\n ", " {\n ::placeholder {\n ", "\n }\n }\n\n &.small {\n ::placeholder {\n ", "\n }\n }\n\n &.medium {\n ::placeholder {\n ", "\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600));
18
17
  var SearchBarInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
19
18
  var id = props.id,
20
19
  searchTerm = props.searchTerm,
@@ -37,7 +36,7 @@ var SearchBarInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
37
36
  return false;
38
37
  };
39
38
 
40
- return /*#__PURE__*/_jsx(BigSearch, {
39
+ return /*#__PURE__*/_jsx(Search, {
41
40
  placeholder: disabled ? '' : placeholder,
42
41
  ref: elementRef,
43
42
  id: id,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/InputFields/components/SearchBarInput.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","ComponentMStyling","ComponentSStyling","useFocusVisibleRef","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","onBlur","elementRef","focusParentRefs","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;AAEA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,cAAnD;AACA,SAAQC,kBAAR,QAAiC,2BAAjC;;AAEA,OAAO,IAAMC,MAAM,GAAGP,MAAM,CAACQ,KAAP,CAAaC,KAAb,CAAmB;AAAA,SAAO;AAACC,IAAAA,IAAI,EAAE;AAAP,GAAP;AAAA,CAAnB,CAAH,6lBAIfL,iBAAiB,CAACF,kBAAkB,CAACQ,OAApB,EAA6BT,MAAM,CAACU,KAApC,CAJF,EA0BbP,iBAAiB,CAACF,kBAAkB,CAACU,MAApB,EAA4BX,MAAM,CAACY,WAAnC,CA1BJ,CAAZ;AAkCP,OAAO,IAAMC,SAAS,GAAGf,MAAM,CAACO,MAAD,CAAT,6bAMlBH,iBAAiB,CAACD,kBAAkB,CAACQ,OAApB,EAA6BT,MAAM,CAACU,KAApC,CANC,EAQhBP,iBAAiB,CAACF,kBAAkB,CAACU,MAApB,EAA4BX,MAAM,CAACc,WAAnC,CARD,EAWlBf,WAAW,CAACgB,MAXM,EAadb,iBAAiB,CAACD,kBAAkB,CAACU,MAApB,EAA4BX,MAAM,CAACc,WAAnC,CAbH,EAmBdX,iBAAiB,CAACF,kBAAkB,CAACU,MAApB,EAA4BX,MAAM,CAACc,WAAnC,CAnBH,EAyBdZ,iBAAiB,CAACD,kBAAkB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,MAAF,CAASC,KAAV,CAAzB;AAAA,KARZ;AASE,IAAA,KAAK,EAAEhB,UATT;AAUE,IAAA,MAAM,EAAE,gBAACW,CAAD;AAAA,aAAOJ,OAAM,IAAIA,OAAM,CAACI,CAAD,CAAvB;AAAA,KAVV;AAWE,IAAA,SAAS,EAAEN,SAXb;AAYE,IAAA,UAAU,EAAE,oBAACM,CAAD;AAAA,aAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBT,WAAW,CAACS,CAAD,CAAhC,GAAsC,IAAnD;AAAA;AAZd,IADF;AAgBD,CAxCsB,CAAvB;;AAZEZ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AAEAE,EAAAA,M;AACAE,EAAAA,e;;AA6CF,eAAed,cAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {Size} from '../../types';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {useFocusVisibleRef} from '../../common/FocusVisible';\n\nexport const Search = styled.input.attrs(() => ({type: 'search'}))`\n appearance: none;\n width: calc(100% - 96px);\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\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\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\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 ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\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?: Size.Small | Size.Medium;\n onBlur?: (e: any) => void;\n focusParentRefs?: React.RefObject<any>[];\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const {\n id,\n searchTerm,\n setSearchTerm,\n enterSearch,\n placeholder,\n disabled,\n onKeyDown,\n size,\n onBlur\n } = props;\n\n const elementRef = useFocusVisibleRef(props.focusParentRefs || [], ref);\n\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 ref={elementRef}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={0}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n onBlur={(e) => onBlur && onBlur(e)}\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","useFocusVisibleRef","Search","input","attrs","type","Italic","neutral_500","Regular","black","neutral_600","MEDIUM","SearchBarInput","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","onBlur","elementRef","focusParentRefs","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;AAEA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,cAAnD;AACA,SAAQC,kBAAR,QAAiC,cAAjC;;AAEA,OAAO,IAAMC,MAAM,GAAGP,MAAM,CAACQ,KAAP,CAAaC,KAAb,CAAmB;AAAA,SAAO;AAACC,IAAAA,IAAI,EAAE;AAAP,GAAP;AAAA,CAAnB,CAAH,+5BA0BbL,iBAAiB,CAACF,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACU,WAAnC,CA1BJ,EAkCfR,iBAAiB,CAACD,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAlCF,EAoCbT,iBAAiB,CAACF,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACa,WAAnC,CApCJ,EAuCfd,WAAW,CAACe,MAvCG,EAyCXZ,iBAAiB,CAACD,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACa,WAAnC,CAzCN,EA+CXV,iBAAiB,CAACF,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACa,WAAnC,CA/CN,EAqDXX,iBAAiB,CAACD,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACa,WAAnC,CArDN,CAAZ;AA6EP,IAAME,cAAc,gBAAGlB,KAAK,CAACmB,UAAN,CAAwD,UAACC,KAAD,EAA6BC,GAA7B,EAAqC;AAClH,MACEC,EADF,GAUIF,KAVJ,CACEE,EADF;AAAA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AEN,SAXb;AAYE,IAAA,UAAU,EAAE,oBAACM,CAAD;AAAA,aAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBT,WAAW,CAACS,CAAD,CAAhC,GAAsC,IAAnD;AAAA;AAZd,IADF;AAgBD,CAxCsB,CAAvB;;AAZEZ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AAEAE,EAAAA,M;AACAE,EAAAA,e;;AA6CF,eAAed,cAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {Size} from '../../types';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {useFocusVisibleRef} from '../../common';\n\nexport const Search = styled.input.attrs(() => ({type: 'search'}))`\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\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 height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\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?: Size.Small | Size.Medium;\n onBlur?: (e: any) => void;\n focusParentRefs?: React.RefObject<any>[];\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const {\n id,\n searchTerm,\n setSearchTerm,\n enterSearch,\n placeholder,\n disabled,\n onKeyDown,\n size,\n onBlur\n } = props;\n\n const elementRef = useFocusVisibleRef(props.focusParentRefs || [], ref);\n\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 <Search\n placeholder={disabled ? '' : placeholder}\n ref={elementRef}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={0}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n onBlur={(e) => onBlur && onBlur(e)}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.js"}
@@ -7,7 +7,11 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.default = exports.StyledSearchField = void 0;
10
+ exports.default = exports.StyledSearchField = exports.SearchFieldWrapper = void 0;
11
+
12
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
+
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
15
 
12
16
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
17
 
@@ -15,7 +19,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
15
19
 
16
20
  var React = _interopRequireWildcard(require("react"));
17
21
 
18
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
22
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
19
23
 
20
24
  var _index = require("../../styles/index");
21
25
 
@@ -23,23 +27,25 @@ var _styling = require("../styling");
23
27
 
24
28
  var _styles = require("../../styles");
25
29
 
26
- var _zIndexes = require("../../styles/z-indexes");
27
-
28
30
  var _jsxRuntime = require("react/jsx-runtime");
29
31
 
32
+ var _excluded = ["id", "searchTerm", "disabled", "validationMessage", "children", "size", "className"];
33
+
30
34
  var _templateObject, _templateObject2;
31
35
 
32
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
37
 
34
38
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
39
 
36
- var DisabledState = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid ", ";\n pointer-events: none;\n background-color: transparent !important;\n box-shadow: none !important;\n"])), _index.COLORS.neutral_100);
40
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
37
41
 
38
- var StyledSearchField = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0px 0px 0px 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ", ";\n border-color: transparent;\n }\n\n &.focus-visible-within{\n outline: none;\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2e7fa1;\n z-index: ", ";\n }\n \n &:focus-within {\n box-shadow: inset 0px 0px 0px 2px ", ";\n border-color: transparent;\n }\n\n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n ", "\n ", "\n"])), _index.COLORS.neutral_400, _index.COLORS.white, (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.BREAKPOINTS.MEDIUM, (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.COLORS.primary_700, _zIndexes.Z_INDEXES.focus, _index.COLORS.primary_800, _index.COLORS.neutral_100, _index.COLORS.neutral_600, function (props) {
39
- return props.disabled ? DisabledState : '';
40
- }, function (props) {
41
- return props.activeValidationMessage ? _styling.activeValidationMessageState : '';
42
- });
42
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
43
+
44
+ var SearchFieldWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.focus-visible-within {\n ", "\n }\n"])), _index.focusStyles);
45
+
46
+ exports.SearchFieldWrapper = SearchFieldWrapper;
47
+
48
+ var StyledSearchField = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n ", "\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n\n"])), _index.COLORS.neutral_400, _index.COLORS.white, (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.BREAKPOINTS.MEDIUM, (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.COLORS.primary_800, _index.COLORS.primary_800, _index.COLORS.neutral_600, _styling.activeValidationMessageState, _index.COLORS.neutral_100);
43
49
 
44
50
  exports.StyledSearchField = StyledSearchField;
45
51
  var SearchField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
@@ -48,14 +54,19 @@ var SearchField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
48
54
  disabled = _ref.disabled,
49
55
  validationMessage = _ref.validationMessage,
50
56
  children = _ref.children,
51
- size = _ref.size;
52
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledSearchField, {
53
- id: "".concat(id, "_main"),
57
+ size = _ref.size,
58
+ className = _ref.className,
59
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
60
+ var cls = (disabled ? 'disabled ' : '').concat(searchTerm !== '' ? 'searchactive ' : '').concat(size ? "".concat(size, " ") : '').concat(validationMessage ? ' invalid ' : '').concat("".concat(className !== null && className !== void 0 ? className : '', " "));
61
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(SearchFieldWrapper, {
54
62
  ref: ref,
55
- className: (searchTerm !== '' ? 'searchactive ' : '').concat(size ? size : ''),
56
- disabled: disabled,
57
- activeValidationMessage: validationMessage !== undefined && validationMessage !== '',
58
- children: children
63
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledSearchField, _objectSpread(_objectSpread({
64
+ id: "".concat(id, "_main"),
65
+ "data-testid": "".concat(id, "_main"),
66
+ className: cls
67
+ }, rest), {}, {
68
+ children: children
69
+ }))
59
70
  });
60
71
  });
61
72
  SearchField.propTypes = {
@@ -63,8 +74,7 @@ SearchField.propTypes = {
63
74
  searchTerm: _propTypes.default.string,
64
75
  disabled: _propTypes.default.bool,
65
76
  validationMessage: _propTypes.default.string,
66
- children: _propTypes.default.any.isRequired,
67
- size: _propTypes.default.string.isRequired
77
+ children: _propTypes.default.any.isRequired
68
78
  };
69
79
  var _default = SearchField;
70
80
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["DisabledState","css","COLORS","neutral_100","StyledSearchField","styled","div","neutral_400","white","ComponentTextStyle","Regular","black","Italic","neutral_500","BREAKPOINTS","MEDIUM","primary_700","Z_INDEXES","focus","primary_800","neutral_600","props","disabled","activeValidationMessage","activeValidationMessageState","SearchField","React","forwardRef","ref","id","searchTerm","validationMessage","children","size","concat","undefined"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,aAAa,OAAGC,qBAAH,wNACGC,cAAOC,WADV,CAAnB;;AAOO,IAAMC,iBAAiB,GAAGC,0BAAOC,GAAV,kzCAGQJ,cAAOK,W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,GAFP;AAGE,IAAA,SAAS,EAAE,CAACE,UAAU,KAAK,EAAf,GAAoB,eAApB,GAAsC,EAAvC,EAA2CI,MAA3C,CAAkDD,IAAI,GAAGA,IAAH,GAAU,EAAhE,CAHb;AAIE,IAAA,QAAQ,EAAEX,QAJZ;AAKE,IAAA,uBAAuB,EAAES,iBAAiB,KAAKI,SAAtB,IAAmCJ,iBAAiB,KAAK,EALpF;AAAA,cAMGC;AANH,IADF;AAUD,CAlBmB,CAApB;;AAREH,EAAAA,E;AACAC,EAAAA,U;AACAR,EAAAA,Q;AACAS,EAAAA,iB;AACAC,EAAAA,Q;AACAC,EAAAA,I;;eAuBaR,W","sourcesContent":["import * as React from 'react';\nimport styled, {css} from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {activeValidationMessageState} from '../styling';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {Z_INDEXES} from '../../styles/z-indexes';\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; }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n border-color: transparent;\n }\n\n &.focus-visible-within{\n outline: none;\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2e7fa1;\n z-index: ${Z_INDEXES.focus};\n }\n \n &:focus-within {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n border-color: transparent;\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n ${(props) => (props.disabled ? DisabledState : '')}\n ${(props) => (props.activeValidationMessage ? activeValidationMessageState : '')}\n`;\n\ntype SeachFieldProps = {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size: string;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({\n id,\n searchTerm,\n disabled,\n validationMessage,\n children,\n size\n }, ref) => {\n return (\n <StyledSearchField\n id={`${id}_main`}\n ref={ref}\n className={(searchTerm !== '' ? 'searchactive ' : '').concat(size ? size : '')}\n disabled={disabled}\n activeValidationMessage={validationMessage !== undefined && validationMessage !== ''}>\n {children}\n </StyledSearchField>\n );\n});\n\nexport default SearchField;\n"],"file":"SearchField.cjs"}
1
+ {"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["SearchFieldWrapper","styled","div","focusStyles","StyledSearchField","COLORS","neutral_400","white","ComponentTextStyle","Regular","black","Italic","neutral_500","BREAKPOINTS","MEDIUM","primary_800","neutral_600","activeValidationMessageState","neutral_100","SearchField","React","forwardRef","ref","id","searchTerm","disabled","validationMessage","children","size","className","rest","cls","concat"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAIO,IAAMA,kBAAkB,GAAGC,0BAAOC,GAAV,iIAEzBC,kBAFyB,CAAxB;;;;AAMA,IAAMC,iBAAiB,GAAGH,0BAAOC,GAAV,imCAGEG,cAAOC,WAHT,EAURD,cAAOE,KAVC,EAY1B,+BAAkBC,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAZ0B,EAkBxB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CAlBwB,EAqB1BC,mBAAYC,MArBc,EAsBxB,+BAAkBN,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAtBwB,EA4BtB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CA5BsB,EAiCxB,+BAAkBJ,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAjCwB,EAsCtB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CAtCsB,EA2CxB,+BAAkBJ,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CA3CwB,EA+CtB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CA/CsB,EAoDIP,cAAOU,WApDX,EAwDIV,cAAOU,WAxDX,EA4DjBV,cAAOW,WA5DU,EAiExBC,qCAjEwB,EAqEIZ,cAAOa,WArEX,CAAvB;;;AAqFP,IAAMC,WAAW,gBAAGC,KAAK,CAACC,UAAN,CAAkD,gBASIC,GATJ,EASY;AAAA,MARTC,EAQS,QARTA,EAQS;AAAA,MAPTC,UAOS,QAPTA,UAOS;AAAA,MANTC,QAMS,QANTA,QAMS;AAAA,MALTC,iBAKS,QALTA,iBAKS;AAAA,MAJTC,QAIS,QAJTA,QAIS;AAAA,MAHTC,IAGS,QAHTA,IAGS;AAAA,MAFTC,SAES,QAFTA,SAES;AAAA,MADNC,IACM;AAEhF,MAAMC,GAAG,GACP,CAACN,QAAQ,GAAG,WAAH,GAAiB,EAA1B,EACGO,MADH,CACUR,UAAU,KAAK,EAAf,GAAoB,eAApB,GAAsC,EADhD,EAEGQ,MAFH,CAEUJ,IAAI,aAAMA,IAAN,SAAgB,EAF9B,EAGGI,MAHH,CAGUN,iBAAiB,GAAG,WAAH,GAAiB,EAH5C,EAIGM,MAJH,WAIaH,SAJb,aAIaA,SAJb,cAIaA,SAJb,GAI0B,EAJ1B,OADF;AAOA,sBACE,qBAAC,kBAAD;AAAoB,IAAA,GAAG,EAAEP,GAAzB;AAAA,2BACE,qBAAC,iBAAD;AACE,MAAA,EAAE,YAAKC,EAAL,UADJ;AAEE,+BAAgBA,EAAhB,UAFF;AAGE,MAAA,SAAS,EAAEQ;AAHb,OAIMD,IAJN;AAAA,gBAKGH;AALH;AADF,IADF;AAWD,CA7BmB,CAApB;;AAREJ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,Q;AACAC,EAAAA,iB;AACAC,EAAAA,Q;;eAmCaR,W","sourcesContent":["import * as React from 'react';\nimport styled, {css, CSSProperties} from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../../styles/index';\nimport {activeValidationMessageState} from '../styling';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {Z_INDEXES} from '../../styles/z-indexes';\nimport {Size} from '../../types';\n\nexport const SearchFieldWrapper = styled.div`\n &.focus-visible-within {\n ${focusStyles}\n }\n`;\n\nexport const StyledSearchField = styled.div<{ activeValidationMessage?: boolean; }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n &.invalid {\n ${activeValidationMessageState}\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n\n`;\n\ntype SeachFieldProps = React.HTMLAttributes<HTMLDivElement> & {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size?: Size.Small | Size.Medium;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({\n id,\n searchTerm,\n disabled,\n validationMessage,\n children,\n size,\n className,\n ...rest\n }, ref) => {\n\n const cls =\n (disabled ? 'disabled ' : '')\n .concat(searchTerm !== '' ? 'searchactive ' : '')\n .concat(size ? `${size} ` : '')\n .concat(validationMessage ? ' invalid ' : '')\n .concat(`${className ?? ''} `);\n\n return (\n <SearchFieldWrapper ref={ref}>\n <StyledSearchField\n id={`${id}_main`}\n data-testid={`${id}_main`}\n className={cls}\n {...rest}>\n {children}\n </StyledSearchField>\n </SearchFieldWrapper>\n );\n});\n\nexport default SearchField;\n"],"file":"SearchField.cjs"}
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
+ import { Size } from '../../types';
3
+ export declare const SearchFieldWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
4
  export declare const StyledSearchField: import("styled-components").StyledComponent<"div", any, {
3
- disabled?: boolean | undefined;
4
5
  activeValidationMessage?: boolean | undefined;
5
6
  }, never>;
6
- declare type SeachFieldProps = {
7
+ declare const SearchField: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
7
8
  id: string;
8
- searchTerm?: string;
9
- disabled?: boolean;
10
- validationMessage?: string;
9
+ searchTerm?: string | undefined;
10
+ disabled?: boolean | undefined;
11
+ validationMessage?: string | undefined;
11
12
  children: any;
12
- size: string;
13
- };
14
- declare const SearchField: React.ForwardRefExoticComponent<SeachFieldProps & React.RefAttributes<HTMLDivElement>>;
13
+ size?: Size.Small | Size.Medium | undefined;
14
+ } & React.RefAttributes<HTMLDivElement>>;
15
15
  export default SearchField;
@@ -1,35 +1,43 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
1
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
4
  import _pt from "prop-types";
5
+ var _excluded = ["id", "searchTerm", "disabled", "validationMessage", "children", "size", "className"];
3
6
 
4
7
  var _templateObject, _templateObject2;
5
8
 
9
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
10
+
11
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
12
+
6
13
  import * as React from 'react';
7
- import styled, { css } from 'styled-components';
8
- import { BREAKPOINTS, COLORS, ComponentTextStyle } from '../../styles/index';
14
+ import styled from 'styled-components';
15
+ import { BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles } from '../../styles/index';
9
16
  import { activeValidationMessageState } from '../styling';
10
17
  import { ComponentMStyling, ComponentSStyling } from '../../styles';
11
- import { Z_INDEXES } from '../../styles/z-indexes';
12
18
  import { jsx as _jsx } from "react/jsx-runtime";
13
- var DisabledState = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n pointer-events: none;\n background-color: transparent !important;\n box-shadow: none !important;\n"])), COLORS.neutral_100);
14
- export var StyledSearchField = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0px 0px 0px 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ", ";\n border-color: transparent;\n }\n\n &.focus-visible-within{\n outline: none;\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2e7fa1;\n z-index: ", ";\n }\n \n &:focus-within {\n box-shadow: inset 0px 0px 0px 2px ", ";\n border-color: transparent;\n }\n\n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n ", "\n ", "\n"])), COLORS.neutral_400, COLORS.white, ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), COLORS.primary_700, Z_INDEXES.focus, COLORS.primary_800, COLORS.neutral_100, COLORS.neutral_600, function (props) {
15
- return props.disabled ? DisabledState : '';
16
- }, function (props) {
17
- return props.activeValidationMessage ? activeValidationMessageState : '';
18
- });
19
+ export var SearchFieldWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.focus-visible-within {\n ", "\n }\n"])), focusStyles);
20
+ export var StyledSearchField = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n ", "\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n\n"])), COLORS.neutral_400, COLORS.white, ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), COLORS.primary_800, COLORS.primary_800, COLORS.neutral_600, activeValidationMessageState, COLORS.neutral_100);
19
21
  var SearchField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20
22
  var id = _ref.id,
21
23
  searchTerm = _ref.searchTerm,
22
24
  disabled = _ref.disabled,
23
25
  validationMessage = _ref.validationMessage,
24
26
  children = _ref.children,
25
- size = _ref.size;
26
- return /*#__PURE__*/_jsx(StyledSearchField, {
27
- id: "".concat(id, "_main"),
27
+ size = _ref.size,
28
+ className = _ref.className,
29
+ rest = _objectWithoutProperties(_ref, _excluded);
30
+
31
+ var cls = (disabled ? 'disabled ' : '').concat(searchTerm !== '' ? 'searchactive ' : '').concat(size ? "".concat(size, " ") : '').concat(validationMessage ? ' invalid ' : '').concat("".concat(className !== null && className !== void 0 ? className : '', " "));
32
+ return /*#__PURE__*/_jsx(SearchFieldWrapper, {
28
33
  ref: ref,
29
- className: (searchTerm !== '' ? 'searchactive ' : '').concat(size ? size : ''),
30
- disabled: disabled,
31
- activeValidationMessage: validationMessage !== undefined && validationMessage !== '',
32
- children: children
34
+ children: /*#__PURE__*/_jsx(StyledSearchField, _objectSpread(_objectSpread({
35
+ id: "".concat(id, "_main"),
36
+ "data-testid": "".concat(id, "_main"),
37
+ className: cls
38
+ }, rest), {}, {
39
+ children: children
40
+ }))
33
41
  });
34
42
  });
35
43
  SearchField.propTypes = {
@@ -37,8 +45,7 @@ SearchField.propTypes = {
37
45
  searchTerm: _pt.string,
38
46
  disabled: _pt.bool,
39
47
  validationMessage: _pt.string,
40
- children: _pt.any.isRequired,
41
- size: _pt.string.isRequired
48
+ children: _pt.any.isRequired
42
49
  };
43
50
  export default SearchField;
44
51
  //# sourceMappingURL=SearchField.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["React","styled","css","BREAKPOINTS","COLORS","ComponentTextStyle","activeValidationMessageState","ComponentMStyling","ComponentSStyling","Z_INDEXES","DisabledState","neutral_100","StyledSearchField","div","neutral_400","white","Regular","black","Italic","neutral_500","MEDIUM","primary_700","focus","primary_800","neutral_600","props","disabled","activeValidationMessage","SearchField","forwardRef","ref","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,QAA2C,YAA3C;AACA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,cAAnD;AACA,SAAQC,SAAR,QAAwB,wBAAxB;;AAEA,IAAMC,aAAa,GAAGR,GAAH,yMACGE,MAAM,CAACO,WADV,CAAnB;AAOA,OAAO,IAAMC,iBAAiB,GAAGX,MAAM,CAACY,GAAV,oyCAGQT,MAAM,CAACU,WAHf,EAURV,MAAM,CAACW,KAVC,EAY1BP,iBAAiB,CAACH,kBAAkB,CAACW,OAApB,EAA6BZ,MAAM,CAACa,KAApC,CAZS,EAkBxBT,iBAAiB,CAACH,kBAAkB,CAACa,MAApB,EAA4B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G,EAAED,GAFP;AAGE,IAAA,SAAS,EAAE,CAACE,UAAU,KAAK,EAAf,GAAoB,eAApB,GAAsC,EAAvC,EAA2CI,MAA3C,CAAkDD,IAAI,GAAGA,IAAH,GAAU,EAAhE,CAHb;AAIE,IAAA,QAAQ,EAAET,QAJZ;AAKE,IAAA,uBAAuB,EAAEO,iBAAiB,KAAKI,SAAtB,IAAmCJ,iBAAiB,KAAK,EALpF;AAAA,cAMGC;AANH,IADF;AAUD,CAlBmB,CAApB;;AAREH,EAAAA,E;AACAC,EAAAA,U;AACAN,EAAAA,Q;AACAO,EAAAA,iB;AACAC,EAAAA,Q;AACAC,EAAAA,I;;AAuBF,eAAeP,WAAf","sourcesContent":["import * as React from 'react';\nimport styled, {css} from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {activeValidationMessageState} from '../styling';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {Z_INDEXES} from '../../styles/z-indexes';\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; }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n border-color: transparent;\n }\n\n &.focus-visible-within{\n outline: none;\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2e7fa1;\n z-index: ${Z_INDEXES.focus};\n }\n \n &:focus-within {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n border-color: transparent;\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n ${(props) => (props.disabled ? DisabledState : '')}\n ${(props) => (props.activeValidationMessage ? activeValidationMessageState : '')}\n`;\n\ntype SeachFieldProps = {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size: string;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({\n id,\n searchTerm,\n disabled,\n validationMessage,\n children,\n size\n }, ref) => {\n return (\n <StyledSearchField\n id={`${id}_main`}\n ref={ref}\n className={(searchTerm !== '' ? 'searchactive ' : '').concat(size ? size : '')}\n disabled={disabled}\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","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","activeValidationMessageState","ComponentMStyling","ComponentSStyling","SearchFieldWrapper","div","StyledSearchField","neutral_400","white","Regular","black","Italic","neutral_500","MEDIUM","primary_800","neutral_600","neutral_100","SearchField","forwardRef","ref","id","searchTerm","disabled","validationMessage","children","size","className","rest","cls","concat"],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAyC,mBAAzC;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,kBAA7B,EAAiDC,WAAjD,QAAmE,oBAAnE;AACA,SAAQC,4BAAR,QAA2C,YAA3C;AACA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,cAAnD;;AAIA,OAAO,IAAMC,kBAAkB,GAAGR,MAAM,CAACS,GAAV,mHAEzBL,WAFyB,CAAxB;AAMP,OAAO,IAAMM,iBAAiB,GAAGV,MAAM,CAACS,GAAV,mlCAGEP,MAAM,CAACS,WAHT,EAURT,MAAM,CAACU,KAVC,EAY1BL,iBAAiB,CAACJ,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAZS,EAkBxBP,iBAAiB,CAACJ,kBAAkB,CAACY,MAApB,EAA4Bb,MAAM,CAACc,WAAnC,CAlBO,EAqB1Bf,WAAW,CAACgB,MArBc,EAsBxBX,iBAAiB,CAACH,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAtBO,EA4BtBR,iBAAiB,CAACH,kBAAkB,CAACY,MAApB,EAA4Bb,MAAM,CAACc,WAAnC,CA5BK,EAiCxBT,iBAAiB,CAACJ,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAjCO,EAsCtBP,iBAAiB,CAACJ,kBAAkB,CAACY,MAApB,EAA4Bb,MAAM,CAACc,WAAnC,CAtCK,EA2CxBV,iBAAiB,CAACH,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CA3CO,EA+CtBR,iBAAiB,CAACH,kBAAkB,CAACY,MAApB,EAA4Bb,MAAM,CAACc,WAAnC,CA/CK,EAoDId,MAAM,CAACgB,WApDX,EAwDIhB,MAAM,CAACgB,WAxDX,EA4DjBhB,MAAM,CAACiB,WA5DU,EAiExBd,4BAjEwB,EAqEIH,MAAM,CAACkB,WArEX,CAAvB;AAqFP,IAAMC,WAAW,gBAAGtB,KAAK,CAACuB,UAAN,CAAkD,gBASIC,GATJ,EASY;AAAA,MARTC,EAQS,QARTA,EAQS;AAAA,MAPTC,UAOS,QAPTA,UAOS;AAAA,MANTC,QAMS,QANTA,QAMS;AAAA,MALTC,iBAKS,QALTA,iBAKS;AAAA,MAJTC,QAIS,QAJTA,QAIS;AAAA,MAHTC,IAGS,QAHTA,IAGS;AAAA,MAFTC,SAES,QAFTA,SAES;AAAA,MADNC,IACM;;AAEhF,MAAMC,GAAG,GACP,CAACN,QAAQ,GAAG,WAAH,GAAiB,EAA1B,EACGO,MADH,CACUR,UAAU,KAAK,EAAf,GAAoB,eAApB,GAAsC,EADhD,EAEGQ,MAFH,CAEUJ,IAAI,aAAMA,IAAN,SAAgB,EAF9B,EAGGI,MAHH,CAGUN,iBAAiB,GAAG,WAAH,GAAiB,EAH5C,EAIGM,MAJH,WAIaH,SAJb,aAIaA,SAJb,cAIaA,SAJb,GAI0B,EAJ1B,OADF;AAOA,sBACE,KAAC,kBAAD;AAAoB,IAAA,GAAG,EAAEP,GAAzB;AAAA,2BACE,KAAC,iBAAD;AACE,MAAA,EAAE,YAAKC,EAAL,UADJ;AAEE,+BAAgBA,EAAhB,UAFF;AAGE,MAAA,SAAS,EAAEQ;AAHb,OAIMD,IAJN;AAAA,gBAKGH;AALH;AADF,IADF;AAWD,CA7BmB,CAApB;;AAREJ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,Q;AACAC,EAAAA,iB;AACAC,EAAAA,Q;;AAmCF,eAAeP,WAAf","sourcesContent":["import * as React from 'react';\nimport styled, {css, CSSProperties} from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../../styles/index';\nimport {activeValidationMessageState} from '../styling';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {Z_INDEXES} from '../../styles/z-indexes';\nimport {Size} from '../../types';\n\nexport const SearchFieldWrapper = styled.div`\n &.focus-visible-within {\n ${focusStyles}\n }\n`;\n\nexport const StyledSearchField = styled.div<{ activeValidationMessage?: boolean; }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n &.invalid {\n ${activeValidationMessageState}\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n\n`;\n\ntype SeachFieldProps = React.HTMLAttributes<HTMLDivElement> & {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size?: Size.Small | Size.Medium;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({\n id,\n searchTerm,\n disabled,\n validationMessage,\n children,\n size,\n className,\n ...rest\n }, ref) => {\n\n const cls =\n (disabled ? 'disabled ' : '')\n .concat(searchTerm !== '' ? 'searchactive ' : '')\n .concat(size ? `${size} ` : '')\n .concat(validationMessage ? ' invalid ' : '')\n .concat(`${className ?? ''} `);\n\n return (\n <SearchFieldWrapper ref={ref}>\n <StyledSearchField\n id={`${id}_main`}\n data-testid={`${id}_main`}\n className={cls}\n {...rest}>\n {children}\n </StyledSearchField>\n </SearchFieldWrapper>\n );\n});\n\nexport default SearchField;\n"],"file":"SearchField.js"}
@@ -17,8 +17,6 @@ var _styles = require("../styles");
17
17
 
18
18
  var _typography = require("../styles/typography");
19
19
 
20
- var _zIndexes = require("../styles/z-indexes");
21
-
22
20
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
23
21
 
24
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -32,13 +30,13 @@ var InputWrapper = _styledComponents.default.div(_templateObject || (_templateOb
32
30
  });
33
31
 
34
32
  exports.InputWrapper = InputWrapper;
35
- var lockedState = (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n box-shadow: inset 0px 0px 0px 1px ", " !important;\n color: ", " !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n"])), _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, _styles.COLORS.neutral_600);
36
- var activeValidationMessageState = (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n -webkit-box-shadow: inset 0px 0px 0px 2px ", ";\n -moz-box-shadow: inset 0px 0px 0px 2px ", ";\n box-shadow: inset 0px 0px 0px 2px ", ";\n"])), _styles.COLORS.warning_400, _styles.COLORS.warning_400, _styles.COLORS.warning_400);
33
+ var lockedState = (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n box-shadow: inset 0 0 0 1px ", " !important;\n color: ", " !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n"])), _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, _styles.COLORS.neutral_600);
34
+ var activeValidationMessageState = (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), _styles.COLORS.warning_400);
37
35
  exports.activeValidationMessageState = activeValidationMessageState;
38
- var activeErrorMessageState = (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n -webkit-box-shadow: inset 0px 0px 0px 2px ", ";\n -moz-box-shadow: inset 0px 0px 0px 2px ", ";\n box-shadow: inset 0px 0px 0px 2px ", ";\n"])), _styles.COLORS.critical_400, _styles.COLORS.critical_400, _styles.COLORS.critical_400);
39
- var activeCorrectInput = (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n -webkit-box-shadow: inset 0px 0px 0px 2px ", ";\n -moz-box-shadow: inset 0px 0px 0px 2px ", ";\n box-shadow: inset 0px 0px 0px 2px ", ";\n"])), _styles.COLORS.correct_500, _styles.COLORS.correct_500, _styles.COLORS.correct_500);
36
+ var activeErrorMessageState = (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), _styles.COLORS.critical_400);
37
+ var activeCorrectInput = (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), _styles.COLORS.correct_500);
40
38
 
41
- var InputFieldStyling = _styledComponents.default.input(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n height: 48px;\n width: 100%;\n border-radius: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ", "\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 16px !important;\n\n outline: none;\n\n font-size: 16px;\n\n &::placeholder {\n ", "\n }\n\n ", " {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\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\n color: ", " !important;\n\n ", "\n ", "\n ", "\n ", "\n\n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ", " !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n \n &.focus-visible{\n outline: none;\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2e7fa1;\n z-index: ", ";\n }\n\n &.error {\n border-radius: 4px;\n border-style: solid;\n border-width: 2px;\n border-color: #e97116;\n padding: 0 15px !important;\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &.error {\n margin-bottom: 0 !important;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n \n"])), function (props) {
39
+ var InputFieldStyling = _styledComponents.default.input(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n height: 48px;\n width: 100%;\n border-radius: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ", "\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 16px !important;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ", "\n }\n\n ", " {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\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\n color: ", " !important;\n\n ", "\n ", "\n ", "\n ", "\n\n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ", " !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n \n &.focus-visible{\n ", "\n }\n\n &.error {\n border-radius: 4px;\n border-style: solid;\n border-width: 2px;\n border-color: #e97116;\n padding: 0 15px !important;\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &.error {\n margin-bottom: 0 !important;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n \n"])), function (props) {
42
40
  return props.withoutBorder ? "-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n " : "-webkit-box-shadow: inset 0px 0px 0px 1px ".concat(_styles.COLORS.neutral_400, ";\n -moz-box-shadow: inset 0px 0px 0px 1px ").concat(_styles.COLORS.neutral_400, ";\n box-shadow: inset 0px 0px 0px 1px ").concat(_styles.COLORS.neutral_400, ";");
43
41
  }, (0, _typography.ComponentSStyling)(_typography.ComponentTextStyle.Italic, _styles.COLORS.neutral_600), _styles.BREAKPOINTS.MEDIUM, (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Italic, _styles.COLORS.neutral_600), _styles.COLORS.black, function (props) {
44
42
  return props.locked ? lockedState : '';
@@ -48,7 +46,7 @@ var InputFieldStyling = _styledComponents.default.input(_templateObject6 || (_te
48
46
  return props.activeErrorMessage ? activeErrorMessageState : '';
49
47
  }, function (props) {
50
48
  return props.correctInput ? activeCorrectInput : '';
51
- }, _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, _styles.COLORS.primary_800, _zIndexes.Z_INDEXES.focus, _styles.COLORS.primary_700, _styles.COLORS.primary_800);
49
+ }, _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, _styles.COLORS.primary_800, _styles.focusStyles, _styles.COLORS.primary_700, _styles.COLORS.primary_800);
52
50
 
53
51
  exports.InputFieldStyling = InputFieldStyling;
54
52
  var ValidationStyling = (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n &.error-msg {\n ", "\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ", "\n font-weight: 700;\n line-height: 15px;\n }\n"])), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, _styles.COLORS.black), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, '#e76468'));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/InputFields/styling.ts"],"names":["InputWrapper","styled","div","props","locked","disabled","margin","lockedState","css","COLORS","neutral_100","neutral_300","neutral_600","activeValidationMessageState","warning_400","activeErrorMessageState","critical_400","activeCorrectInput","correct_500","InputFieldStyling","input","withoutBorder","neutral_400","ComponentTextStyle","Italic","BREAKPOINTS","MEDIUM","black","activeValidationMessage","activeErrorMessage","correctInput","primary_800","Z_INDEXES","focus","primary_700","ValidationStyling","Regular","RequiredStar","span","critical_500","Warning","WarningMessage","warning_500","ErrorMessage","Autof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, ComponentTextStyle, ComponentSStyling, ComponentMStyling } from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\n\nexport const InputWrapper = styled.div<{ locked?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.locked || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n`;\n\nconst lockedState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeValidationMessageState = css`\n -webkit-box-shadow: inset 0px 0px 0px 2px ${COLORS.warning_400};\n -moz-box-shadow: inset 0px 0px 0px 2px ${COLORS.warning_400};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.warning_400};\n`;\nconst activeErrorMessageState = css`\n -webkit-box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_400};\n -moz-box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_400};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_400};\n`;\nconst activeCorrectInput = css`\n -webkit-box-shadow: inset 0px 0px 0px 2px ${COLORS.correct_500};\n -moz-box-shadow: inset 0px 0px 0px 2px ${COLORS.correct_500};\n box-shadow: inset 0px 0px 0px 2px ${COLORS.correct_500};\n`;\n\nconst InputFieldStyling = styled.input<{\n locked?: boolean;\n activeValidationMessage?: boolean;\n activeErrorMessage?: boolean;\n correctInput?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 16px !important;\n\n outline: none;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\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\n color: ${COLORS.black} !important;\n\n ${(props) => (props.locked ? lockedState : '')}\n ${(props) => (props.activeValidationMessage ? activeValidationMessageState : '')}\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n ${(props) => (props.correctInput ? activeCorrectInput : '')}\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n \n &.focus-visible{\n outline: none;\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2e7fa1;\n z-index: ${Z_INDEXES.focus};\n }\n\n &.error {\n border-radius: 4px;\n border-style: solid;\n border-width: 2px;\n border-color: #e97116;\n padding: 0 15px !important;\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &.error {\n margin-bottom: 0 !important;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n \n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const RequiredStar = styled.span`\n color: ${COLORS.critical_500};\n font-size: 28px;\n line-height: 12px;\n font-weight: 700;\n position: relative;\n top: 10px;\n`;\nexport const Warning = styled.div`\n font-size: 12px;\n line-height: 140%;\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 14px;\n }\n\n &.small {\n font-size: 12px;\n }\n &.medium {\n font-size: 14px;\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const WarningMessage = styled(Warning)`\n color: ${COLORS.warning_500};\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"file":"styling.cjs"}
1
+ {"version":3,"sources":["../../src/InputFields/styling.ts"],"names":["InputWrapper","styled","div","props","locked","disabled","margin","lockedState","css","COLORS","neutral_100","neutral_300","neutral_600","activeValidationMessageState","warning_400","activeErrorMessageState","critical_400","activeCorrectInput","correct_500","InputFieldStyling","input","withoutBorder","neutral_400","ComponentTextStyle","Italic","BREAKPOINTS","MEDIUM","black","activeValidationMessage","activeErrorMessage","correctInput","primary_800","focusStyles","primary_700","ValidationStyling","Regular","RequiredStar","span","critical_500","Warning","WarningMessage","warning_500","ErrorMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;AA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mB,EAoEnB,UAACZ,KAAD;AAAA,SAAYA,KAAK,CAAC2B,YAAN,GAAqBb,kBAArB,GAA0C,EAAtD;AAAA,CApEmB,EAuECR,eAAOC,WAvER,EA4EVD,eAAOE,WA5EG,EA+EiBF,eAAOsB,WA/ExB,EAmFjBC,mBAnFiB,EAuGiBvB,eAAOwB,WAvGxB,EA2GiBxB,eAAOsB,WA3GxB,CAAvB;;;AAwHA,IAAMG,iBAAiB,OAAG1B,qBAAH,sUAEjB,qCAAoBe,+BAAmBY,OAAvC,EAAgD1B,eAAOkB,KAAvD,CAFiB,EAWjB,qCAAoBJ,+BAAmBY,OAAvC,EAAgD,SAAhD,CAXiB,CAAvB;;;AAiBO,IAAMC,YAAY,GAAGnC,0BAAOoC,IAAV,4MACd5B,eAAO6B,YADO,CAAlB;;;;AAQA,IAAMC,OAAO,GAAGtC,0BAAOC,GAAV,6WAIhBuB,oBAAYC,MAJI,CAAb;;;AAwBA,IAAMc,cAAc,GAAG,+BAAOD,OAAP,CAAH,0GAChB9B,eAAOgC,WADS,CAApB;;AAGA,IAAMC,YAAY,GAAG,+BAAOH,OAAP,CAAH,0GACd9B,eAAO6B,YADO,CAAlB;;AAGA,IAAMK,iBAAiB,GAAG,+BAAOJ,OAAP,CAAH,0GACnB9B,eAAOG,WADY,CAAvB;;;AAMA,IAAMgC,UAAU,GAAG3C,0BAAOC,GAAV,gHAAhB;;;AAIA,IAAM2C,iBAAiB,GAAG,+BAAOD,UAAP,CAAH,uIAAvB","sourcesContent":["import styled, { css } from 'styled-components';\nimport {BREAKPOINTS, COLORS, focusStyles} from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling } from '../styles/typography';\n\nexport const InputWrapper = styled.div<{ locked?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.locked || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n`;\n\nconst lockedState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeValidationMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.warning_400};\n`;\nconst activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\nconst activeCorrectInput = css`\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n`;\n\nconst InputFieldStyling = styled.input<{\n locked?: boolean;\n activeValidationMessage?: boolean;\n activeErrorMessage?: boolean;\n correctInput?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 16px !important;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\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\n color: ${COLORS.black} !important;\n\n ${(props) => (props.locked ? lockedState : '')}\n ${(props) => (props.activeValidationMessage ? activeValidationMessageState : '')}\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n ${(props) => (props.correctInput ? activeCorrectInput : '')}\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n \n &.focus-visible{\n ${focusStyles}\n }\n\n &.error {\n border-radius: 4px;\n border-style: solid;\n border-width: 2px;\n border-color: #e97116;\n padding: 0 15px !important;\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &.error {\n margin-bottom: 0 !important;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n \n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const RequiredStar = styled.span`\n color: ${COLORS.critical_500};\n font-size: 28px;\n line-height: 12px;\n font-weight: 700;\n position: relative;\n top: 10px;\n`;\nexport const Warning = styled.div`\n font-size: 12px;\n line-height: 140%;\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 14px;\n }\n\n &.small {\n font-size: 12px;\n }\n &.medium {\n font-size: 14px;\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const WarningMessage = styled(Warning)`\n color: ${COLORS.warning_500};\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"file":"styling.cjs"}