@ovotech/element-native 4.4.8 → 4.5.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 (558) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +2 -1
  2. package/dist/components/Accordion/Accordion.js +47 -116
  3. package/dist/components/Accordion/Group.d.ts +1 -1
  4. package/dist/components/Accordion/Group.js +12 -19
  5. package/dist/components/Accordion/Icon.js +20 -48
  6. package/dist/components/Accordion/index.js +3 -9
  7. package/dist/components/Accordion/styles.d.ts +95 -96
  8. package/dist/components/Accordion/styles.js +44 -59
  9. package/dist/components/Accordion/types.js +1 -2
  10. package/dist/components/ActionCard/ActionCard.d.ts +1 -1
  11. package/dist/components/ActionCard/ActionCard.js +59 -87
  12. package/dist/components/ActionCard/CloseIconShape.d.ts +1 -1
  13. package/dist/components/ActionCard/CloseIconShape.js +7 -41
  14. package/dist/components/ActionCard/IndicatorIconShape.d.ts +1 -1
  15. package/dist/components/ActionCard/IndicatorIconShape.js +7 -41
  16. package/dist/components/ActionCard/index.js +1 -5
  17. package/dist/components/ActionList/ActionList.d.ts +9 -7
  18. package/dist/components/ActionList/ActionList.js +22 -56
  19. package/dist/components/ActionList/index.js +1 -6
  20. package/dist/components/ActionList/styled.d.ts +228 -229
  21. package/dist/components/ActionList/styled.js +52 -60
  22. package/dist/components/Badge/Badge.d.ts +34 -34
  23. package/dist/components/Badge/Badge.js +27 -72
  24. package/dist/components/Badge/index.js +1 -5
  25. package/dist/components/CTAButton/CTAButton.d.ts +9 -11
  26. package/dist/components/CTAButton/CTAButton.js +62 -100
  27. package/dist/components/CTAButton/index.js +1 -8
  28. package/dist/components/CTALink/CTALink.d.ts +5 -8
  29. package/dist/components/CTALink/CTALink.js +6 -23
  30. package/dist/components/CTALink/index.js +1 -7
  31. package/dist/components/Card/Card.js +14 -43
  32. package/dist/components/Card/index.js +1 -5
  33. package/dist/components/Checkbox/Checkbox.d.ts +9 -7
  34. package/dist/components/Checkbox/Checkbox.js +50 -72
  35. package/dist/components/Checkbox/CheckboxField.js +16 -44
  36. package/dist/components/Checkbox/index.js +2 -7
  37. package/dist/components/CurrencyField/CurrencyField.d.ts +4 -11
  38. package/dist/components/CurrencyField/CurrencyField.js +5 -32
  39. package/dist/components/CurrencyField/index.js +1 -5
  40. package/dist/components/CurrencyInput/CurrencyInput.d.ts +4 -11
  41. package/dist/components/CurrencyInput/CurrencyInput.js +10 -36
  42. package/dist/components/CurrencyInput/index.js +1 -5
  43. package/dist/components/DataTable/DataTable.d.ts +1 -3
  44. package/dist/components/DataTable/DataTable.js +17 -44
  45. package/dist/components/DataTable/TableRow.js +15 -31
  46. package/dist/components/DataTable/index.js +3 -21
  47. package/dist/components/DataTable/styles.d.ts +404 -404
  48. package/dist/components/DataTable/styles.js +97 -84
  49. package/dist/components/DataTable/types.d.ts +1 -1
  50. package/dist/components/DataTable/types.js +1 -2
  51. package/dist/components/DateField/DateField.d.ts +8 -6
  52. package/dist/components/DateField/DateField.js +61 -82
  53. package/dist/components/DateField/index.js +1 -5
  54. package/dist/components/DescriptionList/DescriptionList.js +12 -44
  55. package/dist/components/DescriptionList/index.js +1 -6
  56. package/dist/components/DescriptionList/styled.d.ts +31 -31
  57. package/dist/components/DescriptionList/styled.js +34 -85
  58. package/dist/components/Disclosure/Disclosure.d.ts +574 -6
  59. package/dist/components/Disclosure/Disclosure.js +34 -79
  60. package/dist/components/Disclosure/index.js +1 -17
  61. package/dist/components/Display0/Display0.js +19 -69
  62. package/dist/components/Display0/index.js +1 -5
  63. package/dist/components/Display1/Display1.js +19 -69
  64. package/dist/components/Display1/index.js +1 -5
  65. package/dist/components/Display2/Display2.js +19 -69
  66. package/dist/components/Display2/index.js +1 -5
  67. package/dist/components/Display3/Display3.js +19 -69
  68. package/dist/components/Display3/index.js +1 -5
  69. package/dist/components/Divider/Divider.js +11 -41
  70. package/dist/components/Divider/index.js +1 -5
  71. package/dist/components/Em/Em.d.ts +31 -31
  72. package/dist/components/Em/Em.js +6 -13
  73. package/dist/components/Em/index.js +1 -5
  74. package/dist/components/EmailField/EmailField.d.ts +4 -9
  75. package/dist/components/EmailField/EmailField.js +5 -32
  76. package/dist/components/EmailField/index.js +1 -5
  77. package/dist/components/EmailInput/EmailInput.d.ts +2 -9
  78. package/dist/components/EmailInput/EmailInput.js +4 -19
  79. package/dist/components/EmailInput/index.js +1 -5
  80. package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +1 -1
  81. package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.js +14 -43
  82. package/dist/components/ErrorSummaryNotification/index.js +1 -5
  83. package/dist/components/ErrorText/ErrorText.d.ts +33 -35
  84. package/dist/components/ErrorText/ErrorText.js +15 -40
  85. package/dist/components/ErrorText/index.js +1 -5
  86. package/dist/components/Field/Field.d.ts +9 -8
  87. package/dist/components/Field/Field.js +25 -48
  88. package/dist/components/Field/index.js +1 -17
  89. package/dist/components/FilterSelect/FilterSelect.js +55 -76
  90. package/dist/components/FilterSelect/index.js +1 -5
  91. package/dist/components/FormGroup/FormGroup.js +8 -42
  92. package/dist/components/FormGroup/index.js +1 -5
  93. package/dist/components/Grid/Col.d.ts +33 -34
  94. package/dist/components/Grid/Col.js +24 -48
  95. package/dist/components/Grid/Row.d.ts +6 -572
  96. package/dist/components/Grid/Row.js +34 -72
  97. package/dist/components/Grid/index.d.ts +1 -1
  98. package/dist/components/Grid/index.js +2 -7
  99. package/dist/components/Heading1/Heading1.js +19 -69
  100. package/dist/components/Heading1/index.js +1 -5
  101. package/dist/components/Heading2/Heading2.js +19 -69
  102. package/dist/components/Heading2/index.js +1 -5
  103. package/dist/components/Heading3/Heading3.js +19 -69
  104. package/dist/components/Heading3/index.js +1 -5
  105. package/dist/components/Heading4/Heading4.js +19 -69
  106. package/dist/components/Heading4/index.js +1 -5
  107. package/dist/components/HintText/HintText.d.ts +33 -35
  108. package/dist/components/HintText/HintText.js +15 -40
  109. package/dist/components/HintText/index.js +1 -5
  110. package/dist/components/Icon/Icon.d.ts +0 -1
  111. package/dist/components/Icon/Icon.js +10 -37
  112. package/dist/components/Icon/index.js +1 -5
  113. package/dist/components/Input/Input.d.ts +3 -8
  114. package/dist/components/Input/Input.js +64 -86
  115. package/dist/components/Label/Label.d.ts +7 -6
  116. package/dist/components/Label/Label.js +10 -51
  117. package/dist/components/Label/index.js +1 -5
  118. package/dist/components/LabelText/LabelText.d.ts +33 -35
  119. package/dist/components/LabelText/LabelText.js +13 -40
  120. package/dist/components/LabelText/index.js +1 -5
  121. package/dist/components/Lead/Lead.d.ts +7 -6
  122. package/dist/components/Lead/Lead.js +12 -53
  123. package/dist/components/Lead/index.js +1 -5
  124. package/dist/components/LineThrough/LineThrough.d.ts +31 -31
  125. package/dist/components/LineThrough/LineThrough.js +4 -13
  126. package/dist/components/LineThrough/index.js +1 -5
  127. package/dist/components/List/List.d.ts +1 -1
  128. package/dist/components/List/List.js +21 -29
  129. package/dist/components/List/index.js +1 -7
  130. package/dist/components/List/styled.d.ts +126 -127
  131. package/dist/components/List/styled.js +32 -45
  132. package/dist/components/Margin/Margin.d.ts +31 -31
  133. package/dist/components/Margin/Margin.js +34 -50
  134. package/dist/components/Margin/index.js +1 -5
  135. package/dist/components/NavHeader/IconButton.js +10 -18
  136. package/dist/components/NavHeader/NavHeader.js +21 -49
  137. package/dist/components/NavHeader/NavHeader.styles.d.ts +283 -284
  138. package/dist/components/NavHeader/NavHeader.styles.js +82 -78
  139. package/dist/components/NavHeader/index.js +1 -5
  140. package/dist/components/Notification/Notification.d.ts +79 -77
  141. package/dist/components/Notification/Notification.js +69 -92
  142. package/dist/components/Notification/index.js +1 -9
  143. package/dist/components/NumberField/NumberField.d.ts +4 -9
  144. package/dist/components/NumberField/NumberField.js +5 -32
  145. package/dist/components/NumberField/index.js +1 -5
  146. package/dist/components/NumberInput/NumberInput.d.ts +2 -9
  147. package/dist/components/NumberInput/NumberInput.js +4 -19
  148. package/dist/components/NumberInput/index.js +1 -5
  149. package/dist/components/P/P.d.ts +8 -7
  150. package/dist/components/P/P.js +13 -54
  151. package/dist/components/P/index.js +1 -5
  152. package/dist/components/PasswordField/PasswordField.d.ts +6 -11
  153. package/dist/components/PasswordField/PasswordField.js +5 -32
  154. package/dist/components/PasswordField/index.js +1 -5
  155. package/dist/components/PasswordInput/PasswordInput.d.ts +5 -11
  156. package/dist/components/PasswordInput/PasswordInput.js +7 -34
  157. package/dist/components/PasswordInput/PasswordInput.styled.d.ts +31 -32
  158. package/dist/components/PasswordInput/PasswordInput.styled.js +13 -37
  159. package/dist/components/PasswordInput/PasswordVisibilityToggle.js +14 -20
  160. package/dist/components/PasswordInput/index.js +1 -5
  161. package/dist/components/PhoneField/PhoneField.d.ts +4 -9
  162. package/dist/components/PhoneField/PhoneField.js +5 -32
  163. package/dist/components/PhoneField/index.js +1 -5
  164. package/dist/components/PhoneInput/PhoneInput.d.ts +2 -9
  165. package/dist/components/PhoneInput/PhoneInput.js +3 -18
  166. package/dist/components/PhoneInput/index.js +1 -5
  167. package/dist/components/ProductCarousel/NavigationDots.js +32 -61
  168. package/dist/components/ProductCarousel/ProductCarousel.d.ts +1 -0
  169. package/dist/components/ProductCarousel/ProductCarousel.js +54 -101
  170. package/dist/components/ProductCarousel/anchor-point.d.ts +198 -1
  171. package/dist/components/ProductCarousel/anchor-point.js +11 -21
  172. package/dist/components/ProductCarousel/index.js +1 -5
  173. package/dist/components/Radio/Radio.d.ts +10 -8
  174. package/dist/components/Radio/Radio.js +45 -61
  175. package/dist/components/Radio/RadioField.js +20 -48
  176. package/dist/components/Radio/index.js +2 -7
  177. package/dist/components/RadioCard/RadioCard.d.ts +11 -8
  178. package/dist/components/RadioCard/RadioCard.js +50 -65
  179. package/dist/components/RadioCard/index.js +1 -5
  180. package/dist/components/SegmentedControls/SegmentedControls.d.ts +1 -0
  181. package/dist/components/SegmentedControls/SegmentedControls.js +37 -89
  182. package/dist/components/SegmentedControls/components/SegmentButton.d.ts +1 -0
  183. package/dist/components/SegmentedControls/components/SegmentButton.js +41 -82
  184. package/dist/components/SegmentedControls/index.js +2 -5
  185. package/dist/components/SelectField/Select.d.ts +31 -31
  186. package/dist/components/SelectField/Select.js +84 -87
  187. package/dist/components/SelectField/SelectField.js +4 -33
  188. package/dist/components/SelectField/index.js +1 -5
  189. package/dist/components/SkeletonAnimation/SkeletonAnimation.d.ts +2 -2
  190. package/dist/components/SkeletonAnimation/SkeletonAnimation.js +12 -17
  191. package/dist/components/SkeletonAnimation/index.js +1 -5
  192. package/dist/components/SkeletonCTA/SkeletonCTA.js +11 -42
  193. package/dist/components/SkeletonCTA/index.js +1 -5
  194. package/dist/components/SkeletonCircle/SkeletonCircle.js +12 -45
  195. package/dist/components/SkeletonCircle/index.js +1 -5
  196. package/dist/components/SkeletonHeading/SkeletonHeading.js +9 -41
  197. package/dist/components/SkeletonHeading/index.js +1 -5
  198. package/dist/components/SkeletonText/SkeletonText.js +22 -47
  199. package/dist/components/SkeletonText/index.js +1 -5
  200. package/dist/components/Small/Small.d.ts +33 -35
  201. package/dist/components/Small/Small.js +8 -39
  202. package/dist/components/Small/index.js +1 -5
  203. package/dist/components/Spinner/Spinner.js +35 -63
  204. package/dist/components/Spinner/index.js +1 -5
  205. package/dist/components/Stack/Stack.js +15 -47
  206. package/dist/components/Stack/index.js +1 -5
  207. package/dist/components/Stretch/Stretch.js +11 -54
  208. package/dist/components/Stretch/index.js +1 -17
  209. package/dist/components/Strong/Strong.d.ts +31 -31
  210. package/dist/components/Strong/Strong.js +4 -11
  211. package/dist/components/Strong/index.js +1 -5
  212. package/dist/components/SubLabelText/SubLabelText.d.ts +33 -35
  213. package/dist/components/SubLabelText/SubLabelText.js +13 -40
  214. package/dist/components/SubLabelText/index.js +1 -5
  215. package/dist/components/Tabs/Tab.d.ts +582 -10
  216. package/dist/components/Tabs/Tab.js +64 -76
  217. package/dist/components/Tabs/TabList.d.ts +0 -1
  218. package/dist/components/Tabs/TabList.js +20 -77
  219. package/dist/components/Tabs/TabPanel.js +12 -64
  220. package/dist/components/Tabs/Tabs.js +32 -89
  221. package/dist/components/Tabs/index.js +4 -11
  222. package/dist/components/TextField/TextField.d.ts +4 -9
  223. package/dist/components/TextField/TextField.js +5 -32
  224. package/dist/components/TextField/index.js +1 -5
  225. package/dist/components/TextGroup/TextGroup.js +16 -39
  226. package/dist/components/TextGroup/index.js +1 -5
  227. package/dist/components/TextInput/TextInput.d.ts +6 -8
  228. package/dist/components/TextInput/TextInput.js +4 -19
  229. package/dist/components/TextInput/index.js +1 -5
  230. package/dist/components/TextLink/TextLink.d.ts +6 -6
  231. package/dist/components/TextLink/TextLink.js +20 -74
  232. package/dist/components/TextLink/index.js +1 -5
  233. package/dist/components/TextareaField/TextareaField.d.ts +4 -11
  234. package/dist/components/TextareaField/TextareaField.js +5 -32
  235. package/dist/components/TextareaField/index.js +1 -5
  236. package/dist/components/TextareaInput/TextareaInput.d.ts +1 -11
  237. package/dist/components/TextareaInput/TextareaInput.js +13 -67
  238. package/dist/components/TextareaInput/index.js +1 -5
  239. package/dist/components/Toast/Toast.d.ts +5 -5
  240. package/dist/components/Toast/Toast.js +88 -131
  241. package/dist/components/Toast/index.js +1 -6
  242. package/dist/components/Toggle/Toggle.d.ts +10 -7
  243. package/dist/components/Toggle/Toggle.js +18 -49
  244. package/dist/components/Toggle/index.js +1 -5
  245. package/dist/components/Toggle/styles.d.ts +130 -130
  246. package/dist/components/Toggle/styles.js +32 -24
  247. package/dist/components/index.js +67 -83
  248. package/dist/esm/components/Accordion/Accordion.js +35 -76
  249. package/dist/esm/components/Accordion/Group.js +9 -12
  250. package/dist/esm/components/Accordion/Icon.js +12 -13
  251. package/dist/esm/components/Accordion/styles.js +42 -28
  252. package/dist/esm/components/ActionCard/ActionCard.js +48 -46
  253. package/dist/esm/components/ActionCard/CloseIconShape.js +4 -8
  254. package/dist/esm/components/ActionCard/IndicatorIconShape.js +4 -8
  255. package/dist/esm/components/ActionList/ActionList.js +17 -47
  256. package/dist/esm/components/ActionList/styled.js +48 -30
  257. package/dist/esm/components/Badge/Badge.js +24 -42
  258. package/dist/esm/components/CTAButton/CTAButton.js +56 -65
  259. package/dist/esm/components/CTALink/CTALink.js +3 -15
  260. package/dist/esm/components/Card/Card.js +10 -32
  261. package/dist/esm/components/Checkbox/Checkbox.js +39 -55
  262. package/dist/esm/components/Checkbox/CheckboxField.js +7 -32
  263. package/dist/esm/components/CurrencyField/CurrencyField.js +3 -27
  264. package/dist/esm/components/CurrencyInput/CurrencyInput.js +7 -30
  265. package/dist/esm/components/DataTable/DataTable.js +8 -32
  266. package/dist/esm/components/DataTable/TableRow.js +8 -20
  267. package/dist/esm/components/DataTable/styles.js +95 -56
  268. package/dist/esm/components/DateField/DateField.js +49 -44
  269. package/dist/esm/components/DescriptionList/DescriptionList.js +7 -35
  270. package/dist/esm/components/DescriptionList/styled.js +29 -52
  271. package/dist/esm/components/Disclosure/Disclosure.js +29 -48
  272. package/dist/esm/components/Display0/Display0.js +14 -37
  273. package/dist/esm/components/Display1/Display1.js +14 -37
  274. package/dist/esm/components/Display2/Display2.js +14 -37
  275. package/dist/esm/components/Display3/Display3.js +14 -37
  276. package/dist/esm/components/Divider/Divider.js +8 -11
  277. package/dist/esm/components/Em/Em.js +5 -6
  278. package/dist/esm/components/EmailField/EmailField.js +3 -27
  279. package/dist/esm/components/EmailInput/EmailInput.js +1 -13
  280. package/dist/esm/components/ErrorSummaryNotification/ErrorSummaryNotification.js +6 -32
  281. package/dist/esm/components/ErrorText/ErrorText.js +11 -10
  282. package/dist/esm/components/Field/Field.js +16 -36
  283. package/dist/esm/components/FilterSelect/FilterSelect.js +43 -37
  284. package/dist/esm/components/FormGroup/FormGroup.js +4 -32
  285. package/dist/esm/components/Grid/Col.js +20 -18
  286. package/dist/esm/components/Grid/Row.js +29 -41
  287. package/dist/esm/components/Grid/index.js +1 -1
  288. package/dist/esm/components/Heading1/Heading1.js +14 -37
  289. package/dist/esm/components/Heading2/Heading2.js +14 -37
  290. package/dist/esm/components/Heading3/Heading3.js +14 -37
  291. package/dist/esm/components/Heading4/Heading4.js +14 -37
  292. package/dist/esm/components/HintText/HintText.js +11 -10
  293. package/dist/esm/components/Icon/Icon.js +6 -29
  294. package/dist/esm/components/Input/Input.js +58 -54
  295. package/dist/esm/components/Label/Label.js +7 -22
  296. package/dist/esm/components/LabelText/LabelText.js +9 -10
  297. package/dist/esm/components/Lead/Lead.js +9 -24
  298. package/dist/esm/components/LineThrough/LineThrough.js +3 -6
  299. package/dist/esm/components/List/List.js +11 -14
  300. package/dist/esm/components/List/styled.js +30 -17
  301. package/dist/esm/components/Margin/Margin.js +26 -36
  302. package/dist/esm/components/NavHeader/IconButton.js +5 -9
  303. package/dist/esm/components/NavHeader/NavHeader.js +10 -11
  304. package/dist/esm/components/NavHeader/NavHeader.styles.js +79 -46
  305. package/dist/esm/components/Notification/Notification.js +63 -60
  306. package/dist/esm/components/NumberField/NumberField.js +3 -27
  307. package/dist/esm/components/NumberInput/NumberInput.js +1 -13
  308. package/dist/esm/components/P/P.js +10 -25
  309. package/dist/esm/components/PasswordField/PasswordField.js +3 -27
  310. package/dist/esm/components/PasswordInput/PasswordInput.js +4 -28
  311. package/dist/esm/components/PasswordInput/PasswordInput.styled.js +10 -8
  312. package/dist/esm/components/PasswordInput/PasswordVisibilityToggle.js +9 -10
  313. package/dist/esm/components/PhoneField/PhoneField.js +3 -27
  314. package/dist/esm/components/PhoneInput/PhoneInput.js +1 -13
  315. package/dist/esm/components/ProductCarousel/NavigationDots.js +28 -30
  316. package/dist/esm/components/ProductCarousel/ProductCarousel.js +40 -57
  317. package/dist/esm/components/ProductCarousel/anchor-point.js +11 -17
  318. package/dist/esm/components/Radio/Radio.js +38 -48
  319. package/dist/esm/components/Radio/RadioField.js +10 -35
  320. package/dist/esm/components/RadioCard/RadioCard.js +44 -53
  321. package/dist/esm/components/SegmentedControls/SegmentedControls.js +33 -58
  322. package/dist/esm/components/SegmentedControls/components/SegmentButton.js +33 -44
  323. package/dist/esm/components/SelectField/Select.js +76 -49
  324. package/dist/esm/components/SelectField/SelectField.js +1 -26
  325. package/dist/esm/components/SkeletonAnimation/SkeletonAnimation.js +4 -5
  326. package/dist/esm/components/SkeletonCTA/SkeletonCTA.js +6 -30
  327. package/dist/esm/components/SkeletonCircle/SkeletonCircle.js +8 -34
  328. package/dist/esm/components/SkeletonHeading/SkeletonHeading.js +5 -30
  329. package/dist/esm/components/SkeletonText/SkeletonText.js +15 -33
  330. package/dist/esm/components/Small/Small.js +5 -10
  331. package/dist/esm/components/Spinner/Spinner.js +30 -31
  332. package/dist/esm/components/Stack/Stack.js +7 -33
  333. package/dist/esm/components/Stretch/Stretch.js +8 -24
  334. package/dist/esm/components/Strong/Strong.js +3 -4
  335. package/dist/esm/components/SubLabelText/SubLabelText.js +9 -10
  336. package/dist/esm/components/Tabs/Tab.js +60 -46
  337. package/dist/esm/components/Tabs/TabList.js +15 -45
  338. package/dist/esm/components/Tabs/TabPanel.js +9 -34
  339. package/dist/esm/components/Tabs/Tabs.js +24 -54
  340. package/dist/esm/components/TextField/TextField.js +3 -27
  341. package/dist/esm/components/TextGroup/TextGroup.js +11 -30
  342. package/dist/esm/components/TextInput/TextInput.js +1 -13
  343. package/dist/esm/components/TextLink/TextLink.js +14 -42
  344. package/dist/esm/components/TextareaField/TextareaField.js +3 -27
  345. package/dist/esm/components/TextareaInput/TextareaInput.js +8 -36
  346. package/dist/esm/components/Toast/Toast.js +67 -82
  347. package/dist/esm/components/Toggle/Toggle.js +13 -41
  348. package/dist/esm/components/Toggle/styles.js +29 -15
  349. package/dist/esm/hooks/use-breakpoint.js +3 -3
  350. package/dist/esm/hooks/use-full-width.js +5 -6
  351. package/dist/esm/hooks/use-layout.js +6 -6
  352. package/dist/esm/providers/IconsProvider.js +9 -18
  353. package/dist/esm/providers/icons/Address.js +1 -12
  354. package/dist/esm/providers/icons/Advice.js +1 -12
  355. package/dist/esm/providers/icons/Archive.js +1 -12
  356. package/dist/esm/providers/icons/ArrowDown.js +1 -12
  357. package/dist/esm/providers/icons/ArrowLeft.js +1 -12
  358. package/dist/esm/providers/icons/ArrowRight.js +1 -12
  359. package/dist/esm/providers/icons/ArrowUp.js +1 -12
  360. package/dist/esm/providers/icons/Award.js +1 -12
  361. package/dist/esm/providers/icons/Battery.js +1 -12
  362. package/dist/esm/providers/icons/Cal.js +1 -12
  363. package/dist/esm/providers/icons/CalBook.js +1 -12
  364. package/dist/esm/providers/icons/CaretArrowDown.js +1 -12
  365. package/dist/esm/providers/icons/CaretArrowLeft.js +1 -12
  366. package/dist/esm/providers/icons/CaretArrowRight.js +1 -12
  367. package/dist/esm/providers/icons/CaretArrowUp.js +1 -12
  368. package/dist/esm/providers/icons/CaretDown.js +1 -12
  369. package/dist/esm/providers/icons/CaretLeft.js +1 -12
  370. package/dist/esm/providers/icons/CaretRight.js +1 -12
  371. package/dist/esm/providers/icons/CaretUp.js +1 -12
  372. package/dist/esm/providers/icons/Chart.js +1 -12
  373. package/dist/esm/providers/icons/ChartFilled.js +1 -12
  374. package/dist/esm/providers/icons/Check.js +1 -12
  375. package/dist/esm/providers/icons/CheckCircle.js +1 -12
  376. package/dist/esm/providers/icons/ChevronDown.js +1 -12
  377. package/dist/esm/providers/icons/ChevronLeft.js +1 -12
  378. package/dist/esm/providers/icons/ChevronLeftSmall.js +1 -12
  379. package/dist/esm/providers/icons/ChevronLeftSmallFirst.js +1 -12
  380. package/dist/esm/providers/icons/ChevronRight.js +1 -12
  381. package/dist/esm/providers/icons/ChevronRightSmall.js +1 -12
  382. package/dist/esm/providers/icons/ChevronRightSmallLast.js +1 -12
  383. package/dist/esm/providers/icons/ChevronUp.js +1 -12
  384. package/dist/esm/providers/icons/Circle.js +1 -12
  385. package/dist/esm/providers/icons/CloseCircle.js +1 -12
  386. package/dist/esm/providers/icons/Cross.js +1 -12
  387. package/dist/esm/providers/icons/Doc.js +1 -12
  388. package/dist/esm/providers/icons/Dollar.js +1 -12
  389. package/dist/esm/providers/icons/Download.js +1 -12
  390. package/dist/esm/providers/icons/Eco.js +1 -12
  391. package/dist/esm/providers/icons/EcoHome.js +1 -12
  392. package/dist/esm/providers/icons/Edit.js +1 -12
  393. package/dist/esm/providers/icons/ElectricCar.js +1 -12
  394. package/dist/esm/providers/icons/ElectricHome.js +1 -12
  395. package/dist/esm/providers/icons/Electricity.js +1 -12
  396. package/dist/esm/providers/icons/EnergyAdvice.js +1 -12
  397. package/dist/esm/providers/icons/Equals.js +1 -12
  398. package/dist/esm/providers/icons/Euro.js +1 -12
  399. package/dist/esm/providers/icons/Gas.js +1 -12
  400. package/dist/esm/providers/icons/GlobeAddress.js +1 -12
  401. package/dist/esm/providers/icons/Help.js +1 -12
  402. package/dist/esm/providers/icons/HelpFilled.js +1 -12
  403. package/dist/esm/providers/icons/Hide.js +1 -12
  404. package/dist/esm/providers/icons/Home.js +1 -12
  405. package/dist/esm/providers/icons/HomeFilled.js +1 -12
  406. package/dist/esm/providers/icons/HydroPower.js +1 -12
  407. package/dist/esm/providers/icons/Info.js +1 -12
  408. package/dist/esm/providers/icons/Link.js +1 -12
  409. package/dist/esm/providers/icons/Logo.js +1 -12
  410. package/dist/esm/providers/icons/Mail.js +1 -12
  411. package/dist/esm/providers/icons/MailOpen.js +1 -12
  412. package/dist/esm/providers/icons/Menu.js +1 -12
  413. package/dist/esm/providers/icons/Message.js +1 -12
  414. package/dist/esm/providers/icons/MessageFilled.js +1 -12
  415. package/dist/esm/providers/icons/Minus.js +1 -12
  416. package/dist/esm/providers/icons/Mobile.js +1 -12
  417. package/dist/esm/providers/icons/NewWindow.js +1 -12
  418. package/dist/esm/providers/icons/PaymentCard.js +1 -12
  419. package/dist/esm/providers/icons/PaymentCardFilled.js +1 -12
  420. package/dist/esm/providers/icons/Phone.js +1 -12
  421. package/dist/esm/providers/icons/Plus.js +1 -12
  422. package/dist/esm/providers/icons/Pound.js +1 -12
  423. package/dist/esm/providers/icons/Pricing.js +1 -12
  424. package/dist/esm/providers/icons/PricingFilled.js +1 -12
  425. package/dist/esm/providers/icons/Search.js +1 -12
  426. package/dist/esm/providers/icons/Security.js +1 -12
  427. package/dist/esm/providers/icons/Shop.js +1 -12
  428. package/dist/esm/providers/icons/ShopFilled.js +1 -12
  429. package/dist/esm/providers/icons/Show.js +1 -12
  430. package/dist/esm/providers/icons/SmartHome.js +1 -12
  431. package/dist/esm/providers/icons/SmartMeter.js +1 -12
  432. package/dist/esm/providers/icons/Solar.js +1 -12
  433. package/dist/esm/providers/icons/Star.js +1 -12
  434. package/dist/esm/providers/icons/StarFilled.js +1 -12
  435. package/dist/esm/providers/icons/Sun.js +1 -12
  436. package/dist/esm/providers/icons/Torch.js +1 -12
  437. package/dist/esm/providers/icons/Trees.js +1 -12
  438. package/dist/esm/providers/icons/Tune.js +1 -12
  439. package/dist/esm/providers/icons/User.js +1 -12
  440. package/dist/esm/providers/icons/UserFilled.js +1 -12
  441. package/dist/esm/providers/icons/Wallet.js +1 -12
  442. package/dist/esm/providers/icons/WalletFilled.js +1 -12
  443. package/dist/esm/providers/icons/WarmHome.js +1 -12
  444. package/dist/esm/providers/icons/Warning.js +1 -12
  445. package/dist/esm/providers/icons/WebAddress.js +1 -12
  446. package/dist/esm/providers/icons/WindPower.js +1 -12
  447. package/dist/esm/styled.native.js +1 -1
  448. package/dist/esm/utils/utils.js +23 -50
  449. package/dist/hooks/index.js +2 -18
  450. package/dist/hooks/use-breakpoint.js +6 -10
  451. package/dist/hooks/use-full-width.js +7 -12
  452. package/dist/hooks/use-layout.js +7 -11
  453. package/dist/index.js +3 -19
  454. package/dist/providers/IconsProvider.js +107 -121
  455. package/dist/providers/icons/Address.js +3 -41
  456. package/dist/providers/icons/Advice.js +3 -41
  457. package/dist/providers/icons/Archive.js +3 -41
  458. package/dist/providers/icons/ArrowDown.js +3 -41
  459. package/dist/providers/icons/ArrowLeft.js +3 -41
  460. package/dist/providers/icons/ArrowRight.js +3 -41
  461. package/dist/providers/icons/ArrowUp.js +3 -41
  462. package/dist/providers/icons/Award.js +3 -41
  463. package/dist/providers/icons/Battery.js +3 -41
  464. package/dist/providers/icons/Cal.js +3 -41
  465. package/dist/providers/icons/CalBook.js +3 -41
  466. package/dist/providers/icons/CaretArrowDown.js +3 -41
  467. package/dist/providers/icons/CaretArrowLeft.js +3 -41
  468. package/dist/providers/icons/CaretArrowRight.js +3 -41
  469. package/dist/providers/icons/CaretArrowUp.js +3 -41
  470. package/dist/providers/icons/CaretDown.js +3 -41
  471. package/dist/providers/icons/CaretLeft.js +3 -41
  472. package/dist/providers/icons/CaretRight.js +3 -41
  473. package/dist/providers/icons/CaretUp.js +3 -41
  474. package/dist/providers/icons/Chart.js +3 -41
  475. package/dist/providers/icons/ChartFilled.js +3 -41
  476. package/dist/providers/icons/Check.js +3 -41
  477. package/dist/providers/icons/CheckCircle.js +3 -41
  478. package/dist/providers/icons/ChevronDown.js +3 -41
  479. package/dist/providers/icons/ChevronLeft.js +3 -41
  480. package/dist/providers/icons/ChevronLeftSmall.js +3 -41
  481. package/dist/providers/icons/ChevronLeftSmallFirst.js +3 -41
  482. package/dist/providers/icons/ChevronRight.js +3 -41
  483. package/dist/providers/icons/ChevronRightSmall.js +3 -41
  484. package/dist/providers/icons/ChevronRightSmallLast.js +3 -41
  485. package/dist/providers/icons/ChevronUp.js +3 -41
  486. package/dist/providers/icons/Circle.js +3 -41
  487. package/dist/providers/icons/CloseCircle.js +3 -41
  488. package/dist/providers/icons/Cross.js +3 -41
  489. package/dist/providers/icons/Doc.js +3 -41
  490. package/dist/providers/icons/Dollar.js +3 -41
  491. package/dist/providers/icons/Download.js +3 -41
  492. package/dist/providers/icons/Eco.js +3 -41
  493. package/dist/providers/icons/EcoHome.js +3 -41
  494. package/dist/providers/icons/Edit.js +3 -41
  495. package/dist/providers/icons/ElectricCar.js +3 -41
  496. package/dist/providers/icons/ElectricHome.js +3 -41
  497. package/dist/providers/icons/Electricity.js +3 -41
  498. package/dist/providers/icons/EnergyAdvice.js +3 -41
  499. package/dist/providers/icons/Equals.js +3 -41
  500. package/dist/providers/icons/Euro.js +3 -41
  501. package/dist/providers/icons/Gas.js +3 -41
  502. package/dist/providers/icons/GlobeAddress.js +3 -41
  503. package/dist/providers/icons/Help.js +3 -41
  504. package/dist/providers/icons/HelpFilled.js +3 -41
  505. package/dist/providers/icons/Hide.js +3 -41
  506. package/dist/providers/icons/Home.js +3 -41
  507. package/dist/providers/icons/HomeFilled.js +3 -41
  508. package/dist/providers/icons/HydroPower.js +3 -41
  509. package/dist/providers/icons/Info.js +3 -41
  510. package/dist/providers/icons/Link.js +3 -41
  511. package/dist/providers/icons/Logo.js +3 -41
  512. package/dist/providers/icons/Mail.js +3 -41
  513. package/dist/providers/icons/MailOpen.js +3 -41
  514. package/dist/providers/icons/Menu.js +3 -41
  515. package/dist/providers/icons/Message.js +3 -41
  516. package/dist/providers/icons/MessageFilled.js +3 -41
  517. package/dist/providers/icons/Minus.js +3 -41
  518. package/dist/providers/icons/Mobile.js +3 -41
  519. package/dist/providers/icons/NewWindow.js +3 -41
  520. package/dist/providers/icons/PaymentCard.js +3 -41
  521. package/dist/providers/icons/PaymentCardFilled.js +3 -41
  522. package/dist/providers/icons/Phone.js +3 -41
  523. package/dist/providers/icons/Plus.js +3 -41
  524. package/dist/providers/icons/Pound.js +3 -41
  525. package/dist/providers/icons/Pricing.js +3 -41
  526. package/dist/providers/icons/PricingFilled.js +3 -41
  527. package/dist/providers/icons/Search.js +3 -41
  528. package/dist/providers/icons/Security.js +3 -41
  529. package/dist/providers/icons/Shop.js +3 -41
  530. package/dist/providers/icons/ShopFilled.js +3 -41
  531. package/dist/providers/icons/Show.js +3 -41
  532. package/dist/providers/icons/SmartHome.js +3 -41
  533. package/dist/providers/icons/SmartMeter.js +3 -41
  534. package/dist/providers/icons/Solar.js +3 -41
  535. package/dist/providers/icons/Star.js +3 -41
  536. package/dist/providers/icons/StarFilled.js +3 -41
  537. package/dist/providers/icons/Sun.js +3 -41
  538. package/dist/providers/icons/Torch.js +3 -41
  539. package/dist/providers/icons/Trees.js +3 -41
  540. package/dist/providers/icons/Tune.js +3 -41
  541. package/dist/providers/icons/User.js +3 -41
  542. package/dist/providers/icons/UserFilled.js +3 -41
  543. package/dist/providers/icons/Wallet.js +3 -41
  544. package/dist/providers/icons/WalletFilled.js +3 -41
  545. package/dist/providers/icons/WarmHome.js +3 -41
  546. package/dist/providers/icons/Warning.js +3 -41
  547. package/dist/providers/icons/WebAddress.js +3 -41
  548. package/dist/providers/icons/WindPower.js +3 -41
  549. package/dist/providers/icons/index.js +93 -109
  550. package/dist/providers/index.js +2 -18
  551. package/dist/providers/types.js +1 -2
  552. package/dist/styled.native.d.ts +186 -188
  553. package/dist/styled.native.js +4 -33
  554. package/dist/theme/index.js +1 -17
  555. package/dist/utils/index.js +1 -17
  556. package/dist/utils/utils.d.ts +3 -3
  557. package/dist/utils/utils.js +27 -64
  558. package/package.json +37 -34
@@ -1,49 +1,82 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { numToPx } from '@ovotech/element-core';
6
2
  import Animated from 'react-native-reanimated';
7
3
  import styled, { css } from '../../styled.native';
8
- var Z_INDEX = 1000;
9
- export var NavWrapper = styled(Animated.View)(function (_a) {
10
- var _b = _a.theme, semantic = _b.semantic, core = _b.core, collapsed = _a.collapsed;
11
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n position: absolute;\n\n /* yes, it is not a good move, but we want header to be the topmost element on the screen and we can't control app zIndex */\n z-index: ", ";\n background-color: ", ";\n\n ", "\n "], ["\n width: 100%;\n position: absolute;\n\n /* yes, it is not a good move, but we want header to be the topmost element on the screen and we can't control app zIndex */\n z-index: ", ";\n background-color: ", ";\n\n ", "\n "])), Z_INDEX, semantic.surface.base, collapsed
12
- ? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-bottom-width: ", ";\n border-bottom-style: solid;\n border-bottom-color: ", ";\n "], ["\n border-bottom-width: ", ";\n border-bottom-style: solid;\n border-bottom-color: ", ";\n "])), numToPx(core.borderWidth.small), semantic.border.differentiated) : '');
13
- });
14
- export var NavContainer = styled.View(function (_a) {
15
- var core = _a.theme.core, topOffset = _a.topOffset, titleVisible = _a.titleVisible;
16
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), Z_INDEX + 1, titleVisible ? '100%' : '50%', topOffset
17
- ? topOffset
18
- : numToPx(core.space[titleVisible ? 2 : 4]), numToPx(core.space[titleVisible ? 2 : 4]), numToPx(core.space[4]), numToPx(core.space[4]));
19
- });
20
- export var ExpandedTitle = styled(Animated.Text)(function (_a) {
21
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBackButton = _a.hasBackButton, fullWidth = _a.fullWidth, titleVisible = _a.titleVisible;
22
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n ", ";\n "], ["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n ", ";\n "])), fullWidth ? '100%' : '65%', core.fontFamily.heading.native, numToPx(core.fontSize.heading1[hasBackButton ? 'small' : 'large']), numToPx(hasBackButton ? core.lineHeight.heading1.small : core.space[13]), semantic.message.branded, !titleVisible && 'height: 0;');
23
- });
24
- export var CollapsedTitleWrapper = styled(Animated.View)(function (_a) {
25
- var titleVisible = _a.titleVisible;
26
- return "\n width: ".concat(titleVisible ? '33.3%' : '0', ";\n align-items: center;\n justify-content: center;\n");
27
- });
28
- export var CollapsedTitle = styled(Animated.Text)(function (_a) {
29
- var _b = _a.theme, core = _b.core, semantic = _b.semantic;
30
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.heading.native, numToPx(core.fontSize.heading4.small), numToPx(core.lineHeight.heading4.small), semantic.message.branded);
31
- });
32
- export var IconButtonWrapper = styled.View(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 33.3%;\n flex-direction: row;\n justify-content: flex-end;\n"], ["\n width: 33.3%;\n flex-direction: row;\n justify-content: flex-end;\n"])));
33
- var iconButtonSharedStyles = css(function (_a) {
34
- var semantic = _a.theme.semantic;
35
- return "\n border-radius: 100px;\n background-color: ".concat(semantic.inverted.surface, ";\n align-items: center;\n justify-content: center;\n");
36
- });
37
- export var StyledIconButtonS = styled(Animated.View)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 28px;\n height: 28px;\n opacity: ", ";\n ", ";\n"], ["\n width: 28px;\n height: 28px;\n opacity: ", ";\n ", ";\n"])), function (_a) {
38
- var $pressed = _a.$pressed;
39
- return ($pressed ? 0.8 : 1);
40
- }, iconButtonSharedStyles);
41
- export var StyledIconButtonL = styled(Animated.View)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n width: 36px;\n height: 36px;\n opacity: ", ";\n ", ";\n"], ["\n width: 36px;\n height: 36px;\n opacity: ", ";\n ", ";\n"])), function (_a) {
42
- var $pressed = _a.$pressed;
43
- return ($pressed ? 0.8 : 1);
44
- }, iconButtonSharedStyles);
45
- export var ActionWrapper = styled.View(function (_a) {
46
- var core = _a.theme.core, collapsed = _a.collapsed;
47
- return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n margin-bottom: ", ";\n "], ["\n margin-bottom: ", ";\n "])), collapsed ? '0' : numToPx(core.space[2]));
48
- });
49
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
4
+ const Z_INDEX = 1000;
5
+ export const NavWrapper = styled(Animated.View)(({ theme: { semantic, core }, collapsed }) => css `
6
+ width: 100%;
7
+ position: absolute;
8
+
9
+ /* yes, it is not a good move, but we want header to be the topmost element on the screen and we can't control app zIndex */
10
+ z-index: ${Z_INDEX};
11
+ background-color: ${semantic.surface.base};
12
+
13
+ ${collapsed
14
+ ? css `
15
+ border-bottom-width: ${numToPx(core.borderWidth.small)};
16
+ border-bottom-style: solid;
17
+ border-bottom-color: ${semantic.border.differentiated};
18
+ `
19
+ : ''}
20
+ `);
21
+ export const NavContainer = styled.View(({ theme: { core }, topOffset, titleVisible }) => css `
22
+ position: absolute;
23
+
24
+ /* NavWrapper zIndex + 1 so it is always on top of the wrapper */
25
+ z-index: ${Z_INDEX + 1};
26
+ width: ${titleVisible ? '100%' : '50%'};
27
+ flex-direction: row;
28
+ justify-content: space-between;
29
+ align-items: center;
30
+ flex-wrap: wrap;
31
+ padding-top: ${topOffset
32
+ ? topOffset
33
+ : numToPx(core.space[titleVisible ? 2 : 4])};
34
+ padding-bottom: ${numToPx(core.space[titleVisible ? 2 : 4])};
35
+ padding-left: ${numToPx(core.space[4])};
36
+ padding-right: ${numToPx(core.space[4])};
37
+ `);
38
+ export const ExpandedTitle = styled(Animated.Text)(({ theme: { core, semantic }, hasBackButton, fullWidth, titleVisible, }) => css `
39
+ width: ${fullWidth ? '100%' : '65%'};
40
+ font-family: ${core.fontFamily.heading.native};
41
+ font-size: ${numToPx(core.fontSize.heading1[hasBackButton ? 'small' : 'large'])};
42
+ line-height: ${numToPx(hasBackButton ? core.lineHeight.heading1.small : core.space[13])};
43
+ color: ${semantic.message.branded};
44
+ ${!titleVisible && 'height: 0;'};
45
+ `);
46
+ export const CollapsedTitleWrapper = styled(Animated.View)(({ titleVisible }) => `
47
+ width: ${titleVisible ? '33.3%' : '0'};
48
+ align-items: center;
49
+ justify-content: center;
50
+ `);
51
+ export const CollapsedTitle = styled(Animated.Text)(({ theme: { core, semantic } }) => css `
52
+ font-family: ${core.fontFamily.heading.native};
53
+ font-size: ${numToPx(core.fontSize.heading4.small)};
54
+ line-height: ${numToPx(core.lineHeight.heading4.small)};
55
+ color: ${semantic.message.branded};
56
+ `);
57
+ export const IconButtonWrapper = styled.View `
58
+ width: 33.3%;
59
+ flex-direction: row;
60
+ justify-content: flex-end;
61
+ `;
62
+ const iconButtonSharedStyles = css(({ theme: { semantic } }) => `
63
+ border-radius: 100px;
64
+ background-color: ${semantic.inverted.surface};
65
+ align-items: center;
66
+ justify-content: center;
67
+ `);
68
+ export const StyledIconButtonS = styled(Animated.View) `
69
+ width: 28px;
70
+ height: 28px;
71
+ opacity: ${({ $pressed }) => ($pressed ? 0.8 : 1)};
72
+ ${iconButtonSharedStyles};
73
+ `;
74
+ export const StyledIconButtonL = styled(Animated.View) `
75
+ width: 36px;
76
+ height: 36px;
77
+ opacity: ${({ $pressed }) => ($pressed ? 0.8 : 1)};
78
+ ${iconButtonSharedStyles};
79
+ `;
80
+ export const ActionWrapper = styled.View(({ theme: { core }, collapsed }) => css `
81
+ margin-bottom: ${collapsed ? '0' : numToPx(core.space[2])};
82
+ `);
@@ -1,78 +1,81 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- var __assign = (this && this.__assign) || function () {
6
- __assign = Object.assign || function(t) {
7
- for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
- t[p] = s[p];
11
- }
12
- return t;
13
- };
14
- return __assign.apply(this, arguments);
15
- };
16
- var __rest = (this && this.__rest) || function (s, e) {
17
- var t = {};
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
- t[p] = s[p];
20
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
- t[p[i]] = s[p[i]];
24
- }
25
- return t;
26
- };
27
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
2
  import { numToPx } from '@ovotech/element-core';
29
- import { forwardRef, useState } from 'react';
3
+ import { useState } from 'react';
30
4
  import { View } from 'react-native';
31
5
  import styled, { css } from '../../styled.native';
32
6
  import { Icon } from '../Icon';
33
- var NotificationBox = styled.View(function (_a) {
34
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, noMargin = _a.noMargin;
35
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n margin-bottom: ", ";\n border: ", " solid\n ", ";\n border-radius: ", ";\n overflow: hidden;\n "], ["\n position: relative;\n margin-bottom: ", ";\n border: ", " solid\n ", ";\n border-radius: ", ";\n overflow: hidden;\n "])), noMargin ? 0 : numToPx(core.space[4]), numToPx(core.borderWidth.small), semantic.surface.elevated, numToPx(core.radius.max));
7
+ const NotificationBox = styled.View(({ theme: { core, semantic }, noMargin }) => {
8
+ return css `
9
+ position: relative;
10
+ margin-bottom: ${noMargin ? 0 : numToPx(core.space[4])};
11
+ border: ${numToPx(core.borderWidth.small)} solid
12
+ ${semantic.surface.elevated};
13
+ border-radius: ${numToPx(core.radius.max)};
14
+ overflow: hidden;
15
+ `;
36
16
  });
37
- export var NotificationContentBox = styled.View(function (_a) {
38
- var _b = _a.theme, core = _b.core, semantic = _b.semantic;
39
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), semantic.surface.elevated, numToPx(core.space[2]), numToPx(core.space[3]), numToPx(core.space[4]), numToPx(core.space[4]));
17
+ export const NotificationContentBox = styled.View(({ theme: { core, semantic } }) => {
18
+ return css `
19
+ background-color: ${semantic.surface.elevated};
20
+ padding-top: ${numToPx(core.space[2])};
21
+ padding-bottom: ${numToPx(core.space[3])};
22
+ padding-left: ${numToPx(core.space[4])};
23
+ padding-right: ${numToPx(core.space[4])};
24
+ `;
40
25
  });
41
- export var NotificationTitleBox = styled.View(function (_a) {
42
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, variant = _a.variant, dismissible = _a.dismissible;
43
- var currentVariant = semantic[variant];
44
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n min-height: 44px;\n "], ["\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n min-height: 44px;\n "])), currentVariant.surface, numToPx(core.space[2]), numToPx(core.space[2]), numToPx(core.space[4]), dismissible
26
+ export const NotificationTitleBox = styled.View(({ theme: { core, semantic }, variant, dismissible }) => {
27
+ const currentVariant = semantic[variant];
28
+ return css `
29
+ flex-direction: row;
30
+ align-items: center;
31
+ justify-content: space-between;
32
+ background-color: ${currentVariant.surface};
33
+ padding-top: ${numToPx(core.space[2])};
34
+ padding-bottom: ${numToPx(core.space[2])};
35
+ padding-left: ${numToPx(core.space[4])};
36
+ padding-right: ${dismissible
45
37
  ? numToPx(core.space[3])
46
- : numToPx(core.space[4]));
38
+ : numToPx(core.space[4])};
39
+ min-height: 44px;
40
+ `;
47
41
  });
48
- var NotificationTitleText = styled.Text(function (_a) {
49
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, variant = _a.variant;
50
- var currentVariant = semantic[variant];
51
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: ", ";\n font-family: ", ";\n color: ", ";\n "], ["\n font-size: ", ";\n font-family: ", ";\n color: ", ";\n "])), numToPx(core.fontSize.body.small), core.fontFamily.bodyBold.native, currentVariant.message);
42
+ const NotificationTitleText = styled.Text(({ theme: { core, semantic }, variant }) => {
43
+ const currentVariant = semantic[variant];
44
+ return css `
45
+ font-size: ${numToPx(core.fontSize.body.small)};
46
+ font-family: ${core.fontFamily.bodyBold.native};
47
+ color: ${currentVariant.message};
48
+ `;
52
49
  });
53
- var DismissButton = styled.TouchableOpacity(function (_a) {
54
- var _b = _a.theme, core = _b.core, semantic = _b.semantic;
55
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n background: ", ";\n border: ", " solid\n ", ";\n border-radius: ", ";\n "], ["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n background: ", ";\n border: ", " solid\n ", ";\n border-radius: ", ";\n "])), semantic.inverted.surface, numToPx(core.borderWidth.small), core.color.brand.forest, numToPx(core.radius.max));
50
+ const DismissButton = styled.TouchableOpacity(({ theme: { core, semantic } }) => {
51
+ return css `
52
+ display: flex;
53
+ justify-content: center;
54
+ align-items: center;
55
+ width: 28px;
56
+ height: 28px;
57
+ background: ${semantic.inverted.surface};
58
+ border: ${numToPx(core.borderWidth.small)} solid
59
+ ${core.color.brand.forest};
60
+ border-radius: ${numToPx(core.radius.max)};
61
+ `;
56
62
  });
57
- var StyledIcon = styled(Icon)(function (_a) {
58
- var semantic = _a.theme.semantic;
59
- return "\n color: ".concat(semantic.inverted.message.base, ";\n ");
60
- });
61
- export var Notification = forwardRef(function (_a, ref) {
62
- var _b = _a.variant, variant = _b === void 0 ? 'neutral' : _b, children = _a.children, title = _a.title, noMargin = _a.noMargin, dismissible = _a.dismissible, onDismiss = _a.onDismiss, rest = __rest(_a, ["variant", "children", "title", "noMargin", "dismissible", "onDismiss"]);
63
- var _c = useState(false), dismissed = _c[0], setDismissed = _c[1];
63
+ const StyledIcon = styled(Icon)(({ theme: { semantic } }) => `
64
+ color: ${semantic.inverted.message.base};
65
+ `);
66
+ export const Notification = ({ variant = 'neutral', children, title, noMargin, dismissible, onDismiss, ref, ...rest }) => {
67
+ const [dismissed, setDismissed] = useState(false);
64
68
  if (dismissed || (!title && !children)) {
65
69
  return null;
66
70
  }
67
- return (_jsx(View, __assign({ ref: ref }, rest, { children: _jsxs(NotificationBox, { noMargin: noMargin, testID: "nb-notification", children: [_jsxs(NotificationTitleBox, { variant: variant, dismissible: dismissible, children: [_jsx(NotificationTitleText, { variant: variant, children: title }), dismissible ? (_jsx(DismissButton, { accessible: true, accessibilityLabel: "Dismiss", testID: "nb-notification-dismiss", onPress: function () {
71
+ return (_jsx(View, { ref: ref, ...rest, children: _jsxs(NotificationBox, { noMargin: noMargin, testID: "nb-notification", children: [_jsxs(NotificationTitleBox, { variant: variant, dismissible: dismissible, children: [_jsx(NotificationTitleText, { variant: variant, children: title }), dismissible ? (_jsx(DismissButton, { accessible: true, accessibilityLabel: "Dismiss", testID: "nb-notification-dismiss", onPress: () => {
68
72
  setDismissed(true);
69
73
  if (onDismiss) {
70
74
  onDismiss();
71
75
  }
72
- }, children: _jsx(StyledIcon, { name: "cross", size: "16" }) })) : null] }), children ? (_jsx(NotificationContentBox, { "data-testid": "el-notification-box", children: children })) : null] }) })));
73
- });
74
- export var ErrorNotification = forwardRef(function (props, ref) { return _jsx(Notification, __assign({ ref: ref, variant: "error" }, props)); });
75
- export var SuccessNotification = forwardRef(function (props, ref) { return (_jsx(Notification, __assign({ ref: ref, variant: "success" }, props))); });
76
- export var InfoNotification = forwardRef(function (props, ref) { return _jsx(Notification, __assign({ ref: ref, variant: "info" }, props)); });
77
- export var WarningNotification = forwardRef(function (props, ref) { return _jsx(Notification, __assign({ ref: ref, variant: "warning" }, props)); });
78
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
76
+ }, children: _jsx(StyledIcon, { name: "cross", size: "16" }) })) : null] }), children ? (_jsx(NotificationContentBox, { "data-testid": "el-notification-box", children: children })) : null] }) }));
77
+ };
78
+ export const ErrorNotification = (props) => (_jsx(Notification, { variant: "error", ...props }));
79
+ export const SuccessNotification = (props) => (_jsx(Notification, { variant: "success", ...props }));
80
+ export const InfoNotification = (props) => (_jsx(Notification, { variant: "info", ...props }));
81
+ export const WarningNotification = (props) => (_jsx(Notification, { variant: "warning", ...props }));
@@ -1,30 +1,6 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  import { jsx as _jsx } from "react/jsx-runtime";
24
- import { forwardRef } from 'react';
25
2
  import { Field } from '../Field';
26
3
  import { NumberInput } from '../NumberInput';
27
- export var NumberField = forwardRef(function (_a, ref) {
28
- var rest = __rest(_a, []);
29
- return (_jsx(Field, __assign({}, rest, { ref: ref, children: _jsx(NumberInput, {}) })));
30
- });
4
+ export const NumberField = ({ ref, ...rest }) => {
5
+ return (_jsx(Field, { ...rest, children: _jsx(NumberInput, { ref: ref }) }));
6
+ };
@@ -1,16 +1,4 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { forwardRef } from 'react';
14
2
  import { Input } from '../Input/Input';
15
- var NumberInput = forwardRef(function (props, ref) { return (_jsx(Input, __assign({}, props, { keyboardType: "numeric", autoCapitalize: "none", autoCorrect: false, ref: ref }))); });
3
+ const NumberInput = (props) => (_jsx(Input, { keyboardType: "numeric", autoCapitalize: "none", autoCorrect: false, ...props }));
16
4
  export { NumberInput };
@@ -1,29 +1,14 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- var __assign = (this && this.__assign) || function () {
6
- __assign = Object.assign || function(t) {
7
- for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
- t[p] = s[p];
11
- }
12
- return t;
13
- };
14
- return __assign.apply(this, arguments);
15
- };
16
1
  import { jsx as _jsx } from "react/jsx-runtime";
17
2
  import { numToPx } from '@ovotech/element-core';
18
- import { forwardRef } from 'react';
19
3
  import { useBreakpoint } from '../../hooks';
20
4
  import styled, { css } from '../../styled.native';
21
- var StyledP = styled.Text(function (_a) {
22
- var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
23
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, numToPx(core.fontSize.body[smallAndUp ? 'large' : 'small']), numToPx(core.lineHeight.body[smallAndUp ? 'large' : 'small']), inverted ? semantic.inverted.message.base : semantic.message.base);
24
- });
25
- export var P = forwardRef(function (props, ref) {
26
- var breakpoints = useBreakpoint();
27
- return _jsx(StyledP, __assign({}, props, breakpoints, { ref: ref }));
28
- });
29
- var templateObject_1;
5
+ const StyledP = styled.Text(({ theme: { core, semantic }, smallAndUp, inverted }) => css `
6
+ font-family: ${core.fontFamily.body.native};
7
+ font-size: ${numToPx(core.fontSize.body[smallAndUp ? 'large' : 'small'])};
8
+ line-height: ${numToPx(core.lineHeight.body[smallAndUp ? 'large' : 'small'])};
9
+ color: ${inverted ? semantic.inverted.message.base : semantic.message.base};
10
+ `);
11
+ export const P = (props) => {
12
+ const breakpoints = useBreakpoint();
13
+ return _jsx(StyledP, { ...props, ...breakpoints });
14
+ };
@@ -1,30 +1,6 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  import { jsx as _jsx } from "react/jsx-runtime";
24
- import { forwardRef } from 'react';
25
2
  import { Field } from '../Field';
26
3
  import { PasswordInput } from '../PasswordInput';
27
- export var PasswordField = forwardRef(function (_a, ref) {
28
- var hasVisibilityToggle = _a.hasVisibilityToggle, rest = __rest(_a, ["hasVisibilityToggle"]);
29
- return (_jsx(Field, __assign({}, rest, { ref: ref, children: _jsx(PasswordInput, { hasVisibilityToggle: hasVisibilityToggle }) })));
30
- });
4
+ export const PasswordField = ({ hasVisibilityToggle, ref, ...rest }) => {
5
+ return (_jsx(Field, { ...rest, children: _jsx(PasswordInput, { hasVisibilityToggle: hasVisibilityToggle, ref: ref }) }));
6
+ };
@@ -1,32 +1,8 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  import { jsx as _jsx } from "react/jsx-runtime";
24
- import { forwardRef } from 'react';
25
2
  import { Input } from '../Input/Input';
26
3
  import { PasswordVisibilityToggle, useTogglePasswordVisibility, } from './PasswordVisibilityToggle';
27
- var PasswordInput = forwardRef(function (_a, ref) {
28
- var props = __rest(_a, []);
29
- var _b = useTogglePasswordVisibility(), isPasswordVisible = _b.isPasswordVisible, handlePasswordVisibility = _b.handlePasswordVisibility;
30
- return (_jsx(Input, __assign({}, props, { rightSlot: props.hasVisibilityToggle ? (_jsx(PasswordVisibilityToggle, { iconName: isPasswordVisible ? 'hide' : 'show', visibilityToggleLabel: isPasswordVisible ? 'Hide password' : 'Show password', handlePasswordVisibility: handlePasswordVisibility })) : null, keyboardType: "default", autoCapitalize: "none", autoCorrect: false, blurOnSubmit: false, secureTextEntry: !isPasswordVisible, ref: ref })));
31
- });
4
+ const PasswordInput = ({ hasVisibilityToggle, ...props }) => {
5
+ const { isPasswordVisible, handlePasswordVisibility } = useTogglePasswordVisibility();
6
+ return (_jsx(Input, { rightSlot: hasVisibilityToggle ? (_jsx(PasswordVisibilityToggle, { iconName: isPasswordVisible ? 'hide' : 'show', visibilityToggleLabel: isPasswordVisible ? 'Hide password' : 'Show password', handlePasswordVisibility: handlePasswordVisibility })) : null, keyboardType: "default", autoCapitalize: "none", autoCorrect: false, blurOnSubmit: false, secureTextEntry: !isPasswordVisible, ...props }));
7
+ };
32
8
  export { PasswordInput };
@@ -1,12 +1,14 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { numToPx } from '@ovotech/element-core';
6
2
  import { Pressable } from 'react-native';
7
3
  import styled, { css } from '../../styled.native';
8
- export var StyledPressable = styled(Pressable)(function (_a) {
9
- var core = _a.theme.core, focused = _a.focused;
10
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n position: absolute;\n width: ", ";\n z-index: 1;\n top: ", ";\n right: ", ";\n "], ["\n display: flex;\n align-items: center;\n position: absolute;\n width: ", ";\n z-index: 1;\n top: ", ";\n right: ", ";\n "])), numToPx(core.space[4]), focused ? '16px' : '14px', numToPx(core.space[3]));
4
+ export const StyledPressable = styled(Pressable)(({ theme: { core }, focused, }) => {
5
+ return css `
6
+ display: flex;
7
+ align-items: center;
8
+ position: absolute;
9
+ width: ${numToPx(core.space[4])};
10
+ z-index: 1;
11
+ top: ${focused ? '16px' : '14px'};
12
+ right: ${numToPx(core.space[3])};
13
+ `;
11
14
  });
12
- var templateObject_1;
@@ -2,22 +2,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { Icon } from '../Icon';
4
4
  import { StyledPressable } from './PasswordInput.styled';
5
- export var useTogglePasswordVisibility = function () {
6
- var _a = useState(false), isPasswordVisible = _a[0], setIsPasswordVisible = _a[1];
7
- var handlePasswordVisibility = function () {
5
+ export const useTogglePasswordVisibility = () => {
6
+ const [isPasswordVisible, setIsPasswordVisible] = useState(false);
7
+ const handlePasswordVisibility = () => {
8
8
  setIsPasswordVisible(!isPasswordVisible);
9
9
  };
10
10
  return {
11
- isPasswordVisible: isPasswordVisible,
12
- handlePasswordVisibility: handlePasswordVisibility,
11
+ isPasswordVisible,
12
+ handlePasswordVisibility,
13
13
  };
14
14
  };
15
- export var PasswordVisibilityToggle = function (_a) {
16
- var iconName = _a.iconName, visibilityToggleLabel = _a.visibilityToggleLabel, handlePasswordVisibility = _a.handlePasswordVisibility;
17
- var _b = useState(false), focused = _b[0], setFocused = _b[1];
18
- return (_jsx(StyledPressable, { testID: "password-input-visibility-toggle", focused: focused, accessible: true, accessibilityRole: "button", accessibilityLabel: visibilityToggleLabel, onPress: handlePasswordVisibility, hitSlop: 16, onFocus: function () {
15
+ export const PasswordVisibilityToggle = ({ iconName, visibilityToggleLabel, handlePasswordVisibility, }) => {
16
+ const [focused, setFocused] = useState(false);
17
+ return (_jsx(StyledPressable, { testID: "password-input-visibility-toggle", focused: focused, accessible: true, accessibilityRole: "button", accessibilityLabel: visibilityToggleLabel, onPress: handlePasswordVisibility, hitSlop: 16, onFocus: () => {
19
18
  setFocused(true);
20
- }, onBlur: function () {
19
+ }, onBlur: () => {
21
20
  setFocused(false);
22
21
  }, children: _jsx(Icon, { name: iconName, size: 16, pointerEvents: "none" }) }));
23
22
  };
@@ -1,30 +1,6 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  import { jsx as _jsx } from "react/jsx-runtime";
24
- import { forwardRef } from 'react';
25
2
  import { Field } from '../Field';
26
3
  import { PhoneInput } from '../PhoneInput';
27
- export var PhoneField = forwardRef(function (_a, ref) {
28
- var rest = __rest(_a, []);
29
- return (_jsx(Field, __assign({}, rest, { ref: ref, children: _jsx(PhoneInput, {}) })));
30
- });
4
+ export const PhoneField = ({ ref, ...rest }) => {
5
+ return (_jsx(Field, { ...rest, children: _jsx(PhoneInput, { ref: ref }) }));
6
+ };
@@ -1,15 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { forwardRef } from 'react';
14
2
  import { Input } from '../Input/Input';
15
- export var PhoneInput = forwardRef(function (props, ref) { return (_jsx(Input, __assign({}, props, { keyboardType: "phone-pad", autoCapitalize: "none", autoCorrect: false, ref: ref }))); });
3
+ export const PhoneInput = (props) => (_jsx(Input, { keyboardType: "phone-pad", autoCapitalize: "none", autoCorrect: false, ...props }));